~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to arch/x86/kernel/cpu/mcheck/therm_throt.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
 
324
324
#endif /* CONFIG_SYSFS */
325
325
 
326
 
/*
327
 
 * Set up the most two significant bit to notify mce log that this thermal
328
 
 * event type.
329
 
 * This is a temp solution. May be changed in the future with mce log
330
 
 * infrasture.
331
 
 */
332
 
#define CORE_THROTTLED          (0)
333
 
#define CORE_POWER_LIMIT        ((__u64)1 << 62)
334
 
#define PACKAGE_THROTTLED       ((__u64)2 << 62)
335
 
#define PACKAGE_POWER_LIMIT     ((__u64)3 << 62)
336
 
 
337
326
static void notify_thresholds(__u64 msr_val)
338
327
{
339
328
        /* check whether the interrupt handler is defined;
363
352
        if (therm_throt_process(msr_val & THERM_STATUS_PROCHOT,
364
353
                                THERMAL_THROTTLING_EVENT,
365
354
                                CORE_LEVEL) != 0)
366
 
                mce_log_therm_throt_event(CORE_THROTTLED | msr_val);
 
355
                mce_log_therm_throt_event(msr_val);
367
356
 
368
357
        if (this_cpu_has(X86_FEATURE_PLN))
369
 
                if (therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT,
 
358
                therm_throt_process(msr_val & THERM_STATUS_POWER_LIMIT,
370
359
                                        POWER_LIMIT_EVENT,
371
 
                                        CORE_LEVEL) != 0)
372
 
                        mce_log_therm_throt_event(CORE_POWER_LIMIT | msr_val);
 
360
                                        CORE_LEVEL);
373
361
 
374
362
        if (this_cpu_has(X86_FEATURE_PTS)) {
375
363
                rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
376
 
                if (therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT,
 
364
                therm_throt_process(msr_val & PACKAGE_THERM_STATUS_PROCHOT,
377
365
                                        THERMAL_THROTTLING_EVENT,
378
 
                                        PACKAGE_LEVEL) != 0)
379
 
                        mce_log_therm_throt_event(PACKAGE_THROTTLED | msr_val);
 
366
                                        PACKAGE_LEVEL);
380
367
                if (this_cpu_has(X86_FEATURE_PLN))
381
 
                        if (therm_throt_process(msr_val &
 
368
                        therm_throt_process(msr_val &
382
369
                                        PACKAGE_THERM_STATUS_POWER_LIMIT,
383
370
                                        POWER_LIMIT_EVENT,
384
 
                                        PACKAGE_LEVEL) != 0)
385
 
                                mce_log_therm_throt_event(PACKAGE_POWER_LIMIT
386
 
                                                          | msr_val);
 
371
                                        PACKAGE_LEVEL);
387
372
        }
388
373
}
389
374