linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Nicolas Pitre <nico@linaro.org>,
	Felipe Balbi <felipe.balbi@nokia.com>,
	Lokesh Vutla <lokeshvutla@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Shubhrajyoti D <shubhrajyoti@ti.com>,
	sricharan <r.sricharan@ti.com>
Subject: Re: [PATCH 17/24] ARM: OMAP: use __iomem pointers for MMIO
Date: Wed, 19 Sep 2012 09:44:24 -0700	[thread overview]
Message-ID: <20120919164424.GD11762@atomide.com> (raw)
In-Reply-To: <20120919133648.GB6106@arwen.pp.htv.fi>

* Felipe Balbi <balbi@ti.com> [120919 06:42]:
> On Wed, Sep 19, 2012 at 01:35:47PM +0000, Arnd Bergmann wrote:
> > On Monday 17 September 2012, Tony Lindgren wrote:
> > > * Tony Lindgren <tony@atomide.com> [120916 13:39]:
> > > > * Arnd Bergmann <arnd@arndb.de> [120915 13:15]:
> > > > > On Saturday 15 September 2012, Tony Lindgren wrote:
> > > > > > With my patches, this is now all omap1 specific and
> > > > > > moved to arch/arm/mach-omap1/include/mach/hardware.h.
> > > > > > It's probably easiest to just update this patch on
> > > > > > top of the hardware.h changes I've done.
> > > > > 
> > > > > Yes, sounds good. Do you want to send a patch for that
> > > > > and let me drop this one then?
> > > > 
> > > > Yes I can pick this one and update it against one of my
> > > > branches to avoid merge conflicts.
> > > 
> > > This applies against mach-omap1/include/mach/hardware.h
> > > with some fuzz so no issues there.
> > > 
> > > But I think we should not apply it as these are physical
> > > addresses, not virtual addresses for omap1.
> > 
> > Right, I misread what is actually going on here because the
> > only driver I looked at treated the address as a virtual
> > address pointer.
> > 
> > > We have IOMEM already in use for omap_read/write because of:
> > > 
> > > #define OMAP1_IO_ADDRESS(pa)    IOMEM((pa) - OMAP1_IO_OFFSET)
> > > 
> > > I think the right solution is to eventually get rid of
> > > omap_read/write for omap1 also and replace them with ioremap
> > > + readl/writel.
> > 
> > Agreed.

OK.
 
