machvec.c 1.6 KB

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