From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
x86 maintainers <x86@kernel.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [git-pull -tip] x86: Basic AMD Support for performance counters
Date: Sun, 01 Mar 2009 17:11:30 +0530 [thread overview]
Message-ID: <1235907690.19758.1.camel@ht.satnam> (raw)
In-Reply-To: <20090301113010.GA1203@elte.hu>
On Sun, 2009-03-01 at 12:30 +0100, Ingo Molnar wrote:
> * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>
> > On Sun, 2009-03-01 at 09:36 +0100, Ingo Molnar wrote:
> > > * Ingo Molnar <mingo@elte.hu> wrote:
> > >
> > > > Seems to be working fine, here's the output from an Athlon 64
> > > > 3200+ (Sempron) box:
> > > >
> > > > Performance counter stats for 'ls':
> > > >
> > > > 17.420811 task clock ticks (msecs)
> > > >
> > > > 0 CPU migrations (events)
> > > > 12 context switches (events)
> > > > 583 pagefaults (events)
> > > > 29760299 CPU cycles (events)
> > > > 29401642 instructions (events)
> > > > 12698498 cache references (events)
> > > > 66269 cache misses (events)
> > > >
> > > > Wall-clock time elapsed: 687.999988 msecs
> > >
> > > The patches cause a crash on another system - an Opteron system
> > > spontaneous reboots at this point during early bootup:
> > >
> > > CPU 0/0x4 -> Node 0
> > > tseg: 00cfe00000
> > > CPU: Physical Processor ID: 0
> > > CPU: Processor Core ID: 0
> > > using C1E aware idle routine
> > > AMD Performance Monitoring support detected.
> > > ... num counters: 4
> > > ... value mask: 0000000000000000
> > > ... fixed counters: 0
> > > ... counter mask: 000000000000000f
> > > ACPI: Core revision 20081204
> > > ftrace: converting mcount calls to 0f 1f 44 00 00
> > > ftrace: allocating 16365 entries in 129 pages
> > > Setting APIC routing to physical flat
> > > masked ExtINT on CPU#0
> > > ENABLING IO
> > > [reboot]
> > >
> >
> > Can you please share your config file.
>
> any config file will crash that box. I used the 64-bit defconfig
> - i.e. 'make ARCH=x86_64 defconfig'.
>
Can you please try this patch:
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 266618a..5447cc0 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -146,7 +146,9 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
* Generate PMC IRQs:
* (keep 'enabled' bit clear for now)
*/
- hwc->config = ARCH_PERFMON_EVENTSEL_INT;
+ /* Currently Interrupts are disabled on AMD */
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+ hwc->config = ARCH_PERFMON_EVENTSEL_INT;
/*
* Count user and OS events unless requested not to.
next prev parent reply other threads:[~2009-03-01 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 17:37 [git-pull -tip] x86: Basic AMD Support for performance counters Jaswinder Singh Rajput
2009-02-28 9:40 ` Ingo Molnar
2009-02-28 13:44 ` Ingo Molnar
2009-03-01 8:36 ` Ingo Molnar
2009-03-01 10:41 ` Jaswinder Singh Rajput
2009-03-01 11:30 ` Ingo Molnar
2009-03-01 11:41 ` Jaswinder Singh Rajput [this message]
2009-03-01 11:58 ` Ingo Molnar
2009-03-01 12:00 ` Ingo Molnar
2009-03-01 12:14 ` Jaswinder Singh Rajput
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235907690.19758.1.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox