aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mic/host/mic_boot.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15tree-wide: use reinit_completion instead of INIT_COMPLETIONWolfram Sang1-1/+1
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-10-30misc: mic: Fixes for randconfig build errors and warnings.Ashutosh Dixit1-0/+1
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 Chandramouli1-3/+117
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: header file cleanups.Sudeep Dutt1-1/+1
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-26Intel MIC Host Driver Changes for Virtio Devices.Ashutosh Dixit1-1/+2
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 Host Driver, card OS state management.Sudeep Dutt1-0/+184
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]>