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

powerpc/pseries: Move VPHN constants into vphn.h

These don't have any particularly good reason to belong in lppaca.h,
move them into their own header.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230823055317.751786-1-mpe@ellerman.id.au

+26 -23
-22
arch/powerpc/include/asm/lppaca.h
··· 6 6 #ifndef _ASM_POWERPC_LPPACA_H 7 7 #define _ASM_POWERPC_LPPACA_H 8 8 9 - /* 10 - * The below VPHN macros are outside the __KERNEL__ check since these are 11 - * used for compiling the vphn selftest in userspace 12 - */ 13 - 14 - /* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */ 15 - #define VPHN_REGISTER_COUNT 6 16 - 17 - /* 18 - * 6 64-bit registers unpacked into up to 24 be32 associativity values. To 19 - * form the complete property we have to add the length in the first cell. 20 - */ 21 - #define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1) 22 - 23 - /* 24 - * The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags: 25 - * 1 for retrieving associativity information for a guest cpu 26 - * 2 for retrieving associativity information for a host/hypervisor cpu 27 - */ 28 - #define VPHN_FLAG_VCPU 1 29 - #define VPHN_FLAG_PCPU 2 30 - 31 9 #ifdef __KERNEL__ 32 10 33 11 /*
+22
arch/powerpc/include/asm/vphn.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 + #ifndef _ASM_POWERPC_VPHN_H 3 + #define _ASM_POWERPC_VPHN_H 4 + 5 + /* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */ 6 + #define VPHN_REGISTER_COUNT 6 7 + 8 + /* 9 + * 6 64-bit registers unpacked into up to 24 be32 associativity values. To 10 + * form the complete property we have to add the length in the first cell. 11 + */ 12 + #define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1) 13 + 14 + /* 15 + * The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags: 16 + * 1 for retrieving associativity information for a guest cpu 17 + * 2 for retrieving associativity information for a host/hypervisor cpu 18 + */ 19 + #define VPHN_FLAG_VCPU 1 20 + #define VPHN_FLAG_PCPU 2 21 + 22 + #endif // _ASM_POWERPC_VPHN_H
+1
arch/powerpc/mm/numa.c
··· 34 34 #include <asm/hvcall.h> 35 35 #include <asm/setup.h> 36 36 #include <asm/vdso.h> 37 + #include <asm/vphn.h> 37 38 #include <asm/drmem.h> 38 39 39 40 static int numa_enabled = 1;
+1
arch/powerpc/platforms/pseries/lpar.c
··· 41 41 #include <asm/kexec.h> 42 42 #include <asm/fadump.h> 43 43 #include <asm/dtl.h> 44 + #include <asm/vphn.h> 44 45 45 46 #include "pseries.h" 46 47
+1
arch/powerpc/platforms/pseries/vas.c
··· 17 17 #include <asm/hvcall.h> 18 18 #include <asm/plpar_wrappers.h> 19 19 #include <asm/firmware.h> 20 + #include <asm/vphn.h> 20 21 #include <asm/vas.h> 21 22 #include "vas.h" 22 23
+1 -1
arch/powerpc/platforms/pseries/vphn.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <asm/byteorder.h> 3 - #include <asm/lppaca.h> 3 + #include <asm/vphn.h> 4 4 5 5 /* 6 6 * The associativity domain numbers are returned from the hypervisor as a