29 Nov, 2010

1 commit


02 Jun, 2010

2 commits


22 May, 2010

3 commits


19 May, 2010

1 commit


08 Dec, 2009

2 commits


20 Aug, 2009

1 commit


26 Jun, 2009

1 commit

  • The macio_dev's created to map devices inside the MacIO ASICs
    don't have proper dma_ops. This causes crashes on some machines
    since the SCSI code calls dma_map_* on our behalf using the
    device we hang from.

    This fixes it by copying the parent PCI device dma_ops into
    the macio_dev when creating it.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     

07 Jan, 2009

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
     

27 Apr, 2007

1 commit


26 Apr, 2007

1 commit


13 Apr, 2007

2 commits


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

  • This patch slightly reworks the new irq code to fix a small design error. I
    removed the passing of the trigger to the map() calls entirely, it was not a
    good idea to have one call do two different things. It also fixes a couple of
    corner cases.

    Mapping a linux virtual irq to a physical irq now does only that. Setting the
    trigger is a different action which has a different call.

    The main changes are:

    - I no longer call host->ops->map() for an already mapped irq, I just return
    the virtual number that was already mapped. It was called before to give an
    opportunity to change the trigger, but that was causing issues as that could
    happen while the interrupt was in use by a device, and because of the
    trigger change, map would potentially muck around with things in a racy way.
    That was causing much burden on a given's controller implementation of
    map() to get it right. This is much simpler now. map() is only called on
    the initial mapping of an irq, meaning that you know that this irq is _not_
    being used. You can initialize the hardware if you want (though you don't
    have to).

    - Controllers that can handle different type of triggers (level/edge/etc...)
    now implement the standard irq_chip->set_type() call as defined by the
    generic code. That means that you can use the standard set_irq_type() to
    configure an irq line manually if you wish or (though I don't like that
    interface), pass explicit trigger flags to request_irq() as defined by the
    generic kernel interfaces. Also, using those interfaces guarantees that
    your controller set_type callback is called with the descriptor lock held,
    thus providing locking against activity on the same interrupt (including
    mask/unmask/etc...) automatically. A result is that, for example, MPIC's
    own map() implementation calls irq_set_type(NONE) to configure the hardware
    to the default triggers.

    - To allow the above, the irq_map array entry for the new mapped interrupt
    is now set before map() callback is called for the controller.

    - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
    for mapping interrupts from the device-tree now also call the separate
    set_irq_type(), and only does so if there is a change in the trigger type.

    - While I was at it, I changed pci_read_irq_line() (which is the helper I
    would expect most archs to use in their pcibios_fixup() to get the PCI
    interrupt routing from the device tree) to also handle a fallback when the
    DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
    the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
    interrupt number from the device. That number is then mapped using the
    default controller, and the trigger is set to level low. That default
    behaviour works for several platforms that don't have a proper interrupt
    tree like Pegasos. If it doesn't work for your platform, then either
    provide a proper interrupt tree from the firmware so that fallback isn't
    needed, or don't call pci_read_irq_line()

    - Add back a bit that got dropped by my main rework patch for properly
    clearing pending IPIs on pSeries when using a kexec

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

    Benjamin Herrenschmidt
     

03 Jul, 2006

1 commit

  • 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
     

02 Jul, 2006

1 commit

  • The 64 bits resource patches did a bit of damage on PowerMac causing a
    buffer overflow in macio_asic and a warning in a sound driver. The
    former is fixed by reverting the sprintf of the bus_id to %08x as it was
    before. The bus_id used for macio devices is always a 32 bits value
    (macio always sits in 32 bits space) and since it's exposed to userland,
    the format of the string shouldn't be changed like that anyway. The
    second by using the proper type for printk.

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

    Benjamin Herrenschmidt
     

01 Jul, 2006

1 commit


28 Jun, 2006

1 commit


23 Mar, 2006

1 commit

  • Remove the assumption that driver_register() returns the number of devices
    bound to the driver. In fact, it returns zero for success or a negative
    error value.

    All callers of macio_register_driver() either ignore the return value or
    return it as the return value of a module_init() function.

    Signed-off-by: Bjorn Helgaas
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Bjorn Helgaas
     

02 Feb, 2006

1 commit

  • Prodive a MODALIAS= enviroment variable for devices on the mac-io bus.
    Change the buffer length counter to not waste memory by advancing the
    pointer for the next string too far. Tested on an ibook1 with modular
    pmac_zilog.

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

    Olaf Hering
     

14 Jan, 2006

1 commit


09 Jan, 2006

3 commits

  • The pre-parsed addrs/n_addrs fields in struct device_node are finally
    gone. Remove the dodgy heuristics that did that parsing at boot and
    remove the fields themselves since we now have a good replacement with
    the new OF parsing code. This patch also fixes a bunch of drivers to use
    the new code instead, so that at least pmac32, pseries, iseries and g5
    defconfigs build.

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

    Benjamin Herrenschmidt
     
  • This updates the OF address parsers to return the IO flags
    indicating the type of address obtained. It also adds a PCI
    call for converting physical addresses that hit IO space into
    into IO tokens, and add routines that return the translated
    addresses into struct resource

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

    Benjamin Herrenschmidt
     
  • Converts the macio_asic core to use the new OF parsing routines instead
    of relying on the pre-parsed values in struct device_node.

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

    Benjamin Herrenschmidt
     

05 Jan, 2006

1 commit


31 Oct, 2005

1 commit

  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

07 Jul, 2005

3 commits

  • This adds the hotplug routine for generating hotplug events when devices
    are seen on the macio bus. It uses the attributed created by the sysfs
    nodes to generate the hotplug environment vars for userspace.

    Since the characters allowed inside the 'compatible' field are NUL
    terminated, they are exported as individual OF_COMPATIBLE_# variables,
    with OF_COMPATIBLE_N maintaining a count of how many there are.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This adds sysfs nodes that the hotplug userspace can use to load the
    appropriate modules.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Changes: The previous versions were built on 2.6.12. 2.6.13-rcX introduced
    a device_attribute parameter to the show functions. Since that
    parameter was treated as the output buffer, memory corruption would
    result, causing Oopsen very quickly.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This converts the usage of struct of_match to struct of_device_id,
    similar to pci_device_id. This allows a device table to be generated,
    which can be parsed by depmod(8) to generate a map file for module
    loading.

    In order for hotplug to work with macio devices, patches to
    module-init-tools and hotplug must be applied. Those patches are
    available at:

    ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

17 Apr, 2005

2 commits

  • I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that
    turned out not to be the case as Russel King pointed out. Here are fixes for
    drivers/macintosh.

    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • 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