28 Feb, 2013

1 commit


14 Feb, 2013

1 commit


13 Dec, 2012

1 commit

  • Pull ARM SoC updates from Olof Johansson:
    "This contains the bulk of new SoC development for this merge window.

    Two new platforms have been added, the sunxi platforms (Allwinner A1x
    SoCs) by Maxime Ripard, and a generic Broadcom platform for a new
    series of ARMv7 platforms from them, where the hope is that we can
    keep the platform code generic enough to have them all share one mach
    directory. The new Broadcom platform is contributed by Christian
    Daudt.

    Highbank has grown support for Calxeda's next generation of hardware,
    ECX-2000.

    clps711x has seen a lot of cleanup from Alexander Shiyan, and he's
    also taken on maintainership of the platform.

    Beyond this there has been a bunch of work from a number of people on
    converting more platforms to IRQ domains, pinctrl conversion, cleanup
    and general feature enablement across most of the active platforms."

    Fix up trivial conflicts as per Olof.

    * tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (174 commits)
    mfd: vexpress-sysreg: Remove LEDs code
    irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids
    clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids
    irq: versatile: delete dangling variable
    ARM: sunxi: add missing include for mdelay()
    ARM: EXYNOS: Avoid early use of of_machine_is_compatible()
    ARM: dts: add node for PL330 MDMA1 controller for exynos4
    ARM: EXYNOS: Add support for secondary CPU bring-up on Exynos4412
    ARM: EXYNOS: add UART3 to DEBUG_LL ports
    ARM: S3C24XX: Add clkdev entry for camif-upll clock
    ARM: SAMSUNG: Add s3c24xx/s3c64xx CAMIF GPIO setup helpers
    ARM: sunxi: Add missing sun4i.dtsi file
    pinctrl: samsung: Do not initialise statics to 0
    ARM i.MX6: remove gate_mask from pllv3
    ARM i.MX6: Fix ethernet PLL clocks
    ARM i.MX6: rename PLLs according to datasheet
    ARM i.MX6: Add pwm support
    ARM i.MX51: Add pwm support
    ARM i.MX53: Add pwm support
    ARM: mx5: Replace clk_register_clkdev with clock DT lookup
    ...

    Linus Torvalds
     

22 Nov, 2012

8 commits

  • The same condition should be used both when allocating and freeing the
    driver private data. When dev.of_node is non NULL, allocate a new
    private data structure, otherwise use the values from the platform data.

    Reported-by: Fengguang Wu
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • The uio device should not fail on open just because one memory allocation
    fails. The device might export several regions, the failure of some of
    which may or may not be a problem for the user space driver. Failing
    regions will remain unmapped, and successful regions will be mapped and
    exported to user space. Also deals with the case where failing to map
    a region after successfully allocating others would not unmap the
    successfully allocated regions before dying.

    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • DMA_ERROR_CODE is not defined on all architectures and is architecture
    specific. Instead, use the constant, ~0 to indicate unmapped regions.

    Reported-by: Fengguang Wu
    Reported-by: Geert Uytterhoeven
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • Assigning the virtual address returned from dma_alloc_coherent to the the
    internal_addr element of uioinfo produces the following sparse errors since
    internal_addr is a void __iomem * and dma_alloc_coherent returns void *.

    + drivers/uio/uio_dmem_genirq.c:65:39: sparse: incorrect type in assignment (different address spaces)
    drivers/uio/uio_dmem_genirq.c:65:39: expected void [noderef] *internal_addr
    drivers/uio/uio_dmem_genirq.c:65:39: got void *[assigned] addr
    + drivers/uio/uio_dmem_genirq.c:93:17: sparse: incorrect type in argument 3 (different address spaces)
    drivers/uio/uio_dmem_genirq.c:93:17: expected void *vaddr
    drivers/uio/uio_dmem_genirq.c:93:17: got void [noderef] *internal_addr

    Store the void * in the driver's private data instead.

    Reported-by: Fengguang Wu
    Signed-off-by: Damian Hobson-Garcia
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     
  • CONFIG_HOTPLUG is going away as an option so __devexit is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinitdata is no
    longer needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     
  • CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

16 Nov, 2012

1 commit

  • If uio_pdrv[_genirq] is used, the uio maps have currently no name set.
    This patch sets the uio_mem name to the name of the memory resource.

    Signed-off-by: Manuel Traut
    Reported-by: Stefan Staedtler
    Tested-by: Stefan Staedtler
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Manuel Traut
     

27 Oct, 2012

1 commit


25 Oct, 2012

1 commit

  • This device extends the uio_pdrv_genirq driver to provide limited
    dynamic memory allocation for UIO devices. This allows UIO devices
    to use CMA and IOMMU allocated memory regions. This driver is based
    on the uio_pdrv_genirq driver and provides the same generic interrupt
    handling capabilities. Like uio_prdv_genirq,
    a fixed number of memory regions, defined in the platform device's
    .resources field are exported to userpace. This driver adds the ability
    to export additional regions whose number and size are known at boot time,
    but whose memory is not allocated until the uio device file is opened for
    the first time. When the device file is closed, the allocated memory block
    is freed. Physical (DMA) addresses for the dynamic regions are provided to
    the userspace via /sys/class/uio/uioX/maps/mapY/addr in the same way as
    static addresses are when the uio device file is open, when no processes
    are holding the device file open, the address returned to userspace is
    DMA_ERROR_CODE.

    Signed-off-by: Damian Hobson-Garcia
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Damian Hobson-Garcia
     

09 Oct, 2012

