Re: Opinion on ordering of writel vs. stores to RAM
- From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Sep 2006 10:49:07 +1000
It's silly because if you just use different interface
names for the different semantics, the caller can
ask for what he wants at the call site and no conditionals
are needed in the implementation.
As Paulus also pointed out, having writel() behave differently based on
some magic done earlier at map time makes it harder to understand what
happens when reading the code, and thus harder to audit drivers for
missing barriers etc... since it's not obvious at first sight wether a
driver is using ordered or relaxed semantics. Thus I prefer keeping two
speparate interfaces.
We've come up with the __writel() name, but I'm open to proposals for
something nicer :)
Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: Opinion on ordering of writel vs. stores to RAM
- From: Segher Boessenkool
- Re: Opinion on ordering of writel vs. stores to RAM
- References:
- Re: Opinion on ordering of writel vs. stores to RAM
- From: Segher Boessenkool
- Re: Opinion on ordering of writel vs. stores to RAM
- From: David Miller
- Re: Opinion on ordering of writel vs. stores to RAM
- From: Segher Boessenkool
- Re: Opinion on ordering of writel vs. stores to RAM
- From: David Miller
- Re: Opinion on ordering of writel vs. stores to RAM
- Prev by Date: Re: [RFC] MMIO accessors & barriers documentation
- Next by Date: Re: [PATCH 08/19] dmaengine: enable multiple clients and operations
- Previous by thread: Re: Opinion on ordering of writel vs. stores to RAM
- Next by thread: Re: Opinion on ordering of writel vs. stores to RAM
- Index(es):