09 Jan, 2012

1 commit

  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

08 Jan, 2012

2 commits

  • Changes queued in gpio/next for the start of the 3.3 merge window

    * tag 'gpio-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6:
    gpio: Add decode of WM8994 GPIO configuration
    gpio: Convert GPIO drivers to module_platform_driver
    gpio: Fix typo in comment in Samsung driver
    gpio: Explicitly index samsung_gpio_cfgs
    gpio: Add Linus Walleij as gpio co-maintainer
    of: Add device tree selftests
    of: create of_phandle_args to simplify return of phandle parsing data
    gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()
    gpio/microblaze: Eliminate duplication of of_get_named_gpio_flags()
    gpiolib: output basic details and consolidate gpio device drivers
    pch_gpio: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
    pch_gpio: Support new device LAPIS Semiconductor ML7831 IOH
    spi/pl022: make the chip deselect handling thread safe
    spi/pl022: add support for pm_runtime autosuspend
    spi/pl022: disable the PL022 block when unused
    spi/pl022: move device disable to workqueue thread
    spi/pl022: skip default configuration before suspending
    spi/pl022: fix build warnings
    spi/pl022: only enable RX interrupts when TX is complete

    Linus Torvalds
     
  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

1 commit

  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jan, 2012

4 commits

  • Add support for vmpic-msi nodes to the fsl_msi driver. The MSI is
    virtualized by the hypervisor, so the vmpic-msi does not contain a 'reg'
    property. Instead, the driver uses hcalls.

    Add support for the "msi-address-64" property to the fsl_pci driver.
    The Freescale hypervisor typically puts the virtualized MSIIR register
    in the page after the end of DDR, so we extend the DDR ATMU to cover it.
    Any other location for MSIIR is not supported, for now.

    Signed-off-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Timur Tabi
     
  • rmu needs to be freed before leaving the function in an error case.

    A simplified version of the semantic match that finds the problem is as
    follows: (http://coccinelle.lip6.fr)

    //
    @r exists@
    local idexpression x;
    statement S;
    identifier f1;
    position p1,p2;
    expression *ptr != NULL;
    @@

    x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    x->f1
    ...>
    (
    return \(0\|\|ptr\);
    |
    return@p2 ...;
    )

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@

    print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Kumar Gala

    Julia Lawall
     
  • Integrated Flash Controller supports various flashes like NOR, NAND
    and other devices using NOR, NAND and GPCM Machine available on it.
    IFC supports four chip selects.

    Signed-off-by: Dipen Dudhat
    Signed-off-by: Scott Wood
    Signed-off-by: Li Yang
    Signed-off-by: Liu Shuo
    Signed-off-by: Prabhakar Kushwaha
    Signed-off-by: Kumar Gala

    Prabhakar Kushwaha
     
  • There is an issue on FSL-BookE 64-bit devices (P5020) in which PCIe
    devices that are capable of doing 64-bit DMAs (like an Intel e1000) do
    not function and crash the kernel if we have >4G of memory in the system.

    The reason is that the existing code only sets up one inbound window for
    access to system memory across PCIe. That window is limited to a 32-bit
    address space. So on systems we'll end up utilizing SWIOTLB for dma
    mappings. However SWIOTLB dma ops implement dma_alloc_coherent() as
    dma_direct_alloc_coherent(). Thus we can end up with dma addresses that
    are not accessible because of the inbound window limitation.

    We could possibly set the SWIOTLB alloc_coherent op to
    swiotlb_alloc_coherent() however that does not address the issue since
    the swiotlb_alloc_coherent() will behave almost identical to
    dma_direct_alloc_coherent() since the devices coherent_dma_mask will be
    greater than any address allocated by swiotlb_alloc_coherent() and thus
    we'll never bounce buffer it into a range that would be dma-able.

    The easiest and best solution is to just make it so that a 64-bit
    capable device is able to DMA to any internal system address.

    We accomplish this by opening up a second inbound window that maps all
    of memory above the internal SoC address width so we can set it up to
    access all of the internal SoC address space if needed.

    We than fixup the dma_ops and dma_offset for PCIe devices with a dma
    mask greater than the maximum internal SoC address.

    Signed-off-by: Kumar Gala

    Kumar Gala
     

04 Jan, 2012

1 commit

  • Move invalidate_bdev, block_sync_page into fs/block_dev.c. Export
    kill_bdev as well, so brd doesn't have to open code it. Reduce
    buffer_head.h requirement accordingly.

    Removed a rather large comment from invalidate_bdev, as it looked a bit
    obsolete to bother moving. The small comment replacing it says enough.

    Signed-off-by: Nick Piggin
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Al Viro
     

22 Dec, 2011

3 commits

  • The sysdev.h file should not be needed by any in-kernel code, so remove
    the .h file from these random files that seem to still want to include
    it.

    The sysdev code will be going away soon, so this include needs to be
    removed no matter what.

    Cc: Jiandong Zheng
    Cc: Scott Branden
    Cc: Russell King
    Cc: Kukjin Kim
    Cc: David Brown
    Cc: Daniel Walker
    Cc: Bryan Huntsman
    Cc: Ben Dooks
    Cc: Wan ZongShun
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Guan Xuetao
    Cc: "Venkatesh Pallipadi
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Grant Likely
    Cc: Richard Purdie
    Cc: Matthew Garrett
    Signed-off-by: Kay Sievers

    Kay Sievers
     
  • After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Cc: Timur Tabi
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

16 Dec, 2011

1 commit


13 Dec, 2011

1 commit


09 Dec, 2011

4 commits


08 Dec, 2011

1 commit

  • I have an intermittent kdump fail where the hypervisor fails an H_EOI.
    As a result our CPPR is never reset to 0xff and we no longer accept
    interrupts.

    This patch calls icp_hv_set_cppr to reset the CPPR if H_EOI fails,
    fixing the kdump fail.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     

07 Dec, 2011

9 commits

  • The Cell and PowerMac platforms use virtually identical cascaded-IRQ
    setup code, so just merge it into the core. Ideally this code would
    trigger automatically when an MPIC device-node specifies an "interrupts"
    property, perhaps even enabling MPIC_SECONDARY along the way.

    Unfortunately, Benjamin Herrenschmidt has had bad experiences in the
    past with the quality of Apple PowerMac device-trees, so to be safe we
    will only try to parse out an IRQ if the MPIC_SECONDARY flag is set by
    the caller.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • Store the node pointer in the MPIC during initialization so that all of
    the later operational code can just reuse the cached pointer.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • There's not really any reason to have this one-liner in a separate
    static inline function, given that all the other similar tests are
    already in the alloc_mpic() code.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • Don't open-code the OpenFirmware "dcr-reg" property lookup trying to map
    DCR resources. This makes the code a bit easier to read.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • It turns out that there are only 2 in-tree platforms which use MPICs
    which are not "primary": IBM Cell and PowerMac. To reduce the
    complexity of the typical board setup code, invert the MPIC_PRIMARY bit
    into MPIC_SECONDARY.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • Almost all PowerPC platforms use a standard "open-pic" device node so
    the mpic_alloc() function now accepts NULL for the device-node. This
    will cause it to perform a default search with of_find_matching_node().

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • The MPIC code can already perform an automatic OF address translation
    step as part of mpic_alloc(), but several boards need to use that base
    address when they perform mpic_assign_isu().

    The easiest solution is to save the computed physical address into the
    "struct mpic" for later use by the board code.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • All of the existing callers of mpic_alloc() pass in a non-NULL
    device-node pointer, so the checks for a NULL device-node may be
    removed.

    Signed-off-by: Kyle Moffett
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     
  • Instead of using the open-coded "reg" property lookup and address
    translation in mpic_alloc(), directly call of_address_to_resource().
    This includes various workarounds for special cases which the naive
    of_address_translate() does not.

    Afterwards it is possible to remove the copiously copy-pasted calls to
    of_address_translate() from the 85xx/86xx/powermac platforms.

    Signed-off-by: Kyle Moffett
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Grant Likely
    Cc: Kumar Gala
    Signed-off-by: Benjamin Herrenschmidt

    Kyle Moffett
     

28 Nov, 2011

1 commit

  • During kdump stress testing I sometimes see the kdump kernel panic
    with:

    Interrupt 0x306 (real) is invalid, disabling it.
    Kernel panic - not syncing: bad return code EOI - rc = -4, value=ff000306

    Instead of panicing print the error message, dump the stack the first
    time it happens and continue on. Add some more information to the
    debug messages as well.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     

25 Nov, 2011

3 commits


24 Nov, 2011

7 commits

  • On Freescale parts with multiple MSI controllers, the controllers are
    combined into one "pool" of interrupts. Whenever a device requests an MSI
    interrupt, the next available interrupt from the pool is selected,
    regardless of which MSI controller the interrupt is from. This works
    because each PCI bus has an ATMU to all of CCSR, so any PCI device can
    access any MSI interrupt register.

    The fsl,msi property is used to specify that a given PCI bus should only
    use a specific MSI device. This is necessary, for example, with the
    Freescale hypervisor, because the MSI devices are assigned to specific
    partitions.

    Ideally, we'd like to be able to assign MSI devices to PCI busses within
    the MSI or PCI layers. However, there does not appear to be a mechanism
    to do that. Whenever the MSI layer wants to allocate an MSI interrupt to
    a PCI device, it just calls arch_setup_msi_irqs(). It would be nice if we
    could register an MSI device with a specific PCI bus.

    So instead we remember the phandles of each MSI device, and we use that to
    limit our search for an available interrupt. Whenever we are asked to
    allocate a new interrupt for a PCI device, we check the fsl,msi property
    of the PCI bus for that device. If it exists, then as we are looping over
    all MSI devices, we skip the ones that don't have a matching phandle.

    Signed-off-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Timur Tabi
     
  • Power supply for LBC registers is off when system go to deep-sleep state.
    We save the values of registers before suspend and restore to registers
    after resume.

    We removed the last two reservation arrays from struct fsl_lbc_regs for
    allocating less memory and minimizing the memcpy size.

    Signed-off-by: Jiang Yutang
    Signed-off-by: Jia Hongtao
    Signed-off-by: Li Yang
    Signed-off-by: Kumar Gala

    Jia Hongtao
     
  • Usually, freescale rapidio endpoint can support one or two 1x or 4X
    LP-Serial link interfaces, and rapidio message transactions can be
    implemented by two message units. This adds the support of two
    rapidio ports and initializes message unit 0 and message unit 1. And
    these ports and message units can work simultaneously.

    Signed-off-by: Li Yang
    Signed-off-by: Jin Qing
    Signed-off-by: Liu Gang
    Acked-by: Alexandre Bounine
    Signed-off-by: Kumar Gala

    Liu Gang
     
  • The Freescale PowerPC RapidIO controller consists of a RapidIO endpoint and
    a RapidIO message unit(RMU). Or use RapidIO message manager(RMan) to
    replace the RMU in DPAA architecture. Therefore, we should split the code
    into two function modules according to the hardware architecture. Add new
    struct for RMU module, and new initialization function to set up RMU
    module. This policy is very conducive to adding new module like RMan, or
    adding multi-ports or message units support.

    Signed-off-by: Lian Minghuan
    Signed-off-by: Liu Gang
    Acked-by: Alexandre Bounine
    Signed-off-by: Kumar Gala

    Liu Gang
     
  • At this point, ehv_pic has been allocated but not stored anywhere, so it
    should be freed before leaving the function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @exists@
    local idexpression x;
    statement S,S1;
    expression E;
    identifier fl;
    expression *ptr != NULL;
    @@

    x = \(kmalloc\|kzalloc\|kcalloc\)(...);
    ...
    if (x == NULL) S
    }
    when any
    when != true x == NULL
    x->fl
    ...>
    (
    if (x == NULL) S1
    |
    if (...) { ... when != x
    when forall
    (
    return \(0\|\|ptr\);
    |
    * return ...;
    )
    }
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Julia Lawall
     
  • If Freescale LBC driver fails to initialise itself from device tree, then
    internal structure is freed only but not NULL-fied. As result functions
    fsl_lbc_find() after checking the structure is not NULL are trying to
    access device registers.

    Signed-off-by: Alexandre Rusev
    Signed-off-by: Kumar Gala

    Alexandre Rusev
     
  • QE_General4 should only round up the divisor iff divisor is > 3.
    Rounding up lower divisors makes the error too big, causing USB
    on MPC832x to fail.

    Signed-off-by: Joakim Tjernlund
    Acked-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Joakim Tjernlund
     

16 Nov, 2011

1 commit