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

[PATCH] powerpc: merge oprofile headers

Merge include/asm-ppc64/oprofile_ipml.h and arch/ppc/oprofile/op_impl.h
into include/asm-powerpc/oprofile_ipml.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Stephen Rothwell and committed by
Paul Mackerras
654810ec a3e48c10

+17 -52
+1 -2
arch/ppc/oprofile/common.c
··· 22 22 #include <asm/system.h> 23 23 #include <asm/perfmon.h> 24 24 #include <asm/cputable.h> 25 - 26 - #include "op_impl.h" 25 + #include <asm/oprofile_impl.h> 27 26 28 27 static struct op_powerpc_model *model; 29 28
-45
arch/ppc/oprofile/op_impl.h
··· 1 - /* 2 - * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM 3 - * 4 - * Based on alpha version. 5 - * 6 - * This program is free software; you can redistribute it and/or 7 - * modify it under the terms of the GNU General Public License 8 - * as published by the Free Software Foundation; either version 9 - * 2 of the License, or (at your option) any later version. 10 - */ 11 - 12 - #ifndef OP_IMPL_H 13 - #define OP_IMPL_H 1 14 - 15 - #define OP_MAX_COUNTER 8 16 - 17 - /* Per-counter configuration as set via oprofilefs. */ 18 - struct op_counter_config { 19 - unsigned long enabled; 20 - unsigned long event; 21 - unsigned long count; 22 - unsigned long kernel; 23 - unsigned long user; 24 - unsigned long unit_mask; 25 - }; 26 - 27 - /* System-wide configuration as set via oprofilefs. */ 28 - struct op_system_config { 29 - unsigned long enable_kernel; 30 - unsigned long enable_user; 31 - }; 32 - 33 - /* Per-arch configuration */ 34 - struct op_powerpc_model { 35 - void (*reg_setup) (struct op_counter_config *, 36 - struct op_system_config *, 37 - int num_counters); 38 - void (*start) (struct op_counter_config *); 39 - void (*stop) (void); 40 - void (*handle_interrupt) (struct pt_regs *, 41 - struct op_counter_config *); 42 - int num_counters; 43 - }; 44 - 45 - #endif /* OP_IMPL_H */
+1 -2
arch/ppc/oprofile/op_model_fsl_booke.c
··· 25 25 #include <asm/reg_booke.h> 26 26 #include <asm/page.h> 27 27 #include <asm/perfmon.h> 28 - 29 - #include "op_impl.h" 28 + #include <asm/oprofile_impl.h> 30 29 31 30 static unsigned long reset_value[OP_MAX_COUNTER]; 32 31
+15 -3
include/asm-ppc64/oprofile_impl.h include/asm-powerpc/oprofile_impl.h
··· 9 9 * 2 of the License, or (at your option) any later version. 10 10 */ 11 11 12 - #ifndef OP_IMPL_H 13 - #define OP_IMPL_H 1 12 + #ifndef _ASM_POWERPC_OPROFILE_IMPL_H 13 + #define _ASM_POWERPC_OPROFILE_IMPL_H 14 14 15 15 #define OP_MAX_COUNTER 8 16 16 17 17 /* Per-counter configuration as set via oprofilefs. */ 18 18 struct op_counter_config { 19 + #ifdef __powerpc64__ 19 20 unsigned long valid; 21 + #endif 20 22 unsigned long enabled; 21 23 unsigned long event; 22 24 unsigned long count; 23 25 unsigned long kernel; 26 + #ifdef __powerpc64__ 24 27 /* We dont support per counter user/kernel selection */ 28 + #endif 25 29 unsigned long user; 26 30 unsigned long unit_mask; 27 31 }; 28 32 29 33 /* System-wide configuration as set via oprofilefs. */ 30 34 struct op_system_config { 35 + #ifdef __powerpc64__ 31 36 unsigned long mmcr0; 32 37 unsigned long mmcr1; 33 38 unsigned long mmcra; 39 + #endif 34 40 unsigned long enable_kernel; 35 41 unsigned long enable_user; 42 + #ifdef __powerpc64__ 36 43 unsigned long backtrace_spinlocks; 44 + #endif 37 45 }; 38 46 39 47 /* Per-arch configuration */ ··· 49 41 void (*reg_setup) (struct op_counter_config *, 50 42 struct op_system_config *, 51 43 int num_counters); 44 + #ifdef __powerpc64__ 52 45 void (*cpu_setup) (void *); 46 + #endif 53 47 void (*start) (struct op_counter_config *); 54 48 void (*stop) (void); 55 49 void (*handle_interrupt) (struct pt_regs *, ··· 59 49 int num_counters; 60 50 }; 61 51 52 + #ifdef __powerpc64__ 62 53 extern struct op_powerpc_model op_model_rs64; 63 54 extern struct op_powerpc_model op_model_power4; 64 55 ··· 118 107 break; 119 108 } 120 109 } 110 + #endif /* __powerpc64__ */ 121 111 122 - #endif 112 + #endif /* _ASM_POWERPC_OPROFILE_IMPL_H */