16 Dec, 2009

1 commit


13 Nov, 2009

1 commit


12 Oct, 2009

1 commit


28 Sep, 2009

1 commit


19 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (262 commits)
    sh: mach-ecovec24: Add user debug switch support
    sh: Kill off unused se_skipped in alignment trap notification code.
    sh: Wire up HAVE_SYSCALL_TRACEPOINTS.
    video: sh_mobile_lcdcfb: use both register sets for display panning
    video: sh_mobile_lcdcfb: implement display panning
    sh: Fix up sh7705 flush_dcache_page() build.
    sh: kfr2r09: document the PLL/FLL RF relationship.
    sh: mach-ecovec24: need asm/clock.h.
    sh: mach-ecovec24: deassert usb irq on boot.
    sh: Add KEYSC support for EcoVec24
    sh: add kycr2_delay for sh_keysc
    sh: cpufreq: Include CPU id in info messages.
    sh: multi-evt support for SH-X3 proto CPU.
    sh: clkfwk: remove bogus set_bus_parent() from SH7709.
    sh: Fix the indication point of the liquid crystal of AP-325RXA(AP3300)
    sh: Add EcoVec24 romImage defconfig
    sh: USB disable process is needed if romImage boot for EcoVec24
    sh: EcoVec24: add HIZA setting for LED
    sh: EcoVec24: write MAC address in boot
    sh: Add romImage support for EcoVec24
    ...

    Linus Torvalds
     

16 Sep, 2009

2 commits

  • This adds a generic uio driver that can bind to any PCI device. First
    user will be virtualization where a qemu userspace process needs to give
    guest OS access to the device.

    Interrupts are handled using the Interrupt Disable bit in the PCI
    command register and Interrupt Status bit in the PCI status register.
    All devices compliant to PCI 2.3 (circa 2002) and all compliant PCI
    Express devices should support these bits. Driver detects this support,
    and won't bind to devices which do not support the Interrupt Disable Bit
    in the command register.

    It's expected that more features of interest to virtualization will be
    added to this driver in the future. Possibilities are: mmap for device
    resources, MSI/MSI-X, eventfd (to interface with kvm), iommu.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Chris Wright
    Signed-off-by: Hans J. Koch
    Acked-by: Jesse Barnes
    Signed-off-by: Greg Kroah-Hartman

    Michael S. Tsirkin
     
  • 'default n' is the default, there is no need for these lines.

    Signed-off-by: Daniel Mack
    Cc: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Daniel Mack
     

23 Aug, 2009

1 commit

  • This patch modifies the uio_pdrv_genirq driver to support
    Runtime PM. The power management implementation simply
    runtime resumes the device at open() time and runtime
    suspends it at release() time. The user space driver is
    responsible for re-initializing the hardware after open().

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

17 Apr, 2009

1 commit

  • On Fri, Apr 10, 2009 at 01:50:50PM -0700, Andrew Morton wrote:
    > On Fri, 10 Apr 2009 13:32:01 GMT
    > bugzilla-daemon@bugzilla.kernel.org wrote:
    >
    > > http://bugzilla.kernel.org/show_bug.cgi?id=13059

    drivers/uio/uio_cif.c misses a MODULE_DEVICE_TABLE, this fixes it.

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

    Hans J. Koch
     

25 Mar, 2009

3 commits

  • If a UIO memory region does not start on a page boundary but straddles one,
    the number of actual pages that overlap the memory region may be calculated
    incorrectly because the offset isn't taken into account. If userspace sets
    the mmap length to offset+size, it may fail with -EINVAL if UIO thinks it's
    trying to allocate too many pages.

    Signed-off-by: Ian Abbott
    Cc: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Ian Abbott
     
  • UIO driver for the Adrienne Electronics Corporation PCI time code
    device.

    This device differs from other UIO devices since it uses I/O ports instead of
    memory mapped I/O. In order to make it possible for UIO to work with this
    device a utility, uioport, can be used to read and write the ports.

    uioport is designed to be a setuid program and checks the permissions of
    the /dev/uio* node and if the user has write permissions it will use
    iopl and out*/in* to access the device.

    [1] git clone git://ifup.org/philips/uioport.git

    Signed-off-by: Brandon Philips
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Brandon Philips
     
  • If a UIO device has several memory mappings, it can be difficult for userspace
    to find the right one. The situation becomes even worse if the UIO driver can
    handle different versions of a card that have different numbers of mappings.
    Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene!

    To address this problem, this patch adds "name" sysfs attributes for each
    mapping. Userspace can use these to clearly identify each mapping. The name
    string is optional. If a driver doesn't set it, an empty string will be
    returned, so this patch won't break existing drivers.

    The same problem exists for port region information, so a "name" attribute is
    added there, too.

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

    Hans J. Koch
     

07 Jan, 2009

3 commits

  • Devices sometimes have memory where all or parts of it can not be mapped to
    userspace. But it might still be possible to access this memory from
    userspace by other means. An example are PCI cards that advertise not only
    mappable memory but also ioport ranges. On x86 architectures, these can be
    accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed)
    reported a similar problem on Blackfin arch where it doesn't seem to be easy
    to mmap non-cached memory but it can still be accessed from userspace.

    This patch allows kernel drivers to pass information about such ports to
    userspace. Similar to the existing mem[] array, it adds a port[] array to
    struct uio_info. Each port range is described by start, size, and porttype.

    If a driver fills in at least one such port range, the UIO core will simply
    pass this information to userspace by creating a new directory "portio"
    underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will
    contain a subdirectory (portX) for each port range given.

    Note that UIO simply passes this information to userspace, it performs no
    action whatsoever with this data. It's userspace's responsibility to obtain
    access to these ports and to solve arch dependent issues. The "porttype"
    attribute tells userspace what kind of port it is dealing with.

    This mechanism could also be used to give userspace information about GPIOs
    related to a device. You frequently find such hardware in embedded devices,
    so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good
    idea since there are other solutions to this problem, but it won't hurt much
    anyway.

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

    Hans J. Koch
     
  • I can't think of a reason why the driver prevents people from setting any
    custom bits in their platform device, but I can think of some reasons for
    allowing custom flags. Like setting the IRQF_TRIGGER_... bits.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Mike Frysinger
     
  • Use the newly introduced pci_ioremap_bar() function in drivers/uio.
    pci_ioremap_bar() just takes a pci device and a bar number, with the goal
    of making it really hard to get wrong, while also having a central place
    to stick sanity checks.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Arjan van de Ven
     

02 Nov, 2008

1 commit

  • As it is, all instances of ->release() for files that have ->fasync()
    need to remember to evict file from fasync lists; forgetting that
    creates a hole and we actually have a bunch that *does* forget.

    So let's keep our lives simple - let __fput() check FASYNC in
    file->f_flags and call ->fasync() there if it's been set. And lose that
    crap in ->release() instances - leaving it there is still valid, but we
    don't have to bother anymore.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

21 Oct, 2008

1 commit


17 Oct, 2008

6 commits

  • Fill in needed locking around idr accesses, then remove the big kernel lock
    from the UIO driver. Since there are no in-tree UIO drivers with open()
    methods, no further BKL pushdown is required.

    Acked-by: Hans J. Koch
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     
  • mmap() doesn't work as expected for UIO_MEM_LOGICAL or UIO_MEM_VIRTUAL
    mappings. The offset into the memory needs to be added, otherwise
    uio_vma_fault always returns the first page only. Note that for UIO
    userspace calls mmap() with offset = N * getpagesize() to access
    mapping N. This must be compensated when calculating the offset. A
    comment was added to explain this since it is not obvious.

    Signed-off-by: Andrew G. Harvey
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Andrew G. Harvey
     
  • Here is a new version of the patch to support the Automata Sercos III
    PCI card driver. I now check that the IRQ is enabled before accepting
    the interrupt.

    I still use a logical OR to store the enabled interrupts and I've
    added a second use of a logical OR when restoring the enabled
    interrupts. I added an explanation of why I do this in comments at the
    top of the source file.

    Since I use a logical OR, I also removed the extra checks if the
    Interrupt Enable Register and ier0_cache are 0.

    Signed-off-by: John Ogness
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    John Ogness
     
  • The generic UIO platform device driver should be given a unique driver ID and
    not just "uio". This is especially important since we now have a similar driver
    named uio_pdrv_genirq. Currently, there's no user of this driver in the
    mainline kernel.

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

    Hans J. Koch
     
  • This patch adds an "offset" attribute for UIO mappings. It shows the
    difference between the actual start address of the memory and the start
    address of the page.

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

    Hans J. Koch
     
  • Now that device_create() has been audited, rename things back to the
    original call to be sane.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Aug, 2008

3 commits

  • This is V3 of uio_pdrv_genirq.c, a platform driver for UIO with
    generic IRQ handling code. This driver is very similar to the regular
    UIO platform driver, but is only suitable for devices that are
    connected to the interrupt controller using unique interrupt lines.

    The uio_pdrv_genirq driver includes generic interrupt handling code
    which disables the serviced interrupt in the interrupt controller
    and makes the user space driver responsible for acknowledging the
    interrupt in the device and reenabling the interrupt in the interrupt
    controller.

    Shared interrupts are not supported since the in-kernel interrupt
    handler will disable the interrupt line in the interrupt controller,
    and in a shared interrupt configuration this will stop other devices
    from delivering interrupts.

    Signed-off-by: Magnus Damm
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Magnus Damm
     
  • Thanks to Magnus Damm for pointing that out.

    Signed-off-by: Uwe Kleine-König
    Cc: Magnus Damm
    Acked-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     
  • Thanks to Magnus Damm for pointing that out.

    Signed-off-by: Uwe Kleine-König
    Cc: Magnus Damm
    Acked-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

