[RFC v10 PATCH 1/3] mm: mmap: zap pages with read mmap_sem in munmap

2018-09-14 Thread Yang Shi
When running some mmap/munmap scalability tests with large memory (i.e. > 300GB), the below hung task issue may happen occasionally. INFO: task ps:14018 blocked for more than 120 seconds. Tainted: GE 4.9.79-009.ali3000.alios7.x86_64 #1 "echo 0 > /proc/sys/kernel/hung_task_timeo

[RFC v10 PATCH 2/3] mm: unmap VM_HUGETLB mappings with optimized path

2018-09-14 Thread Yang Shi
When unmapping VM_HUGETLB mappings, vm flags need to be updated. Since the vmas have been detached, so it sounds safe to update vm flags with read mmap_sem. Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Yang Shi --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 9/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre In order to determine a sane default cache allocation for a new CAT/CDP resource group, all resource groups are checked to determine which cache portions are available to share. At this time all possible CLOSIDs that can be supported by the resource is checked. This is probl

[RFC v10 PATCH 3/3] mm: unmap VM_PFNMAP mappings with optimized path

2018-09-14 Thread Yang Shi
When unmapping VM_PFNMAP mappings, vm flags need to be updated. Since the vmas have been detached, so it sounds safe to update vm flags with read mmap_sem. Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Yang Shi --- mm/mmap.c | 9 - 1 file changed, 9 deletions(-) diff --git a/mm/

[PATCH 7/9] x86/intel_rdt: Fix incorrect loop end condition

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre A loop is used to check if a CAT resource's CBM of one CLOSID overlaps with the CBM of another CLOSID of the same resource. The loop is run over all CLOSIDs supported by the resource. The problem with running the loop over all CLOSIDs supported by the resource is that its n

[PATCH 1/9] x86/intel_rdt: Fix MBA parsing callback

2018-09-14 Thread Fenghua Yu
From: Xiaochen Shen Each resource is associated with a parsing callback to parse the data provided from user space when writing schemata file. Commit 9ab9aa15c309 ("x86/intel_rdt: Ensure requested schemata respects mode") changes the first parameter 'data' of parse_ctrlval() from string to a poi

[PATCH 8/9] x86/intel_rdt: Fix exclusive mode handling of MBA resource

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre It is possible for a resource group to consist out of MBA as well as CAT/CDP resources. The "exclusive" resource mode only applies to the CAT/CDP resources since MBA allocations cannot be specified to overlap or not. When a user requests a resource group to become "exclusive

[PATCH 5/9] x86/intel_rdt: Fix unchecked MSR access

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre When a new resource group is created, it is initialized with sane defaults that currently assume the resource being initialized is a CAT resource. This code path is also followed by a MBA resource that is not allocated the same as a CAT resource and as a result we encounter

[PATCH 0/9] x86/intel_rdt: MBA integration fixes

2018-09-14 Thread Fenghua Yu
Chen Yu reported an issue where reading the resctrl "size" file results in a divide-by-zero issue on a system with a MBA resource. Further investigation revealed more issues where the recent RDT features are not well integrated with the MBA resource handling. This series consists out of: - One he

[PATCH 3/9] x86/intel_rdt: Global closid helper to support future fixes

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre The number of CLOSIDs supported by a system is the minimum number of CLOSIDs supported by any of its resources. Care should be taken when iterating over the CLOSIDs of a resource since it may be that the number of CLOSIDs supported on the system is less than the number of CL

[PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre multiple resources are managed When multiple resources are managed by RDT, the number of CLOSIDs used is the minimum of the CLOSIDs supported by each resource. In the function rdt_bit_usage_show(), the annotated bitmask is created to depict how the CAT supporting caches are

[PATCH 6/9] x86/intel_rdt: Do not allow pseudo-locking of MBA resource

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre A system supporting pseudo-locking may have MBA as well as CAT resources of which only the CAT resources could support cache pseudo-locking. When the schemata to be pseudo-locked is provided it should be checked that that schemata does not attempt to pseudo-lock a MBA resour

Re: [PATCH 1/5] ioremap: Rework pXd_free_pYd_page() API

2018-09-14 Thread Kani, Toshi
On Wed, 2018-09-12 at 11:26 +0100, Will Deacon wrote: > The recently merged API for ensuring break-before-make on page-table > entries when installing huge mappings in the vmalloc/ioremap region is > fairly counter-intuitive, resulting in the arch freeing functions > (e.g. pmd_free_pte_page()) bein

[PATCH 2/9] x86/intel_rdt: Fix size reporting of MBA resource

2018-09-14 Thread Fenghua Yu
From: Reinette Chatre Chen Yu reported a divide-by-zero error when accessing the 'size' resctrl file when a MBA resource is enabled. [ 151.193447] divide error: [#1] SMP PTI [ 151.197743] CPU: 93 PID: 1929 Comm: cat Not tainted 4.19.0-rc2-debug-rdt+ #25 [ 151.205070] Hardware name: Dell

Re: [PATCH 3/5] x86: pgtable: Drop pXd_none() checks from pXd_free_pYd_table()

2018-09-14 Thread Kani, Toshi
On Wed, 2018-09-12 at 11:26 +0100, Will Deacon wrote: > Now that the core code checks this for us, we don't need to do it in the > backend. > > Cc: Chintan Pandya > Cc: Toshi Kani > Cc: Thomas Gleixner > Cc: Michal Hocko > Cc: Andrew Morton > Signed-off-by: Will Deacon > --- > arch/x86/mm/p

Re: [PATCH] pinctrl: icelake: Fix the resource number for community-4/5

2018-09-14 Thread Rajat Jain
On Fri, Sep 14, 2018 at 12:41 AM Andy Shevchenko wrote: > > On Fri, Sep 14, 2018 at 1:54 AM Rajat Jain wrote: > > > > The Icelake does not have a community-3, and the memory resources are > > laid out in the following order in the ACPI: > > > > resource-0: community-0 registers > > resource-1: co

Re: [RFC PATCH v2 00/10] vfio/mdev: IOMMU aware mediated device

2018-09-14 Thread Jacob Pan
On Thu, 13 Sep 2018 16:03:01 +0100 Jean-Philippe Brucker wrote: > On 13/09/2018 01:19, Tian, Kevin wrote: > >>> This is proposed for architectures which support finer granularity > >>> second level translation with no impact on architectures which > >>> only support Source ID or the similar granu

[PATCH v5] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-14 Thread Alan Stern
More than one kernel developer has expressed the opinion that the LKMM should enforce ordering of writes by locking. In other words, given the following code: WRITE_ONCE(x, 1); spin_unlock(&s): spin_lock(&s); WRITE_ONCE(y, 1); the stores to x and y should be propa

Re: [PATCH 1/5] ioremap: Rework pXd_free_pYd_page() API

2018-09-14 Thread Kani, Toshi
On Fri, 2018-09-14 at 14:36 -0600, Toshi Kani wrote: > On Wed, 2018-09-12 at 11:26 +0100, Will Deacon wrote: > > The recently merged API for ensuring break-before-make on page-table > > entries when installing huge mappings in the vmalloc/ioremap region is > > fairly counter-intuitive, resulting in

Re: [PATCH] IDE: ide-dma: fix coding style issues with spaces

2018-09-14 Thread David Miller
From: Romain Aviolat Date: Fri, 14 Sep 2018 22:25:40 +0200 > Fixing multiple coding style issues: > * prohibited spaces before that ',' > * spaces before tabs > > Signed-off-by: Romain Aviolat This kind of coding style fix has very little value for a subsystem which is essentially

Re: [PATCH 2/2] watchdog: sama5d4: write the mode register in two steps

2018-09-14 Thread Guenter Roeck
On Fri, Sep 14, 2018 at 12:13:39PM +0200, Romain Izard wrote: > The specification for SAMA5D2 and SAMA5D4 chips, that use this IP for > their watchdog timer, has the following advice regarding the Mode Register: > > "When setting the WDDIS bit, and while it is set, the fields WDV and WDD > must no

Re: [PATCH v2 3/4] iio: adc: Add Xilinx AMS driver

2018-09-14 Thread Randy Dunlap
Hi, On 9/14/18 12:18 AM, Manish Narani wrote: > > Signed-off-by: Manish Narani > --- > drivers/iio/adc/Kconfig | 10 + > drivers/iio/adc/Makefile |1 + > drivers/iio/adc/xilinx-ams.c | 1337 > ++ > 3 files changed, 1348 insertions(+) > cr

Job Application

2018-09-14 Thread Lashawn Bilal  
Howdy, My name is Lashawn and I'm interested in a position. I've attached a copy of my resume. The password is "1234" Best regards! Lashawn <>

Re: [PATCH] pinctrl: icelake: Fix the resource number for community-4/5

2018-09-14 Thread Rajat Jain
On Fri, Sep 14, 2018 at 2:06 PM Rajat Jain wrote: > > On Fri, Sep 14, 2018 at 12:41 AM Andy Shevchenko > wrote: > > > > On Fri, Sep 14, 2018 at 1:54 AM Rajat Jain wrote: > > > > > > The Icelake does not have a community-3, and the memory resources are > > > laid out in the following order in the

Re: [PATCH v7 1/6] dt-bindings: ti-lmu: Remove LM3697

2018-09-14 Thread Pavel Machek
Hi! > > You may want to learn more about device tree and/or talk to the device > > tree maintainers. This is an old article. https://lwn.net/Articles/561462/ > > The article title is "Device trees as ABI". A device tree is defined > in the "*.dts" file that is then compiled to a dtb blob, which >

[RFC 0/3] Timer code cleanup

2018-09-14 Thread Atish Patra
This patch series address some required timer cleanups in RISC-V. Atish Patra (2): RISC-V:Support per-hart timebase-frequency RISC-V: Remove per cpu clocksource Palmer Dabbelt (1): dt-bindings: Correct RISC-V's timebase-frequency Documentation/devicetree/bindings/riscv/cpus.txt | 4 +++-

[RFC 1/3] dt-bindings: Correct RISC-V's timebase-frequency

2018-09-14 Thread Atish Patra
From: Palmer Dabbelt Someone must have read the device tree specification incorrectly, because we were putting timebase-frequency in the wrong place. This corrects the issue, moving it from / { cpus { timebase-frequency = X; } } to / { cpus {

[RFC 3/3] RISC-V: Remove per cpu clocksource

2018-09-14 Thread Atish Patra
There is only one clocksource in RISC-V. The boot cpu initializes that clocksource. No need to keep a percpu data structure. Signed-off-by: Atish Patra --- drivers/clocksource/riscv_timer.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/riscv_timer.

[RFC 2/3] RISC-V:Support per-hart timebase-frequency

2018-09-14 Thread Atish Patra
Follow the updated DT specs and read the timebase-frequency from the boot cpu. Keep the old DT reading as well for backward compatibility. This patch is rework of old patch from Palmer. Signed-off-by: Atish Patra --- arch/riscv/kernel/time.c | 9 + drivers/clocksource/riscv_tim

Re: [PATCH] kernel: prevent submission of creds with higher privileges inside container

2018-09-14 Thread kbuild test robot
Hi Xin, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180913] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/comm

[PTCH] x86: APM: fix build warning when PROC_FS is not enabled

2018-09-14 Thread Randy Dunlap
From: Randy Dunlap Fix build warning in apm_32.c when CONFIG_PROC_FS is not enabled: ../arch/x86/kernel/apm_32.c:1643:12: warning: 'proc_apm_show' defined but not used [-Wunused-function] static int proc_apm_show(struct seq_file *m, void *v) Fixes: 3f3942aca6da ("proc: introduce proc_create_s

Re: metadata operation reordering regards to crash

2018-09-14 Thread Dave Chinner
On Fri, Sep 14, 2018 at 05:06:44PM +0800, 焦晓冬 wrote: > Hi, all, > > A probably bit of complex question: > Does nowadays practical filesystems, eg., extX, btfs, preserve metadata > operation order through a crash/power failure? Yes. Behaviour is filesystem dependent, but we have tests in fstests

Re: [PATCH 4.14 000/115] 4.14.70-stable review

2018-09-14 Thread Eduardo Valentin
On Thu, Sep 13, 2018 at 03:30:20PM +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.14.70 release. > There are 115 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me kno

[GIT PULL] tracing/Makefile: Fix handling redefinition of CC_FLAGS_FTRACE

2018-09-14 Thread Steven Rostedt
Linus, This fixes an issue with the build system caused by a change that modifies CC_FLAGS_FTRACE. The issue is that it breaks the dependencies and causes "make targz-pkg" to rebuild the entire world. Please pull the latest trace-v4.19-rc3 tree, which can be found at: git://git.kernel.org/

Re: [patch V2 04/10] x86/mm/cpa: Add debug mechanism

2018-09-14 Thread kbuild test robot
Hi Thomas, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on v4.19-rc3 next-20180913] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH V4 00/27] C-SKY(csky) Linux Kernel Port

2018-09-14 Thread Guo Ren
On Fri, Sep 14, 2018 at 06:09:35PM +0200, Arnd Bergmann wrote: > On Fri, Sep 14, 2018 at 6:02 PM Guo Ren wrote: > > > > On Fri, Sep 14, 2018 at 04:46:56PM +0200, Arnd Bergmann wrote: > > > On Fri, Sep 14, 2018 at 4:37 PM Guo Ren wrote: > > > > > One level below that, you can of course choose to b

Re: mutex and rcu list traversal idiosyncrasy

2018-09-14 Thread Shiraz Saleem
On Thu, Sep 13, 2018 at 05:55:44AM -0600, Håkon Bugge wrote: > Hi Faisal, > > > In commit f27b4746f378 ("i40iw: add connection management code") you have in > i40iw_add_mqh_6(): > > rtnl_lock(); > for_each_netdev_rcu(...) { > [] > } > rtnl_unlock(); > > Shouldn't this read: > rtnl_lock()

Re: [PATCH] arm: common: use match_string() helper to simplify the code

2018-09-14 Thread kbuild test robot
Hi zhong, Thank you for the patch! Yet something to improve: [auto build test ERROR on arm-soc/for-next] [also build test ERROR on v4.19-rc3 next-20180913] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linu

pinctrl-icelake: driver writes to wrong offsets?

2018-09-14 Thread Rajat Jain
Hi, This is to report what I think is a problem in the pinctrl-icelake driver. It seems that when trying to control GPIO pins GPP_A* and GPIO_B*, the driver ends up writing to incorrect PADCFG registers. I've reached this conclusion by putting debug prints in the driver, although this can be seen

[PATCH 1/5] remoteproc: Fix unbalanced boot with sysfs for no auto-boot rprocs

2018-09-14 Thread Suman Anna
The remoteproc core performs automatic boot and shutdown of a remote processor during rproc_add() and rproc_del() for remote processors supporting 'auto-boot'. The remoteproc devices not using 'auto-boot' require either a remoteproc client driver or a userspace client to use the sysfs 'state' varia

[PATCH 5/5] remoteproc/wkup_m3: Set deny_sysfs_ops flag

2018-09-14 Thread Suman Anna
The Wakeup M3 remote processor is controlled by the wkup_m3_ipc client driver, so set the newly introduced 'deny_sysfs_ops' flag to not allow any overriding of the remoteproc firmware or state from userspace. Signed-off-by: Suman Anna --- drivers/remoteproc/wkup_m3_rproc.c | 1 + 1 file changed,

[PATCH 0/5] remoteproc sysfs fixes/improvements

2018-09-14 Thread Suman Anna
Hi Bjorn, The following series includes couple of fixes and improvements associated with the sysfs interfaces. Patches are based on top of 4.19-rc1. The first 3 patches are independent of each other. Following is the patch summary: - Patch 1 fixes an issue with unbalanced sysfs start/stop and

[PATCH 4/5] remoteproc: Introduce deny_sysfs_ops flag

2018-09-14 Thread Suman Anna
The remoteproc framework provides sysfs interfaces for changing the firmware name and for starting/stopping a remote processor through the sysfs files 'state' and 'firmware'. These interfaces are currently allowed irrespective of how the remoteprocs were booted (like remoteproc self auto-boot, remo

[PATCH 2/5] remoteproc: Check for NULL firmwares in sysfs interface

2018-09-14 Thread Suman Anna
The remoteproc framework provides a sysfs file 'firmware' for modifying the firmware image name from userspace. Add an additional check to ensure NULL firmwares are errored out right away, rather than getting a delayed error while requesting a firmware during the start of a remoteproc later on. Si

[PATCH 3/5] remoteproc: Add missing kernel-doc comment for auto-boot

2018-09-14 Thread Suman Anna
The commit ddf711872c9d ("remoteproc: Introduce auto-boot flag") introduced the auto-boot flag but missed adding the corresponding kernel-doc comment. Add the same. Signed-off-by: Suman Anna --- include/linux/remoteproc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/remotepr

Re: [PATCH v2] mm: mprotect: check page dirty when change ptes

2018-09-14 Thread Jerome Glisse
On Fri, Sep 14, 2018 at 03:16:11PM +0800, Peter Xu wrote: > On Thu, Sep 13, 2018 at 08:42:39PM -0400, Jerome Glisse wrote: > > On Thu, Sep 13, 2018 at 10:23:28AM -0400, Jerome Glisse wrote: > > > On Thu, Sep 13, 2018 at 03:37:22PM +0800, Peter Xu wrote: > > > > On Wed, Sep 12, 2018 at 09:24:39AM -0

Re: [PATCH] sched: Fix a GCC compiled warning.

2018-09-14 Thread zhong jiang
On 2018/9/15 0:43, Miguel Ojeda wrote: > Hi Zhong, > > On Fri, Sep 14, 2018 at 4:49 PM, zhong jiang wrote: >> Fix the following compile warning: >> >> kernel/sched/core.c: In function ‘update_rq_clock_task’: >> kernel/sched/core.c:139:6: warning: unused variable ‘steal’ >> [-Wunused-variable] >>

Re: [PATCH 2/2] add some safety checks for label store interface of flash dev in sysfs

2018-09-14 Thread Junhui Tang
Seems something wrong when size = SB_LABEL_SIZE and u->label[size - 1] != '\n' please check again. --- Tang Junhui Forever me is me --- Dongbo Cao 于2

[PATCH AUTOSEL 4.18 01/92] binfmt_elf: Respect error return from `regset->active'

2018-09-14 Thread Sasha Levin
From: "Maciej W. Rozycki" [ Upstream commit 2f819db565e82e5f73cd42b39925098986693378 ] The regset API documented in defines -ENODEV as the result of the `->active' handler to be used where the feature requested is not available on the hardware found. However code handling core file note genera

[PATCH AUTOSEL 4.18 02/92] net/mlx5: Add missing SET_DRIVER_VERSION command translation

2018-09-14 Thread Sasha Levin
From: Noa Osherovich [ Upstream commit 0f4039104ee61e14ac4771a2181c2a20572f4ec9 ] When translating command opcodes to a string, SET_DRIVER_VERSION command was missing. Fixes: 42ca502e179d0 ('net/mlx5_core: Use a macro in mlx5_command_str()') Signed-off-by: Noa Osherovich Signed-off-by: Saeed M

[PATCH AUTOSEL 4.18 06/92] vfs: fix freeze protection in mnt_want_write_file() for overlayfs

2018-09-14 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit a6795a585929d94ca3e931bc8518f8deb8bbe627 ] The underlying real file used by overlayfs still contains the overlay path. This results in mnt_want_write_file() calls by the filesystem getting freeze protection on the wrong inode (the overlayfs one instead of t

[PATCH AUTOSEL 4.18 16/92] KVM: PPC: Book3S: Fix matching of hardware and emulated TCE tables

2018-09-14 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 76346cd93a5eca33700f82685d56172dd65d4c0a ] When attaching a hardware table to LIOBN in KVM, we match table parameters such as page size, table offset and table size. However the tables are created via very different paths - VFIO and KVM - and the VFIO

[PATCH AUTOSEL 4.18 17/92] MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads

2018-09-14 Thread Sasha Levin
From: Paul Burton [ Upstream commit cd87668d601f622e0ebcfea4f78d116d5f572f4d ] The PCI_OHCI_INT_REG case in pci_ohci_read_reg() contains the following if statement: if ((lo & 0x0f00) == CS5536_USB_INTR) CS5536_USB_INTR expands to the constant 11, which gives us the following condition wh

[PATCH AUTOSEL 4.18 22/92] arm64: dts: mt7622: update a clock property for UART0

2018-09-14 Thread Sasha Levin
From: Ryder Lee [ Upstream commit 2b519747ae4859e886c37834d766fe0c7d8d82e2 ] The input clock of UART0 should be CLK_PERI_UART0_PD. Fixes: 13f36c326cef ("arm64: dts: mt7622: turn uart0 clock to real ones") Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.18 08/92] spi: dw: fix possible race condition

2018-09-14 Thread Sasha Levin
From: Alexandre Belloni [ Upstream commit 66b19d762378785d1568b5650935205edfeb0503 ] It is possible to get an interrupt as soon as it is requested. dw_spi_irq does spi_controller_get_devdata(master) and expects it to be different than NULL. However, spi_controller_set_devdata() is called after

[PATCH AUTOSEL 4.18 18/92] configfs: fix registered group removal

2018-09-14 Thread Sasha Levin
From: Mike Christie [ Upstream commit cc57c07343bd071cdf1915a91a24ab7d40c9b590 ] This patch fixes a bug where configfs_register_group had added a group in a tree, and userspace has done a rmdir on a dir somewhere above that group and we hit a kernel crash. The problem is configfs_rmdir will deta

[PATCH AUTOSEL 4.18 26/92] net: hns3: Fix for reset_level default assignment probelm

2018-09-14 Thread Sasha Levin
From: Yunsheng Lin [ Upstream commit 82b5321460005ac5d34996e17f5a51a4004a1e14 ] handle->reset_level is assigned to HNAE3_NONE_RESET when client is initialized, if a tx timeout happens right after initialization, then handle->reset_level is not resetted to HNAE3_FUNC_RESET in hclge_reset_event, w

[PATCH AUTOSEL 4.18 25/92] net: hns3: Reset net device with rtnl_lock

2018-09-14 Thread Sasha Levin
From: Huazhong Tan [ Upstream commit 6d4fab39533f1bcd933d82d1667ceea93e4de260 ] Since current locking was not covering certain code where netdev was being accessed or manipulated, this patch fixes it. Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by

[PATCH AUTOSEL 4.18 27/92] ARM: hisi: handle of_iomap and fix missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit d396cb185c0337aae5664b250cdd9a73f6eb1503 ] Relying on an unchecked of_iomap() which can return NULL is problematic here, an explicit check seems mandatory. Also the call to of_find_compatible_node() returns a device node with refcount incremented therefo

