Commit graph

892,791 commits

Author SHA1 Message Date
qctecmdr
b02292d242 Merge "mtd: msm_qpic_nand: Update bus voting with the new icb framework" 2020-11-23 03:49:18 -08:00
Pavel Tatashin
fe78103d5e mm/memory_hotplug: drain per-cpu pages again during memory offline
There is a race during page offline that can lead to infinite loop:
a page never ends up on a buddy list and __offline_pages() keeps
retrying infinitely or until a termination signal is received.

Thread#1 - a new process:

load_elf_binary
 begin_new_exec
  exec_mmap
   mmput
    exit_mmap
     tlb_finish_mmu
      tlb_flush_mmu
       release_pages
        free_unref_page_list
         free_unref_page_prepare
          set_pcppage_migratetype(page, migratetype);
             // Set page->index migration type below  MIGRATE_PCPTYPES

Thread#2 - hot-removes memory
__offline_pages
  start_isolate_page_range
    set_migratetype_isolate
      set_pageblock_migratetype(page, MIGRATE_ISOLATE);
        Set migration type to MIGRATE_ISOLATE-> set
        drain_all_pages(zone);
             // drain per-cpu page lists to buddy allocator.

Thread#1 - continue
         free_unref_page_commit
           migratetype = get_pcppage_migratetype(page);
              // get old migration type
           list_add(&page->lru, &pcp->lists[migratetype]);
              // add new page to already drained pcp list

Thread#2
Never drains pcp again, and therefore gets stuck in the loop.

The fix is to try to drain per-cpu lists again after
check_pages_isolated_cb() fails.

Change-Id: I7d9b42fdbf436458242385f795126e42294562b1
Fixes: c52e75935f ("mm: remove extra drain pages on pcp list")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200903140032.380431-1-pasha.tatashin@soleen.com
Link: https://lkml.kernel.org/r/20200904151448.100489-2-pasha.tatashin@soleen.com
Link: http://lkml.kernel.org/r/20200904070235.GA15277@dhcp22.suse.cz
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-Commit: 9683182612214aa5f5e709fad49444b847cd866a
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2020-11-23 17:03:25 +05:30
Faiyaz Mohammed
955ebf10d3 mm: slub: add type casting in alloc_trace_locations to avoid build warning
Add type casting in alloc_trace_locations to avoid build below warning.

mm/slub.c: In function ‘alloc_trace_locations’:
mm/slub.c:6322:27: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
error, forbidden warning: slub.c:6322.

Change-Id: I87e337cc73c36274aaaa8dfd384f3f80f0d2d79d
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
2020-11-23 16:33:05 +05:30
Veera Vegivada
d1a1ab0940 interconnect: qcom: Add SM8150 interconnect provider driver
Introduce Qualcomm SM8150 specific provider driver using the
interconnect framework.

Change-Id: I5710b7c30f49d159849c4b862bc252a8d964a164
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
2020-11-23 14:41:05 +05:30
Charan Teja Reddy
4690fae9cd mm: page_owner: add pid, allocated time in page owner dump
Add pid and page allocated time in page owner dump.

Change-Id: I8ea2b18c14ad887f49fc7b05174169cc1fbb902e
Fixes: 65b0515874 ("mm, page_owner: record time and pid")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2020-11-23 14:35:17 +05:30
qctecmdr
a2f8e24825 Merge "dt-bindings: clock: Add support for 5nm C-PHY shadow clock" 2020-11-22 23:40:45 -08:00
qctecmdr
da6a764a40 Merge "arm64: defconfig: Add support for Global clock controller for YUPIK" 2020-11-22 23:40:44 -08:00
qctecmdr
34dc2b1561 Merge "mmc: sdhci-msm: Add NULL check before dereferencing var_info" 2020-11-22 23:40:44 -08:00
qctecmdr
829fba660f Merge "scsi: ufs: Check qcg before dereferencing" 2020-11-22 23:40:44 -08:00
Liangcai Fan
8e3c3ebe1d ANDROID: ABI: add symbols of sprd_ion.ko and snd-soc-sprd-codec-sc2730.ko to unisoc
Add symbols of sprd_ion.ko and snd-soc-sprd-codec-sc2730.ko to unisoc,
and updates the ABI representation accordingly.

Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

5 Added functions:

  [A] 'function int __kfifo_from_user_r(__kfifo*, void*, unsigned long int, unsigned int*, size_t)'
  [A] 'function int __kfifo_to_user_r(__kfifo*, void*, unsigned long int, unsigned int*, size_t)'
  [A] 'function unsigned int dapm_kcontrol_get_value(const snd_kcontrol*)'
  [A] 'function void* memset32(uint32_t*, uint32_t, size_t)'
  [A] 'function unsigned int snd_pcm_rate_bit_to_rate(unsigned int)'