> > > Or am I missing something?
> > 
> > I did not see any new warnings for omap1, but I did see this
> > on omap2plus_defconfig:
> > 
> > drivers/watchdog/omap_wdt.c: In function 'omap_wdt_ioctl':
> > drivers/watchdog/omap_wdt.c:222:4: error: passing argument 1 of '__raw_readw' makes pointer from integer without a cast [-Werror]
> > arch/arm/include/asm/io.h:71:90: note: expected 'const volatile void *' but argument is of type 'unsigned int'
> > 
> > It seems I misinterpreted this, and it's actually a bug in the watchdog
> > driver that should be fixed using this patch instead (and backport it
> > to stable)
> > 
> > diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> > index fceec4f..7b45802 100644
> > --- a/drivers/watchdog/omap_wdt.c
> > +++ b/drivers/watchdog/omap_wdt.c
> > @@ -218,9 +218,11 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
> >  	case WDIOC_GETSTATUS:
> >  		return put_user(0, (int __user *)arg);
> >  	case WDIOC_GETBOOTSTATUS:
> > +#ifdef CONFIG_ARCH_OMAP1
> >  		if (cpu_is_omap16xx())
> > -			return put_user(__raw_readw(ARM_SYSST),
> > +			return put_user(omap_readw(ARM_SYSST),
> >  					(int __user *)arg);
> > +#endif
> 
> indeed... my bad. I agree this should be changed by something better
> though.

Yes that's wrong.

Regards,

Tony

  reply	other threads:[~2012-09-19 16:44 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1347658492-11608-1-git-send-email-arnd@arndb.de>
2012-09-14 21:34 ` [PATCH 01/24] ARM: shmobile: use __iomem pointers for MMIO Arnd Bergmann
2012-09-18  7:11   ` Simon Horman
2012-09-18  8:31     ` Arnd Bergmann
2012-09-18 11:50       ` Simon Horman
2012-09-18 16:04         ` Arnd Bergmann
2012-09-18 23:56           ` Simon Horman
2012-09-18  7:42   ` Paul Mundt
2012-09-14 21:34 ` [PATCH 02/24] ARM: at91: " Arnd Bergmann
2012-09-17  7:56   ` Nicolas Ferre
2012-09-18  8:05     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 03/24] ARM: ebsa110: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 04/24] ARM: ep93xx: " Arnd Bergmann
2012-09-14 22:14   ` Ryan Mallon
2012-09-15  7:55     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 05/24] ARM: imx: " Arnd Bergmann
2012-09-14 22:31   ` Fabio Estevam
2012-09-15 17:42     ` Arnd Bergmann
2012-09-16  7:21       ` Sascha Hauer
2012-09-14 21:34 ` [PATCH 06/24] ARM: integrator: " Arnd Bergmann
2012-09-16 22:19   ` Linus Walleij
2012-09-16 22:35     ` Russell King - ARM Linux
2012-09-16 22:46       ` Linus Walleij
2012-09-16 23:43         ` Russell King - ARM Linux
2012-09-14 21:34 ` [PATCH 07/24] ARM: iop13xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 08/24] ARM: iop32x: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 09/24] ARM: ixp4xx: " Arnd Bergmann
2012-09-18 10:31   ` Krzysztof Halasa
2012-09-18 19:22     ` Krzysztof Halasa
2012-09-19 13:52       ` Arnd Bergmann
2012-09-18 20:12   ` [PATCH 08+09/24] " Krzysztof Halasa
2012-09-18 21:25     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 10/24] ARM: ks8695: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 11/24] ARM: lpc32xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 12/24] ARM: msm: " Arnd Bergmann
2012-09-14 22:38   ` Stephen Boyd
2012-09-15  5:16     ` David Brown
2012-09-14 21:34 ` [PATCH 13/24] ARM: nomadik: " Arnd Bergmann
2012-09-16 22:24   ` Linus Walleij
2012-09-14 21:34 ` [PATCH 14/24] ARM: prima2: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 15/24] ARM: sa1100: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 16/24] ARM: spear13xx: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 17/24] ARM: OMAP: " Arnd Bergmann
2012-09-15 18:10   ` Tony Lindgren
2012-09-15 20:14     ` Arnd Bergmann
2012-09-16 20:38       ` Tony Lindgren
2012-09-17 21:25         ` Tony Lindgren
2012-09-19 13:35           ` Arnd Bergmann
2012-09-19 13:36             ` Felipe Balbi
2012-09-19 16:44               ` Tony Lindgren [this message]
2012-09-14 21:34 ` [PATCH 18/24] ARM: samsung: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 19/24] sh: " Arnd Bergmann
2012-09-18  7:37   ` Paul Mundt
2012-09-18  8:01     ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 20/24] input: rpcmouse: " Arnd Bergmann
2012-09-19 17:06   ` Dmitry Torokhov
2012-09-14 21:34 ` [PATCH 21/24] serial: ks8695: " Arnd Bergmann
2012-09-14 23:44   ` Greg Kroah-Hartman
2012-09-14 21:34 ` [PATCH 22/24] scsi: eesox: " Arnd Bergmann
2012-09-14 23:27   ` Russell King - ARM Linux
2012-09-15  8:00     ` Arnd Bergmann
2012-09-15  8:57       ` Russell King - ARM Linux
2012-09-15 10:30         ` Arnd Bergmann
2012-09-17 22:03           ` Russell King - ARM Linux
2012-09-18  8:09             ` Arnd Bergmann
2012-09-14 21:34 ` [PATCH 23/24] video: da8xx-fb: " Arnd Bergmann
2012-09-14 21:34 ` [PATCH 24/24] net: seeq: " Arnd Bergmann
2012-09-14 23:56   ` Russell King - ARM Linux
2012-09-15  4:00     ` David Miller
2012-09-18  8:14       ` Arnd Bergmann
2012-09-15 11:33 ` [PATCH 13/24] ARM: nomadik: " Alessandro Rubini
2012-09-28 20:13   ` Arnd Bergmann

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=20120919164424.GD11762@atomide.com \
    --to=tony@atomide.com \
    --cc=arnd@arndb.de \
    --cc=balbi@ti.com \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nico@linaro.org \
    --cc=r.sricharan@ti.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=santosh.shilimkar@ti.com \
    --cc=shubhrajyoti@ti.com \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).