]> git.karo-electronics.de Git - mv-sheeva.git/commit
atyfb: Fix bootup hangs on sparc64.
authorDavid S. Miller <davem@davemloft.net>
Wed, 5 Jan 2011 21:08:06 +0000 (13:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jan 2011 19:38:19 +0000 (11:38 -0800)
commit09798eb9479da3413bdf96e7d22a84d8b21e05e1
tree75e7b1d5475d3ab72bbc0f1d306718800523e604
parent050855887236701c5e7ff803b42265824ce99885
atyfb: Fix bootup hangs on sparc64.

After commit 25edd6946a1d74e5e77813c2324a0908c68bcf9e ("sparc64: Get
rid of indirect p1275 PROM call buffer.")  we can't pass virtual
addresses >4GB to PROM calls.

Largely this is never necessary in drivers because we have a copy of
the entire PROM device tree in the kernel and a set of of_*()
interfaces to access it.

Unfortunately there were some lingering prom calls in the atyfb
driver, in particular prom_finddevice() was being called with an
on-stack address which could be anywhere.

This code is actually probing for information we already have, the
PROM choosen console output device is stored in of_console_device so
all of this nasty code consolidates into a one-line comparison.

Next we have some prom_getintdefault() calls which are trivially
transformed into the equivalent of_getintprop_default().

Special thanks to Fabio, who figured out exactly where the bootup
was hanging.  That made this bug trivial to fix.

Reported-by: Fabio M. Di NItto <fabbione@fabbione.net>
Reported-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Fabio M. Di NItto <fabbione@fabbione.net>
drivers/video/aty/atyfb_base.c