Bug: 160255258
Change-Id: Id5d8384d4309b43dae6ccf3b8208cf46da7b6781
Signed-off-by: Liangcai Fan <liangcai.fan@unisoc.com>
2020-11-23 15:29:29 +08:00
Faiyaz Mohammed
d12e350603 mm: slub: avoid return code from slab_sysfs_init if debugfs is off
Avoid returning from slab_sysfs_init if debugfs is off as it is not fatal.

Change-Id: Ice8c26861ad6d6d143e910bb36aeed61dc23cb2f
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
2020-11-23 11:41:23 +05:30
Hemant Kumar
a73babdb3e cnss2: pci: Trigger link down recovery if link fails to enter L0
In case if link fails to transition to L0 trigger inferred link
down recovery to collect RDDM dump.

Change-Id: I43326af34744501c542a1a1e22d6a9b5378c7289
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-11-22 21:14:18 -08:00
Raghavendra Kakarla
e21730c492 lpm-levels: Disable RIMPS timer based PLL/RAIL feature timer
This patch disables the RIMPS timer based PLL/RAIL trigger
timer in core C4 exit so that it stops the RIMPS from ticking
timer when core C4 exit happen before this timer expires.

Change-Id: I74b3e2222dc3ef5ba0fdebd71b7e86201016fc42
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-11-23 10:24:40 +05:30
qctecmdr
7af2b002ef Merge "msm: ADSPRPC: Add start and end timer for map and buffer" 2020-11-21 17:20:53 -08:00
qctecmdr
95990aa497 Merge "soc: qcom: glink_probe: Defer SSR unregister" 2020-11-21 17:20:53 -08:00
qctecmdr
6cfa244955 Merge "mhi: core: Disable preemption while processing data events" 2020-11-21 11:50:56 -08:00
qctecmdr
9be27828f5 Merge "mm: memory_hotplug: migration failure info of a page under DEBUG_VM" 2020-11-21 11:50:56 -08:00
qctecmdr
aa06537841 Merge "cnss2: Check device status before suspending PCIe bus" 2020-11-21 11:50:56 -08:00
Nitin Rawat
d553a0ff41 scsi: ufs: Check qcg before dereferencing
Check qcg before dereferencing to avoid NULL pointer
dereference and return if its NULL. This is is to
fix below kw warnings.

ufs-qcom.c:2489: 'qcg' is assigned the return value from
function 'cpu_to_group'.
ufs-qcom.c:2439: 'cpu_to_group' explicitly returns
a NULL value.
ufs-qcom.c:2490: 'qcg' is explicitly dereferenced.

Change-Id: I291c9230bb7fb5df414db8f80bfb17a50c8fc7cf
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
2020-11-22 01:10:41 +05:30
Jagadeesh Kona
e5af27d253 arm64: defconfig: Add support for Global clock controller for YUPIK
Enable Global clock controller for YUPIK.

Change-Id: I8f903168d22f4451eebecb7d2cd76e803876ebb0
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2020-11-21 20:15:29 +05:30
Jagadeesh Kona
1601cb9434 clk: qcom: gcc-yupik: Add support for GCC clock driver
Add support for global clock controller for peripheral
clock clients to be able to request for the clocks.

Change-Id: If68b92b5f599c06412434dacb0e438e5d8aaa5f5
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2020-11-21 20:13:14 +05:30
qctecmdr
41a072792c Merge "net: Kconfig changes to enable sfe feature" 2020-11-21 06:18:44 -08:00
qctecmdr
44d57bb97f Merge "scsi: ufs: update pm_lvl during probe only when current pm_lvl is invalid" 2020-11-21 06:18:44 -08:00
qctecmdr
1f4310e460 Merge "defconfig: sdxlemur: Enable CONFIG_SPMI_MSM_PMIC_ARB{_DEBUG}" 2020-11-21 06:18:43 -08:00
qctecmdr
5183c6e616 Merge "dm verity: correcting logic used with corrupted_errs counter" 2020-11-21 06:18:43 -08:00
Vatsal Bucha
70d6e6fe76 fsa4480: Update bits for switch ctl in reg notifier
Update bits for switch ctl in reg notifier so that
after PDR euro headset is detected as US and playback dosent
get paused on headset.

