27 Aug, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

14 Nov, 2012

1 commit


12 Apr, 2012

1 commit

  • This reverts commit b519508298e0292e1771eecf14aaf67755adc39d.

    The reason for this revert is that making the frequency verification
    preemptible and interruptible is not working reliably. Michaels
    machine failed to use PM-timer with the message:

    PM-Timer running at invalid rate: 113% of normal - aborting.

    That's not a surprise as the frequency verification does rely on
    interrupts being disabled. With a async scheduled thread there is no
    guarantee to achieve the same result. Also some driver might fiddle
    with the CTC channel 2 during the verification period, which makes the
    result even more random and unpredictable.

    This can be solved by using the same mechanism as we use in the
    deferred TSC validation code, but that only will work if we verified a
    working HPET _BEFORE_ trying to do the PM-Timer lazy validation.

    So for now reverting is the safe option.

    Bisected-by: Michael Witten
    Cc: Arjan van de Ven
    Cc: Arjan van de Ven
    Cc: John Stultz
    Cc: Len Brown
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

02 Feb, 2012

1 commit

  • The ACPI clocksource takes quite some time to initialize,
    and this increases the boot time of the kernel for a
    double digit percentage. This while almost all modern
    systems will be using the HPET already anyway.

    This patch turns the clocksource loading into an asynchronous
    operation; which means it won't hold up the boot while
    still becoming available normally.

    To make this work well, an udelay() had to be turned into an
    usleep_range() so that on UP systems, we yield the CPU to
    regular boot tasks instead of spinning.

    CC: John Stultz
    CC: Thomas Gleixner
    CC: Len Brown

    Signed-off-by: Arjan van de Ven
    Signed-off-by: John Stultz

    Arjan van de Ven
     

22 Nov, 2011

1 commit


22 Jan, 2011

1 commit

  • If the acpi pm timer throws invalid data, clear pmtmr_ioport
    so the pm timer won't accidentally be used.

    This was found when using Xen where there is a acpi pm reported,
    but gives bogus values, and other code was continuing to try
    to use the pm timer after the initialization failed.

    [jstultz: Catch additional failure and reword changelog message. ]

    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: John Stultz
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Konrad Rzeszutek Wilk
     

27 Jul, 2010

1 commit


17 Jun, 2009

1 commit

  • 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
     

22 Apr, 2009

1 commit

  • Pass clocksource pointer to the read() callback for clocksources. This
    allows us to share the callback between multiple instances.

    [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Magnus Damm
    Acked-by: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     

29 Jan, 2009

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


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

2 commits

  • 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
     
  • Using a flag filed allows to encode more than one information into a variable.
    Preparatory patch for the generic clocksource verification.

    [mingo@elte.hu: convert vmitime.c to the new clocksource flag]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: john stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

11 Dec, 2006

1 commit

  • Mostly changing alignment. Just some general cleanup.

    [akpm@osdl.org: build fix]
    Signed-off-by: Daniel Walker
    Acked-by: John Stultz
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Walker
     

09 Dec, 2006

1 commit

  • This patch re-adds the verify_pmtmr_rate functionality from 2.6.17 that
    I dropped 2.6.18.

    This resolves problems seen on older K6 ASUS boards where the ACPI PM
    timer runs too fast.

    See:
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211902
    http://bugme.osdl.org/show_bug.cgi?id=2375

    Thanks to Ian Campbell for re-reporting this and testing the fix!

    Signed-off-by: John Stultz
    Cc: Andi Kleen
    Cc: Ian Campbell
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     

22 Oct, 2006

1 commit

  • I have an acpi_pm that goes backwards, but it's not intel. I tested the
    verified read and my acpi_pm started to function properly. So I added it
    to the greylist. I'm assuming that's the right spot.

    I also added an unlikely() to the while, cause it seems appropriate.

    Signed-off-by: Daniel Walker
    Acked-by: John Stultz
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Walker
     

27 Jun, 2006

4 commits

  • Add a CLOCKSOURCE_MASK macro to simplify initializing the mask for a struct
    clocksource, and use it to replace literal mask constants in the various
    clocksource drivers.

    Signed-off-by: Jim Cromie
    Acked-by: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • - written on init only, accessed for every timer read --> __read_mostly
    - fix broken sentence

    Signed-off-by: Andreas Mohr
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • As suggested by Roman Zippel, change clocksource functions to use
    clocksource_xyz rather then xyz_clocksource to avoid polluting the
    namespace.

    Signed-off-by: John Stultz
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • Implement the time sources for i386 (acpi_pm, cyclone, hpet, pit, and tsc).
    With this patch, the conversion of the i386 arch to the generic timekeeping
    code should be complete.

    The patch should be fairly straight forward, only adding the new clocksources.

    [hirofumi@mail.parknet.co.jp: acpi_pm cleanup]
    Signed-off-by: John Stultz
    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mundt
    Signed-off-by: John Stultz
    Signed-off-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz