26 Jul, 2008

1 commit


21 Jun, 2008

1 commit


30 Apr, 2008

1 commit


05 Apr, 2008

1 commit

  • The commits:

    commit 37a47db8d7f0f38dac5acf5a13abbc8f401707fa
    Author: Balaji Rao
    Date: Wed Jan 30 13:30:03 2008 +0100

    x86: assign IRQs to HPET timers, fix

    and

    commit e3f37a54f690d3e64995ea7ecea08c5ab3070faf
    Author: Balaji Rao
    Date: Wed Jan 30 13:30:03 2008 +0100

    x86: assign IRQs to HPET timers

    have been identified to cause a regression on some platforms due to
    the assignement of legacy IRQs which makes the legacy devices
    connected to those IRQs disfunctional.

    Revert them.

    This fixes http://bugzilla.kernel.org/show_bug.cgi?id=10382

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

30 Jan, 2008

3 commits

  • No users, just ballast

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Looks like IRQ 31 is assigned to timer 3, even without the patch!
    I wonder who wrote the number 31. But the manual says that it is
    zero by default.

    I think we should check whether the timer has been allocated an IRQ before
    proceeding to assign one to it. Here is a patch that does this.

    Signed-off-by: Balaji Rao
    Tested-by: Yinghai Lu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Balaji Rao
     
  • The userspace API for the HPET (see Documentation/hpet.txt) did not work. The
    HPET_IE_ON ioctl was failing as there was no IRQ assigned to the timer
    device. This patch fixes it by allocating IRQs to timer blocks in the HPET.

    arch/x86/kernel/hpet.c | 13 +++++--------
    drivers/char/hpet.c | 45 ++++++++++++++++++++++++++++++++++++++-------
    include/linux/hpet.h | 2 +-
    3 files changed, 44 insertions(+), 16 deletions(-)

    Signed-off-by: Balaji Rao
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Balaji Rao
     

27 Sep, 2007

1 commit

  • Following patch silents;

    ...
    drivers/char/hpet.c:72: warning: 'clocksource_hpet' defined but not used
    drivers/char/hpet.c:81: warning: 'hpet_clocksource' defined but not used
    ...

    build warnings on i386, they appeared after commit 3b2b64fd311c92f2137eb7cee7025794cd854057

    Signed-off-by: S.Çağlar Onur
    Signed-off-by: Linus Torvalds
    --
    drivers/char/hpet.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    S.Çağlar Onur
     

26 Sep, 2007

1 commit

  • If hpet has been initialized before registering hpet driver, the callback
    function of hpet_resources will return the status code of -EBUSY, which is
    not defined in the ACPI exception table. So when ACPI checks the status
    code of callback function, it will report the unknown exception code.

    So the status code in ACPI is used instead of the generic error code in the
    ACPI callback function of hpet_resources.
    For example: -EBUSY is replaced by AE_ALREADY_EXISTS
    -EINVAL is replaced by AE_NO_MEMORY

    http://bugzilla.kernel.org/show_bug.cgi?id=8630

    Signed-off-by: Zhao Yakui
    Signed-off-by: Len Brown

    Zhao Yakui
     

01 Sep, 2007

1 commit

  • The HPET clocksource in drivers/char/hpet.c was written as generic code
    for ia64, but it is not yet ready to replace the native HPET clocksource
    implementations that the i386/x86-64 architectures use.

    On x86[-64], trying to register this clocksource results in potentially
    multiple hpet-based clocksources being registered, and if the ia64 one
    is chosen on x86_64 some users have experienced hangs.

    Eventually all three architectures may end up using the same code, but
    that is not the case right now.

    Cc: John Stultz
    Cc: Tony Luck
    Cc: Paolo Ornati
    Cc: Bob Picco
    Cc: Thomas Gleixner
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

27 Jul, 2007

1 commit


24 Jul, 2007

1 commit


21 Jul, 2007

1 commit


15 Feb, 2007

2 commits

  • The semantic effect of insert_at_head is that it would allow new registered
    sysctl entries to override existing sysctl entries of the same name. Which is
    pain for caching and the proc interface never implemented.

    I have done an audit and discovered that none of the current users of
    register_sysctl care as (excpet for directories) they do not register
    duplicate sysctl entries.

    So this patch simply removes the support for overriding existing entries in
    the sys_sysctl interface since no one uses it or cares and it makes future
    enhancments harder.

    Signed-off-by: Eric W. Biederman
    Acked-by: Ralf Baechle
    Acked-by: Martin Schwidefsky
    Cc: Russell King
    Cc: David Howells
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Andi Kleen
    Cc: Jens Axboe
    Cc: Corey Minyard
    Cc: Neil Brown
    Cc: "John W. Linville"
    Cc: James Bottomley
    Cc: Jan Kara
    Cc: Trond Myklebust
    Cc: Mark Fasheh
    Cc: David Chinner
    Cc: "David S. Miller"
    Cc: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • In the binary sysctl interface the hpet driver was claiming to be the cdrom
    driver. This is a no-no so remove support for the binary interface.

    Signed-off-by: Eric W. Biederman
    Acked-by: Clemens Ladisch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

04 Dec, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

26 Sep, 2006

1 commit


04 Jul, 2006

1 commit

  • Mark the static struct file_operations in drivers/char as const. Making
    them const prevents accidental bugs, and moves them to the .rodata section
    so that they no longer do any false sharing; in addition with the proper
    debug option they are then protected against corruption..

    [akpm@osdl.org: build fix]
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


02 Apr, 2006

1 commit

  • ACPI address space descriptors contain _MIN, _MAX, and _LEN. _MIN and _MAX
    are the bounds within which the region can be moved (this is clarified in
    Table 6-38 of the ACPI 3.0 spec). We should use _LEN to determine the size
    of the region, not _MAX - _MIN + 1.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Bjorn Helgaas
     

