Re: [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW

2019-02-08 Thread Deepa Dinamani
> You touched powerpc in the previous patch but not this one. > > That's because we use the asm-generic version I assume. That is correct. > Would be good to mention in the change log though to avoid any confusion. I'm not sure how to do that now. It looks like the series has already been

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.0-4 tag

2019-02-08 Thread pr-tracker-bot
The pull request you sent on Sat, 09 Feb 2019 00:12:56 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.0-4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/820828bffeb11eee41e197a0c9be1b72afa37482 Thank you! --

Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features

2019-02-08 Thread Linus Torvalds
On Fri, Feb 8, 2019 at 12:31 PM Waiman Long wrote: > > > (b) what's the new fastpath case > > The only change in the fastpath is the use of cmpxchg for writer lock. .. since a big deal here was about using the generic atomic accessor functions, I really was looking forward to seeing the

Re: [PATCH 06/19] KVM: PPC: Book3S HV: add a GET_ESB_FD control to the XIVE native device

2019-02-08 Thread Paul Mackerras
On Fri, Feb 08, 2019 at 08:58:14AM +0100, Cédric Le Goater wrote: > On 2/8/19 6:15 AM, David Gibson wrote: > > On Thu, Feb 07, 2019 at 10:03:15AM +0100, Cédric Le Goater wrote: > >> That's the plan I have in mind as suggested by Paul if I understood it > >> well. > >> The mechanics are more

Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features

2019-02-08 Thread Waiman Long
On 02/08/2019 02:50 PM, Linus Torvalds wrote: > On Thu, Feb 7, 2019 at 11:08 AM Waiman Long wrote: >> This patchset revamps the current rwsem-xadd implementation to make >> it saner and easier to work with. This patchset removes all the >> architecture specific assembly code and uses generic C

Re: [PATCH 0/1] Start conversion of PowerPC docs

2019-02-08 Thread Jonathan Corbet
On Fri, 08 Feb 2019 14:40:28 +1100 Michael Ellerman wrote: > > - I don't think this should be a top-level directory full of docs; the top > > level is already rather overpopulated. At worst, we should create an > > arch/ directory for architecture-specific docs. > > We currently have

Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features

2019-02-08 Thread Linus Torvalds
On Thu, Feb 7, 2019 at 11:08 AM Waiman Long wrote: > > This patchset revamps the current rwsem-xadd implementation to make > it saner and easier to work with. This patchset removes all the > architecture specific assembly code and uses generic C code for all > architectures. This eases

Re: [PATCH v03] powerpc/numa: Perform full re-add of CPU for PRRN/VPHN topology update

2019-02-08 Thread Michael Bringmann
On 2/7/19 11:44 PM, Srikar Dronamraju wrote: >> >> int arch_update_cpu_topology(void) >> { >> -return numa_update_cpu_topology(true); >> +int changed = topology_changed; >> + >> +topology_changed = 0; >> +return changed; >> } >> > > Do we need Powerpc override for

Re: [PATCH v3 1/7] dump_stack: Support adding to the dump stack arch description

2019-02-08 Thread Steven Rostedt
On Thu, Feb 07, 2019 at 11:46:29PM +1100, Michael Ellerman wrote: > > diff --git a/include/linux/printk.h b/include/linux/printk.h > index 77740a506ebb..d5fb4f960271 100644 > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -198,6 +198,7 @@ u32 log_buf_len_get(void); > void

Re: [PATCH v4 3/3] powerpc/32: Add KASAN support

2019-02-08 Thread Christophe Leroy
Hi Daniel, Le 08/02/2019 à 17:18, Daniel Axtens a écrit : Hi Christophe, I've been attempting to port this to 64-bit Book3e nohash (e6500), although I think I've ended up with an approach more similar to Aneesh's much earlier (2015) series for book3s. Part of this is just due to the changes

Re: [PATCH v4 3/3] powerpc/32: Add KASAN support

2019-02-08 Thread Daniel Axtens
Hi Christophe, I've been attempting to port this to 64-bit Book3e nohash (e6500), although I think I've ended up with an approach more similar to Aneesh's much earlier (2015) series for book3s. Part of this is just due to the changes between 32 and 64 bits - we need to hack around the

Re: [PATCH v2] powerpc/64: Fix memcmp reading past the end of src/dest

2019-02-08 Thread Segher Boessenkool
On Fri, Feb 08, 2019 at 05:12:21PM +1100, Michael Ellerman wrote: > Segher Boessenkool writes: > > On Thu, Feb 07, 2019 at 10:53:13PM +1100, Michael Ellerman wrote: > >> Chandan reported that fstests' generic/026 test hit a crash: > > > >> The instruction dump decodes as: > >> subfic r6,r5,8 >

Re: [PATCH 1/2] powerpc/64s: Work around spurious warning on old gccs with -fsanitize-coverage

2019-02-08 Thread Segher Boessenkool
On Fri, Feb 08, 2019 at 02:02:24PM +1100, Michael Ellerman wrote: > diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c > b/arch/powerpc/kernel/dt_cpu_ftrs.c > index 8be3721d9302..a1acccd25839 100644 > --- a/arch/powerpc/kernel/dt_cpu_ftrs.c > +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c > @@ -675,12

Re: powerpc: Enable kernel XZ compression option on 44x

2019-02-08 Thread Christian Lamparter
On Friday, February 8, 2019 2:02:41 PM CET Michael Ellerman wrote: > On Thu, 2019-01-31 at 20:59:04 UTC, Christian Lamparter wrote: > > Enable kernel XZ compression option on 44x. > > Tested on a Western Digital - MyBook Live NAS. > > It takes 22 seconds for the 800 MHz CPU to decompress > > and

[PATCH v3 1/2] drivers/mtd: Use mtd->name when registering nvmem device

2019-02-08 Thread Aneesh Kumar K.V
With this patch, we use the mtd->name instead of concatenating the name with '0' Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem API") Signed-off-by: Aneesh Kumar K.V --- drivers/mtd/mtdcore.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 2/2] drivers/mtd: Fix device registration error

2019-02-08 Thread Aneesh Kumar K.V
This change helps me to get multiple mtd device registered. Without this I get sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0' CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc2-00557-g1ef20ef21f22 #13 Call Trace: [c000b38e3220] [c0b58fe4] dump_stack+0xe8/0x164

[PATCH] tools/selftest/vm: allow choosing mem size and page size in map_hugetlb

2019-02-08 Thread Christophe Leroy
map_hugetlb maps 256Mbytes of memory with default hugepage size. This patch allows the user to pass the size and page shift as an argument in order to use different size and page size. Signed-off-by: Christophe Leroy --- tools/testing/selftests/vm/map_hugetlb.c | 29

Re: [PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest

2019-02-08 Thread Mark Cave-Ayland
On 08/02/2019 14:45, Christophe Leroy wrote: > Le 08/02/2019 à 15:33, Mark Cave-Ayland a écrit : >> Commit 8792468da5e1 "powerpc: Add the ability to save FPU without giving it >> up" > > Expected format for the above is: > > Commit 123456789abc ("text") Hi Christophe, Apologies - I'm fairly

Re: [PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest

2019-02-08 Thread Christophe Leroy
Le 08/02/2019 à 15:33, Mark Cave-Ayland a écrit : Commit 8792468da5e1 "powerpc: Add the ability to save FPU without giving it up" Expected format for the above is: Commit 123456789abc ("text") unexpectedly removed the MSR_FE0 and MSR_FE1 bits from the bitmask used to update the MSR of

[RFC PATCH v1] powerpc/accounting: do not account system time on transition to user.

2019-02-08 Thread Christophe Leroy
Time spent in kernel mode don't need to be accounted on transition to user space. As far as the time spent in user is known, it is possible to calculate the time spent in kernel by substracting the time spent in user. To do so, this patch modifies vtime_delta() to substract the time spent in user

[PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest

2019-02-08 Thread Mark Cave-Ayland
Commit 8792468da5e1 "powerpc: Add the ability to save FPU without giving it up" unexpectedly removed the MSR_FE0 and MSR_FE1 bits from the bitmask used to update the MSR of the previous thread in __giveup_fpu() causing a KVM-PR MacOS guest to lockup and panic the kernel. Reinstate these bits to

Re: [PATCH-tip 15/22] locking/rwsem: Merge owner into count on x86-64

2019-02-08 Thread Waiman Long
On 02/07/2019 03:54 PM, Waiman Long wrote: > On 02/07/2019 03:08 PM, Peter Zijlstra wrote: >> On Thu, Feb 07, 2019 at 02:07:19PM -0500, Waiman Long wrote: >>> On 32-bit architectures, there aren't enough bits to hold both. >>> 64-bit architectures, however, can have enough bits to do that. For >>>

Re: [PATCH 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-08 Thread Oliver
On Fri, Feb 8, 2019 at 8:47 PM Michael Ellerman wrote: > > Oliver O'Halloran writes: > > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c > > index f6e65375a8de..d1f0bdf41fac 100644 > > --- a/arch/powerpc/kernel/eeh.c > > +++ b/arch/powerpc/kernel/eeh.c > > @@ -1810,7 +1810,7

[GIT PULL] Please pull powerpc/linux.git powerpc-5.0-4 tag

2019-02-08 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linus, Please pull some more powerpc fixes for 5.0: The following changes since commit 7bea7ac0ca0121798f3618d16201ca4dc4e67a00: powerpc/syscalls: Fix syscall tracing (2019-01-15 21:32:25 +1100) are available in the git repository at:

Re: powerpc/32: Include .branch_lt in data section

2019-02-08 Thread Michael Ellerman
On Wed, 2018-11-14 at 03:02:18 UTC, Joel Stanley wrote: > When building a 32 bit powerpc kernel with Binutils 2.31.1 this warning > is emitted: > > powerpc-linux-gnu-ld: warning: orphan section `.branch_lt' from > `arch/powerpc/kernel/head_44x.o' being placed in section `.branch_lt' > > As of

Re: powerpc/pseries: Perform full re-add of CPU for topology update post-migration

2019-02-08 Thread Michael Ellerman
On Mon, 2018-10-29 at 18:43:36 UTC, Nathan Fontenot wrote: > On pseries systems, performing a partition migration can result in > altering the nodes a CPU is assigned to on the destination system. For > exampl, pre-migration on the source system CPUs are in node 1 and 3, > post-migration on the

Re: Move static keyword at beginning of declaration

2019-02-08 Thread Michael Ellerman
On Sat, 2019-02-02 at 13:05:35 UTC, Mathieu Malaterre wrote: > Move the static keyword around to remove the following warnings (W=1): > > arch/powerpc/platforms/ps3/os-area.c:212:1: error: 'static' is not at > beginning of declaration [-Werror=old-style-declaration] >

Re: powerpc: Remove trailing semicolon after curly brace

2019-02-08 Thread Michael Ellerman
On Sat, 2019-02-02 at 12:54:27 UTC, Mathieu Malaterre wrote: > There is not point in having a trailing semicolon after a closing curly > brace. Remove it. > > Signed-off-by: Mathieu Malaterre Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e5c27ef7a5f204ff2f894f0dd7ed3774

Re: [v2] powerpc: drop page_is_ram() and walk_system_ram_range()

2019-02-08 Thread Michael Ellerman
On Fri, 2019-02-01 at 10:46:52 UTC, Christophe Leroy wrote: > Since commit c40dd2f76644 ("powerpc: Add System RAM to /proc/iomem") > it is possible to use the generic walk_system_ram_range() and > the generic page_is_ram(). > > To enable the use of walk_system_ram_range() by the IBM EHEA >

Re: powerpc/powernv: Escalate reset when IODA reset fails

2019-02-08 Thread Michael Ellerman
On Fri, 2019-02-01 at 00:42:01 UTC, Oliver O'Halloran wrote: > The IODA reset is used to flush out any OS controlled state from the PHB. > This reset can fail if a PHB fatal error has occurred in early boot, > probably due to a because of a bad device. We already do a fundemental > reset of the

Re: [V2] powerpc/ptrace: Mitigate potential Spectre v1

2019-02-08 Thread Michael Ellerman
On Wed, 2019-01-30 at 12:46:00 UTC, Breno Leitao wrote: > 'regno' is directly controlled by user space, hence leading to a potential > exploitation of the Spectre variant 1 vulnerability. > > On PTRACE_SETREGS and PTRACE_GETREGS requests, user space passes the > register number that would be read

Re: powerpc: Enable kernel XZ compression option on 44x

2019-02-08 Thread Michael Ellerman
On Thu, 2019-01-31 at 20:59:04 UTC, Christian Lamparter wrote: > Enable kernel XZ compression option on 44x. > Tested on a Western Digital - MyBook Live NAS. > It takes 22 seconds for the 800 MHz CPU to decompress > and boot a 2.63 MiB XZ-compressed kernel simpleImage. > > Signed-off-by:

Re: [v2] powerpc/traps: fix the message printed when stack overflows

2019-02-08 Thread Michael Ellerman
On Tue, 2019-01-29 at 16:37:55 UTC, Christophe Leroy wrote: > Today's message is useless: > > [ 42.253267] Kernel stack overflow in process (ptrval), r1=c65500b0 > > This patch fixes it: > > [ 66.905235] Kernel stack overflow in process sh[356], r1=c65560b0 > > Fixes: ad67b74d2469

Re: [RESEND, v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-02-08 Thread Michael Ellerman
On Tue, 2019-01-29 at 11:06:18 UTC, Vaibhav Jain wrote: > Within cxl module, iteration over array 'adapter->afu' may be racy > at few points as it might be simultaneously read during an EEH and its > contents being set to NULL while driver is being unloaded or unbound > from the adapter. This

Re: powerpc/kernel/time: Remove duplicate header

2019-02-08 Thread Michael Ellerman
On Mon, 2019-01-28 at 16:11:36 UTC, Brajeswar Ghosh wrote: > Remove linux/rtc.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/75f8a37580b64f87c223fbd08db6b2f7 cheers

Re: powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-02-08 Thread Michael Ellerman
On Mon, 2019-01-28 at 17:31:42 UTC, Reza Arbab wrote: > In htab_convert_pte_flags(), _PAGE_CACHE_CTL is used to check for the > _PAGE_SAO flag: > > else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) > rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M); > > But, it isn't defined to include

Re: [1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-02-08 Thread Michael Ellerman
On Tue, 2019-01-22 at 15:57:21 UTC, Joe Lawrence wrote: > From: Nicolai Stange > > The ppc64 specific implementation of the reliable stacktracer, > save_stack_trace_tsk_reliable(), bails out and reports an "unreliable > trace" whenever it finds an exception frame on the stack. Stack frames > are

Re: powerpc/cell: Remove duplicate header

2019-02-08 Thread Michael Ellerman
On Thu, 2019-01-17 at 16:19:05 UTC, Sabyasachi Gupta wrote: > Remove linux/syscalls.h which is included more than once > > Signed-off-by: Sabyasachi Gupta > Acked-by: Souptick Joarder Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/45a202a3fefc6ee7b19b1222bfb5b067 cheers

Re: powerpc/powernv: Remove duplicate header

2019-02-08 Thread Michael Ellerman
On Thu, 2019-01-17 at 16:10:33 UTC, Sabyasachi Gupta wrote: > Remove linux/printk.h which is included more than once. > > Signed-off-by: Sabyasachi Gupta > Acked-by: Souptick Joarder Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/f069a062ecce7ccc17221c24097826e8 cheers

Re: [v2] powerpc/perf: Add mem access events to sysfs

2019-02-08 Thread Michael Ellerman
On Mon, 2018-12-10 at 03:59:05 UTC, Madhavan Srinivasan wrote: > Add mem-loads/mem-stores events to sysfs. > The event is formed based on raw event encoding. > Primary PMU event used here is PM_MRK_INST_CMPL > along with MMCRA[SM] modes and Thresholding bit > > Signed-off-by: Madhavan Srinivasan

Re: [1/6] powerpc/eeh: Cleanup eeh_pe_clear_frozen_state()

2019-02-08 Thread Michael Ellerman
On Thu, 2018-11-29 at 03:16:37 UTC, Sam Bobroff wrote: > The 'clear_sw_state' parameter for eeh_pe_clear_frozen_state() is > redundant because it has no effect (except in the rare case of a > hardware error part way through unfreezing a tree of PEs, where it > would dangerously allow partial

Re: [PATCH] powerpc: Make PPC_64K_PAGES depend on only 44x or PPC_BOOK3S_64

2019-02-08 Thread Christophe Leroy
On 02/08/2019 12:34 PM, Michael Ellerman wrote: In commit 7820856a4fcd ("powerpc/mm/book3e/64: Remove unsupported 64Kpage size from 64bit booke") we dropped the 64K page size support from the 64-bit nohash (Book3E) code. But we didn't update the dependencies of the PPC_64K_PAGES option,

Re: [PATCH 5/7] powerpc/pci: Add pci_find_hose_for_domain()

2019-02-08 Thread Oliver
On Fri, Feb 8, 2019 at 8:57 PM Michael Ellerman wrote: > > Oliver O'Halloran writes: > > diff --git a/arch/powerpc/include/asm/pci-bridge.h > > b/arch/powerpc/include/asm/pci-bridge.h > > index aee4fcc24990..149053b7f481 100644 > > --- a/arch/powerpc/include/asm/pci-bridge.h > > +++

[RFC PATCH v1 16/16] powerpc/32: don't do syscall stuff in transfer_to_handler on non BOOKE

2019-02-08 Thread Christophe Leroy
As syscalls are now handled via a fast entry path, syscall related actions can be removed from the generic transfer_to_handler path. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/entry_32.S

[RFC PATCH v1 15/16] powerpc/32: Remove MSR_PR test when returning from syscall

2019-02-08 Thread Christophe Leroy
syscalls are from user only, so we can account time without checking whether returning to kernel or user as it will only be user. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S

[RFC PATCH v1 14/16] powerpc/32: implement fast entry for syscalls on non BOOKE

2019-02-08 Thread Christophe Leroy
This patch implements a fast entry for syscalls. Syscalls don't have to preserve non volatile registers except LR. This patch then implement a fast entry for syscalls, where volatile registers get clobbered. As this entry is dedicated to syscall it always sets MSR_EE and warns in case MSR_EE

[RFC PATCH v1 13/16] powerpc: Fix 32-bit handling of MSR_EE on exceptions

2019-02-08 Thread Christophe Leroy
[text mostly copied from benh's RFC/WIP] ppc32 are still doing something rather gothic and wrong on 32-bit which we stopped doing on 64-bit a while ago. We have that thing where some handlers "copy" the EE value from the original stack frame into the new MSR before transferring to the handler.

[RFC PATCH v1 12/16] powerpc/32: get rid of COPY_EE in exception entry

2019-02-08 Thread Christophe Leroy
EXC_XFER_TEMPLATE() is not called with COPY_EE anymore so we can get rid of copyee parameters and related COPY_EE and NOCOPY macros. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h| 12

[RFC PATCH v1 11/16] powerpc/32: Enter exceptions with MSR_EE unset

2019-02-08 Thread Christophe Leroy
All exceptions handler knows when to reenable interrupts, so it is safer to enter all of them with MSR_EE unset, except for syscalls. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S| 68

[RFC PATCH v1 10/16] powerpc/32: enter syscall with MSR_EE inconditionaly set

2019-02-08 Thread Christophe Leroy
syscalls are expected to be entered with MSR_EE set. Lets make it inconditional by forcing MSR_EE on syscalls. This patch adds EXC_XFER_SYS for that. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S

[RFC PATCH v1 09/16] powerpc/fsl_booke: ensure SPEFloatingPointException() reenables interrupts

2019-02-08 Thread Christophe Leroy
SPEFloatingPointException() is the only exception handler which 'forgets' to re-enable interrupts. This patch makes sure it does. Suggested-by: Benjamin Herrenschmidt Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/traps.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v1 08/16] powerpc/40x: Refactor exception entry macros by using head_32.h

2019-02-08 Thread Christophe Leroy
Refactor exception entry macros by using the ones defined in head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 4 ++ arch/powerpc/kernel/head_40x.S | 88 +- 2 files changed, 6 insertions(+), 86 deletions(-) diff --git

[PATCH v1 07/16] powerpc/40x: Split and rename NORMAL_EXCEPTION_PROLOG

2019-02-08 Thread Christophe Leroy
This patch splits NORMAL_EXCEPTION_PROLOG in the same way as in head_8xx.S and head_32.S and renames it EXCEPTION_PROLOG() as well to match head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 26 -- 1 file changed, 16 insertions(+), 10

[PATCH v1 06/16] powerpc/40x: add exception frame marker

2019-02-08 Thread Christophe Leroy
This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [0.013964] Call Trace: [0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [0.014086] [c0745dc0] [c007aa20]

[PATCH v1 05/16] powerpc/40x: Don't use SPRN_SPRG_SCRATCH2 in EXCEPTION_PROLOG

2019-02-08 Thread Christophe Leroy
Unlike said in the comment, r1 is not reused by the critical exception handler, as it uses a dedicated critirq_ctx stack. Decrementing r1 early is then unneeded. Should the above be valid, the code is crap buggy anyway as r1 gets some intermediate values that would jeopardise the whole process

[PATCH v1 04/16] powerpc/32: make the 6xx/8xx EXC_XFER_TEMPLATE() similar to the 40x/booke one

2019-02-08 Thread Christophe Leroy
6xx/8xx EXC_XFER_TEMPLATE() macro adds a i##n symbol which is unused and can be removed. 40x and booke EXC_XFER_TEMPLATE() macros takes msr from the caller while the 6xx/8xx version uses only MSR_KERNEL as msr value. This patch modifies the 6xx/8xx version to make it similar to the 40x and booke

Re: [PATCH 6/7] powerpc/eeh: Allow disabling recovery

2019-02-08 Thread Oliver
On Fri, Feb 8, 2019 at 8:58 PM Michael Ellerman wrote: > > Oliver O'Halloran writes: > > > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c > > index d1f0bdf41fac..92809b137e39 100644 > > --- a/arch/powerpc/kernel/eeh.c > > +++ b/arch/powerpc/kernel/eeh.c > > @@ -1810,7

[PATCH v1 03/16] powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it

2019-02-08 Thread Christophe Leroy
As preparation for using head_32.h for head_40x.S, move LOAD_MSR_KERNEL() there and use it to load r10 with MSR_KERNEL value. In the mean time, this patch modifies it so that it takes into account the size of the passed value to determine if 'li' can be used or if 'lis/ori' is needed instead of

[PATCH v1 02/16] powerpc/32: Refactor EXCEPTION entry macros for head_8xx.S and head_32.S

2019-02-08 Thread Christophe Leroy
EXCEPTION_PROLOG is similar in head_8xx.S and head_32.S This patch creates head_32.h and moves EXCEPTION_PROLOG macro into it. It also converts it from a GCC macro to a GAS macro in order to ease refactorisation with 40x later, since GAS macros allows the use of #ifdef/#else/#endif inside it. And

[PATCH v1 01/16] powerpc: CONFIG_THREAD_INFO_IN_TASK series

2019-02-08 Thread Christophe Leroy
This patch is a squashed version of the CONFIG_THREAD_INFO_IN_TASK series to make building robots happy until that serie appears in powerpc/next. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/Makefile | 7 ++

[RFC PATCH v1 00/16] powerpc/32: Implement fast syscall entry

2019-02-08 Thread Christophe Leroy
The purpose of this series is to implement a fast syscall entry on ppc32. Unlike all other exceptions which can happen at any time and require to preserve all registers, the syscalls do not require the preservation of volatile registers (except LR). Syscall entries can then be optimised with

Re: [PATCH 7/7] powerpc/eeh: Add eeh_force_recover to debugfs

2019-02-08 Thread Oliver
On Fri, Feb 8, 2019 at 11:32 PM Michael Ellerman wrote: > > Oliver O'Halloran writes: > > > This patch adds a debugfs interface to force scheduling a recovery event. > > This can be used to recover a specific PE or schedule a "special" recovery > > even that checks for errors at the PHB level. >

[PATCH] powerpc: Make PPC_64K_PAGES depend on only 44x or PPC_BOOK3S_64

2019-02-08 Thread Michael Ellerman
In commit 7820856a4fcd ("powerpc/mm/book3e/64: Remove unsupported 64Kpage size from 64bit booke") we dropped the 64K page size support from the 64-bit nohash (Book3E) code. But we didn't update the dependencies of the PPC_64K_PAGES option, meaning a randconfig can still trigger this code and

Re: [PATCH 7/7] powerpc/eeh: Add eeh_force_recover to debugfs

2019-02-08 Thread Michael Ellerman
Oliver O'Halloran writes: > This patch adds a debugfs interface to force scheduling a recovery event. > This can be used to recover a specific PE or schedule a "special" recovery > even that checks for errors at the PHB level. > To force a recovery of a normal PE, use: > > echo '<#pe>:<#phb>' >

Re: [PATCH] powerpc/44x: Force PCI on for CURRITUCK

2019-02-08 Thread Michael Ellerman
Geert Uytterhoeven writes: > Hi Michael, > > On Thu, Feb 7, 2019 at 3:49 AM Michael Ellerman wrote: >> The recent rework of PCI kconfig symbols exposed an existing bug in >> the CURRITUCK kconfig logic. >> >> It selects PPC4xx_PCI_EXPRESS which depends on PCI, but PCI is user >> selectable and

[PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-08 Thread Russell Currey
Without restoring the IAMR after idle, execution prevention on POWER9 with Radix MMU is overwritten and the kernel can freely execute userspace without faulting. This is necessary when returning from any stop state that modifies user state, as well as hypervisor state. To test how this fails

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christian Zigotzky
OK, I will test it. — Christian Sent from my iPhone > On 8. Feb 2019, at 10:18, Christoph Hellwig wrote: > >> On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> Your new patch fixes the problems with the P.A. Semi Ethernet! :-) > > Thanks a lot once

Re: [PATCH 6/7] powerpc/eeh: Allow disabling recovery

2019-02-08 Thread Michael Ellerman
Oliver O'Halloran writes: > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c > index d1f0bdf41fac..92809b137e39 100644 > --- a/arch/powerpc/kernel/eeh.c > +++ b/arch/powerpc/kernel/eeh.c > @@ -1810,7 +1817,11 @@ static int __init eeh_init_proc(void) >

Re: [PATCH 5/7] powerpc/pci: Add pci_find_hose_for_domain()

2019-02-08 Thread Michael Ellerman
Oliver O'Halloran writes: > diff --git a/arch/powerpc/include/asm/pci-bridge.h > b/arch/powerpc/include/asm/pci-bridge.h > index aee4fcc24990..149053b7f481 100644 > --- a/arch/powerpc/include/asm/pci-bridge.h > +++ b/arch/powerpc/include/asm/pci-bridge.h > @@ -274,6 +274,8 @@ extern int

Re: [PATCH 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-08 Thread Michael Ellerman
Oliver O'Halloran writes: > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c > index f6e65375a8de..d1f0bdf41fac 100644 > --- a/arch/powerpc/kernel/eeh.c > +++ b/arch/powerpc/kernel/eeh.c > @@ -1810,7 +1810,7 @@ static int __init eeh_init_proc(void) >

Re: [PATCH 1/7] powerpc/eeh: Use debugfs_create_u32 for eeh_max_freezes

2019-02-08 Thread Michael Ellerman
Oliver O'Halloran writes: > There's no need to the custom getter/setter functions so we should remove > them in favour of using the generic one. While we're here, change the type > of eeh_max_freeze to uint32_t and print the value in decimal rather than Please use kernel types, ie. u32. Look

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christoph Hellwig
On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: > Hi Christoph, > > Your new patch fixes the problems with the P.A. Semi Ethernet! :-) Thanks a lot once again for testing! Now can you test with this patch and the whole series? I've updated the powerpc-dma.6 branch to include

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christian Zigotzky
Hi Christoph, Your new patch fixes the problems with the P.A. Semi Ethernet! :-) Thanks, Christian On 07 February 2019 at 05:34AM, Christian Zigotzky wrote: Hi Christoph, I also didn’t notice the 32-bit DMA mask in your patch. I have to read your patches and descriptions carefully in the

Re: [PATCH 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-08 Thread kbuild test robot
/Oliver-O-Halloran/powerpc-eeh-Use-debugfs_create_u32-for-eeh_max_freezes/20190208-145918 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0 reproduce