Re: [RFC PATCH 02/28] Documentation: Bump minimum GCC version to 8.1

2024-12-19 Thread Mark Rutland
Hi Arnd, On Wed, Sep 25, 2024 at 03:58:38PM +, Arnd Bergmann wrote: > On Wed, Sep 25, 2024, at 15:01, Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > > > Bump the minimum GCC version to 8.1 to gain unconditional support for > > referring to the per-task stack cookie using a symbol rather t

Re: [PATCH -next v4 06/19] arm64: entry: Move arm64_preempt_schedule_irq() into exit_to_kernel_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:47PM +0800, Jinjie Ruan wrote: > Move arm64_preempt_schedule_irq() into exit_to_kernel_mode(), so not > only __el1_irq() but also every time when kernel mode irq return, > there is a chance to reschedule. We use exit_to_kernel_mode() for every non-NMI exception return

Re: [PATCH -next v4 07/19] arm64: entry: Call arm64_preempt_schedule_irq() only if irqs enabled

2024-10-29 Thread Mark Rutland
; This has the potential to introduce livelock if we can ever have a > screaming interrupt in such a region, so we'll need to go figure out > whether that's actually a problem. > > Having this as a separate patch will make it easier to test/bisect > for th

Re: [PATCH -next v4 03/19] arm64: entry: Remove __enter_from_user_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:44PM +0800, Jinjie Ruan wrote: > The __enter_from_user_mode() is only called by enter_from_user_mode(), > so replaced it with enter_from_user_mode(). As with the next two patches, all the __enter_from_*() and __exit_to_*() are supposed to handle the raw entry, closely

Re: [PATCH -next v4 04/19] arm64: entry: Remove __enter_from_kernel_mode()

2024-10-29 Thread Mark Rutland
On Fri, Oct 25, 2024 at 06:06:45PM +0800, Jinjie Ruan wrote: > The __enter_from_kernel_mode() is only called by enter_from_kernel_mode(), > remove it. The point of this split is to cleanly separate the raw entry logic (in __enter_from_kernel_mode() from pieces that run later and can safely be inst

Re: [PATCH -next v4 02/19] arm64: entry: Refactor the entry and exit for exceptions from EL1

2024-10-29 Thread Mark Rutland
boolexit_rcu; > boollockdep; > }; > } irqentry_state_t; > > irqentry_state_t state = enter_from_kernel_mode(regs); > ... > exit_to_kernel_mode(regs, state); I don't think this part is necessary. > > No function

Re: [PATCH -next v4 01/19] arm64: ptrace: Replace interrupts_enabled() with regs_irqs_disabled()

2024-10-29 Thread Mark Rutland
s callers under arch/arm64. | | For the moment, a definition of interrupts_enabled() is provided for | the GICv3 driver. Once arch/arm implement regs_irqs_disabled(), this | can be removed. > Suggested-by: Mark Rutland > Signed-off-by: Jinjie Ruan > --- [...] > arch/arm/include/asm

Re: [RFC PATCH 02/28] Documentation: Bump minimum GCC version to 8.1

2024-09-27 Thread Mark Rutland
for unconditional support for -fpatchable-function-entry), so FWIW: Acked-by: Mark Rutland I think you'll want to update scripts/min-tool-version.sh too; judging by the diff in the cover letter that's not handled elsehere in the series. Mark. > > diff --git a/Documentat

Re: [patch 22/37] arm64: smp: Switch to hotplug core state synchronization

2023-04-26 Thread Mark Rutland
On Tue, Apr 25, 2023 at 09:51:12PM +0200, Thomas Gleixner wrote: > On Mon, Apr 17 2023 at 16:50, Mark Rutland wrote: > > As a tangent/aside, we might need to improve that for confidential compute > > architectures, and we might want to generically track cpus which might > &g

Re: [patch 22/37] arm64: smp: Switch to hotplug core state synchronization

2023-04-17 Thread Mark Rutland
.@lists.infradead.org I gave this a spin on arm64 (in a 64-vCPU VM on an M1 host), and it seems to work fine with a bunch of vCPUs being hotplugged off and on again randomly. FWIW: Tested-by: Mark Rutland I also hacked the code to have the dying CPU spin forever before the call to cpuhp_ap_r

Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:58:30PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 12:19:29PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:23PM +0200, Peter Zijlstra wrote: > > > Hi All! (omg so many) > > > > Hi Peter, > > > > S