1 commit

  • A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
    currently it lost original meaning but still has some effects:

    | effect | alternative flags
    -+------------------------+---------------------------------------------
    1| account as reserved_vm | VM_IO
    2| skip in core dump | VM_IO, VM_DONTDUMP
    3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
    4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

    This patch removes reserved_vm counter from mm_struct. Seems like nobody
    cares about it, it does not exported into userspace directly, it only
    reduces total_vm showed in proc.

    Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

    remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
    remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

    [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
    Signed-off-by: Konstantin Khlebnikov
    Cc: Alexander Viro
    Cc: Carsten Otte
    Cc: Chris Metcalf
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: H. Peter Anvin
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: James Morris
    Cc: Jason Baron
    Cc: Kentaro Takeda
    Cc: Matt Helsley
    Cc: Nick Piggin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Suresh Siddha
    Cc: Tetsuo Handa
    Cc: Venkatesh Pallipadi
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

15 May, 2012

1 commit


12 Jan, 2012

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     

07 Jan, 2012

2 commits

  • The new PCI API provides both generic probing for 2.3 masking support
    and check&mask in the interrupt handler.

    Acked-by: Michael S. Tsirkin
    Signed-off-by: Jan Kiszka
    Signed-off-by: Jesse Barnes

    Jan Kiszka
     
  • pci_block_user_cfg_access was designed for the use case that a single
    context, the IPR driver, temporarily delays user space accesses to the
    config space via sysfs. This assumption became invalid by the time
    pci_dev_reset was added as locking instance. Today, if you run two loops
    in parallel that reset the same device via sysfs, you end up with a
    kernel BUG as pci_block_user_cfg_access detect the broken assumption.

    This reworks the pci_block_user_cfg_access to a sleeping service
    pci_cfg_access_lock and an atomic-compatible variant called
    pci_cfg_access_trylock. The former not only blocks user space access as
    before but also waits if access was already locked. The latter service
    just returns false in this case, allowing the caller to resolve the
    conflict instead of raising a BUG.

    Adaptions of the ipr driver were originally written by Brian King.

    Acked-by: Brian King
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Jan Kiszka
    Signed-off-by: Jesse Barnes

    Jan Kiszka
     

27 Nov, 2011

1 commit


01 Nov, 2011

1 commit


19 Oct, 2011

1 commit

  • To support >32-bit physical addresses for UIO_MEM_PHYS type we need to
    extend the width of 'addr' in struct uio_mem. Numerous platforms like
    embedded PPC, ARM, and X86 have support for systems with larger physical
    address than logical.

    Since 'addr' may contain a physical, logical, or virtual address the
    easiest solution is to just change the type to 'phys_addr_t' which
    should always be greater than or equal to the sizeof(void *) such that
    it can properly hold any of the address types.

    For physical address we can support up to a 44-bit physical address on a
    typical 32-bit system as we utilize remap_pfn_range() for the mapping of
    the memory region and pfn's are represnted by shifting the address by
    the page size (typically 4k).

    Signed-off-by: Kai Jiang
    Signed-off-by: Minghuan Lian
    Signed-off-by: Kumar Gala
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Kai Jiang
     

23 Aug, 2011

3 commits

  • Remove the __devinitconst to fix the section mismatch.

    WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in
    reference from the variable uio_pdrv_genirq to the variable
    .devinit.rodata:uio_of_genirq_match
    The variable uio_pdrv_genirq references
    the variable __devinitconst uio_of_genirq_match
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the
    variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
    *_console

    Signed-off-by: Wanlong Gao
    Signed-off-by: Greg Kroah-Hartman

    Wanlong Gao
     
  • Remove one *goto* label in uio.c.

    Signed-off-by: Wanlong Gao
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Wanlong Gao
     
  • The spin_lock in uio_pci_generic.c is only used in the interrupt
    handler, which cannot be executed twice at the same time.
    That makes the lock rather pointless. This patch removes it.

    Cc: "Michael S. Tsirkin"
    Cc: Chris Wright
    Cc: Jesse Barnes
    Cc: Sebastian Andrzej Siewior
    Cc: Anthony Foiani
    Reported-by: Anthony Foiani
    Reported-by: Sebastian Andrzej Siewior
    Signed-off-by: Hans J. Koch
    Acked-by: Michael S. Tsirkin
    Signed-off-by: Greg Kroah-Hartman

    Hans J. Koch
     

26 Jul, 2011

1 commit

  • …/gregkh/driver-core-2.6

    * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    updated Documentation/ja_JP/SubmittingPatches
    debugfs: add documentation for debugfs_create_x64
    uio: uio_pdrv_genirq: Add OF support
    firmware: gsmi: remove sysfs entries when unload the module
    Documentation/zh_CN: Fix messy code file email-clients.txt
    driver core: add more help description for "path to uevent helper"
    driver-core: modify FIRMWARE_IN_KERNEL help message
    driver-core: Kconfig grammar corrections in firmware configuration
    DOCUMENTATION: Replace create_device() with device_create().
    DOCUMENTATION: Update overview.txt in Doc/driver-model.
    pti: pti_tty_install documentation mispelling.

    Linus Torvalds
     

09 Jul, 2011

1 commit

  • Adding OF binding to genirq.
    Version string is setup to the "devicetree".

    Compatible string is not setup for now but you can add your
    custom compatible string to uio_of_genirq_match structure.

    For example with "vendor,device" compatible string:
    static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
    { .compatible = "vendor,device", },
    { /* empty for now */ },
    };

    Signed-off-by: Michal Simek
    Signed-off-by: Hans J. Koch
    Reviewed-by: Wolfram Sang
    CC: Hans J. Koch
    CC: Arnd Bergmann
    CC: John Williams
    CC: Grant Likely
    CC: Wolfram Sang
    Signed-off-by: Greg Kroah-Hartman

    Hans J. Koch
     

10 Jun, 2011

1 commit


20 Apr, 2011

