10 Oct, 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
     

30 Sep, 2006

1 commit


26 Sep, 2006

1 commit

  • BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
    [] show_trace_log_lvl+0x58/0x171
    [] show_trace+0xd/0x10
    [] dump_stack+0x19/0x1b
    [] trace_hardirqs_on+0xa2/0x11e
    [] _spin_unlock_irq+0x22/0x26
    [] rtc_get_rtc_time+0x32/0x176
    [] hpet_rtc_interrupt+0x92/0x14d
    [] handle_IRQ_event+0x20/0x4d
    [] __do_IRQ+0x94/0xef
    [] do_IRQ+0x9e/0xbd
    [] common_interrupt+0x25/0x2c
    DWARF2 unwinder stuck at common_interrupt+0x25/0x2c

    Signed-off-by: Peter Zijlstra
    Acked-by: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

13 Jul, 2006

1 commit

  • Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
    in irq context:

    [ 25.628000] [] trace_hardirqs_on+0xce/0x200
    [ 25.628000] [] _spin_unlock_irq+0x31/0x70
    [ 25.628000] [] rtc_get_rtc_time+0x44/0x1a0
    [ 25.628000] [] hpet_rtc_interrupt+0x21b/0x280
    [ 25.628000] [] handle_IRQ_event+0x31/0x70
    [ 25.628000] [] handle_edge_irq+0xe7/0x210
    [ 25.628000] [] do_IRQ+0x92/0x120
    [ 25.628000] [] common_interrupt+0x25/0x2c

    the call of rtc_get_rtc_time() is highly suspect. At a minimum we
    need the patch below to save/restore hardirq state.

    Signed-off-by: Ingo Molnar
    Cc: Joseph Fannin
    Cc: John Stultz
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

11 Jul, 2006

1 commit

  • Handle memory-mapped chips properly, needed for example on DECstations.
    This support was in Linux 2.4 but for some reason got lost in 2.6. This
    patch is taken directly from the linux-mips repository.

    [akpm@osdl.org: cleanup]
    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Martin Michlmayr
    Cc: Paul Gortmaker
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     

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


24 Jun, 2006

1 commit


20 Jun, 2006

1 commit

  • This ugly hack was long overdue to die.

    It was a way to print out Sparc interrupts in a more freindly format,
    since IRQ numbers were arbitrary opaque 32-bit integers which vectored
    into PIL levels. These 32-bit integers were not necessarily in the
    0-->NR_IRQS range, but the PILs they vectored to were.

    The idea now is that we will increase NR_IRQS a little bit and use a
    virtualreal IRQ number mapping scheme similar to PowerPC.

    That makes this IRQ printing hack irrelevant, and furthermore only a
    handful of drivers actually used __irq_itoa() making it even less
    useful.

    Signed-off-by: David S. Miller

    David S. Miller
     

12 Jan, 2006

1 commit

  • Someone wanted access to this usually unused (and unused by Linux) value
    for the day of week. Existing kernels have the field in the struct but
    return 0 always. This updates the kernel to fill in the field. The usual
    case of 'not set' conveniently is 0.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

07 Nov, 2005

1 commit


06 Sep, 2005

1 commit


05 Aug, 2005

1 commit

  • Since the beginning of July my Opteron box was randomly crashing and
    being rebooted by hardware watchdog. Today it finally did it in front
    of me, and this patch will hopefully fix it.

    The problem is that at the end of June (the 28th, to be exact: commit
    47f176fdaf8924bc83fddcf9658f2fd3ef60d573, "[PATCH] Using msleep()
    instead of HZ") rtc_get_rtc_time was converted to use msleep() instead
    of busy waiting. But rtc_get_rtc_time is used by hpet_rtc_interrupt,
    and scheduling is not allowed during interrupt. So I'm reverting this
    part of original change, replacing msleep() back with busy loop.

    The original code was busy waiting for up to 20ms, but on my hardware in
    the worst case update-in-progress bit was asserted for at most 363
    passes through loop (on 2GHz dual Opteron), much less than even one
    jiffie, not even talking about 20ms. So I changed code to just wait
    only as long as necessary. Otherwise when RTC was set to generate
    8192Hz timer, it stopped doing anything for 20ms (160 pulses were
    skipped!) from time to time, and this is rather suboptimal as far as I
    can tell.

    Signed-off-by: Petr Vandrovec
    Signed-off-by: Linus Torvalds

    Petr Vandrovec
     

29 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds