Skip to content

Commit db7c467

Browse files
committed
Merge tag 'riscv-for-linus-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Palmer Dabbelt: - A few DT bindings fixes to more closely align the ISA string requirements between the bindings and the ISA manual. - A handful of build error/warning fixes. - A fix to move init_cpu_topology() later in the boot flow, so it can allocate memory. - The IRC channel is now in the MAINTAINERS file, so it's easier to find. * tag 'riscv-for-linus-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Move call to init_cpu_topology() to later initialization stage riscv/kprobe: Fix instruction simulation of JALR riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT MAINTAINERS: add an IRC entry for RISC-V RISC-V: fix compile error from deduplicated __ALTERNATIVE_CFG_2 dt-bindings: riscv: fix single letter canonical order dt-bindings: riscv: fix underscore requirement for multi-letter extensions
2 parents e5eb2b2 + c1d6105 commit db7c467

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ properties:
8383
insensitive, letters in the riscv,isa string must be all
8484
lowercase to simplify parsing.
8585
$ref: "/schemas/types.yaml#/definitions/string"
86-
pattern: ^rv(?:64|32)imaf?d?q?c?b?v?k?h?(?:_[hsxz](?:[a-z])+)*$
86+
pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
8787

8888
# RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
8989
timebase-frequency: false

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17960,6 +17960,7 @@ M: Albert Ou <[email protected]>
1796017960
1796117961
S: Supported
1796217962
Q: https://patchwork.kernel.org/project/linux-riscv/list/
17963+
C: irc://irc.libera.chat/riscv
1796317964
P: Documentation/riscv/patch-acceptance.rst
1796417965
T: git git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
1796517966
F: arch/riscv/

arch/riscv/include/asm/alternative-macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
.macro ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, enable_1, \
4848
new_c_2, vendor_id_2, errata_id_2, enable_2
49-
ALTERNATIVE_CFG \old_c, \new_c_1, \vendor_id_1, \errata_id_1, \enable_1
49+
ALTERNATIVE_CFG "\old_c", "\new_c_1", \vendor_id_1, \errata_id_1, \enable_1
5050
ALT_NEW_CONTENT \vendor_id_2, \errata_id_2, \enable_2, \new_c_2
5151
.endm
5252

arch/riscv/kernel/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ clear_bss_done:
326326
call soc_early_init
327327
tail start_kernel
328328

329-
#if CONFIG_RISCV_BOOT_SPINWAIT
329+
#ifdef CONFIG_RISCV_BOOT_SPINWAIT
330330
.Lsecondary_start:
331331
/* Set trap vector to spin forever to help debug */
332332
la a3, .Lsecondary_park

arch/riscv/kernel/probes/simulate-insn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ bool __kprobes simulate_jalr(u32 opcode, unsigned long addr, struct pt_regs *reg
7171
u32 rd_index = (opcode >> 7) & 0x1f;
7272
u32 rs1_index = (opcode >> 15) & 0x1f;
7373

74-
ret = rv_insn_reg_set_val(regs, rd_index, addr + 4);
74+
ret = rv_insn_reg_get_val(regs, rs1_index, &base_addr);
7575
if (!ret)
7676
return ret;
7777

78-
ret = rv_insn_reg_get_val(regs, rs1_index, &base_addr);
78+
ret = rv_insn_reg_set_val(regs, rd_index, addr + 4);
7979
if (!ret)
8080
return ret;
8181

arch/riscv/kernel/smpboot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ static DECLARE_COMPLETION(cpu_running);
3939

4040
void __init smp_prepare_boot_cpu(void)
4141
{
42-
init_cpu_topology();
4342
}
4443

4544
void __init smp_prepare_cpus(unsigned int max_cpus)
@@ -48,6 +47,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
4847
int ret;
4948
unsigned int curr_cpuid;
5049

50+
init_cpu_topology();
51+
5152
curr_cpuid = smp_processor_id();
5253
store_cpu_topology(curr_cpuid);
5354
numa_store_cpu_info(curr_cpuid);

0 commit comments

Comments
 (0)