Merge branch 'timers/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 17:39:57 +0000 (10:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 17:39:57 +0000 (10:39 -0700)
* 'timers/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: add PCI ID for 6300ESB force hpet
  x86: add another PCI ID for ICH6 force-hpet
  kernel-paramaters: document pmtmr= command line option
  acpi_pm clccksource: fix printk format warning
  nohz: don't stop idle tick if softirqs are pending.
  pmtmr: allow command line override of ioport
  nohz: reduce jiffies polling overhead
  hrtimer: Remove unused variables in ktime_divns()
  hrtimer: remove warning in hres_timers_resume
  posix-timers: print RT watchdog message

1  2 
Documentation/kernel-parameters.txt
arch/x86/kernel/quirks.c
kernel/hrtimer.c
kernel/time/tick-sched.c

@@@ -271,17 -271,6 +271,17 @@@ and is between 256 and 4096 characters
        aic79xx=        [HW,SCSI]
                        See Documentation/scsi/aic79xx.txt.
  
 +      amd_iommu=      [HW,X86-84]
 +                      Pass parameters to the AMD IOMMU driver in the system.
 +                      Possible values are:
 +                      isolate - enable device isolation (each device, as far
 +                                as possible, will get its own protection
 +                                domain)
 +      amd_iommu_size= [HW,X86-64]
 +                      Define the size of the aperture for the AMD IOMMU
 +                      driver. Possible values are:
 +                      '32M', '64M' (default), '128M', '256M', '512M', '1G'
 +
        amijoy.map=     [HW,JOY] Amiga joystick support
                        Map of devices attached to JOY0DAT and JOY1DAT
                        Format: <a>,<b>
  
        debug_objects   [KNL] Enable object debugging
  
 +      debugpat        [X86] Enable PAT debugging
 +
        decnet.addr=    [HW,NET]
                        Format: <area>[,<node>]
                        See also Documentation/networking/decnet.txt.
                        See drivers/char/README.epca and
                        Documentation/digiepca.txt.
  
 +      disable_mtrr_cleanup [X86]
 +      enable_mtrr_cleanup [X86]
 +                      The kernel tries to adjust MTRR layout from continuous
 +                      to discrete, to make X server driver able to add WB
 +                      entry later. This parameter enables/disables that.
 +
 +      mtrr_chunk_size=nn[KMG] [X86]
 +                      used for mtrr cleanup. It is largest continous chunk
 +                      that could hold holes aka. UC entries.
 +
 +      mtrr_gran_size=nn[KMG] [X86]
 +                      Used for mtrr cleanup. It is granularity of mtrr block.
 +                      Default is 1.
 +                      Large value could prevent small alignment from
 +                      using up MTRRs.
 +
 +      mtrr_spare_reg_nr=n [X86]
 +                      Format: <integer>
 +                      Range: 0,7 : spare reg number
 +                      Default : 1
 +                      Used for mtrr cleanup. It is spare mtrr entries number.
 +                      Set to 2 or more if your graphical card needs more.
 +
        disable_mtrr_trim [X86, Intel and AMD only]
                        By default the kernel will trim any uncacheable
                        memory out of your available memory pool based on
        mtdparts=       [MTD]
                        See drivers/mtd/cmdlinepart.c.
  
 +      mtdset=         [ARM]
 +                      ARM/S3C2412 JIVE boot control
 +
 +                      See arch/arm/mach-s3c2412/mach-jive.c
 +
        mtouchusb.raw_coordinates=
                        [HW] Make the MicroTouch USB driver use raw coordinates
                        ('y', default) or cooked coordinates ('n')
                        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 }
  
        usbhid.mousepoll=
                        [USBHID] The interval which mice are to be polled at.
  
 +      add_efi_memmap  [EFI; x86-32,X86-64] Include EFI memory map in
 +                      kernel's map of available physical RAM.
 +
        vdso=           [X86-32,SH,x86-64]
                        vdso=2: enable compat VDSO (default with COMPAT_VDSO)
                        vdso=1: enable VDSO (default)
diff --combined arch/x86/kernel/quirks.c
@@@ -65,7 -65,6 +65,7 @@@ static enum 
        ICH_FORCE_HPET_RESUME,
        VT8237_FORCE_HPET_RESUME,
        NVIDIA_FORCE_HPET_RESUME,
 +      ATI_FORCE_HPET_RESUME,
  } force_hpet_resume_type;
  
  static void __iomem *rcba_base;
