[PATCH 9/9] arm64: Import <asm/esr.h> from Linux

Sean Anderson sean.anderson at seco.com
Tue Mar 22 21:39:39 CET 2022



On 3/17/22 1:39 PM, Pierre-Clément Tosi wrote:
> On Wed, Mar 16, 2022 at 03:47:57PM -0400, Sean Anderson wrote:
>> On 3/16/22 11:39 AM, Pierre-Clément Tosi wrote:
>> > Import the header from version 5.16 of the kernel:
>> > 
>> >      commit df0cc57e057f18e44dac8e6c18aba47ab53202f9
>> > 
>> > Signed-off-by: Pierre-Clément Tosi <ptosi at google.com>
>> > Cc: Tom Rini <trini at konsulko.com>
>> > ---
>> >   arch/arm/include/asm/esr.h | 343 +++++++++++++++++++++++++++++++++++++
>> >   1 file changed, 343 insertions(+)
>> >   create mode 100644 arch/arm/include/asm/esr.h
>> > 
>> > diff --git a/arch/arm/include/asm/esr.h b/arch/arm/include/asm/esr.h
>> > new file mode 100644
>> > index 0000000000..d52a0b269e
>> > --- /dev/null
>> > +++ b/arch/arm/include/asm/esr.h
>> > @@ -0,0 +1,343 @@
>> > +/* SPDX-License-Identifier: GPL-2.0-only */
>> > +/*
>> > + * Copyright (C) 2013 - ARM Ltd
>> > + * Author: Marc Zyngier <marc.zyngier at arm.com>
>> > + */
>> > +
>> > +#ifndef __ASM_ESR_H
>> > +#define __ASM_ESR_H
>> > +
>> > +#include <asm/memory.h>
>> > +#include <asm/sysreg.h>
>> 
>> I think this is just needed for the UL macros. See e.g. [1].
> 
> I think you're right about <asm/memory.h> being included for UL(), as pointed
> out by commit d7a33f4fbd12 ("arm64/debug: Add missing #includes"), which could
> (should?) be replaced by <linux/const.h>. But the esr_*_to_sysreg() macros
> require <asm/sysreg.h> and, even if it's unlikely for U-Boot to use them, that
> header brings many useful macros of its own anyway.
> 
>> 
>> --Sean
>> 
>> [1] https://lore.kernel.org/u-boot/20220310205059.499269-22-sean.anderson@seco.com/
> 
> Thanks, I wasn't aware of that patch; should I drop this one or instead rebase
> it on top of yours to re-#include sysreg.h once it's been made available by this
> series?

That would be best. checkpatch does not like sysreg.h very much :)

--Sean


More information about the U-Boot mailing list