diff options
author | Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> | 2013-10-03 21:06:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-05 21:01:42 -0400 |
commit | af190494f9b2e1fb6e1c039e9626c3c334717da1 (patch) | |
tree | 3c6b5168cd9e3bd9455380ca5360a4a250820ab0 /Documentation/ABI | |
parent | 12b3af3096cdfb0613da374021167868c6abc9ce (diff) |
misc: mic: Enable OSPM suspend and resume support.
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 <ashutosh.dixit@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com>
Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI')
-rw-r--r-- | Documentation/ABI/testing/sysfs-class-mic.txt | 60 |
1 files changed, 35 insertions, 25 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-mic.txt b/Documentation/ABI/testing/sysfs-class-mic.txt index 82cdad3b614a..13f48afc534f 100644 --- a/Documentation/ABI/testing/sysfs-class-mic.txt +++ b/Documentation/ABI/testing/sysfs-class-mic.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | What: /sys/class/mic/ | 1 | What: /sys/class/mic/ |
2 | Date: August 2013 | 2 | Date: October 2013 |
3 | KernelVersion: 3.11 | 3 | KernelVersion: 3.13 |
4 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 4 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
5 | Description: | 5 | Description: |
6 | The mic class directory belongs to Intel MIC devices and | 6 | The mic class directory belongs to Intel MIC devices and |
@@ -9,8 +9,8 @@ Description: | |||
9 | Integrated Core (MIC) architecture that runs a Linux OS. | 9 | Integrated Core (MIC) architecture that runs a Linux OS. |
10 | 10 | ||
11 | What: /sys/class/mic/mic(x) | 11 | What: /sys/class/mic/mic(x) |
12 | Date: August 2013 | 12 | Date: October 2013 |
13 | KernelVersion: 3.11 | 13 | KernelVersion: 3.13 |
14 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 14 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
15 | Description: | 15 | Description: |
16 | The directories /sys/class/mic/mic0, /sys/class/mic/mic1 etc., | 16 | The directories /sys/class/mic/mic0, /sys/class/mic/mic1 etc., |
@@ -18,33 +18,41 @@ Description: | |||
18 | information specific to that MIC device. | 18 | information specific to that MIC device. |
19 | 19 | ||
20 | What: /sys/class/mic/mic(x)/family | 20 | What: /sys/class/mic/mic(x)/family |
21 | Date: August 2013 | 21 | Date: October 2013 |
22 | KernelVersion: 3.11 | 22 | KernelVersion: 3.13 |
23 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 23 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
24 | Description: | 24 | Description: |
25 | Provides information about the Coprocessor family for an Intel | 25 | Provides information about the Coprocessor family for an Intel |
26 | MIC device. For example - "x100" | 26 | MIC device. For example - "x100" |
27 | 27 | ||
28 | What: /sys/class/mic/mic(x)/stepping | 28 | What: /sys/class/mic/mic(x)/stepping |
29 | Date: August 2013 | 29 | Date: October 2013 |
30 | KernelVersion: 3.11 | 30 | KernelVersion: 3.13 |
31 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 31 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
32 | Description: | 32 | Description: |
33 | Provides information about the silicon stepping for an Intel | 33 | Provides information about the silicon stepping for an Intel |
34 | MIC device. For example - "A0" or "B0" | 34 | MIC device. For example - "A0" or "B0" |
35 | 35 | ||
36 | What: /sys/class/mic/mic(x)/state | 36 | What: /sys/class/mic/mic(x)/state |
37 | Date: August 2013 | 37 | Date: October 2013 |
38 | KernelVersion: 3.11 | 38 | KernelVersion: 3.13 |
39 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 39 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
40 | Description: | 40 | Description: |
41 | When read, this entry provides the current state of an Intel | 41 | When read, this entry provides the current state of an Intel |
42 | MIC device in the context of the card OS. Possible values that | 42 | MIC device in the context of the card OS. Possible values that |
43 | will be read are: | 43 | will be read are: |
44 | "offline" - The MIC device is ready to boot the card OS. | 44 | "offline" - The MIC device is ready to boot the card OS. On |
45 | reading this entry after an OSPM resume, a "boot" has to be | ||
46 | written to this entry if the card was previously shutdown | ||
47 | during OSPM suspend. | ||
45 | "online" - The MIC device has initiated booting a card OS. | 48 | "online" - The MIC device has initiated booting a card OS. |
46 | "shutting_down" - The card OS is shutting down. | 49 | "shutting_down" - The card OS is shutting down. |
47 | "reset_failed" - The MIC device has failed to reset. | 50 | "reset_failed" - The MIC device has failed to reset. |
51 | "suspending" - The MIC device is currently being prepared for | ||
52 | suspend. On reading this entry, a "suspend" has to be written | ||
53 | to the state sysfs entry to ensure the card is shutdown during | ||
54 | OSPM suspend. | ||
55 | "suspended" - The MIC device has been suspended. | ||
48 | 56 | ||
49 | When written, this sysfs entry triggers different state change | 57 | When written, this sysfs entry triggers different state change |
50 | operations depending upon the current state of the card OS. | 58 | operations depending upon the current state of the card OS. |
@@ -54,10 +62,12 @@ Description: | |||
54 | sysfs entries. | 62 | sysfs entries. |
55 | "reset" - Initiates device reset. | 63 | "reset" - Initiates device reset. |
56 | "shutdown" - Initiates card OS shutdown. | 64 | "shutdown" - Initiates card OS shutdown. |
65 | "suspend" - Initiates card OS shutdown and also marks the card | ||
66 | as suspended. | ||
57 | 67 | ||
58 | What: /sys/class/mic/mic(x)/shutdown_status | 68 | What: /sys/class/mic/mic(x)/shutdown_status |
59 | Date: August 2013 | 69 | Date: October 2013 |
60 | KernelVersion: 3.11 | 70 | KernelVersion: 3.13 |
61 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 71 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
62 | Description: | 72 | Description: |
63 | An Intel MIC device runs a Linux OS during its operation. This | 73 | An Intel MIC device runs a Linux OS during its operation. This |
@@ -72,8 +82,8 @@ Description: | |||
72 | "restart" - Shutdown because of a restart command. | 82 | "restart" - Shutdown because of a restart command. |
73 | 83 | ||
74 | What: /sys/class/mic/mic(x)/cmdline | 84 | What: /sys/class/mic/mic(x)/cmdline |
75 | Date: August 2013 | 85 | Date: October 2013 |
76 | KernelVersion: 3.11 | 86 | KernelVersion: 3.13 |
77 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 87 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
78 | Description: | 88 | Description: |
79 | An Intel MIC device runs a Linux OS during its operation. Before | 89 | An Intel MIC device runs a Linux OS during its operation. Before |
@@ -88,8 +98,8 @@ Description: | |||
88 | line back to this entry. | 98 | line back to this entry. |
89 | 99 | ||
90 | What: /sys/class/mic/mic(x)/firmware | 100 | What: /sys/class/mic/mic(x)/firmware |
91 | Date: August 2013 | 101 | Date: October 2013 |
92 | KernelVersion: 3.11 | 102 | KernelVersion: 3.13 |
93 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 103 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
94 | Description: | 104 | Description: |
95 | When read, this sysfs entry provides the path name under | 105 | When read, this sysfs entry provides the path name under |
@@ -98,8 +108,8 @@ Description: | |||
98 | firmware image location under /lib/firmware/. | 108 | firmware image location under /lib/firmware/. |
99 | 109 | ||
100 | What: /sys/class/mic/mic(x)/ramdisk | 110 | What: /sys/class/mic/mic(x)/ramdisk |
101 | Date: August 2013 | 111 | Date: October 2013 |
102 | KernelVersion: 3.11 | 112 | KernelVersion: 3.13 |
103 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 113 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
104 | Description: | 114 | Description: |
105 | When read, this sysfs entry provides the path name under | 115 | When read, this sysfs entry provides the path name under |
@@ -108,8 +118,8 @@ Description: | |||
108 | the ramdisk image location under /lib/firmware/. | 118 | the ramdisk image location under /lib/firmware/. |
109 | 119 | ||
110 | What: /sys/class/mic/mic(x)/bootmode | 120 | What: /sys/class/mic/mic(x)/bootmode |
111 | Date: August 2013 | 121 | Date: October 2013 |
112 | KernelVersion: 3.11 | 122 | KernelVersion: 3.13 |
113 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 123 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
114 | Description: | 124 | Description: |
115 | When read, this sysfs entry provides the current bootmode for | 125 | When read, this sysfs entry provides the current bootmode for |
@@ -119,8 +129,8 @@ Description: | |||
119 | b) elf - Boot an elf image for flash updates. | 129 | b) elf - Boot an elf image for flash updates. |
120 | 130 | ||
121 | What: /sys/class/mic/mic(x)/log_buf_addr | 131 | What: /sys/class/mic/mic(x)/log_buf_addr |
122 | Date: August 2013 | 132 | Date: October 2013 |
123 | KernelVersion: 3.11 | 133 | KernelVersion: 3.13 |
124 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 134 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
125 | Description: | 135 | Description: |
126 | An Intel MIC device runs a Linux OS during its operation. For | 136 | An Intel MIC device runs a Linux OS during its operation. For |
@@ -133,8 +143,8 @@ Description: | |||
133 | file of the card OS. | 143 | file of the card OS. |
134 | 144 | ||
135 | What: /sys/class/mic/mic(x)/log_buf_len | 145 | What: /sys/class/mic/mic(x)/log_buf_len |
136 | Date: August 2013 | 146 | Date: October 2013 |
137 | KernelVersion: 3.11 | 147 | KernelVersion: 3.13 |
138 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | 148 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> |
139 | Description: | 149 | Description: |
140 | An Intel MIC device runs a Linux OS during its operation. For | 150 | An Intel MIC device runs a Linux OS during its operation. For |