[PATCH AUTOSEL 4.18 21/92] pinctrl: pinmux: Return selector to the pinctrl driver

2018-09-14 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit f913cfce4ee49a3382a9ff95696f49a46e56e974 ] We must return the selector from pinmux_generic_add_function() so pin controller device drivers can remove the right group if needed for deferred probe for example. And we now must make sure that a proper name is pa

[PATCH AUTOSEL 4.18 29/92] net: hns3: Fix return value error in hns3_reset_notify_down_enet

2018-09-14 Thread Sasha Levin
From: Huazhong Tan [ Upstream commit 6b1385cc251ae9f26b720fa5c8c00bf19af336ae ] When doing reset, netdev has not been brought up is not an error, it means that we do not need do the stop operation, so just return zero. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip

[PATCH AUTOSEL 4.18 32/92] gpu: ipu-v3: csi: pass back mbus_code_to_bus_cfg error codes

2018-09-14 Thread Sasha Levin
From: Enrico Scholz [ Upstream commit d36d0e6309dd8137cf438cbb680e72eb63c81425 ] mbus_code_to_bus_cfg() can fail on unknown mbus codes; pass back the error to the caller. Signed-off-by: Enrico Scholz Signed-off-by: Jan Luebbe [p.za...@pengutronix.de - renamed rc to ret for consistency] Signed

Re: [PATCH V2 0/6] VA to numa node information

2018-09-14 Thread Prakash Sangappa
On 9/13/2018 5:25 PM, Dave Hansen wrote: On 09/13/2018 05:10 PM, Andrew Morton wrote: Also, VMAs having THP pages can have a mix of 4k pages and hugepages. The page walks would be efficient in scanning and determining if it is a THP huge page and step over it. Whereas using the API, the applicat

[PATCH AUTOSEL 4.18 61/92] rcutorture: Use monotonic timestamp for stall detection

2018-09-14 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 622be33fcbc93e9b672b99ed338369eb5e843ac3 ] The get_seconds() call is deprecated because it overflows on 32-bit architectures. The algorithm in rcu_torture_stall() can deal with the overflow, but another problem here is that using a CLOCK_REALTIME stamp can l

[PATCH AUTOSEL 4.18 30/92] ARM: hisi: check of_iomap and fix missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 81646a3d39ef14749301374a3a0b8311384cd412 ] of_find_compatible_node() returns a device node with refcount incremented and thus needs an explicit of_node_put(). Further relying on an unchecked of_iomap() which can return NULL is problematic here, after all

[PATCH AUTOSEL 4.18 60/92] net: mvpp2: make sure we use single queue mode on PPv2.1

2018-09-14 Thread Sasha Levin
From: Maxime Chevallier [ Upstream commit 1e27a628e3f444f53ab8099dfb31c5156e38d112 ] The PPv2 driver defines 2 "queue_modes" : - QDIST_SINGLE_MODE, where each port share one rx queue vector between all CPUs - QDIST_MULTI_MODE, where each port has one rx queue vector per CPU. Multi queue mo

[PATCH AUTOSEL 4.18 34/92] gpiolib: don't allow userspace to set values of input lines

2018-09-14 Thread Sasha Levin
From: Bartosz Golaszewski [ Upstream commit e5332d5437764f775cf4e3b8ca3bf592af063a02 ] User space can currently both read and set values of input lines using the character device. This was not allowed by the old sysfs interface nor is it a correct behavior. Check the first descriptor in the set

[PATCH AUTOSEL 4.18 59/92] net: gemini: Allow multiple ports to instantiate

2018-09-14 Thread Sasha Levin
From: Linus Walleij [ Upstream commit 60cc7767b901dd1e3f70755c3d2505556ba487c2 ] The code was not tested with two ports actually in use at the same time. (I blame this on lack of actual hardware using that feature.) Now after locating a system using both ports, add necessary fix to make both por

[PATCH AUTOSEL 4.18 54/92] lightnvm: pblk: assume that chunks are closed on 1.2 devices

2018-09-14 Thread Sasha Levin
From: Hans Holmberg [ Upstream commit f6352103d2e0ad2d2066725eb19bfdfb8763239b ] We can't know if a block is closed or not on 1.2 devices, so assume closed state to make sure that blocks are erased before writing. Fixes: 32ef9412c114 ("lightnvm: pblk: implement get log report chunk") Signed-off

[PATCH AUTOSEL 4.18 58/92] gpiolib: Mark gpio_suffixes array with __maybe_unused

2018-09-14 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit b23ec59926faf05b0c43680d05671c484e810ac4 ] Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark gpio_suffixes array with __maybe_unused to hide a compiler warning

[PATCH AUTOSEL 4.18 92/92] clk: tegra: bpmp: Don't crash when a clock fails to register

2018-09-14 Thread Sasha Levin
From: Mikko Perttunen [ Upstream commit f7b3182232c82bb9769e2d5471d702bae2972d2b ] When registering clocks, we just skip any that fail to register (leaving a NULL hole in the clock table). However, our of_xlate function still tries to dereference each entry while looking for the clock with the r

[PATCH AUTOSEL 4.18 65/92] drm/amdkfd: Fix kernel queue 64 bit doorbell offset calculation

2018-09-14 Thread Sasha Levin
From: Shaoyun Liu [ Upstream commit 951df6d9cfd07f205f1905bf3b27d994612e0614 ] The bitmap index calculation should reverse the logic used on allocation so it will clear the same bit used on allocation Signed-off-by: Shaoyun Liu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Acked-

[PATCH AUTOSEL 4.18 83/92] staging: fsl-dpaa2/eth: Fix DMA mapping direction

2018-09-14 Thread Sasha Levin
From: Ioana Radulescu [ Upstream commit 466bcdc1fa303be175c45d054bb00effc575033a ] We are using DMA_FROM_DEVICE when mapping RX frame buffers, but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA unmapping operation. Fixes: 87eb55e418b7 ("staging: fsl-dpaa2/eth: Fix potential endless loop

[PATCH AUTOSEL 4.18 77/92] drm/panel: type promotion bug in s6e8aa0_read_mtp_id()

2018-09-14 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit cd0e0ca69109d025b1a1b6609f70682db62138b0 ] The ARRAY_SIZE() macro is type size_t. If s6e8aa0_dcs_read() returns a negative error code, then "ret < ARRAY_SIZE(id)" is false because the negative error code is type promoted to a high positive value. Fixes: 02

[PATCH AUTOSEL 4.18 81/92] dmaengine: idma64: Support dmaengine_terminate_sync()

2018-09-14 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit bbacb8e78a3b29ebdbb6af7d54fcf25d3f1c248f ] It appears that the driver misses the support of dmaengine_terminate_sync(). Since many of callers expects this behaviour implement the new device_synchronize() callback to allow proper synchronization when stoppi

[PATCH AUTOSEL 4.18 66/92] drm/amdkfd: Fix error codes in kfd_get_process

2018-09-14 Thread Sasha Levin
From: Wei Lu [ Upstream commit e47cb828eb3fca3e8999a0b9aa053dda18552071 ] Return ERR_PTR(-EINVAL) if kfd_get_process fails to find the process. This fixes kernel oopses when a child process calls KFD ioctls with a file descriptor inherited from the parent process. Signed-off-by: Wei Lu Reviewe

[PATCH AUTOSEL 4.18 80/92] dmaengine: hsu: Support dmaengine_terminate_sync()

2018-09-14 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 2abc66cd499aa16876e45c6438788902f7d1ce22 ] It appears that the driver misses the support of dmaengine_terminate_sync(). Since many of callers expects this behaviour implement the new device_synchronize() callback to allow proper synchronization when stoppi

[PATCH AUTOSEL 4.18 89/92] gpiolib: Respect error code of ->get_direction()

2018-09-14 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 36b312792b97933dc07abe074f50941199bd357c ] In case we try to lock GPIO pin as IRQ when something going wrong we print a misleading message. Correct this by checking an error code from ->get_direction() in gpiochip_lock_as_irq() and printing a correspondin

[PATCH AUTOSEL 4.18 68/92] selftests: vDSO - fix to return KSFT_SKIP when test couldn't be run

2018-09-14 Thread Sasha Levin
From: "Shuah Khan (Samsung OSG)" [ Upstream commit d2d49495b5c0dffee5c4da5ea12ac0da6679bd08 ] Fix to return KSFT_SKIP when test couldn't be run because AT_SYSINFO_EHDR isn't found and gettimeofday isn't defined. Signed-off-by: Shuah Khan (Samsung OSG) Signed-off-by: Sasha Levin --- tools/tes

[PATCH AUTOSEL 4.14 01/57] binfmt_elf: Respect error return from `regset->active'

2018-09-14 Thread Sasha Levin
From: "Maciej W. Rozycki" [ Upstream commit 2f819db565e82e5f73cd42b39925098986693378 ] The regset API documented in defines -ENODEV as the result of the `->active' handler to be used where the feature requested is not available on the hardware found. However code handling core file note genera

[PATCH AUTOSEL 4.14 02/57] net/mlx5: Add missing SET_DRIVER_VERSION command translation

2018-09-14 Thread Sasha Levin
From: Noa Osherovich [ Upstream commit 0f4039104ee61e14ac4771a2181c2a20572f4ec9 ] When translating command opcodes to a string, SET_DRIVER_VERSION command was missing. Fixes: 42ca502e179d0 ('net/mlx5_core: Use a macro in mlx5_command_str()') Signed-off-by: Noa Osherovich Signed-off-by: Saeed M

[PATCH AUTOSEL 4.18 87/92] blk-mq: only attempt to merge bio if there is rq in sw queue

2018-09-14 Thread Sasha Levin
From: Ming Lei [ Upstream commit b04f50ab8a74129b3041a2836c33c916be3c6667 ] Only attempt to merge bio iff the ctx->rq_list isn't empty, because: 1) for high-performance SSD, most of times dispatch may succeed, then there may be nothing left in ctx->rq_list, so don't try to merge over sw queue i

[PATCH AUTOSEL 4.14 07/57] Bluetooth: Use lock_sock_nested in bt_accept_enqueue

2018-09-14 Thread Sasha Levin
From: Philipp Puschmann [ Upstream commit b71c69c26b4916d11b8d403d8e667bbd191f1b8f ] Fixes this warning that was provoked by a pairing: [60258.016221] WARNING: possible recursive locking detected [60258.021558] 4.15.0-RD1812-BSP #1 Tainted: G O [60258.027146] -

[PATCH AUTOSEL 4.14 13/57] MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads

2018-09-14 Thread Sasha Levin
From: Paul Burton [ Upstream commit cd87668d601f622e0ebcfea4f78d116d5f572f4d ] The PCI_OHCI_INT_REG case in pci_ohci_read_reg() contains the following if statement: if ((lo & 0x0f00) == CS5536_USB_INTR) CS5536_USB_INTR expands to the constant 11, which gives us the following condition wh

[PATCH AUTOSEL 4.18 82/92] dmaengine: sh: rcar-dmac: avoid to write CHCR.TE to 1 if TCR is set to 0

2018-09-14 Thread Sasha Levin
From: Yoshihiro Shimoda [ Upstream commit 538603c6026ce769eec633bb79349f5f287519c7 ] This patch fixes an issue that unexpected retransfering happens if TCR is set to 0 before rcar_dmac_sync_tcr() writes DE bit to the CHCR register. For example, sh-sci driver can reproduce this issue like below:

[PATCH AUTOSEL 4.14 35/57] coresight: tpiu: Fix disabling timeouts

2018-09-14 Thread Sasha Levin
From: Robin Murphy [ Upstream commit ccff2dfaceaca4517432f5c149594215fe9098cc ] Probing the TPIU driver under UBSan triggers an out-of-bounds shift warning in coresight_timeout(): ... [5.677530] UBSAN: Undefined behaviour in drivers/hwtracing/coresight/coresight.c:929:16 [5.685542] shi

[PATCH AUTOSEL 4.14 29/57] drm/nouveau: Fix runtime PM leak in drm_open()

