Index: arch/ppc64/loader/ofw.c
===================================================================
--- arch/ppc64/loader/ofw.c	(revision 89343aacc404c35fa2986daccaf859a148b89275)
+++ arch/ppc64/loader/ofw.c	(revision a8844e02e7d1892e89644ed8ff394ce3660d5266)
@@ -34,7 +34,7 @@
 #define BUF_SIZE		1024
 
-typedef unsigned int ofw_arg_t;
-typedef unsigned int ihandle;
-typedef unsigned int phandle;
+typedef unsigned long ofw_arg_t;
+typedef unsigned long ihandle;
+typedef unsigned long phandle;
 
 /** OpenFirmware command structure
@@ -43,6 +43,6 @@
 typedef struct {
 	const char *service;          /**< Command name */
-	unsigned int nargs;           /**< Number of in arguments */
-	unsigned int nret;            /**< Number of out arguments */
+	unsigned long nargs;           /**< Number of in arguments */
+	unsigned long nret;            /**< Number of out arguments */
 	ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
 } ofw_args_t;
@@ -61,9 +61,9 @@
 
 
-static int ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...)
+static long ofw_call(const char *service, const long nargs, const long nret, ofw_arg_t *rets, ...)
 {
 	va_list list;
 	ofw_args_t args;
-	int i;
+	long i;
 	
 	args.service = service;
@@ -94,5 +94,5 @@
 
 
-static int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen)
+static long ofw_get_property(const phandle device, const char *name, const void *buf, const long buflen)
 {
 	return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen);
@@ -100,7 +100,7 @@
 
 
-static unsigned int ofw_get_address_cells(const phandle device)
-{
-	unsigned int ret;
+static unsigned long ofw_get_address_cells(const phandle device)
+{
+	unsigned long ret;
 	
 	if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0)
@@ -112,7 +112,7 @@
 
 
-static unsigned int ofw_get_size_cells(const phandle device)
-{
-	unsigned int ret;
+static unsigned long ofw_get_size_cells(const phandle device)
+{
+	unsigned long ret;
 	
 	if (ofw_get_property(device, "#size-cells", &ret, sizeof(ret)) <= 0)
@@ -164,5 +164,5 @@
 
 
-void ofw_write(const char *str, const int len)
+void ofw_write(const char *str, const long len)
 {
 	if (ofw_stdout == 0)
@@ -185,5 +185,5 @@
 
 
-int ofw_map(const void *phys, const void *virt, const int size, const int mode)
+long ofw_map(const void *phys, const void *virt, const long size, const long mode)
 {
 	return ofw_call("call-method", 6, 1, NULL, "map", ofw_mmu, mode, size, virt, phys);
@@ -191,20 +191,20 @@
 
 
-int ofw_memmap(memmap_t *map)
-{
-	unsigned int buf[BUF_SIZE];
-	int ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(unsigned int) * BUF_SIZE);
+long ofw_memmap(memmap_t *map)
+{
+	unsigned long buf[BUF_SIZE];
+	long ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(unsigned long) * BUF_SIZE);
 	if (ret <= 0)
 		return false;
 		
-	unsigned int ac = ofw_get_address_cells(ofw_memory);
-	unsigned int sc = ofw_get_size_cells(ofw_memory);
-	
-	int pos;
+	unsigned long ac = ofw_get_address_cells(ofw_memory);
+	unsigned long sc = ofw_get_size_cells(ofw_memory);
+	
+	long pos;
 	map->total = 0;
 	map->count = 0;
-	for (pos = 0; (pos < ret / sizeof(unsigned int)) && (map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) {
+	for (pos = 0; (pos < ret / sizeof(unsigned long)) && (map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) {
 		void * start = (void *) buf[pos + ac - 1];
-		unsigned int size = buf[pos + ac + sc - 1];
+		unsigned long size = buf[pos + ac + sc - 1];
 		
 		if (size > 0) {
@@ -218,5 +218,5 @@
 
 
-int ofw_screen(screen_t *screen)
+long ofw_screen(screen_t *screen)
 {
 	char device_name[BUF_SIZE];
