aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hpet.h
Commit message (Collapse)AuthorAgeFilesLines
* x86/HPET: basic cleanupAndrew Cooper2013-10-081-4/+2
| | | | | | | | | * Strip trailing whitespace * Remove redundant definitions * Update stale documentation links * Move hpet_address into __initdata Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
* x86/HPET: allow use for broadcast when interrupt remapping is in effectJan Beulich2012-10-181-0/+1
| | | | | | | | | | This requires some additions to the VT-d side; AMD IOMMUs use the "normal" MSI message format even when interrupt remapping is enabled, thus making adjustments here unnecessary. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Xiantao Zhang<xiantao.zhang@intel.com>
* x86/hpet: warn about and clear reserved set config register bitsJan Beulich2012-03-281-0/+1
| | | | | Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/hpet: use asm/hpet.h in HVM emulation codeJan Beulich2012-03-271-0/+1
| | | | | | | | | | | Also replace some plain numbers by using suitable defines (to make clear what they are standing for). Generated code is identical (apart from line number changes and functions possibly getting ordered differently). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/hpet: clear unwanted bitsJan Beulich2012-03-271-0/+2
| | | | | | | | | | | | Leaving certain bits set when being started from an environment where the HPET was already in use can affect functionality. Clear those bits to be on the safe side. We should also consider ignoring the HPET altogether if any reserved bits are found to be set. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86/hpet: disable before reboot or kexecJan Beulich2012-03-271-1/+6
| | | | | | | | | | | | | | Linux up to now is not smart enough to properly clear the HPET when it boots, which is particularly a problem when a kdump attempt from running under Xen is being made. Linux itself added code to work around this to its shutdown paths quite some time ago, so let's do something similar in Xen: Save the configuration register settings during boot, and restore them during shutdown. This should cover the majority of cases where the secondary kernel might not come up because timer interrupts don't work. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: consistently serialize CMOS/RTC accesses on rtc_lockJan Beulich2011-07-191-1/+1
| | | | | | | | | | | | | | | Since RTC/CMOS accesses aren't atomic, there are possible races between code paths setting the index register and subsequently reading/writing the data register. This is supposed to be dealt with by acquiring rtc_lock, but two places up to now lacked respective synchronization: Accesses to the EFI time functions and smpboot_{setup,restore}_warm_reset_vector(). This in turn requires no longer directly passing through guest writes to the index register, but instead using a machanism similar to that for PCI config space method 1 accesses. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xen: remove extern function declarations from C files.Tim Deegan2011-05-261-0/+2
| | | | | | | | Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* x86/HPET: cleanupJan Beulich2011-03-121-13/+5
| | | | | | | | | | | | - separate init and resume code paths (so that the [larger] init parts can go init .init.* sections) - drop the separate legacy_hpet_event object, as we can easily re-use the first slot of hpet_events[] for that purpose (the whole array is otherwise unused when the legacy code is being used) - use section placement attributes where reasonable Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Wei Gang <gang.wei@intel.com>
* Scattered code arrangement cleanups.Keir Fraser2009-10-071-0/+2
| | | | | | | | - remove redundant declarations - add/move prototypes to headers - move things where they belong to Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* cpuidle: Enable hpet broadcast by defaultKeir Fraser2009-04-151-0/+1
| | | | | | | | And stop legacy hpet broadcast and limit max C-state to shallower state if RTC interrupts are enabled. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Tian Kevin <kevin.tian@intel.com>
* CPUIDLE: enable MSI capable HPET for timer broadcastKeir Fraser2009-03-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HPET broadcast was default not enabled because the old code use HPET channel 0 in legacy replacing mode which will hide both PIT & RTC irqs and cause issues if RTC is needed in some cases. The upstream default broadcast timer is PIT, which is in periodic mode (100HZ) and would be expensive to be used as oneshot. MSI capable HPET is coming into being. It is capable to deliver interrupt through FSB directly, and has no side effect. This patch extends support for MSI HPET based on original legacy HPET code. The broadcast timer selection logic becomes: 1. if MSI capable HPET available, use multiple HPET channels (no more than possible cpu num) in MSI mode; 2. else if legacy replacing mode available for HPET & 'hpetbroadcast' option is given in cmd line, use HPET channel 0 in legacy mode; 3 else use PIT. While entering broadcast, it gets a hpet channel (look for a spare one first, if failing allocate a shared one), attach to current cpu, setup the irq affinity & broadcast cpumask. While exiting broadcast, it detach the used hpet channel and try to change the owner if the broadcast mask is not empty. Some optimizations(static affinity) were done for (MSI HPET channels >= possible cpu num) case. A new hw_interrupt_controller 'HPET_MSI' is created for HPET MSI interrupt handling. Signed-off-by: Wei Gang <gang.wei@intel.com>=
* x86, hpet: Fix initialisation of secondary timers.Keir Fraser2008-11-201-0/+4
| | | | | | | | Each channel may have different settings, and in the original implementation, other Tn configuration will accidently overwrite T0 configuration. Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
* x86: Do not use HPET in Cx state management since dom0 may need RTCKeir Fraser2008-06-121-0/+1
| | | | | | IRQ routing. This makes C3 unusable for now. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Fix lapic timer stop issue in deep C stateKeir Fraser2008-05-211-0/+20
| | | | | | | | | | Local APIC timer may stop at deep C state (C3/C4...) entry/exit. this patch add the logic that use platform timer (HPET) to reenable local APIC timer at C state entry/exit. Signed-off-by: Wei Gang <gang.wei@intel.com> Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Add HPET support to Xen. It is quicker to access and morekaf24@firebug.cl.cam.ac.uk2005-07-271-0/+52
precise than the PIT. Signed-off-by: Keir Fraser <keir@xensource.com>