i386: Fix perfctr watchdog on core duo
authorStephane Eranian <eranian@hpl.hp.com>
Thu, 6 Sep 2007 14:59:51 +0000 (16:59 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Sep 2007 01:57:47 +0000 (18:57 -0700)
commit23d5ea5d3edcfe899cd91fca87a4af799bcc5794
treeae68487fea0c1c2642260e54b24c11135edfa622
parentb8da0d1c27f144bce999c653467106f3f0d5a308
i386: Fix perfctr watchdog on core duo

Fix the NMI watchdog on Intel CoreDuo processor where the kernel would
get stuck during boot.  The issue is related to errata AE49, where the
PERFEVTSEL1 counter does not have a working enable bit.  Thus it is not
possible to use it for NMI.

The patch creates a dedicated wd_ops for CoreDuo which falls back to
using PERFEVTSEL0.  The other Intel processors supporting the
architectural PMU will keep on using PERFEVTSEL1 as this allows other
subsystems, such as perfmon, to use PERFEVTSEL0 for PEBS monitoring in
particular.  Bug initially reported by Daniel Walker.

AK: Added comments

Signed-off-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/kernel/cpu/perfctr-watchdog.c