Skip to content

Commit

Permalink
sparc64: Fix NMI startup bug which also breaks perf.
Browse files Browse the repository at this point in the history
Doing NMI startup as an early initcall doesn't work because we need
to have SMP started up by then.

So we'd only NMI startup one cpu, which causes perf PMU grab to
BUG because the nmi_active count isn't what it's supposed to be.

This also points out that we don't have proper CPU up/down notifiers
for the NMI code which will need to be fixed at some point.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 15, 2011
1 parent 711c71a commit b62818e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions arch/sparc/include/asm/pcr.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ static inline u64 picl_value(unsigned int nmi_hz)

extern u64 pcr_enable;

extern int pcr_arch_init(void);

#endif /* __PCR_H */
2 changes: 0 additions & 2 deletions arch/sparc/kernel/pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,3 @@ int __init pcr_arch_init(void)
unregister_perf_hsvc();
return err;
}

early_initcall(pcr_arch_init);
2 changes: 2 additions & 0 deletions arch/sparc/kernel/smp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <asm/mdesc.h>
#include <asm/ldc.h>
#include <asm/hypervisor.h>
#include <asm/pcr.h>

#include "cpumap.h"

Expand Down Expand Up @@ -1358,6 +1359,7 @@ void __cpu_die(unsigned int cpu)

void __init smp_cpus_done(unsigned int max_cpus)
{
pcr_arch_init();
}

void smp_send_reschedule(int cpu)
Expand Down

0 comments on commit b62818e

Please sign in to comment.