timer updates for 2.6.27
Subsystems (5)
Linus,
Please pull the latest timers/for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git timers/for-linus
Thanks,
tglx
------------------>
Carlos R. Mafra (1):
hrtimer: Remove unused variables in ktime_divns()
Heiko Carstens (1):
nohz: don't stop idle tick if softirqs are pending.
Hiroshi Shimamoto (1):
posix-timers: print RT watchdog message
Ingo Molnar (1):
nohz: reduce jiffies polling overhead
Jeremy Fitzhardinge (1):
hrtimer: remove warning in hres_timers_resume
Joe Buehler (1):
x86: add PCI ID for 6300ESB force hpet
Krzysztof Oledzki (1):
x86: add another PCI ID for ICH6 force-hpet
Randy Dunlap (1):
acpi_pm clccksource: fix printk format warning
Thomas Gleixner (2):
pmtmr: allow command line override of ioport
kernel-paramaters: document pmtmr= command line option
Documentation/kernel-parameters.txt | 4 ++++ arch/x86/kernel/quirks.c | 4 ++++ drivers/clocksource/acpi_pm.c | 19 +++++++++++++++++++ kernel/hrtimer.c | 7 ++----- kernel/posix-cpu-timers.c | 3 +++ kernel/time/tick-sched.c | 8 ++++++++ 6 files changed, 40 insertions(+), 5 deletions(-)
Documentation/kernel-parameters.txt +4 -0
@@ -1571,6 +1571,10 @@ and is between 256 and 4096 characters. It is defined in the file Format: { parport<nr> | timid | 0 } See also Documentation/parport.txt. + pmtmr= [X86] Manual setup of pmtmr I/O Port. + Override pmtimer IOPort with a hex value. + e.g. pmtmr=0x508 + pnpacpi= [ACPI] { off }
arch/x86/kernel/quirks.c +4 -0
@@ -158,6 +158,8 @@ static void ich_force_enable_hpet(struct pci_dev *dev)DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ESB2_0 , ich_force_enable_hpet); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH6_0 , + ich_force_enable_hpet);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ICH6_1 , ich_force_enable_hpet); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0,
@@ -255,6 +257,8 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev)old_ich_force_enable_hpet (dev); } +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_ESB_1 , + old_ich_force_enable_hpet_user);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801CA_0 , old_ich_force_enable_hpet_user); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12,
drivers/clocksource/acpi_pm.c +19 -0
@@ -215,3 +215,22 @@ pm_good:* but we still need to load before device_initcall */ fs_initcall (init_acpi_pm_clocksource); + +/* +* Allow an override of the IOPort. Stupid BIOSes do not tell us about +* the PMTimer, but we might know where it is. +*/ +static int __init parse_pmtmr (char *arg) +{ +unsigned long base; + +if (strict_strtoul (arg,16 , &base)) +return -EINVAL ; + +printk (KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04x\n" , + (unsigned int )pmtmr_ioport, base); + pmtmr_ioport = base; + +return 1 ; +} +__setup ("pmtmr=" , parse_pmtmr);
kernel/hrtimer.c +2 -5
@@ -300,11 +300,10 @@ EXPORT_SYMBOL_GPL(ktime_sub_ns);*/ u64 ktime_divns (const ktime_t kt,s64 div) { -u64 dclc, inc, dns; +u64 dclc;int sft =0 ; - dclc = dns =ktime_to_ns (kt); - inc = div; + dclc =ktime_to_ns (kt);/* Make sure the divisor is less than 2^32: */ while (div >>32 ) { sft++;
@@ -632,8 +631,6 @@ void clock_was_set(void)*/ void hres_timers_resume (void ) { -WARN_ON_ONCE (num_online_cpus () >1 ); -/* Retrigger the CPU local events: */ retrigger_next_event (NULL ); }
kernel/posix-cpu-timers.c +3 -0
@@ -1037,6 +1037,9 @@ static void check_thread_timers(struct task_struct *tsk, sig->rlim[RLIMIT_RTTIME ].rlim_cur +=USEC_PER_SEC ; } +printk (KERN_INFO +"RT Watchdog Timeout: %s[%d]\n" , + tsk->comm,task_pid_nr (tsk));__group_send_sig_info (SIGXCPU ,SEND_SIG_PRIV , tsk); } }
kernel/time/tick-sched.c +8 -0
@@ -48,6 +48,13 @@ static void tick_do_update_jiffies64(ktime_t now)unsigned long ticks =0 ;ktime_t delta; +/* +* Do a quick check without holding xtime_lock: +*/ + delta =ktime_sub (now, last_jiffies_update); +if (delta.tv64 < tick_period.tv64) +return ; +/* Reevalute with xtime_lock held */ write_seqlock (&xtime_lock);
@@ -228,6 +235,7 @@ void tick_nohz_stop_sched_tick(void) local_softirq_pending()); ratelimit++; } + goto end; } ts->idle_calls++;
Quoted 7 lines · Thomas Gleixner
Please pull the latest timers/for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.gittimers/for-linus
...
Randy Dunlap (1):
acpi_pmclccksource: fix printk format warning
This just _adds_ a warning. I now get
drivers/clocksource/acpi_pm.c:231: warning: format ‘%04x’ expects type ‘unsigned int’, but argument 3 has type ‘long unsigned int’
Why? Because it only adds the (unsigned int) cast (which is wrong anyway - ioports really should be long) to the ioport value, not 'base' is still 'unsigned long', and it removed the 'lx' from the latter too.
One clean fix is probably to just make pmtmr_ioport be of type 'unsigned long'. It's the right thing from a portability angle anyway - even if no architecture that uses ACPI will likely ever have ioports that are long anyway.
The alternative - and probably better, but _much_ more intrusive - patch is to make 'u32' just be 'unsigned int' on x86-32, along with making 'u64' be 'unsigned long long' on x86-64, which would unify more types.
Anyway, I'm not fixing it right now, since it's unclear which way to go, but this need to be fixed _some_ way.
Linus
Quoted 3 lines · Linus Torvalds
Anyway, I'm not fixing it right now, since it's unclear which way to go, but this need to be fixed _some_ way.
What the hell. The second type is always "unsigned long", and needs to be that since it's passed in as a pointer to "strict_strtoul()". So regardless of whether the cast to the first port should be removed or not, the second thing should be 0x%04lx.
Linus
PATCH 1/1 acpi_pm: re-fix printk format (was: timer updates for 2.6.27)
From: Randy Dunlap <[email protected]>
Re-fix printk format warning in acpi_pm clocksource.
--- drivers/clocksource/acpi_pm.c | 6 +++--- include/linux/acpi_pmtmr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
[still looking for penance task]
drivers/clocksource/acpi_pm.c +3 -3
@@ -28,7 +28,7 @@* The location is detected during setup_arch(), * in arch/i386/kernel/acpi/boot.c */ -u32 pmtmr_ioport__read_mostly ; +unsigned long pmtmr_ioport__read_mostly ;static inline u32 read_pmtmr (void ) {
@@ -227,8 +227,8 @@ static int __init parse_pmtmr(char *arg)if (strict_strtoul (arg,16 , &base))return -EINVAL ; -printk (KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n" , - (unsigned int )pmtmr_ioport, base); +printk (KERN_INFO "PMTMR IOPort override: 0x%04lx -> 0x%04lx\n" , + pmtmr_ioport, base); pmtmr_ioport = base;return 1 ;
include/linux/acpi_pmtmr.h +1 -1
@@ -15,7 +15,7 @@#ifdef CONFIG_X86_PM_TIMER extern u32 acpi_pm_read_verified (void ); -extern u32 pmtmr_ioport; +extern unsigned long pmtmr_ioport;static inline u32 acpi_pm_read_early (void ) {
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/