Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62930
b: refs/heads/master
c: a07ee86
h: refs/heads/master
v: v3
  • Loading branch information
Horms authored and Tony Luck committed Jul 25, 2007
1 parent b51a624 commit 7b1dda0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ffbc82351c62eeeeaeb9e817ddf93049353493d
refs/heads/master: a07ee86205808d36973440e68c7277f9ed63b87f
27 changes: 18 additions & 9 deletions trunk/arch/ia64/kernel/machvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
struct ia64_machine_vector ia64_mv;
EXPORT_SYMBOL(ia64_mv);

static __initdata const char *mvec_name;
static __init int setup_mvec(char *s)
{
mvec_name = s;
return 0;
}
early_param("machvec", setup_mvec);

static struct ia64_machine_vector * __init
lookup_machvec (const char *name)
{
Expand All @@ -41,7 +33,7 @@ machvec_init (const char *name)
struct ia64_machine_vector *mv;

if (!name)
name = mvec_name ? mvec_name : acpi_get_sysname();
name = acpi_get_sysname();
mv = lookup_machvec(name);
if (!mv)
panic("generic kernel failed to find machine vector for"
Expand All @@ -51,6 +43,23 @@ machvec_init (const char *name)
printk(KERN_INFO "booting generic kernel on platform %s\n", name);
}

void __init
machvec_init_from_cmdline(const char *cmdline)
{
char str[64];
const char *start;
char *end;

if (! (start = strstr(cmdline, "machvec=")) )
return machvec_init(NULL);

strlcpy(str, start + strlen("machvec="), sizeof(str));
if ( (end = strchr(str, ' ')) )
*end = '\0';

return machvec_init(str);
}

#endif /* CONFIG_IA64_GENERIC */

void
Expand Down
11 changes: 8 additions & 3 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,17 @@ setup_arch (char **cmdline_p)
efi_init();
io_port_init();

parse_early_param();

#ifdef CONFIG_IA64_GENERIC
machvec_init(NULL);
/* machvec needs to be parsed from the command line
* before parse_early_param() is called to ensure
* that ia64_mv is initialised before any command line
* settings may cause console setup to occur
*/
machvec_init_from_cmdline(*cmdline_p);
#endif

parse_early_param();

if (early_console_setup(*cmdline_p) == 0)
mark_bsp_online();

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-ia64/machvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ struct ia64_machine_vector {

extern struct ia64_machine_vector ia64_mv;
extern void machvec_init (const char *name);
extern void machvec_init_from_cmdline(const char *cmdline);

# else
# error Unknown configuration. Update asm-ia64/machvec.h.
Expand Down

0 comments on commit 7b1dda0

Please sign in to comment.