[PATCH 6/9] arm64: alternatives: have callbacks take a cap

Mark Rutland mark.rutland at arm.com
Mon Sep 5 01:48:03 PDT 2022


On Fri, Sep 02, 2022 at 04:54:45PM +0100, Joey Gouly wrote:
> Hi Mark,
> 
> On Thu, Sep 01, 2022 at 04:14:00PM +0100, Mark Rutland wrote:
 
> > diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
> > index 2e18c9c0f612b..da706c9f9a9a5 100644
> > --- a/arch/arm64/kernel/alternative.c
> > +++ b/arch/arm64/kernel/alternative.c
> > @@ -21,6 +21,11 @@
> >  #define ALT_ORIG_PTR(a)		__ALT_PTR(a, orig_offset)
> >  #define ALT_REPL_PTR(a)		__ALT_PTR(a, alt_offset)
> >  
> > +#define ALT_CAP(a)		((a)->cpufeature & ~ARM64_CB_BIT)
> > +#define ALT_HAS_CB(a)		((a)->cpufeature & ARM64_CB_BIT)
> > +
> > +#define ALT_NR_INST(a)		((a)->orig_len / AARCH64_INSN_SIZE)
> You introduced this macro, but don't use it.

Whoops; I'd originally added that for the dumping code, but ended up reworking
things to not use it anyway.

Removed now!

Thanks,
Mark.



More information about the linux-arm-kernel mailing list