Skip to content

Commit ab68280

Browse files
Thomas Bogendoerferpaulburton
authored andcommitted
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: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul 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
1 parent a44d924 commit ab68280

File tree

2 files changed

+45
-45
lines changed

2 files changed

+45
-45
lines changed

arch/mips/sgi-ip27/ip27-memory.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ static int __init compute_node_distance(nasid_t nasid_a, nasid_t nasid_b)
154154
}
155155

156156
if (router_a == NULL) {
157-
printk("node_distance: router_a NULL\n");
157+
pr_info("node_distance: router_a NULL\n");
158158
return -1;
159159
}
160160
if (router_b == NULL) {
161-
printk("node_distance: router_b NULL\n");
161+
pr_info("node_distance: router_b NULL\n");
162162
return -1;
163163
}
164164

@@ -203,17 +203,17 @@ static void __init dump_topology(void)
203203
klrou_t *router;
204204
cnodeid_t row, col;
205205

206-
printk("************** Topology ********************\n");
206+
pr_info("************** Topology ********************\n");
207207

208-
printk(" ");
208+
pr_info(" ");
209209
for_each_online_node(col)
210-
printk("%02d ", col);
211-
printk("\n");
210+
pr_cont("%02d ", col);
211+
pr_cont("\n");
212212
for_each_online_node(row) {
213-
printk("%02d ", row);
213+
pr_info("%02d ", row);
214214
for_each_online_node(col)
215-
printk("%2d ", node_distance(row, col));
216-
printk("\n");
215+
pr_cont("%2d ", node_distance(row, col));
216+
pr_cont("\n");
217217
}
218218

219219
for_each_online_node(cnode) {
@@ -230,7 +230,7 @@ static void __init dump_topology(void)
230230
do {
231231
if (brd->brd_flags & DUPLICATE_BOARD)
232232
continue;
233-
printk("Router %d:", router_num);
233+
pr_cont("Router %d:", router_num);
234234
router_num++;
235235

236236
router = (klrou_t *)NODE_OFFSET_TO_K0(NASID_GET(brd), brd->brd_compts[0]);
@@ -244,11 +244,11 @@ static void __init dump_topology(void)
244244
router->rou_port[port].port_offset);
245245

246246
if (dest_brd->brd_type == KLTYPE_IP27)
247-
printk(" %d", dest_brd->brd_nasid);
247+
pr_cont(" %d", dest_brd->brd_nasid);
248248
if (dest_brd->brd_type == KLTYPE_ROUTER)
249-
printk(" r");
249+
pr_cont(" r");
250250
}
251-
printk("\n");
251+
pr_cont("\n");
252252

253253
} while ( (brd = find_lboard_class(KLCF_NEXT(brd), KLTYPE_ROUTER)) );
254254
}
@@ -373,7 +373,7 @@ static void __init szmem(void)
373373

