err_impl.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * linux/arch/alpha/kernel/err_impl.h
  3. *
  4. * Copyright (C) 2000 Jeff Wiedemeier (Compaq Computer Corporation)
  5. *
  6. * Contains declarations and macros to support Alpha error handling
  7. * implementations.
  8. */
  9. #include <asm/mce.h>
  10. union el_timestamp;
  11. struct el_subpacket;
  12. struct ev7_lf_subpackets;
  13. struct el_subpacket_annotation {
  14. struct el_subpacket_annotation *next;
  15. u16 class;
  16. u16 type;
  17. u16 revision;
  18. char *description;
  19. char **annotation;
  20. };
  21. #define SUBPACKET_ANNOTATION(c, t, r, d, a) {NULL, (c), (t), (r), (d), (a)}
  22. struct el_subpacket_handler {
  23. struct el_subpacket_handler *next;
  24. u16 class;
  25. struct el_subpacket *(*handler)(struct el_subpacket *);
  26. };
  27. #define SUBPACKET_HANDLER_INIT(c, h) {NULL, (c), (h)}
  28. /*
  29. * Manipulate a field from a register given it's name. defines
  30. * for the LSB (__S - shift count) and bitmask (__M) are required
  31. *
  32. * EXTRACT(u, f) - extracts the field and places it at bit position 0
  33. * GEN_MASK(f) - creates an in-position mask for the field
  34. */
  35. #define EXTRACT(u, f) (((u) >> f##__S) & f##__M)
  36. #define GEN_MASK(f) ((u64)f##__M << f##__S)
  37. /*
  38. * err_common.c
  39. */
  40. extern char *err_print_prefix;
  41. extern void mchk_dump_mem(void *, size_t, char **);
  42. extern void mchk_dump_logout_frame(struct el_common *);
  43. extern void el_print_timestamp(union el_timestamp *);
  44. extern void el_process_subpackets(struct el_subpacket *, int);
  45. extern struct el_subpacket *el_process_subpacket(struct el_subpacket *);
  46. extern void el_annotate_subpacket(struct el_subpacket *);
  47. extern void cdl_check_console_data_log(void);
  48. extern int cdl_register_subpacket_annotation(struct el_subpacket_annotation *);
  49. extern int cdl_register_subpacket_handler(struct el_subpacket_handler *);
  50. /*
  51. * err_ev7.c
  52. */
  53. extern struct ev7_lf_subpackets *
  54. ev7_collect_logout_frame_subpackets(struct el_subpacket *,
  55. struct ev7_lf_subpackets *);
  56. extern void ev7_register_error_handlers(void);
  57. extern void ev7_machine_check(unsigned long, unsigned long);
  58. /*
  59. * err_ev6.c
  60. */
  61. extern void ev6_register_error_handlers(void);
  62. extern int ev6_process_logout_frame(struct el_common *, int);
  63. extern void ev6_machine_check(unsigned long, unsigned long);
  64. /*
  65. * err_marvel.c
  66. */
  67. extern void marvel_machine_check(unsigned long, unsigned long);
  68. extern void marvel_register_error_handlers(void);
  69. /*
  70. * err_titan.c
  71. */
  72. extern int titan_process_logout_frame(struct el_common *, int);
  73. extern void titan_machine_check(unsigned long, unsigned long);
  74. extern void titan_register_error_handlers(void);
  75. extern int privateer_process_logout_frame(struct el_common *, int);
  76. extern void privateer_machine_check(unsigned long, unsigned long);