22 Jul, 2008

3 commits

  • This patch adds a generic UIO platform driver. It eliminates the need for a
    dedicated kernel module for simple platform devices. Users only need to
    implement their irq handler in platform code and fill a struct uio_info
    there. This helps avoiding code duplication as UIO platform drivers often
    share a lot of common code.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     
  • Sometimes it is necessary to enable/disable the interrupt of a UIO device
    from the userspace part of the driver. With this patch, the UIO kernel driver
    can implement an "irqcontrol()" function that does this. Userspace can write
    an s32 value to /dev/uioX (usually 0 or 1 to turn the irq off or on). The
    UIO core will then call the driver's irqcontrol function.

    Signed-off-by: Hans J. Koch
    Acked-by: Uwe Kleine-König
    Acked-by: Magnus Damm
    Signed-off-by: Greg Kroah-Hartman

    Hans J. Koch
     
  • ae210f188614bb3d1ee3f19c64e28e3cdd44877c introduced a big "if UIO"/"endif"
    where all uio drivers are defined. So know there is no need for them to
    depend explicitly on UIO.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

15 Jul, 2008

1 commit


21 Jun, 2008

1 commit


21 May, 2008

1 commit

  • There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().

    Cc: Kay Sievers
    Cc: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

20 Apr, 2008

5 commits

  • Otherwise the device might just disappear while /dev/uioX is being used
    which results in an Oops.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Hans J Koch
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     
  • This patch implements a UIO interface for the SMX Cryptengine.

    The Cryptengine found on the Nias Digital SMX board is best suited
    for a UIO interface. It is not wired in to the cryptographic API
    as the engine handles it's own keys, algorithms, everything. All
    that we know about is that if there's room in the buffer, you can
    write data to it and when there's data ready, you read it out again.

    There isn't necessarily even any direct correlation between data
    going in and data coming out again, the engine may consume or
    generate data all on its own.

    This driver is for proprietary hardware but we're always told to
    submit the drivers anyway; here you are. :-)

    This is version 4 of this patch and addresses all issues raised by
    Hans-Jürgen Koch and Paul Mundt in their reviews. Slightly altered
    is Paul's suggestion to use DRV_NAME and DRV_VERSION as the UIO
    version and name. While at the moment they are the same, there
    is no reason for them to stay that way. Nevertheless we now at
    least provide a MODULE_VERSION macro to keep modinfo happy.

    Signed-off-by: Ben Nizette
    Acked-by: Paul Mundt
    Signed-off-by: Hans J Koch
    Signed-off-by: Greg Kroah-Hartman

    Ben Nizette
     
  • Meanwhile, PCI_DEVICE_ID_PLX_9030 is defined in pci_ids.h, no need to
    define it again in the driver.

    Signed-off-by: Hans J. Koch
    CC: Benedikt Spranger
    Signed-off-by: Greg Kroah-Hartman

    Hans-Jürgen Koch
     
  • Signed-off-by: Denis Cheng
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Denis Cheng
     
  • Signed-off-by: Denis Cheng
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Denis Cheng
     

25 Mar, 2008

1 commit

  • Mapping of physical memory in UIO needs pgprot_noncached() to ensure
    that IO memory is not cached. Without pgprot_noncached(), it (accidentally)
    works on x86 and arm, but fails on PPC.

    Signed-off-by: Jean-Samuel Chenard
    Signed-off-by: Hans J Koch
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Jean-Samuel Chenard
     

22 Feb, 2008

1 commit

  • This fixes two bugs with UIO that cropped up recently in -rc1

    1) WARNING: at fs/sysfs/file.c:334 sysfs_open_file when trying to open
    a map addr/size file - complaining about missing sysfs_ops for ktype

    2) Permission denied when reading uio/uio0/maps/map0/{addr,size} when
    files are mode S_IRUGO

    Also fix a typo: attr_attribute -> addr_attribute

    Signed-off-by: Brandon Philips
    Signed-off-by: Hans J. Koch
    Signed-off-by: Greg Kroah-Hartman

    Brandon Philips
     

07 Feb, 2008

1 commit

  • Convert uio from nopage to fault.

    Signed-off-by: Nick Piggin
    Acked-by: Hans J Koch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin