Skip to content

Commit 4fa1970

Browse files
Al ViroLinus Torvalds
authored andcommitted
[PATCH] alpha pt_regs cleanups: machine_check()
do set_irq_regs() in caller, kill pt_regs argument. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 3dbb8c6 commit 4fa1970

20 files changed

Lines changed: 61 additions & 71 deletions

‎arch/alpha/kernel/core_apecs.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,7 @@ apecs_pci_clr_err(void)
387387
}
388388

389389
void
390-
apecs_machine_check(unsigned long vector, unsigned long la_ptr,
391-
struct pt_regs * regs)
390+
apecs_machine_check(unsigned long vector, unsigned long la_ptr)
392391
{
393392
struct el_common *mchk_header;
394393
struct el_apecs_procdata *mchk_procdata;
@@ -412,7 +411,7 @@ apecs_machine_check(unsigned long vector, unsigned long la_ptr,
412411
wrmces(0x7); /* reset machine check pending flag */
413412
mb();
414413

415-
process_mcheck_info(vector, la_ptr, regs, "APECS",
414+
process_mcheck_info(vector, la_ptr, "APECS",
416415
(mcheck_expected(0)
417416
&& (mchk_sysdata->epic_dcsr & 0x0c00UL)));
418417
}

‎arch/alpha/kernel/core_cia.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,7 @@ cia_decode_mchk(unsigned long la_ptr)
11921192
}
11931193

11941194
void
1195-
cia_machine_check(unsigned long vector, unsigned long la_ptr,
1196-
struct pt_regs * regs)
1195+
cia_machine_check(unsigned long vector, unsigned long la_ptr)
11971196
{
11981197
int expected;
11991198

@@ -1208,5 +1207,5 @@ cia_machine_check(unsigned long vector, unsigned long la_ptr,
12081207
expected = mcheck_expected(0);
12091208
if (!expected && vector == 0x660)
12101209
expected = cia_decode_mchk(la_ptr);
1211-
process_mcheck_info(vector, la_ptr, regs, "CIA", expected);
1210+
process_mcheck_info(vector, la_ptr, "CIA", expected);
12121211
}

‎arch/alpha/kernel/core_lca.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/tty.h>
2020

2121
#include <asm/ptrace.h>
22+
#include <asm/irq_regs.h>
2223
#include <asm/smp.h>
2324

2425
#include "proto.h"
@@ -386,8 +387,7 @@ ioc_error(__u32 stat0, __u32 stat1)
386387
}
387388

388389
void
389-
lca_machine_check(unsigned long vector, unsigned long la_ptr,
390-
struct pt_regs *regs)
390+
lca_machine_check(unsigned long vector, unsigned long la_ptr)
391391
{
392392
const char * reason;
393393
union el_lca el;
@@ -397,7 +397,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
397397
wrmces(rdmces()); /* reset machine check pending flag */
398398

399399
printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n",
400-
vector, regs->pc, (unsigned int) el.c->code);
400+
vector, get_irq_regs()->pc, (unsigned int) el.c->code);
401401

