* [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* @ 2010-10-22 22:07 Nobuhiro Iwamatsu 2010-10-25 1:58 ` Paul Mundt 0 siblings, 1 reply; 11+ messages in thread From: Nobuhiro Iwamatsu @ 2010-10-22 22:07 UTC (permalink / raw) To: linux-i2c; +Cc: linux-sh, Nobuhiro Iwamatsu ctrl_* is deprecated. We should to use __raw_*. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> --- drivers/i2c/busses/i2c-sh7760.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c index 4f93da3..3cad8fe 100644 --- a/drivers/i2c/busses/i2c-sh7760.c +++ b/drivers/i2c/busses/i2c-sh7760.c @@ -101,12 +101,12 @@ struct cami2c { static inline void OUT32(struct cami2c *cam, int reg, unsigned long val) { - ctrl_outl(val, (unsigned long)cam->iobase + reg); + __raw_writel(val, (unsigned long)cam->iobase + reg); } static inline unsigned long IN32(struct cami2c *cam, int reg) { - return ctrl_inl((unsigned long)cam->iobase + reg); + return __raw_readl((unsigned long)cam->iobase + reg); } static irqreturn_t sh7760_i2c_irq(int irq, void *ptr) -- 1.7.2.3 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* 2010-10-22 22:07 [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* Nobuhiro Iwamatsu @ 2010-10-25 1:58 ` Paul Mundt [not found] ` <20101025015835.GE2173-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Paul Mundt @ 2010-10-25 1:58 UTC (permalink / raw) To: Nobuhiro Iwamatsu; +Cc: linux-i2c, linux-sh On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > ctrl_* is deprecated. We should to use __raw_*. > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Applied, thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20101025015835.GE2173-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>]
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* [not found] ` <20101025015835.GE2173-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org> @ 2010-10-25 10:47 ` Ben Dooks [not found] ` <20101025104718.GF21564-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Ben Dooks @ 2010-10-25 10:47 UTC (permalink / raw) To: Paul Mundt Cc: Nobuhiro Iwamatsu, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > > ctrl_* is deprecated. We should to use __raw_*. > > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> > > Applied, thanks. Hi, can you see my comments about the copy of this posted below about ioremap() and use or __raw accessors? -- Ben Q: What's a light-year? A: One-third less calories than a regular year. ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20101025104718.GF21564-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>]
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* [not found] ` <20101025104718.GF21564-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org> @ 2010-10-25 11:13 ` Paul Mundt [not found] ` <20101025111324.GA16265-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Paul Mundt @ 2010-10-25 11:13 UTC (permalink / raw) To: Ben Dooks Cc: Nobuhiro Iwamatsu, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > > > ctrl_* is deprecated. We should to use __raw_*. > > > > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> > > > > Applied, thanks. > > Hi, can you see my comments about the copy of this posted below > about ioremap() and use or __raw accessors? > No? At least it never made it to the list. Do you have a pointer handy? ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20101025111324.GA16265-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>]
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* [not found] ` <20101025111324.GA16265-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org> @ 2010-10-25 12:42 ` Ben Dooks 2010-10-26 0:08 ` Nobuhiro Iwamatsu 0 siblings, 1 reply; 11+ messages in thread From: Ben Dooks @ 2010-10-25 12:42 UTC (permalink / raw) To: Paul Mundt Cc: Ben Dooks, Nobuhiro Iwamatsu, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA On Mon, Oct 25, 2010 at 08:13:25PM +0900, Paul Mundt wrote: > On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: > > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > > > > ctrl_* is deprecated. We should to use __raw_*. > > > > > > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> > > > > > > Applied, thanks. > > > > Hi, can you see my comments about the copy of this posted below > > about ioremap() and use or __raw accessors? > > > No? At least it never made it to the list. Do you have a pointer handy? http://marc.info/?l=linux-i2c&m=128797023230600&w=2 -- Ben Q: What's a light-year? A: One-third less calories than a regular year. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* 2010-10-25 12:42 ` Ben Dooks @ 2010-10-26 0:08 ` Nobuhiro Iwamatsu [not found] ` <AANLkTikh+h1nWHZCa29FQc1dw=z3ZhYEW8eSyFyS4C84-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 11+ messages in thread From: Nobuhiro Iwamatsu @ 2010-10-26 0:08 UTC (permalink / raw) To: Ben Dooks; +Cc: Paul Mundt, linux-i2c, linux-sh Hi, 2010/10/25 Ben Dooks <ben-i2c@fluff.org>: > On Mon, Oct 25, 2010 at 08:13:25PM +0900, Paul Mundt wrote: >> On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: >> > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: >> > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: >> > > > ctrl_* is deprecated. We should to use __raw_*. >> > > > >> > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> >> > > >> > > Applied, thanks. >> > >> > Hi, can you see my comments about the copy of this posted below >> > about ioremap() and use or __raw accessors? >> > >> No? At least it never made it to the list. Do you have a pointer handy? > > http://marc.info/?l=linux-i2c&m=128797023230600&w=2 > Sorry, this is my mistake. >> On Sun, Oct 24, 2010 at 05:37:46PM +0900, Nobuhiro Iwamatsu wrote: >> ctrl_* is deprecated. We should to use __raw_*. > >> Given iobase is ioremap() returned, there should be an explicit reason >> for using __raw_xxx() instead of read/writel(). ioread32 / iowrite32? Best regarads, Nobuhiro -- Nobuhiro Iwamatsu iwamatsu at {nigauri.org / debian.org} GPG ID: 40AD1FA6 ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <AANLkTikh+h1nWHZCa29FQc1dw=z3ZhYEW8eSyFyS4C84-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* [not found] ` <AANLkTikh+h1nWHZCa29FQc1dw=z3ZhYEW8eSyFyS4C84-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-10-26 4:02 ` Paul Mundt 2010-10-26 6:43 ` Ben Dooks 0 siblings, 1 reply; 11+ messages in thread From: Paul Mundt @ 2010-10-26 4:02 UTC (permalink / raw) To: Nobuhiro Iwamatsu Cc: Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA, linux-sh-u79uwXL29TY76Z2rM5mHXA On Tue, Oct 26, 2010 at 09:08:12AM +0900, Nobuhiro Iwamatsu wrote: > 2010/10/25 Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>: > > On Mon, Oct 25, 2010 at 08:13:25PM +0900, Paul Mundt wrote: > >> On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: > >> > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > >> > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > >> > > > ctrl_* is deprecated. We should to use __raw_*. > >> > > > > >> > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> > >> > > > >> > > Applied, thanks. > >> > > >> > Hi, can you see my comments about the copy of this posted below > >> > about ioremap() and use or __raw accessors? > >> > > >> No? At least it never made it to the list. Do you have a pointer handy? > > > > http://marc.info/?l=linux-i2c&m=128797023230600&w=2 > > > > Sorry, this is my mistake. > > >> On Sun, Oct 24, 2010 at 05:37:46PM +0900, Nobuhiro Iwamatsu wrote: > >> ctrl_* is deprecated. We should to use __raw_*. > > > >> Given iobase is ioremap() returned, there should be an explicit reason > >> for using __raw_xxx() instead of read/writel(). > Based on what, exactly? The CPU in question is quite content with the weak ordering provided by __raw_xxx(), anything more is unecessary. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* 2010-10-26 4:02 ` Paul Mundt @ 2010-10-26 6:43 ` Ben Dooks 2010-10-26 6:50 ` Paul Mundt 0 siblings, 1 reply; 11+ messages in thread From: Ben Dooks @ 2010-10-26 6:43 UTC (permalink / raw) To: Paul Mundt; +Cc: Nobuhiro Iwamatsu, Ben Dooks, linux-i2c, linux-sh On Tue, Oct 26, 2010 at 01:02:03PM +0900, Paul Mundt wrote: > On Tue, Oct 26, 2010 at 09:08:12AM +0900, Nobuhiro Iwamatsu wrote: > > 2010/10/25 Ben Dooks <ben-i2c@fluff.org>: > > > On Mon, Oct 25, 2010 at 08:13:25PM +0900, Paul Mundt wrote: > > >> On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: > > >> > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > > >> > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > > >> > > > ctrl_* is deprecated. We should to use __raw_*. > > >> > > > > > >> > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> > > >> > > > > >> > > Applied, thanks. > > >> > > > >> > Hi, can you see my comments about the copy of this posted below > > >> > about ioremap() and use or __raw accessors? > > >> > > > >> No? At least it never made it to the list. Do you have a pointer handy? > > > > > > http://marc.info/?l=linux-i2c&m=128797023230600&w=2 > > > > > > > Sorry, this is my mistake. > > > > >> On Sun, Oct 24, 2010 at 05:37:46PM +0900, Nobuhiro Iwamatsu wrote: > > >> ctrl_* is deprecated. We should to use __raw_*. > > > > > >> Given iobase is ioremap() returned, there should be an explicit reason > > >> for using __raw_xxx() instead of read/writel(). > > > Based on what, exactly? The CPU in question is quite content with the > weak ordering provided by __raw_xxx(), anything more is unecessary. generally, readX,writeX or iowriteX,ioreadX are the functions that should be used on ioremap()d memory. It may not be a hard rule, but it is how it is supposed to be done. -- Ben Q: What's a light-year? A: One-third less calories than a regular year. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* 2010-10-26 6:43 ` Ben Dooks @ 2010-10-26 6:50 ` Paul Mundt 0 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2010-10-26 6:50 UTC (permalink / raw) To: Ben Dooks; +Cc: Nobuhiro Iwamatsu, linux-i2c, linux-sh On Tue, Oct 26, 2010 at 07:43:07AM +0100, Ben Dooks wrote: > On Tue, Oct 26, 2010 at 01:02:03PM +0900, Paul Mundt wrote: > > On Tue, Oct 26, 2010 at 09:08:12AM +0900, Nobuhiro Iwamatsu wrote: > > > 2010/10/25 Ben Dooks <ben-i2c@fluff.org>: > > > > On Mon, Oct 25, 2010 at 08:13:25PM +0900, Paul Mundt wrote: > > > >> On Mon, Oct 25, 2010 at 11:47:18AM +0100, Ben Dooks wrote: > > > >> > On Mon, Oct 25, 2010 at 10:58:35AM +0900, Paul Mundt wrote: > > > >> > > On Sat, Oct 23, 2010 at 07:07:00AM +0900, Nobuhiro Iwamatsu wrote: > > > >> > > > ctrl_* is deprecated. We should to use __raw_*. > > > >> > > > > > > >> > > > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> > > > >> > > > > > >> > > Applied, thanks. > > > >> > > > > >> > Hi, can you see my comments about the copy of this posted below > > > >> > about ioremap() and use or __raw accessors? > > > >> > > > > >> No? At least it never made it to the list. Do you have a pointer handy? > > > > > > > > http://marc.info/?l=linux-i2c&m=128797023230600&w=2 > > > > > > > > > > Sorry, this is my mistake. > > > > > > >> On Sun, Oct 24, 2010 at 05:37:46PM +0900, Nobuhiro Iwamatsu wrote: > > > >> ctrl_* is deprecated. We should to use __raw_*. > > > > > > > >> Given iobase is ioremap() returned, there should be an explicit reason > > > >> for using __raw_xxx() instead of read/writel(). > > > > > Based on what, exactly? The CPU in question is quite content with the > > weak ordering provided by __raw_xxx(), anything more is unecessary. > > generally, readX,writeX or iowriteX,ioreadX are the functions that should > be used on ioremap()d memory. It may not be a hard rule, but it is how it > is supposed to be done. > Nonsense. There are plenty of cases in the kernel that use __raw_xxx() on ioremapped memory and have been since before ioread/writeX even existed. Whether to use read/writeX or the __raw versions has always been up to the developer, and if the ordering issues don't factor in then there is simply no reason to bother using read/writeX. If you wish to do a kernel-wide audit and convert all __raw_xxx users on ioremapped memory over you are certainly welcome to try. Inserting extra memory barriers for strong ordering where it isn't needed however is completely pointless. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_*
@ 2010-10-24 8:37 Nobuhiro Iwamatsu
[not found] ` <1287909466-16898-1-git-send-email-iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Nobuhiro Iwamatsu @ 2010-10-24 8:37 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Nobuhiro Iwamatsu
ctrl_* is deprecated. We should to use __raw_*.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org>
---
drivers/i2c/busses/i2c-sh7760.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index 4f93da3..3cad8fe 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -101,12 +101,12 @@ struct cami2c {
static inline void OUT32(struct cami2c *cam, int reg, unsigned long val)
{
- ctrl_outl(val, (unsigned long)cam->iobase + reg);
+ __raw_writel(val, (unsigned long)cam->iobase + reg);
}
static inline unsigned long IN32(struct cami2c *cam, int reg)
{
- return ctrl_inl((unsigned long)cam->iobase + reg);
+ return __raw_readl((unsigned long)cam->iobase + reg);
}
static irqreturn_t sh7760_i2c_irq(int irq, void *ptr)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 11+ messages in thread[parent not found: <1287909466-16898-1-git-send-email-iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org>]
* Re: [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* [not found] ` <1287909466-16898-1-git-send-email-iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> @ 2010-10-25 1:30 ` Ben Dooks 0 siblings, 0 replies; 11+ messages in thread From: Ben Dooks @ 2010-10-25 1:30 UTC (permalink / raw) To: Nobuhiro Iwamatsu; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA On Sun, Oct 24, 2010 at 05:37:46PM +0900, Nobuhiro Iwamatsu wrote: > ctrl_* is deprecated. We should to use __raw_*. Given iobase is ioremap() returned, there should be an explicit reason for using __raw_xxx() instead of read/writel(). > Signed-off-by: Nobuhiro Iwamatsu <iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org> > --- > drivers/i2c/busses/i2c-sh7760.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c > index 4f93da3..3cad8fe 100644 > --- a/drivers/i2c/busses/i2c-sh7760.c > +++ b/drivers/i2c/busses/i2c-sh7760.c > @@ -101,12 +101,12 @@ struct cami2c { > > static inline void OUT32(struct cami2c *cam, int reg, unsigned long val) > { > - ctrl_outl(val, (unsigned long)cam->iobase + reg); > + __raw_writel(val, (unsigned long)cam->iobase + reg); > } > > static inline unsigned long IN32(struct cami2c *cam, int reg) > { > - return ctrl_inl((unsigned long)cam->iobase + reg); > + return __raw_readl((unsigned long)cam->iobase + reg); > } > > static irqreturn_t sh7760_i2c_irq(int irq, void *ptr) > -- > 1.7.2.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-i2c" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- -- Ben Q: What's a light-year? A: One-third less calories than a regular year. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-10-26 6:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-22 22:07 [PATCH] sh: i2c-sh7760: Replase from ctrl_* to __raw_* Nobuhiro Iwamatsu
2010-10-25 1:58 ` Paul Mundt
[not found] ` <20101025015835.GE2173-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2010-10-25 10:47 ` Ben Dooks
[not found] ` <20101025104718.GF21564-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2010-10-25 11:13 ` Paul Mundt
[not found] ` <20101025111324.GA16265-M7jkjyW5wf5g9hUCZPvPmw@public.gmane.org>
2010-10-25 12:42 ` Ben Dooks
2010-10-26 0:08 ` Nobuhiro Iwamatsu
[not found] ` <AANLkTikh+h1nWHZCa29FQc1dw=z3ZhYEW8eSyFyS4C84-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-26 4:02 ` Paul Mundt
2010-10-26 6:43 ` Ben Dooks
2010-10-26 6:50 ` Paul Mundt
-- strict thread matches above, loose matches on Subject: below --
2010-10-24 8:37 Nobuhiro Iwamatsu
[not found] ` <1287909466-16898-1-git-send-email-iwamatsu-+mkmVskJBflAfugRpC6u6w@public.gmane.org>
2010-10-25 1:30 ` Ben Dooks
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).