Module Name: src Committed By: skrll Date: Thu Jul 22 04:46:29 UTC 2021
Modified Files: src/sys/sys: param.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.699 -r1.700 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.699 src/sys/sys/param.h:1.700 --- src/sys/sys/param.h:1.699 Wed Jul 21 07:39:58 2021 +++ src/sys/sys/param.h Thu Jul 22 04:46:29 2021 @@ -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