From 799aeb6d00881fc8f19b80ddf70f8b2b4c532f28 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Tue, 10 Sep 2013 14:21:23 -0700 Subject: intel_l3_parity: Support a daemonic mode v2: Add a comment explaining the dangers of directly accessing the DFT register (Daniel) Signed-off-by: Ben Widawsky --- tools/intel_l3_parity.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/intel_l3_parity.h (limited to 'tools/intel_l3_parity.h') diff --git a/tools/intel_l3_parity.h b/tools/intel_l3_parity.h new file mode 100644 index 00000000..65697c4f --- /dev/null +++ b/tools/intel_l3_parity.h @@ -0,0 +1,31 @@ +#ifndef INTEL_L3_PARITY_H_ +#define INTEL_L3_PARITY_H_ + +#include +#include + +struct l3_parity { + struct udev *udev; + struct udev_monitor *uevent_monitor; + int fd; + fd_set fdset; +}; + +struct l3_location { + uint8_t slice; + uint16_t row; + uint8_t bank; + uint8_t subbank; +}; + +#if HAVE_UDEV +int l3_uevent_setup(struct l3_parity *par); +/* Listens (blocks) for an l3 parity event. Returns the location of the error. */ +int l3_listen(struct l3_parity *par, bool daemon, struct l3_location *loc); +#define l3_uevent_teardown(par) {} +#else +#define l3_uevent_setup(par, daemon, loc) -1 +#define l3_listen(par) -1 +#endif + +#endif -- cgit v1.2.3