summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2004-09-23 02:09:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-23 02:09:54 -0700
commit6f2697c7ebda0622620f62b42d02fa55ff7e12c2 (patch)
treed67ecef524d95a318f17a2cf135eb1318ac6077e /include
parent7f0424f95ef49018bcbb90586420b06097bf1396 (diff)
[PATCH] ppc64: monster cleanup
This is the third & hopefully final version of the monster cleanup patch. It does significant cleanups of the early boot code of the ppc64 kernel, and begins the long process of cleaning up & splitting properly the platform support. It completely reworks the interface between the early code that is run in the firmware context (prom_init) and the rest of the kernel, in such a way that will make kexec or static device-tree for embedded people possible. The early init code can eventually be moved to a separate link entity, it no longer touches any of the kernel globals, everything is passed via a single blob of data in memory containing a flattened version of the device-tree and a memory reserve map. While doing it, I also cut the ties between pSeries and Powermac. Now, the kernel config provides a choice between legacy iSeries and "multiplatform". The later is a set of various supported platform, each of them beeing a boolean switch, currently defined beeing pSeries and PowerMac. You can enable both or just one of them. CONFIG_PPC_PSERIES is now specifically set for IBM pSeries support, you can build a PowerMac kernel without pSeries support if you which. The main goal here is to simplify addition of new platform types. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc64/bootx.h135
-rw-r--r--include/asm-ppc64/btext.h19
-rw-r--r--include/asm-ppc64/eeh.h4
-rw-r--r--include/asm-ppc64/iommu.h9
-rw-r--r--include/asm-ppc64/lmb.h8
-rw-r--r--include/asm-ppc64/machdep.h8
-rw-r--r--include/asm-ppc64/pci-bridge.h7
-rw-r--r--include/asm-ppc64/pgtable.h17
-rw-r--r--include/asm-ppc64/plpar_wrappers.h109
-rw-r--r--include/asm-ppc64/prom.h71
-rw-r--r--include/asm-ppc64/rtas.h3
-rw-r--r--include/asm-ppc64/smp.h1
12 files changed, 191 insertions, 200 deletions
diff --git a/include/asm-ppc64/bootx.h b/include/asm-ppc64/bootx.h
deleted file mode 100644
index b0c51b45d7a2..000000000000
--- a/include/asm-ppc64/bootx.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * This file describes the structure passed from the BootX application
- * (for MacOS) when it is used to boot Linux.
- *
- * Written by Benjamin Herrenschmidt.
- */
-
-
-#ifndef __ASM_BOOTX_H__
-#define __ASM_BOOTX_H__
-
-#ifdef macintosh
-#include <Types.h>
-#include "linux_type_defs.h"
-#endif
-
-#ifdef macintosh
-/* All this requires PowerPC alignment */
-#pragma options align=power
-#endif
-
-/* On kernel entry:
- *
- * r3 = 0x426f6f58 ('BooX')
- * r4 = pointer to boot_infos
- * r5 = NULL
- *
- * Data and instruction translation disabled, interrupts
- * disabled, kernel loaded at physical 0x00000000 on PCI
- * machines (will be different on NuBus).
- */
-
-#define BOOT_INFO_VERSION 5
-#define BOOT_INFO_COMPATIBLE_VERSION 1
-
-/* Bit in the architecture flag mask. More to be defined in
- future versions. Note that either BOOT_ARCH_PCI or
- BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are
- set additionally when BOOT_ARCH_NUBUS is set.
- */
-#define BOOT_ARCH_PCI 0x00000001UL
-#define BOOT_ARCH_NUBUS 0x00000002UL
-#define BOOT_ARCH_NUBUS_PDM 0x00000010UL
-#define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL
-#define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL
-
-/* Maximum number of ranges in phys memory map */
-#define MAX_MEM_MAP_SIZE 26
-
-/* This is the format of an element in the physical memory map. Note that
- the map is optional and current BootX will only build it for pre-PCI
- machines */
-typedef struct boot_info_map_entry
-{
- __u32 physAddr; /* Physical starting address */
- __u32 size; /* Size in bytes */
-} boot_info_map_entry_t;
-
-
-/* Here are the boot informations that are passed to the bootstrap
- * Note that the kernel arguments and the device tree are appended
- * at the end of this structure. */
-typedef struct boot_infos
-{
- /* Version of this structure */
- __u32 version;
- /* backward compatible down to version: */
- __u32 compatible_version;
-
- /* NEW (vers. 2) this holds the current _logical_ base addr of
- the frame buffer (for use by early boot message) */
- __u8* logicalDisplayBase;
-
- /* NEW (vers. 4) Apple's machine identification */
- __u32 machineID;
-
- /* NEW (vers. 4) Detected hw architecture */
- __u32 architecture;
-
- /* The device tree (internal addresses relative to the beginning of the tree,
- * device tree offset relative to the beginning of this structure).
- * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this
- * field is 0.
- */
- __u32 deviceTreeOffset; /* Device tree offset */
- __u32 deviceTreeSize; /* Size of the device tree */
-
- /* Some infos about the current MacOS display */
- __u32 dispDeviceRect[4]; /* left,top,right,bottom */
- __u32 dispDeviceDepth; /* (8, 16 or 32) */
- __u8* dispDeviceBase; /* base address (physical) */
- __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */
- __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */
- /* Optional offset in the registry to the current
- * MacOS display. (Can be 0 when not detected) */
- __u32 dispDeviceRegEntryOffset;
-
- /* Optional pointer to boot ramdisk (offset from this structure) */
- __u32 ramDisk;
- __u32 ramDiskSize; /* size of ramdisk image */
-
- /* Kernel command line arguments (offset from this structure) */
- __u32 kernelParamsOffset;
-
- /* ALL BELOW NEW (vers. 4) */
-
- /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag
- (non-PCI) only. On PCI, memory is contiguous and it's size is in the
- device-tree. */
- boot_info_map_entry_t
- physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */
- __u32 physMemoryMapSize; /* How many entries in map */
-
-
- /* The framebuffer size (optional, currently 0) */
- __u32 frameBufferSize; /* Represents a max size, can be 0. */
-
- /* NEW (vers. 5) */
-
- /* Total params size (args + colormap + device tree + ramdisk) */
- __u32 totalParamsSize;
-
-} boot_infos_t;
-
-/* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index is represented
- * by 3 short words containing a 16 bits (unsigned) color component.
- * Later versions may contain the gamma table for direct-color devices here.
- */
-#define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL)
-
-#ifdef macintosh
-#pragma options align=reset
-#endif
-
-#endif
diff --git a/include/asm-ppc64/btext.h b/include/asm-ppc64/btext.h
index ba6b5b3ae98a..67aef0cc72c0 100644
--- a/include/asm-ppc64/btext.h
+++ b/include/asm-ppc64/btext.h
@@ -7,23 +7,20 @@
#define __PPC_BTEXT_H
#ifdef __KERNEL__
-#include <asm/bootx.h>
-
extern void btext_clearscreen(void);
extern void btext_flushscreen(void);
-extern boot_infos_t disp_bi;
extern int boot_text_mapped;
-void btext_setup_display(int width, int height, int depth, int pitch,
- unsigned long address);
-void map_boot_text(void);
-void btext_update_display(unsigned long phys, int width, int height,
- int depth, int pitch);
+extern int btext_initialize(struct device_node *np);
+
+extern void map_boot_text(void);
+extern void btext_update_display(unsigned long phys, int width, int height,
+ int depth, int pitch);
-void btext_drawchar(char c);
-void btext_drawstring(const char *str);
-void btext_drawhex(unsigned long v);
+extern void btext_drawchar(char c);
+extern void btext_drawstring(const char *str);
+extern void btext_drawhex(unsigned long v);
#endif /* __KERNEL__ */
#endif /* __PPC_BTEXT_H */
diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h
index 8e165259c033..cedf3a457187 100644
--- a/include/asm-ppc64/eeh.h
+++ b/include/asm-ppc64/eeh.h
@@ -30,11 +30,15 @@ struct device_node;
#define EEH_MODE_SUPPORTED (1<<0)
#define EEH_MODE_NOCHECK (1<<1)
+#ifdef CONFIG_PPC_PSERIES
extern void __init eeh_init(void);
unsigned long eeh_check_failure(const volatile void __iomem *token, unsigned long val);
int eeh_dn_check_failure (struct device_node *dn, struct pci_dev *dev);
void __iomem *eeh_ioremap(unsigned long addr, void __iomem *vaddr);
void __init pci_addr_cache_build(void);
+#else
+#define eeh_check_failure(token, val) (val)
+#endif
/**
* eeh_add_device_early
diff --git a/include/asm-ppc64/iommu.h b/include/asm-ppc64/iommu.h
index 8530fb673dcc..2985dcf9bfea 100644
--- a/include/asm-ppc64/iommu.h
+++ b/include/asm-ppc64/iommu.h
@@ -104,16 +104,19 @@ extern struct iommu_table vio_tce_table; /* Tce table for virtual bus */
struct scatterlist;
-#ifdef CONFIG_PPC_PSERIES
+#ifdef CONFIG_PPC_MULTIPLATFORM
+
/* Walks all buses and creates iommu tables */
extern void iommu_setup_pSeries(void);
extern void iommu_setup_pmac(void);
/* Creates table for an individual device node */
extern void iommu_devnode_init(struct device_node *dn);
-#endif /* CONFIG_PPC_PSERIES */
+
+#endif /* CONFIG_PPC_MULTIPLATFORM */
#ifdef CONFIG_PPC_ISERIES
+
/* Walks all buses and creates iommu tables */
extern void iommu_setup_iSeries(void);
@@ -123,8 +126,8 @@ extern void __init iommu_vio_init(void);
struct iSeries_Device_Node;
/* Creates table for an individual device node */
extern void iommu_devnode_init(struct iSeries_Device_Node *dn);
-#endif /* CONFIG_PPC_ISERIES */
+#endif /* CONFIG_PPC_ISERIES */
/* Initializes an iommu_table based in values set in the passed-in
* structure
diff --git a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h
index 8dc2a07eac56..f1c1f0a38ccd 100644
--- a/include/asm-ppc64/lmb.h
+++ b/include/asm-ppc64/lmb.h
@@ -20,12 +20,6 @@ extern unsigned long reloc_offset(void);
#define MAX_LMB_REGIONS 128
-union lmb_reg_property {
- struct reg_property32 addr32[MAX_LMB_REGIONS];
- struct reg_property64 addr64[MAX_LMB_REGIONS];
- struct reg_property_pmac addrPM[MAX_LMB_REGIONS];
-};
-
#define LMB_ALLOC_ANYWHERE 0
struct lmb_property {
@@ -60,6 +54,8 @@ extern unsigned long __init lmb_phys_mem_size(void);
extern unsigned long __init lmb_end_of_DRAM(void);
extern unsigned long __init lmb_abs_to_phys(unsigned long);
+extern void lmb_dump_all(void);
+
extern unsigned long io_hole_start;
#endif /* _PPC64_LMB_H */
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h
index 020c7922fc57..e0fc14a61891 100644
--- a/include/asm-ppc64/machdep.h
+++ b/include/asm-ppc64/machdep.h
@@ -56,6 +56,9 @@ struct machdep_calls {
void (*flush_hash_range)(unsigned long context,
unsigned long number,
int local);
+ /* special for kexec, to be called in real mode, linar mapping is
+ * destroyed as well */
+ void (*htpe_clear_all)(void);
void (*tce_build)(struct iommu_table * tbl,
long index,
@@ -67,7 +70,9 @@ struct machdep_calls {
long npages);
void (*tce_flush)(struct iommu_table *tbl);
+ int (*probe)(int platform);
void (*setup_arch)(void);
+ void (*init_early)(void);
/* Optional, may be NULL. */
void (*get_cpuinfo)(struct seq_file *m);
@@ -77,9 +82,6 @@ struct machdep_calls {
/* PCI stuff */
void (*pcibios_fixup)(void);
- /* Optional, may be NULL. */
- void (*init)(void);
-
void (*restart)(char *cmd);
void (*power_off)(void);
void (*halt)(void);
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h
index 745307437359..a51c604b9db6 100644
--- a/include/asm-ppc64/pci-bridge.h
+++ b/include/asm-ppc64/pci-bridge.h
@@ -70,8 +70,8 @@ struct pci_controller {
* for a device on a PCI bus, given its device_node struct.
* It returns 0 if OK, -1 on error.
*/
-int pci_device_loc(struct device_node *dev, unsigned char *bus_ptr,
- unsigned char *devfn_ptr);
+extern int pci_device_loc(struct device_node *dev, unsigned char *bus_ptr,
+ unsigned char *devfn_ptr);
struct device_node *fetch_dev_dn(struct pci_dev *dev);
@@ -87,6 +87,9 @@ static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev)
return fetch_dev_dn(dev);
}
+extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,
+ struct device_node *dev, int primary);
+
/* Use this macro after the PCI bus walk for max performance when it
* is known that sysdata is correct.
*/
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h
index d759cad47745..5a4a18043ae1 100644
--- a/include/asm-ppc64/pgtable.h
+++ b/include/asm-ppc64/pgtable.h
@@ -496,7 +496,8 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
void pgtable_cache_init(void);
-extern void hpte_init_pSeries(void);
+extern void hpte_init_native(void);
+extern void hpte_init_lpar(void);
extern void hpte_init_iSeries(void);
/* imalloc region types */
@@ -511,14 +512,14 @@ extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
int region_type);
unsigned long im_free(void *addr);
-long pSeries_lpar_hpte_insert(unsigned long hpte_group,
- unsigned long va, unsigned long prpn,
- int secondary, unsigned long hpteflags,
- int bolted, int large);
+extern long pSeries_lpar_hpte_insert(unsigned long hpte_group,
+ unsigned long va, unsigned long prpn,
+ int secondary, unsigned long hpteflags,
+ int bolted, int large);
-long pSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
- unsigned long prpn, int secondary,
- unsigned long hpteflags, int bolted, int large);
+extern long native_hpte_insert(unsigned long hpte_group, unsigned long va,
+ unsigned long prpn, int secondary,
+ unsigned long hpteflags, int bolted, int large);
/*
* find_linux_pte returns the address of a linux pte for a given
diff --git a/include/asm-ppc64/plpar_wrappers.h b/include/asm-ppc64/plpar_wrappers.h
new file mode 100644
index 000000000000..17452d372024
--- /dev/null
+++ b/include/asm-ppc64/plpar_wrappers.h
@@ -0,0 +1,109 @@
+#ifndef _PPC64_PLPAR_WRAPPERS_H
+#define _PPC64_PLPAR_WRAPPERS_H
+
+#include <asm/hvcall.h>
+
+static inline long poll_pending(void)
+{
+ unsigned long dummy;
+ return plpar_hcall(H_POLL_PENDING, 0, 0, 0, 0,
+ &dummy, &dummy, &dummy);
+}
+
+static inline long prod_processor(void)
+{
+ plpar_hcall_norets(H_PROD);
+ return(0);
+}
+
+static inline long cede_processor(void)
+{
+ plpar_hcall_norets(H_CEDE);
+ return(0);
+}
+
+static inline long register_vpa(unsigned long flags, unsigned long proc, unsigned long vpa)
+{
+ plpar_hcall_norets(H_REGISTER_VPA, flags, proc, vpa);
+ return(0);
+}
+
+static inline long plpar_pte_remove(unsigned long flags,
+ unsigned long ptex,
+ unsigned long avpn,
+ unsigned long *old_pteh_ret,
+ unsigned long *old_ptel_ret)
+{
+ unsigned long dummy;
+ return plpar_hcall(H_REMOVE, flags, ptex, avpn, 0,
+ old_pteh_ret, old_ptel_ret, &dummy);
+}
+
+static inline long plpar_pte_read(unsigned long flags,
+ unsigned long ptex,
+ unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
+{
+ unsigned long dummy;
+ return plpar_hcall(H_READ, flags, ptex, 0, 0,
+ old_pteh_ret, old_ptel_ret, &dummy);
+}
+
+static inline long plpar_pte_protect(unsigned long flags,
+ unsigned long ptex,
+ unsigned long avpn)
+{
+ return plpar_hcall_norets(H_PROTECT, flags, ptex, avpn);
+}
+
+static inline long plpar_tce_get(unsigned long liobn,
+ unsigned long ioba,
+ unsigned long *tce_ret)
+{
+ unsigned long dummy;
+ return plpar_hcall(H_GET_TCE, liobn, ioba, 0, 0,
+ tce_ret, &dummy, &dummy);
+}
+
+static inline long plpar_tce_put(unsigned long liobn,
+ unsigned long ioba,
+ unsigned long tceval)
+{
+ return plpar_hcall_norets(H_PUT_TCE, liobn, ioba, tceval);
+}
+
+static inline long plpar_tce_put_indirect(unsigned long liobn,
+ unsigned long ioba,
+ unsigned long page,
+ unsigned long count)
+{
+ return plpar_hcall_norets(H_PUT_TCE_INDIRECT, liobn, ioba, page, count);
+}
+
+static inline long plpar_tce_stuff(unsigned long liobn,
+ unsigned long ioba,
+ unsigned long tceval,
+ unsigned long count)
+{
+ return plpar_hcall_norets(H_STUFF_TCE, liobn, ioba, tceval, count);
+}
+
+static inline long plpar_get_term_char(unsigned long termno,
+ unsigned long *len_ret,
+ char *buf_ret)
+{
+ unsigned long *lbuf = (unsigned long *)buf_ret; /* ToDo: alignment? */
+ return plpar_hcall(H_GET_TERM_CHAR, termno, 0, 0, 0,
+ len_ret, lbuf+0, lbuf+1);
+}
+
+static inline long plpar_put_term_char(unsigned long termno,
+ unsigned long len,
+ const char *buffer)
+{
+ unsigned long *lbuf = (unsigned long *)buffer; /* ToDo: alignment? */
+ return plpar_hcall_norets(H_PUT_TERM_CHAR, termno, len, lbuf[0],
+ lbuf[1]);
+}
+
+
+#endif /* _PPC64_PLPAR_WRAPPERS_H */
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h
index 87db2ece007f..482f9f60db60 100644
--- a/include/asm-ppc64/prom.h
+++ b/include/asm-ppc64/prom.h
@@ -24,14 +24,47 @@
#define LONG_LSW(X) (((unsigned long)X) & 0xffffffff)
#define LONG_MSW(X) (((unsigned long)X) >> 32)
+/* Definitions used by the flattened device tree */
+#define OF_DT_HEADER 0xd00dfeed /* 4: version, 4: total size */
+#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name */
+#define OF_DT_END_NODE 0x2 /* End node */
+#define OF_DT_PROP 0x3 /* Property: name off, size, content */
+#define OF_DT_END 0x9
+
+#define OF_DT_VERSION 1
+
+/*
+ * This is what gets passed to the kernel by prom_init or kexec
+ *
+ * The dt struct contains the device tree structure, full pathes and
+ * property contents. The dt strings contain a separate block with just
+ * the strings for the property names, and is fully page aligned and
+ * self contained in a page, so that it can be kept around by the kernel,
+ * each property name appears only once in this page (cheap compression)
+ *
+ * the mem_rsvmap contains a map of reserved ranges of physical memory,
+ * passing it here instead of in the device-tree itself greatly simplifies
+ * the job of everybody. It's just a list of u64 pairs (base/size) that
+ * ends when size is 0
+ */
+struct boot_param_header
+{
+ u32 magic; /* magic word OF_DT_HEADER */
+ u32 totalsize; /* total size of DT block */
+ u32 off_dt_struct; /* offset to structure */
+ u32 off_dt_strings; /* offset to strings */
+ u32 off_mem_rsvmap; /* offset to memory reserve map */
+ u32 version; /* format version */
+ u32 last_comp_version; /* last compatible version */
+};
+
+
+
typedef u32 phandle;
typedef u32 ihandle;
typedef u32 phandle32;
typedef u32 ihandle32;
-extern char *prom_display_paths[];
-extern unsigned int prom_num_displays;
-
struct address_range {
unsigned long space;
unsigned long address;
@@ -136,6 +169,7 @@ struct property {
*/
struct pci_controller;
struct iommu_table;
+
struct device_node {
char *name;
char *type;
@@ -171,6 +205,8 @@ struct device_node {
unsigned long _flags;
};
+extern struct device_node *of_chosen;
+
/* flag descriptions */
#define OF_STALE 0 /* node is slated for deletion */
#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
@@ -202,34 +238,6 @@ static void inline set_node_addr_link(struct device_node *dn, struct proc_dir_en
dn->addr_link = de;
}
-typedef u32 prom_arg_t;
-
-struct prom_args {
- u32 service;
- u32 nargs;
- u32 nret;
- prom_arg_t args[10];
- prom_arg_t *rets; /* Pointer to return values in args[16]. */
-};
-
-struct prom_t {
- unsigned long entry;
- ihandle root;
- ihandle chosen;
- int cpu;
- ihandle stdout;
- ihandle disp_node;
- struct prom_args args;
- unsigned long version;
- unsigned long encode_phys_size;
- struct bi_record *bi_recs;
-};
-
-extern struct prom_t prom;
-extern char *of_stdout_device;
-
-extern int boot_cpuid;
-
/* OBSOLETE: Old stlye node lookup */
extern struct device_node *find_devices(const char *name);
extern struct device_node *find_type_devices(const char *type);
@@ -246,6 +254,7 @@ extern struct device_node *of_find_node_by_type(struct device_node *from,
extern struct device_node *of_find_compatible_node(struct device_node *from,
const char *type, const char *compat);
extern struct device_node *of_find_node_by_path(const char *path);
+extern struct device_node *of_find_node_by_phandle(phandle handle);
extern struct device_node *of_find_all_nodes(struct device_node *prev);
extern struct device_node *of_get_parent(const struct device_node *node);
extern struct device_node *of_get_next_child(const struct device_node *node,
diff --git a/include/asm-ppc64/rtas.h b/include/asm-ppc64/rtas.h
index b3fa9a86a326..414b7552514f 100644
--- a/include/asm-ppc64/rtas.h
+++ b/include/asm-ppc64/rtas.h
@@ -180,7 +180,7 @@ extern struct rtas_t rtas;
extern void enter_rtas(unsigned long);
extern int rtas_token(const char *service);
extern int rtas_call(int token, int, int, int *, ...);
-extern void call_rtas_display_status(char);
+extern void call_rtas_display_status(unsigned char);
extern void rtas_restart(char *cmd);
extern void rtas_power_off(void);
extern void rtas_halt(void);
@@ -189,6 +189,7 @@ extern int rtas_get_sensor(int sensor, int index, int *state);
extern int rtas_get_power_level(int powerdomain, int *level);
extern int rtas_set_power_level(int powerdomain, int level, int *setlevel);
extern int rtas_set_indicator(int indicator, int index, int new_value);
+extern void rtas_initialize(void);
/* Given an RTAS status code of 9900..9905 compute the hinted delay */
unsigned int rtas_extended_busy_delay_time(int status);
diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h
index ff7685a33917..06ee38a6522a 100644
--- a/include/asm-ppc64/smp.h
+++ b/include/asm-ppc64/smp.h
@@ -37,6 +37,7 @@ extern void smp_message_recv(int, struct pt_regs *);
#define hard_smp_processor_id() (get_paca()->hw_cpu_id)
extern cpumask_t cpu_sibling_map[NR_CPUS];
+extern int boot_cpuid;
/* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
*