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>
This commit is contained in:

committed by
Michael Ellerman

parent
4e1efb403c
commit
13e68d8bd0
@@ -200,4 +200,14 @@ unsigned int cxl_fd_poll(struct file *file, struct poll_table_struct *poll);
|
||||
ssize_t cxl_fd_read(struct file *file, char __user *buf, size_t count,
|
||||
loff_t *off);
|
||||
|
||||
/*
|
||||
* For EEH, a driver may want to assert a PERST will reload the same image
|
||||
* from flash into the FPGA.
|
||||
*
|
||||
* This is a property of the entire adapter, not a single AFU, so drivers
|
||||
* should set this property with care!
|
||||
*/
|
||||
void cxl_perst_reloads_same_image(struct cxl_afu *afu,
|
||||
bool perst_reloads_same_image);
|
||||
|
||||
#endif /* _MISC_CXL_H */
|
||||
|
Reference in New Issue
Block a user