Skip to content

Commit c05a62c

Browse files
Mr-Bossmanpalmer-dabbelt
authored andcommitted
RISC-V: Replace RISCV_MISALIGNED with RISCV_SCALAR_MISALIGNED
Replace RISCV_MISALIGNED with RISCV_SCALAR_MISALIGNED to allow for the addition of RISCV_VECTOR_MISALIGNED in a later patch. Signed-off-by: Jesse Taube <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Reviewed-by: Evan Green <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 9c528b5 commit c05a62c

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

arch/riscv/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ config THREAD_SIZE_ORDER
784784
Specify the Pages of thread stack size (from 4KB to 64KB), which also
785785
affects irq stack size, which is equal to thread stack size.
786786

787-
config RISCV_MISALIGNED
787+
config RISCV_SCALAR_MISALIGNED
788788
bool
789789
select SYSCTL_ARCH_UNALIGN_ALLOW
790790
help
@@ -801,7 +801,7 @@ choice
801801

802802
config RISCV_PROBE_UNALIGNED_ACCESS
803803
bool "Probe for hardware unaligned access support"
804-
select RISCV_MISALIGNED
804+
select RISCV_SCALAR_MISALIGNED
805805
help
806806
During boot, the kernel will run a series of tests to determine the
807807
speed of unaligned accesses. This probing will dynamically determine
@@ -812,7 +812,7 @@ config RISCV_PROBE_UNALIGNED_ACCESS
812812

813813
config RISCV_EMULATED_UNALIGNED_ACCESS
814814
bool "Emulate unaligned access where system support is missing"
815-
select RISCV_MISALIGNED
815+
select RISCV_SCALAR_MISALIGNED
816816
help
817817
If unaligned memory accesses trap into the kernel as they are not
818818
supported by the system, the kernel will emulate the unaligned

arch/riscv/include/asm/cpufeature.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void riscv_user_isa_enable(void);
5959
#define __RISCV_ISA_EXT_SUPERSET_VALIDATE(_name, _id, _sub_exts, _validate) \
6060
_RISCV_ISA_EXT_DATA(_name, _id, _sub_exts, ARRAY_SIZE(_sub_exts), _validate)
6161

62-
#if defined(CONFIG_RISCV_MISALIGNED)
62+
#if defined(CONFIG_RISCV_SCALAR_MISALIGNED)
6363
bool check_unaligned_access_emulated_all_cpus(void);
6464
void check_unaligned_access_emulated(struct work_struct *work __always_unused);
6565
void unaligned_emulation_finish(void);

arch/riscv/include/asm/entry-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
2525
void handle_page_fault(struct pt_regs *regs);
2626
void handle_break(struct pt_regs *regs);
2727

28-
#ifdef CONFIG_RISCV_MISALIGNED
28+
#ifdef CONFIG_RISCV_SCALAR_MISALIGNED
2929
int handle_misaligned_load(struct pt_regs *regs);
3030
int handle_misaligned_store(struct pt_regs *regs);
3131
#else

arch/riscv/kernel/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ obj-y += probes/
6868
obj-y += tests/
6969
obj-$(CONFIG_MMU) += vdso.o vdso/
7070

71-
obj-$(CONFIG_RISCV_MISALIGNED) += traps_misaligned.o
72-
obj-$(CONFIG_RISCV_MISALIGNED) += unaligned_access_speed.o
71+
obj-$(CONFIG_RISCV_SCALAR_MISALIGNED) += traps_misaligned.o
72+
obj-$(CONFIG_RISCV_SCALAR_MISALIGNED) += unaligned_access_speed.o
7373
obj-$(CONFIG_RISCV_PROBE_UNALIGNED_ACCESS) += copy-unaligned.o
7474

7575
obj-$(CONFIG_FPU) += fpu.o

arch/riscv/kernel/fpu.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ SYM_FUNC_END(__fstate_restore)
170170
__access_func(f31)
171171

172172

173-
#ifdef CONFIG_RISCV_MISALIGNED
173+
#ifdef CONFIG_RISCV_SCALAR_MISALIGNED
174174

175175
/*
176176
* Disable compressed instructions set to keep a constant offset between FP
@@ -224,4 +224,4 @@ SYM_FUNC_START(get_f64_reg)
224224
fp_access_epilogue
225225
SYM_FUNC_END(get_f64_reg)
226226

227-
#endif /* CONFIG_RISCV_MISALIGNED */
227+
#endif /* CONFIG_RISCV_SCALAR_MISALIGNED */

0 commit comments

Comments
 (0)