Re: [PATCH 3/5] powerpc: Replace _ALIGN_UP() by ALIGN()

2020-04-20 Thread Joel Stanley
On Mon, 20 Apr 2020 at 18:39, Christophe Leroy wrote: > > _ALIGN_UP() is specific to powerpc > ALIGN() is generic and does the same > > Replace _ALIGN_UP() by ALIGN() > > Signed-off-by: Christophe Leroy Reviewed-by: Joel Stanley > --- > arch/powerpc/include/asm/iommu.h | 4 ++-- >

Re: [PATCH 5/5] powerpc: Remove _ALIGN_UP(), _ALIGN_DOWN() and _ALIGN()

2020-04-20 Thread Joel Stanley
On Mon, 20 Apr 2020 at 18:39, Christophe Leroy wrote: > > These three powerpc macros have been replaced by > equivalent generic macros and are not used anymore. > > Remove them. > > Signed-off-by: Christophe Leroy Reviewed-By: Joel Stanley riscv has a copy of these too that could probably be r

Re: [PATCH 4/5] powerpc: Replace _ALIGN() by ALIGN()

2020-04-20 Thread Joel Stanley
On Mon, 20 Apr 2020 at 18:39, Christophe Leroy wrote: > > _ALIGN() is specific to powerpc > ALIGN() is generic and does the same > > Replace _ALIGN() by ALIGN() > > Signed-off-by: Christophe Leroy Reviewed-by: Joel Stanley > --- > arch/powerpc/include/asm/book3s/32/pgtable.h | 2 +- > arch/po

Re: [PATCH 1/2] powerpc: Add base support for ISA v3.1

2020-04-20 Thread Alistair Popple
On Saturday, 4 April 2020 2:32:08 AM AEST Segher Boessenkool wrote: > Hi! > > On Fri, Apr 03, 2020 at 03:10:54PM +1100, Alistair Popple wrote: > > +#define PCR_ARCH_300 0x10/* Architecture 3.00 */ > > It's called 3.0, not 3.00? Thanks. I'll fix that up. - Alistair > > Seghe

Re: [PATCH 1/2] powerpc: Add base support for ISA v3.1

2020-04-20 Thread Alistair Popple
On Tuesday, 21 April 2020 11:30:52 AM AEST Alistair Popple wrote: > On Saturday, 4 April 2020 2:32:08 AM AEST Segher Boessenkool wrote: > > Hi! > > > > On Fri, Apr 03, 2020 at 03:10:54PM +1100, Alistair Popple wrote: > > > +#define PCR_ARCH_300 0x10/* Architecture 3.00 */ > > > >

Re: [PATCH 1/2] powerpc: Add base support for ISA v3.1

2020-04-20 Thread Oliver O'Halloran
On Tue, Apr 21, 2020 at 11:53 AM Alistair Popple wrote: > > On Tuesday, 21 April 2020 11:30:52 AM AEST Alistair Popple wrote: > > On Saturday, 4 April 2020 2:32:08 AM AEST Segher Boessenkool wrote: > > > Hi! > > > > > > On Fri, Apr 03, 2020 at 03:10:54PM +1100, Alistair Popple wrote: > > > > +#def

Re: [PATCH 01/21] mm: memblock: replace dereferences of memblock_region.nid with API calls

2020-04-20 Thread Baoquan He
On 04/12/20 at 10:48pm, Mike Rapoport wrote: > From: Mike Rapoport > > There are several places in the code that directly dereference > memblock_region.nid despite this field being defined only when > CONFIG_HAVE_MEMBLOCK_NODE_MAP=y. > > Replace these with calls to memblock_get_region_nid() to i

[PATCH 0/4] powerpc: clean up pt_regs traps handling

