aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mic
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang2-2/+2
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [[email protected]: linux-next resyncs] Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Linus Walleij <[email protected]> (personally at LCE13) Cc: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-11-07Merge tag 'driver-core-3.13-rc1' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core / sysfs patches from Greg KH: "Here's the big driver core / sysfs update for 3.13-rc1. There's lots of dev_groups updates for different subsystems, as they all get slowly migrated over to the safe versions of the attribute groups (removing userspace races with the creation of the sysfs files.) Also in here are some kobject updates, devres expansions, and the first round of Tejun's sysfs reworking to enable it to be used by other subsystems as a backend for an in-kernel filesystem. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (83 commits) sysfs: rename sysfs_assoc_lock and explain what it's about sysfs: use generic_file_llseek() for sysfs_file_operations sysfs: return correct error code on unimplemented mmap() mdio_bus: convert bus code to use dev_groups device: Make dev_WARN/dev_WARN_ONCE print device as well as driver name sysfs: separate out dup filename warning into a separate function sysfs: move sysfs_hash_and_remove() to fs/sysfs/dir.c sysfs: remove unused sysfs_get_dentry() prototype sysfs: honor bin_attr.attr.ignore_lockdep sysfs: merge sysfs_elem_bin_attr into sysfs_elem_attr devres: restore zeroing behavior of devres_alloc() sysfs: fix sysfs_write_file for bin file input: gameport: convert bus code to use dev_groups input: serio: remove bus usage of dev_attrs input: serio: use DEVICE_ATTR_RO() i2o: convert bus code to use dev_groups memstick: convert bus code to use dev_groups tifm: convert bus code to use dev_groups virtio: convert bus code to use dev_groups ipack: convert bus code to use dev_groups ...
2013-10-30misc: mic: Fixes for randconfig build errors and warnings.Ashutosh Dixit3-2/+4
This patch fixes the build errors and warnings reported at https://lkml.org/lkml/2013/10/29/421. Co-author: Dasaratharaman Chandramouli <[email protected]> Reviewed-by: Sudeep Dutt <[email protected]> Reported-by: Jim Davis <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-05misc: mic: Enable OSPM suspend and resume support.Dasaratharaman Chandramouli4-5/+193
This patch enables support for OSPM suspend and resume in the MIC driver. During a host suspend event, the driver performs an orderly shutdown of the cards if they are online. Upon resume, any cards that were previously online before suspend are rebooted. The driver performs an orderly shutdown of the card primarily to ensure that applications in the card are terminated and mounted devices are safely un-mounted before the card is powered down in the event of an OSPM suspend. The driver makes use of the MIC daemon to accomplish OSPM suspend and resume. The driver registers a PM notifier per MIC device. The devices get notified synchronously during PM_SUSPEND_PREPARE and PM_POST_SUSPEND phases. During the PM_SUSPEND_PREPARE phase, the driver performs one of the following three tasks. 1) If the card is 'offline', the driver sets the card to a 'suspended' state and returns. 2) If the card is 'online', the driver initiates card shutdown by setting the card state to suspending. This notifies the MIC daemon which invokes shutdown and sets card state to 'suspended'. The driver returns after the shutdown is complete. 3) If the card is already being shutdown, possibly by a host user space application, the driver sets the card state to 'suspended' and returns after the shutdown is complete. During the PM_POST_SUSPEND phase, the driver simply notifies the daemon and returns. The daemon boots those cards that were previously online during the suspend phase. Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-27misc: mic: depend on X86 for both host and card drivers.Sudeep Dutt1-2/+2
This fixes build failures seen on certain non X86 architectures. The card driver should correctly always depend on X86. The host driver can potentially work on non X86 architectures although it has never been built or validated in such configurations. The host driver dependency on X86 can be removed at some point in the future but this workaround is required for now. Reported-by: Fengguang Wu <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-27misc: mic: cleanups for "--strict" checkpatch.Ashutosh Dixit10-133/+123
These changes were mostly authored by Joe Perches <[email protected]> @ https://lkml.org/lkml/2013/9/5/602 Reported-by: Joe Perches <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-27misc: mic: header file cleanups.Sudeep Dutt14-15/+15
Dont use same name for header files in different folders. These changes were suggested by Greg Kroah-Hartman during the code review @ https://lkml.org/lkml/2013/9/6/18 Reported-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-27misc: mic: host driver sysfs cleanups.Sudeep Dutt1-43/+29
+ Use DEVICE_ATTR_RO/RW instead of DEVICE_ATTR + Use ATTRIBUTE_GROUPS These changes were suggested by Greg Kroah-Hartman during the code review @ https://lkml.org/lkml/2013/9/6/13 Reported-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Card Driver Changes for Virtio Devices.Ashutosh Dixit5-0/+717
This patch introduces the card "Virtio over PCIe" interface for Intel MIC. It allows virtio drivers on the card to communicate with their user space backends on the host via a device page. Ring 3 apps on the host can add, remove and configure virtio devices. A thin MIC specific virtio_config_ops is implemented which is borrowed heavily from previous similar implementations in lguest and s390 @ drivers/lguest/lguest_device.c drivers/s390/kvm/kvm_virtio.c Co-author: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Host Driver Changes for Virtio Devices.Ashutosh Dixit11-1/+1277
This patch introduces the host "Virtio over PCIe" interface for Intel MIC. It allows creating user space backends on the host and instantiating virtio devices for them on the Intel MIC card. It uses the existing VRINGH infrastructure in the kernel to access virtio rings from the host. A character device per MIC is exposed with IOCTL, mmap and poll callbacks. This allows the user space backend to: (a) add/remove a virtio device via a device page. (b) map (R/O) virtio rings and device page to user space. (c) poll for availability of data. (d) copy a descriptor or entire descriptor chain to/from the card. (e) modify virtio configuration. (f) handle virtio device reset. The buffers are copied over using CPU copies for this initial patch and host initiated MIC DMA support is planned for future patches. The avail and desc virtio rings are in host memory and the used ring is in card memory to maximize writes across PCIe for performance. Co-author: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Card Driver for X100 family.Sudeep Dutt8-0/+895
This patch does the following: a) Initializes the Intel MIC X100 platform device and driver. b) Sets up support to handle shutdown requests from the host. c) Maps the device page after obtaining the device page address from the scratchpad registers updated by the host. d) Informs the host upon a card crash by registering a panic notifier. e) Informs the host upon a poweroff/halt event. Co-author: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Host Driver, card OS state management.Sudeep Dutt9-4/+1365
This patch enables the following features: a) Boots and shuts down the card via sysfs entries. b) Allocates and maps a device page for communication with the card driver and updates the device page address via scratchpad registers. c) Provides sysfs entries for shutdown status, kernel command line, ramdisk and log buffer information. Co-author: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Host Driver Interrupt/SMPT support.Dasaratharaman Chandramouli9-2/+1638
This patch enables the following features: a) MSIx, MSI and legacy interrupt support. b) System Memory Page Table(SMPT) support. SMPT enables system memory access from the card. On X100 devices the host can program 32 SMPT registers each capable of accessing 16GB of system memory address space from X100 devices. The registers can thereby be used to access a cumulative 512GB of system memory address space from X100 devices at any point in time. Co-author: Sudeep Dutt <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26Intel MIC Host Driver for X100 family.Sudeep Dutt9-0/+706
This patch enables the following: a) Initializes the Intel MIC X100 PCIe devices. b) Provides sysfs entries for family and stepping information. Co-author: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Signed-off-by: Caz Yokoyama <[email protected]> Signed-off-by: Dasaratharaman Chandramouli <[email protected]> Signed-off-by: Harshavardhan R Kharche <[email protected]> Signed-off-by: Nikhil Rao <[email protected]> Signed-off-by: Sudeep Dutt <[email protected]> Acked-by: Yaozu (Eddie) Dong <[email protected]> Reviewed-by: Peter P Waskiewicz Jr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>