Skip to content

Commit

Permalink
ia64: Make sure that we have a mmiowb function real early
Browse files Browse the repository at this point in the history
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: 49ca646 ("ia64/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()")
Signed-off-by: Tony Luck <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
aegl authored and torvalds committed May 16, 2019
1 parent 700a800 commit 8a635ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/ia64/kernel/machvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a635ff

Please sign in to comment.