diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-19 09:21:15 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-21 05:21:08 -0400 |
commit | 654810ec899ea5f2fc2138fca1793b603d481ff4 (patch) | |
tree | 7b5e4d411d275a22606b81e0725ebc06acb7bff6 | |
parent | a3e48c10cca3287a845435dd8ca58ecbde72d847 (diff) |
[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>
-rw-r--r-- | arch/ppc/oprofile/common.c | 3 | ||||
-rw-r--r-- | arch/ppc/oprofile/op_impl.h | 45 | ||||
-rw-r--r-- | arch/ppc/oprofile/op_model_fsl_booke.c | 3 | ||||
-rw-r--r-- | include/asm-powerpc/oprofile_impl.h (renamed from include/asm-ppc64/oprofile_impl.h) | 18 |
4 files changed, 17 insertions, 52 deletions
diff --git a/arch/ppc/oprofile/common.c b/arch/ppc/oprofile/common.c index a67d438a7144..f63bee23f20c 100644 --- a/arch/ppc/oprofile/common.c +++ b/arch/ppc/oprofile/common.c | |||
@@ -22,8 +22,7 @@ | |||
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <asm/perfmon.h> | 23 | #include <asm/perfmon.h> |
24 | #include <asm/cputable.h> | 24 | #include <asm/cputable.h> |
25 | 25 | #include <asm/oprofile_impl.h> | |
26 | #include "op_impl.h" | ||
27 | 26 | ||
28 | static struct op_powerpc_model *model; | 27 | static struct op_powerpc_model *model; |
29 | 28 | ||
diff --git a/arch/ppc/oprofile/op_impl.h b/arch/ppc/oprofile/op_impl.h deleted file mode 100644 index 297f3097d2d9..000000000000 --- a/arch/ppc/oprofile/op_impl.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
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 */ | ||
diff --git a/arch/ppc/oprofile/op_model_fsl_booke.c b/arch/ppc/oprofile/op_model_fsl_booke.c index 8fc60f6055ab..1917f8df8a8b 100644 --- a/arch/ppc/oprofile/op_model_fsl_booke.c +++ b/arch/ppc/oprofile/op_model_fsl_booke.c | |||
@@ -25,8 +25,7 @@ | |||
25 | #include <asm/reg_booke.h> | 25 | #include <asm/reg_booke.h> |
26 | #include <asm/page.h> | 26 | #include <asm/page.h> |
27 | #include <asm/perfmon.h> | 27 | #include <asm/perfmon.h> |
28 | 28 | #include <asm/oprofile_impl.h> | |
29 | #include "op_impl.h" | ||
30 | 29 | ||
31 | static unsigned long reset_value[OP_MAX_COUNTER]; | 30 | static unsigned long reset_value[OP_MAX_COUNTER]; |
32 | 31 | ||
diff --git a/include/asm-ppc64/oprofile_impl.h b/include/asm-powerpc/oprofile_impl.h index 50420e715f05..8013cd273ced 100644 --- a/include/asm-ppc64/oprofile_impl.h +++ b/include/asm-powerpc/oprofile_impl.h | |||
@@ -9,31 +9,39 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef OP_IMPL_H | 12 | #ifndef _ASM_POWERPC_OPROFILE_IMPL_H |
13 | #define OP_IMPL_H 1 | 13 | #define _ASM_POWERPC_OPROFILE_IMPL_H |
14 | 14 | ||
15 | #define OP_MAX_COUNTER 8 | 15 | #define OP_MAX_COUNTER 8 |
16 | 16 | ||
17 | /* Per-counter configuration as set via oprofilefs. */ | 17 | /* Per-counter configuration as set via oprofilefs. */ |
18 | struct op_counter_config { | 18 | struct op_counter_config { |
19 | #ifdef __powerpc64__ | ||
19 | unsigned long valid; | 20 | unsigned long valid; |
21 | #endif | ||
20 | unsigned long enabled; | 22 | unsigned long enabled; |
21 | unsigned long event; | 23 | unsigned long event; |
22 | unsigned long count; | 24 | unsigned long count; |
23 | unsigned long kernel; | 25 | unsigned long kernel; |
26 | #ifdef __powerpc64__ | ||
24 | /* We dont support per counter user/kernel selection */ | 27 | /* We dont support per counter user/kernel selection */ |
28 | #endif | ||
25 | unsigned long user; | 29 | unsigned long user; |
26 | unsigned long unit_mask; | 30 | unsigned long unit_mask; |
27 | }; | 31 | }; |
28 | 32 | ||
29 | /* System-wide configuration as set via oprofilefs. */ | 33 | /* System-wide configuration as set via oprofilefs. */ |
30 | struct op_system_config { | 34 | struct op_system_config { |
35 | #ifdef __powerpc64__ | ||
31 | unsigned long mmcr0; | 36 | unsigned long mmcr0; |
32 | unsigned long mmcr1; | 37 | unsigned long mmcr1; |
33 | unsigned long mmcra; | 38 | unsigned long mmcra; |
39 | #endif | ||
34 | unsigned long enable_kernel; | 40 | unsigned long enable_kernel; |
35 | unsigned long enable_user; | 41 | unsigned long enable_user; |
42 | #ifdef __powerpc64__ | ||
36 | unsigned long backtrace_spinlocks; | 43 | unsigned long backtrace_spinlocks; |
44 | #endif | ||
37 | }; | 45 | }; |
38 | 46 | ||
39 | /* Per-arch configuration */ | 47 | /* Per-arch configuration */ |
@@ -41,7 +49,9 @@ struct op_powerpc_model { | |||
41 | void (*reg_setup) (struct op_counter_config *, | 49 | void (*reg_setup) (struct op_counter_config *, |
42 | struct op_system_config *, | 50 | struct op_system_config *, |
43 | int num_counters); | 51 | int num_counters); |
52 | #ifdef __powerpc64__ | ||
44 | void (*cpu_setup) (void *); | 53 | void (*cpu_setup) (void *); |
54 | #endif | ||
45 | void (*start) (struct op_counter_config *); | 55 | void (*start) (struct op_counter_config *); |
46 | void (*stop) (void); | 56 | void (*stop) (void); |
47 | void (*handle_interrupt) (struct pt_regs *, | 57 | void (*handle_interrupt) (struct pt_regs *, |
@@ -49,6 +59,7 @@ struct op_powerpc_model { | |||
49 | int num_counters; | 59 | int num_counters; |
50 | }; | 60 | }; |
51 | 61 | ||
62 | #ifdef __powerpc64__ | ||
52 | extern struct op_powerpc_model op_model_rs64; | 63 | extern struct op_powerpc_model op_model_rs64; |
53 | extern struct op_powerpc_model op_model_power4; | 64 | extern struct op_powerpc_model op_model_power4; |
54 | 65 | ||
@@ -107,5 +118,6 @@ static inline void ctr_write(unsigned int i, unsigned int val) | |||
107 | break; | 118 | break; |
108 | } | 119 | } |
109 | } | 120 | } |
121 | #endif /* __powerpc64__ */ | ||
110 | 122 | ||
111 | #endif | 123 | #endif /* _ASM_POWERPC_OPROFILE_IMPL_H */ |