From 87673af07eb771bdcbd6856d719e5228040a8370 Mon Sep 17 00:00:00 2001 From: David Mosberger Date: Mon, 22 Sep 2003 23:52:10 -0700 Subject: [PATCH] ia64: Mark access_ok() as likely to succeed (as is done in x86 tree). --- arch/ia64/kernel/traps.c | 3 ++- include/asm-ia64/uaccess.h | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index 522d5b3a4bf74..676b15166aa97 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c @@ -335,7 +335,8 @@ handle_fpu_swa (int fp_fault, struct pt_regs *regs, unsigned long isr) if ((fpu_swa_count < 4) && !(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) { last_time = jiffies; ++fpu_swa_count; - printk(KERN_WARNING "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", + printk(KERN_WARNING + "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", current->comm, current->pid, regs->cr_iip + ia64_psr(regs)->ri, isr); } diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index bd0a7c26a0ac7..9aa49df402473 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h @@ -30,6 +30,7 @@ * David Mosberger-Tang */ +#include #include #include @@ -57,9 +58,10 @@ * address TASK_SIZE is never valid. We also need to make sure that the address doesn't * point inside the virtually mapped linear page table. */ -#define __access_ok(addr,size,segment) (((unsigned long) (addr)) <= (segment).seg \ - && ((segment).seg == KERNEL_DS.seg \ - || REGION_OFFSET((unsigned long) (addr)) < RGN_MAP_LIMIT)) +#define __access_ok(addr,size,segment) \ + likely(((unsigned long) (addr)) <= (segment).seg \ + && ((segment).seg == KERNEL_DS.seg \ + || REGION_OFFSET((unsigned long) (addr)) < RGN_MAP_LIMIT)) #define access_ok(type,addr,size) __access_ok((addr),(size),get_fs()) static inline int -- 2.53.0