2 * Copyright 2006 IBM Corporation.
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.
10 #ifndef _PSERIES_PSERIES_H
11 #define _PSERIES_PSERIES_H
13 #include <linux/interrupt.h>
18 extern void request_event_sources_irqs(struct device_node *np,
19 irq_handler_t handler, const char *name);
25 extern int pSeries_system_reset_exception(struct pt_regs *regs);
26 extern int pSeries_machine_check_exception(struct pt_regs *regs);
29 extern void smp_init_pseries(void);
31 /* Get state of physical CPU from query_cpu_stopped */
32 int smp_query_cpu_stopped(unsigned int pcpu);
33 #define QCSS_STOPPED 0
34 #define QCSS_STOPPING 1
35 #define QCSS_NOT_STOPPED 2
36 #define QCSS_HARDWARE_ERROR -1
37 #define QCSS_HARDWARE_BUSY -2
39 static inline void smp_init_pseries(void) { };
42 extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
44 extern void pSeries_final_fixup(void);
46 /* Poweron flag used for enabling auto ups restart */
47 extern unsigned long rtas_poweron_auto;
49 /* Provided by HVC VIO */
50 extern void hvc_vio_init_early(void);
52 /* Dynamic logical Partitioning/Mobility */
53 extern void dlpar_free_cc_nodes(struct device_node *);
54 extern void dlpar_free_cc_property(struct property *);
55 extern struct device_node *dlpar_configure_connector(__be32,
56 struct device_node *);
57 extern int dlpar_attach_node(struct device_node *, struct device_node *);
58 extern int dlpar_detach_node(struct device_node *);
59 extern int dlpar_acquire_drc(u32 drc_index);
60 extern int dlpar_release_drc(u32 drc_index);
62 void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
63 struct completion *hotplug_done, int *rc);
64 #ifdef CONFIG_MEMORY_HOTPLUG
65 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
67 static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
73 #ifdef CONFIG_HOTPLUG_CPU
74 int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
76 static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
82 /* PCI root bridge prepare function override for pseries */
83 struct pci_host_bridge;
84 int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
86 extern struct pci_controller_ops pseries_pci_controller_ops;
88 unsigned long pseries_memory_block_size(void);
91 extern int CMO_SecPSP;
92 extern unsigned long CMO_PageSize;
94 static inline int cmo_get_primary_psp(void)
99 static inline int cmo_get_secondary_psp(void)
104 static inline unsigned long cmo_get_page_size(void)
109 int dlpar_workqueue_init(void);
111 void pseries_setup_rfi_flush(void);
113 void pseries_rng_init(void);
115 #endif /* _PSERIES_PSERIES_H */