13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

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

    Arjan van de Ven
     

14 Dec, 2006

1 commit

  • All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
    equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
    ordering of the first two arguments are fixed.

    Signed-off-by: Robert P. J. Day
    Cc: Jeff Garzik
    Cc: Alan Cox
    Cc: Dominik Brodowski
    Cc: Adam Belay
    Cc: James Bottomley
    Cc: Greg KH
    Cc: Mark Fasheh
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

06 Dec, 2006

1 commit


04 Dec, 2006

1 commit

  • This patch first splits of_device.c and of_platform.c, the later containing
    the bits relative to of_platform_device's. On the "breaks" side of things,
    drivers uisng of_platform_device(s) need to include asm/of_platform.h now
    and of_(un)register_driver is now of_(un)register_platform_driver.

    In addition to a few utility functions to locate of_platform_device(s),
    the main new addition is of_platform_bus_probe() which allows the platform
    code to trigger an automatic creation of of_platform_devices for a whole
    tree of devices.

    The function acts based on the type of the various "parent" devices encountered
    from a provided root, using either a default known list of bus types that can be
    "probed" or a passed-in list. It will only register devices on busses matching
    that list, which mean that typically, it will not register PCI devices, as
    expected (since they will be picked up by the PCI layer).

    This will be used by Cell platforms using 4xx-type IOs in the Axon bridge
    and can be used by any embedded-type device as well.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

22 Nov, 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
     

01 Oct, 2006

1 commit


01 Aug, 2006

1 commit


31 Jul, 2006

1 commit

  • Now that get_property() returns a void *, there's no need to cast its
    return value. Also, treat the return value as const, so we can
    constify get_property later.

    powermac platform & macintosh driver changes.

    Built for pmac32_defconfig, g5_defconfig

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Paul Mackerras

    Jeremy Kerr
     

11 Jul, 2006

1 commit

  • The SMU driver tries to map an interrupt from the device-tree before the
    interrupt controllers in the machine have been enumerated. This doesn't work
    properly and cause machines like the Quad g5 to fail booting later on when
    some drivers waits endlessly for an SMU request to complete. This is the
    second problem preventing boot on the Quad g5. This fixes it and also makes
    the SMU driver a bit more resilient to not having an interrupt.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

03 Jul, 2006

2 commits

  • This adds the new irq remapper core and removes the old one. Because
    there are some fundamental conflicts with the old code, like the value
    of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
    etc..., this commit also changes the relevant platform and driver code
    over to use the new remapper (so as not to cause difficulties later
    in bisecting).

    This patch removes the old pre-parsing of the open firmware interrupt
    tree along with all the bogus assumptions it made to try to renumber
    interrupts according to the platform. This is all to be handled by the
    new code now.

    For the pSeries XICS interrupt controller, a single remapper host is
    created for the whole machine regardless of how many interrupt
    presentation and source controllers are found, and it's set to match
    any device node that isn't a 8259. That works fine on pSeries and
    avoids having to deal with some of the complexities of split source
    controllers vs. presentation controllers in the pSeries device trees.

    The powerpc i8259 PIC driver now always requests the legacy interrupt
    range. It also has the feature of being able to match any device node
    (including NULL) if passed no device node as an input. That will help
    porting over platforms with broken device-trees like Pegasos who don't
    have a proper interrupt tree.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • Signed-off-by: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

01 Jul, 2006

1 commit


27 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Cc: Dave Jones
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: Jens Axboe
    Cc: Neil Brown
    Acked-by: Alasdair G Kergon
    Cc: Greg KH
    Cc: Dominik Brodowski
    Cc: Adam Belay
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

23 Mar, 2006

1 commit


09 Jan, 2006

3 commits

  • This is the continuation of the previous patch. This one removes the old
    PowerMac i2c drivers (i2c-keywest and i2c-pmac-smu) and replaces them
    both with a single stub driver that uses the new PowerMac low i2c layer.

    Now that i2c-keywest is gone, the low-i2c code is extended to support
    interrupt driver transfers. All i2c busses now appear as platform
    devices. Compatibility with existing drivers should be maintained as the
    i2c bus names have been kept identical, except for the SMU bus but in
    that later case, all users has been fixed.

    With that patch added, matching a device node to an i2c_adapter becomes
    trivial.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • This is the first part of a rework of the PowerMac i2c code. It
    completely reworks the "low_i2c" layer. It is now more flexible,
    supports KeyWest, SMU and PMU i2c busses, and provides functions to
    match device nodes to i2c busses and adapters.

    This patch also extends & fix some bugs in the SMU driver related to i2c
    support and removes the clock spreading hacks from the pmac feature code
    rather than adapting them to the new API since they'll be replaced by
    the platform function code completely in patch 3/5

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • This adds some very basic support for the new machines, including the
    Quad G5 (tested), and other new dual core based machines and iMac G5
    iSight (untested). This is still experimental ! There is no thermal
    control yet, there is no proper handing of MSIs, etc.. but it
    boots, I have all 4 cores up on my machine. Compared to the previous
    version of this patch, this one adds DART IOMMU support for the U4
    chipset and thus should work fine on setups with more than 2Gb of RAM.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

08 Nov, 2005

3 commits


12 Oct, 2005

1 commit


30 Sep, 2005

1 commit

  • The SMU driver has a small mistake in the locking of the interrupt code,
    if polled access and interrupt access race, interrupt may take a lock
    and return without releasing it. This fixes it. With that patch, the
    driver is rock solid with my experimental thermal control (which bangs
    it pretty hard) racing with real time clock and cpufreq handling.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

27 Sep, 2005

1 commit


23 Sep, 2005

1 commit

  • The SMU is the "system controller" chip used by Apple recent G5 machines
    including the iMac G5. It drives things like fans, i2c busses, real time
    clock, etc...

    The current kernel contains a very crude driver that doesn't do much more
    than reading the real time clock synchronously. This is a completely
    rewritten driver that provides interrupt based command queuing, a userland
    interface, and an i2c/smbus driver for accessing the devices hanging off
    the SMU i2c busses like temperature sensors. This driver is a basic block
    for upcoming work on thermal control for those machines, among others.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: Jean Delvare
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

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