patch-2.4.9 linux/arch/arm/kernel/oldlatches.c

Next file: linux/arch/arm/kernel/process.c
Previous file: linux/arch/arm/kernel/irq-arch.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/arch/arm/kernel/oldlatches.c linux/arch/arm/kernel/oldlatches.c
@@ -27,11 +27,14 @@
 void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
 {
 	if (machine_is_archimedes()) {
+		unsigned long flags;
+
+		local_save_flags(flags);
 		latch_a_copy = (latch_a_copy & ~mask) | newdata;
+		__raw_writeb(latch_a_copy, LATCHA_BASE);
+		local_restore_flags(flags);
 
 		printk("Latch: A = 0x%02x\n", latch_a_copy);
-
-		__raw_writeb(latch_a_copy, LATCHA_BASE);
 	} else
 		BUG();
 }
@@ -41,11 +44,14 @@
 void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
 {
 	if (machine_is_archimedes()) {
+		unsigned long flags;
+
+		local_save_flags(flags);
 		latch_b_copy = (latch_b_copy & ~mask) | newdata;
+		__raw_writeb(latch_b_copy, LATCHB_BASE);
+		local_restore_flags(flags);
 
 		printk("Latch: B = 0x%02x\n", latch_b_copy);
-
-		__raw_writeb(latch_b_copy, LATCHB_BASE);
 	} else
 		BUG();
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)