Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 11:20:06 +0000 (UTC)
From:      =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332092 - in head/sys: amd64/amd64 sys x86/x86
Message-ID:  <201804061120.w36BK6s6074635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: royger
Date: Fri Apr  6 11:20:06 2018
New Revision: 332092
URL: https://svnweb.freebsd.org/changeset/base/332092

Log:
  remove GiB/MiB macros from param.h
  
  And instead define them in the files where they are used.
  
  Requested by: bde

Modified:
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/sys/param.h
  head/sys/x86/x86/mp_x86.c

Modified: head/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- head/sys/amd64/amd64/mp_machdep.c	Fri Apr  6 09:25:08 2018	(r332091)
+++ head/sys/amd64/amd64/mp_machdep.c	Fri Apr  6 11:20:06 2018	(r332092)
@@ -83,6 +83,8 @@ __FBSDID("$FreeBSD$");
 #define BIOS_RESET		(0x0f)
 #define BIOS_WARM		(0x0a)
 
+#define GiB(v)			(v ## ULL << 30)
+
 extern	struct pcpu __pcpu[];
 
 /* Temporary variables for init_secondary()  */

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Fri Apr  6 09:25:08 2018	(r332091)
+++ head/sys/sys/param.h	Fri Apr  6 11:20:06 2018	(r332092)
@@ -362,8 +362,4 @@ __END_DECLS
  */
 #define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset])
 
-/* Unit conversion macros. */
-#define GiB(v) (v ## ULL << 30)
-#define MiB(v) (v ## ULL << 20)
-
 #endif	/* _SYS_PARAM_H_ */

Modified: head/sys/x86/x86/mp_x86.c
==============================================================================
--- head/sys/x86/x86/mp_x86.c	Fri Apr  6 09:25:08 2018	(r332091)
+++ head/sys/x86/x86/mp_x86.c	Fri Apr  6 11:20:06 2018	(r332092)
@@ -160,6 +160,8 @@ struct cache_info {
 
 unsigned int boot_address;
 
+#define MiB(v)	(v ## ULL << 20)
+
 void
 mem_range_AP_init(void)
 {



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