Loading arch/ia64/ia32/sys_ia32.c +12 −16 Original line number Diff line number Diff line Loading @@ -52,9 +52,9 @@ #include <linux/compat.h> #include <linux/vfs.h> #include <linux/mman.h> #include <linux/mutex.h> #include <asm/intrinsics.h> #include <asm/semaphore.h> #include <asm/types.h> #include <asm/uaccess.h> #include <asm/unistd.h> Loading Loading @@ -86,7 +86,7 @@ * while doing so. */ /* XXX make per-mm: */ static DECLARE_MUTEX(ia32_mmap_sem); static DEFINE_MUTEX(ia32_mmap_mutex); asmlinkage long sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __user *envp, Loading Loading @@ -895,11 +895,11 @@ ia32_do_mmap (struct file *file, unsigned long addr, unsigned long len, int prot prot = get_prot32(prot); #if PAGE_SHIFT > IA32_PAGE_SHIFT down(&ia32_mmap_sem); mutex_lock(&ia32_mmap_mutex); { addr = emulate_mmap(file, addr, len, prot, flags, offset); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); #else down_write(¤t->mm->mmap_sem); { Loading Loading @@ -1000,11 +1000,9 @@ sys32_munmap (unsigned int start, unsigned int len) if (start >= end) return 0; down(&ia32_mmap_sem); { mutex_lock(&ia32_mmap_mutex); ret = sys_munmap(start, end - start); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); #endif return ret; } Loading Loading @@ -1056,7 +1054,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) if (retval < 0) return retval; down(&ia32_mmap_sem); mutex_lock(&ia32_mmap_mutex); { if (offset_in_page(start)) { /* start address is 4KB aligned but not page aligned. */ Loading @@ -1080,7 +1078,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) retval = sys_mprotect(start, end - start, prot); } out: up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); return retval; #endif } Loading Loading @@ -1124,11 +1122,9 @@ sys32_mremap (unsigned int addr, unsigned int old_len, unsigned int new_len, old_len = PAGE_ALIGN(old_end) - addr; new_len = PAGE_ALIGN(new_end) - addr; down(&ia32_mmap_sem); { mutex_lock(&ia32_mmap_mutex); ret = sys_mremap(addr, old_len, new_len, flags, new_addr); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); if ((ret >= 0) && (old_len < new_len)) { /* mremap expanded successfully */ Loading arch/ia64/kernel/perfmon.c +6 −5 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <linux/bitops.h> #include <linux/capability.h> #include <linux/rcupdate.h> #include <linux/completion.h> #include <asm/errno.h> #include <asm/intrinsics.h> Loading Loading @@ -286,7 +287,7 @@ typedef struct pfm_context { unsigned long ctx_ovfl_regs[4]; /* which registers overflowed (notification) */ struct semaphore ctx_restart_sem; /* use for blocking notification mode */ struct completion ctx_restart_done; /* use for blocking notification mode */ unsigned long ctx_used_pmds[4]; /* bitmask of PMD used */ unsigned long ctx_all_pmds[4]; /* bitmask of all accessible PMDs */ Loading Loading @@ -1991,7 +1992,7 @@ pfm_close(struct inode *inode, struct file *filp) /* * force task to wake up from MASKED state */ up(&ctx->ctx_restart_sem); complete(&ctx->ctx_restart_done); DPRINT(("waking up ctx_state=%d\n", state)); Loading Loading @@ -2706,7 +2707,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg /* * init restart semaphore to locked */ sema_init(&ctx->ctx_restart_sem, 0); init_completion(&ctx->ctx_restart_done); /* * activation is used in SMP only Loading Loading @@ -3687,7 +3688,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) */ if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { DPRINT(("unblocking [%d] \n", task->pid)); up(&ctx->ctx_restart_sem); complete(&ctx->ctx_restart_done); } else { DPRINT(("[%d] armed exit trap\n", task->pid)); Loading Loading @@ -5089,7 +5090,7 @@ pfm_handle_work(void) * may go through without blocking on SMP systems * if restart has been received already by the time we call down() */ ret = down_interruptible(&ctx->ctx_restart_sem); ret = wait_for_completion_interruptible(&ctx->ctx_restart_done); DPRINT(("after block sleeping ret=%d\n", ret)); Loading arch/ia64/kernel/uncached.c +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ uncached_build_memmap(unsigned long start, unsigned long end, void *arg) dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); touch_softlockup_watchdog(); memset((char *)start, 0, length); node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET); Loading arch/ia64/sn/include/xtalk/hubdev.h +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ struct sn_flush_device_kernel { struct sn_flush_device_common *common; }; /* 01/16/06 This struct is the old PROM/kernel struct and needs to be included * for older official PROMs to function on the new kernel base. This struct * will be removed when the next official PROM release occurs. */ struct sn_flush_device_war { struct sn_flush_device_common common; u32 filler; /* older PROMs expect the default size of a spinlock_t */ }; /* * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel. */ Loading arch/ia64/sn/kernel/io_init.c +51 −3 Original line number Diff line number Diff line Loading @@ -165,6 +165,43 @@ sn_pcidev_info_get(struct pci_dev *dev) return NULL; } /* Older PROM flush WAR * * 01/16/06 -- This war will be in place until a new official PROM is released. * Additionally note that the struct sn_flush_device_war also has to be * removed from arch/ia64/sn/include/xtalk/hubdev.h */ static u8 war_implemented = 0; static void sn_device_fixup_war(u64 nasid, u64 widget, int device, struct sn_flush_device_common *common) { struct sn_flush_device_war *war_list; struct sn_flush_device_war *dev_entry; struct ia64_sal_retval isrv = {0,0,0,0}; if (!war_implemented) { printk(KERN_WARNING "PROM version < 4.50 -- implementing old " "PROM flush WAR\n"); war_implemented = 1; } war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); if (!war_list) BUG(); SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, nasid, widget, __pa(war_list), 0, 0, 0 ,0); if (isrv.status) panic("sn_device_fixup_war failed: %s\n", ia64_sal_strerror(isrv.status)); dev_entry = war_list + device; memcpy(common,dev_entry, sizeof(*common)); kfree(war_list); } /* * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for * each node in the system. Loading Loading @@ -246,8 +283,19 @@ static void sn_fixup_ionodes(void) widget, device, (u64)(dev_entry->common)); if (status) if (status) { if (sn_sal_rev() < 0x0450) { /* shortlived WAR for older * PROM images */ sn_device_fixup_war(nasid, widget, device, dev_entry->common); } else BUG(); } spin_lock_init(&dev_entry->sfdl_flush_lock); } Loading Loading
arch/ia64/ia32/sys_ia32.c +12 −16 Original line number Diff line number Diff line Loading @@ -52,9 +52,9 @@ #include <linux/compat.h> #include <linux/vfs.h> #include <linux/mman.h> #include <linux/mutex.h> #include <asm/intrinsics.h> #include <asm/semaphore.h> #include <asm/types.h> #include <asm/uaccess.h> #include <asm/unistd.h> Loading Loading @@ -86,7 +86,7 @@ * while doing so. */ /* XXX make per-mm: */ static DECLARE_MUTEX(ia32_mmap_sem); static DEFINE_MUTEX(ia32_mmap_mutex); asmlinkage long sys32_execve (char __user *name, compat_uptr_t __user *argv, compat_uptr_t __user *envp, Loading Loading @@ -895,11 +895,11 @@ ia32_do_mmap (struct file *file, unsigned long addr, unsigned long len, int prot prot = get_prot32(prot); #if PAGE_SHIFT > IA32_PAGE_SHIFT down(&ia32_mmap_sem); mutex_lock(&ia32_mmap_mutex); { addr = emulate_mmap(file, addr, len, prot, flags, offset); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); #else down_write(¤t->mm->mmap_sem); { Loading Loading @@ -1000,11 +1000,9 @@ sys32_munmap (unsigned int start, unsigned int len) if (start >= end) return 0; down(&ia32_mmap_sem); { mutex_lock(&ia32_mmap_mutex); ret = sys_munmap(start, end - start); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); #endif return ret; } Loading Loading @@ -1056,7 +1054,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) if (retval < 0) return retval; down(&ia32_mmap_sem); mutex_lock(&ia32_mmap_mutex); { if (offset_in_page(start)) { /* start address is 4KB aligned but not page aligned. */ Loading @@ -1080,7 +1078,7 @@ sys32_mprotect (unsigned int start, unsigned int len, int prot) retval = sys_mprotect(start, end - start, prot); } out: up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); return retval; #endif } Loading Loading @@ -1124,11 +1122,9 @@ sys32_mremap (unsigned int addr, unsigned int old_len, unsigned int new_len, old_len = PAGE_ALIGN(old_end) - addr; new_len = PAGE_ALIGN(new_end) - addr; down(&ia32_mmap_sem); { mutex_lock(&ia32_mmap_mutex); ret = sys_mremap(addr, old_len, new_len, flags, new_addr); } up(&ia32_mmap_sem); mutex_unlock(&ia32_mmap_mutex); if ((ret >= 0) && (old_len < new_len)) { /* mremap expanded successfully */ Loading
arch/ia64/kernel/perfmon.c +6 −5 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <linux/bitops.h> #include <linux/capability.h> #include <linux/rcupdate.h> #include <linux/completion.h> #include <asm/errno.h> #include <asm/intrinsics.h> Loading Loading @@ -286,7 +287,7 @@ typedef struct pfm_context { unsigned long ctx_ovfl_regs[4]; /* which registers overflowed (notification) */ struct semaphore ctx_restart_sem; /* use for blocking notification mode */ struct completion ctx_restart_done; /* use for blocking notification mode */ unsigned long ctx_used_pmds[4]; /* bitmask of PMD used */ unsigned long ctx_all_pmds[4]; /* bitmask of all accessible PMDs */ Loading Loading @@ -1991,7 +1992,7 @@ pfm_close(struct inode *inode, struct file *filp) /* * force task to wake up from MASKED state */ up(&ctx->ctx_restart_sem); complete(&ctx->ctx_restart_done); DPRINT(("waking up ctx_state=%d\n", state)); Loading Loading @@ -2706,7 +2707,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *reg /* * init restart semaphore to locked */ sema_init(&ctx->ctx_restart_sem, 0); init_completion(&ctx->ctx_restart_done); /* * activation is used in SMP only Loading Loading @@ -3687,7 +3688,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) */ if (CTX_OVFL_NOBLOCK(ctx) == 0 && state == PFM_CTX_MASKED) { DPRINT(("unblocking [%d] \n", task->pid)); up(&ctx->ctx_restart_sem); complete(&ctx->ctx_restart_done); } else { DPRINT(("[%d] armed exit trap\n", task->pid)); Loading Loading @@ -5089,7 +5090,7 @@ pfm_handle_work(void) * may go through without blocking on SMP systems * if restart has been received already by the time we call down() */ ret = down_interruptible(&ctx->ctx_restart_sem); ret = wait_for_completion_interruptible(&ctx->ctx_restart_done); DPRINT(("after block sleeping ret=%d\n", ret)); Loading
arch/ia64/kernel/uncached.c +1 −0 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ uncached_build_memmap(unsigned long start, unsigned long end, void *arg) dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); touch_softlockup_watchdog(); memset((char *)start, 0, length); node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET); Loading
arch/ia64/sn/include/xtalk/hubdev.h +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ struct sn_flush_device_kernel { struct sn_flush_device_common *common; }; /* 01/16/06 This struct is the old PROM/kernel struct and needs to be included * for older official PROMs to function on the new kernel base. This struct * will be removed when the next official PROM release occurs. */ struct sn_flush_device_war { struct sn_flush_device_common common; u32 filler; /* older PROMs expect the default size of a spinlock_t */ }; /* * **widget_p - Used as an array[wid_num][device] of sn_flush_device_kernel. */ Loading
arch/ia64/sn/kernel/io_init.c +51 −3 Original line number Diff line number Diff line Loading @@ -165,6 +165,43 @@ sn_pcidev_info_get(struct pci_dev *dev) return NULL; } /* Older PROM flush WAR * * 01/16/06 -- This war will be in place until a new official PROM is released. * Additionally note that the struct sn_flush_device_war also has to be * removed from arch/ia64/sn/include/xtalk/hubdev.h */ static u8 war_implemented = 0; static void sn_device_fixup_war(u64 nasid, u64 widget, int device, struct sn_flush_device_common *common) { struct sn_flush_device_war *war_list; struct sn_flush_device_war *dev_entry; struct ia64_sal_retval isrv = {0,0,0,0}; if (!war_implemented) { printk(KERN_WARNING "PROM version < 4.50 -- implementing old " "PROM flush WAR\n"); war_implemented = 1; } war_list = kzalloc(DEV_PER_WIDGET * sizeof(*war_list), GFP_KERNEL); if (!war_list) BUG(); SAL_CALL_NOLOCK(isrv, SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST, nasid, widget, __pa(war_list), 0, 0, 0 ,0); if (isrv.status) panic("sn_device_fixup_war failed: %s\n", ia64_sal_strerror(isrv.status)); dev_entry = war_list + device; memcpy(common,dev_entry, sizeof(*common)); kfree(war_list); } /* * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for * each node in the system. Loading Loading @@ -246,8 +283,19 @@ static void sn_fixup_ionodes(void) widget, device, (u64)(dev_entry->common)); if (status) if (status) { if (sn_sal_rev() < 0x0450) { /* shortlived WAR for older * PROM images */ sn_device_fixup_war(nasid, widget, device, dev_entry->common); } else BUG(); } spin_lock_init(&dev_entry->sfdl_flush_lock); } Loading