| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | 
|---|
| 2 | #ifndef __ACPI_NUMA_H | 
|---|
| 3 | #define __ACPI_NUMA_H | 
|---|
| 4 |  | 
|---|
| 5 | #ifdef CONFIG_ACPI_NUMA | 
|---|
| 6 | #include <linux/numa.h> | 
|---|
| 7 |  | 
|---|
| 8 | /* Proximity bitmap length */ | 
|---|
| 9 | #if MAX_NUMNODES > 256 | 
|---|
| 10 | #define MAX_PXM_DOMAINS MAX_NUMNODES | 
|---|
| 11 | #else | 
|---|
| 12 | #define MAX_PXM_DOMAINS (256)	/* Old pxm spec is defined 8 bit */ | 
|---|
| 13 | #endif | 
|---|
| 14 |  | 
|---|
| 15 | extern int pxm_to_node(int); | 
|---|
| 16 | extern int node_to_pxm(int); | 
|---|
| 17 | extern int acpi_map_pxm_to_node(int); | 
|---|
| 18 | extern unsigned char acpi_srat_revision; | 
|---|
| 19 | extern void disable_srat(void); | 
|---|
| 20 | extern int fix_pxm_node_maps(int max_nid); | 
|---|
| 21 |  | 
|---|
| 22 | extern void bad_srat(void); | 
|---|
| 23 | extern int srat_disabled(void); | 
|---|
| 24 |  | 
|---|
| 25 | #else				/* CONFIG_ACPI_NUMA */ | 
|---|
| 26 | static inline int fix_pxm_node_maps(int max_nid) | 
|---|
| 27 | { | 
|---|
| 28 | return 0; | 
|---|
| 29 | } | 
|---|
| 30 | static inline void disable_srat(void) | 
|---|
| 31 | { | 
|---|
| 32 | } | 
|---|
| 33 | static inline int pxm_to_node(int pxm) | 
|---|
| 34 | { | 
|---|
| 35 | return 0; | 
|---|
| 36 | } | 
|---|
| 37 | static inline int node_to_pxm(int node) | 
|---|
| 38 | { | 
|---|
| 39 | return 0; | 
|---|
| 40 | } | 
|---|
| 41 | #endif				/* CONFIG_ACPI_NUMA */ | 
|---|
| 42 |  | 
|---|
| 43 | #ifdef CONFIG_ACPI_HMAT | 
|---|
| 44 | extern void disable_hmat(void); | 
|---|
| 45 | #else				/* CONFIG_ACPI_HMAT */ | 
|---|
| 46 | static inline void disable_hmat(void) | 
|---|
| 47 | { | 
|---|
| 48 | } | 
|---|
| 49 | #endif				/* CONFIG_ACPI_HMAT */ | 
|---|
| 50 | #endif				/* __ACPI_NUMA_H */ | 
|---|
| 51 |  | 
|---|