Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jun 2020 18:56:40 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361874 - head/sys/powerpc/powerpc
Message-ID:  <202006061856.056IueKG005591@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sat Jun  6 18:56:40 2020
New Revision: 361874
URL: https://svnweb.freebsd.org/changeset/base/361874

Log:
  powerpc: Fix nits in copyinout comments from r361861
  
  Also, remove useless nested #ifdefs in the IFUNC block.
  
  Reported by:	bdragon@

Modified:
  head/sys/powerpc/powerpc/copyinout.c

Modified: head/sys/powerpc/powerpc/copyinout.c
==============================================================================
--- head/sys/powerpc/powerpc/copyinout.c	Sat Jun  6 18:43:08 2020	(r361873)
+++ head/sys/powerpc/powerpc/copyinout.c	Sat Jun  6 18:56:40 2020	(r361874)
@@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/ifunc.h>
 
 /*
- * On powerpc64 (AIM only) the copy functions are IFUNcs, selecting the best
+ * On powerpc64 (AIM only) the copy functions are IFUNCs, selecting the best
  * option based on the PMAP in use.
  *
  * There are two options for copy functions on powerpc64:
@@ -85,10 +85,10 @@ __FBSDID("$FreeBSD$");
  *   remapping user segments into kernel.  This is used by the 'radix' pmap for
  *   performance.
  *
- * Book-E does not use the C functions, opting instead to use the 'direct'
- * copies, directly, avoiding the IFUNC overhead.
+ * Book-E does not use the C 'remap' functions, opting instead to use the
+ * 'direct' copies, directly, avoiding the IFUNC overhead.
  *
- * On 32-bit AIM these functions are direct, not IFUNCs, for performance.
+ * On 32-bit AIM these functions bypass the IFUNC machinery for performance.
  */
 #ifdef __powerpc64__
 int subyte_remap(volatile void *addr, int byte);
@@ -125,8 +125,8 @@ int casueword_direct(volatile u_long *addr, u_long old
 	u_long new);
 
 /*
- * The IFUNC resolver determines the copy based on if the PMAP implementation
- * includes a pmap_map_user_ptr function.
+ * The IFUNC resolver determines the copy based on whether the PMAP
+ * implementation includes a pmap_map_user_ptr function.
  */
 #define DEFINE_COPY_FUNC(ret, func, args)			\
 	DEFINE_IFUNC(, ret, func, args)				\
@@ -140,15 +140,11 @@ DEFINE_COPY_FUNC(int, copyin, (const void *, void *, s
 DEFINE_COPY_FUNC(int, copyout, (const void *, void *, size_t))
 DEFINE_COPY_FUNC(int, suword, (volatile void *, long))
 DEFINE_COPY_FUNC(int, suword32, (volatile void *, int))
-#ifdef __powerpc64__
 DEFINE_COPY_FUNC(int, suword64, (volatile void *, int64_t))
-#endif
 DEFINE_COPY_FUNC(int, fubyte, (volatile const void *))
 DEFINE_COPY_FUNC(int, fuword16, (volatile const void *))
 DEFINE_COPY_FUNC(int, fueword32, (volatile const void *, int32_t *))
-#ifdef __powerpc64__
 DEFINE_COPY_FUNC(int, fueword64, (volatile const void *, int64_t *))
-#endif
 DEFINE_COPY_FUNC(int, fueword, (volatile const void *, long *))
 DEFINE_COPY_FUNC(int, casueword32,
     (volatile uint32_t *, uint32_t, uint32_t *, uint32_t))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006061856.056IueKG005591>