Re: [PATCH] scripts/sorttable: Unify arm64 & x86 sort functions

From: Will Deacon
Date: Tue Nov 16 2021 - 05:04:20 EST


On Mon, Nov 08, 2021 at 11:42:20AM +0000, Mark Rutland wrote:
> The format of the arm64 and x86 exception table entries is essentially
> the same as of commits:
>
> 46d28947d9876fc0 ("x86/extable: Rework the exception table mechanics")
> d6e2cc5647753825 ("arm64: extable: add `type` and `data` fields")
>
> Both use a 12-byte entry consisting of two 32-bit relative offsets and
> 32 bits of (absolute) data, and their sort functions are identical aside
> from commentary, with arm64 saying:
>
> /* Don't touch the fixup type or data */
>
> ... and x86 saying:
>
> /* Don't touch the fixup type */
>
> Unify the two behind a common sort_relative_table_with_data() function,
> retaining the arm64 commentary.
>
> There should be no functional change as a result of this patch.
>
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxx>
> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> scripts/sorttable.c | 36 +++---------------------------------
> 1 file changed, 3 insertions(+), 33 deletions(-)

Acked-by: Will Deacon <will@xxxxxxxxxx>

Will