]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/mips-eva-add-new-eva-header.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / mips-eva-add-new-eva-header.patch
1 From f85b71ceabb9d8d8a9e34b045b5c43ffde3623b3 Mon Sep 17 00:00:00 2001
2 From: Markos Chandras <markos.chandras@imgtec.com>
3 Date: Mon, 21 Jul 2014 14:35:54 +0100
4 Subject: MIPS: EVA: Add new EVA header
5
6 From: Markos Chandras <markos.chandras@imgtec.com>
7
8 commit f85b71ceabb9d8d8a9e34b045b5c43ffde3623b3 upstream.
9
10 Generic code may need to perform certain operations when EVA is
11 enabled, for example, configure the segmentation registers during
12 boot. In order to avoid using more CONFIG_EVA ifdefs in the arch code,
13 such functions will be added in this header instead.
14 Initially this header contains a macro which will be used by generic
15 code later on during VPEs configuration on secondary cores.
16 All it does is to call the platform specific EVA init code in case
17 EVA is enabled.
18
19 Reviewed-by: Paul Burton <paul.burton@imgtec.com>
20 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
21 Patchwork: http://patchwork.linux-mips.org/patch/7422/
22 Signed-off-by: James Hogan <james.hogan@imgtec.com>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25 ---
26 arch/mips/include/asm/eva.h | 43 +++++++++++++++++++++++++++++++++++++++++++
27 1 file changed, 43 insertions(+)
28
29 --- /dev/null
30 +++ b/arch/mips/include/asm/eva.h
31 @@ -0,0 +1,43 @@
32 +/*
33 + * This file is subject to the terms and conditions of the GNU General Public
34 + * License. See the file "COPYING" in the main directory of this archive
35 + * for more details.
36 + *
37 + * Copyright (C) 2014, Imagination Technologies Ltd.
38 + *
39 + * EVA functions for generic code
40 + */
41 +
42 +#ifndef _ASM_EVA_H
43 +#define _ASM_EVA_H
44 +
45 +#include <kernel-entry-init.h>
46 +
47 +#ifdef __ASSEMBLY__
48 +
49 +#ifdef CONFIG_EVA
50 +
51 +/*
52 + * EVA early init code
53 + *
54 + * Platforms must define their own 'platform_eva_init' macro in
55 + * their kernel-entry-init.h header. This macro usually does the
56 + * platform specific configuration of the segmentation registers,
57 + * and it is normally called from assembly code.
58 + *
59 + */
60 +
61 +.macro eva_init
62 +platform_eva_init
63 +.endm
64 +
65 +#else
66 +
67 +.macro eva_init
68 +.endm
69 +
70 +#endif /* CONFIG_EVA */
71 +
72 +#endif /* __ASSEMBLY__ */
73 +
74 +#endif