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

Commit 9c34526f authored by Russell King's avatar Russell King Committed by Joonwoo Park
Browse files

ARM: update FIQ support for relocation of vectors



FIQ should no longer copy the FIQ code into the user visible vector
page.  Instead, it should use the hidden page.  This change makes
that happen.

Change-Id: Iec7716c43e2377fa3d66cc36ff8d141f58bfb6bf
Cc: <stable@vger.kernel.org>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Git-commit: e39e3f3ebfef03450cf7bfa7a974a8c61f7980c8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[joonwoop@codeaurora.org: fixed merge conflict]
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent d303fa12
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1226,6 +1226,9 @@ vector_fiq:
.krait_fixup:
	.word	msm_krait_need_wfe_fixup

	.globl	vector_fiq_offset
	.equ	vector_fiq_offset, vector_fiq

	.section .vectors, "ax", %progbits
__vectors_start:
	W(b)	vector_rst
+14 −5
Original line number Diff line number Diff line
@@ -48,6 +48,11 @@
#include <asm/irq.h>
#include <asm/traps.h>

#define FIQ_OFFSET ({					\
		extern void *vector_fiq_offset;		\
		(unsigned)&vector_fiq_offset;		\
	})

static unsigned long no_fiq_insn;

/* Default reacquire function
@@ -81,13 +86,16 @@ int show_fiq_list(struct seq_file *p, int prec)
void set_fiq_handler(void *start, unsigned int length)
{
#if defined(CONFIG_CPU_USE_DOMAINS)
	memcpy((void *)0xffff001c, start, length);
	void *base = (void *)0xffff0000;
#else
	memcpy(vectors_page + 0x1c, start, length);
	void *base = vectors_page;
#endif
	flush_icache_range(0xffff001c, 0xffff001c + length);
	unsigned offset = FIQ_OFFSET;

	memcpy(base + offset, start, length);
	flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length);
	if (!vectors_high())
		flush_icache_range(0x1c, 0x1c + length);
		flush_icache_range(offset, offset + length);
}

int claim_fiq(struct fiq_handler *f)
@@ -151,6 +159,7 @@ EXPORT_SYMBOL(fiq_set_type);

void __init init_FIQ(int start)
{
	no_fiq_insn = *(unsigned long *)0xffff001c;
	unsigned offset = FIQ_OFFSET;
	no_fiq_insn = *(unsigned long *)(0xffff0000 + offset);
	fiq_start = start;
}