4 commits

  • The uioinfo should be cleaned up when uninstall, otherwise re-install
    failure of uio_pdrv_genirq.ko will happen.

    Signed-off-by: Jie Zhou
    Signed-off-by: Aisheng Dong
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Jie Zhou
     
  • The number of uio devices that could be used should be less than
    UIO_MAX_DEVICES by design, and this work guards any cases in which id
    more than UIO_MAX_DEVICES is utilized.

    Signed-off-by: Hillf Danton
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Hillf Danton
     
  • When finding mm index for vma it looks more flexible that the mm could
    be sparse, and both the size of mm and the pgoff of vma could give
    correct selection.

    Signed-off-by: Hillf Danton
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Hillf Danton
     
  • This patch adds support for Hilscher / IBHsoftec netPLC cards to uio_netx userspace IO driver.

    Changes from v1 -> v2:
    Fixed whitespace errors reported by scripts/checkpatch.pl which were caused by email client.

    Signed-off-by: Daniel Trautmann
    Signed-off-by: "Hans J. Koch"
    Signed-off-by: Greg Kroah-Hartman

    Daniel Trautmann
     

31 Mar, 2011

1 commit


08 Mar, 2011

1 commit

  • This patch implements PRUSS (Programmable Real-time Unit Sub System)
    UIO driver which exports SOC resources associated with PRUSS like
    I/O, memories and IRQs to user space. PRUSS is dual 32-bit RISC
    processors which is efficient in performing embedded tasks that
    require manipulation of packed memory mapped data structures and
    handling system events that have tight real time constraints. This
    driver is currently supported on Texas Instruments DA850, AM18xx and
    OMAP-L138 devices.
    For example, PRUSS runs firmware for real-time critical industrial
    communication data link layer and communicates with application stack
    running in user space via shared memory and IRQs.

    Signed-off-by: Pratheesh Gangadhar
    Reviewed-by: Thomas Gleixner
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Pratheesh Gangadhar
     

11 Nov, 2010

1 commit


25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

23 Oct, 2010

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (31 commits)
    driver core: Display error codes when class suspend fails
    Driver core: Add section count to memory_block struct
    Driver core: Add mutex for adding/removing memory blocks
    Driver core: Move find_memory_block routine
    hpilo: Despecificate driver from iLO generation
    driver core: Convert link_mem_sections to use find_memory_block_hinted.
    driver core: Introduce find_memory_block_hinted which utilizes kset_find_obj_hinted.
    kobject: Introduce kset_find_obj_hinted.
    driver core: fix build for CONFIG_BLOCK not enabled
    driver-core: base: change to new flag variable
    sysfs: only access bin file vm_ops with the active lock
    sysfs: Fail bin file mmap if vma close is implemented.
    FW_LOADER: fix kconfig dependency warning on HOTPLUG
    uio: Statically allocate uio_class and use class .dev_attrs.
    uio: Support 2^MINOR_BITS minors
    uio: Cleanup irq handling.
    uio: Don't clear driver data
    uio: Fix lack of locking in init_uio_class
    SYSFS: Allow boot time switching between deprecated and modern sysfs layout
    driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices
    ...

    Linus Torvalds
     
  • Instead of adding uio class attributes manually after the uio device has
    been created and we have sent a uevent to userspace, use the class
    attribute mechanism. This removes races and makes the code simpler.

    At the same time don't bother to dynamically allocate a struct class for
    uio, just declare one statically. Less code is needed and it is easier
    to set the class parameters.tune the class

    Signed-off-by: Eric W. Biederman
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • register_chrdev limits uio devices to 256 minor numbers which causes
    problems on one system I have with 384+ uio devices. So instead set
    UIO_MAX_DEVICES to the maximum number of minors and use
    alloc_chrdev_region to reserve the uio minors.

    The final result is that the code works the same but the uio driver now
    supports any minor the idr allocator comes up with.

    Signed-off-by: Eric W. Biederman
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     
  • Change the value of UIO_IRQ_NONE -2 to 0. 0 is well defined in the rest
    of the kernel as the value to indicate an irq has not been assigned.

    Update the calls to request_irq and free_irq to only ignore UIO_IRQ_NONE
    and UIO_IRQ_CUSTOM allowing the rest of the kernel's possible irq
    numbers to be used.

    Signed-off-by: Eric W. Biederman
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman