From owner-svn-src-all@FreeBSD.ORG Thu Mar 22 17:36:53 2012 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 DC0C210656ED; Thu, 22 Mar 2012 17:36:53 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C73CF8FC1A; Thu, 22 Mar 2012 17:36:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2MHarRe034365; Thu, 22 Mar 2012 17:36:53 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2MHart2034363; Thu, 22 Mar 2012 17:36:53 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203221736.q2MHart2034363@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 22 Mar 2012 17:36:53 +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: r233316 - head/sys/sys 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, 22 Mar 2012 17:36:54 -0000 Author: gonzo Date: Thu Mar 22 17:36:53 2012 New Revision: 233316 URL: http://svn.freebsd.org/changeset/base/233316 Log: Fix PMC syscall on 64-bit big endian systems. Sycall argument is pointer to array of register_t values. Casting it to pointer to structure with fields of size smaller then register_t we rely on compiler-dependent memory layout of structure. Tested on: mips64 and amd64 systems Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Thu Mar 22 17:04:49 2012 (r233315) +++ head/sys/sys/pmc.h Thu Mar 22 17:36:53 2012 (r233316) @@ -589,7 +589,7 @@ struct pmc_op_getmsr { */ struct pmc_syscall_args { - uint32_t pmop_code; /* one of PMC_OP_* */ + register_t pmop_code; /* one of PMC_OP_* */ void *pmop_data; /* syscall parameter */ };