* [PATCH] fix phys. address conversion in ia64_pal_tr_read
@ 2004-11-16 1:22 Jesse Barnes
2004-11-16 2:03 ` David Mosberger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jesse Barnes @ 2004-11-16 1:22 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
The palinfo module may call ia64_pal_tr_read using an IPI. If the processor
receiving the IPI is idle, the call will fail since the idle process stack is
in region 5 and ia64_pal_tr_read uses __pa rather than ia64_tpa. This small
patch fixes the problem by making it use ia64_tpa instead.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Thanks,
Jesse
[-- Attachment #2: tr-info-fix-2.patch --]
[-- Type: text/plain, Size: 551 bytes --]
===== include/asm-ia64/pal.h 1.9 vs edited =====
--- 1.9/include/asm-ia64/pal.h 2003-11-25 00:23:21 -08:00
+++ edited/include/asm-ia64/pal.h 2004-11-15 17:07:51 -08:00
@@ -1531,7 +1531,7 @@
ia64_pal_tr_read (u64 reg_num, u64 tr_type, u64 *tr_buffer, pal_tr_valid_u_t *tr_valid)
{
struct ia64_pal_retval iprv;
- PAL_CALL_PHYS_STK(iprv, PAL_VM_TR_READ, reg_num, tr_type,(u64)__pa(tr_buffer));
+ PAL_CALL_PHYS_STK(iprv, PAL_VM_TR_READ, reg_num, tr_type,(u64)ia64_tpa(tr_buffer));
if (tr_valid)
tr_valid->piv_val = iprv.v0;
return iprv.status;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] fix phys. address conversion in ia64_pal_tr_read
2004-11-16 1:22 [PATCH] fix phys. address conversion in ia64_pal_tr_read Jesse Barnes
@ 2004-11-16 2:03 ` David Mosberger
2004-11-16 17:01 ` Jesse Barnes
2004-11-16 17:57 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2004-11-16 2:03 UTC (permalink / raw)
To: linux-ia64
>>>>> On Mon, 15 Nov 2004 17:22:41 -0800, Jesse Barnes <jbarnes@engr.sgi.com> said:
Jesse> The palinfo module may call ia64_pal_tr_read using an IPI.
Jesse> If the processor receiving the IPI is idle, the call will
Jesse> fail since the idle process stack is in region 5 and
Jesse> ia64_pal_tr_read uses __pa rather than ia64_tpa. This small
Jesse> patch fixes the problem by making it use ia64_tpa instead.
Perhaps its worthwhile to do any audit for this kind of problems? It
may not be very difficult to hack sparse to add a check for __pa()
calls on (stack-)local variables.
--david
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix phys. address conversion in ia64_pal_tr_read
2004-11-16 1:22 [PATCH] fix phys. address conversion in ia64_pal_tr_read Jesse Barnes
2004-11-16 2:03 ` David Mosberger
@ 2004-11-16 17:01 ` Jesse Barnes
2004-11-16 17:57 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2004-11-16 17:01 UTC (permalink / raw)
To: linux-ia64
On Monday, November 15, 2004 6:03 pm, David Mosberger wrote:
> >>>>> On Mon, 15 Nov 2004 17:22:41 -0800, Jesse Barnes
> >>>>> <jbarnes@engr.sgi.com> said:
>
> Jesse> The palinfo module may call ia64_pal_tr_read using an IPI.
> Jesse> If the processor receiving the IPI is idle, the call will
> Jesse> fail since the idle process stack is in region 5 and
> Jesse> ia64_pal_tr_read uses __pa rather than ia64_tpa. This small
> Jesse> patch fixes the problem by making it use ia64_tpa instead.
>
> Perhaps its worthwhile to do any audit for this kind of problems? It
> may not be very difficult to hack sparse to add a check for __pa()
> calls on (stack-)local variables.
I didn't see anything obvious in a quick check of all the ia64 users of __pa
(they were mostly referring to stuff in the static data section), but I may
have missed something.
Jesse
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix phys. address conversion in ia64_pal_tr_read
2004-11-16 1:22 [PATCH] fix phys. address conversion in ia64_pal_tr_read Jesse Barnes
2004-11-16 2:03 ` David Mosberger
2004-11-16 17:01 ` Jesse Barnes
@ 2004-11-16 17:57 ` David Mosberger
2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2004-11-16 17:57 UTC (permalink / raw)
To: linux-ia64
>>>>> On Tue, 16 Nov 2004 09:01:49 -0800, Jesse Barnes <jbarnes@engr.sgi.com> said:
Jesse> On Monday, November 15, 2004 6:03 pm, David Mosberger wrote:
>> >>>>> On Mon, 15 Nov 2004 17:22:41 -0800, Jesse Barnes >>>>>
>> <jbarnes@engr.sgi.com> said:
Jesse> The palinfo module may call ia64_pal_tr_read using an IPI.
Jesse> If the processor receiving the IPI is idle, the call will
Jesse> fail since the idle process stack is in region 5 and
Jesse> ia64_pal_tr_read uses __pa rather than ia64_tpa. This small
Jesse> patch fixes the problem by making it use ia64_tpa instead.
>> Perhaps its worthwhile to do any audit for this kind of
>> problems? It may not be very difficult to hack sparse to add a
>> check for __pa() calls on (stack-)local variables.
Jesse> I didn't see anything obvious in a quick check of all the
Jesse> ia64 users of __pa (they were mostly referring to stuff in
Jesse> the static data section), but I may have missed something.
OK, thanks for looking!
--david
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-16 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-16 1:22 [PATCH] fix phys. address conversion in ia64_pal_tr_read Jesse Barnes
2004-11-16 2:03 ` David Mosberger
2004-11-16 17:01 ` Jesse Barnes
2004-11-16 17:57 ` David Mosberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox