09 Jan, 2012

1 commit


08 Mar, 2010

1 commit


28 Nov, 2009

2 commits


12 Oct, 2009

1 commit


25 Mar, 2009

1 commit


30 Nov, 2008

1 commit

  • When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
    so there's no point in publishing the prototypes via asm/dma.h, nor
    including the machine dependent parts of that API.

    This allows us to remove a lot of mach/dma.h files which don't contain
    any useful code. Unfortunately though, some platforms put their own
    private non-ISA definitions into mach/dma.h, so we leave these behind
    and fix the appropriate #include statments.

    Signed-off-by: Russell King

    Russell King
     

07 Aug, 2008

2 commits


25 Jan, 2008

1 commit


20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

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
     

12 Jul, 2006

1 commit

  • Patch from Pavel Machek

    From: Dirk Opfer

    Fix ucb initialization on collie. Wrong frequency was used and that
    led to things not working quite correctly. (I had to actually disable
    checks in my tree to get it to boot). It now includes all the
    neccessary parts to get it to compile :-).

    Signed-off-by: Pavel Machek
    Acked-by: Richard Purdie
    Signed-off-by: Russell King

    Pavel Machek
     

03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


26 Jun, 2006

1 commit

  • While reviewing the IRQ autoprobing code i found the attached buglet.
    probe_irq_on()/off() calls must always be in pairs, because the generic IRQ
    code uses a global semaphore to serialize all autoprobing activites.
    (which does make sense) The ARM code's probe_irq_*() implementation does
    not do this, but if this driver is ever used on another platform, this bug
    might bite.

    (It probably does not trigger in practice, because a zero probing mask
    returned should be rare - but still.)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Russell King

    Ingo Molnar
     

13 Jan, 2006

1 commit


09 Jan, 2006

1 commit

  • Some ARM platforms have the ability to program the interrupt controller to
    detect various interrupt edges and/or levels. For some platforms, this is
    critical to setup correctly, particularly those which the setting is dependent
    on the device.

    Currently, ARM drivers do (eg) the following:

    err = request_irq(irq, ...);

    set_irq_type(irq, IRQT_RISING);

    However, if the interrupt has previously been programmed to be level sensitive
    (for whatever reason) then this will cause an interrupt storm.

    Hence, if we combine set_irq_type() with request_irq(), we can then safely set
    the type prior to unmasking the interrupt. The unfortunate problem is that in
    order to support this, these flags need to be visible outside of the ARM
    architecture - drivers such as smc91x need these flags and they're
    cross-architecture.

    Finally, the SA_TRIGGER_* flag passed to request_irq() should reflect the
    property that the device would like. The IRQ controller code should do its
    best to select the most appropriate supported mode.

    Signed-off-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     

11 Oct, 2005

1 commit


06 Oct, 2005

1 commit

  • drivers/mfd/ucb1x00-core.c:555: error: static declaration of 'ucb1x00_class' follows non-static declaration
    drivers/mfd/ucb1x00.h:109: error: previous declaration of 'ucb1x00_class' was here

    Since ucb1x00_class isn't used by anything, remove the extern
    declaration and the symbol export.

    Signed-off-by: Russell King

    Russell King
     

11 Sep, 2005

1 commit

  • Add the core device support code for the Philips UCB1200 and
    UCB1300 devices. Also includes the following from Pavel:

    This fixes u32 vs. pm_message_t confusion and uses cleaner
    try_to_freeze() [fixing compilation as a side-effect on newer
    kernels.]

    Signed-off-by: Pavel Machek
    Signed-off-by: Russell King

    Russell King