xref: /linux/include/acpi/acpi_numa.h (revision 4f0455cf6f23800c78265c88922c6afd875d08a7)
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
6762834e8SYasunori Goto #include <linux/kernel.h>
7a0c2d9c1SRoss Zwisler #include <linux/numa.h>
8762834e8SYasunori Goto 
9762834e8SYasunori Goto /* Proximity bitmap length */
10762834e8SYasunori Goto #if MAX_NUMNODES > 256
11762834e8SYasunori Goto #define MAX_PXM_DOMAINS MAX_NUMNODES
12762834e8SYasunori Goto #else
13762834e8SYasunori Goto #define MAX_PXM_DOMAINS (256)	/* Old pxm spec is defined 8 bit */
14762834e8SYasunori Goto #endif
15762834e8SYasunori Goto 
16f363d16fSAaron Durbin extern int pxm_to_node(int);
17f363d16fSAaron Durbin extern int node_to_pxm(int);
188ff6f48dSLuck, Tony extern int acpi_map_pxm_to_node(int);
198df0eb7cSKurt Garloff extern unsigned char acpi_srat_revision;
202dd57d34SDan Williams extern void disable_srat(void);
21e84025e2SDavid Daney 
22e84025e2SDavid Daney extern void bad_srat(void);
23e84025e2SDavid Daney extern int srat_disabled(void);
24762834e8SYasunori Goto 
252dd57d34SDan Williams #else				/* CONFIG_ACPI_NUMA */
262dd57d34SDan Williams static inline void disable_srat(void)
272dd57d34SDan Williams {
282dd57d34SDan Williams }
294849bc77SNathan Chancellor static inline int pxm_to_node(int pxm)
304849bc77SNathan Chancellor {
314849bc77SNathan Chancellor 	return 0;
324849bc77SNathan Chancellor }
33*4f0455cfSWei Liu static inline int node_to_pxm(int node)
34*4f0455cfSWei Liu {
35*4f0455cfSWei Liu 	return 0;
36*4f0455cfSWei Liu }
37762834e8SYasunori Goto #endif				/* CONFIG_ACPI_NUMA */
383b0d3101SDan Williams 
393b0d3101SDan Williams #ifdef CONFIG_ACPI_HMAT
403b0d3101SDan Williams extern void disable_hmat(void);
413b0d3101SDan Williams #else				/* CONFIG_ACPI_HMAT */
423b0d3101SDan Williams static inline void disable_hmat(void)
433b0d3101SDan Williams {
443b0d3101SDan Williams }
453b0d3101SDan Williams #endif				/* CONFIG_ACPI_HMAT */
46762834e8SYasunori Goto #endif				/* __ACP_NUMA_H */
47