mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-13 11:07:46 +10:00
In preparation for tracking and exposing microarchitectural details to userspace (like whether or not unaligned accesses are fast), move the riscv_cpuinfo struct out to its own new cpufeatures.h header. It will need to be used by more than just cpu.c. Signed-off-by: Evan Green <evan@rivosinc.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Heiko Stuebner <heiko.stuebner@vrull.eu> Tested-by: Heiko Stuebner <heiko.stuebner@vrull.eu> Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com> Link: https://lore.kernel.org/r/20230407231103.2622178-2-evan@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
22 lines
416 B
C
22 lines
416 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright 2022-2023 Rivos, Inc
|
|
*/
|
|
|
|
#ifndef _ASM_CPUFEATURE_H
|
|
#define _ASM_CPUFEATURE_H
|
|
|
|
/*
|
|
* These are probed via a device_initcall(), via either the SBI or directly
|
|
* from the corresponding CSRs.
|
|
*/
|
|
struct riscv_cpuinfo {
|
|
unsigned long mvendorid;
|
|
unsigned long marchid;
|
|
unsigned long mimpid;
|
|
};
|
|
|
|
DECLARE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo);
|
|
|
|
#endif
|