Change-Id: I02639b2c1db64bea03c0bb0696568a3aa9275b01
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-11-21 12:58:35 +05:30
rbandi
f7945b4f75 HID: qvr: wake up after acknowledgment from viewer
wake up wait_event_interruptible_timeout after receiving
acknowledgment from viewer.

Change-Id: I8d80b72ccfcfcb97a59185a35bb2824fe105198c
Signed-off-by: rbandi <rohitbandi@codeaurora.org>
2020-11-20 13:46:22 -08:00
Liangwei Dong
9ea529cf46 cnss2: Avoid printing some verbose logs to kmsg
Create cnss_pr_buf() to print verbose log to IPC buffer only.

Change-Id: I21556bbaced860d5b27967b9790b2e1396d7822d
CRs-Fixed: 2820766
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-11-20 11:25:42 -08:00
Yue Ma
e70b20554b cnss2: Check link status before setting wlaon_pwr_ctrl registers
If PCIe link is down, skip setting wlaon_pwr_ctrl registers to avoid
unclocked access.

Change-Id: I156f936ad87089754d6644d2eb3199105065ee32
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-11-20 11:10:28 -08:00
Jack Pham
145832c3a6 usb: gadget: f_accessory: Fix check for dev->disconnected
The previous commit d378aeae512d ("usb: gadget: f_accessory: avoid
requeuing write req if disconnected") added a check for
dev->disconnected during write operation, but incorrectly
inverted the value, thus it fails when connected. Fix the polarity
of this check.

Change-Id: I447871d054e35a9d21eb9e55087facfbf7701dd5
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-11-20 09:42:17 -08:00
Jack Pham
79b9a2c111 usb: gadget: f_accessory: avoid requeuing write req if disconnected
There is a race condition when a write operation is blocked
waiting for an available request and the function is disabled
due to disconnection or reset. usb_ep_disable() is called from
acc_function_disable() and causes the UDC to call the pending
requests' completions, which will wake up the writer thread and
proceed to call usb_ep_queue() before the endpoint is fully
disabled. The UDC driver may not handle this and could allow
the request to be requeued inadvertently. In DWC3's case, this
allows the HW to attempt a transfer with stale TRBs that point
to invalid DMA buffers.

Let's ensure the function driver acts as a good citizen and handle
it by moving the check for dev->offline || dev->disconnected to
after the wait_event to make sure the endpoint is enabled before
attempting to queue another request.

Change-Id: I1aa005e0c1e3ed1e1d814ff79496b70fdb401571
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-11-20 09:38:26 -08:00
Veerabhadrarao Badiganti
1fd4b879d4 mmc: sdhci-msm: Add dbg_state sysfs
Add dbg_state sysfs to facilitate trace instance to be enabled
only on debug flavor builds.

Change-Id: I6524e6184e2a81b2e39b0f0338e4d8a9b7989542
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2020-11-20 21:10:10 +05:30
Elson Roy Serrao
7098fc425e defconfig: Enable USB PD on sdxlemur
Enable USB PD config flag on sdxlemur to add
PD support.

Change-Id: If7a91abb4c6d1b0f368a931c9c686012a310eb99
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
2020-11-20 07:30:07 -08:00
Sarannya S
5078b14d69 soc: qcom: glink_probe: Defer SSR unregister
Calling SSR unregister for other peripherals from glink_ssr device remove
call back results in deadlock if multiple SSRs happens in parallel.

SSR unregister is defer to other worker to avoid notifier SRCU deadlock.

Change-Id: Ifa5c461201eec4b4beb8bf405bd0a2904a2cc90f
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Sarannya S <sarannya@codeaurora.org>
2020-11-20 18:41:30 +05:30
Jeya R
e42e8c386e msm: ADSPRPC: Add start and end timer for map and buffer
Get kernel time during start and end of map create
to keep track of time taken to create map. The time
variables are added as member of map struct. Same
time variables are added for buffers also.

Change-Id: I6454f5b60bec1a24a43ea1b7539ec45ba5358f2e
Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com>
Signed-off-by: Jeya R <jeyr@codeaurora.org>
2020-11-20 04:53:23 -08:00
Odelu Kukatla
79a4656918 interconnect: qcom: Fix the issue with uninitialized variable for Holi
There is potential issue where uninitialized variable can be
used, so fix it.

Change-Id: If725b7efc2979889415da2673c68d4be71e41631
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2020-11-20 15:59:03 +05:30
Saurabh Sahu
2089519099 dt-bindings: clock: Add support for clock ids for MONACO
Add clock ids for GCC/DISPCC/GPUCC for clients to be able
to request for clocks from these clock controllers for
monaco.

Change-Id: Ie09a5a7a5fd1101fb863e836a0e554198e699511
Signed-off-by: Saurabh Sahu <sausah@codeaurora.org>
2020-11-20 15:53:23 +05:30
Naman Padhiar
599bec2e07 icnss2: Avoid race between soc wake release threads
Avoid race condition between soc wake release from queue
context and host driver context.

Change-Id: I6e20a9a8781f65447e89160ff4e362a04ec4ec5c
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2020-11-20 01:54:27 -08:00
Naman Padhiar
af089f3e48 icnss2: Add support for host triggered recovery
Send force FW crash message to FW via smp2p to trigger
SSR. This will be used by host to recover FW bad state.

Change-Id: If840a94c9102acb775fc67e6fd2098e9ae3b8a33
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2020-11-20 01:53:25 -08:00
Sarthak Garg
fceb94ab29 mmc: sdhci-msm: Add NULL check before dereferencing var_info
Add NULL check before dereferencing var_info.

Change-Id: I8f3acd69118bedd0b156cb8764d3d172ac4576cc
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-11-20 13:40:02 +05:30
qctecmdr
6a4a49544d Merge "msm: net: Add support to packet threshold events." 2020-11-20 00:08:15 -08:00
qctecmdr
370af6a367 Merge "usb: dwc3: Resume parent before resuming child device while in host mode" 2020-11-20 00:08:14 -08:00
qctecmdr
871acc5263 Merge "mmc: host: Handle config dependencies for cqhci crypto" 2020-11-20 00:08:14 -08:00
Sarthak Garg
ca95a2bdb5 mmc: core: Dereference dev pointer after NULL check
Dereference dev pointer after NULL check.

Change-Id: I39bc175eb53ff486577672b1c3175475bbf394e2
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-11-20 13:32:59 +05:30
Mohammed Javid
a604ebfe67 msm: ipa: CV2X header file changes
For QMI dpm port to open, control manager needs
to know about usb/mhi ep details corresponding to
RMNET and RMNET_CV2X tethering.
IPA driver has all endpoint info at one place.
 - provide IOCTL interface to get ep_pair info.
 - Add support for new dtsi entry specifying auto config.
 - Add support in ipa-usb driver for rmnet_cv2x.

Change-Id: Ia5ec0df955ef7794ca992129dab538f65af36211
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2020-11-20 12:28:18 +05:30
Aman Gupta
4c85ebff25 net: Kconfig changes to enable sfe feature
Shortcut forward Engine (SFE) is a software packet accelerator
It depends on packet tuple entries based on conntrack information
The change adds its config entry in net Kconfig.

Change-Id: Ied018e83e26f69682590989242b333754f367556
Signed-off-by: Aman Gupta <amangupt@codeaurora.org>
2020-11-19 21:43:13 -08:00
Sarthak Garg
b54b4aac61 mtd: msm_qpic_nand: Update bus voting with the new icb framework
Update bus voting for sdxlemur nand driver with the new icb framework.

Change-Id: I59108be9545780adc5f9040f97ae0d07536cc6bf
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2020-11-20 10:46:05 +05:30
Nitin Rawat
3b52295bc6 scsi: ufs: update pm_lvl during probe only when current pm_lvl is invalid
As per current code, pm_lvl is read from DT on every probe
during system resume after suspend.

Therefore, rpm_lvl and spm_lvl updated by sysfs will be overwritten
with the pm_lvl read from DT during probe after resume from
system suspend.

To avoid this read pm_lvl from DT only when current pm_lvl
is invalid or during the first ufs probe after boot.

Change-Id: I059d574a81d0e0f7cee8b6492e495819579a2d4c
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
2020-11-20 10:29:02 +05:30
qctecmdr
6151ff0c6a Merge "defconfig: enable QGKI & GKI apis of msm_performance driver" 2020-11-19 20:09:40 -08:00
Subbaraman Narayanamurthy
0d4a229e92 defconfig: sdxlemur: Enable CONFIG_SPMI_MSM_PMIC_ARB{_DEBUG}
Enable SPMI debug bus driver which is useful for writing to PMIC
peripheral registers over debug bus on devices when the fuse is
not blown. While at it, enable CONFIG_SPMI_MSM_PMIC_ARB as well
explicitly though it's selected for sdxlemur already.

Change-Id: I8d04c96efcdb089f8950e57fd1b152cd1cc5a84f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-11-19 20:01:42 -08:00