1 #include <linux/module.h>
2 #include <linux/dma-mapping.h>
3 #include <asm/machvec.h>
4 #include <asm/system.h>
6 #ifdef CONFIG_IA64_GENERIC
8 #include <linux/kernel.h>
9 #include <linux/string.h>
13 struct ia64_machine_vector ia64_mv
;
14 EXPORT_SYMBOL(ia64_mv
);
16 static struct ia64_machine_vector
* __init
17 lookup_machvec (const char *name
)
19 extern struct ia64_machine_vector machvec_start
[];
20 extern struct ia64_machine_vector machvec_end
[];
21 struct ia64_machine_vector
*mv
;
23 for (mv
= machvec_start
; mv
< machvec_end
; ++mv
)
24 if (strcmp (mv
->name
, name
) == 0)
31 machvec_init (const char *name
)
33 struct ia64_machine_vector
*mv
;
36 name
= acpi_get_sysname();
37 mv
= lookup_machvec(name
);
39 panic("generic kernel failed to find machine vector for"
40 " platform %s!", name
);
43 printk(KERN_INFO
"booting generic kernel on platform %s\n", name
);
47 machvec_init_from_cmdline(const char *cmdline
)
53 if (! (start
= strstr(cmdline
, "machvec=")) )
54 return machvec_init(NULL
);
56 strlcpy(str
, start
+ strlen("machvec="), sizeof(str
));
57 if ( (end
= strchr(str
, ' ')) )
60 return machvec_init(str
);
63 #endif /* CONFIG_IA64_GENERIC */
66 machvec_setup (char **arg
)
69 EXPORT_SYMBOL(machvec_setup
);
72 machvec_timer_interrupt (int irq
, void *dev_id
)
75 EXPORT_SYMBOL(machvec_timer_interrupt
);
78 machvec_dma_sync_single(struct device
*hwdev
, dma_addr_t dma_handle
, size_t size
,
79 enum dma_data_direction dir
)
83 EXPORT_SYMBOL(machvec_dma_sync_single
);
86 machvec_dma_sync_sg(struct device
*hwdev
, struct scatterlist
*sg
, int n
,
87 enum dma_data_direction dir
)
91 EXPORT_SYMBOL(machvec_dma_sync_sg
);