public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* atomic_t (24 bits???)
@ 2003-02-25 19:11 Richard B. Johnson
  2003-02-25 19:14 ` Roman Zippel
  2003-02-25 19:17 ` Daniel Jacobowitz
  0 siblings, 2 replies; 6+ messages in thread
From: Richard B. Johnson @ 2003-02-25 19:11 UTC (permalink / raw)
  To: Linux kernel


In ../linux/include/asm/atomic.h, for versions 2.4.18 and
above as far as I've checked, there are repeated warnings
"Note that the guaranteed useful range of an atomic_t is
only 24 bits."

I fail to see any reason why as atomic_t is typdefed to a
volatile int which, on ix86 seems to be 32 bits.

Does anybody know if this is just some old comments from a
previous atomic_t type of, perhaps, char[3]?  


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: atomic_t (24 bits???)
  2003-02-25 19:11 atomic_t (24 bits???) Richard B. Johnson
@ 2003-02-25 19:14 ` Roman Zippel
  2003-02-25 19:31   ` Richard B. Johnson
  2003-02-25 19:17 ` Daniel Jacobowitz
  1 sibling, 1 reply; 6+ messages in thread
From: Roman Zippel @ 2003-02-25 19:14 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Linux kernel

Hi,

On Tue, 25 Feb 2003, Richard B. Johnson wrote:

> In ../linux/include/asm/atomic.h, for versions 2.4.18 and
> above as far as I've checked, there are repeated warnings
> "Note that the guaranteed useful range of an atomic_t is
> only 24 bits."
> 
> I fail to see any reason why as atomic_t is typdefed to a
> volatile int which, on ix86 seems to be 32 bits.
> 
> Does anybody know if this is just some old comments from a
> previous atomic_t type of, perhaps, char[3]?  

include/asm-sparc/atomic.h

bye, Roman


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: atomic_t (24 bits???)
  2003-02-25 19:11 atomic_t (24 bits???) Richard B. Johnson
  2003-02-25 19:14 ` Roman Zippel
@ 2003-02-25 19:17 ` Daniel Jacobowitz
  2003-02-25 19:31   ` Richard B. Johnson
  2003-02-25 21:57   ` Russell King
  1 sibling, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-02-25 19:17 UTC (permalink / raw)
  To: Richard B. Johnson; +Cc: Linux kernel

On Tue, Feb 25, 2003 at 02:11:11PM -0500, Richard B. Johnson wrote:
> 
> In ../linux/include/asm/atomic.h, for versions 2.4.18 and
> above as far as I've checked, there are repeated warnings
> "Note that the guaranteed useful range of an atomic_t is
> only 24 bits."
> 
> I fail to see any reason why as atomic_t is typdefed to a
> volatile int which, on ix86 seems to be 32 bits.
> 
> Does anybody know if this is just some old comments from a
> previous atomic_t type of, perhaps, char[3]?  

There are other platforms where you can't reliably use the whole word. 
Some ARM atomic_t implementations are like this, although I don't know
if the one in the kernel is.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: atomic_t (24 bits???)
  2003-02-25 19:14 ` Roman Zippel
@ 2003-02-25 19:31   ` Richard B. Johnson
  0 siblings, 0 replies; 6+ messages in thread
From: Richard B. Johnson @ 2003-02-25 19:31 UTC (permalink / raw)
  To: Roman Zippel; +Cc: Linux kernel

On Tue, 25 Feb 2003, Roman Zippel wrote:

> Hi,
> 
> On Tue, 25 Feb 2003, Richard B. Johnson wrote:
> 
> > In ../linux/include/asm/atomic.h, for versions 2.4.18 and
> > above as far as I've checked, there are repeated warnings
> > "Note that the guaranteed useful range of an atomic_t is
> > only 24 bits."
> > 
> > I fail to see any reason why as atomic_t is typdefed to a
> > volatile int which, on ix86 seems to be 32 bits.
> > 
> > Does anybody know if this is just some old comments from a
> > previous atomic_t type of, perhaps, char[3]?  
> 
> include/asm-sparc/atomic.h
> 
> bye, Roman
> 
Thank you.



Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: atomic_t (24 bits???)
  2003-02-25 19:17 ` Daniel Jacobowitz
@ 2003-02-25 19:31   ` Richard B. Johnson
  2003-02-25 21:57   ` Russell King
  1 sibling, 0 replies; 6+ messages in thread
From: Richard B. Johnson @ 2003-02-25 19:31 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Linux kernel

On Tue, 25 Feb 2003, Daniel Jacobowitz wrote:

> On Tue, Feb 25, 2003 at 02:11:11PM -0500, Richard B. Johnson wrote:
> > 
> > In ../linux/include/asm/atomic.h, for versions 2.4.18 and
> > above as far as I've checked, there are repeated warnings
> > "Note that the guaranteed useful range of an atomic_t is
> > only 24 bits."
> > 
> > I fail to see any reason why as atomic_t is typdefed to a
> > volatile int which, on ix86 seems to be 32 bits.
> > 
> > Does anybody know if this is just some old comments from a
> > previous atomic_t type of, perhaps, char[3]?  
> 
> There are other platforms where you can't reliably use the whole word. 
> Some ARM atomic_t implementations are like this, although I don't know
> if the one in the kernel is.
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
> 
Okay. Thanks.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: atomic_t (24 bits???)
  2003-02-25 19:17 ` Daniel Jacobowitz
  2003-02-25 19:31   ` Richard B. Johnson
@ 2003-02-25 21:57   ` Russell King
  1 sibling, 0 replies; 6+ messages in thread
From: Russell King @ 2003-02-25 21:57 UTC (permalink / raw)
  To: Linux kernel

On Tue, Feb 25, 2003 at 02:17:11PM -0500, Daniel Jacobowitz wrote:
> There are other platforms where you can't reliably use the whole word. 
> Some ARM atomic_t implementations are like this, although I don't know
> if the one in the kernel is.

The ARM atomic_t isn't 24-bit - it's a full paid up member of the
32-bit club. 8)

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-02-25 21:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-25 19:11 atomic_t (24 bits???) Richard B. Johnson
2003-02-25 19:14 ` Roman Zippel
2003-02-25 19:31   ` Richard B. Johnson
2003-02-25 19:17 ` Daniel Jacobowitz
2003-02-25 19:31   ` Richard B. Johnson
2003-02-25 21:57   ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox