Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi Vineet, On Mon, 2018-07-09 at 11:27 -0700, Vineet Gupta wrote: > On 07/09/2018 03:23 AM, Alexey Brodkin wrote: > > Hi David, > > > > On Mon, 2018-07-09 at 10:18 +, David Laight wrote: > > > From: Alexey Brodkin > > > > Sent: 09 July 2018 11:00 > > > > > > ... > > > > That's a good idea in

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Vineet Gupta
On 07/09/2018 03:23 AM, Alexey Brodkin wrote: > Hi David, > > On Mon, 2018-07-09 at 10:18 +, David Laight wrote: >> From: Alexey Brodkin >>> Sent: 09 July 2018 11:00 >> >> ... >>> That's a good idea indeed but it doesn't solve the problem with >>> struct devres_node. Consider the following sni

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi David, On Mon, 2018-07-09 at 10:18 +, David Laight wrote: > From: Alexey Brodkin > > Sent: 09 July 2018 11:00 > > ... > > That's a good idea indeed but it doesn't solve the problem with > > struct devres_node. Consider the following snippet: > > >8--

RE: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread David Laight
From: Alexey Brodkin > Sent: 09 July 2018 11:00 ... > That's a good idea indeed but it doesn't solve the problem with > struct devres_node. Consider the following snippet: > >8--- > struct mystruct { > atomic64_t myvar;

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi David, On Mon, 2018-07-09 at 09:16 +, David Laight wrote: > From: Alexey Brodkin > > Sent: 09 July 2018 05:45 > > Depending on ABI "long long" type of a particular 32-bit CPU > > might be aligned by either word (32-bits) or double word (64-bits). > > Make sure "data" is really 64-bit aligne

RE: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread David Laight
From: Geert Uytterhoeven > Sent: 09 July 2018 10:23 > On Mon, Jul 9, 2018 at 11:15 AM David Laight wrote: > > From: Alexey Brodkin > > > Sent: 09 July 2018 05:45 > > > Depending on ABI "long long" type of a particular 32-bit CPU > > > might be aligned by either word (32-bits) or double word (64-bi

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Geert Uytterhoeven
On Mon, Jul 9, 2018 at 11:15 AM David Laight wrote: > From: Alexey Brodkin > > Sent: 09 July 2018 05:45 > > Depending on ABI "long long" type of a particular 32-bit CPU > > might be aligned by either word (32-bits) or double word (64-bits). > > Make sure "data" is really 64-bit aligned for any 32-

RE: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread David Laight
From: Alexey Brodkin > Sent: 09 July 2018 05:45 > Depending on ABI "long long" type of a particular 32-bit CPU > might be aligned by either word (32-bits) or double word (64-bits). > Make sure "data" is really 64-bit aligned for any 32-bit CPU. > > At least for 32-bit ARC cores ABI requires "long

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Geert Uytterhoeven
Hi Alexey, On Mon, Jul 9, 2018 at 10:37 AM Alexey Brodkin wrote: > On Mon, 2018-07-09 at 09:52 +0200, Geert Uytterhoeven wrote: > > On Mon, Jul 9, 2018 at 9:22 AM Alexey Brodkin > > wrote: > > > On Mon, 2018-07-09 at 09:07 +0200, Geert Uytterhoeven wrote: > > > > On Mon, Jul 9, 2018 at 7:49 AM G

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi Geert, On Mon, 2018-07-09 at 09:52 +0200, Geert Uytterhoeven wrote: > Hi Alexey, > > On Mon, Jul 9, 2018 at 9:22 AM Alexey Brodkin > wrote: > > On Mon, 2018-07-09 at 09:07 +0200, Geert Uytterhoeven wrote: > > > On Mon, Jul 9, 2018 at 7:49 AM Greg KH wrote: > > > > On Mon, Jul 09, 2018 at 07:

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Geert Uytterhoeven
Hi Alexey, On Mon, Jul 9, 2018 at 9:22 AM Alexey Brodkin wrote: > On Mon, 2018-07-09 at 09:07 +0200, Geert Uytterhoeven wrote: > > On Mon, Jul 9, 2018 at 7:49 AM Greg KH wrote: > > > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > > > Depending on ABI "long long" type of a pa

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread g...@kroah.com
On Mon, Jul 09, 2018 at 07:17:11AM +, Alexey Brodkin wrote: > Hi Greg, > > On Mon, 2018-07-09 at 09:06 +0200, g...@kroah.com wrote: > > On Mon, Jul 09, 2018 at 06:46:50AM +, Alexey Brodkin wrote: > > > Hi Greg, > > > > > > On Mon, 2018-07-09 at 07:48 +0200, Greg KH wrote: > > > > On Mon,

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi Geert, On Mon, 2018-07-09 at 09:07 +0200, Geert Uytterhoeven wrote: > On Mon, Jul 9, 2018 at 7:49 AM Greg KH wrote: > > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > > Depending on ABI "long long" type of a particular 32-bit CPU > > > might be aligned by either word (32-b

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Alexey Brodkin
Hi Greg, On Mon, 2018-07-09 at 09:06 +0200, g...@kroah.com wrote: > On Mon, Jul 09, 2018 at 06:46:50AM +, Alexey Brodkin wrote: > > Hi Greg, > > > > On Mon, 2018-07-09 at 07:48 +0200, Greg KH wrote: > > > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > > > Depending on ABI

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread Geert Uytterhoeven
On Mon, Jul 9, 2018 at 7:49 AM Greg KH wrote: > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > Depending on ABI "long long" type of a particular 32-bit CPU > > might be aligned by either word (32-bits) or double word (64-bits). Or even 16-bit (on e.g. m68k). > > --- a/driver

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-09 Thread g...@kroah.com
On Mon, Jul 09, 2018 at 06:46:50AM +, Alexey Brodkin wrote: > Hi Greg, > > On Mon, 2018-07-09 at 07:48 +0200, Greg KH wrote: > > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > > Depending on ABI "long long" type of a particular 32-bit CPU > > > might be aligned by either w

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Alexey Brodkin
Hi Greg, On Mon, 2018-07-09 at 07:48 +0200, Greg KH wrote: > On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > > Depending on ABI "long long" type of a particular 32-bit CPU > > might be aligned by either word (32-bits) or double word (64-bits). > > Make sure "data" is really 64-bi

Re: [RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Greg KH
On Mon, Jul 09, 2018 at 07:44:44AM +0300, Alexey Brodkin wrote: > Depending on ABI "long long" type of a particular 32-bit CPU > might be aligned by either word (32-bits) or double word (64-bits). > Make sure "data" is really 64-bit aligned for any 32-bit CPU. > > At least for 32-bit ARC cores ABI

[RESEND PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Alexey Brodkin
Depending on ABI "long long" type of a particular 32-bit CPU might be aligned by either word (32-bits) or double word (64-bits). Make sure "data" is really 64-bit aligned for any 32-bit CPU. At least for 32-bit ARC cores ABI requires "long long" types to be aligned by normal 32-bit word. This make

Re: [PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Greg KH
On Sun, Jul 08, 2018 at 09:45:31PM +0300, Алексей Бродкин wrote: > Hi Greg, > > вс, 8 июл. 2018 г. в 21:40, Greg KH : > > > > On Sun, Jul 08, 2018 at 08:56:21PM +0300, Alexey Brodkin wrote: > > > Depending on ABI "long long" type of a particular 32-bit CPU > > > might be aligned by either word (32

Re: [PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Алексей Бродкин
Hi Greg, вс, 8 июл. 2018 г. в 21:40, Greg KH : > > On Sun, Jul 08, 2018 at 08:56:21PM +0300, Alexey Brodkin wrote: > > Depending on ABI "long long" type of a particular 32-bit CPU > > might be aligned by either word (32-bits) or double word (64-bits). > > Make sure "data" is really 64-bit aligned

Re: [PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Greg KH
On Sun, Jul 08, 2018 at 08:56:21PM +0300, Alexey Brodkin wrote: > Depending on ABI "long long" type of a particular 32-bit CPU > might be aligned by either word (32-bits) or double word (64-bits). > Make sure "data" is really 64-bit aligned for any 32-bit CPU. > > At least for 32-bit ARC cores ABI

[PATCH v2] devres: Really align data field to unsigned long long

2018-07-08 Thread Alexey Brodkin
Depending on ABI "long long" type of a particular 32-bit CPU might be aligned by either word (32-bits) or double word (64-bits). Make sure "data" is really 64-bit aligned for any 32-bit CPU. At least for 32-bit ARC cores ABI requires "long long" types to be aligned by normal 32-bit word. This make