GIT ef4b60f4141f1762c53d037f84b15a68058a16da git+ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git#test commit a66aa704d6f332b001dfb0e787c92b2c61c75081 Author: Kenji Kaneshige Date: Tue May 22 10:20:36 2007 -0700 [IA64] fix kmalloc(0) in arch/ia64/pci/pci.c Hiroyuki Kamezawa reported the problem that pci_acpi_scan_root() of ia64 might call kmalloc_node() with zero size. Currently ia64's pci_acpi_scan_root() assumes that _CRS method of root bridge has at least one resource window. But, the root bridges that has no resource window must be taken into account. Signed-off-by: Kenji Kaneshige Signed-off-by: Andrew Morton Signed-off-by: Tony Luck commit 6ae384884d936cb39ab20238af34689933e44525 Author: Robin Holt Date: Fri May 18 13:46:52 2007 -0500 [IA64] Only unwind non-running tasks. Unwinding a running task has proven problematic. In one instance, the running task was attempting to unwind itself and received an interrupt between when get_wchan allocated local variables on the stack and when unw_init_from_blocked_task was called which resulted in unw_init_frame_info to place this tasks task_struct pointer over the switch stack's ar_bspstore entry. Signed-off-by: Robin Holt Signed-off-by: Tony Luck commit e2e6fe7bb6e30621ad4e8a3acb1e711815c239bd Author: Robin Holt Date: Fri May 18 13:46:23 2007 -0500 [IA64] Improve unwind checking. This patch adds some sanity checks to keep register and memory stack pointers in the unw_frame_info structure within the tasks stack address range. Signed-off-by: Robin Holt Signed-off-by: Tony Luck commit a8c8be08e023cf65f103442d1c71710fad7a0905 Author: Tony Luck Date: Fri May 18 15:11:34 2007 -0700 [IA64] Yet another section mismatch warning reference to .init.data: from .text between 'sn_cpu_init' (at offset 0x1411) and 'nasid_slice_to_cpuid' reference to .init.data: from .text between 'sn_cpu_init' (at offset 0x1420) and 'nasid_slice_to_cpuid' The offending .init.data object is shub_1_1_found which should be declared in __cpuinitdata, not in __initdata Signed-off-by: Tony Luck commit 9f57195b2db94488999c9cb8a1e0a6332644d5de Author: Tony Luck Date: Fri May 18 14:15:58 2007 -0700 [IA64] Fix bogus messages about system calls not implemented. There are seven legacy system calls that ia64 doesn't implement, but glibc provides equivalent functionality by using more modern system calls. Stop checksyscalls.sh from complaining about these seven. Signed-off-by: Tony Luck commit 3c3344ca815487568d617860894898737677600a Author: Tony Luck Date: Fri May 11 15:18:45 2007 -0700 [IA64] s/scalibility/scalability/ Previous spelling patch from Simon Arlott broke one spot that didn't need fixing (reported by Simon within 35 minutes of the patch ... but not until after I'd applied to GIT and pushed :-( Signed-off-by: Tony Luck commit a19d4e1a15544a12b811c161039212a2cf63e70c Author: Tony Luck Date: Tue Mar 6 15:41:24 2007 -0800 Revert "[IA64] add idle loop entry/exit notifier" By request from Stephane: This reverts commit 041be4f00312683016c49362f4575aa4cbc264b3. He has an alternative way to do this. Signed-off-by: Tony Luck commit 041be4f00312683016c49362f4575aa4cbc264b3 Author: Stephane Eranian Date: Wed Nov 15 14:23:34 2006 -0800 [IA64] add idle loop entry/exit notifier - add a notifier to the idle loop to get called when entering/leaving the lowest level of the idle loop - migrate SGI LED acitvity over to using the idle notifier Signed-off-by: stephane eranian Signed-off-by: Tony Luck commit 7ab62884069d6d300812fc2b07f1c2332e0882c6 Author: Maeda Naoaki Date: Thu Oct 26 14:50:43 2006 -0700 [IA64] Kdump don't clear vector in kexec_disable_iosapic Mask IOSAPIC will make the following EOI write to IOSAPIC fail because IOSAPIC will not be able to find RTE entry. However move EOI write before IOSAPIC mask will leave a small racy windows between them for interrupts. So mask IOSAPIC but leave the vector field. Signed-off-by: Zou Nan hai Signed-off-by: Tony Luck commit 1050658418ee3d0d385b8679edd1c86941860ab2 Author: Zou Nan hai Date: Wed Oct 25 12:25:59 2006 +0800 [IA64] Kdump Fix fc.i offset in relocate_kernel.S There is 8 byte wrong offset in icache flush instruction in relocate_kernel.S. Which may cause normal Kexec(not kdump) fail on Montecito Box. Signed-off-by: Zou Nan hai Signed-off-by: Tony Luck commit 40eee8ab3441cc4d4fcb7cfbdbd339e7b583f846 Author: Khalid Aziz Date: Thu Oct 12 13:19:45 2006 -0600 [IA64] Fix compile failure with CONFIG_KEXEC but not CONFIG_CRASH_DUMP 2.6.18 kernel patched with kexec/kdump patch from Tony's test tree fails to compile if CONFIG_KEXEC is turned on but CONFIG_CRASH_DUMP is not. Following patch fixes this. Signed-off-by: Khalid Aziz Acked-by: Simon Horman Signed-off-by: Tony Luck commit e1983ff22209e0de0595abe9b61d30078ef3ccb9 Author: Michal Piotrowski Date: Tue Oct 10 14:25:29 2006 -0700 [IA64] kill #include "linux/config.h" config.h is obsolete. This patch removes all #include "linux/config.h". (specifically the one in arch/ia64/kernel/relocate_kernel.S) Signed-off-by: Michal Piotrowski Cc: "Luck, Tony" Signed-off-by: Andrew Morton Signed-off-by: Tony Luck commit dc52454505ea87f0e6d4dab534acdd29ef33e7df Author: Zou Nan hai Date: Mon Oct 2 13:51:30 2006 -0700 [IA64] Kexec/Kdump for Itanium Distillation of work largely by Zou Nan hai (who gets Author credit because 'git' only seems to support one author) but also inspired by Khalid Aziz, Simon Horman, and a few others whom I'm too lazy to look up in the mailing list archives, but whose support I appreciate. Signed-off-by: Tony Luck arch/ia64/kernel/process.c | 5 +++++ arch/ia64/kernel/unwind.c | 21 ++++++++++++++------- arch/ia64/pci/pci.c | 11 +++++++---- arch/ia64/sn/kernel/setup.c | 2 +- include/asm-ia64/unistd.h | 13 +++++++++++++ 5 files changed, 40 insertions(+), 12 deletions(-) diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index d1c3ed9..af73b8d 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -763,6 +763,9 @@ get_wchan (struct task_struct *p) unsigned long ip; int count = 0; + if (!p || p == current || p->state == TASK_RUNNING) + return 0; + /* * Note: p may not be a blocked task (it could be current or * another process running on some other CPU. Rather than @@ -773,6 +776,8 @@ get_wchan (struct task_struct *p) */ unw_init_from_blocked_task(&info, p); do { + if (p->state == TASK_RUNNING) + return 0; if (unw_unwind(&info) < 0) return 0; unw_get_ip(&info, &ip); diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c index 7d3dd6c..b0b08b5 100644 --- a/arch/ia64/kernel/unwind.c +++ b/arch/ia64/kernel/unwind.c @@ -1860,7 +1860,7 @@ int unw_unwind (struct unw_frame_info *info) { unsigned long prev_ip, prev_sp, prev_bsp; - unsigned long ip, pr, num_regs; + unsigned long ip, pr, num_regs, rp_loc, pfs_loc; STAT(unsigned long start, flags;) int retval; @@ -1870,14 +1870,16 @@ unw_unwind (struct unw_frame_info *info) prev_sp = info->sp; prev_bsp = info->bsp; - /* restore the ip */ - if (!info->rp_loc) { + /* validate the return IP pointer */ + rp_loc = (unsigned long) info->rp_loc; + if ((rp_loc < info->regstk.limit) || (rp_loc > info->regstk.top)) { /* FIXME: should really be level 0 but it occurs too often. KAO */ UNW_DPRINT(1, "unwind.%s: failed to locate return link (ip=0x%lx)!\n", __FUNCTION__, info->ip); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } + /* restore the ip */ ip = info->ip = *info->rp_loc; if (ip < GATE_ADDR) { UNW_DPRINT(2, "unwind.%s: reached user-space (ip=0x%lx)\n", __FUNCTION__, ip); @@ -1885,12 +1887,14 @@ unw_unwind (struct unw_frame_info *info) return -1; } - /* restore the cfm: */ - if (!info->pfs_loc) { + /* validate the previous stack frame pointer */ + pfs_loc = (unsigned long) info->pfs_loc; + if ((pfs_loc < info->regstk.limit) || (pfs_loc > info->regstk.top)) { UNW_DPRINT(0, "unwind.%s: failed to locate ar.pfs!\n", __FUNCTION__); STAT(unw.stat.api.unwind_time += ia64_get_itc() - start; local_irq_restore(flags)); return -1; } + /* restore the cfm: */ info->cfm_loc = info->pfs_loc; /* restore the bsp: */ @@ -1992,13 +1996,16 @@ init_frame_info (struct unw_frame_info * memset(info, 0, sizeof(*info)); rbslimit = (unsigned long) t + IA64_RBS_OFFSET; + stklimit = (unsigned long) t + IA64_STK_OFFSET; + rbstop = sw->ar_bspstore; - if (rbstop - (unsigned long) t >= IA64_STK_OFFSET) + if (rbstop > stklimit || rbstop < rbslimit) rbstop = rbslimit; - stklimit = (unsigned long) t + IA64_STK_OFFSET; if (stktop <= rbstop) stktop = rbstop; + if (stktop > stklimit) + stktop = stklimit; info->regstk.limit = rbslimit; info->regstk.top = rbstop; diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 3549f3b..73696b4 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -354,10 +354,13 @@ #endif acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, &windows); - controller->window = kmalloc_node(sizeof(*controller->window) * windows, - GFP_KERNEL, controller->node); - if (!controller->window) - goto out2; + if (windows) { + controller->window = + kmalloc_node(sizeof(*controller->window) * windows, + GFP_KERNEL, controller->node); + if (!controller->window) + goto out2; + } name = kmalloc(16, GFP_KERNEL); if (!name) diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index a574fcd..684b1c9 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c @@ -194,7 +194,7 @@ void __init early_sn_setup(void) } extern int platform_intr_list[]; -static int __initdata shub_1_1_found; +static int __cpuinitdata shub_1_1_found; /* * sn_check_for_wars diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index d7781a2..441c9e0 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -305,6 +305,19 @@ #ifdef __KERNEL__ #define NR_syscalls 286 /* length of syscall table */ +/* + * The following defines stop scripts/checksyscalls.sh from complaining about + * unimplemented system calls. Glibc provides for each of these by using + * more modern equivalent system calls. + */ +#define __IGNORE_fork /* clone() */ +#define __IGNORE_time /* gettimeofday() */ +#define __IGNORE_alarm /* setitimer(ITIMER_REAL, ... */ +#define __IGNORE_pause /* rt_sigprocmask(), rt_sigsuspend() */ +#define __IGNORE_utime /* utimes() */ +#define __IGNORE_getpgrp /* getpgid() */ +#define __IGNORE_vfork /* clone() */ + #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND