Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 2 | #ifndef __ACPI_NUMA_H |
| 3 | #define __ACPI_NUMA_H |
| 4 | |
| 5 | #ifdef CONFIG_ACPI_NUMA |
| 6 | #include <linux/kernel.h> |
Ross Zwisler | a0c2d9c | 2017-07-21 16:51:23 -0600 | [diff] [blame] | 7 | #include <linux/numa.h> |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 8 | |
| 9 | /* Proximity bitmap length */ |
| 10 | #if MAX_NUMNODES > 256 |
| 11 | #define MAX_PXM_DOMAINS MAX_NUMNODES |
| 12 | #else |
Len Brown | fd35094 | 2007-05-09 23:34:35 -0400 | [diff] [blame] | 13 | #define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */ |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 14 | #endif |
| 15 | |
Aaron Durbin | f363d16 | 2007-05-16 22:11:06 -0700 | [diff] [blame] | 16 | extern int pxm_to_node(int); |
| 17 | extern int node_to_pxm(int); |
Luck, Tony | 8ff6f48 | 2007-05-24 13:57:40 -0700 | [diff] [blame] | 18 | extern int acpi_map_pxm_to_node(int); |
Kurt Garloff | 8df0eb7c | 2012-01-17 04:18:02 -0500 | [diff] [blame] | 19 | extern unsigned char acpi_srat_revision; |
Dan Williams | 2dd57d3 | 2020-10-13 16:48:57 -0700 | [diff] [blame] | 20 | extern void disable_srat(void); |
David Daney | e84025e | 2016-05-24 15:35:39 -0700 | [diff] [blame] | 21 | |
| 22 | extern void bad_srat(void); |
| 23 | extern int srat_disabled(void); |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 24 | |
Dan Williams | 2dd57d3 | 2020-10-13 16:48:57 -0700 | [diff] [blame] | 25 | #else /* CONFIG_ACPI_NUMA */ |
| 26 | static inline void disable_srat(void) |
| 27 | { |
| 28 | } |
Nathan Chancellor | 4849bc7 | 2020-09-28 12:45:55 -0700 | [diff] [blame] | 29 | static inline int pxm_to_node(int pxm) |
| 30 | { |
| 31 | return 0; |
| 32 | } |
Wei Liu | 4f0455c | 2021-02-03 15:04:27 +0000 | [diff] [blame] | 33 | static inline int node_to_pxm(int node) |
| 34 | { |
| 35 | return 0; |
| 36 | } |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 37 | #endif /* CONFIG_ACPI_NUMA */ |
Dan Williams | 3b0d310 | 2020-10-13 16:49:02 -0700 | [diff] [blame] | 38 | |
| 39 | #ifdef CONFIG_ACPI_HMAT |
| 40 | extern void disable_hmat(void); |
| 41 | #else /* CONFIG_ACPI_HMAT */ |
| 42 | static inline void disable_hmat(void) |
| 43 | { |
| 44 | } |
| 45 | #endif /* CONFIG_ACPI_HMAT */ |
Christophe JAILLET | 237a47e | 2021-06-05 09:30:19 +0200 | [diff] [blame] | 46 | #endif /* __ACPI_NUMA_H */ |