public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Miller <miller@techsource.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Paul Mackerras <paulus@samba.org>, Pavel Machek <pavel@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: Fix locking in input
Date: Wed, 03 Dec 2003 18:44:41 -0500	[thread overview]
Message-ID: <3FCE7569.5080305@techsource.com> (raw)
In-Reply-To: 3FC13AA0.9030204@colorfullife.com



Manfred Spraul wrote:
> Russell King wrote:
> 
>> On Sun, Nov 23, 2003 at 11:24:02PM +0100, Manfred Spraul wrote:
>>  
>>
>>> I think one platform (early ARM?) cannot access bytes directly, and 
>>> implement the access with read 16-bit, change 8-bit, write back 16 
>>> bit.   
>>
>>
>> Nope.
>>
> It seems it's Alpha:
> 
> On Thu, 28 Dec 2000, Linus wrote:
> 
>> FreeBSD doesn't try to be portable any more, but Linux does, and there 
>> are
>> architectures where 8- and 16-bit accesses aren't *atomic* but have to be
>> done with read-modify-write cycles.
>>
>> And even for fields like "age", where we don't care whether the age 
>> itself
>> is 100% accurate, we _do_ care that the fields close-by don't get strange
>> effects from updating "age". We used to have exactly this problem on 
>> alpha
>> back in the 2.1.x timeframe.
>>


This is MOSTLY true, but not entirely.  As I recall, Alpha has two 
addressing modes: Sparse and Dense.

The mode you're referring to is dense addressing where 32-bit and 64-bit 
accesses are atomic, but 16 and 8 bit accesses require RMW.

Sparse mode allows for atomic 8 and 16 bit accesses, but the access size 
is specified in the address using a rather bizarre binary encoding that 
doesn't look much like a regular address value.  You would probably not 
want to use this unless you absolutely HAD to use some I/O device that 
required atomic byte or word accesses.

I'm sure someone else will (or already has) pipe(d) in with a more 
accurate explanation.  :)



  reply	other threads:[~2003-12-03 23:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-23 22:24 Fix locking in input Manfred Spraul
2003-11-23 22:34 ` Russell King
2003-11-23 22:54   ` Manfred Spraul
2003-12-03 23:44     ` Timothy Miller [this message]
2003-12-04  1:29       ` Linus Torvalds
2003-11-24  9:34 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-11-22 15:52 Pavel Machek
2003-11-23 21:51 ` Paul Mackerras
     [not found] ` <20031123134140.GE22591@vana.vc.cvut.cz>
2003-11-24 11:05   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FCE7569.5080305@techsource.com \
    --to=miller@techsource.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=paulus@samba.org \
    --cc=pavel@suse.cz \
    --cc=rmk+lkml@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox