0001
0002
0003
0004
0005
0006 #ifndef _PSERIES_PSERIES_H
0007 #define _PSERIES_PSERIES_H
0008
0009 #include <linux/interrupt.h>
0010 #include <asm/rtas.h>
0011
0012 struct device_node;
0013
0014 void __init request_event_sources_irqs(struct device_node *np,
0015 irq_handler_t handler, const char *name);
0016
0017 #include <linux/of.h>
0018
0019 struct pt_regs;
0020
0021 extern int pSeries_system_reset_exception(struct pt_regs *regs);
0022 extern int pSeries_machine_check_exception(struct pt_regs *regs);
0023 extern long pseries_machine_check_realmode(struct pt_regs *regs);
0024 void pSeries_machine_check_log_err(void);
0025
0026 #ifdef CONFIG_SMP
0027 extern void smp_init_pseries(void);
0028
0029
0030 int smp_query_cpu_stopped(unsigned int pcpu);
0031 #define QCSS_STOPPED 0
0032 #define QCSS_STOPPING 1
0033 #define QCSS_NOT_STOPPED 2
0034 #define QCSS_HARDWARE_ERROR -1
0035 #define QCSS_HARDWARE_BUSY -2
0036 #else
0037 static inline void smp_init_pseries(void) { }
0038 #endif
0039
0040 extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
0041 void pseries_machine_kexec(struct kimage *image);
0042
0043 extern void pSeries_final_fixup(void);
0044
0045
0046 extern unsigned long rtas_poweron_auto;
0047
0048
0049 extern void dlpar_free_cc_nodes(struct device_node *);
0050 extern void dlpar_free_cc_property(struct property *);
0051 extern struct device_node *dlpar_configure_connector(__be32,
0052 struct device_node *);
0053 extern int dlpar_attach_node(struct device_node *, struct device_node *);
0054 extern int dlpar_detach_node(struct device_node *);
0055 extern int dlpar_acquire_drc(u32 drc_index);
0056 extern int dlpar_release_drc(u32 drc_index);
0057 extern int dlpar_unisolate_drc(u32 drc_index);
0058
0059 void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog);
0060 int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_errlog);
0061
0062 #ifdef CONFIG_MEMORY_HOTPLUG
0063 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
0064 int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog);
0065 #else
0066 static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
0067 {
0068 return -EOPNOTSUPP;
0069 }
0070 static inline int dlpar_hp_pmem(struct pseries_hp_errorlog *hp_elog)
0071 {
0072 return -EOPNOTSUPP;
0073 }
0074 #endif
0075
0076 #ifdef CONFIG_HOTPLUG_CPU
0077 int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
0078 #else
0079 static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
0080 {
0081 return -EOPNOTSUPP;
0082 }
0083 #endif
0084
0085
0086 struct pci_host_bridge;
0087 int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
0088
0089 extern struct pci_controller_ops pseries_pci_controller_ops;
0090 int pseries_msi_allocate_domains(struct pci_controller *phb);
0091 void pseries_msi_free_domains(struct pci_controller *phb);
0092
0093 unsigned long pseries_memory_block_size(void);
0094
0095 extern int CMO_PrPSP;
0096 extern int CMO_SecPSP;
0097 extern unsigned long CMO_PageSize;
0098
0099 static inline int cmo_get_primary_psp(void)
0100 {
0101 return CMO_PrPSP;
0102 }
0103
0104 static inline int cmo_get_secondary_psp(void)
0105 {
0106 return CMO_SecPSP;
0107 }
0108
0109 static inline unsigned long cmo_get_page_size(void)
0110 {
0111 return CMO_PageSize;
0112 }
0113
0114 int dlpar_workqueue_init(void);
0115
0116 extern u32 pseries_security_flavor;
0117 void pseries_setup_security_mitigations(void);
0118
0119 #ifdef CONFIG_PPC_64S_HASH_MMU
0120 void pseries_lpar_read_hblkrm_characteristics(void);
0121 #else
0122 static inline void pseries_lpar_read_hblkrm_characteristics(void) { }
0123 #endif
0124
0125 void pseries_rng_init(void);
0126
0127 #endif