blob: 68e4d80c1b3266752f96a4510ad9d5fefe605f32 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Yasunori Goto762834e2006-06-23 02:03:19 -07002#ifndef __ACPI_NUMA_H
3#define __ACPI_NUMA_H
4
5#ifdef CONFIG_ACPI_NUMA
6#include <linux/kernel.h>
Ross Zwislera0c2d9c2017-07-21 16:51:23 -06007#include <linux/numa.h>
Yasunori Goto762834e2006-06-23 02:03:19 -07008
9/* Proximity bitmap length */
10#if MAX_NUMNODES > 256
11#define MAX_PXM_DOMAINS MAX_NUMNODES
12#else
Len Brownfd350942007-05-09 23:34:35 -040013#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */
Yasunori Goto762834e2006-06-23 02:03:19 -070014#endif
15
Aaron Durbinf363d162007-05-16 22:11:06 -070016extern int pxm_to_node(int);
17extern int node_to_pxm(int);
Luck, Tony8ff6f482007-05-24 13:57:40 -070018extern int acpi_map_pxm_to_node(int);
Kurt Garloff8df0eb7c2012-01-17 04:18:02 -050019extern unsigned char acpi_srat_revision;
Dan Williams2dd57d32020-10-13 16:48:57 -070020extern void disable_srat(void);
David Daneye84025e2016-05-24 15:35:39 -070021
22extern void bad_srat(void);
23extern int srat_disabled(void);
Yasunori Goto762834e2006-06-23 02:03:19 -070024
Dan Williams2dd57d32020-10-13 16:48:57 -070025#else /* CONFIG_ACPI_NUMA */
26static inline void disable_srat(void)
27{
28}
Nathan Chancellor4849bc72020-09-28 12:45:55 -070029static inline int pxm_to_node(int pxm)
30{
31 return 0;
32}
Wei Liu4f0455c2021-02-03 15:04:27 +000033static inline int node_to_pxm(int node)
34{
35 return 0;
36}
Yasunori Goto762834e2006-06-23 02:03:19 -070037#endif /* CONFIG_ACPI_NUMA */
Dan Williams3b0d3102020-10-13 16:49:02 -070038
39#ifdef CONFIG_ACPI_HMAT
40extern void disable_hmat(void);
41#else /* CONFIG_ACPI_HMAT */
42static inline void disable_hmat(void)
43{
44}
45#endif /* CONFIG_ACPI_HMAT */
Christophe JAILLET237a47e2021-06-05 09:30:19 +020046#endif /* __ACPI_NUMA_H */