[PATCH v4 16/16] powerpc/traps: Machine check fix RI=0 recoverability check

2020-05-07 Thread Nicholas Piggin
The MSR[RI]=0 recoverability check should be in the recovered machine check case. Without this, a machine check that hits in a RI region that has for example live SRRs, will cause the interrupted context to resume with corrupted registers and crash unpredictably. This does not affect 64s at the

[PATCH v4 15/16] powerpc/traps: make unrecoverable NMIs die instead of panic

2020-05-07 Thread Nicholas Piggin
System Reset and Machine Check interrupts that are not recoverable due to being nested or interrupting when RI=0 currently panic. This is not necessary, and can often just kill the current context and recover. Reviewed-by: Christophe Leroy Signed-off-by: Nicholas Piggin ---

[PATCH v4 14/16] powerpc/traps: system reset do not trace

2020-05-07 Thread Nicholas Piggin
Similarly to the previous patch, do not trace system reset. This code is used when there is a crash or hang, and tracing disturbs the system more and has been known to crash in the crash handling path. Acked-by: Naveen N. Rao Reviewed-by: Christophe Leroy Signed-off-by: Nicholas Piggin ---

[PATCH v4 13/16] powerpc/64s: machine check do not trace real-mode handler

2020-05-07 Thread Nicholas Piggin
Rather than notrace annotations throughout a significant part of the machine check code across kernel/ pseries/ and powernv/ which can easily be broken and is infrequently tested, use paca->ftrace_enabled to blanket-disable tracing of the real-mode non-maskable handler. Acked-by: Naveen N. Rao

[PATCH v4 12/16] powerpc: implement ftrace_enabled helper

2020-05-07 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin Reviewed-by: Christophe Leroy --- arch/powerpc/include/asm/ftrace.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h index f54a08a2cd70..bc76970b6ee5 100644 ---

[PATCH v4 11/16] powerpc/64s: machine check interrupt update NMI accounting