Re: [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:42:14PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 05:13:16PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:38PM +0200, Peter Zijlstra wrote: > > > All callers should still have RCU enabled. > > > > IIUC with

Re: [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage

2022-06-14 Thread Mark Rutland
On Tue, Jun 14, 2022 at 06:40:53PM +0200, Peter Zijlstra wrote: > On Tue, Jun 14, 2022 at 01:41:13PM +0100, Mark Rutland wrote: > > On Wed, Jun 08, 2022 at 04:27:37PM +0200, Peter Zijlstra wrote: > > > --- a/kernel/time/tick-broadcast.c > > > +++ b/kernel/time/tick-

Re: [PATCH 16/36] rcu: Fix rcu_idle_exit()

2022-06-14 Thread Mark Rutland
ove these calls. > > Signed-off-by: Peter Zijlstra (Intel) > Acked-by: Paul E. McKenney Acked-by: Mark Rutland Mark. > --- > kernel/rcu/tree.c |9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c

Re: [PATCH 20/36] arch/idle: Change arch_cpu_idle() IRQ behaviour

2022-06-14 Thread Mark Rutland
by: Peter Zijlstra (Intel) Nice! Acked-by: Mark Rutland [arm64] Mark. > --- > arch/alpha/kernel/process.c |1 - > arch/arc/kernel/process.c|3 +++ > arch/arm/kernel/process.c|1 - > arch/arm/mach-gemini/board-dt.c |3 ++- > arch/ar

Re: [PATCH 25/36] time/tick-broadcast: Remove RCU_NONIDLE usage

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:48PM +0200, Peter Zijlstra wrote: > No callers left that have already disabled RCU. > > Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Mark. > --- > kernel/time/tick-broadcast-hrtimer.c | 29 - >

Re: [PATCH 23/36] arm64,smp: Remove trace_.*_rcuidle() usage

2022-06-14 Thread Mark Rutland
e authored that commit] Makes sense to me: Acked-by: Mark Rutland Mark. > --- > arch/arm64/kernel/smp.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -865,7 +865,7 @@ static void do_han

Re: [PATCH 15/36] cpuidle,cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}()

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:38PM +0200, Peter Zijlstra wrote: > All callers should still have RCU enabled. IIUC with that true we should be able to drop the RCU_NONIDLE() from drivers/perf/arm_pmu.c, as we only needed that for an invocation via a pm notifier. I should be able to give that a spi

Re: [PATCH 14/36] cpuidle: Fix rcu_idle_*() usage

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:37PM +0200, Peter Zijlstra wrote: > --- a/kernel/time/tick-broadcast.c > +++ b/kernel/time/tick-broadcast.c > @@ -622,9 +622,13 @@ struct cpumask *tick_get_broadcast_onesh > * to avoid a deep idle transition as we are about to get the > * broadcast IPI right away.

Re: [PATCH 00/36] cpuidle,rcu: Cleanup the mess

