Commit ab68280e authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Paul Burton

MIPS: SGI-IP27: use pr_info/pr_emerg and pr_cont to fix output

Topology and NMI output needs pr_cont() to look the way it was in the
old days of printk.
Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
parent a44d924c
...@@ -154,11 +154,11 @@ static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b) ...@@ -154,11 +154,11 @@ static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b)
} }
if (router_a == NULL) { if (router_a == NULL) {
printk("node_distance: router_a NULL\n"); pr_info("node_distance: router_a NULL\n");
return -1; return -1;
} }
if (router_b == NULL) { if (router_b == NULL) {
printk("node_distance: router_b NULL\n"); pr_info("node_distance: router_b NULL\n");
return -1; return -1;
} }
...@@ -203,17 +203,17 @@ static void __init dump_topology(void) ...@@ -203,17 +203,17 @@ static void __init dump_topology(void)
klrou_t *router; klrou_t *router;
cnodeid_t row, col; cnodeid_t row, col;
printk("************** Topology ********************\n"); pr_info("************** Topology ********************\n");
printk(" "); pr_info(" ");
for_each_online_node(col) for_each_online_node(col)
printk("%02d ", col); pr_cont("%02d ", col);
printk("\n"); pr_cont("\n");
for_each_online_node(row) { for_each_online_node(row) {
printk("%02d ", row); pr_info("%02d ", row);
for_each_online_node(col) for_each_online_node(col)
printk("%2d ", node_distance(row, col)); pr_cont("%2d ", node_distance(row, col));
printk("\n"); pr_cont("\n");
} }
for_each_online_node(cnode) { for_each_online_node(cnode) {
...@@ -230,7 +230,7 @@ static void __init dump_topology(void) ...@@ -230,7 +230,7 @@ static void __init dump_topology(void)
do { do {
if (brd->brd_flags & DUPLICATE_BOARD) if (brd->brd_flags & DUPLICATE_BOARD)
continue; continue;
printk("Router %d:", router_num); pr_cont("Router %d:", router_num);
router_num++; router_num++;
router = (klrou_t *)NODE_OFFSET_TO_K0(NASID_GET(brd), brd->brd_compts[0]); router = (klrou_t *)NODE_OFFSET_TO_K0(NASID_GET(brd), brd->brd_compts[0]);
...@@ -244,11 +244,11 @@ static void __init dump_topology(void) ...@@ -244,11 +244,11 @@ static void __init dump_topology(void)
router->rou_port[port].port_offset); router->rou_port[port].port_offset);
if (dest_brd->brd_type == KLTYPE_IP27) if (dest_brd->brd_type == KLTYPE_IP27)
printk(" %d", dest_brd->brd_nasid); pr_cont(" %d", dest_brd->brd_nasid);
if (dest_brd->brd_type == KLTYPE_ROUTER) if (dest_brd->brd_type == KLTYPE_ROUTER)
printk(" r"); pr_cont(" r");
} }
printk("\n"); pr_cont("\n");
} while ( (brd = find_lboard_class(KLCF_NEXT(brd), KLTYPE_ROUTER)) ); } while ( (brd = find_lboard_class(KLCF_NEXT(brd), KLTYPE_ROUTER)) );
} }
...@@ -373,7 +373,7 @@ static void __init szmem(void) ...@@ -373,7 +373,7 @@ static void __init szmem(void)
if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) > if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) >
(slot0sz << PAGE_SHIFT)) { (slot0sz << PAGE_SHIFT)) {
printk("Ignoring slot %d onwards on node %d\n", pr_info("Ignoring slot %d onwards on node %d\n",
slot, node); slot, node);
slot = MAX_MEM_SLOTS; slot = MAX_MEM_SLOTS;
continue; continue;
......
...@@ -62,70 +62,70 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice) ...@@ -62,70 +62,70 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice)
(TO_UNCAC(TO_NODE(nasid, IP27_NMI_KREGS_OFFSET)) + (TO_UNCAC(TO_NODE(nasid, IP27_NMI_KREGS_OFFSET)) +
slice * IP27_NMI_KREGS_CPU_SIZE); slice * IP27_NMI_KREGS_CPU_SIZE);
printk("NMI nasid %d: slice %d\n", nasid, slice); pr_emerg("NMI nasid %d: slice %d\n", nasid, slice);
/* /*
* Saved main processor registers * Saved main processor registers
*/ */
for (i = 0; i < 32; ) { for (i = 0; i < 32; ) {
if ((i % 4) == 0) if ((i % 4) == 0)
printk("$%2d :", i); pr_emerg("$%2d :", i);
printk(" %016lx", nr->gpr[i]); pr_cont(" %016lx", nr->gpr[i]);
i++; i++;
if ((i % 4) == 0) if ((i % 4) == 0)
printk("\n"); pr_cont("\n");
} }
printk("Hi : (value lost)\n"); pr_emerg("Hi : (value lost)\n");
printk("Lo : (value lost)\n"); pr_emerg("Lo : (value lost)\n");
/* /*
* Saved cp0 registers * Saved cp0 registers
*/ */
printk("epc : %016lx %pS\n", nr->epc, (void *) nr->epc); pr_emerg("epc : %016lx %pS\n", nr->epc, (void *)nr->epc);
printk("%s\n", print_tainted()); pr_emerg("%s\n", print_tainted());
printk("ErrEPC: %016lx %pS\n", nr->error_epc, (void *) nr->error_epc); pr_emerg("ErrEPC: %016lx %pS\n", nr->error_epc, (void *)nr->error_epc);
printk("ra : %016lx %pS\n", nr->gpr[31], (void *) nr->gpr[31]); pr_emerg("ra : %016lx %pS\n", nr->gpr[31], (void *)nr->gpr[31]);
printk("Status: %08lx ", nr->sr); pr_emerg("Status: %08lx ", nr->sr);
if (nr->sr & ST0_KX) if (nr->sr & ST0_KX)
printk("KX "); pr_cont("KX ");
if (nr->sr & ST0_SX) if (nr->sr & ST0_SX)
printk("SX "); pr_cont("SX ");
if (nr->sr & ST0_UX) if (nr->sr & ST0_UX)
printk("UX "); pr_cont("UX ");
switch (nr->sr & ST0_KSU) { switch (nr->sr & ST0_KSU) {
case KSU_USER: case KSU_USER:
printk("USER "); pr_cont("USER ");
break; break;
case KSU_SUPERVISOR: case KSU_SUPERVISOR:
printk("SUPERVISOR "); pr_cont("SUPERVISOR ");
break; break;
case KSU_KERNEL: case KSU_KERNEL:
printk("KERNEL "); pr_cont("KERNEL ");
break; break;
default: default:
printk("BAD_MODE "); pr_cont("BAD_MODE ");
break; break;
} }
if (nr->sr & ST0_ERL) if (nr->sr & ST0_ERL)
printk("ERL "); pr_cont("ERL ");
if (nr->sr & ST0_EXL) if (nr->sr & ST0_EXL)
printk("EXL "); pr_cont("EXL ");
if (nr->sr & ST0_IE) if (nr->sr & ST0_IE)
printk("IE "); pr_cont("IE ");
printk("\n"); pr_cont("\n");
printk("Cause : %08lx\n", nr->cause); pr_emerg("Cause : %08lx\n", nr->cause);
printk("PrId : %08x\n", read_c0_prid()); pr_emerg("PrId : %08x\n", read_c0_prid());
printk("BadVA : %016lx\n", nr->badva); pr_emerg("BadVA : %016lx\n", nr->badva);
printk("CErr : %016lx\n", nr->cache_err); pr_emerg("CErr : %016lx\n", nr->cache_err);
printk("NMI_SR: %016lx\n", nr->nmi_sr); pr_emerg("NMI_SR: %016lx\n", nr->nmi_sr);
printk("\n"); pr_emerg("\n");
} }
void nmi_dump_hub_irq(nasid_t nasid, int slice) void nmi_dump_hub_irq(nasid_t nasid, int slice)
...@@ -143,9 +143,9 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice) ...@@ -143,9 +143,9 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice)
pend0 = REMOTE_HUB_L(nasid, PI_INT_PEND0); pend0 = REMOTE_HUB_L(nasid, PI_INT_PEND0);
pend1 = REMOTE_HUB_L(nasid, PI_INT_PEND1); pend1 = REMOTE_HUB_L(nasid, PI_INT_PEND1);
printk("PI_INT_MASK0: %16Lx PI_INT_MASK1: %16Lx\n", mask0, mask1); pr_emerg("PI_INT_MASK0: %16llx PI_INT_MASK1: %16llx\n", mask0, mask1);
printk("PI_INT_PEND0: %16Lx PI_INT_PEND1: %16Lx\n", pend0, pend1); pr_emerg("PI_INT_PEND0: %16llx PI_INT_PEND1: %16llx\n", pend0, pend1);
printk("\n\n"); pr_emerg("\n\n");
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment