[PATCH 2/3] powerpc/spinlocks: Rename SPLPAR-only spinlocks

2019-07-28 Thread Christopher M. Riedl
The __rw_yield and __spin_yield locks only pertain to SPLPAR mode. Rename them to make this relationship obvious. Signed-off-by: Christopher M. Riedl --- arch/powerpc/include/asm/spinlock.h | 6 -- arch/powerpc/lib/locks.c| 6 +++--- 2 files changed, 7 insertions(+), 5

[PATCH 1/3] powerpc/spinlocks: Refactor SHARED_PROCESSOR

2019-07-28 Thread Christopher M. Riedl
Determining if a processor is in shared processor mode is not a constant so don't hide it behind a #define. Signed-off-by: Christopher M. Riedl --- arch/powerpc/include/asm/spinlock.h | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git

[PATCH 3/3] powerpc/spinlock: Fix oops in shared-processor spinlocks

2019-07-28 Thread Christopher M. Riedl
Booting w/ ppc64le_defconfig + CONFIG_PREEMPT results in the attached kernel trace due to calling shared-processor spinlocks while not running in an SPLPAR. Previously, the out-of-line spinlocks implementations were selected based on CONFIG_PPC_SPLPAR at compile time without a runtime

[PATCH 0/3] Fix oops in shared-processor spinlocks

2019-07-28 Thread Christopher M. Riedl
Fixes an oops when calling the shared-processor spinlock implementation from a non-SP LPAR. Also take this opportunity to refactor SHARED_PROCESSOR a bit. Reference: https://github.com/linuxppc/issues/issues/229 Christopher M. Riedl (3): powerpc/spinlocks: Refactor SHARED_PROCESSOR

[v6 3/6] extable: Add function to search only kernel exception table

2019-07-28 Thread Santosh Sivaraj
Certain architecture specific operating modes (e.g., in powerpc machine check handler that is unable to access vmalloc memory), the search_exception_tables cannot be called because it also searches the module exception tables if entry is not found in the kernel exception table. Cc: Thomas

[PATCH] scsi: ibmvfc: Mark expected switch fall-throughs

2019-07-28 Thread Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_npiv_login_done': drivers/scsi/ibmvscsi/ibmvfc.c:4022:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

[v6 4/6] powerpc/memcpy: Add memcpy_mcsafe for pmem

2019-07-28 Thread Santosh Sivaraj
From: Balbir Singh The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to convert machine check exceptions into a return value on failure in case a machine check exception is encountered during the memcpy. The return value is the number of bytes remaining to be copied. This patch

[v6 5/6] powerpc/mce: Handle UE event for memcpy_mcsafe

2019-07-28 Thread Santosh Sivaraj
If we take a UE on one of the instructions with a fixup entry, set nip to continue execution at the fixup entry. Stop processing the event further or print it. Based-on-patch-by: Reza Arbab Cc: Reza Arbab Cc: Mahesh Salgaonkar Signed-off-by: Santosh Sivaraj --- arch/powerpc/include/asm/mce.h

[v6 0/6] powerpc: implement machine check safe memcpy

2019-07-28 Thread Santosh Sivaraj
During a memcpy from a pmem device, if a machine check exception is generated we end up in a panic. In case of fsdax read, this should only result in a -EIO. Avoid MCE by implementing memcpy_mcsafe. Before this patch series: ``` bash-4.4# mount -o dax /dev/pmem0 /mnt/pmem/ [ 7621.714094]

[v6 6/6] powerpc: add machine check safe copy_to_user

2019-07-28 Thread Santosh Sivaraj
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe() Signed-off-by: Santosh Sivaraj --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/uaccess.h | 14 ++ 2 files changed, 15 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[PATCH] powerpc/kvm: Fall through switch case explicitly

2019-07-28 Thread Santosh Sivaraj
Implicit fallthrough warning was enabled globally which broke the build. Make it explicit with a `fall through` comment. Signed-off-by: Santosh Sivaraj --- arch/powerpc/kvm/book3s_32_mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_32_mmu.c

[v6 1/6] powerpc/mce: Make machine_check_ue_event() static

2019-07-28 Thread Santosh Sivaraj
From: Reza Arbab The function doesn't get used outside this file, so make it static. Signed-off-by: Reza Arbab Signed-off-by: Santosh Sivaraj Reviewed-by: Nicholas Piggin --- arch/powerpc/kernel/mce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[v6 2/6] powerpc/mce: Fix MCE handling for huge pages

2019-07-28 Thread Santosh Sivaraj
From: Balbir Singh The current code would fail on huge pages addresses, since the shift would be incorrect. Use the correct page shift value returned by __find_linux_pte() to get the correct physical address. The code is more generic and can handle both regular and compound pages. Fixes:

[PATCH 4/5] powerpc/PCI: Remove HAVE_ARCH_PCI_RESOURCE_TO_USER

2019-07-28 Thread Denis Efremov
The function pci_resource_to_user() was turned to a weak one. Thus, powerpc-specific version will automatically override the generic one and the HAVE_ARCH_PCI_RESOURCE_TO_USER macro should be removed. Signed-off-by: Denis Efremov --- arch/powerpc/include/asm/pci.h | 2 -- 1 file changed, 2

Re: [PATCH] powerpc/kmcent2: update the ethernet devices' phy properties

2019-07-28 Thread Valentin Longchamp
Hi Scott, Kumar, Looking at this patch I have realised that I had already submitted it to the mailing list nearly 2 years ago: https://patchwork.ozlabs.org/patch/842944/ Could you please make sure that this one gets merged in the next window, so that I avoid forgetting such a patch a 2nd time ?

Re: [PATCH] powerpc/kmcent2: update the ethernet devices' phy properties

2019-07-28 Thread Scott Wood
On Sun, 2019-07-28 at 18:01 +0200, Valentin Longchamp wrote: > Hi Scott, Kumar, > > Looking at this patch I have realised that I had already submitted it > to the mailing list nearly 2 years ago: > https://patchwork.ozlabs.org/patch/842944/ > > Could you please make sure that this one gets

Re: [PATCH] powerpc/kmcent2: update the ethernet devices' phy properties

2019-07-28 Thread Valentin Longchamp
Le dim. 28 juil. 2019 à 21:26, Scott Wood a écrit : > On Sun, 2019-07-28 at 18:01 +0200, Valentin Longchamp wrote: > > Le dim. 14 juil. 2019 à 22:05, Valentin Longchamp > > a écrit : > > > > > > Change all phy-connection-type properties to phy-mode that are better > > > supported by the fman

[PATCH 0/5] PCI: Convert pci_resource_to_user() to a weak function

2019-07-28 Thread Denis Efremov
Architectures currently define HAVE_ARCH_PCI_RESOURCE_TO_USER if they want to provide their own pci_resource_to_user() implementation. This could be simplified if we make the generic version a weak function. Thus, architecture specific versions will automatically override the generic one. Denis

[PATCH 1/5] PCI: Convert pci_resource_to_user to a weak function

2019-07-28 Thread Denis Efremov
The patch turns pci_resource_to_user() to a weak function. Thus, architecture-specific versions will automatically override the generic one. This allows to remove the HAVE_ARCH_PCI_RESOURCE_TO_USER macro and avoid the conditional compilation for this single function. Signed-off-by: Denis Efremov

Re: [EXTERNAL][PATCH 1/5] PCI: Convert pci_resource_to_user to a weak function

2019-07-28 Thread Paul Burton
Hi Denis, On Sun, Jul 28, 2019 at 11:22:09PM +0300, Denis Efremov wrote: > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 9e700d9f9f28..1a19d0151b0a 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1870,25 +1870,13 @@ static inline const char *pci_name(const