Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Ville Syrjälä
On Mon, Nov 19, 2012 at 02:48:06PM +, Russell King - ARM Linux wrote: > On Mon, Nov 19, 2012 at 04:32:36PM +0200, Ville Syrjälä wrote: > > On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: > > > On Thursday 15 November 2012, Rob Clark wrote: > > > > > I still haven't heard a

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 04:32:36PM +0200, Ville Syrjälä wrote: > On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: > > On Thursday 15 November 2012, Rob Clark wrote: > > > > I still haven't heard a conclusive argument why we need to use > > > > get_user() > > > > rather than

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Ville Syrjälä
On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: > On Thursday 15 November 2012, Rob Clark wrote: > > > I still haven't heard a conclusive argument why we need to use get_user() > > > rather than copy_from_user() in the DRM code. Is this about a fast path > > > where you want to

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Ville Syrjälä
On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: On Thursday 15 November 2012, Rob Clark wrote: I still haven't heard a conclusive argument why we need to use get_user() rather than copy_from_user() in the DRM code. Is this about a fast path where you want to shave off a

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 04:32:36PM +0200, Ville Syrjälä wrote: On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: On Thursday 15 November 2012, Rob Clark wrote: I still haven't heard a conclusive argument why we need to use get_user() rather than copy_from_user() in the

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-19 Thread Ville Syrjälä
On Mon, Nov 19, 2012 at 02:48:06PM +, Russell King - ARM Linux wrote: On Mon, Nov 19, 2012 at 04:32:36PM +0200, Ville Syrjälä wrote: On Thu, Nov 15, 2012 at 02:39:41PM +, Arnd Bergmann wrote: On Thursday 15 November 2012, Rob Clark wrote: I still haven't heard a conclusive

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-16 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: > > From: Rob Clark > > A new atomic modeset/pageflip ioctl being developed in DRM requires > get_user() to work for 64bit types (in addition to just put_user()). > > v1: original > v2: pass correct size to check_uaccess, and better handling of

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-16 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Nicolas Pitre
On Thu, 15 Nov 2012, Rob Clark wrote: > From: Rob Clark > > A new atomic modeset/pageflip ioctl being developed in DRM requires > get_user() to work for 64bit types (in addition to just put_user()). > > v1: original > v2: pass correct size to check_uaccess, and better handling of narrowing >

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
From: Rob Clark A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of narrowing double word read with __get_user_xb() (Russell

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: > > I still haven't heard a conclusive argument why we need to use get_user() > > rather than copy_from_user() in the DRM code. Is this about a fast path > > where you want to shave off a few cycles for each call, or does this > > simplify the code

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
On Thu, Nov 15, 2012 at 7:39 AM, Arnd Bergmann wrote: > On Thursday 15 November 2012, Rob Clark wrote: >> On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann wrote: >> > On Tuesday 13 November 2012, Russell King - ARM Linux wrote: >> >> You're missing something; that is one of the greatest powers of

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: > On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann wrote: > > On Tuesday 13 November 2012, Russell King - ARM Linux wrote: > >> You're missing something; that is one of the greatest powers of open > >> source. The many eyes (and minds) effect.

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann wrote: > On Tuesday 13 November 2012, Russell King - ARM Linux wrote: >> You're missing something; that is one of the greatest powers of open >> source. The many eyes (and minds) effect. Someone out there probably >> has a solution to whatever

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Tuesday 13 November 2012, Russell King - ARM Linux wrote: > You're missing something; that is one of the greatest powers of open > source. The many eyes (and minds) effect. Someone out there probably > has a solution to whatever problem, the trick is to find that person. :) > > I think we

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Tuesday 13 November 2012, Russell King - ARM Linux wrote: You're missing something; that is one of the greatest powers of open source. The many eyes (and minds) effect. Someone out there probably has a solution to whatever problem, the trick is to find that person. :) I think we have a

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 13 November 2012, Russell King - ARM Linux wrote: You're missing something; that is one of the greatest powers of open source. The many eyes (and minds) effect. Someone out there probably has a solution to

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 13 November 2012, Russell King - ARM Linux wrote: You're missing something; that is one of the greatest powers of open source. The many eyes (and minds) effect.

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
On Thu, Nov 15, 2012 at 7:39 AM, Arnd Bergmann a...@arndb.de wrote: On Thursday 15 November 2012, Rob Clark wrote: On Thu, Nov 15, 2012 at 3:19 AM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 13 November 2012, Russell King - ARM Linux wrote: You're missing something; that is one of the

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Arnd Bergmann
On Thursday 15 November 2012, Rob Clark wrote: I still haven't heard a conclusive argument why we need to use get_user() rather than copy_from_user() in the DRM code. Is this about a fast path where you want to shave off a few cycles for each call, or does this simplify the code structure,

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Rob Clark
From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of narrowing double word read with __get_user_xb()

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-15 Thread Nicolas Pitre
On Thu, 15 Nov 2012, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of narrowing

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Rob Clark
From: Rob Clark A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of narrowing double word read with __get_user_xb() (Russell

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Russell King - ARM Linux
On Tue, Nov 13, 2012 at 09:11:09AM +, Arnd Bergmann wrote: > On Tuesday 13 November 2012, Rob Clark wrote: > > right, that is what I was worried about.. but what about something > > along the lines of: > > > > case 8: { \ > >

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 06:31:50PM -0600, Rob Clark wrote: > right, that is what I was worried about.. but what about something > along the lines of: > > case 8: { \ > if (sizeof(x) < 8)

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Arnd Bergmann
On Tuesday 13 November 2012, Rob Clark wrote: > right, that is what I was worried about.. but what about something > along the lines of: > > case 8: { \ > if (sizeof(x) < 8) \ >

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Arnd Bergmann
On Tuesday 13 November 2012, Rob Clark wrote: right, that is what I was worried about.. but what about something along the lines of: case 8: { \ if (sizeof(x) 8) \

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 06:31:50PM -0600, Rob Clark wrote: right, that is what I was worried about.. but what about something along the lines of: case 8: { \ if (sizeof(x) 8) \

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Russell King - ARM Linux
On Tue, Nov 13, 2012 at 09:11:09AM +, Arnd Bergmann wrote: On Tuesday 13 November 2012, Rob Clark wrote: right, that is what I was worried about.. but what about something along the lines of: case 8: { \

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-13 Thread Rob Clark
From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). v1: original v2: pass correct size to check_uaccess, and better handling of narrowing double word read with __get_user_xb()

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 5:53 PM, Russell King - ARM Linux wrote: > On Mon, Nov 12, 2012 at 05:33:41PM -0600, Rob Clark wrote: >> I'm sort of thinking maybe we want to change 'switch (sizeof(*(__p)))' >> with 'switch (sizeof(typeof(x)))' in case someone ignores the compiler >> warning when they

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 05:33:41PM -0600, Rob Clark wrote: > I'm sort of thinking maybe we want to change 'switch (sizeof(*(__p)))' > with 'switch (sizeof(typeof(x)))' in case someone ignores the compiler > warning when they try something like: Definitely not. Ttype of access is controlled by

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 5:08 PM, Russell King - ARM Linux wrote: > On Mon, Nov 12, 2012 at 01:58:32PM -0600, Rob Clark wrote: >> On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux >> wrote: >> > On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: >> >> From: Rob Clark >> >> >> >>

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 01:58:32PM -0600, Rob Clark wrote: > On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux > wrote: > > On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: > >> From: Rob Clark > >> > >> A new atomic modeset/pageflip ioctl being developed in DRM requires > >>

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux wrote: > On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: >> From: Rob Clark >> >> A new atomic modeset/pageflip ioctl being developed in DRM requires >> get_user() to work for 64bit types (in addition to just put_user()). > >

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: > From: Rob Clark > > A new atomic modeset/pageflip ioctl being developed in DRM requires > get_user() to work for 64bit types (in addition to just put_user()). NAK. (I did write a better email explaining all the ins and outs of why

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 8:38 AM, Will Deacon wrote: > On Mon, Nov 12, 2012 at 01:46:57PM +, Rob Clark wrote: >> On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon wrote: >> > On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: >> >> @@ -122,22 +124,35 @@ extern int __get_user_4(void *); >>

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Will Deacon
On Mon, Nov 12, 2012 at 01:46:57PM +, Rob Clark wrote: > On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon wrote: > > On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: > >> @@ -122,22 +124,35 @@ extern int __get_user_4(void *); > >> ({

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon wrote: > On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: >> From: Rob Clark >> >> A new atomic modeset/pageflip ioctl being developed in DRM requires >> get_user() to work for 64bit types (in addition to just put_user()). >> >>

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Will Deacon
On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: > From: Rob Clark > > A new atomic modeset/pageflip ioctl being developed in DRM requires > get_user() to work for 64bit types (in addition to just put_user()). > > Signed-off-by: Rob Clark > --- > arch/arm/include/asm/uaccess.h | 25

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Will Deacon
On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). Signed-off-by: Rob Clark r...@ti.com ---

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon will.dea...@arm.com wrote: On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Will Deacon
On Mon, Nov 12, 2012 at 01:46:57PM +, Rob Clark wrote: On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon will.dea...@arm.com wrote: On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: @@ -122,22 +124,35 @@ extern int __get_user_4(void *); ({

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 8:38 AM, Will Deacon will.dea...@arm.com wrote: On Mon, Nov 12, 2012 at 01:46:57PM +, Rob Clark wrote: On Mon, Nov 12, 2012 at 4:46 AM, Will Deacon will.dea...@arm.com wrote: On Fri, Nov 09, 2012 at 09:17:33PM +, Rob Clark wrote: @@ -122,22 +124,35 @@ extern

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). NAK. (I did write a better email explaining all the ins and outs of

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 01:58:32PM -0600, Rob Clark wrote: On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote: From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 5:08 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Nov 12, 2012 at 01:58:32PM -0600, Rob Clark wrote: On Mon, Nov 12, 2012 at 1:27 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Nov 09, 2012 at 03:17:33PM -0600, Rob Clark wrote:

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Russell King - ARM Linux
On Mon, Nov 12, 2012 at 05:33:41PM -0600, Rob Clark wrote: I'm sort of thinking maybe we want to change 'switch (sizeof(*(__p)))' with 'switch (sizeof(typeof(x)))' in case someone ignores the compiler warning when they try something like: Definitely not. Ttype of access is controlled by the

Re: [PATCH] ARM: add get_user() support for 8 byte types

2012-11-12 Thread Rob Clark
On Mon, Nov 12, 2012 at 5:53 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Mon, Nov 12, 2012 at 05:33:41PM -0600, Rob Clark wrote: I'm sort of thinking maybe we want to change 'switch (sizeof(*(__p)))' with 'switch (sizeof(typeof(x)))' in case someone ignores the compiler

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-09 Thread Rob Clark
From: Rob Clark A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). Signed-off-by: Rob Clark --- arch/arm/include/asm/uaccess.h | 25 - arch/arm/lib/getuser.S | 17

[PATCH] ARM: add get_user() support for 8 byte types

2012-11-09 Thread Rob Clark
From: Rob Clark r...@ti.com A new atomic modeset/pageflip ioctl being developed in DRM requires get_user() to work for 64bit types (in addition to just put_user()). Signed-off-by: Rob Clark r...@ti.com --- arch/arm/include/asm/uaccess.h | 25 - arch/arm/lib/getuser.S