[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070215182300.GA5542@martell.zuzino.mipt.ru>
Date: Thu, 15 Feb 2007 21:23:00 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@....com.au>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Ulrich Drepper <drepper@...hat.com>,
Zach Brown <zach.brown@...cle.com>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
"David S. Miller" <davem@...emloft.net>,
Suparna Bhattacharya <suparna@...ibm.com>,
Davide Libenzi <davidel@...ilserver.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 14/14] syslets: x86: optimized sys_umem_add()
On Thu, Feb 15, 2007 at 05:52:59PM +0100, Ingo Molnar wrote:
> provide an optimized assembly version of sys_umem_add().
> --- linux.orig/arch/i386/lib/getuser.S
> +++ linux/arch/i386/lib/getuser.S
> +sys_umem_add:
> + movl 0x4(%esp), %ecx # uptr
> + movl 0x8(%esp), %edx # inc
> +
> + cmpl $__PAGE_OFFSET, %ecx # access_ok(uptr)
> + jae bad_sys_umem_add
> +
> +1: addl %edx, (%ecx) # *uptr += inc
> +2: movl (%ecx), %eax # return *uptr
> + ret
> +
> +bad_sys_umem_add:
> + movl $-14, %eax
We have EFAULT for this. ;-)
> + ret
> +
> +.section __ex_table,"a"
> + .long 1b, bad_sys_umem_add
> + .long 2b, bad_sys_umem_add
> +.previous
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists