aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/machvec_init.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sh/machvec_init.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-sh/machvec_init.h')
-rw-r--r--include/asm-sh/machvec_init.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/asm-sh/machvec_init.h b/include/asm-sh/machvec_init.h
new file mode 100644
index 000000000000..9e7de808f7f8
--- /dev/null
+++ b/include/asm-sh/machvec_init.h
@@ -0,0 +1,54 @@
1/*
2 * include/asm-sh/machvec_init.h
3 *
4 * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 * This file has goodies to help simplify instantiation of machine vectors.
10 */
11
12#ifndef __SH_MACHVEC_INIT_H
13#define __SH_MACHVEC_INIT_H
14
15#include <linux/config.h>
16
17/*
18 * In a GENERIC kernel, we have lots of these vectors floating about,
19 * all but one of which we want to go away. In a non-GENERIC kernel,
20 * we want only one, ever.
21 *
22 * Accomplish this in the GENERIC kernel by puting all of the vectors
23 * in the .init.data section where they'll go away. We'll copy the
24 * one we want to the real alpha_mv vector in setup_arch.
25 *
26 * Accomplish this in a non-GENERIC kernel by ifdef'ing out all but
27 * one of the vectors, which will not reside in .init.data. We then
28 * alias this one vector to alpha_mv, so no copy is needed.
29 *
30 * Upshot: set __initdata to nothing for non-GENERIC kernels.
31 *
32 * Note we do the same thing for the UNKNOWN kernel, as we need to write
33 * to the machine vector while setting it up.
34 */
35
36#if defined(CONFIG_SH_GENERIC) || defined(CONFIG_SH_UNKNOWN)
37#define __initmv __attribute__((unused,__section__ (".machvec.init")))
38#define ALIAS_MV(x)
39#else
40#define __initmv
41
42/* GCC actually has a syntax for defining aliases, but is under some
43 delusion that you shouldn't be able to declare it extern somewhere
44 else beforehand. Fine. We'll do it ourselves. */
45#if 0
46#define ALIAS_MV(system) \
47 struct sh_machine_vector sh_mv __attribute__((alias("mv_"#system)));
48#else
49#define ALIAS_MV(system) \
50 asm(".global sh_mv\nsh_mv = mv_"#system );
51#endif
52#endif /* GENERIC */
53
54#endif /* __SH_MACHVEC_INIT_H */