Re: [PATCH 1/5] Convert resource to u64 from unsigned long

Russell King
2005-01-14T01:09:05Z

On Thu, Jan 13, 2005 at 04:23:09PM -0800, 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

That looks rather illegal to me. What says that ROM resources are
in a different memory space to MMIO resources? PCI internally treats
them the same as MMIO, and as such they certainly require ioremapping
on ARM.

Just because x86 has a broken architecture with respect to having
holes in its memory map does not mean that's suitable for the rest
of the world.

ISTR x86 ioremap knows about this, so maybe the solution to the above
is to do it the Right Way(tm) and use ioremap() ?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core