Re: Question on Alignment

2013-11-03 Thread anish singh
Don't top post. On Sun, Nov 3, 2013 at 9:29 AM, Omkar Houddin wrote: > > Sorry I meant 32 byte!!! Mostly memory returned from kmalloc is aligned for generic data types but incase you want to set it explicitly you can use below macro: ALIGN(returned_memory, 32); > > > > On Sat, Nov 2, 201

Re: Question on Alignment

2013-11-03 Thread Omkar Houddin
Sorry I meant 32 byte!!! On Sat, Nov 2, 2013 at 9:20 PM, anish singh wrote: > > > > On Sat, Nov 2, 2013 at 7:42 PM, Shyam Sunkara wrote: > >> Hi All, >> >> I'm allocating a memory for linux driver using the kmalloc and I need to >> align it to 32 bit how do I do it? >> > Did you mean 32 bit

Re: Question on Alignment

2013-11-02 Thread anish singh
On Sat, Nov 2, 2013 at 7:42 PM, Shyam Sunkara wrote: > Hi All, > > I'm allocating a memory for linux driver using the kmalloc and I need to > align it to 32 bit how do I do it? > Did you mean 32 bit or byte? > > > Thank you, > > Regards, > Omk > > ___

Question on Alignment

2013-11-02 Thread Shyam Sunkara
Hi All, I'm allocating a memory for linux driver using the kmalloc and I need to align it to 32 bit how do I do it? Thank you, Regards, Omk ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/

Re: Question on Alignment requiremnet

2011-08-07 Thread subin gangadharan
On Sun, Aug 7, 2011 at 5:22 AM, Greg Freemyer wrote: > > On Aug 6, 2011 1:57 PM, "Mulyadi Santosa" > wrote: > > > > On Sat, Aug 6, 2011 at 23:59, subin gangadharan > > wrote: > > > Hi All, > > > I have some doubts on the alignment requirement.It would be really > > > helpful,if someone can shed

Re: Question on Alignment requiremnet

2011-08-07 Thread Greg Freemyer
On Aug 6, 2011 1:57 PM, "Mulyadi Santosa" wrote: > > On Sat, Aug 6, 2011 at 23:59, subin gangadharan > wrote: > > Hi All, > > I have some doubts on the alignment requirement.It would be really > > helpful,if someone can shed some light on this. > > Why there are so many different types of alignme

Re: Question on Alignment requiremnet

2011-08-06 Thread Mulyadi Santosa
Hi Subin... On Sun, Aug 7, 2011 at 02:01, subin gangadharan wrote: > Thanks for your quick reply.I have one more question. >  So in case of processor with read/write granularity of 4 byte access,just > for understanding purpose imagine it's with out cache.So in that case any > difference is there

Re: One more question on alignment

2011-08-06 Thread subin gangadharan
On Sat, Aug 6, 2011 at 12:37 PM, Daniel Baluta wrote: > On Sat, Aug 6, 2011 at 10:17 PM, subin gangadharan > wrote: > > Hi, > > This is a text excerpt from the article [1]. > > Below paragraph I didn't understand quite well.Mainly in bold > letters.Could > > anybody please explain how this will l

Re: One more question on alignment

2011-08-06 Thread Daniel Baluta
On Sat, Aug 6, 2011 at 10:17 PM, subin gangadharan wrote: > Hi, > This is a text excerpt from the article [1]. > Below paragraph I didn't understand quite well.Mainly in bold letters.Could > anybody please explain how this will lead to an infinite loop. It seems self-explanatory. Most atomic ops

One more question on alignment

2011-08-06 Thread subin gangadharan
Hi, This is a text excerpt from the article [1]. Below paragraph I didn't understand quite well.Mainly in bold letters.Could anybody please explain how this will lead to an infinite loop. Atomicity All modern processors offer atomic instructions. These special instructions are crucial for synch

Re: Question on Alignment requiremnet

2011-08-06 Thread subin gangadharan
On Sat, Aug 6, 2011 at 10:56 AM, Mulyadi Santosa wrote: > On Sat, Aug 6, 2011 at 23:59, subin gangadharan > wrote: > > Hi All, > > I have some doubts on the alignment requirement.It would be really > > helpful,if someone can shed some light on this. > > Why there are so many different types of al

Re: Question on Alignment requiremnet

2011-08-06 Thread Mulyadi Santosa
On Sat, Aug 6, 2011 at 23:59, subin gangadharan wrote: > Hi All, > I have some doubts on the alignment requirement.It would be really > helpful,if someone can shed some light on this. > Why there are so many different types of alignment like 4 byte, 8 byte,16 > byte ?.My exact question is, in a 32

Question on Alignment requiremnet

2011-08-06 Thread subin gangadharan
Hi All, I have some doubts on the alignment requirement.It would be really helpful,if someone can shed some light on this. Why there are so many different types of alignment like 4 byte, 8 byte,16 byte ?.My exact question is, in a 32 bit machine(I assume processor reads data in 4 bytes),how 16 byt