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

Commit 39aef685 authored by Andy Fleming's avatar Andy Fleming Committed by Kumar Gala
Browse files

[POWERPC] Made FSL Book-E PMC support more generic



Some of the more recent e300 cores have the same performance monitor
implementation as the e500.  e300 isn't book-e, so the name isn't
really appropriate.  In preparation for e300 support, rename a bunch
of fsl_booke things to say fsl_emb (Freescale Embedded Performance Monitors).

Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 0367aad1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1435,7 +1435,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
		.dcache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500",
		.oprofile_cpu_type	= "ppc/e500",
		.oprofile_type		= PPC_OPROFILE_BOOKE,
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
		.machine_check		= machine_check_e500,
		.machine_check		= machine_check_e500,
		.platform		= "ppc8540",
		.platform		= "ppc8540",
	},
	},
@@ -1453,7 +1453,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
		.dcache_bsize		= 32,
		.dcache_bsize		= 32,
		.num_pmcs		= 4,
		.num_pmcs		= 4,
		.oprofile_cpu_type	= "ppc/e500",
		.oprofile_cpu_type	= "ppc/e500",
		.oprofile_type		= PPC_OPROFILE_BOOKE,
		.oprofile_type		= PPC_OPROFILE_FSL_EMB,
		.machine_check		= machine_check_e500,
		.machine_check		= machine_check_e500,
		.platform		= "ppc8548",
		.platform		= "ppc8548",
	},
	},
+1 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@


static void dummy_perf(struct pt_regs *regs)
static void dummy_perf(struct pt_regs *regs)
{
{
#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200)
#if defined(CONFIG_FSL_EMB_PERFMON)
	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)
+1 −1
Original line number Original line Diff line number Diff line
@@ -15,5 +15,5 @@ oprofile-$(CONFIG_OPROFILE_CELL) += op_model_cell.o \
		cell/spu_profiler.o cell/vma_map.o \
		cell/spu_profiler.o cell/vma_map.o \
		cell/spu_task_sync.o
		cell/spu_task_sync.o
oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o
oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o op_model_pa6t.o
oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o
oprofile-$(CONFIG_FSL_EMB_PERFMON) += op_model_fsl_emb.o
oprofile-$(CONFIG_6xx) += op_model_7450.o
oprofile-$(CONFIG_6xx) += op_model_7450.o
+3 −3
Original line number Original line Diff line number Diff line
@@ -202,9 +202,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
			model = &op_model_7450;
			model = &op_model_7450;
			break;
			break;
#endif
#endif
#ifdef CONFIG_FSL_BOOKE
#if defined(CONFIG_FSL_EMB_PERFMON)
		case PPC_OPROFILE_BOOKE:
		case PPC_OPROFILE_FSL_EMB:
			model = &op_model_fsl_booke;
			model = &op_model_fsl_emb;
			break;
			break;
#endif
#endif
		default:
		default:
+13 −15
Original line number Original line Diff line number Diff line
/*
/*
 * arch/powerpc/oprofile/op_model_fsl_booke.c
 * Freescale Embedded oprofile support, based on ppc64 oprofile support
 *
 * Freescale Book-E oprofile support, based on ppc64 oprofile support
 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
 * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
 *
 *
 * Copyright (c) 2004 Freescale Semiconductor, Inc
 * Copyright (c) 2004 Freescale Semiconductor, Inc
@@ -22,7 +20,7 @@
#include <asm/system.h>
#include <asm/system.h>
#include <asm/processor.h>
#include <asm/processor.h>
#include <asm/cputable.h>
#include <asm/cputable.h>
#include <asm/reg_booke.h>
#include <asm/reg_fsl_emb.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/pmc.h>
#include <asm/pmc.h>
#include <asm/oprofile_impl.h>
#include <asm/oprofile_impl.h>
@@ -244,7 +242,7 @@ static void dump_pmcs(void)
			mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
			mfpmr(PMRN_PMLCA3), mfpmr(PMRN_PMLCB3));
}
}


static int fsl_booke_cpu_setup(struct op_counter_config *ctr)
static int fsl_emb_cpu_setup(struct op_counter_config *ctr)
{
{
	int i;
	int i;


@@ -262,7 +260,7 @@ static int fsl_booke_cpu_setup(struct op_counter_config *ctr)
	return 0;
	return 0;
}
}


static int fsl_booke_reg_setup(struct op_counter_config *ctr,
static int fsl_emb_reg_setup(struct op_counter_config *ctr,
			     struct op_system_config *sys,
			     struct op_system_config *sys,
			     int num_ctrs)
			     int num_ctrs)
{
{
@@ -281,7 +279,7 @@ static int fsl_booke_reg_setup(struct op_counter_config *ctr,
	return 0;
	return 0;
}
}


static int fsl_booke_start(struct op_counter_config *ctr)
static int fsl_emb_start(struct op_counter_config *ctr)
{
{
	int i;
	int i;


@@ -315,7 +313,7 @@ static int fsl_booke_start(struct op_counter_config *ctr)
	return 0;
	return 0;
}
}


static void fsl_booke_stop(void)
static void fsl_emb_stop(void)
{
{
	/* freeze counters */
	/* freeze counters */
	pmc_stop_ctrs();
	pmc_stop_ctrs();
@@ -329,7 +327,7 @@ static void fsl_booke_stop(void)
}
}




static void fsl_booke_handle_interrupt(struct pt_regs *regs,
static void fsl_emb_handle_interrupt(struct pt_regs *regs,
				    struct op_counter_config *ctr)
				    struct op_counter_config *ctr)
{
{
	unsigned long pc;
	unsigned long pc;
@@ -362,10 +360,10 @@ static void fsl_booke_handle_interrupt(struct pt_regs *regs,
	pmc_start_ctrs(1);
	pmc_start_ctrs(1);
}
}


struct op_powerpc_model op_model_fsl_booke = {
struct op_powerpc_model op_model_fsl_emb = {
	.reg_setup		= fsl_booke_reg_setup,
	.reg_setup		= fsl_emb_reg_setup,
	.cpu_setup		= fsl_booke_cpu_setup,
	.cpu_setup		= fsl_emb_cpu_setup,
	.start			= fsl_booke_start,
	.start			= fsl_emb_start,
	.stop			= fsl_booke_stop,
	.stop			= fsl_emb_stop,
	.handle_interrupt	= fsl_booke_handle_interrupt,
	.handle_interrupt	= fsl_emb_handle_interrupt,
};
};
Loading