Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26297
b: refs/heads/master
c: b73d40c
h: refs/heads/master
i:
  26295: ab0bb17
v: v3
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed Apr 28, 2006
1 parent 2d8a7cc commit 1434ecd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b5dec1aa08b77c4217cd5fcaf1e4e177f659b2e
refs/heads/master: b73d40c6178f2c8b2d574db566b47f36e3d12072
33 changes: 28 additions & 5 deletions trunk/drivers/s390/s390mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,19 @@ s390_revalidate_registers(struct mci *mci)
return kill_task;
}

#define MAX_IPD_COUNT 29
#define MAX_IPD_TIME (5 * 60 * 100 * 1000) /* 5 minutes */

/*
* machine check handler.
*/
void
s390_do_machine_check(struct pt_regs *regs)
{
static DEFINE_SPINLOCK(ipd_lock);
static unsigned long long last_ipd;
static int ipd_count;
unsigned long long tmp;
struct mci *mci;
struct mcck_struct *mcck;
int umode;
Expand Down Expand Up @@ -404,11 +411,27 @@ s390_do_machine_check(struct pt_regs *regs)
s390_handle_damage("processing backup machine "
"check with damage.");
}
if (!umode)
s390_handle_damage("processing backup machine "
"check in kernel mode.");
mcck->kill_task = 1;
mcck->mcck_code = *(unsigned long long *) mci;

/*
* Nullifying exigent condition, therefore we might
* retry this instruction.
*/

spin_lock(&ipd_lock);

tmp = get_clock();

if (((tmp - last_ipd) >> 12) < MAX_IPD_TIME)
ipd_count++;
else
ipd_count = 1;

last_ipd = tmp;

if (ipd_count == MAX_IPD_COUNT)
s390_handle_damage("too many ipd retries.");

spin_unlock(&ipd_lock);
}
else {
/* Processing damage -> stopping machine */
Expand Down

0 comments on commit 1434ecd

Please sign in to comment.