18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ACPI_NUMA_H
38c2ecf20Sopenharmony_ci#define __ACPI_NUMA_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#ifdef CONFIG_ACPI_NUMA
68c2ecf20Sopenharmony_ci#include <linux/kernel.h>
78c2ecf20Sopenharmony_ci#include <linux/numa.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/* Proximity bitmap length */
108c2ecf20Sopenharmony_ci#if MAX_NUMNODES > 256
118c2ecf20Sopenharmony_ci#define MAX_PXM_DOMAINS MAX_NUMNODES
128c2ecf20Sopenharmony_ci#else
138c2ecf20Sopenharmony_ci#define MAX_PXM_DOMAINS (256)	/* Old pxm spec is defined 8 bit */
148c2ecf20Sopenharmony_ci#endif
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciextern int pxm_to_node(int);
178c2ecf20Sopenharmony_ciextern int node_to_pxm(int);
188c2ecf20Sopenharmony_ciextern int acpi_map_pxm_to_node(int);
198c2ecf20Sopenharmony_ciextern unsigned char acpi_srat_revision;
208c2ecf20Sopenharmony_ciextern void disable_srat(void);
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciextern void bad_srat(void);
238c2ecf20Sopenharmony_ciextern int srat_disabled(void);
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#else				/* CONFIG_ACPI_NUMA */
268c2ecf20Sopenharmony_cistatic inline void disable_srat(void)
278c2ecf20Sopenharmony_ci{
288c2ecf20Sopenharmony_ci}
298c2ecf20Sopenharmony_cistatic inline int pxm_to_node(int pxm)
308c2ecf20Sopenharmony_ci{
318c2ecf20Sopenharmony_ci	return 0;
328c2ecf20Sopenharmony_ci}
338c2ecf20Sopenharmony_ci#endif				/* CONFIG_ACPI_NUMA */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#ifdef CONFIG_ACPI_HMAT
368c2ecf20Sopenharmony_ciextern void disable_hmat(void);
378c2ecf20Sopenharmony_ci#else				/* CONFIG_ACPI_HMAT */
388c2ecf20Sopenharmony_cistatic inline void disable_hmat(void)
398c2ecf20Sopenharmony_ci{
408c2ecf20Sopenharmony_ci}
418c2ecf20Sopenharmony_ci#endif				/* CONFIG_ACPI_HMAT */
428c2ecf20Sopenharmony_ci#endif				/* __ACP_NUMA_H */
43