mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
Merge tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt: - Support for the DA9063 as used on the HiFive Unmatched. - Support for relative extables, which puts us in line with other architectures and save some space in vmlinux. - A handful of kexec fixes/improvements, including the ability to run crash kernels from PCI-addressable memory on the HiFive Unmatched. - Support for the SBI SRST extension, which allows systems that do not have an explicit driver in Linux to reboot. - A handful of fixes and cleanups, including to the defconfigs and device trees. * tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits) RISC-V: Use SBI SRST extension when available riscv: mm: fix wrong phys_ram_base value for RV64 RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n riscv: head: remove useless __PAGE_ALIGNED_BSS and .balign riscv: errata: alternative: mark vendor_patch_func __initdata riscv: head: make secondary_start_common() static riscv: remove cpu_stop() riscv: try to allocate crashkern region from 32bit addressible memory riscv: use hart id instead of cpu id on machine_kexec riscv: Don't use va_pa_offset on kdump riscv: dts: sifive: fu540-c000: Fix PLIC node riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values riscv: dts: sifive: Group tuples in register properties riscv: dts: sifive: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Fix clock controller node riscv: dts: microchip: mpfs: Fix reference clock node riscv: dts: microchip: mpfs: Fix PLIC node riscv: dts: microchip: mpfs: Drop empty chosen node riscv: dts: canaan: Group tuples in interrupt properties ...
This commit is contained in:
@@ -233,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;
|
||||
|
||||
@@ -261,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;
|
||||
@@ -366,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:
|
||||
@@ -385,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:
|
||||
|
Reference in New Issue
Block a user