summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/apic_vector.S
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-05-23 16:23:29 +0000
committerbde <bde@FreeBSD.org>2004-05-23 16:23:29 +0000
commitf11d5307d3f59bad3e976d1fd1688b3523bdd53c (patch)
tree33cae11128d0dbd1d87bbc773fd677874f6fd69c /sys/amd64/amd64/apic_vector.S
parent9f92506d5d930d3c9e535a53d4a77c5ddb4dbd1a (diff)
downloadFreeBSD-src-f11d5307d3f59bad3e976d1fd1688b3523bdd53c.zip
FreeBSD-src-f11d5307d3f59bad3e976d1fd1688b3523bdd53c.tar.gz
Adjusted FAKE_MCOUNT()s for amd64. This is needed for both ordinary
and high resolution profiling of interrupt handlers. The adjustments are routine once the magic stack offset 13*4 is decoded to be TF_RIP (there were originally more types of stack frames so using TF_EIP for one of them wouldn't have been much simpler). Removed garbage comments attached to some of the FAKE_MCOUNT()s.
Diffstat (limited to 'sys/amd64/amd64/apic_vector.S')
-rw-r--r--sys/amd64/amd64/apic_vector.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S
index 55e2c28..3adb3cc 100644
--- a/sys/amd64/amd64/apic_vector.S
+++ b/sys/amd64/amd64/apic_vector.S
@@ -100,7 +100,7 @@
SUPERALIGN_TEXT ; \
IDTVEC(vec_name) ; \
PUSH_FRAME ; \
- FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid double count */ \
+ FAKE_MCOUNT(TF_RIP(%rsp)) ; \
movq lapic, %rdx ; /* pointer to local APIC */ \
movl LA_ISR + 16 * (index)(%rdx), %eax ; /* load ISR */ \
bsrl %eax, %eax ; /* index of highset set bit in ISR */ \
@@ -234,7 +234,7 @@ IDTVEC(statclock)
movq lapic, %rdx
movl $0, LA_EOI(%rdx) /* End Of Interrupt to APIC */
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_RIP(%rsp))
call forwarded_statclock
MEXITCOUNT
@@ -256,7 +256,7 @@ IDTVEC(cpuast)
movq lapic, %rdx
movl $0, LA_EOI(%rdx) /* End Of Interrupt to APIC */
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_RIP(%rsp))
MEXITCOUNT
jmp doreti
OpenPOWER on IntegriCloud