diff options
Diffstat (limited to 'arch/powerpc/oprofile/common.c')
-rw-r--r-- | arch/powerpc/oprofile/common.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c index 17807acb05d9..21f16edf6c8d 100644 --- a/arch/powerpc/oprofile/common.c +++ b/arch/powerpc/oprofile/common.c | |||
@@ -132,6 +132,28 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | |||
132 | oprofilefs_create_ulong(sb, root, "mmcr0", &sys.mmcr0); | 132 | oprofilefs_create_ulong(sb, root, "mmcr0", &sys.mmcr0); |
133 | oprofilefs_create_ulong(sb, root, "mmcr1", &sys.mmcr1); | 133 | oprofilefs_create_ulong(sb, root, "mmcr1", &sys.mmcr1); |
134 | oprofilefs_create_ulong(sb, root, "mmcra", &sys.mmcra); | 134 | oprofilefs_create_ulong(sb, root, "mmcra", &sys.mmcra); |
135 | #ifdef CONFIG_OPROFILE_CELL | ||
136 | /* create a file the user tool can check to see what level of profiling | ||
137 | * support exits with this kernel. Initialize bit mask to indicate | ||
138 | * what support the kernel has: | ||
139 | * bit 0 - Supports SPU event profiling in addition to PPU | ||
140 | * event and cycles; and SPU cycle profiling | ||
141 | * bits 1-31 - Currently unused. | ||
142 | * | ||
143 | * If the file does not exist, then the kernel only supports SPU | ||
144 | * cycle profiling, PPU event and cycle profiling. | ||
145 | */ | ||
146 | oprofilefs_create_ulong(sb, root, "cell_support", &sys.cell_support); | ||
147 | sys.cell_support = 0x1; /* Note, the user OProfile tool must check | ||
148 | * that this bit is set before attempting to | ||
149 | * user SPU event profiling. Older kernels | ||
150 | * will not have this file, hence the user | ||
151 | * tool is not allowed to do SPU event | ||
152 | * profiling on older kernels. Older kernels | ||
153 | * will accept SPU events but collected data | ||
154 | * is garbage. | ||
155 | */ | ||
156 | #endif | ||
135 | #endif | 157 | #endif |
136 | 158 | ||
137 | for (i = 0; i < model->num_counters; ++i) { | 159 | for (i = 0; i < model->num_counters; ++i) { |