diff options
author | Daniel Axtens <dja@axtens.net> | 2015-08-14 03:41:25 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-14 07:32:07 -0400 |
commit | 13e68d8bd05c998cae452a4f3400af1e8edd852e (patch) | |
tree | d17ff97c9f46a663b5cb4916fc333703b2cdfea4 /include/misc | |
parent | 4e1efb403c1c016ae831bd9988a7d2e5e0af41a0 (diff) |
cxl: Allow the kernel to trust that an image won't change on PERST.
Provide a kernel API and a sysfs entry which allow a user to specify
that when a card is PERSTed, it's image will stay the same, allowing
it to participate in EEH.
cxl_reset is used to reflash the card. In that case, we cannot safely
assert that the image will not change. Therefore, disallow cxl_reset
if the flag is set.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'include/misc')
-rw-r--r-- | include/misc/cxl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/misc/cxl.h b/include/misc/cxl.h index 7a6c1d6cc173..f2ffe5bd720d 100644 --- a/include/misc/cxl.h +++ b/include/misc/cxl.h | |||
@@ -200,4 +200,14 @@ unsigned int cxl_fd_poll(struct file *file, struct poll_table_struct *poll); | |||
200 | ssize_t cxl_fd_read(struct file *file, char __user *buf, size_t count, | 200 | ssize_t cxl_fd_read(struct file *file, char __user *buf, size_t count, |
201 | loff_t *off); | 201 | loff_t *off); |
202 | 202 | ||
203 | /* | ||
204 | * For EEH, a driver may want to assert a PERST will reload the same image | ||
205 | * from flash into the FPGA. | ||
206 | * | ||
207 | * This is a property of the entire adapter, not a single AFU, so drivers | ||
208 | * should set this property with care! | ||
209 | */ | ||
210 | void cxl_perst_reloads_same_image(struct cxl_afu *afu, | ||
211 | bool perst_reloads_same_image); | ||
212 | |||
203 | #endif /* _MISC_CXL_H */ | 213 | #endif /* _MISC_CXL_H */ |