pseries.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Copyright 2006 IBM Corporation.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. */
  9. #ifndef _PSERIES_PSERIES_H
  10. #define _PSERIES_PSERIES_H
  11. #include <linux/interrupt.h>
  12. #include <asm/rtas.h>
  13. struct device_node;
  14. extern void request_event_sources_irqs(struct device_node *np,
  15. irq_handler_t handler, const char *name);
  16. #include <linux/of.h>
  17. struct pt_regs;
  18. extern int pSeries_system_reset_exception(struct pt_regs *regs);
  19. extern int pSeries_machine_check_exception(struct pt_regs *regs);
  20. #ifdef CONFIG_SMP
  21. extern void smp_init_pseries(void);
  22. #else
  23. static inline void smp_init_pseries(void) { };
  24. #endif
  25. extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
  26. extern void pSeries_final_fixup(void);
  27. /* Poweron flag used for enabling auto ups restart */
  28. extern unsigned long rtas_poweron_auto;
  29. /* Provided by HVC VIO */
  30. extern void hvc_vio_init_early(void);
  31. /* Dynamic logical Partitioning/Mobility */
  32. extern void dlpar_free_cc_nodes(struct device_node *);
  33. extern void dlpar_free_cc_property(struct property *);
  34. extern struct device_node *dlpar_configure_connector(__be32,
  35. struct device_node *);
  36. extern int dlpar_attach_node(struct device_node *);
  37. extern int dlpar_detach_node(struct device_node *);
  38. extern int dlpar_acquire_drc(u32 drc_index);
  39. extern int dlpar_release_drc(u32 drc_index);
  40. void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
  41. struct completion *hotplug_done, int *rc);
  42. #ifdef CONFIG_MEMORY_HOTPLUG
  43. int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
  44. #else
  45. static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
  46. {
  47. return -EOPNOTSUPP;
  48. }
  49. #endif
  50. #ifdef CONFIG_HOTPLUG_CPU
  51. int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
  52. #else
  53. static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
  54. {
  55. return -EOPNOTSUPP;
  56. }
  57. #endif
  58. /* PCI root bridge prepare function override for pseries */
  59. struct pci_host_bridge;
  60. int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
  61. extern struct pci_controller_ops pseries_pci_controller_ops;
  62. unsigned long pseries_memory_block_size(void);
  63. void pseries_setup_rfi_flush(void);
  64. #endif /* _PSERIES_PSERIES_H */