374374
if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) >
375375
(slot0sz << PAGE_SHIFT)) {
376-
printk("Ignoring slot %d onwards on node %d\n",
376+
pr_info("Ignoring slot %d onwards on node %d\n",
377377
slot, node);
378378
slot = MAX_MEM_SLOTS;
379379
continue;

arch/mips/sgi-ip27/ip27-nmi.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -62,70 +62,70 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice)
6262
(TO_UNCAC(TO_NODE(nasid, IP27_NMI_KREGS_OFFSET)) +
6363
slice * IP27_NMI_KREGS_CPU_SIZE);
6464

65-
printk("NMI nasid %d: slice %d\n", nasid, slice);
65+
pr_emerg("NMI nasid %d: slice %d\n", nasid, slice);
6666

6767
/*
6868
* Saved main processor registers
6969
*/
7070
for (i = 0; i < 32; ) {
7171
if ((i % 4) == 0)
72-
printk("$%2d :", i);
73-
printk(" %016lx", nr->gpr[i]);
72+
pr_emerg("$%2d :", i);
73+
pr_cont(" %016lx", nr->gpr[i]);
7474

7575
i++;
7676
if ((i % 4) == 0)
77-
printk("\n");
77+
pr_cont("\n");
7878
}
7979

80-
printk("Hi : (value lost)\n");
81-
printk("Lo : (value lost)\n");
80+
pr_emerg("Hi : (value lost)\n");
81+
pr_emerg("Lo : (value lost)\n");
8282

8383
/*
8484
* Saved cp0 registers
8585
*/
86-
printk("epc : %016lx %pS\n", nr->epc, (void *) nr->epc);
87-
printk("%s\n", print_tainted());
88-
printk("ErrEPC: %016lx %pS\n", nr->error_epc, (void *) nr->error_epc);
89-
printk("ra : %016lx %pS\n", nr->gpr[31], (void *) nr->gpr[31]);
90-
printk("Status: %08lx ", nr->sr);
86+
pr_emerg("epc : %016lx %pS\n", nr->epc, (void *)nr->epc);
87+
pr_emerg("%s\n", print_tainted());
88+
pr_emerg("ErrEPC: %016lx %pS\n", nr->error_epc, (void *)nr->error_epc);
89+
pr_emerg("ra : %016lx %pS\n", nr->gpr[31], (void *)nr->gpr[31]);
90+
pr_emerg("Status: %08lx ", nr->sr);
9191

9292
if (nr->sr & ST0_KX)
93-
printk("KX ");
93+
pr_cont("KX ");
9494
if (nr->sr & ST0_SX)
95-
printk("SX ");
95+
pr_cont("SX ");
9696
if (nr->sr & ST0_UX)
97-
printk("UX ");
97+
pr_cont("UX ");
9898

9999
switch (nr->sr & ST0_KSU) {
100100
case KSU_USER:
101-
printk("USER ");
101+
pr_cont("USER ");
102102
break;
103103
case KSU_SUPERVISOR:
104-
printk("SUPERVISOR ");
104+
pr_cont("SUPERVISOR ");
105105
break;
106106
case KSU_KERNEL:
107-
printk("KERNEL ");
107+
pr_cont("KERNEL ");
108108
break;
109109
default:
110-
printk("BAD_MODE ");
110+
pr_cont("BAD_MODE ");
111111
break;
112112
}
113113

114114
if (nr->sr & ST0_ERL)
115-
printk("ERL ");
115+
pr_cont("ERL ");
116116
if (nr->sr & ST0_EXL)
117-
printk("EXL ");
117+
pr_cont("EXL ");
118118
if (nr->sr & ST0_IE)
119-
printk("IE ");
120-
printk("\n");
119+
pr_cont("IE ");
120+
pr_cont("\n");
121121

122-
printk("Cause : %08lx\n", nr->cause);
123-
printk("PrId : %08x\n", read_c0_prid());
124-
printk("BadVA : %016lx\n", nr->badva);
125-
printk("CErr : %016lx\n", nr->cache_err);
126-
printk("NMI_SR: %016lx\n", nr->nmi_sr);
122+
pr_emerg("Cause : %08lx\n", nr->cause);
123+
pr_emerg("PrId : %08x\n", read_c0_prid());
124+
pr_emerg("BadVA : %016lx\n", nr->badva);
125+
pr_emerg("CErr : %016lx\n", nr->cache_err);
126+
pr_emerg("NMI_SR: %016lx\n", nr->nmi_sr);
127127

128-
printk("\n");
128+
pr_emerg("\n");
129129
}
130130

131131
void nmi_dump_hub_irq(nasid_t nasid, int slice)
@@ -143,9 +143,9 @@ void nmi_dump_hub_irq(nasid_t nasid, int slice)
143143
pend0 = REMOTE_HUB_L(nasid, PI_INT_PEND0);
144144
pend1 = REMOTE_HUB_L(nasid, PI_INT_PEND1);
145145

146-
printk("PI_INT_MASK0: %16Lx PI_INT_MASK1: %16Lx\n", mask0, mask1);
147-
printk("PI_INT_PEND0: %16Lx PI_INT_PEND1: %16Lx\n", pend0, pend1);
148-
printk("\n\n");
146+
pr_emerg("PI_INT_MASK0: %16llx PI_INT_MASK1: %16llx\n", mask0, mask1);
147+
pr_emerg("PI_INT_PEND0: %16llx PI_INT_PEND1: %16llx\n", pend0, pend1);
148+
pr_emerg("\n\n");
149149
}
150150

151151
/*

0 commit comments

Comments
 (0)