svn commit: r332092 - in head/sys: amd64/amd64 sys x86/x86
Roger Pau Monné
royger at FreeBSD.org
Fri Apr 6 11:20:07 UTC 2018
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)
{
More information about the svn-src-all
mailing list