* Q about ST0_UX
@ 2002-01-09 7:08 Jason Gunthorpe
2002-01-09 11:30 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Jason Gunthorpe @ 2002-01-09 7:08 UTC (permalink / raw)
To: linux-mips
Hi All,
I just noticed that in setup.c there is this little bit:
s = read_32bit_cp0_register(CP0_STATUS);
s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
s |= ST0_CU0;
write_32bit_cp0_register(CP0_STATUS, s);
And it doesn't mask off ST0_UX - is this an oversight? With my RM7K the
kernel is called with ST0_UX set, and since it doesn't clear it the XTLB
handler is called - which faults things..
So, would this patch be appropriate in general:
--- setup.c 2001/12/02 11:34:38 1.96
+++ setup.c 2002/01/09 08:05:43
@@ -558,7 +558,7 @@
/* Disable coprocessors and set FPU for 16 FPRs */
s = read_32bit_cp0_register(CP0_STATUS);
- s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
+ s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_UX|ST0_KX|ST0_SX|ST0_FR);
s |= ST0_CU0;
write_32bit_cp0_register(CP0_STATUS, s);
or is it better to make the xtlb handler work in the 32 bit case?
Thanks,
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Q about ST0_UX
2002-01-09 7:08 Q about ST0_UX Jason Gunthorpe
@ 2002-01-09 11:30 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2002-01-09 11:30 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: linux-mips
On Wed, Jan 09, 2002 at 12:08:47AM -0700, Jason Gunthorpe wrote:
> I just noticed that in setup.c there is this little bit:
>
> s = read_32bit_cp0_register(CP0_STATUS);
> s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
> s |= ST0_CU0;
> write_32bit_cp0_register(CP0_STATUS, s);
>
> And it doesn't mask off ST0_UX - is this an oversight? With my RM7K the
> kernel is called with ST0_UX set, and since it doesn't clear it the XTLB
> handler is called - which faults things..
On all firmware I've made the 32-bit kernel run on it is invoked with UX
cleared so I just didn't bother to clear it myself.
> So, would this patch be appropriate in general:
>
> --- setup.c 2001/12/02 11:34:38 1.96
> +++ setup.c 2002/01/09 08:05:43
> @@ -558,7 +558,7 @@
>
> /* Disable coprocessors and set FPU for 16 FPRs */
> s = read_32bit_cp0_register(CP0_STATUS);
> - s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_KX|ST0_SX|ST0_FR);
> + s &= ~(ST0_CU1|ST0_CU2|ST0_CU3|ST0_UX|ST0_KX|ST0_SX|ST0_FR);
> s |= ST0_CU0;
> write_32bit_cp0_register(CP0_STATUS, s);
>
> or is it better to make the xtlb handler work in the 32 bit case?
No, your patch is the right thing. Enabeling UX would also permit the
use of 64-bit instructions and that wouldn't work on the 32-bit kernel.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-09 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-09 7:08 Q about ST0_UX Jason Gunthorpe
2002-01-09 11:30 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox