aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/acpi
Commit message (Collapse)AuthorAgeFilesLines
* VTD: Remove the check for reserved device scope typeYang Zhang2013-04-161-1/+0
| | | | | | | | | | | | | | Though we only have four valid types now, the new type may be added in future. It's better to remove the check and only deal with the type that we can recognize. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@Intel.com> Acked-by: Keir Fraser <keir@xen.org> Add log message for this case. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* ACPI: support v5 (reduced HW) sleep interfaceJan Beulich2013-02-222-0/+9
| | | | | | | | | | | | Note that this also fixes a broken input check in acpi_enter_sleep() (previously validating the sleep->pm1[ab]_cnt_val relationship based on acpi_sinfo.pm1b_cnt_val, which however gets set only subsequently). Also adjust a few minor issues with the pre-v5 handling in acpi_fadt_parse_sleep_info(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ACPI 5.0: Implement hardware-reduced optionBob Moore2013-02-221-0/+7
| | | | | | | | | | | | | If HW-reduced flag is set in the FADT, do not attempt to access or initialize any ACPI hardware, including SCI and global lock. No FACS will be present. Signed-off-by: Bob Moore <robert.moore@intel.com> Also adjust acpi_fadt_parse_sleep_info(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ACPI 5.0: Basic support for FADT version 5Bob Moore2013-02-221-6/+16
| | | | | | Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* fix acpi_dmar_zap/reinstate() (fixes S3 regression)Tomasz Wroblewski2013-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Fix S3 regression introduced by cs 23013:65d26504e843 (ACPI: large cleanup). The dmar virtual pointer returned from acpi_get_table cannot be safely stored away and used later, as the underlying acpi_os_map_memory / __acpi_map_table functions overwrite the mapping causing it to point to different tables than dmar (last fetched table is used). This subsequently causes acpi_dmar_reinstate() and acpi_dmar_zap() to write data to wrong table, causing its corruption and problems with consecutive s3 resumes. Added a new function to fetch ACPI table physical address, and establishing separate static mapping for dmar_table pointer instead of using acpi_get_table(). Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@citrix.com> Added call to acpi_tb_verify_table(). Fixed page count passed to map_pages_to_xen(). Cosmetic changes. Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Jan Beulich <jbeulich@suse.com>
* x86/ACPI: invalidate BGRT if necessaryJan Beulich2012-11-082-0/+558
| | | | | | | | | | | | | | | | | | | | | | Since the image pointed to may live in boot services memory (which we add to the global memory pool long before ACPI tables get looked at), we should prevent Dom0 from trying to retrieve the image data in that case. The alternatives would be to - not add boot services memory to the global pool at all, or - defer adding boot services memory until Dom0 indicates it is safe to do so, or - find and parse the BGRT table in xen/arch/x86/efi/boot.c, and avoid adding that specific region to the E820 table. None of these are really attractive, and as Xen commonly prints to the video console anyway (without trying to avoid any regions on the screen), the invalidation would need to be done conditionally anyway. (xen/include/acpi/actbl3.h is a verbatim copy from Linux 3.7-rc4) Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ACPI: move tables.c fully into .init.*Jan Beulich2012-09-201-3/+7
| | | | | | | | The only non-init item was the space reserved for the initial tables, but we can as well dynamically allocate that array. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86, cpufreq: Change powernow's CPB status immediatelyBoris Ostrovsky2012-06-181-2/+2
| | | | | | | | | | | | | | When command to modify turbo mode (CPB on AMD processors) comes in the actual change happens later, when P-state transition is requested. There is no time limit on when this transition will occur and therefore change in CPB state may take long time from the moment when command to toggle it is issued. This patch makes CPB mode change happen immediately when request is made. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: explicitly mark __initdata variables as used when building with clang.Tim Deegan2012-04-111-1/+1
| | | | | | | | | | | | This stops LLVM from replacing it with a different, auto-generated variable as part of an optimization. (The auto-generated variable ends up in the normal data section.) Remove stray __read_mostly annotations on declarations that this unmasked. Signed-off-by: Tim Deegan <tim@xen.org> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Tim Deegan <tim@xen.org>
* ACPI: update table interface headersJan Beulich2011-12-133-379/+1512
| | | | | | | ... to what is being used on Linux 3.1 (and 3.2-rc). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* cpufreq: allocate CPU masks dynamicallyJan Beulich2011-11-071-1/+1
| | | | | | | | | | struct cpufreq_policy, including a cpumask_t member, gets copied in cpufreq_limit_change(), cpufreq_add_cpu(), set_cpufreq_gov(), and set_cpufreq_para(). Make the member a cpumask_var_t, thus reducing the amount of data needing copying (particularly with large NR_CPUS). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* powernow: don't read never initialized structure memberJan Beulich2011-11-071-1/+0
| | | | | | | | | | c/s 20361:51b031b0737e removed the writing of struct processor_performance's shared_cpu_map member, but the powernow driver still has code to read it (though presumably that code path can't be taken on actual hardware supported by the powernow driver). Remove the use of the field along with the field itself. Signed-off-by: Jan Beulich <jbeulich@suse.com>
* introduce xzalloc() & CoJan Beulich2011-10-041-4/+1
| | | | | | | | | Rather than having to match a call to one of the xmalloc() flavors with a subsequent memset(), introduce a zeroing variant of each of those flavors. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* ACPI: add _PDC input override mechanismJan Beulich2011-08-222-1/+18
| | | | | | | | | | | | | | In order to have Dom0 call _PDC with input fully representing Xen's capabilities, and in order to avoid building knowledge of Xen implementation details into Dom0, this provides a mechanism by which the Dom0 kernel can, once it filled the _PDC input buffer according to its own knowledge, present the buffer to Xen to apply overrides for the parts of the C-, P-, and T-state management that it controls. This is particularly to address the dependency of Xen using MWAIT to enter certain C-states on the availability of the break-on-interrupt extension (which the Dom0 kernel should have no need to know about). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* pm: don't truncate processors' ACPI IDs to 8 bitsJan Beulich2011-08-221-1/+1
| | | | | | | This is just another adjustment to allow systems with very many CPUs (or unusual ACPI IDs) to be properly power-managed. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Use same data array for INTEL and AMD cpufreq handlingJuergen Gross2011-06-161-1/+3
| | | | | | | | The AMD and INTEL specific parts of cpufreq handling used different per-cpu data structures with nearly identical semantics. Fold the two structures into one by adding a generic architecture data item. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* xen: remove more declarations from C files.Tim Deegan2011-05-271-0/+2
| | | | | | | | | | This patch moves some more, mostly data, extern declarations into header files. I haven't been as strict as I was with functions; in particular there are a number of declarations of assembler labels that are only used in one place. I've also left a few compat-mode tricks, and all the magic in symbols.c Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* misc cpufreq cleanupJan Beulich2011-05-091-1/+1
| | | | | | | | | | - proper handling of governor command line options when using the default governor - warning message for unrecognized command line options - replacing a NR_CPUS sized array with per-CPU data - a couple of __read_mostly annotations Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86/ACPI: __init-annotateJan Beulich2011-04-022-15/+15
| | | | | | | | | xen/arch/x86/acpi/boot.c consists of almost only code/data in .init.*, so move the few bits that aren't into a new file and then use the recently introduced .init.o mechanism to move all the literal strings into .init.rodata. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* ACPI: large cleanupJan Beulich2011-03-0916-3945/+9
| | | | | | | | In some cases, entire files turned out unnecessary. Of what remains, move whatever possible into .init.*, and some data items into .data.read_mostly. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* move various bits into .init.* sectionsJan Beulich2011-03-091-1/+0
| | | | | | | | | | This also includes the removal of some entirely unused functions. The patch builds upon the makefile adjustments done in the earlier sent patch titled "move more kernel decompression bits to .init.* sections". Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix ia64 tools buildKeir Fraser2010-11-021-1/+3
| | | | | | | | | | | 22066:eccfdeb41b80 replaced tools/libxc/ia64/aclinux.h with xen/include/acpi/platform/aclinux.h. Because both are incompatible, tools cannot be built on ia64. This patch fixes compilation errors by defining identifiers at ac_ia64_tools.h. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* Implement ACPI APEI ERST featureKeir Fraser2010-08-222-0/+134
| | | | | | | | | | | | | | | | | APEI are ACPI4.0 new features. It consists of ERST, BERT, HEST, and EINJ. ERST is used to save fault error log to a platform persistent storage, so that when reboot os can retrieve the error log and handle it. This patch is used to implement ERST feature to Xen. It consists of 3-level hierarchy: operation level, action level, and instru= ction level. Instruction do basic io; Action done by sequential instructions parsed from ACPI ERST table; Operation done by sequential actions defined by ACPI spec, providing erst_write/ erst_read/ erst_clear interfaces to MCE/ NMI/ PCIe error handling mechanism, etc. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* ACPI: add support for x2APIC ACPI extensionsKeir Fraser2010-07-161-5/+44
| | | | | | | | | | | | | | | | | | | | | | All logical processors with APIC ID values of 255 and greater will have their APIC reported through Processor X2APIC structure (type-9 entry type) and all logical processors with APIC ID less than 255 will have their APIC reported through legacy Processor Local APIC (type-0 entry type) only. This is the same case even for NMI structure reporting. The Processor X2APIC Affinity structure provides the association between the X2APIC ID of a logical processor and the proximity domain to which the logical processor belongs. This patch adds 2 new subtables to MADT and one new subtable to SRAT. This patch also changes x86_acpiid_to_apicid from u8 to u32 for x2APIC ID, and changes mp_register_lapic to accept 32-bit id. But there are still some 8-bit apic id hardcode and assumptions in Xen code, it needs to be fixed in future. Signed-off-by: Weidong Han <weidong.han@intel.com>
* cpufreq: eliminate unnecessary NR_CPUS-sized arraysKeir Fraser2010-07-092-2/+2
| | | | | | Replace them with per-CPU data. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86/cpufreq: fix turbo mode detectionKeir Fraser2010-05-071-2/+3
| | | | | | | | | | | | | {acpi,powernow}_cpufreq_cpu_init() generally don't run on the CPU the policy they deal with is related to, hence using cpuid() directly works only as long as all CPUs in the system are identical (which admittedly is commonly the case). Further add a per-policy flag indicating the availability of APERF/MPERF MSRs, so that globally setting the .getavg accessor won't be a problem on heterogeneous configurations. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Add support for AMD MPERF/APERFKeir Fraser2010-04-092-1/+1
| | | | | | | | | | | | | | Starting with Family 0x10, model 10 processors, some AMD processors will have support for the APERF/MPERF MSRs. This patch adds the checks necessary to support those MSRs. It also makes the get_measured_perf function defined inside cpufreq.c driver independent. max_freq is taken from the policy definition instead of being a private argument in struct acpi_cpufreq_data. The struct member is entirely removed from the function since it is no longer used. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
* Refactor Xen Support for Intel Turbo BoostKeir Fraser2010-04-092-4/+11
| | | | | | | | | | Refactor the existing code that supports the Intel Turbo feature to move all the driver specific bits in the cpufreq driver. Create a tri-state interface for the Turbo feature that can distinguish amongst enabled Turbo, disabled Turbo, and processors that don't support Turbo at all. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
* cpufreq: make non-verbose by defaultKeir Fraser2010-03-181-0/+2
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xenpm: Allow user to enable/disable dbs governor turbo mode.Keir Fraser2010-02-081-0/+6
| | | | Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
* Change default cpufreq governor to ondemandKeir Fraser2010-01-171-1/+1
| | | | | | | | | | | | | | | | | Back in c/s 18950 the default cpufreq governor was set to userspace (it had previously been performance). However, since there is no supplied userspace program or script that will change the frequency this is at best a no-op. Worse, on some hardware with some BIOS revisions, this actually sets the CPUs running at their lowest frequency rather than their highest and there is a corresponding (and initially puzzling) drop in performance. This patch changes the default governor to "ondemand" which should make it the same as the Linux default and will provide power savings for the majority without needing to write a userspace governor. For those that want to install their own governor, that is still possible. Signed-off-by: John Haxby <john.haxby@oracle.com>
* x86: Update powernow.c to latest cpufreq codeKeir Fraser2009-10-161-0/+1
| | | | | | | | | | The general cpufreq infrastructure has been improved over the last year. Update the AMD PowerNow! driver powernow.c to take advantage of those improvements. Specifically, addresses Novell bugzilla # 530035. Signed-of-by: Mark Langsdorf <mark.langsdorf@amd.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-072-5/+4
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Fix cpufreq HW-ALL coordination handleKeir Fraser2009-04-141-0/+4
| | | | | | | | | | | | Currently cpufreq HW-ALL coordination is handled same way as SW-ALL. However, SW-ALL will bring more IPIs which is bad for cpuidle. This patch implement HW-ALL coordination handled in different way from SW-ALL, for the sake of performance and reduce IPIs. We also suspend/resume HW-ALL dbs timer for idle. Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Signed-off-by: Tian, Kevin <kevin.tian@intel.com>
* cpufreq: Update cpufreq aperf and mperf read, so that it can be usedKeir Fraser2009-03-201-2/+5
| | | | | | | | | | | | by both ondemand gov and user program Current __get_measured_perf read aperf and mperf MSR and then clear them for the sake of ondemand governor. This solution block user program to get aperf and mperf on their purpose. In this patch, it no longer clear aperf and mperf MSR, so that it can be used by both ondemand gov and user program. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Fix a cpufreq userspace limitation bugKeir Fraser2009-03-191-0/+2
| | | | | | | | Fix a cpufreq userspace limitation bug, so that userspace freq can return to correct freq when freq_limitation return to high value (like ppc event) Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>=
* Consolidate cpufreq cmdline handlingKeir Fraser2009-02-031-0/+1
| | | | | | | | | | ... by moving as much of the option processing into cpufreq code as is possible, by folding the cpufreq_governor option into the cpufreq one (the governor name, if any, must be specified as the first thing after the separator following "cpufreq=xen"), and by allowing each governor to have an option processing routine. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Cpufreq: prevent negative px resident time, add spinlock to avoid raceKeir Fraser2009-01-052-0/+3
| | | | | | | | | Due to NOW() value may drift between different cpus, we add protection to prevent negative px resident time. Due to both cpufreq logic and xenpm may race accessing cpufreq_statistic_data, we add spinlock to avoid race. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Cpufreq: remove redundant fragmentsKeir Fraser2009-01-051-2/+0
| | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* cpufreq: xen is default cpufreq, userspace is default governor (override on ↵Keir Fraser2008-12-291-1/+6
| | | | | | | | | | | | | | cmdline) Set userspace governor as default, which stays same effect as when cpufreq in xen is not enabled. As a result, enable cpufreq in xen by default to avoid reboot to activate cpufreq. Now it's always on but w/o performance impact if user doesn't attempt to change governor. Add governor option at cmdline, add some warning info for debug. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Add user PM control interfaceKeir Fraser2008-12-101-3/+13
| | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Add cpufreq governors: performance, powersave, userspaceKeir Fraser2008-12-101-0/+3
| | | | | | | | | | | | This patch add 3 more governors beside original running ondemand cpufreq governor. performance governor is with best performance, keeping cpu always running at highest freq; powersave governor is with best power save effect, keeping cpu always running at lowest freq; userspace governor provide user setting freq ability; Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* cpufreq: allow customization of some parametersKeir Fraser2008-12-051-0/+2
| | | | | | | | | | | | | | | | | | Short of having a way for powersaved to dynamically adjust these values, at least allow specifying them on the command line. In particular, always running at an up-threshold of 80% is perhaps nice for laptop use, but certainly not desirable on servers. On shell scripts invoking large numbers of short-lived processes I noticed a 50% performance degradation on a dual-socket quad-core Barcelona just because of the load of an individual core never crossing the 80% boundary that would have resulted in increasing the frequency. (Powersaved on SLE10 sets this on native kernels to 60% or 80%, depending on whether performance or power reduction is preferred, *divided* by the number of CPUs, but capped at the lower limit of 20%.) Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Adapt 32b guest os to 64b hypervisor platform_hypercall compatibilityKeir Fraser2008-10-211-3/+0
| | | | | | | | | | | Changeset 18552 (19b0a4f91712) move px transfer logic from platform_hypercall.c to a common file to support both x86 and ia64. However, it involves 32b guest os to 64b hypervisor (x86) compatible issue. This patch fix the compatible issue, and make set_px_pminfo() re-used by ia64 and x86 (32b guest os to 64b hypervisor, and 64b guest os to 64b hypervisor). Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
* x86 and ia64: move cpufreq notify code to commone placeKeir Fraser2008-09-261-0/+4
| | | | | | | | | This patch move the cpufreq notify code from x86 specfic place to common place, since it can be used by both x86 and ia64 cpufreq driver. Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Signed-off-by: Yu Ke <ke.yu@intel.com>
* X86 and IA64: Update cpufreq statistic logic for supporting both x86Keir Fraser2008-09-261-1/+1
| | | | | | | and ia64 Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* X86 and IA64: Rebase cpufreq logic for supporting both x86 and ia64Keir Fraser2008-09-262-5/+12
| | | | | | | | | | | | | arch Rebase cpufreq logic for supporting both x86 and ia64 arch: 1. move cpufreq arch-independent logic into common dir (xen/drivers/acpi and xen/drivers/cpufreq dir); 2. leave cpufreq x86-dependent logic at xen/arch/x86/acpi/cpufreq dir; Signed-off-by: Yu, Ke <ke.yu@intel.com> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* x86/cpufreq: don't use static array for large per-CPU data structuresKeir Fraser2008-09-221-2/+2
| | | | | | | ... as this is rather wasteful when Xen is configured to support many CPUs but is running on systems having only a few. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Clean up cpufreq core logicKeir Fraser2008-09-122-14/+79
| | | | | | | | Clean up cpufreq core logic, which now can cope with cpu online/offline event, and also dynamic platform limitation event (_PPC). Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
* Change Px control protection corresponding to changeset 18125Keir Fraser2008-07-291-0/+2
| | | | | | | | | xen changeset 18125(ab1d7db3facb) changed some px init logic, which has some effect to Px statistic and S3 suspend/resume logic. This patch change Px control protection corresponding to changeset 18125. Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>