@@@ -177,12 -176,6 +177,12 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
  
  static struct pci_dev *cached_dev;
  
 +static void hpet_print_force_info(void)
 +{
 +      printk(KERN_INFO "HPET not enabled in BIOS. "
 +             "You might try hpet=force boot option\n");
 +}
 +
  static void old_ich_force_hpet_resume(void)
  {
        u32 val;
@@@ -262,10 -255,10 +262,12 @@@ static void old_ich_force_enable_hpet_u
  {
        if (hpet_force_user)
                old_ich_force_enable_hpet(dev);
 +      else
 +              hpet_print_force_info();
  }
  
+ 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,
@@@ -301,13 -294,8 +303,13 @@@ static void vt8237_force_enable_hpet(st
  {
        u32 uninitialized_var(val);
  
 -      if (!hpet_force_user || hpet_address || force_hpet_address)
 +      if (hpet_address || force_hpet_address)
 +              return;
 +
 +      if (!hpet_force_user) {
 +              hpet_print_force_info();
                return;
 +      }
  
        pci_read_config_dword(dev, 0x68, &val);
        /*
@@@ -346,36 -334,6 +348,36 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
                         vt8237_force_enable_hpet);
  
 +static void ati_force_hpet_resume(void)
 +{
 +      pci_write_config_dword(cached_dev, 0x14, 0xfed00000);
 +      printk(KERN_DEBUG "Force enabled HPET at resume\n");
 +}
 +
 +static void ati_force_enable_hpet(struct pci_dev *dev)
 +{
 +      u32 uninitialized_var(val);
 +
 +      if (hpet_address || force_hpet_address)
 +              return;
 +
 +      if (!hpet_force_user) {
 +              hpet_print_force_info();
 +              return;
 +      }
 +
 +      pci_write_config_dword(dev, 0x14, 0xfed00000);
 +      pci_read_config_dword(dev, 0x14, &val);
 +      force_hpet_address = val;
 +      force_hpet_resume_type = ATI_FORCE_HPET_RESUME;
 +      dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n",
 +                 force_hpet_address);
 +      cached_dev = dev;
 +      return;
 +}
 +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
 +                       ati_force_enable_hpet);
 +
  /*
   * Undocumented chipset feature taken from LinuxBIOS.
   */
@@@ -389,14 -347,9 +391,14 @@@ static void nvidia_force_enable_hpet(st
  {
        u32 uninitialized_var(val);
  
 -      if (!hpet_force_user || hpet_address || force_hpet_address)
 +      if (hpet_address || force_hpet_address)
                return;
  
 +      if (!hpet_force_user) {
 +              hpet_print_force_info();
 +              return;
 +      }
 +
        pci_write_config_dword(dev, 0x44, 0xfed00001);
        pci_read_config_dword(dev, 0x44, &val);
        force_hpet_address = val & 0xfffffffe;
@@@ -448,9 -401,6 +450,9 @@@ void force_hpet_resume(void
        case NVIDIA_FORCE_HPET_RESUME:
                nvidia_force_hpet_resume();
                return;
 +      case ATI_FORCE_HPET_RESUME:
 +              ati_force_hpet_resume();
 +              return;
        default:
                break;
        }
diff --combined kernel/hrtimer.c
@@@ -300,11 -300,10 +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 +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);
  }
@@@ -1086,7 -1083,7 +1083,7 @@@ ktime_t hrtimer_get_remaining(const str
  }
  EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
  
 -#if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
 +#ifdef CONFIG_NO_HZ
  /**
   * hrtimer_get_next_event - get the time until next expiry event
   *
@@@ -1677,7 -1674,7 +1674,7 @@@ void __init hrtimers_init(void
                          (void *)(long)smp_processor_id());
        register_cpu_notifier(&hrtimers_nb);
  #ifdef CONFIG_HIGH_RES_TIMERS
 -      open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq, NULL);
 +      open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq);
  #endif
  }
  
diff --combined kernel/time/tick-sched.c
@@@ -48,6 -48,13 +48,13 @@@ static void tick_do_update_jiffies64(kt
        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 +235,7 @@@ void tick_nohz_stop_sched_tick(void
                               local_softirq_pending());
                        ratelimit++;
                }
+               goto end;
        }
  
        ts->idle_calls++;
                        ts->tick_stopped = 1;
                        ts->idle_jiffies = last_jiffies;
                        rcu_enter_nohz();
 +                      sched_clock_tick_stop(cpu);
                }
  
                /*
@@@ -376,7 -383,6 +384,7 @@@ void tick_nohz_restart_sched_tick(void
        select_nohz_load_balancer(0);
        now = ktime_get();
        tick_do_update_jiffies64(now);
 +      sched_clock_tick_start(cpu);
        cpu_clear(cpu, nohz_cpu_mask);
  
        /*