]> err.no Git - linux-2.6/commitdiff
sh: Kill off machvec aliases.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 15 May 2007 06:19:34 +0000 (15:19 +0900)
committerPaul Mundt <lethal@hera.kernel.org>
Fri, 8 Jun 2007 02:43:39 +0000 (02:43 +0000)
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>
32 files changed:
arch/sh/boards/dreamcast/setup.c
arch/sh/boards/hp6xx/mach.c
arch/sh/boards/hp6xx/setup.c
arch/sh/boards/landisk/setup.c
arch/sh/boards/lboxre2/setup.c
arch/sh/boards/mpc1211/setup.c
arch/sh/boards/renesas/edosk7705/setup.c
arch/sh/boards/renesas/hs7751rvoip/setup.c
arch/sh/boards/renesas/r7780rp/setup.c
arch/sh/boards/renesas/rts7751r2d/setup.c
arch/sh/boards/renesas/sh7710voipgw/setup.c
arch/sh/boards/renesas/systemh/setup.c
arch/sh/boards/saturn/setup.c
arch/sh/boards/se/7206/setup.c
arch/sh/boards/se/7300/setup.c
arch/sh/boards/se/73180/setup.c
arch/sh/boards/se/7343/setup.c
arch/sh/boards/se/7619/setup.c
arch/sh/boards/se/770x/setup.c
arch/sh/boards/se/7722/setup.c
arch/sh/boards/se/7751/setup.c
arch/sh/boards/se/7780/setup.c
arch/sh/boards/sh03/setup.c
arch/sh/boards/shmin/setup.c
arch/sh/boards/snapgear/setup.c
arch/sh/boards/superh/microdev/setup.c
arch/sh/boards/titan/setup.c
arch/sh/boards/unknown/setup.c
arch/sh/kernel/machvec.c
arch/sh/kernel/setup.c
include/asm-sh/machvec.h
include/asm-sh/machvec_init.h [deleted file]

index f13017eeeb27ebba6cb68571044155fcf7d6a5a0..8799df6e866a7918018aa4bf893046867b3c2c1f 100644 (file)
@@ -60,7 +60,7 @@ static void __init dreamcast_setup(char **cmdline_p)
 #endif
 }
 
-struct sh_machine_vector mv_dreamcast __initmv = {
+static struct sh_machine_vector mv_dreamcast __initmv = {
        .mv_name                = "Sega Dreamcast",
        .mv_setup               = dreamcast_setup,
        .mv_irq_demux           = systemasic_irq_demux,
@@ -70,4 +70,3 @@ struct sh_machine_vector mv_dreamcast __initmv = {
        .mv_consistent_free     = dreamcast_consistent_free,
 #endif
 };
-ALIAS_MV(dreamcast)
index 08dbba910f7406c796099d1f2b2c788a456965f2..35b895960474f8c1e6df65fa58933067c82b2e03 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-struct sh_machine_vector mv_hp6xx __initmv = {
+static struct sh_machine_vector mv_hp6xx __initmv = {
        .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
 
        .mv_inb = hd64461_inb,
@@ -42,5 +42,3 @@ struct sh_machine_vector mv_hp6xx __initmv = {
 
        .mv_irq_demux = hd64461_irq_demux,
 };
-
-ALIAS_MV(hp6xx)
index 6aeee85c978555b267ad7e6ec997e474888c6817..7ae708930bacfa4e7f6ff607b8197248e1c7c96a 100644 (file)
@@ -98,10 +98,9 @@ static void __init hp6xx_setup(char **cmdline_p)
 }
 device_initcall(hp6xx_devices_setup);
 
-struct sh_machine_vector mv_hp6xx __initmv = {
+static struct sh_machine_vector mv_hp6xx __initmv = {
        .mv_name = "hp6xx",
        .mv_setup = hp6xx_setup,
        .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
        .mv_irq_demux = hd64461_irq_demux,
 };
-ALIAS_MV(hp6xx)
index f953c74277695bed996d85e12e3888ba25f19592..eda71763ecc5281c1173012d9767a18f7300c580 100644 (file)
@@ -97,10 +97,9 @@ static void __init landisk_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_landisk __initmv = {
+static struct sh_machine_vector mv_landisk __initmv = {
        .mv_name = "LANDISK",
        .mv_nr_irqs = 72,
        .mv_setup = landisk_setup,
        .mv_init_irq = init_landisk_IRQ,
 };
-ALIAS_MV(landisk)
index 4e20f7c63bf3dfc1477411cb0da9d994f40a2ee8..9c830fdc411b346b056ed2b5885bcae750adcc26 100644 (file)
@@ -77,9 +77,8 @@ device_initcall(lboxre2_devices_setup);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_lboxre2 __initmv = {
+static struct sh_machine_vector mv_lboxre2 __initmv = {
        .mv_name                = "L-BOX RE2",
        .mv_nr_irqs             = 72,
        .mv_init_irq            = init_lboxre2_IRQ,
 };
-ALIAS_MV(lboxre2)
index 1a0604b23ce0f4bac86f65fa1e783d8e372cdb04..8ce03e00b0ae34a97a939e4c9a1d250fdce6b309 100644 (file)
@@ -338,11 +338,10 @@ static void __init mpc1211_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_mpc1211 __initmv = {
+static struct sh_machine_vector mv_mpc1211 __initmv = {
        .mv_name                = "Interface MPC-1211(CTP/PCI/MPC-SH02)",
        .mv_setup               = mpc1211_setup,
        .mv_nr_irqs             = 48,
        .mv_irq_demux           = mpc1211_irq_demux,
        .mv_init_irq            = init_mpc1211_IRQ,
 };
-ALIAS_MV(mpc1211)
index ec5be0107719ecea1d340d4e68e78ecc6c832c64..f076c45308ddab2f3178e9a1680ff8f629517132 100644 (file)
@@ -21,7 +21,7 @@ static void __init sh_edosk7705_init_irq(void)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_edosk7705 __initmv = {
+static struct sh_machine_vector mv_edosk7705 __initmv = {
        .mv_name                = "EDOSK7705",
        .mv_nr_irqs             = 80,
 
@@ -41,4 +41,3 @@ struct sh_machine_vector mv_edosk7705 __initmv = {
        .mv_isa_port2addr       = sh_edosk7705_isa_port2addr,
        .mv_init_irq            = sh_edosk7705_init_irq,
 };
-ALIAS_MV(edosk7705)
index f7d0e304d899737e9292d66d31e27a1e1cc948a2..fa5fa39202227f97e5e23d619f0482b3e348293a 100644 (file)
@@ -89,7 +89,7 @@ static void __init hs7751rvoip_setup(char **cmdline_p)
        printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
 }
 
-struct sh_machine_vector mv_hs7751rvoip __initmv = {
+static struct sh_machine_vector mv_hs7751rvoip __initmv = {
        .mv_name                = "HS7751RVoIP",
        .mv_setup               = hs7751rvoip_setup,
        .mv_nr_irqs             = 72,
@@ -118,4 +118,3 @@ struct sh_machine_vector mv_hs7751rvoip __initmv = {
        .mv_init_irq            = hs7751rvoip_init_irq,
        .mv_ioport_map          = hs7751rvoip_ioport_map,
 };
-ALIAS_MV(hs7751rvoip)
index 0727ef92f2b37431cb4f3de3ab3234b360eeef02..5afb864a1ec51d0637ff6bc82d2a11429719d3d1 100644 (file)
@@ -166,10 +166,9 @@ static void __init highlander_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_highlander __initmv = {
+static struct sh_machine_vector mv_highlander __initmv = {
        .mv_name                = "Highlander",
        .mv_nr_irqs             = 109,
        .mv_setup               = highlander_setup,
        .mv_init_irq            = highlander_init_irq,
 };
-ALIAS_MV(highlander)
index 593f26a85e9c1b15de194a36d6abad3899fd0382..656fda30ef704b36951a9123602ad9dfa54ec10a 100644 (file)
@@ -176,7 +176,7 @@ static void __init rts7751r2d_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_rts7751r2d __initmv = {
+static struct sh_machine_vector mv_rts7751r2d __initmv = {
        .mv_name                = "RTS7751R2D",
        .mv_setup               = rts7751r2d_setup,
        .mv_nr_irqs             = 72,
@@ -189,4 +189,3 @@ struct sh_machine_vector mv_rts7751r2d __initmv = {
        .mv_consistent_free     = voyagergx_consistent_free,
 #endif
 };
-ALIAS_MV(rts7751r2d)
index 180810b121076090acb5e215cb26898859c14d01..2dce8bd97f90408a9f2229399955664d8ddffc96 100644 (file)
@@ -88,9 +88,8 @@ static void __init sh7710voipgw_init_irq(void)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_sh7710voipgw __initmv = {
+static struct sh_machine_vector mv_sh7710voipgw __initmv = {
        .mv_name                = "SH7710 VoIP Gateway",
        .mv_nr_irqs             = 104,
        .mv_init_irq            = sh7710voipgw_init_irq,
 };
-ALIAS_MV(sh7710voipgw)
index 936117659b74410d371ddb30046436a223448f53..ee78af842778e80dc6a89fab923b71aa8ba09efc 100644 (file)
@@ -28,7 +28,7 @@ static void __init sh7751systemh_init_irq(void)
        make_systemh_irq(0xb);  /* Ethernet interrupt */
 }
 
-struct sh_machine_vector mv_7751systemh __initmv = {
+static struct sh_machine_vector mv_7751systemh __initmv = {
        .mv_name                = "7751 SystemH",
        .mv_nr_irqs             = 72,
 
@@ -55,4 +55,3 @@ struct sh_machine_vector mv_7751systemh __initmv = {
 
        .mv_init_irq            = sh7751systemh_init_irq,
 };
-ALIAS_MV(7751systemh)
index a3a37c9aad2eea672bd36a9d9665b7ffdb0521f2..7df4312fbb1ffc462706a3f8181f9263f47c7f30 100644 (file)
@@ -18,7 +18,7 @@ extern int saturn_irq_demux(int irq_nr);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_saturn __initmv = {
+static struct sh_machine_vector mv_saturn __initmv = {
        .mv_name                = "Sega Saturn",
        .mv_nr_irqs             = 80,   /* Fix this later */
 
@@ -28,4 +28,3 @@ struct sh_machine_vector mv_saturn __initmv = {
        .mv_ioremap             = saturn_ioremap,
        .mv_iounmap             = saturn_iounmap,
 };
-ALIAS_MV(saturn)
index ca714879f55972bba43862ba70073702c9612d22..a074b62505ef1db0acce7eae1d4dd62961e30cb7 100644 (file)
@@ -70,7 +70,7 @@ __initcall(se7206_devices_setup);
  * The Machine Vector
  */
 
-struct sh_machine_vector mv_se __initmv = {
+static struct sh_machine_vector mv_se __initmv = {
        .mv_name                = "SolutionEngine",
        .mv_nr_irqs             = 256,
        .mv_inb                 = se7206_inb,
@@ -96,4 +96,3 @@ struct sh_machine_vector mv_se __initmv = {
 
        .mv_init_irq            = init_se7206_IRQ,
 };
-ALIAS_MV(se)
index f1960956bad051f282ec74638432415eb985781a..eb469f5b6e97595c1deb0901c509f3f4332add17 100644 (file)
@@ -46,7 +46,7 @@ __initcall(se7300_devices_setup);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_7300se __initmv = {
+static struct sh_machine_vector mv_7300se __initmv = {
        .mv_name = "SolutionEngine 7300",
        .mv_nr_irqs = 109,
        .mv_inb = sh7300se_inb,
@@ -72,4 +72,3 @@ struct sh_machine_vector mv_7300se __initmv = {
 
        .mv_init_irq = init_7300se_IRQ,
 };
-ALIAS_MV(7300se)
index e143017c8975a0662ca64c2116106e8f97389533..1deee85566428196b4cf775f54f797494e8b6a0d 100644 (file)
@@ -46,7 +46,7 @@ __initcall(se73180_devices_setup);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_73180se __initmv = {
+static struct sh_machine_vector mv_73180se __initmv = {
        .mv_name = "SolutionEngine 73180",
        .mv_nr_irqs = 108,
        .mv_inb = sh73180se_inb,
@@ -73,4 +73,3 @@ struct sh_machine_vector mv_73180se __initmv = {
        .mv_init_irq = init_73180se_IRQ,
        .mv_irq_demux = shmse_irq_demux,
 };
-ALIAS_MV(73180se)
index 3fdb16f2cef1dfd400677bfd7b9d623706e79ef2..8fec155e2ff7f86816c8e90264906381fc766f6b 100644 (file)
@@ -64,7 +64,7 @@ static void __init sh7343se_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_7343se __initmv = {
+static struct sh_machine_vector mv_7343se __initmv = {
        .mv_name = "SolutionEngine 7343",
        .mv_setup = sh7343se_setup,
        .mv_nr_irqs = 108,
@@ -92,4 +92,3 @@ struct sh_machine_vector mv_7343se __initmv = {
        .mv_init_irq = init_7343se_IRQ,
        .mv_irq_demux = shmse_irq_demux,
 };
-ALIAS_MV(7343se)
index 52d2c4d5d2fa98327b306a62f7a39f0867dc2330..1d0ef7faa10dd1b467cc2586c9f161c9f4d48ed6 100644 (file)
@@ -15,8 +15,7 @@
  * The Machine Vector
  */
 
-struct sh_machine_vector mv_se __initmv = {
+static struct sh_machine_vector mv_se __initmv = {
        .mv_name                = "SolutionEngine",
        .mv_nr_irqs             = 108,
 };
-ALIAS_MV(se)
index 17a2631de3ba90626485c942d6c2f2bd91decfb5..2962da148f3ff8a5cb89cfc8717b68f712df7d14 100644 (file)
@@ -122,7 +122,7 @@ device_initcall(se_devices_setup);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_se __initmv = {
+static struct sh_machine_vector mv_se __initmv = {
        .mv_name                = "SolutionEngine",
        .mv_setup               = smsc_setup,
 #if defined(CONFIG_CPU_SH4)
@@ -160,4 +160,3 @@ struct sh_machine_vector mv_se __initmv = {
 
        .mv_init_irq            = init_se_IRQ,
 };
-ALIAS_MV(se)
index 636ca6c987e0816a8bbbc6901d0882719f4ca3d4..6cca6cbc80690383204c61bb6887e4dada8f4268 100644 (file)
@@ -137,7 +137,7 @@ static void __init se7722_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_se7722 __initmv = {
+static struct sh_machine_vector mv_se7722 __initmv = {
        .mv_name                = "Solution Engine 7722" ,
        .mv_setup               = se7722_setup ,
        .mv_nr_irqs             = 109 ,
@@ -145,4 +145,3 @@ struct sh_machine_vector mv_se7722 __initmv = {
        .mv_irq_demux           = se7722_irq_demux,
 
 };
-ALIAS_MV(se7722)
index 52c7bfa57c2c64c18ba7d41b378a352d10a01f1f..7873d07e40c1cbac50e9a62d453c8dc87447e20c 100644 (file)
@@ -48,7 +48,7 @@ __initcall(se7751_devices_setup);
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_7751se __initmv = {
+static struct sh_machine_vector mv_7751se __initmv = {
        .mv_name                = "7751 SolutionEngine",
        .mv_nr_irqs             = 72,
 
@@ -71,4 +71,3 @@ struct sh_machine_vector mv_7751se __initmv = {
 
        .mv_init_irq            = init_7751se_IRQ,
 };
-ALIAS_MV(7751se)
index df7d08a24c9f8664da0e82fba87f50cadbab1ddf..723f2fd4d55bfabf57c22cc11befc71f2c949b78 100644 (file)
@@ -113,10 +113,9 @@ static void __init se7780_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_se7780 __initmv = {
+static struct sh_machine_vector mv_se7780 __initmv = {
        .mv_name                = "Solution Engine 7780" ,
        .mv_setup               = se7780_setup ,
        .mv_nr_irqs             = 111 ,
        .mv_init_irq            = init_se7780_IRQ,
 };
-ALIAS_MV(se7780)
index c069c444b4eca13663f4f645a592e555720ac7f2..d7867c190a969c4efb8b1c2145858a526765d9ad 100644 (file)
@@ -74,11 +74,10 @@ static int __init sh03_devices_setup(void)
 }
 __initcall(sh03_devices_setup);
 
-struct sh_machine_vector mv_sh03 __initmv = {
+static struct sh_machine_vector mv_sh03 __initmv = {
        .mv_name                = "Interface (CTP/PCI-SH03)",
        .mv_setup               = sh03_setup,
        .mv_nr_irqs             = 48,
        .mv_ioport_map          = sh03_ioport_map,
        .mv_init_irq            = init_sh03_IRQ,
 };
-ALIAS_MV(sh03)
index 4a9df4a6b034d2f3cfe4013d3c2e4fea4e8dc711..9c8bb51eb4bb2ac7c979b20ad50216045709e6b2 100644 (file)
@@ -43,9 +43,8 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
 
 }
 
-struct sh_machine_vector mv_shmin __initmv = {
+static struct sh_machine_vector mv_shmin __initmv = {
        .mv_name        = "SHMIN",
        .mv_init_irq    = init_shmin_irq,
        .mv_ioport_map  = shmin_ioport_map,
 };
-ALIAS_MV(shmin)
index 650fb36459472e1866cee0aa5064b3b6f3488341..b40124c092f58e5ad26650c91abe48743863a51e 100644 (file)
@@ -96,7 +96,7 @@ static void __init snapgear_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_snapgear __initmv = {
+static struct sh_machine_vector mv_snapgear __initmv = {
        .mv_name                = "SnapGear SecureEdge5410",
        .mv_setup               = snapgear_setup,
        .mv_nr_irqs             = 72,
@@ -117,4 +117,3 @@ struct sh_machine_vector mv_snapgear __initmv = {
 
        .mv_init_irq            = init_snapgear_IRQ,
 };
-ALIAS_MV(snapgear)
index 6396cea1c89653b0e37805708d13382252b74e18..fc8cd06d66cf287a29cd65505bb685a21ef35eab 100644 (file)
@@ -371,7 +371,7 @@ static void __init microdev_setup(char **cmdline_p)
 /*
  * The Machine Vector
  */
-struct sh_machine_vector mv_sh4202_microdev __initmv = {
+static struct sh_machine_vector mv_sh4202_microdev __initmv = {
        .mv_name                = "SH4-202 MicroDev",
        .mv_setup               = microdev_setup,
        .mv_nr_irqs             = 72,           /* QQQ need to check this - use the MACRO */
@@ -403,4 +403,3 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = {
        .mv_heartbeat           = microdev_heartbeat,
 #endif
 };
-ALIAS_MV(sh4202_microdev)
index 6bcd939bfaed4899783bf579eabd3011e9221c32..630f62f69a367e4b3c050ff31e45992403f648fc 100644 (file)
@@ -28,7 +28,7 @@ static void __init init_titan_irq(void)
        make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map));
 }
 
-struct sh_machine_vector mv_titan __initmv = {
+static struct sh_machine_vector mv_titan __initmv = {
        .mv_name =      "Titan",
 
        .mv_inb =       titan_inb,
@@ -52,4 +52,3 @@ struct sh_machine_vector mv_titan __initmv = {
 
        .mv_init_irq =  init_titan_irq,
 };
-ALIAS_MV(titan)
index bee4612de59b475a91148dbfe2e98a689d337995..f975a1f9094b720ca4eebf19dc341ae0ae81eadd 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/init.h>
 #include <asm/machvec.h>
 
-struct sh_machine_vector mv_unknown __initmv = {
+static struct sh_machine_vector mv_unknown __initmv = {
        .mv_name                = "Unknown",
 };
-ALIAS_MV(unknown)
index 1e78191154e335bd5f5b03ba48cc951fff9ac253..e8121de5faa4f9108dd20f086e46d610e6561d29 100644 (file)
@@ -29,7 +29,7 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name)
        struct sh_machine_vector *mv;
 
        for_each_mv(mv)
-               if (strcasecmp(name, get_system_type()) == 0)
+               if (strcasecmp(name, mv->mv_name) == 0)
                        return mv;
 
        return NULL;
@@ -55,26 +55,43 @@ static int __init early_parse_mv(char *from)
        mv_name[mv_len] = '\0';
        from = mv_end;
 
-       if (strcmp(sh_mv.mv_name, mv_name) != 0) {
-               mvp = get_mv_byname(mv_name);
-               if (unlikely(!mvp)) {
-                       printk("Available vectors:\n\n\t");
-                       for_each_mv(mvp)
-                               printk("'%s', ", mvp->mv_name);
-                       printk("\n\n");
-                       panic("Failed to select machvec '%s' -- halting.\n",
-                             mv_name);
-               } else
-                       sh_mv = *mvp;
-       }
+       mvp = get_mv_byname(mv_name);
+       if (unlikely(!mvp)) {
+               printk("Available vectors:\n\n\t");
+               for_each_mv(mvp)
+                       printk("'%s', ", mvp->mv_name);
+               printk("\n\n");
+               panic("Failed to select machvec '%s' -- halting.\n",
+                     mv_name);
+       } else
+               sh_mv = *mvp;
 
-       printk(KERN_NOTICE "Booting machvec: %s\n", sh_mv.mv_name);
        return 0;
 }
 early_param("sh_mv", early_parse_mv);
 
 void __init sh_mv_setup(void)
 {
+       /*
+        * Only overload the machvec if one hasn't been selected on
+        * the command line with sh_mv=
+        */
+       if (strcmp(sh_mv.mv_name, "Unknown") != 0) {
+               unsigned long machvec_size;
+
+               machvec_size = ((unsigned long)&__machvec_end -
+                               (unsigned long)&__machvec_start);
+
+               /*
+                * If the machvec hasn't been preselected, use the first
+                * vector (usually the only one) from .machvec.init.
+                */
+               if (machvec_size >= sizeof(struct sh_machine_vector))
+                       sh_mv = *(struct sh_machine_vector *)&__machvec_start;
+       }
+
+       printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type());
+
        /*
         * Manually walk the vec, fill in anything that the board hasn't yet
         * by hand, wrapping to the generic implementation.
index 65c093145dace098217efaa839a538a85cbdaa9e..55ed653c7a677a7b303a9644d38e73dd4ae9dfe1 100644 (file)
@@ -42,6 +42,13 @@ extern void * __rd_start, * __rd_end;
  * The bigger value means no problem.
  */
 struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, };
+
+/*
+ * The machine vector. First entry in .machvec.init, or clobbered by
+ * sh_mv= on the command line, prior to .machvec.init teardown.
+ */
+struct sh_machine_vector sh_mv = { .mv_name = "Unknown", };
+
 #ifdef CONFIG_VT
 struct screen_info screen_info;
 #endif
index 70389b72ffef9dce063f55f576aa01fa2c40bdee..088698bacf2f4947b6d1c60bf91bbddc8a26037e 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/types.h>
 #include <linux/time.h>
 #include <asm/machtypes.h>
-#include <asm/machvec_init.h>
 
 struct device;
 
@@ -68,4 +67,7 @@ extern struct sh_machine_vector sh_mv;
 
 #define get_system_type()      sh_mv.mv_name
 
+#define __initmv \
+       __attribute_used__ __attribute__((__section__ (".machvec.init")))
+
 #endif /* _ASM_SH_MACHVEC_H */
diff --git a/include/asm-sh/machvec_init.h b/include/asm-sh/machvec_init.h
deleted file mode 100644 (file)
index cb015b8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * include/asm-sh/machvec_init.h
- *
- * Copyright 2000 Stuart Menefy (stuart.menefy@st.com)
- *
- * May be copied or modified under the terms of the GNU General Public
- * License.  See linux/COPYING for more information.
- *
- * This file has goodies to help simplify instantiation of machine vectors.
- */
-
-#ifndef __SH_MACHVEC_INIT_H
-#define __SH_MACHVEC_INIT_H
-
-#define __initmv __attribute__((unused,__section__ (".machvec.init")))
-#define ALIAS_MV(system) \
-  asm(".weak sh_mv\nsh_mv = mv_"#system );
-
-#endif /* __SH_MACHVEC_INIT_H */