···11/*22- * GE Fanuc PPC9A Device Tree Source22+ * GE PPC9A Device Tree Source33 *44- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.44+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.55 *66 * This program is free software; you can redistribute it and/or modify it77 * under the terms of the GNU General Public License as published by the
+2-2
arch/powerpc/boot/dts/gef_sbc310.dts
···11/*22- * GE Fanuc SBC310 Device Tree Source22+ * GE SBC310 Device Tree Source33 *44- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.44+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.55 *66 * This program is free software; you can redistribute it and/or modify it77 * under the terms of the GNU General Public License as published by the
+2-2
arch/powerpc/boot/dts/gef_sbc610.dts
···11/*22- * GE Fanuc SBC610 Device Tree Source22+ * GE SBC610 Device Tree Source33 *44- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.44+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.55 *66 * This program is free software; you can redistribute it and/or modify it77 * under the terms of the GNU General Public License as published by the
+11-98
arch/powerpc/include/asm/perf_event.h
···11/*22- * Performance event support - PowerPC-specific definitions.22+ * Performance event support - hardware-specific disambiguation33 *44- * Copyright 2008-2009 Paul Mackerras, IBM Corporation.44+ * For now this is a compile-time decision, but eventually it should be55+ * runtime. This would allow multiplatform perf event support for e300 (fsl66+ * embedded perf counters) plus server/classic, and would accommodate77+ * devices other than the core which provide their own performance counters.88+ *99+ * Copyright 2010 Freescale Semiconductor, Inc.510 *611 * This program is free software; you can redistribute it and/or712 * modify it under the terms of the GNU General Public License813 * as published by the Free Software Foundation; either version914 * 2 of the License, or (at your option) any later version.1015 */1111-#include <linux/types.h>12161313-#include <asm/hw_irq.h>1414-1515-#define MAX_HWEVENTS 81616-#define MAX_EVENT_ALTERNATIVES 81717-#define MAX_LIMITED_HWCOUNTERS 21818-1919-/*2020- * This struct provides the constants and functions needed to2121- * describe the PMU on a particular POWER-family CPU.2222- */2323-struct power_pmu {2424- const char *name;2525- int n_counter;2626- int max_alternatives;2727- unsigned long add_fields;2828- unsigned long test_adder;2929- int (*compute_mmcr)(u64 events[], int n_ev,3030- unsigned int hwc[], unsigned long mmcr[]);3131- int (*get_constraint)(u64 event_id, unsigned long *mskp,3232- unsigned long *valp);3333- int (*get_alternatives)(u64 event_id, unsigned int flags,3434- u64 alt[]);3535- void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]);3636- int (*limited_pmc_event)(u64 event_id);3737- u32 flags;3838- int n_generic;3939- int *generic_events;4040- int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]4141- [PERF_COUNT_HW_CACHE_OP_MAX]4242- [PERF_COUNT_HW_CACHE_RESULT_MAX];4343-};4444-4545-/*4646- * Values for power_pmu.flags4747- */4848-#define PPMU_LIMITED_PMC5_6 1 /* PMC5/6 have limited function */4949-#define PPMU_ALT_SIPR 2 /* uses alternate posn for SIPR/HV */5050-5151-/*5252- * Values for flags to get_alternatives()5353- */5454-#define PPMU_LIMITED_PMC_OK 1 /* can put this on a limited PMC */5555-#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */5656-#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */5757-5858-extern int register_power_pmu(struct power_pmu *);5959-6060-struct pt_regs;6161-extern unsigned long perf_misc_flags(struct pt_regs *regs);6262-extern unsigned long perf_instruction_pointer(struct pt_regs *regs);6363-6464-#define PERF_EVENT_INDEX_OFFSET 16565-6666-/*6767- * Only override the default definitions in include/linux/perf_event.h6868- * if we have hardware PMU support.6969- */7017#ifdef CONFIG_PPC_PERF_CTRS7171-#define perf_misc_flags(regs) perf_misc_flags(regs)1818+#include <asm/perf_event_server.h>7219#endif73207474-/*7575- * The power_pmu.get_constraint function returns a 32/64-bit value and7676- * a 32/64-bit mask that express the constraints between this event_id and7777- * other events.7878- *7979- * The value and mask are divided up into (non-overlapping) bitfields8080- * of three different types:8181- *8282- * Select field: this expresses the constraint that some set of bits8383- * in MMCR* needs to be set to a specific value for this event_id. For a8484- * select field, the mask contains 1s in every bit of the field, and8585- * the value contains a unique value for each possible setting of the8686- * MMCR* bits. The constraint checking code will ensure that two events8787- * that set the same field in their masks have the same value in their8888- * value dwords.8989- *9090- * Add field: this expresses the constraint that there can be at most9191- * N events in a particular class. A field of k bits can be used for9292- * N <= 2^(k-1) - 1. The mask has the most significant bit of the field9393- * set (and the other bits 0), and the value has only the least significant9494- * bit of the field set. In addition, the 'add_fields' and 'test_adder'9595- * in the struct power_pmu for this processor come into play. The9696- * add_fields value contains 1 in the LSB of the field, and the9797- * test_adder contains 2^(k-1) - 1 - N in the field.9898- *9999- * NAND field: this expresses the constraint that you may not have events100100- * in all of a set of classes. (For example, on PPC970, you can't select101101- * events from the FPU, ISU and IDU simultaneously, although any two are102102- * possible.) For N classes, the field is N+1 bits wide, and each class103103- * is assigned one bit from the least-significant N bits. The mask has104104- * only the most-significant bit set, and the value has only the bit105105- * for the event_id's class set. The test_adder has the least significant106106- * bit set in the field.107107- *108108- * If an event_id is not subject to the constraint expressed by a particular109109- * field, then it will have 0 in both the mask and value for that field.110110- */2121+#ifdef CONFIG_FSL_EMB_PERF_EVENT2222+#include <asm/perf_event_fsl_emb.h>2323+#endif
+50
arch/powerpc/include/asm/perf_event_fsl_emb.h
···11+/*22+ * Performance event support - Freescale embedded specific definitions.33+ *44+ * Copyright 2008-2009 Paul Mackerras, IBM Corporation.55+ * Copyright 2010 Freescale Semiconductor, Inc.66+ *77+ * This program is free software; you can redistribute it and/or88+ * modify it under the terms of the GNU General Public License99+ * as published by the Free Software Foundation; either version1010+ * 2 of the License, or (at your option) any later version.1111+ */1212+1313+#include <linux/types.h>1414+#include <asm/hw_irq.h>1515+1616+#define MAX_HWEVENTS 41717+1818+/* event flags */1919+#define FSL_EMB_EVENT_VALID 12020+#define FSL_EMB_EVENT_RESTRICTED 22121+2222+/* upper half of event flags is PMLCb */2323+#define FSL_EMB_EVENT_THRESHMUL 0x0000070000000000ULL2424+#define FSL_EMB_EVENT_THRESH 0x0000003f00000000ULL2525+2626+struct fsl_emb_pmu {2727+ const char *name;2828+ int n_counter; /* total number of counters */2929+3030+ /*3131+ * The number of contiguous counters starting at zero that3232+ * can hold restricted events, or zero if there are no3333+ * restricted events.3434+ *3535+ * This isn't a very flexible method of expressing constraints,3636+ * but it's very simple and is adequate for existing chips.3737+ */3838+ int n_restricted;3939+4040+ /* Returns event flags and PMLCb (FSL_EMB_EVENT_*) */4141+ u64 (*xlate_event)(u64 event_id);4242+4343+ int n_generic;4444+ int *generic_events;4545+ int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]4646+ [PERF_COUNT_HW_CACHE_OP_MAX]4747+ [PERF_COUNT_HW_CACHE_RESULT_MAX];4848+};4949+5050+int register_fsl_emb_pmu(struct fsl_emb_pmu *);
+110
arch/powerpc/include/asm/perf_event_server.h
···11+/*22+ * Performance event support - PowerPC classic/server specific definitions.33+ *44+ * Copyright 2008-2009 Paul Mackerras, IBM Corporation.55+ *66+ * This program is free software; you can redistribute it and/or77+ * modify it under the terms of the GNU General Public License88+ * as published by the Free Software Foundation; either version99+ * 2 of the License, or (at your option) any later version.1010+ */1111+1212+#include <linux/types.h>1313+#include <asm/hw_irq.h>1414+1515+#define MAX_HWEVENTS 81616+#define MAX_EVENT_ALTERNATIVES 81717+#define MAX_LIMITED_HWCOUNTERS 21818+1919+/*2020+ * This struct provides the constants and functions needed to2121+ * describe the PMU on a particular POWER-family CPU.2222+ */2323+struct power_pmu {2424+ const char *name;2525+ int n_counter;2626+ int max_alternatives;2727+ unsigned long add_fields;2828+ unsigned long test_adder;2929+ int (*compute_mmcr)(u64 events[], int n_ev,3030+ unsigned int hwc[], unsigned long mmcr[]);3131+ int (*get_constraint)(u64 event_id, unsigned long *mskp,3232+ unsigned long *valp);3333+ int (*get_alternatives)(u64 event_id, unsigned int flags,3434+ u64 alt[]);3535+ void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]);3636+ int (*limited_pmc_event)(u64 event_id);3737+ u32 flags;3838+ int n_generic;3939+ int *generic_events;4040+ int (*cache_events)[PERF_COUNT_HW_CACHE_MAX]4141+ [PERF_COUNT_HW_CACHE_OP_MAX]4242+ [PERF_COUNT_HW_CACHE_RESULT_MAX];4343+};4444+4545+/*4646+ * Values for power_pmu.flags4747+ */4848+#define PPMU_LIMITED_PMC5_6 1 /* PMC5/6 have limited function */4949+#define PPMU_ALT_SIPR 2 /* uses alternate posn for SIPR/HV */5050+5151+/*5252+ * Values for flags to get_alternatives()5353+ */5454+#define PPMU_LIMITED_PMC_OK 1 /* can put this on a limited PMC */5555+#define PPMU_LIMITED_PMC_REQD 2 /* have to put this on a limited PMC */5656+#define PPMU_ONLY_COUNT_RUN 4 /* only counting in run state */5757+5858+extern int register_power_pmu(struct power_pmu *);5959+6060+struct pt_regs;6161+extern unsigned long perf_misc_flags(struct pt_regs *regs);6262+extern unsigned long perf_instruction_pointer(struct pt_regs *regs);6363+6464+#define PERF_EVENT_INDEX_OFFSET 16565+6666+/*6767+ * Only override the default definitions in include/linux/perf_event.h6868+ * if we have hardware PMU support.6969+ */7070+#ifdef CONFIG_PPC_PERF_CTRS7171+#define perf_misc_flags(regs) perf_misc_flags(regs)7272+#endif7373+7474+/*7575+ * The power_pmu.get_constraint function returns a 32/64-bit value and7676+ * a 32/64-bit mask that express the constraints between this event_id and7777+ * other events.7878+ *7979+ * The value and mask are divided up into (non-overlapping) bitfields8080+ * of three different types:8181+ *8282+ * Select field: this expresses the constraint that some set of bits8383+ * in MMCR* needs to be set to a specific value for this event_id. For a8484+ * select field, the mask contains 1s in every bit of the field, and8585+ * the value contains a unique value for each possible setting of the8686+ * MMCR* bits. The constraint checking code will ensure that two events8787+ * that set the same field in their masks have the same value in their8888+ * value dwords.8989+ *9090+ * Add field: this expresses the constraint that there can be at most9191+ * N events in a particular class. A field of k bits can be used for9292+ * N <= 2^(k-1) - 1. The mask has the most significant bit of the field9393+ * set (and the other bits 0), and the value has only the least significant9494+ * bit of the field set. In addition, the 'add_fields' and 'test_adder'9595+ * in the struct power_pmu for this processor come into play. The9696+ * add_fields value contains 1 in the LSB of the field, and the9797+ * test_adder contains 2^(k-1) - 1 - N in the field.9898+ *9999+ * NAND field: this expresses the constraint that you may not have events100100+ * in all of a set of classes. (For example, on PPC970, you can't select101101+ * events from the FPU, ISU and IDU simultaneously, although any two are102102+ * possible.) For N classes, the field is N+1 bits wide, and each class103103+ * is assigned one bit from the least-significant N bits. The mask has104104+ * only the most-significant bit set, and the value has only the bit105105+ * for the event_id's class set. The test_adder has the least significant106106+ * bit set in the field.107107+ *108108+ * If an event_id is not subject to the constraint expressed by a particular109109+ * field, then it will have 0 in both the mask and value for that field.110110+ */
+1-1
arch/powerpc/include/asm/reg_fsl_emb.h
···3131#define PMLCA_FCM0 0x08000000 /* Freeze when PMM==0 */3232#define PMLCA_CE 0x04000000 /* Condition Enable */33333434-#define PMLCA_EVENT_MASK 0x007f0000 /* Event field */3434+#define PMLCA_EVENT_MASK 0x00ff0000 /* Event field */3535#define PMLCA_EVENT_SHIFT 1636363737#define PMRN_PMLCB0 0x110 /* PM Local Control B0 */
···11+/*22+ * Performance counter support for e500 family processors.33+ *44+ * Copyright 2008-2009 Paul Mackerras, IBM Corporation.55+ * Copyright 2010 Freescale Semiconductor, Inc.66+ *77+ * This program is free software; you can redistribute it and/or88+ * modify it under the terms of the GNU General Public License99+ * as published by the Free Software Foundation; either version1010+ * 2 of the License, or (at your option) any later version.1111+ */1212+#include <linux/string.h>1313+#include <linux/perf_event.h>1414+#include <asm/reg.h>1515+#include <asm/cputable.h>1616+1717+/*1818+ * Map of generic hardware event types to hardware events1919+ * Zero if unsupported2020+ */2121+static int e500_generic_events[] = {2222+ [PERF_COUNT_HW_CPU_CYCLES] = 1,2323+ [PERF_COUNT_HW_INSTRUCTIONS] = 2,2424+ [PERF_COUNT_HW_CACHE_MISSES] = 41, /* Data L1 cache reloads */2525+ [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 12,2626+ [PERF_COUNT_HW_BRANCH_MISSES] = 15,2727+};2828+2929+#define C(x) PERF_COUNT_HW_CACHE_##x3030+3131+/*3232+ * Table of generalized cache-related events.3333+ * 0 means not supported, -1 means nonsensical, other values3434+ * are event codes.3535+ */3636+static int e500_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {3737+ /*3838+ * D-cache misses are not split into read/write/prefetch;3939+ * use raw event 41.4040+ */4141+ [C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */4242+ [C(OP_READ)] = { 27, 0 },4343+ [C(OP_WRITE)] = { 28, 0 },4444+ [C(OP_PREFETCH)] = { 29, 0 },4545+ },4646+ [C(L1I)] = { /* RESULT_ACCESS RESULT_MISS */4747+ [C(OP_READ)] = { 2, 60 },4848+ [C(OP_WRITE)] = { -1, -1 },4949+ [C(OP_PREFETCH)] = { 0, 0 },5050+ },5151+ /*5252+ * Assuming LL means L2, it's not a good match for this model.5353+ * It allocates only on L1 castout or explicit prefetch, and5454+ * does not have separate read/write events (but it does have5555+ * separate instruction/data events).5656+ */5757+ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */5858+ [C(OP_READ)] = { 0, 0 },5959+ [C(OP_WRITE)] = { 0, 0 },6060+ [C(OP_PREFETCH)] = { 0, 0 },6161+ },6262+ /*6363+ * There are data/instruction MMU misses, but that's a miss on6464+ * the chip's internal level-one TLB which is probably not6565+ * what the user wants. Instead, unified level-two TLB misses6666+ * are reported here.6767+ */6868+ [C(DTLB)] = { /* RESULT_ACCESS RESULT_MISS */6969+ [C(OP_READ)] = { 26, 66 },7070+ [C(OP_WRITE)] = { -1, -1 },7171+ [C(OP_PREFETCH)] = { -1, -1 },7272+ },7373+ [C(BPU)] = { /* RESULT_ACCESS RESULT_MISS */7474+ [C(OP_READ)] = { 12, 15 },7575+ [C(OP_WRITE)] = { -1, -1 },7676+ [C(OP_PREFETCH)] = { -1, -1 },7777+ },7878+};7979+8080+static int num_events = 128;8181+8282+/* Upper half of event id is PMLCb, for threshold events */8383+static u64 e500_xlate_event(u64 event_id)8484+{8585+ u32 event_low = (u32)event_id;8686+ u64 ret;8787+8888+ if (event_low >= num_events)8989+ return 0;9090+9191+ ret = FSL_EMB_EVENT_VALID;9292+9393+ if (event_low >= 76 && event_low <= 81) {9494+ ret |= FSL_EMB_EVENT_RESTRICTED;9595+ ret |= event_id &9696+ (FSL_EMB_EVENT_THRESHMUL | FSL_EMB_EVENT_THRESH);9797+ } else if (event_id &9898+ (FSL_EMB_EVENT_THRESHMUL | FSL_EMB_EVENT_THRESH)) {9999+ /* Threshold requested on non-threshold event */100100+ return 0;101101+ }102102+103103+ return ret;104104+}105105+106106+static struct fsl_emb_pmu e500_pmu = {107107+ .name = "e500 family",108108+ .n_counter = 4,109109+ .n_restricted = 2,110110+ .xlate_event = e500_xlate_event,111111+ .n_generic = ARRAY_SIZE(e500_generic_events),112112+ .generic_events = e500_generic_events,113113+ .cache_events = &e500_cache_events,114114+};115115+116116+static int init_e500_pmu(void)117117+{118118+ if (!cur_cpu_spec->oprofile_cpu_type)119119+ return -ENODEV;120120+121121+ if (!strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/e500mc"))122122+ num_events = 256;123123+ else if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/e500"))124124+ return -ENODEV;125125+126126+ return register_fsl_emb_pmu(&e500_pmu);127127+}128128+129129+arch_initcall(init_e500_pmu);
+654
arch/powerpc/kernel/perf_event_fsl_emb.c
···11+/*22+ * Performance event support - Freescale Embedded Performance Monitor33+ *44+ * Copyright 2008-2009 Paul Mackerras, IBM Corporation.55+ * Copyright 2010 Freescale Semiconductor, Inc.66+ *77+ * This program is free software; you can redistribute it and/or88+ * modify it under the terms of the GNU General Public License99+ * as published by the Free Software Foundation; either version1010+ * 2 of the License, or (at your option) any later version.1111+ */1212+#include <linux/kernel.h>1313+#include <linux/sched.h>1414+#include <linux/perf_event.h>1515+#include <linux/percpu.h>1616+#include <linux/hardirq.h>1717+#include <asm/reg_fsl_emb.h>1818+#include <asm/pmc.h>1919+#include <asm/machdep.h>2020+#include <asm/firmware.h>2121+#include <asm/ptrace.h>2222+2323+struct cpu_hw_events {2424+ int n_events;2525+ int disabled;2626+ u8 pmcs_enabled;2727+ struct perf_event *event[MAX_HWEVENTS];2828+};2929+static DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);3030+3131+static struct fsl_emb_pmu *ppmu;3232+3333+/* Number of perf_events counting hardware events */3434+static atomic_t num_events;3535+/* Used to avoid races in calling reserve/release_pmc_hardware */3636+static DEFINE_MUTEX(pmc_reserve_mutex);3737+3838+/*3939+ * If interrupts were soft-disabled when a PMU interrupt occurs, treat4040+ * it as an NMI.4141+ */4242+static inline int perf_intr_is_nmi(struct pt_regs *regs)4343+{4444+#ifdef __powerpc64__4545+ return !regs->softe;4646+#else4747+ return 0;4848+#endif4949+}5050+5151+static void perf_event_interrupt(struct pt_regs *regs);5252+5353+/*5454+ * Read one performance monitor counter (PMC).5555+ */5656+static unsigned long read_pmc(int idx)5757+{5858+ unsigned long val;5959+6060+ switch (idx) {6161+ case 0:6262+ val = mfpmr(PMRN_PMC0);6363+ break;6464+ case 1:6565+ val = mfpmr(PMRN_PMC1);6666+ break;6767+ case 2:6868+ val = mfpmr(PMRN_PMC2);6969+ break;7070+ case 3:7171+ val = mfpmr(PMRN_PMC3);7272+ break;7373+ default:7474+ printk(KERN_ERR "oops trying to read PMC%d\n", idx);7575+ val = 0;7676+ }7777+ return val;7878+}7979+8080+/*8181+ * Write one PMC.8282+ */8383+static void write_pmc(int idx, unsigned long val)8484+{8585+ switch (idx) {8686+ case 0:8787+ mtpmr(PMRN_PMC0, val);8888+ break;8989+ case 1:9090+ mtpmr(PMRN_PMC1, val);9191+ break;9292+ case 2:9393+ mtpmr(PMRN_PMC2, val);9494+ break;9595+ case 3:9696+ mtpmr(PMRN_PMC3, val);9797+ break;9898+ default:9999+ printk(KERN_ERR "oops trying to write PMC%d\n", idx);100100+ }101101+102102+ isync();103103+}104104+105105+/*106106+ * Write one local control A register107107+ */108108+static void write_pmlca(int idx, unsigned long val)109109+{110110+ switch (idx) {111111+ case 0:112112+ mtpmr(PMRN_PMLCA0, val);113113+ break;114114+ case 1:115115+ mtpmr(PMRN_PMLCA1, val);116116+ break;117117+ case 2:118118+ mtpmr(PMRN_PMLCA2, val);119119+ break;120120+ case 3:121121+ mtpmr(PMRN_PMLCA3, val);122122+ break;123123+ default:124124+ printk(KERN_ERR "oops trying to write PMLCA%d\n", idx);125125+ }126126+127127+ isync();128128+}129129+130130+/*131131+ * Write one local control B register132132+ */133133+static void write_pmlcb(int idx, unsigned long val)134134+{135135+ switch (idx) {136136+ case 0:137137+ mtpmr(PMRN_PMLCB0, val);138138+ break;139139+ case 1:140140+ mtpmr(PMRN_PMLCB1, val);141141+ break;142142+ case 2:143143+ mtpmr(PMRN_PMLCB2, val);144144+ break;145145+ case 3:146146+ mtpmr(PMRN_PMLCB3, val);147147+ break;148148+ default:149149+ printk(KERN_ERR "oops trying to write PMLCB%d\n", idx);150150+ }151151+152152+ isync();153153+}154154+155155+static void fsl_emb_pmu_read(struct perf_event *event)156156+{157157+ s64 val, delta, prev;158158+159159+ /*160160+ * Performance monitor interrupts come even when interrupts161161+ * are soft-disabled, as long as interrupts are hard-enabled.162162+ * Therefore we treat them like NMIs.163163+ */164164+ do {165165+ prev = atomic64_read(&event->hw.prev_count);166166+ barrier();167167+ val = read_pmc(event->hw.idx);168168+ } while (atomic64_cmpxchg(&event->hw.prev_count, prev, val) != prev);169169+170170+ /* The counters are only 32 bits wide */171171+ delta = (val - prev) & 0xfffffffful;172172+ atomic64_add(delta, &event->count);173173+ atomic64_sub(delta, &event->hw.period_left);174174+}175175+176176+/*177177+ * Disable all events to prevent PMU interrupts and to allow178178+ * events to be added or removed.179179+ */180180+void hw_perf_disable(void)181181+{182182+ struct cpu_hw_events *cpuhw;183183+ unsigned long flags;184184+185185+ local_irq_save(flags);186186+ cpuhw = &__get_cpu_var(cpu_hw_events);187187+188188+ if (!cpuhw->disabled) {189189+ cpuhw->disabled = 1;190190+191191+ /*192192+ * Check if we ever enabled the PMU on this cpu.193193+ */194194+ if (!cpuhw->pmcs_enabled) {195195+ ppc_enable_pmcs();196196+ cpuhw->pmcs_enabled = 1;197197+ }198198+199199+ if (atomic_read(&num_events)) {200200+ /*201201+ * Set the 'freeze all counters' bit, and disable202202+ * interrupts. The barrier is to make sure the203203+ * mtpmr has been executed and the PMU has frozen204204+ * the events before we return.205205+ */206206+207207+ mtpmr(PMRN_PMGC0, PMGC0_FAC);208208+ isync();209209+ }210210+ }211211+ local_irq_restore(flags);212212+}213213+214214+/*215215+ * Re-enable all events if disable == 0.216216+ * If we were previously disabled and events were added, then217217+ * put the new config on the PMU.218218+ */219219+void hw_perf_enable(void)220220+{221221+ struct cpu_hw_events *cpuhw;222222+ unsigned long flags;223223+224224+ local_irq_save(flags);225225+ cpuhw = &__get_cpu_var(cpu_hw_events);226226+ if (!cpuhw->disabled)227227+ goto out;228228+229229+ cpuhw->disabled = 0;230230+ ppc_set_pmu_inuse(cpuhw->n_events != 0);231231+232232+ if (cpuhw->n_events > 0) {233233+ mtpmr(PMRN_PMGC0, PMGC0_PMIE | PMGC0_FCECE);234234+ isync();235235+ }236236+237237+ out:238238+ local_irq_restore(flags);239239+}240240+241241+static int collect_events(struct perf_event *group, int max_count,242242+ struct perf_event *ctrs[])243243+{244244+ int n = 0;245245+ struct perf_event *event;246246+247247+ if (!is_software_event(group)) {248248+ if (n >= max_count)249249+ return -1;250250+ ctrs[n] = group;251251+ n++;252252+ }253253+ list_for_each_entry(event, &group->sibling_list, group_entry) {254254+ if (!is_software_event(event) &&255255+ event->state != PERF_EVENT_STATE_OFF) {256256+ if (n >= max_count)257257+ return -1;258258+ ctrs[n] = event;259259+ n++;260260+ }261261+ }262262+ return n;263263+}264264+265265+/* perf must be disabled, context locked on entry */266266+static int fsl_emb_pmu_enable(struct perf_event *event)267267+{268268+ struct cpu_hw_events *cpuhw;269269+ int ret = -EAGAIN;270270+ int num_counters = ppmu->n_counter;271271+ u64 val;272272+ int i;273273+274274+ cpuhw = &get_cpu_var(cpu_hw_events);275275+276276+ if (event->hw.config & FSL_EMB_EVENT_RESTRICTED)277277+ num_counters = ppmu->n_restricted;278278+279279+ /*280280+ * Allocate counters from top-down, so that restricted-capable281281+ * counters are kept free as long as possible.282282+ */283283+ for (i = num_counters - 1; i >= 0; i--) {284284+ if (cpuhw->event[i])285285+ continue;286286+287287+ break;288288+ }289289+290290+ if (i < 0)291291+ goto out;292292+293293+ event->hw.idx = i;294294+ cpuhw->event[i] = event;295295+ ++cpuhw->n_events;296296+297297+ val = 0;298298+ if (event->hw.sample_period) {299299+ s64 left = atomic64_read(&event->hw.period_left);300300+ if (left < 0x80000000L)301301+ val = 0x80000000L - left;302302+ }303303+ atomic64_set(&event->hw.prev_count, val);304304+ write_pmc(i, val);305305+ perf_event_update_userpage(event);306306+307307+ write_pmlcb(i, event->hw.config >> 32);308308+ write_pmlca(i, event->hw.config_base);309309+310310+ ret = 0;311311+ out:312312+ put_cpu_var(cpu_hw_events);313313+ return ret;314314+}315315+316316+/* perf must be disabled, context locked on entry */317317+static void fsl_emb_pmu_disable(struct perf_event *event)318318+{319319+ struct cpu_hw_events *cpuhw;320320+ int i = event->hw.idx;321321+322322+ if (i < 0)323323+ goto out;324324+325325+ fsl_emb_pmu_read(event);326326+327327+ cpuhw = &get_cpu_var(cpu_hw_events);328328+329329+ WARN_ON(event != cpuhw->event[event->hw.idx]);330330+331331+ write_pmlca(i, 0);332332+ write_pmlcb(i, 0);333333+ write_pmc(i, 0);334334+335335+ cpuhw->event[i] = NULL;336336+ event->hw.idx = -1;337337+338338+ /*339339+ * TODO: if at least one restricted event exists, and we340340+ * just freed up a non-restricted-capable counter, and341341+ * there is a restricted-capable counter occupied by342342+ * a non-restricted event, migrate that event to the343343+ * vacated counter.344344+ */345345+346346+ cpuhw->n_events--;347347+348348+ out:349349+ put_cpu_var(cpu_hw_events);350350+}351351+352352+/*353353+ * Re-enable interrupts on a event after they were throttled354354+ * because they were coming too fast.355355+ *356356+ * Context is locked on entry, but perf is not disabled.357357+ */358358+static void fsl_emb_pmu_unthrottle(struct perf_event *event)359359+{360360+ s64 val, left;361361+ unsigned long flags;362362+363363+ if (event->hw.idx < 0 || !event->hw.sample_period)364364+ return;365365+ local_irq_save(flags);366366+ perf_disable();367367+ fsl_emb_pmu_read(event);368368+ left = event->hw.sample_period;369369+ event->hw.last_period = left;370370+ val = 0;371371+ if (left < 0x80000000L)372372+ val = 0x80000000L - left;373373+ write_pmc(event->hw.idx, val);374374+ atomic64_set(&event->hw.prev_count, val);375375+ atomic64_set(&event->hw.period_left, left);376376+ perf_event_update_userpage(event);377377+ perf_enable();378378+ local_irq_restore(flags);379379+}380380+381381+static struct pmu fsl_emb_pmu = {382382+ .enable = fsl_emb_pmu_enable,383383+ .disable = fsl_emb_pmu_disable,384384+ .read = fsl_emb_pmu_read,385385+ .unthrottle = fsl_emb_pmu_unthrottle,386386+};387387+388388+/*389389+ * Release the PMU if this is the last perf_event.390390+ */391391+static void hw_perf_event_destroy(struct perf_event *event)392392+{393393+ if (!atomic_add_unless(&num_events, -1, 1)) {394394+ mutex_lock(&pmc_reserve_mutex);395395+ if (atomic_dec_return(&num_events) == 0)396396+ release_pmc_hardware();397397+ mutex_unlock(&pmc_reserve_mutex);398398+ }399399+}400400+401401+/*402402+ * Translate a generic cache event_id config to a raw event_id code.403403+ */404404+static int hw_perf_cache_event(u64 config, u64 *eventp)405405+{406406+ unsigned long type, op, result;407407+ int ev;408408+409409+ if (!ppmu->cache_events)410410+ return -EINVAL;411411+412412+ /* unpack config */413413+ type = config & 0xff;414414+ op = (config >> 8) & 0xff;415415+ result = (config >> 16) & 0xff;416416+417417+ if (type >= PERF_COUNT_HW_CACHE_MAX ||418418+ op >= PERF_COUNT_HW_CACHE_OP_MAX ||419419+ result >= PERF_COUNT_HW_CACHE_RESULT_MAX)420420+ return -EINVAL;421421+422422+ ev = (*ppmu->cache_events)[type][op][result];423423+ if (ev == 0)424424+ return -EOPNOTSUPP;425425+ if (ev == -1)426426+ return -EINVAL;427427+ *eventp = ev;428428+ return 0;429429+}430430+431431+const struct pmu *hw_perf_event_init(struct perf_event *event)432432+{433433+ u64 ev;434434+ struct perf_event *events[MAX_HWEVENTS];435435+ int n;436436+ int err;437437+ int num_restricted;438438+ int i;439439+440440+ switch (event->attr.type) {441441+ case PERF_TYPE_HARDWARE:442442+ ev = event->attr.config;443443+ if (ev >= ppmu->n_generic || ppmu->generic_events[ev] == 0)444444+ return ERR_PTR(-EOPNOTSUPP);445445+ ev = ppmu->generic_events[ev];446446+ break;447447+448448+ case PERF_TYPE_HW_CACHE:449449+ err = hw_perf_cache_event(event->attr.config, &ev);450450+ if (err)451451+ return ERR_PTR(err);452452+ break;453453+454454+ case PERF_TYPE_RAW:455455+ ev = event->attr.config;456456+ break;457457+458458+ default:459459+ return ERR_PTR(-EINVAL);460460+ }461461+462462+ event->hw.config = ppmu->xlate_event(ev);463463+ if (!(event->hw.config & FSL_EMB_EVENT_VALID))464464+ return ERR_PTR(-EINVAL);465465+466466+ /*467467+ * If this is in a group, check if it can go on with all the468468+ * other hardware events in the group. We assume the event469469+ * hasn't been linked into its leader's sibling list at this point.470470+ */471471+ n = 0;472472+ if (event->group_leader != event) {473473+ n = collect_events(event->group_leader,474474+ ppmu->n_counter - 1, events);475475+ if (n < 0)476476+ return ERR_PTR(-EINVAL);477477+ }478478+479479+ if (event->hw.config & FSL_EMB_EVENT_RESTRICTED) {480480+ num_restricted = 0;481481+ for (i = 0; i < n; i++) {482482+ if (events[i]->hw.config & FSL_EMB_EVENT_RESTRICTED)483483+ num_restricted++;484484+ }485485+486486+ if (num_restricted >= ppmu->n_restricted)487487+ return ERR_PTR(-EINVAL);488488+ }489489+490490+ event->hw.idx = -1;491491+492492+ event->hw.config_base = PMLCA_CE | PMLCA_FCM1 |493493+ (u32)((ev << 16) & PMLCA_EVENT_MASK);494494+495495+ if (event->attr.exclude_user)496496+ event->hw.config_base |= PMLCA_FCU;497497+ if (event->attr.exclude_kernel)498498+ event->hw.config_base |= PMLCA_FCS;499499+ if (event->attr.exclude_idle)500500+ return ERR_PTR(-ENOTSUPP);501501+502502+ event->hw.last_period = event->hw.sample_period;503503+ atomic64_set(&event->hw.period_left, event->hw.last_period);504504+505505+ /*506506+ * See if we need to reserve the PMU.507507+ * If no events are currently in use, then we have to take a508508+ * mutex to ensure that we don't race with another task doing509509+ * reserve_pmc_hardware or release_pmc_hardware.510510+ */511511+ err = 0;512512+ if (!atomic_inc_not_zero(&num_events)) {513513+ mutex_lock(&pmc_reserve_mutex);514514+ if (atomic_read(&num_events) == 0 &&515515+ reserve_pmc_hardware(perf_event_interrupt))516516+ err = -EBUSY;517517+ else518518+ atomic_inc(&num_events);519519+ mutex_unlock(&pmc_reserve_mutex);520520+521521+ mtpmr(PMRN_PMGC0, PMGC0_FAC);522522+ isync();523523+ }524524+ event->destroy = hw_perf_event_destroy;525525+526526+ if (err)527527+ return ERR_PTR(err);528528+ return &fsl_emb_pmu;529529+}530530+531531+/*532532+ * A counter has overflowed; update its count and record533533+ * things if requested. Note that interrupts are hard-disabled534534+ * here so there is no possibility of being interrupted.535535+ */536536+static void record_and_restart(struct perf_event *event, unsigned long val,537537+ struct pt_regs *regs, int nmi)538538+{539539+ u64 period = event->hw.sample_period;540540+ s64 prev, delta, left;541541+ int record = 0;542542+543543+ /* we don't have to worry about interrupts here */544544+ prev = atomic64_read(&event->hw.prev_count);545545+ delta = (val - prev) & 0xfffffffful;546546+ atomic64_add(delta, &event->count);547547+548548+ /*549549+ * See if the total period for this event has expired,550550+ * and update for the next period.551551+ */552552+ val = 0;553553+ left = atomic64_read(&event->hw.period_left) - delta;554554+ if (period) {555555+ if (left <= 0) {556556+ left += period;557557+ if (left <= 0)558558+ left = period;559559+ record = 1;560560+ }561561+ if (left < 0x80000000LL)562562+ val = 0x80000000LL - left;563563+ }564564+565565+ /*566566+ * Finally record data if requested.567567+ */568568+ if (record) {569569+ struct perf_sample_data data = {570570+ .period = event->hw.last_period,571571+ };572572+573573+ if (perf_event_overflow(event, nmi, &data, regs)) {574574+ /*575575+ * Interrupts are coming too fast - throttle them576576+ * by setting the event to 0, so it will be577577+ * at least 2^30 cycles until the next interrupt578578+ * (assuming each event counts at most 2 counts579579+ * per cycle).580580+ */581581+ val = 0;582582+ left = ~0ULL >> 1;583583+ }584584+ }585585+586586+ write_pmc(event->hw.idx, val);587587+ atomic64_set(&event->hw.prev_count, val);588588+ atomic64_set(&event->hw.period_left, left);589589+ perf_event_update_userpage(event);590590+}591591+592592+static void perf_event_interrupt(struct pt_regs *regs)593593+{594594+ int i;595595+ struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events);596596+ struct perf_event *event;597597+ unsigned long val;598598+ int found = 0;599599+ int nmi;600600+601601+ nmi = perf_intr_is_nmi(regs);602602+ if (nmi)603603+ nmi_enter();604604+ else605605+ irq_enter();606606+607607+ for (i = 0; i < ppmu->n_counter; ++i) {608608+ event = cpuhw->event[i];609609+610610+ val = read_pmc(i);611611+ if ((int)val < 0) {612612+ if (event) {613613+ /* event has overflowed */614614+ found = 1;615615+ record_and_restart(event, val, regs, nmi);616616+ } else {617617+ /*618618+ * Disabled counter is negative,619619+ * reset it just in case.620620+ */621621+ write_pmc(i, 0);622622+ }623623+ }624624+ }625625+626626+ /* PMM will keep counters frozen until we return from the interrupt. */627627+ mtmsr(mfmsr() | MSR_PMM);628628+ mtpmr(PMRN_PMGC0, PMGC0_PMIE | PMGC0_FCECE);629629+ isync();630630+631631+ if (nmi)632632+ nmi_exit();633633+ else634634+ irq_exit();635635+}636636+637637+void hw_perf_event_setup(int cpu)638638+{639639+ struct cpu_hw_events *cpuhw = &per_cpu(cpu_hw_events, cpu);640640+641641+ memset(cpuhw, 0, sizeof(*cpuhw));642642+}643643+644644+int register_fsl_emb_pmu(struct fsl_emb_pmu *pmu)645645+{646646+ if (ppmu)647647+ return -EBUSY; /* something's already registered */648648+649649+ ppmu = pmu;650650+ pr_info("%s performance monitor hardware support registered\n",651651+ pmu->name);652652+653653+ return 0;654654+}
···3333 This option enables support for the MPC8610 HPCD board.34343535config GEF_PPC9A3636- bool "GE Fanuc PPC9A"3636+ bool "GE PPC9A"3737 select DEFAULT_UIMAGE3838 select MMIO_NVRAM3939 select GENERIC_GPIO4040 select ARCH_REQUIRE_GPIOLIB4141 help4242- This option enables support for GE Fanuc's PPC9A.4242+ This option enables support for the GE PPC9A.43434444config GEF_SBC3104545- bool "GE Fanuc SBC310"4545+ bool "GE SBC310"4646 select DEFAULT_UIMAGE4747 select MMIO_NVRAM4848 select GENERIC_GPIO4949 select ARCH_REQUIRE_GPIOLIB5050 help5151- This option enables support for GE Fanuc's SBC310.5151+ This option enables support for the GE SBC310.52525353config GEF_SBC6105454- bool "GE Fanuc SBC610"5454+ bool "GE SBC610"5555 select DEFAULT_UIMAGE5656 select MMIO_NVRAM5757 select GENERIC_GPIO5858 select ARCH_REQUIRE_GPIOLIB5959 select HAS_RAPIDIO6060 help6161- This option enables support for GE Fanuc's SBC610.6161+ This option enables support for the GE SBC610.62626363endif6464
+5-5
arch/powerpc/platforms/86xx/gef_gpio.c
···11/*22- * Driver for GE Fanuc's FPGA based GPIO pins22+ * Driver for GE FPGA based GPIO33 *44- * Author: Martyn Welch <martyn.welch@gefanuc.com>44+ * Author: Martyn Welch <martyn.welch@ge.com>55 *66- * 2008 (c) GE Fanuc Intelligent Platforms Embedded Systems, Inc.66+ * 2008 (c) GE Intelligent Platforms Embedded Systems, Inc.77 *88 * This file is licensed under the terms of the GNU General Public License99 * version 2. This program is licensed "as is" without any warranty of any···164164};165165arch_initcall(gef_gpio_init);166166167167-MODULE_DESCRIPTION("GE Fanuc I/O FPGA GPIO driver");168168-MODULE_AUTHOR("Martyn Welch <martyn.welch@gefanuc.com");167167+MODULE_DESCRIPTION("GE I/O FPGA GPIO driver");168168+MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");169169MODULE_LICENSE("GPL");
+10-10
arch/powerpc/platforms/86xx/gef_pic.c
···11/*22- * Interrupt handling for GE Fanuc's FPGA based PIC22+ * Interrupt handling for GE FPGA based PIC33 *44- * Author: Martyn Welch <martyn.welch@gefanuc.com>44+ * Author: Martyn Welch <martyn.welch@ge.com>55 *66- * 2008 (c) GE Fanuc Intelligent Platforms Embedded Systems, Inc.66+ * 2008 (c) GE Intelligent Platforms Embedded Systems, Inc.77 *88 * This file is licensed under the terms of the GNU General Public License99 * version 2. This program is licensed "as is" without any warranty of any···4949#define gef_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)505051515252-static DEFINE_SPINLOCK(gef_pic_lock);5252+static DEFINE_RAW_SPINLOCK(gef_pic_lock);53535454static void __iomem *gef_pic_irq_reg_base;5555static struct irq_host *gef_pic_irq_host;···118118119119 hwirq = gef_irq_to_hw(virq);120120121121- spin_lock_irqsave(&gef_pic_lock, flags);121121+ raw_spin_lock_irqsave(&gef_pic_lock, flags);122122 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));123123 mask &= ~(1 << hwirq);124124 out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);125125- spin_unlock_irqrestore(&gef_pic_lock, flags);125125+ raw_spin_unlock_irqrestore(&gef_pic_lock, flags);126126}127127128128static void gef_pic_mask_ack(unsigned int virq)···141141142142 hwirq = gef_irq_to_hw(virq);143143144144- spin_lock_irqsave(&gef_pic_lock, flags);144144+ raw_spin_lock_irqsave(&gef_pic_lock, flags);145145 mask = in_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0));146146 mask |= (1 << hwirq);147147 out_be32(gef_pic_irq_reg_base + GEF_PIC_INTR_MASK(0), mask);148148- spin_unlock_irqrestore(&gef_pic_lock, flags);148148+ raw_spin_unlock_irqrestore(&gef_pic_lock, flags);149149}150150151151static struct irq_chip gef_pic_chip = {···199199 /* Map the devices registers into memory */200200 gef_pic_irq_reg_base = of_iomap(np, 0);201201202202- spin_lock_irqsave(&gef_pic_lock, flags);202202+ raw_spin_lock_irqsave(&gef_pic_lock, flags);203203204204 /* Initialise everything as masked. */205205 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_INTR_MASK, 0);···208208 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_MCP_MASK, 0);209209 out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_MCP_MASK, 0);210210211211- spin_unlock_irqrestore(&gef_pic_lock, flags);211211+ raw_spin_unlock_irqrestore(&gef_pic_lock, flags);212212213213 /* Map controller */214214 gef_pic_cascade_irq = irq_of_parse_and_map(np, 0);
+6-6
arch/powerpc/platforms/86xx/gef_ppc9a.c
···11/*22- * GE Fanuc PPC9A board support22+ * GE PPC9A board support33 *44- * Author: Martyn Welch <martyn.welch@gefanuc.com>44+ * Author: Martyn Welch <martyn.welch@ge.com>55 *66- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.66+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.77 *88 * This program is free software; you can redistribute it and/or modify it99 * under the terms of the GNU General Public License as published by the···8282 }8383#endif84848585- printk(KERN_INFO "GE Fanuc Intelligent Platforms PPC9A 6U VME SBC\n");8585+ printk(KERN_INFO "GE Intelligent Platforms PPC9A 6U VME SBC\n");86868787#ifdef CONFIG_SMP8888 mpc86xx_smp_init();···151151{152152 uint svid = mfspr(SPRN_SVR);153153154154- seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");154154+ seq_printf(m, "Vendor\t\t: GE Intelligent Platforms\n");155155156156 seq_printf(m, "Revision\t: %u%c\n", gef_ppc9a_get_pcb_rev(),157157 ('A' + gef_ppc9a_get_board_rev()));···235235machine_device_initcall(gef_ppc9a, declare_of_platform_devices);236236237237define_machine(gef_ppc9a) {238238- .name = "GE Fanuc PPC9A",238238+ .name = "GE PPC9A",239239 .probe = gef_ppc9a_probe,240240 .setup_arch = gef_ppc9a_setup_arch,241241 .init_IRQ = gef_ppc9a_init_irq,
+6-6
arch/powerpc/platforms/86xx/gef_sbc310.c
···11/*22- * GE Fanuc SBC310 board support22+ * GE SBC310 board support33 *44- * Author: Martyn Welch <martyn.welch@gefanuc.com>44+ * Author: Martyn Welch <martyn.welch@ge.com>55 *66- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.66+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.77 *88 * This program is free software; you can redistribute it and/or modify it99 * under the terms of the GNU General Public License as published by the···8282 }8383#endif84848585- printk(KERN_INFO "GE Fanuc Intelligent Platforms SBC310 6U VPX SBC\n");8585+ printk(KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n");86868787#ifdef CONFIG_SMP8888 mpc86xx_smp_init();···142142{143143 uint svid = mfspr(SPRN_SVR);144144145145- seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");145145+ seq_printf(m, "Vendor\t\t: GE Intelligent Platforms\n");146146147147 seq_printf(m, "Board ID\t: 0x%2.2x\n", gef_sbc310_get_board_id());148148 seq_printf(m, "Revision\t: %u%c\n", gef_sbc310_get_pcb_rev(),···223223machine_device_initcall(gef_sbc310, declare_of_platform_devices);224224225225define_machine(gef_sbc310) {226226- .name = "GE Fanuc SBC310",226226+ .name = "GE SBC310",227227 .probe = gef_sbc310_probe,228228 .setup_arch = gef_sbc310_setup_arch,229229 .init_IRQ = gef_sbc310_init_irq,
+6-6
arch/powerpc/platforms/86xx/gef_sbc610.c
···11/*22- * GE Fanuc SBC610 board support22+ * GE SBC610 board support33 *44- * Author: Martyn Welch <martyn.welch@gefanuc.com>44+ * Author: Martyn Welch <martyn.welch@ge.com>55 *66- * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.66+ * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.77 *88 * This program is free software; you can redistribute it and/or modify it99 * under the terms of the GNU General Public License as published by the···8282 }8383#endif84848585- printk(KERN_INFO "GE Fanuc Intelligent Platforms SBC610 6U VPX SBC\n");8585+ printk(KERN_INFO "GE Intelligent Platforms SBC610 6U VPX SBC\n");86868787#ifdef CONFIG_SMP8888 mpc86xx_smp_init();···133133{134134 uint svid = mfspr(SPRN_SVR);135135136136- seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");136136+ seq_printf(m, "Vendor\t\t: GE Intelligent Platforms\n");137137138138 seq_printf(m, "Revision\t: %u%c\n", gef_sbc610_get_pcb_rev(),139139 ('A' + gef_sbc610_get_board_rev() - 1));···212212machine_device_initcall(gef_sbc610, declare_of_platform_devices);213213214214define_machine(gef_sbc610) {215215- .name = "GE Fanuc SBC610",215215+ .name = "GE SBC610",216216 .probe = gef_sbc610_probe,217217 .setup_arch = gef_sbc610_setup_arch,218218 .init_IRQ = gef_sbc610_init_irq,
+10
arch/powerpc/platforms/Kconfig.cputype
···144144 and some e300 cores (c3 and c4). Select this only if your145145 core supports the Embedded Performance Monitor APU146146147147+config FSL_EMB_PERF_EVENT148148+ bool149149+ depends on FSL_EMB_PERFMON && PERF_EVENTS && !PPC_PERF_CTRS150150+ default y151151+152152+config FSL_EMB_PERF_EVENT_E500153153+ bool154154+ depends on FSL_EMB_PERF_EVENT && E500155155+ default y156156+147157config 4xx148158 bool149159 depends on 40x || 44x