svn commit: r199507 - in projects/ppc64/sys: dev/ofw powerpc/ofw
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Nov 19 05:56:32 UTC 2009
Author: nwhitehorn
Date: Thu Nov 19 05:56:31 2009
New Revision: 199507
URL: http://svn.freebsd.org/changeset/base/199507
Log:
Change the argument type for OF_call_method() to cell_t from unsigned long.
This makes my machine no longer think it is 1903.
Modified:
projects/ppc64/sys/dev/ofw/ofw_if.m
projects/ppc64/sys/dev/ofw/ofw_standard.c
projects/ppc64/sys/dev/ofw/openfirm.c
projects/ppc64/sys/powerpc/ofw/ofw_real.c
Modified: projects/ppc64/sys/dev/ofw/ofw_if.m
==============================================================================
--- projects/ppc64/sys/dev/ofw/ofw_if.m Thu Nov 19 05:03:37 2009 (r199506)
+++ projects/ppc64/sys/dev/ofw/ofw_if.m Thu Nov 19 05:56:31 2009 (r199507)
@@ -229,7 +229,7 @@ METHOD int call_method {
int _nargs;
int _nreturns;
- unsigned long *_args_and_returns;
+ cell_t *_args_and_returns;
};
/**
Modified: projects/ppc64/sys/dev/ofw/ofw_standard.c
==============================================================================
--- projects/ppc64/sys/dev/ofw/ofw_standard.c Thu Nov 19 05:03:37 2009 (r199506)
+++ projects/ppc64/sys/dev/ofw/ofw_standard.c Thu Nov 19 05:56:31 2009 (r199507)
@@ -95,7 +95,7 @@ static ssize_t ofw_std_package_to_path(o
size_t len);
static int ofw_std_call_method(ofw_t ofw, ihandle_t instance,
const char *method, int nargs, int nreturns,
- unsigned long *args_and_returns);
+ cell_t *args_and_returns);
static ihandle_t ofw_std_open(ofw_t ofw, const char *device);
static void ofw_std_close(ofw_t ofw, ihandle_t instance);
static ssize_t ofw_std_read(ofw_t ofw, ihandle_t instance, void *addr,
@@ -514,7 +514,7 @@ ofw_std_package_to_path(ofw_t ofw, phand
/* Call the method in the scope of a given instance. */
static int
ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method,
- int nargs, int nreturns, unsigned long *args_and_returns)
+ int nargs, int nreturns, cell_t *args_and_returns)
{
static struct {
cell_t name;
Modified: projects/ppc64/sys/dev/ofw/openfirm.c
==============================================================================
--- projects/ppc64/sys/dev/ofw/openfirm.c Thu Nov 19 05:03:37 2009 (r199506)
+++ projects/ppc64/sys/dev/ofw/openfirm.c Thu Nov 19 05:56:31 2009 (r199507)
@@ -321,14 +321,14 @@ OF_call_method(const char *method, ihand
...)
{
va_list ap;
- unsigned long args_n_results[12];
+ cell_t args_n_results[12];
int n, status;
if (nargs > 6)
return (-1);
va_start(ap, nreturns);
for (n = 0; n < nargs; n++)
- args_n_results[n] = va_arg(ap, unsigned long);
+ args_n_results[n] = va_arg(ap, cell_t);
status = OFW_CALL_METHOD(ofw_obj, instance, method, nargs, nreturns,
args_n_results);
@@ -336,7 +336,7 @@ OF_call_method(const char *method, ihand
return (status);
for (; n < nargs + nreturns; n++)
- *va_arg(ap, unsigned long *) = args_n_results[n];
+ *va_arg(ap, cell_t *) = args_n_results[n];
va_end(ap);
return (0);
}
Modified: projects/ppc64/sys/powerpc/ofw/ofw_real.c
==============================================================================
--- projects/ppc64/sys/powerpc/ofw/ofw_real.c Thu Nov 19 05:03:37 2009 (r199506)
+++ projects/ppc64/sys/powerpc/ofw/ofw_real.c Thu Nov 19 05:56:31 2009 (r199507)
@@ -98,7 +98,7 @@ static ssize_t ofw_real_instance_to_path
static ssize_t ofw_real_package_to_path(ofw_t, phandle_t package, char *buf,
size_t len);
static int ofw_real_call_method(ofw_t, ihandle_t instance, const char *method,
- int nargs, int nreturns, unsigned long *args_and_returns);
+ int nargs, int nreturns, cell_t *args_and_returns);
static ihandle_t ofw_real_open(ofw_t, const char *device);
static void ofw_real_close(ofw_t, ihandle_t instance);
static ssize_t ofw_real_read(ofw_t, ihandle_t instance, void *addr, size_t len);
@@ -678,7 +678,7 @@ ofw_real_package_to_path(ofw_t ofw, phan
/* Call the method in the scope of a given instance. */
static int
ofw_real_call_method(ofw_t ofw, ihandle_t instance, const char *method,
- int nargs, int nreturns, unsigned long *args_and_returns)
+ int nargs, int nreturns, cell_t *args_and_returns)
{
static struct {
cell_t name;
@@ -688,8 +688,7 @@ ofw_real_call_method(ofw_t ofw, ihandle_
cell_t instance;
cell_t args_n_results[12];
} args;
- cell_t *cp;
- unsigned long *ap;
+ cell_t *cp, *ap;
int n;
args.name = (cell_t)(uintptr_t)"call-method";
More information about the svn-src-projects
mailing list