<br><tt><font size=2>Adrian Reber wrote on 11.06.2009 12:52:17:</font></tt>
<br><tt><font size=2>> <br>
> I forgot about this patch. Can this still be merged?<br>
> <br>
> <br>
> On Thu, Mar 26, 2009 at 01:05:42PM +0100, Adrian Reber wrote:<br>
> > Using the RTAS watchdog driver to read out the temperature crashes<br>
> > on a PXCAB:<br>
> > <br>
> > Unable to handle kernel paging request for data at address 0xfe347b50<br>
> > Faulting instruction address: 0xc00000000001af64<br>
> > Oops: Kernel access of bad area, sig: 11 [#1]<br>
> > <br>
> > The wrong usage of "(void *)__pa(&temperature)"
in rtas_call() is<br>
> > removed by using the function rtas_get_sensor() which does the<br>
> > right thing.<br>
> > <br>
> > Signed-off-by: Adrian Reber <adrian@lisas.de><br>
> > ---<br>
> > v2: use rtas_get_sensor(); typo fixed<br>
> > ---<br>
> > drivers/watchdog/wdrtas.c | 8 +++-----<br>
> > 1 files changed, 3 insertions(+), 5 deletions(-)<br>
> > <br>
> > diff --git a/drivers/watchdog/wdrtas.c b/drivers/watchdog/wdrtas.c<br>
> > index 5d3b1a8..a9f00dc 100644<br>
> > --- a/drivers/watchdog/wdrtas.c<br>
> > +++ b/drivers/watchdog/wdrtas.c<br>
> > @@ -214,16 +214,14 @@ static void wdrtas_timer_keepalive(void)<br>
> > */<br>
> > static int wdrtas_get_temperature(void)<br>
> > {<br>
> > - long result;<br>
> > + int result;<br>
> > int temperature = 0;<br>
> > <br>
> > - result = rtas_call(wdrtas_token_get_sensor_state, 2,
2,<br>
> > - (void *)__pa(&temperature),<br>
> > - WDRTAS_THERMAL_SENSOR,
0);<br>
> > + result = rtas_get_sensor(WDRTAS_THERMAL_SENSOR, 0, &temperature);<br>
> > <br>
> > if (result < 0)<br>
> > printk(KERN_WARNING "wdrtas:
reading the thermal sensor "<br>
> > - "faild: %li\n",
result);<br>
> > + "failed: %i\n",
result);<br>
> > else<br>
> > temperature = ((temperature * 9) /
5) + 32; /* fahrenheit */<br>
> > <br>
> > -- <br>
> > 1.5.6.6<br>
</font></tt>
<br><tt><font size=2>makes sense. Second version also looks good to me
-- thanks!</font></tt>
<br>
<br><tt><font size=2>Acked-by: Utz Bacher <utz.bacher@de.ibm.com></font></tt>
<br>
<br><tt><font size=2>Utz</font></tt>
<br>
<br><tt><font size=2>:wq</font></tt>