rtnetlink: check DO_SETLINK_NOTIFY correctly in do_setlink
[linux/fpc-iii.git] / arch / powerpc / platforms / pseries / pseries.h
blob4470a3194311e06e040c624b8b1491eb0e071298
1 /*
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.
8 */
10 #ifndef _PSERIES_PSERIES_H
11 #define _PSERIES_PSERIES_H
13 #include <linux/interrupt.h>
14 #include <asm/rtas.h>
16 struct device_node;
18 extern void request_event_sources_irqs(struct device_node *np,
19 irq_handler_t handler, const char *name);
21 #include <linux/of.h>
23 struct pt_regs;
25 extern int pSeries_system_reset_exception(struct pt_regs *regs);
26 extern int pSeries_machine_check_exception(struct pt_regs *regs);
28 #ifdef CONFIG_SMP
29 extern void smp_init_pseries(void);
30 #else
31 static inline void smp_init_pseries(void) { };
32 #endif
34 extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
36 extern void pSeries_final_fixup(void);
38 /* Poweron flag used for enabling auto ups restart */
39 extern unsigned long rtas_poweron_auto;
41 /* Provided by HVC VIO */
42 extern void hvc_vio_init_early(void);
44 /* Dynamic logical Partitioning/Mobility */
45 extern void dlpar_free_cc_nodes(struct device_node *);
46 extern void dlpar_free_cc_property(struct property *);
47 extern struct device_node *dlpar_configure_connector(__be32,
48 struct device_node *);
49 extern int dlpar_attach_node(struct device_node *, struct device_node *);
50 extern int dlpar_detach_node(struct device_node *);
51 extern int dlpar_acquire_drc(u32 drc_index);
52 extern int dlpar_release_drc(u32 drc_index);
54 void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
55 struct completion *hotplug_done, int *rc);
56 #ifdef CONFIG_MEMORY_HOTPLUG
57 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
58 #else
59 static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
61 return -EOPNOTSUPP;
63 #endif
65 #ifdef CONFIG_HOTPLUG_CPU
66 int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
67 #else
68 static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
70 return -EOPNOTSUPP;
72 #endif
74 /* PCI root bridge prepare function override for pseries */
75 struct pci_host_bridge;
76 int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
78 extern struct pci_controller_ops pseries_pci_controller_ops;
80 unsigned long pseries_memory_block_size(void);
82 extern int CMO_PrPSP;
83 extern int CMO_SecPSP;
84 extern unsigned long CMO_PageSize;
86 static inline int cmo_get_primary_psp(void)
88 return CMO_PrPSP;
91 static inline int cmo_get_secondary_psp(void)
93 return CMO_SecPSP;
96 static inline unsigned long cmo_get_page_size(void)
98 return CMO_PageSize;
101 #endif /* _PSERIES_PSERIES_H */