15 Aug, 2009

1 commit

  • This patch updates the SuperH CMT driver with suspend and resume
    callbacks for the suspend-to-ram case. This patch stops the CMT
    channel at suspend time to avoid unwanted wake up events.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

24 Jun, 2009

1 commit


17 Jun, 2009

3 commits

  • …tes' and 'sh/perf_counter'

    Paul Mundt
     
  • Modify the CMT and TMU drivers to disable interrupts when
    disabling the timer. Only using start/stop bits is not
    enough.

    This fixes a bootup hang on Migo-R when the CMT is replaced
    by TMU for clockevents but the CMT keeps on delivering irqs
    even though the timer start bit is off.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • PIT_TICK_RATE is currently defined in four architectures, but in three
    different places. While linux/timex.h is not the perfect place for it, it
    is still a reasonable replacement for those drivers that traditionally use
    asm/timex.h to get CLOCK_TICK_RATE and expect it to be the PIT frequency.

    Note that for Alpha, the actual value changed from 1193182UL to 1193180UL.
    This is unlikely to make a difference, and probably can only improve
    accuracy. There was a discussion on the correct value of CLOCK_TICK_RATE
    a few years ago, after which every existing instance was getting changed
    to 1193182. According to the specification, it should be
    1193181.818181...

    Signed-off-by: Arnd Bergmann
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Len Brown
    Cc: john stultz
    Cc: Dmitry Torokhov
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

14 Jun, 2009

1 commit


03 May, 2009

4 commits

  • Neither of these need to be exported, so just make them static.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • All of the SH timers use a roughly identical structure for platform data,
    which presently is broken out for each block. Consolidate all of these
    definitions, as there is no reason for them to be broken out in the first
    place.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This patch adds a TMU driver for the SuperH architecture.

    The TMU driver is a platform driver with early platform
    support to allow using a TMU channel as clockevent or
    clocksource during system bootup or later.

    Clocksource or clockevent can be selected.
    Both periodic and oneshot clockevents are supported.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • This patch adds a MTU2 driver for the SuperH architecture.

    The MTU2 driver is a platform driver with early platform
    support to allow using a MTU2 channel as only clockevent
    during system bootup.

    Clocksource on sh2a is currently unsupported due to code
    generation issues with 64-bit math, so at this point only
    periodic clockevent support is in place.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

30 Apr, 2009

1 commit


28 Apr, 2009

2 commits

  • This patch moves the SuperH timer setup code from time_init()
    to late_time_init(). Good things about this change:
    - interrupts: they are enabled at late_time_init()
    - mm: regular kmalloc() can be used at late_time_init()

    Together with moving to late_time_init() this patch changes
    the sh_cmt driver to always allocate with kmalloc(). This
    simplifies the code a bit and also fixes section mismatches.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     
  • This patch improves the sh_cmt clocksource handling.

    Currently the counter value is ignored in the case of
    overflow. With this patch the overflow flag is read
    before and after reading the counter, removing any
    counter value and overflow flag mismatch issues.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

22 Apr, 2009

3 commits


19 Apr, 2009

1 commit


02 Apr, 2009

1 commit


28 Mar, 2009

1 commit


29 Jan, 2009

2 commits

  • We are getting rid of subarchitecture support - move the hook files
    to asm/. (These are now stale and should be replaced with more explicit
    runtime mechanisms - but the transition is simpler this way.)

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • SuperH CMT clockevent driver.

    Both 16-bit and 32-bit CMT versions are supported, but only 32-bit
    is tested. This driver contains support for both clockevents and
    clocksources, but no unregistration is supported at this point.

    Works fine as clock source and/or event in periodic or oneshot mode.
    Tested on sh7722 and sh7723, but should work with any cpu/architecture.

    This version is lacking clocksource and early platform driver support
    for now - this to minimize the amount of dependencies.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

03 Jan, 2009

1 commit

  • …/git/tip/linux-2.6-tip

    * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
    x86: export vector_used_by_percpu_irq
    x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
    sched: nominate preferred wakeup cpu, fix
    x86: fix lguest used_vectors breakage, -v2
    x86: fix warning in arch/x86/kernel/io_apic.c
    sched: fix warning in kernel/sched.c
    sched: move test_sd_parent() to an SMP section of sched.h
    sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
    sched: activate active load balancing in new idle cpus
    sched: bias task wakeups to preferred semi-idle packages
    sched: nominate preferred wakeup cpu
    sched: favour lower logical cpu number for sched_mc balance
    sched: framework for sched_mc/smt_power_savings=N
    sched: convert BALANCE_FOR_xx_POWER to inline functions
    x86: use possible_cpus=NUM to extend the possible cpus allowed
    x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
    x86: update io_apic.c to the new cpumask code
    x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
    x86: xen: use smp_call_function_many()
    x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
    ...

    Fixed up trivial conflict in kernel/time/tick-sched.c manually

    Linus Torvalds
     

13 Dec, 2008

1 commit


12 Dec, 2008

