[PATCH -next] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-05 Thread Yang Yingliang
Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/mm/book3s64/mmu_context.c | 4

[PATCH -next] powerpc/eeh: fix compile warning with CONFIG_PROC_FS=n

2020-09-05 Thread Yang Yingliang
Fix the compile warning: arch/powerpc/kernel/eeh.c:1639:12: error: 'proc_eeh_show' defined but not used [-Werror=unused-function] static int proc_eeh_show(struct seq_file *m, void *v) Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/kernel/eeh.c | 2 ++ 1 file changed,

[PATCH v3 4/5] powerpc: apm82181: add Meraki MR24 AP

2020-09-05 Thread Christian Lamparter
This patch adds the device-tree definitions for Meraki MR24 Accesspoint devices. Board: MR24 - Meraki MR24 Cloud Managed Access Point CPU: APM82181 SoC 800 MHz (PLB=200 OPB=100 EBC=100) Flash size: 32MiB RAM Size: 128MiB Wireless: Atheros AR9380 5.0GHz + Atheros AR9380 2.4GHz EPHY: 1x Gigabit

[PATCH v3 5/5] powerpc: apm82181: integrate bluestone.dts

2020-09-05 Thread Christian Lamparter
This patch tries to integrate the existing bluestone.dts into the apm82181.dtsi framework. The original bluestone.dts produces a peculiar warning message. > bluestone.dts:120.10-125.4: Warning (i2c_bus_reg): > /plb/opb/i2c@ef600700/sttm@4C: I2C bus unit address format error, expected > "4c"

[PATCH v3 3/5] powerpc: apm82181: add WD MyBook Live NAS

2020-09-05 Thread Christian Lamparter
This patch adds the device-tree definitions for Western Digital MyBook Live NAS devices. CPU: AMCC PowerPC APM82181 (PVR=12c41c83) at 800 MHz (PLB=200, OPB=100, EBC=100 MHz) 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory DRAM: 256 MB (2x NT5TU64M16GG-AC) FLASH: 512

[PATCH v3 2/5] powerpc: apm82181: create shared dtsi for APM bluestone

2020-09-05 Thread Christian Lamparter
This patch adds an DTSI-File that can be used by various device-tree files for APM82181-based devices. Some of the nodes (like UART, PCIE, SATA) are used by the uboot and need to stick with the naming-conventions of the old times'. I've added comments whenever this was the case. Signed-off-by:

[PATCH v3 0/5] powerpc: apm82181: adding customer devices

2020-09-05 Thread Christian Lamparter
Hello, I've been holding on to these devices dts' for a while now. But ever since the recent purge of the PPC405, I'm feeling the urge to move forward. The devices in question have been running with OpenWrt since around 2016/2017. Back then it was linux v4.4 and required many out-of-tree patches

[PATCH v3 1/5] dt-bindings: powerpc: define apm,apm82181 binding

2020-09-05 Thread Christian Lamparter
make a binding for the various boards based on the AppliedMicro/APM APM82181 SoC. Signed-off-by: Christian Lamparter --- .../bindings/powerpc/4xx/apm,apm82181.yaml| 29 +++ 1 file changed, 29 insertions(+) create mode 100644

[RFC PATCH 12/12] powerpc/64s: power4 nap fixup in C

2020-09-05 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 14 arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/include/asm/thread_info.h | 6

[RFC PATCH 11/12] powerpc/64s: runlatch interrupt handling in C

2020-09-05 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 16 ++-- arch/powerpc/kernel/exceptions-64s.S | 18 -- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git

[RFC PATCH 10/12] powerpc/64s: move NMI soft-mask handling to C

2020-09-05 Thread Nicholas Piggin
Saving and restoring soft-mask state can now be done in C using the interrupt handler wrapper functions. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 25 arch/powerpc/kernel/exceptions-64s.S | 60 2 files changed, 25

[RFC PATCH 09/12] powerpc: move NMI entry/exit code into wrapper

2020-09-05 Thread Nicholas Piggin
This moves the common NMI entry and exit code into the interrupt handler wrappers. This changes the behaviour of soft-NMI (watchdog) and HMI interrupts, and also MCE interrupts on 64e, by adding missing parts of the NMI entry to them. Signed-off-by: Nicholas Piggin ---

[RFC PATCH 08/12] powerpc/64: entry cpu time accounting in C

2020-09-05 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 4 arch/powerpc/include/asm/ppc_asm.h | 24 arch/powerpc/kernel/exceptions-64e.S | 1 -

[RFC PATCH 07/12] powerpc/64: move account_stolen_time into its own function

2020-09-05 Thread Nicholas Piggin
This will be used by interrupt entry as well. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/cputime.h | 15 +++ arch/powerpc/kernel/syscall_64.c | 10 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/cputime.h

[RFC PATCH 06/12] powerpc/64s: reconcile interrupts in C

2020-09-05 Thread Nicholas Piggin
There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 4 arch/powerpc/kernel/exceptions-64s.S | 26 -- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git

[RFC PATCH 05/12] powerpc/64s: Do context tracking in interrupt entry wrapper

2020-09-05 Thread Nicholas Piggin
Context tracking is very broken currently. Add a helper function that is to be called first thing by any normal interrupt handler function to track user exits, and user entry is done by the interrupt exit prepare functions. Context tracking is disabled on 64e for now, it must move to interrupt