402402
/*
403403
* The first quadword after the common header always seems to

‎arch/alpha/kernel/core_mcpcia.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,7 @@ mcpcia_print_system_area(unsigned long la_ptr)
572572
}
573573

574574
void
575-
mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
576-
struct pt_regs * regs)
575+
mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
577576
{
578577
struct el_common *mchk_header;
579578
struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
@@ -610,7 +609,7 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
610609
wrmces(0x7);
611610
mb();
612611

613-
process_mcheck_info(vector, la_ptr, regs, "MCPCIA", expected != 0);
612+
process_mcheck_info(vector, la_ptr, "MCPCIA", expected != 0);
614613
if (!expected && vector != 0x620 && vector != 0x630) {
615614
mcpcia_print_uncorrectable(mchk_logout);
616615
mcpcia_print_system_area(la_ptr);

‎arch/alpha/kernel/core_polaris.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,7 @@ polaris_pci_clr_err(void)
187187
}
188188

189189
void
190-
polaris_machine_check(unsigned long vector, unsigned long la_ptr,
191-
struct pt_regs * regs)
190+
polaris_machine_check(unsigned long vector, unsigned long la_ptr)
192191
{
193192
/* Clear the error before any reporting. */
194193
mb();
@@ -198,6 +197,6 @@ polaris_machine_check(unsigned long vector, unsigned long la_ptr,
198197
wrmces(0x7);
199198
mb();
200199

201-
process_mcheck_info(vector, la_ptr, regs, "POLARIS",
200+
process_mcheck_info(vector, la_ptr, "POLARIS",
202201
mcheck_expected(0));
203202
}

‎arch/alpha/kernel/core_t2.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,7 @@ t2_clear_errors(int cpu)
551551
* Hence all the taken/expected/any_expected/last_taken stuff...
552552
*/
553553
void
554-
t2_machine_check(unsigned long vector, unsigned long la_ptr,
555-
struct pt_regs * regs)
554+
t2_machine_check(unsigned long vector, unsigned long la_ptr)
556555
{
557556
int cpu = smp_processor_id();
558557
#ifdef CONFIG_VERBOSE_MCHECK
@@ -618,5 +617,5 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
618617
}
619618
#endif
620619

621-
process_mcheck_info(vector, la_ptr, regs, "T2", mcheck_expected(cpu));
620+
process_mcheck_info(vector, la_ptr, "T2", mcheck_expected(cpu));
622621
}

‎arch/alpha/kernel/core_tsunami.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ tsunami_pci_clr_err(void)
443443
}
444444

445445
void
446-
tsunami_machine_check(unsigned long vector, unsigned long la_ptr,
447-
struct pt_regs * regs)
446+
tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
448447
{
449448
/* Clear error before any reporting. */
450449
mb();
@@ -454,6 +453,6 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr,
454453
wrmces(0x7);
455454
mb();
456455

457-
process_mcheck_info(vector, la_ptr, regs, "TSUNAMI",
456+
process_mcheck_info(vector, la_ptr, "TSUNAMI",
458457
mcheck_expected(smp_processor_id()));
459458
}

‎arch/alpha/kernel/core_wildfire.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,7 @@ wildfire_init_arch(void)
322322
}
323323

324324
void
325-
wildfire_machine_check(unsigned long vector, unsigned long la_ptr,
326-
struct pt_regs * regs)
325+
wildfire_machine_check(unsigned long vector, unsigned long la_ptr)
327326
{
328327
mb();
329328
mb(); /* magic */
@@ -332,7 +331,7 @@ wildfire_machine_check(unsigned long vector, unsigned long la_ptr,
332331
wrmces(0x7);
333332
mb();
334333

335-
process_mcheck_info(vector, la_ptr, regs, "WILDFIRE",
334+
process_mcheck_info(vector, la_ptr, "WILDFIRE",
336335
mcheck_expected(smp_processor_id()));
337336
}
338337

‎arch/alpha/kernel/err_ev6.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/sched.h>
1212

1313
#include <asm/io.h>
14+
#include <asm/irq_regs.h>
1415
#include <asm/hwrpb.h>
1516
#include <asm/smp.h>
1617
#include <asm/err_common.h>
@@ -229,7 +230,7 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)
229230
}
230231

231232
void
232-
ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
233+
ev6_machine_check(u64 vector, u64 la_ptr)
233234
{
234235
struct el_common *mchk_header = (struct el_common *)la_ptr;
235236

@@ -260,7 +261,7 @@ ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
260261
(unsigned int)vector, (int)smp_processor_id());
261262

262263
ev6_process_logout_frame(mchk_header, 1);
263-
dik_show_regs(regs, NULL);
264+
dik_show_regs(get_irq_regs(), NULL);
264265

265266
err_print_prefix = saved_err_prefix;
266267
}

‎arch/alpha/kernel/err_ev7.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ ev7_collect_logout_frame_subpackets(struct el_subpacket *el_ptr,
118118
}
119119

120120
void
121-
ev7_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
121+
ev7_machine_check(u64 vector, u64 la_ptr)
122122
{
123123
struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
124124
char *saved_err_prefix = err_print_prefix;

0 commit comments

Comments
 (0)