Le 16/01/2021 à 01:43, Nicholas Piggin a écrit :
Excerpts from Christophe Leroy's message of January 16, 2021 3:14 am:
Le 15/01/2021 à 17:49, Nicholas Piggin a écrit :
Like other interrupt handler conversions, switch to getting registers
from the pt_regs argument.
Signed-off-by: Nicholas
Excerpts from Christophe Leroy's message of January 16, 2021 3:14 am:
>
>
> Le 15/01/2021 à 17:49, Nicholas Piggin a écrit :
>> Like other interrupt handler conversions, switch to getting registers
>> from the pt_regs argument.
>>
>> Signed-off-by: Nicholas Piggin
>> ---
>> arch/powerpc/kerne
Excerpts from Christophe Leroy's message of January 16, 2021 3:09 am:
>
>
> Le 15/01/2021 à 17:49, Nicholas Piggin a écrit :
>> Similar to the previous patch this makes interrupt handler function
>> types more regular so they can be wrapped with the next patch.
>>
>> Signed-off-by: Nicholas Pigg
Fixes the following W=1 kernel build warning(s):
drivers/net/ethernet/toshiba/ps3_gelic_net.c:1107: warning: Function parameter
or member 'irq' not described in 'gelic_card_interrupt'
drivers/net/ethernet/toshiba/ps3_gelic_net.c:1107: warning: Function parameter
or member 'ptr' not described i
Fixes the following W=1 kernel build warning(s):
from drivers/net/ethernet/ibm/ibmvnic.c:35:
inlined from ‘handle_vpd_rsp’ at drivers/net/ethernet/ibm/ibmvnic.c:4124:3:
drivers/net/ethernet/ibm/ibmvnic.c:1362: warning: Function parameter or member
'hdr_field' not described in 'build_hdr_data'
Resending the stragglers again.
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.
No changes since v2, just
arch_ima_add_kexec_buffer() defined in "arch/powerpc/kexec/ima.c"
sets up the address and size of the IMA measurement list in
the architecture specific fields in kimage struct. This function does not
have architecture specific code, but is currently limited to powerpc.
Move arch_ima_add_kexec_buf
The functions defined in "arch/powerpc/kexec/ima.c" handle setting up
and freeing the resources required to carry over the IMA measurement
list from the current kernel to the next kernel across kexec system call.
These functions do not have architecture specific code, but are
currently limited to p
Address and size of the buffer containing the IMA measurement log need
to be passed from the current kernel to the next kernel on kexec.
Add address and size fields to "struct kimage_arch" for ARM64 platform
to hold the address and size of the IMA measurement log buffer.
Update CONFIG_KEXEC_FILE
delete_fdt_mem_rsv() defined in "arch/powerpc/kexec/file_load.c"
has been renamed to fdt_find_and_del_mem_rsv(), and moved to
"drivers/of/kexec.c".
Remove delete_fdt_mem_rsv() in "arch/powerpc/kexec/file_load.c".
Co-developed-by: Prakhar Srivastava
Signed-off-by: Prakhar Srivastava
Signed-off-b
fdt_appendprop_addrrange() function adds a property, with the given name,
to the device tree at the given node offset, and also sets the address
and size of the property. This function should be used to add
"linux,ima-kexec-buffer" property to the device tree and set the address
and size of the IM
create_dtb() function allocates kernel virtual memory for
the device tree blob (DTB). This is not consistent with other
architectures, such as powerpc, which calls kmalloc() for allocating
memory for the DTB.
Call kmalloc() to allocate memory for the DTB, and kfree() to free
the allocated memory.
From: Rob Herring
The code for setting up the /chosen node in the device tree
and updating the memory reservation for the next kernel has been
moved to of_kexec_setup_new_fdt() defined in "drivers/of/kexec.c".
Use the common of_kexec_setup_new_fdt() to setup the device tree
and update the memory
From: Rob Herring
The code for setting up the /chosen node in the device tree
and updating the memory reservation for the next kernel has been
moved to of_kexec_setup_new_fdt() defined in "drivers/of/kexec.c".
Use the common of_kexec_setup_new_fdt() to setup the device tree
and update the memory
From: Rob Herring
The architecture specific field, elfcorehdr_addr in struct kimage_arch,
that holds the address of the buffer in memory for ELF core header for
powerpc has a different name than the one used for arm64. This makes
it hard to have a common code for setting up the device tree for
k
From: Rob Herring
Both arm64 and powerpc do essentially the same FDT /chosen setup for
kexec. The differences are either omissions that arm64 should have
or additional properties that will be ignored. The setup code can be
combined and shared by both powerpc and arm64.
The differences relative
On kexec file load Integrity Measurement Architecture (IMA) subsystem
may verify the IMA signature of the kernel and initramfs, and measure
it. The command line parameters passed to the kernel in the kexec call
may also be measured by IMA. A remote attestation service can verify
a TPM quote based
Le 15/01/2021 à 17:49, Nicholas Piggin a écrit :
Like other interrupt handler conversions, switch to getting registers
from the pt_regs argument.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/head_fsl_booke.S | 6 +++---
arch/powerpc/kernel/traps.c | 5 +++--
2 files ch
Le 15/01/2021 à 17:49, Nicholas Piggin a écrit :
Similar to the previous patch this makes interrupt handler function
types more regular so they can be wrapped with the next patch.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/bug.h | 5 +++--
arch/powerpc/kernel
On Fri, 15 Jan 2021 13:38:48 + Lee Jones wrote:
> Okay, so what would you like me to do? Would you like me to re-submit
> the set based only on net-next
Yes, rebase your patches on net-next, recheck everything builds okay
and resubmit. You should always develop against the tree that will
merg
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 interrupt entry wrapper.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/interrupt.h | 6 ++
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 | 14 ++
arch/powerpc/kernel/syscall_64.c | 10 +-
2 files changed, 15 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 ---
arc
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 improves system call performance when nohz_full is enabled. On a
POWER9, gettid scv system call cost on a nohz_full CPU improves from
1129 cycles to 1004 cycles and on a housekeeping CPU from 550 cycles
to 430 c
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 +++-
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/include/asm/debug.h | 3 -
arch/powerpc/include/asm/hw_irq.h | 9 --
arch/powerpc/include/asm/interrupt.h
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 5e2526aacc52..3df
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/interrupt.h | 169 +++
1 file changed, 169 insertions(+)
create mode 100644 a
If an unrecoverable system reset hits in process context, the system
does not have to panic. Similar to machine check, call nmi_exit()
before die().
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/traps.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc
A machine check that is handled must still check MSR[RI] for
recoverability of the interrupted context. Without this patch
it's possible for a handled machine check to return to a
context where it has clobbered live registers.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/traps.c | 2 +-
As explained by commit daf00ae71dad ("powerpc/traps: restore
recoverability of machine_check interrupts"), die() can't be called from
within nmi_enter to nicely kill a process context that was interrupted.
nmi_exit must be called first.
This adds a function die_mce which takes care of this for mac
These are declared in ras.h and defined in ras.c so remove them from
pervasive.h
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/cell/pervasive.c | 1 +
arch/powerpc/platforms/cell/pervasive.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms
Like other interrupt handler conversions, switch to getting registers
from the pt_regs argument.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64e.S | 2 --
arch/powerpc/kernel/head_40x.S | 1 +
arch/powerpc/kernel/head_booke.h | 2 ++
arch/powerpc/kernel/traps.c
Like other interrupt handler conversions, switch to getting registers
from the pt_regs argument.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/head_fsl_booke.S | 6 +++---
arch/powerpc/kernel/traps.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch
This is currently the same as unknown_exception, but it will diverge
after interrupt wrappers are added and code moved out of asm into the
wrappers (e.g., async handlers will check FINISH_NAP).
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/hw_irq.h| 1 +
arch/powerpc/kernel/ex
Interrupt handler prototypes are going to be rearranged in a
future patch, so tidy this out of the way first.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/hw_irq.h | 1 -
arch/powerpc/include/asm/time.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/p
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 ++--
These NMIs could fire any time including inside kprobe code, so
exclude them from kprobes.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index f3f6af3141ee..7383705199
This makes a small improvement to the description of the SLB interrupt
environment. Move the memory access restrictions into one paragraph,
and the interrupt restrictions into the next rather than mix them.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/mm/book3s64/slb.c | 28 +++---
SLB faults no longer call do_page_fault, this was removed somewhere
between 2.6.0 and 2.6.12.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/mm/fault.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 965c89
This is required for subsequent interrupt wrapper implementation.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/mm/book3s64/hash_utils.c | 56 ---
1 file changed, 33 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/mm/book3s64/hash_utils.c
b/arch/powerpc/mm/bo
This simplifies code, and it is also useful when introducing
interrupt handler wrappers when introducing wrapper functionality
that doesn't cope with asm entry code calling into more than one
handler function.
32-bit and 64e still have some such cases, which limits some ways
they can use interrupt
This keeps the context tracking over the entire interrupt handler which
helps later with moving context tracking into interrupt wrappers.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/mm/fault.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/
Similar to the previous patch this makes interrupt handler function
types more regular so they can be wrapped with the next patch.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/bug.h | 5 +++--
arch/powerpc/kernel/entry_32.S | 3 +--
arch/powerpc/kernel/ex
Similar to the previous patch this makes interrupt handler function
types more regular so they can be wrapped with the next patch.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/debug.h | 3 +--
arch/powerpc/kernel/head_8xx.S | 5 ++---
arch/powerpc/kernel/process.c| 7 +++
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 fault handling still has some complex logic particularly around
hash table handling, in asm. Implement most of this in C.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 +
arch/powerpc/kernel/exceptions-64s.S | 127 --
arch/pow
Similar to the 32/s change, move the test and call to the do_break
handler to the DSI.
Suggested-by: Christophe Leroy
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 34 +---
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/arch/p
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.
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.
This series is based on upstream plus "powerpc/64s: fix scv entry
fallback flush vs interrupt".
Since v1:
- Fix
Interrupts that occur in kernel mode expect that context tracking
is set to kernel. Enabling local irqs before context tracking
switches from guest to host means interrupts can come in and trigger
warnings about wrong context, and possibly worse.
Cc: kvm-...@vger.kernel.org
Signed-off-by: Nicholas
Alexey Kardashevskiy writes:
> On 15/01/2021 09:00, Nathan Lynch wrote:
>> +static void __init rtas_syscall_filter_init(void)
>> +{
>> +unsigned int i;
>> +
>> +for (i = 0; i < ARRAY_SIZE(rtas_filters); i++) {
>> +rtas_filters[i].token = rtas_token(rtas_filters[i].name);
>> +
Alexey Kardashevskiy writes:
> On 15/01/2021 09:00, Nathan Lynch wrote:
>> diff --git a/arch/powerpc/include/asm/rtas.h
>> b/arch/powerpc/include/asm/rtas.h
>> index 332e1000ca0f..1aa7ab1cbc84 100644
>> --- a/arch/powerpc/include/asm/rtas.h
>> +++ b/arch/powerpc/include/asm/rtas.h
>> @@ -19,8 +19
Alexey Kardashevskiy writes:
> On 15/01/2021 09:00, Nathan Lynch wrote:
>> Memory locations passed as arguments from the OS to RTAS usually need
>> to be addressable in 32-bit mode and must reside in the Real Mode
>> Area. On PAPR guests, the RMA starts at logical address 0 and is the
>> first log
On Fri, 15 Jan 2021, Christophe Leroy wrote:
>
>
> Le 15/01/2021 à 12:18, Lee Jones a écrit :
> > On Thu, 14 Jan 2021, Lee Jones wrote:
> >
> > > On Thu, 14 Jan 2021, Jakub Kicinski wrote:
> > >
> > > > On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote:
> > > > > On Wed, 13 Jan 2021, Jakub Ki
Le 15/01/2021 à 12:18, Lee Jones a écrit :
On Thu, 14 Jan 2021, Lee Jones wrote:
On Thu, 14 Jan 2021, Jakub Kicinski wrote:
On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote:
On Wed, 13 Jan 2021, Jakub Kicinski wrote:
On Wed, 13 Jan 2021 16:41:16 + Lee Jones wrote:
Resending the s
Access to per-cpu variables requires translation to be enabled on
pseries machine running in hash mmu mode, Since part of MCE handler
runs in realmode and part of MCE handling code is shared between ppc
architectures pseries and powernv, it becomes difficult to manage
these variables differently on
On Mon, 4 Jan 2021 13:59:53 -0700, Nathan Chancellor wrote:
> Commit eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input
> sections") added ".text.unlikely.*" and ".text.hot.*" due to an LLVM
> change [1].
>
> After another LLVM change [2], these sections are seen in some PowerPC
> builds, whe
On Sat, 2 Jan 2021 22:11:56 +0200, Ariel Marcovitch wrote:
> 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
On Tue, 12 Jan 2021 11:55:15 + (UTC), Christophe Leroy wrote:
> The second argument of __kernel_clock_gettime64 points to a struct
> __kernel_timespec, with 64-bit time_t, so use the clock_gettime64 syscall
> in the fallback function for the 32-bit vdso. Similarily,
> clock_getres_fallback sho
Hi Nathan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.11-rc3 next-20210115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as doc
On Wed, Jan 06, 2021 at 01:07:22PM -0600, Bjorn Helgaas wrote:
> On Wed, Dec 16, 2020 at 09:19:44PM +0800, Zheng Yongjun wrote:
> > Replace a comma between expression statements by a semicolon.
>
> Looks like a good fix, but read this about the changelog title:
>
> https://lore.kernel.org/r/20171
On Thu, 14 Jan 2021, Lee Jones wrote:
> On Thu, 14 Jan 2021, Jakub Kicinski wrote:
>
> > On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote:
> > > On Wed, 13 Jan 2021, Jakub Kicinski wrote:
> > >
> > > > On Wed, 13 Jan 2021 16:41:16 + Lee Jones wrote:
> > > > > Resending the stragglers aga
On 14. 01. 21, 18:57, Uwe Kleine-König wrote:
vcc_get() returns the port that has provided port->index. As the port that
is about to be removed isn't removed yet this trivially will find this
port. So simplify the call to not assign an identical value to the port
pointer and drop the warning that
On 14. 01. 21, 18:57, Uwe Kleine-König wrote:
If vcc_probe() succeeded dev_set_drvdata() is called with a non-NULL
value, and if vcc_probe() failed vcc_remove() isn't called.
So there is no way dev_get_drvdata() can return NULL in vcc_remove() and
the check can just go away.
Signed-off-by: Uwe
On 14. 01. 21, 18:57, Uwe Kleine-König wrote:
If hvcs_probe() succeeded dev_set_drvdata() is called with a non-NULL
value, and if hvcs_probe() failed hvcs_remove() isn't called.
So there is no way dev_get_drvdata() can return NULL in hvcs_remove() and
the check can just go away.
Signed-off-by:
75 matches
Mail list logo