mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branches 'iommu/fixes', 'arm/exynos', 'arm/renesas', 'arm/smmu', 'arm/mediatek', 'arm/core', 'x86/vt-d' and 'core' into next
This commit is contained in:
commit
8d2932dd06
1244 changed files with 13484 additions and 8002 deletions
|
|
@ -114,7 +114,7 @@ void __init acpi_watchdog_init(void)
|
|||
pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE,
|
||||
resources, nresources);
|
||||
if (IS_ERR(pdev))
|
||||
pr_err("Failed to create platform device\n");
|
||||
pr_err("Device creation failed: %ld\n", PTR_ERR(pdev));
|
||||
|
||||
kfree(resources);
|
||||
|
||||
|
|
|
|||
|
|
@ -852,23 +852,18 @@ acpi_tb_install_and_load_table(acpi_physical_address address,
|
|||
|
||||
ACPI_FUNCTION_TRACE(tb_install_and_load_table);
|
||||
|
||||
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
|
||||
|
||||
/* Install the table and load it into the namespace */
|
||||
|
||||
status = acpi_tb_install_standard_table(address, flags, TRUE,
|
||||
override, &i);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
goto unlock_and_exit;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
||||
status = acpi_tb_load_table(i, acpi_gbl_root_node);
|
||||
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
|
||||
|
||||
unlock_and_exit:
|
||||
exit:
|
||||
*table_index = i;
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,6 +217,10 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
|||
goto release_and_exit;
|
||||
}
|
||||
|
||||
/* Acquire the table lock */
|
||||
|
||||
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
|
||||
|
||||
if (reload) {
|
||||
/*
|
||||
* Validate the incoming table signature.
|
||||
|
|
@ -244,7 +248,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
|||
new_table_desc.signature.integer));
|
||||
|
||||
status = AE_BAD_SIGNATURE;
|
||||
goto release_and_exit;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/* Check if table is already registered */
|
||||
|
|
@ -279,7 +283,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
|||
/* Table is still loaded, this is an error */
|
||||
|
||||
status = AE_ALREADY_EXISTS;
|
||||
goto release_and_exit;
|
||||
goto unlock_and_exit;
|
||||
} else {
|
||||
/*
|
||||
* Table was unloaded, allow it to be reloaded.
|
||||
|
|
@ -290,6 +294,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
|||
* indicate the re-installation.
|
||||
*/
|
||||
acpi_tb_uninstall_table(&new_table_desc);
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
||||
*table_index = i;
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
|
@ -303,11 +308,19 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
|||
|
||||
/* Invoke table handler if present */
|
||||
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
||||
if (acpi_gbl_table_handler) {
|
||||
(void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_INSTALL,
|
||||
new_table_desc.pointer,
|
||||
acpi_gbl_table_handler_context);
|
||||
}
|
||||
(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
|
||||
|
||||
unlock_and_exit:
|
||||
|
||||
/* Release the table lock */
|
||||
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
||||
|
||||
release_and_exit:
|
||||
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ static const struct iommu_ops *iort_iommu_xlate(struct device *dev,
|
|||
if (!iort_fwnode)
|
||||
return NULL;
|
||||
|
||||
ops = iommu_get_instance(iort_fwnode);
|
||||
ops = iommu_ops_from_fwnode(iort_fwnode);
|
||||
if (!ops)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,15 @@ static int find_child_checks(struct acpi_device *adev, bool check_children)
|
|||
if (check_children && list_empty(&adev->children))
|
||||
return -ENODEV;
|
||||
|
||||
return sta_present ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
|
||||
/*
|
||||
* If the device has a _HID (or _CID) returning a valid ACPI/PNP
|
||||
* device ID, it is better to make it look less attractive here, so that
|
||||
* the other device with the same _ADR value (that may not have a valid
|
||||
* device ID) can be matched going forward. [This means a second spec
|
||||
* violation in a row, so whatever we do here is best effort anyway.]
|
||||
*/
|
||||
return sta_present && list_empty(&adev->pnp.ids) ?
|
||||
FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
|
||||
}
|
||||
|
||||
struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
|
||||
|
|
@ -250,7 +258,6 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev)
|
|||
return 0;
|
||||
|
||||
err:
|
||||
acpi_dma_deconfigure(dev);
|
||||
ACPI_COMPANION_SET(dev, NULL);
|
||||
put_device(dev);
|
||||
put_device(&acpi_dev->dev);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ void acpi_amba_init(void);
|
|||
static inline void acpi_amba_init(void) {}
|
||||
#endif
|
||||
int acpi_sysfs_init(void);
|
||||
void acpi_gpe_apply_masked_gpes(void);
|
||||
void acpi_container_init(void);
|
||||
void acpi_memory_hotplug_init(void);
|
||||
#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
|
||||
|
|
|
|||
|
|
@ -2074,6 +2074,7 @@ int __init acpi_scan_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
acpi_gpe_apply_masked_gpes();
|
||||
acpi_update_all_gpes();
|
||||
acpi_ec_ecdt_start();
|
||||
|
||||
|
|
|
|||
|
|
@ -674,14 +674,6 @@ static void acpi_sleep_suspend_setup(void)
|
|||
if (acpi_sleep_state_supported(i))
|
||||
sleep_states[i] = 1;
|
||||
|
||||
/*
|
||||
* Use suspend-to-idle by default if ACPI_FADT_LOW_POWER_S0 is set and
|
||||
* the default suspend mode was not selected from the command line.
|
||||
*/
|
||||
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0 &&
|
||||
mem_sleep_default > PM_SUSPEND_MEM)
|
||||
mem_sleep_default = PM_SUSPEND_FREEZE;
|
||||
|
||||
suspend_set_ops(old_suspend_ordering ?
|
||||
&acpi_suspend_ops_old : &acpi_suspend_ops);
|
||||
freeze_set_ops(&acpi_freeze_ops);
|
||||
|
|
|
|||
|
|
@ -708,6 +708,62 @@ end:
|
|||
return result ? result : size;
|
||||
}
|
||||
|
||||
/*
|
||||
* A Quirk Mechanism for GPE Flooding Prevention:
|
||||
*
|
||||
* Quirks may be needed to prevent GPE flooding on a specific GPE. The
|
||||
* flooding typically cannot be detected and automatically prevented by
|
||||
* ACPI_GPE_DISPATCH_NONE check because there is a _Lxx/_Exx prepared in
|
||||
* the AML tables. This normally indicates a feature gap in Linux, thus
|
||||
* instead of providing endless quirk tables, we provide a boot parameter
|
||||
* for those who want this quirk. For example, if the users want to prevent
|
||||
* the GPE flooding for GPE 00, they need to specify the following boot
|
||||
* parameter:
|
||||
* acpi_mask_gpe=0x00
|
||||
* The masking status can be modified by the following runtime controlling
|
||||
* interface:
|
||||
* echo unmask > /sys/firmware/acpi/interrupts/gpe00
|
||||
*/
|
||||
|
||||
/*
|
||||
* Currently, the GPE flooding prevention only supports to mask the GPEs
|
||||
* numbered from 00 to 7f.
|
||||
*/
|
||||
#define ACPI_MASKABLE_GPE_MAX 0x80
|
||||
|
||||
static u64 __initdata acpi_masked_gpes;
|
||||
|
||||
static int __init acpi_gpe_set_masked_gpes(char *val)
|
||||
{
|
||||
u8 gpe;
|
||||
|
||||
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
|
||||
return -EINVAL;
|
||||
acpi_masked_gpes |= ((u64)1<<gpe);
|
||||
|
||||
return 1;
|
||||
}
|
||||
__setup("acpi_mask_gpe=", acpi_gpe_set_masked_gpes);
|
||||
|
||||
void __init acpi_gpe_apply_masked_gpes(void)
|
||||
{
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
u8 gpe;
|
||||
|
||||
for (gpe = 0;
|
||||
gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count);
|
||||
gpe++) {
|
||||
if (acpi_masked_gpes & ((u64)1<<gpe)) {
|
||||
status = acpi_get_gpe_device(gpe, &handle);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
pr_info("Masking GPE 0x%x.\n", gpe);
|
||||
(void)acpi_mask_gpe(handle, gpe, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void acpi_irq_stats_init(void)
|
||||
{
|
||||
acpi_status status;
|
||||
|
|
|
|||
|
|
@ -305,17 +305,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "Dell System XPS L702X"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1204476 */
|
||||
/* https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1416940 */
|
||||
.callback = video_detect_force_native,
|
||||
.ident = "HP Pavilion dv6",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv6 Notebook PC"),
|
||||
},
|
||||
},
|
||||
|
||||
{ },
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue