CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
Module Name:src Committed By: riastradh Date: Fri Jul 18 03:11:55 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c Log Message: Don't forget to pmap_update after pmap_kremove! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.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/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.3 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.3 Fri Jul 18 00:00:51 2014 +++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c Fri Jul 18 03:11:55 2014 @@ -759,6 +759,7 @@ void ttm_bo_kunmap(struct ttm_bo_kmap_ob case ttm_bo_map_vmap: #ifdef __NetBSD__ pmap_kremove((vaddr_t)map->virtual, map->u.uvm.vsize); + pmap_update(pmap_kernel()); uvm_km_free(kernel_map, (vaddr_t)map->virtual, map->u.uvm.vsize, UVM_KMF_VAONLY); #else
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: riz Date: Fri Jul 18 02:53:09 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.6 Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.0.6 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-6.0.6 diff -u src/doc/CHANGES-6.0.6:1.1.2.16 src/doc/CHANGES-6.0.6:1.1.2.17 --- src/doc/CHANGES-6.0.6:1.1.2.16 Fri Jul 18 02:43:41 2014 +++ src/doc/CHANGES-6.0.6 Fri Jul 18 02:53:09 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.6,v 1.1.2.16 2014/07/18 02:43:41 riz Exp $ +# $NetBSD: CHANGES-6.0.6,v 1.1.2.17 2014/07/18 02:53:09 riz Exp $ A complete list of changes from the NetBSD 6.0.5 release to the NetBSD 6.0.6 release: @@ -663,6 +663,7 @@ sys/kern/sys_module.c1.15 Fix a user-controlled memory allocation. [maxv, ticket #1098] + distrib/utils/sysinst/arch/alpha/md.c 1.53 Make sysinst deal correctly with Tru64 disklabels. PR#48697
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: riz Date: Fri Jul 18 02:52:43 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.5 Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-6.1.5 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-6.1.5 diff -u src/doc/CHANGES-6.1.5:1.1.2.16 src/doc/CHANGES-6.1.5:1.1.2.17 --- src/doc/CHANGES-6.1.5:1.1.2.16 Fri Jul 18 02:52:18 2014 +++ src/doc/CHANGES-6.1.5 Fri Jul 18 02:52:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.5,v 1.1.2.16 2014/07/18 02:52:18 riz Exp $ +# $NetBSD: CHANGES-6.1.5,v 1.1.2.17 2014/07/18 02:52:43 riz Exp $ A complete list of changes from the NetBSD 6.1.4 release to the NetBSD 6.1.5 release: @@ -663,6 +663,7 @@ sys/kern/sys_module.c1.15 Fix a user-controlled memory allocation. [maxv, ticket #1098] + distrib/utils/sysinst/arch/alpha/md.c 1.53 Make sysinst deal correctly with Tru64 disklabels. PR#48697
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: riz Date: Fri Jul 18 02:52:18 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.5 Log Message: ticket 1080 To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.1.5 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-6.1.5 diff -u src/doc/CHANGES-6.1.5:1.1.2.15 src/doc/CHANGES-6.1.5:1.1.2.16 --- src/doc/CHANGES-6.1.5:1.1.2.15 Mon Jul 14 06:34:51 2014 +++ src/doc/CHANGES-6.1.5 Fri Jul 18 02:52:18 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.5,v 1.1.2.15 2014/07/14 06:34:51 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.5,v 1.1.2.16 2014/07/18 02:52:18 riz Exp $ A complete list of changes from the NetBSD 6.1.4 release to the NetBSD 6.1.5 release: @@ -663,3 +663,8 @@ sys/kern/sys_module.c1.15 Fix a user-controlled memory allocation. [maxv, ticket #1098] +distrib/utils/sysinst/arch/alpha/md.c 1.53 + + Make sysinst deal correctly with Tru64 disklabels. PR#48697 + [tsutsui, ticket #1080] +
CVS commit: [netbsd-6-1] src/distrib/utils/sysinst/arch/alpha
Module Name:src Committed By: riz Date: Fri Jul 18 02:51:52 UTC 2014 Modified Files: src/distrib/utils/sysinst/arch/alpha [netbsd-6-1]: md.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1080): distrib/utils/sysinst/arch/alpha/md.c: revision 1.53 Apply patch in PR port-alpha/48697 (with some tweaks). Tru64 UNIX's disklabel is the same format as BSD disklabel, and it seems Tru64 stores incorrect geometry values in d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). d_secperunit seems always reliable so use it to get dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. Should be pulled up to netbsd-6 branches. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.51.16.1 src/distrib/utils/sysinst/arch/alpha/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/alpha/md.c diff -u src/distrib/utils/sysinst/arch/alpha/md.c:1.51 src/distrib/utils/sysinst/arch/alpha/md.c:1.51.16.1 --- src/distrib/utils/sysinst/arch/alpha/md.c:1.51 Fri Nov 4 11:27:01 2011 +++ src/distrib/utils/sysinst/arch/alpha/md.c Fri Jul 18 02:51:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.51 2011/11/04 11:27:01 martin Exp $ */ +/* $NetBSD: md.c,v 1.51.16.1 2014/07/18 02:51:52 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -85,19 +85,19 @@ md_get_info(void) dlcyl = disklabel.d_ncylinders; dlhead = disklabel.d_ntracks; - dlsec = disklabel.d_nsectors; sectorsize = disklabel.d_secsize; - dlcylsize = disklabel.d_secpercyl; + dlsize = disklabel.d_secperunit; /* - * Compute whole disk size. Take max of (dlcyl*dlhead*dlsec) - * and secperunit, just in case the disk is already labelled. - * (If our new label's RAW_PART size ends up smaller than the - * in-core RAW_PART size value, updating the label will fail.) + * Tru64 UNIX's disklabel is the same format as BSD disklabel, + * and it seems Tru64 stores incorrect geometry values in + * d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). + * d_secperunit seems always reliable so use it to get + * dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. + * See PR/48697 for details. */ - dlsize = dlcyl*dlhead*dlsec; - if (disklabel.d_secperunit > dlsize) - dlsize = disklabel.d_secperunit; + dlsec = dlsize / (dlhead * dlcyl); + dlcylsize = dlsec * dlhead; return 1; }
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: riz Date: Fri Jul 18 02:43:41 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.6 Log Message: Ticket 1080. To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.0.6 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-6.0.6 diff -u src/doc/CHANGES-6.0.6:1.1.2.15 src/doc/CHANGES-6.0.6:1.1.2.16 --- src/doc/CHANGES-6.0.6:1.1.2.15 Mon Jul 14 06:35:33 2014 +++ src/doc/CHANGES-6.0.6 Fri Jul 18 02:43:41 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.6,v 1.1.2.15 2014/07/14 06:35:33 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.6,v 1.1.2.16 2014/07/18 02:43:41 riz Exp $ A complete list of changes from the NetBSD 6.0.5 release to the NetBSD 6.0.6 release: @@ -663,3 +663,8 @@ sys/kern/sys_module.c1.15 Fix a user-controlled memory allocation. [maxv, ticket #1098] +distrib/utils/sysinst/arch/alpha/md.c 1.53 + + Make sysinst deal correctly with Tru64 disklabels. PR#48697 + [tsutsui, ticket #1080] +
CVS commit: [netbsd-6-0] src/distrib/utils/sysinst/arch/alpha
Module Name:src Committed By: riz Date: Fri Jul 18 02:43:13 UTC 2014 Modified Files: src/distrib/utils/sysinst/arch/alpha [netbsd-6-0]: md.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1080): distrib/utils/sysinst/arch/alpha/md.c: revision 1.53 Apply patch in PR port-alpha/48697 (with some tweaks). Tru64 UNIX's disklabel is the same format as BSD disklabel, and it seems Tru64 stores incorrect geometry values in d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). d_secperunit seems always reliable so use it to get dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. Should be pulled up to netbsd-6 branches. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.51.8.1 src/distrib/utils/sysinst/arch/alpha/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/alpha/md.c diff -u src/distrib/utils/sysinst/arch/alpha/md.c:1.51 src/distrib/utils/sysinst/arch/alpha/md.c:1.51.8.1 --- src/distrib/utils/sysinst/arch/alpha/md.c:1.51 Fri Nov 4 11:27:01 2011 +++ src/distrib/utils/sysinst/arch/alpha/md.c Fri Jul 18 02:43:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.51 2011/11/04 11:27:01 martin Exp $ */ +/* $NetBSD: md.c,v 1.51.8.1 2014/07/18 02:43:13 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -85,19 +85,19 @@ md_get_info(void) dlcyl = disklabel.d_ncylinders; dlhead = disklabel.d_ntracks; - dlsec = disklabel.d_nsectors; sectorsize = disklabel.d_secsize; - dlcylsize = disklabel.d_secpercyl; + dlsize = disklabel.d_secperunit; /* - * Compute whole disk size. Take max of (dlcyl*dlhead*dlsec) - * and secperunit, just in case the disk is already labelled. - * (If our new label's RAW_PART size ends up smaller than the - * in-core RAW_PART size value, updating the label will fail.) + * Tru64 UNIX's disklabel is the same format as BSD disklabel, + * and it seems Tru64 stores incorrect geometry values in + * d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). + * d_secperunit seems always reliable so use it to get + * dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. + * See PR/48697 for details. */ - dlsize = dlcyl*dlhead*dlsec; - if (disklabel.d_secperunit > dlsize) - dlsize = disklabel.d_secperunit; + dlsec = dlsize / (dlhead * dlcyl); + dlcylsize = dlsec * dlhead; return 1; }
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Fri Jul 18 02:42:02 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Tickets 1079, 1080. To generate a diff of this commit: cvs rdiff -u -r1.1.2.123 -r1.1.2.124 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.123 src/doc/CHANGES-6.2:1.1.2.124 --- src/doc/CHANGES-6.2:1.1.2.123 Mon Jul 14 06:34:22 2014 +++ src/doc/CHANGES-6.2 Fri Jul 18 02:42:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.123 2014/07/14 06:34:22 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.124 2014/07/18 02:42:02 riz Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -2962,3 +2962,21 @@ sys/kern/sys_module.c1.15 Fix a user-controlled memory allocation. [maxv, ticket #1098] + +distrib/utils/sysinst/arch/alpha/md.c 1.52 +distrib/utils/sysinst/arch/landisk/md.c 1.11 +distrib/utils/sysinst/arch/macppc/md.c 1.46 +distrib/utils/sysinst/arch/mipsco/md.c 1.21 +distrib/utils/sysinst/arch/news68k/md.c 1.35 +distrib/utils/sysinst/arch/newsmips/md.c 1.22 +distrib/utils/sysinst/arch/pmax/md.c 1.68 +distrib/utils/sysinst/arch/vax/md.c 1.40 + + Use msg_display(3) rather than printf(3) to print dobootblk messages. + [tsutsui, ticket #1079] + +distrib/utils/sysinst/arch/alpha/md.c 1.53 + + Make sysinst deal correctly with Tru64 disklabels. PR#48697 + [tsutsui, ticket #1080] +
CVS commit: [netbsd-6] src/distrib/utils/sysinst/arch/alpha
Module Name:src Committed By: riz Date: Fri Jul 18 02:41:34 UTC 2014 Modified Files: src/distrib/utils/sysinst/arch/alpha [netbsd-6]: md.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1080): distrib/utils/sysinst/arch/alpha/md.c: revision 1.53 Apply patch in PR port-alpha/48697 (with some tweaks). Tru64 UNIX's disklabel is the same format as BSD disklabel, and it seems Tru64 stores incorrect geometry values in d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). d_secperunit seems always reliable so use it to get dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. Should be pulled up to netbsd-6 branches. To generate a diff of this commit: cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/distrib/utils/sysinst/arch/alpha/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/alpha/md.c diff -u src/distrib/utils/sysinst/arch/alpha/md.c:1.51.2.1 src/distrib/utils/sysinst/arch/alpha/md.c:1.51.2.2 --- src/distrib/utils/sysinst/arch/alpha/md.c:1.51.2.1 Fri Jul 18 02:21:53 2014 +++ src/distrib/utils/sysinst/arch/alpha/md.c Fri Jul 18 02:41:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.51.2.1 2014/07/18 02:21:53 riz Exp $ */ +/* $NetBSD: md.c,v 1.51.2.2 2014/07/18 02:41:34 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -85,19 +85,19 @@ md_get_info(void) dlcyl = disklabel.d_ncylinders; dlhead = disklabel.d_ntracks; - dlsec = disklabel.d_nsectors; sectorsize = disklabel.d_secsize; - dlcylsize = disklabel.d_secpercyl; + dlsize = disklabel.d_secperunit; /* - * Compute whole disk size. Take max of (dlcyl*dlhead*dlsec) - * and secperunit, just in case the disk is already labelled. - * (If our new label's RAW_PART size ends up smaller than the - * in-core RAW_PART size value, updating the label will fail.) + * Tru64 UNIX's disklabel is the same format as BSD disklabel, + * and it seems Tru64 stores incorrect geometry values in + * d_nsectors (sectors/track) and d_secpercyl (sectors/cylinder). + * d_secperunit seems always reliable so use it to get + * dlsec (sectors/track) and dlcylsize (sectors/cylinder) values. + * See PR/48697 for details. */ - dlsize = dlcyl*dlhead*dlsec; - if (disklabel.d_secperunit > dlsize) - dlsize = disklabel.d_secperunit; + dlsec = dlsize / (dlhead * dlcyl); + dlcylsize = dlsec * dlhead; return 1; }
CVS commit: [netbsd-6] src/distrib/utils/sysinst/arch
Module Name:src Committed By: riz Date: Fri Jul 18 02:21:53 UTC 2014 Modified Files: src/distrib/utils/sysinst/arch/alpha [netbsd-6]: md.c src/distrib/utils/sysinst/arch/landisk [netbsd-6]: md.c src/distrib/utils/sysinst/arch/macppc [netbsd-6]: md.c src/distrib/utils/sysinst/arch/mipsco [netbsd-6]: md.c src/distrib/utils/sysinst/arch/news68k [netbsd-6]: md.c src/distrib/utils/sysinst/arch/newsmips [netbsd-6]: md.c src/distrib/utils/sysinst/arch/pmax [netbsd-6]: md.c src/distrib/utils/sysinst/arch/vax [netbsd-6]: md.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1079): distrib/utils/sysinst/arch/newsmips/md.c: revision 1.22 distrib/utils/sysinst/arch/pmax/md.c: revision 1.68 distrib/utils/sysinst/arch/vax/md.c: revision 1.40 distrib/utils/sysinst/arch/alpha/md.c: revision 1.52 distrib/utils/sysinst/arch/macppc/md.c: revision 1.46 distrib/utils/sysinst/arch/mipsco/md.c: revision 1.21 distrib/utils/sysinst/arch/landisk/md.c: revision 1.11 distrib/utils/sysinst/arch/news68k/md.c: revision 1.35 Use msg_display(3) rather than printf(3) to print dobootblk messages. The latter won't show any characters on the sysinst screen and other ports have used the former. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.51.2.1 src/distrib/utils/sysinst/arch/alpha/md.c cvs rdiff -u -r1.10 -r1.10.2.1 src/distrib/utils/sysinst/arch/landisk/md.c cvs rdiff -u -r1.45 -r1.45.2.1 src/distrib/utils/sysinst/arch/macppc/md.c cvs rdiff -u -r1.20 -r1.20.2.1 src/distrib/utils/sysinst/arch/mipsco/md.c cvs rdiff -u -r1.34 -r1.34.2.1 src/distrib/utils/sysinst/arch/news68k/md.c cvs rdiff -u -r1.21 -r1.21.2.1 src/distrib/utils/sysinst/arch/newsmips/md.c cvs rdiff -u -r1.67 -r1.67.2.1 src/distrib/utils/sysinst/arch/pmax/md.c cvs rdiff -u -r1.39 -r1.39.2.1 src/distrib/utils/sysinst/arch/vax/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/alpha/md.c diff -u src/distrib/utils/sysinst/arch/alpha/md.c:1.51 src/distrib/utils/sysinst/arch/alpha/md.c:1.51.2.1 --- src/distrib/utils/sysinst/arch/alpha/md.c:1.51 Fri Nov 4 11:27:01 2011 +++ src/distrib/utils/sysinst/arch/alpha/md.c Fri Jul 18 02:21:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.51 2011/11/04 11:27:01 martin Exp $ */ +/* $NetBSD: md.c,v 1.51.2.1 2014/07/18 02:21:53 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -151,7 +151,7 @@ md_post_newfs(void) char *bootxx; int error; - printf(msg_string(MSG_dobootblks), diskdev); + msg_display(MSG_dobootblks, diskdev); cp_to_target("/usr/mdec/boot", "/boot"); bootxx = bootxx_name(); if (bootxx != NULL) { Index: src/distrib/utils/sysinst/arch/landisk/md.c diff -u src/distrib/utils/sysinst/arch/landisk/md.c:1.10 src/distrib/utils/sysinst/arch/landisk/md.c:1.10.2.1 --- src/distrib/utils/sysinst/arch/landisk/md.c:1.10 Fri Nov 4 11:27:03 2011 +++ src/distrib/utils/sysinst/arch/landisk/md.c Fri Jul 18 02:21:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.10 2011/11/04 11:27:03 martin Exp $ */ +/* $NetBSD: md.c,v 1.10.2.1 2014/07/18 02:21:53 riz Exp $ */ /* * Copyright 1997,2002 Piermont Information Systems Inc. @@ -124,7 +124,7 @@ md_post_newfs(void) char *bootxx; int error; - printf (msg_string(MSG_dobootblks), diskdev); + msg_display(MSG_dobootblks, diskdev); cp_to_target("/usr/mdec/boot", "/boot"); bootxx = bootxx_name(); if (bootxx != NULL) { Index: src/distrib/utils/sysinst/arch/macppc/md.c diff -u src/distrib/utils/sysinst/arch/macppc/md.c:1.45 src/distrib/utils/sysinst/arch/macppc/md.c:1.45.2.1 --- src/distrib/utils/sysinst/arch/macppc/md.c:1.45 Fri Nov 4 11:27:03 2011 +++ src/distrib/utils/sysinst/arch/macppc/md.c Fri Jul 18 02:21:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.45 2011/11/04 11:27:03 martin Exp $ */ +/* $NetBSD: md.c,v 1.45.2.1 2014/07/18 02:21:53 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -175,7 +175,7 @@ md_post_newfs(void) if (bsdlabel[PART_A].pi_offset != 0) return 0; - printf (msg_string(MSG_dobootblks), diskdev); + msg_display(MSG_dobootblks, diskdev); cp_to_target("/usr/mdec/ofwboot", bootfile); sync(); run_program(RUN_DISPLAY, "/usr/sbin/installboot /dev/r%sa %s %s", Index: src/distrib/utils/sysinst/arch/mipsco/md.c diff -u src/distrib/utils/sysinst/arch/mipsco/md.c:1.20 src/distrib/utils/sysinst/arch/mipsco/md.c:1.20.2.1 --- src/distrib/utils/sysinst/arch/mipsco/md.c:1.20 Thu Jan 5 21:32:36 2012 +++ src/distrib/utils/sysinst/arch/mipsco/md.c Fri Jul 18 02:21:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.20 2012/01/05 21:32:36 christos Exp $ */ +/* $NetBSD: md.c,v 1.20.2.1 2014/07/18 02:21:53 riz Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -160,7 +160,7 @@ md_post_newfs(void) return 0;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: ozaki-r Date: Fri Jul 18 02:10:55 UTC 2014 Modified Files: src/sys/dev/pci: if_vioif.c Log Message: Don't set SOFTINT_MPSAFE to vioif_rx_softint vioif_rx_softint calls vioif_populate_rx_mbufs that is not MPSAFE. vioif_populate_rx_mbufs is also called via vioif_ioctl and so can be called by two LWPs simultaneously, resulting in kernel panic. PR kern/49007 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/if_vioif.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/pci/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.4 src/sys/dev/pci/if_vioif.c:1.5 --- src/sys/dev/pci/if_vioif.c:1.4 Thu May 9 12:23:17 2013 +++ src/sys/dev/pci/if_vioif.c Fri Jul 18 02:10:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $ */ +/* $NetBSD: if_vioif.c,v 1.5 2014/07/18 02:10:55 ozaki-r Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.4 2013/05/09 12:23:17 minoura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.5 2014/07/18 02:10:55 ozaki-r Exp $"); #include #include @@ -557,7 +557,7 @@ vioif_attach(device_t parent, device_t s } } - sc->sc_rx_softint = softint_establish(SOFTINT_NET|SOFTINT_MPSAFE, + sc->sc_rx_softint = softint_establish(SOFTINT_NET, vioif_rx_softint, sc); if (sc->sc_rx_softint == NULL) { aprint_error_dev(self, "cannot establish softint\n");
CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
Module Name:src Committed By: riastradh Date: Fri Jul 18 00:00:51 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/ttm: ttm_bo_util.c Log Message: We need just a VA, not wired physical pages too. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.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/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.2 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c Fri Jul 18 00:00:51 2014 @@ -666,7 +666,7 @@ static int ttm_bo_kmap_ttm(struct ttm_bu KASSERT(start_page <= (ttm->num_pages - num_pages)); prot = ttm_io_prot(mem->placement, (VM_PROT_READ | VM_PROT_WRITE)); vaddr = uvm_km_alloc(kernel_map, (num_pages << PAGE_SHIFT), PAGE_SIZE, - UVM_KMF_WIRED | UVM_KMF_VAONLY | UVM_KMF_CANFAIL | UVM_KMF_WAITVA); + UVM_KMF_VAONLY | UVM_KMF_CANFAIL | UVM_KMF_WAITVA); if (vaddr == 0) return -ENOMEM; for (i = 0; i < num_pages; i++)
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Thu Jul 17 21:14:24 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem_stolen.c Log Message: Don't double-free obj->pages, with two different allocators to boot! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.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/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c:1.2 Wed Jul 16 20:56:24 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_stolen.c Thu Jul 17 21:14:24 2014 @@ -302,8 +302,8 @@ static void i915_gem_object_put_pages_st kmem_free(obj->pages, (obj->igo_nsegs * sizeof(obj->pages[0]))); #else sg_free_table(obj->pages); -#endif kfree(obj->pages); +#endif } static const struct drm_i915_gem_object_ops i915_gem_object_stolen_ops = {
CVS commit: src/sys/external/bsd/drm2/pci
Module Name:src Committed By: riastradh Date: Thu Jul 17 21:13:49 UTC 2014 Modified Files: src/sys/external/bsd/drm2/pci: drm_pci.c Log Message: Destroy the DMA subregion tag on error in drm_pci_detach. Now that drm_pci_attach calls the driver load function, rather than deferring it to the caller, the DMA subregion tag can be created here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/pci/drm_pci.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/external/bsd/drm2/pci/drm_pci.c diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.4 src/sys/external/bsd/drm2/pci/drm_pci.c:1.5 --- src/sys/external/bsd/drm2/pci/drm_pci.c:1.4 Wed Jul 16 20:56:25 2014 +++ src/sys/external/bsd/drm2/pci/drm_pci.c Thu Jul 17 21:13:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_pci.c,v 1.4 2014/07/16 20:56:25 riastradh Exp $ */ +/* $NetBSD: drm_pci.c,v 1.5 2014/07/17 21:13:49 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.4 2014/07/16 20:56:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.5 2014/07/17 21:13:49 riastradh Exp $"); #include #include @@ -167,7 +167,8 @@ fail2: __unused fail1: drm_pci_agp_destroy(dev); dev->bus_nmaps = 0; kmem_free(dev->bus_maps, PCI_NUM_RESOURCES * sizeof(dev->bus_maps[0])); - KASSERT(!dev->dmat_subregion_p); + if (dev->dmat_subregion_p) + bus_dmatag_destroy(dev->dmat); drm_dev_unref(dev); fail0: return ret; }
CVS commit: src/sys/external/bsd/drm2/include/linux
Module Name:src Committed By: riastradh Date: Thu Jul 17 20:56:14 UTC 2014 Modified Files: src/sys/external/bsd/drm2/include/linux: firmware.h Log Message: Elide up to one excess driver-named component from firmware pathnames. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/firmware.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/external/bsd/drm2/include/linux/firmware.h diff -u src/sys/external/bsd/drm2/include/linux/firmware.h:1.4 src/sys/external/bsd/drm2/include/linux/firmware.h:1.5 --- src/sys/external/bsd/drm2/include/linux/firmware.h:1.4 Thu Jul 17 20:37:01 2014 +++ src/sys/external/bsd/drm2/include/linux/firmware.h Thu Jul 17 20:56:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: firmware.h,v 1.4 2014/07/17 20:37:01 riastradh Exp $ */ +/* $NetBSD: firmware.h,v 1.5 2014/07/17 20:56:14 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -51,14 +51,24 @@ static inline int request_firmware(const struct firmware **fwp, const char *image_name, struct device *dev) { + const char *drvname; struct firmware *fw; int ret; fw = kmem_alloc(sizeof(*fw), KM_SLEEP); + /* + * If driver xyz(4) asks for xyz/foo/bar.bin, turn that into + * just foo/bar.bin. This leaves open the possibility of name + * collisions. Let's hope upstream is sensible about this. + */ + drvname = device_cfdriver(dev)->cd_name; + if ((strncmp(drvname, image_name, strlen(drvname)) == 0) && + (image_name[strlen(drvname)] == '/')) + image_name += (strlen(drvname) + 1); + /* XXX errno NetBSD->Linux */ - ret = -firmware_open(device_cfdriver(dev)->cd_name, image_name, - &fw->fw_h); + ret = -firmware_open(drvname, image_name, &fw->fw_h); if (ret) goto fail0; fw->size = firmware_get_size(fw->fw_h);
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Thu Jul 17 20:41:22 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_device.c Log Message: In radeon_device_init, use ddev->dev, not &pdev->dev, for rdev->dev. ddev->dev is the actual device_t, and we need it for firmware load. &pdev->dev is a dummy structure that serves no purpose except some kludge in our Linux PCI compatibility crap. In Linux the two should be the same, so no need to #ifdef __NetBSD__ this. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.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/external/bsd/drm2/dist/drm/radeon/radeon_device.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_device.c Thu Jul 17 20:41:22 2014 @@ -1250,7 +1250,7 @@ int radeon_device_init(struct radeon_dev #endif rdev->shutdown = false; - rdev->dev = &pdev->dev; + rdev->dev = ddev->dev; rdev->ddev = ddev; rdev->pdev = pdev; rdev->flags = flags;
CVS commit: src/sys/external/bsd/drm2/include/linux
Module Name:src Committed By: riastradh Date: Thu Jul 17 20:37:01 UTC 2014 Modified Files: src/sys/external/bsd/drm2/include/linux: firmware.h Log Message: Tweak failure case for Linux firmware API. request_firmware is guaranteed to yield null on failure; release_firmware on null is guaranteed to be a no-op. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/include/linux/firmware.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/external/bsd/drm2/include/linux/firmware.h diff -u src/sys/external/bsd/drm2/include/linux/firmware.h:1.3 src/sys/external/bsd/drm2/include/linux/firmware.h:1.4 --- src/sys/external/bsd/drm2/include/linux/firmware.h:1.3 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/include/linux/firmware.h Thu Jul 17 20:37:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: firmware.h,v 1.3 2014/07/16 20:59:58 riastradh Exp $ */ +/* $NetBSD: firmware.h,v 1.4 2014/07/17 20:37:01 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -76,6 +76,7 @@ request_firmware(const struct firmware * fail1: firmware_free(fw->data, fw->size); fail0: KASSERT(ret); kmem_free(fw, sizeof(*fw)); + *fwp = NULL; return ret; } @@ -83,8 +84,10 @@ static inline void release_firmware(const struct firmware *fw) { - firmware_free(fw->data, fw->size); - kmem_free(__UNCONST(fw), sizeof(*fw)); + if (fw != NULL) { + firmware_free(fw->data, fw->size); + kmem_free(__UNCONST(fw), sizeof(*fw)); + } } #endif /* _LINUX_FIRMWARE_H_ */
CVS commit: src/sys
Module Name:src Committed By: bouyer Date: Thu Jul 17 19:58:18 UTC 2014 Modified Files: src/sys/arch/arm/omap: tiotg.c src/sys/dev/usb: motg.c motgvar.h Log Message: Try to recover from vbus errors. Some devices draw too much current at plug time, causing a trancient error. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/tiotg.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/usb/motg.c src/sys/dev/usb/motgvar.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/arm/omap/tiotg.c diff -u src/sys/arch/arm/omap/tiotg.c:1.1 src/sys/arch/arm/omap/tiotg.c:1.2 --- src/sys/arch/arm/omap/tiotg.c:1.1 Wed Jul 16 18:27:19 2014 +++ src/sys/arch/arm/omap/tiotg.c Thu Jul 17 19:58:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tiotg.c,v 1.1 2014/07/16 18:27:19 bouyer Exp $ */ +/* $NetBSD: tiotg.c,v 1.2 2014/07/17 19:58:18 bouyer Exp $ */ /* * Copyright (c) 2013 Manuel Bouyer. All rights reserved. * @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.1 2014/07/16 18:27:19 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1.2 2014/07/17 19:58:18 bouyer Exp $"); #include "opt_omap.h" #include "locators.h" @@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: tiotg.c,v 1. #include #include #include +#include #include #define MOTG_DEBUG @@ -376,27 +377,42 @@ ti_motg_intr(void *v) { struct ti_motg_softc *sc = v; uint32_t stat, stat0, stat1; - int vbus = 0; int rv = 0; + int i; mutex_spin_enter(&sc->sc_motg.sc_intr_lock); stat = TIOTG_USBC_READ4(sc, USBCTRL_STAT); stat0 = TIOTG_USBC_READ4(sc, USBCTRL_IRQ_STAT0); stat1 = TIOTG_USBC_READ4(sc, USBCTRL_IRQ_STAT1); - DPRINTF(("USB %d 0x%x 0x%x stat %d\n", sc->sc_ctrlport, stat0, stat1, stat)); + DPRINTF(("USB %d 0x%x 0x%x stat %d\n", + sc->sc_ctrlport, stat0, stat1, stat)); + /* try to deal with vbus errors */ + if (stat1 & MUSB2_MASK_IVBUSERR ) { + stat1 &= ~MUSB2_MASK_IVBUSERR; + for (i = 0; i < 1000; i++) { + TIOTG_USBC_WRITE4(sc, USBCTRL_IRQ_STAT1, + MUSB2_MASK_IVBUSERR); + motg_intr_vbus(&sc->sc_motg, stat & 0x1); + delay(1000); + stat = TIOTG_USBC_READ4(sc, USBCTRL_STAT); + if (stat & 0x1) +break; + } + } if (stat0) { TIOTG_USBC_WRITE4(sc, USBCTRL_IRQ_STAT0, stat0); } if (stat1) { TIOTG_USBC_WRITE4(sc, USBCTRL_IRQ_STAT1, stat1); } - if (stat1 & USBCTRL_IRQ_STAT1_DRVVBUS) { - vbus = ((stat & 0x1) ? 1 : 0); - DPRINTF(("USB %d stat %d\n", sc->sc_ctrlport, stat)); + if ((stat & 0x1) == 0) { + mutex_spin_exit(&sc->sc_motg.sc_intr_lock); + aprint_error_dev(sc->sc_motg.sc_dev, ": vbus error\n"); + return 1; } - if (stat0 != 0 || stat1 != 0 || stat != 0) { + if (stat0 != 0 || stat1 != 0) { rv = motg_intr(&sc->sc_motg, ((stat0 >> 16) & 0x), - stat0 & 0x, stat1 & 0xff, vbus); + stat0 & 0x, stat1 & 0xff); } mutex_spin_exit(&sc->sc_motg.sc_intr_lock); return rv; Index: src/sys/dev/usb/motg.c diff -u src/sys/dev/usb/motg.c:1.1 src/sys/dev/usb/motg.c:1.2 --- src/sys/dev/usb/motg.c:1.1 Wed Jul 16 18:22:23 2014 +++ src/sys/dev/usb/motg.c Thu Jul 17 19:58:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: motg.c,v 1.1 2014/07/16 18:22:23 bouyer Exp $ */ +/* $NetBSD: motg.c,v 1.2 2014/07/17 19:58:18 bouyer Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.1 2014/07/16 18:22:23 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.2 2014/07/17 19:58:18 bouyer Exp $"); #include #include @@ -464,10 +464,6 @@ motg_open(usbd_pipe_handle pipe) struct motg_softc *sc = pipe->device->bus->hci_private; struct motg_pipe *otgpipe = (struct motg_pipe *)pipe; usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc; -#if 0 - usbd_status err = USBD_NOMEM; - int ival; -#endif DPRINTF(("motg_open: pipe=%p, addr=%d, endpt=%d (%d)\n", pipe, pipe->device->address, @@ -660,7 +656,7 @@ motg_poll(struct usbd_bus *bus) int motg_intr(struct motg_softc *sc, uint16_t rx_ep, uint16_t tx_ep, -uint8_t ctrl, int vbus) +uint8_t ctrl) { KASSERT(mutex_owned(&sc->sc_intr_lock)); sc->sc_intr_tx_ep = tx_ep; @@ -674,6 +670,20 @@ motg_intr(struct motg_softc *sc, uint16_ return 1; } +int +motg_intr_vbus(struct motg_softc *sc, int vbus) +{ + uint8_t val; + if (sc->sc_mode == MOTG_MODE_HOST && vbus == 0) { + DPRINTF(("motg_intr_vbus: vbus down, try to re-enable\n")); + /* try to re-enter session for Host mode */ + val = UREAD1(sc, MUSB2_REG_DEVCTL); + val |= MUSB2_MASK_SESS; + UWRITE1(sc, MUSB2_REG_DEVCTL, val); + } + return 1; +} + usbd_status motg_allocm(struct usbd_bus *bus, usb_dma_t *dma, u_int32_t size) { Index: src/sys/dev/usb/motgvar.h diff -u src/sys/dev/usb/motgvar.h:1.1 src/sys/dev/usb/motgvar.h:1.2 --- src/sys/dev/usb/motgvar.h:1.1 Wed Jul 16 18:22:23 2014 +++ src/sys/dev/usb/motgvar.h T
CVS commit: src/sys/dev/usb
Module Name:src Committed By: riastradh Date: Thu Jul 17 19:23:40 UTC 2014 Modified Files: src/sys/dev/usb: usb.c Log Message: Need for atomic_cas_uint. To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/dev/usb/usb.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.151 src/sys/dev/usb/usb.c:1.152 --- src/sys/dev/usb/usb.c:1.151 Thu Jul 17 18:53:34 2014 +++ src/sys/dev/usb/usb.c Thu Jul 17 19:23:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.151 2014/07/17 18:53:34 riastradh Exp $ */ +/* $NetBSD: usb.c,v 1.152 2014/07/17 19:23:40 riastradh Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.151 2014/07/17 18:53:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.152 2014/07/17 19:23:40 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -61,6 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.15 #include #include #include +#include #include #include
CVS commit: src/sys/dev/usb
Module Name:src Committed By: riastradh Date: Thu Jul 17 18:53:35 UTC 2014 Modified Files: src/sys/dev/usb: usb.c Log Message: Don't touch task after calling it. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/dev/usb/usb.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.150 src/sys/dev/usb/usb.c:1.151 --- src/sys/dev/usb/usb.c:1.150 Thu Jul 17 18:42:37 2014 +++ src/sys/dev/usb/usb.c Thu Jul 17 18:53:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.150 2014/07/17 18:42:37 riastradh Exp $ */ +/* $NetBSD: usb.c,v 1.151 2014/07/17 18:53:34 riastradh Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.150 2014/07/17 18:42:37 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.151 2014/07/17 18:53:34 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -442,6 +442,7 @@ usb_task_thread(void *arg) { struct usb_task *task; struct usb_taskq *taskq; + bool mpsafe; taskq = arg; DPRINTF(("usb_task_thread: start taskq %s\n", taskq->name)); @@ -455,14 +456,16 @@ usb_task_thread(void *arg) } DPRINTFN(2,("usb_task_thread: woke up task=%p\n", task)); if (task != NULL) { + mpsafe = ISSET(task->flags, USB_TASKQ_MPSAFE); TAILQ_REMOVE(&taskq->tasks, task, next); task->queue = USB_NUM_TASKQS; mutex_exit(&taskq->lock); - if (!(task->flags & USB_TASKQ_MPSAFE)) + if (!mpsafe) KERNEL_LOCK(1, curlwp); task->fun(task->arg); - if (!(task->flags & USB_TASKQ_MPSAFE)) + /* Can't dereference task after this point. */ + if (!mpsafe) KERNEL_UNLOCK_ONE(curlwp); mutex_enter(&taskq->lock);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: riastradh Date: Thu Jul 17 18:42:38 UTC 2014 Modified Files: src/sys/dev/usb: usb.c usbdi.h Log Message: Fix usb task queue locking. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/dev/usb/usb.c cvs rdiff -u -r1.89 -r1.90 src/sys/dev/usb/usbdi.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.149 src/sys/dev/usb/usb.c:1.150 --- src/sys/dev/usb/usb.c:1.149 Sun Mar 16 05:20:29 2014 +++ src/sys/dev/usb/usb.c Thu Jul 17 18:42:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.149 2014/03/16 05:20:29 dholland Exp $ */ +/* $NetBSD: usb.c,v 1.150 2014/07/17 18:42:37 riastradh Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.149 2014/03/16 05:20:29 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.150 2014/07/17 18:42:37 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -355,28 +355,40 @@ usb_add_task(usbd_device_handle dev, str { struct usb_taskq *taskq; + KASSERT(0 <= queue); + KASSERT(queue < USB_NUM_TASKQS); taskq = &usb_taskq[queue]; mutex_enter(&taskq->lock); - if (task->queue == -1) { + if (atomic_cas_uint(&task->queue, USB_NUM_TASKQS, queue) == + USB_NUM_TASKQS) { DPRINTFN(2,("usb_add_task: task=%p\n", task)); TAILQ_INSERT_TAIL(&taskq->tasks, task, next); task->queue = queue; + cv_signal(&taskq->cv); } else { DPRINTFN(3,("usb_add_task: task=%p on q\n", task)); } - cv_signal(&taskq->cv); mutex_exit(&taskq->lock); } +/* + * XXX This does not wait for completion! Most uses need such an + * operation. Urgh... + */ void usb_rem_task(usbd_device_handle dev, struct usb_task *task) { + unsigned queue; - if (task->queue != -1) { - struct usb_taskq *taskq = &usb_taskq[task->queue]; + while ((queue = task->queue) != USB_NUM_TASKQS) { + struct usb_taskq *taskq = &usb_taskq[queue]; mutex_enter(&taskq->lock); - TAILQ_REMOVE(&taskq->tasks, task, next); - task->queue = -1; + if (__predict_true(task->queue == queue)) { + TAILQ_REMOVE(&taskq->tasks, task, next); + task->queue = USB_NUM_TASKQS; + mutex_exit(&taskq->lock); + break; + } mutex_exit(&taskq->lock); } } @@ -444,7 +456,7 @@ usb_task_thread(void *arg) DPRINTFN(2,("usb_task_thread: woke up task=%p\n", task)); if (task != NULL) { TAILQ_REMOVE(&taskq->tasks, task, next); - task->queue = -1; + task->queue = USB_NUM_TASKQS; mutex_exit(&taskq->lock); if (!(task->flags & USB_TASKQ_MPSAFE)) Index: src/sys/dev/usb/usbdi.h diff -u src/sys/dev/usb/usbdi.h:1.89 src/sys/dev/usb/usbdi.h:1.90 --- src/sys/dev/usb/usbdi.h:1.89 Thu Sep 26 07:25:31 2013 +++ src/sys/dev/usb/usbdi.h Thu Jul 17 18:42:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.h,v 1.89 2013/09/26 07:25:31 skrll Exp $ */ +/* $NetBSD: usbdi.h,v 1.90 2014/07/17 18:42:37 riastradh Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ /* @@ -202,7 +202,7 @@ struct usb_task { TAILQ_ENTRY(usb_task) next; void (*fun)(void *); void *arg; - int queue; + volatile unsigned queue; int flags; }; #define USB_TASKQ_HC 0 @@ -213,7 +213,7 @@ struct usb_task { void usb_add_task(usbd_device_handle, struct usb_task *, int); void usb_rem_task(usbd_device_handle, struct usb_task *); -#define usb_init_task(t, f, a, fl) ((t)->fun = (f), (t)->arg = (a), (t)->queue = -1, (t)->flags = (fl)) +#define usb_init_task(t, f, a, fl) ((t)->fun = (f), (t)->arg = (a), (t)->queue = USB_NUM_TASKQS, (t)->flags = (fl)) struct usb_devno { u_int16_t ud_vendor;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Thu Jul 17 17:52:39 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_dp.c Log Message: intel_dp_aux_wait_done can run while cold. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.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/external/bsd/drm2/dist/drm/i915/intel_dp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.6 Thu Jul 17 17:17:24 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Thu Jul 17 17:52:39 2014 @@ -367,9 +367,8 @@ intel_dp_aux_wait_done(struct intel_dp * bool done; #define C (((status = I915_READ_NOTRACE(ch_ctl)) & DP_AUX_CH_CTL_SEND_BUSY) == 0) - if (has_aux_irq) #ifdef __NetBSD__ - { + if (has_aux_irq && !cold) { int ret; spin_lock(&dev_priv->gmbus_wait_lock); DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, @@ -377,13 +376,16 @@ intel_dp_aux_wait_done(struct intel_dp * C); done = ret; /* XXX ugh */ spin_unlock(&dev_priv->gmbus_wait_lock); - } + } else { + done = wait_for_atomic(C, 10) == 0; + } #else + if (has_aux_irq) done = wait_event_timeout(dev_priv->gmbus_wait_queue, C, msecs_to_jiffies_timeout(10)); -#endif else done = wait_for_atomic(C, 10) == 0; +#endif if (!done) DRM_ERROR("dp aux hw did not signal timeout (has irq: %i)!\n", has_aux_irq);
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Thu Jul 17 17:29:40 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_gart.c Log Message: Do a post-write DMA sync pos-write, not a pre-write one. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.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/external/bsd/drm2/dist/drm/radeon/radeon_gart.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_gart.c Thu Jul 17 17:29:39 2014 @@ -275,7 +275,7 @@ radeon_gart_post_update(struct radeon_de membar_sync(); /* XXX overkill */ if (rdev->gart.rg_table_map != NULL) bus_dmamap_sync(rdev->ddev->dmat, rdev->gart.rg_table_map, - gpu_pgstart*4, gpu_npages*4, BUS_DMASYNC_PREWRITE); + gpu_pgstart*4, gpu_npages*4, BUS_DMASYNC_POSTWRITE); radeon_gart_tlb_flush(rdev); } #endif
CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
Module Name:src Committed By: riastradh Date: Thu Jul 17 17:19:42 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/ttm: ttm_tt.c Log Message: Don't forget to advance the array index as we walk the queue... To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.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/external/bsd/drm2/dist/drm/ttm/ttm_tt.c diff -u src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.2 src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c Thu Jul 17 17:19:42 2014 @@ -366,6 +366,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) KASSERT(i < ttm->num_pages); KASSERT(ttm->pages[i] == NULL); ttm->pages[i] = container_of(page, struct page, p_vmp); + i++; } KASSERT(i == ttm->num_pages);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Thu Jul 17 17:17:24 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_dp.c Log Message: Lock the right lock around the gmbus condvar. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.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/external/bsd/drm2/dist/drm/i915/intel_dp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c:1.5 Wed Jul 16 20:56:25 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c Thu Jul 17 17:17:24 2014 @@ -371,12 +371,12 @@ intel_dp_aux_wait_done(struct intel_dp * #ifdef __NetBSD__ { int ret; - spin_lock(&dev_priv->irq_lock); + spin_lock(&dev_priv->gmbus_wait_lock); DRM_SPIN_TIMED_WAIT_UNTIL(ret, &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock, msecs_to_jiffies_timeout(10), C); done = ret; /* XXX ugh */ - spin_unlock(&dev_priv->irq_lock); + spin_unlock(&dev_priv->gmbus_wait_lock); } #else done = wait_event_timeout(dev_priv->gmbus_wait_queue, C,
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Jul 17 17:11:12 UTC 2014 Modified Files: src/sys/dev/usb: uatp.c src/sys/modules/uatp: uatp.ioconf Log Message: Fix wsmouse at uatp attachment for module. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/uatp.c cvs rdiff -u -r1.1 -r1.2 src/sys/modules/uatp/uatp.ioconf 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/usb/uatp.c diff -u src/sys/dev/usb/uatp.c:1.9 src/sys/dev/usb/uatp.c:1.10 --- src/sys/dev/usb/uatp.c:1.9 Mon Jul 14 14:58:32 2014 +++ src/sys/dev/usb/uatp.c Thu Jul 17 17:11:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uatp.c,v 1.9 2014/07/14 14:58:32 riastradh Exp $ */ +/* $NetBSD: uatp.c,v 1.10 2014/07/17 17:11:12 riastradh Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -146,7 +146,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.9 2014/07/14 14:58:32 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.10 2014/07/17 17:11:12 riastradh Exp $"); #include #include @@ -974,7 +974,8 @@ uatp_attach(device_t parent, device_t se /* Attach wsmouse. */ a.accessops = &uatp_accessops; a.accesscookie = sc; - sc->sc_wsmousedev = config_found(self, &a, wsmousedevprint); + sc->sc_wsmousedev = config_found_ia(self, "wsmousedev", &a, + wsmousedevprint); } /* Sysctl setup */ Index: src/sys/modules/uatp/uatp.ioconf diff -u src/sys/modules/uatp/uatp.ioconf:1.1 src/sys/modules/uatp/uatp.ioconf:1.2 --- src/sys/modules/uatp/uatp.ioconf:1.1 Sat Aug 4 04:37:26 2012 +++ src/sys/modules/uatp/uatp.ioconf Thu Jul 17 17:11:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: uatp.ioconf,v 1.1 2012/08/04 04:37:26 riastradh Exp $ +# $NetBSD: uatp.ioconf,v 1.2 2014/07/17 17:11:12 riastradh Exp $ ioconf uatp @@ -8,4 +8,3 @@ include "dev/usb/files.usb" pseudo-root uhidev* uatp* at uhidev? reportid ? -wsmouse* at uatp? mux 0
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Thu Jul 17 15:09:00 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_drv.c Log Message: Put in dummy gem uvm ops for radeon (uses ttm for real mmap). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.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/external/bsd/drm2/dist/drm/radeon/radeon_drv.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c:1.2 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c:1.2 Wed Jul 16 20:59:57 2014 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c Thu Jul 17 15:09:00 2014 @@ -337,6 +337,9 @@ struct drm_driver *const radeon_drm_driv const struct pci_device_id *const radeon_device_ids = pciidlist; const size_t radeon_n_device_ids = __arraycount(pciidlist); +/* XXX Kludge for the non-GEM GEM that radeon uses. */ +static const struct uvm_pagerops radeon_gem_uvm_ops; + #else static int radeon_kick_out_firmware_fb(struct pci_dev *pdev) @@ -560,6 +563,7 @@ static struct drm_driver kms_driver = { .dumb_destroy = drm_gem_dumb_destroy, #ifdef __NetBSD__ .fops = NULL, + .gem_uvm_ops = &radeon_gem_uvm_ops, #else .fops = &radeon_driver_kms_fops, #endif
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:55:32 UTC 2014 Modified Files: src/sys/sys: systm.h Log Message: Expand null macros to `do {} while (0)', not to nothing. To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.263 src/sys/sys/systm.h:1.264 --- src/sys/sys/systm.h:1.263 Thu Apr 3 15:22:57 2014 +++ src/sys/sys/systm.h Thu Jul 17 14:55:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.263 2014/04/03 15:22:57 christos Exp $ */ +/* $NetBSD: systm.h,v 1.264 2014/07/17 14:55:32 riastradh Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -527,7 +527,7 @@ void assert_sleepable(void); #if defined(DEBUG) #define ASSERT_SLEEPABLE() assert_sleepable() #else /* defined(DEBUG) */ -#define ASSERT_SLEEPABLE() /* nothing */ +#define ASSERT_SLEEPABLE() do {} while (0) #endif /* defined(DEBUG) */ vaddr_t calc_cache_size(vsize_t , int, int);
CVS commit: src/sys/external/bsd/drm2/include/linux
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:30:33 UTC 2014 Modified Files: src/sys/external/bsd/drm2/include/linux: atomic.h bitops.h Log Message: Correct return values of Linux test-and-set operations (PR 48999). Linux's Documentation/atomic_ops.txt says in no uncertain terms these must return 0 or 1, not zero or nonzero. I don't think this has caused an issue for drm (yet), but better to have it right. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/include/linux/atomic.h cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/bitops.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/external/bsd/drm2/include/linux/atomic.h diff -u src/sys/external/bsd/drm2/include/linux/atomic.h:1.6 src/sys/external/bsd/drm2/include/linux/atomic.h:1.7 --- src/sys/external/bsd/drm2/include/linux/atomic.h:1.6 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/include/linux/atomic.h Thu Jul 17 14:30:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic.h,v 1.6 2014/07/16 20:59:58 riastradh Exp $ */ +/* $NetBSD: atomic.h,v 1.7 2014/07/17 14:30:33 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -226,7 +226,7 @@ test_and_set_bit(unsigned int bit, volat do v = *p; while (atomic_cas_ulong(p, v, (v | mask)) != v); - return (v & mask); + return ((v & mask) != 0); } static inline unsigned long @@ -239,7 +239,7 @@ test_and_clear_bit(unsigned int bit, vol do v = *p; while (atomic_cas_ulong(p, v, (v & ~mask)) != v); - return (v & mask); + return ((v & mask) != 0); } static inline unsigned long @@ -252,7 +252,7 @@ test_and_change_bit(unsigned int bit, vo do v = *p; while (atomic_cas_ulong(p, v, (v ^ mask)) != v); - return (v & mask); + return ((v & mask) != 0); } #if defined(MULTIPROCESSOR) && !defined(__HAVE_ATOMIC_AS_MEMBAR) Index: src/sys/external/bsd/drm2/include/linux/bitops.h diff -u src/sys/external/bsd/drm2/include/linux/bitops.h:1.5 src/sys/external/bsd/drm2/include/linux/bitops.h:1.6 --- src/sys/external/bsd/drm2/include/linux/bitops.h:1.5 Thu Jul 17 14:28:28 2014 +++ src/sys/external/bsd/drm2/include/linux/bitops.h Thu Jul 17 14:30:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bitops.h,v 1.5 2014/07/17 14:28:28 riastradh Exp $ */ +/* $NetBSD: bitops.h,v 1.6 2014/07/17 14:30:33 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -107,7 +107,7 @@ __test_and_set_bit(unsigned int bit, vol v = *p; *p |= mask; - return (v & mask); + return ((v & mask) != 0); } static inline unsigned long @@ -121,7 +121,7 @@ __test_and_clear_bit(unsigned int bit, v v = *p; *p &= ~mask; - return (v & mask); + return ((v & mask) != 0); } static inline unsigned long @@ -135,7 +135,7 @@ __test_and_change_bit(unsigned int bit, v = *p; *p ^= mask; - return (v & mask); + return ((v & mask) != 0); } static inline unsigned long
CVS commit: src/sys/external/bsd/drm2/include/linux
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:28:28 UTC 2014 Modified Files: src/sys/external/bsd/drm2/include/linux: bitops.h Log Message: Add non-atomic Linux test-and-set operations. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/bitops.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/external/bsd/drm2/include/linux/bitops.h diff -u src/sys/external/bsd/drm2/include/linux/bitops.h:1.4 src/sys/external/bsd/drm2/include/linux/bitops.h:1.5 --- src/sys/external/bsd/drm2/include/linux/bitops.h:1.4 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/include/linux/bitops.h Thu Jul 17 14:28:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bitops.h,v 1.4 2014/07/16 20:59:58 riastradh Exp $ */ +/* $NetBSD: bitops.h,v 1.5 2014/07/17 14:28:28 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -97,6 +97,48 @@ __change_bit(unsigned int n, volatile un } static inline unsigned long +__test_and_set_bit(unsigned int bit, volatile unsigned long *ptr) +{ + const unsigned int units = (sizeof(*ptr) * CHAR_BIT); + volatile unsigned long *const p = &ptr[bit / units]; + const unsigned long mask = (1UL << (bit % units)); + unsigned long v; + + v = *p; + *p |= mask; + + return (v & mask); +} + +static inline unsigned long +__test_and_clear_bit(unsigned int bit, volatile unsigned long *ptr) +{ + const unsigned int units = (sizeof(*ptr) * CHAR_BIT); + volatile unsigned long *const p = &ptr[bit / units]; + const unsigned long mask = (1UL << (bit % units)); + unsigned long v; + + v = *p; + *p &= ~mask; + + return (v & mask); +} + +static inline unsigned long +__test_and_change_bit(unsigned int bit, volatile unsigned long *ptr) +{ + const unsigned int units = (sizeof(*ptr) * CHAR_BIT); + volatile unsigned long *const p = &ptr[bit / units]; + const unsigned long mask = (1UL << (bit % units)); + unsigned long v; + + v = *p; + *p ^= mask; + + return (v & mask); +} + +static inline unsigned long find_first_zero_bit(const unsigned long *ptr, unsigned long nbits) { const size_t bpl = (CHAR_BIT * sizeof(*ptr));
CVS commit: src/sys/external/bsd/drm2/include/linux
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:07:44 UTC 2014 Modified Files: src/sys/external/bsd/drm2/include/linux: gfp.h Log Message: Remove defunct declarations of alloc_page/free_page. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/gfp.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/external/bsd/drm2/include/linux/gfp.h diff -u src/sys/external/bsd/drm2/include/linux/gfp.h:1.4 src/sys/external/bsd/drm2/include/linux/gfp.h:1.5 --- src/sys/external/bsd/drm2/include/linux/gfp.h:1.4 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/include/linux/gfp.h Thu Jul 17 14:07:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gfp.h,v 1.4 2014/07/16 20:59:58 riastradh Exp $ */ +/* $NetBSD: gfp.h,v 1.5 2014/07/17 14:07:44 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -63,14 +63,6 @@ typedef int gfp_t; #define __GFP_WAIT __BIT(11) #define __GFP_ZERO __BIT(12) -/* XXX Make the nm output a little more greppable... */ -#define alloc_page linux_alloc_page -#define __free_page linux___free_page - struct page; -#if 0 -struct page * alloc_page(gfp_t); -void __free_page(struct page *); -#endif #endif /* _LINUX_GFP_H_ */
CVS commit: src/sys/external/bsd/drm2/radeon
Module Name:src Committed By: riastradh Date: Thu Jul 17 14:05:12 UTC 2014 Modified Files: src/sys/external/bsd/drm2/radeon: files.radeon Log Message: Push -Wno-missing-prototypes into specific radeon source files. Don't apply it willy-nilly to the whole kernel! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.1 src/sys/external/bsd/drm2/radeon/files.radeon:1.2 --- src/sys/external/bsd/drm2/radeon/files.radeon:1.1 Wed Jul 16 20:59:58 2014 +++ src/sys/external/bsd/drm2/radeon/files.radeon Thu Jul 17 14:05:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.radeon,v 1.1 2014/07/16 20:59:58 riastradh Exp $ +# $NetBSD: files.radeon,v 1.2 2014/07/17 14:05:12 riastradh Exp $ device radeondrmkms: drmkms, drmkms_pci, drmkms_ttm, genfb, wsemuldisplaydev attach radeondrmkms at pci @@ -6,22 +6,51 @@ attach radeondrmkms at pci makeoptions radeondrmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon" makeoptions radeondrmkms CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon" -# Apparently the radeon authors don't believe in declaring functions in -# header files. -makeoptions radeondrmkms CWARNFLAGS+="-Wno-missing-prototypes" - +makeoptions radeondrmkms "CWARNFLAGS.atombios_encoders.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.atombios_i2c.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.btc_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.ci_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.cik.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.cik_sdma.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.dce6_afmt.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.evergreen.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.evergreen_cs.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-shadow" makeoptions radeondrmkms "CWARNFLAGS.kv_dpm.c"+="-Wno-type-limits" +makeoptions radeondrmkms "CWARNFLAGS.ni.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.ni_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.r600.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.r600_cs.c"+="-Wno-shadow" +makeoptions radeondrmkms "CWARNFLAGS.r600_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_atombios.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_clocks.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms "CWARNFLAGS.radeon_combios.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_combios.c"+="-Wno-prototypes-field-initializers" makeoptions radeondrmkms "CWARNFLAGS.radeon_drv.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms "CWARNFLAGS.radeon_gem.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_irq_kms.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms "CWARNFLAGS.radeon_kms.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.radeon_legacy_crtc.c"+="-Wno-shadow" +makeoptions radeondrmkms"CWARNFLAGS.radeon_legacy_encoders.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_pm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_ttm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.radeon_vce.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rs780_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.rv6xx_dpm.c"+="-Wno-shadow" +makeoptions radeondrmkms"CWARNFLAGS.rv770.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.rv770_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.si.c"+="-Wno-missing-prototypes" makeoptions radeondrmkms"CWARNFLAGS.si_dpm.c"+="-Wno-missing-field-initializers" +makeoptions radeondrmkms"CWARNFLAGS.si_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.sumo_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.trinity_dpm.c"+="-Wno-missing-prototypes" +makeoptions radeondrmkms"CWARNFLAGS.vc
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Jul 17 13:52:22 UTC 2014 Modified Files: src/sys/external/bsd/drm2/linux: files.drmkms_linux src/sys/modules/drmkms_linux: Makefile Removed Files: src/sys/external/bsd/drm2/linux: linux_gfp.c Log Message: Remove needless linux_gfp.c. Trying to make do with Linux's page allocation interface is pretty much always wrong: either we let uvm allocate pages in uvm objects for us, or we use bus_dma. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/linux/files.drmkms_linux cvs rdiff -u -r1.2 -r0 src/sys/external/bsd/drm2/linux/linux_gfp.c cvs rdiff -u -r1.3 -r1.4 src/sys/modules/drmkms_linux/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/linux/files.drmkms_linux diff -u src/sys/external/bsd/drm2/linux/files.drmkms_linux:1.6 src/sys/external/bsd/drm2/linux/files.drmkms_linux:1.7 --- src/sys/external/bsd/drm2/linux/files.drmkms_linux:1.6 Wed Jul 16 20:56:25 2014 +++ src/sys/external/bsd/drm2/linux/files.drmkms_linux Thu Jul 17 13:52:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms_linux,v 1.6 2014/07/16 20:56:25 riastradh Exp $ +# $NetBSD: files.drmkms_linux,v 1.7 2014/07/17 13:52:22 riastradh Exp $ define drmkms_linux: i2cexec, i2c_bitbang @@ -6,7 +6,6 @@ makeoptions drmkms_linux CPPFLAGS+="-I$ makeoptions drmkms_linux CPPFLAGS+="-I$S/external/bsd/common/include" file external/bsd/drm2/linux/linux_dmi.c drmkms_linux -file external/bsd/drm2/linux/linux_gfp.c drmkms_linux file external/bsd/drm2/linux/linux_kmap.c drmkms_linux file external/bsd/drm2/linux/linux_i2c.c drmkms_linux file external/bsd/drm2/linux/linux_idr.c drmkms_linux Index: src/sys/modules/drmkms_linux/Makefile diff -u src/sys/modules/drmkms_linux/Makefile:1.3 src/sys/modules/drmkms_linux/Makefile:1.4 --- src/sys/modules/drmkms_linux/Makefile:1.3 Wed Jul 16 20:56:26 2014 +++ src/sys/modules/drmkms_linux/Makefile Thu Jul 17 13:52:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2014/07/16 20:56:26 riastradh Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/17 13:52:22 riastradh Exp $ .include "../Makefile.inc" @@ -12,7 +12,6 @@ CPPFLAGS+= -DDIAGNOSTIC KMOD= drmkms_linux SRCS+= linux_dmi.c -SRCS+= linux_gfp.c SRCS+= linux_kmap.c SRCS+= linux_i2c.c SRCS+= linux_idr.c
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Thu Jul 17 13:47:19 UTC 2014 Modified Files: src/sys/external/bsd/drm2/drm: drm_module.c Log Message: Initialize the drm_global stuff. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/drm/drm_module.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/external/bsd/drm2/drm/drm_module.c diff -u src/sys/external/bsd/drm2/drm/drm_module.c:1.6 src/sys/external/bsd/drm2/drm/drm_module.c:1.7 --- src/sys/external/bsd/drm2/drm/drm_module.c:1.6 Wed Jul 16 20:56:25 2014 +++ src/sys/external/bsd/drm2/drm/drm_module.c Thu Jul 17 13:47:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_module.c,v 1.6 2014/07/16 20:56:25 riastradh Exp $ */ +/* $NetBSD: drm_module.c,v 1.7 2014/07/17 13:47:19 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.6 2014/07/16 20:56:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.7 2014/07/17 13:47:19 riastradh Exp $"); #include #include @@ -73,6 +73,7 @@ drm_init(void) idr_init(&drm_minors_idr); linux_mutex_init(&drm_global_mutex); drm_connector_ida_init(); + drm_global_init(); return 0; } @@ -94,6 +95,7 @@ static void drm_fini(void) { + drm_global_release(); drm_connector_ida_destroy(); linux_mutex_destroy(&drm_global_mutex); idr_destroy(&drm_minors_idr);
CVS commit: src/share/man/man7
Module Name:src Committed By: njoly Date: Thu Jul 17 13:42:02 UTC 2014 Modified Files: src/share/man/man7: sysctl.7 Log Message: Add hw.ncpuonline documentation. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/share/man/man7/sysctl.7 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/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.83 src/share/man/man7/sysctl.7:1.84 --- src/share/man/man7/sysctl.7:1.83 Fri Jun 13 22:06:00 2014 +++ src/share/man/man7/sysctl.7 Thu Jul 17 13:42:02 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.83 2014/06/13 22:06:00 wiz Exp $ +.\" $NetBSD: sysctl.7,v 1.84 2014/07/17 13:42:02 njoly Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" -.Dd June 13, 2014 +.Dd July 17, 2014 .Dt SYSCTL 7 .Os .Sh NAME @@ -198,6 +198,7 @@ privilege may change the value. .It hw.machine_arch string no .It hw.model string no .It hw.ncpu integer no +.It hw.ncpuonline integer no .It hw.pagesize integer no .It hw.physmem integer no .It hw.physmem64 quad no @@ -249,7 +250,9 @@ The machine CPU class. .It Li hw.model ( HW_MODEL ) The machine model. .It Li hw.ncpu ( HW_NCPU ) -The number of CPUs. +The number of CPUs configured. +.It Li hw.ncpuonline ( HW_NCPUONLINE ) +The number of CPUs online. .It Li hw.pagesize ( HW_PAGESIZE ) The software page size. .It Li hw.physmem ( HW_PHYSMEM )
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: prlw1 Date: Thu Jul 17 12:04:05 UTC 2014 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi shl.mi Log Message: Update lists after adding support for vnd to rump (report from hannken@) To generate a diff of this commit: cvs rdiff -u -r1.706 -r1.707 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.1897 -r1.1898 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.265 -r1.266 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.71 -r1.72 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.66 -r1.67 src/distrib/sets/lists/debug/shl.mi 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/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.706 src/distrib/sets/lists/base/shl.mi:1.707 --- src/distrib/sets/lists/base/shl.mi:1.706 Tue Jul 8 05:55:33 2014 +++ src/distrib/sets/lists/base/shl.mi Thu Jul 17 12:04:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.706 2014/07/08 05:55:33 spz Exp $ +# $NetBSD: shl.mi,v 1.707 2014/07/17 12:04:05 prlw1 Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -548,6 +548,9 @@ ./usr/lib/librumpdev_usb.so base-rump-shlib rump ./usr/lib/librumpdev_usb.so.0 base-rump-shlib rump ./usr/lib/librumpdev_usb.so.0.0 base-rump-shlib rump +./usr/lib/librumpdev_vnd.so base-rump-shlib rump +./usr/lib/librumpdev_vnd.so.0 base-rump-shlib rump +./usr/lib/librumpdev_vnd.so.0.0 base-rump-shlib rump ./usr/lib/librumpdev_wscons.so base-rump-shlib rump ./usr/lib/librumpdev_wscons.so.0 base-rump-shlib rump ./usr/lib/librumpdev_wscons.so.0.0 base-rump-shlib rump Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1897 src/distrib/sets/lists/comp/mi:1.1898 --- src/distrib/sets/lists/comp/mi:1.1897 Tue Jul 8 05:55:34 2014 +++ src/distrib/sets/lists/comp/mi Thu Jul 17 12:04:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1897 2014/07/08 05:55:34 spz Exp $ +# $NetBSD: mi,v 1.1898 2014/07/17 12:04:05 prlw1 Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3781,6 +3781,8 @@ ./usr/lib/librumpdev_umass_p.a comp-c-proflib profile,rump ./usr/lib/librumpdev_usb.a comp-c-lib rump ./usr/lib/librumpdev_usb_p.a comp-c-proflib profile,rump +./usr/lib/librumpdev_vnd.a comp-c-lib rump +./usr/lib/librumpdev_vnd_p.a comp-c-proflib profile,rump ./usr/lib/librumpdev_wscons.a comp-c-lib rump ./usr/lib/librumpdev_wscons_p.a comp-c-proflib profile,rump ./usr/lib/librumpfs_cd9660.a comp-c-lib rump Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.265 src/distrib/sets/lists/comp/shl.mi:1.266 --- src/distrib/sets/lists/comp/shl.mi:1.265 Tue Jul 8 05:55:34 2014 +++ src/distrib/sets/lists/comp/shl.mi Thu Jul 17 12:04:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.265 2014/07/08 05:55:34 spz Exp $ +# $NetBSD: shl.mi,v 1.266 2014/07/17 12:04:05 prlw1 Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -173,6 +173,7 @@ ./usr/lib/librumpdev_ulpt_pic.a comp-c-piclib rump,picinstall ./usr/lib/librumpdev_umass_pic.a comp-c-piclib rump,picinstall ./usr/lib/librumpdev_usb_pic.a comp-c-piclib rump,picinstall +./usr/lib/librumpdev_vnd_pic.a comp-c-piclib rump,picinstall ./usr/lib/librumpdev_wscons_pic.a comp-c-piclib rump,picinstall ./usr/lib/librumpfs_cd9660_pic.a comp-c-piclib rump,picinstall ./usr/lib/librumpfs_efs_pic.a comp-c-piclib rump,picinstall Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.71 src/distrib/sets/lists/debug/mi:1.72 --- src/distrib/sets/lists/debug/mi:1.71 Wed Jul 9 13:50:48 2014 +++ src/distrib/sets/lists/debug/mi Thu Jul 17 12:04:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.71 2014/07/09 13:50:48 alnsn Exp $ +# $NetBSD: mi,v 1.72 2014/07/17 12:04:05 prlw1 Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -161,6 +161,7 @@ ./usr/lib/librumpdev_ulpt_g.a comp-c-debuglib debuglib,rump ./usr/lib/librumpdev_umass_g.a comp-c-debuglib debuglib,rump ./usr/lib/librumpdev_usb_g.a comp-c-debuglib debuglib,rump +./usr/lib/librumpdev_vnd_g.a comp-c-debuglib debuglib,rump ./usr/lib/librumpdev_wscons_g.a comp-c-debuglib debuglib,rump ./usr/lib/librumpfs_cd9660_g.a comp-c-debuglib debuglib,rump ./usr/lib/librumpfs_efs_g.a comp-c-debuglib debuglib,rump Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.66 src/distrib/sets/lists/debug/shl.mi:1.67 --- src/distrib/sets/lists/debug/shl.mi:1.66 Tue Jul 8 11:13:24 2014 +++ src/distrib/sets/lists/debug/shl.mi Thu Jul 17 12:04:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.66 2014/07/08 11
CVS commit: src/sys/arch/xen/conf
Module Name:src Committed By: bouyer Date: Thu Jul 17 10:49:45 UTC 2014 Modified Files: src/sys/arch/xen/conf: Makefile.xen Log Message: Sync DEFCOPTS and CFLAGS with i386 and amd64 counterparts. Especially -fno-omit-frame-pointer To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/xen/conf/Makefile.xen Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/conf/Makefile.xen diff -u src/sys/arch/xen/conf/Makefile.xen:1.35 src/sys/arch/xen/conf/Makefile.xen:1.36 --- src/sys/arch/xen/conf/Makefile.xen:1.35 Mon Dec 19 14:06:17 2011 +++ src/sys/arch/xen/conf/Makefile.xen Thu Jul 17 10:49:45 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xen,v 1.35 2011/12/19 14:06:17 joerg Exp $ +# $NetBSD: Makefile.xen,v 1.36 2014/07/17 10:49:45 bouyer Exp $ # NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp # Makefile for NetBSD @@ -38,17 +38,24 @@ ARCH_INC= $S/arch/xen/include/${XEN_BUIL ## ## (2) compile settings ## -DEFCOPTS= -O2 CPPFLAGS+= -D${XEN_BUILD} AFLAGS+= -x assembler-with-cpp ${DBG} -D__XEN__ EXTRA_INCLUDES= -I${.CURDIR}/xen-ma .if ${XEN_BUILD} == "amd64" +DEFCOPTS= -O2 -fno-omit-frame-pointer CPPFLAGS+= -Dx86_64 CFLAGS+= -mcmodel=kernel -CFLAGS+= -mno-red-zone +CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx +CFLAGS+= -msoft-float +CFLAGS+= -mno-fp-ret-in-387 .endif +.if ${XEN_BUILD} == "i386" +DEFCOPTS= -O2 -fno-omit-frame-pointer +CFLAGS+= -msoft-float +CFLAGS+= -mno-mmx -mno-sse -mno-avx +.endif ## ## (3) libkern and compat
CVS commit: src/sys/net
Module Name:src Committed By: bouyer Date: Thu Jul 17 10:46:58 UTC 2014 Modified Files: src/sys/net: if_mpls.c Log Message: Make sure to call ifp->if_output() with KERNEL_LOCK held. Should fix mpls-related atf tests. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/if_mpls.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/if_mpls.c diff -u src/sys/net/if_mpls.c:1.15 src/sys/net/if_mpls.c:1.16 --- src/sys/net/if_mpls.c:1.15 Wed Jul 9 14:41:42 2014 +++ src/sys/net/if_mpls.c Thu Jul 17 10:46:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mpls.c,v 1.15 2014/07/09 14:41:42 rtr Exp $ */ +/* $NetBSD: if_mpls.c,v 1.16 2014/07/17 10:46:57 bouyer Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.15 2014/07/09 14:41:42 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.16 2014/07/17 10:46:57 bouyer Exp $"); #include "opt_inet.h" #include "opt_mpls.h" @@ -205,6 +205,8 @@ mpls_output(struct ifnet *ifp, struct mb int err; uint psize = sizeof(struct sockaddr_mpls); + KASSERT(KERNEL_LOCKED_P()); + if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { m_freem(m); return ENETDOWN; @@ -448,6 +450,7 @@ static int mpls_send_frame(struct mbuf *m, struct ifnet *ifp, struct rtentry *rt) { union mpls_shim msh; + int ret; if ((rt->rt_flags & RTF_GATEWAY) == 0) return EHOSTUNREACH; @@ -466,7 +469,10 @@ mpls_send_frame(struct mbuf *m, struct i case IFT_ETHER: case IFT_TUNNEL: case IFT_LOOP: - return (*ifp->if_output)(ifp, m, rt->rt_gateway, rt); + KERNEL_LOCK(1, NULL); + ret = (*ifp->if_output)(ifp, m, rt->rt_gateway, rt); + KERNEL_UNLOCK_ONE(NULL); + return ret; break; default: return ENETUNREACH;
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Thu Jul 17 10:21:51 UTC 2014 Modified Files: src/libexec/httpd: CHANGES bozohttpd.c Log Message: call this 20140717. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/libexec/httpd/CHANGES cvs rdiff -u -r1.55 -r1.56 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.18 src/libexec/httpd/CHANGES:1.19 --- src/libexec/httpd/CHANGES:1.18 Tue Jul 8 14:06:17 2014 +++ src/libexec/httpd/CHANGES Thu Jul 17 10:21:51 2014 @@ -1,5 +1,8 @@ $eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $ +changes in bozohttpd 20140717: + o properly handle SSL errors. + changes in bozohttpd 20140708: o fixes for virtual host support, from rajeev_v_pil...@yahoo.com o avoid printing double errors, from s...@netbsd.org Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.55 src/libexec/httpd/bozohttpd.c:1.56 --- src/libexec/httpd/bozohttpd.c:1.55 Thu Jul 17 06:27:52 2014 +++ src/libexec/httpd/bozohttpd.c Thu Jul 17 10:21:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.55 2014/07/17 06:27:52 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.56 2014/07/17 10:21:51 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -109,7 +109,7 @@ #define INDEX_HTML "index.html" #endif #ifndef SERVER_SOFTWARE -#define SERVER_SOFTWARE "bozohttpd/20140708" +#define SERVER_SOFTWARE "bozohttpd/20140717" #endif #ifndef DIRECT_ACCESS_FILE #define DIRECT_ACCESS_FILE ".bzdirect"
CVS commit: src/sys/miscfs/kernfs
Module Name:src Committed By: hannken Date: Thu Jul 17 08:21:34 UTC 2014 Modified Files: src/sys/miscfs/kernfs: kernfs.h kernfs_subr.c kernfs_vfsops.c kernfs_vnops.c Log Message: Finish KAME IPSEC removal: - Remove field kfs_value, it is always zero. Compute the hash from kt_tag. - Remove stray definitions kernfs_revoke_sa and kernfs_revoke_sp. While here, remove kfs_type from allocvp(), it is always kt->kt_tag. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/miscfs/kernfs/kernfs.h cvs rdiff -u -r1.27 -r1.28 src/sys/miscfs/kernfs/kernfs_subr.c cvs rdiff -u -r1.93 -r1.94 src/sys/miscfs/kernfs/kernfs_vfsops.c cvs rdiff -u -r1.151 -r1.152 src/sys/miscfs/kernfs/kernfs_vnops.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/miscfs/kernfs/kernfs.h diff -u src/sys/miscfs/kernfs/kernfs.h:1.37 src/sys/miscfs/kernfs/kernfs.h:1.38 --- src/sys/miscfs/kernfs/kernfs.h:1.37 Thu Mar 22 20:34:38 2012 +++ src/sys/miscfs/kernfs/kernfs.h Thu Jul 17 08:21:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kernfs.h,v 1.37 2012/03/22 20:34:38 drochner Exp $ */ +/* $NetBSD: kernfs.h,v 1.38 2014/07/17 08:21:34 hannken Exp $ */ /* * Copyright (c) 1992, 1993 @@ -91,9 +91,8 @@ struct kernfs_node { kfstype kfs_type; /* type of kernfs node */ mode_t kfs_mode; /* mode bits for stat() */ long kfs_fileno; /* unique file id */ - u_int32_t kfs_value; /* SA id or SP id (KFSint) */ const struct kern_target *kfs_kt; - void *kfs_v; /* pointer to secasvar/secpolicy/mbuf */ + void *kfs_v; /* dynamic node private data */ long kfs_cookie; /* fileno cookie */ }; @@ -133,11 +132,7 @@ void kernfs_hashinit(void); void kernfs_hashreinit(void); void kernfs_hashdone(void); int kernfs_freevp(struct vnode *); -int kernfs_allocvp(struct mount *, struct vnode **, kfstype, - const struct kern_target *, u_int32_t); - -void kernfs_revoke_sa(struct secasvar *); -void kernfs_revoke_sp(struct secpolicy *); +int kernfs_allocvp(struct mount *, struct vnode **, const struct kern_target *); /* * Data types for the kernfs file operations. Index: src/sys/miscfs/kernfs/kernfs_subr.c diff -u src/sys/miscfs/kernfs/kernfs_subr.c:1.27 src/sys/miscfs/kernfs/kernfs_subr.c:1.28 --- src/sys/miscfs/kernfs/kernfs_subr.c:1.27 Tue Apr 8 17:56:10 2014 +++ src/sys/miscfs/kernfs/kernfs_subr.c Thu Jul 17 08:21:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kernfs_subr.c,v 1.27 2014/04/08 17:56:10 christos Exp $ */ +/* $NetBSD: kernfs_subr.c,v 1.28 2014/07/17 08:21:34 hannken Exp $ */ /* * Copyright (c) 1993 @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kernfs_subr.c,v 1.27 2014/04/08 17:56:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kernfs_subr.c,v 1.28 2014/07/17 08:21:34 hannken Exp $"); #include #include @@ -93,11 +93,11 @@ __KERNEL_RCSID(0, "$NetBSD: kernfs_subr. void kernfs_hashins(struct kernfs_node *); void kernfs_hashrem(struct kernfs_node *); struct vnode *kernfs_hashget(kfstype, struct mount *, -const struct kern_target *, u_int32_t); +const struct kern_target *); static LIST_HEAD(kfs_hashhead, kernfs_node) *kfs_hashtbl; static u_long kfs_ihash; /* size of hash table - 1 */ -#define KFSVALUEHASH(v) ((v) & kfs_ihash) +#define KFSHASH(v) ((v) & kfs_ihash) static kmutex_t kfs_hashlock; static kmutex_t kfs_ihash_lock; @@ -108,7 +108,7 @@ static kmutex_t kfs_ihash_lock; * allocate a kfsnode/vnode pair. the vnode is * referenced, and locked. * - * the kfs_type, kfs_value and mount point uniquely + * the kfs_type and mount point uniquely * identify a kfsnode. the mount point is needed * because someone might mount this filesystem * twice. @@ -131,19 +131,19 @@ static kmutex_t kfs_ihash_lock; * the vnode free list. */ int -kernfs_allocvp(struct mount *mp, struct vnode **vpp, kfstype kfs_type, -const struct kern_target *kt, u_int32_t value) +kernfs_allocvp(struct mount *mp, struct vnode **vpp, +const struct kern_target *kt) { struct kernfs_node *kfs = NULL, *kfsp; struct vnode *vp = NULL; int error; long *cookie; - if ((*vpp = kernfs_hashget(kfs_type, mp, kt, value)) != NULL) + if ((*vpp = kernfs_hashget(kt->kt_tag, mp, kt)) != NULL) return (0); mutex_enter(&kfs_hashlock); - if ((*vpp = kernfs_hashget(kfs_type, mp, kt, value)) != NULL) { + if ((*vpp = kernfs_hashget(kt->kt_tag, mp, kt)) != NULL) { mutex_exit(&kfs_hashlock); return (0); } @@ -184,18 +184,17 @@ again: else TAILQ_INSERT_TAIL(&VFSTOKERNFS(mp)->nodelist, kfs, kfs_list); - kfs->kfs_type = kfs_type; + kfs->kfs_type = kt->kt_tag; kfs->kfs_vnode = vp; - kfs->kfs_fileno = KERNFS_FILENO(kt, kfs_type, kfs->kfs_cookie); - kfs->kfs_value = value; + kfs->kfs_fileno = KERNFS_FILENO(kt, kt->kt_tag, kfs->kfs_cookie); kfs->kfs_kt = kt; kfs->kfs_mode = kt->kt_mode; vp->v_type = kt->kt_vtype; - if (kfs_type == KFSkern) + if (kt->kt_tag == KFSkern)
CVS commit: src/sys/rump/dev
Module Name:src Committed By: prlw1 Date: Thu Jul 17 08:16:12 UTC 2014 Modified Files: src/sys/rump/dev: Makefile.rumpdevcomp Added Files: src/sys/rump/dev/lib/libvnd: Makefile shlib_version vnd_component.c Log Message: Add vnd support to rump To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/rump/dev/Makefile.rumpdevcomp cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libvnd/Makefile \ src/sys/rump/dev/lib/libvnd/shlib_version \ src/sys/rump/dev/lib/libvnd/vnd_component.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/rump/dev/Makefile.rumpdevcomp diff -u src/sys/rump/dev/Makefile.rumpdevcomp:1.11 src/sys/rump/dev/Makefile.rumpdevcomp:1.12 --- src/sys/rump/dev/Makefile.rumpdevcomp:1.11 Thu Apr 24 21:46:44 2014 +++ src/sys/rump/dev/Makefile.rumpdevcomp Thu Jul 17 08:16:12 2014 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.rumpdevcomp,v 1.11 2014/04/24 21:46:44 pooka Exp $ +# $NetBSD: Makefile.rumpdevcomp,v 1.12 2014/07/17 08:16:12 prlw1 Exp $ # RUMPDEVCOMP= audio bpf cgd disk dm drvctl fss md netsmb pad pud \ - putter raidframe rnd scsipi sysmon wscons \ + putter raidframe rnd scsipi sysmon vnd wscons \ opencrypto RUMPUSBDEVS= ubt ucom ugenhc ulpt umass usb Added files: Index: src/sys/rump/dev/lib/libvnd/Makefile diff -u /dev/null src/sys/rump/dev/lib/libvnd/Makefile:1.1 --- /dev/null Thu Jul 17 08:16:12 2014 +++ src/sys/rump/dev/lib/libvnd/Makefile Thu Jul 17 08:16:12 2014 @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 2014/07/17 08:16:12 prlw1 Exp $ +# + +.PATH: ${.CURDIR}/../../../../dev + +LIB= rumpdev_vnd + +SRCS= vnd.c + +SRCS+= vnd_component.c + +CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs + +.include +.include Index: src/sys/rump/dev/lib/libvnd/shlib_version diff -u /dev/null src/sys/rump/dev/lib/libvnd/shlib_version:1.1 --- /dev/null Thu Jul 17 08:16:12 2014 +++ src/sys/rump/dev/lib/libvnd/shlib_version Thu Jul 17 08:16:12 2014 @@ -0,0 +1,4 @@ +# $NetBSD: shlib_version,v 1.1 2014/07/17 08:16:12 prlw1 Exp $ +# +major=0 +minor=0 Index: src/sys/rump/dev/lib/libvnd/vnd_component.c diff -u /dev/null src/sys/rump/dev/lib/libvnd/vnd_component.c:1.1 --- /dev/null Thu Jul 17 08:16:12 2014 +++ src/sys/rump/dev/lib/libvnd/vnd_component.c Thu Jul 17 08:16:12 2014 @@ -0,0 +1,59 @@ +/* $NetBSD: vnd_component.c,v 1.1 2014/07/17 08:16:12 prlw1 Exp $ */ + +/* + * Copyright (c) 2009 Antti Kantee. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: vnd_component.c,v 1.1 2014/07/17 08:16:12 prlw1 Exp $"); + +#include +#include +#include +#include + +#include "rump_private.h" +#include "rump_vfs_private.h" + +RUMP_COMPONENT(RUMP_COMPONENT_DEV) +{ + extern const struct bdevsw vnd_bdevsw; + extern const struct cdevsw vnd_cdevsw; + devmajor_t bmaj, cmaj; + int error; + + /* go, mydevfs */ + bmaj = cmaj = -1; + + if ((error = devsw_attach("/dev/vnd0", &vnd_bdevsw, &bmaj, + &vnd_cdevsw, &cmaj)) != 0) + panic("cannot attach vnd: %d", error); + + if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/vnd0", 'a', + bmaj, 0, 7)) != 0) + panic("cannot create cooked vnd dev nodes: %d", error); + if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rvnd0", 'a', + cmaj, 0, 7)) != 0) + panic("cannot create raw vnd dev nodes: %d", error); +}
CVS commit: src/etc/rc.d
Module Name:src Committed By: spz Date: Thu Jul 17 07:17:03 UTC 2014 Modified Files: src/etc/rc.d: dhcpd Log Message: Create the dhcpd.leases file if it doesn't exist already, don't just warn about it not being there. Closes PR misc/48868 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/rc.d/dhcpd 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/dhcpd diff -u src/etc/rc.d/dhcpd:1.6 src/etc/rc.d/dhcpd:1.7 --- src/etc/rc.d/dhcpd:1.6 Fri Aug 13 18:08:03 2004 +++ src/etc/rc.d/dhcpd Thu Jul 17 07:17:03 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: dhcpd,v 1.6 2004/08/13 18:08:03 mycroft Exp $ +# $NetBSD: dhcpd,v 1.7 2014/07/17 07:17:03 spz Exp $ # # PROVIDE: dhcpd @@ -12,8 +12,17 @@ $_rc_subr_loaded . /etc/rc.subr name="dhcpd" rcvar=$name command="/usr/sbin/${name}" +start_precmd="dhcpd_precmd" pidfile="/var/run/${name}.pid" -required_files="/etc/${name}.conf /var/db/${name}.leases" +required_files="/etc/${name}.conf" + +dhcpd_precmd() +{ +if [ ! -e "/var/db/${name}.leases" ]; then +echo "Creating /var/db/${name}.leases" +touch /var/db/${name}.leases +fi +} load_rc_config $name run_rc_command "$1"