2020-04-20 Thread Nicholas Piggin
scv support needs to test trap in some cases to distinguish sc from scv, so it helps to have a few tidy-up patches to start with. This turned into a slightly bigger job that we needed to do to clean up the double restart logic that today zeroes traps which is ugly. Thanks, Nick Nicholas Piggin (4

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

2020-04-20 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/ptrace.h | 23 --- arch/powerpc/kernel/process.c | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index e0195e6b892b..

[PATCH 2/4] powerpc: Use SET_TRAP and avoid open-coding trap masking

2020-04-20 Thread 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 equivalent of TRAP() beca

[PATCH 3/4] powerpc: TRAP_IS_SYSCALL helper to hide syscall trap number

2020-04-20 Thread 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 --- arch/powerpc/include/asm/ptrace.h | 2 ++ arch/powerpc/include/asm/syscall.h | 5 - arch/powerpc/kernel/process.c

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

2020-04-20 Thread 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 instead. There is not a real

Re: [PATCH 02/21] mm: make early_pfn_to_nid() and related defintions close to each other

2020-04-20 Thread Baoquan He
On 04/12/20 at 10:48pm, Mike Rapoport wrote: > From: Mike Rapoport > > The early_pfn_to_nid() and it's helper __early_pfn_to_nid() are spread > around include/linux/mm.h, include/linux/mmzone.h and mm/page_alloc.c. > > Drop unused stub for __early_pfn_to_nid() and move its actual generic > imple

[PATCH V17 0/2] mm/debug: Add tests validating architecture page table helpers

2020-04-20 Thread Anshuman Khandual
This adds a test validation for architecture exported page table helpers. Patch adds basic transformation tests at various levels of the page table. This test was originally suggested by Catalin during arm64 THP migration RFC discussion earlier. Going forward it can include more specific tests wit

[PATCH V17 2/2] mm/debug: Add tests validating architecture page table helpers

2020-04-20 Thread Anshuman Khandual
This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validating changes to existing page table helpers or addition of new ones. This test covers basic page table entry

Re: [PATCH v2 5/5] uaccess: Rename user_access_begin/end() to user_full_access_begin/end()

2020-04-20 Thread Al Viro
[rmk Cc'd] On Fri, Apr 03, 2020 at 09:52:05PM +0100, Al Viro wrote: > I can do a 5.7-rc1-based branch with that; depending upon what we end > up doing for arm and s390 we can always change the calling conventions > come next cycle ;-/ > > My impressions after digging through arm side of things: >

Re: [PATCH 02/21] mm: make early_pfn_to_nid() and related defintions close to each other

2020-04-20 Thread Baoquan He
On 04/12/20 at 10:48pm, Mike Rapoport wrote: > From: Mike Rapoport > > The early_pfn_to_nid() and it's helper __early_pfn_to_nid() are spread > around include/linux/mm.h, include/linux/mmzone.h and mm/page_alloc.c. > > Drop unused stub for __early_pfn_to_nid() and move its actual generic > imple

Re: [RFC PATCH] powerpc/lib: Fixing use a temporary mm for code patching

2020-04-20 Thread Christopher M. Riedl
On Sat Apr 18, 2020 at 12:27 PM, Christophe Leroy wrote: > > > > > Le 15/04/2020 à 18:22, Christopher M Riedl a écrit : > >> On April 15, 2020 4:12 AM Christophe Leroy wrote: > >> > >> > >> Le 15/04/2020 à 07:16, Christopher M Riedl a écrit : > On March 26, 2020 9:42 AM Christophe Leroy

Re: [PATCH 03/21] mm: remove CONFIG_HAVE_MEMBLOCK_NODE_MAP option

2020-04-20 Thread Baoquan He
On 04/12/20 at 10:48pm, Mike Rapoport wrote: > From: Mike Rapoport > > The CONFIG_HAVE_MEMBLOCK_NODE_MAP is used to differentiate initialization > of nodes and zones structures between the systems that have region to node > mapping in memblock and those that don't. > > Currently all the NUMA arc

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-20 Thread Alexey Kardashevskiy
On 21/04/2020 00:04, Oliver O'Halloran wrote: > On Fri, 2020-04-17 at 15:47 +1000, Alexey Kardashevskiy wrote: >> >> On 17/04/2020 11:26, Russell Currey wrote: >>> >>> For what it's worth this sounds like a good idea to me, it just sounds >>> tricky to implement. You're adding another layer of

[PATCH] powerpc/dt_cpu_ftrs: Add MMA feature

2020-04-20 Thread Alistair Popple
MMA (matrix multiply accumulate) instructions are only permitted to execute when enabled via a PCR bit. Enable this bit when support is advertised by a CPU device tree feature. Signed-off-by: Alistair Popple --- arch/powerpc/include/asm/reg.h| 1 + arch/powerpc/kernel/dt_cpu_ftrs.c | 17 +++

Re: [PATCH v7 7/7] [NOT TO BE MERGED] Export sysrq_mask

2020-04-20 Thread Christophe Leroy
Le 20/04/2020 à 18:56, Christophe Leroy a écrit : Signed-off-by: Christophe Leroy --- drivers/tty/sysrq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 5e0d0813da55..a0760bcd7a97 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c

Re: [PATCH v7 7/7] [NOT TO BE MERGED] Export sysrq_mask

2020-04-20 Thread Russell Currey
On Tue, 2020-04-21 at 08:10 +0200, Christophe Leroy wrote: > Le 20/04/2020 à 18:56, Christophe Leroy a écrit : > > Signed-off-by: Christophe Leroy > > --- > > drivers/tty/sysrq.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c > > index

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-20 Thread Oliver O'Halloran
On Tue, Apr 21, 2020 at 3:11 PM Alexey Kardashevskiy wrote: > > One example of a problem device is AMD GPU with 64bit video PCI function > and 32bit audio, no? > > What PEs will they get assigned to now? Where will audio's MMIO go? It > cannot be the same 64bit MMIO segment, right? If so, it is a

Re: [PATCH v7 0/7] powerpc: switch VDSO to C implementation

2020-04-20 Thread Christophe Leroy
Le 20/04/2020 à 21:57, Arnd Bergmann a écrit : On Mon, Apr 20, 2020 at 6:56 PM Christophe Leroy wrote: This is the seventh version of a series to switch powerpc VDSO to generic C implementation. Main changes since v6 are: - Added -fasynchronous-unwind-tables in CFLAGS - Split patch 2 in tw

Re: [PATCH v3 0/4] Clean up hugetlb boot command line processing

2020-04-20 Thread Will Deacon
On Mon, Apr 20, 2020 at 02:40:05PM -0700, Mike Kravetz wrote: > On 4/20/20 1:29 PM, Anders Roxell wrote: > > On Mon, 20 Apr 2020 at 20:23, Mike Kravetz wrote: > >> On 4/20/20 8:34 AM, Qian Cai wrote: > >>> > >>> Reverted this series fixed many undefined behaviors on arm64 with the > >>> config, >

<    1   2