Top post yada yada, I don;t care. So, I got emailed on 190 patches from you that I don't think you intended to send publicly. Greg, if you see this, this is probably already in stable and is not 6.1-stable material anyway, I just had backported some stuff to my vendor tree that is the source of this. Cheers, Conor. On Wed, Nov 01, 2023 at 05:56:25PM +0000, Saravanan.K.S wrote: > > [You don't often get email from saravanan.kadambathursubramaniyam@xxxxxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > From: Heiko Stuebner <heiko.stuebner@xxxxxxxx> > > commit 7d27a3bb961dfb59ececd2f641b09fbe7198837e from > https://github.com/linux4microchip/linux.git linux-6.1-mchp > > On the non-assembler-side wrapping alternative-macros inside other macros > to prevent duplication of code works, as the end result will just be a > string that gets fed to the asm instruction. > > In real assembler code, wrapping .macro blocks inside other .macro blocks > brings more restrictions on usage it seems and the optimization done by > commit 2ba8c7dc71c0 ("riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2") > results in a compile error like: > > ../arch/riscv/lib/strcmp.S: Assembler messages: > ../arch/riscv/lib/strcmp.S:15: Error: too many positional arguments > ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" > ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "887:" > ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" > ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "887:" > ../arch/riscv/lib/strcmp.S:15: Error: backward ref to unknown label "886:" > ../arch/riscv/lib/strcmp.S:15: Error: attempt to move .org backwards > > Wrapping the variables containing assembler code in quotes solves this issue, > compilation and the code in question still works and objdump also shows sane > decompiled results of the affected code. > > Fixes: 2ba8c7dc71c0 ("riscv: Don't duplicate __ALTERNATIVE_CFG in __ALTERNATIVE_CFG_2") > Signed-off-by: Heiko Stuebner <heiko.stuebner@xxxxxxxx> > Reviewed-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> > Reviewed-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx> > Link: https://lore.kernel.org/r/20230105192610.1940841-1-heiko@xxxxxxxxx > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> > Signed-off-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx> > Signed-off-by: Saravanan.K.S <saravanan.kadambathursubramaniyam@xxxxxxxxxxxxx> > --- > arch/riscv/include/asm/alternative-macros.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h > index 7226e2462584..2c0f4c887289 100644 > --- a/arch/riscv/include/asm/alternative-macros.h > +++ b/arch/riscv/include/asm/alternative-macros.h > @@ -46,7 +46,7 @@ > > .macro ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, enable_1, \ > new_c_2, vendor_id_2, errata_id_2, enable_2 > - ALTERNATIVE_CFG \old_c, \new_c_1, \vendor_id_1, \errata_id_1, \enable_1 > + ALTERNATIVE_CFG "\old_c", "\new_c_1", \vendor_id_1, \errata_id_1, \enable_1 > ALT_NEW_CONTENT \vendor_id_2, \errata_id_2, \enable_2, \new_c_2 > .endm > > -- > 2.40.0 >
Attachment:
signature.asc
Description: PGP signature