diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-11-25 12:35:35 +0100 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-11-25 12:35:35 +0100 |
commit | 525e3b393b52ec04348d794b451c305a52e53337 (patch) | |
tree | 214400631afcef31b8864fd0c973993b18b461dd /slof/fs | |
parent | 54539073a963971b9e98dc64299a97b7e98cfd19 (diff) | |
download | SLOF-525e3b393b52ec04348d794b451c305a52e53337.zip SLOF-525e3b393b52ec04348d794b451c305a52e53337.tar.gz SLOF-525e3b393b52ec04348d794b451c305a52e53337.tar.bz2 |
Fixed crash during "quiesce" when USB OHCI controller is enabledqemu-slof-20111128
The OHCI code unmaps the allocated DMA buffers during "quiesce". For this
the dma-map-out and dma-free functions were using the $call-parent function
that requires a valid current instance ("my-self"). However, there is no
current instance available during "quiesce" so $call-parent aborted the boot
process.
To fix the problem, the dma-* functions now use $call-static again so that
they also work without a current instance.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'slof/fs')
-rw-r--r-- | slof/fs/instance.fs | 2 | ||||
-rw-r--r-- | slof/fs/pci-device.fs | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/slof/fs/instance.fs b/slof/fs/instance.fs index 4ba42e5..9fc4bb0 100644 --- a/slof/fs/instance.fs +++ b/slof/fs/instance.fs @@ -151,7 +151,7 @@ CONSTANT <instancevariable> 0 VALUE calling-child : $call-parent - my-self TO calling-child + my-self ihandle>phandle TO calling-child my-parent $call-method 0 TO calling-child ; diff --git a/slof/fs/pci-device.fs b/slof/fs/pci-device.fs index 3e90464..afad756 100644 --- a/slof/fs/pci-device.fs +++ b/slof/fs/pci-device.fs @@ -10,8 +10,10 @@ \ * IBM Corporation - initial implementation \ ****************************************************************************/ +get-node CONSTANT my-phandle + \ get the PUID from the node above -s" my-puid" get-node parent $call-static CONSTANT my-puid +s" my-puid" my-phandle parent $call-static CONSTANT my-puid \ define the config reads : config-b@ puid >r my-puid TO puid my-space + rtas-config-b@ r> TO puid ; @@ -54,19 +56,27 @@ s" my-puid" get-node parent $call-static CONSTANT my-puid \ DMA memory allocation functions : dma-alloc ( size -- virt ) - s" dma-alloc" $call-parent + my-phandle TO calling-child + s" dma-alloc" my-phandle parent $call-static + 0 TO calling-child ; : dma-free ( virt size -- ) - s" dma-free" $call-parent + my-phandle TO calling-child + s" dma-free" my-phandle parent $call-static + 0 TO calling-child ; : dma-map-in ( virt size cacheable? -- devaddr ) - s" dma-map-in" $call-parent + my-phandle TO calling-child + s" dma-map-in" my-phandle parent $call-static + 0 TO calling-child ; : dma-map-out ( virt devaddr size -- ) - s" dma-map-out" $call-parent + my-phandle TO calling-child + s" dma-map-out" my-phandle parent $call-static + 0 TO calling-child ; |