2018-09-14 Thread Sasha Levin
From: Lyude Paul [ Upstream commit 922a8c82fafdec99688bbaea6c5889f562a42cdc ] Noticed this as I was skimming through, if we fail to allocate memory for cli we'll end up returning without dropping the runtime PM ref we got. Additionally, we'll even return the wrong return code! (ret most likely w

[PATCH AUTOSEL 4.14 25/57] tty: fix termios input-speed encoding

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit fada18c48d774b9e837928ecdce6a5d5fdd11ee7 ] Make sure to clear the CIBAUD bits before OR-ing the new mask when encoding the termios input baud rate. This could otherwise lead to an incorrect input rate being reported back and incidentally set on subsequent te

[PATCH AUTOSEL 4.14 49/57] dmaengine: hsu: Support dmaengine_terminate_sync()

2018-09-14 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 2abc66cd499aa16876e45c6438788902f7d1ce22 ] It appears that the driver misses the support of dmaengine_terminate_sync(). Since many of callers expects this behaviour implement the new device_synchronize() callback to allow proper synchronization when stoppi

[PATCH AUTOSEL 4.14 16/57] pinctrl: pinmux: Return selector to the pinctrl driver

2018-09-14 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit f913cfce4ee49a3382a9ff95696f49a46e56e974 ] We must return the selector from pinmux_generic_add_function() so pin controller device drivers can remove the right group if needed for deferred probe for example. And we now must make sure that a proper name is pa

[PATCH AUTOSEL 4.14 27/57] mmc: tegra: prevent HS200 on Tegra 3

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 127407e36f4fe3a1d5e8b9998b479956ce83a7dc ] The stack assumes that SDHC controller which support SD3.0 (SDR104) do support HS200. This is not the case for Tegra 3, which does support SD 3.0 but only supports eMMC spec 4.41. Use SDHCI_QUIRK2_BROKEN_HS200 to in

[PATCH AUTOSEL 4.14 20/57] ARM: hisi: fix error handling and missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 9f30b5ae0585ca5234fe979294b8f897299dec99 ] of_iomap() can return NULL which seems critical here and thus should be explicitly flagged so that the cause of system halting can be understood. As of_find_compatible_node() is returning a device node with refc

[PATCH AUTOSEL 4.14 34/57] coresight: Handle errors in finding input/output ports

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit fe470f5f7f684ed15bc49b6183a64237547910ff ] If we fail to find the input / output port for a LINK component while enabling a path, we should fail gracefully rather than assuming port "0". Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by

[PATCH AUTOSEL 4.14 32/57] parport: sunbpp: fix error return code

2018-09-14 Thread Sasha Levin
From: Julia Lawall [ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ] Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman Signed

[PATCH AUTOSEL 4.14 28/57] mmc: sdhci: do not try to use 3.3V signaling if not supported

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 1b5190c2e74c47ebe4bcecf7a072358ad9f1feaa ] For eMMC devices it is valid to only support 1.8V signaling. When vqmmc is set to a fixed 1.8V regulator the stack tries to set 3.3V initially and prints the following warning: mmc1: Switching to 3.3V signalling v

[PATCH AUTOSEL 4.14 47/57] selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress

2018-09-14 Thread Sasha Levin
From: John Stultz [ Upstream commit 1416270f4a1ae83ea84156ceba19a66a8f88be1f ] In the past we've warned when ADJ_OFFSET was in progress, usually caused by ntpd or some other time adjusting daemon running in non steady sate, which can cause the skew calculations to be incorrect. Thus, this patch

[PATCH AUTOSEL 4.14 30/57] drm/nouveau/debugfs: Wake up GPU before doing any reclocking

2018-09-14 Thread Sasha Levin
From: Karol Herbst [ Upstream commit eaeb9010bb4bcdc20e58254fa42f3fe730a7f908 ] Fixes various reclocking related issues on prime systems. Signed-off-by: Karol Herbst Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nouveau_debugfs

[PATCH AUTOSEL 4.14 42/57] rcu: Fix grace-period hangs due to race with CPU offline

2018-09-14 Thread Sasha Levin
From: "Paul E. McKenney" [ Upstream commit 1e64b15a4b102e1cd059d4d798b7a78f93341333 ] Without special fail-safe quiescent-state-propagation checks, grace-period hangs can result from the following scenario: 1. CPU 1 goes offline. 2. Because CPU 1 is the only CPU in the system blockin

[PATCH AUTOSEL 4.14 46/57] scsi: libfc: fixup 'sleeping function called from invalid context'

2018-09-14 Thread Sasha Levin
From: Hannes Reinecke [ Upstream commit fa519f701d27198a2858bb108fc18ea9d8c106a7 ] fc_rport_login() will be calling mutex_lock() while running inside an RCU-protected section, triggering the warning 'sleeping function called from invalid context'. To fix this we can drop the rcu functions here

[PATCH AUTOSEL 4.14 56/57] pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant

2018-09-14 Thread Sasha Levin
From: Douglas Anderson [ Upstream commit 1cf86bc21257a330e3af51f2a4e885f1a705f6a5 ] If you do this on an sdm845 board: grep "" /sys/kernel/debug/pinctrl/*spmi:pmic*/pinconf-groups ...it looks like nonsense. For every pin you see listed: input bias disabled, input bias high impedance, input

<    1   2   3   4   5   6   7   >