svn commit: r233316 - head/sys/sys

Oleksandr Tymoshenko gonzo at FreeBSD.org
Thu Mar 22 17:36:54 UTC 2012


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 */
 };
 


More information about the svn-src-all mailing list