1 commit

  • acpi_pm_read_slow() is only used when CONFIG_PCI=y, so move the definition
    inside the ifdef.

    Otherwise this causes a "defined but not used" warning when building with
    CONFIG_ACPI=y and CONFIG_PCI=n (that's not supported yet, but it could
    be).

    Signed-off-by: Bjorn Helgaas
    Cc: mingo@elte.hu
    Cc: johnstul@us.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: bjorn.helgaas@hp.com
    Cc: lenb@kernel.org
    Cc: linux@dominikbrodowski.net
    Cc: tglx@linutronix.de
    Signed-off-by: Thomas Gleixner
    Cc: Dominik Brodowski
    Cc: Thomas Gleixner
    Cc: Len Brown
    Signed-off-by: Andrew Morton

    Bjorn Helgaas
     

20 Oct, 2008

1 commit


11 Sep, 2008

1 commit


06 Sep, 2008

2 commits

  • The current check for monotonicity is way too weak: Andreas Mohr reports (
    http://lkml.org/lkml/2008/8/10/77 ) that on one of his test systems the
    current check only triggers in 50% of all cases, leading to catastrophic
    timer behaviour. To fix this issue, expand the check for monotonicity by
    doing ten consecutive tests instead of one.

    Signed-off-by: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Dominik Brodowski
     
  • On all hardware (some Intel ICH4, PIIX4 and PIIX4E chipsets) affected by a
    hardware errata there's about a 4.2% chance that initialization of the
    ACPI PMTMR fails. On those chipsets, we need to read out the timer value
    at least three times to get a correct result, for every once in a while
    (i.e. within a 3 ns window every 69.8 ns) the read returns a bogus
    result. During normal operation we work around this issue, but during
    initialization reading a bogus value may lead to -EINVAL even though the
    hardware is usable.

    Thanks to Andreas Mohr for spotting this issue.

    Signed-off-by: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Dominik Brodowski
     

21 Aug, 2008

1 commit


16 Jul, 2008

1 commit


12 Jul, 2008

1 commit


10 Jul, 2008

1 commit


14 Mar, 2008

1 commit


04 Mar, 2008

1 commit

  • Clocksource and clockevent device based on the Atmel TC blocks.

    The clockevent device handles both periodic and oneshot modes, so this
    enables NO_HZ and high res timers on some platforms that previously
    couldn't use those mechanisms.

    This works on both AVR32 and AT91 chips, given relevant patches for
    tclib support (always) and clockevents (or else this will only look
    like a higher precision clocksource). It's an updated and modularized
    version of an AT91-only patch that has circulated for some time now.

    Changes relative to the original patch:
    * Update to use new tclib API
    * Replace open-coded do-while loop using goto with a real do-while loop
    * Minor irq handler optimization: Load register base address from
    dev_id instead of a global variable.
    * Aggressively turn off clocks when the clockevent isn't being used
    * Include the clockevent code on AT91RM9200 as well. The rating is
    lower than the System Timer, so the clock will usually stay off.
    * Don't assume that the number of clocks is always equal to the
    number of irqs.

    Signed-off-by: David Brownell
    Signed-off-by: Haavard Skinnemoen

    David Brownell
     

22 Jul, 2007

1 commit


12 Jul, 2007

1 commit

  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     

26 Apr, 2007

1 commit


28 Mar, 2007

1 commit

  • On Bob's machine clocksource is selecting PIT over the ACPI PM timer,
    because he has the PIIX4 bug. That bug drops the ACPI PM timers rating
    to the same as the PIT, so that's why you're getting the PIT.

    Realistically, the PIT is much slower then even the triple read ACPI PM,
    so the de-ranking code is probably dropping it too far.

    So don't drop ACPI PM quite so low if we see the PIIX4 bug.

    Signed-off-by: John Stultz
    Cc: Bob Tracy
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

05 Mar, 2007

1 commit

  • This patch resolves the issue found here:
    http://bugme.osdl.org/show_bug.cgi?id=7426

    The basic summary is:
    Currently we register most of i386/x86_64 clocksources at module_init
    time. Then we enable clocksource selection at late_initcall time. This
    causes some problems for drivers that use gettimeofday for init
    calibration routines (specifically the es1968 driver in this case),
    where durring module_init, the only clocksource available is the low-res
    jiffies clocksource. This may cause slight calibration errors, due to
    the small sampling time used.

    It should be noted that drivers that require fine grained time may not
    function on architectures that do not have better then jiffies
    resolution timekeeping (there are a few). However, this does not
    discount the reasonable need for such fine-grained timekeeping at init
    time.

    Thus the solution here is to register clocksources earlier (ideally when
    the hardware is being initialized), and then we enable clocksource
    selection at fs_initcall (before device_initcall).

    This patch should probably get some testing time in -mm, since
    clocksource selection is one of the most important issues for correct
    timekeeping, and I've only been able to test this on a few of my own
    boxes.

    Signed-off-by: John Stultz
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

17 Feb, 2007

1 commit

  • Allow early access to the power management timer by exposing the verified read
    function and providing a helper function which checks the pmtmr_ioport
    variable and returns either the pm timer readout or 0 in case the pm timer is
    not available.

    Create a new header file and replace also the ifdef'ed extern definition in
    arch/i386/kernel/acpi/boot.c

    This is a preperatory patch for the rework of the local apic timer
    calibration.

    No functional changes.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner