Re: [PATCH resend 2/2] PCI: don't allocate resource above 4G for 32-bit BAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 18 February 2009 17:56:24 Zhao, Yu wrote:
> Matthew Wilcox wrote:
> > On Wed, Feb 18, 2009 at 10:11:06AM -0800, Jesse Barnes wrote:
> >> I wonder if it's worth adding better checks for bus vs CPU space mixups,
> >> maybe with a sparse annotation or a new typedef...
> >
> > Part of the problem is that our PCI layer kludges all this around.
> > First we read bus addresses into a struct resource, then we hand it
> > off to arch code that frobs the struct resource.  We also have struct
> > pci_bus_region which is supposed to represent bus addresses, but we
> > don't use it consistently.
> >
> > I've wanted to fix this for a while, but there always seems to
> > be something more urgent to do.  Plus it means fixing up a lot of
> > architectures.
>
> Do you mean pcibios_bus_to_resource() doesn't work well, or something
> else? Can you please advise what we should do now?

No it should work; it's just that CPU addr vs. bus addr mixups are pretty 
common if you're used to dealing with x86 platforms, so we were talking about 
making the code a bit clearer about the distinction.  Unfortunately things are 
a bit tangled, so it's kind of a chore.
-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux