diff options
author | 2022-02-03 09:53:49 +0200 | |
---|---|---|
committer | 2022-02-03 09:53:49 +0200 | |
commit | 876f7a438e4247a948268ad77b67c494f709cc30 (patch) | |
tree | c3fa2548657920df9d80822d08ff24666e62d37d /scripts/sorttable.c | |
parent | drm/i915: Introduce G12 subplatform of DG2 (diff) | |
parent | Merge tag 'drm-misc-next-2022-01-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff) | |
download | wireguard-linux-876f7a438e4247a948268ad77b67c494f709cc30.tar.xz wireguard-linux-876f7a438e4247a948268ad77b67c494f709cc30.zip |
Merge drm/drm-next into drm-intel-gt-next
Backmerge to bring in 5.17-rc2 to introduce a common baseline
to merge i915_regs changes from drm-intel-next.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'scripts/sorttable.c')
-rw-r--r-- | scripts/sorttable.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/scripts/sorttable.c b/scripts/sorttable.c index b7c2ad71f9cf..3a8ea5ed553d 100644 --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -30,6 +30,8 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <pthread.h> #include <tools/be_byteshift.h> #include <tools/le_byteshift.h> @@ -231,7 +233,7 @@ static void sort_relative_table(char *extab_image, int image_size) } } -static void arm64_sort_relative_table(char *extab_image, int image_size) +static void sort_relative_table_with_data(char *extab_image, int image_size) { int i = 0; @@ -259,34 +261,6 @@ static void arm64_sort_relative_table(char *extab_image, int image_size) } } -static void x86_sort_relative_table(char *extab_image, int image_size) -{ - int i = 0; - - while (i < image_size) { - uint32_t *loc = (uint32_t *)(extab_image + i); - - w(r(loc) + i, loc); - w(r(loc + 1) + i + 4, loc + 1); - /* Don't touch the fixup type */ - - i += sizeof(uint32_t) * 3; - } - - qsort(extab_image, image_size / 12, 12, compare_relative_table); - - i = 0; - while (i < image_size) { - uint32_t *loc = (uint32_t *)(extab_image + i); - - w(r(loc) - i, loc); - w(r(loc + 1) - (i + 4), loc + 1); - /* Don't touch the fixup type */ - - i += sizeof(uint32_t) * 3; - } -} - static void s390_sort_relative_table(char *extab_image, int image_size) { int i; @@ -364,15 +338,14 @@ static int do_file(char const *const fname, void *addr) switch (r2(&ehdr->e_machine)) { case EM_386: + case EM_AARCH64: + case EM_RISCV: case EM_X86_64: - custom_sort = x86_sort_relative_table; + custom_sort = sort_relative_table_with_data; break; case EM_S390: custom_sort = s390_sort_relative_table; break; - case EM_AARCH64: - custom_sort = arm64_sort_relative_table; - break; case EM_PARISC: case EM_PPC: case EM_PPC64: @@ -383,7 +356,6 @@ static int do_file(char const *const fname, void *addr) case EM_ARM: case EM_MICROBLAZE: case EM_MIPS: - case EM_RISCV: case EM_XTENSA: break; default: |