CVS commit: src/tests/lib/libc/ssp
Module Name:src Committed By: plunky Date: Wed Jun 15 06:09:22 UTC 2011 Modified Files: src/tests/lib/libc/ssp: h_raw.c Log Message: gcc seems to pad small character arrays, use an array of ints while here, make the poke function non-static, so that it doesnt get optimised away To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/ssp/h_raw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/ssp/h_raw.c diff -u src/tests/lib/libc/ssp/h_raw.c:1.3 src/tests/lib/libc/ssp/h_raw.c:1.4 --- src/tests/lib/libc/ssp/h_raw.c:1.3 Sun Jun 12 21:12:46 2011 +++ src/tests/lib/libc/ssp/h_raw.c Wed Jun 15 06:09:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_raw.c,v 1.3 2011/06/12 21:12:46 plunky Exp $ */ +/* $NetBSD: h_raw.c,v 1.4 2011/06/15 06:09:21 plunky Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,20 +29,22 @@ #include sys/cdefs.h __COPYRIGHT(@(#) Copyright (c) 2011\ The NetBSD Foundation, inc. All rights reserved.); -__RCSID($NetBSD: h_raw.c,v 1.3 2011/06/12 21:12:46 plunky Exp $); +__RCSID($NetBSD: h_raw.c,v 1.4 2011/06/15 06:09:21 plunky Exp $); #include stdlib.h -static void -poke(char *b, size_t index) +void poke(int *, size_t); + +void +poke(int *b, size_t index) { - b[index] = 'A'; + b[index] = 42; } int main(int argc, char *argv[]) { - char b[10]; + int b[10]; poke(b, atoi(argv[1])); return 0;
CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: cliff Date: Wed Jun 15 06:28:39 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx: trap_subr.S Log Message: - FRAME_SAVE_CALLEE() starts at r14 (not r13, which is curlwp) (from matt@) - INTR_SAVE() must also save r13 (from matt@). - fitint must pass clock frame, not trap frame - fix comment in pitint and fitint to indicate passing clock frame, not intr frame To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/ibm4xx/trap_subr.S 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/powerpc/ibm4xx/trap_subr.S diff -u src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.15 src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.16 --- src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.15 Sun Jun 5 16:52:25 2011 +++ src/sys/arch/powerpc/ibm4xx/trap_subr.S Wed Jun 15 06:28:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap_subr.S,v 1.15 2011/06/05 16:52:25 matt Exp $ */ +/* $NetBSD: trap_subr.S,v 1.16 2011/06/15 06:28:39 cliff Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -287,7 +287,7 @@ stw %r31,FRAME_SRR1(%r1) #define FRAME_SAVE_CALLEE \ - stmw %r13, FRAME_R13(%r1) + stmw %r14, FRAME_R14(%r1) #define FRAME_RESTORE \ lwz %r6,FRAME_LR(%r1); \ @@ -439,6 +439,7 @@ stw %r10,FRAME_R10(%r1); \ stw %r11,FRAME_R11(%r1); \ stw %r12,FRAME_R12(%r1); \ + stw %r13,FRAME_R13(%r1); \ mfctr %r31; \ stmw %r28,FRAME_LR(%r1); /* save LR, CR, XER, CTR */ \ GET_CPUINFO(%r5); \ @@ -491,7 +492,7 @@ _C_LABEL(pitint): INTR_PROLOG(CI_TEMPSAVE) INTR_SAVE(CI_TEMPSAVE) - addi %r3,%r1,FRAME_CF /* intr frame */ + addi %r3,%r1,FRAME_CF /* clock frame */ bl _C_LABEL(decr_intr) b intr_exit @@ -502,7 +503,7 @@ _C_LABEL(fitint): INTR_PROLOG(CI_TEMPSAVE) INTR_SAVE(CI_TEMPSAVE) - addi %r3,%r1,FRAME_TF /* intr frame */ + addi %r3,%r1,FRAME_CF /* clock frame */ bl _C_LABEL(stat_intr) b intr_exit
CVS commit: src/sys
Module Name:src Committed By: jruoho Date: Wed Jun 15 06:43:21 UTC 2011 Modified Files: src/sys/arch/x86/pci: files.pci ichlpcib.c Added Files: src/sys/arch/x86/pci: ichlpcib_hpet.c src/sys/dev/ic: i82801lpcvar.h Log Message: Factor out hpet(4) from ichlpcib(4). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/pci/files.pci cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x86/pci/ichlpcib.c cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/pci/ichlpcib_hpet.c cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/i82801lpcvar.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/arch/x86/pci/files.pci diff -u src/sys/arch/x86/pci/files.pci:1.11 src/sys/arch/x86/pci/files.pci:1.12 --- src/sys/arch/x86/pci/files.pci:1.11 Mon Apr 4 17:09:39 2011 +++ src/sys/arch/x86/pci/files.pci Wed Jun 15 06:43:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.11 2011/04/04 17:09:39 bouyer Exp $ +# $NetBSD: files.pci,v 1.12 2011/06/15 06:43:20 jruoho Exp $ device aapic attach aapic at pci @@ -39,10 +39,11 @@ define hpetichbus {} device ichlpcib: acpipmtimer, isabus, sysmon_wdog, fwhichbus, hpetichbus, gpiobus attach ichlpcib at pci -attach hpet at hpetichbus with ichlpcib_hpet - file arch/x86/pci/ichlpcib.c ichlpcib +attach hpet at hpetichbus with ichlpcib_hpet +filearch/x86/pci/ichlpcib_hpet.c ichlpcib_hpet + device fwhrng attach fwhrng at fwhichbus file arch/x86/pci/fwhrng.c fwhrng needs-flag Index: src/sys/arch/x86/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.30 src/sys/arch/x86/pci/ichlpcib.c:1.31 --- src/sys/arch/x86/pci/ichlpcib.c:1.30 Mon Jun 6 14:33:31 2011 +++ src/sys/arch/x86/pci/ichlpcib.c Wed Jun 15 06:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.30 2011/06/06 14:33:31 msaitoh Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.31 2011/06/15 06:43:20 jruoho Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.30 2011/06/06 14:33:31 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.31 2011/06/15 06:43:20 jruoho Exp $); #include sys/types.h #include sys/param.h @@ -59,10 +59,10 @@ #include dev/ic/acpipmtimer.h #include dev/ic/i82801lpcreg.h +#include dev/ic/i82801lpcvar.h #include dev/ic/hpetreg.h #include dev/ic/hpetvar.h -#include hpet.h #include pcibvar.h #include gpio.h #include fwhrng.h @@ -88,10 +88,8 @@ bus_space_handle_t sc_ioh; bus_size_t sc_iosize; -#if NHPET 0 /* HPET variables. */ uint32_t sc_hpet_reg; -#endif #if NGPIO 0 device_t sc_gpiobus; @@ -148,10 +146,8 @@ static void speedstep_unconfigure(device_t); static int speedstep_sysctl_helper(SYSCTLFN_ARGS); -#if NHPET 0 static void lpcib_hpet_configure(device_t); static int lpcib_hpet_unconfigure(device_t, int); -#endif #if NGPIO 0 static void lpcib_gpio_configure(device_t); @@ -292,10 +288,8 @@ /* Set up SpeedStep. */ speedstep_configure(self); -#if NHPET 0 /* Set up HPET. */ lpcib_hpet_configure(self); -#endif #if NGPIO 0 /* Set up GPIO */ @@ -371,19 +365,15 @@ static int lpcibrescan(device_t self, const char *ifattr, const int *locators) { -#if NHPET 0 || NGPIO 0 || NFWHRNG 0 struct lpcib_softc *sc = device_private(self); -#endif #if NFWHRNG 0 if (ifattr_match(ifattr, fwhichbus) sc-sc_fwhbus == NULL) lpcib_fwh_configure(self); #endif -#if NHPET 0 if (ifattr_match(ifattr, hpetichbus) sc-sc_hpetbus == NULL) lpcib_hpet_configure(self); -#endif #if NGPIO 0 if (ifattr_match(ifattr, gpiobus) sc-sc_gpiobus == NULL) @@ -406,10 +396,8 @@ return rc; #endif -#if NHPET 0 if ((rc = lpcib_hpet_unconfigure(self, flags)) != 0) return rc; -#endif #if NGPIO 0 if ((rc = lpcib_gpio_unconfigure(self, flags)) != 0) @@ -460,14 +448,10 @@ if (sc-sc_has_rcba) { sc-sc_rcba_reg = pci_conf_read(pc, tag, LPCIB_RCBA); -#if NHPET 0 sc-sc_hpet_reg = bus_space_read_4(sc-sc_rcbat, sc-sc_rcbah, LPCIB_RCBA_HPTC); -#endif } else if (sc-sc_has_ich5_hpet) { -#if NHPET 0 sc-sc_hpet_reg = pci_conf_read(pc, tag, LPCIB_PCI_GEN_CNTL); -#endif } return true; @@ -489,14 +473,10 @@ if (sc-sc_has_rcba) { pci_conf_write(pc, tag, LPCIB_RCBA, sc-sc_rcba_reg); -#if NHPET 0 bus_space_write_4(sc-sc_rcbat, sc-sc_rcbah, LPCIB_RCBA_HPTC, sc-sc_hpet_reg); -#endif } else if (sc-sc_has_ich5_hpet) { -#if NHPET 0 pci_conf_write(pc, tag, LPCIB_PCI_GEN_CNTL, sc-sc_hpet_reg); -#endif } return true; @@ -920,73 +900,11 @@ return error; } -#if NHPET 0 -struct lpcib_hpet_attach_arg { - bus_space_tag_t hpet_mem_t; - uint32_t hpet_reg; -}; - -static int -lpcib_hpet_match(device_t parent, cfdata_t match, void *aux) -{ - struct lpcib_hpet_attach_arg *arg = aux; - bus_space_tag_t tag; - bus_space_handle_t handle; - - tag = arg-hpet_mem_t; - - if (bus_space_map(tag,
CVS commit: src/tests/lib/libc/net/getaddrinfo
Module Name:src Committed By: jmmv Date: Wed Jun 15 07:54:33 UTC 2011 Modified Files: src/tests/lib/libc/net/getaddrinfo: t_getaddrinfo.sh Log Message: Fix obvious typo in test case name. Uncovered by atf 0.14. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh diff -u src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.1 src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.2 --- src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh:1.1 Wed Jan 12 02:58:41 2011 +++ src/tests/lib/libc/net/getaddrinfo/t_getaddrinfo.sh Wed Jun 15 07:54:32 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_getaddrinfo.sh,v 1.1 2011/01/12 02:58:41 pgoyette Exp $ +# $NetBSD: t_getaddrinfo.sh,v 1.2 2011/06/15 07:54:32 jmmv Exp $ # # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, and 2002 WIDE Project. @@ -154,7 +154,7 @@ check_output sock_raw hosts } -atf_test_case unspported_family +atf_test_case unsupported_family unsupported_family_head() { atf_set descr Testing unsupported family @@ -193,6 +193,6 @@ atf_add_test_case empty_hostname atf_add_test_case empty_servname atf_add_test_case sock_raw - atf_add_test_case unspported_family + atf_add_test_case unsupported_family atf_add_test_case scopeaddr }
CVS commit: src/tests/util/sort
Module Name:src Committed By: jmmv Date: Wed Jun 15 07:58:03 UTC 2011 Modified Files: src/tests/util/sort: t_sort.sh Log Message: Fix definition of the plus_tflag test case. Uncovered by atf 0.14. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/util/sort/t_sort.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/util/sort/t_sort.sh diff -u src/tests/util/sort/t_sort.sh:1.3 src/tests/util/sort/t_sort.sh:1.4 --- src/tests/util/sort/t_sort.sh:1.3 Sat Dec 18 12:47:21 2010 +++ src/tests/util/sort/t_sort.sh Wed Jun 15 07:58:03 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_sort.sh,v 1.3 2010/12/18 12:47:21 pooka Exp $ +# $NetBSD: t_sort.sh,v 1.4 2011/06/15 07:58:03 jmmv Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -938,12 +938,12 @@ } atf_test_case plus_tflag -plus_tflag() +plus_tflag_head() { atf_set descr Tests +- addressing: using -T caused a 'No such file \ or directory' error } -plus_tflag() +plus_tflag_body() { mkdir ./+ yes | sed 20q | sort -T + /dev/null || atf_fail program failed
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Jun 15 08:04:50 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_resource.c Log Message: Remove printouts that mess with the autoconf(9). To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/acpi/acpi_resource.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_resource.c diff -u src/sys/dev/acpi/acpi_resource.c:1.32 src/sys/dev/acpi/acpi_resource.c:1.33 --- src/sys/dev/acpi/acpi_resource.c:1.32 Fri Mar 5 14:00:17 2010 +++ src/sys/dev/acpi/acpi_resource.c Wed Jun 15 08:04:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_resource.c,v 1.32 2010/03/05 14:00:17 jruoho Exp $ */ +/* $NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_resource.c,v 1.32 2010/03/05 14:00:17 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -647,10 +647,12 @@ static void acpi_res_parse_fini(device_t dev, void *context) { +#ifdef ACPI_DEBUG struct acpi_resources *res = context; /* Print the resources we're using. */ acpi_resource_print(dev, res); +#endif } static void
CVS commit: src
Module Name:src Committed By: jruoho Date: Wed Jun 15 08:19:44 UTC 2011 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.i386 src/sys/arch/x86/pci: amdpcib_hpet.c ichlpcib_hpet.c src/sys/dev/acpi: hpet_acpi.c src/sys/modules: Makefile Added Files: src/sys/modules/hpet: Makefile hpet.ioconf Log Message: Modularize hpet(4). Works nicely with the multiple bus locations. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/pci/amdpcib_hpet.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/pci/ichlpcib_hpet.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/hpet_acpi.c cvs rdiff -u -r1.71 -r1.72 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/hpet/Makefile \ src/sys/modules/hpet/hpet.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.21 src/distrib/sets/lists/modules/md.amd64:1.22 --- src/distrib/sets/lists/modules/md.amd64:1.21 Wed Jun 15 03:22:39 2011 +++ src/distrib/sets/lists/modules/md.amd64 Wed Jun 15 08:19:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.21 2011/06/15 03:22:39 jruoho Exp $ +# $NetBSD: md.amd64,v 1.22 2011/06/15 08:19:43 jruoho Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -57,6 +57,8 @@ ./@MODULEDIR@/fujbp/fujbp.kmod base-kernel-modules kmod ./@MODULEDIR@/fujhkbase-kernel-modules kmod ./@MODULEDIR@/fujhk/fujhk.kmod base-kernel-modules kmod +./@MODULEDIR@/hpetbase-kernel-modules kmod +./@MODULEDIR@/hpet/hpet.kmod base-kernel-modules kmod ./@MODULEDIR@/hpqlbbase-kernel-modules kmod ./@MODULEDIR@/hpqlb/hpqlb.kmod base-kernel-modules kmod ./@MODULEDIR@/i915drmbase-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.25 src/distrib/sets/lists/modules/md.i386:1.26 --- src/distrib/sets/lists/modules/md.i386:1.25 Wed Jun 15 03:22:39 2011 +++ src/distrib/sets/lists/modules/md.i386 Wed Jun 15 08:19:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.25 2011/06/15 03:22:39 jruoho Exp $ +# $NetBSD: md.i386,v 1.26 2011/06/15 08:19:43 jruoho Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -59,6 +59,8 @@ ./@MODULEDIR@/fujbp/fujbp.kmod base-kernel-modules kmod ./@MODULEDIR@/fujhkbase-kernel-modules kmod ./@MODULEDIR@/fujhk/fujhk.kmod base-kernel-modules kmod +./@MODULEDIR@/hpetbase-kernel-modules kmod +./@MODULEDIR@/hpet/hpet.kmod base-kernel-modules kmod ./@MODULEDIR@/hpqlbbase-kernel-modules kmod ./@MODULEDIR@/hpqlb/hpqlb.kmod base-kernel-modules kmod ./@MODULEDIR@/i915drmbase-kernel-modules kmod Index: src/sys/arch/x86/pci/amdpcib_hpet.c diff -u src/sys/arch/x86/pci/amdpcib_hpet.c:1.6 src/sys/arch/x86/pci/amdpcib_hpet.c:1.7 --- src/sys/arch/x86/pci/amdpcib_hpet.c:1.6 Wed Jun 15 04:52:52 2011 +++ src/sys/arch/x86/pci/amdpcib_hpet.c Wed Jun 15 08:19:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: amdpcib_hpet.c,v 1.6 2011/06/15 04:52:52 jruoho Exp $ */ +/* $NetBSD: amdpcib_hpet.c,v 1.7 2011/06/15 08:19:43 jruoho Exp $ */ /* * Copyright (c) 2006 Nicolas Joly @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: amdpcib_hpet.c,v 1.6 2011/06/15 04:52:52 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: amdpcib_hpet.c,v 1.7 2011/06/15 08:19:43 jruoho Exp $); #include sys/systm.h #include sys/device.h @@ -49,6 +49,7 @@ static int amdpcib_hpet_match(device_t , cfdata_t , void *); static void amdpcib_hpet_attach(device_t, device_t, void *); static int amdpcib_hpet_detach(device_t, int); +static pcireg_t amdpcib_hpet_addr(struct pci_attach_args *); CFATTACH_DECL_NEW(amdpcib_hpet, sizeof(struct hpet_softc), amdpcib_hpet_match, amdpcib_hpet_attach, amdpcib_hpet_detach, NULL); @@ -56,6 +57,23 @@ static int amdpcib_hpet_match(device_t parent, cfdata_t match, void *aux) { + struct pci_attach_args *pa = aux; + bus_space_handle_t bh; + bus_space_tag_t bt; + pcireg_t addr; + + addr = amdpcib_hpet_addr(pa); + + if (addr == 0) + return 0; + + bt = pa-pa_memt; + + if (bus_space_map(bt, addr, HPET_WINDOW_SIZE, 0, bh) != 0) + return 0; + + bus_space_unmap(bt, bh, HPET_WINDOW_SIZE); + return 1; } @@ -64,29 +82,28 @@ { struct hpet_softc *sc = device_private(self); struct pci_attach_args *pa = aux; - pcireg_t conf, addr; - - aprint_naive(\n); - aprint_normal(: HPET timer\n); + pcireg_t addr; sc-sc_mapped = false; - conf = pci_conf_read(pa-pa_pc, pa-pa_tag, 0xa0); + addr = amdpcib_hpet_addr(pa); - if
CVS commit: src/external/bsd/atf/dist
Module Name:src Committed By: jmmv Date: Wed Jun 15 08:48:36 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-c/detail: process.c src/external/bsd/atf/dist/atf-run: test-program.cpp src/external/bsd/atf/dist/atf-sh: atf-check_test.sh Log Message: Pull up part of revision f621bc0489ac3e4ef364f840a852a6a5290e8e12: - Only silence stdin for test programs atf-check is expected to accept data in its stdin, and a previous change broke this behavior. - This should fix a few tests that broke during the 0.14 import. In particularly, the tests in libc/stdlib and libc/ssp that redirect stuff to atf_check. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-c/detail/process.c cvs rdiff -u -r1.9 -r1.10 src/external/bsd/atf/dist/atf-run/test-program.cpp cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/dist/atf-c/detail/process.c diff -u src/external/bsd/atf/dist/atf-c/detail/process.c:1.3 src/external/bsd/atf/dist/atf-c/detail/process.c:1.4 --- src/external/bsd/atf/dist/atf-c/detail/process.c:1.3 Tue Jun 14 15:26:20 2011 +++ src/external/bsd/atf/dist/atf-c/detail/process.c Wed Jun 15 08:48:35 2011 @@ -412,24 +412,6 @@ } static -atf_error_t -silence_stdin(void) -{ -atf_error_t err; - -close(STDIN_FILENO); -int fd = open(/dev/zero, O_RDONLY); -if (fd == -1) -err = atf_libc_error(errno, Could not open /dev/zero); -else { -INV(fd == STDIN_FILENO); -err = atf_no_error(); -} - -return err; -} - -static void do_child(void (*)(void *), void *, @@ -445,10 +427,6 @@ { atf_error_t err; -err = silence_stdin(); -if (atf_is_error(err)) -goto out; - err = child_connect(outsp, STDOUT_FILENO); if (atf_is_error(err)) goto out; Index: src/external/bsd/atf/dist/atf-run/test-program.cpp diff -u src/external/bsd/atf/dist/atf-run/test-program.cpp:1.9 src/external/bsd/atf/dist/atf-run/test-program.cpp:1.10 --- src/external/bsd/atf/dist/atf-run/test-program.cpp:1.9 Tue Jun 14 15:26:21 2011 +++ src/external/bsd/atf/dist/atf-run/test-program.cpp Wed Jun 15 08:48:36 2011 @@ -31,6 +31,7 @@ #include sys/types.h #include sys/stat.h +#include fcntl.h #include signal.h #include unistd.h } @@ -220,6 +221,17 @@ static void +silence_stdin(void) +{ +::close(STDIN_FILENO); +int fd = ::open(/dev/null, O_RDONLY); +if (fd == -1) +throw std::runtime_error(Could not open /dev/null); +INV(fd == STDIN_FILENO); +} + +static +void prepare_child(const atf::fs::path workdir) { const int ret = ::setpgid(::getpid(), 0); @@ -244,6 +256,8 @@ atf::env::set(__RUNNING_INSIDE_ATF_RUN, internal-yes-value); impl::change_directory(workdir); + +silence_stdin(); } static Index: src/external/bsd/atf/dist/atf-sh/atf-check_test.sh diff -u src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.3 src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.4 --- src/external/bsd/atf/dist/atf-sh/atf-check_test.sh:1.3 Thu Mar 31 16:44:17 2011 +++ src/external/bsd/atf/dist/atf-sh/atf-check_test.sh Wed Jun 15 08:48:36 2011 @@ -400,6 +400,17 @@ h_fail echo foo bar 12 -e not-match:foo } +atf_test_case stdin +stdin_head() +{ +atf_set descr Tests that stdin is preserved +} +stdin_body() +{ +echo hello | ${Atf_Check} -o match:hello cat || \ +atf_fail atf-check does not seem to respect stdin +} + atf_test_case invalid_umask invalid_umask_head() { @@ -444,6 +455,8 @@ atf_add_test_case eflag_multiple atf_add_test_case eflag_negated +atf_add_test_case stdin + atf_add_test_case invalid_umask }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Wed Jun 15 09:02:38 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_resource.c acpivar.h hpet_acpi.c Log Message: Do not entirely bypass the printfs during resource parsing, as many drivers rely on those for their autoconf(9) messages. Instead add a quiet option. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpi_resource.c cvs rdiff -u -r1.70 -r1.71 src/sys/dev/acpi/acpivar.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/hpet_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_resource.c diff -u src/sys/dev/acpi/acpi_resource.c:1.33 src/sys/dev/acpi/acpi_resource.c:1.34 --- src/sys/dev/acpi/acpi_resource.c:1.33 Wed Jun 15 08:04:49 2011 +++ src/sys/dev/acpi/acpi_resource.c Wed Jun 15 09:02:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $ */ +/* $NetBSD: acpi_resource.c,v 1.34 2011/06/15 09:02:38 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_resource.c,v 1.33 2011/06/15 08:04:49 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_resource.c,v 1.34 2011/06/15 09:02:38 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -618,6 +618,23 @@ .end_dep = acpi_res_parse_end_dep, }; +const struct acpi_resource_parse_ops acpi_resource_parse_ops_quiet = { + .init = acpi_res_parse_init, + .fini = NULL, + + .ioport = acpi_res_parse_ioport, + .iorange = acpi_res_parse_iorange, + + .memory = acpi_res_parse_memory, + .memrange = acpi_res_parse_memrange, + + .irq = acpi_res_parse_irq, + .drq = acpi_res_parse_drq, + + .start_dep = acpi_res_parse_start_dep, + .end_dep = acpi_res_parse_end_dep, +}; + static void acpi_res_parse_init(device_t dev, void *arg, void **contextp) { @@ -647,12 +664,10 @@ static void acpi_res_parse_fini(device_t dev, void *context) { -#ifdef ACPI_DEBUG struct acpi_resources *res = context; /* Print the resources we're using. */ acpi_resource_print(dev, res); -#endif } static void Index: src/sys/dev/acpi/acpivar.h diff -u src/sys/dev/acpi/acpivar.h:1.70 src/sys/dev/acpi/acpivar.h:1.71 --- src/sys/dev/acpi/acpivar.h:1.70 Tue Jun 14 13:59:23 2011 +++ src/sys/dev/acpi/acpivar.h Wed Jun 15 09:02:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpivar.h,v 1.70 2011/06/14 13:59:23 jruoho Exp $ */ +/* $NetBSD: acpivar.h,v 1.71 2011/06/15 09:02:38 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -291,6 +291,7 @@ extern int acpi_active; extern const struct acpi_resource_parse_ops acpi_resource_parse_ops_default; +extern const struct acpi_resource_parse_ops acpi_resource_parse_ops_quiet; int acpi_probe(void); void acpi_disable(void); Index: src/sys/dev/acpi/hpet_acpi.c diff -u src/sys/dev/acpi/hpet_acpi.c:1.10 src/sys/dev/acpi/hpet_acpi.c:1.11 --- src/sys/dev/acpi/hpet_acpi.c:1.10 Wed Jun 15 08:19:43 2011 +++ src/sys/dev/acpi/hpet_acpi.c Wed Jun 15 09:02:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hpet_acpi.c,v 1.10 2011/06/15 08:19:43 jruoho Exp $ */ +/* $NetBSD: hpet_acpi.c,v 1.11 2011/06/15 09:02:38 jruoho Exp $ */ /* * Copyright (c) 2011 Jukka Ruohonen @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hpet_acpi.c,v 1.10 2011/06/15 08:19:43 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: hpet_acpi.c,v 1.11 2011/06/15 09:02:38 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -210,7 +210,7 @@ ACPI_STATUS rv; rv = acpi_resource_parse(self, aa-aa_node-ad_handle, _CRS, - res, acpi_resource_parse_ops_default); + res, acpi_resource_parse_ops_quiet); if (ACPI_FAILURE(rv)) return 0;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jruoho Date: Wed Jun 15 09:09:48 UTC 2011 Modified Files: src/sys/dev/ic: hpet.c Log Message: Modularize hpet(4). Works nicely with the multiple bus locations. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/hpet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/hpet.c diff -u src/sys/dev/ic/hpet.c:1.10 src/sys/dev/ic/hpet.c:1.11 --- src/sys/dev/ic/hpet.c:1.10 Wed Feb 24 22:37:58 2010 +++ src/sys/dev/ic/hpet.c Wed Jun 15 09:09:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hpet.c,v 1.10 2010/02/24 22:37:58 dyoung Exp $ */ +/* $NetBSD: hpet.c,v 1.11 2011/06/15 09:09:48 jruoho Exp $ */ /* * Copyright (c) 2006 Nicolas Joly @@ -33,11 +33,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hpet.c,v 1.10 2010/02/24 22:37:58 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: hpet.c,v 1.11 2011/06/15 09:09:48 jruoho Exp $); #include sys/systm.h #include sys/device.h -#include sys/malloc.h +#include sys/module.h #include sys/time.h #include sys/timetc.h @@ -124,3 +124,39 @@ return true; } + +MODULE(MODULE_CLASS_DRIVER, hpet, NULL); + +#ifdef _MODULE +#include ioconf.c +#endif + +static int +hpet_modcmd(modcmd_t cmd, void *aux) +{ + int rv = 0; + + switch (cmd) { + + case MODULE_CMD_INIT: + +#ifdef _MODULE + rv = config_init_component(cfdriver_ioconf_hpet, + cfattach_ioconf_hpet, cfdata_ioconf_hpet); +#endif + break; + + case MODULE_CMD_FINI: + +#ifdef _MODULE + rv = config_fini_component(cfdriver_ioconf_hpet, + cfattach_ioconf_hpet, cfdata_ioconf_hpet); +#endif + break; + + default: + rv = ENOTTY; + } + + return rv; +}
CVS commit: src
Module Name:src Committed By: mrg Date: Wed Jun 15 09:46:00 UTC 2011 Modified Files: src: Makefile src/share/mk: bsd.own.mk src/sys: Makefile src/sys/modules: Makefile Added Files: src/distrib/sets/lists/modules: md.evbppc src/sys/modules/arch: Makefile archdirs.mk compatsubdir.mk src/sys/modules/arch/dirshack: Makefile src/sys/modules/arch/powerpc/powerpc-4xx: Makefile bsd.powerpc-4xx.mk src/sys/modules/arch/powerpc/powerpc-booke: Makefile bsd.powerpc-booke.mk Log Message: build evbppc modules in 3 different flavours: - oea (default) - ibm4xx - booke this, together with earlier machine_module[] work, should allow evbppc platforms to use modules. To generate a diff of this commit: cvs rdiff -u -r1.282 -r1.283 src/Makefile cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/modules/md.evbppc cvs rdiff -u -r1.669 -r1.670 src/share/mk/bsd.own.mk cvs rdiff -u -r1.76 -r1.77 src/sys/Makefile cvs rdiff -u -r1.72 -r1.73 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/Makefile \ src/sys/modules/arch/archdirs.mk src/sys/modules/arch/compatsubdir.mk cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/dirshack/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/powerpc/powerpc-4xx/Makefile \ src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/powerpc/powerpc-booke/Makefile \ src/sys/modules/arch/powerpc/powerpc-booke/bsd.powerpc-booke.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/Makefile diff -u src/Makefile:1.282 src/Makefile:1.283 --- src/Makefile:1.282 Sat Jan 29 16:56:26 2011 +++ src/Makefile Wed Jun 15 09:45:58 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.282 2011/01/29 16:56:26 jym Exp $ +# $NetBSD: Makefile,v 1.283 2011/06/15 09:45:58 mrg Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -239,7 +239,7 @@ .endif BUILDTARGETS+= do-lib-libc BUILDTARGETS+= do-lib -.if (${MACHINE} != evbppc) ${MKKMOD} != no +.if ${MKKMOD} != no BUILDTARGETS+= do-sys-modules .endif BUILDTARGETS+= do-sys-rump-dev-lib do-sys-rump-fs-lib Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.669 src/share/mk/bsd.own.mk:1.670 --- src/share/mk/bsd.own.mk:1.669 Fri May 27 17:06:54 2011 +++ src/share/mk/bsd.own.mk Wed Jun 15 09:45:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.669 2011/05/27 17:06:54 drochner Exp $ +# $NetBSD: bsd.own.mk,v 1.670 2011/06/15 09:45:59 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -725,6 +725,14 @@ MKCOMPAT:= no .endif +#.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386 || \ + +.if ${MACHINE} == evbppc +MKCOMPATMODULES?= yes +.else +MKCOMPATMODULES:= no +.endif + # # Default mips64 to softfloat now. # emips is always softfloat. @@ -783,9 +791,9 @@ # # Exceptions to the above: # -.if ${MACHINE} == evbppc -MKKMOD= no -.endif +#.if ${MACHINE} == evbppc +#MKKMOD= no +#.endif # # MK* options which default to no. Note that MKZFS has a different Index: src/sys/Makefile diff -u src/sys/Makefile:1.76 src/sys/Makefile:1.77 --- src/sys/Makefile:1.76 Sat Jun 26 14:24:27 2010 +++ src/sys/Makefile Wed Jun 15 09:45:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.76 2010/06/26 14:24:27 kefren Exp $ +# $NetBSD: Makefile,v 1.77 2011/06/15 09:45:59 mrg Exp $ SUBDIR= altq arch compat dev fs miscfs \ net net80211 netatalk netbt netipsec netinet netinet6 \ @@ -6,11 +6,11 @@ nfs opencrypto sys ufs uvm # interrupt implementation depends on the kernel within the port -.if (${MACHINE} != evbppc) +#.if (${MACHINE} != evbppc) .if make(obj) || make(cleandir) SUBDIR+=modules .endif -.endif +#.endif .if make(includes) || make(obj) || make(cleandir) SUBDIR+= rump Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.72 src/sys/modules/Makefile:1.73 --- src/sys/modules/Makefile:1.72 Wed Jun 15 08:19:43 2011 +++ src/sys/modules/Makefile Wed Jun 15 09:45:59 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.72 2011/06/15 08:19:43 jruoho Exp $ +# $NetBSD: Makefile,v 1.73 2011/06/15 09:45:59 mrg Exp $ .include bsd.own.mk @@ -190,4 +190,8 @@ SUBDIR+= zfs .endif +.if (${MKCOMPATMODULES} != no) +SUBDIR+= arch +.endif + .include bsd.subdir.mk Added files: Index: src/distrib/sets/lists/modules/md.evbppc diff -u /dev/null src/distrib/sets/lists/modules/md.evbppc:1.1 --- /dev/null Wed Jun 15 09:46:00 2011 +++ src/distrib/sets/lists/modules/md.evbppc Wed Jun 15 09:45:59 2011 @@ -0,0 +1,283 @@ +# $NetBSD: md.evbppc,v 1.1 2011/06/15 09:45:59 mrg Exp $ +./stand/powerpc-4xx base-kernel-modules kmod +./stand/powerpc-4xx/@OSRELEASE@ base-kernel-modules kmod +./stand/powerpc-4xx/@OSRELEASE@/modules base-kernel-modules kmod +./stand/powerpc-4xx/@OSRELEASE@/modules/accf_dataready
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Wed Jun 15 10:02:25 UTC 2011 Modified Files: src/doc: CHANGES Log Message: note about evbppc modules. To generate a diff of this commit: cvs rdiff -u -r1.1563 -r1.1564 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1563 src/doc/CHANGES:1.1564 --- src/doc/CHANGES:1.1563 Tue Jun 14 15:29:11 2011 +++ src/doc/CHANGES Wed Jun 15 10:02:24 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1563 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1564 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1034,3 +1034,5 @@ powerpc: Switch to using direct-mapped uareas (pcb + kernel stacks). [matt 20110613] atf(7): Import 0.14. [jmmv 20110614] + evbppc: Enable builds for OEA, ibm4xx and Book-E modules. + [mrg 20110615]
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: manu Date: Wed Jun 15 12:54:32 UTC 2011 Modified Files: src/sys/ufs/ufs: ufs_extattr.c Log Message: Improve UFS1 extended attributes usability - autocreate attribute backing file for new attributes - autoload attributes when issuing extattrctl start - when autoloading attributes, do not display garbage warning when looking up entries that got ENOENT To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/ufs/ufs/ufs_extattr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ufs/ufs_extattr.c diff -u src/sys/ufs/ufs/ufs_extattr.c:1.30 src/sys/ufs/ufs/ufs_extattr.c:1.31 --- src/sys/ufs/ufs/ufs_extattr.c:1.30 Sun Jun 12 03:36:02 2011 +++ src/sys/ufs/ufs/ufs_extattr.c Wed Jun 15 12:54:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_extattr.c,v 1.30 2011/06/12 03:36:02 rmind Exp $ */ +/* $NetBSD: ufs_extattr.c,v 1.31 2011/06/15 12:54:32 manu Exp $ */ /*- * Copyright (c) 1999-2002 Robert N. M. Watson @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.30 2011/06/12 03:36:02 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.31 2011/06/15 12:54:32 manu Exp $); #ifdef _KERNEL_OPT #include opt_ffs.h @@ -99,6 +99,8 @@ struct lwp *l); static int ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, kauth_cred_t cred, struct lwp *l); +static struct ufs_extattr_list_entry *ufs_extattr_find_attr(struct ufsmount *, + int, const char *); /* * Per-FS attribute lock protecting attribute operations. @@ -147,6 +149,142 @@ return (1); } +#ifdef UFS_EXTATTR_AUTOCREATE +/* + * Autocreate an attribute storage + */ +static struct ufs_extattr_list_entry * +ufs_extattr_autocreate_attr(struct vnode *vp, int attrnamespace, +const char *attrname, struct lwp *l) +{ + struct mount *mp = vp-v_mount; + struct ufsmount *ump = VFSTOUFS(mp); + struct vnode *backing_vp; + struct nameidata nd; + struct pathbuf *pb; + char *path; + struct ufs_extattr_fileheader uef; + struct ufs_extattr_list_entry *uele; + int error; + + path = PNBUF_GET(); + + /* + * We only support system and user namespace autocreation + */ + switch (attrnamespace) { + case EXTATTR_NAMESPACE_SYSTEM: + (void)snprintf(path, PATH_MAX, %s/%s/%s/%s, + mp-mnt_stat.f_mntonname, + UFS_EXTATTR_FSROOTSUBDIR, + UFS_EXTATTR_SUBDIR_SYSTEM, + attrname); + break; + case EXTATTR_NAMESPACE_USER: + (void)snprintf(path, PATH_MAX, %s/%s/%s/%s, + mp-mnt_stat.f_mntonname, + UFS_EXTATTR_FSROOTSUBDIR, + UFS_EXTATTR_SUBDIR_USER, + attrname); + break; + default: + PNBUF_PUT(path); + return NULL; + break; + } + + /* + * When setting attribute on the root vnode, we get it + * already locked, and vn_open/namei/VFS_ROOT will try to + * look it, causing a panic. Unlock it first. + */ + if (vp-v_vflag VV_ROOT) { + KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE); + VOP_UNLOCK(vp); + } + KASSERT(VOP_ISLOCKED(vp) == 0); + + pb = pathbuf_create(path); + NDINIT(nd, CREATE, LOCKPARENT, pb); + + error = vn_open(nd, O_CREAT|O_RDWR, 0600); + + /* + * Reacquire the lock on the vnode if it was root. + */ + KASSERT(VOP_ISLOCKED(vp) == 0); + if (vp-v_vflag VV_ROOT) + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE); + + if (error != 0) { + pathbuf_destroy(pb); + PNBUF_PUT(path); + return NULL; + } + + KASSERT(nd.ni_vp != NULL); + KASSERT(VOP_ISLOCKED(nd.ni_vp) == LK_EXCLUSIVE); + KASSERT(VOP_ISLOCKED(nd.ni_dvp) == 0); + + /* + * backing_vp is the backing store. + */ + backing_vp = nd.ni_vp; + pathbuf_destroy(pb); + PNBUF_PUT(path); + + uef.uef_magic = UFS_EXTATTR_MAGIC; + uef.uef_version = UFS_EXTATTR_VERSION; + uef.uef_size = UFS_EXTATTR_AUTOCREATE; + + error = vn_rdwr(UIO_WRITE, backing_vp, uef, sizeof(uef), 0, + UIO_SYSSPACE, IO_NODELOCKED|IO_APPEND, + l-l_cred, NULL, l); + + VOP_UNLOCK(backing_vp); + + if (error != 0) { + printf(%s: write uef header failed for %s, error = %d\n, + __func__, attrname, error); + vn_close(backing_vp, FREAD|FWRITE, l-l_cred); + return NULL; + } + + /* + * ufs_extattr_enable_with_open increases the vnode reference + * count. Not sure why, but do the same here. + */ + vref(vp); + + /* + * Now enable attribute. + */ + error = ufs_extattr_enable(ump,attrnamespace, attrname, backing_vp, l); + KASSERT(VOP_ISLOCKED(backing_vp) == 0); + + if (error != 0) { + printf(%s: enable %s failed, error %d\n, + __func__, attrname, error); + vn_close(backing_vp, FREAD|FWRITE, l-l_cred); + return NULL; + } + + uele = ufs_extattr_find_attr(ump, attrnamespace, attrname); + if (uele == NULL) { + printf(%s: atttribute %s created but not found!\n, + __func__, attrname); + vn_close(backing_vp, FREAD|FWRITE, l-l_cred); + return NULL; + } + + printf(%s: EA
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Wed Jun 15 13:24:48 UTC 2011 Modified Files: src/usr.sbin/ldpd: socketops.c Log Message: simplify the rtsock read sequence apply a little bit of KNF To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ldpd/socketops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/socketops.c diff -u src/usr.sbin/ldpd/socketops.c:1.7 src/usr.sbin/ldpd/socketops.c:1.8 --- src/usr.sbin/ldpd/socketops.c:1.7 Tue Jun 14 11:28:51 2011 +++ src/usr.sbin/ldpd/socketops.c Wed Jun 15 13:24:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: socketops.c,v 1.7 2011/06/14 11:28:51 kefren Exp $ */ +/* $NetBSD: socketops.c,v 1.8 2011/06/15 13:24:48 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -614,37 +614,30 @@ if (pollsum = MAX_POLL_FDS) { fatalp(Too many sockets. Increase MAX_POLL_FDS\n); return LDP_E_TOO_MANY_FDS; - } + } if (poll(pfd, pollsum, INFTIM) 0) { if (errno != EINTR) fatalp(poll: %s, strerror(errno)); continue; - } + } for (i = 0; i pollsum; i++) { if ((pfd[i].revents POLLRDNORM) || (pfd[i].revents POLLIN)) { -if(pfd[i].fd == ls) { +if(pfd[i].fd == ls) new_peer_connection(); -} else if (pfd[i].fd == route_socket) { +else if (pfd[i].fd == route_socket) { struct rt_msg xbuf; - int l, to_read; + int l; do { - l = recv(route_socket, xbuf, - sizeof(struct rt_msg), MSG_PEEK); + l = read(route_socket, xbuf, + sizeof(xbuf)); } while ((l == -1) (errno == EINTR)); if (l == -1) break; - to_read = l; - l = 0; - do { - l += recv(route_socket, xbuf, - to_read - l, MSG_WAITALL); - } while (l != to_read); - - check_route(xbuf, to_read); + check_route(xbuf, l); } else if (pfd[i].fd == hello_socket) { /* Receiving hello socket */
CVS commit: src/etc/rc.d
Module Name:src Committed By: hans Date: Wed Jun 15 13:42:46 UTC 2011 Modified Files: src/etc/rc.d: fccache.in Log Message: remove -q argument, it is useless with Xorg and fails with XFree To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/fccache.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/fccache.in diff -u src/etc/rc.d/fccache.in:1.1 src/etc/rc.d/fccache.in:1.2 --- src/etc/rc.d/fccache.in:1.1 Fri Feb 18 00:42:20 2011 +++ src/etc/rc.d/fccache.in Wed Jun 15 13:42:46 2011 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: fccache.in,v 1.1 2011/02/18 00:42:20 jmcneill Exp $ +# $NetBSD: fccache.in,v 1.2 2011/06/15 13:42:46 hans Exp $ # # PROVIDE: fccache @@ -19,7 +19,7 @@ { if [ -x ${command} ]; then echo -n Updating fontconfig cache: - ${command} -q + ${command} echo done fi }
CVS commit: src/distrib/emips/miniroot
Module Name:src Committed By: tsutsui Date: Wed Jun 15 14:47:43 UTC 2011 Modified Files: src/distrib/emips/miniroot: Makefile.inc Log Message: Remove more ecoff leftover. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/emips/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/emips/miniroot/Makefile.inc diff -u src/distrib/emips/miniroot/Makefile.inc:1.1 src/distrib/emips/miniroot/Makefile.inc:1.2 --- src/distrib/emips/miniroot/Makefile.inc:1.1 Wed Jan 26 01:18:44 2011 +++ src/distrib/emips/miniroot/Makefile.inc Wed Jun 15 14:47:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2011/01/26 01:18:44 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.2 2011/06/15 14:47:43 tsutsui Exp $ DBG= -Os @@ -11,8 +11,6 @@ IMAGEDEPENDS+= ${ARCHDIR}/dot.profile \ ${DESTDIR}/.profile ${DESTDIR}/boot.emips \ ${DESTDIR}/etc/disktab \ - ${KERNOBJDIR}/GENERIC/netbsd \ - ${KERNOBJDIR}/GENERIC/netbsd.ecoff \ - ${KERNOBJDIR}/INSTALL/nfsnetbsd.ecoff + ${KERNOBJDIR}/GENERIC/netbsd IMAGEPOSTBUILD= ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} ${DESTDIR}/usr/mdec/bootxx_ffs
CVS commit: src/sys/arch/acorn26/acorn26
Module Name:src Committed By: tsutsui Date: Wed Jun 15 15:03:51 UTC 2011 Modified Files: src/sys/arch/acorn26/acorn26: machdep.c Log Message: Put proper casts to address range checks. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/acorn26/acorn26/machdep.c 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/acorn26/acorn26/machdep.c diff -u src/sys/arch/acorn26/acorn26/machdep.c:1.34 src/sys/arch/acorn26/acorn26/machdep.c:1.35 --- src/sys/arch/acorn26/acorn26/machdep.c:1.34 Sun Jun 12 03:35:36 2011 +++ src/sys/arch/acorn26/acorn26/machdep.c Wed Jun 15 15:03:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.34 2011/06/12 03:35:36 rmind Exp $ */ +/* $NetBSD: machdep.c,v 1.35 2011/06/15 15:03:51 tsutsui Exp $ */ /*- * Copyright (c) 1998 Ben Harris @@ -32,7 +32,7 @@ #include sys/param.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.34 2011/06/12 03:35:36 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.35 2011/06/15 15:03:51 tsutsui Exp $); #include sys/buf.h #include sys/kernel.h @@ -217,7 +217,7 @@ mm_md_physacc(paddr_t pa, vm_prot_t prot) { - return (pa MEMC_PHYS_BASE + ptoa(physmem)) ? EFAULT : 0; + return (pa (paddr_t)MEMC_PHYS_BASE + ptoa(physmem)) ? EFAULT : 0; } int @@ -225,6 +225,7 @@ { const vaddr_t v = (vaddr_t)ptr; - *handled = (v = MEMC_PHYS_BASE v MEMC_PHYS_BASE + ptoa(physmem)); + *handled = (v = (vaddr_t)MEMC_PHYS_BASE + v (vaddr_t)MEMC_PHYS_BASE + ptoa(physmem)); return 0; }
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Wed Jun 15 15:18:20 UTC 2011 Modified Files: src/sys/arch/evbppc/mpc85xx: machdep.c src/sys/arch/powerpc/include: cpu.h src/sys/arch/powerpc/include/booke: cpuvar.h src/sys/arch/powerpc/powerpc: fixup.c Log Message: Move booke_fixup_stubs() to fixup.c and rename it to cpu_fixup_stubs(). This makes it easier for other PPC variants to use it. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/mpc85xx/machdep.c cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/include/cpu.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/cpuvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/powerpc/fixup.c 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/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.10 src/sys/arch/evbppc/mpc85xx/machdep.c:1.11 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.10 Tue Jun 14 05:32:59 2011 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Wed Jun 15 15:18:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.10 2011/06/14 05:32:59 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.11 2011/06/15 15:18:20 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -912,7 +912,7 @@ * Let's take all the indirect calls via our stubs and patch * them to be direct calls. */ - booke_fixup_stubs(); + cpu_fixup_stubs(); #if 0 /* * As a debug measure we can change the TLB entry that maps all of Index: src/sys/arch/powerpc/include/cpu.h diff -u src/sys/arch/powerpc/include/cpu.h:1.80 src/sys/arch/powerpc/include/cpu.h:1.81 --- src/sys/arch/powerpc/include/cpu.h:1.80 Tue Jun 14 22:36:12 2011 +++ src/sys/arch/powerpc/include/cpu.h Wed Jun 15 15:18:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.80 2011/06/14 22:36:12 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.81 2011/06/15 15:18:20 matt Exp $ */ /* * Copyright (C) 1999 Wolfgang Solfrank. @@ -404,6 +404,8 @@ void cpu_need_proftick(struct lwp *); #define cpu_did_resched(l) ((l)-l_md.md_astpending = 0) +void cpu_fixup_stubs(void); + #if !defined(PPC_IBM4XX) !defined(PPC_BOOKE) void oea_init(void (*)(void)); void oea_startup(const char *); Index: src/sys/arch/powerpc/include/booke/cpuvar.h diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.7 src/sys/arch/powerpc/include/booke/cpuvar.h:1.8 --- src/sys/arch/powerpc/include/booke/cpuvar.h:1.7 Tue Jun 14 22:36:12 2011 +++ src/sys/arch/powerpc/include/booke/cpuvar.h Wed Jun 15 15:18:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.7 2011/06/14 22:36:12 matt Exp $ */ +/* $NetBSD: cpuvar.h,v 1.8 2011/06/15 15:18:20 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -161,7 +161,6 @@ struct trapframe; void booke_sstep(struct trapframe *); -void booke_fixup_stubs(void); void booke_cpu_startup(const char *); /* model name */ struct powerpc_bus_dma_tag booke_bus_dma_tag; Index: src/sys/arch/powerpc/powerpc/fixup.c diff -u src/sys/arch/powerpc/powerpc/fixup.c:1.3 src/sys/arch/powerpc/powerpc/fixup.c:1.4 --- src/sys/arch/powerpc/powerpc/fixup.c:1.3 Sat Feb 12 18:23:10 2011 +++ src/sys/arch/powerpc/powerpc/fixup.c Wed Jun 15 15:18:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $ */ +/* $NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $); #include sys/param.h #include sys/types.h @@ -209,3 +209,12 @@ cycles); #endif } + +void +cpu_fixup_stubs(void) +{ + extern uint32_t _ftext[]; + extern uint32_t _etext[]; + + powerpc_fixup_stubs(_ftext, _etext, NULL, NULL); +}
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Wed Jun 15 15:22:56 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: booke_machdep.c booke_stubs.c src/sys/arch/powerpc/conf: files.powerpc Added Files: src/sys/arch/powerpc/powerpc: intr_stubs.c Log Message: Move the interrupt stub from booke_stubs.c into its own intr_stubs.c. Move the null intrsw (used in startup) to intr_stubs.c as well. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/booke/booke_machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/booke_stubs.c cvs rdiff -u -r1.79 -r1.80 src/sys/arch/powerpc/conf/files.powerpc cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/powerpc/intr_stubs.c 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/powerpc/booke/booke_machdep.c diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.7 src/sys/arch/powerpc/booke/booke_machdep.c:1.8 --- src/sys/arch/powerpc/booke/booke_machdep.c:1.7 Wed Jun 15 05:50:49 2011 +++ src/sys/arch/powerpc/booke/booke_machdep.c Wed Jun 15 15:22:56 2011 @@ -95,26 +95,6 @@ return a; } -static int -null_splraise(int ipl) -{ - int cpl = curcpu()-ci_cpl; - curcpu()-ci_cpl = ipl; - return cpl; -} - -static void -null_splx(int ipl) -{ - curcpu()-ci_cpl = ipl; -} - -static const struct intrsw null_intrsw = { - .intrsw_splraise = null_splraise, - .intrsw_splx = null_splx, -}; - -const struct intrsw *powerpc_intrsw = null_intrsw; struct cpu_md_ops cpu_md_ops; struct cpu_softc cpu_softc[] = { Index: src/sys/arch/powerpc/booke/booke_stubs.c diff -u src/sys/arch/powerpc/booke/booke_stubs.c:1.5 src/sys/arch/powerpc/booke/booke_stubs.c:1.6 --- src/sys/arch/powerpc/booke/booke_stubs.c:1.5 Sun Jun 5 16:52:24 2011 +++ src/sys/arch/powerpc/booke/booke_stubs.c Wed Jun 15 15:22:56 2011 @@ -33,16 +33,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#define __INTR_PRIVATE -#define __INTR_NOINLINE - #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.5 2011/06/05 16:52:24 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: booke_stubs.c,v 1.6 2011/06/15 15:22:56 matt Exp $); #include sys/param.h #include sys/cpu.h -#include sys/intr.h #include powerpc/instr.h #include powerpc/booke/cpuvar.h @@ -169,114 +165,3 @@ { (*cpu_md_ops.md_tlb_ops-md_tlb_walk)(ctx, func); } - -void *intr_establish(int, int, int, int (*)(void *), void *) __stub; - -void * -intr_establish(int irq, int ipl, int ist, int (*func)(void *), void *arg) -{ - return (*powerpc_intrsw-intrsw_establish)(irq, ipl, ist, func, arg); -} - -void intr_disestablish(void *) __stub; - -void -intr_disestablish(void *ih) -{ - (*powerpc_intrsw-intrsw_disestablish)(ih); -} - -const char *intr_string(int, int) __stub; - -const char * -intr_string(int irq, int ist) -{ - return (*powerpc_intrsw-intrsw_string)(irq, ist); -} - -void spl0(void) __stub; - -void -spl0(void) -{ - (*powerpc_intrsw-intrsw_spl0)(); -} - -int splraise(int) __stub; - -int -splraise(int ipl) -{ - return (*powerpc_intrsw-intrsw_splraise)(ipl); -} - -#if 0 -int splhigh(void) __stub; -#endif - -/* - * This is called by softint_cleanup and can't be a stub but it can call - * a stub. - */ -int -splhigh(void) -{ - return splraise(IPL_HIGH); -} - -void splx(int) __stub; - -void -splx(int ipl) -{ - return (*powerpc_intrsw-intrsw_splx)(ipl); -} - -void softint_init_md(struct lwp *, u_int, uintptr_t *) __stub; - -void -softint_init_md(struct lwp *l, u_int level, uintptr_t *machdep_p) -{ - (*powerpc_intrsw-intrsw_softint_init_md)(l, level, machdep_p); -} - -void softint_trigger(uintptr_t) __stub; - -void -softint_trigger(uintptr_t machdep) -{ - (*powerpc_intrsw-intrsw_softint_trigger)(machdep); -} - -void intr_cpu_attach(struct cpu_info *) __stub; - -void -intr_cpu_attach(struct cpu_info *ci) -{ - (*powerpc_intrsw-intrsw_cpu_attach)(ci); -} - -void intr_cpu_hatch(struct cpu_info *) __stub; - -void -intr_cpu_hatch(struct cpu_info *ci) -{ - (*powerpc_intrsw-intrsw_cpu_hatch)(ci); -} - -void intr_init(void) __stub; - -void -intr_init(void) -{ - (*powerpc_intrsw-intrsw_init)(); -} - -void -booke_fixup_stubs(void) -{ - extern uint32_t _ftext[]; - extern uint32_t _etext[]; - - powerpc_fixup_stubs(_ftext, _etext, NULL, NULL); -} Index: src/sys/arch/powerpc/conf/files.powerpc diff -u src/sys/arch/powerpc/conf/files.powerpc:1.79 src/sys/arch/powerpc/conf/files.powerpc:1.80 --- src/sys/arch/powerpc/conf/files.powerpc:1.79 Tue Jun 14 22:36:12 2011 +++ src/sys/arch/powerpc/conf/files.powerpc Wed Jun 15 15:22:56 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.powerpc,v 1.79 2011/06/14 22:36:12 matt Exp $ +# $NetBSD: files.powerpc,v 1.80 2011/06/15 15:22:56 matt Exp $ defflag opt_altivec.h ALTIVEC K_ALTIVEC PPC_HAVE_SPE defflag opt_openpic.h OPENPIC OPENPIC_SERIAL_MODE OPENPIC_DISTRIBUTE @@ -36,6 +36,7 @@ file arch/powerpc/powerpc/db_interface.c ddb | kgdb file arch/powerpc/powerpc/db_trace.c ddb file
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: ober Date: Wed Jun 15 17:17:38 UTC 2011 Modified Files: src/sys/arch/evbarm/conf: BEAGLEBOARD Log Message: Revert symspace back to 3 megs so that beagleboards boots again. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/BEAGLEBOARD 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/evbarm/conf/BEAGLEBOARD diff -u src/sys/arch/evbarm/conf/BEAGLEBOARD:1.19 src/sys/arch/evbarm/conf/BEAGLEBOARD:1.20 --- src/sys/arch/evbarm/conf/BEAGLEBOARD:1.19 Tue Apr 12 18:09:11 2011 +++ src/sys/arch/evbarm/conf/BEAGLEBOARD Wed Jun 15 17:17:37 2011 @@ -1,5 +1,5 @@ # -# $NetBSD: BEAGLEBOARD,v 1.19 2011/04/12 18:09:11 ahoka Exp $ +# $NetBSD: BEAGLEBOARD,v 1.20 2011/06/15 17:17:37 ober Exp $ # # BEAGLEBOARD -- TI OMAP 3530 Eval Board Kernel # @@ -142,7 +142,7 @@ options DDB_HISTORY_SIZE=100 # Enable history editing in DDB #options KGDB makeoptions DEBUG=-g # compile full symbol table -options SYMTAB_SPACE=53 +options SYMTAB_SPACE=30 ## USB Debugging options options USB_DEBUG
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Wed Jun 15 17:47:45 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: genassym.cf trap_subr.S src/sys/arch/powerpc/powerpc: db_trace.c intr_stubs.c Log Message: Now that the generic fixup code exists, there's no to patch the interrupts directly since the stub fixup will do that automatically. Just need to add stubs for the interrupt vectors and they get fixed automagically. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/genassym.cf \ src/sys/arch/powerpc/booke/trap_subr.S cvs rdiff -u -r1.54 -r1.55 src/sys/arch/powerpc/powerpc/db_trace.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/powerpc/intr_stubs.c 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/powerpc/booke/genassym.cf diff -u src/sys/arch/powerpc/booke/genassym.cf:1.3 src/sys/arch/powerpc/booke/genassym.cf:1.4 --- src/sys/arch/powerpc/booke/genassym.cf:1.3 Sun Jun 5 16:52:24 2011 +++ src/sys/arch/powerpc/booke/genassym.cf Wed Jun 15 17:47:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.3 2011/06/05 16:52:24 matt Exp $ +# $NetBSD: genassym.cf,v 1.4 2011/06/15 17:47:45 matt Exp $ #- # Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -236,12 +236,6 @@ define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS endif -define INTRSW_CRITINTR offsetof(struct intrsw, intrsw_critintr) -define INTRSW_DECRINTR offsetof(struct intrsw, intrsw_decrintr) -define INTRSW_FITINTR offsetof(struct intrsw, intrsw_fitintr) -define INTRSW_WDOGINTR offsetof(struct intrsw, intrsw_wdogintr) -define INTRSW_EXTINTR offsetof(struct intrsw, intrsw_extintr) - define IPL_HIGH IPL_HIGH define IPL_SCHED IPL_SCHED define IPL_VM IPL_VM Index: src/sys/arch/powerpc/booke/trap_subr.S diff -u src/sys/arch/powerpc/booke/trap_subr.S:1.3 src/sys/arch/powerpc/booke/trap_subr.S:1.4 --- src/sys/arch/powerpc/booke/trap_subr.S:1.3 Sun Jun 5 16:52:24 2011 +++ src/sys/arch/powerpc/booke/trap_subr.S Wed Jun 15 17:47:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap_subr.S,v 1.3 2011/06/05 16:52:24 matt Exp $ */ +/* $NetBSD: trap_subr.S,v 1.4 2011/06/15 17:47:45 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,13 +34,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -RCSID($NetBSD: trap_subr.S,v 1.3 2011/06/05 16:52:24 matt Exp $) - - .globl _C_LABEL(critintr_call) - .globl _C_LABEL(extintr_call) - .globl _C_LABEL(decrintr_call) - .globl _C_LABEL(fitintr_call) - .globl _C_LABEL(wdogintr_call) +RCSID($NetBSD: trap_subr.S,v 1.4 2011/06/15 17:47:45 matt Exp $) .globl _C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall) @@ -348,8 +342,7 @@ /* MSR[ME] is unchanged, all others cleared */ FRAME_CRIT_PROLOGUE /* save SP r26-31 CR LR XER */ FRAME_CRIT_ENTER(EXC_CII) -_C_LABEL(critintr_call): - bl _C_LABEL(critintr_call) /* critintr(tf) */ + bl _C_LABEL(intr_critintr) /* critintr(tf) */ FRAME_CRIT_EXIT .p2align 4 @@ -412,8 +405,7 @@ FRAME_INTR_PROLOGUE /* save SP r25-31 CR LR XER */ FRAME_INTR_ENTER(EXC_EXI) -_C_LABEL(extintr_call): - bl _C_LABEL(extintr_call) + bl _C_LABEL(intr_extintr) _C_LABEL(intrcall): GET_CPUINFO(%r6) /* get curcpu() */ lwz %r5, FRAME_SRR1(%r1) /* get saved SRR1 */ @@ -500,8 +492,7 @@ FRAME_INTR_PROLOGUE /* save SP r25-31 CR LR XER */ FRAME_INTR_ENTER(EXC_DECR) -_C_LABEL(decrintr_call): - bl _C_LABEL(decrintr_call) + bl _C_LABEL(intr_decrintr) b intrexit .p2align 4 @@ -510,8 +501,7 @@ FRAME_PROLOGUE/* save SP r25-31 CR LR XER */ FRAME_INTR_ENTER(EXC_FIT) -_C_LABEL(fitintr_call): - bl _C_LABEL(fitintr_call) + bl _C_LABEL(intr_fitintr) b intrexit .data @@ -528,8 +518,7 @@ stb %r11,-65(%r11) #endif -_C_LABEL(wdogintr_call): - bl _C_LABEL(wdogintr_call) + bl _C_LABEL(intr_wdogintr) FRAME_CRIT_EXIT .p2align 4 @@ -863,51 +852,6 @@ cmplwi %r5,0 bnelr /* return if non-0 (non-primary) */ - lis %r5,_C_LABEL(critintr_call)@ha - lwzu %r6,_C_LABEL(critintr_call)@l(%r5) - lwz %r7,INTRSW_CRITINTR(%r3) - sub %r8,%r7,%r5 - add %r0,%r8,%r6 - stw %r0,0(%r5) - dcbf 0,%r5 - icbi 0,%r5 - - lis %r5,_C_LABEL(decrintr_call)@ha - lwzu %r6,_C_LABEL(decrintr_call)@l(%r5) - lwz %r7,INTRSW_DECRINTR(%r3) - sub %r8,%r7,%r5 - add %r0,%r8,%r6 - stw %r0,0(%r5) - dcbf 0,%r5 - icbi 0,%r5 - - lis %r5,_C_LABEL(fitintr_call)@ha - lwzu %r6,_C_LABEL(fitintr_call)@l(%r5) - lwz %r7,INTRSW_FITINTR(%r3) - sub %r8,%r7,%r5 - add %r0,%r8,%r6 - stw %r0,0(%r5) - dcbf 0,%r5 - icbi 0,%r5 - - lis %r5,_C_LABEL(wdogintr_call)@ha - lwzu %r6,_C_LABEL(wdogintr_call)@l(%r5) - lwz %r7,INTRSW_WDOGINTR(%r3) - sub %r8,%r7,%r5 - add %r0,%r8,%r6 - stw %r0,0(%r5) - dcbf 0,%r5 - icbi 0,%r5 - - lis %r5,_C_LABEL(extintr_call)@ha - lwzu %r6,_C_LABEL(extintr_call)@l(%r5) - lwz %r7,INTRSW_EXTINTR(%r3) - sub %r8,%r7,%r5 - add %r0,%r8,%r6 - stw %r0,0(%r5) - dcbf 0,%r5 -
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Wed Jun 15 18:16:48 UTC 2011 Modified Files: src/usr.sbin/ldpd: tlv_stack.c Log Message: we need to add mapping even if there is no route for the prefix To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/ldpd/tlv_stack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/tlv_stack.c diff -u src/usr.sbin/ldpd/tlv_stack.c:1.3 src/usr.sbin/ldpd/tlv_stack.c:1.4 --- src/usr.sbin/ldpd/tlv_stack.c:1.3 Thu Feb 10 12:44:41 2011 +++ src/usr.sbin/ldpd/tlv_stack.c Wed Jun 15 18:16:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tlv_stack.c,v 1.3 2011/02/10 12:44:41 kefren Exp $ */ +/* $NetBSD: tlv_stack.c,v 1.4 2011/06/15 18:16:48 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -110,14 +110,13 @@ debugp(Prefix/Host add: %s/%d\n, inet_ntoa(inatmp), pref-prelen); - /* don't bother if we don't have a label/route */ - if (label_get_by_prefix(inatmp, pref-prelen) == NULL) -break; - ldp_peer_add_mapping(p, inatmp, pref-prelen, ntohl(l-label)); - mpls_add_label(p, NULL, inatmp, pref-prelen, - ntohl(l-label), 1); + + /* Try to change RIB only if label is installed */ + if (label_get_by_prefix(inatmp, pref-prelen) != NULL) +mpls_add_label(p, NULL, inatmp, pref-prelen, +ntohl(l-label), 1); break; case FEC_WILDCARD: fatalp(LDP: Wildcard add from peer %s\n,
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Wed Jun 15 19:46:11 UTC 2011 Modified Files: src/sys/uvm: uvm_page.c Log Message: uvm_pagealloc_strat: fix diagnostic assert. Reported by drochner@. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/uvm/uvm_page.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.174 src/sys/uvm/uvm_page.c:1.175 --- src/sys/uvm/uvm_page.c:1.174 Sun Jun 12 03:36:03 2011 +++ src/sys/uvm/uvm_page.c Wed Jun 15 19:46:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.174 2011/06/12 03:36:03 rmind Exp $ */ +/* $NetBSD: uvm_page.c,v 1.175 2011/06/15 19:46:11 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.174 2011/06/12 03:36:03 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.175 2011/06/15 19:46:11 rmind Exp $); #include opt_ddb.h #include opt_uvmhist.h @@ -1192,7 +1192,8 @@ KASSERT(anon == NULL || (flags UVM_FLAG_COLORMATCH) || off == 0); KASSERT(off == trunc_page(off)); KASSERT(obj == NULL || mutex_owned(obj-vmobjlock)); - KASSERT(anon == NULL || mutex_owned(anon-an_lock)); + KASSERT(anon == NULL || anon-an_lock == NULL || + mutex_owned(anon-an_lock)); mutex_spin_enter(uvm_fpageqlock);
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: rmind Date: Wed Jun 15 19:51:50 UTC 2011 Modified Files: src/sys/arch/xen/xen: privcmd.c xengnt.c Log Message: - privpgop_fault: call pmap_update() before uvmfault_unlockall(). - privcmd_ioctl, xengnt_more_entries: add missing pmap_update(). To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/xen/privcmd.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/xen/xen/xengnt.c 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/xen/xen/privcmd.c diff -u src/sys/arch/xen/xen/privcmd.c:1.42 src/sys/arch/xen/xen/privcmd.c:1.43 --- src/sys/arch/xen/xen/privcmd.c:1.42 Sun Jun 12 03:35:50 2011 +++ src/sys/arch/xen/xen/privcmd.c Wed Jun 15 19:51:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: privcmd.c,v 1.42 2011/06/12 03:35:50 rmind Exp $ */ +/* $NetBSD: privcmd.c,v 1.43 2011/06/15 19:51:50 rmind Exp $ */ /*- * Copyright (c) 2004 Christian Limpach. @@ -27,7 +27,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.42 2011/06/12 03:35:50 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.43 2011/06/15 19:51:50 rmind Exp $); #include sys/param.h #include sys/systm.h @@ -416,6 +416,8 @@ va = va0 + (i * PAGE_SIZE); error = copyin(pmb-arr[i], mfn, sizeof(mfn)); if (error != 0) { +/* XXX: mappings */ +pmap_update(pmap_kernel()); kmem_free(maddr, sizeof(paddr_t) * pmb-num); uvm_km_free(kernel_map, trymap, PAGE_SIZE, UVM_KMF_VAONLY); @@ -433,6 +435,8 @@ maddr[i] = ma; } } + pmap_update(pmap_kernel()); + error = privcmd_map_obj(vmm, va0, maddr, pmb-num, pmb-dom); uvm_km_free(kernel_map, trymap, PAGE_SIZE, UVM_KMF_VAONLY); @@ -518,8 +522,9 @@ vaddr + PAGE_SIZE); } } - uvmfault_unlockall(ufi, ufi-entry-aref.ar_amap, uobj); pmap_update(ufi-orig_map-pmap); + uvmfault_unlockall(ufi, ufi-entry-aref.ar_amap, uobj); + if (error == ERESTART) { uvm_wait(privpgop_fault); } Index: src/sys/arch/xen/xen/xengnt.c diff -u src/sys/arch/xen/xen/xengnt.c:1.18 src/sys/arch/xen/xen/xengnt.c:1.19 --- src/sys/arch/xen/xen/xengnt.c:1.18 Thu May 26 22:18:13 2011 +++ src/sys/arch/xen/xen/xengnt.c Wed Jun 15 19:51:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xengnt.c,v 1.18 2011/05/26 22:18:13 jym Exp $ */ +/* $NetBSD: xengnt.c,v 1.19 2011/06/15 19:51:50 rmind Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xengnt.c,v 1.18 2011/05/26 22:18:13 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: xengnt.c,v 1.19 2011/06/15 19:51:50 rmind Exp $); #include sys/types.h #include sys/param.h @@ -167,6 +167,7 @@ pmap_kenter_ma(((vaddr_t)grant_table) + gnt_nr_grant_frames * PAGE_SIZE, ((paddr_t)pages[gnt_nr_grant_frames]) PAGE_SHIFT, VM_PROT_WRITE, 0); + pmap_update(pmap_kernel()); /* * add the grant entries associated to the last grant table frame
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: rmind Date: Wed Jun 15 19:54:17 UTC 2011 Modified Files: src/sys/arch/xen/x86: cpu.c x86_xpmap.c Log Message: - cpu_hatch: call tlbflushg(), just to make sure that TLB is clean. - xen_bootstrap_tables: call xpq_queue_tlb_flush() for safety. - Initialise cpus_attached and ci_cpumask for primary CPU. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/xen/x86/cpu.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/xen/x86/x86_xpmap.c 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/xen/x86/cpu.c diff -u src/sys/arch/xen/x86/cpu.c:1.57 src/sys/arch/xen/x86/cpu.c:1.58 --- src/sys/arch/xen/x86/cpu.c:1.57 Sun Jun 12 03:35:50 2011 +++ src/sys/arch/xen/x86/cpu.c Wed Jun 15 19:54:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $ */ +/* $NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $ */ /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp */ /*- @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.57 2011/06/12 03:35:50 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.58 2011/06/15 19:54:16 rmind Exp $); #include opt_ddb.h #include opt_multiprocessor.h @@ -157,6 +157,7 @@ .ci_idepth = -1, .ci_curlwp = lwp0, .ci_curldt = -1, + .ci_cpumask = 1, #ifdef TRAPLOG .ci_tlog = tlog_primary, #endif @@ -172,7 +173,7 @@ static void cpu_set_tss_gates(struct cpu_info *ci); -uint32_t cpus_attached = 0; +uint32_t cpus_attached = 1; uint32_t cpus_running = 0; uint32_t phycpus_attached = 0; @@ -739,6 +740,7 @@ /* Because the text may have been patched in x86_patch(). */ wbinvd(); x86_flush(); + tlbflushg(); KASSERT((ci-ci_flags CPUF_RUNNING) == 0); Index: src/sys/arch/xen/x86/x86_xpmap.c diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.26 src/sys/arch/xen/x86/x86_xpmap.c:1.27 --- src/sys/arch/xen/x86/x86_xpmap.c:1.26 Sun May 8 00:18:25 2011 +++ src/sys/arch/xen/x86/x86_xpmap.c Wed Jun 15 19:54:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $ */ +/* $NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $ */ /* * Copyright (c) 2006 Mathieu Ropert m...@adviseo.fr @@ -69,7 +69,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.26 2011/05/08 00:18:25 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: x86_xpmap.c,v 1.27 2011/06/15 19:54:16 rmind Exp $); #include opt_xen.h #include opt_ddb.h @@ -854,6 +854,7 @@ pte++; } xpq_flush_queue(); + xpq_queue_tlb_flush(); }
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Wed Jun 15 22:46:40 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: booke_cache.c Log Message: Rework to get the inlining working right. Also make slightly more portable among powerpc variants. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/booke_cache.c 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/powerpc/booke/booke_cache.c diff -u src/sys/arch/powerpc/booke/booke_cache.c:1.2 src/sys/arch/powerpc/booke/booke_cache.c:1.3 --- src/sys/arch/powerpc/booke/booke_cache.c:1.2 Tue Jan 18 01:02:52 2011 +++ src/sys/arch/powerpc/booke/booke_cache.c Wed Jun 15 22:46:39 2011 @@ -37,12 +37,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: booke_cache.c,v 1.2 2011/01/18 01:02:52 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: booke_cache.c,v 1.3 2011/06/15 22:46:39 matt Exp $); #include sys/param.h #include sys/cpu.h +#include sys/atomic.h -#include uvm/uvm_extern.h +enum cache_op { OP_DCBF, OP_DCBST, OP_DCBI, OP_DCBZ, OP_DCBA, OP_ICBI }; static void inline dcbf(vaddr_t va, vsize_t off) @@ -81,8 +82,7 @@ } static inline void -cache_op(vaddr_t va, vsize_t len, vsize_t line_size, - void (*op)(vaddr_t, vsize_t)) +cache_op(vaddr_t va, vsize_t len, vsize_t line_size, enum cache_op op) { KASSERT(line_size 0); @@ -93,66 +93,75 @@ len += va (line_size - 1); va = -line_size; - for (vsize_t i = 0; i len; i += line_size) - (*op)(va, i); - __asm volatile(mbar 0); + for (vsize_t i = 0; i len; i += line_size) { + switch (op) { + case OP_DCBF: dcbf(va, i); break; + case OP_DCBST: dcbst(va, i); break; + case OP_DCBI: dcbi(va, i); break; + case OP_DCBZ: dcbz(va, i); break; + case OP_DCBA: dcba(va, i); break; + case OP_ICBI: icbi(va, i); break; + } + } + if (op != OP_ICBI) + membar_producer(); } void dcache_wb_page(vaddr_t va) { - cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, dcbst); + cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, OP_DCBST); } void dcache_wbinv_page(vaddr_t va) { - cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, dcbf); + cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, OP_DCBF); } void dcache_inv_page(vaddr_t va) { - cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, dcbi); + cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, OP_DCBI); } void dcache_zero_page(vaddr_t va) { - cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, dcbz); + cache_op(va, PAGE_SIZE, curcpu()-ci_ci.dcache_line_size, OP_DCBZ); } void icache_inv_page(vaddr_t va) { - __asm(msync); - cache_op(va, PAGE_SIZE, curcpu()-ci_ci.icache_line_size, icbi); - __asm(msync); + membar_sync(); + cache_op(va, PAGE_SIZE, curcpu()-ci_ci.icache_line_size, OP_ICBI); + membar_sync(); /* synchronizing instruction will be the rfi to user mode */ } void dcache_wb(vaddr_t va, vsize_t len) { - cache_op(va, len, curcpu()-ci_ci.dcache_line_size, dcbst); + cache_op(va, len, curcpu()-ci_ci.dcache_line_size, OP_DCBST); } void dcache_wbinv(vaddr_t va, vsize_t len) { - cache_op(va, len, curcpu()-ci_ci.dcache_line_size, dcbf); + cache_op(va, len, curcpu()-ci_ci.dcache_line_size, OP_DCBF); } void dcache_inv(vaddr_t va, vsize_t len) { - cache_op(va, len, curcpu()-ci_ci.dcache_line_size, dcbi); + cache_op(va, len, curcpu()-ci_ci.dcache_line_size, OP_DCBI); } void icache_inv(vaddr_t va, vsize_t len) { - __asm volatile(msync); - cache_op(va, len, curcpu()-ci_ci.icache_line_size, icbi); - __asm volatile(msync); + membar_sync(); + cache_op(va, len, curcpu()-ci_ci.icache_line_size, OP_ICBI); + membar_sync(); }
CVS commit: src/tests
Module Name:src Committed By: mrg Date: Wed Jun 15 23:45:45 UTC 2011 Modified Files: src/tests: Makefile Log Message: evbppc can do modules now. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tests/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/Makefile diff -u src/tests/Makefile:1.30 src/tests/Makefile:1.31 --- src/tests/Makefile:1.30 Thu Feb 24 10:24:23 2011 +++ src/tests/Makefile Wed Jun 15 23:45:45 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2011/02/24 10:24:23 pooka Exp $ +# $NetBSD: Makefile,v 1.31 2011/06/15 23:45:45 mrg Exp $ .include bsd.own.mk @@ -10,7 +10,7 @@ SUBDIR= crypto dev fs games include ipf kernel lib libexec net SUBDIR+= rump sbin sys syscall toolchain usr.bin usr.sbin util -. if ${MACHINE} != evbppc ${MKKMOD} != no +. if ${MKKMOD} != no SUBDIR+= modules . endif
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: matt Date: Thu Jun 16 01:04:15 UTC 2011 Removed Files: src/distrib/sets/lists/tests: md.evbppc Log Message: Now that evbppc has modules this file is no longer needed To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/distrib/sets/lists/tests/md.evbppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: macallan Date: Thu Jun 16 02:43:43 UTC 2011 Modified Files: src/sys/arch/powerpc/include: intr.h src/sys/arch/powerpc/oea: genassym.cf src/sys/arch/powerpc/pic: files.pic intr.c src/sys/arch/powerpc/powerpc: clock.c Added Files: src/sys/arch/powerpc/pic: pic_subr.c Log Message: enable FAST_SOFTINTR support for all ports that use powerpc/pic/ This has been successfully tested on macppc TODO: - ibm4xx needs to be adapted - SMP doesn't work yet, 2nd CPU crashes when trying to leave the idle loop To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/intr.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/oea/genassym.cf cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/pic/files.pic cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/pic/intr.c cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/pic/pic_subr.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/powerpc/clock.c 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/powerpc/include/intr.h diff -u src/sys/arch/powerpc/include/intr.h:1.5 src/sys/arch/powerpc/include/intr.h:1.6 --- src/sys/arch/powerpc/include/intr.h:1.5 Sun Apr 25 12:26:07 2010 +++ src/sys/arch/powerpc/include/intr.h Thu Jun 16 02:43:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.5 2010/04/25 12:26:07 kiyohara Exp $ */ +/* $NetBSD: intr.h,v 1.6 2011/06/16 02:43:42 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -26,16 +26,22 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _LOCORE #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.h,v 1.5 2010/04/25 12:26:07 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.h,v 1.6 2011/06/16 02:43:42 macallan Exp $); +#endif #ifndef POWERPC_INTR_MACHDEP_H #define POWERPC_INTR_MACHDEP_H +#define __HAVE_FAST_SOFTINTS 1 + +#ifndef _LOCORE void *intr_establish(int, int, int, int (*)(void *), void *); void intr_disestablish(void *); const char *intr_typename(int); void genppc_cpu_configure(void); +#endif /* Interrupt priority `levels'. */ #define IPL_NONE 0 /* nothing */ @@ -54,6 +60,10 @@ #define IST_EDGE 2 /* edge-triggered */ #define IST_LEVEL 3 /* level-triggered */ +#ifdef _LOCORE +#define splhigh __splhigh +#endif + #ifndef _LOCORE /* * Interrupt handler chains. intr_establish() inserts a handler into @@ -70,7 +80,11 @@ int splraise(int); int spllower(int); void splx(int); -void softintr(int); + +void softint_fast_dispatch(struct lwp *, int); + +#define softint_init_md powerpc_softint_init_md +#define softint_trigger powerpc_softint_trigger typedef u_int imask_t; extern imask_t imask[]; @@ -83,18 +97,6 @@ #define MS_PENDING(p) (31 - cntlzw(p)) -/* Soft interrupt masks. */ -#define SIR_CLOCK 27 -#define SIR_BIO 28 -#define SIR_NET 29 -#define SIR_SERIAL 30 -#define SPL_CLOCK 31 - -#define setsoftclock() softintr(SIR_CLOCK) -#define setsoftbio() softintr(SIR_BIO) -#define setsoftnet() softintr(SIR_NET) -#define setsoftserial() softintr(SIR_SERIAL) - #define spl0() spllower(0) typedef int ipl_t; @@ -113,7 +115,7 @@ splraiseipl(ipl_cookie_t icookie) { - return splraise(imask[icookie._ipl]); + return splraise(icookie._ipl); } #include sys/spl.h Index: src/sys/arch/powerpc/oea/genassym.cf diff -u src/sys/arch/powerpc/oea/genassym.cf:1.18 src/sys/arch/powerpc/oea/genassym.cf:1.19 --- src/sys/arch/powerpc/oea/genassym.cf:1.18 Sun Jun 5 16:52:25 2011 +++ src/sys/arch/powerpc/oea/genassym.cf Thu Jun 16 02:43:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.18 2011/06/05 16:52:25 matt Exp $ +# $NetBSD: genassym.cf,v 1.19 2011/06/16 02:43:43 macallan Exp $ # # Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -217,6 +217,7 @@ define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending) define L_MD_UTF offsetof(struct lwp, l_md.md_utf) define L_PROC offsetof(struct lwp, l_proc) +define L_CTXSWTCH offsetof(struct lwp, l_ctxswtch) define P_MD_SYSCALL offsetof(struct proc, p_md.md_syscall) @@ -232,6 +233,7 @@ define CI_IPKDBSAVE offsetof(struct cpu_info, ci_ipkdbsave) define CI_DISISAVE offsetof(struct cpu_info, ci_disisave) define CI_IDLESPIN offsetof(struct cpu_info, ci_idlespin) +define CI_MTX_COUNT offsetof(struct cpu_info, ci_mtx_count) define CPUSAVE_R28 CPUSAVE_R28*sizeof(register_t) define CPUSAVE_R29 CPUSAVE_R29*sizeof(register_t) Index: src/sys/arch/powerpc/pic/files.pic diff -u src/sys/arch/powerpc/pic/files.pic:1.5 src/sys/arch/powerpc/pic/files.pic:1.6 --- src/sys/arch/powerpc/pic/files.pic:1.5 Sun Jun 5 16:52:26 2011 +++ src/sys/arch/powerpc/pic/files.pic Thu Jun 16 02:43:43 2011 @@ -1,9 +1,11 @@ # -# $NetBSD: files.pic,v 1.5 2011/06/05 16:52:26 matt Exp $ +# $NetBSD: files.pic,v 1.6 2011/06/16 02:43:43 macallan Exp $ # # generic PIC abstraction file arch/powerpc/pic/intr.c +file arch/powerpc/pic/pic_subr.c + defflag opt_pic.h PIC_DEBUG
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: macallan Date: Thu Jun 16 02:44:38 UTC 2011 Modified Files: src/sys/arch/macppc/macppc: locore.S Log Message: we need powerpc/intr.h n order to see __HAVE_FAST_SOFTINTS To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/macppc/macppc/locore.S 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/macppc/macppc/locore.S diff -u src/sys/arch/macppc/macppc/locore.S:1.66 src/sys/arch/macppc/macppc/locore.S:1.67 --- src/sys/arch/macppc/macppc/locore.S:1.66 Mon Jan 17 08:23:55 2011 +++ src/sys/arch/macppc/macppc/locore.S Thu Jun 16 02:44:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.66 2011/01/17 08:23:55 matt Exp $ */ +/* $NetBSD: locore.S,v 1.67 2011/06/16 02:44:38 macallan Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -53,6 +53,7 @@ #include powerpc/spr.h #include powerpc/oea/spr.h +#include powerpc/intr.h /* * Some instructions gas doesn't understand (yet?)
CVS commit: src/doc
Module Name:src Committed By: macallan Date: Thu Jun 16 03:03:08 UTC 2011 Modified Files: src/doc: CHANGES Log Message: mention fast softintrs for powerpc To generate a diff of this commit: cvs rdiff -u -r1.1564 -r1.1565 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1564 src/doc/CHANGES:1.1565 --- src/doc/CHANGES:1.1564 Wed Jun 15 10:02:24 2011 +++ src/doc/CHANGES Thu Jun 16 03:03:08 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1564 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1565 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1036,3 +1036,5 @@ atf(7): Import 0.14. [jmmv 20110614] evbppc: Enable builds for OEA, ibm4xx and Book-E modules. [mrg 20110615] + powerpc: the generic PIC code now supports matt@'s fast softintr + code [macallan 20110615]
CVS commit: src/share/man/man4
Module Name:src Committed By: yamt Date: Thu Jun 16 03:23:08 UTC 2011 Modified Files: src/share/man/man4: mpls.4 Log Message: pseudo-interface - pseudo-device To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/mpls.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mpls.4 diff -u src/share/man/man4/mpls.4:1.3 src/share/man/man4/mpls.4:1.4 --- src/share/man/man4/mpls.4:1.3 Thu Jan 6 15:24:33 2011 +++ src/share/man/man4/mpls.4 Thu Jun 16 03:23:08 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: mpls.4,v 1.3 2011/01/06 15:24:33 njoly Exp $ +.\ $NetBSD: mpls.4,v 1.4 2011/06/16 03:23:08 yamt Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -32,7 +32,7 @@ .Nd Multiprotocol Label Switching .Sh SYNOPSIS .Cd options MPLS -.Cd pseudo-interface ifmpls +.Cd pseudo-device ifmpls .In sys/types.h .In netmpls/mpls.h .Sh DESCRIPTION
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Thu Jun 16 03:54:40 UTC 2011 Modified Files: src/sys/arch/macppc/macppc: locore.S src/sys/arch/powerpc/oea: genassym.cf Log Message: Make __HAVE_FAST_SOFTINTS appear in assym.h so all oeas don't need to include powerpc/intr.h XXX powerpc/intr.h should be powerpc/oea/intr.h To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/macppc/macppc/locore.S cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/oea/genassym.cf 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/macppc/macppc/locore.S diff -u src/sys/arch/macppc/macppc/locore.S:1.67 src/sys/arch/macppc/macppc/locore.S:1.68 --- src/sys/arch/macppc/macppc/locore.S:1.67 Thu Jun 16 02:44:38 2011 +++ src/sys/arch/macppc/macppc/locore.S Thu Jun 16 03:54:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.67 2011/06/16 02:44:38 macallan Exp $ */ +/* $NetBSD: locore.S,v 1.68 2011/06/16 03:54:40 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -53,7 +53,6 @@ #include powerpc/spr.h #include powerpc/oea/spr.h -#include powerpc/intr.h /* * Some instructions gas doesn't understand (yet?) Index: src/sys/arch/powerpc/oea/genassym.cf diff -u src/sys/arch/powerpc/oea/genassym.cf:1.19 src/sys/arch/powerpc/oea/genassym.cf:1.20 --- src/sys/arch/powerpc/oea/genassym.cf:1.19 Thu Jun 16 02:43:43 2011 +++ src/sys/arch/powerpc/oea/genassym.cf Thu Jun 16 03:54:40 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.19 2011/06/16 02:43:43 macallan Exp $ +# $NetBSD: genassym.cf,v 1.20 2011/06/16 03:54:40 matt Exp $ # # Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -51,6 +51,10 @@ include powerpc/cpu.h include powerpc/oea/cpufeat.h +ifdef __HAVE_FAST_SOFTINTS +define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS +endif + define FRAMELEN FRAMELEN define FRAME_TF offsetof(struct ktrapframe, ktf_tf) define FRAME_R0 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0])
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: matt Date: Thu Jun 16 04:25:13 UTC 2011 Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c Log Message: Make sure to set curlwp (aka r13) in cpu_hatch To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/powerpc/oea/cpu_subr.c 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/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.64 src/sys/arch/powerpc/oea/cpu_subr.c:1.65 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.64 Sun Jun 12 16:27:52 2011 +++ src/sys/arch/powerpc/oea/cpu_subr.c Thu Jun 16 04:25:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.64 2011/06/12 16:27:52 matt Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.65 2011/06/16 04:25:13 matt Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.64 2011/06/12 16:27:52 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.65 2011/06/16 04:25:13 matt Exp $); #include opt_ppcparam.h #include opt_multiprocessor.h @@ -1296,6 +1296,7 @@ mtspr(SPR_PIR, h-pir); __asm volatile (mtsprg0 %0 :: r(ci)); + curlwp = ci-ci_curlwp; cpu_spinstart_ack = 0; /* Initialize MMU. */
CVS commit: src/sys/arch/powerpc/pic
Module Name:src Committed By: matt Date: Thu Jun 16 04:37:48 UTC 2011 Modified Files: src/sys/arch/powerpc/pic: intr.c Log Message: Make sure OEA ports without __HAVE_FAST_SOFTINTS still compile. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/pic/intr.c 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/powerpc/pic/intr.c diff -u src/sys/arch/powerpc/pic/intr.c:1.12 src/sys/arch/powerpc/pic/intr.c:1.13 --- src/sys/arch/powerpc/pic/intr.c:1.12 Thu Jun 16 02:43:43 2011 +++ src/sys/arch/powerpc/pic/intr.c Thu Jun 16 04:37:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.12 2011/06/16 02:43:43 macallan Exp $ */ +/* $NetBSD: intr.c,v 1.13 2011/06/16 04:37:48 matt Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.12 2011/06/16 02:43:43 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.13 2011/06/16 04:37:48 matt Exp $); #include opt_multiprocessor.h @@ -693,6 +693,18 @@ return ocpl; } +static inline bool +have_pending_intr_p(struct cpu_info *ci, int ncpl) +{ + if (ci-ci_ipending ~imask[ncpl]) + return true; +#ifdef __HAVE_FAST_SOFTINTS + if ((ci-ci_data.cpu_softints ncpl) IPL_SOFTMASK) + return true; +#endif + return false; +} + void splx(int ncpl) { @@ -701,9 +713,9 @@ __insn_barrier(); __asm volatile(sync; eieio); /* reorder protect */ ci-ci_cpl = ncpl; - if ((ci-ci_ipending ~imask[ncpl]) || - ((ci-ci_data.cpu_softints ncpl) IPL_SOFTMASK)) + if (have_pending_intr_p(ci, ncpl)) pic_do_pending_int(); + __asm volatile(sync; eieio); /* reorder protect */ } @@ -717,8 +729,7 @@ __asm volatile(sync; eieio); /* reorder protect */ ocpl = ci-ci_cpl; ci-ci_cpl = ncpl; - if ((ci-ci_ipending ~imask[ncpl]) || - ((ci-ci_data.cpu_softints ncpl) IPL_SOFTMASK)) + if (have_pending_intr_p(ci, ncpl)) pic_do_pending_int(); __asm volatile(sync; eieio); /* reorder protect */ return ocpl;
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: matt Date: Thu Jun 16 04:38:21 UTC 2011 Modified Files: src/sys/arch/powerpc/oea: genassym.cf Log Message: ifdef / define / endif can't be the first thing. So move that block down. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/oea/genassym.cf 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/powerpc/oea/genassym.cf diff -u src/sys/arch/powerpc/oea/genassym.cf:1.20 src/sys/arch/powerpc/oea/genassym.cf:1.21 --- src/sys/arch/powerpc/oea/genassym.cf:1.20 Thu Jun 16 03:54:40 2011 +++ src/sys/arch/powerpc/oea/genassym.cf Thu Jun 16 04:38:21 2011 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.20 2011/06/16 03:54:40 matt Exp $ +# $NetBSD: genassym.cf,v 1.21 2011/06/16 04:38:21 matt Exp $ # # Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -51,10 +51,6 @@ include powerpc/cpu.h include powerpc/oea/cpufeat.h -ifdef __HAVE_FAST_SOFTINTS -define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS -endif - define FRAMELEN FRAMELEN define FRAME_TF offsetof(struct ktrapframe, ktf_tf) define FRAME_R0 offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0]) @@ -216,6 +212,10 @@ define VREG_VRSAVE offsetof(struct vreg, vrsave) define VREG_VSCR offsetof(struct vreg, vscr) +ifdef __HAVE_FAST_SOFTINTS +define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS +endif + define L_PCB offsetof(struct lwp, l_addr) define L_CPU offsetof(struct lwp, l_cpu) define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending)