Skip to contentSkip to conversation

ia64: Make sure that we have a mmiowb function real early

PATCH Applied Tony Luck 2 participants 2 messages May 16, 2019

lore
Share & tools
lore

Tony Luck

author
#0 lore raw

PATCH 1/1 ia64: Make sure that we have a mmiowb function real early

Generic kernels feed many operation through the "machvec" logic to get the correct form of the operation for the current system. "mmiowb()" is one of those operations.

Although machvec is initialized very early in boot, it isn't early enough for a recent upstream kernel change that added mmiowb to the spin_unlock() path.

Statically initialize the mmiowb field of machvec so that we won't die with a call through a NULL pointer. This should be safe because we do the real initialization of machvec before bringing up any addtional CPUs or doing any I/O.

Fixes 49ca6462fc9e ("ia64/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()")
---
 arch/ia64/kernel/machvec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/ia64/kernel/machvec.c +3 -1
index 1b604d02250b..ebd82535f51b 100644
@@ -10,7 +10,9 @@
 
 #include <asm/page.h>
 
-struct ia64_machine_vector ia64_mv;
+struct ia64_machine_vector ia64_mv = {
+	.mmiowb	= ___ia64_mmiowb
+};
 EXPORT_SYMBOL(ia64_mv);
 
 static struct ia64_machine_vector * __init
Signature · 1 line
2.20.1
#1 lore raw
Quoted 5 lines · Tony Luck

Statically initialize the mmiowb field of machvec so that we won't die with a call through a NULL pointer. This should be safe because we do the real initialization of machvec before bringing up any addtional CPUs or doing any I/O.

Thanks, applied.

Linus