Commit d30daa3
vfio: platform: call _RST method when using ACPI
The device tree code checks for the presence of a reset driver and calls
the of_reset function pointer by looking up the reset driver as a module.
ACPI defines _RST method to perform device level reset. After the _RST
method is executed, the OS can resume using the device. _RST method is
expected to stop DMA transfers and IRQs.
This patch introduces two functions as vfio_platform_acpi_has_reset and
vfio_platform_acpi_call_reset. The has reset method is used to declare
reset capability via the ioctl flag VFIO_DEVICE_FLAGS_RESET. The call
reset function is used to execute the _RST ACPI method.
Signed-off-by: Sinan Kaya <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>1 parent 5afec27 commit d30daa3
1 file changed
+49
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
74 | 110 | | |
75 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
76 | 115 | | |
77 | 116 | | |
78 | 117 | | |
79 | 118 | | |
80 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
81 | 123 | | |
82 | 124 | | |
83 | 125 | | |
| |||
89 | 131 | | |
90 | 132 | | |
91 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
92 | 137 | | |
93 | 138 | | |
94 | 139 | | |
| |||
164 | 209 | | |
165 | 210 | | |
166 | 211 | | |
167 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
168 | 216 | | |
169 | 217 | | |
170 | 218 | | |
| |||
0 commit comments