Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: powerpc: Stop building and using oprofile

The "oprofile" user-space tools don't use the kernel OPROFILE support
any more, and haven't in a long time. User-space has been converted to
the perf interfaces.

This commits stops building oprofile for powerpc and removes any
reference to it from directories in arch/powerpc/ apart from
arch/powerpc/oprofile, which will be removed in the next commit (this is
broken into two commits as the size of the commit became very big, ~5k
lines).

Note that the member "oprofile_cpu_type" in "struct cpu_spec" isn't
removed as it was also used by other parts of the code.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Robert Richter <rric@kernel.org>
Acked-by: William Cohen <wcohen@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>

+1 -347
-1
arch/powerpc/Kconfig
··· 226 226 select HAVE_MOD_ARCH_SPECIFIC 227 227 select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) 228 228 select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S) 229 - select HAVE_OPROFILE 230 229 select HAVE_OPTPROBES if PPC64 231 230 select HAVE_PERF_EVENTS 232 231 select HAVE_PERF_EVENTS_NMI if PPC64
-2
arch/powerpc/Makefile
··· 276 276 # See arch/powerpc/Kbuild for content of core part of the kernel 277 277 core-y += arch/powerpc/ 278 278 279 - drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ 280 - 281 279 # Default to zImage, override when needed 282 280 all: zImage 283 281
-1
arch/powerpc/configs/44x/akebono_defconfig
··· 8 8 CONFIG_KALLSYMS_ALL=y 9 9 # CONFIG_SLUB_CPU_PARTIAL is not set 10 10 CONFIG_PROFILING=y 11 - CONFIG_OPROFILE=y 12 11 CONFIG_MODULES=y 13 12 CONFIG_MODULE_UNLOAD=y 14 13 # CONFIG_BLK_DEV_BSG is not set
-1
arch/powerpc/configs/44x/currituck_defconfig
··· 6 6 CONFIG_EXPERT=y 7 7 CONFIG_KALLSYMS_ALL=y 8 8 CONFIG_PROFILING=y 9 - CONFIG_OPROFILE=y 10 9 CONFIG_MODULES=y 11 10 CONFIG_MODULE_UNLOAD=y 12 11 # CONFIG_BLK_DEV_BSG is not set
-1
arch/powerpc/configs/44x/fsp2_defconfig
··· 17 17 CONFIG_BPF_SYSCALL=y 18 18 CONFIG_EMBEDDED=y 19 19 CONFIG_PROFILING=y 20 - CONFIG_OPROFILE=y 21 20 CONFIG_MODULES=y 22 21 CONFIG_MODULE_UNLOAD=y 23 22 # CONFIG_BLK_DEV_BSG is not set
-1
arch/powerpc/configs/44x/iss476-smp_defconfig
··· 7 7 CONFIG_EXPERT=y 8 8 CONFIG_KALLSYMS_ALL=y 9 9 CONFIG_PROFILING=y 10 - CONFIG_OPROFILE=y 11 10 CONFIG_MODULES=y 12 11 CONFIG_MODULE_UNLOAD=y 13 12 # CONFIG_BLK_DEV_BSG is not set
-1
arch/powerpc/configs/cell_defconfig
··· 14 14 CONFIG_BLK_DEV_INITRD=y 15 15 # CONFIG_COMPAT_BRK is not set 16 16 CONFIG_PROFILING=y 17 - CONFIG_OPROFILE=m 18 17 CONFIG_MODULES=y 19 18 CONFIG_MODULE_UNLOAD=y 20 19 CONFIG_PARTITION_ADVANCED=y
-1
arch/powerpc/configs/g5_defconfig
··· 12 12 CONFIG_BLK_DEV_INITRD=y 13 13 # CONFIG_COMPAT_BRK is not set 14 14 CONFIG_PROFILING=y 15 - CONFIG_OPROFILE=y 16 15 CONFIG_MODULES=y 17 16 CONFIG_MODULE_UNLOAD=y 18 17 CONFIG_MODVERSIONS=y
-1
arch/powerpc/configs/maple_defconfig
··· 9 9 CONFIG_IKCONFIG_PROC=y 10 10 # CONFIG_COMPAT_BRK is not set 11 11 CONFIG_PROFILING=y 12 - CONFIG_OPROFILE=m 13 12 CONFIG_KPROBES=y 14 13 CONFIG_MODULES=y 15 14 CONFIG_MODULE_UNLOAD=y
-1
arch/powerpc/configs/pasemi_defconfig
··· 7 7 CONFIG_HIGH_RES_TIMERS=y 8 8 CONFIG_BLK_DEV_INITRD=y 9 9 CONFIG_PROFILING=y 10 - CONFIG_OPROFILE=y 11 10 CONFIG_MODULES=y 12 11 CONFIG_MODULE_UNLOAD=y 13 12 # CONFIG_BLK_DEV_BSG is not set
-1
arch/powerpc/configs/pmac32_defconfig
··· 10 10 CONFIG_BLK_DEV_INITRD=y 11 11 # CONFIG_COMPAT_BRK is not set 12 12 CONFIG_PROFILING=y 13 - CONFIG_OPROFILE=y 14 13 CONFIG_MODULES=y 15 14 CONFIG_MODULE_UNLOAD=y 16 15 CONFIG_MODULE_FORCE_UNLOAD=y
-1
arch/powerpc/configs/powernv_defconfig
··· 30 30 CONFIG_BPF_SYSCALL=y 31 31 # CONFIG_COMPAT_BRK is not set 32 32 CONFIG_PROFILING=y 33 - CONFIG_OPROFILE=m 34 33 CONFIG_KPROBES=y 35 34 CONFIG_JUMP_LABEL=y 36 35 CONFIG_MODULES=y
-1
arch/powerpc/configs/ppc64_defconfig
··· 62 62 CONFIG_KVM_BOOK3S_64=m 63 63 CONFIG_KVM_BOOK3S_64_HV=m 64 64 CONFIG_VHOST_NET=m 65 - CONFIG_OPROFILE=m 66 65 CONFIG_KPROBES=y 67 66 CONFIG_JUMP_LABEL=y 68 67 CONFIG_MODULES=y
-1
arch/powerpc/configs/ppc64e_defconfig
··· 14 14 CONFIG_BLK_DEV_INITRD=y 15 15 # CONFIG_COMPAT_BRK is not set 16 16 CONFIG_PROFILING=y 17 - CONFIG_OPROFILE=y 18 17 CONFIG_MODULES=y 19 18 CONFIG_MODULE_UNLOAD=y 20 19 CONFIG_MODVERSIONS=y
-1
arch/powerpc/configs/ppc6xx_defconfig
··· 19 19 CONFIG_BLK_DEV_INITRD=y 20 20 # CONFIG_COMPAT_BRK is not set 21 21 CONFIG_PROFILING=y 22 - CONFIG_OPROFILE=m 23 22 CONFIG_KPROBES=y 24 23 CONFIG_MODULES=y 25 24 CONFIG_MODULE_UNLOAD=y
-1
arch/powerpc/configs/ps3_defconfig
··· 13 13 # CONFIG_COMPAT_BRK is not set 14 14 CONFIG_SLAB=y 15 15 CONFIG_PROFILING=y 16 - CONFIG_OPROFILE=m 17 16 CONFIG_MODULES=y 18 17 CONFIG_MODULE_UNLOAD=y 19 18 # CONFIG_PPC_POWERNV is not set
-1
arch/powerpc/configs/pseries_defconfig
··· 29 29 CONFIG_BPF_SYSCALL=y 30 30 # CONFIG_COMPAT_BRK is not set 31 31 CONFIG_PROFILING=y 32 - CONFIG_OPROFILE=m 33 32 CONFIG_KPROBES=y 34 33 CONFIG_JUMP_LABEL=y 35 34 CONFIG_MODULES=y
-20
arch/powerpc/include/asm/cputable.h
··· 17 17 typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); 18 18 typedef void (*cpu_restore_t)(void); 19 19 20 - enum powerpc_oprofile_type { 21 - PPC_OPROFILE_INVALID = 0, 22 - PPC_OPROFILE_RS64 = 1, 23 - PPC_OPROFILE_POWER4 = 2, 24 - PPC_OPROFILE_G4 = 3, 25 - PPC_OPROFILE_FSL_EMB = 4, 26 - PPC_OPROFILE_CELL = 5, 27 - PPC_OPROFILE_PA6T = 6, 28 - }; 29 - 30 20 enum powerpc_pmc_type { 31 21 PPC_PMC_DEFAULT = 0, 32 22 PPC_PMC_IBM = 1, ··· 72 82 73 83 /* Used by oprofile userspace to select the right counters */ 74 84 char *oprofile_cpu_type; 75 - 76 - /* Processor specific oprofile operations */ 77 - enum powerpc_oprofile_type oprofile_type; 78 - 79 - /* Bit locations inside the mmcra change */ 80 - unsigned long oprofile_mmcra_sihv; 81 - unsigned long oprofile_mmcra_sipr; 82 - 83 - /* Bits to clear during an oprofile exception */ 84 - unsigned long oprofile_mmcra_clear; 85 85 86 86 /* Name of processor class, for the ELF AT_PLATFORM entry */ 87 87 char *platform;
-135
arch/powerpc/include/asm/oprofile_impl.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 - /* 3 - * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM 4 - * 5 - * Based on alpha version. 6 - */ 7 - 8 - #ifndef _ASM_POWERPC_OPROFILE_IMPL_H 9 - #define _ASM_POWERPC_OPROFILE_IMPL_H 10 - #ifdef __KERNEL__ 11 - 12 - #define OP_MAX_COUNTER 8 13 - 14 - /* Per-counter configuration as set via oprofilefs. */ 15 - struct op_counter_config { 16 - unsigned long enabled; 17 - unsigned long event; 18 - unsigned long count; 19 - /* Classic doesn't support per-counter user/kernel selection */ 20 - unsigned long kernel; 21 - unsigned long user; 22 - unsigned long unit_mask; 23 - }; 24 - 25 - /* System-wide configuration as set via oprofilefs. */ 26 - struct op_system_config { 27 - #ifdef CONFIG_PPC64 28 - unsigned long mmcr0; 29 - unsigned long mmcr1; 30 - unsigned long mmcra; 31 - #ifdef CONFIG_OPROFILE_CELL 32 - /* Register for oprofile user tool to check cell kernel profiling 33 - * support. 34 - */ 35 - unsigned long cell_support; 36 - #endif 37 - #endif 38 - unsigned long enable_kernel; 39 - unsigned long enable_user; 40 - }; 41 - 42 - /* Per-arch configuration */ 43 - struct op_powerpc_model { 44 - int (*reg_setup) (struct op_counter_config *, 45 - struct op_system_config *, 46 - int num_counters); 47 - int (*cpu_setup) (struct op_counter_config *); 48 - int (*start) (struct op_counter_config *); 49 - int (*global_start) (struct op_counter_config *); 50 - void (*stop) (void); 51 - void (*global_stop) (void); 52 - int (*sync_start)(void); 53 - int (*sync_stop)(void); 54 - void (*handle_interrupt) (struct pt_regs *, 55 - struct op_counter_config *); 56 - int num_counters; 57 - }; 58 - 59 - extern struct op_powerpc_model op_model_fsl_emb; 60 - extern struct op_powerpc_model op_model_power4; 61 - extern struct op_powerpc_model op_model_7450; 62 - extern struct op_powerpc_model op_model_cell; 63 - extern struct op_powerpc_model op_model_pa6t; 64 - 65 - 66 - /* All the classic PPC parts use these */ 67 - static inline unsigned int classic_ctr_read(unsigned int i) 68 - { 69 - switch(i) { 70 - case 0: 71 - return mfspr(SPRN_PMC1); 72 - case 1: 73 - return mfspr(SPRN_PMC2); 74 - case 2: 75 - return mfspr(SPRN_PMC3); 76 - case 3: 77 - return mfspr(SPRN_PMC4); 78 - case 4: 79 - return mfspr(SPRN_PMC5); 80 - case 5: 81 - return mfspr(SPRN_PMC6); 82 - 83 - /* No PPC32 chip has more than 6 so far */ 84 - #ifdef CONFIG_PPC64 85 - case 6: 86 - return mfspr(SPRN_PMC7); 87 - case 7: 88 - return mfspr(SPRN_PMC8); 89 - #endif 90 - default: 91 - return 0; 92 - } 93 - } 94 - 95 - static inline void classic_ctr_write(unsigned int i, unsigned int val) 96 - { 97 - switch(i) { 98 - case 0: 99 - mtspr(SPRN_PMC1, val); 100 - break; 101 - case 1: 102 - mtspr(SPRN_PMC2, val); 103 - break; 104 - case 2: 105 - mtspr(SPRN_PMC3, val); 106 - break; 107 - case 3: 108 - mtspr(SPRN_PMC4, val); 109 - break; 110 - case 4: 111 - mtspr(SPRN_PMC5, val); 112 - break; 113 - case 5: 114 - mtspr(SPRN_PMC6, val); 115 - break; 116 - 117 - /* No PPC32 chip has more than 6, yet */ 118 - #ifdef CONFIG_PPC64 119 - case 6: 120 - mtspr(SPRN_PMC7, val); 121 - break; 122 - case 7: 123 - mtspr(SPRN_PMC8, val); 124 - break; 125 - #endif 126 - default: 127 - break; 128 - } 129 - } 130 - 131 - 132 - extern void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth); 133 - 134 - #endif /* __KERNEL__ */ 135 - #endif /* _ASM_POWERPC_OPROFILE_IMPL_H */
-33
arch/powerpc/include/asm/spu.h
··· 201 201 struct mm_struct; 202 202 extern void spu_flush_all_slbs(struct mm_struct *mm); 203 203 204 - /* This interface allows a profiler (e.g., OProfile) to store a ref 205 - * to spu context information that it creates. This caching technique 206 - * avoids the need to recreate this information after a save/restore operation. 207 - * 208 - * Assumes the caller has already incremented the ref count to 209 - * profile_info; then spu_context_destroy must call kref_put 210 - * on prof_info_kref. 211 - */ 212 - void spu_set_profile_private_kref(struct spu_context *ctx, 213 - struct kref *prof_info_kref, 214 - void ( * prof_info_release) (struct kref *kref)); 215 - 216 - void *spu_get_profile_private_kref(struct spu_context *ctx); 217 - 218 204 /* system callbacks from the SPU */ 219 205 struct spu_syscall_block { 220 206 u64 nr_ret; ··· 251 265 252 266 int spu_add_dev_attr_group(struct attribute_group *attrs); 253 267 void spu_remove_dev_attr_group(struct attribute_group *attrs); 254 - 255 - /* 256 - * Notifier blocks: 257 - * 258 - * oprofile can get notified when a context switch is performed 259 - * on an spe. The notifer function that gets called is passed 260 - * a pointer to the SPU structure as well as the object-id that 261 - * identifies the binary running on that SPU now. 262 - * 263 - * For a context save, the object-id that is passed is zero, 264 - * identifying that the kernel will run from that moment on. 265 - * 266 - * For a context restore, the object-id is the value written 267 - * to object-id spufs file from user space and the notifer 268 - * function can assume that spu->ctx is valid. 269 - */ 270 - struct notifier_block; 271 - int spu_switch_event_register(struct notifier_block * n); 272 - int spu_switch_event_unregister(struct notifier_block * n); 273 268 274 269 extern void notify_spus_active(void); 275 270 extern void do_notify_spus_active(void);
-67
arch/powerpc/kernel/cputable.c
··· 13 13 #include <linux/export.h> 14 14 #include <linux/jump_label.h> 15 15 16 - #include <asm/oprofile_impl.h> 17 16 #include <asm/cputable.h> 18 17 #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ 19 18 #include <asm/mce.h> ··· 150 151 .cpu_setup = __setup_cpu_ppc970, 151 152 .cpu_restore = __restore_cpu_ppc970, 152 153 .oprofile_cpu_type = "ppc64/970", 153 - .oprofile_type = PPC_OPROFILE_POWER4, 154 154 .platform = "ppc970", 155 155 }, 156 156 { /* PPC970FX */ ··· 167 169 .cpu_setup = __setup_cpu_ppc970, 168 170 .cpu_restore = __restore_cpu_ppc970, 169 171 .oprofile_cpu_type = "ppc64/970", 170 - .oprofile_type = PPC_OPROFILE_POWER4, 171 172 .platform = "ppc970", 172 173 }, 173 174 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ ··· 184 187 .cpu_setup = __setup_cpu_ppc970, 185 188 .cpu_restore = __restore_cpu_ppc970, 186 189 .oprofile_cpu_type = "ppc64/970MP", 187 - .oprofile_type = PPC_OPROFILE_POWER4, 188 190 .platform = "ppc970", 189 191 }, 190 192 { /* PPC970MP */ ··· 201 205 .cpu_setup = __setup_cpu_ppc970MP, 202 206 .cpu_restore = __restore_cpu_ppc970, 203 207 .oprofile_cpu_type = "ppc64/970MP", 204 - .oprofile_type = PPC_OPROFILE_POWER4, 205 208 .platform = "ppc970", 206 209 }, 207 210 { /* PPC970GX */ ··· 217 222 .pmc_type = PPC_PMC_IBM, 218 223 .cpu_setup = __setup_cpu_ppc970, 219 224 .oprofile_cpu_type = "ppc64/970", 220 - .oprofile_type = PPC_OPROFILE_POWER4, 221 225 .platform = "ppc970", 222 226 }, 223 227 { /* Power5 GR */ ··· 231 237 .num_pmcs = 6, 232 238 .pmc_type = PPC_PMC_IBM, 233 239 .oprofile_cpu_type = "ppc64/power5", 234 - .oprofile_type = PPC_OPROFILE_POWER4, 235 - /* SIHV / SIPR bits are implemented on POWER4+ (GQ) 236 - * and above but only works on POWER5 and above 237 - */ 238 - .oprofile_mmcra_sihv = MMCRA_SIHV, 239 - .oprofile_mmcra_sipr = MMCRA_SIPR, 240 240 .platform = "power5", 241 241 }, 242 242 { /* Power5++ */ ··· 244 256 .dcache_bsize = 128, 245 257 .num_pmcs = 6, 246 258 .oprofile_cpu_type = "ppc64/power5++", 247 - .oprofile_type = PPC_OPROFILE_POWER4, 248 - .oprofile_mmcra_sihv = MMCRA_SIHV, 249 - .oprofile_mmcra_sipr = MMCRA_SIPR, 250 259 .platform = "power5+", 251 260 }, 252 261 { /* Power5 GS */ ··· 258 273 .num_pmcs = 6, 259 274 .pmc_type = PPC_PMC_IBM, 260 275 .oprofile_cpu_type = "ppc64/power5+", 261 - .oprofile_type = PPC_OPROFILE_POWER4, 262 - .oprofile_mmcra_sihv = MMCRA_SIHV, 263 - .oprofile_mmcra_sipr = MMCRA_SIPR, 264 276 .platform = "power5+", 265 277 }, 266 278 { /* POWER6 in P5+ mode; 2.04-compliant processor */ ··· 270 288 .icache_bsize = 128, 271 289 .dcache_bsize = 128, 272 290 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 273 - .oprofile_type = PPC_OPROFILE_POWER4, 274 291 .platform = "power5+", 275 292 }, 276 293 { /* Power6 */ ··· 285 304 .num_pmcs = 6, 286 305 .pmc_type = PPC_PMC_IBM, 287 306 .oprofile_cpu_type = "ppc64/power6", 288 - .oprofile_type = PPC_OPROFILE_POWER4, 289 - .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, 290 - .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, 291 - .oprofile_mmcra_clear = POWER6_MMCRA_THRM | 292 - POWER6_MMCRA_OTHER, 293 307 .platform = "power6x", 294 308 }, 295 309 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ ··· 297 321 .icache_bsize = 128, 298 322 .dcache_bsize = 128, 299 323 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 300 - .oprofile_type = PPC_OPROFILE_POWER4, 301 324 .platform = "power6", 302 325 }, 303 326 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */ ··· 309 334 .mmu_features = MMU_FTRS_POWER7, 310 335 .icache_bsize = 128, 311 336 .dcache_bsize = 128, 312 - .oprofile_type = PPC_OPROFILE_POWER4, 313 337 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 314 338 .cpu_setup = __setup_cpu_power7, 315 339 .cpu_restore = __restore_cpu_power7, ··· 325 351 .mmu_features = MMU_FTRS_POWER8, 326 352 .icache_bsize = 128, 327 353 .dcache_bsize = 128, 328 - .oprofile_type = PPC_OPROFILE_INVALID, 329 354 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 330 355 .cpu_setup = __setup_cpu_power8, 331 356 .cpu_restore = __restore_cpu_power8, ··· 341 368 .mmu_features = MMU_FTRS_POWER9, 342 369 .icache_bsize = 128, 343 370 .dcache_bsize = 128, 344 - .oprofile_type = PPC_OPROFILE_INVALID, 345 371 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 346 372 .cpu_setup = __setup_cpu_power9, 347 373 .cpu_restore = __restore_cpu_power9, ··· 356 384 .mmu_features = MMU_FTRS_POWER10, 357 385 .icache_bsize = 128, 358 386 .dcache_bsize = 128, 359 - .oprofile_type = PPC_OPROFILE_INVALID, 360 387 .oprofile_cpu_type = "ppc64/ibm-compat-v1", 361 388 .cpu_setup = __setup_cpu_power10, 362 389 .cpu_restore = __restore_cpu_power10, ··· 374 403 .num_pmcs = 6, 375 404 .pmc_type = PPC_PMC_IBM, 376 405 .oprofile_cpu_type = "ppc64/power7", 377 - .oprofile_type = PPC_OPROFILE_POWER4, 378 406 .cpu_setup = __setup_cpu_power7, 379 407 .cpu_restore = __restore_cpu_power7, 380 408 .machine_check_early = __machine_check_early_realmode_p7, ··· 392 422 .num_pmcs = 6, 393 423 .pmc_type = PPC_PMC_IBM, 394 424 .oprofile_cpu_type = "ppc64/power7", 395 - .oprofile_type = PPC_OPROFILE_POWER4, 396 425 .cpu_setup = __setup_cpu_power7, 397 426 .cpu_restore = __restore_cpu_power7, 398 427 .machine_check_early = __machine_check_early_realmode_p7, ··· 410 441 .num_pmcs = 6, 411 442 .pmc_type = PPC_PMC_IBM, 412 443 .oprofile_cpu_type = "ppc64/power8", 413 - .oprofile_type = PPC_OPROFILE_INVALID, 414 444 .cpu_setup = __setup_cpu_power8, 415 445 .cpu_restore = __restore_cpu_power8, 416 446 .machine_check_early = __machine_check_early_realmode_p8, ··· 428 460 .num_pmcs = 6, 429 461 .pmc_type = PPC_PMC_IBM, 430 462 .oprofile_cpu_type = "ppc64/power8", 431 - .oprofile_type = PPC_OPROFILE_INVALID, 432 463 .cpu_setup = __setup_cpu_power8, 433 464 .cpu_restore = __restore_cpu_power8, 434 465 .machine_check_early = __machine_check_early_realmode_p8, ··· 446 479 .num_pmcs = 6, 447 480 .pmc_type = PPC_PMC_IBM, 448 481 .oprofile_cpu_type = "ppc64/power8", 449 - .oprofile_type = PPC_OPROFILE_INVALID, 450 482 .cpu_setup = __setup_cpu_power8, 451 483 .cpu_restore = __restore_cpu_power8, 452 484 .machine_check_early = __machine_check_early_realmode_p8, ··· 464 498 .num_pmcs = 6, 465 499 .pmc_type = PPC_PMC_IBM, 466 500 .oprofile_cpu_type = "ppc64/power9", 467 - .oprofile_type = PPC_OPROFILE_INVALID, 468 501 .cpu_setup = __setup_cpu_power9, 469 502 .cpu_restore = __restore_cpu_power9, 470 503 .machine_check_early = __machine_check_early_realmode_p9, ··· 482 517 .num_pmcs = 6, 483 518 .pmc_type = PPC_PMC_IBM, 484 519 .oprofile_cpu_type = "ppc64/power9", 485 - .oprofile_type = PPC_OPROFILE_INVALID, 486 520 .cpu_setup = __setup_cpu_power9, 487 521 .cpu_restore = __restore_cpu_power9, 488 522 .machine_check_early = __machine_check_early_realmode_p9, ··· 500 536 .num_pmcs = 6, 501 537 .pmc_type = PPC_PMC_IBM, 502 538 .oprofile_cpu_type = "ppc64/power9", 503 - .oprofile_type = PPC_OPROFILE_INVALID, 504 539 .cpu_setup = __setup_cpu_power9, 505 540 .cpu_restore = __restore_cpu_power9, 506 541 .machine_check_early = __machine_check_early_realmode_p9, ··· 518 555 .num_pmcs = 6, 519 556 .pmc_type = PPC_PMC_IBM, 520 557 .oprofile_cpu_type = "ppc64/power10", 521 - .oprofile_type = PPC_OPROFILE_INVALID, 522 558 .cpu_setup = __setup_cpu_power10, 523 559 .cpu_restore = __restore_cpu_power10, 524 560 .machine_check_early = __machine_check_early_realmode_p10, ··· 537 575 .num_pmcs = 4, 538 576 .pmc_type = PPC_PMC_IBM, 539 577 .oprofile_cpu_type = "ppc64/cell-be", 540 - .oprofile_type = PPC_OPROFILE_CELL, 541 578 .platform = "ppc-cell-be", 542 579 }, 543 580 { /* PA Semi PA6T */ ··· 553 592 .cpu_setup = __setup_cpu_pa6t, 554 593 .cpu_restore = __restore_cpu_pa6t, 555 594 .oprofile_cpu_type = "ppc64/pa6t", 556 - .oprofile_type = PPC_OPROFILE_PA6T, 557 595 .platform = "pa6t", 558 596 }, 559 597 { /* default match */ ··· 717 757 .machine_check = machine_check_generic, 718 758 .platform = "ppc750", 719 759 .oprofile_cpu_type = "ppc/750", 720 - .oprofile_type = PPC_OPROFILE_G4, 721 760 }, 722 761 { /* 745/755 */ 723 762 .pvr_mask = 0xfffff000, ··· 748 789 .machine_check = machine_check_generic, 749 790 .platform = "ppc750", 750 791 .oprofile_cpu_type = "ppc/750", 751 - .oprofile_type = PPC_OPROFILE_G4, 752 792 }, 753 793 { /* 750FX rev 2.0 must disable HID0[DPM] */ 754 794 .pvr_mask = 0xffffffff, ··· 764 806 .machine_check = machine_check_generic, 765 807 .platform = "ppc750", 766 808 .oprofile_cpu_type = "ppc/750", 767 - .oprofile_type = PPC_OPROFILE_G4, 768 809 }, 769 810 { /* 750FX (All revs except 2.0) */ 770 811 .pvr_mask = 0xffff0000, ··· 780 823 .machine_check = machine_check_generic, 781 824 .platform = "ppc750", 782 825 .oprofile_cpu_type = "ppc/750", 783 - .oprofile_type = PPC_OPROFILE_G4, 784 826 }, 785 827 { /* 750GX */ 786 828 .pvr_mask = 0xffff0000, ··· 796 840 .machine_check = machine_check_generic, 797 841 .platform = "ppc750", 798 842 .oprofile_cpu_type = "ppc/750", 799 - .oprofile_type = PPC_OPROFILE_G4, 800 843 }, 801 844 { /* 740/750 (L2CR bit need fixup for 740) */ 802 845 .pvr_mask = 0xffff0000, ··· 874 919 .pmc_type = PPC_PMC_G4, 875 920 .cpu_setup = __setup_cpu_745x, 876 921 .oprofile_cpu_type = "ppc/7450", 877 - .oprofile_type = PPC_OPROFILE_G4, 878 922 .machine_check = machine_check_generic, 879 923 .platform = "ppc7450", 880 924 }, ··· 891 937 .pmc_type = PPC_PMC_G4, 892 938 .cpu_setup = __setup_cpu_745x, 893 939 .oprofile_cpu_type = "ppc/7450", 894 - .oprofile_type = PPC_OPROFILE_G4, 895 940 .machine_check = machine_check_generic, 896 941 .platform = "ppc7450", 897 942 }, ··· 908 955 .pmc_type = PPC_PMC_G4, 909 956 .cpu_setup = __setup_cpu_745x, 910 957 .oprofile_cpu_type = "ppc/7450", 911 - .oprofile_type = PPC_OPROFILE_G4, 912 958 .machine_check = machine_check_generic, 913 959 .platform = "ppc7450", 914 960 }, ··· 925 973 .pmc_type = PPC_PMC_G4, 926 974 .cpu_setup = __setup_cpu_745x, 927 975 .oprofile_cpu_type = "ppc/7450", 928 - .oprofile_type = PPC_OPROFILE_G4, 929 976 .machine_check = machine_check_generic, 930 977 .platform = "ppc7450", 931 978 }, ··· 942 991 .pmc_type = PPC_PMC_G4, 943 992 .cpu_setup = __setup_cpu_745x, 944 993 .oprofile_cpu_type = "ppc/7450", 945 - .oprofile_type = PPC_OPROFILE_G4, 946 994 .machine_check = machine_check_generic, 947 995 .platform = "ppc7450", 948 996 }, ··· 959 1009 .pmc_type = PPC_PMC_G4, 960 1010 .cpu_setup = __setup_cpu_745x, 961 1011 .oprofile_cpu_type = "ppc/7450", 962 - .oprofile_type = PPC_OPROFILE_G4, 963 1012 .machine_check = machine_check_generic, 964 1013 .platform = "ppc7450", 965 1014 }, ··· 976 1027 .pmc_type = PPC_PMC_G4, 977 1028 .cpu_setup = __setup_cpu_745x, 978 1029 .oprofile_cpu_type = "ppc/7450", 979 - .oprofile_type = PPC_OPROFILE_G4, 980 1030 .machine_check = machine_check_generic, 981 1031 .platform = "ppc7450", 982 1032 }, ··· 993 1045 .pmc_type = PPC_PMC_G4, 994 1046 .cpu_setup = __setup_cpu_745x, 995 1047 .oprofile_cpu_type = "ppc/7450", 996 - .oprofile_type = PPC_OPROFILE_G4, 997 1048 .machine_check = machine_check_generic, 998 1049 .platform = "ppc7450", 999 1050 }, ··· 1009 1062 .pmc_type = PPC_PMC_G4, 1010 1063 .cpu_setup = __setup_cpu_745x, 1011 1064 .oprofile_cpu_type = "ppc/7450", 1012 - .oprofile_type = PPC_OPROFILE_G4, 1013 1065 .machine_check = machine_check_generic, 1014 1066 .platform = "ppc7450", 1015 1067 }, ··· 1026 1080 .pmc_type = PPC_PMC_G4, 1027 1081 .cpu_setup = __setup_cpu_745x, 1028 1082 .oprofile_cpu_type = "ppc/7450", 1029 - .oprofile_type = PPC_OPROFILE_G4, 1030 1083 .machine_check = machine_check_generic, 1031 1084 .platform = "ppc7450", 1032 1085 }, ··· 1043 1098 .pmc_type = PPC_PMC_G4, 1044 1099 .cpu_setup = __setup_cpu_745x, 1045 1100 .oprofile_cpu_type = "ppc/7450", 1046 - .oprofile_type = PPC_OPROFILE_G4, 1047 1101 .machine_check = machine_check_generic, 1048 1102 .platform = "ppc7450", 1049 1103 }, ··· 1155 1211 .machine_check = machine_check_83xx, 1156 1212 .num_pmcs = 4, 1157 1213 .oprofile_cpu_type = "ppc/e300", 1158 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1159 1214 .platform = "ppc603", 1160 1215 }, 1161 1216 { /* e300c4 (e300c1, plus one IU) */ ··· 1171 1228 .machine_check = machine_check_83xx, 1172 1229 .num_pmcs = 4, 1173 1230 .oprofile_cpu_type = "ppc/e300", 1174 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1175 1231 .platform = "ppc603", 1176 1232 }, 1177 1233 #endif ··· 1867 1925 .dcache_bsize = 32, 1868 1926 .num_pmcs = 4, 1869 1927 .oprofile_cpu_type = "ppc/e500", 1870 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1871 1928 .cpu_setup = __setup_cpu_e500v1, 1872 1929 .machine_check = machine_check_e500, 1873 1930 .platform = "ppc8540", ··· 1886 1945 .dcache_bsize = 32, 1887 1946 .num_pmcs = 4, 1888 1947 .oprofile_cpu_type = "ppc/e500", 1889 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1890 1948 .cpu_setup = __setup_cpu_e500v2, 1891 1949 .machine_check = machine_check_e500, 1892 1950 .platform = "ppc8548", ··· 1905 1965 .dcache_bsize = 64, 1906 1966 .num_pmcs = 4, 1907 1967 .oprofile_cpu_type = "ppc/e500mc", 1908 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1909 1968 .cpu_setup = __setup_cpu_e500mc, 1910 1969 .machine_check = machine_check_e500mc, 1911 1970 .platform = "ppce500mc", ··· 1926 1987 .dcache_bsize = 64, 1927 1988 .num_pmcs = 4, 1928 1989 .oprofile_cpu_type = "ppc/e500mc", 1929 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1930 1990 .cpu_setup = __setup_cpu_e5500, 1931 1991 #ifndef CONFIG_PPC32 1932 1992 .cpu_restore = __restore_cpu_e5500, ··· 1948 2010 .dcache_bsize = 64, 1949 2011 .num_pmcs = 6, 1950 2012 .oprofile_cpu_type = "ppc/e6500", 1951 - .oprofile_type = PPC_OPROFILE_FSL_EMB, 1952 2013 .cpu_setup = __setup_cpu_e6500, 1953 2014 #ifndef CONFIG_PPC32 1954 2015 .cpu_restore = __restore_cpu_e6500, ··· 2013 2076 if (old.num_pmcs && !s->num_pmcs) { 2014 2077 t->num_pmcs = old.num_pmcs; 2015 2078 t->pmc_type = old.pmc_type; 2016 - t->oprofile_type = old.oprofile_type; 2017 - t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv; 2018 - t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr; 2019 - t->oprofile_mmcra_clear = old.oprofile_mmcra_clear; 2020 2079 2021 2080 /* 2022 2081 * If we have passed through this logic once before and
-2
arch/powerpc/kernel/dt_cpu_ftrs.c
··· 19 19 #include <asm/dt_cpu_ftrs.h> 20 20 #include <asm/mce.h> 21 21 #include <asm/mmu.h> 22 - #include <asm/oprofile_impl.h> 23 22 #include <asm/prom.h> 24 23 #include <asm/setup.h> 25 24 ··· 102 103 .num_pmcs = 0, 103 104 .pmc_type = PPC_PMC_DEFAULT, 104 105 .oprofile_cpu_type = NULL, 105 - .oprofile_type = PPC_OPROFILE_INVALID, 106 106 .cpu_setup = NULL, 107 107 .cpu_restore = __restore_cpu_cpufeatures, 108 108 .machine_check_early = NULL,
-5
arch/powerpc/platforms/cell/Kconfig
··· 100 100 the minimal possible frequency. 101 101 102 102 endmenu 103 - 104 - config OPROFILE_CELL 105 - def_bool y 106 - depends on PPC_CELL_NATIVE && (OPROFILE = m || OPROFILE = y) && SPU_BASE 107 -
-1
arch/powerpc/platforms/cell/Makefile
··· 19 19 spu-manage-$(CONFIG_PPC_CELL_COMMON) += spu_manage.o 20 20 21 21 obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ 22 - spu_notify.o \ 23 22 spu_syscalls.o \ 24 23 $(spu-priv1-y) \ 25 24 $(spu-manage-y) \
-55
arch/powerpc/platforms/cell/spu_notify.c
··· 1 - // SPDX-License-Identifier: GPL-2.0-or-later 2 - /* 3 - * Move OProfile dependencies from spufs module to the kernel so it 4 - * can run on non-cell PPC. 5 - * 6 - * Copyright (C) IBM 2005 7 - */ 8 - 9 - #undef DEBUG 10 - 11 - #include <linux/export.h> 12 - #include <linux/notifier.h> 13 - #include <asm/spu.h> 14 - #include "spufs/spufs.h" 15 - 16 - static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier); 17 - 18 - void spu_switch_notify(struct spu *spu, struct spu_context *ctx) 19 - { 20 - blocking_notifier_call_chain(&spu_switch_notifier, 21 - ctx ? ctx->object_id : 0, spu); 22 - } 23 - EXPORT_SYMBOL_GPL(spu_switch_notify); 24 - 25 - int spu_switch_event_register(struct notifier_block *n) 26 - { 27 - int ret; 28 - ret = blocking_notifier_chain_register(&spu_switch_notifier, n); 29 - if (!ret) 30 - notify_spus_active(); 31 - return ret; 32 - } 33 - EXPORT_SYMBOL_GPL(spu_switch_event_register); 34 - 35 - int spu_switch_event_unregister(struct notifier_block *n) 36 - { 37 - return blocking_notifier_chain_unregister(&spu_switch_notifier, n); 38 - } 39 - EXPORT_SYMBOL_GPL(spu_switch_event_unregister); 40 - 41 - void spu_set_profile_private_kref(struct spu_context *ctx, 42 - struct kref *prof_info_kref, 43 - void (* prof_info_release) (struct kref *kref)) 44 - { 45 - ctx->prof_priv_kref = prof_info_kref; 46 - ctx->prof_priv_release = prof_info_release; 47 - } 48 - EXPORT_SYMBOL_GPL(spu_set_profile_private_kref); 49 - 50 - void *spu_get_profile_private_kref(struct spu_context *ctx) 51 - { 52 - return ctx->prof_priv_kref; 53 - } 54 - EXPORT_SYMBOL_GPL(spu_get_profile_private_kref); 55 -
+1 -5
arch/powerpc/platforms/cell/spufs/run.c
··· 353 353 long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) 354 354 { 355 355 int ret; 356 - struct spu *spu; 357 356 u32 status; 358 357 359 358 if (mutex_lock_interruptible(&ctx->run_mutex)) ··· 385 386 mutex_lock(&ctx->state_mutex); 386 387 break; 387 388 } 388 - spu = ctx->spu; 389 389 if (unlikely(test_and_clear_bit(SPU_SCHED_NOTIFY_ACTIVE, 390 390 &ctx->sched_flags))) { 391 - if (!(status & SPU_STATUS_STOPPED_BY_STOP)) { 392 - spu_switch_notify(spu, ctx); 391 + if (!(status & SPU_STATUS_STOPPED_BY_STOP)) 393 392 continue; 394 - } 395 393 } 396 394 397 395 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
-5
arch/powerpc/platforms/cell/spufs/sched.c
··· 181 181 182 182 /* 183 183 * Wake up the active spu_contexts. 184 - * 185 - * When the awakened processes see their "notify_active" flag is set, 186 - * they will call spu_switch_notify(). 187 184 */ 188 185 for_each_online_node(node) { 189 186 struct spu *spu; ··· 236 239 spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0); 237 240 spu_restore(&ctx->csa, spu); 238 241 spu->timestamp = jiffies; 239 - spu_switch_notify(spu, ctx); 240 242 ctx->state = SPU_STATE_RUNNABLE; 241 243 242 244 spuctx_switch_state(ctx, SPU_UTIL_USER); ··· 436 440 */ 437 441 atomic_dec_if_positive(&ctx->gang->aff_sched_count); 438 442 439 - spu_switch_notify(spu, NULL); 440 443 spu_unmap_mappings(ctx); 441 444 spu_save(&ctx->csa, spu); 442 445 spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0);
-1
arch/powerpc/platforms/cell/spufs/spufs.h
··· 281 281 int spu_activate(struct spu_context *ctx, unsigned long flags); 282 282 void spu_deactivate(struct spu_context *ctx); 283 283 void spu_yield(struct spu_context *ctx); 284 - void spu_switch_notify(struct spu *spu, struct spu_context *ctx); 285 284 void spu_switch_log_notify(struct spu *spu, struct spu_context *ctx, 286 285 u32 type, u32 val); 287 286 void spu_set_timeslice(struct spu_context *ctx);