[parisc-linux-cvs] linux-2.6 carlos
Carlos O'Donell
carlos at baldric.uwo.ca
Tue Aug 17 12:47:27 MDT 2004
On Tue, Aug 17, 2004 at 12:43:35PM -0600, Carlos O'Donell wrote:
> CVSROOT: /var/cvs
> Module name: linux-2.6
> Changes by: carlos 04/08/17 12:43:35
>
> Modified files:
> arch/parisc/kernel: entry.S pacache.S real2.S
>
> Log message:
> Add comments to all the uses of relied upon translations.
> Add comments to the code that unconditionally turns on the I-bit.
> This change is only comments.
Just comments taht I think are in order for others who might look at
this code and wonder.
Index: arch/parisc/kernel/entry.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/entry.S,v
retrieving revision 1.18
diff -u -p -r1.18 entry.S
--- arch/parisc/kernel/entry.S 30 Jul 2004 23:23:20 -0000 1.18
+++ arch/parisc/kernel/entry.S 17 Aug 2004 18:37:59 -0000
@@ -939,6 +939,7 @@ syscall_exit_rfi:
STREG %r19,PT_SR7(%r16)
intr_return:
+ /* NOTE: Need to enable interrupts incase we schedule. */
ssm PSW_SM_I, %r0
/* Check for software interrupts */
@@ -982,6 +983,8 @@ intr_restore:
ldo PT_FR31(%r29),%r1
rest_fp %r1
rest_general %r29
+
+ /* Create a "relied upon translation" PA 2.0 ref. pg427 */
ssm 0,%r0
nop
nop
@@ -2082,11 +2085,13 @@ syscall_restore:
LDREG TASK_PT_GR29(%r1),%r29
LDREG TASK_PT_GR31(%r1),%r31 /* restore syscall rp */
+ /* NOTE: We use rsm/ssm pair to make this operation atomic */
rsm PSW_SM_I, %r0
LDREG TASK_PT_GR30(%r1),%r30 /* restore user sp */
mfsp %sr3,%r1 /* Get users space id */
mtsp %r1,%sr7 /* Restore sr7 */
ssm PSW_SM_I, %r0
+
mtsp %r1,%sr4 /* Restore sr4 */
mtsp %r1,%sr5 /* Restore sr5 */
mtsp %r1,%sr6 /* Restore sr6 */
@@ -2174,6 +2179,9 @@ pt_regs_ok:
syscall_do_softirq:
bl do_softirq,%r2
nop
+ /* NOTE: We enable I-bit incase we schedule later,
+ * and we might be going back to userspace if we were
+ * traced. */
b syscall_check_resched
ssm PSW_SM_I, %r0 /* do_softirq returns with I bit off */
Index: arch/parisc/kernel/pacache.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/pacache.S,v
retrieving revision 1.6
diff -u -p -r1.6 pacache.S
--- arch/parisc/kernel/pacache.S 25 Apr 2004 14:50:51 -0000 1.6
+++ arch/parisc/kernel/pacache.S 17 Aug 2004 18:37:59 -0000
@@ -68,7 +68,7 @@ flush_tlb_all_local:
* consolidated.
*/
- rsm PSW_SM_I,%r19 /* relied upon translation! */
+ rsm PSW_SM_I,%r19 /* relied upon translation! PA 2.0 pg427 */
nop
nop
nop
Index: arch/parisc/kernel/real2.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/real2.S,v
retrieving revision 1.14
diff -u -p -r1.14 real2.S
--- arch/parisc/kernel/real2.S 9 Aug 2004 03:01:41 -0000 1.14
+++ arch/parisc/kernel/real2.S 17 Aug 2004 18:37:59 -0000
@@ -149,7 +149,7 @@ restore_control_regs:
rfi_virt2real:
/* switch to real mode... */
ssm 0,0 /* See "relied upon translation" */
- nop /* comment in interruption.S */
+ nop /* PA 2.0 ref pg427 */
nop
nop
nop
@@ -186,7 +186,7 @@ rfi_v2r_1:
.align 128
rfi_real2virt:
ssm 0,0 /* See "relied upon translation" */
- nop /* comment in interruption.S */
+ nop /* PA 2.0 ref pg427 */
nop
nop
nop
More information about the parisc-linux-cvs
mailing list