perfmon2 patch for review: modified i386 files
In-Reply-To: <[email protected]>
On Fri, 12 May 2006 09:33:48 -0700, Stephane Eranian wrote:
<snip>
Quoted 9 lines
arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 renamed from arch/i386/kernel/entry.S 2006-05-12 03:16:09.000000000 -0700 +3
-0@@ -436,6 +436,16 @@ /* The include is where all of the SMP etc. interrupts come from */ #include "entry_arch.h" +#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PERFMON) +ENTRY(pmu_interrupt) + pushl $LOCAL_PERFMON_VECTOR-256
arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 line 451
Quoted 10 lines
arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 renamed from arch/i386/kernel/entry.S 2006-05-12 03:16:09.000000000 -0700 +7
-0+ SAVE_ALL + pushl %esp + call pfm_intr_handler + addl $4, %esp + jmp ret_from_intr +#endif + ENTRY(divide_error) pushl $0 # no error code pushl $do_divide_error
You should rename pfm_intr_handler to smp_pmu_interrupt (yes, it's not really SMP but other functions have that problem too, e.g. smp_error_interrupt) and make it fastcall, then you can do:
BUILD_INTERRUPT(pmu_interrupt, LOCAL_PERFMON_VECTOR)
instead of open-coding it. Then the Xen patch that extends the interrupt vector range won't have to change to accommodate your patch.
You should also probably move the BUILD_INTERRUPT() into entry_arch.h with the rest of them.
Signature · 4 lines
Chuck
"The x86 isn't all that complex -- it just doesn't make a lot of sense."
-- Mike JohnsonChuck,
Quoted 30 lines · Chuck Ebbert
In-Reply-To: <[email protected]>
On Fri, 12 May 2006 09:33:48 -0700, Stephane Eranian wrote:
<snip>
Quoted 9 lines
arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 renamed from arch/i386/kernel/entry.S 2006-05-12 03:16:09.000000000 -0700 +3
-0@@ -436,6 +436,16 @@ /* The include is where all of the SMP etc. interrupts come from */ #include "entry_arch.h" +#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PERFMON) +ENTRY(pmu_interrupt) + pushl $LOCAL_PERFMON_VECTOR-256arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 line 451
Quoted 10 lines
arch/i386/kernel/entry.S 2006-05-12 03:18:52.000000000 -0700 renamed from arch/i386/kernel/entry.S 2006-05-12 03:16:09.000000000 -0700 +7
-0+ SAVE_ALL + pushl %esp + call pfm_intr_handler + addl $4, %esp + jmp ret_from_intr +#endif + ENTRY(divide_error) pushl $0 # no error code pushl $do_divide_errorYou should rename
pfm_intr_handlertosmp_pmu_interrupt(yes, it's not really SMP but other functions have that problem too, e.g.smp_error_interrupt) and make it fastcall, then you can do:
Quoted 8 lines
BUILD_INTERRUPT(pmu_interrupt, LOCAL_PERFMON_VECTOR)instead of open-coding it. Then the Xen patch that extends the interrupt vector range won't have to change to accommodate your patch.
You should also probably move the
BUILD_INTERRUPT()intoentry_arch.hwith the rest of them.
Thanks you for the tip. I made the change for i386 and everything is working fine. It will be in my next release.
Signature · 1 line
-Stephane