From owner-svn-src-all@FreeBSD.ORG Thu Jul 8 14:29:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE86D106566C; Thu, 8 Jul 2010 14:29:23 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD1DB8FC0A; Thu, 8 Jul 2010 14:29:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o68ETNUq037115; Thu, 8 Jul 2010 14:29:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o68ETNxh037110; Thu, 8 Jul 2010 14:29:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007081429.o68ETNxh037110@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 8 Jul 2010 14:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209801 - in head/sys: dev/ofw powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 14:29:24 -0000 Author: nwhitehorn Date: Thu Jul 8 14:29:23 2010 New Revision: 209801 URL: http://svn.freebsd.org/changeset/base/209801 Log: Change the argument type to OF_call_method to take an array of cell_t instead of unsigned longs to prepare for platforms where they are not the same. Modified: head/sys/dev/ofw/ofw_if.m head/sys/dev/ofw/ofw_standard.c head/sys/dev/ofw/openfirm.c head/sys/powerpc/ofw/ofw_real.c Modified: head/sys/dev/ofw/ofw_if.m ============================================================================== --- head/sys/dev/ofw/ofw_if.m Thu Jul 8 14:19:52 2010 (r209800) +++ head/sys/dev/ofw/ofw_if.m Thu Jul 8 14:29:23 2010 (r209801) @@ -229,7 +229,7 @@ METHOD int call_method { int _nargs; int _nreturns; - unsigned long *_args_and_returns; + cell_t *_args_and_returns; }; /** Modified: head/sys/dev/ofw/ofw_standard.c ============================================================================== --- head/sys/dev/ofw/ofw_standard.c Thu Jul 8 14:19:52 2010 (r209800) +++ head/sys/dev/ofw/ofw_standard.c Thu Jul 8 14:29:23 2010 (r209801) @@ -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, @@ -515,7 +515,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) { struct { cell_t name; @@ -529,8 +529,7 @@ ofw_std_call_method(ofw_t ofw, ihandle_t 2, 1, }; - cell_t *cp; - unsigned long *ap; + cell_t *cp, *ap; int n; if (nargs > 6) Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Thu Jul 8 14:19:52 2010 (r209800) +++ head/sys/dev/ofw/openfirm.c Thu Jul 8 14:29:23 2010 (r209801) @@ -328,14 +328,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); @@ -343,7 +343,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: head/sys/powerpc/ofw/ofw_real.c ============================================================================== --- head/sys/powerpc/ofw/ofw_real.c Thu Jul 8 14:19:52 2010 (r209800) +++ head/sys/powerpc/ofw/ofw_real.c Thu Jul 8 14:29:23 2010 (r209801) @@ -97,7 +97,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); @@ -652,7 +652,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) { struct { cell_t name; @@ -666,8 +666,7 @@ ofw_real_call_method(ofw_t ofw, ihandle_ 2, 1, }; - cell_t *cp; - unsigned long *ap; + cell_t *cp, *ap; int n; if (nargs > 6)