summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/atpic_vector.s
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2000-12-13 09:23:53 +0000
committerjake <jake@FreeBSD.org>2000-12-13 09:23:53 +0000
commit90d90d0c248fbcde27a7d443098c2bf514aaa199 (patch)
tree48852dbfa3490f6dfe3145145122f26ee2991cd5 /sys/i386/isa/atpic_vector.s
parent46b93fb7883b21c43eeac8eb6f58b1288edb2518 (diff)
downloadFreeBSD-src-90d90d0c248fbcde27a7d443098c2bf514aaa199.zip
FreeBSD-src-90d90d0c248fbcde27a7d443098c2bf514aaa199.tar.gz
Introduce a new potientially cleaner interface for accessing per-cpu
variables from i386 assembly language. The syntax is PCPU(member) where member is the capitalized name of the per-cpu variable, without the gd_ prefix. Example: movl %eax,PCPU(CURPROC). The capitalization is due to using the offsets generated by genassym rather than the symbols provided by linking with globals.o. asmacros.h is the wrong place for this but it seemed as good a place as any for now. The old implementation in asnames.h has not been removed because it is still used to de-mangle the symbols used by the C variables for the UP case.
Diffstat (limited to 'sys/i386/isa/atpic_vector.s')
-rw-r--r--sys/i386/isa/atpic_vector.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/isa/atpic_vector.s b/sys/i386/isa/atpic_vector.s
index f810401..e28c375 100644
--- a/sys/i386/isa/atpic_vector.s
+++ b/sys/i386/isa/atpic_vector.s
@@ -60,7 +60,7 @@ IDTVEC(vec_name) ; \
mov %ax,%es ; \
mov %ax,%fs ; \
FAKE_MCOUNT((12+ACTUALLY_PUSHED)*4(%esp)) ; \
- incb _intr_nesting_level ; \
+ incb PCPU(INTR_NESTING_LEVEL) ; \
pushl _intr_unit + (irq_num) * 4 ; \
call *_intr_handler + (irq_num) * 4 ; /* do the work ASAP */ \
enable_icus ; /* (re)enable ASAP (helps edge trigger?) */ \
@@ -100,7 +100,7 @@ IDTVEC(vec_name) ; \
movb %al,_imen + IRQ_BYTE(irq_num) ; \
outb %al,$icu+ICU_IMR_OFFSET ; \
enable_icus ; \
- incb _intr_nesting_level ; \
+ incb PCPU(INTR_NESTING_LEVEL) ; \
__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
OpenPOWER on IntegriCloud