Merge branches 'acpi-tables', 'acpi-soc', 'acpi-apei' and 'acpi-misc'

* acpi-tables:
  ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode
  ACPI / tables: add DSDT AmlCode new declaration name support
  ACPI: SPCR: Consider baud rate 0 as preconfigured state

* acpi-soc:
  ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
  ACPI / APD: Add clock frequency for Hisilicon Hip08 SPI controller

* acpi-apei:
  ACPI/APEI: Clear GHES block_status before panic()
  ACPI, APEI, EINJ: Change to use DEFINE_SHOW_ATTRIBUTE macro

* acpi-misc:
  ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
This commit is contained in:
Rafael J. Wysocki 2018-12-21 10:04:14 +01:00
8 changed files with 33 additions and 21 deletions

View File

@ -336,7 +336,7 @@ config ACPI_CUSTOM_DSDT_FILE
See Documentation/acpi/dsdt-override.txt
Enter the full path name to the file which includes the AmlCode
declaration.
or dsdt_aml_code declaration.
If unsure, don't enter a file name.

View File

@ -166,6 +166,11 @@ static const struct apd_device_desc thunderx2_i2c_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 125000000,
};
static const struct apd_device_desc hip08_spi_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
#endif
#else
@ -234,6 +239,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
{ "CAV9007", APD_ADDR(thunderx2_i2c_desc) },
{ "HISI02A1", APD_ADDR(hip07_i2c_desc) },
{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
{ "HISI0173", APD_ADDR(hip08_spi_desc) },
#endif
{ }
};

View File

@ -673,12 +673,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
* have _PS0 and _PS3 without _PSC (and no power resources), so
* acpi_bus_init_power() will assume that the BIOS has put them into D0.
*/
ret = acpi_device_fix_up_power(adev);
if (ret) {
/* Skip the device, but continue the namespace scan. */
ret = 0;
goto err_out;
}
acpi_device_fix_up_power(adev);
adev->driver_data = pdata;
pdev = acpi_create_platform_device(adev, dev_desc->properties);

View File

@ -607,17 +607,7 @@ static int available_error_type_show(struct seq_file *m, void *v)
return 0;
}
static int available_error_type_open(struct inode *inode, struct file *file)
{
return single_open(file, available_error_type_show, NULL);
}
static const struct file_operations available_error_type_fops = {
.open = available_error_type_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(available_error_type);
static int error_type_get(void *data, u64 *val)
{

View File

@ -691,6 +691,8 @@ static void __ghes_panic(struct ghes *ghes)
{
__ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus);
ghes_clear_estatus(ghes);
/* reboot to log the error! */
if (!panic_timeout)
panic_timeout = ghes_panic_timeout;

View File

@ -148,6 +148,13 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
}
switch (table->baud_rate) {
case 0:
/*
* SPCR 1.04 defines 0 as a preconfigured state of UART.
* Assume firmware or bootloader configures console correctly.
*/
baud_rate = 0;
break;
case 3:
baud_rate = 9600;
break;
@ -196,6 +203,10 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
* UART so don't attempt to change to the baud rate state
* in the table because driver cannot calculate the dividers
*/
baud_rate = 0;
}
if (!baud_rate) {
snprintf(opts, sizeof(opts), "%s,%s,0x%llx", uart, iotype,
table->serial_port.address);
} else {

View File

@ -712,6 +712,11 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table,
table_length);
}
#ifdef CONFIG_ACPI_CUSTOM_DSDT
static void *amlcode __attribute__ ((weakref("AmlCode")));
static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code")));
#endif
acpi_status
acpi_os_table_override(struct acpi_table_header *existing_table,
struct acpi_table_header **new_table)
@ -722,8 +727,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
*new_table = NULL;
#ifdef CONFIG_ACPI_CUSTOM_DSDT
if (strncmp(existing_table->signature, "DSDT", 4) == 0)
*new_table = (struct acpi_table_header *)AmlCode;
if (!strncmp(existing_table->signature, "DSDT", 4)) {
*new_table = (struct acpi_table_header *)&amlcode;
if (!(*new_table))
*new_table = (struct acpi_table_header *)&dsdt_amlcode;
}
#endif
if (*new_table != NULL)
acpi_table_taint(existing_table);

View File

@ -101,7 +101,7 @@ static inline bool has_acpi_companion(struct device *dev)
static inline void acpi_preset_companion(struct device *dev,
struct acpi_device *parent, u64 addr)
{
ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL));
ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, false));
}
static inline const char *acpi_dev_name(struct acpi_device *adev)