Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d715e433 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

powerpc: Copy down exception vectors after feature fixups



kdump fails because we try to execute an HV only instruction. Feature
fixups are being applied after we copy the exception vectors down to 0
so they miss out on any updates.

We have always had this issue but it only became critical in v3.0
when we added CFAR support (breaks POWER5) and v3.1 when we added
POWERNV (breaks everyone).

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> [v3.0+]
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 6d1e2c6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#ifdef __powerpc64__

extern char _end[];
extern char __end_interrupts[];

static inline int in_kernel_text(unsigned long addr)
{
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
			     void *fixup_end);
extern void do_final_fixups(void);

static inline void eieio(void)
{
+0 −1
Original line number Diff line number Diff line
@@ -132,7 +132,6 @@ static void kvm_patch_ins_b(u32 *inst, int addr)
	/* On relocatable kernels interrupts handlers and our code
	   can be in different regions, so we don't patch them */

	extern u32 __end_interrupts;
	if ((ulong)inst < (ulong)&__end_interrupts)
		return;
#endif
+2 −0
Original line number Diff line number Diff line
@@ -107,6 +107,8 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
			 PTRRELOC(&__start___lwsync_fixup),
			 PTRRELOC(&__stop___lwsync_fixup));

	do_final_fixups();

	return KERNELBASE + offset;
}

+1 −0
Original line number Diff line number Diff line
@@ -359,6 +359,7 @@ void __init setup_system(void)
			  &__start___fw_ftr_fixup, &__stop___fw_ftr_fixup);
	do_lwsync_fixups(cur_cpu_spec->cpu_features,
			 &__start___lwsync_fixup, &__stop___lwsync_fixup);
	do_final_fixups();

	/*
	 * Unflatten the device-tree passed by prom_init or kexec
Loading