diff options
Diffstat (limited to 'arch/ia64')
33 files changed, 419 insertions, 333 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 199eeaf0f4e3..845cd0902a50 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -194,7 +194,6 @@ config IA64_L1_CACHE_SHIFT | |||
194 | default "7" if MCKINLEY | 194 | default "7" if MCKINLEY |
195 | default "6" if ITANIUM | 195 | default "6" if ITANIUM |
196 | 196 | ||
197 | # align cache-sensitive data to 64 bytes | ||
198 | config IA64_CYCLONE | 197 | config IA64_CYCLONE |
199 | bool "Cyclone (EXA) Time Source support" | 198 | bool "Cyclone (EXA) Time Source support" |
200 | help | 199 | help |
@@ -374,6 +373,9 @@ config IA64_PALINFO | |||
374 | To use this option, you have to ensure that the "/proc file system | 373 | To use this option, you have to ensure that the "/proc file system |
375 | support" (CONFIG_PROC_FS) is enabled, too. | 374 | support" (CONFIG_PROC_FS) is enabled, too. |
376 | 375 | ||
376 | config SGI_SN | ||
377 | def_bool y if (IA64_SGI_SN2 || IA64_GENERIC) | ||
378 | |||
377 | source "drivers/firmware/Kconfig" | 379 | source "drivers/firmware/Kconfig" |
378 | 380 | ||
379 | source "fs/Kconfig.binfmt" | 381 | source "fs/Kconfig.binfmt" |
diff --git a/arch/ia64/dig/setup.c b/arch/ia64/dig/setup.c index d58003f1ad02..c9104bfff667 100644 --- a/arch/ia64/dig/setup.c +++ b/arch/ia64/dig/setup.c | |||
@@ -25,16 +25,6 @@ | |||
25 | #include <asm/machvec.h> | 25 | #include <asm/machvec.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | 27 | ||
28 | /* | ||
29 | * This is here so we can use the CMOS detection in ide-probe.c to | ||
30 | * determine what drives are present. In theory, we don't need this | ||
31 | * as the auto-detection could be done via ide-probe.c:do_probe() but | ||
32 | * in practice that would be much slower, which is painful when | ||
33 | * running in the simulator. Note that passing zeroes in DRIVE_INFO | ||
34 | * is sufficient (the IDE driver will autodetect the drive geometry). | ||
35 | */ | ||
36 | char drive_info[4*16]; | ||
37 | |||
38 | void __init | 28 | void __init |
39 | dig_setup (char **cmdline_p) | 29 | dig_setup (char **cmdline_p) |
40 | { | 30 | { |
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/efi.c b/arch/ia64/kernel/efi.c index c485a3b32ba8..9990320b6f9a 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -410,24 +410,16 @@ efi_init (void) | |||
410 | efi_config_table_t *config_tables; | 410 | efi_config_table_t *config_tables; |
411 | efi_char16_t *c16; | 411 | efi_char16_t *c16; |
412 | u64 efi_desc_size; | 412 | u64 efi_desc_size; |
413 | char *cp, *end, vendor[100] = "unknown"; | 413 | char *cp, vendor[100] = "unknown"; |
414 | extern char saved_command_line[]; | 414 | extern char saved_command_line[]; |
415 | int i; | 415 | int i; |
416 | 416 | ||
417 | /* it's too early to be able to use the standard kernel command line support... */ | 417 | /* it's too early to be able to use the standard kernel command line support... */ |
418 | for (cp = saved_command_line; *cp; ) { | 418 | for (cp = saved_command_line; *cp; ) { |
419 | if (memcmp(cp, "mem=", 4) == 0) { | 419 | if (memcmp(cp, "mem=", 4) == 0) { |
420 | cp += 4; | 420 | mem_limit = memparse(cp + 4, &cp); |
421 | mem_limit = memparse(cp, &end); | ||
422 | if (end != cp) | ||
423 | break; | ||
424 | cp = end; | ||
425 | } else if (memcmp(cp, "max_addr=", 9) == 0) { | 421 | } else if (memcmp(cp, "max_addr=", 9) == 0) { |
426 | cp += 9; | 422 | max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp)); |
427 | max_addr = GRANULEROUNDDOWN(memparse(cp, &end)); | ||
428 | if (end != cp) | ||
429 | break; | ||
430 | cp = end; | ||
431 | } else { | 423 | } else { |
432 | while (*cp != ' ' && *cp) | 424 | while (*cp != ' ' && *cp) |
433 | ++cp; | 425 | ++cp; |
@@ -458,7 +450,7 @@ efi_init (void) | |||
458 | /* Show what we know for posterity */ | 450 | /* Show what we know for posterity */ |
459 | c16 = __va(efi.systab->fw_vendor); | 451 | c16 = __va(efi.systab->fw_vendor); |
460 | if (c16) { | 452 | if (c16) { |
461 | for (i = 0;i < (int) sizeof(vendor) && *c16; ++i) | 453 | for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i) |
462 | vendor[i] = *c16++; | 454 | vendor[i] = *c16++; |
463 | vendor[i] = '\0'; | 455 | vendor[i] = '\0'; |
464 | } | 456 | } |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index fbc7ea35dd57..f1778a84ea61 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -352,6 +352,7 @@ start_ap: | |||
352 | mov ar.rsc=0 // place RSE in enforced lazy mode | 352 | mov ar.rsc=0 // place RSE in enforced lazy mode |
353 | ;; | 353 | ;; |
354 | loadrs // clear the dirty partition | 354 | loadrs // clear the dirty partition |
355 | mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base | ||
355 | ;; | 356 | ;; |
356 | mov ar.bspstore=r2 // establish the new RSE stack | 357 | mov ar.bspstore=r2 // establish the new RSE stack |
357 | ;; | 358 | ;; |
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/sal.c b/arch/ia64/kernel/sal.c index acc0f132f86c..056f7a6eedc7 100644 --- a/arch/ia64/kernel/sal.c +++ b/arch/ia64/kernel/sal.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | 16 | ||
17 | #include <asm/delay.h> | ||
17 | #include <asm/page.h> | 18 | #include <asm/page.h> |
18 | #include <asm/sal.h> | 19 | #include <asm/sal.h> |
19 | #include <asm/pal.h> | 20 | #include <asm/pal.h> |
@@ -214,6 +215,78 @@ chk_nointroute_opt(void) | |||
214 | static void __init sal_desc_ap_wakeup(void *p) { } | 215 | static void __init sal_desc_ap_wakeup(void *p) { } |
215 | #endif | 216 | #endif |
216 | 217 | ||
218 | /* | ||
219 | * HP rx5670 firmware polls for interrupts during SAL_CACHE_FLUSH by reading | ||
220 | * cr.ivr, but it never writes cr.eoi. This leaves any interrupt marked as | ||
221 | * "in-service" and masks other interrupts of equal or lower priority. | ||
222 | * | ||
223 | * HP internal defect reports: F1859, F2775, F3031. | ||
224 | */ | ||
225 | static int sal_cache_flush_drops_interrupts; | ||
226 | |||
227 | static void __init | ||
228 | check_sal_cache_flush (void) | ||
229 | { | ||
230 | unsigned long flags, itv; | ||
231 | int cpu; | ||
232 | u64 vector; | ||
233 | |||
234 | cpu = get_cpu(); | ||
235 | local_irq_save(flags); | ||
236 | |||
237 | /* | ||
238 | * Schedule a timer interrupt, wait until it's reported, and see if | ||
239 | * SAL_CACHE_FLUSH drops it. | ||
240 | */ | ||
241 | itv = ia64_get_itv(); | ||
242 | BUG_ON((itv & (1 << 16)) == 0); | ||
243 | |||
244 | ia64_set_itv(IA64_TIMER_VECTOR); | ||
245 | ia64_set_itm(ia64_get_itc() + 1000); | ||
246 | |||
247 | while (!ia64_get_irr(IA64_TIMER_VECTOR)) | ||
248 | cpu_relax(); | ||
249 | |||
250 | ia64_sal_cache_flush(3); | ||
251 | |||
252 | if (ia64_get_irr(IA64_TIMER_VECTOR)) { | ||
253 | vector = ia64_get_ivr(); | ||
254 | ia64_eoi(); | ||
255 | WARN_ON(vector != IA64_TIMER_VECTOR); | ||
256 | } else { | ||
257 | sal_cache_flush_drops_interrupts = 1; | ||
258 | printk(KERN_ERR "SAL: SAL_CACHE_FLUSH drops interrupts; " | ||
259 | "PAL_CACHE_FLUSH will be used instead\n"); | ||
260 | ia64_eoi(); | ||
261 | } | ||
262 | |||
263 | ia64_set_itv(itv); | ||
264 | local_irq_restore(flags); | ||
265 | put_cpu(); | ||
266 | } | ||
267 | |||
268 | s64 | ||
269 | ia64_sal_cache_flush (u64 cache_type) | ||
270 | { | ||
271 | struct ia64_sal_retval isrv; | ||
272 | |||
273 | if (sal_cache_flush_drops_interrupts) { | ||
274 | unsigned long flags; | ||
275 | u64 progress; | ||
276 | s64 rc; | ||
277 | |||
278 | progress = 0; | ||
279 | local_irq_save(flags); | ||
280 | rc = ia64_pal_cache_flush(cache_type, | ||
281 | PAL_CACHE_FLUSH_INVALIDATE, &progress, NULL); | ||
282 | local_irq_restore(flags); | ||
283 | return rc; | ||
284 | } | ||
285 | |||
286 | SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0); | ||
287 | return isrv.status; | ||
288 | } | ||
289 | |||
217 | void __init | 290 | void __init |
218 | ia64_sal_init (struct ia64_sal_systab *systab) | 291 | ia64_sal_init (struct ia64_sal_systab *systab) |
219 | { | 292 | { |
@@ -262,6 +335,8 @@ ia64_sal_init (struct ia64_sal_systab *systab) | |||
262 | } | 335 | } |
263 | p += SAL_DESC_SIZE(*p); | 336 | p += SAL_DESC_SIZE(*p); |
264 | } | 337 | } |
338 | |||
339 | check_sal_cache_flush(); | ||
265 | } | 340 | } |
266 | 341 | ||
267 | int | 342 | int |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c0766575a3a2..35f7835294a3 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -71,6 +71,8 @@ unsigned long __per_cpu_offset[NR_CPUS]; | |||
71 | EXPORT_SYMBOL(__per_cpu_offset); | 71 | EXPORT_SYMBOL(__per_cpu_offset); |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | extern void ia64_setup_printk_clock(void); | ||
75 | |||
74 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); | 76 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); |
75 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); | 77 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); |
76 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); | 78 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); |
@@ -445,6 +447,8 @@ setup_arch (char **cmdline_p) | |||
445 | /* process SAL system table: */ | 447 | /* process SAL system table: */ |
446 | ia64_sal_init(efi.sal_systab); | 448 | ia64_sal_init(efi.sal_systab); |
447 | 449 | ||
450 | ia64_setup_printk_clock(); | ||
451 | |||
448 | #ifdef CONFIG_SMP | 452 | #ifdef CONFIG_SMP |
449 | cpu_physical_id(0) = hard_smp_processor_id(); | 453 | cpu_physical_id(0) = hard_smp_processor_id(); |
450 | 454 | ||
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 028a2b95936c..a094ec49ccfa 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -278,3 +278,30 @@ udelay (unsigned long usecs) | |||
278 | } | 278 | } |
279 | } | 279 | } |
280 | EXPORT_SYMBOL(udelay); | 280 | EXPORT_SYMBOL(udelay); |
281 | |||
282 | static unsigned long long ia64_itc_printk_clock(void) | ||
283 | { | ||
284 | if (ia64_get_kr(IA64_KR_PER_CPU_DATA)) | ||
285 | return sched_clock(); | ||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | static unsigned long long ia64_default_printk_clock(void) | ||
290 | { | ||
291 | return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) * | ||
292 | (1000000000/HZ); | ||
293 | } | ||
294 | |||
295 | unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock; | ||
296 | |||
297 | unsigned long long printk_clock(void) | ||
298 | { | ||
299 | return ia64_printk_clock(); | ||
300 | } | ||
301 | |||
302 | void __init | ||
303 | ia64_setup_printk_clock(void) | ||
304 | { | ||
305 | if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) | ||
306 | ia64_printk_clock = ia64_itc_printk_clock; | ||
307 | } | ||
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/Makefile b/arch/ia64/sn/Makefile index a269f6d84c29..79a7df02e812 100644 --- a/arch/ia64/sn/Makefile +++ b/arch/ia64/sn/Makefile | |||
@@ -9,6 +9,4 @@ | |||
9 | # Makefile for the sn ia64 subplatform | 9 | # Makefile for the sn ia64 subplatform |
10 | # | 10 | # |
11 | 11 | ||
12 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | ||
13 | |||
14 | obj-y += kernel/ pci/ | 12 | obj-y += kernel/ pci/ |
diff --git a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile index 4351c4ff9845..3e9b4eea7418 100644 --- a/arch/ia64/sn/kernel/Makefile +++ b/arch/ia64/sn/kernel/Makefile | |||
@@ -7,6 +7,8 @@ | |||
7 | # Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All Rights Reserved. | 7 | # Copyright (C) 1999,2001-2005 Silicon Graphics, Inc. All Rights Reserved. |
8 | # | 8 | # |
9 | 9 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | ||
11 | |||
10 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ | 12 | obj-y += setup.o bte.o bte_error.o irq.o mca.o idle.o \ |
11 | huberror.o io_init.o iomv.o klconflib.o sn2/ | 13 | huberror.o io_init.o iomv.o klconflib.o sn2/ |
12 | obj-$(CONFIG_IA64_GENERIC) += machvec.o | 14 | obj-$(CONFIG_IA64_GENERIC) += machvec.o |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index dd73c0cb754b..1f11db470d90 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
@@ -186,18 +186,13 @@ retry_bteop: | |||
186 | 186 | ||
187 | /* Initialize the notification to a known value. */ | 187 | /* Initialize the notification to a known value. */ |
188 | *bte->most_rcnt_na = BTE_WORD_BUSY; | 188 | *bte->most_rcnt_na = BTE_WORD_BUSY; |
189 | notif_phys_addr = TO_PHYS(ia64_tpa((unsigned long)bte->most_rcnt_na)); | 189 | notif_phys_addr = (u64)bte->most_rcnt_na; |
190 | 190 | ||
191 | if (is_shub2()) { | ||
192 | src = SH2_TIO_PHYS_TO_DMA(src); | ||
193 | dest = SH2_TIO_PHYS_TO_DMA(dest); | ||
194 | notif_phys_addr = SH2_TIO_PHYS_TO_DMA(notif_phys_addr); | ||
195 | } | ||
196 | /* Set the source and destination registers */ | 191 | /* Set the source and destination registers */ |
197 | BTE_PRINTKV(("IBSA = 0x%lx)\n", (TO_PHYS(src)))); | 192 | BTE_PRINTKV(("IBSA = 0x%lx)\n", src)); |
198 | BTE_SRC_STORE(bte, TO_PHYS(src)); | 193 | BTE_SRC_STORE(bte, src); |
199 | BTE_PRINTKV(("IBDA = 0x%lx)\n", (TO_PHYS(dest)))); | 194 | BTE_PRINTKV(("IBDA = 0x%lx)\n", dest)); |
200 | BTE_DEST_STORE(bte, TO_PHYS(dest)); | 195 | BTE_DEST_STORE(bte, dest); |
201 | 196 | ||
202 | /* Set the notification register */ | 197 | /* Set the notification register */ |
203 | BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr)); | 198 | BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr)); |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 00700f7e6837..d7e4d79e16a8 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,15 +199,16 @@ 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 | /* |
206 | * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for | 208 | * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for |
207 | * each node in the system. | 209 | * each node in the system. |
208 | */ | 210 | */ |
209 | static void sn_fixup_ionodes(void) | 211 | static void __init sn_fixup_ionodes(void) |
210 | { | 212 | { |
211 | struct sn_flush_device_kernel *sn_flush_device_kernel; | 213 | struct sn_flush_device_kernel *sn_flush_device_kernel; |
212 | struct sn_flush_device_kernel *dev_entry; | 214 | struct sn_flush_device_kernel *dev_entry; |
@@ -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 | } |
@@ -467,6 +467,13 @@ void sn_pci_fixup_slot(struct pci_dev *dev) | |||
467 | pcidev_info->pdi_sn_irq_info = NULL; | 467 | pcidev_info->pdi_sn_irq_info = NULL; |
468 | kfree(sn_irq_info); | 468 | kfree(sn_irq_info); |
469 | } | 469 | } |
470 | |||
471 | /* | ||
472 | * MSI currently not supported on altix. Remove this when | ||
473 | * the MSI abstraction patches are integrated into the kernel | ||
474 | * (sometime after 2.6.16 releases) | ||
475 | */ | ||
476 | dev->no_msi = 1; | ||
470 | } | 477 | } |
471 | 478 | ||
472 | /* | 479 | /* |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index ec37084bdc17..74d87d903d5d 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -5,11 +5,12 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 8 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/init.h> | ||
13 | #include <asm/sn/addrs.h> | 14 | #include <asm/sn/addrs.h> |
14 | #include <asm/sn/arch.h> | 15 | #include <asm/sn/arch.h> |
15 | #include <asm/sn/intr.h> | 16 | #include <asm/sn/intr.h> |
@@ -76,17 +77,15 @@ static void sn_enable_irq(unsigned int irq) | |||
76 | 77 | ||
77 | static void sn_ack_irq(unsigned int irq) | 78 | static void sn_ack_irq(unsigned int irq) |
78 | { | 79 | { |
79 | u64 event_occurred, mask = 0; | 80 | u64 event_occurred, mask; |
80 | 81 | ||
81 | irq = irq & 0xff; | 82 | irq = irq & 0xff; |
82 | event_occurred = | 83 | event_occurred = HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)); |
83 | HUB_L((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)); | ||
84 | mask = event_occurred & SH_ALL_INT_MASK; | 84 | mask = event_occurred & SH_ALL_INT_MASK; |
85 | HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), | 85 | HUB_S((u64*)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED_ALIAS), mask); |
86 | mask); | ||
87 | __set_bit(irq, (volatile void *)pda->sn_in_service_ivecs); | 86 | __set_bit(irq, (volatile void *)pda->sn_in_service_ivecs); |
88 | 87 | ||
89 | move_irq(irq); | 88 | move_native_irq(irq); |
90 | } | 89 | } |
91 | 90 | ||
92 | static void sn_end_irq(unsigned int irq) | 91 | static void sn_end_irq(unsigned int irq) |
@@ -219,9 +218,8 @@ static void register_intr_pda(struct sn_irq_info *sn_irq_info) | |||
219 | pdacpu(cpu)->sn_last_irq = irq; | 218 | pdacpu(cpu)->sn_last_irq = irq; |
220 | } | 219 | } |
221 | 220 | ||
222 | if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq) { | 221 | if (pdacpu(cpu)->sn_first_irq == 0 || pdacpu(cpu)->sn_first_irq > irq) |
223 | pdacpu(cpu)->sn_first_irq = irq; | 222 | pdacpu(cpu)->sn_first_irq = irq; |
224 | } | ||
225 | } | 223 | } |
226 | 224 | ||
227 | static void unregister_intr_pda(struct sn_irq_info *sn_irq_info) | 225 | static void unregister_intr_pda(struct sn_irq_info *sn_irq_info) |
@@ -289,7 +287,7 @@ void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info) | |||
289 | list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]); | 287 | list_add_rcu(&sn_irq_info->list, sn_irq_lh[sn_irq_info->irq_irq]); |
290 | spin_unlock(&sn_irq_info_lock); | 288 | spin_unlock(&sn_irq_info_lock); |
291 | 289 | ||
292 | (void)register_intr_pda(sn_irq_info); | 290 | register_intr_pda(sn_irq_info); |
293 | } | 291 | } |
294 | 292 | ||
295 | void sn_irq_unfixup(struct pci_dev *pci_dev) | 293 | void sn_irq_unfixup(struct pci_dev *pci_dev) |
@@ -419,7 +417,7 @@ void sn_lb_int_war_check(void) | |||
419 | rcu_read_unlock(); | 417 | rcu_read_unlock(); |
420 | } | 418 | } |
421 | 419 | ||
422 | void sn_irq_lh_init(void) | 420 | void __init sn_irq_lh_init(void) |
423 | { | 421 | { |
424 | int i; | 422 | int i; |
425 | 423 | ||
@@ -434,5 +432,4 @@ void sn_irq_lh_init(void) | |||
434 | 432 | ||
435 | INIT_LIST_HEAD(sn_irq_lh[i]); | 433 | INIT_LIST_HEAD(sn_irq_lh[i]); |
436 | } | 434 | } |
437 | |||
438 | } | 435 | } |
diff --git a/arch/ia64/sn/kernel/klconflib.c b/arch/ia64/sn/kernel/klconflib.c index 0f11a3299cd2..87682b48ef83 100644 --- a/arch/ia64/sn/kernel/klconflib.c +++ b/arch/ia64/sn/kernel/klconflib.c | |||
@@ -78,31 +78,30 @@ format_module_id(char *buffer, moduleid_t m, int fmt) | |||
78 | position = MODULE_GET_BPOS(m); | 78 | position = MODULE_GET_BPOS(m); |
79 | 79 | ||
80 | if ((fmt == MODULE_FORMAT_BRIEF) || (fmt == MODULE_FORMAT_LCD)) { | 80 | if ((fmt == MODULE_FORMAT_BRIEF) || (fmt == MODULE_FORMAT_LCD)) { |
81 | /* Brief module number format, eg. 002c15 */ | 81 | /* Brief module number format, eg. 002c15 */ |
82 | 82 | ||
83 | /* Decompress the rack number */ | 83 | /* Decompress the rack number */ |
84 | *buffer++ = '0' + RACK_GET_CLASS(rack); | 84 | *buffer++ = '0' + RACK_GET_CLASS(rack); |
85 | *buffer++ = '0' + RACK_GET_GROUP(rack); | 85 | *buffer++ = '0' + RACK_GET_GROUP(rack); |
86 | *buffer++ = '0' + RACK_GET_NUM(rack); | 86 | *buffer++ = '0' + RACK_GET_NUM(rack); |
87 | 87 | ||
88 | /* Add the brick type */ | 88 | /* Add the brick type */ |
89 | *buffer++ = brickchar; | 89 | *buffer++ = brickchar; |
90 | } | 90 | } |
91 | else if (fmt == MODULE_FORMAT_LONG) { | 91 | else if (fmt == MODULE_FORMAT_LONG) { |
92 | /* Fuller hwgraph format, eg. rack/002/bay/15 */ | 92 | /* Fuller hwgraph format, eg. rack/002/bay/15 */ |
93 | 93 | ||
94 | strcpy(buffer, "rack" "/"); buffer += strlen(buffer); | 94 | strcpy(buffer, "rack" "/"); buffer += strlen(buffer); |
95 | 95 | ||
96 | *buffer++ = '0' + RACK_GET_CLASS(rack); | 96 | *buffer++ = '0' + RACK_GET_CLASS(rack); |
97 | *buffer++ = '0' + RACK_GET_GROUP(rack); | 97 | *buffer++ = '0' + RACK_GET_GROUP(rack); |
98 | *buffer++ = '0' + RACK_GET_NUM(rack); | 98 | *buffer++ = '0' + RACK_GET_NUM(rack); |
99 | 99 | ||
100 | strcpy(buffer, "/" "bay" "/"); buffer += strlen(buffer); | 100 | strcpy(buffer, "/" "bay" "/"); buffer += strlen(buffer); |
101 | } | 101 | } |
102 | 102 | ||
103 | /* Add the bay position, using at least two digits */ | 103 | /* Add the bay position, using at least two digits */ |
104 | if (position < 10) | 104 | if (position < 10) |
105 | *buffer++ = '0'; | 105 | *buffer++ = '0'; |
106 | sprintf(buffer, "%d", position); | 106 | sprintf(buffer, "%d", position); |
107 | |||
108 | } | 107 | } |
diff --git a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c index 9ab684d1bb55..3db62f24596c 100644 --- a/arch/ia64/sn/kernel/mca.c +++ b/arch/ia64/sn/kernel/mca.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -137,7 +137,8 @@ int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdat | |||
137 | 137 | ||
138 | static int __init sn_salinfo_init(void) | 138 | static int __init sn_salinfo_init(void) |
139 | { | 139 | { |
140 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | 140 | if (ia64_platform_is("sn2")) |
141 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | ||
141 | return 0; | 142 | return 0; |
142 | } | 143 | } |
143 | 144 | ||
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index e510dce9971f..48645ac120fc 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -67,6 +67,7 @@ extern unsigned long last_time_offset; | |||
67 | extern void (*ia64_mark_idle) (int); | 67 | extern void (*ia64_mark_idle) (int); |
68 | extern void snidle(int); | 68 | extern void snidle(int); |
69 | extern unsigned char acpi_kbd_controller_present; | 69 | extern unsigned char acpi_kbd_controller_present; |
70 | extern unsigned long long (*ia64_printk_clock)(void); | ||
70 | 71 | ||
71 | unsigned long sn_rtc_cycles_per_second; | 72 | unsigned long sn_rtc_cycles_per_second; |
72 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); | 73 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); |
@@ -125,20 +126,6 @@ struct screen_info sn_screen_info = { | |||
125 | }; | 126 | }; |
126 | 127 | ||
127 | /* | 128 | /* |
128 | * This is here so we can use the CMOS detection in ide-probe.c to | ||
129 | * determine what drives are present. In theory, we don't need this | ||
130 | * as the auto-detection could be done via ide-probe.c:do_probe() but | ||
131 | * in practice that would be much slower, which is painful when | ||
132 | * running in the simulator. Note that passing zeroes in DRIVE_INFO | ||
133 | * is sufficient (the IDE driver will autodetect the drive geometry). | ||
134 | */ | ||
135 | #ifdef CONFIG_IA64_GENERIC | ||
136 | extern char drive_info[4 * 16]; | ||
137 | #else | ||
138 | char drive_info[4 * 16]; | ||
139 | #endif | ||
140 | |||
141 | /* | ||
142 | * This routine can only be used during init, since | 129 | * This routine can only be used during init, since |
143 | * smp_boot_data is an init data structure. | 130 | * smp_boot_data is an init data structure. |
144 | * We have to use smp_boot_data.cpu_phys_id to find | 131 | * We have to use smp_boot_data.cpu_phys_id to find |
@@ -209,7 +196,7 @@ void __init early_sn_setup(void) | |||
209 | } | 196 | } |
210 | 197 | ||
211 | extern int platform_intr_list[]; | 198 | extern int platform_intr_list[]; |
212 | static int __initdata shub_1_1_found = 0; | 199 | static int __initdata shub_1_1_found; |
213 | 200 | ||
214 | /* | 201 | /* |
215 | * sn_check_for_wars | 202 | * sn_check_for_wars |
@@ -372,6 +359,16 @@ sn_scan_pcdp(void) | |||
372 | } | 359 | } |
373 | } | 360 | } |
374 | 361 | ||
362 | static unsigned long sn2_rtc_initial; | ||
363 | |||
364 | static unsigned long long ia64_sn2_printk_clock(void) | ||
365 | { | ||
366 | unsigned long rtc_now = rtc_time(); | ||
367 | |||
368 | return (rtc_now - sn2_rtc_initial) * | ||
369 | (1000000000 / sn_rtc_cycles_per_second); | ||
370 | } | ||
371 | |||
375 | /** | 372 | /** |
376 | * sn_setup - SN platform setup routine | 373 | * sn_setup - SN platform setup routine |
377 | * @cmdline_p: kernel command line | 374 | * @cmdline_p: kernel command line |
@@ -386,6 +383,7 @@ void __init sn_setup(char **cmdline_p) | |||
386 | u32 version = sn_sal_rev(); | 383 | u32 version = sn_sal_rev(); |
387 | extern void sn_cpu_init(void); | 384 | extern void sn_cpu_init(void); |
388 | 385 | ||
386 | sn2_rtc_initial = rtc_time(); | ||
389 | ia64_sn_plat_set_error_handling_features(); // obsolete | 387 | ia64_sn_plat_set_error_handling_features(); // obsolete |
390 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); | 388 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); |
391 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); | 389 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); |
@@ -437,19 +435,6 @@ void __init sn_setup(char **cmdline_p) | |||
437 | */ | 435 | */ |
438 | build_cnode_tables(); | 436 | build_cnode_tables(); |
439 | 437 | ||
440 | /* | ||
441 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
442 | * support here so we don't have to listen to failed keyboard probe | ||
443 | * messages. | ||
444 | */ | ||
445 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
446 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
447 | "is too old and doesn't provide FADT\n"); | ||
448 | acpi_kbd_controller_present = 0; | ||
449 | } | ||
450 | |||
451 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
452 | |||
453 | status = | 438 | status = |
454 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, | 439 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, |
455 | &drift); | 440 | &drift); |
@@ -463,6 +448,21 @@ void __init sn_setup(char **cmdline_p) | |||
463 | 448 | ||
464 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; | 449 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; |
465 | 450 | ||
451 | ia64_printk_clock = ia64_sn2_printk_clock; | ||
452 | |||
453 | /* | ||
454 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
455 | * support here so we don't have to listen to failed keyboard probe | ||
456 | * messages. | ||
457 | */ | ||
458 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
459 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
460 | "is too old and doesn't provide FADT\n"); | ||
461 | acpi_kbd_controller_present = 0; | ||
462 | } | ||
463 | |||
464 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
465 | |||
466 | /* | 466 | /* |
467 | * we set the default root device to /dev/hda | 467 | * we set the default root device to /dev/hda |
468 | * to make simulation easy | 468 | * to make simulation easy |
@@ -578,13 +578,17 @@ void __init sn_cpu_init(void) | |||
578 | sn_prom_type = 2; | 578 | sn_prom_type = 2; |
579 | else | 579 | else |
580 | sn_prom_type = 1; | 580 | sn_prom_type = 1; |
581 | printk("Running on medusa with %s PROM\n", (sn_prom_type == 1) ? "real" : "fake"); | 581 | printk(KERN_INFO "Running on medusa with %s PROM\n", |
582 | (sn_prom_type == 1) ? "real" : "fake"); | ||
582 | } | 583 | } |
583 | 584 | ||
584 | memset(pda, 0, sizeof(pda)); | 585 | memset(pda, 0, sizeof(pda)); |
585 | if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2, &sn_hub_info->nasid_bitmask, &sn_hub_info->nasid_shift, | 586 | if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2, |
586 | &sn_system_size, &sn_sharing_domain_size, &sn_partition_id, | 587 | &sn_hub_info->nasid_bitmask, |
587 | &sn_coherency_id, &sn_region_size)) | 588 | &sn_hub_info->nasid_shift, |
589 | &sn_system_size, &sn_sharing_domain_size, | ||
590 | &sn_partition_id, &sn_coherency_id, | ||
591 | &sn_region_size)) | ||
588 | BUG(); | 592 | BUG(); |
589 | sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2; | 593 | sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2; |
590 | 594 | ||
@@ -716,7 +720,8 @@ void __init build_cnode_tables(void) | |||
716 | for_each_online_node(node) { | 720 | for_each_online_node(node) { |
717 | kl_config_hdr_t *klgraph_header; | 721 | kl_config_hdr_t *klgraph_header; |
718 | nasid = cnodeid_to_nasid(node); | 722 | nasid = cnodeid_to_nasid(node); |
719 | if ((klgraph_header = ia64_sn_get_klconfig_addr(nasid)) == NULL) | 723 | klgraph_header = ia64_sn_get_klconfig_addr(nasid); |
724 | if (klgraph_header == NULL) | ||
720 | BUG(); | 725 | BUG(); |
721 | brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info); | 726 | brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info); |
722 | while (brd) { | 727 | while (brd) { |
@@ -734,7 +739,7 @@ nasid_slice_to_cpuid(int nasid, int slice) | |||
734 | { | 739 | { |
735 | long cpu; | 740 | long cpu; |
736 | 741 | ||
737 | for (cpu=0; cpu < NR_CPUS; cpu++) | 742 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
738 | if (cpuid_to_nasid(cpu) == nasid && | 743 | if (cpuid_to_nasid(cpu) == nasid && |
739 | cpuid_to_slice(cpu) == slice) | 744 | cpuid_to_slice(cpu) == slice) |
740 | return cpu; | 745 | return cpu; |
diff --git a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile index 170bde4549da..99e177693234 100644 --- a/arch/ia64/sn/kernel/sn2/Makefile +++ b/arch/ia64/sn/kernel/sn2/Makefile | |||
@@ -9,5 +9,7 @@ | |||
9 | # sn2 specific kernel files | 9 | # sn2 specific kernel files |
10 | # | 10 | # |
11 | 11 | ||
12 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | ||
13 | |||
12 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ | 14 | obj-y += cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ |
13 | prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o | 15 | prominfo_proc.o timer.o timer_interrupt.o sn_hwperf.o |
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index 471bbaa65d1b..f153a4c35c70 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License. See the file "COPYING" in the main directory of this archive | 5 | * License. See the file "COPYING" in the main directory of this archive |
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 2000-2006 Silicon Graphics, Inc. All rights reserved. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
@@ -46,104 +46,28 @@ DECLARE_PER_CPU(struct ptc_stats, ptcstats); | |||
46 | 46 | ||
47 | static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock); | 47 | static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock); |
48 | 48 | ||
49 | void sn2_ptc_deadlock_recovery(short *, short, int, volatile unsigned long *, unsigned long data0, | 49 | void sn2_ptc_deadlock_recovery(short *, short, short, int, volatile unsigned long *, unsigned long, |
50 | volatile unsigned long *, unsigned long data1); | 50 | volatile unsigned long *, unsigned long); |
51 | 51 | ||
52 | #ifdef DEBUG_PTC | ||
53 | /* | 52 | /* |
54 | * ptctest: | 53 | * Note: some is the following is captured here to make degugging easier |
55 | * | 54 | * (the macros make more sense if you see the debug patch - not posted) |
56 | * xyz - 3 digit hex number: | ||
57 | * x - Force PTC purges to use shub: | ||
58 | * 0 - no force | ||
59 | * 1 - force | ||
60 | * y - interupt enable | ||
61 | * 0 - disable interrupts | ||
62 | * 1 - leave interuupts enabled | ||
63 | * z - type of lock: | ||
64 | * 0 - global lock | ||
65 | * 1 - node local lock | ||
66 | * 2 - no lock | ||
67 | * | ||
68 | * Note: on shub1, only ptctest == 0 is supported. Don't try other values! | ||
69 | */ | 55 | */ |
70 | |||
71 | static unsigned int sn2_ptctest = 0; | ||
72 | |||
73 | static int __init ptc_test(char *str) | ||
74 | { | ||
75 | get_option(&str, &sn2_ptctest); | ||
76 | return 1; | ||
77 | } | ||
78 | __setup("ptctest=", ptc_test); | ||
79 | |||
80 | static inline int ptc_lock(unsigned long *flagp) | ||
81 | { | ||
82 | unsigned long opt = sn2_ptctest & 255; | ||
83 | |||
84 | switch (opt) { | ||
85 | case 0x00: | ||
86 | spin_lock_irqsave(&sn2_global_ptc_lock, *flagp); | ||
87 | break; | ||
88 | case 0x01: | ||
89 | spin_lock_irqsave(&sn_nodepda->ptc_lock, *flagp); | ||
90 | break; | ||
91 | case 0x02: | ||
92 | local_irq_save(*flagp); | ||
93 | break; | ||
94 | case 0x10: | ||
95 | spin_lock(&sn2_global_ptc_lock); | ||
96 | break; | ||
97 | case 0x11: | ||
98 | spin_lock(&sn_nodepda->ptc_lock); | ||
99 | break; | ||
100 | case 0x12: | ||
101 | break; | ||
102 | default: | ||
103 | BUG(); | ||
104 | } | ||
105 | return opt; | ||
106 | } | ||
107 | |||
108 | static inline void ptc_unlock(unsigned long flags, int opt) | ||
109 | { | ||
110 | switch (opt) { | ||
111 | case 0x00: | ||
112 | spin_unlock_irqrestore(&sn2_global_ptc_lock, flags); | ||
113 | break; | ||
114 | case 0x01: | ||
115 | spin_unlock_irqrestore(&sn_nodepda->ptc_lock, flags); | ||
116 | break; | ||
117 | case 0x02: | ||
118 | local_irq_restore(flags); | ||
119 | break; | ||
120 | case 0x10: | ||
121 | spin_unlock(&sn2_global_ptc_lock); | ||
122 | break; | ||
123 | case 0x11: | ||
124 | spin_unlock(&sn_nodepda->ptc_lock); | ||
125 | break; | ||
126 | case 0x12: | ||
127 | break; | ||
128 | default: | ||
129 | BUG(); | ||
130 | } | ||
131 | } | ||
132 | #else | ||
133 | |||
134 | #define sn2_ptctest 0 | 56 | #define sn2_ptctest 0 |
57 | #define local_node_uses_ptc_ga(sh1) ((sh1) ? 1 : 0) | ||
58 | #define max_active_pio(sh1) ((sh1) ? 32 : 7) | ||
59 | #define reset_max_active_on_deadlock() 1 | ||
60 | #define PTC_LOCK(sh1) ((sh1) ? &sn2_global_ptc_lock : &sn_nodepda->ptc_lock) | ||
135 | 61 | ||
136 | static inline int ptc_lock(unsigned long *flagp) | 62 | static inline void ptc_lock(int sh1, unsigned long *flagp) |
137 | { | 63 | { |
138 | spin_lock_irqsave(&sn2_global_ptc_lock, *flagp); | 64 | spin_lock_irqsave(PTC_LOCK(sh1), *flagp); |
139 | return 0; | ||
140 | } | 65 | } |
141 | 66 | ||
142 | static inline void ptc_unlock(unsigned long flags, int opt) | 67 | static inline void ptc_unlock(int sh1, unsigned long flags) |
143 | { | 68 | { |
144 | spin_unlock_irqrestore(&sn2_global_ptc_lock, flags); | 69 | spin_unlock_irqrestore(PTC_LOCK(sh1), flags); |
145 | } | 70 | } |
146 | #endif | ||
147 | 71 | ||
148 | struct ptc_stats { | 72 | struct ptc_stats { |
149 | unsigned long ptc_l; | 73 | unsigned long ptc_l; |
@@ -151,27 +75,30 @@ struct ptc_stats { | |||
151 | unsigned long shub_ptc_flushes; | 75 | unsigned long shub_ptc_flushes; |
152 | unsigned long nodes_flushed; | 76 | unsigned long nodes_flushed; |
153 | unsigned long deadlocks; | 77 | unsigned long deadlocks; |
78 | unsigned long deadlocks2; | ||
154 | unsigned long lock_itc_clocks; | 79 | unsigned long lock_itc_clocks; |
155 | unsigned long shub_itc_clocks; | 80 | unsigned long shub_itc_clocks; |
156 | unsigned long shub_itc_clocks_max; | 81 | unsigned long shub_itc_clocks_max; |
82 | unsigned long shub_ptc_flushes_not_my_mm; | ||
157 | }; | 83 | }; |
158 | 84 | ||
159 | static inline unsigned long wait_piowc(void) | 85 | static inline unsigned long wait_piowc(void) |
160 | { | 86 | { |
161 | volatile unsigned long *piows, zeroval; | 87 | volatile unsigned long *piows; |
162 | unsigned long ws; | 88 | unsigned long zeroval, ws; |
163 | 89 | ||
164 | piows = pda->pio_write_status_addr; | 90 | piows = pda->pio_write_status_addr; |
165 | zeroval = pda->pio_write_status_val; | 91 | zeroval = pda->pio_write_status_val; |
166 | do { | 92 | do { |
167 | cpu_relax(); | 93 | cpu_relax(); |
168 | } while (((ws = *piows) & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK) != zeroval); | 94 | } while (((ws = *piows) & SH_PIO_WRITE_STATUS_PENDING_WRITE_COUNT_MASK) != zeroval); |
169 | return ws; | 95 | return (ws & SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK) != 0; |
170 | } | 96 | } |
171 | 97 | ||
172 | void sn_tlb_migrate_finish(struct mm_struct *mm) | 98 | void sn_tlb_migrate_finish(struct mm_struct *mm) |
173 | { | 99 | { |
174 | if (mm == current->mm) | 100 | /* flush_tlb_mm is inefficient if more than 1 users of mm */ |
101 | if (mm == current->mm && mm && atomic_read(&mm->mm_users) == 1) | ||
175 | flush_tlb_mm(mm); | 102 | flush_tlb_mm(mm); |
176 | } | 103 | } |
177 | 104 | ||
@@ -201,12 +128,14 @@ void | |||
201 | sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | 128 | sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, |
202 | unsigned long end, unsigned long nbits) | 129 | unsigned long end, unsigned long nbits) |
203 | { | 130 | { |
204 | int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0; | 131 | int i, ibegin, shub1, cnode, mynasid, cpu, lcpu = 0, nasid; |
205 | int mymm = (mm == current->active_mm && current->mm); | 132 | int mymm = (mm == current->active_mm && mm == current->mm); |
133 | int use_cpu_ptcga; | ||
206 | volatile unsigned long *ptc0, *ptc1; | 134 | volatile unsigned long *ptc0, *ptc1; |
207 | unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value; | 135 | unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value, old_rr = 0; |
208 | short nasids[MAX_NUMNODES], nix; | 136 | short nasids[MAX_NUMNODES], nix; |
209 | nodemask_t nodes_flushed; | 137 | nodemask_t nodes_flushed; |
138 | int active, max_active, deadlock; | ||
210 | 139 | ||
211 | nodes_clear(nodes_flushed); | 140 | nodes_clear(nodes_flushed); |
212 | i = 0; | 141 | i = 0; |
@@ -267,41 +196,56 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
267 | 196 | ||
268 | 197 | ||
269 | mynasid = get_nasid(); | 198 | mynasid = get_nasid(); |
199 | use_cpu_ptcga = local_node_uses_ptc_ga(shub1); | ||
200 | max_active = max_active_pio(shub1); | ||
270 | 201 | ||
271 | itc = ia64_get_itc(); | 202 | itc = ia64_get_itc(); |
272 | opt = ptc_lock(&flags); | 203 | ptc_lock(shub1, &flags); |
273 | itc2 = ia64_get_itc(); | 204 | itc2 = ia64_get_itc(); |
205 | |||
274 | __get_cpu_var(ptcstats).lock_itc_clocks += itc2 - itc; | 206 | __get_cpu_var(ptcstats).lock_itc_clocks += itc2 - itc; |
275 | __get_cpu_var(ptcstats).shub_ptc_flushes++; | 207 | __get_cpu_var(ptcstats).shub_ptc_flushes++; |
276 | __get_cpu_var(ptcstats).nodes_flushed += nix; | 208 | __get_cpu_var(ptcstats).nodes_flushed += nix; |
209 | if (!mymm) | ||
210 | __get_cpu_var(ptcstats).shub_ptc_flushes_not_my_mm++; | ||
277 | 211 | ||
212 | if (use_cpu_ptcga && !mymm) { | ||
213 | old_rr = ia64_get_rr(start); | ||
214 | ia64_set_rr(start, (old_rr & 0xff) | (rr_value << 8)); | ||
215 | ia64_srlz_d(); | ||
216 | } | ||
217 | |||
218 | wait_piowc(); | ||
278 | do { | 219 | do { |
279 | if (shub1) | 220 | if (shub1) |
280 | data1 = start | (1UL << SH1_PTC_1_START_SHFT); | 221 | data1 = start | (1UL << SH1_PTC_1_START_SHFT); |
281 | else | 222 | else |
282 | data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK); | 223 | data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK); |
283 | for (i = 0; i < nix; i++) { | 224 | deadlock = 0; |
225 | active = 0; | ||
226 | for (ibegin = 0, i = 0; i < nix; i++) { | ||
284 | nasid = nasids[i]; | 227 | nasid = nasids[i]; |
285 | if ((!(sn2_ptctest & 3)) && unlikely(nasid == mynasid && mymm)) { | 228 | if (use_cpu_ptcga && unlikely(nasid == mynasid)) { |
286 | ia64_ptcga(start, nbits << 2); | 229 | ia64_ptcga(start, nbits << 2); |
287 | ia64_srlz_i(); | 230 | ia64_srlz_i(); |
288 | } else { | 231 | } else { |
289 | ptc0 = CHANGE_NASID(nasid, ptc0); | 232 | ptc0 = CHANGE_NASID(nasid, ptc0); |
290 | if (ptc1) | 233 | if (ptc1) |
291 | ptc1 = CHANGE_NASID(nasid, ptc1); | 234 | ptc1 = CHANGE_NASID(nasid, ptc1); |
292 | pio_atomic_phys_write_mmrs(ptc0, data0, ptc1, | 235 | pio_atomic_phys_write_mmrs(ptc0, data0, ptc1, data1); |
293 | data1); | 236 | active++; |
294 | flushed = 1; | 237 | } |
238 | if (active >= max_active || i == (nix - 1)) { | ||
239 | if ((deadlock = wait_piowc())) { | ||
240 | sn2_ptc_deadlock_recovery(nasids, ibegin, i, mynasid, ptc0, data0, ptc1, data1); | ||
241 | if (reset_max_active_on_deadlock()) | ||
242 | max_active = 1; | ||
243 | } | ||
244 | active = 0; | ||
245 | ibegin = i + 1; | ||
295 | } | 246 | } |
296 | } | 247 | } |
297 | if (flushed | ||
298 | && (wait_piowc() & | ||
299 | (SH_PIO_WRITE_STATUS_WRITE_DEADLOCK_MASK))) { | ||
300 | sn2_ptc_deadlock_recovery(nasids, nix, mynasid, ptc0, data0, ptc1, data1); | ||
301 | } | ||
302 | |||
303 | start += (1UL << nbits); | 248 | start += (1UL << nbits); |
304 | |||
305 | } while (start < end); | 249 | } while (start < end); |
306 | 250 | ||
307 | itc2 = ia64_get_itc() - itc2; | 251 | itc2 = ia64_get_itc() - itc2; |
@@ -309,7 +253,12 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
309 | if (itc2 > __get_cpu_var(ptcstats).shub_itc_clocks_max) | 253 | if (itc2 > __get_cpu_var(ptcstats).shub_itc_clocks_max) |
310 | __get_cpu_var(ptcstats).shub_itc_clocks_max = itc2; | 254 | __get_cpu_var(ptcstats).shub_itc_clocks_max = itc2; |
311 | 255 | ||
312 | ptc_unlock(flags, opt); | 256 | if (old_rr) { |
257 | ia64_set_rr(start, old_rr); | ||
258 | ia64_srlz_d(); | ||
259 | } | ||
260 | |||
261 | ptc_unlock(shub1, flags); | ||
313 | 262 | ||
314 | preempt_enable(); | 263 | preempt_enable(); |
315 | } | 264 | } |
@@ -321,27 +270,30 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start, | |||
321 | * TLB flush transaction. The recovery sequence is somewhat tricky & is | 270 | * TLB flush transaction. The recovery sequence is somewhat tricky & is |
322 | * coded in assembly language. | 271 | * coded in assembly language. |
323 | */ | 272 | */ |
324 | void sn2_ptc_deadlock_recovery(short *nasids, short nix, int mynasid, volatile unsigned long *ptc0, unsigned long data0, | 273 | void sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid, volatile unsigned long *ptc0, unsigned long data0, |
325 | volatile unsigned long *ptc1, unsigned long data1) | 274 | volatile unsigned long *ptc1, unsigned long data1) |
326 | { | 275 | { |
327 | extern void sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long, | 276 | extern unsigned long sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long, |
328 | volatile unsigned long *, unsigned long, volatile unsigned long *, unsigned long); | 277 | volatile unsigned long *, unsigned long, volatile unsigned long *, unsigned long); |
329 | short nasid, i; | 278 | short nasid, i; |
330 | unsigned long *piows, zeroval; | 279 | unsigned long *piows, zeroval, n; |
331 | 280 | ||
332 | __get_cpu_var(ptcstats).deadlocks++; | 281 | __get_cpu_var(ptcstats).deadlocks++; |
333 | 282 | ||
334 | piows = (unsigned long *) pda->pio_write_status_addr; | 283 | piows = (unsigned long *) pda->pio_write_status_addr; |
335 | zeroval = pda->pio_write_status_val; | 284 | zeroval = pda->pio_write_status_val; |
336 | 285 | ||
337 | for (i=0; i < nix; i++) { | 286 | |
287 | for (i=ib; i <= ie; i++) { | ||
338 | nasid = nasids[i]; | 288 | nasid = nasids[i]; |
339 | if (!(sn2_ptctest & 3) && nasid == mynasid) | 289 | if (local_node_uses_ptc_ga(is_shub1()) && nasid == mynasid) |
340 | continue; | 290 | continue; |
341 | ptc0 = CHANGE_NASID(nasid, ptc0); | 291 | ptc0 = CHANGE_NASID(nasid, ptc0); |
342 | if (ptc1) | 292 | if (ptc1) |
343 | ptc1 = CHANGE_NASID(nasid, ptc1); | 293 | ptc1 = CHANGE_NASID(nasid, ptc1); |
344 | sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows, zeroval); | 294 | |
295 | n = sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows, zeroval); | ||
296 | __get_cpu_var(ptcstats).deadlocks2 += n; | ||
345 | } | 297 | } |
346 | 298 | ||
347 | } | 299 | } |
@@ -452,20 +404,22 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data) | |||
452 | cpu = *(loff_t *) data; | 404 | cpu = *(loff_t *) data; |
453 | 405 | ||
454 | if (!cpu) { | 406 | if (!cpu) { |
455 | seq_printf(file, "# ptc_l change_rid shub_ptc_flushes shub_nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max\n"); | 407 | seq_printf(file, |
408 | "# cpu ptc_l newrid ptc_flushes nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max not_my_mm deadlock2\n"); | ||
456 | seq_printf(file, "# ptctest %d\n", sn2_ptctest); | 409 | seq_printf(file, "# ptctest %d\n", sn2_ptctest); |
457 | } | 410 | } |
458 | 411 | ||
459 | if (cpu < NR_CPUS && cpu_online(cpu)) { | 412 | if (cpu < NR_CPUS && cpu_online(cpu)) { |
460 | stat = &per_cpu(ptcstats, cpu); | 413 | stat = &per_cpu(ptcstats, cpu); |
461 | seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l, | 414 | seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l, |
462 | stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed, | 415 | stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed, |
463 | stat->deadlocks, | 416 | stat->deadlocks, |
464 | 1000 * stat->lock_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, | 417 | 1000 * stat->lock_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, |
465 | 1000 * stat->shub_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, | 418 | 1000 * stat->shub_itc_clocks / per_cpu(cpu_info, cpu).cyc_per_usec, |
466 | 1000 * stat->shub_itc_clocks_max / per_cpu(cpu_info, cpu).cyc_per_usec); | 419 | 1000 * stat->shub_itc_clocks_max / per_cpu(cpu_info, cpu).cyc_per_usec, |
420 | stat->shub_ptc_flushes_not_my_mm, | ||
421 | stat->deadlocks2); | ||
467 | } | 422 | } |
468 | |||
469 | return 0; | 423 | return 0; |
470 | } | 424 | } |
471 | 425 | ||
@@ -476,7 +430,7 @@ static struct seq_operations sn2_ptc_seq_ops = { | |||
476 | .show = sn2_ptc_seq_show | 430 | .show = sn2_ptc_seq_show |
477 | }; | 431 | }; |
478 | 432 | ||
479 | int sn2_ptc_proc_open(struct inode *inode, struct file *file) | 433 | static int sn2_ptc_proc_open(struct inode *inode, struct file *file) |
480 | { | 434 | { |
481 | return seq_open(file, &sn2_ptc_seq_ops); | 435 | return seq_open(file, &sn2_ptc_seq_ops); |
482 | } | 436 | } |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 19b54fbcd7ea..70db21f3df21 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved. |
7 | * | 7 | * |
8 | * SGI Altix topology and hardware performance monitoring API. | 8 | * SGI Altix topology and hardware performance monitoring API. |
9 | * Mark Goodwin <markgw@sgi.com>. | 9 | * Mark Goodwin <markgw@sgi.com>. |
@@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_register_init(void) | |||
973 | { | 973 | { |
974 | int e; | 974 | int e; |
975 | 975 | ||
976 | if (!ia64_platform_is("sn2")) | ||
977 | return 0; | ||
978 | |||
976 | sn_hwperf_init(); | 979 | sn_hwperf_init(); |
977 | 980 | ||
978 | /* | 981 | /* |
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/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index c75f8aeefc2b..9cd460dfe27e 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -575,18 +575,21 @@ xpc_activate_partition(struct xpc_partition *part) | |||
575 | 575 | ||
576 | spin_lock_irqsave(&part->act_lock, irq_flags); | 576 | spin_lock_irqsave(&part->act_lock, irq_flags); |
577 | 577 | ||
578 | pid = kernel_thread(xpc_activating, (void *) ((u64) partid), 0); | ||
579 | |||
580 | DBUG_ON(part->act_state != XPC_P_INACTIVE); | 578 | DBUG_ON(part->act_state != XPC_P_INACTIVE); |
581 | 579 | ||
582 | if (pid > 0) { | 580 | part->act_state = XPC_P_ACTIVATION_REQ; |
583 | part->act_state = XPC_P_ACTIVATION_REQ; | 581 | XPC_SET_REASON(part, xpcCloneKThread, __LINE__); |
584 | XPC_SET_REASON(part, xpcCloneKThread, __LINE__); | ||
585 | } else { | ||
586 | XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__); | ||
587 | } | ||
588 | 582 | ||
589 | spin_unlock_irqrestore(&part->act_lock, irq_flags); | 583 | spin_unlock_irqrestore(&part->act_lock, irq_flags); |
584 | |||
585 | pid = kernel_thread(xpc_activating, (void *) ((u64) partid), 0); | ||
586 | |||
587 | if (unlikely(pid <= 0)) { | ||
588 | spin_lock_irqsave(&part->act_lock, irq_flags); | ||
589 | part->act_state = XPC_P_INACTIVE; | ||
590 | XPC_SET_REASON(part, xpcCloneKThreadFailed, __LINE__); | ||
591 | spin_unlock_irqrestore(&part->act_lock, irq_flags); | ||
592 | } | ||
590 | } | 593 | } |
591 | 594 | ||
592 | 595 | ||
diff --git a/arch/ia64/sn/pci/Makefile b/arch/ia64/sn/pci/Makefile index 321576b1b425..c6946784a6a8 100644 --- a/arch/ia64/sn/pci/Makefile +++ b/arch/ia64/sn/pci/Makefile | |||
@@ -7,4 +7,6 @@ | |||
7 | # | 7 | # |
8 | # Makefile for the sn pci general routines. | 8 | # Makefile for the sn pci general routines. |
9 | 9 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | ||
11 | |||
10 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ | 12 | obj-y := pci_dma.o tioca_provider.o tioce_provider.o pcibr/ |
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; |
diff --git a/arch/ia64/sn/pci/pcibr/Makefile b/arch/ia64/sn/pci/pcibr/Makefile index 1850c4a94c41..3b403ea456f9 100644 --- a/arch/ia64/sn/pci/pcibr/Makefile +++ b/arch/ia64/sn/pci/pcibr/Makefile | |||
@@ -7,5 +7,7 @@ | |||
7 | # | 7 | # |
8 | # Makefile for the sn2 io routines. | 8 | # Makefile for the sn2 io routines. |
9 | 9 | ||
10 | CPPFLAGS += -I$(srctree)/arch/ia64/sn/include | ||
11 | |||
10 | obj-y += pcibr_dma.o pcibr_reg.o \ | 12 | obj-y += pcibr_dma.o pcibr_reg.o \ |
11 | pcibr_ate.o pcibr_provider.o | 13 | pcibr_ate.o pcibr_provider.o |