Re: [PATCH 11/13] powerpc/64s: Save r13 in machine_check_common_early

2019-06-22 Thread Reza Arbab
On Sat, Jun 22, 2019 at 09:21:55AM +1000, Nicholas Piggin wrote: Yep, from the stack trace, r13 is corrupted. So r13 must have got corrupted before the machine check and this just happens to have corrected it. How does cause_ue work? It or memcpy_mcsafe must be corrupting r13. Well,

Re: [PATCH 05/13] powerpc/mce: Allow notifier callback to handle MCE

2019-06-22 Thread Reza Arbab
Hi Mahesh, On Fri, Jun 21, 2019 at 12:35:08PM +0530, Mahesh Jagannath Salgaonkar wrote: On 6/21/19 6:27 AM, Santosh Sivaraj wrote: - blocking_notifier_call_chain(_notifier_list, 0, ); + rc = blocking_notifier_call_chain(_notifier_list, 0, evt); + if (rc & NOTIFY_STOP_MASK) {

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.2-5 tag

2019-06-22 Thread pr-tracker-bot
The pull request you sent on Sat, 22 Jun 2019 21:52:06 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.2-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/a8282bf087bcfb348ad97c8ed1f457bc11fd9709 Thank you! --

[PATCH v3 25/25] powerpc/64s/exception: move paca save area offsets into exception-64s.S

2019-06-22 Thread Nicholas Piggin
No generated code change. File is change is in bug table line numbers. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 17 +++-- arch/powerpc/kernel/exceptions-64s.S | 22 ++ 2 files changed, 25 insertions(+), 14 deletions(-)

[PATCH v3 24/25] powerpc/64s/exception: remove pointless EXCEPTION_PROLOG macro indirection

2019-06-22 Thread Nicholas Piggin
No generated code change. File is change is in bug table line numbers. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 108 +-- 1 file changed, 51 insertions(+), 57 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S

[PATCH v3 23/25] powerpc/64s/exception: generate regs clear instructions using .rept

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 29 +++- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index

[PATCH v3 22/25] powerpc/64s/exception: fix indenting irregularities

2019-06-22 Thread Nicholas Piggin
Generally, macros that result in instructions being expanded are indented by a tab, and those that don't have no indent. Fix the obvious cases that go contrary to style. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 92

[PATCH v3 21/25] powerpc/64s/exception: use a gas macro for system call handler code

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 127 --- 1 file changed, 55 insertions(+), 72 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index

[PATCH v3 20/25] powerpc/64s/exception: remove unused BRANCH_TO_COMMON

2019-06-22 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 87be2c650bab..a96a8d225ad3 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++

[PATCH v3 19/25] powerpc/64s/exception: remove __BRANCH_TO_KVM

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 43 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index

[PATCH v3 18/25] powerpc/64s/exception: move head-64.h code to exception-64s.S where it is used

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 1 - arch/powerpc/include/asm/head-64.h | 252 --- arch/powerpc/kernel/exceptions-64s.S | 251 ++ 3 files changed, 251 insertions(+), 253

[PATCH v3 17/25] powerpc/64s/exception: move exception-64s.h code to exception-64s.S where it is used

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 430 -- arch/powerpc/kernel/exceptions-64s.S | 431 +++ 2 files changed, 431 insertions(+), 430 deletions(-) diff --git

[PATCH v3 16/25] powerpc/64s/exception: move KVM related code together

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index

[PATCH v3 15/25] powerpc/64s/exception: remove STD_EXCEPTION_COMMON variants

2019-06-22 Thread Nicholas Piggin
These are only called in one place each. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 22 -- arch/powerpc/include/asm/head-64.h | 19 +-- 2 files changed, 17 insertions(+), 24 deletions(-)

[PATCH v3 14/25] powerpc/64s/exception: move EXCEPTION_PROLOG_2* to a more logical place

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 113 --- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index

[PATCH v3 13/25] powerpc/64s/exception: improve 0x500 handler code

2019-06-22 Thread Nicholas Piggin
After the previous cleanup, it becomes possible to consolidate some common code outside the runtime alternate patching. Also remove unused labels. This results in some code change, but unchanged runtime instruction sequence. Signed-off-by: Nicholas Piggin ---

[PATCH v3 12/25] powerpc/64s/exception: unwind exception-64s.h macros

2019-06-22 Thread Nicholas Piggin
Many of these macros just specify 1-4 lines which are only called a few times each at most, and often just once. Remove this indirection. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 101 ---

[PATCH v3 11/25] powerpc/64s/exception: Move EXCEPTION_COMMON additions into callers

2019-06-22 Thread Nicholas Piggin
More cases of code insertion via macros that does not add a great deal. All the additions have to be specified in the macro arguments, so they can just as well go after the macro. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 42

[PATCH v3 10/25] powerpc/64s/exception: Move EXCEPTION_COMMON handler and return branches into callers

2019-06-22 Thread Nicholas Piggin
The aim is to reduce the amount of indirection it takes to get through the exception handler macros, particularly where it provides little code sharing. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 26

[PATCH v3 09/25] powerpc/64s/exception: Make EXCEPTION_PROLOG_0 a gas macro for consistency with others

2019-06-22 Thread Nicholas Piggin
No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 25 arch/powerpc/kernel/exceptions-64s.S | 24 +++ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git

[PATCH v3 08/25] powerpc/64s/exception: KVM handler can set the HSRR trap bit

2019-06-22 Thread Nicholas Piggin
Move the KVM trap HSRR bit into the KVM handler, which can be conditionally applied when hsrr parameter is set. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 5 + arch/powerpc/include/asm/head-64.h | 7 ++- 2 files

[PATCH v3 07/25] powerpc/64s/exception: merge KVM handler and skip variants

2019-06-22 Thread Nicholas Piggin
Conditionally expand the skip case if it is specified. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 28 +--- arch/powerpc/include/asm/head-64.h | 8 +++ arch/powerpc/kernel/exceptions-64s.S | 2 +- 3

[PATCH v3 06/25] powerpc/64s/exception: consolidate maskable and non-maskable prologs

2019-06-22 Thread Nicholas Piggin
Conditionally expand the soft-masking test if a mask is passed in. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 113 +-- arch/powerpc/kernel/exceptions-64s.S | 20 ++-- 2 files changed, 55 insertions(+), 78

[PATCH v3 05/25] powerpc/64s/exception: remove the "extra" macro parameter

2019-06-22 Thread Nicholas Piggin
Rather than pass in the soft-masking and KVM tests via macro that is passed to another macro to expand it, switch to usig gas macros and conditionally expand the soft-masking and KVM tests. The system reset with its idle test is open coded as it is a one-off. No generated code change.

[PATCH v3 04/25] powerpc/64s/exception: fix sreset KVM test code

2019-06-22 Thread Nicholas Piggin
The sreset handler KVM test theoretically should not depend on P7. In practice KVM now only supports P7 and up so no real bug fix, but this change is made now so the quirk is not propagated through cleanup patches. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 6

[PATCH v3 03/25] powerpc/64s/exception: move and tidy EXCEPTION_PROLOG_2 variants

2019-06-22 Thread Nicholas Piggin
- Re-name the macros to _REAL and _VIRT suffixes rather than no and _RELON suffix. - Move the macro definitions together in the file. - Move RELOCATABLE ifdef inside the _VIRT macro. Further consolidation between variants does not buy much here. No generated code change. Signed-off-by:

[PATCH v3 01/25] powerpc/64s/exception: remove H concatenation for EXC_HV variants

2019-06-22 Thread Nicholas Piggin
Replace all instances of this with gas macros that test the hsrr parameter and use the appropriate register names / labels. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 333 +-- arch/powerpc/include/asm/head-64.h

[PATCH v3 02/25] powerpc/64s/exception: consolidate EXCEPTION_PROLOG_2 with _NORI variant

2019-06-22 Thread Nicholas Piggin
Switch to a gas macro that conditionally expands the RI clearing instruction. No generated code change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/exception-64s.h | 43 ++-- arch/powerpc/kernel/exceptions-64s.S | 12 +++ 2 files changed, 17

[PATCH v3 00/25] powerpc/64s interrupt handler cleanups, gasification

2019-06-22 Thread Nicholas Piggin
One more try at this, sorry for the spam. To reduce the chance of more problems I've gone back the other way and actually pulled out almost all the patches that altered generated code, leaving just a couple of simple cases. Thanks, Nick Nicholas Piggin (25): powerpc/64s/exception: remove H

[GIT PULL] Please pull powerpc/linux.git powerpc-5.2-5 tag

2019-06-22 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linus, Please pull some more powerpc fixes for 5.2. This is a frustratingly large batch at rc5. Some of these were sent earlier but were missed by me due to being distracted by other things, and some took a while to track down due to needing

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-22 Thread Nicholas Piggin
Christophe Leroy's on June 19, 2019 11:18 pm: > > > Le 19/06/2019 à 05:43, Nicholas Piggin a écrit : >> Christophe Leroy's on June 11, 2019 3:24 pm: >>> >>> >>> Le 10/06/2019 à 06:38, Nicholas Piggin a écrit : > > [snip] > diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h