mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
x86/cacheinfo: Constify _cpuid4_info_regs instances
_cpuid4_info_regs instances are passed through a large number of functions at cacheinfo.c. For clarity, constify the instance parameters where _cpuid4_info_regs is only read from. Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250324133324.23458-9-darwi@linutronix.de
This commit is contained in:
parent
cf87582052
commit
7b83e0d2b2
|
|
@ -841,7 +841,7 @@ void init_intel_cacheinfo(struct cpuinfo_x86 *c)
|
|||
}
|
||||
|
||||
static int __cache_amd_cpumap_setup(unsigned int cpu, int index,
|
||||
struct _cpuid4_info_regs *base)
|
||||
const struct _cpuid4_info_regs *base)
|
||||
{
|
||||
struct cpu_cacheinfo *this_cpu_ci;
|
||||
struct cacheinfo *ci;
|
||||
|
|
@ -898,7 +898,7 @@ static int __cache_amd_cpumap_setup(unsigned int cpu, int index,
|
|||
}
|
||||
|
||||
static void __cache_cpumap_setup(unsigned int cpu, int index,
|
||||
struct _cpuid4_info_regs *base)
|
||||
const struct _cpuid4_info_regs *base)
|
||||
{
|
||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||
struct cacheinfo *ci, *sibling_ci;
|
||||
|
|
@ -933,7 +933,8 @@ static void __cache_cpumap_setup(unsigned int cpu, int index,
|
|||
}
|
||||
}
|
||||
|
||||
static void ci_info_init(struct cacheinfo *ci, struct _cpuid4_info_regs *base)
|
||||
static void ci_info_init(struct cacheinfo *ci,
|
||||
const struct _cpuid4_info_regs *base)
|
||||
{
|
||||
ci->id = base->id;
|
||||
ci->attributes = CACHE_ID;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user