diff options
Diffstat (limited to 'arch/ia64')
| -rw-r--r-- | arch/ia64/kernel/Makefile | 5 | ||||
| -rw-r--r-- | arch/ia64/kernel/acpi-ext.c | 22 | ||||
| -rw-r--r-- | arch/ia64/kernel/acpi-processor.c | 67 | ||||
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 6 | ||||
| -rw-r--r-- | arch/ia64/kernel/cpufreq/Makefile | 1 | ||||
| -rw-r--r-- | arch/ia64/kernel/cpufreq/acpi-cpufreq.c | 51 | ||||
| -rw-r--r-- | arch/ia64/pci/pci.c | 10 |
7 files changed, 92 insertions, 70 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 307514f7a282..09a0dbc17fb6 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
| @@ -13,6 +13,11 @@ obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o | |||
| 13 | obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o | 13 | obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o |
| 14 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o | 14 | obj-$(CONFIG_IA64_HP_ZX1) += acpi-ext.o |
| 15 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o | 15 | obj-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += acpi-ext.o |
| 16 | |||
| 17 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | ||
| 18 | obj-y += acpi-processor.o | ||
| 19 | endif | ||
| 20 | |||
| 16 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o | 21 | obj-$(CONFIG_IA64_PALINFO) += palinfo.o |
| 17 | obj-$(CONFIG_IOSAPIC) += iosapic.o | 22 | obj-$(CONFIG_IOSAPIC) += iosapic.o |
| 18 | obj-$(CONFIG_MODULES) += module.o | 23 | obj-$(CONFIG_MODULES) += module.o |
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index 13a5b3b49bf8..4a5574ff007b 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c | |||
| @@ -33,33 +33,33 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context) | |||
| 33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *)context; | 33 | struct acpi_vendor_info *info = (struct acpi_vendor_info *)context; |
| 34 | struct acpi_resource_vendor *vendor; | 34 | struct acpi_resource_vendor *vendor; |
| 35 | struct acpi_vendor_descriptor *descriptor; | 35 | struct acpi_vendor_descriptor *descriptor; |
| 36 | u32 length; | 36 | u32 byte_length; |
| 37 | 37 | ||
| 38 | if (resource->id != ACPI_RSTYPE_VENDOR) | 38 | if (resource->type != ACPI_RESOURCE_TYPE_VENDOR) |
| 39 | return AE_OK; | 39 | return AE_OK; |
| 40 | 40 | ||
| 41 | vendor = (struct acpi_resource_vendor *)&resource->data; | 41 | vendor = (struct acpi_resource_vendor *)&resource->data; |
| 42 | descriptor = (struct acpi_vendor_descriptor *)vendor->reserved; | 42 | descriptor = (struct acpi_vendor_descriptor *)vendor->byte_data; |
| 43 | if (vendor->length <= sizeof(*info->descriptor) || | 43 | if (vendor->byte_length <= sizeof(*info->descriptor) || |
| 44 | descriptor->guid_id != info->descriptor->guid_id || | 44 | descriptor->guid_id != info->descriptor->guid_id || |
| 45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) | 45 | efi_guidcmp(descriptor->guid, info->descriptor->guid)) |
| 46 | return AE_OK; | 46 | return AE_OK; |
| 47 | 47 | ||
| 48 | length = vendor->length - sizeof(struct acpi_vendor_descriptor); | 48 | byte_length = vendor->byte_length - sizeof(struct acpi_vendor_descriptor); |
| 49 | info->data = acpi_os_allocate(length); | 49 | info->data = acpi_os_allocate(byte_length); |
| 50 | if (!info->data) | 50 | if (!info->data) |
| 51 | return AE_NO_MEMORY; | 51 | return AE_NO_MEMORY; |
| 52 | 52 | ||
| 53 | memcpy(info->data, | 53 | memcpy(info->data, |
| 54 | vendor->reserved + sizeof(struct acpi_vendor_descriptor), | 54 | vendor->byte_data + sizeof(struct acpi_vendor_descriptor), |
| 55 | length); | 55 | byte_length); |
| 56 | info->length = length; | 56 | info->length = byte_length; |
| 57 | return AE_CTRL_TERMINATE; | 57 | return AE_CTRL_TERMINATE; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | acpi_status | 60 | acpi_status |
| 61 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, | 61 | acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, |
| 62 | u8 ** data, u32 * length) | 62 | u8 ** data, u32 * byte_length) |
| 63 | { | 63 | { |
| 64 | struct acpi_vendor_info info; | 64 | struct acpi_vendor_info info; |
| 65 | 65 | ||
| @@ -72,7 +72,7 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id, | |||
| 72 | return AE_NOT_FOUND; | 72 | return AE_NOT_FOUND; |
| 73 | 73 | ||
| 74 | *data = info.data; | 74 | *data = info.data; |
| 75 | *length = info.length; | 75 | *byte_length = info.length; |
| 76 | return AE_OK; | 76 | return AE_OK; |
| 77 | } | 77 | } |
| 78 | 78 | ||
diff --git a/arch/ia64/kernel/acpi-processor.c b/arch/ia64/kernel/acpi-processor.c new file mode 100644 index 000000000000..e683630c8ce2 --- /dev/null +++ b/arch/ia64/kernel/acpi-processor.c | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * arch/ia64/kernel/cpufreq/processor.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 Intel Corporation | ||
| 5 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
| 6 | * - Added _PDC for platforms with Intel CPUs | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/kernel.h> | ||
| 10 | #include <linux/module.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/acpi.h> | ||
| 13 | |||
| 14 | #include <acpi/processor.h> | ||
| 15 | #include <asm/acpi.h> | ||
| 16 | |||
| 17 | static void init_intel_pdc(struct acpi_processor *pr) | ||
| 18 | { | ||
| 19 | struct acpi_object_list *obj_list; | ||
| 20 | union acpi_object *obj; | ||
| 21 | u32 *buf; | ||
| 22 | |||
| 23 | /* allocate and initialize pdc. It will be used later. */ | ||
| 24 | obj_list = kmalloc(sizeof(struct acpi_object_list), GFP_KERNEL); | ||
| 25 | if (!obj_list) { | ||
| 26 | printk(KERN_ERR "Memory allocation error\n"); | ||
| 27 | return; | ||
| 28 | } | ||
| 29 | |||
| 30 | obj = kmalloc(sizeof(union acpi_object), GFP_KERNEL); | ||
| 31 | if (!obj) { | ||
| 32 | printk(KERN_ERR "Memory allocation error\n"); | ||
| 33 | kfree(obj_list); | ||
| 34 | return; | ||
| 35 | } | ||
| 36 | |||
| 37 | buf = kmalloc(12, GFP_KERNEL); | ||
| 38 | if (!buf) { | ||
| 39 | printk(KERN_ERR "Memory allocation error\n"); | ||
| 40 | kfree(obj); | ||
| 41 | kfree(obj_list); | ||
| 42 | return; | ||
| 43 | } | ||
| 44 | |||
| 45 | buf[0] = ACPI_PDC_REVISION_ID; | ||
| 46 | buf[1] = 1; | ||
| 47 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SMP; | ||
| 48 | |||
| 49 | obj->type = ACPI_TYPE_BUFFER; | ||
| 50 | obj->buffer.length = 12; | ||
| 51 | obj->buffer.pointer = (u8 *) buf; | ||
| 52 | obj_list->count = 1; | ||
| 53 | obj_list->pointer = obj; | ||
| 54 | pr->pdc = obj_list; | ||
| 55 | |||
| 56 | return; | ||
| 57 | } | ||
| 58 | |||
| 59 | /* Initialize _PDC data based on the CPU vendor */ | ||
| 60 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | ||
| 61 | { | ||
| 62 | pr->pdc = NULL; | ||
| 63 | init_intel_pdc(pr); | ||
| 64 | return; | ||
| 65 | } | ||
| 66 | |||
| 67 | EXPORT_SYMBOL(arch_acpi_processor_init_pdc); | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 9ad94ddf6687..d2702c419cf8 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -567,16 +567,16 @@ void __init acpi_numa_arch_fixup(void) | |||
| 567 | * success: return IRQ number (>=0) | 567 | * success: return IRQ number (>=0) |
| 568 | * failure: return < 0 | 568 | * failure: return < 0 |
| 569 | */ | 569 | */ |
| 570 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 570 | int acpi_register_gsi(u32 gsi, int triggering, int polarity) |
| 571 | { | 571 | { |
| 572 | if (has_8259 && gsi < 16) | 572 | if (has_8259 && gsi < 16) |
| 573 | return isa_irq_to_vector(gsi); | 573 | return isa_irq_to_vector(gsi); |
| 574 | 574 | ||
| 575 | return iosapic_register_intr(gsi, | 575 | return iosapic_register_intr(gsi, |
| 576 | (active_high_low == | 576 | (polarity == |
| 577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : | 577 | ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : |
| 578 | IOSAPIC_POL_LOW, | 578 | IOSAPIC_POL_LOW, |
| 579 | (edge_level == | 579 | (triggering == |
| 580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : | 580 | ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : |
| 581 | IOSAPIC_LEVEL); | 581 | IOSAPIC_LEVEL); |
| 582 | } | 582 | } |
diff --git a/arch/ia64/kernel/cpufreq/Makefile b/arch/ia64/kernel/cpufreq/Makefile index f748d34c02f0..4838f2a57c7a 100644 --- a/arch/ia64/kernel/cpufreq/Makefile +++ b/arch/ia64/kernel/cpufreq/Makefile | |||
| @@ -1 +1,2 @@ | |||
| 1 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += acpi-cpufreq.o | 1 | obj-$(CONFIG_IA64_ACPI_CPUFREQ) += acpi-cpufreq.o |
| 2 | |||
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index da4d5cf80a48..5a1bf815282d 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
| @@ -269,48 +269,6 @@ acpi_cpufreq_verify ( | |||
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | 271 | ||
| 272 | /* | ||
| 273 | * processor_init_pdc - let BIOS know about the SMP capabilities | ||
| 274 | * of this driver | ||
| 275 | * @perf: processor-specific acpi_io_data struct | ||
| 276 | * @cpu: CPU being initialized | ||
| 277 | * | ||
| 278 | * To avoid issues with legacy OSes, some BIOSes require to be informed of | ||
| 279 | * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC | ||
| 280 | * accordingly. Actual call to _PDC is done in driver/acpi/processor.c | ||
| 281 | */ | ||
| 282 | static void | ||
| 283 | processor_init_pdc ( | ||
| 284 | struct acpi_processor_performance *perf, | ||
| 285 | unsigned int cpu, | ||
| 286 | struct acpi_object_list *obj_list | ||
| 287 | ) | ||
| 288 | { | ||
| 289 | union acpi_object *obj; | ||
| 290 | u32 *buf; | ||
| 291 | |||
| 292 | dprintk("processor_init_pdc\n"); | ||
| 293 | |||
| 294 | perf->pdc = NULL; | ||
| 295 | /* Initialize pdc. It will be used later. */ | ||
| 296 | if (!obj_list) | ||
| 297 | return; | ||
| 298 | |||
| 299 | if (!(obj_list->count && obj_list->pointer)) | ||
| 300 | return; | ||
| 301 | |||
| 302 | obj = obj_list->pointer; | ||
| 303 | if ((obj->buffer.length == 12) && obj->buffer.pointer) { | ||
| 304 | buf = (u32 *)obj->buffer.pointer; | ||
| 305 | buf[0] = ACPI_PDC_REVISION_ID; | ||
| 306 | buf[1] = 1; | ||
| 307 | buf[2] = ACPI_PDC_EST_CAPABILITY_SMP; | ||
| 308 | perf->pdc = obj_list; | ||
| 309 | } | ||
| 310 | return; | ||
| 311 | } | ||
| 312 | |||
| 313 | |||
| 314 | static int | 272 | static int |
| 315 | acpi_cpufreq_cpu_init ( | 273 | acpi_cpufreq_cpu_init ( |
| 316 | struct cpufreq_policy *policy) | 274 | struct cpufreq_policy *policy) |
| @@ -320,14 +278,7 @@ acpi_cpufreq_cpu_init ( | |||
| 320 | struct cpufreq_acpi_io *data; | 278 | struct cpufreq_acpi_io *data; |
| 321 | unsigned int result = 0; | 279 | unsigned int result = 0; |
| 322 | 280 | ||
| 323 | union acpi_object arg0 = {ACPI_TYPE_BUFFER}; | ||
| 324 | u32 arg0_buf[3]; | ||
| 325 | struct acpi_object_list arg_list = {1, &arg0}; | ||
| 326 | |||
| 327 | dprintk("acpi_cpufreq_cpu_init\n"); | 281 | dprintk("acpi_cpufreq_cpu_init\n"); |
| 328 | /* setup arg_list for _PDC settings */ | ||
| 329 | arg0.buffer.length = 12; | ||
| 330 | arg0.buffer.pointer = (u8 *) arg0_buf; | ||
| 331 | 282 | ||
| 332 | data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); | 283 | data = kmalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); |
| 333 | if (!data) | 284 | if (!data) |
| @@ -337,9 +288,7 @@ acpi_cpufreq_cpu_init ( | |||
| 337 | 288 | ||
| 338 | acpi_io_data[cpu] = data; | 289 | acpi_io_data[cpu] = data; |
| 339 | 290 | ||
| 340 | processor_init_pdc(&data->acpi_data, cpu, &arg_list); | ||
| 341 | result = acpi_processor_register_performance(&data->acpi_data, cpu); | 291 | result = acpi_processor_register_performance(&data->acpi_data, cpu); |
| 342 | data->acpi_data.pdc = NULL; | ||
| 343 | 292 | ||
| 344 | if (result) | 293 | if (result) |
| 345 | goto err_free; | 294 | goto err_free; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index d27ecdcb6fca..0b30ca006286 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -193,12 +193,12 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) | |||
| 193 | goto free_resource; | 193 | goto free_resource; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | min = addr->min_address_range; | 196 | min = addr->minimum; |
| 197 | max = min + addr->address_length - 1; | 197 | max = min + addr->address_length - 1; |
| 198 | if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION) | 198 | if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION) |
| 199 | sparse = 1; | 199 | sparse = 1; |
| 200 | 200 | ||
| 201 | space_nr = new_space(addr->address_translation_offset, sparse); | 201 | space_nr = new_space(addr->translation_offset, sparse); |
| 202 | if (space_nr == ~0) | 202 | if (space_nr == ~0) |
| 203 | goto free_name; | 203 | goto free_name; |
| 204 | 204 | ||
| @@ -285,7 +285,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
| 285 | if (addr.resource_type == ACPI_MEMORY_RANGE) { | 285 | if (addr.resource_type == ACPI_MEMORY_RANGE) { |
| 286 | flags = IORESOURCE_MEM; | 286 | flags = IORESOURCE_MEM; |
| 287 | root = &iomem_resource; | 287 | root = &iomem_resource; |
| 288 | offset = addr.address_translation_offset; | 288 | offset = addr.translation_offset; |
| 289 | } else if (addr.resource_type == ACPI_IO_RANGE) { | 289 | } else if (addr.resource_type == ACPI_IO_RANGE) { |
| 290 | flags = IORESOURCE_IO; | 290 | flags = IORESOURCE_IO; |
| 291 | root = &ioport_resource; | 291 | root = &ioport_resource; |
| @@ -298,7 +298,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) | |||
| 298 | window = &info->controller->window[info->controller->windows++]; | 298 | window = &info->controller->window[info->controller->windows++]; |
| 299 | window->resource.name = info->name; | 299 | window->resource.name = info->name; |
| 300 | window->resource.flags = flags; | 300 | window->resource.flags = flags; |
| 301 | window->resource.start = addr.min_address_range + offset; | 301 | window->resource.start = addr.minimum + offset; |
| 302 | window->resource.end = window->resource.start + addr.address_length - 1; | 302 | window->resource.end = window->resource.start + addr.address_length - 1; |
| 303 | window->resource.child = NULL; | 303 | window->resource.child = NULL; |
| 304 | window->offset = offset; | 304 | window->offset = offset; |