2020-05-07 Thread Nicholas Piggin
machine_check_early is taken as an NMI, so nmi_enter is used there. machine_check_exception is no longer taken as an NMI (it's invoked via irq_work in the case a machine check hits in kernel mode), so remove the nmi_enter from that case. In NMI context, hash faults don't try to refill the hash

[PATCH v4 10/16] powerpc/pseries: machine check use rtas_call_unlocked with args on stack

2020-05-07 Thread Nicholas Piggin
With the previous patch, machine checks can use rtas_call_unlocked which avoids the rtas spinlock which would deadlock if a machine check hits while making an rtas call. This also avoids the complex rtas error logging which has more rtas calls and includes kmalloc (which can return memory beyond

[PATCH v4 09/16] powerpc/pseries: limit machine check stack to 4GB

2020-05-07 Thread Nicholas Piggin
This allows rtas_args to be put on the machine check stack, which avoids a lot of complications with re-entrancy deadlocks. Reviewed-by: Christophe Leroy Reviewed-by: Mahesh Salgaonkar Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 15 --- 1 file changed, 12

[PATCH v4 08/16] powerpc/pseries/ras: fwnmi sreset should not interlock

2020-05-07 Thread Nicholas Piggin
PAPR does not specify that fwnmi sreset should be interlocked, and PowerVM (and therefore now QEMU) do not require it. These "ibm,nmi-interlock" calls are ignored by firmware, but there is a possibility that the sreset could have interrupted a machine check and release the machine check's

[PATCH v4 07/16] powerpc/pseries/ras: fwnmi avoid modifying r3 in error case

2020-05-07 Thread Nicholas Piggin
If there is some error with the fwnmi save area, r3 has already been modified which doesn't help with debugging. Only update r3 when to restore the saved value. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/ras.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

[PATCH v4 06/16] powerpc/pseries/ras: FWNMI_VALID off by one

2020-05-07 Thread Nicholas Piggin
This was discovered developing qemu fwnmi sreset support. This off-by-one bug means the last 16 bytes of the rtas area can not be used for a 16 byte save area. It's not a serious bug, and QEMU implementation has to retain a workaround for old kernels, but it's good to tighten it. Acked-by:

[PATCH v4 05/16] powerpc/pseries/ras: avoid calling rtas_token in NMI paths

2020-05-07 Thread Nicholas Piggin
In the interest of reducing code and possible failures in the machine check and system reset paths, grab the "ibm,nmi-interlock" token at init time. Reviewed-by: Christophe Leroy Reviewed-by: Mahesh Salgaonkar Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/firmware.h| 1 +

[PATCH v4 04/16] powerpc/64s/exceptions: machine check reconcile irq state

2020-05-07 Thread Nicholas Piggin
pseries fwnmi machine check code pops the soft-irq checks in rtas_call (after the previous patch to remove rtas_token from this call path). Rather than play whack a mole with these and forever having fragile code, it seems better to have the early machine check handler perform the same kind of

[PATCH v4 03/16] powerpc/64s/exceptions: Change irq reconcile for NMIs from reusing _DAR to RESULT

2020-05-07 Thread Nicholas Piggin
A spare interrupt stack slot is needed to save irq state when reconciling NMIs (sreset and decrementer soft-nmi). _DAR is used for this, but we want to reconcile machine checks as well, which do use _DAR. Switch to using RESULT instead, as it's used by system calls. Signed-off-by: Nicholas Piggin

[PATCH v4 02/16] powerpc/64s/exceptions: Fix in_mce accounting in unrecoverable path

2020-05-07 Thread Nicholas Piggin
Acked-by: Mahesh Salgaonkar Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index bbf3109c5cba..3322000316ab 100644 ---

[PATCH v4 01/16] powerpc/64s/exception: Fix machine check no-loss idle wakeup

2020-05-07 Thread Nicholas Piggin
The architecture allows for machine check exceptions to cause idle wakeups which resume at the 0x200 address which has to return via the idle wakeup code, but the early machine check handler is run first. The case of a no state-loss sleep is broken because the early handler uses non-volatile

[PATCH v4 00/16] powerpc: machine check and system reset fixes

2020-05-07 Thread Nicholas Piggin
Since v3, I fixed a compile error and returned the generic machine check exception handler to be NMI on 32 and 64e, as caught by Christophe's review. Also added the last patch, just found it by looking at the code, a review for 32s would be good. Thanks, Nick Nicholas Piggin (16):

Re: Fwd: [CRON] Broken: ClangBuiltLinux/continuous-integration#1432 (master - 0aceafc)

2020-05-07 Thread Michael Ellerman
is the first > failure, so I'll report back if we see this again. Thanks for the report. There's nothing newly in next-20200507 that seems related. Odd that it just showed up. cheers > -- Forwarded message - > From: Travis CI > Date: Thu, May 7, 2020 at 9:40 AM

[PATCH V3 3/3] mm/hugetlb: Define a generic fallback for arch_clear_hugepage_flags()

2020-05-07 Thread Anshuman Khandual
There are multiple similar definitions for arch_clear_hugepage_flags() on various platforms. Lets just add it's generic fallback definition for platforms that do not override. This help reduce code duplication. Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu

[PATCH V3 2/3] mm/hugetlb: Define a generic fallback for is_hugepage_only_range()

2020-05-07 Thread Anshuman Khandual
There are multiple similar definitions for is_hugepage_only_range() on various platforms. Lets just add it's generic fallback definition for platforms that do not override. This help reduce code duplication. Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu

[PATCH V3 0/3] mm/hugetlb: Add some new generic fallbacks

2020-05-07 Thread Anshuman Khandual
This series adds the following new generic fallbacks. Before that it drops __HAVE_ARCH_HUGE_PTEP_GET from arm64 platform. 1. is_hugepage_only_range() 2. arch_clear_hugepage_flags() This has been boot tested on arm64 and x86 platforms but built tested on some more platforms including the changed

Re: [PATCH v8 22/30] powerpc: Define new SRR1 bits for a future ISA version

2020-05-07 Thread Jordan Niethe
Hi mpe, Could you please take some changes for the commit message. In the patch title s/a future ISA version/ISA v3.1/ On Wed, May 6, 2020 at 1:47 PM Jordan Niethe wrote: > > Add the BOUNDARY SRR1 bit definition for when the cause of an alignment > exception is a prefixed instruction that

Re: [PATCH v8 11/30] powerpc: Use a datatype for instructions

2020-05-07 Thread Jordan Niethe
Hi mpe, On Wed, May 6, 2020 at 1:45 PM Jordan Niethe wrote: > > Currently unsigned ints are used to represent instructions on powerpc. > This has worked well as instructions have always been 4 byte words. > However, a future ISA version will introduce some changes to s/a future ISA version will

Re: [PATCH 1/3] powerpc/va: Add a __va() variant that doesn't do input validation

2020-05-07 Thread kbuild test robot
Hi "Aneesh, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.7-rc4 next-20200507] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '-

Re: [PATCH v8 11/30] powerpc: Use a datatype for instructions

2020-05-07 Thread Jordan Niethe
On Wed, May 6, 2020 at 1:45 PM Jordan Niethe wrote: > > Currently unsigned ints are used to represent instructions on powerpc. > This has worked well as instructions have always been 4 byte words. > However, a future ISA version will introduce some changes to > instructions that mean this scheme

[PATCH V3.1] kmap: Consolidate kmap_prot definitions

2020-05-07 Thread ira . weiny
From: Ira Weiny Most architectures define kmap_prot to be PAGE_KERNEL. Let sparc and xtensa define there own and define PAGE_KERNEL as the default if not overridden. Suggested-by: Christoph Hellwig Signed-off-by: Ira Weiny --- Changes from V3: Fix semicolon in macro Changes from

Re: [PATCH V3 15/15] kmap: Consolidate kmap_prot definitions

2020-05-07 Thread Ira Weiny
On Thu, May 07, 2020 at 01:53:07PM -0700, Andrew Morton wrote: > On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > Most architectures define kmap_prot to be PAGE_KERNEL. > > > > Let sparc and xtensa define there own and define PAGE_KERNEL as the > >

Re: [PATCH V3 13/15] parisc/kmap: Remove duplicate kmap code

2020-05-07 Thread Ira Weiny
On Thu, May 07, 2020 at 01:52:58PM -0700, Andrew Morton wrote: > On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote: > > > parisc reimplements the kmap calls except to flush it's dcache. This is > > arguably an abuse of kmap but regardless it is messy and confusing. > > > > Remove the

[PATCH] powerpc/mm: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By

[PATCH] powerpc: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By

[PATCH] treewide: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-07 Thread Naresh Kamboju
On Thu, 7 May 2020 at 16:43, Greg Kroah-Hartman wrote: > > > > > > > Greg, 3f65047c853a ("of_mdio: add helper to deregister fixed-link > > > PHYs") needs to be backported as well for these. > > > > > > Original series can be found here: > > > > > > > > >

[PATCH 3/5] powerpc/mpc85xx: Add Cyrus Power-off and reset

2020-05-07 Thread Darren Stevens
The Cyrus board has GPIO connected power-off and reset, add device tree nodes describing them. Signed-off-by: Darren Stevens --- arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts

[PATCH 5/5] powerpc/mpc85xx: Add Cyrus P5040 device tree source

2020-05-07 Thread Darren Stevens
The Cyrus P5040 does not currently have a dts file in Linux, Add one. Signed-off-by: Darren Stevens Tested-by: Christian Zigotzky --- arch/powerpc/boot/dts/fsl/cyrus_p5040.dts | 235 ++ 1 file changed, 235 insertions(+) diff --git

[PATCH 1/5] powerpc/mpc85xx: Define ethernet port aliases in board dts file

2020-05-07 Thread Darren Stevens
in patch da414bb923d9 (Add FSL Qoriq DPAA FMan support to the SoC device tree(s)) we added aliases for all ethernet ports, and linked them to specific hardware devices, but we put them in the pre.dtsi include file meaning any board wishing to use this file is stuck with this port layout, even if

[PATCH 4/5] powerpc/mpc85xx: Add Cyrus HDD LED

2020-05-07 Thread Darren Stevens
The Cyrus board has its HDD LED connected to a GPIO pin. Add a device tree entry for this. Signed-off-By: Darren Stevens --- arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts

[PATCH 2/5] powerpc/mpc85xx: Activate Cyrus P5020 ethernet

2020-05-07 Thread Darren Stevens
The Cyrus P5020 board has 2 ethernet ports, add the required device tree entries. Signed-off-by: Darren Stevens --- arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 39 +++ 1 file changed, 39 insertions(+) diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts

Re: [PATCH V3 15/15] kmap: Consolidate kmap_prot definitions

2020-05-07 Thread Andrew Morton
On Thu, 7 May 2020 08:00:03 -0700 ira.we...@intel.com wrote: > From: Ira Weiny > > Most architectures define kmap_prot to be PAGE_KERNEL. > > Let sparc and xtensa define there own and define PAGE_KERNEL as the > default if not overridden. > checkpatch considered useful ;) From: Andrew

Re: [PATCH V3 13/15] parisc/kmap: Remove duplicate kmap code

2020-05-07 Thread Andrew Morton
On Thu, 7 May 2020 08:00:01 -0700 ira.we...@intel.com wrote: > parisc reimplements the kmap calls except to flush it's dcache. This is > arguably an abuse of kmap but regardless it is messy and confusing. > > Remove the duplicate code and have parisc define > ARCH_HAS_FLUSH_ON_KUNMAP for a

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-07 Thread Mike Rapoport
Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > >

Re: [PATCH v2 12/45] powerpc/ptdump: Properly handle non standard page size

2020-05-07 Thread kbuild test robot
Hi Christophe, I love your patch! Yet something to improve: [auto build test ERROR on v5.7-rc4] [cannot apply to powerpc/next next-20200507] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify

[PATCH V3 15/15] kmap: Consolidate kmap_prot definitions

2020-05-07 Thread ira . weiny
From: Ira Weiny Most architectures define kmap_prot to be PAGE_KERNEL. Let sparc and xtensa define there own and define PAGE_KERNEL as the default if not overridden. Suggested-by: Christoph Hellwig Signed-off-by: Ira Weiny --- Changes from V2: New Patch for this series ---

[PATCH V3 14/15] sparc: Remove unnecessary includes

2020-05-07 Thread ira . weiny
From: Ira Weiny linux/highmem.h has not been needed for the pte_offset_map => kmap_atomic use in sparc for some time (~2002) Remove this include. Suggested-by: Al Viro Signed-off-by: Ira Weiny --- Changes from V2: New Patch for this series --- arch/sparc/mm/io-unit.c | 1 -

[PATCH V3 12/15] kmap: Remove kmap_atomic_to_page()

2020-05-07 Thread ira . weiny
From: Ira Weiny kmap_atomic_to_page() has no callers and is only defined on 1 arch and declared on another. Remove it. Suggested-by: Al Viro Signed-off-by: Ira Weiny --- Changes from V2: New Patch for this series --- arch/csky/include/asm/highmem.h | 1 - arch/csky/mm/highmem.c

[PATCH V3 11/15] drm: Remove drm specific kmap_atomic code

2020-05-07 Thread ira . weiny
From: Ira Weiny kmap_atomic_prot() is now exported by all architectures. Use this function rather than open coding a driver specific kmap_atomic. Acked-by: Daniel Vetter Reviewed-by: Christian König Reviewed-by: Christoph Hellwig Signed-off-by: Ira Weiny ---

[PATCH V3 13/15] parisc/kmap: Remove duplicate kmap code

2020-05-07 Thread ira . weiny
From: Ira Weiny parisc reimplements the kmap calls except to flush it's dcache. This is arguably an abuse of kmap but regardless it is messy and confusing. Remove the duplicate code and have parisc define ARCH_HAS_FLUSH_ON_KUNMAP for a kunmap_flush_on_unmap() architecture specific call to

[PATCH V3 10/15] arch/kmap: Define kmap_atomic_prot() for all arch's

2020-05-07 Thread ira . weiny
From: Ira Weiny To support kmap_atomic_prot(), all architectures need to support protections passed to their kmap_atomic_high() function. Pass protections into kmap_atomic_high() and change the name to kmap_atomic_high_prot() to match. Then define kmap_atomic_prot() as a core function which

[PATCH V3 08/15] arch/kmap: Ensure kmap_prot visibility

2020-05-07 Thread ira . weiny
From: Ira Weiny We want to support kmap_atomic_prot() on all architectures and it makes sense to define kmap_atomic() to use the default kmap_prot. So we ensure all arch's have a globally available kmap_prot either as a define or exported symbol. Reviewed-by: Christoph Hellwig Signed-off-by:

[PATCH V3 09/15] arch/kmap: Don't hard code kmap_prot values

2020-05-07 Thread ira . weiny
From: Ira Weiny To support kmap_atomic_prot() on all architectures each arch must support protections passed in to them. Change csky, mips, nds32 and xtensa to use their global constant kmap_prot rather than a hard coded value which was equal. Reviewed-by: Christoph Hellwig Signed-off-by: Ira

[PATCH V3 06/15] arch/kmap_atomic: Consolidate duplicate code

2020-05-07 Thread ira . weiny
From: Ira Weiny Every arch has the same code to ensure atomic operations and a check for !HIGHMEM page. Remove the duplicate code by defining a core kmap_atomic() which only calls the arch specific kmap_atomic_high() when the page is high memory. Reviewed-by: Christoph Hellwig Signed-off-by:

[PATCH V3 07/15] arch/kunmap_atomic: Consolidate duplicate code

2020-05-07 Thread ira . weiny
From: Ira Weiny Every single architecture (including !CONFIG_HIGHMEM) calls... pagefault_enable(); preempt_enable(); ... before returning from __kunmap_atomic(). Lift this code into the kunmap_atomic() macro. While we are at it rename __kunmap_atomic() to kunmap_atomic_high()

[PATCH V3 04/15] arch/kunmap: Remove duplicate kunmap implementations

2020-05-07 Thread ira . weiny
From: Ira Weiny All architectures do exactly the same thing for kunmap(); remove all the duplicate definitions and lift the call to the core. This also has the benefit of changing kmap_unmap() on a number of architectures to be an inline call rather than an actual function. Reviewed-by:

[PATCH V3 03/15] arch/kmap: Remove redundant arch specific kmaps

2020-05-07 Thread ira . weiny
From: Ira Weiny The kmap code for all the architectures is almost 100% identical. Lift the common code to the core. Use ARCH_HAS_KMAP_FLUSH_TLB to indicate if an arch defines kmap_flush_tlb() and call if if needed. This also has the benefit of changing kmap() on a number of architectures to

[PATCH V3 05/15] {x86,powerpc,microblaze}/kmap: Move preempt disable

2020-05-07 Thread ira . weiny
From: Ira Weiny During this kmap() conversion series we must maintain bisect-ability. To do this, kmap_atomic_prot() in x86, powerpc, and microblaze need to remain functional. Create a temporary inline version of kmap_atomic_prot within these architectures so we can rework their kmap_atomic()

[PATCH V3 02/15] arch/xtensa: Move kmap build bug out of the way

2020-05-07 Thread ira . weiny
From: Ira Weiny Move the kmap() build bug to kmap_init() to facilitate patches to lift kmap() to the core. Reviewed-by: Christoph Hellwig Signed-off-by: Ira Weiny --- Changes from V1: combine code onto 1 line. --- arch/xtensa/include/asm/highmem.h | 5 - arch/xtensa/mm/highmem.c

[PATCH V3 00/15] Remove duplicated kmap code

2020-05-07 Thread ira . weiny
From: Ira Weiny The kmap infrastructure has been copied almost verbatim to every architecture. This series consolidates obvious duplicated code by defining core functions which call into the architectures only when needed. Some of the k[un]map_atomic() implementations have some similarities but

[PATCH V3 01/15] arch/kmap: Remove BUG_ON()

2020-05-07 Thread ira . weiny
From: Ira Weiny Replace the use of BUG_ON(in_interrupt()) in the kmap() and kunmap() in favor of might_sleep(). Besides the benefits of might_sleep(), this normalizes the implementations such that they can be made generic in subsequent patches. Reviewed-by: Dan Williams Reviewed-by: Christoph

powerpc/pci: [PATCH 1/1]: PCIE PHB reset

2020-05-07 Thread wenxiong
From: Wen Xiong Several device drivers hit EEH(Extended Error handling) when triggering kdump on Pseries PowerVM. This patch implemented a reset of the PHBs in pci general code. PHB reset stop all PCI transactions from previous kernel. We have tested the patch in several enviroments: - direct

Re: [PATCH v2 15/28] powerpc/book3s64/pkeys: Reset userspace AMR correctly on exec

2020-05-07 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > On fork, we inherit from the parent and on exec, we should switch to > default_amr values. > > Also, avoid changing the AMR register value within the kernel. The kernel now > runs with > different AMR values. > > Signed-off-by: Aneesh Kumar K.V > --- >

[PATCH 2/3] powerpc: Fix instruction dumping to use address value correctly

2020-05-07 Thread Aneesh Kumar K.V
Avoid updating address value in the loop. If in real mode, convert the address outside the loop. Also, use ___va() to convert the real address that will skip the input validation. We can get interrupts with IR=0 and with NIP value > PAGE_OFFSET. Signed-off-by: Aneesh Kumar K.V ---

[PATCH 3/3] powerp: Avoid opencoding fixup_real_addr

2020-05-07 Thread Aneesh Kumar K.V
Use the newly added helper. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/traps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index a47fb49b7af8..503097c6aab2 100644 --- a/arch/powerpc/kernel/traps.c

[PATCH 1/3] powerpc/va: Add a __va() variant that doesn't do input validation

2020-05-07 Thread Aneesh Kumar K.V
On ppc64, __va(x) do check for input argument to be less than PAGE_OFFSET. In certain code paths, we want to skip that check. Add a variant ___va(x) to be used in such cases. Switch the #define to static inline. __pa() still doesn't benefit from this. But a static inline done in this patch is

Re: [PATCH] powerpc/uaccess: Don't use "m<>" constraint

2020-05-07 Thread Segher Boessenkool
On Thu, May 07, 2020 at 10:33:24PM +1000, Michael Ellerman wrote: > The "m<>" constraint breaks compilation with GCC 4.6.x era compilers. > > The use of the constraint allows the compiler to use update-form > instructions, however in practice current compilers never generate > those forms for any

Re: [PATCH v4 2/7] KVM: arm64: clean up redundant 'kvm_run' parameters

2020-05-07 Thread Tianjia Zhang
On 2020/5/5 16:39, Marc Zyngier wrote: Hi Tianjia, On 2020-04-27 05:35, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at

[PATCH] powerpc/uaccess: Don't use "m<>" constraint

2020-05-07 Thread Michael Ellerman
The "m<>" constraint breaks compilation with GCC 4.6.x era compilers. The use of the constraint allows the compiler to use update-form instructions, however in practice current compilers never generate those forms for any of the current uses of __put_user_asm_goto(). We anticipate that GCC 4.6

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-07 Thread Marek Szyprowski
Hi On 14.04.2020 17:34, Mike Rapoport wrote: > From: Mike Rapoport > > Implement primitives necessary for the 4th level folding, add walks of p4d > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > Signed-off-by: Mike Rapoport Today I've noticed that kexec is broken on ARM 32bit.

Re: [PATCH -next] soc: fsl_asrc: Make some functions static

2020-05-07 Thread Mark Brown
On Thu, 7 May 2020 10:29:59 +0800, ChenTao wrote: > Fix the following warning: > > sound/soc/fsl/fsl_asrc.c:157:5: warning: > symbol 'fsl_asrc_request_pair' was not declared. Should it be static? > sound/soc/fsl/fsl_asrc.c:200:6: warning: > symbol 'fsl_asrc_release_pair' was not declared. Should

[PATCH v2 4/4] powerpc: Use trap metadata to prevent double restart rather than zeroing trap

2020-05-07 Thread Michael Ellerman
From: Nicholas Piggin It's not very nice to zero trap for this, because then system calls no longer have trap_is_syscall(regs) invariant, and we can't distinguish between sc and scv system calls (in a later patch). Take one last unused bit from the low bits of the pt_regs.trap word for this

[PATCH v2 3/4] powerpc: trap_is_syscall() helper to hide syscall trap number

2020-05-07 Thread Michael Ellerman
From: Nicholas Piggin A new system call interrupt will be added with a new trap number. Hide the explicit 0xc00 test behind an accessor to reduce churn in callers. Signed-off-by: Nicholas Piggin [mpe: Make it a static inline] Signed-off-by: Michael Ellerman ---

[PATCH v2 2/4] powerpc: Use set_trap() and avoid open-coding trap masking

2020-05-07 Thread Michael Ellerman
From: Nicholas Piggin The pt_regs.trap field keeps 4 low bits for some metadata about the trap or how it was handled, which is masked off in order to test the architectural trap number. Add a set_trap() accessor to set this, equivalent to TRAP() for returning it. This is actually not quite the

[PATCH v2 1/4] powerpc/64s: Always has full regs, so remove remnant checks

2020-05-07 Thread Michael Ellerman
From: Nicholas Piggin Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/ptrace.h | 23 --- arch/powerpc/kernel/process.c | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) v2: Unchanged. diff --git

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-07 Thread Greg Kroah-Hartman
On Thu, May 07, 2020 at 08:47:34AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote: > > On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > > > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > > > > > Make sure to deregister

