[parisc-linux-cvs] miscellaneous patch

John Marvin jsm@udlkern.fc.hp.com
Fri, 30 Mar 2001 05:37:32 -0700 (MST)


This patch contains some small miscellaneous changes. One fix
closes a hole where we could take a signal while privileged on the
gateway page (before sr7 was set to 0).

Remove call to do_softirq in do_irq (it's redundant, we call it in
entry.S upon return from do_irq_mask).

Fix some comments.

--- arch/parisc/kernel/entry.S.old	Fri Mar 30 04:51:55 2001
+++ arch/parisc/kernel/entry.S	Fri Mar 30 05:11:21 2001
@@ -738,7 +738,7 @@ intr_do_resched:
 	.import do_signal,code
 intr_do_signal:
 	/* Only do signals if we are returning to user space */
-	LDREG   PT_SR7(%r16), %r20
+	LDREG   PT_IASQ0(%r16), %r20
 	CMPIB= 0,%r20,intr_restore /* backward */
 	nop
 
@@ -2100,19 +2100,17 @@ syscall_restore:
 	 */
 
 #ifdef __LP64__
-
-	/* Note the be (and mtsp) is executed in narrow mode. This is OK
-	 * for 32 bit processes, but won't work once we support 64 bit
-	 * processes.
+	/* Since we are returning to a 32 bit user process, we always
+	 * clear the W bit. This means that the be (and mtsp) gets
+	 * executed in narrow mode, but that is OK, since we are
+	 * returning to a 32 bit process. When we support 64 bit processes
+	 * we won't clear the W bit, so the be will run in wide mode.
 	 */
 
 	rsm	PSW_SM_W, %r0
+#endif
 	be	0(%sr3,%r31)			   /* return to user space */
 	mtsp	%r1,%sr7			   /* Restore sr7 */
-#else
-	be	0(%sr3,%r31)			   /* return to user space */
-	mtsp	%r1,%sr7			   /* Restore sr7 */
-#endif
 
 	/* We have to return via an RFI, so that PSW T and R bits can be set
 	 * appropriately.
--- arch/parisc/kernel/irq.c.old	Fri Mar 30 05:06:01 2001
+++ arch/parisc/kernel/irq.c	Fri Mar 30 05:06:41 2001
@@ -314,8 +314,6 @@ txn_alloc_data(int virt_irq, unsigned in
 	return(IRQ_OFFSET(virt_irq));
 }
 
-
-/* FIXME: SMP, flags, bottom halves, rest */
 void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
 {
 	int cpu = smp_processor_id();
@@ -336,9 +334,6 @@ void do_irq(struct irqaction *action, in
 	}
 
 	irq_exit(cpu, irq);
-
-	/* do_irq_mask() deals with IRQ unmasking and stuff */
-	do_softirq();
 }
 
 void do_irq_mask(unsigned long mask, struct irq_region *region, struct pt_regs *regs)