aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 7975e79d5fa4..3852d0a4c1b5 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -295,68 +295,6 @@ acpi_cpufreq_guess_freq (
295} 295}
296 296
297 297
298/*
299 * acpi_processor_cpu_init_pdc_est - let BIOS know about the SMP capabilities
300 * of this driver
301 * @perf: processor-specific acpi_io_data struct
302 * @cpu: CPU being initialized
303 *
304 * To avoid issues with legacy OSes, some BIOSes require to be informed of
305 * the SMP capabilities of OS P-state driver. Here we set the bits in _PDC
306 * accordingly, for Enhanced Speedstep. Actual call to _PDC is done in
307 * driver/acpi/processor.c
308 */
309static void
310acpi_processor_cpu_init_pdc_est(
311 struct acpi_processor_performance *perf,
312 unsigned int cpu,
313 struct acpi_object_list *obj_list
314 )
315{
316 union acpi_object *obj;
317 u32 *buf;
318 struct cpuinfo_x86 *c = cpu_data + cpu;
319 dprintk("acpi_processor_cpu_init_pdc_est\n");
320
321 if (!cpu_has(c, X86_FEATURE_EST))
322 return;
323
324 /* Initialize pdc. It will be used later. */
325 if (!obj_list)
326 return;
327
328 if (!(obj_list->count && obj_list->pointer))
329 return;
330
331 obj = obj_list->pointer;
332 if ((obj->buffer.length == 12) && obj->buffer.pointer) {
333 buf = (u32 *)obj->buffer.pointer;
334 buf[0] = ACPI_PDC_REVISION_ID;
335 buf[1] = 1;
336 buf[2] = ACPI_PDC_EST_CAPABILITY_SMP;
337 perf->pdc = obj_list;
338 }
339 return;
340}
341
342
343/* CPU specific PDC initialization */
344static void
345acpi_processor_cpu_init_pdc(
346 struct acpi_processor_performance *perf,
347 unsigned int cpu,
348 struct acpi_object_list *obj_list
349 )
350{
351 struct cpuinfo_x86 *c = cpu_data + cpu;
352 dprintk("acpi_processor_cpu_init_pdc\n");
353 perf->pdc = NULL;
354 if (cpu_has(c, X86_FEATURE_EST))
355 acpi_processor_cpu_init_pdc_est(perf, cpu, obj_list);
356 return;
357}
358
359
360static int 298static int
361acpi_cpufreq_cpu_init ( 299acpi_cpufreq_cpu_init (
362 struct cpufreq_policy *policy) 300 struct cpufreq_policy *policy)
@@ -367,14 +305,7 @@ acpi_cpufreq_cpu_init (
367 unsigned int result = 0; 305 unsigned int result = 0;
368 struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; 306 struct cpuinfo_x86 *c = &cpu_data[policy->cpu];
369 307
370 union acpi_object arg0 = {ACPI_TYPE_BUFFER};
371 u32 arg0_buf[3];
372 struct acpi_object_list arg_list = {1, &arg0};
373
374 dprintk("acpi_cpufreq_cpu_init\n"); 308 dprintk("acpi_cpufreq_cpu_init\n");
375 /* setup arg_list for _PDC settings */
376 arg0.buffer.length = 12;
377 arg0.buffer.pointer = (u8 *) arg0_buf;
378 309
379 data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL); 310 data = kzalloc(sizeof(struct cpufreq_acpi_io), GFP_KERNEL);
380 if (!data) 311 if (!data)
@@ -382,9 +313,7 @@ acpi_cpufreq_cpu_init (
382 313
383 acpi_io_data[cpu] = data; 314 acpi_io_data[cpu] = data;
384 315
385 acpi_processor_cpu_init_pdc(&data->acpi_data, cpu, &arg_list);
386 result = acpi_processor_register_performance(&data->acpi_data, cpu); 316 result = acpi_processor_register_performance(&data->acpi_data, cpu);
387 data->acpi_data.pdc = NULL;
388 317
389 if (result) 318 if (result)
390 goto err_free; 319 goto err_free;