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/kernel/mca_asm.S | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 18 | ||||
-rw-r--r-- | arch/ia64/kernel/unaligned.c | 3 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 10 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 36 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_channel.c | 6 | ||||
-rw-r--r-- | arch/ia64/sn/pci/pci_dma.c | 4 |
13 files changed, 128 insertions, 103 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/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index 403a80a58c13..60a464bfd9e2 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
@@ -512,7 +512,7 @@ ia64_state_save: | |||
512 | st8 [temp1]=r12 // os_status, default is cold boot | 512 | st8 [temp1]=r12 // os_status, default is cold boot |
513 | mov r6=IA64_MCA_SAME_CONTEXT | 513 | mov r6=IA64_MCA_SAME_CONTEXT |
514 | ;; | 514 | ;; |
515 | st8 [temp1]=r6 // context, default is same context | 515 | st8 [temp2]=r6 // context, default is same context |
516 | 516 | ||
517 | // Save the pt_regs data that is not in minstate. The previous code | 517 | // Save the pt_regs data that is not in minstate. The previous code |
518 | // left regs at sos. | 518 | // left regs at sos. |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index 706b7734e191..6e5eea19fa67 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -71,31 +71,33 @@ static int __init topology_init(void) | |||
71 | int i, err = 0; | 71 | int i, err = 0; |
72 | 72 | ||
73 | #ifdef CONFIG_NUMA | 73 | #ifdef CONFIG_NUMA |
74 | sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); | 74 | sysfs_nodes = kzalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); |
75 | if (!sysfs_nodes) { | 75 | if (!sysfs_nodes) { |
76 | err = -ENOMEM; | 76 | err = -ENOMEM; |
77 | goto out; | 77 | goto out; |
78 | } | 78 | } |
79 | memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES); | ||
80 | 79 | ||
81 | /* MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? */ | 80 | /* |
82 | for_each_online_node(i) | 81 | * MCD - Do we want to register all ONLINE nodes, or all POSSIBLE nodes? |
82 | */ | ||
83 | for_each_online_node(i) { | ||
83 | if ((err = register_node(&sysfs_nodes[i], i, 0))) | 84 | if ((err = register_node(&sysfs_nodes[i], i, 0))) |
84 | goto out; | 85 | goto out; |
86 | } | ||
85 | #endif | 87 | #endif |
86 | 88 | ||
87 | sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); | 89 | sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); |
88 | if (!sysfs_cpus) { | 90 | if (!sysfs_cpus) { |
89 | err = -ENOMEM; | 91 | err = -ENOMEM; |
90 | goto out; | 92 | goto out; |
91 | } | 93 | } |
92 | memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS); | ||
93 | 94 | ||
94 | for_each_present_cpu(i) | 95 | for_each_present_cpu(i) { |
95 | if((err = arch_register_cpu(i))) | 96 | if((err = arch_register_cpu(i))) |
96 | goto out; | 97 | goto out; |
98 | } | ||
97 | out: | 99 | out: |
98 | return err; | 100 | return err; |
99 | } | 101 | } |
100 | 102 | ||
101 | __initcall(topology_init); | 103 | subsys_initcall(topology_init); |
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c index 43b45b65ee5a..f9e0ae936d1a 100644 --- a/arch/ia64/kernel/unaligned.c +++ b/arch/ia64/kernel/unaligned.c | |||
@@ -1283,8 +1283,9 @@ within_logging_rate_limit (void) | |||
1283 | 1283 | ||
1284 | if (jiffies - last_time > 5*HZ) | 1284 | if (jiffies - last_time > 5*HZ) |
1285 | count = 0; | 1285 | count = 0; |
1286 | if (++count < 5) { | 1286 | if (count < 5) { |
1287 | last_time = jiffies; | 1287 | last_time = jiffies; |
1288 | count++; | ||
1288 | return 1; | 1289 | return 1; |
1289 | } | 1290 | } |
1290 | return 0; | 1291 | return 0; |
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; |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 00700f7e6837..a4c78152b336 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/nodemask.h> | 10 | #include <linux/nodemask.h> |
11 | #include <asm/sn/types.h> | 11 | #include <asm/sn/types.h> |
12 | #include <asm/sn/addrs.h> | 12 | #include <asm/sn/addrs.h> |
13 | #include <asm/sn/sn_feature_sets.h> | ||
13 | #include <asm/sn/geo.h> | 14 | #include <asm/sn/geo.h> |
14 | #include <asm/sn/io.h> | 15 | #include <asm/sn/io.h> |
15 | #include <asm/sn/pcibr_provider.h> | 16 | #include <asm/sn/pcibr_provider.h> |
@@ -173,8 +174,8 @@ sn_pcidev_info_get(struct pci_dev *dev) | |||
173 | */ | 174 | */ |
174 | static u8 war_implemented = 0; | 175 | static u8 war_implemented = 0; |
175 | 176 | ||
176 | static void sn_device_fixup_war(u64 nasid, u64 widget, int device, | 177 | static s64 sn_device_fixup_war(u64 nasid, u64 widget, int device, |
177 | struct sn_flush_device_common *common) | 178 | struct sn_flush_device_common *common) |
178 | { | 179 | { |
179 | struct sn_flush_device_war *war_list; | 180 | struct sn_flush_device_war *war_list; |
180 | struct sn_flush_device_war *dev_entry; | 181 | struct sn_flush_device_war *dev_entry; |
@@ -198,8 +199,9 @@ static void sn_device_fixup_war(u64 nasid, u64 widget, int device, | |||
198 | 199 | ||
199 | dev_entry = war_list + device; | 200 | dev_entry = war_list + device; |
200 | memcpy(common,dev_entry, sizeof(*common)); | 201 | memcpy(common,dev_entry, sizeof(*common)); |
201 | |||
202 | kfree(war_list); | 202 | kfree(war_list); |
203 | |||
204 | return isrv.status; | ||
203 | } | 205 | } |
204 | 206 | ||
205 | /* | 207 | /* |
@@ -279,23 +281,21 @@ static void sn_fixup_ionodes(void) | |||
279 | memset(dev_entry->common, 0x0, sizeof(struct | 281 | memset(dev_entry->common, 0x0, sizeof(struct |
280 | sn_flush_device_common)); | 282 | sn_flush_device_common)); |
281 | 283 | ||
282 | status = sal_get_device_dmaflush_list(nasid, | 284 | if (sn_prom_feature_available( |
283 | widget, | 285 | PRF_DEVICE_FLUSH_LIST)) |
284 | device, | 286 | status = sal_get_device_dmaflush_list( |
287 | nasid, | ||
288 | widget, | ||
289 | device, | ||
285 | (u64)(dev_entry->common)); | 290 | (u64)(dev_entry->common)); |
286 | if (status) { | 291 | else |
287 | if (sn_sal_rev() < 0x0450) { | 292 | status = sn_device_fixup_war(nasid, |
288 | /* shortlived WAR for older | 293 | widget, |
289 | * PROM images | 294 | device, |
290 | */ | ||
291 | sn_device_fixup_war(nasid, | ||
292 | widget, | ||
293 | device, | ||
294 | dev_entry->common); | 295 | dev_entry->common); |
295 | } | 296 | if (status != SALRET_OK) |
296 | else | 297 | panic("SAL call failed: %s\n", |
297 | BUG(); | 298 | ia64_sal_strerror(status)); |
298 | } | ||
299 | 299 | ||
300 | spin_lock_init(&dev_entry->sfdl_flush_lock); | 300 | spin_lock_init(&dev_entry->sfdl_flush_lock); |
301 | } | 301 | } |
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c index 8d950c778bb6..36e5437a0fb6 100644 --- a/arch/ia64/sn/kernel/xpc_channel.c +++ b/arch/ia64/sn/kernel/xpc_channel.c | |||
@@ -447,7 +447,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
447 | 447 | ||
448 | nbytes = nentries * ch->msg_size; | 448 | nbytes = nentries * ch->msg_size; |
449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 449 | ch->local_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
450 | (GFP_KERNEL | GFP_DMA), | 450 | GFP_KERNEL, |
451 | &ch->local_msgqueue_base); | 451 | &ch->local_msgqueue_base); |
452 | if (ch->local_msgqueue == NULL) { | 452 | if (ch->local_msgqueue == NULL) { |
453 | continue; | 453 | continue; |
@@ -455,7 +455,7 @@ xpc_allocate_local_msgqueue(struct xpc_channel *ch) | |||
455 | memset(ch->local_msgqueue, 0, nbytes); | 455 | memset(ch->local_msgqueue, 0, nbytes); |
456 | 456 | ||
457 | nbytes = nentries * sizeof(struct xpc_notify); | 457 | nbytes = nentries * sizeof(struct xpc_notify); |
458 | ch->notify_queue = kmalloc(nbytes, (GFP_KERNEL | GFP_DMA)); | 458 | ch->notify_queue = kmalloc(nbytes, GFP_KERNEL); |
459 | if (ch->notify_queue == NULL) { | 459 | if (ch->notify_queue == NULL) { |
460 | kfree(ch->local_msgqueue_base); | 460 | kfree(ch->local_msgqueue_base); |
461 | ch->local_msgqueue = NULL; | 461 | ch->local_msgqueue = NULL; |
@@ -502,7 +502,7 @@ xpc_allocate_remote_msgqueue(struct xpc_channel *ch) | |||
502 | 502 | ||
503 | nbytes = nentries * ch->msg_size; | 503 | nbytes = nentries * ch->msg_size; |
504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, | 504 | ch->remote_msgqueue = xpc_kmalloc_cacheline_aligned(nbytes, |
505 | (GFP_KERNEL | GFP_DMA), | 505 | GFP_KERNEL, |
506 | &ch->remote_msgqueue_base); | 506 | &ch->remote_msgqueue_base); |
507 | if (ch->remote_msgqueue == NULL) { | 507 | if (ch->remote_msgqueue == NULL) { |
508 | continue; | 508 | continue; |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 9bf9f23b9a1f..5a36292388eb 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -90,14 +90,14 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size, | |||
90 | */ | 90 | */ |
91 | node = pcibus_to_node(pdev->bus); | 91 | node = pcibus_to_node(pdev->bus); |
92 | if (likely(node >=0)) { | 92 | if (likely(node >=0)) { |
93 | struct page *p = alloc_pages_node(node, GFP_ATOMIC, get_order(size)); | 93 | struct page *p = alloc_pages_node(node, flags, get_order(size)); |
94 | 94 | ||
95 | if (likely(p)) | 95 | if (likely(p)) |
96 | cpuaddr = page_address(p); | 96 | cpuaddr = page_address(p); |
97 | else | 97 | else |
98 | return NULL; | 98 | return NULL; |
99 | } else | 99 | } else |
100 | cpuaddr = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)); | 100 | cpuaddr = (void *)__get_free_pages(flags, get_order(size)); |
101 | 101 | ||
102 | if (unlikely(!cpuaddr)) | 102 | if (unlikely(!cpuaddr)) |
103 | return NULL; | 103 | return NULL; |