2022-06-14 Thread Mark Rutland
On Wed, Jun 08, 2022 at 04:27:23PM +0200, Peter Zijlstra wrote: > Hi All! (omg so many) Hi Peter, Sorry for the delay; my plate has also been rather full recently. I'm beginning to page this in now. > These here few patches mostly clear out the utter mess that is cpuidle vs > rcuidle. > > At t

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Mark Rutland
On Fri, Jul 02, 2021 at 09:00:22AM -0700, Joe Perches wrote: > On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > [] > > > @@ -90,6 +90,27 @@ DEFINE_STATIC_CA

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-10 Thread Mark Rutland
On Wed, Dec 09, 2020 at 07:54:26PM +0100, Thomas Gleixner wrote: > On Wed, Dec 09 2020 at 18:15, Mark Rutland wrote: > > In arch/x86/kernel/apic/io_apic.c's timer_irq_works() we do: > > > > local_irq_save(flags); > > local_irq_enable(); &

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-09 Thread Mark Rutland
On Fri, Nov 20, 2020 at 12:59:43PM +0100, Peter Zijlstra wrote: > On Fri, Nov 20, 2020 at 12:46:23PM +0100, Juergen Gross wrote: > > +static __always_inline void arch_local_irq_restore(unsigned long flags) > > +{ > > + if (!arch_irqs_disabled_flags(flags)) > > + arch_local_irq_enable();

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-09 Thread Mark Rutland
On Wed, Dec 09, 2020 at 01:27:10PM +, Mark Rutland wrote: > On Sun, Nov 22, 2020 at 01:44:53PM -0800, Andy Lutomirski wrote: > > On Sat, Nov 21, 2020 at 10:55 PM Jürgen Groß wrote: > > > On 20.11.20 12:59, Peter Zijlstra wrote: > > > > If someone we

Re: [PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-12-09 Thread Mark Rutland
On Sun, Nov 22, 2020 at 01:44:53PM -0800, Andy Lutomirski wrote: > On Sat, Nov 21, 2020 at 10:55 PM Jürgen Groß wrote: > > > > On 20.11.20 12:59, Peter Zijlstra wrote: > > > On Fri, Nov 20, 2020 at 12:46:23PM +0100, Juergen Gross wrote: > > >> +static __always_inline void arch_local_irq_restore(un

Re: [Xen-devel] [PATCH 2/3] arm64: remove uaccess_ttbr0 asm macros from cache functions

2019-11-28 Thread Mark Rutland
On Wed, Nov 27, 2019 at 01:44:52PM -0500, Pavel Tatashin wrote: > We currently duplicate the logic to enable/disable uaccess via TTBR0, > with C functions and assembly macros. This is a maintenenace burden > and is liable to lead to subtle bugs, so let's get rid of the assembly > macros, and always

Re: [Xen-devel] [PATCH v2 3/3] arm64: remove the rest of asm-uaccess.h

2019-11-27 Thread Mark Rutland
On Wed, Nov 27, 2019 at 11:09:35AM -0500, Pavel Tatashin wrote: > On Wed, Nov 27, 2019 at 11:03 AM Mark Rutland wrote: > > > > On Wed, Nov 27, 2019 at 10:31:54AM -0500, Pavel Tatashin wrote: > > > On Wed, Nov 27, 2019 at 10:12 AM Mark Rutland > > > wrote: > &

Re: [Xen-devel] [PATCH v2 3/3] arm64: remove the rest of asm-uaccess.h

2019-11-27 Thread Mark Rutland
On Wed, Nov 27, 2019 at 10:31:54AM -0500, Pavel Tatashin wrote: > On Wed, Nov 27, 2019 at 10:12 AM Mark Rutland wrote: > > > > On Thu, Nov 21, 2019 at 09:24:06PM -0500, Pavel Tatashin wrote: > > > The __uaccess_ttbr0_disable and __uaccess_ttbr0_enable, > > > are t

Re: [Xen-devel] [PATCH v2 2/3] arm64: remove uaccess_ttbr0 asm macros from cache functions

2019-11-27 Thread Mark Rutland
On Wed, Nov 27, 2019 at 10:10:07AM -0500, Pavel Tatashin wrote: > Hi Mark, > > Thank you for reviewing this work. > > The 'arch_' prefix should probably be 'asm_' (or have an '_asm' suffix), > > since this is entirely local to the arch code, and even then should only > > be called from the C wra

Re: [Xen-devel] [PATCH v2 3/3] arm64: remove the rest of asm-uaccess.h

2019-11-27 Thread Mark Rutland
On Thu, Nov 21, 2019 at 09:24:06PM -0500, Pavel Tatashin wrote: > The __uaccess_ttbr0_disable and __uaccess_ttbr0_enable, > are the last two macros defined in asm-uaccess.h. > > Replace them with C wrappers and call C functions from > kernel_entry and kernel_exit. For now, please leave those as-i

Re: [Xen-devel] [PATCH v2 2/3] arm64: remove uaccess_ttbr0 asm macros from cache functions

2019-11-27 Thread Mark Rutland
Hi Pavel, On Thu, Nov 21, 2019 at 09:24:05PM -0500, Pavel Tatashin wrote: > Replace the uaccess_ttbr0_disable/uaccess_ttbr0_enable via > inline variants, and remove asm macros. A commit message should provide rationale, rather than just a description of the patch. Something like: | We currently

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Mark Rutland
On Tue, Oct 01, 2019 at 03:39:41PM +0100, Julien Grall wrote: > On 01/10/2019 15:33, Mark Rutland wrote: > > On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote: > > > On 9/6/19 6:20 PM, Andrew Cooper wrote: > > > > On 06/09/2019 17:00, Arnd Bergmann wrote:

Re: [Xen-devel] [PATCH] ARM: xen: unexport HYPERVISOR_platform_op function

2019-10-01 Thread Mark Rutland
Hi Julien, On Sat, Sep 07, 2019 at 11:05:45AM +0100, Julien Grall wrote: > On 9/6/19 6:20 PM, Andrew Cooper wrote: > > On 06/09/2019 17:00, Arnd Bergmann wrote: > > > On Fri, Sep 6, 2019 at 5:55 PM Andrew Cooper > > > wrote: > > > > On 06/09/2019 16:39, Arnd Bergmann wrote: > > > > > HYPERVISOR_