Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 177e9ea4 authored by Anton Blanchard's avatar Anton Blanchard Committed by Paul Mackerras
Browse files

[POWERPC] Fix typo: MMCR0_PMA0 != MMCR0_PMAO



pmc.c has:

#ifndef MMCR0_PMA0
#define MMCR0_PMA0     0

This one took a while to find.  Unfortunately its the wrong define
(number 0 vs letter O). Its probably worth removing this override, since
if our includes get screwed up we will have the same (hard to debug)
failure.

Fix it simply for now, so that we can backport to stable.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 2fae4985
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -20,8 +20,8 @@
#include <asm/cputable.h>
#include <asm/cputable.h>
#include <asm/pmc.h>
#include <asm/pmc.h>


#ifndef MMCR0_PMA0
#ifndef MMCR0_PMAO
#define MMCR0_PMA0	0
#define MMCR0_PMAO	0
#endif
#endif


static void dummy_perf(struct pt_regs *regs)
static void dummy_perf(struct pt_regs *regs)
@@ -30,7 +30,7 @@ static void dummy_perf(struct pt_regs *regs)
	mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
	mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
	if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
	if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
		mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
		mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMAO));
#else
#else
	mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
	mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
#endif
#endif