blob: a4c6ef809e27ab2331310c21fae3933ff4a455c5 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* 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/kernel.h>
7#include <linux/numa.h>
8
9/* Proximity bitmap length */
10#if MAX_NUMNODES > 256
11#define MAX_PXM_DOMAINS MAX_NUMNODES
12#else
13#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */
14#endif
15
16extern int pxm_to_node(int);
17extern int node_to_pxm(int);
18extern int acpi_map_pxm_to_node(int);
19extern unsigned char acpi_srat_revision;
Olivier Deprez157378f2022-04-04 15:47:50 +020020extern void disable_srat(void);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000021
22extern void bad_srat(void);
23extern int srat_disabled(void);
24
Olivier Deprez157378f2022-04-04 15:47:50 +020025#else /* CONFIG_ACPI_NUMA */
26static inline void disable_srat(void)
27{
28}
29static inline int pxm_to_node(int pxm)
30{
31 return 0;
32}
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000033#endif /* CONFIG_ACPI_NUMA */
Olivier Deprez157378f2022-04-04 15:47:50 +020034
35#ifdef CONFIG_ACPI_HMAT
36extern void disable_hmat(void);
37#else /* CONFIG_ACPI_HMAT */
38static inline void disable_hmat(void)
39{
40}
41#endif /* CONFIG_ACPI_HMAT */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000042#endif /* __ACP_NUMA_H */