mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge schedutil governor updates for v4.10.
This commit is contained in:
commit
2bf3b685a3
1198 changed files with 13125 additions and 7901 deletions
|
|
@ -122,7 +122,7 @@ static int acpi_apd_create_device(struct acpi_device *adev,
|
|||
int ret;
|
||||
|
||||
if (!dev_desc) {
|
||||
pdev = acpi_create_platform_device(adev);
|
||||
pdev = acpi_create_platform_device(adev, NULL);
|
||||
return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1;
|
||||
}
|
||||
|
||||
|
|
@ -139,14 +139,8 @@ static int acpi_apd_create_device(struct acpi_device *adev,
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
if (dev_desc->properties) {
|
||||
ret = device_add_properties(&adev->dev, dev_desc->properties);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
adev->driver_data = pdata;
|
||||
pdev = acpi_create_platform_device(adev);
|
||||
pdev = acpi_create_platform_device(adev, dev_desc->properties);
|
||||
if (!IS_ERR_OR_NULL(pdev))
|
||||
return 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
|
|||
|
||||
dev_desc = (const struct lpss_device_desc *)id->driver_data;
|
||||
if (!dev_desc) {
|
||||
pdev = acpi_create_platform_device(adev);
|
||||
pdev = acpi_create_platform_device(adev, NULL);
|
||||
return IS_ERR_OR_NULL(pdev) ? PTR_ERR(pdev) : 1;
|
||||
}
|
||||
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
|
||||
|
|
@ -451,14 +451,8 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
if (dev_desc->properties) {
|
||||
ret = device_add_properties(&adev->dev, dev_desc->properties);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
adev->driver_data = pdata;
|
||||
pdev = acpi_create_platform_device(adev);
|
||||
pdev = acpi_create_platform_device(adev, dev_desc->properties);
|
||||
if (!IS_ERR_OR_NULL(pdev)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ static void acpi_platform_fill_resource(struct acpi_device *adev,
|
|||
/**
|
||||
* acpi_create_platform_device - Create platform device for ACPI device node
|
||||
* @adev: ACPI device node to create a platform device for.
|
||||
* @properties: Optional collection of build-in properties.
|
||||
*
|
||||
* Check if the given @adev can be represented as a platform device and, if
|
||||
* that's the case, create and register a platform device, populate its common
|
||||
|
|
@ -57,7 +58,8 @@ static void acpi_platform_fill_resource(struct acpi_device *adev,
|
|||
*
|
||||
* Name of the platform device will be the same as @adev's.
|
||||
*/
|
||||
struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
|
||||
struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
|
||||
struct property_entry *properties)
|
||||
{
|
||||
struct platform_device *pdev = NULL;
|
||||
struct platform_device_info pdevinfo;
|
||||
|
|
@ -106,6 +108,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
|
|||
pdevinfo.res = resources;
|
||||
pdevinfo.num_res = count;
|
||||
pdevinfo.fwnode = acpi_fwnode_handle(adev);
|
||||
pdevinfo.properties = properties;
|
||||
|
||||
if (acpi_dma_supported(adev))
|
||||
pdevinfo.dma_mask = DMA_BIT_MASK(32);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "acdispat.h"
|
||||
#include "acnamesp.h"
|
||||
#include "actables.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_DISPATCHER
|
||||
ACPI_MODULE_NAME("dsinit")
|
||||
|
|
@ -214,23 +215,17 @@ acpi_ds_initialize_objects(u32 table_index,
|
|||
|
||||
/* Walk entire namespace from the supplied root */
|
||||
|
||||
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't use acpi_walk_namespace since we do not want to acquire
|
||||
* the namespace reader lock.
|
||||
*/
|
||||
status =
|
||||
acpi_ns_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
|
||||
ACPI_NS_WALK_UNLOCK, acpi_ds_init_one_object,
|
||||
NULL, &info, NULL);
|
||||
0, acpi_ds_init_one_object, NULL, &info,
|
||||
NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace"));
|
||||
}
|
||||
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
||||
|
||||
status = acpi_get_table_by_index(table_index, &table);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
|
|
|
|||
|
|
@ -99,14 +99,11 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
"Method auto-serialization parse [%4.4s] %p\n",
|
||||
acpi_ut_get_node_name(node), node));
|
||||
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
/* Create/Init a root op for the method parse tree */
|
||||
|
||||
op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start);
|
||||
if (!op) {
|
||||
status = AE_NO_MEMORY;
|
||||
goto unlock;
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
acpi_ps_set_name(op, node->name.integer);
|
||||
|
|
@ -118,8 +115,7 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL);
|
||||
if (!walk_state) {
|
||||
acpi_ps_free_op(op);
|
||||
status = AE_NO_MEMORY;
|
||||
goto unlock;
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
status = acpi_ds_init_aml_walk(walk_state, op, node,
|
||||
|
|
@ -138,8 +134,6 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
status = acpi_ps_parse_aml(walk_state);
|
||||
|
||||
acpi_ps_delete_parse_tree(op);
|
||||
unlock:
|
||||
acpi_ex_exit_interpreter();
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
|
@ -730,26 +724,6 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
|
|||
|
||||
acpi_ds_method_data_delete_all(walk_state);
|
||||
|
||||
/*
|
||||
* If method is serialized, release the mutex and restore the
|
||||
* current sync level for this thread
|
||||
*/
|
||||
if (method_desc->method.mutex) {
|
||||
|
||||
/* Acquisition Depth handles recursive calls */
|
||||
|
||||
method_desc->method.mutex->mutex.acquisition_depth--;
|
||||
if (!method_desc->method.mutex->mutex.acquisition_depth) {
|
||||
walk_state->thread->current_sync_level =
|
||||
method_desc->method.mutex->mutex.
|
||||
original_sync_level;
|
||||
|
||||
acpi_os_release_mutex(method_desc->method.
|
||||
mutex->mutex.os_mutex);
|
||||
method_desc->method.mutex->mutex.thread_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete any namespace objects created anywhere within the
|
||||
* namespace by the execution of this method. Unless:
|
||||
|
|
@ -786,6 +760,26 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
|
|||
~ACPI_METHOD_MODIFIED_NAMESPACE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If method is serialized, release the mutex and restore the
|
||||
* current sync level for this thread
|
||||
*/
|
||||
if (method_desc->method.mutex) {
|
||||
|
||||
/* Acquisition Depth handles recursive calls */
|
||||
|
||||
method_desc->method.mutex->mutex.acquisition_depth--;
|
||||
if (!method_desc->method.mutex->mutex.acquisition_depth) {
|
||||
walk_state->thread->current_sync_level =
|
||||
method_desc->method.mutex->mutex.
|
||||
original_sync_level;
|
||||
|
||||
acpi_os_release_mutex(method_desc->method.
|
||||
mutex->mutex.os_mutex);
|
||||
method_desc->method.mutex->mutex.thread_id = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Decrement the thread count on the method */
|
||||
|
|
|
|||
|
|
@ -607,11 +607,9 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
|
|||
}
|
||||
}
|
||||
|
||||
acpi_ex_exit_interpreter();
|
||||
status =
|
||||
acpi_ev_initialize_region
|
||||
(acpi_ns_get_attached_object(node), FALSE);
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
if (ACPI_FAILURE(status)) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include "accommon.h"
|
||||
#include "acevents.h"
|
||||
#include "acnamesp.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
#define _COMPONENT ACPI_EVENTS
|
||||
ACPI_MODULE_NAME("evrgnini")
|
||||
|
|
@ -597,9 +598,11 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
|
|||
}
|
||||
}
|
||||
|
||||
acpi_ex_exit_interpreter();
|
||||
status =
|
||||
acpi_ev_execute_reg_method(region_obj,
|
||||
ACPI_REG_CONNECT);
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
if (acpi_ns_locked) {
|
||||
status =
|
||||
|
|
|
|||
|
|
@ -137,7 +137,9 @@ unlock:
|
|||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||
"**** Begin Table Object Initialization\n"));
|
||||
|
||||
acpi_ex_enter_interpreter();
|
||||
status = acpi_ds_initialize_objects(table_index, node);
|
||||
acpi_ex_exit_interpreter();
|
||||
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||
"**** Completed Table Object Initialization\n"));
|
||||
|
|
|
|||
|
|
@ -662,7 +662,7 @@ static int ghes_proc(struct ghes *ghes)
|
|||
ghes_do_proc(ghes, ghes->estatus);
|
||||
out:
|
||||
ghes_clear_estatus(ghes);
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void ghes_add_timer(struct ghes *ghes)
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ static int int340x_thermal_handler_attach(struct acpi_device *adev,
|
|||
const struct acpi_device_id *id)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_INT340X_THERMAL))
|
||||
acpi_create_platform_device(adev);
|
||||
acpi_create_platform_device(adev, NULL);
|
||||
/* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */
|
||||
else if (IS_ENABLED(CONFIG_INTEL_SOC_DTS_THERMAL) &&
|
||||
id->driver_data == INT3401_DEVICE)
|
||||
acpi_create_platform_device(adev);
|
||||
acpi_create_platform_device(adev, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ struct acpi_pci_link {
|
|||
|
||||
static LIST_HEAD(acpi_link_list);
|
||||
static DEFINE_MUTEX(acpi_link_lock);
|
||||
static int sci_irq = -1, sci_penalty;
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
PCI Link Device Management
|
||||
|
|
@ -496,25 +497,13 @@ static int acpi_irq_get_penalty(int irq)
|
|||
{
|
||||
int penalty = 0;
|
||||
|
||||
/*
|
||||
* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
|
||||
* with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
|
||||
* use for PCI IRQs.
|
||||
*/
|
||||
if (irq == acpi_gbl_FADT.sci_interrupt) {
|
||||
u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;
|
||||
|
||||
if (type != IRQ_TYPE_LEVEL_LOW)
|
||||
penalty += PIRQ_PENALTY_ISA_ALWAYS;
|
||||
else
|
||||
penalty += PIRQ_PENALTY_PCI_USING;
|
||||
}
|
||||
if (irq == sci_irq)
|
||||
penalty += sci_penalty;
|
||||
|
||||
if (irq < ACPI_MAX_ISA_IRQS)
|
||||
return penalty + acpi_isa_irq_penalty[irq];
|
||||
|
||||
penalty += acpi_irq_pci_sharing_penalty(irq);
|
||||
return penalty;
|
||||
return penalty + acpi_irq_pci_sharing_penalty(irq);
|
||||
}
|
||||
|
||||
int __init acpi_irq_penalty_init(void)
|
||||
|
|
@ -619,6 +608,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
|
|||
acpi_device_bid(link->device));
|
||||
return -ENODEV;
|
||||
} else {
|
||||
if (link->irq.active < ACPI_MAX_ISA_IRQS)
|
||||
acpi_isa_irq_penalty[link->irq.active] +=
|
||||
PIRQ_PENALTY_PCI_USING;
|
||||
|
||||
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
|
||||
acpi_device_name(link->device),
|
||||
acpi_device_bid(link->device), link->irq.active);
|
||||
|
|
@ -849,7 +842,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
|
|||
continue;
|
||||
|
||||
if (used)
|
||||
new_penalty = acpi_irq_get_penalty(irq) +
|
||||
new_penalty = acpi_isa_irq_penalty[irq] +
|
||||
PIRQ_PENALTY_ISA_USED;
|
||||
else
|
||||
new_penalty = 0;
|
||||
|
|
@ -871,7 +864,7 @@ static int __init acpi_irq_penalty_update(char *str, int used)
|
|||
void acpi_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
|
||||
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
|
||||
acpi_isa_irq_penalty[irq] +=
|
||||
(active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
|
||||
}
|
||||
|
||||
|
|
@ -881,6 +874,17 @@ bool acpi_isa_irq_available(int irq)
|
|||
acpi_irq_get_penalty(irq) < PIRQ_PENALTY_ISA_ALWAYS);
|
||||
}
|
||||
|
||||
void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
|
||||
{
|
||||
sci_irq = irq;
|
||||
|
||||
if (trigger == ACPI_MADT_TRIGGER_LEVEL &&
|
||||
polarity == ACPI_MADT_POLARITY_ACTIVE_LOW)
|
||||
sci_penalty = PIRQ_PENALTY_PCI_USING;
|
||||
else
|
||||
sci_penalty = PIRQ_PENALTY_ISA_ALWAYS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Over-ride default table to reserve additional IRQs for use by ISA
|
||||
* e.g. acpi_irq_isa=5
|
||||
|
|
|
|||
|
|
@ -1734,7 +1734,7 @@ static void acpi_default_enumeration(struct acpi_device *device)
|
|||
&is_spi_i2c_slave);
|
||||
acpi_dev_free_resource_list(&resource_list);
|
||||
if (!is_spi_i2c_slave) {
|
||||
acpi_create_platform_device(device);
|
||||
acpi_create_platform_device(device, NULL);
|
||||
acpi_device_set_enumerated(device);
|
||||
} else {
|
||||
blocking_notifier_call_chain(&acpi_reconfig_chain,
|
||||
|
|
|
|||
Loading…
Reference in a new issue