aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/machvec.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/machvec.c')
-rw-r--r--arch/sh/kernel/machvec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index e8121de5faa4..23c5948f0124 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -35,6 +35,8 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name)
35 return NULL; 35 return NULL;
36} 36}
37 37
38static unsigned int __initdata machvec_selected;
39
38static int __init early_parse_mv(char *from) 40static int __init early_parse_mv(char *from)
39{ 41{
40 char mv_name[MV_NAME_SIZE] = ""; 42 char mv_name[MV_NAME_SIZE] = "";
@@ -55,9 +57,15 @@ static int __init early_parse_mv(char *from)
55 mv_name[mv_len] = '\0'; 57 mv_name[mv_len] = '\0';
56 from = mv_end; 58 from = mv_end;
57 59
60 machvec_selected = 1;
61
62 /* Boot with the generic vector */
63 if (strcmp(mv_name, "generic") == 0)
64 return 0;
65
58 mvp = get_mv_byname(mv_name); 66 mvp = get_mv_byname(mv_name);
59 if (unlikely(!mvp)) { 67 if (unlikely(!mvp)) {
60 printk("Available vectors:\n\n\t"); 68 printk("Available vectors:\n\n\t'%s', ", sh_mv.mv_name);
61 for_each_mv(mvp) 69 for_each_mv(mvp)
62 printk("'%s', ", mvp->mv_name); 70 printk("'%s', ", mvp->mv_name);
63 printk("\n\n"); 71 printk("\n\n");
@@ -76,7 +84,7 @@ void __init sh_mv_setup(void)
76 * Only overload the machvec if one hasn't been selected on 84 * Only overload the machvec if one hasn't been selected on
77 * the command line with sh_mv= 85 * the command line with sh_mv=
78 */ 86 */
79 if (strcmp(sh_mv.mv_name, "Unknown") != 0) { 87 if (!machvec_selected) {
80 unsigned long machvec_size; 88 unsigned long machvec_size;
81 89
82 machvec_size = ((unsigned long)&__machvec_end - 90 machvec_size = ((unsigned long)&__machvec_end -