All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave <dave.jiang@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, smaurer@teja.com,
	linux@arm.linux.org.uk, dsaxena@plexity.net,
	drew.moseley@intel.com, mporter@kernel.crashing.org
Subject: Re: [PATCH 1/5] Convert resource to u64 from unsigned long
Date: Thu, 13 Jan 2005 17:48:16 -0700	[thread overview]
Message-ID: <8746466a0501131648640e0575@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0501131641390.2310@ppc970.osdl.org>

On Thu, 13 Jan 2005 16:43:58 -0800 (PST), Linus Torvalds
<torvalds@osdl.org> wrote:
> 
> 
> On Thu, 13 Jan 2005, Andrew Morton wrote:
> >
> > Also, the patches introduce tons of ifdefs such as:
> >
> > +#if BITS_PER_LONG == 64
> >       return (void __iomem *)pci_resource_start(pdev, PCI_ROM_RESOURCE);
> > +#else
> > +     return (void __iomem *)(u32)pci_resource_start(pdev, PCI_ROM_RESOURCE);
> > +#endif
> 
> Ouch. Who does that, anyway? It's wrong to do that. It's not a pointer,
> not even an __iomem one. You'd need to do an ioremap() on it to turn it
> into a pointer.
> 
>                 Linus
> 

It's in the PCI option ROM code and at first it thew me just a bit
too. Apparently the resource.start is a kmalloc'd buffer and not
really an actual bus address. Is that a gross abuse of the way struct
resource is intended to be used?

-- 
-= Dave =-

Software Engineer - Advanced Development Engineering Team 
Storage Component Division - Intel Corp. 
mailto://dave.jiang @ intel
http://sourceforge.net/projects/xscaleiop/
----
The views expressed in this email are
mine alone and do not necessarily 
reflect the views of my employer
(Intel Corp.).

  reply	other threads:[~2005-01-14  0:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 23:26 [PATCH 1/5] Convert resource to u64 from unsigned long Dave
2005-01-14  0:23 ` Andrew Morton
2005-01-14  0:28   ` Dave
2005-01-14  0:43   ` Linus Torvalds
2005-01-14  0:48     ` Dave [this message]
2005-01-14  0:52   ` Al Viro
2005-01-14  0:52   ` Russell King
2005-01-14  1:35   ` Jesse Barnes
2005-01-14  3:49     ` Dave
2005-01-14  0:52 ` Greg KH

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=8746466a0501131648640e0575@mail.gmail.com \
    --to=dave.jiang@gmail.com \
    --cc=akpm@osdl.org \
    --cc=drew.moseley@intel.com \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mporter@kernel.crashing.org \
    --cc=smaurer@teja.com \
    --cc=torvalds@osdl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.