Merge branches 'acpi-resource', 'acpi-property' and 'acpi-numa'
Make ACPI resource management quirks, a documentation update related to the ACPI handling of device properties and ACPI NUMA handling changes for 6.10: - Add ACPI IRQ override quirks for Asus Vivobook Pro N6506MV, TongFang GXxHRXx and GMxHGxx, and XMG APEX 17 M23 (Guenter Schafranek, Tamim Khan, Christoffer Sandberg). - Add reference to UEFI DSD Guide to the documentation related to the ACPI handling of device properties (Sakari Ailus). - Fix SRAT lookup of CFMWS ranges with numa_fill_memblks(), remove lefover architecture-dependent code from the ACPI NUMA handling code and simplify it on top of that (Robert Richter). * acpi-resource: ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MV ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx ACPI: resource: Do IRQ override on GMxBGxx (XMG APEX 17 M23) * acpi-property: ACPI: property: Add reference to UEFI DSD Guide * acpi-numa: ACPI/NUMA: Squash acpi_numa_memory_affinity_init() into acpi_parse_memory_affinity() ACPI/NUMA: Squash acpi_numa_slit_init() into acpi_parse_slit() ACPI/NUMA: Remove architecture dependent remainings x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()
This commit is contained in:
commit
ca86ab598d
@ -37,8 +37,6 @@ extern int phys_to_target_node(phys_addr_t start);
|
||||
#define phys_to_target_node phys_to_target_node
|
||||
extern int memory_add_physaddr_to_nid(u64 start);
|
||||
#define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
|
||||
extern int numa_fill_memblks(u64 start, u64 end);
|
||||
#define numa_fill_memblks numa_fill_memblks
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
|
@ -929,6 +929,8 @@ int memory_add_physaddr_to_nid(u64 start)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
|
||||
|
||||
#endif
|
||||
|
||||
static int __init cmp_memblk(const void *a, const void *b)
|
||||
{
|
||||
const struct numa_memblk *ma = *(const struct numa_memblk **)a;
|
||||
@ -1001,5 +1003,3 @@ int __init numa_fill_memblks(u64 start, u64 end)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -208,16 +208,26 @@ int __init srat_disabled(void)
|
||||
return acpi_numa < 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH)
|
||||
__weak int __init numa_fill_memblks(u64 start, u64 end)
|
||||
{
|
||||
return NUMA_NO_MEMBLK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for
|
||||
* I/O localities since SRAT does not list them. I/O localities are
|
||||
* not supported at this point.
|
||||
*/
|
||||
void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
|
||||
static int __init acpi_parse_slit(struct acpi_table_header *table)
|
||||
{
|
||||
struct acpi_table_slit *slit = (struct acpi_table_slit *)table;
|
||||
int i, j;
|
||||
|
||||
if (!slit_valid(slit)) {
|
||||
pr_info("SLIT table looks invalid. Not used.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < slit->locality_count; i++) {
|
||||
const int from_node = pxm_to_node(i);
|
||||
|
||||
@ -234,28 +244,34 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
|
||||
slit->entry[slit->locality_count * i + j]);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Default callback for parsing of the Proximity Domain <-> Memory
|
||||
* Area mappings
|
||||
*/
|
||||
int __init
|
||||
acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
|
||||
static int parsed_numa_memblks __initdata;
|
||||
|
||||
static int __init
|
||||
acpi_parse_memory_affinity(union acpi_subtable_headers *header,
|
||||
const unsigned long table_end)
|
||||
{
|
||||
struct acpi_srat_mem_affinity *ma;
|
||||
u64 start, end;
|
||||
u32 hotpluggable;
|
||||
int node, pxm;
|
||||
|
||||
ma = (struct acpi_srat_mem_affinity *)header;
|
||||
|
||||
acpi_table_print_srat_entry(&header->common);
|
||||
|
||||
if (srat_disabled())
|
||||
goto out_err;
|
||||
return 0;
|
||||
if (ma->header.length < sizeof(struct acpi_srat_mem_affinity)) {
|
||||
pr_err("SRAT: Unexpected header length: %d\n",
|
||||
ma->header.length);
|
||||
goto out_err_bad_srat;
|
||||
}
|
||||
if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0)
|
||||
goto out_err;
|
||||
return 0;
|
||||
hotpluggable = IS_ENABLED(CONFIG_MEMORY_HOTPLUG) &&
|
||||
(ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE);
|
||||
|
||||
@ -293,11 +309,15 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
|
||||
|
||||
max_possible_pfn = max(max_possible_pfn, PFN_UP(end - 1));
|
||||
|
||||
parsed_numa_memblks++;
|
||||
|
||||
return 0;
|
||||
|
||||
out_err_bad_srat:
|
||||
/* Just disable SRAT, but do not fail and ignore errors. */
|
||||
bad_srat();
|
||||
out_err:
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
|
||||
@ -340,26 +360,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
|
||||
(*fake_pxm)++;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
|
||||
void *arg, const unsigned long table_end)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */
|
||||
|
||||
static int __init acpi_parse_slit(struct acpi_table_header *table)
|
||||
{
|
||||
struct acpi_table_slit *slit = (struct acpi_table_slit *)table;
|
||||
|
||||
if (!slit_valid(slit)) {
|
||||
pr_info("SLIT table looks invalid. Not used.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
acpi_numa_slit_init(slit);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init __weak
|
||||
acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
|
||||
@ -450,24 +450,6 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header,
|
||||
}
|
||||
#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */
|
||||
|
||||
static int __initdata parsed_numa_memblks;
|
||||
|
||||
static int __init
|
||||
acpi_parse_memory_affinity(union acpi_subtable_headers * header,
|
||||
const unsigned long end)
|
||||
{
|
||||
struct acpi_srat_mem_affinity *memory_affinity;
|
||||
|
||||
memory_affinity = (struct acpi_srat_mem_affinity *)header;
|
||||
|
||||
acpi_table_print_srat_entry(&header->common);
|
||||
|
||||
/* let architecture-dependent part to do it */
|
||||
if (!acpi_numa_memory_affinity_init(memory_affinity))
|
||||
parsed_numa_memblks++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init acpi_parse_srat(struct acpi_table_header *table)
|
||||
{
|
||||
struct acpi_table_srat *srat = (struct acpi_table_srat *)table;
|
||||
|
@ -31,9 +31,14 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
|
||||
* not defined without a warning. For instance if any of the properties
|
||||
* from different GUID appear in a property list of another, it will be
|
||||
* accepted by the kernel. Firmware validation tools should catch these.
|
||||
*
|
||||
* References:
|
||||
*
|
||||
* [1] UEFI DSD Guide.
|
||||
* https://github.com/UEFI/DSD-Guide/blob/main/src/dsd-guide.adoc
|
||||
*/
|
||||
static const guid_t prp_guids[] = {
|
||||
/* ACPI _DSD device properties GUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
|
||||
/* ACPI _DSD device properties GUID [1]: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
|
||||
GUID_INIT(0xdaffd814, 0x6eba, 0x4d8c,
|
||||
0x8a, 0x91, 0xbc, 0x9b, 0xbf, 0x4a, 0xa3, 0x01),
|
||||
/* Hotplug in D3 GUID: 6211e2c0-58a3-4af3-90e1-927a4e0c55a4 */
|
||||
@ -53,12 +58,12 @@ static const guid_t prp_guids[] = {
|
||||
0xa5, 0x61, 0x99, 0xa5, 0x18, 0x97, 0x62, 0xd0),
|
||||
};
|
||||
|
||||
/* ACPI _DSD data subnodes GUID: dbb8e3e6-5886-4ba6-8795-1319f52a966b */
|
||||
/* ACPI _DSD data subnodes GUID [1]: dbb8e3e6-5886-4ba6-8795-1319f52a966b */
|
||||
static const guid_t ads_guid =
|
||||
GUID_INIT(0xdbb8e3e6, 0x5886, 0x4ba6,
|
||||
0x87, 0x95, 0x13, 0x19, 0xf5, 0x2a, 0x96, 0x6b);
|
||||
|
||||
/* ACPI _DSD data buffer GUID: edb12dd0-363d-4085-a3d2-49522ca160c4 */
|
||||
/* ACPI _DSD data buffer GUID [1]: edb12dd0-363d-4085-a3d2-49522ca160c4 */
|
||||
static const guid_t buffer_prop_guid =
|
||||
GUID_INIT(0xedb12dd0, 0x363d, 0x4085,
|
||||
0xa3, 0xd2, 0x49, 0x52, 0x2c, 0xa1, 0x60, 0xc4);
|
||||
|
@ -517,6 +517,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "E1504GAB"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook Pro N6506MV */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "N6506MV"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* LG Electronics 17U70P */
|
||||
.matches = {
|
||||
@ -533,6 +540,12 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
||||
* to have a working keyboard.
|
||||
*/
|
||||
static const struct dmi_system_id irq1_edge_low_force_override[] = {
|
||||
{
|
||||
/* XMG APEX 17 (M23) */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxBGxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD */
|
||||
.matches = {
|
||||
@ -630,6 +643,18 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X565"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GXxHRXx/TUXEDO InfinityBook Pro Gen9 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GXxHRXx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* TongFang GMxHGxx/TUXEDO Stellaris Slim Gen1 AMD */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -242,9 +242,6 @@ static inline bool acpi_gicc_is_usable(struct acpi_madt_generic_interrupt *gicc)
|
||||
return gicc->flags & ACPI_MADT_ENABLED;
|
||||
}
|
||||
|
||||
/* the following numa functions are architecture-dependent */
|
||||
void acpi_numa_slit_init (struct acpi_table_slit *slit);
|
||||
|
||||
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
|
||||
void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
|
||||
#else
|
||||
@ -267,8 +264,6 @@ static inline void
|
||||
acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { }
|
||||
#endif
|
||||
|
||||
int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
|
||||
|
||||
#ifndef PHYS_CPUID_INVALID
|
||||
typedef u32 phys_cpuid_t;
|
||||
#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
|
||||
|
@ -36,12 +36,7 @@ int memory_add_physaddr_to_nid(u64 start);
|
||||
int phys_to_target_node(u64 start);
|
||||
#endif
|
||||
|
||||
#ifndef numa_fill_memblks
|
||||
static inline int __init numa_fill_memblks(u64 start, u64 end)
|
||||
{
|
||||
return NUMA_NO_MEMBLK;
|
||||
}
|
||||
#endif
|
||||
int numa_fill_memblks(u64 start, u64 end);
|
||||
|
||||
#else /* !CONFIG_NUMA */
|
||||
static inline int numa_nearest_node(int node, unsigned int state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user