patch-2.2.7 linux/arch/sparc/lib/irqlock.S
Next file: linux/arch/sparc/mm/init.c
Previous file: linux/arch/sparc/lib/debuglocks.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
Thu Apr 22 19:24:51 1999
- Orig file:
v2.2.6/linux/arch/sparc/lib/irqlock.S
- Orig date:
Tue May 13 22:41:03 1997
diff -u --recursive --new-file v2.2.6/linux/arch/sparc/lib/irqlock.S linux/arch/sparc/lib/irqlock.S
@@ -1,4 +1,4 @@
-/* $Id: irqlock.S,v 1.4 1997/05/01 02:26:54 davem Exp $
+/* $Id: irqlock.S,v 1.5 1999/04/20 13:22:37 anton Exp $
* irqlock.S: High performance IRQ global locking and interrupt entry.
*
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -9,69 +9,6 @@
.text
.align 4
-
- /* This is incredibly insane... */
- .globl ___irq_enter
-___irq_enter:
- sethi %hi(local_irq_count), %g2
- sll %g1, 2, %g1
- or %g2, %lo(local_irq_count), %g2
- ld [%g2 + %g1], %g3
- sethi %hi(global_irq_count), %g5
- add %g3, 1, %g3
- or %g5, %lo(global_irq_count), %g5
- st %g3, [%g2 + %g1]
-1:
- ldstub [%g5 + 3], %g2
- orcc %g2, 0x0, %g0
- bne 1b
- ld [%g5], %g3
- sra %g3, 8, %g3
- add %g3, 1, %g3
- sll %g3, 8, %g3
- st %g3, [%g5]
- sethi %hi(global_irq_lock), %g1
- ldub [%g1 + %lo(global_irq_lock)], %g2
-1:
- orcc %g2, 0x0, %g0
- bne,a 1b
- ldub [%g1 + %lo(global_irq_lock)], %g2
-___irq_enter_out:
- jmpl %o7, %g0
- mov %g4, %o7
-
- .globl ___irq_exit
-___irq_exit:
- rd %psr, %g3
- sethi %hi(global_irq_count), %g1
- or %g3, PSR_PIL, %g3
- or %g1, %lo(global_irq_count), %g1
- wr %g3, 0x0, %psr
- sethi %hi(local_irq_count), %g2
- sll %g7, 2, %g7
- or %g2, %lo(local_irq_count), %g2
- ld [%g2 + %g7], %g3
-1:
- ldstub [%g1 + 3], %g5
- orcc %g5, 0x0, %g0
- bne 1b
- ld [%g1], %g5
- sra %g5, 8, %g5
- sub %g5, 1, %g5
- sll %g5, 8, %g5
- st %g5, [%g1]
- sub %g3, 1, %g3
- sethi %hi(global_irq_holder), %g1
- st %g3, [%g2 + %g7]
- srl %g7, 2, %g7
- ldub [%g1 + %lo(global_irq_holder)], %g5
- cmp %g5, %g7
- bne ___irq_enter_out
- mov NO_PROC_ID, %g2
- stb %g2, [%g1 + %lo(global_irq_holder)]
- sethi %hi(global_irq_lock), %g5
- b ___irq_enter_out
- stb %g0, [%g5 + %lo(global_irq_lock)]
/* Weird calling conventions... %g7=flags, %g4=%prev_o7
* Very clever for the __global_sti case, the inline which
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)