^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * PPC 64 oprofile support:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * PPC 32 oprofile support: (based on PPC 64 support)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright (C) Freescale Semiconductor, Inc 2004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Author: Andy Fleming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Based on alpha version.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/oprofile.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/smp.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <asm/ptrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <asm/pmc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <asm/cputable.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <asm/oprofile_impl.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <asm/firmware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) static struct op_powerpc_model *model;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) static struct op_counter_config ctr[OP_MAX_COUNTER];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) static struct op_system_config sys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) static int op_per_cpu_rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static void op_handle_interrupt(struct pt_regs *regs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) model->handle_interrupt(regs, ctr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) static void op_powerpc_cpu_setup(void *dummy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) ret = model->cpu_setup(ctr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) if (ret != 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) op_per_cpu_rc = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static int op_powerpc_setup(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) int err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) op_per_cpu_rc = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) /* Grab the hardware */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) err = reserve_pmc_hardware(op_handle_interrupt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) if (err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) return err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) /* Pre-compute the values to stuff in the hardware registers. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) op_per_cpu_rc = model->reg_setup(ctr, &sys, model->num_counters);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) if (op_per_cpu_rc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) /* Configure the registers on all cpus. If an error occurs on one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) * of the cpus, op_per_cpu_rc will be set to the error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) on_each_cpu(op_powerpc_cpu_setup, NULL, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) out: if (op_per_cpu_rc) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) /* error on setup release the performance counter hardware */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) release_pmc_hardware();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) return op_per_cpu_rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) static void op_powerpc_shutdown(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) release_pmc_hardware();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) static void op_powerpc_cpu_start(void *dummy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) /* If any of the cpus have return an error, set the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) * global flag to the error so it can be returned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) * to the generic OProfile caller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) int ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) ret = model->start(ctr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) if (ret != 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) op_per_cpu_rc = ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) static int op_powerpc_start(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) op_per_cpu_rc = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) if (model->global_start)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) return model->global_start(ctr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) if (model->start) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) on_each_cpu(op_powerpc_cpu_start, NULL, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) return op_per_cpu_rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) return -EIO; /* No start function is defined for this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) power architecture */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) static inline void op_powerpc_cpu_stop(void *dummy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) model->stop();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) static void op_powerpc_stop(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) if (model->stop)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) on_each_cpu(op_powerpc_cpu_stop, NULL, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) if (model->global_stop)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) model->global_stop();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) static int op_powerpc_create_files(struct dentry *root)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) #ifdef CONFIG_PPC64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) * There is one mmcr0, mmcr1 and mmcra for setting the events for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) * all of the counters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) oprofilefs_create_ulong(root, "mmcr0", &sys.mmcr0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) oprofilefs_create_ulong(root, "mmcr1", &sys.mmcr1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) oprofilefs_create_ulong(root, "mmcra", &sys.mmcra);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #ifdef CONFIG_OPROFILE_CELL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) /* create a file the user tool can check to see what level of profiling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) * support exits with this kernel. Initialize bit mask to indicate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) * what support the kernel has:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) * bit 0 - Supports SPU event profiling in addition to PPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) * event and cycles; and SPU cycle profiling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) * bits 1-31 - Currently unused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) * If the file does not exist, then the kernel only supports SPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) * cycle profiling, PPU event and cycle profiling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) oprofilefs_create_ulong(root, "cell_support", &sys.cell_support);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) sys.cell_support = 0x1; /* Note, the user OProfile tool must check
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) * that this bit is set before attempting to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) * user SPU event profiling. Older kernels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * will not have this file, hence the user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) * tool is not allowed to do SPU event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) * profiling on older kernels. Older kernels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) * will accept SPU events but collected data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) * is garbage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) for (i = 0; i < model->num_counters; ++i) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) struct dentry *dir;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) char buf[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) snprintf(buf, sizeof buf, "%d", i);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) dir = oprofilefs_mkdir(root, buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) oprofilefs_create_ulong(dir, "event", &ctr[i].event);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) oprofilefs_create_ulong(dir, "count", &ctr[i].count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) * Classic PowerPC doesn't support per-counter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) * control like this, but the options are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) * expected, so they remain. For Freescale
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) * Book-E style performance monitors, we do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) * support them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) oprofilefs_create_ulong(dir, "kernel", &ctr[i].kernel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) oprofilefs_create_ulong(dir, "user", &ctr[i].user);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) oprofilefs_create_ulong(dir, "unit_mask", &ctr[i].unit_mask);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) oprofilefs_create_ulong(root, "enable_kernel", &sys.enable_kernel);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) oprofilefs_create_ulong(root, "enable_user", &sys.enable_user);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /* Default to tracing both kernel and user */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) sys.enable_kernel = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) sys.enable_user = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) int __init oprofile_arch_init(struct oprofile_operations *ops)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) if (!cur_cpu_spec->oprofile_cpu_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) switch (cur_cpu_spec->oprofile_type) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #ifdef CONFIG_PPC_BOOK3S_64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #ifdef CONFIG_OPROFILE_CELL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) case PPC_OPROFILE_CELL:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) if (firmware_has_feature(FW_FEATURE_LPAR))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) model = &op_model_cell;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) ops->sync_start = model->sync_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) ops->sync_stop = model->sync_stop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) case PPC_OPROFILE_POWER4:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) model = &op_model_power4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) case PPC_OPROFILE_PA6T:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) model = &op_model_pa6t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #ifdef CONFIG_PPC_BOOK3S_32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) case PPC_OPROFILE_G4:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) model = &op_model_7450;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) #if defined(CONFIG_FSL_EMB_PERFMON)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) case PPC_OPROFILE_FSL_EMB:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) model = &op_model_fsl_emb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) break;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) default:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) model->num_counters = cur_cpu_spec->num_pmcs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) ops->cpu_type = cur_cpu_spec->oprofile_cpu_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) ops->create_files = op_powerpc_create_files;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) ops->setup = op_powerpc_setup;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) ops->shutdown = op_powerpc_shutdown;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) ops->start = op_powerpc_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) ops->stop = op_powerpc_stop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) ops->backtrace = op_powerpc_backtrace;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) printk(KERN_DEBUG "oprofile: using %s performance monitoring.\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) ops->cpu_type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) void oprofile_arch_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) }