xref: /linux/include/acpi/acpi_numa.h (revision 6fd13452)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2762834e8SYasunori Goto #ifndef __ACPI_NUMA_H
3762834e8SYasunori Goto #define __ACPI_NUMA_H
4762834e8SYasunori Goto 
5762834e8SYasunori Goto #ifdef CONFIG_ACPI_NUMA
6a0c2d9c1SRoss Zwisler #include <linux/numa.h>
7762834e8SYasunori Goto 
8762834e8SYasunori Goto /* Proximity bitmap length */
9762834e8SYasunori Goto #if MAX_NUMNODES > 256
10762834e8SYasunori Goto #define MAX_PXM_DOMAINS MAX_NUMNODES
11762834e8SYasunori Goto #else
12762834e8SYasunori Goto #define MAX_PXM_DOMAINS (256)	/* Old pxm spec is defined 8 bit */
13762834e8SYasunori Goto #endif
14762834e8SYasunori Goto 
15f363d16fSAaron Durbin extern int pxm_to_node(int);
16f363d16fSAaron Durbin extern int node_to_pxm(int);
178ff6f48dSLuck, Tony extern int acpi_map_pxm_to_node(int);
188df0eb7cSKurt Garloff extern unsigned char acpi_srat_revision;
192dd57d34SDan Williams extern void disable_srat(void);
20e84025e2SDavid Daney 
21e84025e2SDavid Daney extern void bad_srat(void);
22e84025e2SDavid Daney extern int srat_disabled(void);
23762834e8SYasunori Goto 
242dd57d34SDan Williams #else				/* CONFIG_ACPI_NUMA */
disable_srat(void)252dd57d34SDan Williams static inline void disable_srat(void)
262dd57d34SDan Williams {
272dd57d34SDan Williams }
pxm_to_node(int pxm)284849bc77SNathan Chancellor static inline int pxm_to_node(int pxm)
294849bc77SNathan Chancellor {
304849bc77SNathan Chancellor 	return 0;
314849bc77SNathan Chancellor }
node_to_pxm(int node)324f0455cfSWei Liu static inline int node_to_pxm(int node)
334f0455cfSWei Liu {
344f0455cfSWei Liu 	return 0;
354f0455cfSWei Liu }
36762834e8SYasunori Goto #endif				/* CONFIG_ACPI_NUMA */
373b0d3101SDan Williams 
383b0d3101SDan Williams #ifdef CONFIG_ACPI_HMAT
393b0d3101SDan Williams extern void disable_hmat(void);
403b0d3101SDan Williams #else				/* CONFIG_ACPI_HMAT */
disable_hmat(void)413b0d3101SDan Williams static inline void disable_hmat(void)
423b0d3101SDan Williams {
433b0d3101SDan Williams }
443b0d3101SDan Williams #endif				/* CONFIG_ACPI_HMAT */
45*237a47ebSChristophe JAILLET #endif				/* __ACPI_NUMA_H */
46