Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'loongarch-fixes-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch fixes from Huacai Chen:
"Some bootloader interface fixes, a dts fix, and a trivial cleanup"

* tag 'loongarch-fixes-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
LoongArch: Fix GMAC's phy-mode definitions in dts
LoongArch: Override higher address bits in JUMP_VIRT_ADDR
LoongArch: Fix entry point in kernel image header
LoongArch: Add all CPUs enabled by fdt to NUMA node 0
LoongArch: Fix built-in DTB detection
LoongArch: Remove CONFIG_ACPI_TABLE_UPGRADE in platform_init()

+21 -17
+2 -2
arch/loongarch/boot/dts/loongson-2k0500-ref.dts
··· 44 44 &gmac0 { 45 45 status = "okay"; 46 46 47 - phy-mode = "rgmii"; 47 + phy-mode = "rgmii-id"; 48 48 bus_id = <0x0>; 49 49 }; 50 50 51 51 &gmac1 { 52 52 status = "okay"; 53 53 54 - phy-mode = "rgmii"; 54 + phy-mode = "rgmii-id"; 55 55 bus_id = <0x1>; 56 56 }; 57 57
+2 -2
arch/loongarch/boot/dts/loongson-2k1000-ref.dts
··· 43 43 &gmac0 { 44 44 status = "okay"; 45 45 46 - phy-mode = "rgmii"; 46 + phy-mode = "rgmii-id"; 47 47 phy-handle = <&phy0>; 48 48 mdio { 49 49 compatible = "snps,dwmac-mdio"; ··· 58 58 &gmac1 { 59 59 status = "okay"; 60 60 61 - phy-mode = "rgmii"; 61 + phy-mode = "rgmii-id"; 62 62 phy-handle = <&phy1>; 63 63 mdio { 64 64 compatible = "snps,dwmac-mdio";
+1 -1
arch/loongarch/boot/dts/loongson-2k2000-ref.dts
··· 92 92 &gmac2 { 93 93 status = "okay"; 94 94 95 - phy-mode = "rgmii"; 95 + phy-mode = "rgmii-id"; 96 96 phy-handle = <&phy2>; 97 97 mdio { 98 98 compatible = "snps,dwmac-mdio";
+1
arch/loongarch/include/asm/numa.h
··· 56 56 static inline void early_numa_add_cpu(int cpuid, s16 node) { } 57 57 static inline void numa_add_cpu(unsigned int cpu) { } 58 58 static inline void numa_remove_cpu(unsigned int cpu) { } 59 + static inline void set_cpuid_to_node(int cpuid, s16 node) { } 59 60 60 61 static inline int early_cpu_to_node(int cpu) 61 62 {
+1 -1
arch/loongarch/include/asm/stackframe.h
··· 42 42 .macro JUMP_VIRT_ADDR temp1 temp2 43 43 li.d \temp1, CACHE_BASE 44 44 pcaddi \temp2, 0 45 - or \temp1, \temp1, \temp2 45 + bstrins.d \temp1, \temp2, (DMW_PABITS - 1), 0 46 46 jirl zero, \temp1, 0xc 47 47 .endm 48 48
+1 -1
arch/loongarch/kernel/head.S
··· 22 22 _head: 23 23 .word MZ_MAGIC /* "MZ", MS-DOS header */ 24 24 .org 0x8 25 - .dword kernel_entry /* Kernel entry point */ 25 + .dword _kernel_entry /* Kernel entry point (physical address) */ 26 26 .dword _kernel_asize /* Kernel image effective size */ 27 27 .quad PHYS_LINK_KADDR /* Kernel image load offset from start of RAM */ 28 28 .org 0x38 /* 0x20 ~ 0x37 reserved */
+2 -4
arch/loongarch/kernel/setup.c
··· 282 282 return; 283 283 284 284 /* Prefer to use built-in dtb, checking its legality first. */ 285 - if (!fdt_check_header(__dtb_start)) 285 + if (IS_ENABLED(CONFIG_BUILTIN_DTB) && !fdt_check_header(__dtb_start)) 286 286 fdt_pointer = __dtb_start; 287 287 else 288 288 fdt_pointer = efi_fdt_pointer(); /* Fallback to firmware dtb */ ··· 351 351 arch_reserve_vmcore(); 352 352 arch_reserve_crashkernel(); 353 353 354 - #ifdef CONFIG_ACPI_TABLE_UPGRADE 355 - acpi_table_upgrade(); 356 - #endif 357 354 #ifdef CONFIG_ACPI 355 + acpi_table_upgrade(); 358 356 acpi_gbl_use_default_register_widths = false; 359 357 acpi_boot_table_init(); 360 358 #endif
+4 -1
arch/loongarch/kernel/smp.c
··· 273 273 274 274 if (cpuid == loongson_sysconf.boot_cpu_id) { 275 275 cpu = 0; 276 - numa_add_cpu(cpu); 277 276 } else { 278 277 cpu = cpumask_next_zero(-1, cpu_present_mask); 279 278 } ··· 282 283 set_cpu_present(cpu, true); 283 284 __cpu_number_map[cpuid] = cpu; 284 285 __cpu_logical_map[cpu] = cpuid; 286 + 287 + early_numa_add_cpu(cpu, 0); 288 + set_cpuid_to_node(cpuid, 0); 285 289 } 286 290 287 291 loongson_sysconf.nr_cpus = num_processors; ··· 470 468 set_cpu_possible(0, true); 471 469 set_cpu_online(0, true); 472 470 set_my_cpu_offset(per_cpu_offset(0)); 471 + numa_add_cpu(0); 473 472 474 473 rr_node = first_node(node_online_map); 475 474 for_each_possible_cpu(cpu) {
+6 -4
arch/loongarch/kernel/vmlinux.lds.S
··· 6 6 7 7 #define PAGE_SIZE _PAGE_SIZE 8 8 #define RO_EXCEPTION_TABLE_ALIGN 4 9 + #define PHYSADDR_MASK 0xffffffffffff /* 48-bit */ 9 10 10 11 /* 11 12 * Put .bss..swapper_pg_dir as the first thing in .bss. This will ··· 143 142 144 143 #ifdef CONFIG_EFI_STUB 145 144 /* header symbols */ 146 - _kernel_asize = _end - _text; 147 - _kernel_fsize = _edata - _text; 148 - _kernel_vsize = _end - __initdata_begin; 149 - _kernel_rsize = _edata - __initdata_begin; 145 + _kernel_entry = ABSOLUTE(kernel_entry & PHYSADDR_MASK); 146 + _kernel_asize = ABSOLUTE(_end - _text); 147 + _kernel_fsize = ABSOLUTE(_edata - _text); 148 + _kernel_vsize = ABSOLUTE(_end - __initdata_begin); 149 + _kernel_rsize = ABSOLUTE(_edata - __initdata_begin); 150 150 #endif 151 151 152 152 .gptab.sdata : {
+1 -1
drivers/firmware/efi/libstub/loongarch.c
··· 41 41 unsigned long __weak kernel_entry_address(unsigned long kernel_addr, 42 42 efi_loaded_image_t *image) 43 43 { 44 - return *(unsigned long *)(kernel_addr + 8) - VMLINUX_LOAD_ADDRESS + kernel_addr; 44 + return *(unsigned long *)(kernel_addr + 8) - PHYSADDR(VMLINUX_LOAD_ADDRESS) + kernel_addr; 45 45 } 46 46 47 47 efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image,