Swap upper/lower 32 bits for 64-bit compat syscalls, conditioned on
endianness. This is modeled after the same functionality in
arch/mips/kernel/linux32.c.
This fixes compat_sys on ppc64le, when called by 32-bit little-endian
processes.
Tested with `file /bin/bash` (pread64) and `truncate -s 5G t
From: Joseph J Allen
This mirrors the behavior in handle_rt_signal32, to obey kernel endianness
rather than assume a 32-bit process is big-endian. Without this change,
any 32-bit little-endian process will SIGILL immediately upon handling a
signal.
Signed-off-by: Joseph J Allen
Signed-off-by: W
These are a couple small fixes that enable 32-bit little endian ("ppcle")
processes to run on a ppc64le kernel. Currently this is of interest for
the purposes of emulating ia32 programs with native userland assistance
via box86[1] (see PR#279 for initial ppc support), but a standalone
userland is f
This is a bug that causes early crashes in builds with a
.exit.text section smaller than a page and a .init.text section that
ends in the beginning of a physical page (this is kinda random, which
might explain why this wasn't really encountered before).
The init sections are ordered like this:
Nicholas Piggin a écrit :
The page fault handling still has some complex logic particularly around
hash table handling, in asm. Implement this in C instead.
Hi,
I'm afk at the moment and unable to look at this in details before one
week but this looks pretty complexe, especially the churn
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 | 15 +
arch/powerpc/include/asm/processor.h | 1 +
arch/powerpc/include/asm/thread_info.h | 6
arch/powerpc/kernel/exceptions-64
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 | 7 +++
arch/powerpc/kernel/exceptions-64s.S | 18 --
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/arch/pow
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 | 26
arch/powerpc/kernel/exceptions-64s.S | 60
2 files changed, 26 insertio
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
---
arch/powerpc/include/asm/
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 | 7 +++
arch/powerpc/include/asm/ppc_asm.h | 24
arch/powerpc/kernel/exceptions-64e.S | 1 -
arch/powerpc/kernel/e
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
b/arch
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 | 15 +++
arch/powerpc/kernel/exceptions-64s.S | 26 --
2 files changed, 11 insertions(+), 30 deletions(-)
diff
The interrupt handler wrapper functions are not the ideal place to
maintain context tracking because after they return, the low level exit
code must then determine if there are interrupts to replay, or if the
task should be preempted, etc. Those paths (e.g., schedule_user) include
their own excepti
Move irq_enter/irq_exit into asynchronous interrupt handler wrappers.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/interrupt.h | 2 ++
arch/powerpc/kernel/dbell.c | 3 +--
arch/powerpc/kernel/irq.c| 4
arch/powerpc/kernel/tau_6xx.c| 3 ---
arch/po
Previously context tracking was not done for asynchronous interrupts,
(those that run in interrupt context), and if those would cause a
reschedule when they exit, then scheduling functions (schedule_user,
preempt_schedule_irq) call exception_enter/exit to fix this up and
exit user context.
This is
This moves exception_enter/exit calls to wrapper functions for
synchronous interrupts. More interrupt handlers are covered by
this than previously.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/interrupt.h | 9
arch/powerpc/kernel/traps.c | 74 ++---
This moves the 64s/hash context tracking from hash_page_mm() to
__do_hash_fault(), so it's no longer called by OCXL / SPU
accelerators, which was certainly the wrong thing to be doing,
because those callers are not low level interrupt handlers, so
should have entered a kernel context tracking alrea
Add context tracking to the system call handler explicitly, and remove
_TIF_NOHZ.
This saves 35 cycles on gettid system call cost on POWER9 with a
CONFIG_NOHZ_FULL kernel.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/Kconfig | 1 -
arch/powerpc/include/asm/thread_info.h |
Simple helper for synchronous interrupt handlers (i.e., process-context)
to enable interrupts if it was taken in an interrupts-enabled context.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/interrupt.h | 7 +++
arch/powerpc/kernel/traps.c | 24 +++-
These will be used by subsequent patches.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/interrupt.h | 66
1 file changed, 66 insertions(+)
diff --git a/arch/powerpc/include/asm/interrupt.h
b/arch/powerpc/include/asm/interrupt.h
index 60363e5eeffa..7c7
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 | 29 ---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 -
arch/powerpc/in
This is required in order to allow more significant differences between
NMI type interrupt handlers and regular asynchronous handlers.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/traps.c | 31 +++-
arch/powerpc/perf/core-book3s.c | 35 ++--
Similar to the previous patch this makes interrupt handler function
types more regular so they can be wrapped with the next patch.
bad_page_fault and do_break are not performance critical.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/bug.h | 4 ++--
arch/powerpc/incl
Make mm fault handlers all just take the pt_regs * argument and load
DAR/DSISR from that. Make those that return a value return long.
This is done to make the function signatures match other handlers, which
will help with a future patch to add wrappers. Explicit arguments could
be added for perfor
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/book3s/64/mmu-hash.h | 1 +
arch/powerpc/kernel/exceptions-64s.S | 131 +++---
arc
This adds interrupt handler wrapper functions, similar to the
generic / x86 code, and moves several common operations into them
from either asm or open coded in the individual handlers.
Since v1:
- Fixed a couple of compile issues
- Fixed perf weirdness (sometimes NMI, sometimes not)
- Also move i
From: Christophe Leroy
handle_page_fault() has some code dedicated to book3s/32 to
call do_break() when the DSI is a DABR match.
On other platforms, do_break() is handled separately.
Do the same for book3s/32, do it earlier in the process of DSI.
This change also avoid doing the test on ISI.
27 matches
Mail list logo