mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:30:53 +07:00
Merge branches 'acpi-soc', 'acpi-misc', 'acpi-pci' and 'device-properties'
* acpi-soc: ACPI / APD: Add device HID for future AMD UART controller * acpi-misc: ACPI / util: cast data to u64 before shifting to fix sign extension * acpi-pci: PCI: ACPI: IA64: fix IO port generic range check * device-properties: ACPI / property: fix data node parsing in acpi_get_next_subnode()
This commit is contained in:
commit
ee0140dc8f
@ -145,6 +145,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
|
|||||||
{ "AMD0010", APD_ADDR(cz_i2c_desc) },
|
{ "AMD0010", APD_ADDR(cz_i2c_desc) },
|
||||||
{ "AMDI0010", APD_ADDR(cz_i2c_desc) },
|
{ "AMDI0010", APD_ADDR(cz_i2c_desc) },
|
||||||
{ "AMD0020", APD_ADDR(cz_uart_desc) },
|
{ "AMD0020", APD_ADDR(cz_uart_desc) },
|
||||||
|
{ "AMDI0020", APD_ADDR(cz_uart_desc) },
|
||||||
{ "AMD0030", },
|
{ "AMD0030", },
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARM64
|
#ifdef CONFIG_ARM64
|
||||||
|
@ -816,6 +816,7 @@ struct fwnode_handle *acpi_get_next_subnode(struct device *dev,
|
|||||||
next = adev->node.next;
|
next = adev->node.next;
|
||||||
if (next == head) {
|
if (next == head) {
|
||||||
child = NULL;
|
child = NULL;
|
||||||
|
adev = ACPI_COMPANION(dev);
|
||||||
goto nondev;
|
goto nondev;
|
||||||
}
|
}
|
||||||
adev = list_entry(next, struct acpi_device, node);
|
adev = list_entry(next, struct acpi_device, node);
|
||||||
|
@ -27,8 +27,20 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_X86
|
#ifdef CONFIG_X86
|
||||||
#define valid_IRQ(i) (((i) != 0) && ((i) != 2))
|
#define valid_IRQ(i) (((i) != 0) && ((i) != 2))
|
||||||
|
static inline bool acpi_iospace_resource_valid(struct resource *res)
|
||||||
|
{
|
||||||
|
/* On X86 IO space is limited to the [0 - 64K] IO port range */
|
||||||
|
return res->end < 0x10003;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#define valid_IRQ(i) (true)
|
#define valid_IRQ(i) (true)
|
||||||
|
/*
|
||||||
|
* ACPI IO descriptors on arches other than X86 contain MMIO CPU physical
|
||||||
|
* addresses mapping IO space in CPU physical address space, IO space
|
||||||
|
* resources can be placed anywhere in the 64-bit physical address space.
|
||||||
|
*/
|
||||||
|
static inline bool
|
||||||
|
acpi_iospace_resource_valid(struct resource *res) { return true; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool acpi_dev_resource_len_valid(u64 start, u64 end, u64 len, bool io)
|
static bool acpi_dev_resource_len_valid(u64 start, u64 end, u64 len, bool io)
|
||||||
@ -127,7 +139,7 @@ static void acpi_dev_ioresource_flags(struct resource *res, u64 len,
|
|||||||
if (!acpi_dev_resource_len_valid(res->start, res->end, len, true))
|
if (!acpi_dev_resource_len_valid(res->start, res->end, len, true))
|
||||||
res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
|
res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
|
||||||
|
|
||||||
if (res->end >= 0x10003)
|
if (!acpi_iospace_resource_valid(res))
|
||||||
res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
|
res->flags |= IORESOURCE_DISABLED | IORESOURCE_UNSET;
|
||||||
|
|
||||||
if (io_decode == ACPI_DECODE_16)
|
if (io_decode == ACPI_DECODE_16)
|
||||||
|
@ -692,7 +692,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, int rev, u64 funcs)
|
|||||||
mask = obj->integer.value;
|
mask = obj->integer.value;
|
||||||
else if (obj->type == ACPI_TYPE_BUFFER)
|
else if (obj->type == ACPI_TYPE_BUFFER)
|
||||||
for (i = 0; i < obj->buffer.length && i < 8; i++)
|
for (i = 0; i < obj->buffer.length && i < 8; i++)
|
||||||
mask |= (((u8)obj->buffer.pointer[i]) << (i * 8));
|
mask |= (((u64)obj->buffer.pointer[i]) << (i * 8));
|
||||||
ACPI_FREE(obj);
|
ACPI_FREE(obj);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user