History

fpga: dfl: fme: add interrupt support for global error reporting

Error reporting interrupt is very useful to notify users that some errors are detected by the hardware. Once users are notified, they could query hardware logged error states, no need to continuously poll on these states. This patch adds interrupt support for fme global error reporting sub feature. It follows the common DFL interrupt notification and handling mechanism. And it implements two ioctls below for user to query number of irqs supported, and set/unset interrupt triggers. Ioctls: * DFL_FPGA_FME_ERR_GET_IRQ_NUM get the number of irqs, which is used to determine whether/how many interrupts fme error reporting feature supports. * DFL_FPGA_FME_ERR_SET_IRQ set/unset given eventfds as fme error reporting interrupt triggers.

Xu Yilun committed 6 years ago

Commit d43f20b1 parent fe6a3d63 files · +47 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/fpga-dfl.h+23−0
@@ -230,4 +230,27 @@ struct dfl_fpga_fme_port_pr { · 229 unmodified lines
230 */230 */
231#define DFL_FPGA_FME_PORT_ASSIGN _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 2, int)231#define DFL_FPGA_FME_PORT_ASSIGN _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 2, int)
232 232
233/**
234 * DFL_FPGA_FME_ERR_GET_IRQ_NUM - _IOR(DFL_FPGA_MAGIC, DFL_FME_BASE + 3,
235 * __u32 num_irqs)
236 *
237 * Get the number of irqs supported by the fpga fme error reporting private
238 * feature. Currently hardware supports up to 1 irq.
239 * Return: 0 on success, -errno on failure.
240 */
241#define DFL_FPGA_FME_ERR_GET_IRQ_NUM _IOR(DFL_FPGA_MAGIC, \
242 DFL_FME_BASE + 3, __u32)
243
244/**
245 * DFL_FPGA_FME_ERR_SET_IRQ - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 4,
246 * struct dfl_fpga_irq_set)
247 *
248 * Set fpga fme error reporting interrupt trigger if evtfds[n] is valid.
249 * Unset related interrupt trigger if evtfds[n] is a negative value.
250 * Return: 0 on success, -errno on failure.
251 */
252#define DFL_FPGA_FME_ERR_SET_IRQ _IOW(DFL_FPGA_MAGIC, \
253 DFL_FME_BASE + 4, \
254 struct dfl_fpga_irq_set)
255
233#endif /* _UAPI_LINUX_FPGA_DFL_H */256#endif /* _UAPI_LINUX_FPGA_DFL_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t