CVS commit: src/tests/include/sys
Module Name:src Committed By: isaki Date: Sat Mar 21 05:50:19 UTC 2015 Modified Files: src/tests/include/sys: t_bitops.c Log Message: one more white space -> tab. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/include/sys/t_bitops.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/include/sys/t_bitops.c diff -u src/tests/include/sys/t_bitops.c:1.18 src/tests/include/sys/t_bitops.c:1.19 --- src/tests/include/sys/t_bitops.c:1.18 Sat Mar 21 05:32:07 2015 +++ src/tests/include/sys/t_bitops.c Sat Mar 21 05:50:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_bitops.c,v 1.18 2015/03/21 05:32:07 isaki Exp $ */ +/* $NetBSD: t_bitops.c,v 1.19 2015/03/21 05:50:19 isaki Exp $ */ /*- * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_bitops.c,v 1.18 2015/03/21 05:32:07 isaki Exp $"); +__RCSID("$NetBSD: t_bitops.c,v 1.19 2015/03/21 05:50:19 isaki Exp $"); #include @@ -67,7 +67,7 @@ static const struct { ATF_TC(bitmap_basic); ATF_TC_HEAD(bitmap_basic, tc) { -atf_tc_set_md_var(tc, "descr", "A basic test of __BITMAP_*"); + atf_tc_set_md_var(tc, "descr", "A basic test of __BITMAP_*"); } ATF_TC_BODY(bitmap_basic, tc)
CVS commit: src/tests/include/sys
Module Name:src Committed By: isaki Date: Sat Mar 21 05:32:07 UTC 2015 Modified Files: src/tests/include/sys: t_bitops.c Log Message: Rewrite ilog2's test. PR lib/49745. - Reorganize ilog2_basic to ilog2_32bit, ilog2_64bit and ilog2_const. ilog2_const is compile-time test for __builtin_constant_p() part of current ilog2() implementation. - Remove fully meaningless ilog2_log2. So this part of PR misc/44767 is no longer present. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/include/sys/t_bitops.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/include/sys/t_bitops.c diff -u src/tests/include/sys/t_bitops.c:1.17 src/tests/include/sys/t_bitops.c:1.18 --- src/tests/include/sys/t_bitops.c:1.17 Sat Mar 14 07:23:46 2015 +++ src/tests/include/sys/t_bitops.c Sat Mar 21 05:32:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_bitops.c,v 1.17 2015/03/14 07:23:46 isaki Exp $ */ +/* $NetBSD: t_bitops.c,v 1.18 2015/03/21 05:32:07 isaki Exp $ */ /*- * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_bitops.c,v 1.17 2015/03/14 07:23:46 isaki Exp $"); +__RCSID("$NetBSD: t_bitops.c,v 1.18 2015/03/21 05:32:07 isaki Exp $"); #include @@ -174,55 +174,180 @@ ATF_TC_BODY(ffsfls, tc) } } -ATF_TC(ilog2_basic); -ATF_TC_HEAD(ilog2_basic, tc) +ATF_TC(ilog2_32bit); +ATF_TC_HEAD(ilog2_32bit, tc) { - atf_tc_set_md_var(tc, "descr", "Test ilog2(3) for correctness"); + atf_tc_set_md_var(tc, "descr", "Test ilog2(3) for 32bit variable"); } -ATF_TC_BODY(ilog2_basic, tc) +ATF_TC_BODY(ilog2_32bit, tc) { - uint64_t i, x; + int i; + uint32_t x; - for (i = x = 0; i < 64; i++) { + for (i = 0; i < 32; i++) { + x = 1 << i; + ATF_REQUIRE(ilog2(x) == i); + } +} + +ATF_TC(ilog2_64bit); +ATF_TC_HEAD(ilog2_64bit, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test ilog2(3) for 64bit variable"); +} - x = (uint64_t)1 << i; +ATF_TC_BODY(ilog2_64bit, tc) +{ + int i; + uint64_t x; - ATF_REQUIRE(i == (uint64_t)ilog2(x)); + for (i = 0; i < 64; i++) { + x = ((uint64_t)1) << i; + ATF_REQUIRE(ilog2(x) == i); } } -ATF_TC(ilog2_log2); -ATF_TC_HEAD(ilog2_log2, tc) +ATF_TC(ilog2_const); +ATF_TC_HEAD(ilog2_const, tc) { - atf_tc_set_md_var(tc, "descr", "Test log2(3) vs. ilog2(3)"); + atf_tc_set_md_var(tc, "descr", "Test ilog2(3) for constant"); } -ATF_TC_BODY(ilog2_log2, tc) +ATF_TC_BODY(ilog2_const, tc) { -#ifdef __vax__ - atf_tc_skip("Test is unavailable on vax because of lack of log2()"); -#else - double x, y; - uint64_t i; - /* - * This may fail under QEMU; see PR misc/44767. + * These inlines test __builtin_constant_p() part of ilog2() + * at compile time, so don't change it to loop. PR lib/49745 */ - for (i = 1; i < UINT32_MAX; i += UINT16_MAX) { - - x = log2(i); - y = (double)(ilog2(i)); - - ATF_REQUIRE(ceil(x) >= y); - - if (fabs(floor(x) - y) > 1.0e-40) { - atf_tc_expect_fail("PR misc/44767"); - atf_tc_fail("log2(%"PRIu64") != " - "ilog2(%"PRIu64")", i, i); - } - } -#endif + ATF_REQUIRE(ilog2(0x0001ULL) == 0); + ATF_REQUIRE(ilog2(0x0002ULL) == 1); + ATF_REQUIRE(ilog2(0x0004ULL) == 2); + ATF_REQUIRE(ilog2(0x0008ULL) == 3); + ATF_REQUIRE(ilog2(0x0010ULL) == 4); + ATF_REQUIRE(ilog2(0x0020ULL) == 5); + ATF_REQUIRE(ilog2(0x0040ULL) == 6); + ATF_REQUIRE(ilog2(0x0080ULL) == 7); + ATF_REQUIRE(ilog2(0x0100ULL) == 8); + ATF_REQUIRE(ilog2(0x0200ULL) == 9); + ATF_REQUIRE(ilog2(0x0400ULL) == 10); + ATF_REQUIRE(ilog2(0x0800ULL) == 11); + ATF_REQUIRE(ilog2(0x1000ULL) == 12); + ATF_REQUIRE(ilog2(0x2000ULL) == 13); + ATF_REQUIRE(ilog2(0x4000ULL) == 14); + ATF_REQUIRE(ilog2(0x8000ULL) == 15); + ATF_REQUIRE(ilog2(0x0001ULL) == 16); + ATF_REQUIRE(ilog2(0x0002ULL) == 17); + ATF_REQUIRE(ilog2(0x0004ULL) == 18); + ATF_REQUIRE(ilog2(0x0008ULL) == 19); + ATF_REQUIRE(ilog2(0x0010ULL) == 20); + ATF_REQUIRE(ilog2(0x0020ULL) == 21); + ATF_REQUIRE(ilog2(0x0040ULL) == 22); + ATF_REQUIRE(ilog2(0x0080ULL) == 23); + ATF_REQUIRE(ilog2(0x0100ULL) == 24); + ATF_REQUIRE(ilog2(0x0200ULL) == 25); + ATF_REQUIRE(ilog2(0x0400ULL) == 26); + ATF_REQUIRE(ilog2(0x0800ULL) == 27); + ATF_REQUIRE(ilog2(0x1000ULL) == 28); + ATF_REQUIRE(ilog2(0x2000ULL) == 29); + ATF_REQUIRE(ilog2(0x4000ULL) == 30); + ATF_REQUIRE(ilog2(0x8000ULL) == 31); + ATF_REQUIRE(ilog2(0x0001ULL) == 32); + ATF_REQUIRE(ilog2(0x0002ULL) == 33); + ATF_REQUIRE(ilog2(0x0004ULL) == 34); + ATF_REQUIRE(ilog2(0x0008ULL) == 35); + A
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sat Mar 21 01:17:00 UTC 2015 Modified Files: src/sys/arch/arm/amlogic: amlogic_io.c amlogic_reg.h amlogic_var.h files.amlogic src/sys/arch/evbarm/amlogic: amlogic_machdep.c src/sys/arch/evbarm/conf: ODROID-C1 Added Files: src/sys/arch/arm/amlogic: amlogic_canvasreg.h amlogic_genfb.c amlogic_hdmireg.h amlogic_vpureg.h Log Message: Basic framebuffer console support. Work in progress. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/amlogic/amlogic_canvasreg.h \ src/sys/arch/arm/amlogic/amlogic_genfb.c \ src/sys/arch/arm/amlogic/amlogic_hdmireg.h \ src/sys/arch/arm/amlogic/amlogic_vpureg.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/amlogic/amlogic_io.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/amlogic/amlogic_reg.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/amlogic/amlogic_var.h \ src/sys/arch/arm/amlogic/files.amlogic cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/amlogic/amlogic_machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/ODROID-C1 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/arm/amlogic/amlogic_io.c diff -u src/sys/arch/arm/amlogic/amlogic_io.c:1.6 src/sys/arch/arm/amlogic/amlogic_io.c:1.7 --- src/sys/arch/arm/amlogic/amlogic_io.c:1.6 Sun Mar 8 12:44:55 2015 +++ src/sys/arch/arm/amlogic/amlogic_io.c Sat Mar 21 01:17:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_io.c,v 1.6 2015/03/08 12:44:55 jmcneill Exp $ */ +/* $NetBSD: amlogic_io.c,v 1.7 2015/03/21 01:17:00 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_amlogic.h" #include -__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.6 2015/03/08 12:44:55 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amlogic_io.c,v 1.7 2015/03/21 01:17:00 jmcneill Exp $"); #include #include @@ -63,10 +63,8 @@ static const struct amlogic_locators aml AMLOGIC_UART0AO_OFFSET, AMLOGIC_UART_SIZE, 0, AMLOGIC_INTR_UART0AO }, { "amlogiccom", AMLOGIC_UART2AO_OFFSET, AMLOGIC_UART_SIZE, 2, AMLOGIC_INTR_UART2AO }, -#if notyet { "genfb", AMLOGIC_DMC_OFFSET, AMLOGIC_DMC_SIZE, NOPORT, NOINTR }, -#endif { "amlogicrng", AMLOGIC_RAND_OFFSET, AMLOGIC_RAND_SIZE, NOPORT, NOINTR }, { "dwctwo", Index: src/sys/arch/arm/amlogic/amlogic_reg.h diff -u src/sys/arch/arm/amlogic/amlogic_reg.h:1.8 src/sys/arch/arm/amlogic/amlogic_reg.h:1.9 --- src/sys/arch/arm/amlogic/amlogic_reg.h:1.8 Sun Mar 8 12:44:55 2015 +++ src/sys/arch/arm/amlogic/amlogic_reg.h Sat Mar 21 01:17:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_reg.h,v 1.8 2015/03/08 12:44:55 jmcneill Exp $ */ +/* $NetBSD: amlogic_reg.h,v 1.9 2015/03/21 01:17:00 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -70,6 +70,12 @@ #define AMLOGIC_GMAC_OFFSET 0x0941 #define AMLOGIC_GMAC_SIZE 0x1 +#define AMLOGIC_HDMI_OFFSET 0x1004 +#define AMLOGIC_HDMI_SIZE 0x1 /* ? */ + +#define AMLOGIC_VPU_OFFSET 0x1010 +#define AMLOGIC_VPU_SIZE 0x10 /* ? */ + #define AMLOGIC_SRAM_OFFSET 0x1900 #define AMLOGIC_CPUCONF_OFFSET 0x1901ff80 Index: src/sys/arch/arm/amlogic/amlogic_var.h diff -u src/sys/arch/arm/amlogic/amlogic_var.h:1.7 src/sys/arch/arm/amlogic/amlogic_var.h:1.8 --- src/sys/arch/arm/amlogic/amlogic_var.h:1.7 Tue Mar 17 22:29:40 2015 +++ src/sys/arch/arm/amlogic/amlogic_var.h Sat Mar 21 01:17:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amlogic_var.h,v 1.7 2015/03/17 22:29:40 jmcneill Exp $ */ +/* $NetBSD: amlogic_var.h,v 1.8 2015/03/21 01:17:00 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -74,6 +74,9 @@ uint32_t amlogic_get_rate_fixed(void); uint32_t amlogic_get_rate_a9(void); uint32_t amlogic_get_rate_a9periph(void); +void amlogic_genfb_ddb_trap_callback(int); +void amlogic_genfb_set_console_dev(device_t); + static void inline amlogic_reg_set_clear(bus_space_tag_t bst, bus_space_handle_t bsh, bus_size_t o, uint32_t set_mask, uint32_t clr_mask) Index: src/sys/arch/arm/amlogic/files.amlogic diff -u src/sys/arch/arm/amlogic/files.amlogic:1.7 src/sys/arch/arm/amlogic/files.amlogic:1.8 --- src/sys/arch/arm/amlogic/files.amlogic:1.7 Tue Mar 17 22:29:40 2015 +++ src/sys/arch/arm/amlogic/files.amlogic Sat Mar 21 01:17:00 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.amlogic,v 1.7 2015/03/17 22:29:40 jmcneill Exp $ +# $NetBSD: files.amlogic,v 1.8 2015/03/21 01:17:00 jmcneill Exp $ # # Configuration info for Amlogic ARM Peripherals # @@ -26,6 +26,10 @@ device amlogiccom attach amlogiccom at amlogicio with amlogic_com file arch/arm/amlogic/amlogic_com.c amlogic_com needs-flag +# Framebuffer console +attach genfb at amlogicio with amlogic_genfb +file arch/arm/amlogic/amlogic_genfb.c amlogic_genfb needs-flag + # SDHC device amlogicsdhc: sdmmcbus attach amlogicsdhc at amlogicio with amlogic_sdhc Index: src/sys/arch/evbarm/amlo
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Sat Mar 21 00:49:07 UTC 2015 Modified Files: src/usr.sbin/npf/npfctl: npf_build.c npf_show.c Log Message: npfctl: - Fix the filter criteria when to/from is omitted but port used. - Print more user-friendly error if an NPF table has a duplicate entry. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/npf/npfctl/npf_show.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/npf/npfctl/npf_build.c diff -u src/usr.sbin/npf/npfctl/npf_build.c:1.38 src/usr.sbin/npf/npfctl/npf_build.c:1.39 --- src/usr.sbin/npf/npfctl/npf_build.c:1.38 Sat May 31 22:41:37 2014 +++ src/usr.sbin/npf/npfctl/npf_build.c Sat Mar 21 00:49:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_build.c,v 1.38 2014/05/31 22:41:37 rmind Exp $ */ +/* $NetBSD: npf_build.c,v 1.39 2015/03/21 00:49:07 rmind Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__RCSID("$NetBSD: npf_build.c,v 1.38 2014/05/31 22:41:37 rmind Exp $"); +__RCSID("$NetBSD: npf_build.c,v 1.39 2015/03/21 00:49:07 rmind Exp $"); #include #include @@ -91,6 +91,10 @@ npfctl_config_send(int fd, const char *o } npf_rule_insert(npf_conf, NULL, defgroup); error = npf_config_submit(npf_conf, fd); + if (error == EEXIST) { /* XXX */ + errx(EXIT_FAILURE, "(re)load failed: " + "some table has a duplicate entry?"); + } if (error) { nl_error_t ne; _npf_config_error(npf_conf, &ne); Index: src/usr.sbin/npf/npfctl/npf_show.c diff -u src/usr.sbin/npf/npfctl/npf_show.c:1.17 src/usr.sbin/npf/npfctl/npf_show.c:1.18 --- src/usr.sbin/npf/npfctl/npf_show.c:1.17 Mon Feb 2 19:08:32 2015 +++ src/usr.sbin/npf/npfctl/npf_show.c Sat Mar 21 00:49:07 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_show.c,v 1.17 2015/02/02 19:08:32 rmind Exp $ */ +/* $NetBSD: npf_show.c,v 1.18 2015/03/21 00:49:07 rmind Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: npf_show.c,v 1.17 2015/02/02 19:08:32 rmind Exp $"); +__RCSID("$NetBSD: npf_show.c,v 1.18 2015/03/21 00:49:07 rmind Exp $"); #include #include @@ -53,13 +53,22 @@ __RCSID("$NetBSD: npf_show.c,v 1.17 2015 #include "npfctl.h" +#define SEEN_SRC 0x01 +#define SEEN_DST 0x02 + typedef struct { nl_config_t * conf; FILE * fp; long fpos; + u_int flags; + uint32_t curmark; } npf_conf_info_t; -static npf_conf_info_t stdout_ctx = { .fp = stdout, .fpos = 0 }; +static npf_conf_info_t stdout_ctx = { + .fp = stdout, + .fpos = 0, + .flags = 0 +}; static void print_indent(npf_conf_info_t *, u_int); static void print_linesep(npf_conf_info_t *); @@ -201,12 +210,18 @@ static char * print_portrange(npf_conf_info_t *ctx, const uint32_t *words) { u_int fport = words[0], tport = words[1]; + const char *any_str = ""; char *p; + if (ctx->curmark == BM_SRC_PORTS && (ctx->flags & SEEN_SRC) == 0) + any_str = "to any "; + if (ctx->curmark == BM_DST_PORTS && (ctx->flags & SEEN_DST) == 0) + any_str = "from any "; + if (fport != tport) { - easprintf(&p, "%u:%u", fport, tport); + easprintf(&p, "%s%u:%u", any_str, fport, tport); } else { - easprintf(&p, "%u", fport); + easprintf(&p, "%s%u", any_str, fport); } return p; } @@ -244,22 +259,23 @@ static const struct mark_keyword_mapent u_int mark; const char * token; const char * sep; + u_int set_flags; char * (*printfn)(npf_conf_info_t *, const uint32_t *); u_int fwords; } mark_keyword_map[] = { - { BM_IPVER, "family %s", NULL, print_family, 1 }, - { BM_PROTO, "proto %s", ", ", print_proto, 1 }, - { BM_TCPFL, "flags %s", NULL, print_tcpflags, 2 }, - { BM_ICMP_TYPE, "icmp-type %s", NULL, print_number, 1 }, - { BM_ICMP_CODE, "code %s", NULL, print_number, 1 }, - - { BM_SRC_CIDR, "from %s", ", ", print_address, 6 }, - { BM_SRC_TABLE, "from <%s>", NULL, print_table, 1 }, - { BM_SRC_PORTS, "port %s", ", ", print_portrange,2 }, - - { BM_DST_CIDR, "to %s", ", ", print_address, 6 }, - { BM_DST_TABLE, "to <%s>", NULL, print_table, 1 }, - { BM_DST_PORTS, "port %s", ", ", print_portrange,2 }, + { BM_IPVER, "family %s", NULL, 0, print_family, 1 }, + { BM_PROTO, "proto %s", ", ", 0, print_proto, 1 }, + { BM_TCPFL, "flags %s", NULL, 0, print_tcpflags, 2 }, + { BM_ICMP_TYPE, "icmp-type %s", NULL, 0, print_number, 1 }, + { BM_ICMP_CODE, "code %s", NULL, 0, print_number, 1 }, + + { BM_SRC_CIDR, "from %s", ", ", SEEN_SRC, print_address, 6 }, + { BM_SRC_TABLE, "from <%s>", NULL, SEEN_SRC, print_table, 1 }, + { BM_SRC_PORTS, "port %s", ", ", 0, print_portrange,2 }, + + { BM_DST_CIDR, "to %s", ", ", SEEN_DST, print_address, 6 }, + { BM_DST_TABLE, "to <%s>", NULL, SEEN_DST, print_table, 1 }, + { BM_DST_PORTS, "port %s", ", ", 0, print_portrange,2 }, }; static const char * __attribute__((format_arg(2))) @@ -
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Fri Mar 20 23:36:28 UTC 2015 Modified Files: src/sys/net/npf: npf_ctl.c npf_ruleset.c Log Message: NPF: replace the TAILQ of the dynamic rules with a linked list and fix the inheriting of the active dynamic rules during the reload; also, fix a bug in the insert path by putting a memory barrier in the right place. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/net/npf/npf_ctl.c cvs rdiff -u -r1.41 -r1.42 src/sys/net/npf/npf_ruleset.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/net/npf/npf_ctl.c diff -u src/sys/net/npf/npf_ctl.c:1.40 src/sys/net/npf/npf_ctl.c:1.41 --- src/sys/net/npf/npf_ctl.c:1.40 Sun Aug 24 20:36:30 2014 +++ src/sys/net/npf/npf_ctl.c Fri Mar 20 23:36:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ctl.c,v 1.40 2014/08/24 20:36:30 rmind Exp $ */ +/* $NetBSD: npf_ctl.c,v 1.41 2015/03/20 23:36:28 rmind Exp $ */ /*- * Copyright (c) 2009-2014 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.40 2014/08/24 20:36:30 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_ctl.c,v 1.41 2015/03/20 23:36:28 rmind Exp $"); #include #include @@ -778,6 +778,9 @@ npfctl_rule(u_long cmd, void *data) } case NPF_CMD_RULE_LIST: { retdict = npf_ruleset_list(rlset, ruleset_name); + if (!retdict) { + error = ESRCH; + } break; } case NPF_CMD_RULE_FLUSH: { @@ -797,6 +800,7 @@ npfctl_rule(u_long cmd, void *data) npf_config_exit(); if (rl) { + KASSERT(error); npf_rule_free(rl); } out: Index: src/sys/net/npf/npf_ruleset.c diff -u src/sys/net/npf/npf_ruleset.c:1.41 src/sys/net/npf/npf_ruleset.c:1.42 --- src/sys/net/npf/npf_ruleset.c:1.41 Mon Feb 2 00:31:39 2015 +++ src/sys/net/npf/npf_ruleset.c Fri Mar 20 23:36:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ruleset.c,v 1.41 2015/02/02 00:31:39 rmind Exp $ */ +/* $NetBSD: npf_ruleset.c,v 1.42 2015/03/20 23:36:28 rmind Exp $ */ /*- * Copyright (c) 2009-2015 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.41 2015/02/02 00:31:39 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.42 2015/03/20 23:36:28 rmind Exp $"); #include #include @@ -89,21 +89,24 @@ struct npf_rule { npf_natpolicy_t * r_natp; npf_rproc_t * r_rproc; - /* Rule priority: (highest) 1, 2 ... n (lowest). */ - pri_t r_priority; - - /* - * Dynamic group: subset queue and a dynamic group list entry. - * Dynamic rule: entry and the parent rule (the group). - */ union { - TAILQ_HEAD(npf_ruleq, npf_rule) r_subset; - TAILQ_ENTRY(npf_rule) r_entry; - } /* C11 */; - union { - LIST_ENTRY(npf_rule) r_dentry; - npf_rule_t * r_parent; - } /* C11 */; + /* + * Dynamic group: rule subset and a group list entry. + */ + struct { + npf_rule_t * r_subset; + LIST_ENTRY(npf_rule) r_dentry; + }; + + /* + * Dynamic rule: priority, parent group and next rule. + */ + struct { + int r_priority; + npf_rule_t * r_parent; + npf_rule_t * r_next; + }; + }; /* Rule ID, name and the optional key. */ uint64_t r_id; @@ -147,19 +150,6 @@ npf_ruleset_create(size_t slots) return rlset; } -static void -npf_ruleset_unlink(npf_ruleset_t *rlset, npf_rule_t *rl) -{ - if (NPF_DYNAMIC_GROUP_P(rl->r_attr)) { - LIST_REMOVE(rl, r_dentry); - } - if (NPF_DYNAMIC_RULE_P(rl->r_attr)) { - npf_rule_t *rg = rl->r_parent; - TAILQ_REMOVE(&rg->r_subset, rl, r_entry); - } - LIST_REMOVE(rl, r_aentry); -} - void npf_ruleset_destroy(npf_ruleset_t *rlset) { @@ -167,7 +157,19 @@ npf_ruleset_destroy(npf_ruleset_t *rlset npf_rule_t *rl; while ((rl = LIST_FIRST(&rlset->rs_all)) != NULL) { - npf_ruleset_unlink(rlset, rl); + if (NPF_DYNAMIC_GROUP_P(rl->r_attr)) { + /* + * Note: r_subset may point to the rules which + * were inherited by a new ruleset. + */ + rl->r_subset = NULL; + LIST_REMOVE(rl, r_dentry); + } + if (NPF_DYNAMIC_RULE_P(rl->r_attr)) { + /* Not removing from r_subset, see above. */ + KASSERT(rl->r_parent != NULL); + } + LIST_REMOVE(rl, r_aentry); npf_rule_free(rl); } KASSERT(LIST_EMPTY(&rlset->rs_dynamic)); @@ -222,16 +224,16 @@ npf_ruleset_lookup(npf_ruleset_t *rlset, int npf_ruleset_add(npf_ruleset_t *rlset, const char *rname, npf_rule_t *rl) { - npf_rule_t *rg, *it; - pri_t priocmd; + npf_rule_t *rg, *it, *target; + int priocmd; + if (!NPF_DYNAMIC_RULE_P(rl->r_attr)) { + return EINVAL; + } rg = npf_ruleset_lookup(rlset, rname); if (rg == NULL) { return ESRCH; } - if (!NPF_DYNAMIC_RULE_P(rl->r_attr)) { - return EINVAL; - } /* Dynamic rule - assign a unique ID and save the parent. */ rl->r_id = ++rlset->rs_idcnt; @@ -245,29 +247,32 @@ npf_ruleset_add(npf_ruleset_t *rlset, co rl->r_priority = 0; } + /* + * WARNING: once rg->subset or target->r_next of an *active* + * rule is
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: jmcneill Date: Fri Mar 20 21:55:46 UTC 2015 Modified Files: src/sys/dev/wsfb: genfb.c Log Message: support 24bpp framebuffers To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.56 src/sys/dev/wsfb/genfb.c:1.57 --- src/sys/dev/wsfb/genfb.c:1.56 Wed Sep 10 07:40:52 2014 +++ src/sys/dev/wsfb/genfb.c Fri Mar 20 21:55:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.56 2014/09/10 07:40:52 macallan Exp $ */ +/* $NetBSD: genfb.c,v 1.57 2015/03/20 21:55:46 jmcneill Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.56 2014/09/10 07:40:52 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.57 2015/03/20 21:55:46 jmcneill Exp $"); #include #include @@ -545,10 +545,12 @@ genfb_init_screen(void *cookie, struct v ri->ri_flg |= RI_CLEAR; } - if (ri->ri_depth == 32) { + if (ri->ri_depth == 32 || ri->ri_depth == 24) { bool is_bgr = false; - ri->ri_flg |= RI_ENABLE_ALPHA; + if (ri->ri_depth == 32) { + ri->ri_flg |= RI_ENABLE_ALPHA; + } prop_dictionary_get_bool(device_properties(sc->sc_dev), "is_bgr", &is_bgr); if (is_bgr) { @@ -568,7 +570,7 @@ genfb_init_screen(void *cookie, struct v ri->ri_gpos = 8; ri->ri_bpos = 0; } - } + } if (ri->ri_depth == 8 && sc->sc_cmcb != NULL) ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Fri Mar 20 21:42:31 UTC 2015 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: add WSDISPLAY_TYPE_MESON To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/wscons/wsconsio.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/dev/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.111 src/sys/dev/wscons/wsconsio.h:1.112 --- src/sys/dev/wscons/wsconsio.h:1.111 Tue Jan 6 19:19:10 2015 +++ src/sys/dev/wscons/wsconsio.h Fri Mar 20 21:42:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.111 2015/01/06 19:19:10 christos Exp $ */ +/* $NetBSD: wsconsio.h,v 1.112 2015/03/20 21:42:31 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -336,6 +336,7 @@ struct wsmouse_repeat { #define WSDISPLAY_TYPE_CLPS711X 59 /* CL PS-711x */ #define WSDISPLAY_TYPE_ALLWINNER 60 /* Allwinner ARM SoC */ #define WSDISPLAY_TYPE_MGX 61 /* SSB 4096V-MGX */ +#define WSDISPLAY_TYPE_MESON 62 /* Amlogic Meson ARM Soc */ /* Basic display information. Not applicable to all display types. */ struct wsdisplay_fbinfo {
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Fri Mar 20 20:36:28 UTC 2015 Modified Files: src/sys/compat/linux/common: linux_exec_elf32.c src/sys/compat/linux32/common: linux32_exec_elf32.c src/sys/compat/netbsd32: netbsd32_exec_elf32.c src/sys/compat/svr4_32: svr4_32_exec_elf32.c src/sys/kern: exec_elf.c Log Message: Zero-fill the ELF auxiliary vectors. Otherwise, on 64bit systems, the padding between a_v and a_type contains kernel garbage, therefore exposed to userland. Original report by uebayasi@ To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/compat/linux/common/linux_exec_elf32.c cvs rdiff -u -r1.17 -r1.18 src/sys/compat/linux32/common/linux32_exec_elf32.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/netbsd32/netbsd32_exec_elf32.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/svr4_32/svr4_32_exec_elf32.c cvs rdiff -u -r1.70 -r1.71 src/sys/kern/exec_elf.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/compat/linux/common/linux_exec_elf32.c diff -u src/sys/compat/linux/common/linux_exec_elf32.c:1.91 src/sys/compat/linux/common/linux_exec_elf32.c:1.92 --- src/sys/compat/linux/common/linux_exec_elf32.c:1.91 Tue Apr 15 17:29:00 2014 +++ src/sys/compat/linux/common/linux_exec_elf32.c Fri Mar 20 20:36:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.91 2014/04/15 17:29:00 maxv Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.92 2015/03/20 20:36:27 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.91 2014/04/15 17:29:00 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.92 2015/03/20 20:36:27 maxv Exp $"); #ifndef ELFSIZE /* XXX should die */ @@ -391,6 +391,8 @@ ELFNAME2(linux,copyargs)(struct lwp *l, a = ai; + memset(ai, 0, sizeof(ai)); + /* * Push extra arguments used by glibc on the stack. */ Index: src/sys/compat/linux32/common/linux32_exec_elf32.c diff -u src/sys/compat/linux32/common/linux32_exec_elf32.c:1.17 src/sys/compat/linux32/common/linux32_exec_elf32.c:1.18 --- src/sys/compat/linux32/common/linux32_exec_elf32.c:1.17 Sun Feb 23 16:07:40 2014 +++ src/sys/compat/linux32/common/linux32_exec_elf32.c Fri Mar 20 20:36:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_exec_elf32.c,v 1.17 2014/02/23 16:07:40 njoly Exp $ */ +/* $NetBSD: linux32_exec_elf32.c,v 1.18 2015/03/20 20:36:27 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2001,2006 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.17 2014/02/23 16:07:40 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.18 2015/03/20 20:36:27 maxv Exp $"); #define ELFSIZE 32 @@ -119,6 +119,8 @@ linux32_elf32_copyargs(struct lwp *l, st a = ai; + memset(ai, 0, sizeof(ai)); + /* * Push extra arguments on the stack needed by dynamically * linked binaries and static binaries as well. Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.38 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.39 --- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.38 Fri Oct 24 21:08:36 2014 +++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c Fri Mar 20 20:36:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_exec_elf32.c,v 1.38 2014/10/24 21:08:36 christos Exp $ */ +/* $NetBSD: netbsd32_exec_elf32.c,v 1.39 2015/03/20 20:36:27 maxv Exp $ */ /* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */ /* @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.38 2014/10/24 21:08:36 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.39 2015/03/20 20:36:27 maxv Exp $"); #define ELFSIZE 32 @@ -141,6 +141,8 @@ netbsd32_elf32_copyargs(struct lwp *l, s a = ai; + memset(ai, 0, sizeof(ai)); + /* * Push extra arguments on the stack needed by dynamically * linked binaries Index: src/sys/compat/svr4_32/svr4_32_exec_elf32.c diff -u src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23 src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.24 --- src/sys/compat/svr4_32/svr4_32_exec_elf32.c:1.23 Wed Apr 9 11:40:03 2014 +++ src/sys/compat/svr4_32/svr4_32_exec_elf32.c Fri Mar 20 20:36:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_exec_elf32.c,v 1.23 2014/04/09 11:40:03 maxv Exp $ */ +/* $NetBSD: svr4_32_exec_elf32.c,v 1.24 2015/03/20 20:36:27 maxv Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.23 2014/04/09 11:40:03 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.24 2015/03/20 20:36:27 maxv Exp $"); #define ELFSIZE 32/* XXX should die */ @@ -81,6 +81,8 @@ svr4_32_copyargs(struct lwp *l,
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Fri Mar 20 19:54:53 UTC 2015 Modified Files: src/libexec/httpd: CHANGES bozohttpd.8 bozohttpd.c Log Message: copyright maintenance, note shm@ in the manual and update the CHANGES for recent changes. call this 20150320. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/libexec/httpd/CHANGES cvs rdiff -u -r1.48 -r1.49 src/libexec/httpd/bozohttpd.8 cvs rdiff -u -r1.62 -r1.63 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/CHANGES diff -u src/libexec/httpd/CHANGES:1.19 src/libexec/httpd/CHANGES:1.20 --- src/libexec/httpd/CHANGES:1.19 Thu Jul 17 10:21:51 2014 +++ src/libexec/httpd/CHANGES Fri Mar 20 19:54:53 2015 @@ -1,7 +1,12 @@ $eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $ +changes in bozohttpd 20150320: + o fix redirection handling + o support transport stream (.ts) and video object (.vob) files + o directory listings show correct file sizes for large files + changes in bozohttpd 20140717: - o properly handle SSL errors. + o properly handle SSL errors changes in bozohttpd 20140708: o fixes for virtual host support, from rajeev_v_pil...@yahoo.com Index: src/libexec/httpd/bozohttpd.8 diff -u src/libexec/httpd/bozohttpd.8:1.48 src/libexec/httpd/bozohttpd.8:1.49 --- src/libexec/httpd/bozohttpd.8:1.48 Thu Dec 25 18:56:28 2014 +++ src/libexec/httpd/bozohttpd.8 Fri Mar 20 19:54:53 2015 @@ -1,8 +1,8 @@ -.\" $NetBSD: bozohttpd.8,v 1.48 2014/12/25 18:56:28 wiz Exp $ +.\" $NetBSD: bozohttpd.8,v 1.49 2015/03/20 19:54:53 mrg Exp $ .\" .\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $ .\" -.\" Copyright (c) 1997-2014 Matthew R. Green +.\" Copyright (c) 1997-2015 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 25, 2014 +.Dd March 20, 2015 .Dt HTTPD 8 .Os .Sh NAME @@ -597,6 +597,11 @@ provided fixes for HTTP basic authorisat .Aq Mt w...@netbsd.org provided many fixes and enhancements for the man page .It +.An Mateusz Kocielski +.Aq Mt s...@netbsd.org +fixed memory leaks, information disclosure issues and added support +for using CGI handlers with directory indexing. +.It .An Arnaud Lacombe .Aq Mt a...@netbsd.org provided some clean up for memory leaks Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.62 src/libexec/httpd/bozohttpd.c:1.63 --- src/libexec/httpd/bozohttpd.c:1.62 Fri Mar 20 18:54:18 2015 +++ src/libexec/httpd/bozohttpd.c Fri Mar 20 19:54:53 2015 @@ -1,9 +1,9 @@ -/* $NetBSD: bozohttpd.c,v 1.62 2015/03/20 18:54:18 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.63 2015/03/20 19:54:53 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ /* - * Copyright (c) 1997-2014 Matthew R. Green + * Copyright (c) 1997-2015 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -109,7 +109,7 @@ #define INDEX_HTML "index.html" #endif #ifndef SERVER_SOFTWARE -#define SERVER_SOFTWARE "bozohttpd/20141225" +#define SERVER_SOFTWARE "bozohttpd/20150320" #endif #ifndef DIRECT_ACCESS_FILE #define DIRECT_ACCESS_FILE ".bzdirect"
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Fri Mar 20 18:54:18 UTC 2015 Modified Files: src/libexec/httpd: bozohttpd.c Log Message: don't quote /. it doesn't work. this should fix PR#49765. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.61 src/libexec/httpd/bozohttpd.c:1.62 --- src/libexec/httpd/bozohttpd.c:1.61 Tue Jan 27 04:20:23 2015 +++ src/libexec/httpd/bozohttpd.c Fri Mar 20 18:54:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.61 2015/01/27 04:20:23 snj Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.62 2015/03/20 18:54:18 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -878,7 +878,6 @@ bozo_escape_rfc3986(bozohttpd_t *httpd, goto encode_it; switch (*s) { case ':': - case '/': case '?': case '#': case '[':
CVS commit: src/sys/uvm
Module Name:src Committed By: riastradh Date: Fri Mar 20 15:41:44 UTC 2015 Modified Files: src/sys/uvm: uvm_extern.h Log Message: Comments explaining UBC_* flags. To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.194 src/sys/uvm/uvm_extern.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/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.193 src/sys/uvm/uvm_extern.h:1.194 --- src/sys/uvm/uvm_extern.h:1.193 Fri Feb 6 18:19:22 2015 +++ src/sys/uvm/uvm_extern.h Fri Mar 20 15:41:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.193 2015/02/06 18:19:22 maxv Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.194 2015/03/20 15:41:43 riastradh Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -175,19 +175,23 @@ /* * flags for ubc_alloc() */ -#define UBC_READ 0x001 -#define UBC_WRITE 0x002 -#define UBC_FAULTBUSY 0x004 +#define UBC_READ 0x001 /* reading from object */ +#define UBC_WRITE 0x002 /* writing to object */ +#define UBC_FAULTBUSY 0x004 /* nobody else is using these pages, so busy + * them at alloc and unbusy at release (e.g., + * for writes extending a file) */ /* * flags for ubc_release() */ -#define UBC_UNMAP 0x010 +#define UBC_UNMAP 0x010 /* unmap pages now -- don't leave the + * mappings cached indefinitely */ /* - * flags for ubc_uiomve() + * flags for ubc_uiomove() */ -#define UBC_PARTIALOK 0x100 +#define UBC_PARTIALOK 0x100 /* return early on error; otherwise, zero all + * remaining bytes after error */ /* * flags for uvn_findpages().
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Fri Mar 20 14:26:42 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add MegaRAID SAS3108 To generate a diff of this commit: cvs rdiff -u -r1.1218 -r1.1219 src/sys/dev/pci/pcidevs 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/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1218 src/sys/dev/pci/pcidevs:1.1219 --- src/sys/dev/pci/pcidevs:1.1218 Fri Mar 20 11:45:28 2015 +++ src/sys/dev/pci/pcidevs Fri Mar 20 14:26:42 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1218 2015/03/20 11:45:28 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1219 2015/03/20 14:26:42 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4453,6 +4453,7 @@ product SYMBIOS SAS1068E_2 0x0059 SAS10 product SYMBIOS SAS1066E 0x005A SAS1066E product SYMBIOS MEGARAID_2208 0x005B MegaRAID SAS2208 product SYMBIOS SAS1064A 0x005C SAS1064A +product SYMBIOS MEGARAID_3108 0x005d MegaRAID SAS3108 product SYMBIOS SAS1066 0x005E SAS1066 product SYMBIOS SAS1078 0x0060 SAS1078 PCI product SYMBIOS SAS1078_PCIE 0x0062 SAS1078 PCI Express
CVS commit: src/lib/libc
Module Name:src Committed By: riastradh Date: Fri Mar 20 14:10:40 UTC 2015 Modified Files: src/lib/libc: README Log Message: Tweak wording. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/README diff -u src/lib/libc/README:1.2 src/lib/libc/README:1.3 --- src/lib/libc/README:1.2 Fri Mar 20 13:26:51 2015 +++ src/lib/libc/README Fri Mar 20 14:10:40 2015 @@ -1,4 +1,4 @@ - $NetBSD: README,v 1.2 2015/03/20 13:26:51 riastradh Exp $ + $NetBSD: README,v 1.3 2015/03/20 14:10:40 riastradh Exp $ libc: The C library. @@ -38,15 +38,17 @@ create the ELF weak symbol alias. defines a weak symbol `consttime_memequal' aliasing a global symbol `_consttime_memequal'. - The name `consttime_memequal' is declared in - (src/include/string.h) if the caller defines _NETBSD_SOURCE. + The header file (src/include/string.h) declares + `consttime_memequal' normally, if the caller defines _NETBSD_SOURCE. - The name `consttime_memequal' is defined as a macro in "namespace.h" - (src/lib/libc/include/namespace.h) expanding to - `_consttime_memequal'. The source name `consttime_memequal' is - defined in src/common/lib/libc/string/consttime_memequal.c, causing - the ELF global symbol `_consttime_memequal' to be defined, after - macro expansion. + The header file "namespace.h" (src/lib/libc/include/namespace.h) + defines `consttime_memequal' as a macro expanding to + `_consttime_memequal'. + + The source file src/common/lib/libc/string/consttime_memequal.c + includes "namespace.h" and , and defines + `consttime_memequal' normally, which, after macro expansion, causes + the ELF global symbol `_consttime_memequal' to be defined. Alongside the definition is
CVS commit: src/lib/libc
Module Name:src Committed By: riastradh Date: Fri Mar 20 13:26:51 UTC 2015 Modified Files: src/lib/libc: README Log Message: Elaborate on how our ad-hack symbol versioning works. Tweak style. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/README diff -u src/lib/libc/README:1.1 src/lib/libc/README:1.2 --- src/lib/libc/README:1.1 Fri Mar 20 12:57:48 2015 +++ src/lib/libc/README Fri Mar 20 13:26:51 2015 @@ -1,4 +1,4 @@ - $NetBSD: README,v 1.1 2015/03/20 12:57:48 riastradh Exp $ + $NetBSD: README,v 1.2 2015/03/20 13:26:51 riastradh Exp $ libc: The C library. @@ -56,16 +56,14 @@ create the ELF weak symbol alias. `_consttime_memequal'. If a library routine is internal to libc, it is defined as an ELF -global symbol with an underscore prefix. - -Its name is declared in the appropriate internal header file. +global symbol with an underscore prefix. Its name is declared in the +appropriate internal header file. => Example: For the internal library routine _initdir, used by the implementations of opendir and rewinddir, libc defines a global - symbol `_initdir'. - - The name `_initdir' is declared normally in - src/lib/libc/gen/dirent_private.h. + symbol `_initdir'. The name `_initdir' is declared normally in + src/lib/libc/gen/dirent_private.h, and defined normally in + src/lib/libc/gen/initdir.c. If the signature or semantics of a library routine foo changed in (for example) NetBSD 6.0, then libc provides @@ -100,7 +98,7 @@ compiled with the old signature, will co (2) the ELF weak symbol `time' aliasing `_time', and (3) the ELF global symbol `__time50' implementing the new signature. - The header file declares + The header file (src/include/time.h) declares time_t time(time_t *) __RENAME(__time50); @@ -108,3 +106,38 @@ compiled with the old signature, will co use the __time50 symbol from libc. However, old programs that were compiled against the 32-bit declaration will continue to use the 32-bit symbol from libc. + + The header file "namespace.h" (src/lib/libc/include/namespace.h) + defines `time' as a macro expanding to `_time'. + + The source file src/lib/libc/gen/time.c includes "namespace.h" and +and defines `time' normally. The declaration of `time' in +is replaced after macro expansion by a declaration of + `_time', and the definition in time.c is replaced by a definition of + `_time'. But the __RENAME directive causes the resulting ELF global + symbol to be `__time50'. + + The header file + (src/lib/libc/compat/include/time.h) declares + + int32_t time(int32_t *); + + The source file src/lib/libc/compat/gen/compat_time.c includes + "namespace.h", , and , but suppresses + the normal declaration of `time' in by defining + __LIBC12_SOURCE__. Then compat_time.c defines `time' normally. + Again, the name is replaced after macro expansion by `_time', but + since there is no __RENAME directive in , the + resulting ELF global symbol is `_time'. + + Finally, alongside the definition in compat_time.c is + + __weak_alias(time,_time) + + to provide `time' as an ELF weak symbol aliasing `_time'. + + The net effect is that NetBSD 6's libc provides the same definitions + as NetBSD 5's libc for the symbols `time' and `_time', so that old + programs that were compiled in NetBSD 5 will continue to work with + NetBSD 6's libc. But programs compiled in NetBSD 6 will have 64-bit + time_t.
CVS commit: src/lib/libc
Module Name:src Committed By: riastradh Date: Fri Mar 20 12:57:48 UTC 2015 Added Files: src/lib/libc: README Log Message: First draft of documentation for the libc symbol madness. Currently describes only what we do, not why we do it. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/README diff -u /dev/null src/lib/libc/README:1.1 --- /dev/null Fri Mar 20 12:57:48 2015 +++ src/lib/libc/README Fri Mar 20 12:57:48 2015 @@ -0,0 +1,110 @@ + $NetBSD: README,v 1.1 2015/03/20 12:57:48 riastradh Exp $ + +libc: The C library. + +* ELF symbols and source names + +libc contains symbols for: + +(a) standard library routines in C and POSIX, +(b) published NetBSD-specific nonstandard extensions, +(c) old versions of library routines, and +(d) internal symbols. + +If a library routine is standard and its signature has never changed, +it is defined as an ELF global symbol. Its name is declared normally +in the appropriate header file. + +=> Example: libc defines global symbols `malloc' and `free' for the + standard C memory allocator routines. The names `malloc' and `free' + are declared normally in (src/include/stdlib.h). + +If a library routine is nonstandard but published and its signature has +never changed, it is defined as an ELF weak symbol aliasing an ELF +global symbol of the same name with an underscore prefix. + +The name is declared normally in the appropriate header file, provided +that the relevant feature macro, such as _NETBSD_SOURCE, is defined. + +Within libc, the name is defined in "namespace.h" +(src/lib/libc/include/namespace.h) as a macro expanding to the +underscored name, so that the definition in a .c file will define the +underscored ELF global symbol. + +Alongside the definition in the .c file is a __weak_alias directive to +create the ELF weak symbol alias. + +=> Example: For the nonstandard extension consttime_memequal, libc + defines a weak symbol `consttime_memequal' aliasing a global symbol + `_consttime_memequal'. + + The name `consttime_memequal' is declared in + (src/include/string.h) if the caller defines _NETBSD_SOURCE. + + The name `consttime_memequal' is defined as a macro in "namespace.h" + (src/lib/libc/include/namespace.h) expanding to + `_consttime_memequal'. The source name `consttime_memequal' is + defined in src/common/lib/libc/string/consttime_memequal.c, causing + the ELF global symbol `_consttime_memequal' to be defined, after + macro expansion. + + Alongside the definition is + + __weak_alias(consttime_memequal,_consttime_memequal) + + to provide `consttime_memequal' as an ELF weak symbol aliasing + `_consttime_memequal'. + +If a library routine is internal to libc, it is defined as an ELF +global symbol with an underscore prefix. + +Its name is declared in the appropriate internal header file. + +=> Example: For the internal library routine _initdir, used by the + implementations of opendir and rewinddir, libc defines a global + symbol `_initdir'. + + The name `_initdir' is declared normally in + src/lib/libc/gen/dirent_private.h. + +If the signature or semantics of a library routine foo changed in (for +example) NetBSD 6.0, then libc provides + +(1) an ELF global symbol `_foo' implementing its old signature, +(2) an ELF weak symbol `foo' aliasing `_foo', and +(3) an ELF global symbol `__foo50' implementing its new signature (yes, +`__foo50', not `__foo60'). + +The name foo is declared in the appropriate header file, under any +relevant feature macros, with a __RENAME directive so that for calls to +foo, the compiler will generate relocations for __foo50. Old programs, +compiled with the old signature, will continue to use the old symbol. + +=> Example: In NetBSD 5.0, time_t was int32_t on every machine. In + NetBSD 6.0 and onward, time_t is int64_t on every machine. + Consequently, the signature of time(3), written as + + time_t time(time_t *); + + changed in NetBSD 6.0 from being effectively + + int32_t time(int32_t *); + + to being effectively + + int64_t time(int64_t *); + + Thus, libc provides + + (1) the ELF global symbol `_time' implementing the old signature, + (2) the ELF weak symbol `time' aliasing `_time', and + (3) the ELF global symbol `__time50' implementing the new signature. + + The header file declares + + time_t time(time_t *) __RENAME(__time50); + + so that compiling C programs that call time will yield objects that + use the __time50 symbol from libc. However, old programs that were + compiled against the 32-bit declaration will continue to use the + 32-bit symbol from libc.
CVS commit: src/sys
Module Name:src Committed By: msaitoh Date: Fri Mar 20 12:01:32 UTC 2015 Modified Files: src/sys/arch/x86/pci: ichlpcib.c src/sys/dev/pci: ichsmb.c Log Message: Add Intel C61x and X99 devices. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/pci/ichlpcib.c cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/ichsmb.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/x86/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.47 src/sys/arch/x86/pci/ichlpcib.c:1.48 --- src/sys/arch/x86/pci/ichlpcib.c:1.47 Wed Mar 18 05:54:14 2015 +++ src/sys/arch/x86/pci/ichlpcib.c Fri Mar 20 12:01:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.47 2015/03/18 05:54:14 msaitoh Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.48 2015/03/20 12:01:32 msaitoh Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.47 2015/03/18 05:54:14 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.48 2015/03/20 12:01:32 msaitoh Exp $"); #include #include @@ -259,6 +259,8 @@ static struct lpcib_device { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_B85_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H97_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_Z97_LPC, 1, 0 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X99_LPC, 1, 0 }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_X99_LPC_2, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C222_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C224_LPC, 1, 0 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C226_LPC, 1, 0 }, Index: src/sys/dev/pci/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.39 src/sys/dev/pci/ichsmb.c:1.40 --- src/sys/dev/pci/ichsmb.c:1.39 Wed Mar 18 05:54:14 2015 +++ src/sys/dev/pci/ichsmb.c Fri Mar 20 12:01:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.39 2015/03/18 05:54:14 msaitoh Exp $ */ +/* $NetBSD: ichsmb.c,v 1.40 2015/03/20 12:01:32 msaitoh Exp $ */ /* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.39 2015/03/18 05:54:14 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.40 2015/03/20 12:01:32 msaitoh Exp $"); #include #include @@ -117,6 +117,7 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_C600_SMB_0: case PCI_PRODUCT_INTEL_C600_SMB_1: case PCI_PRODUCT_INTEL_C600_SMB_2: + case PCI_PRODUCT_INTEL_C610_SMB: case PCI_PRODUCT_INTEL_EP80579_SMB: case PCI_PRODUCT_INTEL_DH89XXCC_SMB: case PCI_PRODUCT_INTEL_DH89XXCL_SMB:
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Fri Mar 20 11:45:28 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Xeon E5 v3 and C61x devices. To generate a diff of this commit: cvs rdiff -u -r1.1217 -r1.1218 src/sys/dev/pci/pcidevs 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/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1217 src/sys/dev/pci/pcidevs:1.1218 --- src/sys/dev/pci/pcidevs:1.1217 Wed Mar 18 05:43:49 2015 +++ src/sys/dev/pci/pcidevs Fri Mar 20 11:45:28 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1217 2015/03/18 05:43:49 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1218 2015/03/20 11:45:28 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3530,6 +3530,76 @@ product INTEL 82G41_HB 0x2e30 82G41 Hos product INTEL 82G41_IGD 0x2e32 82G41 Integrated Graphics Device product INTEL 82B43_HB 0x2e40 82B43 Host Bridge product INTEL 82B43_IGD 0x2e42 82B43 Integrated Graphics Device +product INTEL XE5_V3_DMI2 0x2f00 Xeon E5 v3 DMI2 +product INTEL XE5_V3_PCIE_1 0x2f01 Xeon E5 v3 PCIe Root Port in DMI2 Mode +product INTEL XE5_V3_PCIE_2_1 0x2f04 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_2_2 0x2f05 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_2_3 0x2f06 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_2_4 0x2f07 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_3_1 0x2f08 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_3_2 0x2f09 Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_3_3 0x2f0a Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_PCIE_3_4 0x2f0b Xeon E5 v3 PCIe Root Port +product INTEL XE5_V3_R2PCIE_1 0x2f1d Xeon E5 v3 Integrated IO Ring Interface +product INTEL XE5_V3_UBOX_1 0x2f1e Xeon E5 v3 Scratchpad and Semaphores +product INTEL XE5_V3_UBOX_3 0x2f1f Xeon E5 v3 Scratchpad and Semaphores +product INTEL XE5_V3_QDT_CH0 0x2f20 Xeon E5 v3 QDT DMA Channel 0 +product INTEL XE5_V3_QDT_CH1 0x2f21 Xeon E5 v3 QDT DMA Channel 1 +product INTEL XE5_V3_QDT_CH2 0x2f22 Xeon E5 v3 QDT DMA Channel 2 +product INTEL XE5_V3_QDT_CH3 0x2f23 Xeon E5 v3 QDT DMA Channel 3 +product INTEL XE5_V3_QDT_CH4 0x2f24 Xeon E5 v3 QDT DMA Channel 4 +product INTEL XE5_V3_QDT_CH5 0x2f25 Xeon E5 v3 QDT DMA Channel 5 +product INTEL XE5_V3_QDT_CH6 0x2f26 Xeon E5 v3 QDT DMA Channel 6 +product INTEL XE5_V3_QDT_CH7 0x2f27 Xeon E5 v3 QDT DMA Channel 7 +product INTEL XE5_V3_IIO_AM 0x2f28 Xeon E5 v3 Address Map, VTd, SMM +product INTEL XE5_V3_IIO_RAM 0x2f2a Xeon E5 v3 RAS, CS, Global Errors +product INTEL XE5_V3_IIO_IOAPIC 0x2f2c Xeon E5 v3 I/O APIC +product INTEL XE5_V3_R2PCIE_2 0x2f34 Xeon E5 v3 PCIe Ring Performance Monitoring +product INTEL XE5_V3_RQPI_PM_1 0x2f36 Xeon E5 v3 QPI Ring Performance Monitoring +product INTEL XE5_V3_RQPI_PM_2 0x2f37 Xeon E5 v3 QPI Ring Interface Monitoring +product INTEL XE5_V3_IMC1_MAIN 0x2f68 Xeon E5 v3 IMC Main +product INTEL XE5_V3_IMC1_TADR1 0x2f6a Xeon E5 v3 IMC Ch 0-1 Target Address Decode Registers +product INTEL XE5_V3_IMC1_TADR2 0x2f6b Xeon E5 v3 IMC Ch 0-1 Target Address Decode Registers +product INTEL XE5_V3_IMC0_RAS 0x2f71 Xeon E5 v3 IMC RAS Registers +product INTEL XE5_V3_IMC1_RAS 0x2f79 Xeon E5 v3 IMC Ras Registers +product INTEL XE5_V3_UBOX_2 0x2f7d Xeon E5 v3 Scratchpad and Semaphores +product INTEL XE5_V3_QPI_LINK0 0x2f80 Xeon E5 v3 QPI Link 0 +product INTEL XE5_V3_RQPI_RING 0x2f81 Xeon E5 v3 QPI Ring Interface +product INTEL XE5_V3_QPI_LINK1 0x2f90 Xeon E5 v3 QPI Link 1 +product INTEL XE5_V3_PCU_1 0x2f98 Xeon E5 v3 Power Control Unit +product INTEL XE5_V3_PCU_2 0x2f99 Xeon E5 v3 Power Control Unit +product INTEL XE5_V3_PCU_3 0x2f9a Xeon E5 v3 Power Control Unit +product INTEL XE5_V3_PCU_5 0x2f9c Xeon E5 v3 Power Control Unit +product INTEL XE5_V3_IMC0_MAIN 0x2fa8 Xeon E5 v3 IMC Main +product INTEL XE5_V3_IMC0_TADR1 0x2faa Xeon E5 v3 IMC Ch 0-1 Target Address Decode Registers +product INTEL XE5_V3_IMC0_TADR2 0x2fab Xeon E5 v3 IMC Ch 0-1 Target Address Decode Registers +product INTEL XE5_V3_IMC0_TADR3 0x2fac Xeon E5 v3 IMC Ch 2-3 Target Address Decode Registers +product INTEL XE5_V3_IMC0_TADR4 0x2fad Xeon E5 v3 IMC Ch 2-3 Target Address Decode Registers +product INTEL XE5_V3_IMC0_REG1 0x2fb0 Xeon E5 v3 IMC Ch 0-1 Registers +product INTEL XE5_V3_IMC0_REG2 0x2fb1 Xeon E5 v3 IMC Ch 0-1 Registers +product INTEL XE5_V3_IMC0_REG3 0x2fb2 Xeon E5 v3 IMC Ch 2-3 Registers +product INTEL XE5_V3_IMC0_REG4 0x2fb3 Xeon E5 v3 IMC Ch 2-3 Registers +product INTEL XE5_V3_IMC0_REG5 0x2fb4 Xeon E5 v3 IMC Ch 0-1 Registers +product INTEL XE5_V3_IMC0_REG6 0x2fb5 Xeon E5 v3 IMC Ch 0-1 Registers +product INTEL XE5_V3_IMC0_REG7 0x2fb6 Xeon E5 v3 IMC Ch 2-3 Registers +product INTEL XE5_V3_IMC0_REG8 0x2fb7 Xeon E5 v3 IMC Ch 2-3 Registers +product INTEL XE5_V3_IMC0_DDRIO_1 0x2fba Xeon E5 v3 IMC DDRIO Multicast +product INTEL XE5_V3_IMC0_DDRIO_2 0x2fbb Xeon E5 v3 IMC DDRIO Multicast +product INTEL XE5_V3_IMC1_DDRIO_5 0x2fbc Xeo
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: martin Date: Fri Mar 20 08:32:27 UTC 2015 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: aes.inc Log Message: Only use -fno-integrated-as for clang To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.2 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.3 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc:1.2 Thu Mar 19 19:27:14 2015 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes.inc Fri Mar 20 08:32:27 2015 @@ -1,5 +1,7 @@ .PATH.S: ${.PARSEDIR} AES_SRCS = aes-armv4.S aesv8-armx.S bsaes-armv7.S aes_cbc.c AESCPPFLAGS = -DAES_ASM -DBSAES_ASM +.if ${ACTIVE_CC} == "clang" AFLAGS.aes-armv4.S= -fno-integrated-as +.endif .include "../../aes.inc"
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: skrll Date: Fri Mar 20 07:57:27 UTC 2015 Modified Files: src/sys/arch/arm/cortex: gic.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/cortex/gic.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/arm/cortex/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.15 src/sys/arch/arm/cortex/gic.c:1.16 --- src/sys/arch/arm/cortex/gic.c:1.15 Thu Mar 12 21:05:07 2015 +++ src/sys/arch/arm/cortex/gic.c Fri Mar 20 07:57:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gic.c,v 1.15 2015/03/12 21:05:07 skrll Exp $ */ +/* $NetBSD: gic.c,v 1.16 2015/03/20 07:57:27 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.15 2015/03/12 21:05:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.16 2015/03/20 07:57:27 skrll Exp $"); #include #include @@ -270,7 +270,7 @@ armgic_irq_handler(void *tf) #if 0 const int ipl = armgic_priority_to_ipl(gicc_read(sc, GICC_RPR)); KASSERTMSG(panicstr != NULL || ipl == is->is_ipl, - "%s: irq %d: running ipl %d != source ipl %u", + "%s: irq %d: running ipl %d != source ipl %u", ci->ci_data.cpu_name, irq, ipl, is->is_ipl); #else const int ipl = is->is_ipl; @@ -332,7 +332,7 @@ armgic_establish_irq(struct pic_softc *p "irq %u: not valid (group[%zu]=0x%08x [0x%08x])", is->is_irq, group, sc->sc_gic_valid_lines[group], (uint32_t)__BIT(irq)); - + KASSERTMSG(is->is_type == IST_LEVEL || is->is_type == IST_EDGE, "irq %u: type %u unsupported", is->is_irq, is->is_type); @@ -342,7 +342,7 @@ armgic_establish_irq(struct pic_softc *p uint32_t cfg = gicd_read(sc, cfg_reg); if (group > 0) { - /* + /* * There are 4 irqs per TARGETS register. For now bind * to the primary cpu. */ @@ -357,7 +357,7 @@ armgic_establish_irq(struct pic_softc *p targets |= 1 << byte_shift; gicd_write(sc, targets_reg, targets); - /* + /* * There are 16 irqs per CFG register. 10=EDGE 00=LEVEL */ uint32_t new_cfg = cfg; @@ -384,7 +384,7 @@ armgic_establish_irq(struct pic_softc *p #endif } - /* + /* * There are 4 irqs per PRIORITY register. Map the IPL * to GIC priority. */ @@ -436,7 +436,7 @@ static void armgic_cpu_init_targets(struct armgic_softc *sc) { /* - * Update the mpsafe targets + * Update the mpsafe targets */ for (size_t irq = 32; irq < sc->sc_pic.pic_maxsources; irq++) { struct intrsource * const is = sc->sc_pic.pic_sources[irq];