pseries.h 2.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/*
 * Copyright 2006 IBM Corporation.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

#ifndef _PSERIES_PSERIES_H
#define _PSERIES_PSERIES_H

13
#include <linux/interrupt.h>
14
#include <asm/rtas.h>
15 16 17 18 19 20

struct device_node;

extern void request_event_sources_irqs(struct device_node *np,
				       irq_handler_t handler, const char *name);

21 22
#include <linux/of.h>

23 24 25 26 27
struct pt_regs;

extern int pSeries_system_reset_exception(struct pt_regs *regs);
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 33
#endif

34
extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
35

36 37
extern void pSeries_final_fixup(void);

38 39 40
/* Poweron flag used for enabling auto ups restart */
extern unsigned long rtas_poweron_auto;

41 42
/* Provided by HVC VIO */
extern void hvc_vio_init_early(void);
43

44 45 46
/* Dynamic logical Partitioning/Mobility */
extern void dlpar_free_cc_nodes(struct device_node *);
extern void dlpar_free_cc_property(struct property *);
47 48
extern struct device_node *dlpar_configure_connector(__be32,
						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 52
extern int dlpar_acquire_drc(u32 drc_index);
extern int dlpar_release_drc(u32 drc_index);
53

54 55
void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
			 struct completion *hotplug_done, int *rc);
56 57 58 59 60 61 62 63
#ifdef CONFIG_MEMORY_HOTPLUG
int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
#else
static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
{
	return -EOPNOTSUPP;
}
#endif
64

65 66 67 68 69 70 71 72 73
#ifdef CONFIG_HOTPLUG_CPU
int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
#else
static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
{
	return -EOPNOTSUPP;
}
#endif

74 75 76 77
/* PCI root bridge prepare function override for pseries */
struct pci_host_bridge;
int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);

78 79
extern struct pci_controller_ops pseries_pci_controller_ops;

80 81
unsigned long pseries_memory_block_size(void);

82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
extern int CMO_PrPSP;
extern int CMO_SecPSP;
extern unsigned long CMO_PageSize;

static inline int cmo_get_primary_psp(void)
{
	return CMO_PrPSP;
}

static inline int cmo_get_secondary_psp(void)
{
	return CMO_SecPSP;
}

static inline unsigned long cmo_get_page_size(void)
{
	return CMO_PageSize;
}

101
#endif /* _PSERIES_PSERIES_H */