15 Feb, 2006

1 commit

  • When the _CRS for a single HPET contains multiple EXTENDED_IRQ resources,
    we overwrote hdp->hd_nirqs every time we found one.

    So the driver worked when all the IRQs were described in a single
    EXTENDED_IRQ resource, but failed when multiple resources were used.
    (Strictly speaking, I think the latter is actually more correct, but both
    styles have been used.)

    Someday we should remove all the ACPI stuff from hpet.c and use PNP driver
    registration instead. But currently PNP_MAX_IRQ is 2, and HPETs often have
    more IRQs. Hint, hint, Adam :-)

    Signed-off-by: Bjorn Helgaas
    Acked-by: Bob Picco
    Cc: Venkatesh Pallipadi
    Cc: Len Brown
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

10 Dec, 2005

1 commit

  • Completed a major overhaul of the Resource Manager code -
    specifically, optimizations in the area of the AML/internal
    resource conversion code. The code has been optimized to
    simplify and eliminate duplicated code, CPU stack use has
    been decreased by optimizing function parameters and local
    variables, and naming conventions across the manager have
    been standardized for clarity and ease of maintenance (this
    includes function, parameter, variable, and struct/typedef
    names.)

    All Resource Manager dispatch and information tables have
    been moved to a single location for clarity and ease of
    maintenance. One new file was created, named "rsinfo.c".

    The ACPI return macros (return_ACPI_STATUS, etc.) have
    been modified to guarantee that the argument is
    not evaluated twice, making them less prone to macro
    side-effects. However, since there exists the possibility
    of additional stack use if a particular compiler cannot
    optimize them (such as in the debug generation case),
    the original macros are optionally available. Note that
    some invocations of the return_VALUE macro may now cause
    size mismatch warnings; the return_UINT8 and return_UINT32
    macros are provided to eliminate these. (From Randy Dunlap)

    Implemented a new mechanism to enable debug tracing for
    individual control methods. A new external interface,
    acpi_debug_trace(), is provided to enable this mechanism. The
    intent is to allow the host OS to easily enable and disable
    tracing for problematic control methods. This interface
    can be easily exposed to a user or debugger interface if
    desired. See the file psxface.c for details.

    acpi_ut_callocate() will now return a valid pointer if a
    length of zero is specified - a length of one is used
    and a warning is issued. This matches the behavior of
    acpi_ut_allocate().

    Signed-off-by: Bob Moore
    Signed-off-by: Len Brown

    Bob Moore
     

07 Dec, 2005

1 commit


31 Oct, 2005

15 commits

  • - Use kzalloc() instead of kmalloc + memset.
    - Clean/fix some printk's.
    - Use NULL for pointers instead of 0.
    - Combine hpet busy searching locations into a function call.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • - Use HPET physical address to detect duplicates, not logical addresses.
    Using logical (mapped) addresses fails to detect duplicates
    because ioremap() returns a new mapped address each time.

    - iounmap() regions when duplicate/busy areas are found.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Allow the ACPI HPET description table to use a resource type of FIXED_MEM32
    for the HPET reource. Use the fixed resoure size of 1 KB for the HPET
    resource as per the HPET spec.

    Signed-off-by: Randy Dunlap
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • When booting, display the timer frequency in Hertz instead of as tick length
    in nanoseconds. Apart from saving a local variable, this makes the message
    more easily comprehensible.

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • In the hpet_ioctl_common() function, devp->hd_hpets is already cached in the
    hpetp variable, so we can use just that.

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • Fix two instances where a function would access the first HPET device instead
    of the current one.

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • Clear the ht_opaque field in the hpet_register() function before searching for
    a free timer to prevent the function from incorrectly assuming that the search
    succeeded afterwards.

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • Fix a division by zero that happened when the HPET_INFO ioctl was called
    before a timer frequency had been set.

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • Fix a wrong memory access in hpet_ioctl_common(). It was not possible to use
    the HPET_INFO ioctl from kernel space because it always called copy_to_user().

    Signed-off-by: Clemens Ladisch
    Cc: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • This patch adds support for shared HPET interrupts.

    The driver previously acknowledged interrupts for both edge and level
    interrupts, but didn't actually allow a shared interrupt in the latter case.

    We use a new per-timer flag to save whether the timer's interrupt might be
    shared, and use it to do the processing required for level interrupts only if
    necessary.

    Signed-off-by: Clemens Ladisch
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • It was only the RTC hardware that restricted interrupt frequencies to a power
    of two. There is no reason to take over this restriction into the HPET
    driver, so remove the offending check.

    Signed-off-by: Clemens Ladisch
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • This patch removes several reads of a timer's config register that serve no
    purpose whatsoever.

    Signed-off-by: Clemens Ladisch
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • The variable hpet_ntimer is never read, so remove it.

    Signed-off-by: Clemens Ladisch
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • On 32-bit architectures, the multiplication in the argument for
    hpet_time_div() often overflows. In the typical case of a 14.32 MHz timer,
    this happens when the desired frequency exceeds 61 Hz.

    To avoid this multiplication, we can precompute and store the hardware
    timer frequency, instead of the period, in the device structure, which
    leaves us with a simple division when computing the number of timer ticks.

    As a side effect, this also removes a theoretical bug where the timer
    interpolator's frequency would be computed as a 32-bit value even if the
    HPET frequency is greater than 2^32 Hz (the HPET spec allows up to 10 GHz).

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch
     
  • Disallow setting an interrupt frequency of zero (which would result in a
    division by zero), and disallow enabling the interrupt when the frequency
    hasn't yet been set (which would use an interrupt period of zero).

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Clemens Ladisch