Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers
Konrad Rzeszutek Wilk 59a5680291 xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.
This driver solves three problems:
 1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
     hypervisor - aka P-states (cpufreq data).
 2). Upload the the Cx state information (cpuidle data).
 3). Inhibit CPU frequency scaling drivers from loading.

The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
is the only one that knows the CPU usage of different guests and can
make the proper decision of when to put CPUs and packages in proper states.
Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
needs help from the initial domain to provide this information. The reason
for 3) is that we do not want the initial domain to change P-states while the
hypervisor is doing it as well - it causes rather some funny cases of P-states
transitions.

For this to work, the driver parses the Power Management data and uploads said
information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
to inhibit the other CPU frequency scaling drivers from being loaded.

Everything revolves around the 'struct acpi_processor' structure which
gets updated during the bootup cycle in different stages. At the startup, when
the ACPI parser starts, the C-state information is processed (processor_idle)
and saved in said structure as 'power' element. Later on, the CPU frequency
scaling driver (powernow-k8 or acpi_cpufreq), would call the the
acpi_processor_* (processor_perflib functions) to parse P-states information
and populate in the said structure the 'performance' element.

Since we do not want the CPU frequency scaling drivers from loading
we have to call the acpi_processor_* functions to parse the P-states and
call "acpi_processor_notify_smm" to stop them from loading.

There is also one oddity in this driver which is that under Xen, the
physical online CPU count can be different from the virtual online CPU count.
Meaning that the macros 'for_[online|possible]_cpu' would process only
up to virtual online CPU count. We on the other hand want to process
the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
count is different from the APIC ID count - which can happen if the user
choose to use dom0_max_vcpu argument. In such a case a backup of the PM
structure is used and uploaded to the hypervisor.

[v1-v2: Initial RFC implementations that were posted]
[v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
[v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
[v5: Cleaned up the driver, fix bug under Athlon XP]
[v6: Changed the driver to a CPU frequency governor]
[v7: Jan Beulich <jbeulich@suse.com> suggestion to make it a cpufreq scaling driver
     made me rework it as driver that inhibits cpufreq scaling driver]
[v8: Per Jan's review comments, fixed up the driver]
[v9: Allow to continue even if acpi_processor_preregister_perf.. fails]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-14 12:35:42 -04:00
..
accessibility
acpi Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
amba Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
ata Merge branch 'upstream-linus' of git://github.com/jgarzik/libata-dev 2012-01-10 10:19:17 -08:00
atm
auxdisplay
base cpu: Register a generic CPU device on architectures that currently do not 2012-01-11 15:50:11 -08:00
bcma
block Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2012-01-10 17:37:49 -08:00
bluetooth Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
cdrom fs: move code out of buffer.c 2012-01-03 22:54:07 -05:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-01-10 22:01:27 -08:00
clk
clocksource Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm 2012-01-06 18:15:25 -08:00
connector
cpufreq Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
cpuidle
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-01-10 22:01:27 -08:00
dca
devfreq
dio
dma clock management changes for i.MX 2012-01-09 14:44:15 -08:00
edac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
eisa
firewire
firmware Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
gpio Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl 2012-01-10 10:19:57 -08:00
gpu Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-01-10 10:48:28 -08:00
hv Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging 2012-01-08 13:39:24 -08:00
hwspinlock
i2c Merge branch 'unicore32' of git://github.com/gxt/linux 2012-01-10 17:37:20 -08:00
ide
idle
ieee802154
infiniband infiniband changes for 3.3 merge window 2012-01-08 14:05:48 -08:00
input Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2012-01-10 17:37:49 -08:00
iommu Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -08:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-01-08 13:21:22 -08:00
leds leds: convert wm8350 driver to devm_kzalloc() 2012-01-10 16:30:49 -08:00
lguest Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-01-06 17:22:09 -08:00
macintosh Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
mca
md md update for 3.3 2012-01-08 13:28:33 -08:00
media Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu 2012-01-10 11:08:21 -08:00
memstick
message SCSI updates for post 3.2 merge window 2012-01-10 10:36:08 -08:00
mfd Driver specific changes 2012-01-09 14:39:22 -08:00
misc Merge branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 2012-01-09 12:08:59 -08:00
mmc clock management changes for i.MX 2012-01-09 14:44:15 -08:00
mtd Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6 2012-01-10 14:57:19 -08:00
net Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00
nfc Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core 2012-01-07 12:03:30 -08:00
nubus
of of: add include asm/setup.h in drivers/of/fdt.c 2012-01-10 10:29:41 +08:00
oprofile Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-06 08:02:58 -08:00
parisc Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
parport Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty 2012-01-09 12:09:24 -08:00
pci pci: Introduce __pci_reset_function_locked to be used when holding device_lock. 2012-01-12 12:00:07 -05:00
pcmcia
pinctrl pinctrl: remove unnecessary max pin number 2012-01-03 09:10:09 +01:00
platform Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
pnp PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB 2012-01-06 12:11:20 -08:00
power switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pps
ps3
ptp
rapidio
regulator regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config 2012-01-06 11:01:09 -08:00
rtc Merge branch 'unicore32' of git://github.com/gxt/linux 2012-01-10 17:37:20 -08:00
s390 Merge branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc 2012-01-09 12:08:59 -08:00
sbus
scsi Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
sfi
sh Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
sn
spi Cleanups for the Samsung platforms 2012-01-09 14:30:28 -08:00
ssb
staging Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux 2012-01-10 11:04:36 -08:00
target
tc
telephony
thermal
tty hvc_xen: introduce HVC_XEN_FRONTEND 2012-03-13 19:24:31 -04:00
uio Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-01-10 10:48:28 -08:00
uwb Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
vhost
video Merge branch 'akpm' (aka "Andrew's patch-bomb") 2012-01-10 16:42:48 -08:00
virt
virtio
vlynq
w1
watchdog Merge git://www.linux-watchdog.org/linux-watchdog 2012-01-10 10:29:23 -08:00
xen xen/acpi-processor: C and P-state driver that uploads said data to hypervisor. 2012-03-14 12:35:42 -04:00
zorro misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
Kconfig
Makefile