Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Minor shuffle to bring <machine/param.h> and <machin...
details: https://anonhg.NetBSD.org/src/rev/a29f71bf9c05
branches: trunk
changeset: 984767:a29f71bf9c05
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jul 22 04:46:29 2021 +0000
description:
Minor shuffle to bring <machine/param.h> and <machine/limits.h> in before
any <sys/*.h> headers and for the COHERENCY_UNIT and CACHE_LINE_SIZE
defaults to be provided after the <machine/*.h> includes, but before the
<sys/*.h> includes.
COHERENCY_UNIT and CACHE_LINE_SIZE are used by a few <sys/*.h> filss.
I checked a handful of kernel builds produce the same binary before and
after this change. I'll check more.
diffstat:
sys/sys/param.h | 35 +++++++++++++++++------------------
1 files changed, 17 insertions(+), 18 deletions(-)
diffs (63 lines):
diff -r 1a46bc98a2c7 -r a29f71bf9c05 sys/sys/param.h
--- a/sys/sys/param.h Thu Jul 22 01:39:18 2021 +0000
+++ b/sys/sys/param.h Thu Jul 22 04:46:29 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.699 2021/07/21 07:39:58 ozaki-r Exp $ */
+/* $NetBSD: param.h,v 1.700 2021/07/22 04:46:29 skrll Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@@ -138,6 +138,22 @@
#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
#define MAX(a,b) ((/*CONSTCOND*/(a)>(b))?(a):(b))
+/* Machine type dependent parameters. */
+#include <machine/param.h>
+#include <machine/limits.h>
+
+/*
+ * Coherency unit: assumed cache line size. See also MIN_LWP_ALIGNMENT.
+ * The MD code depends on the current values of these constants. Don't
+ * change them without coordinating.
+ */
+#ifndef COHERENCY_UNIT
+#define COHERENCY_UNIT 64
+#endif
+#ifndef CACHE_LINE_SIZE
+#define CACHE_LINE_SIZE 64
+#endif
+
/* More types and definitions used throughout the kernel. */
#ifdef _KERNEL
#include <sys/cdefs.h>
@@ -173,10 +189,6 @@
/* Signals. */
#include <sys/signal.h>
-/* Machine type dependent parameters. */
-#include <machine/param.h>
-#include <machine/limits.h>
-
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1 << DEV_BSHIFT) /* 512 */
@@ -200,19 +212,6 @@
#define dbtob(x) ((x) << DEV_BSHIFT)
#define btodb(x) ((x) >> DEV_BSHIFT)
-/*
- * Coherency unit: assumed cache line size. See also MIN_LWP_ALIGNMENT.
- * The MD code depends on the current values of these constants. Don't
- * change them without coordinating.
- */
-#ifndef COHERENCY_UNIT
-#define COHERENCY_UNIT 64
-#endif
-#ifndef CACHE_LINE_SIZE
-#define CACHE_LINE_SIZE 64
-#endif
-
-
#ifndef MAXCPUS
#define MAXCPUS 32
#endif
Home |
Main Index |
Thread Index |
Old Index