: syscall: 167 nsec/call
clock-gettime-monotonic-coarse:libc: 15 nsec/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c
: syscall: 1347 nsec/call
clock-gettime-monotonic-coarse:libc: 187 nsec/call
clock-gettime-monotonic-coarse:vdso: 125 nsec/call
Used https://github.com/nlynch-mentor/vdsotest.git for the benchmarks.
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj
* Michael Ellerman <m...@ellerman.id.au> wrote (on 2017-07-20 23:18:26 +1000):
> Santosh Sivaraj <sant...@fossix.org> writes:
>
> > Current vDSO64 implementation does not have support for coarse
> > clocks (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for whi
: syscall: 1347 nsec/call
clock-gettime-monotonic-coarse:libc: 187 nsec/call
clock-gettime-monotonic-coarse:vdso: 125 nsec/call
Used https://github.com/nlynch-mentor/vdsotest.git for the benchmarks.
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj
* Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote (on 2017-07-25
20:07:28 +1000):
> On Tue, 2017-07-25 at 12:26 +0530, Santosh Sivaraj wrote:
>
> > +static notrace void kernel_get_tspec(struct timespec *tp,
> > +struct vdso_da
Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
V2 update:
- moved syscall fallback to assembly.
V3 update:
- Restored "exact prototype" comment for __kernel_clock_gettime
- Remove .hidden/.protected directives from _
Check for validity of cpu before calling get_hard_smp_processor_id.
Found with coverity.
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/platforms/powernv/smp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/sm
* Abdul Haleem wrote (on 2017-07-03 11:25:18
+0530):
> Hi,
>
> Today's next-20170630 on powerpc shows warnings in dmesg when SMT is
> disabled.
Fix provided by Nick: https://lkml.org/lkml/2017/6/30/143
Thanks,
Santosh
>
> Test: SMT off
> kernel:
: Naveen N. Rao <naveen.n@linux.vnet.ibm.com>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/Makefile | 2 --
arch/powerpc/kernel/time.c | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/po
-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/Makefile | 2 --
arch/powerpc/kernel/time.c | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/po
During secondary start, we do not need to BUG_ON if an invalid CPU number
is passed. We alreay print an error if secondary cannot be started, so
just return an error instead.
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/smp.c| 3 ++-
arch/p
During secondary start, we do not need to BUG_ON if an invalid CPU number
is passed. We already print an error if secondary cannot be started, so
just return an error instead.
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/smp.c| 3 ++-
arch/p
nr_cpu_ids can be limited by nr_cpus boot parameter, whereas NR_CPUS is a
compile time constant, which shouldn't be compared against during cpu kick.
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/smp.c| 2 +-
arch/powerpc/platforms/cell/smp.c
: syscall: 167 nsec/call
clock-gettime-monotonic-coarse:libc: 15 nsec/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c |
Reorganize code to make it easy to introduce CLOCK_REALTIME_COARSE and
CLOCK_MONOTONIC_COARSE timer support.
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/vdso64/gettimeofday.S | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git
ardware, so the patches are not
> tested. Sorry about that!
Tested patch series on ppc64 sucessfully.
You may add tested by to the series.
Tested-by: Santosh Sivaraj <sant...@fossix.org>
Thanks,
Santosh
>
> Another note:
> I need to check what is BPF symbol l
* Madhavan Srinivasan wrote (on 2017-10-03 12:25:15
+):
> Most of the power processor generation performance monitoring
> unit (PMU) driver code is bundled in the kernel and one of those
> is enabled/registered based on the oprofile_cpu_type check at
> the boot.
>
if the reference count is alreday zero, before
> decrementing
> the count, so that the ref count will not hit a negative value.
>
>
>
> Signed-off-by: Anju T Sudhakar <a...@linux.vnet.ibm.com>
Reviewed-by: Santosh Sivaraj <sant...@fossix.org>
> ---
> arch/pow
* Naveen N. Rao <naveen.n@linux.vnet.ibm.com> wrote (on 2017-10-09 10:39:18
+):
> On 2017/10/09 08:09AM, Santosh Sivaraj wrote:
> > Current vDSO64 implementation does not have support for coarse clocks
> > (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), fo
/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c | 2 +
arch/powerpc/kernel/vdso64/gettime
/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Reviewed-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c | 2 +
a
* Naveen N. Rao <naveen.n@linux.vnet.ibm.com> wrote (on 2017-10-11 07:04:43
+):
> Hi Santosh,
> This seems to have gone from v4 to v6 -- did I miss v5?
Nope, this is indeed v5, a typo :-(
>
> On 2017/10/10 11:10PM, Santosh Sivaraj wrote:
> > Current vDSO64 impl
/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
Changelog:
v1:
- gettimeofday was moved from asm to C
- Coarse timer support addition
v2:
- Moved Syscall fallback
Hi all,
Any comments on the below patch?
Thanks,
Santosh
* Santosh Sivaraj <sant...@fossix.org> wrote (on 2017-08-28 13:14:40 +0530):
> Current vDSO64 implementation does not have support for coarse clocks
> (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back
: syscall: 167 nsec/call
clock-gettime-monotonic-coarse:libc: 15 nsec/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c
* Naveen N. Rao <naveen.n@linux.vnet.ibm.com> wrote (on 2017-10-06 11:25:28
+):
> On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
> > Current vDSO64 implementation does not have support for coarse clocks
> > (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), fo
* Naveen N. Rao <naveen.n@linux.vnet.ibm.com> wrote (on 2017-10-06 09:28:30
+):
> On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
> > Current vDSO64 implementation does not have support for coarse clocks
> > (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), fo
* Segher Boessenkool <seg...@kernel.crashing.org> wrote (on 2017-10-11 17:02:16
+):
Hi Segher,
> Hi,
>
> On Wed, Oct 11, 2017 at 02:05:02PM +0530, Santosh Sivaraj wrote:
> > +70:ld r8,CFG_TB_UPDATE_COUNT(r3)
> > + andi. r0,r8,1
/call
clock-gettime-monotonic-coarse:vdso: 11 nsec/call
CC: Benjamin Herrenschmidt <b...@kernel.crashing.org>
Signed-off-by: Santosh Sivaraj <sant...@fossix.org>
---
arch/powerpc/kernel/asm-offsets.c | 2 +
arch/powerpc/kernel/vdso64/gettime
at...@gmail.com>
> ---
> arch/powerpc/include/asm/module.h | 3 +++
> arch/powerpc/include/asm/sections.h | 12
> arch/powerpc/kernel/module_64.c | 14 ++
> arch/powerpc/kernel/vmlinux.lds.S | 2 ++
> 4 files changed, 31 insertions(+)
>
Looks go
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/mce.h | 3 ++-
arch/powerpc/kernel/mce.c | 9 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/mce.h b/arch/powerpc/include/asm/mce.h
index 948bef579086..240dd1fdfe35
From: Reza Arbab
If the instruction causing a UE has an exception table entry with fixup
address, save it in the machine_check_event struct.
If a machine check notifier callback returns NOTIFY_STOP to indicate it
has handled the error, set nip to continue execution from the fixup
address.
From: Balbir Singh
The pmem infrastructure uses memcpy_mcsafe in the pmem
layer so as to convert machine check exceptions into
a return value on failure in case a machine check
exception is encountered during the memcpy.
This patch largely borrows from the copyuser_power7
logic and does not add
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index
mce: Allow notifier callback to handle MCE
powerpc/mce: Do not process notifier-handled UE events
powerpc/mce: Add fixup address to UE events
powerpc/mce: Handle memcpy_mcsafe()
powerpc/mce: Enable MCE notifiers in external modules
powerpc/64s: Save r13 in machine_check_common_early
Santosh
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 12
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
memcpy_mcsafe currently return -EFAULT on a machine check exception, change
it to return the remaining bytes that needs to be copied, so that machine
check safe copy_to_user can maintain the same behavior as copy_to_user.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/lib/memcpy_mcsafe_64.S
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 1 +
arch/powerpc/include/asm/mce.h| 4
arch/powerpc/kernel/exceptions-64s.S | 4
arch/powerpc/kernel/mce.c | 22 ++
4 files changed, 31
From: Reza Arbab
Move the call site of machine_check_ue_event() slightly later in the MCE
codepath. No functional change intended--this is prep for a later patch
to conditionally skip the call.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 5 -
1 file changed, 4 insertions(+),
From: Reza Arbab
If a notifier returns NOTIFY_STOP, consider the MCE handled, just as we
do when machine_check_early() returns 1.
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 2 +-
arch/powerpc/kernel/exceptions-64s.S | 3 +++
arch/powerpc/kernel/mce.c
From: Balbir Singh
The code currently assumes PAGE_SHIFT as the shift value of
the pfn, this works correctly (mostly) for user space pages,
but the correct thing to do is
1. Extract the shift value returned via the pte-walk API's
2. Use the shift value to access the instruction address.
Note,
From: Reza Arbab
Testing my memcpy_mcsafe() work in progress with an injected UE, I get
an error like this immediately after the function returns:
BUG: Unable to handle kernel data access at 0x7fff84dec8f8
Faulting instruction address: 0xc008009c00b0
Oops: Kernel access of bad area, sig: 11
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/exceptions-64s.S | 6 ++
arch/powerpc/kernel/mce.c| 2 ++
2 files changed, 8 insertions(+)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index
From: Reza Arbab
Add an mce notifier intended to service memcpy_mcsafe().
The notifier uses this heuristic; if a UE occurs when accessing device
memory, and the faulting instruction had a fixup entry, the callback
will return NOTIFY_STOP.
This causes the notification mechanism to consider the
handle shift values returned.
Fixes: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors")
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Fixup pseries_do_memory_failure()]
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel
the VMX optimizations, largely
to keep the patch simple. If needed those optimizations
can be folded in.
Signed-off-by: Balbir Singh
Acked-by: Nicholas Piggin
[ar...@linux.ibm.com: Added symbol export]
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/string.h | 2 +
arch/powerpc
If we take a UE on one of the instructions with a fixup entry, set nip
to continue exucution at the fixup entry. Stop processing the event
further or print it.
Based-on-patch-by: Reza Arbab
Cc: Reza Arbab
Cc: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h
From: Reza Arbab
Testing my memcpy_mcsafe() work in progress with an injected UE, I get
an error like this immediately after the function returns:
BUG: Unable to handle kernel data access at 0x7fff84dec8f8
Faulting instruction address: 0xc008009c00b0
Oops: Kernel access of bad area, sig: 11
/64s: save r13 in MCE handler (simulator workaroud)
Santosh Sivaraj (3):
powerpc/mce: Handle UE event for memcpy_mcsafe
powerpc/memcpy_mcsafe: return remaining bytes
powerpc: add machine check safe copy_to_user
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/mce.h
memcpy_mcsafe currently return -EFAULT on a machine check exception, change
it to return the remaining bytes that needs to be copied, so that machine
check safe copy_to_user can maintain the same behavior as copy_to_user.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/lib/memcpy_mcsafe_64.S
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 12
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
Bug fixes for MCE handling in kernel space
powerpc/memcpy: Add memcpy_mcsafe for pmem
Reza Arbab (2):
powerpc/mce: Make machine_check_ue_event() static
powerpc/64s: save r13 in MCE handler (simulator workaroud)
Santosh Sivaraj (2):
powerpc/mce: Handle UE event for memcpy_mcsafe
powerpc: a
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
]
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/string.h | 2 +
arch/powerpc/lib/Makefile | 2 +-
arch/powerpc/lib/memcpy_mcsafe_64.S | 239
3 files changed, 242 insertions(+), 1 deletion(-)
create mode 100644 arch/powerpc/lib/memcpy_mcsafe_64
handle shift values returned.
Fixes: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors")
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Fixup pseries_do_memory_failure()]
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h
If we take a UE on one of the instructions with a fixup entry, set nip
to continue exucution at the fixup entry. Stop processing the event
further or print it.
Based-on-patch-by: Reza Arbab
Cc: Reza Arbab
Cc: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
From: Reza Arbab
Testing my memcpy_mcsafe() work in progress with an injected UE, I get
an error like this immediately after the function returns:
BUG: Unable to handle kernel data access at 0x7fff84dec8f8
Faulting instruction address: 0xc008009c00b0
Oops: Kernel access of bad area, sig: 11
In real mode, the search_exception tables cannot be called because
it also searches the module exception tables if entry is not found
in the kernel exception tables.
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Nicholas Piggin
Signed-off-by: Santosh Sivaraj
---
include/linux/extable.h | 2
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
If we take a UE on one of the instructions with a fixup entry, set nip
to continue execution at the fixup entry. Stop processing the event
further or print it.
Based-on-patch-by: Reza Arbab
Cc: Reza Arbab
Cc: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h
erged]
v2:
* Don't set RI bit explicitly [mahesh]
* Re-ordered series to get r13 workaround as the last patch
---
Balbir Singh (2):
powerpc/mce: Fix MCE handling for huge pages
powerpc/memcpy: Add memcpy_mcsafe for pmem
Reza Arbab (1):
powerpc/mce: Make machine_check_ue_event() static
Santosh
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
("powerpc/mce: Hookup derror (load/store) UE errors")
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Fixup pseries_do_memory_failure()]
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h | 3 ++-
arch/powerpc/kernel/mce_power.c
]
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/string.h | 2 +
arch/powerpc/lib/Makefile | 2 +-
arch/powerpc/lib/memcpy_mcsafe_64.S | 239
3 files changed, 242 insertions(+), 1 deletion(-)
create mode 100644 arch/powerpc/lib/memcpy_mcsafe_64
From: Reza Arbab
Testing my memcpy_mcsafe() work in progress with an injected UE, I get
an error like this immediately after the function returns:
BUG: Unable to handle kernel data access at 0x7fff84dec8f8
Faulting instruction address: 0xc008009c00b0
Oops: Kernel access of bad area, sig: 11
From: Reza Arbab
Move the call site of machine_check_ue_event() slightly later in the MCE
codepath. No functional change intended--this is prep for a later patch
to conditionally skip the call.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 5 -
1 file changed, 4 insertions(+),
From: Reza Arbab
If the instruction causing a UE has an exception table entry with fixup
address, save it in the machine_check_event struct.
If a machine check notifier callback returns NOTIFY_STOP to indicate it
has handled the error, set nip to continue execution from the fixup
address.
From: Balbir Singh
The code currently assumes PAGE_SHIFT as the shift value of
the pfn, this works correctly (mostly) for user space pages,
but the correct thing to do is
1. Extract the shift value returned via the pte-walk API's
2. Use the shift value to access the instruction address.
Note,
From: Balbir Singh
The pmem infrastructure uses memcpy_mcsafe in the pmem
layer so as to convert machine check exceptions into
a return value on failure in case a machine check
exception is encountered during the memcpy.
This patch largely borrows from the copyuser_power7
logic and does not add
From: Reza Arbab
Add an mce notifier intended to service memcpy_mcsafe().
The notifier uses this heuristic; if a UE occurs when accessing device
memory, and the faulting instruction had a fixup entry, the callback
will return NOTIFY_STOP.
This causes the notification mechanism to consider the
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 1 +
arch/powerpc/include/asm/mce.h| 4
arch/powerpc/kernel/exceptions-64s.S | 4
arch/powerpc/kernel/mce.c | 22 ++
4 files changed, 31
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/exceptions-64s.S | 6 ++
arch/powerpc/kernel/mce.c| 2 ++
2 files changed, 8 insertions(+)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 12
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
handle MCE
powerpc/mce: Add fixup address to UE events
powerpc/mce: Handle memcpy_mcsafe()
powerpc/mce: Enable MCE notifiers in external modules
powerpc/64s: Save r13 in machine_check_common_early
Santosh Sivaraj (2):
powerpc/memcpy_mcsafe: return remaining bytes
powerpc: add machine
From: Reza Arbab
If a notifier returns NOTIFY_STOP, consider the MCE handled, just as we
do when machine_check_early() returns 1.
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 2 +-
arch/powerpc/include/asm/mce.h| 3 +-
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index
memcpy_mcsafe currently return -EFAULT on a machine check exception, change
it to return the remaining bytes that needs to be copied, so that machine
check safe copy_to_user can maintain the same behavior as copy_to_user.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/lib/memcpy_mcsafe_64.S
This is needed to report bad blocks for persistent memory.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include/asm/mce.h | 3 +++
arch/powerpc/kernel/mce.c | 15 +++
2 files changed, 18 insertions(+)
diff --git a/arch/powerpc/include/asm/mce.h b/arch/powerpc/include/asm
Subscribe to the MCE notification and add the physical address which
generated a memory error to nvdimm bad range.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/platforms/pseries/papr_scm.c | 65 +++
1 file changed, 65 insertions(+)
diff --git a/arch/powerpc/platforms
This series, which should be based on top of the still un-merged
"powerpc: implement machine check safe memcpy" series, adds support
to add the bad blocks which generated an MCE to the NVDIMM bad blocks.
The next access of the same memory will be blocked by the NVDIMM layer
itself
Subscribe to the MCE notification and add the physical address which
generated a memory error to nvdimm bad range.
Signed-off-by: Santosh Sivaraj
---
drivers/nvdimm/of_pmem.c | 122 +--
1 file changed, 103 insertions(+), 19 deletions(-)
diff --git a/drivers
schedule_work() cannot be called from MCE exception context as MCE can
interrupt even in interrupt disabled context.
fixes: 733e4a4c ("powerpc/mce: hookup memory_failure for UE errors")
Suggested-by: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
Cc: sta...@vger.kernel.org # v4.15+
owerpc/mce: Fix MCE handling for huge pages
powerpc/memcpy: Add memcpy_mcsafe for pmem
Reza Arbab (1):
powerpc/mce: Make machine_check_ue_event() static
Santosh Sivaraj (4):
powerpc/mce: Schedule work from irq_work
extable: Add function to search only kernel exception table
powerpc/mce:
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
Gleixner
Cc: Ingo Molnar
Cc: Nicholas Piggin
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
include/linux/extable.h | 2 ++
kernel/extable.c| 11 +--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/linux/extable.h b/include/linux/extable.h
: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors")
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Fixup pseries_do_memory_failure()]
Signed-off-by: Reza Arbab
Co-developed-by: Santosh Sivaraj
Signed-off-by: Santosh Sivaraj
Tested-by: Mahesh Salgaonkar
Cc: sta...@vger.
If we take a UE on one of the instructions with a fixup entry, set nip
to continue execution at the fixup entry. Stop processing the event
further or print it.
Co-developed-by: Reza Arbab
Signed-off-by: Reza Arbab
Cc: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/include
largely borrows from the copyuser_power7 logic and does not add
the VMX optimizations, largely to keep the patch simple. If needed those
optimizations can be folded in.
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Added symbol export]
Co-developed-by: Santosh Sivaraj
Signed-off-by: Santosh
Hi Balbir,
Balbir Singh writes:
> On 12/8/19 7:22 pm, Santosh Sivaraj wrote:
>> If we take a UE on one of the instructions with a fixup entry, set nip
>> to continue execution at the fixup entry. Stop processing the event
>> further or print it.
>>
>> Co-develo
: ba41e1e1ccb9 ("powerpc/mce: Hookup derror (load/store) UE errors")
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Fixup pseries_do_memory_failure()]
Signed-off-by: Reza Arbab
Co-developed-by: Santosh Sivaraj
Signed-off-by: Santosh Sivaraj
Tested-by: Mahesh Salgaonkar
Cc: sta...@vger.
largely borrows from the copyuser_power7 logic and does not add
the VMX optimizations, largely to keep the patch simple. If needed those
optimizations can be folded in.
Signed-off-by: Balbir Singh
[ar...@linux.ibm.com: Added symbol export]
Co-developed-by: Santosh Sivaraj
Signed-off-by: Santosh
From: Balbir Singh
If we take a UE on one of the instructions with a fixup entry, set nip
to continue execution at the fixup entry. Stop processing the event
further or print it.
Co-developed-by: Reza Arbab
Signed-off-by: Reza Arbab
Signed-off-by: Balbir Singh
Signed-off-by: Santosh Sivaraj
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 14 ++
2 files changed, 15 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
Gleixner
Cc: Ingo Molnar
Cc: Nicholas Piggin
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
include/linux/extable.h | 2 ++
kernel/extable.c| 11 +--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/linux/extable.h b/include/linux/extable.h
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
Signed-off-by: Santosh Sivaraj
Reviewed-by: Nicholas Piggin
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
Hi Balbir,
Balbir Singh writes:
> On 12/8/19 7:22 pm, Santosh Sivaraj wrote:
>> Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
>>
>> Signed-off-by: Santosh Sivaraj
>> ---
>> arch/powerpc/Kconfig | 1 +
>>
schedule_work() cannot be called from MCE exception context as MCE can
interrupt even in interrupt disabled context.
fixes: 733e4a4c ("powerpc/mce: hookup memory_failure for UE errors")
Suggested-by: Mahesh Salgaonkar
Signed-off-by: Santosh Sivaraj
Reviewed-by: Mahesh Salgaon
1 - 100 of 214 matches
Mail list logo