Skip to contentSkip to conversation

PATCH] s390: fix machine check handling

PATCH In review Sebastian Ott 3 participants 5 messages Nov 28, 2014 – Dec 2, 2014 s390

lore
Share & tools
lore
#0 lore raw

Hi,

would it be possible to have this one for 3.18 (if not, please add
Cc: [email protected] # v3.18)

Regards,
Sebastian

Quoted 3 lines

8-----

From ca198a6ff5766f19645104b7f8d621774524c4b4 Mon Sep 17 00:00:00 2001

From: Sebastian Ott <[email protected]>
Date: Fri, 28 Nov 2014 15:40:57 +0100
Subject: [PATCH] s390: fix machine check handling

Commit eb7e7d76 "s390: Replace __get_cpu_var uses" broke machine check handling.

We copy machine check information from per-cpu to a stack variable for local processing. Next we should zap the per-cpu variable, not the stack variable.

---
 arch/s390/kernel/nmi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/s390/kernel/nmi.c +2 -6
index dd1c24c..3f51cf4 100644
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
 	 */
 	local_irq_save(flags);
 	local_mcck_disable();
-	/*
-	 * Ummm... Does this make sense at all? Copying the percpu struct
-	 * and then zapping it one statement later?
-	 */
-	memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
-	memset(&mcck, 0, sizeof(struct mcck_struct));
+	mcck = *this_cpu_ptr(&cpu_mcck);
+	memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
 	clear_cpu_flag(CIF_MCCK_PENDING);
 	local_mcck_enable();
 	local_irq_restore(flags);
Signature · 1 line
1.8.4.2
#2 lore raw

PATCH 1/1 s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()

In reply to Sebastian Ott
Quoted 1 line

From 1bb43105791dae7e9d4d1b1047729b12c5d5c3be Mon Sep 17 00:00:00 2001

From: Sebastian Ott <[email protected]>
Date: Fri, 28 Nov 2014 16:03:14 +0100

Commit eb7e7d766326 ("s390: Replace __get_cpu_var uses") broke machine check handling.

We copy machine check information from per-cpu to a stack variable for local processing. Next we should zap the per-cpu variable, not the stack variable.

Fixes eb7e7d766326 ("s390: Replace __get_cpu_var uses")

---
Sorry about the delay. Was on vacation.

Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch subject and description. Will push out to Linus soon.

Thanks.

 arch/s390/kernel/nmi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/s390/kernel/nmi.c +2 -6
index dd1c24c..3f51cf4 100644
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
 	 */
 	local_irq_save(flags);
 	local_mcck_disable();
-	/*
-	 * Ummm... Does this make sense at all? Copying the percpu struct
-	 * and then zapping it one statement later?
-	 */
-	memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
-	memset(&mcck, 0, sizeof(struct mcck_struct));
+	mcck = *this_cpu_ptr(&cpu_mcck);
+	memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
 	clear_cpu_flag(CIF_MCCK_PENDING);
 	local_mcck_enable();
 	local_irq_restore(flags);
Signature · 1 line
2.1.0
#3 lore raw

Re: [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()

Quoted 5 lines · Tejun Heo

Sorry about the delay. Was on vacation.

Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch subject and description. Will push out to Linus soon.

I've seen that Martin took the patch and it's already in Linus' tree - commit 2cb4a18262fd0108cb8abd875710c59d0aa66f1d

Regards,
Sebastian

Quoted 28 lines

Thanks.

 arch/s390/kernel/nmi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/s390/kernel/nmi.c +2 -6
index dd1c24c..3f51cf4 100644
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
 	 */
 	local_irq_save(flags);
 	local_mcck_disable();
-	/*
-	 * Ummm... Does this make sense at all? Copying the percpu struct
-	 * and then zapping it one statement later?
-	 */
-	memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
-	memset(&mcck, 0, sizeof(struct mcck_struct));
+	mcck = *this_cpu_ptr(&cpu_mcck);
+	memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
 	clear_cpu_flag(CIF_MCCK_PENDING);
 	local_mcck_enable();
 	local_irq_restore(flags);
Signature · 1 line
2.1.0
#4 lore raw

Re: [PATCH percpu/for-3.18-fixes] s390: fix machine check regression caused by the conversion from __get_cpu_var() to this_cpu_ptr()

Quoted 9 lines · Sebastian Ott
Quoted 5 lines · Tejun Heo

Sorry about the delay. Was on vacation.

Patch applied to percpu/for-3.18-fixes w/ minor updates to the patch subject and description. Will push out to Linus soon.

I've seen that Martin took the patch and it's already in Linus' tree - commit 2cb4a18262fd0108cb8abd875710c59d0aa66f1d

Ah, okay. Dropping from percpu/for-3.18-fixes then.

Thanks.

Signature · 1 line
tejun