From e3ad42be1ee37ab277ef30555b772e0c803f3b69 Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Tue, 6 Nov 2007 13:20:43 -0800 Subject: [IA64] Fix perfmon sysctl directory modes New sanity checks in sysctl_check_table() complain about a couple of mode 0755 that should be 0555 in the perfmon code: sysctl table check failed: /kernel .1 Writable sysctl directory sysctl table check failed: /kernel/perfmon Writable sysctl directory Signed-off-by: Tony Luck --- arch/ia64/kernel/perfmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 59169bf7145f..73e7c2e40b54 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -558,7 +558,7 @@ static ctl_table pfm_sysctl_dir[] = { { .ctl_name = CTL_UNNUMBERED, .procname = "perfmon", - .mode = 0755, + .mode = 0555, .child = pfm_ctl_table, }, {} @@ -567,7 +567,7 @@ static ctl_table pfm_sysctl_root[] = { { .ctl_name = CTL_KERN, .procname = "kernel", - .mode = 0755, + .mode = 0555, .child = pfm_sysctl_dir, }, {} -- cgit v1.2.3-59-g8ed1b From b17de3619553d004be3fe3c58bf6a63cbec3303b Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Tue, 6 Nov 2007 22:13:53 +0100 Subject: [IA64] fix number of bytes zeroed by sys_fw_init() in arch/ia64/hp/sim/boot/fw-emu.c The sizeof a pointer is constant, we want the sizeof what is pointed to. Zero out 'sizeof(*efi_systab)' bytes of the efi_system_table_t pointer 'efi_systab' instead. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Tony Luck --- arch/ia64/hp/sim/boot/fw-emu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c index 1189d035d316..bf6d9d8c802f 100644 --- a/arch/ia64/hp/sim/boot/fw-emu.c +++ b/arch/ia64/hp/sim/boot/fw-emu.c @@ -285,7 +285,7 @@ sys_fw_init (const char *args, int arglen) } cmd_line[arglen] = '\0'; - memset(efi_systab, 0, sizeof(efi_systab)); + memset(efi_systab, 0, sizeof(*efi_systab)); efi_systab->hdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; efi_systab->hdr.revision = ((1 << 16) | 00); efi_systab->hdr.headersize = sizeof(efi_systab->hdr); -- cgit v1.2.3-59-g8ed1b From 8d0a6e4da5ecde2022025ee764e4f7e425a53770 Mon Sep 17 00:00:00 2001 From: Lucas Woods Date: Tue, 6 Nov 2007 07:13:28 +1100 Subject: [IA64] Remove duplicate includes from ia32priv.h Don't need asm/processor.h twice Signed-off-by: Lucas Woods Signed-off-by: Tony Luck --- arch/ia64/ia32/ia32priv.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h index 466bbcb138b2..c5c872b250da 100644 --- a/arch/ia64/ia32/ia32priv.h +++ b/arch/ia64/ia32/ia32priv.h @@ -290,7 +290,6 @@ struct old_linux32_dirent { #define _ASM_IA64_ELF_H /* Don't include elf.h */ #include -#include /* * This is used to ensure we don't load something for the wrong architecture. -- cgit v1.2.3-59-g8ed1b From 4b07ae9b9d7b05a63e3ece32a666041949b7f421 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Tue, 6 Nov 2007 13:40:39 -0800 Subject: [IA64] Wrong args to memset in efi_gettimeofday() Not sizeof(ptr) ... we meant to say sizeof(*ptr). Also moved the memset to the error path (the normal path overwrites every field in the structure anyway) -Tony Signed-off-by: Li Zefan Signed-off-by: Tony Luck --- arch/ia64/kernel/efi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 6216eba2e38f..5181bf551f3c 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -218,9 +218,10 @@ efi_gettimeofday (struct timespec *ts) { efi_time_t tm; - memset(ts, 0, sizeof(ts)); - if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) + if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) { + memset(ts, 0, sizeof(*ts)); return; + } ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); ts->tv_nsec = tm.nanosecond; -- cgit v1.2.3-59-g8ed1b From 4b9ddc7cf272a0af321c22ef9c00d76384402d48 Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Tue, 6 Nov 2007 15:14:45 -0800 Subject: [IA64] Fix section mismatch in contig.c version of per_cpu_init() There is a section mismatch when building CONFIG_FLATMEM=y kernels that also have CONFIG_HOTPLUG_CPU=y WARNING: vmlinux.o(.text+0x5a902): Section mismatch: reference to \ .init.text:__alloc_bootmem (between 'per_cpu_init' and 'count_pages') The issue occurs because per_cpu_init() in mm/contig.c is marked __cpuinit (which is #define'd to nothing on a hot plug cpu configuration) call __alloc_bootmem() (which is an __init function). The usage is actually safe because the __alloc_bootmem() is inside an "if (first_time)" test so that the call is only made while it is still legal to do so. But the warning is irritating. Move the allocation to find_memory(). Signed-off-by: Tony Luck --- arch/ia64/mm/contig.c | 74 ++++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 33 deletions(-) (limited to 'arch') diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index d3c538be466c..7e9c275ea148 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c @@ -146,6 +146,46 @@ find_bootmap_location (unsigned long start, unsigned long end, void *arg) return 0; } +#ifdef CONFIG_SMP +static void *cpu_data; +/** + * per_cpu_init - setup per-cpu variables + * + * Allocate and setup per-cpu data areas. + */ +void * __cpuinit +per_cpu_init (void) +{ + int cpu; + static int first_time=1; + + /* + * get_free_pages() cannot be used before cpu_init() done. BSP + * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls + * get_zeroed_page(). + */ + if (first_time) { + first_time=0; + for (cpu = 0; cpu < NR_CPUS; cpu++) { + memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); + __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; + cpu_data += PERCPU_PAGE_SIZE; + per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; + } + } + return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; +} + +static inline void +alloc_per_cpu_data(void) +{ + cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, + PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); +} +#else +#define alloc_per_cpu_data() do { } while (0) +#endif /* CONFIG_SMP */ + /** * find_memory - setup memory map * @@ -182,41 +222,9 @@ find_memory (void) find_initrd(); + alloc_per_cpu_data(); } -#ifdef CONFIG_SMP -/** - * per_cpu_init - setup per-cpu variables - * - * Allocate and setup per-cpu data areas. - */ -void * __cpuinit -per_cpu_init (void) -{ - void *cpu_data; - int cpu; - static int first_time=1; - - /* - * get_free_pages() cannot be used before cpu_init() done. BSP - * allocates "NR_CPUS" pages for all CPUs to avoid that AP calls - * get_zeroed_page(). - */ - if (first_time) { - first_time=0; - cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, - PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); - for (cpu = 0; cpu < NR_CPUS; cpu++) { - memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); - __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; - cpu_data += PERCPU_PAGE_SIZE; - per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu]; - } - } - return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; -} -#endif /* CONFIG_SMP */ - static int count_pages (u64 start, u64 end, void *arg) { -- cgit v1.2.3-59-g8ed1b From c5d07d6ccc6710cad5815768c6d5e629c99b4dca Mon Sep 17 00:00:00 2001 From: Peter Chubb Date: Wed, 31 Oct 2007 11:45:50 +1100 Subject: [IA64] Add gate.lds to list of files ignored by Git If you build the kernel `in-place' then do a git update, git complains about arch/ia64/kernel/gate.lds being modified and untracked. Add that (generated) file to a .gitignore file. Signed-off-by: Peter Chubb Signed-off-by: Tony Luck --- arch/ia64/kernel/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 arch/ia64/kernel/.gitignore (limited to 'arch') diff --git a/arch/ia64/kernel/.gitignore b/arch/ia64/kernel/.gitignore new file mode 100644 index 000000000000..98307759a3b8 --- /dev/null +++ b/arch/ia64/kernel/.gitignore @@ -0,0 +1 @@ +gate.lds -- cgit v1.2.3-59-g8ed1b From adb34022eb7a11126fecef6b5abb4741a17360c6 Mon Sep 17 00:00:00 2001 From: Russ Anderson Date: Thu, 1 Nov 2007 16:00:04 -0500 Subject: [IA64] Clean-up McKinley Errata message No need to print "McKinley Errata 9 workaround not needed; disabling it" on every non-McKinley Itanium, which at this point is almost all of them. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck --- arch/ia64/kernel/patch.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index e796e29f8e15..2cb9425e0421 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c @@ -129,9 +129,6 @@ ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) first_time = 0; if (need_workaround) printk(KERN_INFO "Leaving McKinley Errata 9 workaround enabled\n"); - else - printk(KERN_INFO "McKinley Errata 9 workaround not needed; " - "disabling it\n"); } if (need_workaround) return; -- cgit v1.2.3-59-g8ed1b From 1f3b6045f783ee394076ad6dba2d72ecaaecd243 Mon Sep 17 00:00:00 2001 From: Russ Anderson Date: Wed, 31 Oct 2007 11:10:38 -0500 Subject: [IA64] Disable/re-enable CPE interrupts on Altix When the CPE handler encounters too many CPEs (such as a solid single bit memory error), it sets up a polling timer and disables the CPE interrupt (to avoid excessive overhead logging the stream of single bit errors). disable_irq_nosync() calls chip->disable() to provide a chipset specifiec interface for disabling the interrupt. This patch adds the Altix specific support to disable and re-enable the CPE interrupt. Signed-off-by: Russ Anderson (rja@sgi.com) Signed-off-by: Tony Luck --- arch/ia64/kernel/mca.c | 2 +- arch/ia64/sn/kernel/irq.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index cc87025e8f54..10b48cd15a87 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -571,7 +571,7 @@ out: * Outputs * None */ -static void __init +void ia64_mca_register_cpev (int cpev) { /* Register the CPE interrupt vector with SAL */ diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 0f9b12683bf3..53351c3cd7b1 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c @@ -5,7 +5,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2007 Silicon Graphics, Inc. All Rights Reserved. */ #include @@ -85,12 +85,18 @@ static void sn_shutdown_irq(unsigned int irq) { } +extern void ia64_mca_register_cpev(int); + static void sn_disable_irq(unsigned int irq) { + if (irq == local_vector_to_irq(IA64_CPE_VECTOR)) + ia64_mca_register_cpev(0); } static void sn_enable_irq(unsigned int irq) { + if (irq == local_vector_to_irq(IA64_CPE_VECTOR)) + ia64_mca_register_cpev(irq); } static void sn_ack_irq(unsigned int irq) -- cgit v1.2.3-59-g8ed1b From ddd6fc7923fbcfbb53f9431cbc981b1c12636e14 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Wed, 31 Oct 2007 20:06:13 +0900 Subject: [IA64] Clean up /proc/interrupts output Clean up /proc/interrupts output on the system that has 10 or more CPUs. Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck --- arch/ia64/kernel/irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 44be1c952b7c..6dee579f205f 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c @@ -61,9 +61,11 @@ int show_interrupts(struct seq_file *p, void *v) unsigned long flags; if (i == 0) { - seq_printf(p, " "); + char cpuname[16]; + seq_printf(p, " "); for_each_online_cpu(j) { - seq_printf(p, "CPU%d ",j); + snprintf(cpuname, 10, "CPU%d", j); + seq_printf(p, "%10s ", cpuname); } seq_putc(p, '\n'); } -- cgit v1.2.3-59-g8ed1b From 4c013f5c7ea39cd62e02c80408560751b4e8c0de Mon Sep 17 00:00:00 2001 From: Dean Nelson Date: Wed, 7 Nov 2007 07:53:06 -0600 Subject: [IA64] XPC heartbeat timer function must run on CPU 0 Currently, XPC's heartbeat timer function runs on whatever CPU modprobe/insmod ran on when XPC was started. To avoid the heartbeat from being delayed for long periods the timer function must run on CPU 0. N.B. Altix doesn't currently allow cpu0 to be taken offline, so this is safe for now. This code must be revised when offline of cpu0 is enabled. Signed-off-by: Dean Nelson Signed-off-by: Tony Luck --- arch/ia64/sn/kernel/xpc_main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'arch') diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index e336e1692a73..81785b78bc1e 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -3,7 +3,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2004-2007 Silicon Graphics, Inc. All Rights Reserved. */ @@ -257,7 +257,9 @@ xpc_hb_checker(void *ignore) set_cpus_allowed(current, cpumask_of_cpu(XPC_HB_CHECK_CPU)); + /* set our heartbeating to other partitions into motion */ xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ); + xpc_hb_beater(0); while (!(volatile int) xpc_exiting) { @@ -1338,16 +1340,8 @@ xpc_init(void) dev_warn(xpc_part, "can't register die notifier\n"); } - - /* - * Set the beating to other partitions into motion. This is - * the last requirement for other partitions' discovery to - * initiate communications with us. - */ init_timer(&xpc_hb_timer); xpc_hb_timer.function = xpc_hb_beater; - xpc_hb_beater(0); - /* * The real work-horse behind xpc. This processes incoming -- cgit v1.2.3-59-g8ed1b From c9d059def234d7cd60809a6a122102ff96d2d0ca Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Wed, 7 Nov 2007 15:38:30 +0900 Subject: [IA64] Fix IOSAPIC delivery mode setting Fix the problem that redirect hit bit in I/O SAPIC RTE is set even when it must be disabled (e.g. nointroute boot option is set, CPU hotplug is enabled or percpu vector is enabled). Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck --- arch/ia64/kernel/iosapic.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index cfe4654838f4..274a59383043 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -748,6 +748,15 @@ skip_numa_setup: #endif } +static inline unsigned char choose_dmode(void) +{ +#ifdef CONFIG_SMP + if (smp_int_redirect & SMP_IRQ_REDIRECTION) + return IOSAPIC_LOWEST_PRIORITY; +#endif + return IOSAPIC_FIXED; +} + /* * ACPI can describe IOSAPIC interrupts via static tables and namespace * methods. This provides an interface to register those interrupts and @@ -762,6 +771,7 @@ iosapic_register_intr (unsigned int gsi, unsigned long flags; struct iosapic_rte_info *rte; u32 low32; + unsigned char dmode; /* * If this GSI has already been registered (i.e., it's a @@ -791,8 +801,8 @@ iosapic_register_intr (unsigned int gsi, spin_lock(&irq_desc[irq].lock); dest = get_target_cpu(gsi, irq); - err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, - polarity, trigger); + dmode = choose_dmode(); + err = register_intr(gsi, irq, dmode, polarity, trigger); if (err < 0) { spin_unlock(&irq_desc[irq].lock); irq = err; @@ -961,10 +971,12 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, { int vector, irq; unsigned int dest = cpu_physical_id(smp_processor_id()); + unsigned char dmode; irq = vector = isa_irq_to_vector(isa_irq); BUG_ON(bind_irq_vector(irq, vector, CPU_MASK_ALL)); - register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, polarity, trigger); + dmode = choose_dmode(); + register_intr(gsi, irq, dmode, polarity, trigger); DBG("ISA: IRQ %u -> GSI %u (%s,%s) -> CPU %d (0x%04x) vector %d\n", isa_irq, gsi, trigger == IOSAPIC_EDGE ? "edge" : "level", -- cgit v1.2.3-59-g8ed1b From b8de471f37dcafc8892a2e58c80764d7af221715 Mon Sep 17 00:00:00 2001 From: Russ Anderson Date: Tue, 16 Oct 2007 17:02:38 -0500 Subject: [IA64] Update printing of feature set bits Newer Itanium versions have added additional processor feature set bits. This patch prints all the implemented feature set bits. Some bit descriptions have not been made public. For those bits, a generic "Feature set X bit Y" message is printed. Bits that are not implemented will no longer be printed. Signed-off-by: Russ Anderson Signed-off-by: Tony Luck --- arch/ia64/kernel/palinfo.c | 91 ++++++++++++++++++++++++++++++++++++++++------ include/asm-ia64/pal.h | 5 ++- 2 files changed, 82 insertions(+), 14 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 6ef6ffb943a0..396004e8cd14 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c @@ -470,7 +470,7 @@ register_info(char *page) return p - page; } -static const char *proc_features[]={ +static char *proc_features_0[]={ /* Feature set 0 */ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, @@ -502,25 +502,92 @@ static const char *proc_features[]={ "Enable BERR promotion" }; +static char *proc_features_16[]={ /* Feature set 16 */ + "Disable ETM", + "Enable ETM", + "Enable MCA on half-way timer", + "Enable snoop WC", + NULL, + "Enable Fast Deferral", + "Disable MCA on memory aliasing", + "Enable RSB", + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "DP system processor", + "Low Voltage", + "HT supported", + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL +}; + +static char **proc_features[]={ + proc_features_0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + proc_features_16, + NULL, NULL, NULL, NULL, +}; + +static char * +feature_set_info(char *page, u64 avail, u64 status, u64 control, u64 set) +{ + char *p = page; + char **vf, **v; + int i; + + vf = v = proc_features[set]; + for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) { + + if (!(control)) /* No remaining bits set */ + break; + if (!(avail & 0x1)) /* Print only bits that are available */ + continue; + if (vf) + v = vf + i; + if ( v && *v ) { + p += sprintf(p, "%-40s : %s %s\n", *v, + avail & 0x1 ? (status & 0x1 ? + "On " : "Off"): "", + avail & 0x1 ? (control & 0x1 ? + "Ctrl" : "NoCtrl"): ""); + } else { + p += sprintf(p, "Feature set %2ld bit %2d\t\t\t" + " : %s %s\n", + set, i, + avail & 0x1 ? (status & 0x1 ? + "On " : "Off"): "", + avail & 0x1 ? (control & 0x1 ? + "Ctrl" : "NoCtrl"): ""); + } + } + return p; +} static int processor_info(char *page) { char *p = page; - const char **v = proc_features; - u64 avail=1, status=1, control=1; - int i; + u64 avail=1, status=1, control=1, feature_set=0; s64 ret; - if ((ret=ia64_pal_proc_get_features(&avail, &status, &control)) != 0) return 0; + do { + ret = ia64_pal_proc_get_features(&avail, &status, &control, + feature_set); + if (ret < 0) { + return p - page; + } + if (ret == 1) { + feature_set++; + continue; + } + + p = feature_set_info(p, avail, status, control, feature_set); + + feature_set++; + } while(1); - for(i=0; i < 64; i++, v++,avail >>=1, status >>=1, control >>=1) { - if ( ! *v ) continue; - p += sprintf(p, "%-40s : %s%s %s\n", *v, - avail & 0x1 ? "" : "NotImpl", - avail & 0x1 ? (status & 0x1 ? "On" : "Off"): "", - avail & 0x1 ? (control & 0x1 ? "Ctrl" : "NoCtrl"): ""); - } return p - page; } diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index abfcb3a2588f..8a695d3407d2 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h @@ -1379,10 +1379,11 @@ struct pal_features_s; static inline s64 ia64_pal_proc_get_features (u64 *features_avail, u64 *features_status, - u64 *features_control) + u64 *features_control, + u64 features_set) { struct ia64_pal_retval iprv; - PAL_CALL_PHYS(iprv, PAL_PROC_GET_FEATURES, 0, 0, 0); + PAL_CALL_PHYS(iprv, PAL_PROC_GET_FEATURES, 0, features_set, 0); if (iprv.status == 0) { *features_avail = iprv.v0; *features_status = iprv.v1; -- cgit v1.2.3-59-g8ed1b From 7f6ff62a8f3a4e68258958196098c6f71563ae61 Mon Sep 17 00:00:00 2001 From: George Beshers Date: Thu, 11 Oct 2007 15:33:55 -0400 Subject: [IA64] IOSAPIC bogus error cleanup On Altix (sn2) machines the "Error parsing MADT" message is misleading because the lack of IOSAPIC entries is expected. Since I am sure someone will ask, I have been told that the chance of this changing anytime soon is close to nil. Signed-off-by: George Beshers Signed-off-by: Tony Luck --- arch/ia64/kernel/acpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 3d45d24a9d61..897e2083a3b1 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -678,9 +678,11 @@ int __init acpi_boot_init(void) /* I/O APIC */ if (acpi_table_parse_madt - (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) - printk(KERN_ERR PREFIX - "Error parsing MADT - no IOSAPIC entries\n"); + (ACPI_MADT_TYPE_IO_SAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1) { + if (!ia64_platform_is("sn2")) + printk(KERN_ERR PREFIX + "Error parsing MADT - no IOSAPIC entries\n"); + } /* System-Level Interrupt Routing */ -- cgit v1.2.3-59-g8ed1b