PCI Radeon RV100 detection hang on sparc64
David Miller
davem at davemloft.net
Thu Sep 6 11:08:24 PDT 2012
From: Meelis Roos <mroos at linux.ee>
Date: Thu, 6 Sep 2012 17:41:13 +0300 (EEST)
> And here the machine hangs. Debugging printk-s reveal that it does not
> find any active I/O port resources and then continues into initializing
> the card. Down in igp_read_bios_from_vram() it successfully ioremaps
> memory region 0 (vram_base=1ff08000000 and size=40000) and tries to read
> 2 bytes from there and hangs on reading bios[0].
Mappings obtained from ioremap() may not be derefenced directly.
What you get back from ioremap() isn't a pointer. It's an opaque
__iomem cookie, which must only be used via readl() et al.
On sparc64 ioremap() happens to return a physical address, that's why
this non-portable code crashes.
More information about the dri-devel
mailing list