machvec.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 struct ia64_machine_vector *
  12. lookup_machvec (const char *name)
  13. {
  14. extern struct ia64_machine_vector machvec_start[];
  15. extern struct ia64_machine_vector machvec_end[];
  16. struct ia64_machine_vector *mv;
  17. for (mv = machvec_start; mv < machvec_end; ++mv)
  18. if (strcmp (mv->name, name) == 0)
  19. return mv;
  20. return 0;
  21. }
  22. void
  23. machvec_init (const char *name)
  24. {
  25. struct ia64_machine_vector *mv;
  26. mv = lookup_machvec(name);
  27. if (!mv) {
  28. panic("generic kernel failed to find machine vector for platform %s!", name);
  29. }
  30. ia64_mv = *mv;
  31. printk(KERN_INFO "booting generic kernel on platform %s\n", name);
  32. }
  33. #endif /* CONFIG_IA64_GENERIC */
  34. void
  35. machvec_setup (char **arg)
  36. {
  37. }
  38. EXPORT_SYMBOL(machvec_setup);
  39. void
  40. machvec_timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
  41. {
  42. }
  43. EXPORT_SYMBOL(machvec_timer_interrupt);
  44. void
  45. machvec_dma_sync_single (struct device *hwdev, dma_addr_t dma_handle, size_t size, int dir)
  46. {
  47. mb();
  48. }
  49. EXPORT_SYMBOL(machvec_dma_sync_single);
  50. void
  51. machvec_dma_sync_sg (struct device *hwdev, struct scatterlist *sg, int n, int dir)
  52. {
  53. mb();
  54. }
  55. EXPORT_SYMBOL(machvec_dma_sync_sg);