aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-15 02:19:34 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-06-07 22:43:39 -0400
commit82f81f4784479df17a80caff4a7156da0a2f7dea (patch)
tree3679bd23f2c9daa24f9cf3e170a33f851ed45029 /arch
parent25f8151bdcdd62c6b879e3669a562c0d329eee4a (diff)
sh: Kill off machvec aliases.
We now throw all of the machvecs in to .machvec.init and either select one on the command line, or copy out the first (and usually only) one to sh_mv. The rest are freed as usual. This gets rid of all of the silly sh_mv aliasing and makes the selection explicit rather than link-order dependent. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/dreamcast/setup.c3
-rw-r--r--arch/sh/boards/hp6xx/mach.c4
-rw-r--r--arch/sh/boards/hp6xx/setup.c3
-rw-r--r--arch/sh/boards/landisk/setup.c3
-rw-r--r--arch/sh/boards/lboxre2/setup.c3
-rw-r--r--arch/sh/boards/mpc1211/setup.c3
-rw-r--r--arch/sh/boards/renesas/edosk7705/setup.c3
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/setup.c3
-rw-r--r--arch/sh/boards/renesas/r7780rp/setup.c3
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c3
-rw-r--r--arch/sh/boards/renesas/sh7710voipgw/setup.c3
-rw-r--r--arch/sh/boards/renesas/systemh/setup.c3
-rw-r--r--arch/sh/boards/saturn/setup.c3
-rw-r--r--arch/sh/boards/se/7206/setup.c3
-rw-r--r--arch/sh/boards/se/7300/setup.c3
-rw-r--r--arch/sh/boards/se/73180/setup.c3
-rw-r--r--arch/sh/boards/se/7343/setup.c3
-rw-r--r--arch/sh/boards/se/7619/setup.c3
-rw-r--r--arch/sh/boards/se/770x/setup.c3
-rw-r--r--arch/sh/boards/se/7722/setup.c3
-rw-r--r--arch/sh/boards/se/7751/setup.c3
-rw-r--r--arch/sh/boards/se/7780/setup.c3
-rw-r--r--arch/sh/boards/sh03/setup.c3
-rw-r--r--arch/sh/boards/shmin/setup.c3
-rw-r--r--arch/sh/boards/snapgear/setup.c3
-rw-r--r--arch/sh/boards/superh/microdev/setup.c3
-rw-r--r--arch/sh/boards/titan/setup.c3
-rw-r--r--arch/sh/boards/unknown/setup.c3
-rw-r--r--arch/sh/kernel/machvec.c45
-rw-r--r--arch/sh/kernel/setup.c7
30 files changed, 66 insertions, 71 deletions
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c
index f13017eeeb27..8799df6e866a 100644
--- a/arch/sh/boards/dreamcast/setup.c
+++ b/arch/sh/boards/dreamcast/setup.c
@@ -60,7 +60,7 @@ static void __init dreamcast_setup(char **cmdline_p)
60#endif 60#endif
61} 61}
62 62
63struct sh_machine_vector mv_dreamcast __initmv = { 63static struct sh_machine_vector mv_dreamcast __initmv = {
64 .mv_name = "Sega Dreamcast", 64 .mv_name = "Sega Dreamcast",
65 .mv_setup = dreamcast_setup, 65 .mv_setup = dreamcast_setup,
66 .mv_irq_demux = systemasic_irq_demux, 66 .mv_irq_demux = systemasic_irq_demux,
@@ -70,4 +70,3 @@ struct sh_machine_vector mv_dreamcast __initmv = {
70 .mv_consistent_free = dreamcast_consistent_free, 70 .mv_consistent_free = dreamcast_consistent_free,
71#endif 71#endif
72}; 72};
73ALIAS_MV(dreamcast)
diff --git a/arch/sh/boards/hp6xx/mach.c b/arch/sh/boards/hp6xx/mach.c
index 08dbba910f74..35b895960474 100644
--- a/arch/sh/boards/hp6xx/mach.c
+++ b/arch/sh/boards/hp6xx/mach.c
@@ -13,7 +13,7 @@
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/irq.h> 14#include <asm/irq.h>
15 15
16struct sh_machine_vector mv_hp6xx __initmv = { 16static struct sh_machine_vector mv_hp6xx __initmv = {
17 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, 17 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
18 18
19 .mv_inb = hd64461_inb, 19 .mv_inb = hd64461_inb,
@@ -42,5 +42,3 @@ struct sh_machine_vector mv_hp6xx __initmv = {
42 42
43 .mv_irq_demux = hd64461_irq_demux, 43 .mv_irq_demux = hd64461_irq_demux,
44}; 44};
45
46ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 6aeee85c9785..7ae708930bac 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -98,10 +98,9 @@ static void __init hp6xx_setup(char **cmdline_p)
98} 98}
99device_initcall(hp6xx_devices_setup); 99device_initcall(hp6xx_devices_setup);
100 100
101struct sh_machine_vector mv_hp6xx __initmv = { 101static struct sh_machine_vector mv_hp6xx __initmv = {
102 .mv_name = "hp6xx", 102 .mv_name = "hp6xx",
103 .mv_setup = hp6xx_setup, 103 .mv_setup = hp6xx_setup,
104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, 104 .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
105 .mv_irq_demux = hd64461_irq_demux, 105 .mv_irq_demux = hd64461_irq_demux,
106}; 106};
107ALIAS_MV(hp6xx)
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index f953c7427769..eda71763ecc5 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -97,10 +97,9 @@ static void __init landisk_setup(char **cmdline_p)
97/* 97/*
98 * The Machine Vector 98 * The Machine Vector
99 */ 99 */
100struct sh_machine_vector mv_landisk __initmv = { 100static struct sh_machine_vector mv_landisk __initmv = {
101 .mv_name = "LANDISK", 101 .mv_name = "LANDISK",
102 .mv_nr_irqs = 72, 102 .mv_nr_irqs = 72,
103 .mv_setup = landisk_setup, 103 .mv_setup = landisk_setup,
104 .mv_init_irq = init_landisk_IRQ, 104 .mv_init_irq = init_landisk_IRQ,
105}; 105};
106ALIAS_MV(landisk)
diff --git a/arch/sh/boards/lboxre2/setup.c b/arch/sh/boards/lboxre2/setup.c
index 4e20f7c63bf3..9c830fdc411b 100644
--- a/arch/sh/boards/lboxre2/setup.c
+++ b/arch/sh/boards/lboxre2/setup.c
@@ -77,9 +77,8 @@ device_initcall(lboxre2_devices_setup);
77/* 77/*
78 * The Machine Vector 78 * The Machine Vector
79 */ 79 */
80struct sh_machine_vector mv_lboxre2 __initmv = { 80static struct sh_machine_vector mv_lboxre2 __initmv = {
81 .mv_name = "L-BOX RE2", 81 .mv_name = "L-BOX RE2",
82 .mv_nr_irqs = 72, 82 .mv_nr_irqs = 72,
83 .mv_init_irq = init_lboxre2_IRQ, 83 .mv_init_irq = init_lboxre2_IRQ,
84}; 84};
85ALIAS_MV(lboxre2)
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c
index 1a0604b23ce0..8ce03e00b0ae 100644
--- a/arch/sh/boards/mpc1211/setup.c
+++ b/arch/sh/boards/mpc1211/setup.c
@@ -338,11 +338,10 @@ static void __init mpc1211_setup(char **cmdline_p)
338/* 338/*
339 * The Machine Vector 339 * The Machine Vector
340 */ 340 */
341struct sh_machine_vector mv_mpc1211 __initmv = { 341static struct sh_machine_vector mv_mpc1211 __initmv = {
342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", 342 .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)",
343 .mv_setup = mpc1211_setup, 343 .mv_setup = mpc1211_setup,
344 .mv_nr_irqs = 48, 344 .mv_nr_irqs = 48,
345 .mv_irq_demux = mpc1211_irq_demux, 345 .mv_irq_demux = mpc1211_irq_demux,
346 .mv_init_irq = init_mpc1211_IRQ, 346 .mv_init_irq = init_mpc1211_IRQ,
347}; 347};
348ALIAS_MV(mpc1211)
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c
index ec5be0107719..f076c45308dd 100644
--- a/arch/sh/boards/renesas/edosk7705/setup.c
+++ b/arch/sh/boards/renesas/edosk7705/setup.c
@@ -21,7 +21,7 @@ static void __init sh_edosk7705_init_irq(void)
21/* 21/*
22 * The Machine Vector 22 * The Machine Vector
23 */ 23 */
24struct sh_machine_vector mv_edosk7705 __initmv = { 24static struct sh_machine_vector mv_edosk7705 __initmv = {
25 .mv_name = "EDOSK7705", 25 .mv_name = "EDOSK7705",
26 .mv_nr_irqs = 80, 26 .mv_nr_irqs = 80,
27 27
@@ -41,4 +41,3 @@ struct sh_machine_vector mv_edosk7705 __initmv = {
41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr, 41 .mv_isa_port2addr = sh_edosk7705_isa_port2addr,
42 .mv_init_irq = sh_edosk7705_init_irq, 42 .mv_init_irq = sh_edosk7705_init_irq,
43}; 43};
44ALIAS_MV(edosk7705)
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c
index f7d0e304d899..fa5fa3920222 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/setup.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c
@@ -89,7 +89,7 @@ static void __init hs7751rvoip_setup(char **cmdline_p)
89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); 89 printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
90} 90}
91 91
92struct sh_machine_vector mv_hs7751rvoip __initmv = { 92static struct sh_machine_vector mv_hs7751rvoip __initmv = {
93 .mv_name = "HS7751RVoIP", 93 .mv_name = "HS7751RVoIP",
94 .mv_setup = hs7751rvoip_setup, 94 .mv_setup = hs7751rvoip_setup,
95 .mv_nr_irqs = 72, 95 .mv_nr_irqs = 72,
@@ -118,4 +118,3 @@ struct sh_machine_vector mv_hs7751rvoip __initmv = {
118 .mv_init_irq = hs7751rvoip_init_irq, 118 .mv_init_irq = hs7751rvoip_init_irq,
119 .mv_ioport_map = hs7751rvoip_ioport_map, 119 .mv_ioport_map = hs7751rvoip_ioport_map,
120}; 120};
121ALIAS_MV(hs7751rvoip)
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0727ef92f2b3..5afb864a1ec5 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -166,10 +166,9 @@ static void __init highlander_setup(char **cmdline_p)
166/* 166/*
167 * The Machine Vector 167 * The Machine Vector
168 */ 168 */
169struct sh_machine_vector mv_highlander __initmv = { 169static struct sh_machine_vector mv_highlander __initmv = {
170 .mv_name = "Highlander", 170 .mv_name = "Highlander",
171 .mv_nr_irqs = 109, 171 .mv_nr_irqs = 109,
172 .mv_setup = highlander_setup, 172 .mv_setup = highlander_setup,
173 .mv_init_irq = highlander_init_irq, 173 .mv_init_irq = highlander_init_irq,
174}; 174};
175ALIAS_MV(highlander)
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 593f26a85e9c..656fda30ef70 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -176,7 +176,7 @@ static void __init rts7751r2d_setup(char **cmdline_p)
176/* 176/*
177 * The Machine Vector 177 * The Machine Vector
178 */ 178 */
179struct sh_machine_vector mv_rts7751r2d __initmv = { 179static struct sh_machine_vector mv_rts7751r2d __initmv = {
180 .mv_name = "RTS7751R2D", 180 .mv_name = "RTS7751R2D",
181 .mv_setup = rts7751r2d_setup, 181 .mv_setup = rts7751r2d_setup,
182 .mv_nr_irqs = 72, 182 .mv_nr_irqs = 72,
@@ -189,4 +189,3 @@ struct sh_machine_vector mv_rts7751r2d __initmv = {
189 .mv_consistent_free = voyagergx_consistent_free, 189 .mv_consistent_free = voyagergx_consistent_free,
190#endif 190#endif
191}; 191};
192ALIAS_MV(rts7751r2d)
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c
index 180810b12107..2dce8bd97f90 100644
--- a/arch/sh/boards/renesas/sh7710voipgw/setup.c
+++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c
@@ -88,9 +88,8 @@ static void __init sh7710voipgw_init_irq(void)
88/* 88/*
89 * The Machine Vector 89 * The Machine Vector
90 */ 90 */
91struct sh_machine_vector mv_sh7710voipgw __initmv = { 91static struct sh_machine_vector mv_sh7710voipgw __initmv = {
92 .mv_name = "SH7710 VoIP Gateway", 92 .mv_name = "SH7710 VoIP Gateway",
93 .mv_nr_irqs = 104, 93 .mv_nr_irqs = 104,
94 .mv_init_irq = sh7710voipgw_init_irq, 94 .mv_init_irq = sh7710voipgw_init_irq,
95}; 95};
96ALIAS_MV(sh7710voipgw)
diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c
index 936117659b74..ee78af842778 100644
--- a/arch/sh/boards/renesas/systemh/setup.c
+++ b/arch/sh/boards/renesas/systemh/setup.c
@@ -28,7 +28,7 @@ static void __init sh7751systemh_init_irq(void)
28 make_systemh_irq(0xb); /* Ethernet interrupt */ 28 make_systemh_irq(0xb); /* Ethernet interrupt */
29} 29}
30 30
31struct sh_machine_vector mv_7751systemh __initmv = { 31static struct sh_machine_vector mv_7751systemh __initmv = {
32 .mv_name = "7751 SystemH", 32 .mv_name = "7751 SystemH",
33 .mv_nr_irqs = 72, 33 .mv_nr_irqs = 72,
34 34
@@ -55,4 +55,3 @@ struct sh_machine_vector mv_7751systemh __initmv = {
55 55
56 .mv_init_irq = sh7751systemh_init_irq, 56 .mv_init_irq = sh7751systemh_init_irq,
57}; 57};
58ALIAS_MV(7751systemh)
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c
index a3a37c9aad2e..7df4312fbb1f 100644
--- a/arch/sh/boards/saturn/setup.c
+++ b/arch/sh/boards/saturn/setup.c
@@ -18,7 +18,7 @@ extern int saturn_irq_demux(int irq_nr);
18/* 18/*
19 * The Machine Vector 19 * The Machine Vector
20 */ 20 */
21struct sh_machine_vector mv_saturn __initmv = { 21static struct sh_machine_vector mv_saturn __initmv = {
22 .mv_name = "Sega Saturn", 22 .mv_name = "Sega Saturn",
23 .mv_nr_irqs = 80, /* Fix this later */ 23 .mv_nr_irqs = 80, /* Fix this later */
24 24
@@ -28,4 +28,3 @@ struct sh_machine_vector mv_saturn __initmv = {
28 .mv_ioremap = saturn_ioremap, 28 .mv_ioremap = saturn_ioremap,
29 .mv_iounmap = saturn_iounmap, 29 .mv_iounmap = saturn_iounmap,
30}; 30};
31ALIAS_MV(saturn)
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c
index ca714879f559..a074b62505ef 100644
--- a/arch/sh/boards/se/7206/setup.c
+++ b/arch/sh/boards/se/7206/setup.c
@@ -70,7 +70,7 @@ __initcall(se7206_devices_setup);
70 * The Machine Vector 70 * The Machine Vector
71 */ 71 */
72 72
73struct sh_machine_vector mv_se __initmv = { 73static struct sh_machine_vector mv_se __initmv = {
74 .mv_name = "SolutionEngine", 74 .mv_name = "SolutionEngine",
75 .mv_nr_irqs = 256, 75 .mv_nr_irqs = 256,
76 .mv_inb = se7206_inb, 76 .mv_inb = se7206_inb,
@@ -96,4 +96,3 @@ struct sh_machine_vector mv_se __initmv = {
96 96
97 .mv_init_irq = init_se7206_IRQ, 97 .mv_init_irq = init_se7206_IRQ,
98}; 98};
99ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index f1960956bad0..eb469f5b6e97 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -46,7 +46,7 @@ __initcall(se7300_devices_setup);
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_7300se __initmv = { 49static struct sh_machine_vector mv_7300se __initmv = {
50 .mv_name = "SolutionEngine 7300", 50 .mv_name = "SolutionEngine 7300",
51 .mv_nr_irqs = 109, 51 .mv_nr_irqs = 109,
52 .mv_inb = sh7300se_inb, 52 .mv_inb = sh7300se_inb,
@@ -72,4 +72,3 @@ struct sh_machine_vector mv_7300se __initmv = {
72 72
73 .mv_init_irq = init_7300se_IRQ, 73 .mv_init_irq = init_7300se_IRQ,
74}; 74};
75ALIAS_MV(7300se)
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index e143017c8975..1deee8556642 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -46,7 +46,7 @@ __initcall(se73180_devices_setup);
46/* 46/*
47 * The Machine Vector 47 * The Machine Vector
48 */ 48 */
49struct sh_machine_vector mv_73180se __initmv = { 49static struct sh_machine_vector mv_73180se __initmv = {
50 .mv_name = "SolutionEngine 73180", 50 .mv_name = "SolutionEngine 73180",
51 .mv_nr_irqs = 108, 51 .mv_nr_irqs = 108,
52 .mv_inb = sh73180se_inb, 52 .mv_inb = sh73180se_inb,
@@ -73,4 +73,3 @@ struct sh_machine_vector mv_73180se __initmv = {
73 .mv_init_irq = init_73180se_IRQ, 73 .mv_init_irq = init_73180se_IRQ,
74 .mv_irq_demux = shmse_irq_demux, 74 .mv_irq_demux = shmse_irq_demux,
75}; 75};
76ALIAS_MV(73180se)
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c
index 3fdb16f2cef1..8fec155e2ff7 100644
--- a/arch/sh/boards/se/7343/setup.c
+++ b/arch/sh/boards/se/7343/setup.c
@@ -64,7 +64,7 @@ static void __init sh7343se_setup(char **cmdline_p)
64/* 64/*
65 * The Machine Vector 65 * The Machine Vector
66 */ 66 */
67struct sh_machine_vector mv_7343se __initmv = { 67static struct sh_machine_vector mv_7343se __initmv = {
68 .mv_name = "SolutionEngine 7343", 68 .mv_name = "SolutionEngine 7343",
69 .mv_setup = sh7343se_setup, 69 .mv_setup = sh7343se_setup,
70 .mv_nr_irqs = 108, 70 .mv_nr_irqs = 108,
@@ -92,4 +92,3 @@ struct sh_machine_vector mv_7343se __initmv = {
92 .mv_init_irq = init_7343se_IRQ, 92 .mv_init_irq = init_7343se_IRQ,
93 .mv_irq_demux = shmse_irq_demux, 93 .mv_irq_demux = shmse_irq_demux,
94}; 94};
95ALIAS_MV(7343se)
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c
index 52d2c4d5d2fa..1d0ef7faa10d 100644
--- a/arch/sh/boards/se/7619/setup.c
+++ b/arch/sh/boards/se/7619/setup.c
@@ -15,8 +15,7 @@
15 * The Machine Vector 15 * The Machine Vector
16 */ 16 */
17 17
18struct sh_machine_vector mv_se __initmv = { 18static struct sh_machine_vector mv_se __initmv = {
19 .mv_name = "SolutionEngine", 19 .mv_name = "SolutionEngine",
20 .mv_nr_irqs = 108, 20 .mv_nr_irqs = 108,
21}; 21};
22ALIAS_MV(se)
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index 17a2631de3ba..2962da148f3f 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -122,7 +122,7 @@ device_initcall(se_devices_setup);
122/* 122/*
123 * The Machine Vector 123 * The Machine Vector
124 */ 124 */
125struct sh_machine_vector mv_se __initmv = { 125static struct sh_machine_vector mv_se __initmv = {
126 .mv_name = "SolutionEngine", 126 .mv_name = "SolutionEngine",
127 .mv_setup = smsc_setup, 127 .mv_setup = smsc_setup,
128#if defined(CONFIG_CPU_SH4) 128#if defined(CONFIG_CPU_SH4)
@@ -160,4 +160,3 @@ struct sh_machine_vector mv_se __initmv = {
160 160
161 .mv_init_irq = init_se_IRQ, 161 .mv_init_irq = init_se_IRQ,
162}; 162};
163ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index 636ca6c987e0..6cca6cbc8069 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -137,7 +137,7 @@ static void __init se7722_setup(char **cmdline_p)
137/* 137/*
138 * The Machine Vector 138 * The Machine Vector
139 */ 139 */
140struct sh_machine_vector mv_se7722 __initmv = { 140static struct sh_machine_vector mv_se7722 __initmv = {
141 .mv_name = "Solution Engine 7722" , 141 .mv_name = "Solution Engine 7722" ,
142 .mv_setup = se7722_setup , 142 .mv_setup = se7722_setup ,
143 .mv_nr_irqs = 109 , 143 .mv_nr_irqs = 109 ,
@@ -145,4 +145,3 @@ struct sh_machine_vector mv_se7722 __initmv = {
145 .mv_irq_demux = se7722_irq_demux, 145 .mv_irq_demux = se7722_irq_demux,
146 146
147}; 147};
148ALIAS_MV(se7722)
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index 52c7bfa57c2c..7873d07e40c1 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -48,7 +48,7 @@ __initcall(se7751_devices_setup);
48/* 48/*
49 * The Machine Vector 49 * The Machine Vector
50 */ 50 */
51struct sh_machine_vector mv_7751se __initmv = { 51static struct sh_machine_vector mv_7751se __initmv = {
52 .mv_name = "7751 SolutionEngine", 52 .mv_name = "7751 SolutionEngine",
53 .mv_nr_irqs = 72, 53 .mv_nr_irqs = 72,
54 54
@@ -71,4 +71,3 @@ struct sh_machine_vector mv_7751se __initmv = {
71 71
72 .mv_init_irq = init_7751se_IRQ, 72 .mv_init_irq = init_7751se_IRQ,
73}; 73};
74ALIAS_MV(7751se)
diff --git a/arch/sh/boards/se/7780/setup.c b/arch/sh/boards/se/7780/setup.c
index df7d08a24c9f..723f2fd4d55b 100644
--- a/arch/sh/boards/se/7780/setup.c
+++ b/arch/sh/boards/se/7780/setup.c
@@ -113,10 +113,9 @@ static void __init se7780_setup(char **cmdline_p)
113/* 113/*
114 * The Machine Vector 114 * The Machine Vector
115 */ 115 */
116struct sh_machine_vector mv_se7780 __initmv = { 116static struct sh_machine_vector mv_se7780 __initmv = {
117 .mv_name = "Solution Engine 7780" , 117 .mv_name = "Solution Engine 7780" ,
118 .mv_setup = se7780_setup , 118 .mv_setup = se7780_setup ,
119 .mv_nr_irqs = 111 , 119 .mv_nr_irqs = 111 ,
120 .mv_init_irq = init_se7780_IRQ, 120 .mv_init_irq = init_se7780_IRQ,
121}; 121};
122ALIAS_MV(se7780)
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index c069c444b4ec..d7867c190a96 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -74,11 +74,10 @@ static int __init sh03_devices_setup(void)
74} 74}
75__initcall(sh03_devices_setup); 75__initcall(sh03_devices_setup);
76 76
77struct sh_machine_vector mv_sh03 __initmv = { 77static struct sh_machine_vector mv_sh03 __initmv = {
78 .mv_name = "Interface (CTP/PCI-SH03)", 78 .mv_name = "Interface (CTP/PCI-SH03)",
79 .mv_setup = sh03_setup, 79 .mv_setup = sh03_setup,
80 .mv_nr_irqs = 48, 80 .mv_nr_irqs = 48,
81 .mv_ioport_map = sh03_ioport_map, 81 .mv_ioport_map = sh03_ioport_map,
82 .mv_init_irq = init_sh03_IRQ, 82 .mv_init_irq = init_sh03_IRQ,
83}; 83};
84ALIAS_MV(sh03)
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c
index 4a9df4a6b034..9c8bb51eb4bb 100644
--- a/arch/sh/boards/shmin/setup.c
+++ b/arch/sh/boards/shmin/setup.c
@@ -43,9 +43,8 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
43 43
44} 44}
45 45
46struct sh_machine_vector mv_shmin __initmv = { 46static struct sh_machine_vector mv_shmin __initmv = {
47 .mv_name = "SHMIN", 47 .mv_name = "SHMIN",
48 .mv_init_irq = init_shmin_irq, 48 .mv_init_irq = init_shmin_irq,
49 .mv_ioport_map = shmin_ioport_map, 49 .mv_ioport_map = shmin_ioport_map,
50}; 50};
51ALIAS_MV(shmin)
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 650fb3645947..b40124c092f5 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -96,7 +96,7 @@ static void __init snapgear_setup(char **cmdline_p)
96/* 96/*
97 * The Machine Vector 97 * The Machine Vector
98 */ 98 */
99struct sh_machine_vector mv_snapgear __initmv = { 99static struct sh_machine_vector mv_snapgear __initmv = {
100 .mv_name = "SnapGear SecureEdge5410", 100 .mv_name = "SnapGear SecureEdge5410",
101 .mv_setup = snapgear_setup, 101 .mv_setup = snapgear_setup,
102 .mv_nr_irqs = 72, 102 .mv_nr_irqs = 72,
@@ -117,4 +117,3 @@ struct sh_machine_vector mv_snapgear __initmv = {
117 117
118 .mv_init_irq = init_snapgear_IRQ, 118 .mv_init_irq = init_snapgear_IRQ,
119}; 119};
120ALIAS_MV(snapgear)
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c
index 6396cea1c896..fc8cd06d66cf 100644
--- a/arch/sh/boards/superh/microdev/setup.c
+++ b/arch/sh/boards/superh/microdev/setup.c
@@ -371,7 +371,7 @@ static void __init microdev_setup(char **cmdline_p)
371/* 371/*
372 * The Machine Vector 372 * The Machine Vector
373 */ 373 */
374struct sh_machine_vector mv_sh4202_microdev __initmv = { 374static struct sh_machine_vector mv_sh4202_microdev __initmv = {
375 .mv_name = "SH4-202 MicroDev", 375 .mv_name = "SH4-202 MicroDev",
376 .mv_setup = microdev_setup, 376 .mv_setup = microdev_setup,
377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ 377 .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */
@@ -403,4 +403,3 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = {
403 .mv_heartbeat = microdev_heartbeat, 403 .mv_heartbeat = microdev_heartbeat,
404#endif 404#endif
405}; 405};
406ALIAS_MV(sh4202_microdev)
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c
index 6bcd939bfaed..630f62f69a36 100644
--- a/arch/sh/boards/titan/setup.c
+++ b/arch/sh/boards/titan/setup.c
@@ -28,7 +28,7 @@ static void __init init_titan_irq(void)
28 make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); 28 make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map));
29} 29}
30 30
31struct sh_machine_vector mv_titan __initmv = { 31static struct sh_machine_vector mv_titan __initmv = {
32 .mv_name = "Titan", 32 .mv_name = "Titan",
33 33
34 .mv_inb = titan_inb, 34 .mv_inb = titan_inb,
@@ -52,4 +52,3 @@ struct sh_machine_vector mv_titan __initmv = {
52 52
53 .mv_init_irq = init_titan_irq, 53 .mv_init_irq = init_titan_irq,
54}; 54};
55ALIAS_MV(titan)
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
index bee4612de59b..f975a1f9094b 100644
--- a/arch/sh/boards/unknown/setup.c
+++ b/arch/sh/boards/unknown/setup.c
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <asm/machvec.h> 16#include <asm/machvec.h>
17 17
18struct sh_machine_vector mv_unknown __initmv = { 18static struct sh_machine_vector mv_unknown __initmv = {
19 .mv_name = "Unknown", 19 .mv_name = "Unknown",
20}; 20};
21ALIAS_MV(unknown)
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index 1e78191154e3..e8121de5faa4 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -29,7 +29,7 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name)
29 struct sh_machine_vector *mv; 29 struct sh_machine_vector *mv;
30 30
31 for_each_mv(mv) 31 for_each_mv(mv)
32 if (strcasecmp(name, get_system_type()) == 0) 32 if (strcasecmp(name, mv->mv_name) == 0)
33 return mv; 33 return mv;
34 34
35 return NULL; 35 return NULL;
@@ -55,20 +55,17 @@ static int __init early_parse_mv(char *from)
55 mv_name[mv_len] = '\0'; 55 mv_name[mv_len] = '\0';
56 from = mv_end; 56 from = mv_end;
57 57
58 if (strcmp(sh_mv.mv_name, mv_name) != 0) { 58 mvp = get_mv_byname(mv_name);
59 mvp = get_mv_byname(mv_name); 59 if (unlikely(!mvp)) {
60 if (unlikely(!mvp)) { 60 printk("Available vectors:\n\n\t");
61 printk("Available vectors:\n\n\t"); 61 for_each_mv(mvp)
62 for_each_mv(mvp) 62 printk("'%s', ", mvp->mv_name);
63 printk("'%s', ", mvp->mv_name); 63 printk("\n\n");
64 printk("\n\n"); 64 panic("Failed to select machvec '%s' -- halting.\n",
65 panic("Failed to select machvec '%s' -- halting.\n", 65 mv_name);
66 mv_name); 66 } else
67 } else 67 sh_mv = *mvp;
68 sh_mv = *mvp;
69 }
70 68
71 printk(KERN_NOTICE "Booting machvec: %s\n", sh_mv.mv_name);
72 return 0; 69 return 0;
73} 70}
74early_param("sh_mv", early_parse_mv); 71early_param("sh_mv", early_parse_mv);
@@ -76,6 +73,26 @@ early_param("sh_mv", early_parse_mv);
76void __init sh_mv_setup(void) 73void __init sh_mv_setup(void)
77{ 74{
78 /* 75 /*
76 * Only overload the machvec if one hasn't been selected on
77 * the command line with sh_mv=
78 */
79 if (strcmp(sh_mv.mv_name, "Unknown") != 0) {
80 unsigned long machvec_size;
81
82 machvec_size = ((unsigned long)&__machvec_end -
83 (unsigned long)&__machvec_start);
84
85 /*
86 * If the machvec hasn't been preselected, use the first
87 * vector (usually the only one) from .machvec.init.
88 */
89 if (machvec_size >= sizeof(struct sh_machine_vector))
90 sh_mv = *(struct sh_machine_vector *)&__machvec_start;
91 }
92
93 printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());
94
95 /*
79 * Manually walk the vec, fill in anything that the board hasn't yet 96 * Manually walk the vec, fill in anything that the board hasn't yet
80 * by hand, wrapping to the generic implementation. 97 * by hand, wrapping to the generic implementation.
81 */ 98 */
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 65c093145dac..55ed653c7a67 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -42,6 +42,13 @@ extern void * __rd_start, * __rd_end;
42 * The bigger value means no problem. 42 * The bigger value means no problem.
43 */ 43 */
44struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; 44struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
45
46/*
47 * The machine vector. First entry in .machvec.init, or clobbered by
48 * sh_mv= on the command line, prior to .machvec.init teardown.
49 */
50struct sh_machine_vector sh_mv = { .mv_name = "Unknown", };
51
45#ifdef CONFIG_VT 52#ifdef CONFIG_VT
46struct screen_info screen_info; 53struct screen_info screen_info;
47#endif 54#endif