Let me say it more clearly: On ARM, it is impossible to perform atomic operations on MMIO space.Actually, no one is suggesting that we try to do that at all. The discussion about RMW ops on MMIO space started with a comment attributed to the gcc developers that one reason why gcc on x86 doesn't use instructions that do RMW ops on volatile variables is that volatile is used to mark MMIO addresses, and there was some uncertainty about whether (non-atomic) RMW ops on x86 could be used on MMIO. This is in regard to the question about why gcc on x86 always moves a volatile variable into a register before doing anything to it.
This question is GCC PR33102, which was incorrectly closed as a duplicate
of PR3506 -- and *that* PR was closed because its reporter seemed toclaim the GCC generated code for an increment on a volatile (namely, three
machine instructions: load, modify, store) was incorrect, and it has to be one machine instruction.
So the whole discussion is irrelevant to ARM, PowerPC and any other architecture except x86[-64].
And even there, it's not something the kernel can take advantage of before GCC 4.4 is in widespread use, if then. Let's move on. Segher - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: "Paul E. McKenney" <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- References:
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Nick Piggin <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: "Paul E. McKenney" <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Herbert Xu <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: "Paul E. McKenney" <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Christoph Lameter <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Chris Snook <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Segher Boessenkool <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Russell King <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Segher Boessenkool <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Russell King <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- From: Paul Mackerras <[email protected]>
- Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Prev by Date: Re: [RFC 1/7] release_lru_pages(): Generic release of pages to the LRU
- Next by Date: Re: uncached page allocator
- Previous by thread: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Next by thread: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
- Index(es):