Re: [PATCH -next] ALSA: sound/ppc: Use bitwise instead of arithmetic operator for flags

2020-05-07 Thread Takashi Iwai
On Thu, 07 May 2020 05:54:07 +0200, Samuel Zou wrote: > > Fix the following coccinelle warnings: > > sound/ppc/pmac.c:729:57-58: WARNING: sum of probable bitmasks, consider | > sound/ppc/pmac.c:229:37-38: WARNING: sum of probable bitmasks, consider | > > Reported-by: Hulk Robot >

Re: [PATCH] powerpc/spufs: Add rcu_read_lock() around fcheck()

2020-05-07 Thread Christoph Hellwig
On Wed, Apr 29, 2020 at 09:42:39PM +1000, Michael Ellerman wrote: > Christoph Hellwig writes: > > On Tue, Apr 28, 2020 at 09:48:11PM +1000, Michael Ellerman wrote: > >> > >> This comes from fcheck_files() via fcheck(). > >> > >> It's pretty clearly documented that fcheck() must be wrapped with

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-07 Thread Greg Kroah-Hartman
On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote: > On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > > > Make sure to deregister and free any fixed-link PHY registered using > > > of_phy_register_fixed_link()

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2020-05-07 Thread Johan Hovold
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote: > On Tue, 29 Nov 2016 at 00:00, Johan Hovold wrote: > > > > Make sure to deregister and free any fixed-link PHY registered using > > of_phy_register_fixed_link() on probe errors and on driver unbind. > > > > Fixes: 83895bedeee6