Module Name: src Committed By: uebayasi Date: Sun Nov 2 17:58:14 UTC 2014
Modified Files: src/sys/arch/amd64/conf: kern.ldscript kern.ldscript.2MB kern.ldscript.Xen src/sys/arch/i386/conf: kern.ldscript kern.ldscript.4MB kern.ldscript.Xen Log Message: Revert previous per joerg@'s request. According to him, exposing .data.{read_mostly,cacheline_aligned} is intentional so that people can easily see which variables are optimized. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/conf/kern.ldscript cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/conf/kern.ldscript.2MB \ src/sys/arch/amd64/conf/kern.ldscript.Xen cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/conf/kern.ldscript cvs rdiff -u -r1.11 -r1.12 src/sys/arch/i386/conf/kern.ldscript.4MB cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/conf/kern.ldscript.Xen Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/conf/kern.ldscript diff -u src/sys/arch/amd64/conf/kern.ldscript:1.7 src/sys/arch/amd64/conf/kern.ldscript:1.8 --- src/sys/arch/amd64/conf/kern.ldscript:1.7 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/amd64/conf/kern.ldscript Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.7 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript,v 1.8 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") @@ -32,13 +32,22 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ + _edata = . ; PROVIDE (edata = .) ; __bss_start = . ; Index: src/sys/arch/amd64/conf/kern.ldscript.2MB diff -u src/sys/arch/amd64/conf/kern.ldscript.2MB:1.4 src/sys/arch/amd64/conf/kern.ldscript.2MB:1.5 --- src/sys/arch/amd64/conf/kern.ldscript.2MB:1.4 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/amd64/conf/kern.ldscript.2MB Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.2MB,v 1.4 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript.2MB,v 1.5 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") @@ -33,11 +33,18 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ; Index: src/sys/arch/amd64/conf/kern.ldscript.Xen diff -u src/sys/arch/amd64/conf/kern.ldscript.Xen:1.4 src/sys/arch/amd64/conf/kern.ldscript.Xen:1.5 --- src/sys/arch/amd64/conf/kern.ldscript.Xen:1.4 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/amd64/conf/kern.ldscript.Xen Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.Xen,v 1.4 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript.Xen,v 1.5 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") @@ -26,11 +26,18 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ; Index: src/sys/arch/i386/conf/kern.ldscript diff -u src/sys/arch/i386/conf/kern.ldscript:1.10 src/sys/arch/i386/conf/kern.ldscript:1.11 --- src/sys/arch/i386/conf/kern.ldscript:1.10 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/i386/conf/kern.ldscript Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript,v 1.10 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript,v 1.11 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") @@ -32,11 +32,18 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ; Index: src/sys/arch/i386/conf/kern.ldscript.4MB diff -u src/sys/arch/i386/conf/kern.ldscript.4MB:1.11 src/sys/arch/i386/conf/kern.ldscript.4MB:1.12 --- src/sys/arch/i386/conf/kern.ldscript.4MB:1.11 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/i386/conf/kern.ldscript.4MB Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.4MB,v 1.11 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript.4MB,v 1.12 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") @@ -33,11 +33,18 @@ SECTIONS AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ; Index: src/sys/arch/i386/conf/kern.ldscript.Xen diff -u src/sys/arch/i386/conf/kern.ldscript.Xen:1.5 src/sys/arch/i386/conf/kern.ldscript.Xen:1.6 --- src/sys/arch/i386/conf/kern.ldscript.Xen:1.5 Sat Nov 1 11:58:55 2014 +++ src/sys/arch/i386/conf/kern.ldscript.Xen Sun Nov 2 17:58:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern.ldscript.Xen,v 1.5 2014/11/01 11:58:55 uebayasi Exp $ */ +/* $NetBSD: kern.ldscript.Xen,v 1.6 2014/11/02 17:58:14 uebayasi Exp $ */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") @@ -28,11 +28,18 @@ SECTIONS .data : { *(.data) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.cacheline_aligned : + AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) + { *(.data.cacheline_aligned) - . = ALIGN(64); /* COHERENCY_UNIT */ + } + . = ALIGN(64); /* COHERENCY_UNIT */ + .data.read_mostly : + AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) + { *(.data.read_mostly) - . = ALIGN(64); /* COHERENCY_UNIT */ } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ;