Skip to content

Commit 97d03d7

Browse files
committed
NetBSD src for "kernel", checkout.sh rev 7ec44a76db7a91c1a8735fac0ee461fac500a9d3
1 parent ff2e56b commit 97d03d7

File tree

2,014 files changed

+164410
-56187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,014 files changed

+164410
-56187
lines changed

Makefile

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.313 2015/05/03 15:13:13 martin Exp $
1+
# $NetBSD: Makefile,v 1.316 2015/07/23 08:03:25 mrg Exp $
22

33
#
44
# This is the top-level makefile for building NetBSD. For an outline of
@@ -98,8 +98,7 @@
9898
# if ${MKCOMPAT} != "no".
9999
# do-build: builds and installs the entire system.
100100
# do-x11: builds and installs X11 if ${MKX11} != "no"; either
101-
# X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg"
102-
# or X11R6 from src/x11
101+
# X11R7 from src/external/mit/xorg
103102
# do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no".
104103
# do-obsolete: installs the obsolete sets (for the postinstall-* targets).
105104
#
@@ -482,11 +481,10 @@ do-build: .PHONY .MAKE
482481

483482
do-x11: .PHONY .MAKE
484483
.if ${MKX11} != "no"
485-
.if ${X11FLAVOUR} == "Xorg"
486484
${MAKEDIRTARGET} external/mit/xorg/tools all
487485
${MAKEDIRTARGET} external/mit/xorg/lib build_install
488-
.else
489-
${MAKEDIRTARGET} x11 build
486+
.if ${MKCOMPATX11} != "no"
487+
${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../external/mit/xorg/lib"
490488
.endif
491489
.else
492490
@echo "MKX11 is not enabled"

bin/cat/cat.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: cat.c,v 1.54 2013/12/08 08:32:13 spz Exp $ */
1+
/* $NetBSD: cat.c,v 1.55 2015/07/25 16:17:01 sevan Exp $ */
22

33
/*
44
* Copyright (c) 1989, 1993
@@ -44,7 +44,7 @@ __COPYRIGHT(
4444
#if 0
4545
static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95";
4646
#else
47-
__RCSID("$NetBSD: cat.c,v 1.54 2013/12/08 08:32:13 spz Exp $");
47+
__RCSID("$NetBSD: cat.c,v 1.55 2015/07/25 16:17:01 sevan Exp $");
4848
#endif
4949
#endif /* not lint */
5050

@@ -113,7 +113,6 @@ main(int argc, char *argv[])
113113
vflag = 1;
114114
break;
115115
default:
116-
case '?':
117116
(void)fprintf(stderr,
118117
"Usage: %s [-beflnstuv] [-B bsize] [-] "
119118
"[file ...]\n", getprogname());

build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/env sh
2-
# $NetBSD: build.sh,v 1.307 2015/05/06 17:31:49 wiz Exp $
2+
# $NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $
33
#
44
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
55
# All rights reserved.
@@ -651,7 +651,7 @@ MACHINE=evbarm MACHINE_ARCH=earmv7 ALIAS=evbearmv7-el
651651
MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb
652652
MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el
653653
MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb
654-
MACHINE=evbarm64 MACHINE_ARCH=aarch64 ALIAS=evbarm64-el
654+
MACHINE=evbarm64 MACHINE_ARCH=aarch64 ALIAS=evbarm64-el DEFAULT
655655
MACHINE=evbarm64 MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb
656656
MACHINE=evbcf MACHINE_ARCH=coldfire
657657
MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT
@@ -1869,7 +1869,7 @@ createmakewrapper()
18691869
eval cat <<EOF ${makewrapout}
18701870
#! ${HOST_SH}
18711871
# Set proper variables to allow easy "make" building of a NetBSD subtree.
1872-
# Generated from: \$NetBSD: build.sh,v 1.307 2015/05/06 17:31:49 wiz Exp $
1872+
# Generated from: \$NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $
18731873
# with these arguments: ${_args}
18741874
#
18751875

common/lib/libc/arch/arm/atomic/Makefile.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile.inc,v 1.27 2015/05/17 22:08:24 justin Exp $
1+
# $NetBSD: Makefile.inc,v 1.29 2015/06/07 15:06:24 matt Exp $
22

33
.ifnmake obj
44
.include "${NETBSDSRCDIR}/common/lib/libc/arch/arm/features.mk"

common/lib/libc/arch/arm/features.mk

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# $NetBSD: features.mk,v 1.1 2014/02/27 09:37:02 matt Exp $
1+
# $NetBSD: features.mk,v 1.2 2015/06/07 15:05:34 matt Exp $
22

33
.ifnmake obj
44
TESTFILE=${NETBSDSRCDIR}/common/lib/libc/arch/arm/features.c
5-
FEAT_EABI!=if ${COMPILE.c} -fsyntax-only -DEABI_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
6-
FEAT_LDREX!=if ${COMPILE.c} -fsyntax-only -DLDREX_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
7-
FEAT_LDRD!=if ${COMPILE.c} -fsyntax-only -DLDRD_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
8-
FEAT_THUMB2!=if ${COMPILE.c} -fsyntax-only -DTHUMB2_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
5+
FEAT_EABI!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DEABI_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
6+
FEAT_LDREX!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DLDREX_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
7+
FEAT_LDRD!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DLDRD_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
8+
FEAT_THUMB2!=if ${COMPILE.c} ${COPTS} -fsyntax-only -DTHUMB2_TEST ${TESTFILE} >/dev/null 2>/dev/null; then echo yes; else echo no; fi
99
.endif

common/lib/libc/arch/arm/string/memcpy.S

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: memcpy.S,v 1.7 2015/03/26 13:34:51 justin Exp $ */
1+
/* $NetBSD: memcpy.S,v 1.8 2015/06/07 11:41:59 joerg Exp $ */
22

33
#include <arm/cdefs.h>
44

@@ -10,4 +10,6 @@
1010

1111
#if defined(__ARM_EABI__) && !defined(_RUMPKERNEL)
1212
STRONG_ALIAS(__aeabi_memcpy, memcpy)
13+
STRONG_ALIAS(__aeabi_memcpy4, memcpy)
14+
STRONG_ALIAS(__aeabi_memcpy8, memcpy)
1315
#endif

common/lib/libc/arch/m68k/atomic/atomic_cas.S

+21-25
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: atomic_cas.S,v 1.10 2014/02/22 17:08:30 martin Exp $ */
1+
/* $NetBSD: atomic_cas.S,v 1.13 2015/07/10 20:16:01 mlelstv Exp $ */
22

33
/*-
44
* Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -63,22 +63,20 @@ STRONG_ALIAS(_atomic_cas_ptr_ni,_atomic_cas_32)
6363

6464
ENTRY(__sync_bool_compare_and_swap_4)
6565
movl 4(%sp), %a0
66-
movl 8(%sp), %d3
67-
movl %d3, %d2
66+
movl 8(%sp), %d0
6867
movl 12(%sp), %d1
69-
casl %d3, %d1, (%a0)
70-
/* %d3 now contains the old value */
71-
beq 1f
68+
casl %d0, %d1, (%a0)
69+
beqs 1f
7270
clrl %d0 /* return false */
7371
rts
74-
1: movl #1, %d0 /* return success */
72+
1: movql #1, %d0 /* return success */
7573
rts
7674
END(__sync_bool_compare_and_swap_4)
7775

7876
ENTRY(_atomic_cas_16)
7977
movl 4(%sp), %a0
80-
movw 8(%sp), %d0
81-
movw 10(%sp), %d1
78+
movw 8+2(%sp), %d0 /* lower word */
79+
movw 12+2(%sp), %d1 /* lower word */
8280
casw %d0, %d1, (%a0)
8381
/* %d0 now contains the old value */
8482
rts
@@ -89,22 +87,21 @@ CRT_ALIAS(__sync_val_compare_and_swap_2,_atomic_cas_16)
8987

9088
ENTRY(__sync_bool_compare_and_swap_2)
9189
movl 4(%sp), %a0
92-
movw 8(%sp), %d3
93-
movw %d3, %d2
94-
movw 10(%sp), %d1
95-
casw %d3, %d1, (%a0)
96-
/* %d3 now contains the old value */
97-
beq 1f
90+
movw 8+2(%sp), %d0 /* lower word */
91+
movw 12+2(%sp), %d1 /* lower word */
92+
casw %d0, %d1, (%a0)
93+
/* %d0 now contains the old value */
94+
beqs 1f
9895
clrl %d0 /* return failure */
9996
rts
100-
1: movl #1, %d0 /* return success */
97+
1: movql #1, %d0 /* return success */
10198
rts
10299
END(__sync_bool_compare_and_swap_2)
103100

104101
ENTRY(_atomic_cas_8)
105102
movl 4(%sp), %a0
106-
movb 8(%sp), %d0
107-
movb 9(%sp), %d1
103+
movb 8+3(%sp), %d0 /* lower byte */
104+
movb 12+3(%sp), %d1 /* lower byte */
108105
casb %d0, %d1, (%a0)
109106
/* %d0 now contains the old value */
110107
rts
@@ -116,15 +113,14 @@ CRT_ALIAS(__sync_val_compare_and_swap_1,_atomic_cas_8)
116113

117114
ENTRY(__sync_bool_compare_and_swap_1)
118115
movl 4(%sp), %a0
119-
movb 8(%sp), %d3
120-
movb %d3, %d2
121-
movb 9(%sp), %d1
122-
casb %d3, %d1, (%a0)
123-
/* %d3 now contains the old value */
124-
beq 1f
116+
movb 8+3(%sp), %d0 /* lower byte */
117+
movb 12+3(%sp), %d1 /* lower byte */
118+
casb %d0, %d1, (%a0)
119+
/* %d0 now contains the old value */
120+
beqs 1f
125121
clrl %d0 /* return failure */
126122
rts
127-
1: movl #1, %d0 /* return success */
123+
1: movql #1, %d0 /* return success */
128124
rts
129125
END(__sync_bool_compare_and_swap_1)
130126

common/lib/libc/arch/mips/atomic/atomic_add.S

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: atomic_add.S,v 1.4 2012/03/14 16:50:34 christos Exp $ */
1+
/* $NetBSD: atomic_add.S,v 1.5 2015/06/01 23:16:54 matt Exp $ */
22

33
/*-
44
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
2929
#include <machine/asm.h>
3030
#include "atomic_op_asm.h"
3131

32-
RCSID("$NetBSD: atomic_add.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
32+
RCSID("$NetBSD: atomic_add.S,v 1.5 2015/06/01 23:16:54 matt Exp $")
3333

3434
.text
3535
.set noreorder
@@ -46,12 +46,16 @@ RCSID("$NetBSD: atomic_add.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
4646

4747

4848
LEAF(_atomic_add_32)
49+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
50+
saa a1, (a0)
51+
#else
4952
1: INT_LL t0, 0(a0)
5053
nop
5154
INT_ADDU t0, a1
5255
INT_SC t0, 0(a0)
5356
beq t0, zero, 1b
5457
nop
58+
#endif
5559
j ra
5660
nop
5761
END(_atomic_add_32)
@@ -72,12 +76,16 @@ ATOMIC_OP_ALIAS(atomic_add_32_nv, _atomic_add_32_nv)
7276

7377
#if !defined(__mips_o32)
7478
LEAF(_atomic_add_64)
79+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
80+
saad a1, (a0)
81+
#else
7582
1: REG_LL t0, 0(a0)
7683
nop
7784
REG_ADDU t0, a1
7885
REG_SC t0, 0(a0)
7986
beq t0, zero, 1b
8087
nop
88+
#endif
8189
j ra
8290
nop
8391
END(_atomic_add_64)

common/lib/libc/arch/mips/atomic/atomic_cas.S

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: atomic_cas.S,v 1.3 2012/03/14 16:50:34 christos Exp $ */
1+
/* $NetBSD: atomic_cas.S,v 1.4 2015/06/01 23:16:54 matt Exp $ */
22

33
/*-
44
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
2929
#include <machine/asm.h>
3030
#include "atomic_op_asm.h"
3131

32-
RCSID("$NetBSD: atomic_cas.S,v 1.3 2012/03/14 16:50:34 christos Exp $")
32+
RCSID("$NetBSD: atomic_cas.S,v 1.4 2015/06/01 23:16:54 matt Exp $")
3333

3434
.text
3535
.set noat
@@ -46,6 +46,9 @@ LEAF(_atomic_cas_32)
4646
beq t0, zero, 1b
4747
nop
4848
move v0, a1
49+
#ifdef _MIPS_ARCH_OCTEONP
50+
syncw
51+
#endif
4952
2:
5053
j ra
5154
nop
@@ -63,6 +66,9 @@ LEAF(_atomic_cas_64)
6366
beq t0, zero, 1b
6467
nop
6568
move v0, a1
69+
#ifdef _MIPS_ARCH_OCTEONP
70+
syncw
71+
#endif
6672
2:
6773
j ra
6874
nop

common/lib/libc/arch/mips/atomic/atomic_dec.S

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: atomic_dec.S,v 1.4 2012/03/14 16:50:34 christos Exp $ */
1+
/* $NetBSD: atomic_dec.S,v 1.5 2015/06/01 23:16:54 matt Exp $ */
22

33
/*-
44
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
2929
#include <machine/asm.h>
3030
#include "atomic_op_asm.h"
3131

32-
RCSID("$NetBSD: atomic_dec.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
32+
RCSID("$NetBSD: atomic_dec.S,v 1.5 2015/06/01 23:16:54 matt Exp $")
3333

3434
.text
3535
.set noreorder
@@ -45,12 +45,17 @@ RCSID("$NetBSD: atomic_dec.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
4545
#endif /* _KERNEL_OPT */
4646

4747
LEAF(_atomic_dec_32)
48+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
49+
li t0, -1
50+
saa t0, (a0)
51+
#else
4852
1: INT_LL t0, 0(a0)
4953
nop
5054
INT_ADDU t0, -1
5155
INT_SC t0, 0(a0)
5256
beq t0, zero, 1b
5357
nop
58+
#endif
5459
j ra
5560
nop
5661
END(_atomic_dec_32)
@@ -71,12 +76,17 @@ ATOMIC_OP_ALIAS(atomic_dec_32_nv, _atomic_dec_32_nv)
7176

7277
#if !defined(__mips_o32)
7378
LEAF(_atomic_dec_64)
79+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
80+
li t0, -1
81+
saad t0, (a0)
82+
#else
7483
1: REG_LL t0, 0(a0)
7584
nop
7685
REG_ADDU t0, -1
7786
REG_SC t0, 0(a0)
7887
beq t0, zero, 1b
7988
nop
89+
#endif
8090
j ra
8191
nop
8292
END(_atomic_dec_64)

common/lib/libc/arch/mips/atomic/atomic_inc.S

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: atomic_inc.S,v 1.4 2012/03/14 16:50:34 christos Exp $ */
1+
/* $NetBSD: atomic_inc.S,v 1.5 2015/06/01 23:16:54 matt Exp $ */
22

33
/*-
44
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
2929
#include <machine/asm.h>
3030
#include "atomic_op_asm.h"
3131

32-
RCSID("$NetBSD: atomic_inc.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
32+
RCSID("$NetBSD: atomic_inc.S,v 1.5 2015/06/01 23:16:54 matt Exp $")
3333

3434
.text
3535
.set noreorder
@@ -46,12 +46,17 @@ RCSID("$NetBSD: atomic_inc.S,v 1.4 2012/03/14 16:50:34 christos Exp $")
4646

4747

4848
LEAF(_atomic_inc_32)
49+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
50+
li t0, 1
51+
saa t0, (a0)
52+
#else
4953
1: INT_LL t0, 0(a0)
5054
nop
5155
INT_ADDU t0, 1
5256
INT_SC t0, 0(a0)
5357
beq t0, zero, 1b
5458
nop
59+
#endif
5560
j ra
5661
nop
5762
END(_atomic_inc_32)
@@ -72,12 +77,17 @@ ATOMIC_OP_ALIAS(atomic_inc_32_nv, _atomic_inc_32_nv)
7277

7378
#if !defined(__mips_o32)
7479
LEAF(_atomic_inc_64)
80+
#if defined(_MIPS_ARCH_OCTEONP) || defined(_MIPS_ARCH_OCTEON2)
81+
li t0, 1
82+
saad t0, (a0)
83+
#else
7584
1: REG_LL t0, 0(a0)
7685
nop
7786
REG_ADDU t0, 1
7887
REG_SC t0, 0(a0)
7988
beq t0, zero, 1b
8089
nop
90+
#endif
8191
j ra
8292
nop
8393
END(_atomic_inc_64)

0 commit comments

Comments
 (0)