[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1293fb3-6516-8680-d676-a68d648b904b@huawei.com>
Date: Thu, 31 Oct 2024 11:34:21 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: Mark Rutland <mark.rutland@....com>
CC: <oleg@...hat.com>, <linux@...linux.org.uk>, <will@...nel.org>,
<catalin.marinas@....com>, <sstabellini@...nel.org>, <maz@...nel.org>,
<tglx@...utronix.de>, <peterz@...radead.org>, <luto@...nel.org>,
<kees@...nel.org>, <wad@...omium.org>, <akpm@...ux-foundation.org>,
<samitolvanen@...gle.com>, <arnd@...db.de>, <ojeda@...nel.org>,
<rppt@...nel.org>, <hca@...ux.ibm.com>, <aliceryhl@...gle.com>,
<samuel.holland@...ive.com>, <paulmck@...nel.org>, <aquini@...hat.com>,
<petr.pavlu@...e.com>, <viro@...iv.linux.org.uk>,
<rmk+kernel@...linux.org.uk>, <ardb@...nel.org>,
<wangkefeng.wang@...wei.com>, <surenb@...gle.com>,
<linus.walleij@...aro.org>, <yangyj.ee@...il.com>, <broonie@...nel.org>,
<mbenes@...e.cz>, <puranjay@...nel.org>, <pcc@...gle.com>,
<guohanjun@...wei.com>, <sudeep.holla@....com>,
<Jonathan.Cameron@...wei.com>, <prarit@...hat.com>, <liuwei09@...tc.cn>,
<dwmw@...zon.co.uk>, <oliver.upton@...ux.dev>, <kristina.martsenko@....com>,
<ptosi@...gle.com>, <frederic@...nel.org>, <vschneid@...hat.com>,
<thiago.bauermann@...aro.org>, <joey.gouly@....com>,
<liuyuntao12@...wei.com>, <leobras@...hat.com>,
<linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<xen-devel@...ts.xenproject.org>
Subject: Re: [PATCH -next v4 01/19] arm64: ptrace: Replace
interrupts_enabled() with regs_irqs_disabled()
On 2024/10/29 22:19, Mark Rutland wrote:
> On Fri, Oct 25, 2024 at 06:06:42PM +0800, Jinjie Ruan wrote:
>> Implement regs_irqs_disabled(), and replace interrupts_enabled() macro
>> with regs_irqs_disabled() all over the place.
>>
>> No functional changes.
>>
>
> Please say why, e.g.
>
> | The generic entry code expects architecture code to provide
> | regs_irqs_disabled(regs), but arm64 does not have this and provides
> | interrupts_enabled(regs), which has the opposite polarity.
> |
> | In preparation for moving arm64 over to the generic entry code,
> | replace arm64's interrupts_enabled() with regs_irqs_disabled() and
> | update its 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.
>
Thank you! Will expand the commit message and describe the cause of the
patch also for other patches.
>> Suggested-by: Mark Rutland <mark.rutland@....com>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
>> ---
>
> [...]
>
>> arch/arm/include/asm/ptrace.h | 4 ++--
>> arch/arm/kernel/hw_breakpoint.c | 2 +-
>> arch/arm/kernel/process.c | 2 +-
>> arch/arm/mm/alignment.c | 2 +-
>> arch/arm/mm/fault.c | 2 +-
>
>> drivers/irqchip/irq-gic-v3.c | 2 +-
>
> I hadn't realised that the GICv3 driver was using this and hence we'd
> need to update a few places in arch/arm at the same time. Please update
> just the arch/arm64 bits, and add:
>
> | /*
> | * Used by the GICv3 driver, can be removed once arch/arm implements
> | * regs_irqs_disabled() directly.
> | */
> | #define interrupts_enabled(regs) (!regs_irqs_disabled(regs))
>
> ... and then once 32-bit arm implements this we can update the GIC
> driver and remove the architecture definitions.
>
> That way we avoid the risk of conflicts with 32-bit arm.
>
> Mark.
>
Powered by blists - more mailing lists