#ifndef CPUS_H #define CPUS_H #include #include "built_in.h" #include "die.h" static inline unsigned int get_number_cpus(void) { int ret = sysconf(_SC_NPROCESSORS_CONF); if (unlikely(ret <= 0)) panic("get_number_cpus error!\n"); return ret; } static inline unsigned int get_number_cpus_online(void) { int ret = sysconf(_SC_NPROCESSORS_ONLN); if (unlikely(ret <= 0)) panic("get_number_cpus_online error!\n"); return ret; } #endif /* CPUS_H */ t.distanz.ch/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-28 18:29:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-28 18:29:13 -0700
commitb546e0c289f7e9faf86999d34e895ee2b31c719b (patch)
treed33cbd3ea56a4b2c792778da632ee88921c1316e
parent1308fd75e5ae211ee2ad688a58e4d7d0d8df4975 (diff)
parent8b2ada27dc1045e8191673bf769a1136ce8a0127 (diff)
Merge tag 'pm-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These fix two intel_pstate issues related to the way it works when the scaling_governor sysfs attribute is set to "performance" and fix up messages in the system suspend core code. Specifics: - Fix a missing KERN_CONT in a system suspend message by converting the affected code to using pr_info() and pr_cont() instead of the "raw" printk() (Jon Hunter). - Make intel_pstate set the CPU P-state from its .set_policy() callback when the scaling_governor sysfs attribute is set to "performance" so that it interacts with NOHZ_FULL more predictably which was the case before 4.7 (Rafael Wysocki). - Make intel_pstate always request the maximum allowed P-state when the scaling_governor sysfs attribute is set to "performance" to prevent it from effectively ingoring that setting is some situations (Rafael Wysocki)" * tag 'pm-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Always set max P-state in performance mode PM / suspend: Fix missing KERN_CONT for suspend message cpufreq: intel_pstate: Set P-state upfront in performance mode