machvec.c 1.5 KB

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