hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/sgi-ip27/ip27-berr.c
....@@ -16,8 +16,8 @@
1616
1717 #include <asm/ptrace.h>
1818 #include <asm/sn/addrs.h>
19
+#include <asm/sn/agent.h>
1920 #include <asm/sn/arch.h>
20
-#include <asm/sn/sn0/hub.h>
2121 #include <asm/tlbdebug.h>
2222 #include <asm/traps.h>
2323 #include <linux/uaccess.h>
....@@ -30,29 +30,31 @@
3030 { "WERR", "Uncached Partial Write", "PWERR", "Write Timeout",
3131 NULL, NULL, NULL, NULL }
3232 };
33
- int wrb = errst1 & PI_ERR_ST1_WRBRRB_MASK;
33
+ union pi_err_stat0 st0;
34
+ union pi_err_stat1 st1;
3435
35
- if (!(errst0 & PI_ERR_ST0_VALID_MASK)) {
36
- printk("Hub does not contain valid error information\n");
36
+ st0.pi_stat0_word = errst0;
37
+ st1.pi_stat1_word = errst1;
38
+
39
+ if (!st0.pi_stat0_fmt.s0_valid) {
40
+ pr_info("Hub does not contain valid error information\n");
3741 return;
3842 }
3943
40
-
41
- printk("Hub has valid error information:\n");
42
- if (errst0 & PI_ERR_ST0_OVERRUN_MASK)
43
- printk("Overrun is set. Error stack may contain additional "
44
+ pr_info("Hub has valid error information:\n");
45
+ if (st0.pi_stat0_fmt.s0_ovr_run)
46
+ pr_info("Overrun is set. Error stack may contain additional "
4447 "information.\n");
45
- printk("Hub error address is %08lx\n",
46
- (errst0 & PI_ERR_ST0_ADDR_MASK) >> (PI_ERR_ST0_ADDR_SHFT - 3));
47
- printk("Incoming message command 0x%lx\n",
48
- (errst0 & PI_ERR_ST0_CMD_MASK) >> PI_ERR_ST0_CMD_SHFT);
49
- printk("Supplemental field of incoming message is 0x%lx\n",
50
- (errst0 & PI_ERR_ST0_SUPPL_MASK) >> PI_ERR_ST0_SUPPL_SHFT);
51
- printk("T5 Rn (for RRB only) is 0x%lx\n",
52
- (errst0 & PI_ERR_ST0_REQNUM_MASK) >> PI_ERR_ST0_REQNUM_SHFT);
53
- printk("Error type is %s\n", err_type[wrb]
54
- [(errst0 & PI_ERR_ST0_TYPE_MASK) >> PI_ERR_ST0_TYPE_SHFT]
55
- ? : "invalid");
48
+ pr_info("Hub error address is %08lx\n",
49
+ (unsigned long)st0.pi_stat0_fmt.s0_addr);
50
+ pr_info("Incoming message command 0x%lx\n",
51
+ (unsigned long)st0.pi_stat0_fmt.s0_cmd);
52
+ pr_info("Supplemental field of incoming message is 0x%lx\n",
53
+ (unsigned long)st0.pi_stat0_fmt.s0_supl);
54
+ pr_info("T5 Rn (for RRB only) is 0x%lx\n",
55
+ (unsigned long)st0.pi_stat0_fmt.s0_t5_req);
56
+ pr_info("Error type is %s\n", err_type[st1.pi_stat1_fmt.s1_rw_rb]
57
+ [st0.pi_stat0_fmt.s0_err_type] ? : "invalid");
5658 }
5759
5860 int ip27_be_handler(struct pt_regs *regs, int is_fixup)
....@@ -74,7 +76,7 @@
7476 show_regs(regs);
7577 dump_tlb_all();
7678 while(1);
77
- force_sig(SIGBUS, current);
79
+ force_sig(SIGBUS);
7880 }
7981
8082 void __init ip27_be_init(void)