svn commit: r193694 - head/sys/dev/sound/macio
Author: ariff Date: Mon Jun 8 08:10:52 2009 New Revision: 193694 URL: http://svn.freebsd.org/changeset/base/193694 Log: Fix powerpc build failure due to strict kobj signatures checking. Modified: head/sys/dev/sound/macio/snapper.c head/sys/dev/sound/macio/tumbler.c Modified: head/sys/dev/sound/macio/snapper.c == --- head/sys/dev/sound/macio/snapper.c Mon Jun 8 07:44:28 2009 (r193693) +++ head/sys/dev/sound/macio/snapper.c Mon Jun 8 08:10:52 2009 (r193694) @@ -96,7 +96,7 @@ struct snapper_softc static int snapper_probe(device_t); static int snapper_attach(device_t); static int snapper_init(struct snd_mixer *m); -static voidsnapper_uninit(struct snd_mixer *m); +static int snapper_uninit(struct snd_mixer *m); static int snapper_reinit(struct snd_mixer *m); static int snapper_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); @@ -423,10 +423,10 @@ snapper_init(struct snd_mixer *m) return (0); } -static void +static int snapper_uninit(struct snd_mixer *m) { - return; + return (0); } static int Modified: head/sys/dev/sound/macio/tumbler.c == --- head/sys/dev/sound/macio/tumbler.c Mon Jun 8 07:44:28 2009 (r193693) +++ head/sys/dev/sound/macio/tumbler.c Mon Jun 8 08:10:52 2009 (r193694) @@ -96,7 +96,7 @@ struct tumbler_softc static int tumbler_probe(device_t); static int tumbler_attach(device_t); static int tumbler_init(struct snd_mixer *m); -static voidtumbler_uninit(struct snd_mixer *m); +static int tumbler_uninit(struct snd_mixer *m); static int tumbler_reinit(struct snd_mixer *m); static int tumbler_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right); @@ -369,10 +369,10 @@ tumbler_init(struct snd_mixer *m) return (0); } -static void +static int tumbler_uninit(struct snd_mixer *m) { - return; + return (0); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193702 - head/sbin/ipfw
Author: luigi Date: Mon Jun 8 10:53:18 2009 New Revision: 193702 URL: http://svn.freebsd.org/changeset/base/193702 Log: add a missing format in a printf Detected building with gcc 4.3.3 MFC after:3 days Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Mon Jun 8 10:43:20 2009(r193701) +++ head/sbin/ipfw/ipfw2.c Mon Jun 8 10:53:18 2009(r193702) @@ -508,7 +508,7 @@ print_newports(ipfw_insn_u16 *cmd, int p } sep = " "; for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { - printf(sep); + printf("%s", sep); print_port(proto, p[0]); if (p[0] != p[1]) { printf("-"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193688 - head/share/timedef
Quoting Edwin Groothuis (from Mon, 8 Jun 2009 05:33:09 + (UTC)): Author: edwin Date: Mon Jun 8 05:33:08 2009 New Revision: 193688 URL: http://svn.freebsd.org/changeset/base/193688 Log: [patch] [locale] German locales use old %d.%m.%y date format instead of newer ISO date From the submitter: DIN 5008 (German norm for text processing) defines the old date format (%d.%m.%Y) to be obsolete and to be used only, if unambigous. In international communications the new format (%Y-%m-%d) is now required and FreeBSD should respect this. What does this mean? Does 'date' with the de_DE locate print out Y-m-d instead of d.m.Y now? This would look strange to me, as this is not used in normal daily communications. The government sends letters with dates in d.m.Y, newspapers have d.m.Y, and the daily news in the TV also display d.m.Y. The text above specifies that this seems to be intended for international communications. When I set de_DE in my locale for my user, this is not international communication, it's more like "I want to see text/dates in my local language/conventions". As the PR is from 2004, and we have 2009 now, I'm not sure if this change is correct. I haven't read the corresponding standards/documents. PR: conf/72076 Submitted by: Peter Wullinger MFC after:1 week I think you should not MFC this so fast. It may be better to discuss this with our German doc people (docs@ CCed), maybe this needs to be backed out. Bye, Alexander. -- "I don't care how many eyes a man has... as long as it's less than five." -Leela http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193712 - head/sys/arm/arm
Author: raj Date: Mon Jun 8 12:15:39 2009 New Revision: 193712 URL: http://svn.freebsd.org/changeset/base/193712 Log: Invalidate cache in pmap_remove_all() on ARM. When pages are removed from virtual address space by calling pmap_remove_all() CPU caches were not invalidated, which led to read corruption when another page got mapped at this same virtual address at later time (the CPU was retrieving stale contents). Submitted by: Piotr Ziecik Obtained from:Semihalf Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c == --- head/sys/arm/arm/pmap.c Mon Jun 8 12:10:42 2009(r193711) +++ head/sys/arm/arm/pmap.c Mon Jun 8 12:15:39 2009(r193712) @@ -3124,7 +3124,19 @@ pmap_remove_all(vm_page_t m) if (flush == FALSE && (pv->pv_pmap == curpm || pv->pv_pmap == pmap_kernel())) flush = TRUE; + PMAP_LOCK(pv->pv_pmap); + /* +* Cached contents were written-back in pmap_remove_write(), +* but we still have to invalidate the cache entry to make +* sure stale data are not retrieved when another page will be +* mapped under this virtual address. +*/ + if (pmap_is_current(pv->pv_pmap)) { + cpu_dcache_inv_range(pv->pv_va, PAGE_SIZE); + cpu_l2cache_inv_range(pv->pv_va, PAGE_SIZE); + } + l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); KASSERT(l2b != NULL, ("No l2 bucket")); ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193712 - head/sys/arm/arm
On Mon, 8 Jun 2009 12:15:39 + (UTC) Rafal Jaworowski mentioned: > Author: raj > Date: Mon Jun 8 12:15:39 2009 > New Revision: 193712 > URL: http://svn.freebsd.org/changeset/base/193712 > > Log: > Invalidate cache in pmap_remove_all() on ARM. > > When pages are removed from virtual address space by calling > pmap_remove_all() > CPU caches were not invalidated, which led to read corruption when another > page got mapped at this same virtual address at later time (the CPU was > retrieving stale contents). > > Submitted by: Piotr Ziecik > Obtained from: Semihalf > > Modified: > head/sys/arm/arm/pmap.c > > Modified: head/sys/arm/arm/pmap.c > == > --- head/sys/arm/arm/pmap.c Mon Jun 8 12:10:42 2009(r193711) > +++ head/sys/arm/arm/pmap.c Mon Jun 8 12:15:39 2009(r193712) > @@ -3124,7 +3124,19 @@ pmap_remove_all(vm_page_t m) > if (flush == FALSE && (pv->pv_pmap == curpm || > pv->pv_pmap == pmap_kernel())) > flush = TRUE; > + > PMAP_LOCK(pv->pv_pmap); > + /* > + * Cached contents were written-back in pmap_remove_write(), > + * but we still have to invalidate the cache entry to make > + * sure stale data are not retrieved when another page will be > + * mapped under this virtual address. > + */ > + if (pmap_is_current(pv->pv_pmap)) { > + cpu_dcache_inv_range(pv->pv_va, PAGE_SIZE); > + cpu_l2cache_inv_range(pv->pv_va, PAGE_SIZE); > + } > + Hi, Rafal! What about calling the pmap_dcache_wb_range function for each mapping in the cycle instead of calling cpu_XXX_inv_range functions directly? I think something like this would do the trick: % pmap_dcache_wb_range(pv->pv_pmap, pv->pv_va, PAGE_SIZE, FALSE, % (pv->pv_flags & PVF_WRITE) == 0) This will also take care of the writeback cache. I don't know if it is really needed, though. -- Stanislav Sedov ST4096-RIPE pgppqu1t6RL3A.pgp Description: PGP signature
svn commit: r193713 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb
Author: kib Date: Mon Jun 8 13:31:27 2009 New Revision: 193713 URL: http://svn.freebsd.org/changeset/base/193713 Log: MFC r193535: Put intrcnt, eintrcnt, intrnames and eintrnames into the .data section. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/support.S stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/support.S == --- stable/7/sys/amd64/amd64/support.S Mon Jun 8 12:15:39 2009 (r193712) +++ stable/7/sys/amd64/amd64/support.S Mon Jun 8 13:31:27 2009 (r193713) @@ -38,6 +38,7 @@ #include "assym.s" + .data ALIGN_DATA .globl intrcnt, eintrcnt intrcnt: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193714 - head/sys/kern
Author: kib Date: Mon Jun 8 13:34:45 2009 New Revision: 193714 URL: http://svn.freebsd.org/changeset/base/193714 Log: Do not dereference vp->v_rdev without holding any of dev_mtx or vnode lock. Use code similar to devfs_fp_check(), but inlined to feet other checks performed by ttyhook_register(). Reviewed by: ed Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c == --- head/sys/kern/tty.c Mon Jun 8 13:31:27 2009(r193713) +++ head/sys/kern/tty.c Mon Jun 8 13:34:45 2009(r193714) @@ -1742,19 +1742,31 @@ ttyhook_register(struct tty **rtp, struc goto done1; } - /* Make sure the vnode is bound to a character device. */ - error = EINVAL; - if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VCHR || - fp->f_vnode->v_rdev == NULL) + /* +* Make sure the vnode is bound to a character device. +* Unlocked check for the vnode type is ok there, because we +* only shall prevent calling devvn_refthread on the file that +* never has been opened over a character device. +*/ + if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VCHR) { + error = EINVAL; goto done1; - dev = fp->f_vnode->v_rdev; + } /* Make sure it is a TTY. */ - cdp = dev_refthread(dev); - if (cdp == NULL) + cdp = devvn_refthread(fp->f_vnode, &dev); + if (cdp == NULL) { + error = ENXIO; goto done1; - if (cdp != &ttydev_cdevsw) + } + if (dev != fp->f_data) { + error = ENXIO; goto done2; + } + if (cdp != &ttydev_cdevsw) { + error = ENOTTY; + goto done2; + } tp = dev->si_drv1; /* Try to attach the hook to the TTY. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193715 - head/sbin/ipfw
Author: luigi Date: Mon Jun 8 14:32:29 2009 New Revision: 193715 URL: http://svn.freebsd.org/changeset/base/193715 Log: Permit the specification of bandwidth values within "profile" files (bandwidth is mandatory when using a profile, so it makes sense to have everything in one place). Update the manpage accordingly. Submitted by: Marta Carbone Modified: head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/dummynet.c == --- head/sbin/ipfw/dummynet.c Mon Jun 8 13:34:45 2009(r193714) +++ head/sbin/ipfw/dummynet.c Mon Jun 8 14:32:29 2009(r193715) @@ -452,6 +452,7 @@ ipfw_delete_pipe(int pipe_or_queue, int #define ED_TOK_NAME"name" #define ED_TOK_DELAY "delay" #define ED_TOK_PROB"prob" +#define ED_TOK_BW "bw" #define ED_SEPARATORS " \t\n" #define ED_MIN_SAMPLES_NO 2 @@ -470,6 +471,50 @@ is_valid_number(const char *s) return 1; } +/* + * Take as input a string describing a bandwidth value + * and return the numeric bandwidth value. + * set clocking interface or bandwidth value + */ +void +read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen) +{ + if (*bandwidth != -1) + warn("duplicate token, override bandwidth value!"); + + if (arg[0] >= 'a' && arg[0] <= 'z') { + if (namelen >= IFNAMSIZ) + warn("interface name truncated"); + namelen--; + /* interface name */ + strncpy(if_name, arg, namelen); + if_name[namelen] = '\0'; + *bandwidth = 0; + } else {/* read bandwidth value */ + int bw; + char *end = NULL; + + bw = strtoul(arg, &end, 0); + if (*end == 'K' || *end == 'k') { + end++; + bw *= 1000; + } else if (*end == 'M') { + end++; + bw *= 100; + } + if ((*end == 'B' && + _substrcmp2(end, "Bi", "Bit/s") != 0) || + _substrcmp2(end, "by", "bytes") == 0) + bw *= 8; + + if (bw < 0) + errx(EX_DATAERR, "bandwidth too large"); + + *bandwidth = bw; + if_name[0] = '\0'; + } +} + struct point { double prob; double delay; @@ -550,6 +595,8 @@ load_extra_delays(const char *filename, errx(ED_EFMT("too many samples, maximum is %d"), ED_MAX_SAMPLES_NO); do_points = 0; + } else if (!strcasecmp(name, ED_TOK_BW)) { + read_bandwidth(arg, &p->bandwidth, p->if_name, sizeof(p->if_name)); } else if (!strcasecmp(name, ED_TOK_LOSS)) { if (loss != -1.0) errx(ED_EFMT("duplicated token: %s"), name); @@ -645,6 +692,7 @@ ipfw_config_pipe(int ac, char **av) void *par = NULL; memset(&p, 0, sizeof p); + p.bandwidth = -1; av++; ac--; /* Pipe number */ @@ -848,32 +896,7 @@ end_mask: NEED1("bw needs bandwidth or interface\n"); if (co.do_pipe != 1) errx(EX_DATAERR, "bandwidth only valid for pipes"); - /* -* set clocking interface or bandwidth value -*/ - if (av[0][0] >= 'a' && av[0][0] <= 'z') { - int l = sizeof(p.if_name)-1; - /* interface name */ - strncpy(p.if_name, av[0], l); - p.if_name[l] = '\0'; - p.bandwidth = 0; - } else { - p.if_name[0] = '\0'; - p.bandwidth = strtoul(av[0], &end, 0); - if (*end == 'K' || *end == 'k') { - end++; - p.bandwidth *= 1000; - } else if (*end == 'M') { - end++; - p.bandwidth *= 100; - } - if ((*end == 'B' && - _substrcmp2(end, "Bi", "Bit/s") != 0) || - _substrcmp2(end, "by", "bytes") == 0) - p.bandwidth *= 8; - if (p.bandwidth < 0) - errx(EX_DATAERR, "bandwidth too large"); - } + read_bandwidth(av[0], &p.bandwidth, p.if_name, sizeof(p.if_name)); ac--; av++; break; @@ -919,15 +942,20 @@ end_mask:
svn commit: r193716 - in head/sys/dev/ata: . chipsets
Author: ariff Date: Mon Jun 8 14:37:47 2009 New Revision: 193716 URL: http://svn.freebsd.org/changeset/base/193716 Log: Add another PCI id for Nvidia nForce MCP67, found in several Acer laptops. Modified: head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-nvidia.c Modified: head/sys/dev/ata/ata-pci.h == --- head/sys/dev/ata/ata-pci.h Mon Jun 8 14:32:29 2009(r193715) +++ head/sys/dev/ata/ata-pci.h Mon Jun 8 14:37:47 2009(r193716) @@ -269,6 +269,7 @@ struct ata_pci_controller { #define ATA_NFORCE_MCP67_A9 0x055910de #define ATA_NFORCE_MCP67_AA 0x055A10de #define ATA_NFORCE_MCP67_AB 0x055B10de +#define ATA_NFORCE_MCP67_AC 0x058410de #define ATA_NFORCE_MCP670x056010de #define ATA_NFORCE_MCP730x056c10de #define ATA_NFORCE_MCP73_A0 0x07f010de Modified: head/sys/dev/ata/chipsets/ata-nvidia.c == --- head/sys/dev/ata/chipsets/ata-nvidia.c Mon Jun 8 14:32:29 2009 (r193715) +++ head/sys/dev/ata/chipsets/ata-nvidia.c Mon Jun 8 14:37:47 2009 (r193716) @@ -110,6 +110,7 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP67_A9, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, { ATA_NFORCE_MCP67_AA, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, { ATA_NFORCE_MCP67_AB, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, + { ATA_NFORCE_MCP67_AC, 0, NVAHCI, 0, ATA_SA300, "nForce MCP67" }, { ATA_NFORCE_MCP73,0, 0, 0, ATA_UDMA6, "nForce MCP73" }, { ATA_NFORCE_MCP73_A0, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, { ATA_NFORCE_MCP73_A1, 0, NVAHCI, 0, ATA_SA300, "nForce MCP73" }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193715 - head/sbin/ipfw
Luigi Rizzo wrote: > Author: luigi > Date: Mon Jun 8 14:32:29 2009 > New Revision: 193715 > URL: http://svn.freebsd.org/changeset/base/193715 > > Log: > Permit the specification of bandwidth values within > "profile" files (bandwidth is mandatory when using a > profile, so it makes sense to have everything in one place). > > Update the manpage accordingly. > > +/* > + * Take as input a string describing a bandwidth value > + * and return the numeric bandwidth value. > + * set clocking interface or bandwidth value > + */ > +void > +read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen) > +{ > + if (*bandwidth != -1) > + warn("duplicate token, override bandwidth value!"); > + > + if (arg[0] >= 'a' && arg[0] <= 'z') { > + if (namelen >= IFNAMSIZ) > + warn("interface name truncated"); > + namelen--; > + /* interface name */ > + strncpy(if_name, arg, namelen); > + if_name[namelen] = '\0'; > + *bandwidth = 0; > + } else {/* read bandwidth value */ > + int bw; > + char *end = NULL; > + > + bw = strtoul(arg, &end, 0); > + if (*end == 'K' || *end == 'k') { > + end++; > + bw *= 1000; > + } else if (*end == 'M') { > + end++; > + bw *= 100; > + } Couldn't expand_number(3) be used for that? ./danfe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193717 - in stable/7/sys: . boot/i386/libi386 contrib/pf dev/ath/ath_hal dev/cxgb
Author: jhb Date: Mon Jun 8 14:52:17 2009 New Revision: 193717 URL: http://svn.freebsd.org/changeset/base/193717 Log: MFC: Add a missing parameter when displaying GPT partitions with an unknown UUID. Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/biosdisk.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/boot/i386/libi386/biosdisk.c == --- stable/7/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 14:37:47 2009 (r193716) +++ stable/7/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 14:52:17 2009 (r193717) @@ -375,6 +375,7 @@ bd_printgptpart(struct open_disk *od, st sprintf(line, "%s: FreeBSD swap%s\n", prefix, stats); else sprintf(line, "%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n", + prefix, gp->gp_type.time_low, gp->gp_type.time_mid, gp->gp_type.time_hi_and_version, gp->gp_type.clock_seq_hi_and_reserved, gp->gp_type.clock_seq_low, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193718 - head/sys/sys
Author: bz Date: Mon Jun 8 15:02:30 2009 New Revision: 193718 URL: http://svn.freebsd.org/changeset/base/193718 Log: Update vimage size guard values but do not yet re-enable them. Now that rt_tables does no longer change depending on kernel option we do no longer need any special values for LINT. The updated values will be used to make sure that an upcoming opt_route.h cleanup will not again show any side effects. Modified: head/sys/sys/vimage.h Modified: head/sys/sys/vimage.h == --- head/sys/sys/vimage.h Mon Jun 8 14:52:17 2009(r193717) +++ head/sys/sys/vimage.h Mon Jun 8 15:02:30 2009(r193718) @@ -358,60 +358,48 @@ extern struct vprocg_list_head vprocg_he * See description further down to see how to get the new values. */ #ifdef __amd64__ -#defineSIZEOF_vnet_net 464 -#defineSIZEOF_vnet_net_LINT5144 -#defineSIZEOF_vnet_inet4352 -#defineSIZEOF_vnet_inet6 8800 +#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_inet4424 +#defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 #endif #ifdef __arm__ -#defineSIZEOF_vnet_net 236 -#defineSIZEOF_vnet_net_LINT1 /* No LINT kernel yet. */ -#defineSIZEOF_vnet_inet2580 -#defineSIZEOF_vnet_inet6 8536 +#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_inet2616 +#defineSIZEOF_vnet_inet6 8524 #defineSIZEOF_vnet_ipsec 1 #endif #ifdef __i386__ /* incl. pc98 */ -#defineSIZEOF_vnet_net 236 -#defineSIZEOF_vnet_net_LINT2576 -#defineSIZEOF_vnet_inet2576 -#defineSIZEOF_vnet_inet6 8528 -#defineSIZEOF_vnet_ipsec 31016 +#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_inet2612 +#defineSIZEOF_vnet_inet6 8512 +#defineSIZEOF_vnet_ipsec 31024 #endif #ifdef __ia64__ -#defineSIZEOF_vnet_net 464 -#defineSIZEOF_vnet_net_LINT5144 -#defineSIZEOF_vnet_inet4352 -#defineSIZEOF_vnet_inet6 8800 +#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_inet4424 +#defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 #endif #ifdef __mips__ -#defineSIZEOF_vnet_net 236 -#defineSIZEOF_vnet_net_LINT1 /* No LINT kernel yet. */ -#defineSIZEOF_vnet_inet2624 -#defineSIZEOF_vnet_inet6 8552 +#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_inet2648 +#defineSIZEOF_vnet_inet6 8544 #defineSIZEOF_vnet_ipsec 1 #endif #ifdef __powerpc__ -#defineSIZEOF_vnet_net 236 -#defineSIZEOF_vnet_net_LINT2576 -#defineSIZEOF_vnet_inet2616 -#defineSIZEOF_vnet_inet6 8536 +#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_inet2640 +#defineSIZEOF_vnet_inet6 8520 #defineSIZEOF_vnet_ipsec 31048 #endif #ifdef __sparc64__ /* incl. sun4v */ -#defineSIZEOF_vnet_net 464 -#defineSIZEOF_vnet_net_LINT5144 -#defineSIZEOF_vnet_inet4352 -#defineSIZEOF_vnet_inet6 8800 +#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_inet4424 +#defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 #endif -#ifdef COMPILING_LINT -#undef SIZEOF_vnet_net -#defineSIZEOF_vnet_net SIZEOF_vnet_net_LINT -#endif - #ifndefSIZEOF_vnet_net #error "SIZEOF_vnet_net no defined for this architecture." #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193719 - head/sys/boot/i386/libi386
Author: jhb Date: Mon Jun 8 15:07:35 2009 New Revision: 193719 URL: http://svn.freebsd.org/changeset/base/193719 Log: Don't attempt to free the GPT partition list for a disk with an empty GPT. Submitted by: Yuri Pankov yuri.pankov of gmail MFC after:3 days Modified: head/sys/boot/i386/libi386/biosdisk.c Modified: head/sys/boot/i386/libi386/biosdisk.c == --- head/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:02:30 2009 (r193718) +++ head/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:07:35 2009 (r193719) @@ -990,7 +990,8 @@ bd_open_gpt(struct open_disk *od, struct out: if (error) { - free(od->od_partitions); + if (od->od_nparts > 0) + free(od->od_partitions); od->od_flags &= ~BD_GPTOK; } return (error); @@ -1044,7 +1045,7 @@ bd_closedisk(struct open_disk *od) delay(300); #endif #ifdef LOADER_GPT_SUPPORT -if (od->od_flags & BD_GPTOK) +if (od->od_flags & BD_GPTOK && od->od_nparts > 0) free(od->od_partitions); #endif free(od); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193720 - head/sys/boot/i386/libi386
Author: jhb Date: Mon Jun 8 15:09:22 2009 New Revision: 193720 URL: http://svn.freebsd.org/changeset/base/193720 Log: Instead of packing the individual fields in the PnP structures, pack the entire structures. This trims some warnings. Verified by: md5(1) MFC after:1 week Modified: head/sys/boot/i386/libi386/biospnp.c Modified: head/sys/boot/i386/libi386/biospnp.c == --- head/sys/boot/i386/libi386/biospnp.cMon Jun 8 15:07:35 2009 (r193719) +++ head/sys/boot/i386/libi386/biospnp.cMon Jun 8 15:09:22 2009 (r193720) @@ -49,38 +49,38 @@ struct pnphandler biospnphandler = struct pnp_ICstructure { -u_int8_t pnp_signature[4] __packed; -u_int8_t pnp_version __packed; -u_int8_t pnp_length __packed; -u_int16_t pnp_BIOScontrol __packed; -u_int8_t pnp_checksum __packed; -u_int32_t pnp_eventflag__packed; -u_int16_t pnp_rmip __packed; -u_int16_t pnp_rmcs __packed; -u_int16_t pnp_pmip __packed; -u_int32_t pnp_pmcs __packed; -u_int8_t pnp_OEMdev[4]__packed; -u_int16_t pnp_rmds __packed; -u_int32_t pnp_pmds __packed; -}; +u_int8_t pnp_signature[4]; +u_int8_t pnp_version; +u_int8_t pnp_length; +u_int16_t pnp_BIOScontrol; +u_int8_t pnp_checksum; +u_int32_t pnp_eventflag; +u_int16_t pnp_rmip; +u_int16_t pnp_rmcs; +u_int16_t pnp_pmip; +u_int32_t pnp_pmcs; +u_int8_t pnp_OEMdev[4]; +u_int16_t pnp_rmds; +u_int32_t pnp_pmds; +} __packed; struct pnp_devNode { -u_int16_t dn_size __packed; -u_int8_t dn_handle __packed; -u_int8_t dn_id[4]__packed; -u_int8_t dn_type[3] __packed; -u_int16_t dn_attrib __packed; -u_int8_t dn_data[1] __packed; -}; +u_int16_t dn_size; +u_int8_t dn_handle; +u_int8_t dn_id[4]; +u_int8_t dn_type[3]; +u_int16_t dn_attrib; +u_int8_t dn_data[1]; +} __packed; struct pnp_isaConfiguration { -u_int8_t ic_revision __packed; -u_int8_t ic_nCSN __packed; -u_int16_t ic_rdport __packed; -u_int16_t ic_reserved __packed; -}; +u_int8_t ic_revision; +u_int8_t ic_nCSN; +u_int16_t ic_rdport; +u_int16_t ic_reserved; +} __packed; static struct pnp_ICstructure *pnp_Icheck = NULL; static u_int16_t pnp_NumNodes; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193721 - head/sys/conf
Author: bz Date: Mon Jun 8 15:13:20 2009 New Revision: 193721 URL: http://svn.freebsd.org/changeset/base/193721 Log: Code using COMPAT_ROUTE_FLAGS option, introduced with r187094, was changed again in r187328, removing any use of the option from the kernel. The option was never in NOTES. Garbage collect. Modified: head/sys/conf/options Modified: head/sys/conf/options == --- head/sys/conf/options Mon Jun 8 15:09:22 2009(r193720) +++ head/sys/conf/options Mon Jun 8 15:13:20 2009(r193721) @@ -415,7 +415,6 @@ NETATALKopt_atalk.h NFSLOCKD RADIX_MPATHopt_mpath.h ROUTETABLESopt_route.h -COMPAT_ROUTE_FLAGS opt_route.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG TCP_OFFLOAD_DISABLEopt_inet.h #Disable code to dispatch tcp offloading ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193722 - in stable/6/sys: . boot/i386/libi386 contrib/pf dev/cxgb
Author: jhb Date: Mon Jun 8 15:17:36 2009 New Revision: 193722 URL: http://svn.freebsd.org/changeset/base/193722 Log: MFC: Add a missing parameter when displaying GPT partitions with an unknown UUID. Modified: stable/6/sys/ (props changed) stable/6/sys/boot/i386/libi386/biosdisk.c stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/boot/i386/libi386/biosdisk.c == --- stable/6/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:13:20 2009 (r193721) +++ stable/6/sys/boot/i386/libi386/biosdisk.c Mon Jun 8 15:17:36 2009 (r193722) @@ -372,6 +372,7 @@ bd_printgptpart(struct open_disk *od, st sprintf(line, "%s: FreeBSD swap%s\n", prefix, stats); else sprintf(line, "%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n", + prefix, gp->gp_type.time_low, gp->gp_type.time_mid, gp->gp_type.time_hi_and_version, gp->gp_type.clock_seq_hi_and_reserved, gp->gp_type.clock_seq_low, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193723 - head/sys/kern
Author: rwatson Date: Mon Jun 8 15:26:09 2009 New Revision: 193723 URL: http://svn.freebsd.org/changeset/base/193723 Log: Move zombie-reaping code out of kern_wait() and into its own function, proc_reap(). Reviewed by: jhb MFC after:3 days Sponsored by: Google, Inc. Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Mon Jun 8 15:17:36 2009(r193722) +++ head/sys/kern/kern_exit.c Mon Jun 8 15:26:09 2009(r193723) @@ -682,11 +682,130 @@ wait4(struct thread *td, struct wait_arg return (error); } +/* + * Reap the remains of a zombie process and optionally return status and + * rusage. Asserts and will release both the proctree_lock and the process + * lock as part of its work. + */ +static void +proc_reap(struct thread *td, struct proc *p, int *status, int options, +struct rusage *rusage) +{ + INIT_VPROCG(P_TO_VPROCG(p)); + struct proc *q, *t; + + sx_assert(&proctree_lock, SA_XLOCKED); + PROC_LOCK_ASSERT(p, MA_OWNED); + PROC_SLOCK_ASSERT(p, MA_OWNED); + KASSERT(p->p_state == PRS_ZOMBIE, ("proc_reap: !PRS_ZOMBIE")); + + q = td->td_proc; + if (rusage) { + *rusage = p->p_ru; + calcru(p, &rusage->ru_utime, &rusage->ru_stime); + } + PROC_SUNLOCK(p); + td->td_retval[0] = p->p_pid; + if (status) + *status = p->p_xstat; /* convert to int */ + if (options & WNOWAIT) { + /* +* Only poll, returning the status. Caller does not wish to +* release the proc struct just yet. +*/ + PROC_UNLOCK(p); + sx_xunlock(&proctree_lock); + return; + } + + PROC_LOCK(q); + sigqueue_take(p->p_ksi); + PROC_UNLOCK(q); + PROC_UNLOCK(p); + + /* +* If we got the child via a ptrace 'attach', we need to give it back +* to the old parent. +*/ + if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) { + PROC_LOCK(p); + p->p_oppid = 0; + proc_reparent(p, t); + PROC_UNLOCK(p); + tdsignal(t, NULL, SIGCHLD, p->p_ksi); + wakeup(t); + cv_broadcast(&p->p_pwait); + PROC_UNLOCK(t); + sx_xunlock(&proctree_lock); + return; + } + + /* +* Remove other references to this process to ensure we have an +* exclusive reference. +*/ + sx_xlock(&allproc_lock); + LIST_REMOVE(p, p_list); /* off zombproc */ + sx_xunlock(&allproc_lock); + LIST_REMOVE(p, p_sibling); + leavepgrp(p); + sx_xunlock(&proctree_lock); + + /* +* As a side effect of this lock, we know that all other writes to +* this proc are visible now, so no more locking is needed for p. +*/ + PROC_LOCK(p); + p->p_xstat = 0; /* XXX: why? */ + PROC_UNLOCK(p); + PROC_LOCK(q); + ruadd(&q->p_stats->p_cru, &q->p_crux, &p->p_ru, &p->p_rux); + PROC_UNLOCK(q); + + /* +* Decrement the count of procs running with this uid. +*/ + (void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); + + /* +* Free credentials, arguments, and sigacts. +*/ + crfree(p->p_ucred); + p->p_ucred = NULL; + pargs_drop(p->p_args); + p->p_args = NULL; + sigacts_free(p->p_sigacts); + p->p_sigacts = NULL; + + /* +* Do any thread-system specific cleanups. +*/ + thread_wait(p); + + /* +* Give vm and machine-dependent layer a chance to free anything that +* cpu_exit couldn't release while still running in process context. +*/ + vm_waitproc(p); +#ifdef MAC + mac_proc_destroy(p); +#endif + KASSERT(FIRST_THREAD_IN_PROC(p), + ("proc_reap: no residual thread!")); + uma_zfree(proc_zone, p); + sx_xlock(&allproc_lock); + nprocs--; +#ifdef VIMAGE + vprocg->nprocs--; +#endif + sx_xunlock(&allproc_lock); +} + int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) { - struct proc *p, *q, *t; + struct proc *p, *q; int error, nfound; AUDIT_ARG(pid, pid); @@ -736,111 +855,7 @@ loop: nfound++; PROC_SLOCK(p); if (p->p_state == PRS_ZOMBIE) { - INIT_VPROCG(P_TO_VPROCG(p)); - if (rusage) { - *rusage = p->p_ru; - calcru(p, &rusage->ru_utime, &rusage->ru_stime); - } - PROC_SUNLOCK(p); - td->td_retval[0] = p->p_pid; - if (statu
Re: svn commit: r193440 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs kern sys
On Saturday 06 June 2009 5:01:41 am Jaakko Heinonen wrote: > > Hi, > > On 2009-06-04, Paul Saab wrote: > > Support shared vnode locks for write operations when the offset is > > provided on filesystems that support it. This really improves mysql > > + innodb performance on ZFS. > > The panic below looks related to this commit. I think the assert is only > enabled when DEBUG_VFS_LOCKS is defined. Yes, vnode_if.src needs to be changed: %% writevp E E E %! writepre VOP_WRITE_PRE %! writepostVOP_WRITE_POST vop_write { IN struct vnode *vp; INOUT struct uio *uio; IN int ioflag; IN struct ucred *cred; }; The 'E E E' should be 'L L L'. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r192033 - stable/7/sys/dev/ata
On Sunday 17 May 2009 7:52:04 pm Bruce Simpson wrote: > Alexander Motin wrote: > > ... > > This change is not anyhow related to your system. Looks like the real > > reason found by jhb@ on sta...@. Probably something become more strict > > in system resource management last time and this driver violates now. > > > > Thanks... I reckon John is probably on the money with this but have not > looked closely. Hopefully the fix is backportable... I will try to find > time to test HEAD, I need to do some HEAD testing on this box anyway, > using a USB key is possible for this with NanoBSD now :-) Were you ever able to test http://www.FreeBSD.org/~jhb/patches/ata_ali.patch? -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193724 - in vendor/llvm/dist: include/llvm/Support lib/CodeGen lib/CodeGen/SelectionDAG test/CodeGen/X86
Author: ed Date: Mon Jun 8 15:36:37 2009 New Revision: 193724 URL: http://svn.freebsd.org/changeset/base/193724 Log: Import LLVM r73070. Now I'm going to stop importing code for a while. I spent a lot of time the last couple of days figuring out which LLVM commit caused g++ to miscompile, which in its turn caused Clang to miscompile the next build. I had to run `make buildworld' twice each time I bisected a revision. Added: vendor/llvm/dist/test/CodeGen/X86/2009-06-07-ExpandMMXBitcast.ll Modified: vendor/llvm/dist/include/llvm/Support/OutputBuffer.h vendor/llvm/dist/lib/CodeGen/ELF.h vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/ELFCodeEmitter.h vendor/llvm/dist/lib/CodeGen/ELFWriter.cpp vendor/llvm/dist/lib/CodeGen/ELFWriter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp Modified: vendor/llvm/dist/include/llvm/Support/OutputBuffer.h == --- vendor/llvm/dist/include/llvm/Support/OutputBuffer.hMon Jun 8 15:26:09 2009(r193723) +++ vendor/llvm/dist/include/llvm/Support/OutputBuffer.hMon Jun 8 15:36:37 2009(r193724) @@ -134,11 +134,22 @@ namespace llvm { P[2] = (X >> (isLittleEndian ? 16 : 8)) & 255; P[3] = (X >> (isLittleEndian ? 24 : 0)) & 255; } +void fixxword(uint64_t X, unsigned Offset) { + unsigned char *P = &Output[Offset]; + P[0] = (X >> (isLittleEndian ? 0 : 56)) & 255; + P[1] = (X >> (isLittleEndian ? 8 : 48)) & 255; + P[2] = (X >> (isLittleEndian ? 16 : 40)) & 255; + P[3] = (X >> (isLittleEndian ? 24 : 32)) & 255; + P[4] = (X >> (isLittleEndian ? 32 : 24)) & 255; + P[5] = (X >> (isLittleEndian ? 40 : 16)) & 255; + P[6] = (X >> (isLittleEndian ? 48 : 8)) & 255; + P[7] = (X >> (isLittleEndian ? 56 : 0)) & 255; +} void fixaddr(uint64_t X, unsigned Offset) { if (!is64Bit) fixword((unsigned)X, Offset); else -assert(0 && "Emission of 64-bit data not implemented yet!"); +fixxword(X, Offset); } unsigned char &operator[](unsigned Index) { Modified: vendor/llvm/dist/lib/CodeGen/ELF.h == --- vendor/llvm/dist/lib/CodeGen/ELF.h Mon Jun 8 15:26:09 2009 (r193723) +++ vendor/llvm/dist/lib/CodeGen/ELF.h Mon Jun 8 15:36:37 2009 (r193724) @@ -21,6 +21,7 @@ #ifndef CODEGEN_ELF_H #define CODEGEN_ELF_H +#include "llvm/CodeGen/MachineRelocation.h" #include "llvm/Support/DataTypes.h" #include @@ -64,6 +65,36 @@ namespace llvm { EV_CURRENT = 1 }; + struct ELFHeader { +// e_machine - This field is the target specific value to emit as the +// e_machine member of the ELF header. +unsigned short e_machine; + +// e_flags - The machine flags for the target. This defaults to zero. +unsigned e_flags; + +// e_size - Holds the ELF header's size in bytes +unsigned e_ehsize; + +// Endianess and ELF Class (64 or 32 bits) +unsigned ByteOrder; +unsigned ElfClass; + +unsigned getByteOrder() const { return ByteOrder; } +unsigned getElfClass() const { return ElfClass; } +unsigned getSize() const { return e_ehsize; } +unsigned getMachine() const { return e_machine; } +unsigned getFlags() const { return e_flags; } + +ELFHeader(unsigned short machine, unsigned flags, + bool is64Bit, bool isLittleEndian) + : e_machine(machine), e_flags(flags) { +ElfClass = is64Bit ? ELFCLASS64 : ELFCLASS32; +ByteOrder = isLittleEndian ? ELFDATA2LSB : ELFDATA2MSB; +e_ehsize = is64Bit ? 64 : 52; + } + }; + /// ELFSection - This struct contains information about each section that is /// emitted to the file. This is eventually turned into the section header /// table at the end of the file. @@ -118,11 +149,11 @@ namespace llvm { // Special section indices. enum { - SHN_UNDEF = 0, // Undefined, missing, irrelevant, or meaningless + SHN_UNDEF = 0, // Undefined, missing, irrelevant SHN_LORESERVE = 0xff00, // Lowest reserved index SHN_LOPROC= 0xff00, // Lowest processor-specific index SHN_HIPROC= 0xff1f, // Highest processor-specific index - SHN_ABS = 0xfff1, // Symbol has absolute value; does not need relocation + SHN_ABS = 0xfff1, // Symbol has absolute value; no relocation SHN_COMMON= 0xfff2, // FORTRAN COMMON or C external global variables SHN_HIRESERVE = 0x // Highest reserved index }; @@ -134,6 +165,15 @@ namespace llvm { /// up for emission to the file. std::vector SectionData; +/// Relocations - The relocations that we have encountered so far in this +/// section that we will need to convert to Elf relocation entries when +/// the file is written. +std::
svn commit: r193725 - in vendor/clang/dist: docs include/clang/AST include/clang/Basic include/clang/Parse lib/AST lib/Basic lib/CodeGen lib/Frontend lib/Headers lib/Parse lib/Sema test/CodeGen tes...
Author: ed Date: Mon Jun 8 15:36:55 2009 New Revision: 193725 URL: http://svn.freebsd.org/changeset/base/193725 Log: Import Clang r73070. Added: vendor/clang/dist/test/SemaTemplate/instantiate-objc-1.mm Modified: vendor/clang/dist/docs/UsersManual.html vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/X86Builtins.def vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Parse/AttributeList.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/RewriteBlocks.cpp vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Parse/AttributeList.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Sema/Sema.h vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateExpr.cpp vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/Sema/block-args.c vendor/clang/dist/test/Sema/block-call.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/SemaObjC/blocks.m vendor/clang/dist/test/SemaTemplate/temp_class_spec.cpp vendor/clang/dist/tools/clang-cc/clang-cc.cpp Modified: vendor/clang/dist/docs/UsersManual.html == --- vendor/clang/dist/docs/UsersManual.html Mon Jun 8 15:36:37 2009 (r193724) +++ vendor/clang/dist/docs/UsersManual.html Mon Jun 8 15:36:55 2009 (r193725) @@ -52,22 +52,16 @@ td { C++ Language Features - - ... - Objective C++ Language Features - - ... - Target-Specific Features and Limitations CPU Architectures Features and Limitations X86 -PPC -ARM +ARM +Other platforms Operating System Features and Limitations @@ -612,9 +606,10 @@ translation units. clang has some experimental support for extensions from Microsoft Visual C++; to enable it, use the -fms-extensions command-line -option. Eventually, this will be the default for Windows targets. -These extensions are not anywhere near complete, so please do not -file bugs; patches are welcome, though. +option. This is the default for Windows targets. Note that the +support is incomplete; enabling Microsoft extensions will silently drop +certain constructs (including __declspec and Microsoft-style asm statements). + clang does not support the Microsoft extension where anonymous record members can be declared using user defined typedefs. @@ -670,7 +665,37 @@ more information. X86 +The support for X86 (both 32-bit and 64-bit) is considered stable +on Darwin (Mac OS/X), Linux, FreeBSD, and Dragonfly BSD: it has been tested to +correctly compile large C and Objective-C codebases. (FIXME: Anything specific +we want to say here? Possibly mention some LLVM x86 limitations?) + +ARM + +ARM support is mostly feature-complete, but still experimental; it hasn't +undergone significant testing. + + +Other platforms + +clang currently contains some support for PPC and Sparc; however, significant +pieces of code generation are still missing, and they haven't undergone +significant testing. + +clang contains some support for the embedded PIC16 processor +(FIXME: I haven't been keeping track of this; what should this say?). + +clang contains limited support for the MSP430 embedded processor, but both +the clang support and the LLVM backend support are highly experimental. + +Other platforms are completely unsupported at the moment. Adding the +minimal support needed for parsing and semantic analysis on a new platform +is quite easy; see lib/Basic/Targets.cpp in the clang source tree. This level +of support is also sufficient for conversion to LLVM IR for simple programs. +Proper support for conversion to LLVM IR requires adding code to +lib/CodeGen/CGCall.cpp at the moment; this is likely to change soon, though. +Generating assembly requires a suitable LLVM backend. Operating System Features and Limitations Modified: vendor/clang/dist/include/clang/AST/ASTContext.h == --- vendor/clang/dist/include/clang/AST/ASTContext.hMon Jun 8 15:36:37 2009(r193724) +++ vendor/clang/dist/include/clang/AST/ASTContext.hMon Jun 8 15:36:55 2009(r193725) @@ -696,7 +696,6 @@ public: /// Compatibility predicates used to check
svn commit: r193726 - vendor/llvm/llvm-r73070.
Author: ed Date: Mon Jun 8 15:37:40 2009 New Revision: 193726 URL: http://svn.freebsd.org/changeset/base/193726 Log: Tag the LLVM r73070 import. Added: vendor/llvm/llvm-r73070./ - copied from r193725, vendor/llvm/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193727 - vendor/clang/clang-r73070.
Author: ed Date: Mon Jun 8 15:38:03 2009 New Revision: 193727 URL: http://svn.freebsd.org/changeset/base/193727 Log: Tag the Clang r73070 import. Added: vendor/clang/clang-r73070./ - copied from r193726, vendor/clang/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193728 - head/sbin/geom/class/part
Author: jhb Date: Mon Jun 8 15:54:07 2009 New Revision: 193728 URL: http://svn.freebsd.org/changeset/base/193728 Log: Change the printf format string to match the variable type to quiet warnings. Modified: head/sbin/geom/class/part/geom_part.c Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Mon Jun 8 15:38:03 2009 (r193727) +++ head/sbin/geom/class/part/geom_part.c Mon Jun 8 15:54:07 2009 (r193728) @@ -342,13 +342,13 @@ gpart_autofill(struct gctl_req *req) return (ENOSPC); if (!has_size) { - asprintf(&val, "%jd", size); + asprintf(&val, "%llu", size); if (val == NULL) return (ENOMEM); gctl_change_param(req, "size", -1, val); } if (!has_start) { - asprintf(&val, "%jd", start); + asprintf(&val, "%llu", start); if (val == NULL) return (ENOMEM); gctl_change_param(req, "start", -1, val); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193712 - head/sys/arm/arm
On 2009-06-08, at 14:56, Stanislav Sedov wrote: On Mon, 8 Jun 2009 12:15:39 + (UTC) Rafal Jaworowski mentioned: Author: raj Date: Mon Jun 8 12:15:39 2009 New Revision: 193712 URL: http://svn.freebsd.org/changeset/base/193712 Log: Invalidate cache in pmap_remove_all() on ARM. When pages are removed from virtual address space by calling pmap_remove_all() CPU caches were not invalidated, which led to read corruption when another page got mapped at this same virtual address at later time (the CPU was retrieving stale contents). Submitted by: Piotr Ziecik Obtained from: Semihalf Modified: head/sys/arm/arm/pmap.c Modified: head/sys/arm/arm/pmap.c = = = = = = = = = = --- head/sys/arm/arm/pmap.c Mon Jun 8 12:10:42 2009(r193711) +++ head/sys/arm/arm/pmap.c Mon Jun 8 12:15:39 2009(r193712) @@ -3124,7 +3124,19 @@ pmap_remove_all(vm_page_t m) if (flush == FALSE && (pv->pv_pmap == curpm || pv->pv_pmap == pmap_kernel())) flush = TRUE; + PMAP_LOCK(pv->pv_pmap); + /* +* Cached contents were written-back in pmap_remove_write(), +* but we still have to invalidate the cache entry to make +* sure stale data are not retrieved when another page will be +* mapped under this virtual address. +*/ + if (pmap_is_current(pv->pv_pmap)) { + cpu_dcache_inv_range(pv->pv_va, PAGE_SIZE); + cpu_l2cache_inv_range(pv->pv_va, PAGE_SIZE); + } + Hi, Rafal! What about calling the pmap_dcache_wb_range function for each mapping in the cycle instead of calling cpu_XXX_inv_range functions directly? I think something like this would do the trick: % pmap_dcache_wb_range(pv->pv_pmap, pv->pv_va, PAGE_SIZE, FALSE, % (pv->pv_flags & PVF_WRITE) == 0) This will also take care of the writeback cache. I don't know if it is really needed, though. Do you see anything wrong with calling cpu_xxx_inv_range directly? Writing back (if required) was already performed by pmap_remove_write(), and what we only need at this point is invalidation. pmap_dcache_wb_range would also eventually call cpu_XXX_inv_range if given a proper combination of flags (BTW: the do_inv flag in your example should be TRUE for our context to work), so it wouldn't be any simpler. I'd rather prefer doing explicitly what is needed without extra wrapping. Rafal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193712 - head/sys/arm/arm
On Mon, 8 Jun 2009 17:56:51 +0200 Rafal Jaworowski mentioned: > > Do you see anything wrong with calling cpu_xxx_inv_range directly? > Writing back (if required) was already performed by > pmap_remove_write(), and what we only need at this point is > invalidation. pmap_dcache_wb_range would also eventually call > cpu_XXX_inv_range if given a proper combination of flags (BTW: the > do_inv flag in your example should be TRUE for our context to work), > so it wouldn't be any simpler. I'd rather prefer doing explicitly what > is needed without extra wrapping. > I don't see anything particulary wrong with your approach. On the other hand, using pmap_dcache_wb_range will help to reduce the code duplication, so if one day we'll think that something else is needed to properly invalidate the PTE range, we'll be able to modify the pmap_dcache_wb_range accordingly without looking for other parts of code that does the same. -- Stanislav Sedov ST4096-RIPE pgpP7SA8D7r4p.pgp Description: PGP signature
Re: svn commit: r193728 - head/sbin/geom/class/part
On Jun 8, 2009, at 8:54 AM, John Baldwin wrote: Author: jhb Date: Mon Jun 8 15:54:07 2009 New Revision: 193728 URL: http://svn.freebsd.org/changeset/base/193728 Log: Change the printf format string to match the variable type to quiet warnings. Oops.. Thanks John! -- Marcel Moolenaar xcl...@mac.com ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193729 - head/sys/amd64/include
Author: alc Date: Mon Jun 8 16:43:40 2009 New Revision: 193729 URL: http://svn.freebsd.org/changeset/base/193729 Log: Now that amd64's kernel map is 512GB (SVN rev 192216), there is no reason to cap its buffer map at 1GB. MFC after:6 weeks Modified: head/sys/amd64/include/param.h Modified: head/sys/amd64/include/param.h == --- head/sys/amd64/include/param.h Mon Jun 8 15:54:07 2009 (r193728) +++ head/sys/amd64/include/param.h Mon Jun 8 16:43:40 2009 (r193729) @@ -137,15 +137,6 @@ #endif /* - * Ceiling on size of buffer cache (really only effects write queueing, - * the VM page cache is not effected), can be changed via - * the kern.maxbcache /boot/loader.conf variable. - */ -#ifndef VM_BCACHE_SIZE_MAX -#defineVM_BCACHE_SIZE_MAX (1024 * 1024 * 1024) -#endif - -/* * Mach derived conversion macros */ #defineround_page(x) unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193730 - head/sys/contrib/dev/acpica/include/platform
Author: jkim Date: Mon Jun 8 17:11:47 2009 New Revision: 193730 URL: http://svn.freebsd.org/changeset/base/193730 Log: Clean up FreeBSD-specific header file: - Define ACPI_USE_DO_WHILE_0 to add do while(0) around return_*() macros. - Define __cdecl only for user land. It will never be used in kernel. - Remove __cli() and __sti(). They were deprecated long ago. Modified: head/sys/contrib/dev/acpica/include/platform/acfreebsd.h Modified: head/sys/contrib/dev/acpica/include/platform/acfreebsd.h == --- head/sys/contrib/dev/acpica/include/platform/acfreebsd.hMon Jun 8 16:43:40 2009(r193729) +++ head/sys/contrib/dev/acpica/include/platform/acfreebsd.hMon Jun 8 17:11:47 2009(r193730) @@ -125,11 +125,10 @@ #defineACPI_UINTPTR_T uintptr_t +#defineACPI_USE_DO_WHILE_0 #defineACPI_USE_LOCAL_CACHE #defineACPI_USE_SYSTEM_CLIBRARY -#define__cdecl - #ifdef _KERNEL #include @@ -168,12 +167,10 @@ #defineACPI_THREAD_ID pthread_t -/* Not building kernel code, so use libc */ #defineACPI_USE_STANDARD_HEADERS -#defineACPI_FLUSH_CPU_CACHE() -#define__cli() -#define__sti() +#defineACPI_FLUSH_CPU_CACHE() +#define__cdecl #endif /* _KERNEL */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193731 - in head: . sys/kern sys/net sys/netgraph sys/netinet sys/netinet6 sys/netipsec sys/sys
Author: zec Date: Mon Jun 8 17:15:40 2009 New Revision: 193731 URL: http://svn.freebsd.org/changeset/base/193731 Log: Introduce an infrastructure for dismantling vnet instances. Vnet modules and protocol domains may now register destructor functions to clean up and release per-module state. The destructor mechanisms can be triggered by invoking "vimage -d", or a future equivalent command which will be provided via the new jail framework. While this patch introduces numerous placeholder destructor functions, many of those are currently incomplete, thus leaking memory or (even worse) failing to stop all running timers. Many of such issues are already known and will be incrementaly fixed over the next weeks in smaller incremental commits. Apart from introducing new fields in structs ifnet, domain, protosw and vnet_net, which requires the kernel and modules to be rebuilt, this change should have no impact on nooptions VIMAGE builds, since vnet destructors can only be called in VIMAGE kernels. Moreover, destructor functions should be in general compiled in only in options VIMAGE builds, except for kernel modules which can be safely kldunloaded at run time. Bump __FreeBSD_version to 800097. Reviewed by: bz, julian Approved by: rwatson, kib (re), julian (mentor) Modified: head/UPDATING head/sys/kern/kern_vimage.c head/sys/kern/uipc_domain.c head/sys/net/if.c head/sys/net/if_gif.c head/sys/net/if_loop.c head/sys/net/if_var.h head/sys/net/route.c head/sys/net/vnet.h head/sys/netgraph/ng_base.c head/sys/netinet/in_proto.c head/sys/netinet/in_rmx.c head/sys/netinet/ip_var.h head/sys/netinet/raw_ip.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_syncache.h head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_var.h head/sys/netinet6/ip6protosw.h head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netipsec/ipsec.c head/sys/netipsec/key.c head/sys/netipsec/key.h head/sys/netipsec/keysock.c head/sys/sys/domain.h head/sys/sys/param.h head/sys/sys/protosw.h head/sys/sys/vimage.h Modified: head/UPDATING == --- head/UPDATING Mon Jun 8 17:11:47 2009(r193730) +++ head/UPDATING Mon Jun 8 17:15:40 2009(r193731) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090608: + The layout of structs ifnet, domain, protosw and vnet_net has + changed. Kernel modules need to be rebuilt. + Bump __FreeBSD_version to 800097. + 20090602: window(1) has been removed from the base system. It can now be installed from ports. The port is called misc/window. Modified: head/sys/kern/kern_vimage.c == --- head/sys/kern/kern_vimage.c Mon Jun 8 17:11:47 2009(r193730) +++ head/sys/kern/kern_vimage.c Mon Jun 8 17:15:40 2009(r193731) @@ -65,8 +65,8 @@ static int vnet_mod_constructor(struct v static int vnet_mod_destructor(struct vnet_modlink *); #ifdef VIMAGE -static struct vimage *vimage_by_name(struct vimage *, char *); static struct vimage *vi_alloc(struct vimage *, char *); +static int vi_destroy(struct vimage *); static struct vimage *vimage_get_next(struct vimage *, struct vimage *, int); static void vimage_relative_name(struct vimage *, struct vimage *, char *, int); @@ -122,7 +122,7 @@ vi_if_move(struct vi_req *vi_req, struct struct vnet *new_vnet = NULL; /* Check for API / ABI version mismatch. */ - if (vi_req->vi_api_cookie != VI_API_COOKIE) + if (vi_req != NULL && vi_req->vi_api_cookie != VI_API_COOKIE) return (EDOOFUS); /* Find the target vnet. */ @@ -216,11 +216,7 @@ vi_td_ioctl(u_long cmd, struct vi_req *v case SIOCSPVIMAGE: if (vi_req->vi_req_action == VI_DESTROY) { -#ifdef NOTYET error = vi_destroy(vip_r); -#else - error = EOPNOTSUPP; -#endif break; } @@ -283,7 +279,7 @@ vi_child_of(struct vimage *parent, struc return (0); } -static struct vimage * +struct vimage * vimage_by_name(struct vimage *top, char *name) { struct vimage *vip; @@ -541,7 +537,6 @@ vnet_mod_constructor(struct vnet_modlink return (0); } - static int vnet_mod_destructor(struct vnet_modlink *vml) { @@ -663,6 +658,68 @@ vi_alloc(struct vimage *parent, char *na return (vip); } + +/* + * Destroy a vne
svn commit: r193732 - in head/sys: amd64/amd64 i386/i386 i386/xen sys
Author: ed Date: Mon Jun 8 17:27:25 2009 New Revision: 193732 URL: http://svn.freebsd.org/changeset/base/193732 Log: Remove __gnu89_inline. Now that we use C99 almost everywhere, just use C99-style in the pmap code. Since the pmap code is the only consumer of __gnu89_inline, remove it from cdefs.h as well. Because the flag was only introduced 17 months ago, I don't expect any problems. Reviewed by: alc Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/sys/cdefs.h Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Mon Jun 8 17:15:40 2009(r193731) +++ head/sys/amd64/amd64/pmap.c Mon Jun 8 17:27:25 2009(r193732) @@ -153,7 +153,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE__gnu89_inline +#define PMAP_INLINEextern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Mon Jun 8 17:15:40 2009(r193731) +++ head/sys/i386/i386/pmap.c Mon Jun 8 17:27:25 2009(r193732) @@ -161,7 +161,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINE__gnu89_inline +#define PMAP_INLINEextern inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/xen/pmap.c == --- head/sys/i386/xen/pmap.cMon Jun 8 17:15:40 2009(r193731) +++ head/sys/i386/xen/pmap.cMon Jun 8 17:27:25 2009(r193732) @@ -172,7 +172,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINE__gnu89_inline +#define PMAP_INLINEextern inline #else #define PMAP_INLINE #endif Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hMon Jun 8 17:15:40 2009(r193731) +++ head/sys/sys/cdefs.hMon Jun 8 17:27:25 2009(r193732) @@ -234,12 +234,6 @@ #define__always_inline #endif -#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */ -#define__gnu89_inline __attribute__((__gnu_inline__)) __inline -#else -#define__gnu89_inline -#endif - #if __GNUC_PREREQ__(3, 1) #define__noinline __attribute__ ((__noinline__)) #else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193733 - head/sys/dev/usb
Author: thompsa Date: Mon Jun 8 18:09:51 2009 New Revision: 193733 URL: http://svn.freebsd.org/changeset/base/193733 Log: Change driver_info to a ulong as it always stores a number and remove the only diff of the usb_device_id struct to Linux. Reviewed by: HPS Modified: head/sys/dev/usb/usb_core.h head/sys/dev/usb/usb_lookup.h Modified: head/sys/dev/usb/usb_core.h == --- head/sys/dev/usb/usb_core.h Mon Jun 8 17:27:25 2009(r193732) +++ head/sys/dev/usb/usb_core.h Mon Jun 8 18:09:51 2009(r193733) @@ -485,7 +485,8 @@ struct usb_lookup_info { struct usb_attach_arg { struct usb_lookup_info info; device_t temp_dev; /* for internal use */ - const void *driver_info;/* for internal use */ + unsigned long driver_info; /* for internal use */ + void *driver_ivar; struct usb_device *device; /* current device */ struct usb_interface *iface;/* current interface */ enum usb_hc_mode usb_mode; /* host or device mode */ Modified: head/sys/dev/usb/usb_lookup.h == --- head/sys/dev/usb/usb_lookup.h Mon Jun 8 17:27:25 2009 (r193732) +++ head/sys/dev/usb/usb_lookup.h Mon Jun 8 18:09:51 2009 (r193733) @@ -37,7 +37,7 @@ struct usb_attach_arg; struct usb_device_id { /* Hook for driver specific information */ - const void *driver_info; + unsigned long driver_info; /* Used for product specific matches; the BCD range is inclusive */ uint16_t idVendor; @@ -107,11 +107,11 @@ struct usb_device_id { #defineUSB_IF_CSI(class,subclass,info) \ USB_IFACE_CLASS(class), USB_IFACE_SUBCLASS(subclass), USB_DRIVER_INFO(info) -#defineUSB_DRIVER_INFO(ptr)\ - .driver_info = ((const void *)(ptr)) +#defineUSB_DRIVER_INFO(n) \ + .driver_info = (n) #defineUSB_GET_DRIVER_INFO(did)\ - (((const uint8_t *)((did)->driver_info)) - ((const uint8_t *)0)) + (did)->driver_info const struct usb_device_id *usb2_lookup_id_by_info( const struct usb_device_id *id, usb_size_t sizeof_id, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193728 - head/sbin/geom/class/part
On Monday 08 June 2009 12:29:38 pm Marcel Moolenaar wrote: > > On Jun 8, 2009, at 8:54 AM, John Baldwin wrote: > > > Author: jhb > > Date: Mon Jun 8 15:54:07 2009 > > New Revision: 193728 > > URL: http://svn.freebsd.org/changeset/base/193728 > > > > Log: > > Change the printf format string to match the variable type to quiet > > warnings. > > Oops.. > > Thanks John! No problem. It actually compiled ok on my desktop (which runs 7) since 7 has NO_WERROR= set in /usr/share/mk/bsd.sys.mk since there was no -Werror to force a failure. It might be nice to have the NO_WERROR= thing take out of 7 if possible. I know that I would likely be burned by it myself as I tend to test 8 kernels on boxes that otherwise run 7 a lot. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193734 - in head: lib/libusb sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys
Author: ed Date: Mon Jun 8 18:23:43 2009 New Revision: 193734 URL: http://svn.freebsd.org/changeset/base/193734 Log: Revert my change; reintroduce __gnu89_inline. It turns out our compiler in stable/7 can't build this code anymore. Even though my opinion is that those people should just run `make kernel-toolchain' before building a kernel, I am willing to wait and commit this after we've branched stable/8. Requested by: rwatson Modified: head/lib/libusb/libusb.3 (props changed) head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/sys/cdefs.h Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Mon Jun 8 18:09:51 2009(r193733) +++ head/sys/amd64/amd64/pmap.c Mon Jun 8 18:23:43 2009(r193734) @@ -153,7 +153,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINEextern inline +#define PMAP_INLINE__gnu89_inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Mon Jun 8 18:09:51 2009(r193733) +++ head/sys/i386/i386/pmap.c Mon Jun 8 18:23:43 2009(r193734) @@ -161,7 +161,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(DIAGNOSTIC) -#define PMAP_INLINEextern inline +#define PMAP_INLINE__gnu89_inline #else #define PMAP_INLINE #endif Modified: head/sys/i386/xen/pmap.c == --- head/sys/i386/xen/pmap.cMon Jun 8 18:09:51 2009(r193733) +++ head/sys/i386/xen/pmap.cMon Jun 8 18:23:43 2009(r193734) @@ -172,7 +172,7 @@ __FBSDID("$FreeBSD$"); #endif #if !defined(PMAP_DIAGNOSTIC) -#define PMAP_INLINEextern inline +#define PMAP_INLINE__gnu89_inline #else #define PMAP_INLINE #endif Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hMon Jun 8 18:09:51 2009(r193733) +++ head/sys/sys/cdefs.hMon Jun 8 18:23:43 2009(r193734) @@ -234,6 +234,12 @@ #define__always_inline #endif +#if __GNUC_PREREQ__(4, 2) /* actually 4.1.3 */ +#define__gnu89_inline __attribute__((__gnu_inline__)) __inline +#else +#define__gnu89_inline +#endif + #if __GNUC_PREREQ__(3, 1) #define__noinline __attribute__ ((__noinline__)) #else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193735 - head/sys/fs/nfsclient
Author: rmacklem Date: Mon Jun 8 18:41:23 2009 New Revision: 193735 URL: http://svn.freebsd.org/changeset/base/193735 Log: Fix nfscl_getcl() so that it doesn't crash when it is called to do an NFSv4 Close operation with the cred argument NULL. Also, clarify what NULL arguments mean in the function's comment. Approved by: kib (mentor) Modified: head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfsclient/nfs_clstate.c == --- head/sys/fs/nfsclient/nfs_clstate.c Mon Jun 8 18:23:43 2009 (r193734) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Jun 8 18:41:23 2009 (r193735) @@ -663,8 +663,9 @@ nfscl_openrelease(struct nfsclopen *op, * client data structures to do the SetClientId/SetClientId_confirm, * but will release that lock and return the clientid with a refernce * count on it. - * If the p argument is NULL, it will not do the SetClientId/Confirm - * and the cred argument is not used, so it can be NULL too. + * If the "cred" argument is NULL, a new clientid should not be created. + * If the "p" argument is NULL, a SetClientID/SetClientIDConfirm cannot + * be done. * It always clpp with a reference count on it, unless returning an error. */ APPLESTATIC int @@ -672,28 +673,35 @@ nfscl_getcl(vnode_t vp, struct ucred *cr struct nfsclclient **clpp) { struct nfsclclient *clp; - struct nfsclclient *newclp; + struct nfsclclient *newclp = NULL; struct nfscllockowner *lp, *nlp; struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct prison *pr; char uuid[HOSTUUIDLEN]; int igotlock = 0, error, trystalecnt, clidinusedelay, i; - u_int16_t idlen; + u_int16_t idlen = 0; - pr = cred->cr_prison; - mtx_lock(&pr->pr_mtx); - strlcpy(uuid, pr->pr_uuid, sizeof uuid); - mtx_unlock(&pr->pr_mtx); - idlen = strlen(uuid); - if (idlen > 0) - idlen += sizeof (u_int64_t); - else - idlen += sizeof (u_int64_t) + 16; /* 16 random bytes */ - MALLOC(newclp, struct nfsclclient *, sizeof (struct nfsclclient) + - idlen - 1, M_NFSCLCLIENT, M_WAITOK); + if (cred != NULL) { + pr = cred->cr_prison; + mtx_lock(&pr->pr_mtx); + strlcpy(uuid, pr->pr_uuid, sizeof uuid); + mtx_unlock(&pr->pr_mtx); + idlen = strlen(uuid); + if (idlen > 0) + idlen += sizeof (u_int64_t); + else + idlen += sizeof (u_int64_t) + 16; /* 16 random bytes */ + MALLOC(newclp, struct nfsclclient *, + sizeof (struct nfsclclient) + idlen - 1, M_NFSCLCLIENT, + M_WAITOK); + } NFSLOCKCLSTATE(); clp = nmp->nm_clp; if (clp == NULL) { + if (newclp == NULL) { + NFSUNLOCKCLSTATE(); + return (EACCES); + } clp = newclp; NFSBZERO((caddr_t)clp, sizeof(struct nfsclclient) + idlen - 1); clp->nfsc_idlen = idlen; @@ -714,7 +722,8 @@ nfscl_getcl(vnode_t vp, struct ucred *cr nfscl_start_renewthread(clp); } else { NFSUNLOCKCLSTATE(); - FREE((caddr_t)newclp, M_NFSCLCLIENT); + if (newclp != NULL) + FREE((caddr_t)newclp, M_NFSCLCLIENT); } NFSLOCKCLSTATE(); while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock) @@ -730,7 +739,7 @@ nfscl_getcl(vnode_t vp, struct ucred *cr if ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0) { if (!igotlock) panic("nfscl_clget"); - if (p == NULL) { + if (p == NULL || cred == NULL) { NFSLOCKCLSTATE(); nfsv4_unlock(&clp->nfsc_lock, 0); NFSUNLOCKCLSTATE(); @@ -762,8 +771,8 @@ nfscl_getcl(vnode_t vp, struct ucred *cr clidinusedelay = 120; trystalecnt = 3; do { - error = nfsrpc_setclient(VFSTONFS(vnode_mount(vp)), clp, - cred, p); + error = nfsrpc_setclient(VFSTONFS(vnode_mount(vp)), + clp, cred, p); if (error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_CLIDINUSE) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193736 - in vendor/llvm: llvm-r73070 llvm-r73070.
Author: ed Date: Mon Jun 8 18:58:32 2009 New Revision: 193736 URL: http://svn.freebsd.org/changeset/base/193736 Log: Remove trailing dot, which I've probably added by accident. Added: vendor/llvm/llvm-r73070/ - copied from r193735, vendor/llvm/llvm-r73070./ Deleted: vendor/llvm/llvm-r73070./ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193737 - in vendor/clang: clang-r73070 clang-r73070.
Author: ed Date: Mon Jun 8 18:58:54 2009 New Revision: 193737 URL: http://svn.freebsd.org/changeset/base/193737 Log: Remove trailing dot, which I've probably added by accident. Added: vendor/clang/clang-r73070/ - copied from r193736, vendor/clang/clang-r73070./ Deleted: vendor/clang/clang-r73070./ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193738 - stable/7/usr.bin/rpcgen
Author: des Date: Mon Jun 8 19:22:12 2009 New Revision: 193738 URL: http://svn.freebsd.org/changeset/base/193738 Log: merge r173761: generate code that respects C99's strict aliasing rules. Modified: stable/7/usr.bin/rpcgen/ (props changed) stable/7/usr.bin/rpcgen/rpc_cout.c Modified: stable/7/usr.bin/rpcgen/rpc_cout.c == --- stable/7/usr.bin/rpcgen/rpc_cout.c Mon Jun 8 18:58:54 2009 (r193737) +++ stable/7/usr.bin/rpcgen/rpc_cout.c Mon Jun 8 19:22:12 2009 (r193738) @@ -200,11 +200,13 @@ print_ifsizeof(int indent, const char *p } static void -print_ifclose(int indent) +print_ifclose(int indent, int brace) { f_print(fout, "))\n"); tabify(fout, indent); f_print(fout, "\treturn (FALSE);\n"); + if (brace) + f_print(fout, "\t}\n"); } static void @@ -212,12 +214,16 @@ print_ifstat(int indent, const char *pre const char *amax, const char *objname, const char *name) { const char *alt = NULL; + int brace = 0; switch (rel) { case REL_POINTER: + brace = 1; + f_print(fout, "\t{\n"); + f_print(fout, "\t%s **pp = %s;\n", type, objname); print_ifopen(indent, "pointer"); print_ifarg("(char **)"); - f_print(fout, "%s", objname); + f_print(fout, "pp"); print_ifsizeof(0, prefix, type); break; case REL_VECTOR: @@ -274,7 +280,7 @@ print_ifstat(int indent, const char *pre print_ifarg(objname); break; } - print_ifclose(indent); + print_ifclose(indent, brace); } /* ARGSUSED */ @@ -283,7 +289,7 @@ emit_enum(definition *def __unused) { print_ifopen(1, "enum"); print_ifarg("(enum_t *)objp"); - print_ifclose(1); + print_ifclose(1, 0); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193739 - stable/7/include
Author: des Date: Mon Jun 8 19:24:37 2009 New Revision: 193739 URL: http://svn.freebsd.org/changeset/base/193739 Log: merge r173762: use a forward declaration to avoid an aliasing warning Modified: stable/7/include/ (props changed) stable/7/include/dirent.h Modified: stable/7/include/dirent.h == --- stable/7/include/dirent.h Mon Jun 8 19:22:12 2009(r193738) +++ stable/7/include/dirent.h Mon Jun 8 19:24:37 2009(r193739) @@ -60,6 +60,7 @@ #defineDIRBLKSIZ 1024 struct _telldir; /* see telldir.h */ +struct pthread_mutex; /* structure describing an open directory. */ typedef struct _dirdesc { @@ -71,7 +72,7 @@ typedef struct _dirdesc { longdd_seek;/* magic cookie returned by getdirentries */ longdd_rewind; /* magic cookie for rewinding */ int dd_flags; /* flags for readdir */ - void*dd_lock; /* hack to avoid including */ + struct pthread_mutex*dd_lock; /* lock */ struct _telldir *dd_td; /* telldir position recording */ } DIR; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193740 - stable/7/lib/libc/string
Author: des Date: Mon Jun 8 19:40:48 2009 New Revision: 193740 URL: http://svn.freebsd.org/changeset/base/193740 Log: Remove bogus mergeinfo Modified: stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193741 - in stable/7/lib/libc: . gen
Author: des Date: Mon Jun 8 19:52:12 2009 New Revision: 193741 URL: http://svn.freebsd.org/changeset/base/193741 Log: merge r174221: remove unnecessary casts Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gen/closedir.c stable/7/lib/libc/gen/readdir.c stable/7/lib/libc/gen/seekdir.c stable/7/lib/libc/gen/telldir.c Modified: stable/7/lib/libc/gen/closedir.c == --- stable/7/lib/libc/gen/closedir.cMon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/closedir.cMon Jun 8 19:52:12 2009 (r193741) @@ -54,7 +54,7 @@ closedir(dirp) int fd; if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, dirp->dd_rewind);/* free seekdir storage */ fd = dirp->dd_fd; dirp->dd_fd = -1; @@ -62,8 +62,8 @@ closedir(dirp) free((void *)dirp->dd_buf); _reclaim_telldir(dirp); if (__isthreaded) { - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); - _pthread_mutex_destroy((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); + _pthread_mutex_destroy(&dirp->dd_lock); } free((void *)dirp); return(_close(fd)); Modified: stable/7/lib/libc/gen/readdir.c == --- stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/readdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -88,9 +88,9 @@ readdir(dirp) struct dirent *dp; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); dp = _readdir_unlocked(dirp, 1); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else dp = _readdir_unlocked(dirp, 1); @@ -109,10 +109,10 @@ readdir_r(dirp, entry, result) saved_errno = errno; errno = 0; if (__isthreaded) { - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } else if ((dp = _readdir_unlocked(dirp, 1)) != NULL) memcpy(entry, dp, _GENERIC_DIRSIZ(dp)); Modified: stable/7/lib/libc/gen/seekdir.c == --- stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/seekdir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -52,8 +52,8 @@ seekdir(dirp, loc) long loc; { if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); _seekdir(dirp, loc); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); } Modified: stable/7/lib/libc/gen/telldir.c == --- stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:40:48 2009 (r193740) +++ stable/7/lib/libc/gen/telldir.c Mon Jun 8 19:52:12 2009 (r193741) @@ -64,13 +64,13 @@ telldir(dirp) if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL) return (-1); if (__isthreaded) - _pthread_mutex_lock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_lock(&dirp->dd_lock); lp->loc_index = dirp->dd_td->td_loccnt++; lp->loc_seek = dirp->dd_seek; lp->loc_loc = dirp->dd_loc; LIST_INSERT_HEAD(&dirp->dd_td->td_locq, lp, loc_lqe); if (__isthreaded) - _pthread_mutex_unlock((pthread_mutex_t *)&dirp->dd_lock); + _pthread_mutex_unlock(&dirp->dd_lock); return (lp->loc_index); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193742 - head/sys/dev/if_ndis
Author: thompsa Date: Mon Jun 8 19:56:23 2009 New Revision: 193742 URL: http://svn.freebsd.org/changeset/base/193742 Log: Commit missed driver_info to driver_ivar change in usb_attach_args. Pointed out by: kib Modified: head/sys/dev/if_ndis/if_ndis_usb.c Modified: head/sys/dev/if_ndis/if_ndis_usb.c == --- head/sys/dev/if_ndis/if_ndis_usb.c Mon Jun 8 19:52:12 2009 (r193741) +++ head/sys/dev/if_ndis/if_ndis_usb.c Mon Jun 8 19:56:23 2009 (r193742) @@ -149,7 +149,7 @@ ndisusb_match(device_t self) db = windrv_match((matchfuncptr)ndisusb_devcompare, self); if (db == NULL) return (ENXIO); - uaa->driver_info = db; + uaa->driver_ivar = db; return (0); } @@ -165,7 +165,7 @@ ndisusb_attach(device_t self) driver_object *drv; int devidx = 0; - db = uaa->driver_info; + db = uaa->driver_ivar; sc = (struct ndis_softc *)dummy; sc->ndis_dev = self; mtx_init(&sc->ndisusb_mtx, "NDIS USB", MTX_NETWORK_LOCK, MTX_DEF); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193743 - stable/7/lib/libc
Author: des Date: Mon Jun 8 19:56:50 2009 New Revision: 193743 URL: http://svn.freebsd.org/changeset/base/193743 Log: Record a rev that was merged in the previous commit. Modified: stable/7/lib/libc/ (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193744 - in head/sys: compat/linprocfs compat/linux compat/svr4 contrib/altq/altq contrib/pf/net dev/cxgb/ulp/iw_cxgb kern modules/bridgestp modules/cxgb/iw_cxgb modules/if_ef modules/...
Author: bz Date: Mon Jun 8 19:57:35 2009 New Revision: 193744 URL: http://svn.freebsd.org/changeset/base/193744 Log: After r193232 rt_tables in vnet.h are no longer indirectly dependent on the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer depend on it for module builds. Remove the hidden include in flowtable.h as well and leave the two explicit #includes in ip_input.c and ip_output.c. Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/svr4/svr4_sockio.c head/sys/contrib/altq/altq/altq_subr.c head/sys/contrib/pf/net/pf_if.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/kern/kern_poll.c head/sys/kern/kern_uuid.c head/sys/modules/bridgestp/Makefile head/sys/modules/cxgb/iw_cxgb/Makefile head/sys/modules/if_ef/Makefile head/sys/modules/if_vlan/Makefile head/sys/modules/ip_mroute_mod/Makefile head/sys/modules/ipfw/Makefile head/sys/modules/linprocfs/Makefile head/sys/modules/linux/Makefile head/sys/modules/netgraph/atm/atm/Makefile head/sys/modules/netgraph/ether/Makefile head/sys/modules/netgraph/gif/Makefile head/sys/modules/nfsclient/Makefile head/sys/modules/pf/Makefile head/sys/modules/svr4/Makefile head/sys/modules/wlan/Makefile head/sys/net/bridgestp.c head/sys/net/flowtable.h head/sys/net/if.c head/sys/net/if_ef.c head/sys/net/if_ethersubr.c head/sys/net/if_loop.c head/sys/net/if_mib.c head/sys/net/if_vlan.c head/sys/net/raw_cb.c head/sys/net/raw_usrreq.c head/sys/net/rtsock.c head/sys/net80211/ieee80211_ddb.c head/sys/netgraph/atm/ng_atm.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_gif.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_mcast.c head/sys/netinet/in_proto.c head/sys/netinet/in_rmx.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/scope6.c head/sys/netipsec/keysock.c head/sys/netipsec/xform_ipip.c head/sys/nfsclient/bootp_subr.c head/sys/nfsclient/nfs_diskless.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Mon Jun 8 19:56:50 2009 (r193743) +++ head/sys/compat/linprocfs/linprocfs.c Mon Jun 8 19:57:35 2009 (r193744) @@ -39,7 +39,6 @@ * @(#)procfs_status.c 8.4 (Berkeley) 6/15/94 */ -#include "opt_route.h" #include "opt_compat.h" #include Modified: head/sys/compat/linux/linux_ioctl.c == --- head/sys/compat/linux/linux_ioctl.c Mon Jun 8 19:56:50 2009 (r193743) +++ head/sys/compat/linux/linux_ioctl.c Mon Jun 8 19:57:35 2009 (r193744) @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opt_route.h" #include "opt_compat.h" #include Modified: head/sys/compat/svr4/svr4_sockio.c == --- head/sys/compat/svr4/svr4_sockio.c Mon Jun 8 19:56:50 2009 (r193743) +++ head/sys/compat/svr4/svr4_sockio.c Mon Jun 8 19:57:35 2009 (r193744) @@ -29,8 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_route.h" - #include #include #include Modified: head/sys/contrib/altq/altq/altq_subr.c == --- head/sys/contrib/altq/altq/altq_subr.c Mon Jun 8 19:56:50 2009 (r193743) +++ head/sys/contrib/altq/altq/altq_subr.c Mon Jun 8 19:57:35 2009 (r193744) @@ -32,7 +32,6 @@ #include "opt_inet.h" #ifdef __FreeBSD__ #include "opt_inet6.h" -#include "opt_route.h" #endif #endif /* __FreeBSD__ || __NetBSD__ */ Modified: head/sys/contrib/pf/net/pf_if.c == --- head/sys/contrib/pf/net/pf_if.c Mon Jun 8 19:56:50 2009 (r193743) +++ head/sys/contrib/pf/net/pf_if.c Mon Jun 8 19:57:35 2009 (r193744) @@ -35,7 +35,6 @@ #if defined(__FreeBSD__) #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_route.h" #include __FBSDID("$FreeBSD$"); Modified: head/sys/contrib/pf/net/pf_ioctl.c == --- head/sys/contrib/pf/net/pf_ioctl.c Mon Jun 8 19:56:50 2009 (r193743) +++
svn commit: r193745 - in stable/7/lib/libc: . rpc
Author: des Date: Mon Jun 8 19:59:26 2009 New Revision: 193745 URL: http://svn.freebsd.org/changeset/base/193745 Log: merge r173763: fix aliasing bug Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/rpc/authdes_prot.c stable/7/lib/libc/rpc/authunix_prot.c stable/7/lib/libc/rpc/key_prot_xdr.c stable/7/lib/libc/rpc/rpc_callmsg.c stable/7/lib/libc/rpc/rpc_prot.c stable/7/lib/libc/rpc/rpcb_prot.c stable/7/lib/libc/rpc/rpcb_st_xdr.c Modified: stable/7/lib/libc/rpc/authdes_prot.c == --- stable/7/lib/libc/rpc/authdes_prot.cMon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/authdes_prot.cMon Jun 8 19:59:26 2009 (r193745) @@ -54,10 +54,11 @@ xdr_authdes_cred(xdrs, cred) XDR *xdrs; struct authdes_cred *cred; { + enum authdes_namekind *padc_namekind = &cred->adc_namekind; /* * Unrolled xdr */ - ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind)); + ATTEMPT(xdr_enum(xdrs, (enum_t *) padc_namekind)); switch (cred->adc_namekind) { case ADN_FULLNAME: ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name, Modified: stable/7/lib/libc/rpc/authunix_prot.c == --- stable/7/lib/libc/rpc/authunix_prot.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/authunix_prot.c Mon Jun 8 19:59:26 2009 (r193745) @@ -60,15 +60,18 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { + int **paup_gids; assert(xdrs != NULL); assert(p != NULL); + paup_gids = &p->aup_gids; + if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && xdr_int(xdrs, &(p->aup_uid)) && xdr_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (caddr_t *)&(p->aup_gids), + && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); } Modified: stable/7/lib/libc/rpc/key_prot_xdr.c == --- stable/7/lib/libc/rpc/key_prot_xdr.cMon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/key_prot_xdr.cMon Jun 8 19:59:26 2009 (r193745) @@ -117,12 +117,14 @@ xdr_cryptkeyres(register XDR *xdrs, cryp bool_t xdr_unixcred(register XDR *xdrs, unixcred *objp) { + u_int **pgids_val; if (!xdr_u_int(xdrs, &objp->uid)) return (FALSE); if (!xdr_u_int(xdrs, &objp->gid)) return (FALSE); - if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS, + pgids_val = &objp->gids.gids_val; + if (!xdr_array(xdrs, (char **) pgids_val, (u_int *) &objp->gids.gids_len, MAXGIDS, sizeof (u_int), (xdrproc_t) xdr_u_int)) return (FALSE); return (TRUE); Modified: stable/7/lib/libc/rpc/rpc_callmsg.c == --- stable/7/lib/libc/rpc/rpc_callmsg.c Mon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpc_callmsg.c Mon Jun 8 19:59:26 2009 (r193745) @@ -59,6 +59,7 @@ xdr_callmsg(xdrs, cmsg) XDR *xdrs; struct rpc_msg *cmsg; { + enum msg_type *prm_direction; int32_t *buf; struct opaque_auth *oa; @@ -190,9 +191,10 @@ xdr_callmsg(xdrs, cmsg) return (TRUE); } } + prm_direction = &cmsg->rm_direction; if ( xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) && - xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) && + xdr_enum(xdrs, (enum_t *) prm_direction) && (cmsg->rm_direction == CALL) && xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) && (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) && Modified: stable/7/lib/libc/rpc/rpc_prot.c == --- stable/7/lib/libc/rpc/rpc_prot.cMon Jun 8 19:57:35 2009 (r193744) +++ stable/7/lib/libc/rpc/rpc_prot.cMon Jun 8 19:59:26 2009 (r193745) @@ -108,14 +108,17 @@ xdr_accepted_reply(xdrs, ar) XDR *xdrs; struct accepted_reply *ar; { + enum accept_stat *par_stat; assert(xdrs != NULL); assert(ar != NULL); + par_stat = &ar->ar_stat; + /* personalized union, rather than calling xdr_union */ if (! xdr_opaque_auth(xdrs, &(ar->ar_verf))) return (FALSE); - if (! xdr_enum(xdrs, (enum_t *)&(ar->ar_stat))) + if (! xdr_enum(xdrs, (enum_t *) par_stat)) return (FALSE);
svn commit: r193747 - in stable/7/lib/libc: . include
Author: des Date: Mon Jun 8 20:04:36 2009 New Revision: 193747 URL: http://svn.freebsd.org/changeset/base/193747 Log: merge r177605,177607,177855: add missing namespace wrappers for libthr Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/include/namespace.h stable/7/lib/libc/include/un-namespace.h Modified: stable/7/lib/libc/include/namespace.h == --- stable/7/lib/libc/include/namespace.h Mon Jun 8 20:02:15 2009 (r193746) +++ stable/7/lib/libc/include/namespace.h Mon Jun 8 20:04:36 2009 (r193747) @@ -84,6 +84,7 @@ #definepthread_atfork _pthread_atfork #definepthread_attr_destroy_pthread_attr_destroy #definepthread_attr_get_np _pthread_attr_get_np +#definepthread_attr_getaffinity_np _pthread_attr_getaffinity_np #definepthread_attr_getdetachstate _pthread_attr_getdetachstate #definepthread_attr_getguardsize _pthread_attr_getguardsize #definepthread_attr_getinheritsched _pthread_attr_getinheritsched @@ -94,6 +95,7 @@ #definepthread_attr_getstackaddr _pthread_attr_getstackaddr #definepthread_attr_getstacksize _pthread_attr_getstacksize #definepthread_attr_init _pthread_attr_init +#definepthread_attr_setaffinity_np _pthread_attr_setaffinity_np #definepthread_attr_setcreatesuspend_np _pthread_attr_setcreatesuspend_np #definepthread_attr_setdetachstate _pthread_attr_setdetachstate #definepthread_attr_setguardsize _pthread_attr_setguardsize @@ -130,7 +132,9 @@ #definepthread_detach _pthread_detach #definepthread_equal _pthread_equal #definepthread_exit_pthread_exit +#definepthread_getaffinity_np _pthread_getaffinity_np #definepthread_getconcurrency _pthread_getconcurrency +#definepthread_getcpuclockid _pthread_getcpuclockid #definepthread_getprio _pthread_getprio #definepthread_getschedparam _pthread_getschedparam #definepthread_getspecific _pthread_getspecific @@ -178,6 +182,7 @@ #definepthread_rwlockattr_setpshared _pthread_rwlockattr_setpshared #definepthread_self_pthread_self #definepthread_set_name_np _pthread_set_name_np +#definepthread_setaffinity_np _pthread_setaffinity_np #definepthread_setcancelstate _pthread_setcancelstate #definepthread_setcanceltype _pthread_setcanceltype #definepthread_setconcurrency _pthread_setconcurrency Modified: stable/7/lib/libc/include/un-namespace.h == --- stable/7/lib/libc/include/un-namespace.hMon Jun 8 20:02:15 2009 (r193746) +++ stable/7/lib/libc/include/un-namespace.hMon Jun 8 20:04:36 2009 (r193747) @@ -65,6 +65,7 @@ #undef pthread_atfork #undef pthread_attr_destroy #undef pthread_attr_get_np +#undef pthread_attr_getaffinity_np #undef pthread_attr_getdetachstate #undef pthread_attr_getguardsize #undef pthread_attr_getinheritsched @@ -75,6 +76,7 @@ #undef pthread_attr_getstackaddr #undef pthread_attr_getstacksize #undef pthread_attr_init +#undef pthread_attr_setaffinity_np #undef pthread_attr_setcreatesuspend_np #undef pthread_attr_setdetachstate #undef pthread_attr_setguardsize @@ -111,7 +113,9 @@ #undef pthread_detach #undef pthread_equal #undef pthread_exit +#undef pthread_getaffinity_np #undef pthread_getconcurrency +#undef pthread_getcpuclockid #undef pthread_getprio #undef pthread_getschedparam #undef pthread_getspecific @@ -159,6 +163,7 @@ #undef pthread_rwlockattr_setpshared #undef pthread_self #undef pthread_set_name_np +#undef pthread_setaffinity_np #undef pthread_setcancelstate #undef pthread_setcanceltype #undef pthread_setconcurrency ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193748 - head/sys/net
Author: bz Date: Mon Jun 8 20:04:46 2009 New Revision: 193748 URL: http://svn.freebsd.org/changeset/base/193748 Log: Remove two unneeded, hidden includes. Modified: head/sys/net/flowtable.h Modified: head/sys/net/flowtable.h == --- head/sys/net/flowtable.hMon Jun 8 20:04:36 2009(r193747) +++ head/sys/net/flowtable.hMon Jun 8 20:04:46 2009(r193748) @@ -33,8 +33,6 @@ $FreeBSD$ #define_NET_FLOWTABLE_H_ #ifdef _KERNEL -#include -#include #defineFL_HASH_PORTS (1<<0) /* hash 4-tuple + protocol */ #defineFL_PCPU (1<<1) /* pcpu cache */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193749 - stable/7/lib/libthr
Author: des Date: Mon Jun 8 20:07:12 2009 New Revision: 193749 URL: http://svn.freebsd.org/changeset/base/193749 Log: record already-merged r177605 Modified: stable/7/lib/libthr/ (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193750 - in head/sys: amd64/conf conf contrib/dev/acpica/include/platform dev/acpica/Osd i386/conf
Author: jkim Date: Mon Jun 8 20:07:16 2009 New Revision: 193750 URL: http://svn.freebsd.org/changeset/base/193750 Log: Rewrite OsdSynch.c to reflect the latest ACPICA more closely: - Implement ACPI semaphore (ACPI_SEMAPHORE) with condvar(9) and mutex(9). - Implement ACPI mutex (ACPI_MUTEX) with mutex(9). - Implement ACPI lock (ACPI_SPINLOCK) with spin mutex(9). Modified: head/sys/amd64/conf/NOTES head/sys/conf/options head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/dev/acpica/Osd/OsdSynch.c head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Mon Jun 8 20:07:12 2009(r193749) +++ head/sys/amd64/conf/NOTES Mon Jun 8 20:07:16 2009(r193750) @@ -237,12 +237,9 @@ device tdfx# Enable 3Dfx Voodoo supp # kernel environment variables to select initial debugging levels for the # Intel ACPICA code. (Note that the Intel code must also have USE_DEBUGGER # defined when it is built). -# -# ACPI_NO_SEMAPHORES makes the AcpiOs*Semaphore routines a no-op. device acpi optionsACPI_DEBUG -#!options ACPI_NO_SEMAPHORES # The cpufreq(4) driver provides support for non-ACPI CPU frequency control device cpufreq Modified: head/sys/conf/options == --- head/sys/conf/options Mon Jun 8 20:07:12 2009(r193749) +++ head/sys/conf/options Mon Jun 8 20:07:16 2009(r193750) @@ -664,7 +664,6 @@ WITNESS_SKIPSPINopt_witness.h # options for ACPI support ACPI_DEBUG opt_acpi.h ACPI_MAX_THREADS opt_acpi.h -ACPI_NO_SEMAPHORES opt_acpi.h # ISA support DEV_ISAopt_isa.h Modified: head/sys/contrib/dev/acpica/include/platform/acfreebsd.h == --- head/sys/contrib/dev/acpica/include/platform/acfreebsd.hMon Jun 8 20:07:12 2009(r193749) +++ head/sys/contrib/dev/acpica/include/platform/acfreebsd.hMon Jun 8 20:07:16 2009(r193750) @@ -140,6 +140,7 @@ #include "opt_acpi.h" #defineACPI_THREAD_ID lwpid_t +#defineACPI_MUTEX_TYPE ACPI_OSL_MUTEX #ifdef ACPI_DEBUG #defineACPI_DEBUG_OUTPUT /* for backward compatibility */ Modified: head/sys/dev/acpica/Osd/OsdSynch.c == --- head/sys/dev/acpica/Osd/OsdSynch.c Mon Jun 8 20:07:12 2009 (r193749) +++ head/sys/dev/acpica/Osd/OsdSynch.c Mon Jun 8 20:07:16 2009 (r193750) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2000 Michael Smith * Copyright (c) 2000 BSDi + * Copyright (c) 2007-2009 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,366 +36,543 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_acpi.h" +#include #include -#include -#include #include +#include #include -#define _COMPONENT ACPI_OS_SERVICES +#define_COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("SYNCH") MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); -#define AS_LOCK(as)mtx_lock(&(as)->as_mtx) -#define AS_UNLOCK(as) mtx_unlock(&(as)->as_mtx) - /* - * Simple counting semaphore implemented using a mutex. (Subsequently used - * in the OSI code to implement a mutex. Go figure.) + * Convert milliseconds to ticks. */ -struct acpi_semaphore { -struct mtx as_mtx; -UINT32 as_units; -UINT32 as_maxunits; -UINT32 as_pendings; -UINT32 as_resetting; -UINT32 as_timeouts; -}; +static int +timeout2hz(UINT16 Timeout) +{ + struct timeval tv; -/* Default number of maximum pending threads. */ -#ifndef ACPI_NO_SEMAPHORES -#ifndef ACPI_SEMAPHORES_MAX_PENDING -#define ACPI_SEMAPHORES_MAX_PENDING4 -#endif + tv.tv_sec = (time_t)(Timeout / 1000); + tv.tv_usec = (suseconds_t)(Timeout % 1000) * 1000; -static int acpi_semaphore_debug = 0; -TUNABLE_INT("debug.acpi_semaphore_debug", &acpi_semaphore_debug); -SYSCTL_DECL(_debug_acpi); -SYSCTL_INT(_debug_acpi, OID_AUTO, semaphore_debug, CTLFLAG_RW, - &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages"); -#endif /* !ACPI_NO_SEMAPHORES */ + return (tvtohz(&tv)); +} + +/* + * ACPI_SEMAPHORE + */ +struct acpi_sema { + struct mtx as_lock; + charas_name[32]; + struct cv as_cv; + UINT32 as_maxunits; + UINT32 as_units; + int as_waiters; + int as_reset; +}; ACPI_STATUS AcpiOsCreateSemaphore(UINT32 MaxUnits, UINT32 InitialUnits, ACPI_SEMAPHORE *OutHandle) { -#ifndef ACPI_NO_SEMAPHORES -struct acpi_semaphore *as; + struct acpi_sema
svn commit: r193751 - in stable/7/lib/libc: . gdtoa
Author: des Date: Mon Jun 8 20:08:20 2009 New Revision: 193751 URL: http://svn.freebsd.org/changeset/base/193751 Log: merge r173793: silence aliasing warning. Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/gdtoa/_ldtoa.c Modified: stable/7/lib/libc/gdtoa/_ldtoa.c == --- stable/7/lib/libc/gdtoa/_ldtoa.cMon Jun 8 20:07:16 2009 (r193750) +++ stable/7/lib/libc/gdtoa/_ldtoa.cMon Jun 8 20:08:20 2009 (r193751) @@ -61,6 +61,7 @@ __ldtoa(long double *ld, int mode, int n char *ret; union IEEEl2bits u; uint32_t bits[(LDBL_MANT_DIG + 31) / 32]; + void *vbits = bits; u.e = *ld; *sign = u.bits.sign; @@ -91,7 +92,7 @@ __ldtoa(long double *ld, int mode, int n abort(); } - ret = gdtoa(&fpi, be, (ULong *)bits, &kind, mode, ndigits, decpt, rve); + ret = gdtoa(&fpi, be, vbits, &kind, mode, ndigits, decpt, rve); if (*decpt == -32768) *decpt = INT_MAX; return ret; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193752 - head/sys/dev/kbdmux
Author: ed Date: Mon Jun 8 20:24:29 2009 New Revision: 193752 URL: http://svn.freebsd.org/changeset/base/193752 Log: Use proper types in kbdmux_kbd_getc(): - The return value should be a signed integer, because -1 means failure. - The c variable should be unsigned, to force it to be zero-extended when returned. Reported by: Andreas Tobler Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c == --- head/sys/dev/kbdmux/kbdmux.cMon Jun 8 20:08:20 2009 (r193751) +++ head/sys/dev/kbdmux/kbdmux.cMon Jun 8 20:24:29 2009 (r193752) @@ -181,10 +181,10 @@ kbdmux_kbd_putc(kbdmux_state_t *state, c state->ks_inq_length++; } -static char +static int kbdmux_kbd_getc(kbdmux_state_t *state) { - char c; + unsigned char c; if (state->ks_inq_length == 0) return (-1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193734 - in head: lib/libusb sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys
On Mon, 8 Jun 2009, Ed Schouten wrote: Log: Revert my change; reintroduce __gnu89_inline. It turns out our compiler in stable/7 can't build this code anymore. Even though my opinion is that those people should just run `make kernel-toolchain' before building a kernel, I am willing to wait and commit this after we've branched stable/8. Requested by: rwatson Similar changes in msun broke backwards compatibily there. The last one that I noticed was that a current msun fails to build on pluto1.freebsd.org since pluto1 runs 7.2-STABLE and thus has a gcc-4.2.1 not patched to support C99 inline. On other machines I want to build it with old compilers starting with gcc-3 to run regression tests. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193753 - head/sys/dev/acpica/Osd
Author: jkim Date: Mon Jun 8 20:50:38 2009 New Revision: 193753 URL: http://svn.freebsd.org/changeset/base/193753 Log: Remove redundant checks for ACPI_WAIT_FOREVER cases. Modified: head/sys/dev/acpica/Osd/OsdSynch.c Modified: head/sys/dev/acpica/Osd/OsdSynch.c == --- head/sys/dev/acpica/Osd/OsdSynch.c Mon Jun 8 20:24:29 2009 (r193752) +++ head/sys/dev/acpica/Osd/OsdSynch.c Mon Jun 8 20:50:38 2009 (r193753) @@ -185,8 +185,6 @@ AcpiOsWaitSemaphore(ACPI_SEMAPHORE Handl status = AE_ERROR; break; } - if (ACPISEM_AVAIL(as, Units)) - break; } break; default: @@ -380,8 +378,6 @@ AcpiOsAcquireMutex(ACPI_MUTEX Handle, UI status = AE_ERROR; break; } - if (ACPIMTX_AVAIL(am)) - break; } break; default: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193664 - in head: sbin/ifconfig share/man/man4 sys/net sys/netinet sys/netinet6 sys/sys
On Sun, 7 Jun 2009, Hiroki Sato wrote: Hi, Author: hrs Date: Sun Jun 7 23:00:40 2009 New Revision: 193664 URL: http://svn.freebsd.org/changeset/base/193664 Log: Fix and add a workaround on an issue of EtherIP packet with reversed version field sent via gif(4)+if_bridge(4). The EtherIP implementation found on FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 had an interoperability issue because it sent the incorrect EtherIP packets and discarded the correct ones. This change introduces the following two flags to gif(4): accept_rev_ethip_ver: accepts both correct EtherIP packets and ones with reversed version field, if enabled. If disabled, the gif accepts the correct packets only. This flag is enabled by default. send_rev_ethip_ver: sends EtherIP packets with reversed version field intentionally, if enabled. If disabled, the gif sends the correct packets only. This flag is disabled by default. These flags are stored in struct gif_softc and can be set by ifconfig(8) on per-interface basis. Note that this is an incompatible change of EtherIP with the older FreeBSD releases. If you need to interoperate older FreeBSD boxes and new versions after this commit, setting "send_rev_ethip_ver" is needed. Reviewed by: thompsa and rwatson Spotted by:Shunsuke SHINOMIYA PR:kern/125003 MFC after: 2 weeks Added: head/sbin/ifconfig/ifgif.c (contents, props changed) Modified: head/sbin/ifconfig/Makefile head/share/man/man4/gif.4 head/share/man/man4/if_bridge.4 head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/netinet/in_gif.c head/sys/netinet6/in6_gif.c head/sys/sys/priv.h Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Sun Jun 7 22:55:48 2009(r193663) +++ head/sys/net/if_gif.c Sun Jun 7 23:00:40 2009(r193664) @@ -653,6 +670,7 @@ gif_ioctl(ifp, cmd, data) struct gif_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq*)data; int error = 0, size; + u_int options; struct sockaddr *dst, *src; #ifdef SIOCSIFMTU /* xxx */ u_long mtu; @@ -887,6 +905,24 @@ gif_ioctl(ifp, cmd, data) /* if_ioctl() takes care of it */ break; + case GIFGOPTS: + options = sc->gif_options; + error = copyout(&options, ifr->ifr_data, + sizeof(options)); + break; + + case GIFSOPTS: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + if ((error = copyin(&options, &sc->gif_options, + sizeof(sc->gif_options { + if ((options | GIF_FULLOPTS) == GIF_FULLOPTS) + ifr->ifr_data = (caddr_t)options; + else + error = EINVAL; + } + break; + default: error = EINVAL; break; As noticed by ps there is a build problem here. It seems it is the result of some reversed logic. Does this patch look ok? http://people.freebsd.org/~bz/20090608-03-if_gif.c.diff -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193754 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/cxgb/common
Author: gnn Date: Mon Jun 8 21:01:14 2009 New Revision: 193754 URL: http://svn.freebsd.org/changeset/base/193754 Log: MFC of 190206 190330 192537 192 540 192584 192593 192933 Bring the 7.x version of the cxgb driver up to date with respect to HEAD as of 8 June 2009 192933 Rework interrupt bringup and teardown. Calculate the exact number of vectors we'll use before calling pci_alloc_msix. Don't grab nine all the time. Call cxgb_setup_interrupts once per T3, not once per port. Ditto for cxgb_teardown_interrupts. Don't leak resources when interrupt setup fails in the middle. 192593 Partial reversion of previous commit. The CXGB_SHUTDOWN flag does NOT need to be inverted when doing an ifconfig down of an interface. 192584 Fix a possible panic cxgb_controller_attach() routine that would occur only if prepping the adapter failed. Slight adjustment to comments. Fix a bug whereby downing the interface didn't preven it from processing packets. 192540 Integrate three changes from Chelsio. 1) Add a sysctl that will say what type of PHYs exist on the card. 2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever in the card. 3) Unify the PHY link detection code. 192537 Modified the attach and detach routines to handle bringing ports up and down more cleanly. This addresses a problem where if we have the link flap during boot the driver would lock up the system. 190330 Minor updates to the Chelsio driver, including removing an LOR. 190206 Fix a bug in the recent update to the Chelsio driver. The tick routine was not being restarted in the init_locked routine which could resulted in loss of carrier when updating the MTU. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/common/cxgb_common.h stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c stable/7/sys/dev/cxgb/cxgb_adapter.h stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/cxgb/cxgb_sge.c Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c == --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Mon Jun 8 21:01:14 2009 (r193754) @@ -1160,6 +1160,7 @@ static int get_module_type(struct cphy * v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 131); if (v < 0) return v; + v &= 0xf0; if (v == 0x10) return phy_modtype_lrm; if (v == 0x40) @@ -1249,7 +1250,9 @@ static int ael2005_reset(struct cphy *ph return err; phy->modtype = (u8)err; - if (err == phy_modtype_twinax || err == phy_modtype_twinax_long) + if (err == phy_modtype_none || err == phy_modtype_unknown) + err = 0; + else if (err == phy_modtype_twinax || err == phy_modtype_twinax_long) err = ael2005_setup_twinax_edc(phy, err); else err = ael2005_setup_sr_edc(phy); Modified: stable/7/sys/dev/cxgb/common/cxgb_common.h == --- stable/7/sys/dev/cxgb/common/cxgb_common.h Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_common.h Mon Jun 8 21:01:14 2009 (r193754) @@ -709,7 +709,6 @@ int t3_slow_intr_handler(adapter_t *adap int t3_phy_intr_handler(adapter_t *adapter); void t3_link_changed(adapter_t *adapter, int port_id); -void t3_link_fault(adapter_t *adapter, int port_id); int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc); const struct adapter_info *t3_get_adapter_info(unsigned int board_id); int t3_seeprom_read(adapter_t *adapter, u32 addr, u32 *data); Modified: stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c == --- stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Jun 8 20:50:38 2009 (r193753) +++ stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Mon Jun 8 21:01:14 2009 (r193754) @@ -1288,6 +1288,49 @@ static void t3_open_rx_traffic(struct cm t3_write_reg(mac->adapter, A_XGM_RX_HASH_LOW, rx_hash_low); } +static int t3_detect_link_fault(adapter_t *adapter, int port_id) +{ + struct port_info *pi = adap2pinfo(adapter, port_id); + struct cmac *mac = &pi->mac; + uint32_t rx_cfg, rx_hash_high, rx_hash_low; + int link_fault; + + /* stop rx */ + t3_gate_rx_traffic(mac, &rx_cfg, &rx_hash_high, &rx_hash_low); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); + + /* clear status and make sure intr is enable
svn commit: r193759 - head/share/misc
Author: tuexen Date: Mon Jun 8 21:14:21 2009 New Revision: 193759 URL: http://svn.freebsd.org/changeset/base/193759 Log: Add myself. Approved by: rrs (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Mon Jun 8 21:13:20 2009 (r193758) +++ head/share/misc/committers-src.dot Mon Jun 8 21:14:21 2009 (r193759) @@ -179,6 +179,7 @@ thompsa [label="Andrew Thompson\nthompsa ticso [label="Bernd walter\nti...@freebsd.org\n2002/01/31"] trasz [label="Edward Tomasz napierala\ntr...@freebsd.org\n2008/08/22"] trhodes [label="Tom rhodes\ntrho...@freebsd.org\n2002/05/28"] +tuexen [label="Michael tuexen\ntue...@freebsd.org\n2009/06/06"] ume [label="Hajimu umemoto\n...@freebsd.org\n2000/02/26"] vanhu [label="Yvan vanhullebus\nva...@freebsd.org\n2008/07/21"] versus [label="Konrad jankowski\nver...@freebsd.org\n2008/10/27"] @@ -385,6 +386,8 @@ rgrimes -> markm rpaulo -> avg +rrs -> tuexen + ru -> ceri ru -> cjc ru -> eik ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193762 - in head/sys: kern sys
Author: ps Date: Mon Jun 8 21:23:54 2009 New Revision: 193762 URL: http://svn.freebsd.org/changeset/base/193762 Log: Simply shared vnode locking and extend it to also include fsync. Also, in vop_write, no longer assert for exclusive locks on the vnode. Reviewed by: jhb, kmacy, jeffr Modified: head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/kern/vnode_if.src head/sys/sys/mount.h Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cMon Jun 8 21:16:06 2009 (r193761) +++ head/sys/kern/vfs_syscalls.cMon Jun 8 21:23:54 2009 (r193762) @@ -3476,7 +3476,7 @@ fsync(td, uap) struct mount *mp; struct file *fp; int vfslocked; - int error; + int error, lock_flags; AUDIT_ARG(fd, uap->fd); if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) @@ -3485,7 +3485,13 @@ fsync(td, uap) vfslocked = VFS_LOCK_GIANT(vp->v_mount); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto drop; - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + if (MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { + lock_flags = LK_SHARED; + } else { + lock_flags = LK_EXCLUSIVE; + } + vn_lock(vp, lock_flags | LK_RETRY); AUDIT_ARG(vnode, vp, ARG_VNODE1); if (vp->v_object != NULL) { VM_OBJECT_LOCK(vp->v_object); Modified: head/sys/kern/vfs_vnops.c == --- head/sys/kern/vfs_vnops.c Mon Jun 8 21:16:06 2009(r193761) +++ head/sys/kern/vfs_vnops.c Mon Jun 8 21:23:54 2009(r193762) @@ -376,8 +376,8 @@ vn_rdwr(rw, vp, base, len, offset, segfl (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - if (mp != NULL && - (mp->mnt_kern_flag & MNTK_SHARED_WRITES)) { + if (MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { lock_flags = LK_SHARED; } else { lock_flags = LK_EXCLUSIVE; @@ -592,7 +592,8 @@ vn_write(fp, uio, active_cred, flags, td (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto unlock; - if (mp != NULL && (mp->mnt_kern_flag & MNTK_SHARED_WRITES) && + if ((MNT_SHARED_WRITES(mp) || + ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) && (flags & FOF_OFFSET) != 0) { lock_flags = LK_SHARED; } else { Modified: head/sys/kern/vnode_if.src == --- head/sys/kern/vnode_if.src Mon Jun 8 21:16:06 2009(r193761) +++ head/sys/kern/vnode_if.src Mon Jun 8 21:23:54 2009(r193762) @@ -197,7 +197,7 @@ vop_read { }; -%% write vp E E E +%% write vp L L L %! write pre VOP_WRITE_PRE %! write postVOP_WRITE_POST Modified: head/sys/sys/mount.h == --- head/sys/sys/mount.hMon Jun 8 21:16:06 2009(r193761) +++ head/sys/sys/mount.hMon Jun 8 21:23:54 2009(r193762) @@ -336,6 +336,9 @@ void __mnt_vnode_markerfree(str #define MNTK_LOOKUP_SHARED 0x4000 /* FS supports shared lock lookups */ #defineMNTK_NOKNOTE0x8000 /* Don't send KNOTEs from VOP hooks */ +#defineMNT_SHARED_WRITES(mp) (((mp) != NULL) &&\ + ((mp)->mnt_kern_flag & MNTK_SHARED_WRITES)) + /* * Sysctl CTL_VFS definitions. * ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193761 - head/sys/net80211
Author: sam Date: Mon Jun 8 21:16:06 2009 New Revision: 193761 URL: http://svn.freebsd.org/changeset/base/193761 Log: purge dead code Modified: head/sys/net80211/ieee80211_radiotap.c Modified: head/sys/net80211/ieee80211_radiotap.c == --- head/sys/net80211/ieee80211_radiotap.c Mon Jun 8 21:15:40 2009 (r193760) +++ head/sys/net80211/ieee80211_radiotap.c Mon Jun 8 21:16:06 2009 (r193761) @@ -168,35 +168,6 @@ ieee80211_radiotap_chan_change(struct ie } } -#if 0 -static void -dispatch_radiotap(struct ieee80211vap *vap0, struct mbuf *m, - struct ieee80211_radiotap_header *rh) -{ - struct ieee80211com *ic = vap0->iv_ic; - int len = le16toh(rh->it_len); - - if (vap0->iv_flags_ext & IEEE80211_FEXT_BPF) - bpf_mtap2(vap0->iv_rawbpf, rh, len, m); - /* -* Spam monitor mode vaps with unicast frames. Multicast -* frames are handled by passing through ieee80211_input_all -* which distributes copies to the monitor mode vaps to be -* processed above. -*/ - if (ic->ic_montaps != 0 && (m->m_flags & M_BCAST) == 0) { - struct ieee80211vap *vap; - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { - if (vap != vap0 && - vap->iv_opmode == IEEE80211_M_MONITOR && - (vap->iv_flags_ext & IEEE80211_FEXT_BPF) && - vap->iv_state != IEEE80211_S_INIT) - bpf_mtap2(vap->iv_rawbpf, rh, len, m); - } - } -} -#endif - /* * Distribute radiotap data (+packet) to all monitor mode * vaps with an active tap other than vap0. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193763 - vendor-crypto/openssl/dist/crypto/engine/vendor_defns
Author: simon Date: Mon Jun 8 21:34:12 2009 New Revision: 193763 URL: http://svn.freebsd.org/changeset/base/193763 Log: Remove empty directory which has been removed upstream. Deleted: vendor-crypto/openssl/dist/crypto/engine/vendor_defns/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193763 - vendor-crypto/openssl/dist/crypto/engine/vendor_defns
Author: simon Date: Mon Jun 8 21:34:12 2009 New Revision: 193763 URL: http://svn.freebsd.org/changeset/base/193763 Log: Remove empty directory which has been removed upstream. Deleted: vendor-crypto/openssl/dist/crypto/engine/vendor_defns/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193667 - head/sys/dev/sound/sbus
On Sun, 7 Jun 2009, Ariff Abdullah wrote: Hey, Author: ariff Date: Sun Jun 7 23:38:16 2009 New Revision: 193667 URL: http://svn.freebsd.org/changeset/base/193667 Log: Fix build on sparc64. I am still seeing: /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231.c:290: warning: comparison of distinct pointer types lacks a cast /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231.c:291: warning: comparison of distinct pointer types lacks a cast /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231.c:293: warning: comparison of distinct pointer types lacks a cast /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231.c:305: warning: comparison of distinct pointer types lacks a cast Modified: head/sys/dev/sound/sbus/cs4231.c Modified: head/sys/dev/sound/sbus/cs4231.c == --- head/sys/dev/sound/sbus/cs4231.cSun Jun 7 23:16:59 2009 (r193666) +++ head/sys/dev/sound/sbus/cs4231.cSun Jun 7 23:38:16 2009 (r193667) @@ -273,7 +273,7 @@ static u_int32_t cs4231_fmt[] = { SND_FORMAT(AFMT_IMA_ADPCM, 1, 0), SND_FORMAT(AFMT_IMA_ADPCM, 2, 0), SND_FORMAT(AFMT_S16_LE, 1, 0), - SND_FORMAT(S16_LE, 2, 0), + SND_FORMAT(AFMT_S16_LE, 2, 0), SND_FORMAT(AFMT_S16_BE, 1, 0), SND_FORMAT(AFMT_S16_BE, 2, 0), 0 -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193765 - head/sbin/dhclient
Author: brian Date: Mon Jun 8 21:42:30 2009 New Revision: 193765 URL: http://svn.freebsd.org/changeset/base/193765 Log: Fix an off by one error when we limit append/prepend text sizes based on our internal buffer sizes. When we 'append', assume we're appending to text. Some MS dhcp servers will give us a string with the length including the trailing NUL. when we 'append domain-name', we get something like "search x.y\000 z" in resolv.conf :( MFC after:1 week Security: A buffer overflow (by one NUL byte) was possible. Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Mon Jun 8 21:42:15 2009 (r193764) +++ head/sbin/dhclient/dhclient.c Mon Jun 8 21:42:30 2009 (r193765) @@ -1977,7 +1977,7 @@ supersede: len = ip->client-> config->defaults[i].len + lease->options[i].len; - if (len > sizeof(dbuf)) { + if (len >= sizeof(dbuf)) { warning("no space to %s %s", "prepend option", dhcp_options[i].name); @@ -1996,24 +1996,34 @@ supersede: dp[len] = '\0'; break; case ACTION_APPEND: + /* +* When we append, we assume that we're +* appending to text. Some MS servers +* include a NUL byte at the end of +* the search string provided. +*/ len = ip->client-> config->defaults[i].len + lease->options[i].len; - if (len > sizeof(dbuf)) { + if (len >= sizeof(dbuf)) { warning("no space to %s %s", "append option", dhcp_options[i].name); goto supersede; } - dp = dbuf; - memcpy(dp, + memcpy(dbuf, lease->options[i].data, lease->options[i].len); - memcpy(dp + lease->options[i].len, + for (dp = dbuf + lease->options[i].len; + dp > dbuf; dp--, len--) + if (dp[-1] != '\0') + break; + memcpy(dp, ip->client-> config->defaults[i].data, ip->client-> config->defaults[i].len); + dp = dbuf; dp[len] = '\0'; } } else { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193760 - head/sys/net80211
Author: sam Date: Mon Jun 8 21:15:40 2009 New Revision: 193760 URL: http://svn.freebsd.org/changeset/base/193760 Log: fix big-endian machines Modified: head/sys/net80211/ieee80211_radiotap.c Modified: head/sys/net80211/ieee80211_radiotap.c == --- head/sys/net80211/ieee80211_radiotap.c Mon Jun 8 21:14:21 2009 (r193759) +++ head/sys/net80211/ieee80211_radiotap.c Mon Jun 8 21:15:40 2009 (r193760) @@ -153,17 +153,17 @@ ieee80211_radiotap_chan_change(struct ie if (ic->ic_rxchan != NULL) { struct ieee80211_radiotap_header *rh = ic->ic_rh; - if (rh->it_present & (1ic_curchan); - else if (rh->it_present & (1 ic_curchan); } if (ic->ic_txchan != NULL) { struct ieee80211_radiotap_header *th = ic->ic_th; - if (th->it_present & (1 ic_curchan); - else if (th->it_present & (1 ic_curchan); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193768 - head/share/man/man4
Author: jkim Date: Mon Jun 8 21:48:13 2009 New Revision: 193768 URL: http://svn.freebsd.org/changeset/base/193768 Log: Reflect debug level changes from the recent ACPICA import. Modified: head/share/man/man4/acpi.4 Modified: head/share/man/man4/acpi.4 == --- head/share/man/man4/acpi.4 Mon Jun 8 21:47:55 2009(r193767) +++ head/share/man/man4/acpi.4 Mon Jun 8 21:48:13 2009(r193768) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2006 +.Dd June 8, 2009 .Dt ACPI 4 .Os .Sh NAME @@ -451,10 +451,6 @@ ACPI drivers The supported levels are: .Pp .Bl -tag -compact -width ".Li ACPI_LV_AML_DISASSEMBLE" -.It Li ACPI_LV_ERROR -Fatal error conditions -.It Li ACPI_LV_WARN -Warnings and potential problems .It Li ACPI_LV_INIT Initialization progress .It Li ACPI_LV_DEBUG_OBJECT @@ -463,9 +459,7 @@ Stores to objects General information and progress .It Li ACPI_LV_ALL_EXCEPTIONS All the previous levels -.It Li ACPI_LV_INIT_NAMES .It Li ACPI_LV_PARSE -.It Li ACPI_LV_LOAD .It Li ACPI_LV_DISPATCH .It Li ACPI_LV_EXEC .It Li ACPI_LV_NAMES @@ -483,7 +477,10 @@ All the previous levels .It Li ACPI_LV_FUNCTIONS .It Li ACPI_LV_OPTIMIZATIONS .It Li ACPI_LV_VERBOSITY2 +All the previous levels .It Li ACPI_LV_ALL +Synonym for +.Qq Li ACPI_LV_VERBOSITY2 .It Li ACPI_LV_MUTEX .It Li ACPI_LV_THREADS .It Li ACPI_LV_IO @@ -497,6 +494,8 @@ All the previous levels .It Li ACPI_LV_VERBOSE All levels after .Qq Li ACPI_LV_VERBOSITY3 +.It Li ACPI_LV_INIT_NAMES +.It Li ACPI_LV_LOAD .El .Pp Selection of the appropriate layer and level values is important ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193773 - head/sys/sys
Author: bz Date: Mon Jun 8 22:02:30 2009 New Revision: 193773 URL: http://svn.freebsd.org/changeset/base/193773 Log: Update vnet_net size guard information after r193731. Modified: head/sys/sys/vimage.h Modified: head/sys/sys/vimage.h == --- head/sys/sys/vimage.h Mon Jun 8 21:58:34 2009(r193772) +++ head/sys/sys/vimage.h Mon Jun 8 22:02:30 2009(r193773) @@ -359,43 +359,43 @@ extern struct vprocg_list_head vprocg_he * See description further down to see how to get the new values. */ #ifdef __amd64__ -#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_net 184 #defineSIZEOF_vnet_inet4424 #defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 #endif #ifdef __arm__ -#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_net 100 #defineSIZEOF_vnet_inet2616 #defineSIZEOF_vnet_inet6 8524 #defineSIZEOF_vnet_ipsec 1 #endif #ifdef __i386__ /* incl. pc98 */ -#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_net 100 #defineSIZEOF_vnet_inet2612 #defineSIZEOF_vnet_inet6 8512 #defineSIZEOF_vnet_ipsec 31024 #endif #ifdef __ia64__ -#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_net 184 #defineSIZEOF_vnet_inet4424 #defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 #endif #ifdef __mips__ -#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_net 100 #defineSIZEOF_vnet_inet2648 #defineSIZEOF_vnet_inet6 8544 #defineSIZEOF_vnet_ipsec 1 #endif #ifdef __powerpc__ -#defineSIZEOF_vnet_net 96 +#defineSIZEOF_vnet_net 100 #defineSIZEOF_vnet_inet2640 #defineSIZEOF_vnet_inet6 8520 #defineSIZEOF_vnet_ipsec 31048 #endif #ifdef __sparc64__ /* incl. sun4v */ -#defineSIZEOF_vnet_net 176 +#defineSIZEOF_vnet_net 184 #defineSIZEOF_vnet_inet4424 #defineSIZEOF_vnet_inet6 8808 #defineSIZEOF_vnet_ipsec 31160 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193775 - head/share/misc
Author: np Date: Mon Jun 8 22:03:37 2009 New Revision: 193775 URL: http://svn.freebsd.org/changeset/base/193775 Log: Add self, list mentor in committers-src.dot Approved by: gnn (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Mon Jun 8 22:02:57 2009 (r193774) +++ head/share/misc/committers-src.dot Mon Jun 8 22:03:37 2009 (r193775) @@ -139,6 +139,7 @@ mr [label="Michael reifenberger\...@free murray [label="Murray stokely\nmur...@freebsd.org\n2000/04/05"] netchild [label="Alexander leidinger\nnetch...@freebsd.org\n2005/03/31"] njl [label="Nate lawson\n...@freebsd.org\n2002/08/07"] +np [label="Navdeep parhar\...@freebsd.org\n2009/06/05"] nwhitehorn [label="Nathan whitehorn\nnwhiteh...@freebsd.org\n2008/07/03"] obrien [label="David E. O'brien\nobr...@freebsd.org\n1996/10/29"] olli [label="Oliver fromme\no...@freebsd.org\n2008/02/14"] @@ -269,6 +270,7 @@ gnn -> rrs gnn -> ivoras gnn -> vanhu gnn -> lstewart +gnn -> np grog -> edwin grog -> le ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193776 - in stable/7/usr.sbin/pkg_install: . info
Author: jilles Date: Mon Jun 8 22:05:47 2009 New Revision: 193776 URL: http://svn.freebsd.org/changeset/base/193776 Log: MFC r193273: Fix segfault when giving invalid long option to pkg_info. PR: bin/133473 Submitted by: Rafal Grodzinski Approved by: ed (mentor) Modified: stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/info/main.c Modified: stable/7/usr.sbin/pkg_install/info/main.c == --- stable/7/usr.sbin/pkg_install/info/main.c Mon Jun 8 22:03:37 2009 (r193775) +++ stable/7/usr.sbin/pkg_install/info/main.c Mon Jun 8 22:05:47 2009 (r193776) @@ -58,6 +58,7 @@ static struct option longopts[] = { { "verbose",no_argument,NULL, 'v' }, { "version",no_argument,NULL, 'P' }, { "which", required_argument, NULL, 'W' }, + { NULL, 0, NULL, 0 } }; int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193734 - in head: lib/libusb sys/amd64/amd64 sys/i386/i386 sys/i386/xen sys/sys
In message: <200906081823.n58inhx8038...@svn.freebsd.org> Ed Schouten writes: : It turns out our compiler in stable/7 can't build this code anymore. : Even though my opinion is that those people should just run `make : kernel-toolchain' before building a kernel, I am willing to wait and : commit this after we've branched stable/8. As a matter of policy, the project has always supported a RELENG_X -> CURRENT upgrade with a simple buildworld. The issue of building a kernel by hand across releases has been targeted as one of those areas that can break, but only if there's a really good reason to do so. Just FYI to everybody.. Warner ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193779 - head/sys/dev/sound/sbus
Author: ariff Date: Mon Jun 8 23:24:01 2009 New Revision: 193779 URL: http://svn.freebsd.org/changeset/base/193779 Log: Fix compile time warning on sparc64, thanks to strict kobj signatures checking. Noticed by: bz Modified: head/sys/dev/sound/sbus/cs4231.c Modified: head/sys/dev/sound/sbus/cs4231.c == --- head/sys/dev/sound/sbus/cs4231.cMon Jun 8 23:03:37 2009 (r193778) +++ head/sys/dev/sound/sbus/cs4231.cMon Jun 8 23:24:01 2009 (r193779) @@ -173,15 +173,15 @@ static void cs4231_mixer_set_value(struc const struct mix_table *, u_int8_t); static int cs4231_mixer_set(struct snd_mixer *, u_int32_t, u_int32_t, u_int32_t); -static int cs4231_mixer_setrecsrc(struct snd_mixer *, u_int32_t); +static u_int32_t cs4231_mixer_setrecsrc(struct snd_mixer *, u_int32_t); static void*cs4231_chan_init(kobj_t, void *, struct snd_dbuf *, struct pcm_channel *, int); static int cs4231_chan_setformat(kobj_t, void *, u_int32_t); -static int cs4231_chan_setspeed(kobj_t, void *, u_int32_t); +static u_int32_t cs4231_chan_setspeed(kobj_t, void *, u_int32_t); static voidcs4231_chan_fs(struct cs4231_softc *, int, u_int8_t); -static int cs4231_chan_setblocksize(kobj_t, void *, u_int32_t); +static u_int32_t cs4231_chan_setblocksize(kobj_t, void *, u_int32_t); static int cs4231_chan_trigger(kobj_t, void *, int); -static int cs4231_chan_getptr(kobj_t, void *); +static u_int32_t cs4231_chan_getptr(kobj_t, void *); static struct pcmchan_caps * cs4231_chan_getcaps(kobj_t, void *); static voidcs4231_trigger(struct cs4231_channel *); @@ -982,7 +982,7 @@ cs4231_mixer_set(struct snd_mixer *m, u_ return (left | (right << 8)); } -static int +static u_int32_t cs4231_mixer_setrecsrc(struct snd_mixer *m, u_int32_t src) { struct cs4231_softc *sc; @@ -1103,7 +1103,7 @@ cs4231_chan_setformat(kobj_t obj, void * return (0); } -static int +static u_int32_t cs4231_chan_setspeed(kobj_t obj, void *data, u_int32_t speed) { typedef struct { @@ -1253,7 +1253,7 @@ cs4231_chan_fs(struct cs4231_softc *sc, } } -static int +static u_int32_t cs4231_chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) { struct cs4231_softc *sc; @@ -1299,13 +1299,12 @@ cs4231_chan_trigger(kobj_t obj, void *da return (0); } -static int +static u_int32_t cs4231_chan_getptr(kobj_t obj, void *data) { struct cs4231_softc *sc; struct cs4231_channel *ch; - u_int32_t cur; - int ptr, sz; + u_int32_t cur, ptr, sz; ch = data; sc = ch->parent; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193667 - head/sys/dev/sound/sbus
On Mon, 8 Jun 2009 21:39:14 + (UTC) "Bjoern A. Zeeb" wrote: > On Sun, 7 Jun 2009, Ariff Abdullah wrote: > > Hey, > > > Author: ariff > > Date: Sun Jun 7 23:38:16 2009 > > New Revision: 193667 > > URL: http://svn.freebsd.org/changeset/base/193667 > > > > Log: > > Fix build on sparc64. > > I am still seeing: > > /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231 > .c:290: warning: comparison of distinct pointer types lacks a cast > /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231 > .c:291: warning: comparison of distinct pointer types lacks a cast > /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231 > .c:293: warning: comparison of distinct pointer types lacks a cast > /sys/modules/sound/driver/audiocs/../../../../dev/sound/sbus/cs4231 > .c:305: warning: comparison of distinct pointer types lacks a cast > > Fixed. Thanks :) -- Ariff Abdullah FreeBSD ... Recording in stereo is obviously too advanced and confusing for us idiot * users :P ... Going with the standard and orthodox is the death of intellect .. pgpciL1XJr2LS.pgp Description: PGP signature
svn commit: r193782 - stable/7/usr.sbin/wpa/hostapd
Author: sam Date: Mon Jun 8 23:47:47 2009 New Revision: 193782 URL: http://svn.freebsd.org/changeset/base/193782 Log: MFC r193524: do not force the mtu to 2290 Modified: stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Modified: stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c == --- stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Mon Jun 8 23:36:52 2009(r193781) +++ stable/7/usr.sbin/wpa/hostapd/driver_freebsd.c Mon Jun 8 23:47:47 2009(r193782) @@ -244,18 +244,6 @@ bsd_set_iface_flags(void *priv, int dev_ perror("ioctl[SIOCSIFFLAGS]"); return -1; } - - if (dev_up) { - memset(&ifr, 0, sizeof(ifr)); - snprintf(ifr.ifr_name, IFNAMSIZ, "%s", drv->iface); - ifr.ifr_mtu = HOSTAPD_MTU; - if (ioctl(drv->ioctl_sock, SIOCSIFMTU, &ifr) != 0) { - perror("ioctl[SIOCSIFMTU]"); - printf("Setting MTU failed - trying to survive with " - "current value\n"); - } - } - return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193783 - vendor/tzdata/dist
Author: edwin Date: Tue Jun 9 00:04:57 2009 New Revision: 193783 URL: http://svn.freebsd.org/changeset/base/193783 Log: Vendor import of tzdata2009i: Bangladesh will introduce DST in 20 June Obtained from:ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/asia Modified: vendor/tzdata/dist/asia == --- vendor/tzdata/dist/asia Mon Jun 8 23:47:47 2009(r193782) +++ vendor/tzdata/dist/asia Tue Jun 9 00:04:57 2009(r193783) @@ -1,5 +1,5 @@ # -# @(#)asia 8.32 +# @(#)asia 8.34 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -127,6 +127,48 @@ Zone Asia/Bahrain3:22:20 - LMT 1920 # 3:00- AST # Bangladesh +# From Alexander Krivenyshev (2009-05-13): +# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce +# Daylight Saving Time from June 16 to Sept 30 +# +# Bangladesh to introduce daylight saving time likely from June 16 +# http://www.asiantribune.com/?q=node/17288";> +# http://www.asiantribune.com/?q=node/17288 +# +# or +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html";> +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html +# +# +# "... Bangladesh government has decided to switch daylight saving time from +# June +# 16 till September 30 in a bid to ensure maximum use of daylight to cope with +# crippling power crisis. " +# +# The switch will remain in effect from June 16 to Sept 30 (2009) but if +# implemented the next year, it will come in force from April 1, 2010 + +# From Steffen Thorsen (2009-06-02): +# They have finally decided now, but changed the start date to midnight between +# the 19th and 20th, and they have not set the end date yet. +# +# Some sources: +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601";> +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601 +# +# http://bdnews24.com/details.php?id=85889&cid=2";> +# http://bdnews24.com/details.php?id=85889&cid=2 +# +# +# Our wrap-up: +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html";> +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html +# + +# Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S +Rule Bang2009only- Jan 1 0:000 - +Rule Bang2009only- Jun 20 0:001:00S + # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct# Howrah Mean Time? @@ -134,7 +176,8 @@ ZoneAsia/Dhaka 6:01:40 - LMT 1890 5:30- IST 1942 Sep 6:30- BURT1951 Sep 30 6:00- DACT1971 Mar 26 # Dacca Time - 6:00- BDT # Bangladesh Time + 6:00- BDT 2009 # Bangladesh Time + 6:00BangBD%sT # Bhutan # Zone NAMEGMTOFF RULES FORMAT [UNTIL] ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193784 - vendor/tzdata/2009i
Author: edwin Date: Tue Jun 9 00:06:10 2009 New Revision: 193784 URL: http://svn.freebsd.org/changeset/base/193784 Log: Tag of vendor import of tzdata2009i: Bangladesh will go into DST in 20 June. Added: vendor/tzdata/2009i/ - copied from r193783, vendor/tzdata/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193785 - head/share/zoneinfo
Author: edwin Date: Tue Jun 9 00:09:36 2009 New Revision: 193785 URL: http://svn.freebsd.org/changeset/base/193785 Log: MFV of tzdata2009i: Bangladesh will go into DST on 20 June. MFC after:2 days Modified: head/share/zoneinfo/ (props changed) head/share/zoneinfo/asia Modified: head/share/zoneinfo/asia == --- head/share/zoneinfo/asiaTue Jun 9 00:06:10 2009(r193784) +++ head/share/zoneinfo/asiaTue Jun 9 00:09:36 2009(r193785) @@ -1,5 +1,5 @@ # -# @(#)asia 8.32 +# @(#)asia 8.34 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -127,6 +127,48 @@ Zone Asia/Bahrain3:22:20 - LMT 1920 # 3:00- AST # Bangladesh +# From Alexander Krivenyshev (2009-05-13): +# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce +# Daylight Saving Time from June 16 to Sept 30 +# +# Bangladesh to introduce daylight saving time likely from June 16 +# http://www.asiantribune.com/?q=node/17288";> +# http://www.asiantribune.com/?q=node/17288 +# +# or +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html";> +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh02.html +# +# +# "... Bangladesh government has decided to switch daylight saving time from +# June +# 16 till September 30 in a bid to ensure maximum use of daylight to cope with +# crippling power crisis. " +# +# The switch will remain in effect from June 16 to Sept 30 (2009) but if +# implemented the next year, it will come in force from April 1, 2010 + +# From Steffen Thorsen (2009-06-02): +# They have finally decided now, but changed the start date to midnight between +# the 19th and 20th, and they have not set the end date yet. +# +# Some sources: +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601";> +# http://in.reuters.com/article/southAsiaNews/idINIndia-40017620090601 +# +# http://bdnews24.com/details.php?id=85889&cid=2";> +# http://bdnews24.com/details.php?id=85889&cid=2 +# +# +# Our wrap-up: +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html";> +# http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html +# + +# Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S +Rule Bang2009only- Jan 1 0:000 - +Rule Bang2009only- Jun 20 0:001:00S + # Zone NAMEGMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct# Howrah Mean Time? @@ -134,7 +176,8 @@ ZoneAsia/Dhaka 6:01:40 - LMT 1890 5:30- IST 1942 Sep 6:30- BURT1951 Sep 30 6:00- DACT1971 Mar 26 # Dacca Time - 6:00- BDT # Bangladesh Time + 6:00- BDT 2009 # Bangladesh Time + 6:00BangBD%sT # Bhutan # Zone NAMEGMTOFF RULES FORMAT [UNTIL] ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193786 - vendor/tzcode/dist/unused
Author: edwin Date: Tue Jun 9 00:14:13 2009 New Revision: 193786 URL: http://svn.freebsd.org/changeset/base/193786 Log: MFV of tzcode2009i: Fix link of TZ timezone maps at http://efele.net/maps/tz/ Modified: vendor/tzcode/dist/unused/tz-link.htm Modified: vendor/tzcode/dist/unused/tz-link.htm == --- vendor/tzcode/dist/unused/tz-link.htm Tue Jun 9 00:09:36 2009 (r193785) +++ vendor/tzcode/dist/unused/tz-link.htm Tue Jun 9 00:14:13 2009 (r193786) @@ -18,7 +18,7 @@ Sources for Time Zone and Daylight Saving Time Data -@(#)tz-link.htm8.19 +@(#)tz-link.htm8.21 This file is in the public domain, so clarified as of @@ -360,10 +360,9 @@ but the maps are more up to date. Time zone boundaries -http://efele.net/maps/tz/us/";>A map of the TZ timezones in -the US contains a http://efele.net/maps/tz/";>TZ timezone maps contains a http://en.wikipedia.org/wiki/Shapefile";>shapefile of the -tz regions in the US. +tz regions in the world. http://statoids.com/statoids.html";>Administrative Divisions of Countries ("Statoids") contains detailed lists of tz-related zone subdivision data. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193787 - vendor/tzcode/tzcode2009i
Author: edwin Date: Tue Jun 9 00:15:46 2009 New Revision: 193787 URL: http://svn.freebsd.org/changeset/base/193787 Log: Tag of import of tzcode2009i No MFV necessary since the file isn't used in the base operating system. Added: vendor/tzcode/tzcode2009i/ - copied from r193786, vendor/tzcode/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193788 - in stable/7/lib/libc: . include
Author: des Date: Tue Jun 9 00:27:23 2009 New Revision: 193788 URL: http://svn.freebsd.org/changeset/base/193788 Log: merge r176058: more missing namespace wrappers for libthr Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/include/namespace.h stable/7/lib/libc/include/un-namespace.h Modified: stable/7/lib/libc/include/namespace.h == --- stable/7/lib/libc/include/namespace.h Tue Jun 9 00:15:46 2009 (r193787) +++ stable/7/lib/libc/include/namespace.h Tue Jun 9 00:27:23 2009 (r193788) @@ -147,6 +147,7 @@ #definepthread_mutex_destroy _pthread_mutex_destroy #definepthread_mutex_getprioceiling _pthread_mutex_getprioceiling #definepthread_mutex_init _pthread_mutex_init +#definepthread_mutex_isowned_np _pthread_mutex_isowned_np #definepthread_mutex_lock _pthread_mutex_lock #definepthread_mutex_setprioceiling _pthread_mutex_setprioceiling #definepthread_mutex_timedlock _pthread_mutex_timedlock Modified: stable/7/lib/libc/include/un-namespace.h == --- stable/7/lib/libc/include/un-namespace.hTue Jun 9 00:15:46 2009 (r193787) +++ stable/7/lib/libc/include/un-namespace.hTue Jun 9 00:27:23 2009 (r193788) @@ -128,6 +128,7 @@ #undef pthread_mutex_destroy #undef pthread_mutex_getprioceiling #undef pthread_mutex_init +#undef pthread_mutex_isowned_np #undef pthread_mutex_lock #undef pthread_mutex_setprioceiling #undef pthread_mutex_timedlock ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/powe...
Author: des Date: Tue Jun 9 00:47:54 2009 New Revision: 193789 URL: http://svn.freebsd.org/changeset/base/193789 Log: merge r180982,r181044,r181059,r181065,r181341,r183021: WARNS cleanup, add thr_pread_{int,long,ptr} and thr_pwrite_{int,long,ptr}, and change definition of psaddr_t (no impact on ABI). Discussed with marcel@, but any screwups are my own. Modified: stable/7/lib/libthr/ (props changed) stable/7/lib/libthread_db/ (props changed) stable/7/lib/libthread_db/Makefile stable/7/lib/libthread_db/arch/amd64/libpthread_md.c stable/7/lib/libthread_db/arch/arm/libpthread_md.c stable/7/lib/libthread_db/arch/i386/libpthread_md.c stable/7/lib/libthread_db/arch/ia64/libpthread_md.c stable/7/lib/libthread_db/arch/powerpc/libpthread_md.c stable/7/lib/libthread_db/arch/sparc64/libpthread_md.c stable/7/lib/libthread_db/libpthread_db.c stable/7/lib/libthread_db/libpthread_db.h stable/7/lib/libthread_db/libthr_db.c stable/7/lib/libthread_db/thread_db.c stable/7/lib/libthread_db/thread_db.h stable/7/lib/libthread_db/thread_db_int.h stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/procfs.h Modified: stable/7/lib/libthread_db/Makefile == --- stable/7/lib/libthread_db/Makefile Tue Jun 9 00:27:23 2009 (r193788) +++ stable/7/lib/libthread_db/Makefile Tue Jun 9 00:47:54 2009 (r193789) @@ -8,7 +8,7 @@ SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c SRCS+= libthr_db.c INCS= thread_db.h -WARNS?= 1 +WARNS?= 6 CFLAGS+=-I. -I${.CURDIR} SYM_MAPS+=${.CURDIR}/Symbol.map Modified: stable/7/lib/libthread_db/arch/amd64/libpthread_md.c == --- stable/7/lib/libthread_db/arch/amd64/libpthread_md.cTue Jun 9 00:27:23 2009(r193788) +++ stable/7/lib/libthread_db/arch/amd64/libpthread_md.cTue Jun 9 00:47:54 2009(r193789) @@ -30,8 +30,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include "libpthread_db.h" + void pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) { Modified: stable/7/lib/libthread_db/arch/arm/libpthread_md.c == --- stable/7/lib/libthread_db/arch/arm/libpthread_md.c Tue Jun 9 00:27:23 2009(r193788) +++ stable/7/lib/libthread_db/arch/arm/libpthread_md.c Tue Jun 9 00:47:54 2009(r193789) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" @@ -86,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, } void -pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc) { mcontext_t *mc = &uc->uc_mcontext; @@ -95,9 +94,8 @@ pt_fpreg_to_ucontext(const struct fpreg } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r) { - const mcontext_t *mc = &uc->uc_mcontext; /* XXX */ memset(r, 0, sizeof(*r)); @@ -109,8 +107,9 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ + return (0); } Modified: stable/7/lib/libthread_db/arch/i386/libpthread_md.c == --- stable/7/lib/libthread_db/arch/i386/libpthread_md.c Tue Jun 9 00:27:23 2009(r193788) +++ stable/7/lib/libthread_db/arch/i386/libpthread_md.c Tue Jun 9 00:47:54 2009(r193789) @@ -27,11 +27,10 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include -#include #include +#include +#include #include "libpthread_db.h" Modified: stable/7/lib/libthread_db/arch/ia64/libpthread_md.c == --- stable/7/lib/libthread_db/arch/ia64/libpthread_md.c Tue Jun 9 00:27:23 2009(r193788) +++ stable/7/lib/libthread_db/arch/ia64/libpthread_md.c Tue Jun 9 00:47:54 2009(r193789) @@ -28,25 +28,28 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include "libpthread_db.h" + void -pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc) +pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r) +pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused) { } void -pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused) { } void -pt_ucontext_to_fpreg(const ucontext_t *uc, s
svn commit: r193790 - head/sys/i386/isa
Author: delphij Date: Tue Jun 9 00:54:57 2009 New Revision: 193790 URL: http://svn.freebsd.org/changeset/base/193790 Log: Add line width calculations for 15/16 and 24/32 bit modes in case the "Get Scan Line Length" function fails, as it does in Parallels (in Version 2.2, Build 2112 at least). PR: i386/127367 Obtained from:DragonFly Submitted by: Pedro Giffuni MFC after:1 month Modified: head/sys/i386/isa/vesa.c Modified: head/sys/i386/isa/vesa.c == --- head/sys/i386/isa/vesa.cTue Jun 9 00:47:54 2009(r193789) +++ head/sys/i386/isa/vesa.cTue Jun 9 00:54:57 2009(r193790) @@ -,6 +,14 @@ vesa_set_mode(video_adapter_t *adp, int default: /* shouldn't happen */ vesa_adp->va_line_width = info.vi_width; break; + case 15: + case 16: + vesa_adp->va_line_width = info.vi_width*2; + break; + case 24: + case 32: + vesa_adp->va_line_width = info.vi_width*4; + break; } } else { vesa_adp->va_line_width = info.vi_width; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/p
2009/6/9 Dag-Erling Smorgrav : > Author: des > Date: Tue Jun 9 00:47:54 2009 > New Revision: 193789 > URL: http://svn.freebsd.org/changeset/base/193789 > > Log: > merge r180982,r181044,r181059,r181065,r181341,r183021: WARNS cleanup, > add thr_pread_{int,long,ptr} and thr_pwrite_{int,long,ptr}, and change > definition of psaddr_t (no impact on ABI). Discussed with marcel@, but > any screwups are my own. Thanks, I had this into my pipeline but you saved me some time. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193795 - stable/7/lib/libutil
Author: des Date: Tue Jun 9 01:43:58 2009 New Revision: 193795 URL: http://svn.freebsd.org/changeset/base/193795 Log: merge r180815,184081-184088,184091-184094,184634,184676-184677, 185277, 93589,193591: style and warning cleanups, libutil is now WARNS=6 clean. Also merged setclasscpumask(), which would have been a b***h to isolate from the rest of the changes. AFAICT, nobody uses it anyway. Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/Makefile stable/7/lib/libutil/flopen.3 stable/7/lib/libutil/flopen.c stable/7/lib/libutil/login.conf.5 stable/7/lib/libutil/login_cap.h stable/7/lib/libutil/login_class.3 stable/7/lib/libutil/login_class.c stable/7/lib/libutil/login_times.3 stable/7/lib/libutil/login_times.c stable/7/lib/libutil/pidfile.3 stable/7/lib/libutil/pidfile.c stable/7/lib/libutil/realhostname.c Modified: stable/7/lib/libutil/Makefile == --- stable/7/lib/libutil/Makefile Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/Makefile Tue Jun 9 01:43:58 2009 (r193795) @@ -8,7 +8,7 @@ SHLIBDIR?= /lib LIB= util SHLIB_MAJOR= 7 -SRCS= _secure_path.c auth.c gr_util.c expand_number.c flopen.c fparseln.c \ +SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ humanize_number.c kinfo_getfile.c kinfo_getvmmap.c kld.c \ login.c login_auth.c login_cap.c login_class.c \ login_crypt.c login_ok.c login_times.c login_tty.c logout.c \ Modified: stable/7/lib/libutil/flopen.3 == --- stable/7/lib/libutil/flopen.3 Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/flopen.3 Tue Jun 9 01:43:58 2009 (r193795) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2007 +.Dd June 6, 2009 .Dt FLOPEN 3 .Os .Sh NAME @@ -93,11 +93,6 @@ and .Xr errno 2 , .Xr flock 2 , .Xr open 2 -.Sh HISTORY -The -.Fn flopen -function first appeared in -.Fx 6.3 . .Sh AUTHORS .An -nosplit The Modified: stable/7/lib/libutil/flopen.c == --- stable/7/lib/libutil/flopen.c Tue Jun 9 01:41:45 2009 (r193794) +++ stable/7/lib/libutil/flopen.c Tue Jun 9 01:43:58 2009 (r193795) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -54,13 +53,13 @@ flopen(const char *path, int flags, ...) va_list ap; va_start(ap, flags); - mode = va_arg(ap, int); /* mode_t promoted to int */ + mode = (mode_t)va_arg(ap, int); /* mode_t promoted to int */ va_end(ap); } - operation = LOCK_EX; - if (flags & O_NONBLOCK) - operation |= LOCK_NB; +operation = LOCK_EX; +if (flags & O_NONBLOCK) +operation |= LOCK_NB; trunc = (flags & O_TRUNC); flags &= ~O_TRUNC; @@ -72,32 +71,32 @@ flopen(const char *path, int flags, ...) if (flock(fd, operation) == -1) { /* unsupported or interrupted */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } if (stat(path, &sb) == -1) { /* disappeared from under our feet */ - close(fd); + (void)close(fd); continue; } if (fstat(fd, &fsb) == -1) { /* can't happen [tm] */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } if (sb.st_dev != fsb.st_dev || sb.st_ino != fsb.st_ino) { /* changed under our feet */ - close(fd); + (void)close(fd); continue; } if (trunc && ftruncate(fd, 0) != 0) { /* can't happen [tm] */ serrno = errno; - close(fd); + (void)close(fd); errno = serrno; return (-1); } Modified: stable/7/lib/libutil/login.conf.5 == --- stable/7/lib/libutil/login.conf.5 Tue Ju
Re: svn commit: r193789 - in stable/7: lib/libthr lib/libthread_db lib/libthread_db/arch/amd64 lib/libthread_db/arch/arm lib/libthread_db/arch/i386 lib/libthread_db/arch/ia64 lib/libthread_db/arch/pow
Attilio Rao writes: > Thanks, > I had this into my pipeline but you saved me some time. You're welcome. I'm trying to get 7 to build with -Werror again :) DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193796 - head/sys/net
Author: hrs Date: Tue Jun 9 02:27:59 2009 New Revision: 193796 URL: http://svn.freebsd.org/changeset/base/193796 Log: - Fix sanity check of GIFSOPTS ioctl. - Rename option mask s/GIF_FULLOPTS/GIF_OPTMASK/ Spotted by: Eygene Ryabinkin, delphij Modified: head/sys/net/if_gif.c head/sys/net/if_gif.h Modified: head/sys/net/if_gif.c == --- head/sys/net/if_gif.c Tue Jun 9 01:43:58 2009(r193795) +++ head/sys/net/if_gif.c Tue Jun 9 02:27:59 2009(r193796) @@ -912,10 +912,10 @@ gif_ioctl(ifp, cmd, data) case GIFSOPTS: if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) break; - if ((error = copyin(&options, &sc->gif_options, - sizeof(sc->gif_options { - if ((options | GIF_FULLOPTS) == GIF_FULLOPTS) - ifr->ifr_data = (caddr_t)options; + if (!(error = copyin(ifr->ifr_data, &options, + sizeof(options { + if ((options | GIF_OPTMASK) == GIF_OPTMASK) + sc->gif_options = options; else error = EINVAL; } Modified: head/sys/net/if_gif.h == --- head/sys/net/if_gif.h Tue Jun 9 01:43:58 2009(r193795) +++ head/sys/net/if_gif.h Tue Jun 9 02:27:59 2009(r193796) @@ -150,11 +150,11 @@ extern struct vnet_gif vnet_gif_0; #endif /* _KERNEL */ -#define GIFGOPTS _IOR('i', 150, struct ifreq) +#define GIFGOPTS _IOWR('i', 150, struct ifreq) #define GIFSOPTS _IOW('i', 151, struct ifreq) #defineGIF_ACCEPT_REVETHIP 0x0001 #defineGIF_SEND_REVETHIP 0x0010 -#defineGIF_FULLOPTS(GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) +#defineGIF_OPTMASK (GIF_ACCEPT_REVETHIP|GIF_SEND_REVETHIP) #endif /* _NET_IF_GIF_H_ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193799 - head/usr.bin/fstat
Author: bland (ports committer) Date: Tue Jun 9 03:35:42 2009 New Revision: 193799 URL: http://svn.freebsd.org/changeset/base/193799 Log: Chase ZFS v13 import changes. This is a temporary fix until we find a way to avoid fstat to be broken each time we change the znode. Approved by: lulf Modified: head/usr.bin/fstat/zfs.c Modified: head/usr.bin/fstat/zfs.c == --- head/usr.bin/fstat/zfs.cTue Jun 9 03:27:08 2009(r193798) +++ head/usr.bin/fstat/zfs.cTue Jun 9 03:35:42 2009(r193799) @@ -29,6 +29,7 @@ #include #define _KERNEL #include +#include #undef _KERNEL #include @@ -57,7 +58,7 @@ * definition. */ #define LOCATION_ZID (2 * sizeof(void *)) -#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *))) +#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) - sizeof(struct task))) int zfs_filestat(struct vnode *vp, struct filestat *fsp) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193802 - head/usr.bin/fstat
Author: bland (ports committer) Date: Tue Jun 9 04:09:31 2009 New Revision: 193802 URL: http://svn.freebsd.org/changeset/base/193802 Log: Fix bug in zphys offset calculation I introduced while retyping original patch. Modified: head/usr.bin/fstat/zfs.c Modified: head/usr.bin/fstat/zfs.c == --- head/usr.bin/fstat/zfs.cTue Jun 9 04:03:04 2009(r193801) +++ head/usr.bin/fstat/zfs.cTue Jun 9 04:09:31 2009(r193802) @@ -58,7 +58,7 @@ * definition. */ #define LOCATION_ZID (2 * sizeof(void *)) -#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) - sizeof(struct task))) +#define LOCATION_ZPHYS(zsize) ((zsize) - (2 * sizeof(void *) + sizeof(struct task))) int zfs_filestat(struct vnode *vp, struct filestat *fsp) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193803 - head/sys/dev/usb/wlan
Author: weongyo Date: Tue Jun 9 04:17:08 2009 New Revision: 193803 URL: http://svn.freebsd.org/changeset/base/193803 Log: unify zyd_tx_mgt() and zyd_tx_data() to simplify TX path and sorts setting TX descritor. While I'm here fixes a bug that the management frames only sent at 2 Mbits/s. Modified: head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/usb/wlan/if_zydreg.h Modified: head/sys/dev/usb/wlan/if_zyd.c == --- head/sys/dev/usb/wlan/if_zyd.c Tue Jun 9 04:09:31 2009 (r193802) +++ head/sys/dev/usb/wlan/if_zyd.c Tue Jun 9 04:17:08 2009 (r193803) @@ -157,9 +157,7 @@ static int zyd_set_rxfilter(struct zyd_s static voidzyd_set_chan(struct zyd_softc *, struct ieee80211_channel *); static int zyd_set_beacon_interval(struct zyd_softc *, int); static voidzyd_rx_data(struct usb_xfer *, int, uint16_t); -static int zyd_tx_mgt(struct zyd_softc *, struct mbuf *, - struct ieee80211_node *); -static int zyd_tx_data(struct zyd_softc *, struct mbuf *, +static int zyd_tx_start(struct zyd_softc *, struct mbuf *, struct ieee80211_node *); static voidzyd_start(struct ifnet *); static int zyd_raw_xmit(struct ieee80211_node *, struct mbuf *, @@ -2329,7 +2327,7 @@ tr_setup: } static uint8_t -zyd_plcp_signal(int rate) +zyd_plcp_signal(struct zyd_softc *sc, int rate) { switch (rate) { /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ @@ -2359,109 +2357,9 @@ zyd_plcp_signal(int rate) case 22: return (0x3); } - return (0xff); /* XXX unsupported/unknown rate */ -} - -static int -zyd_tx_mgt(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) -{ - struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211com *ic = ni->ni_ic; - struct zyd_tx_desc *desc; - struct zyd_tx_data *data; - struct ieee80211_frame *wh; - struct ieee80211_key *k; - int rate, totlen; - uint16_t pktlen; - - data = STAILQ_FIRST(&sc->tx_free); - STAILQ_REMOVE_HEAD(&sc->tx_free, next); - sc->tx_nfree--; - desc = &data->desc; - - rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; - - wh = mtod(m0, struct ieee80211_frame *); - - if (wh->i_fc[1] & IEEE80211_FC1_WEP) { - k = ieee80211_crypto_encap(ni, m0); - if (k == NULL) { - m_freem(m0); - return (ENOBUFS); - } - } - - data->ni = ni; - data->m = m0; - data->rate = rate; - - wh = mtod(m0, struct ieee80211_frame *); - - totlen = m0->m_pkthdr.len + IEEE80211_CRC_LEN; - - /* fill Tx descriptor */ - desc->len = htole16(totlen); - - desc->flags = ZYD_TX_FLAG_BACKOFF; - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - /* multicast frames are not sent at OFDM rates in 802.11b/g */ - if (totlen > vap->iv_rtsthreshold) { - desc->flags |= ZYD_TX_FLAG_RTS; - } else if (ZYD_RATE_IS_OFDM(rate) && - (ic->ic_flags & IEEE80211_F_USEPROT)) { - if (ic->ic_protmode == IEEE80211_PROT_CTSONLY) - desc->flags |= ZYD_TX_FLAG_CTS_TO_SELF; - else if (ic->ic_protmode == IEEE80211_PROT_RTSCTS) - desc->flags |= ZYD_TX_FLAG_RTS; - } - } else - desc->flags |= ZYD_TX_FLAG_MULTICAST; - - if ((wh->i_fc[0] & - (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == - (IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_PS_POLL)) - desc->flags |= ZYD_TX_FLAG_TYPE(ZYD_TX_TYPE_PS_POLL); - - desc->phy = zyd_plcp_signal(rate); - if (ZYD_RATE_IS_OFDM(rate)) { - desc->phy |= ZYD_TX_PHY_OFDM; - if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) - desc->phy |= ZYD_TX_PHY_5GHZ; - } else if (rate != 2 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) - desc->phy |= ZYD_TX_PHY_SHPREAMBLE; - - /* actual transmit length (XXX why +10?) */ - pktlen = ZYD_TX_DESC_SIZE + 10; - if (sc->sc_macrev == ZYD_ZD1211) - pktlen += totlen; - desc->pktlen = htole16(pktlen); - - desc->plcp_length = (16 * totlen + rate - 1) / rate; - desc->plcp_service = 0; - if (rate == 22) { - const int remainder = (16 * totlen) % 22; - if (remainder != 0 && remainder < 7) - desc->plcp_service |= ZYD_PLCP_LENGEXT; - } - - if (ieee80211_radiotap_active_vap(vap)) { - struct zyd_tx_radiotap_header *tap = &sc->sc_txtap; - - tap->wt_flags = 0; - tap->wt_rate = rate; - ieee80211_radiotap_tx(vap, m0);
svn commit: r193804 - in head/sys: amd64/amd64 i386/i386
Author: ariff Date: Tue Jun 9 04:17:36 2009 New Revision: 193804 URL: http://svn.freebsd.org/changeset/base/193804 Log: Move C1E workaround into its own idle function. Previous workaround works only during initial booting process, while there are laptops/BIOSes that tend to act 'smarter' by force enabling C1E if the main power adapter being pulled out, rendering previous workaround ineffective. Given the fact that we still rely on local APIC to drive timer interrupt, this workaround should keep all Turion (probably Phenom too) X\d+ alive whether its on battery power or not. URL: http://lists.freebsd.org/pipermail/freebsd-acpi/2008-April/004858.html http://lists.freebsd.org/pipermail/freebsd-acpi/2008-May/004888.html Tested by:Peter Jeremy Modified: head/sys/amd64/amd64/local_apic.c head/sys/amd64/amd64/machdep.c head/sys/i386/i386/local_apic.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/local_apic.c == --- head/sys/amd64/amd64/local_apic.c Tue Jun 9 04:17:08 2009 (r193803) +++ head/sys/amd64/amd64/local_apic.c Tue Jun 9 04:17:36 2009 (r193804) @@ -329,29 +329,6 @@ lapic_setup(int boot) /* XXX: Error and thermal LVTs */ - if (cpu_vendor_id == CPU_VENDOR_AMD) { - /* -* Detect the presence of C1E capability mostly on latest -* dual-cores (or future) k8 family. This feature renders -* the local APIC timer dead, so we disable it by reading -* the Interrupt Pending Message register and clearing both -* C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). -* -* Reference: -* "BIOS and Kernel Developer's Guide for AMD NPT -*Family 0Fh Processors" -* #32559 revision 3.00 -*/ - if ((cpu_id & 0x0f00) == 0x0f00 && - (cpu_id & 0x0fff) >= 0x0004) { - uint64_t msr; - - msr = rdmsr(0xc0010055); - if (msr & 0x1800) - wrmsr(0xc0010055, msr & ~0x1800ULL); - } - } - intr_restore(eflags); } Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Tue Jun 9 04:17:08 2009 (r193803) +++ head/sys/amd64/amd64/machdep.c Tue Jun 9 04:17:36 2009 (r193804) @@ -600,6 +600,69 @@ cpu_idle_acpi(int busy) __asm __volatile("sti; hlt"); } +static int cpu_ident_amdc1e = 0; + +static int +cpu_probe_amdc1e(void) +{ + int i; + + /* +* Forget it, if we're not using local APIC timer. +*/ + if (resource_disabled("apic", 0) || + (resource_int_value("apic", 0, "clock", &i) == 0 && i == 0)) + return (0); + + /* +* Detect the presence of C1E capability mostly on latest +* dual-cores (or future) k8 family. +*/ + if (cpu_vendor_id == CPU_VENDOR_AMD && + (cpu_id & 0x0f00) == 0x0f00 && + (cpu_id & 0x0fff) >= 0x0004) { + cpu_ident_amdc1e = 1; + return (1); + } + + return (0); +} + +/* + * C1E renders the local APIC timer dead, so we disable it by + * reading the Interrupt Pending Message register and clearing + * both C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27). + * + * Reference: + * "BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh Processors" + * #32559 revision 3.00+ + */ +#defineMSR_AMDK8_IPM 0xc0010055 +#defineAMDK8_SMIONCMPHALT (1ULL << 27) +#defineAMDK8_C1EONCMPHALT (1ULL << 28) +#defineAMDK8_CMPHALT (AMDK8_SMIONCMPHALT | AMDK8_C1EONCMPHALT) + +static void +cpu_idle_amdc1e(int busy) +{ + + disable_intr(); + if (sched_runnable()) + enable_intr(); + else { + uint64_t msr; + + msr = rdmsr(MSR_AMDK8_IPM); + if (msr & AMDK8_CMPHALT) + wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); + + if (cpu_idle_hook) + cpu_idle_hook(); + else + __asm __volatile("sti; hlt"); + } +} + static void cpu_idle_spin(int busy) { @@ -697,6 +760,7 @@ struct { { cpu_idle_spin, "spin" }, { cpu_idle_mwait, "mwait" }, { cpu_idle_mwait_hlt, "mwait_hlt" }, + { cpu_idle_amdc1e, "amdc1e" }, { cpu_idle_hlt, "hlt" }, { cpu_idle_acpi, "acpi" }, { NULL, NULL } @@ -715,6 +779,9 @@ idle_sysctl_available(SYSCTL_HANDLER_ARG if (strstr(idle_tbl[i].id_name, "mwait") && (cpu_featur
svn commit: r193807 - head/usr.sbin/flowctl
Author: imp Date: Tue Jun 9 05:18:14 2009 New Revision: 193807 URL: http://svn.freebsd.org/changeset/base/193807 Log: Use NG_PATHSIZ instead of NG_PATHLEN + 1. Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c == --- head/usr.sbin/flowctl/flowctl.c Tue Jun 9 04:58:15 2009 (r193806) +++ head/usr.sbin/flowctl/flowctl.c Tue Jun 9 05:18:14 2009 (r193807) @@ -150,7 +150,7 @@ ctl_show(int argc, char **argv) { struct ng_mesg *ng_mesg; struct ngnf_flows *data; - char path[NG_PATHLEN + 1]; + char path[NG_PATHSIZ]; int token, nread, last = 0; int verbose = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193808 - head/usr.sbin/flowctl
Author: imp Date: Tue Jun 9 05:24:06 2009 New Revision: 193808 URL: http://svn.freebsd.org/changeset/base/193808 Log: Get the other NG_PATHLEN while I'm here too :(. Modified: head/usr.sbin/flowctl/flowctl.c Modified: head/usr.sbin/flowctl/flowctl.c == --- head/usr.sbin/flowctl/flowctl.c Tue Jun 9 05:18:14 2009 (r193807) +++ head/usr.sbin/flowctl/flowctl.c Tue Jun 9 05:24:06 2009 (r193808) @@ -77,7 +77,7 @@ struct ip_ctl_cmd cmds[] = { }; intcs; -char ng_nodename[NG_PATHLEN + 1]; +char ng_nodename[NG_PATHSIZ]; int main(int argc, char **argv) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193809 - head/lib/libpmc
Author: jkoshy Date: Tue Jun 9 06:34:48 2009 New Revision: 193809 URL: http://svn.freebsd.org/changeset/base/193809 Log: Fix parsing of Core2 event qualifiers. Submitted by: Nikola K Modified: head/lib/libpmc/libpmc.c Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cTue Jun 9 05:24:06 2009(r193808) +++ head/lib/libpmc/libpmc.cTue Jun 9 06:34:48 2009(r193809) @@ -591,22 +591,22 @@ iap_allocate_pmc(enum pmc_event pe, char pmc_config->pm_caps |= PMC_CAP_USER; } else if (KWMATCH(p, IAP_KW_ANYTHREAD)) { pmc_config->pm_md.pm_iap.pm_iap_config |= IAP_ANY; - } else if (KWMATCH(p, IAP_KW_CORE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_CORE "=")) { n = pmc_parse_mask(iap_core_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_AGENT)) { + } else if (KWPREFIXMATCH(p, IAP_KW_AGENT "=")) { n = pmc_parse_mask(iap_agent_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_PREFETCH)) { + } else if (KWPREFIXMATCH(p, IAP_KW_PREFETCH "=")) { n = pmc_parse_mask(iap_prefetch_mask, p, &evmask); if (n != 1) return (-1); - } else if (KWMATCH(p, IAP_KW_CACHESTATE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_CACHESTATE "=")) { n = pmc_parse_mask(iap_cachestate_mask, p, &cachestate); } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_CORE && - KWMATCH(p, IAP_KW_TRANSITION)) { + KWPREFIXMATCH(p, IAP_KW_TRANSITION "=")) { n = pmc_parse_mask(iap_transition_mask, p, &evmask); if (n != 1) return (-1); @@ -614,10 +614,10 @@ iap_allocate_pmc(enum pmc_event pe, char cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2 || cpu_info.pm_cputype == PMC_CPU_INTEL_CORE2EXTREME || cpu_info.pm_cputype == PMC_CPU_INTEL_COREI7) { - if (KWMATCH(p, IAP_KW_SNOOPRESPONSE)) { + if (KWPREFIXMATCH(p, IAP_KW_SNOOPRESPONSE "=")) { n = pmc_parse_mask(iap_snoopresponse_mask, p, &evmask); - } else if (KWMATCH(p, IAP_KW_SNOOPTYPE)) { + } else if (KWPREFIXMATCH(p, IAP_KW_SNOOPTYPE "=")) { n = pmc_parse_mask(iap_snooptype_mask, p, &evmask); } else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193810 - head/lib/libpmc
Author: jkoshy Date: Tue Jun 9 06:36:29 2009 New Revision: 193810 URL: http://svn.freebsd.org/changeset/base/193810 Log: Document the fact that some Core2 family CPUs lack fixed-function counters. Modified: head/lib/libpmc/pmc.core2.3 Modified: head/lib/libpmc/pmc.core2.3 == --- head/lib/libpmc/pmc.core2.3 Tue Jun 9 06:34:48 2009(r193809) +++ head/lib/libpmc/pmc.core2.3 Tue Jun 9 06:36:29 2009(r193810) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2008 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2008,2009 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2008 +.Dd June 8, 2009 .Os .Dt PMC.CORE2 3 .Sh NAME @@ -42,7 +42,7 @@ family CPUs CPUs contain PMCs conforming to version 2 of the .Tn Intel performance measurement architecture. -These CPUs contains two classes of PMCs: +These CPUs may contain upto two classes of PMCs: .Bl -tag -width "Li PMC_CLASS_IAP" .It Li PMC_CLASS_IAF Fixed-function counters that count only one hardware event per counter. @@ -66,6 +66,7 @@ Intel Core2 PMCs are documented in .Ss CORE2 FIXED FUNCTION PMCS These PMCs and their supported events are documented in .Xr pmc.iaf 3 . +Not all CPUs in this family implement fixed-function counters. .Ss CORE2 PROGRAMMABLE PMCS The programmable PMCs support the following capabilities: .Bl -column "PMC_CAP_INTERRUPT" "Support" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193811 - svnadmin/conf
Author: imp Date: Tue Jun 9 06:50:11 2009 New Revision: 193811 URL: http://svn.freebsd.org/changeset/base/193811 Log: Add nork-san (Norikatsu Shigemura) to the src committers world. He's already a ports committer. I'll be his mentor. Please welcome him to the src tree. Approved by: core@ Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access == --- svnadmin/conf/accessTue Jun 9 06:36:29 2009(r193810) +++ svnadmin/conf/accessTue Jun 9 06:50:11 2009(r193811) @@ -152,6 +152,7 @@ murray mux n_hibmadevnull netchild +nork np nwhitehorn nyan Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Tue Jun 9 06:36:29 2009(r193810) +++ svnadmin/conf/mentors Tue Jun 9 06:50:11 2009(r193811) @@ -20,6 +20,7 @@ jamie bz Co-mentor: brooks jilles ed jinmei gnn lstewart gnn +nork imp np gnn rdivacky ed remko imp ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"