Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298034
b: refs/heads/master
c: 3e80acd
h: refs/heads/master
v: v3
  • Loading branch information
Julian Anastasov authored and Len Brown committed Mar 21, 2012
1 parent 9ad6e68 commit af1cce4
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37239978778806ecba54da60676abb46870acebb
refs/heads/master: 3e80acd1af40fcd91a200b0416a7616b20c5d647
3 changes: 1 addition & 2 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu)
kfree(buffer.pointer);
buffer.length = ACPI_ALLOCATE_BUFFER;
buffer.pointer = NULL;
lapic = NULL;

if (!alloc_cpumask_var(&tmp_map, GFP_KERNEL))
goto out;
Expand All @@ -651,7 +650,7 @@ static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu)
goto free_tmp_map;

cpumask_copy(tmp_map, cpu_present_mask);
acpi_register_lapic(physid, ACPI_MADT_ENABLED);
acpi_register_lapic(physid, lapic->lapic_flags & ACPI_MADT_ENABLED);

/*
* If mp_register_lapic successfully generates a new logical cpu
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/acpica/tbfadt.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,6 @@ static void acpi_tb_convert_fadt(void)
u32 address32;
u32 i;

/* Update the local FADT table header length */

acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);

/*
* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary.
* Later code will always use the X 64-bit field. Also, check for an
Expand Down Expand Up @@ -408,6 +404,10 @@ static void acpi_tb_convert_fadt(void)
acpi_gbl_FADT.boot_flags = 0;
}

/* Update the local FADT table header length */

acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt);

/*
* Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X"
* generic address structures as necessary. Later code will always use
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ static int suspend_nvs_register(unsigned long start, unsigned long size)
{
struct nvs_page *entry, *next;

pr_info("PM: Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
start, start + size - 1, size);
pr_info("PM: Registering ACPI NVS region at %lx (%ld bytes)\n",
start, size);

while (size > 0) {
unsigned int nr_bytes;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
unsigned long pfn;

pfn = pg_off >> PAGE_SHIFT;
if (should_use_kmap(pfn))
if (page_is_ram(pfn))
kunmap(pfn_to_page(pfn));
else
iounmap(vaddr);
Expand Down
14 changes: 4 additions & 10 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
return -ENOMEM;

if (!zalloc_cpumask_var(&pr->throttling.shared_cpu_map, GFP_KERNEL)) {
result = -ENOMEM;
goto err_free_pr;
kfree(pr);
return -ENOMEM;
}

pr->handle = device->handle;
Expand Down Expand Up @@ -576,7 +576,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
dev = get_cpu_device(pr->id);
if (sysfs_create_link(&device->dev.kobj, &dev->kobj, "sysdev")) {
result = -EFAULT;
goto err_clear_processor;
goto err_free_cpumask;
}

/*
Expand All @@ -594,15 +594,9 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)

err_remove_sysfs:
sysfs_remove_link(&device->dev.kobj, "sysdev");
err_clear_processor:
/*
* processor_device_array is not cleared to allow checks for buggy BIOS
*/
per_cpu(processors, pr->id) = NULL;
err_free_cpumask:
free_cpumask_var(pr->throttling.shared_cpu_map);
err_free_pr:
kfree(pr);

return result;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
* to make the code that updates C-States be called once.
*/

if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
if (smp_processor_id() == 0 &&
cpuidle_get_driver() == &acpi_idle_driver) {

cpuidle_pause_and_lock();
/* Protect against cpu-hotplug */
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,15 +880,18 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
int j;

device->power.flags.power_resources = 1;
ps->flags.valid = 1;
for (j = 0; j < ps->resources.count; j++)
acpi_bus_add_power_resource(ps->resources.handles[j]);
}

/* Evaluate "_PSx" to see if we can do explicit sets */
object_name[2] = 'S';
status = acpi_get_handle(device->handle, object_name, &handle);
if (ACPI_SUCCESS(status))
if (ACPI_SUCCESS(status)) {
ps->flags.explicit_set = 1;
ps->flags.valid = 1;
}

/* State is valid if we have some power control */
if (ps->resources.count || ps->flags.explicit_set)
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,9 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp)
{
struct acpi_device *acpi = to_acpi_device(dev);
struct pnp_dev *pnp = _pnp;
struct device *physical_device;

physical_device = acpi_get_physical_device(acpi->handle);
if (physical_device)
put_device(physical_device);

/* true means it matched */
return !physical_device
return !acpi_get_physical_device(acpi->handle)
&& compare_pnp_id(pnp->id, acpi_device_hid(acpi));
}

Expand Down

0 comments on commit af1cce4

Please sign in to comment.