[RFC PATCH 04/12] powerpc: add interrupt_cond_local_irq_enable helper

2020-09-05 Thread Nicholas Piggin
Simple helper for synchronous interrupt handlers to use to enable interrupts if they were taken in interrupt-enabled context. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 7 +++ arch/powerpc/kernel/traps.c | 24 +++-

[RFC PATCH 03/12] powerpc: interrupt handler wrapper functions

2020-09-05 Thread Nicholas Piggin
Add wrapper functions (derived from x86 macros) for interrupt handler functions. This allows interrupt entry code to be written in C. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/asm-prototypes.h | 28 --- arch/powerpc/include/asm/bug.h| 1 -

[RFC PATCH 02/12] powerpc: remove arguments from interrupt handler functions

2020-09-05 Thread Nicholas Piggin
Make interrupt handlers all just take the pt_regs * argument and load DAR/DSISR etc from that. Make those that return a value return long. This is done to make the function signatures match more closely, which will help with a future patch to add wrappers. Explicit arguments could be re-added for

[RFC PATCH 01/12] powerpc/64s: move the last of the page fault handling logic to C

2020-09-05 Thread Nicholas Piggin
The page fault handling still has some complex logic particularly around hash table handling, in asm. Implement this in C instead. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/bug.h| 1 + arch/powerpc/kernel/exceptions-64s.S | 131 +-

[RFC PATCH 00/12] interrupt entry wrappers

2020-09-05 Thread Nicholas Piggin
This series moves more stuff to C, and fixes context tracking on 64s. Nicholas Piggin (12): powerpc/64s: move the last of the page fault handling logic to C powerpc: remove arguments from interrupt handler functions powerpc: interrupt handler wrapper functions powerpc: add

Re: [PATCH 5/5] powerpc: use the generic dma_ops_bypass mode

2020-09-05 Thread Alexey Kardashevskiy
On 31/08/2020 16:40, Christoph Hellwig wrote: On Sun, Aug 30, 2020 at 11:04:21AM +0200, Cédric Le Goater wrote: Hello, On 7/8/20 5:24 PM, Christoph Hellwig wrote: Use the DMA API bypass mechanism for direct window mappings. This uses common code and speed up the direct mapping case by

RE: remove the last set_fs() in common code, and remove it for x86 and powerpc v3

2020-09-05 Thread David Laight
From: Christophe Leroy > Sent: 05 September 2020 08:16 > > Le 04/09/2020 à 23:01, David Laight a écrit : > > From: Alexey Dobriyan > >> Sent: 04 September 2020 18:58 ... > > What is this strange %fs register you are talking about. > > Figure 2-4 only has CS, DS, SS and ES. > > > > Intel added

Re: [PATCH v4 00/13] mm/debug_vm_pgtable fixes

2020-09-05 Thread Gerald Schaefer
On Fri, 4 Sep 2020 18:01:15 +0200 Gerald Schaefer wrote: > On Fri, 4 Sep 2020 17:26:47 +0200 > Gerald Schaefer wrote: > > > On Fri, 4 Sep 2020 12:18:05 +0530 > > Anshuman Khandual wrote: > > > > > > > > > > > On 09/02/2020 05:12 PM, Aneesh Kumar K.V wrote: > > > > This patch series

Re: fsl_espi errors on v5.7.15

2020-09-05 Thread Heiner Kallweit
On Fri 4. Sep 2020 at 01:58, Chris Packham < chris.pack...@alliedtelesis.co.nz> wrote: > > > On 1/09/20 6:14 pm, Nicholas Piggin wrote: > > > Excerpts from Chris Packham's message of September 1, 2020 11:25 am: > > >> On 1/09/20 12:33 am, Heiner Kallweit wrote: > > >>> On 30.08.2020 23:59, Chris

Re: [PATCH v4 00/13] mm/debug_vm_pgtable fixes

2020-09-05 Thread Gerald Schaefer
On Fri, 4 Sep 2020 17:26:47 +0200 Gerald Schaefer wrote: > On Fri, 4 Sep 2020 12:18:05 +0530 > Anshuman Khandual wrote: > > > > > > > On 09/02/2020 05:12 PM, Aneesh Kumar K.V wrote: > > > This patch series includes fixes for debug_vm_pgtable test code so that > > > they follow page table

Re: [PATCH v4 00/13] mm/debug_vm_pgtable fixes

2020-09-05 Thread Gerald Schaefer
On Fri, 4 Sep 2020 12:18:05 +0530 Anshuman Khandual wrote: > > > On 09/02/2020 05:12 PM, Aneesh Kumar K.V wrote: > > This patch series includes fixes for debug_vm_pgtable test code so that > > they follow page table updates rules correctly. The first two patches > > introduce > > changes

Re: remove the last set_fs() in common code, and remove it for x86 and powerpc v3

2020-09-05 Thread Christophe Leroy
Le 04/09/2020 à 23:01, David Laight a écrit : From: Alexey Dobriyan Sent: 04 September 2020 18:58 On Fri, Sep 04, 2020 at 08:00:24AM +0200, Ingo Molnar wrote: * Christoph Hellwig wrote: this series removes the last set_fs() used to force a kernel address space for the uaccess code in the