16 Jun, 2008

26 commits

  • of_node_put is needed before discarding a value received from
    of_find_node_by_name, eg in error handling code.

    The semantic patch that makes the change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    struct device_node *n;
    struct device_node *n1;
    statement S;
    identifier f;
    expression E;
    constant C;
    @@

    n = of_find_node_by_name(...)
    ...
    if (!n) S
    ... when != of_node_put(n)
    when != n1 = f(n,...)
    when != E = n
    when any
    when strict
    (
    + of_node_put(n);
    return -C;
    |
    of_node_put(n);
    |
    n1 = f(n,...)
    |
    E = n
    |
    return ...;
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • of_node_put is needed before discarding a value received from
    of_find_node_by_type, eg in error handling code.

    The semantic patch that makes the change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    struct device_node *n;
    struct device_node *n1;
    struct device_node *n2;
    statement S;
    identifier f1,f2;
    expression E1,E2;
    constant C;
    @@

    n = of_find_node_by_type(...)
    ...
    if (!n) S
    ... when != of_node_put(n)
    when != n1 = f1(n,...)
    when != E1 = n
    when any
    when strict
    (
    + of_node_put(n);
    return -C;
    |
    of_node_put(n);
    |
    n2 = f2(n,...)
    |
    E2 = n
    |
    return ...;
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • of_node_put is needed before discarding a value received from
    of_find_node_by_type, eg in error handling code.

    The semantic patch that makes the change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    struct device_node *n;
    struct device_node *n1;
    struct device_node *n2;
    statement S;
    identifier f1,f2;
    expression E1,E2;
    constant C;
    @@

    n = of_find_node_by_type(...)
    ...
    if (!n) S
    ... when != of_node_put(n)
    when != n1 = f1(n,...)
    when != E1 = n
    when any
    when strict
    (
    + of_node_put(n);
    return -C;
    |
    of_node_put(n);
    |
    n2 = f2(n,...)
    |
    E2 = n
    |
    return ...;
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Julia Lawall
     
  • debugfs_create_file() returns a non-NULL (non-zero) value in case of
    success, not a NULL value.

    This fixes this non-critical boot-time debugging error message:

    [ 1.316386] calling irq_debugfs_init+0x0/0x50
    [ 1.316399] initcall irq_debugfs_init+0x0/0x50 returned -12 after 0 msecs
    [ 1.316411] initcall irq_debugfs_init+0x0/0x50 returned with error code -12

    Signed-off-by: Emil Medve
    Acked-by: Michael Ellerman
    Signed-off-by: Paul Mackerras

    Emil Medve
     
  • lwsync is explicitly defined not to have any effect on the ordering of
    accesses to device memory, so it cannot be used for rmb(). sync appears
    to be the only barrier which fits the bill.

    Signed-off-by: Nick Piggin
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Nick Piggin
     
  • Paul Mackerras
     
  • Paul Mackerras
     
  • There is a delay in the transition to the stopped state for class 2
    interrupts. In some cases, the controlling thread detects the state of
    the spu as running, and goes back to sleep resulting in a hung
    application as the event is missed.

    This change detects the stop condition and re-generates the wakeup event
    after a context save.

    Signed-off-by: Luke Browning
    Signed-off-by: Jeremy Kerr

    Luke Browning
     
  • Time slicing can occur at the same time as spu exception handling
    resulting in the wakeup of the wrong thread.

    This change uses the the spu's register_lock to enforce synchronization
    between bind/unbind and spu exception handling so that they are
    mutually exclusive.

    Signed-off-by: Luke Browning
    Signed-off-by: Jeremy Kerr

    Luke Browning
     
  • According to the CBEA, the SPU dsisr is not updated for class 0
    exceptions.

    spu_stopped() is testing the dsisr that was passed to it from the class
    0 exception handler, so we return a false positive here.

    This patch cleans up the interrupt handler and erroneous tests in
    spu_stopped. It also removes the fields from the csa since it is not
    needed to process class 0 events.

    Signed-off-by: Luke Browning
    Signed-off-by: Jeremy Kerr

    Luke Browning
     
  • If the spu is stopping (ie, the SPU_STATUS_RUNNING bit is still set),
    re-read the register to get the final stopped value.

    Signed-off-by: Luke Browning
    Signed-off-by: Jeremy Kerr

    Luke Browning
     
  • Paul Mackerras
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide-generic: don't probe all legacy ISA IDE ports by default
    ide-cs: fix releasing I/O resources
    ide-cs: fix probing and add warm-plug support
    ide-pmac: remove bogus comment about pmac_ide_setup_device()
    ide-pmac: add ->cable_detect method
    ide-pmac: bugfix for media-bay support rework
    opti621: add PIO 4 support
    opti621: use pre-calculated PIO timings
    opti621: program devices timings separately in ->set_pio_mode
    opti621: use PCI clock value provided by controller
    opti621: remove DMA support
    opti621: disable read prefetch

    Linus Torvalds
     
  • lguest (in rusty's use-tun-ringfd patch) assumes that the
    guest has updated its feature bits before setting its status
    to VIRTIO_CONFIG_S_DRIVER_OK.

    That's pretty reasonable, so let's make it so.

    Signed-off-by: Mark McLoughlin
    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Mark McLoughlin
     
  • We can't probe all legacy ISA IDE ports by default as the resources may be
    occupied by other ISA devices. Add "probe_mask" module parameter and probe
    only first two ISA IDE ports by default leaving the decision about probing
    the rest to the user (systems with ISA ide2-6 should be very, very rare).

    This fixes a regression caused by:

    commit 343a3451e20314d5959b59b992e33fbaadfe52bf
    Author: Bartlomiej Zolnierkiewicz
    Date: Tue Jun 10 20:56:36 2008 +0200

    ide-generic: add missing hwif->chipset setup
    ...

    Reported-by: Mikael Pettersson
    Bisected-by: Mikael Pettersson
    Tested-by: Mikael Pettersson
    Cc: Alan Cox
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • hwif content is already freed after ide_release() call so cache
    hwif->io_ports.{data,ctl}_addr in local variables in ide_detach().

    This fixes post-2.6.25 regression.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Fix probing by using ide_port_scan() and moving "retry loop"
    from ide_config() to idecs_register().

    * Don't fail probe if there are no devices attached to a port.

    * Remove (now redundant) error message from ide_config().

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Cc: Benjamin Herrenschmidt
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Add ->cable_detect method and remove no longer needed pmif->cable_80 flag
    (there is also no need to mask ->udma_mask now).

    This fixes:

    - forced ignoring of cable detection (needed for some CF devices & debug)

    - cable detection for warm-plug

    Cc: Benjamin Herrenschmidt
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Fix bug introduced by:

    commit 2dde7861afa23cd59db83515cb0b810b92b220aa
    Author: Bartlomiej Zolnierkiewicz
    Date: Fri Apr 18 00:46:23 2008 +0200

    ide: rework PowerMac media-bay support (take 2)
    ...

    [ Yeah, I suck. ]

    bay->cd_index shouldn't be changed if IDE devices are not present
    or retry operations won't happen.

    Cc: Benjamin Herrenschmidt
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Add PIO 4 support.

    While at it:

    * Use a single struct ide_port_info instance for OPTi621 and OPTi621X.

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Tested-by: Juergen Kosel
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Use pre-calculated PIO timings in ->set_pio_mode.

    * Remove no longer needed compute_clocks(), cmpt_clk(), struct pio_clocks_s,
    PIO_* defines and OPTI621_DEBUG define.

    There should be no functional changes caused by this patch.

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Tested-by: Juergen Kosel
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * Set drive->drive_data to 'pio + XFER_PIO_0' instead of 'pio',
    then simplify selecting maximum adress setup timing.

    * Remove no longer needed compute_pios() and opti621_port_init_devs().

    * Program devices timings separately in ->set_pio_mode.

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Tested-by: Juergen Kosel
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Use PCI clock value provided by controller instead of depending on
    a default (or user supplied) value.

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Tested-by: Juergen Kosel
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • These controllers don't support DMA.

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Tested-by: Juergen Kosel
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • This fixes 2.6.25 regression (kernel.org bugzilla bug #10723) caused by:

    commit 912fb29a36a7269ac1c4a4df45bc0ac1d2637972
    Author: Bartlomiej Zolnierkiewicz
    Date: Fri Oct 19 00:30:11 2007 +0200

    opti621: always tune PIO
    ...

    Based on a bugreport from Juergen Kosel & inspired by pata_opti.c code.

    Bisected-by: Juergen Kosel
    Tested-by: Juergen Kosel
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

15 Jun, 2008

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: fixup write combine comment in pci_mmap_resource
    x86: PAT export resource_wc in pci sysfs
    x86, pci-dma.c: don't always add __GFP_NORETRY to gfp
    suspend-vs-iommu: prevent suspend if we could not resume
    x86: pci-dma.c: use __GFP_NO_OOM instead of __GFP_NORETRY
    pci, x86: add workaround for bug in ASUS A7V600 BIOS (rev 1005)
    PCI: use dev_to_node in pci_call_probe
    PCI: Correct last two HP entries in the bfsort whitelist

    Linus Torvalds
     

14 Jun, 2008

1 commit


13 Jun, 2008

12 commits