From 9ed2ad8648eb974ee670045d41b5a51b763e3aa1 Mon Sep 17 00:00:00 2001 From: "Chen, Kenneth W" Date: Tue, 31 Jan 2006 14:26:25 -0800 Subject: [IA64] add syscall entry for *at() Wire up the ia64 syscalls for *at() functions. Signed-off-by: Ken Chen Signed-off-by: Tony Luck --- arch/ia64/kernel/entry.S | 13 +++++++++++++ arch/ia64/kernel/fsys.S | 29 +++-------------------------- include/asm-ia64/unistd.h | 13 +++++++++++++ 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 7a6ffd61378..6b88de8d91f 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -1601,5 +1601,18 @@ sys_call_table: data8 sys_inotify_add_watch data8 sys_inotify_rm_watch data8 sys_migrate_pages // 1280 + data8 sys_openat + data8 sys_mkdirat + data8 sys_mknodat + data8 sys_fchownat + data8 sys_futimesat // 1285 + data8 sys_newfstatat + data8 sys_unlinkat + data8 sys_renameat + data8 sys_linkat + data8 sys_symlinkat // 1290 + data8 sys_readlinkat + data8 sys_fchmodat + data8 sys_faccessat .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index ce423910ca9..ac6055c8311 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S @@ -878,31 +878,8 @@ fsyscall_table: data8 0 // timer_delete data8 0 // clock_settime data8 fsys_clock_gettime // clock_gettime - data8 0 // clock_getres // 1255 - data8 0 // clock_nanosleep - data8 0 // fstatfs64 - data8 0 // statfs64 - data8 0 - data8 0 // 1260 - data8 0 - data8 0 // mq_open - data8 0 // mq_unlink - data8 0 // mq_timedsend - data8 0 // mq_timedreceive // 1265 - data8 0 // mq_notify - data8 0 // mq_getsetattr - data8 0 // kexec_load - data8 0 - data8 0 // 1270 - data8 0 - data8 0 - data8 0 - data8 0 - data8 0 // 1275 - data8 0 - data8 0 - data8 0 - data8 0 - data8 0 // 1280 + #define __NR_syscall_last 1255 + + .space 8*(NR_syscalls + 1024 - __NR_syscall_last), 0 .org fsyscall_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 962f9bd1bdf..a151eb1fc73 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -270,6 +270,19 @@ #define __NR_inotify_add_watch 1278 #define __NR_inotify_rm_watch 1279 #define __NR_migrate_pages 1280 +#define __NR_openat 1281 +#define __NR_mkdirat 1282 +#define __NR_mknodat 1283 +#define __NR_fchownat 1284 +#define __NR_futimesat 1285 +#define __NR_newfstatat 1286 +#define __NR_unlinkat 1287 +#define __NR_renameat 1288 +#define __NR_linkat 1289 +#define __NR_symlinkat 1290 +#define __NR_readlinkat 1291 +#define __NR_fchmodat 1292 +#define __NR_faccessat 1293 #ifdef __KERNEL__ -- cgit v1.2.3 From 9621a4ef8a29d11118f44def053931bcafb0dfc2 Mon Sep 17 00:00:00 2001 From: Janak Desai Date: Wed, 8 Feb 2006 15:43:38 -0800 Subject: [IA64] unshare system call registration for ia64 Registers system call for the ia64 architecture. Reserves space for ppoll and pselect, and adds unshare at system call number 1296. Signed-off-by: Janak Desai Signed-off-by: Tony Luck --- arch/ia64/kernel/entry.S | 3 +++ include/asm-ia64/unistd.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 6b88de8d91f..27b222c277e 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S @@ -1614,5 +1614,8 @@ sys_call_table: data8 sys_readlinkat data8 sys_fchmodat data8 sys_faccessat + data8 sys_ni_syscall // reserved for pselect + data8 sys_ni_syscall // 1295 reserved for ppoll + data8 sys_unshare .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index a151eb1fc73..019956c613e 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -283,12 +283,14 @@ #define __NR_readlinkat 1291 #define __NR_fchmodat 1292 #define __NR_faccessat 1293 +/* 1294, 1295 reserved for pselect/ppoll */ +#define __NR_unshare 1296 #ifdef __KERNEL__ #include -#define NR_syscalls 270 /* length of syscall table */ +#define NR_syscalls 273 /* length of syscall table */ #define __ARCH_WANT_SYS_RT_SIGACTION -- cgit v1.2.3 From 8b34ff427d6f3b0a1207829350b9db16376f88c5 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Thu, 9 Feb 2006 14:12:24 -0800 Subject: [IA64-SGI] Hotplug driver related fix in the SN ia64 code. Remove an erroneous kfree, and unlink the pcidev_info struct from the pcidev_info list prior to free'ing the pcidev_info struct. Signed-off-by: Prarit Bhargava Signed-off-by: Tony Luck --- arch/ia64/sn/kernel/io_init.c | 2 ++ arch/ia64/sn/kernel/irq.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index d7e4d79e16a..2e4e56be8df 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -623,6 +623,8 @@ sn_sysdata_free_start: list_for_each(list, &sn_sysdata_list) { element = list_entry(list, struct sysdata_el, entry); list_del(&element->entry); + list_del(&(((struct pcidev_info *) + (element->sysdata))->pdi_list)); kfree(element->sysdata); kfree(element); goto sn_sysdata_free_start; diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 74d87d903d5..c373113d073 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c @@ -299,7 +299,9 @@ void sn_irq_unfixup(struct pci_dev *pci_dev) return; sn_irq_info = SN_PCIDEV_INFO(pci_dev)->pdi_sn_irq_info; - if (!sn_irq_info || !sn_irq_info->irq_irq) { + if (!sn_irq_info) + return; + if (!sn_irq_info->irq_irq) { kfree(sn_irq_info); return; } -- cgit v1.2.3 From b6bb761897d3b0225fa9d61fc4782b02bab9a6e1 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Thu, 9 Feb 2006 14:14:52 -0800 Subject: [IA64-SGI] Small cleanup for misuse of list_for_each to list_for_each_safe. Patch was suggested by Kenneth W. Chen here Signed-off-by: Prarit Bhargava Signed-off-by: Tony Luck --- arch/ia64/sn/kernel/io_init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 2e4e56be8df..3437c239042 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -617,17 +617,15 @@ void sn_bus_store_sysdata(struct pci_dev *dev) void sn_bus_free_sysdata(void) { struct sysdata_el *element; - struct list_head *list; + struct list_head *list, *safe; -sn_sysdata_free_start: - list_for_each(list, &sn_sysdata_list) { + list_for_each_safe(list, safe, &sn_sysdata_list) { element = list_entry(list, struct sysdata_el, entry); list_del(&element->entry); list_del(&(((struct pcidev_info *) (element->sysdata))->pdi_list)); kfree(element->sysdata); kfree(element); - goto sn_sysdata_free_start; } return; } -- cgit v1.2.3 From 1ff0be1534839dabec85f6d16dc36734f4e158bf Mon Sep 17 00:00:00 2001 From: Tony Luck Date: Thu, 9 Feb 2006 14:41:41 -0800 Subject: [IA64] sys32_signal() forgets to initialize ->sa_mask Pointed out by Oleg Nesterov , who in turn got the hint from Linus. Signed-off-by: Tony Luck --- arch/ia64/ia32/ia32_signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index 5856510210f..b3355a9ca2c 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c @@ -515,6 +515,7 @@ sys32_signal (int sig, unsigned int handler) sigact_set_handler(&new_sa, handler, 0); new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK; + sigemptyset(&new_sa.sa.sa_mask); ret = do_sigaction(sig, &new_sa, &old_sa); -- cgit v1.2.3 From a94746461765dae41fb82e4dac027d14af4d80d8 Mon Sep 17 00:00:00 2001 From: Hidetoshi Seto Date: Thu, 9 Feb 2006 14:42:55 -0800 Subject: [IA64] mca_drv: Add minstate validation MCA driver can cause panic if kernel gets a state info with no minstate. This patch adds minstate validation before handling it. Signed-off-by: Hidetoshi Seto Signed-off-by: Tony Luck --- arch/ia64/kernel/mca_drv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 3492e3211a4..8fd93afa75a 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c @@ -437,6 +437,9 @@ recover_from_read_error(slidx_table_t *slidx, * the process not have any locks of kernel. */ + /* Is minstate valid? */ + if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) + return 0; psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); /* -- cgit v1.2.3