Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <linux/module.h> |
| 2 | |
| 3 | #include <asm/machvec.h> |
| 4 | #include <asm/system.h> |
| 5 | |
| 6 | #ifdef CONFIG_IA64_GENERIC |
| 7 | |
| 8 | #include <linux/kernel.h> |
| 9 | #include <linux/string.h> |
| 10 | |
| 11 | #include <asm/page.h> |
| 12 | |
| 13 | struct ia64_machine_vector ia64_mv; |
| 14 | EXPORT_SYMBOL(ia64_mv); |
| 15 | |
Horms | a5b00bb | 2006-03-23 14:27:12 -0800 | [diff] [blame] | 16 | static __initdata const char *mvec_name; |
| 17 | static __init int setup_mvec(char *s) |
| 18 | { |
| 19 | mvec_name = s; |
| 20 | return 0; |
| 21 | } |
| 22 | early_param("machvec", setup_mvec); |
| 23 | |
| 24 | static struct ia64_machine_vector * __init |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | lookup_machvec (const char *name) |
| 26 | { |
| 27 | extern struct ia64_machine_vector machvec_start[]; |
| 28 | extern struct ia64_machine_vector machvec_end[]; |
| 29 | struct ia64_machine_vector *mv; |
| 30 | |
| 31 | for (mv = machvec_start; mv < machvec_end; ++mv) |
| 32 | if (strcmp (mv->name, name) == 0) |
| 33 | return mv; |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 | |
| 38 | void |
| 39 | machvec_init (const char *name) |
| 40 | { |
| 41 | struct ia64_machine_vector *mv; |
| 42 | |
Horms | a5b00bb | 2006-03-23 14:27:12 -0800 | [diff] [blame] | 43 | if (!name) |
| 44 | name = mvec_name ? mvec_name : acpi_get_sysname(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | mv = lookup_machvec(name); |
Horms | a5b00bb | 2006-03-23 14:27:12 -0800 | [diff] [blame] | 46 | if (!mv) |
| 47 | panic("generic kernel failed to find machine vector for" |
| 48 | " platform %s!", name); |
| 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | ia64_mv = *mv; |
| 51 | printk(KERN_INFO "booting generic kernel on platform %s\n", name); |
| 52 | } |
| 53 | |
| 54 | #endif /* CONFIG_IA64_GENERIC */ |
| 55 | |
| 56 | void |
| 57 | machvec_setup (char **arg) |
| 58 | { |
| 59 | } |
| 60 | EXPORT_SYMBOL(machvec_setup); |
| 61 | |
| 62 | void |
David Howells | 7d12e78 | 2006-10-05 14:55:46 +0100 | [diff] [blame^] | 63 | machvec_timer_interrupt (int irq, void *dev_id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | { |
| 65 | } |
| 66 | EXPORT_SYMBOL(machvec_timer_interrupt); |
| 67 | |
| 68 | void |
| 69 | machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir) |
| 70 | { |
| 71 | mb(); |
| 72 | } |
| 73 | EXPORT_SYMBOL(machvec_dma_sync_single); |
| 74 | |
| 75 | void |
| 76 | machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir) |
| 77 | { |
| 78 | mb(); |
| 79 | } |
| 80 | EXPORT_SYMBOL(machvec_dma_sync_sg); |