svn commit: r206595 - head/sys/dev/usb
Author: kevlo Date: Wed Apr 14 07:07:43 2010 New Revision: 206595 URL: http://svn.freebsd.org/changeset/base/206595 Log: Eliminate duplicate comment Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsWed Apr 14 06:56:48 2010(r206594) +++ head/sys/dev/usb/usbdevsWed Apr 14 07:07:43 2010(r206595) @@ -2516,7 +2516,6 @@ product QUALCOMMINC E2002 0x2002 3G mode product QUALCOMMINC E2003 0x2003 3G modem /* Quanta products */ -/* Quanta products */ product QUANTA RW6815_10x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101_STOR 0x1000 USB Q101 Storage ___ 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: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
On Mon, Apr 12, 2010 at 11:05:12PM +0200, Luigi Rizzo wrote: > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > ... > > > @@ -0,0 +1,19 @@ > > > +# GEOM_LIBRARY_PATH > > > +# $FreeBSD$ > > > + > > > +.PATH: /usr/src/sbin/geom/misc > > > + > > > +CFLAGS += -I/usr/src/sbin/geom > > > > This doesn't look right. > > probably a leftover from older versions of this code for 6.x . > I will do more tests tomorrow (for 7.x at this point, there is > no point in trying to support 6.x I believe) and try to remove > it if not necessary. As Rui said you should use ${.CURDIR} instead of hardcoding /usr/src/. BTW. So you decided to implement insert/remove functionality after all. I have some questions: - It is implemented as internal gsched hack, which is a pity, because this might be very useful functionality for other classes in the future. Is there a plan to make it more general and move it to the GEOM itself? - Why g_sched_flush_pending() operates on global structure? I think it will break if you try to insert and remove at the same time. -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgpKFCv7CDmAC.pgp Description: PGP signature
Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
On Wed, Apr 14, 2010 at 09:46:17AM +0200, Pawel Jakub Dawidek wrote: > BTW. So you decided to implement insert/remove functionality after all. > I have some questions: > > - It is implemented as internal gsched hack, which is a pity, because > this might be very useful functionality for other classes in the future. > Is there a plan to make it more general and move it to the GEOM itself? > > - Why g_sched_flush_pending() operates on global structure? I think it > will break if you try to insert and remove at the same time. One more thing:) If I read code correctly, new provider has different name than the original one. If my userland tool send command to my class and my class tries to find provider by name by scaning existing geoms, it won't find it, because provider's name is different. Wouldn't it better to change old provider's name and use the name old provider had for new provider? Sounds hackish... Another thing that comes to my mind is possibility to create providers that are not represented in /dev/. Name collision wouldn't be a problem then. Also, it seems nicer to not polute /dev/ with such proxy-providers. -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgpatXRzdHYec.pgp Description: PGP signature
Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
[Cc-ing Fabio as he may have more details] On Wed, Apr 14, 2010 at 09:46:17AM +0200, Pawel Jakub Dawidek wrote: > On Mon, Apr 12, 2010 at 11:05:12PM +0200, Luigi Rizzo wrote: > > On Mon, Apr 12, 2010 at 10:49:26PM +0200, Pawel Jakub Dawidek wrote: > > ... > > > > @@ -0,0 +1,19 @@ > > > > +# GEOM_LIBRARY_PATH > > > > +# $FreeBSD$ > > > > + > > > > +.PATH: /usr/src/sbin/geom/misc > > > > + > > > > +CFLAGS += -I/usr/src/sbin/geom > > > > > > This doesn't look right. > > > > probably a leftover from older versions of this code for 6.x . > > I will do more tests tomorrow (for 7.x at this point, there is > > no point in trying to support 6.x I believe) and try to remove > > it if not necessary. > > As Rui said you should use ${.CURDIR} instead of hardcoding /usr/src/. I thought i already fixed this yesterday. > BTW. So you decided to implement insert/remove functionality after all. > I have some questions: > > - It is implemented as internal gsched hack, which is a pity, because > this might be very useful functionality for other classes in the future. > Is there a plan to make it more general and move it to the GEOM itself? yes there is such a plan -- of course if nobody has objections. In principle it is only a library extensions with no modifications to geom internals. However, when we developed that last year, we hit some corner case where removal of an active node causes either a race or (if you try to protect from the race) a livelock. Fixing this may require some small cleanup to geom internals (we discusses the issue with phk at last EuroBSDCon. Fabio may give you more details, as far as i remember the problem was that some geom code takes shortcuts instead of following a chain of pointers, and this can end up in the wrong place in case of a removal.) For this reason, at this time i am not recommending to remove a node from a chain with outstanding transactions until the issue is solved. > - Why g_sched_flush_pending() operates on global structure? I think it > will break if you try to insert and remove at the same time. i need to check this. cheers luigi ___ 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: r206560 - head/sys/fs/devfs
On Tue, Apr 13, 2010 at 06:53:39PM +, Jaakko Heinonen wrote: > Author: jh > Date: Tue Apr 13 18:53:39 2010 > New Revision: 206560 > URL: http://svn.freebsd.org/changeset/base/206560 > > Log: > - Ignore and report duplicate and empty device names in > devfs_populate_loop() > instead of causing erratic behavior. Currently make_dev(9) can't fail, so > there is no way to report an error to make_dev(9) callers. > - Disallow using "." and ".." in device path names. It didn't work > previously > but now it is reported rather than panicing. > - Treat multiple sequential slashes as single in device path names. > > Discussed with: pjd I think that this could be done more clean. Main motivation of not changing make_dev(9) seems to be desire to avoid handling impossible errors for creation of simple-named devices, where device name is fully controlled by driver. On the other hand, make_dev(9) is sometimes used to create devfs node with externally-supplied name, that does not obey devfs naming rules, or cause some other irregularity. The make_dev_credf() signature can be changed to return int error code instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, that specifies that make_dev_credf() is allowed to fail with error EINVAL if supplied name is not sane. If flag is not supplied, make_dev_credf() should KASSERT or even just panic(9) if name does not pass internal validation. Small comment about the patch itself: Collapsion of the consequent '/' may be done in make_dev_credv() immediately after vsnprintf(). pgpKTYRYYAHf7.pgp Description: PGP signature
Re: svn commit: r206560 - head/sys/fs/devfs
Thank you for your comments. On 2010-04-14, Kostik Belousov wrote: > The make_dev_credf() signature can be changed to return int error code > instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, make_dev_credf() returns struct cdev *, not void. > that specifies that make_dev_credf() is allowed to fail with error > EINVAL if supplied name is not sane. If flag is not supplied, > make_dev_credf() should KASSERT or even just panic(9) if name > does not pass internal validation. Otherwise sounds reasonable suggestion. However changes are needed in devfs. Currently devfs_populate_loop() is not along the make_dev*() code path but make_dev(9) increases a generation counter and devfs_populate_loop() gets called sometimes later. To make things more complex there may be several devfs mounts with different symlinks (files). Actually my change doesn't work correctly in all cases with multiple devfs mounts and has another bug with cdp use counts. I am considering reverting the change. -- Jaakko ___ 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: r206560 - head/sys/fs/devfs
On Wed, Apr 14, 2010 at 03:49:13PM +0300, Jaakko Heinonen wrote: > > Thank you for your comments. > > On 2010-04-14, Kostik Belousov wrote: > > The make_dev_credf() signature can be changed to return int error code > > instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added, > > make_dev_credf() returns struct cdev *, not void. Oops, forgot about this. We will need to change its signature more radically, but I still think that this worth it. > > > that specifies that make_dev_credf() is allowed to fail with error > > EINVAL if supplied name is not sane. If flag is not supplied, > > make_dev_credf() should KASSERT or even just panic(9) if name > > does not pass internal validation. > > Otherwise sounds reasonable suggestion. However changes are needed in > devfs. Currently devfs_populate_loop() is not along the make_dev*() > code path but make_dev(9) increases a generation counter and > devfs_populate_loop() gets called sometimes later. To make things more > complex there may be several devfs mounts with different symlinks (files). Right, my point of my suggestion was to not modify populate_loop() at all. > > Actually my change doesn't work correctly in all cases with multiple > devfs mounts and has another bug with cdp use counts. I am considering > reverting the change. > > -- > Jaakko pgpShmtQA6Mow.pgp Description: PGP signature
svn commit: r206597 - head/sys/compat/linprocfs
Author: emaste Date: Wed Apr 14 13:44:22 2010 New Revision: 206597 URL: http://svn.freebsd.org/changeset/base/206597 Log: Linux puts a blank line between each CPU. Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Wed Apr 14 07:29:25 2010 (r206596) +++ head/sys/compat/linprocfs/linprocfs.c Wed Apr 14 13:44:22 2010 (r206597) @@ -274,7 +274,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) "cpu family\t: %d\n" "model\t\t: %d\n" "model name\t: %s\n" - "stepping\t: %d\n", + "stepping\t: %d\n\n", i, cpu_vendor, class, cpu, model, cpu_id & 0xf); /* XXX per-cpu vendor / class / model / 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: r206560 - head/sys/fs/devfs
On 2010-04-14, Kostik Belousov wrote: > > Otherwise sounds reasonable suggestion. However changes are needed in > > devfs. Currently devfs_populate_loop() is not along the make_dev*() > > code path but make_dev(9) increases a generation counter and > > devfs_populate_loop() gets called sometimes later. To make things more > > complex there may be several devfs mounts with different symlinks (files). > Right, my point of my suggestion was to not modify populate_loop() at all. How you would detect an attempt to create a duplicate file then? Please note that there may be directories and user created symbolic links. The file set may be different on different devfs mounts. -- Jaakko ___ 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: r206598 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: jhb Date: Wed Apr 14 15:00:46 2010 New Revision: 206598 URL: http://svn.freebsd.org/changeset/base/206598 Log: MFC 205851: Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/8/sys/amd64/amd64/apic_vector.S stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/i386/i386/apic_vector.s stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/apic_vector.S == --- stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + calllapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/8/sys/amd64/amd64/local_apic.c == --- stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 13:44:22 2010 (r206597) +++ stable/8/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) @@ -115,14 +115,12 @@ struct lapic { int la_ioint_irqs[APIC_NUM_IOINTS + 1]; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT },/* Thermal */ }; @@ -225,7 +223,10 @@ lapic_init(vm_paddr_t addr) /* Local APIC timer interrupt. */ setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -278,7 +279,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -326,7 +327,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ intr_restore(eflags); } @@ -725,18 +730,6 @@ lapic_eoi(void) lapic->eoi = 0; } -/* - * Read the contents of the error status register. We have to write - * to the register first before reading from it. - */ -u_int -lapic_error(void) -{ - - lapic->esr = 0; - return (lapic->esr); -} - void lapic_handle_intr(int vector, struct trapframe *frame) { @@ -863,6 +856,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* +* Read the contents of the error status register. Write to +* the register first before reading from it to force the APIC +* to update its value to indicate any errors that have +* occurred since the previous write to the register. +*/ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + u_int apic_cpuid(u_int apic_id) { Modified: stable/8/sys/amd64/include/apicvar.h == --- stable/8/sys/amd64/include/apic
svn commit: r206599 - in stable/7/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: jhb Date: Wed Apr 14 15:01:49 2010 New Revision: 206599 URL: http://svn.freebsd.org/changeset/base/206599 Log: MFC 185933,205851: - Add constants for fields in the local APIC error status register. - Add a handler for the local APIC error interrupt. For now it just prints out the current value of the local APIC error register when the interrupt fires. Modified: stable/7/sys/amd64/amd64/apic_vector.S stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/amd64/include/apicreg.h stable/7/sys/amd64/include/apicvar.h stable/7/sys/i386/i386/apic_vector.s stable/7/sys/i386/i386/local_apic.c stable/7/sys/i386/include/apicreg.h stable/7/sys/i386/include/apicvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/apic_vector.S == --- stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/apic_vector.S Wed Apr 14 15:01:49 2010 (r206599) @@ -104,6 +104,18 @@ IDTVEC(timerint) MEXITCOUNT jmp doreti +/* + * Local APIC error interrupt handler. + */ + .text + SUPERALIGN_TEXT +IDTVEC(errorint) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + calllapic_handle_error + MEXITCOUNT + jmp doreti + #ifdef SMP /* * Global address space TLB shootdown. Modified: stable/7/sys/amd64/amd64/local_apic.c == --- stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:00:46 2010 (r206598) +++ stable/7/sys/amd64/amd64/local_apic.c Wed Apr 14 15:01:49 2010 (r206599) @@ -111,14 +111,12 @@ struct lapic { u_long la_prof_ticks; } static lapics[MAX_APIC_ID + 1]; -/* XXX: should thermal be an NMI? */ - /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ - { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ + { 1, 1, 0, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT },/* Thermal */ }; @@ -224,7 +222,10 @@ lapic_init(vm_paddr_t addr) setidt(APIC_TIMER_INT, IDTVEC(timerint), SDT_SYSIGT, SEL_KPL, 0); ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] = IRQ_TIMER; - /* XXX: error/thermal interrupts */ + /* Local APIC error interrupt. */ + setidt(APIC_ERROR_INT, IDTVEC(errorint), SDT_SYSIGT, SEL_KPL, 0); + + /* XXX: Thermal interrupt */ } /* @@ -272,7 +273,7 @@ lapic_dump(const char* str) lapic->id, lapic->version, lapic->ldr, lapic->dfr); printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n", lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr); - printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pcm: 0x%08x\n", + printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n", lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error, lapic->lvt_pcint); } @@ -299,6 +300,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); @@ -319,7 +321,11 @@ lapic_setup(int boot) lapic_timer_enable_intr(); } - /* XXX: Error and thermal LVTs */ + /* Program error LVT and clear any existing errors. */ + lapic->lvt_error = lvt_mode(la, LVT_ERROR, lapic->lvt_error); + lapic->esr = 0; + + /* XXX: Thermal LVT */ if (cpu_vendor_id == CPU_VENDOR_AMD) { /* @@ -846,6 +852,24 @@ lapic_timer_enable_intr(void) lapic->lvt_timer = value; } +void +lapic_handle_error(void) +{ + u_int32_t esr; + + /* +* Read the contents of the error status register. Write to +* the register first before reading from it to force the APIC +* to update its value to indicate any errors that have +* occurred since the previous write to the register. +*/ + lapic->esr = 0; + esr = lapic->esr; + + printf("CPU%d: local APIC error 0x%x\n", PCPU_GET(cpuid), esr); + lapic_eoi(); +} + /* Request a free IDT vector to be used by the specified IRQ. */
svn commit: r206600 - stable/8/etc
Author: ume Date: Wed Apr 14 15:03:58 2010 New Revision: 206600 URL: http://svn.freebsd.org/changeset/base/206600 Log: MFC r206399, r206479: Disambiguate `IPs' to a more specific term. Modified: stable/8/etc/rc.firewall Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.firewall == --- stable/8/etc/rc.firewallWed Apr 14 15:01:49 2010(r206599) +++ stable/8/etc/rc.firewallWed Apr 14 15:03:58 2010(r206600) @@ -424,13 +424,15 @@ case ${firewall_type} in # Configuration: # firewall_myservices: List of TCP ports on which this host #offers services. - # firewall_allowservices: List of IPs which has access to + # firewall_allowservices: List of IPv4 and/or IPv6 addresses + #that have access to #$firewall_myservices. - # firewall_trusted:List of IPs which has full access - #to this host. Be very carefull - #when setting this. This option can - #seriously degrade the level of - #protection provided by the firewall. + # firewall_trusted:List of IPv4 and/or IPv6 addresses + #that have full access to this host. + #Be very careful when setting this. + #This option can seriously degrade + #the level of protection provided by + #the firewall. # firewall_logdeny:Boolean (YES/NO) specifying if the #default denied packets should be #logged (in /var/log/security). ___ 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: r206601 - stable/7/lib/libc/sys
Author: jhb Date: Wed Apr 14 15:20:30 2010 New Revision: 206601 URL: http://svn.freebsd.org/changeset/base/206601 Log: MFC 184226: Add a statement about the non-portability of non-page-aligned offsets. Modified: stable/7/lib/libc/sys/mmap.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/mmap.2 == --- stable/7/lib/libc/sys/mmap.2Wed Apr 14 15:03:58 2010 (r206600) +++ stable/7/lib/libc/sys/mmap.2Wed Apr 14 15:20:30 2010 (r206601) @@ -28,7 +28,7 @@ .\"@(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd April 21, 2006 +.Dd October 24, 2008 .Dt MMAP 2 .Os .Sh NAME @@ -252,6 +252,11 @@ In the future we may define an additiona in which the file descriptor argument specifies a file or device to which swapping should be done. +.Sh NOTES +Although this implementation does not impose any alignment restrictions on +the +.Fa offset +argument, a portable program must only use page-aligned values. .Sh RETURN VALUES Upon successful completion, .Fn mmap @@ -307,13 +312,6 @@ was negative. was specified and the .Fa fd argument was not -1. -The -.Fa offset -argument -was not page-aligned. -(See -.Sx BUGS -below.) .It Bq Er ENODEV .Dv MAP_ANON has not been specified and ___ 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: r206602 - in stable/8: lib/libc/sys sys/vm
Author: jhb Date: Wed Apr 14 15:22:58 2010 New Revision: 206602 URL: http://svn.freebsd.org/changeset/base/206602 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/8/lib/libc/sys/mmap.2 stable/8/sys/vm/vm_mmap.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/lib/libc/sys/mmap.2 == --- stable/8/lib/libc/sys/mmap.2Wed Apr 14 15:20:30 2010 (r206601) +++ stable/8/lib/libc/sys/mmap.2Wed Apr 14 15:22:58 2010 (r206602) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was equal to zero. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/8/sys/vm/vm_mmap.c == --- stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:20:30 2010(r206601) +++ stable/8/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010(r206602) @@ -232,7 +232,7 @@ mmap(td, uap) /* make sure mapping fits into numeric range etc */ if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && curproc->p_osrel >= 800104) || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation and ___ 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: r206603 - in stable/7: lib/libc/sys sys/vm
Author: jhb Date: Wed Apr 14 15:23:16 2010 New Revision: 206603 URL: http://svn.freebsd.org/changeset/base/206603 Log: MFC 205536: Reject attempts to create a MAP_ANON mapping with a non-zero offset. Modified: stable/7/lib/libc/sys/mmap.2 stable/7/sys/vm/vm_mmap.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/lib/libc/sys/mmap.2 == --- stable/7/lib/libc/sys/mmap.2Wed Apr 14 15:22:58 2010 (r206602) +++ stable/7/lib/libc/sys/mmap.2Wed Apr 14 15:23:16 2010 (r206603) @@ -105,7 +105,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -argument is ignored. +argument must be 0. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -312,6 +312,11 @@ was negative. was specified and the .Fa fd argument was not -1. +.It Bq Er EINVAL +.Dv MAP_ANON +was specified and the +.Fa offset +argument was not 0. .It Bq Er ENODEV .Dv MAP_ANON has not been specified and Modified: stable/7/sys/vm/vm_mmap.c == --- stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:22:58 2010(r206602) +++ stable/7/sys/vm/vm_mmap.c Wed Apr 14 15:23:16 2010(r206603) @@ -232,7 +232,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ if ((ssize_t) uap->len < 0 || - ((flags & MAP_ANON) && uap->fd != -1)) + ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) return (EINVAL); if (flags & MAP_STACK) { @@ -298,7 +298,6 @@ mmap(td, uap) handle = NULL; handle_type = OBJT_DEFAULT; maxprot = VM_PROT_ALL; - pos = 0; } else { /* * Mapping file, get fp for validation. Obtain vnode and make ___ 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: r206604 - head/sys/dev/ata/chipsets
Author: mav Date: Wed Apr 14 15:29:32 2010 New Revision: 206604 URL: http://svn.freebsd.org/changeset/base/206604 Log: For early ALI chips do not announce I/O sizes that require unsupported 48bit DMA commands. Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c == --- head/sys/dev/ata/chipsets/ata-acerlabs.cWed Apr 14 15:23:16 2010 (r206603) +++ head/sys/dev/ata/chipsets/ata-acerlabs.cWed Apr 14 15:29:32 2010 (r206604) @@ -184,8 +184,11 @@ ata_ali_ch_attach(device_t dev) if (ctlr->chip->cfg2 & ALI_NEW && ctlr->chip->chiprev < 0xc7) ch->flags |= ATA_CHECKS_CABLE; /* older chips can't do 48bit DMA transfers */ -if (ctlr->chip->chiprev <= 0xc4) +if (ctlr->chip->chiprev <= 0xc4) { ch->flags |= ATA_NO_48BIT_DMA; + if (ch->dma.max_iosize > 256 * 512) + ch->dma.max_iosize = 256 * 512; +} 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: r206605 - stable/8/sys/kern
Author: jhb Date: Wed Apr 14 15:33:15 2010 New Revision: 206605 URL: http://svn.freebsd.org/changeset/base/206605 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/8/sys/kern/kern_event.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/kern_event.c == --- stable/8/sys/kern/kern_event.c Wed Apr 14 15:29:32 2010 (r206604) +++ stable/8/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) @@ -1203,7 +1203,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1211,6 +1211,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1222,13 +1223,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - free(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - free(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1250,11 +1251,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); 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: r206606 - stable/7/sys/kern
Author: jhb Date: Wed Apr 14 15:33:30 2010 New Revision: 206606 URL: http://svn.freebsd.org/changeset/base/206606 Log: MFC 205886: Defer freeing a kevent list until after dropping kqueue locks. Modified: stable/7/sys/kern/kern_event.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_event.c == --- stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:15 2010 (r206605) +++ stable/7/sys/kern/kern_event.c Wed Apr 14 15:33:30 2010 (r206606) @@ -1110,7 +1110,7 @@ static int kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident, int waitok) { - struct klist *list, *tmp_knhash; + struct klist *list, *tmp_knhash, *to_free; u_long tmp_knhashmask; int size; int fd; @@ -1118,6 +1118,7 @@ kqueue_expand(struct kqueue *kq, struct KQ_NOTOWNED(kq); + to_free = NULL; if (fops->f_isfd) { fd = ident; if (kq->kq_knlistsize <= fd) { @@ -1130,13 +1131,13 @@ kqueue_expand(struct kqueue *kq, struct return ENOMEM; KQ_LOCK(kq); if (kq->kq_knlistsize > fd) { - FREE(list, M_KQUEUE); + to_free = list; list = NULL; } else { if (kq->kq_knlist != NULL) { bcopy(kq->kq_knlist, list, kq->kq_knlistsize * sizeof list); - FREE(kq->kq_knlist, M_KQUEUE); + to_free = kq->kq_knlist; kq->kq_knlist = NULL; } bzero((caddr_t)list + @@ -1158,11 +1159,12 @@ kqueue_expand(struct kqueue *kq, struct kq->kq_knhash = tmp_knhash; kq->kq_knhashmask = tmp_knhashmask; } else { - free(tmp_knhash, M_KQUEUE); + to_free = tmp_knhash; } KQ_UNLOCK(kq); } } + free(to_free, M_KQUEUE); KQ_NOTOWNED(kq); 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"
Re: svn commit: r206560 - head/sys/fs/devfs
On Wed, Apr 14, 2010 at 05:20:00PM +0300, Jaakko Heinonen wrote: > On 2010-04-14, Kostik Belousov wrote: > > > Otherwise sounds reasonable suggestion. However changes are needed in > > > devfs. Currently devfs_populate_loop() is not along the make_dev*() > > > code path but make_dev(9) increases a generation counter and > > > devfs_populate_loop() gets called sometimes later. To make things more > > > complex there may be several devfs mounts with different symlinks (files). > > Right, my point of my suggestion was to not modify populate_loop() at all. > > How you would detect an attempt to create a duplicate file then? Please > note that there may be directories and user created symbolic links. The > file set may be different on different devfs mounts. First, I think we shall sort dirent->dd_dlist so that symlinks are located before any other entries, and allow for duplication of any name with the name of symlink. I remember there was a PR to change devfs_symlink() so that symlink is added to dd_dlist into head, not to a tail, as it is done now. The change itself is not enough, but together with other parts of this it might be ok. Assume that all full devfs pathes except symlinks are stored somewhere with type information for the component at the end. Then, just iterating this set at make_dev() time, we can verify that name is not a duplicate, and that the path components are not already used as device name (only as directories). The pathes storage need to be protected by dev_mtx. Possibly, the cdev_priv.c_dev.__si_namebuf may be reused at the cost of long check at the make_dev() time. The symlink creation shall also put the path of its containing directory into the store. What do you think of this ? pgpMlmA3lqrMd.pgp Description: PGP signature
svn commit: r206607 - stable/8/sys/vm
Author: alc Date: Wed Apr 14 16:31:59 2010 New Revision: 206607 URL: http://svn.freebsd.org/changeset/base/206607 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/8/sys/vm/vm_contig.c stable/8/sys/vm/vm_extern.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_contig.c == --- stable/8/sys/vm/vm_contig.c Wed Apr 14 15:33:30 2010(r206606) +++ stable/8/sys/vm/vm_contig.c Wed Apr 14 16:31:59 2010(r206607) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, +vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_
svn commit: r206608 - stable/8/sys/dev/bktr
Author: gibbs Date: Wed Apr 14 16:37:34 2010 New Revision: 206608 URL: http://svn.freebsd.org/changeset/base/206608 Log: MFC revision 205781: Use standard types in preference to BSD types so that these header files can be used in applications compiled with only POSIX types visible. Modified: stable/8/sys/dev/bktr/ioctl_bt848.h stable/8/sys/dev/bktr/ioctl_meteor.h Modified: stable/8/sys/dev/bktr/ioctl_bt848.h == --- stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_bt848.h Wed Apr 14 16:37:34 2010 (r206608) @@ -89,9 +89,9 @@ * EEProm stuff */ struct eeProm { - short offset; - short count; - u_char bytes[ 256 ]; + short offset; + short count; + unsigned char bytes[ 256 ]; }; @@ -147,7 +147,7 @@ struct eeProm { * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ -#define BT848_I2CWR _IOWR('x', 57, u_long)/* i2c read-write */ +#define BT848_I2CWR _IOWR('x', 57, unsigned long)/* i2c read-write */ struct bktr_msp_control { unsigned char function; @@ -192,10 +192,10 @@ typedef enum { METEOR_PIXTYPE_RGB, METEO struct meteor_pixfmt { - u_int index; /* Index in supported pixfmt list */ + unsigned int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ - u_int Bpp; /* Bytes per pixel*/ - u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ + unsigned int Bpp; /* Bytes per pixel*/ + unsigned long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs*/ }; Modified: stable/8/sys/dev/bktr/ioctl_meteor.h == --- stable/8/sys/dev/bktr/ioctl_meteor.hWed Apr 14 16:31:59 2010 (r206607) +++ stable/8/sys/dev/bktr/ioctl_meteor.hWed Apr 14 16:37:34 2010 (r206608) @@ -50,27 +50,27 @@ struct meteor_capframe { /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { - u_short rows; - u_short columns; - u_short frames; - u_long oformat; + unsigned short rows; + unsigned short columns; + unsigned short frames; + unsigned long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { - u_long fifo_errors; /* count of fifo errors since open */ - u_long dma_errors; /* count of dma errors since open */ - u_long frames_captured; /* count of frames captured since open */ - u_long even_fields_captured; /* count of even fields captured */ - u_long odd_fields_captured; /* count of odd fields captured */ + unsigned long fifo_errors; /* count of fifo errors since open */ + unsigned long dma_errors; /* count of dma errors since open */ + unsigned long frames_captured; /* count of frames captured since open */ + unsigned long even_fields_captured; /* count of even fields captured */ + unsigned long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { - u_long addr; /* Address of location to dma to */ - u_long width; /* Width of memory area */ - u_long banksize; /* Size of Vram bank */ - u_long ramsize;/* Size of Vram */ + unsigned long addr; /* Address of location to dma to */ + unsigned long width; /* Width of memory area */ + unsigned long banksize; /* Size of Vram bank */ + unsigned long ramsize;/* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ ___ 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: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
> From: Luigi Rizzo > Date: Wed, Apr 14, 2010 10:16:30AM +0200 > > [Cc-ing Fabio as he may have more details] > ... > > BTW. So you decided to implement insert/remove functionality after all. > > I have some questions: > > > > - It is implemented as internal gsched hack, which is a pity, because > > this might be very useful functionality for other classes in the future. > > Is there a plan to make it more general and move it to the GEOM itself? > > yes there is such a plan -- of course if nobody has objections. > In principle it is only a library extensions with no modifications > to geom internals. > > However, when we developed that last year, we hit some corner case > where removal of an active node causes either a race or (if you try > to protect from the race) a livelock. Fixing this may require some > small cleanup to geom internals (we discusses the issue with phk > at last EuroBSDCon. Fabio may give you more details, as far as i > remember the problem was that some geom code takes shortcuts instead > of following a chain of pointers, and this can end up in the wrong > place in case of a removal.) > > For this reason, at this time i am not recommending to remove a > node from a chain with outstanding transactions until the issue is solved. > I'm not sure I remember all the details, the major issues were: - g_disk_done() dereferences bio->parent->bio_to->geom->softc, thus changing bio_to->geom on the fly was not possible with pending request (they would find a wrong softc when bubbling up). For this reason we added a loop in g_insert_proxy() to wait for all the pending requests to be completed prior to inserting the proxy; but: - g_slice_finish_hot() completes requests in the event handling path, thus said loop (executed from an event handler) could result in a deadlock. To avoid this (it should be far from being frequent, considering the usages of hotspots in the slice code) g_insert_proxy() fails if it takes too long to complete the old requests. - Some classes (from a quick look I've seen only g_mirror, but I'm pretty sure there were some other ones) cache pointers to their providers. With these classes this implementation does not work. For the scheduler this is not a big issue, because its natural position is as close as possible to the disk device, but makes the mechanism quite hard to use in a more generic context. > > - Why g_sched_flush_pending() operates on global structure? I think it > > will break if you try to insert and remove at the same time. > If I'm not wrong, this should be safe because the global list is used only under critical sections protected by the topology lock. ___ 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: r206609 - stable/7/sys/vm
Author: alc Date: Wed Apr 14 16:54:49 2010 New Revision: 206609 URL: http://svn.freebsd.org/changeset/base/206609 Log: MFC r206409 Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. Correct an error in the prototype for kmem_malloc(). Modified: stable/7/sys/vm/vm_contig.c stable/7/sys/vm/vm_extern.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/vm/vm_contig.c == --- stable/7/sys/vm/vm_contig.c Wed Apr 14 16:37:34 2010(r206608) +++ stable/7/sys/vm/vm_contig.c Wed Apr 14 16:54:49 2010(r206609) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, +vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int t
svn commit: r206610 - stable/8/sys/amd64/amd64
Author: gibbs Date: Wed Apr 14 17:01:29 2010 New Revision: 206610 URL: http://svn.freebsd.org/changeset/base/206610 Log: MFC 204214: Enforce stronger bus-dma alignment semantics so bus-dma operates correctly with Xen's blkfront driver. Modified: stable/8/sys/amd64/amd64/busdma_machdep.c Modified: stable/8/sys/amd64/amd64/busdma_machdep.c == --- stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 16:54:49 2010 (r206609) +++ stable/8/sys/amd64/amd64/busdma_machdep.c Wed Apr 14 17:01:29 2010 (r206610) @@ -239,8 +239,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->alignment = alignment; newtag->boundary = boundary; newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + - (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; newtag->maxsize = maxsize; @@ -605,13 +604,18 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { + bus_size_t sg_len; + + sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK); if (pmap) paddr = pmap_extract(pmap, vaddr); else paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr) != 0) + if (run_filter(dmat, paddr) != 0) { + sg_len = roundup2(sg_len, dmat->alignment); map->pagesneeded++; - vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); + } + vaddr += sg_len; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } @@ -644,6 +648,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm bmask = ~(dmat->boundary - 1); for (seg = *segp; buflen > 0 ; ) { + bus_size_t max_sgsize; + /* * Get the physical address for this segment. */ @@ -655,11 +661,15 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); - if (sgsize > dmat->maxsegsz) - sgsize = dmat->maxsegsz; - if (buflen < sgsize) - sgsize = buflen; + max_sgsize = MIN(buflen, dmat->maxsegsz); + sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) { + sgsize = roundup2(sgsize, dmat->alignment); + sgsize = MIN(sgsize, max_sgsize); + curaddr = add_bounce_page(dmat, map, vaddr, sgsize); + } else { + sgsize = MIN(sgsize, max_sgsize); + } /* * Make sure we don't cross any boundaries. @@ -670,9 +680,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) - curaddr = add_bounce_page(dmat, map, vaddr, sgsize); - /* * Insert chunk into a segment, coalescing with * previous segment if possible. ___ 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: r206604 - head/sys/dev/ata/chipsets
On Wed, Apr 14, 2010 at 03:29:32PM +, Alexander Motin wrote: > Author: mav > Date: Wed Apr 14 15:29:32 2010 > New Revision: 206604 > URL: http://svn.freebsd.org/changeset/base/206604 > > Log: > For early ALI chips do not announce I/O sizes that require unsupported > 48bit DMA commands. Wouldn't it make more sense to limit the I/O size based ATA_NO_48BIT_DMA in a central place rather than letting each chipset driver deal with it? Marius ___ 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: r206611 - stable/8/lib/libstand
Author: jhb Date: Wed Apr 14 17:17:06 2010 New Revision: 206611 URL: http://svn.freebsd.org/changeset/base/206611 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/8/lib/libstand/assert.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/assert.c == --- stable/8/lib/libstand/assert.c Wed Apr 14 17:01:29 2010 (r206610) +++ stable/8/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } ___ 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: r206612 - stable/7/lib/libstand
Author: jhb Date: Wed Apr 14 17:17:25 2010 New Revision: 206612 URL: http://svn.freebsd.org/changeset/base/206612 Log: MFC 205900: Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Modified: stable/7/lib/libstand/assert.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/assert.c == --- stable/7/lib/libstand/assert.c Wed Apr 14 17:17:06 2010 (r206611) +++ stable/7/lib/libstand/assert.c Wed Apr 14 17:17:25 2010 (r206612) @@ -35,10 +35,10 @@ void __assert(const char *func, const char *file, int line, const char *expression) { if (func == NULL) - printf("Assertion failed: (%s), file %s, line %d.\n", + panic("Assertion failed: (%s), file %s, line %d.\n", expression, file, line); else - printf("Assertion failed: (%s), function %s, file %s, line " - "%d.\n", expression, func, file, line); - exit(); + panic( + "Assertion failed: (%s), function %s, file %s, line %d.\n", + expression, func, file, line); } ___ 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: r206604 - head/sys/dev/ata/chipsets
Marius Strobl wrote: > On Wed, Apr 14, 2010 at 03:29:32PM +, Alexander Motin wrote: >> Author: mav >> Date: Wed Apr 14 15:29:32 2010 >> New Revision: 206604 >> URL: http://svn.freebsd.org/changeset/base/206604 >> >> Log: >> For early ALI chips do not announce I/O sizes that require unsupported >> 48bit DMA commands. > > Wouldn't it make more sense to limit the I/O size based ATA_NO_48BIT_DMA > in a central place rather than letting each chipset driver deal with it? This driver is the only place where this flag is set now. And looking that 48bit is almost mandatory now, unlikely it will be ever needed again. -- Alexander Motin ___ 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: r206614 - head/sys/dev/e1000
Author: jfv Date: Wed Apr 14 18:29:01 2010 New Revision: 206614 URL: http://svn.freebsd.org/changeset/base/206614 Log: Remove multiqueue stack related stuff form lem, it is unneeded for legacy hardware. Also remove some TSO related cruft. Add some watchdog_time setting that was missing, thanks to Mikolaj Golub for pointing that out. Modified: head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_lem.c == --- head/sys/dev/e1000/if_lem.c Wed Apr 14 17:52:00 2010(r206613) +++ head/sys/dev/e1000/if_lem.c Wed Apr 14 18:29:01 2010(r206614) @@ -39,9 +39,6 @@ #include #include -#if __FreeBSD_version >= 80 -#include -#endif #include #include #include @@ -94,7 +91,7 @@ int lem_display_debug_stats = 0; /* * Legacy Em Driver version: */ -char lem_driver_version[] = "1.0.0"; +char lem_driver_version[] = "1.0.1"; /* @@ -177,11 +174,6 @@ static int lem_suspend(device_t); static int lem_resume(device_t); static voidlem_start(struct ifnet *); static voidlem_start_locked(struct ifnet *ifp); -#if __FreeBSD_version >= 80 -static int lem_mq_start(struct ifnet *, struct mbuf *); -static int lem_mq_start_locked(struct ifnet *, struct mbuf *); -static voidlem_qflush(struct ifnet *); -#endif static int lem_ioctl(struct ifnet *, u_long, caddr_t); static voidlem_init(void *); static voidlem_init_locked(struct adapter *); @@ -304,12 +296,6 @@ MODULE_DEPEND(lem, ether, 1, 1, 1); #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define M_TSO_LEN 66 - -/* Allow common code without TSO */ -#ifndef CSUM_TSO -#define CSUM_TSO 0 -#endif static int lem_tx_int_delay_dflt = EM_TICKS_TO_USECS(EM_TIDV); static int lem_rx_int_delay_dflt = EM_TICKS_TO_USECS(EM_RDTR); @@ -827,118 +813,6 @@ lem_resume(device_t dev) } -/* - * Transmit entry point - * - * em_start is called by the stack to initiate a transmit. - * The driver will remain in this routine as long as there are - * packets to transmit and transmit resources are available. - * In case resources are not available stack is notified and - * the packet is requeued. - **/ - -#if __FreeBSD_version >= 80 -static int -lem_mq_start_locked(struct ifnet *ifp, struct mbuf *m) -{ - struct adapter *adapter = ifp->if_softc; - struct mbuf *next; - int error = E1000_SUCCESS; - - EM_TX_LOCK_ASSERT(adapter); - /* To allow being called from a tasklet */ - if (m == NULL) - goto process; - - if (((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - || (!adapter->link_active)) { - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else if (drbr_empty(ifp, adapter->br) && - (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { - if ((error = lem_xmit(adapter, &m)) != 0) { - if (m) - error = drbr_enqueue(ifp, adapter->br, m); - return (error); - } else { - /* -* We've bypassed the buf ring so we need to update -* ifp directly -*/ - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); - /* - ** Send a copy of the frame to the BPF - ** listener and set the watchdog on. - */ - ETHER_BPF_MTAP(ifp, m); - adapter->watchdog_check = TRUE; - } - } else if ((error = drbr_enqueue(ifp, adapter->br, m)) != 0) - return (error); - -process: - if (drbr_empty(ifp, adapter->br)) - return(error); -/* Process the queue */ -while (TRUE) { -if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) -break; -next = drbr_dequeue(ifp, adapter->br); -if (next == NULL) -break; -if ((error = lem_xmit(adapter, &next)) != 0) { - if (next != NULL) - error = drbr_enqueue(ifp, adapter->br, next); -break; - } - drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); -ETHER_BPF_MTAP(ifp, n
svn commit: r206615 - in head/lib/libc: gen locale
Author: uqs Date: Wed Apr 14 18:29:26 2010 New Revision: 206615 URL: http://svn.freebsd.org/changeset/base/206615 Log: mdoc: remove .Pp where not needed This trips up mdocml and can simply go away. Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/lib/libc/gen/confstr.3 head/lib/libc/gen/sysconf.3 head/lib/libc/gen/sysctl.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 Modified: head/lib/libc/gen/confstr.3 == --- head/lib/libc/gen/confstr.3 Wed Apr 14 18:29:01 2010(r206614) +++ head/lib/libc/gen/confstr.3 Wed Apr 14 18:29:26 2010(r206615) @@ -79,7 +79,6 @@ The copied value is always null terminat The available values are as follows: .Pp .Bl -tag -width 6n -.Pp .It Li _CS_PATH Return a value for the .Ev PATH Modified: head/lib/libc/gen/sysconf.3 == --- head/lib/libc/gen/sysconf.3 Wed Apr 14 18:29:01 2010(r206614) +++ head/lib/libc/gen/sysconf.3 Wed Apr 14 18:29:26 2010(r206615) @@ -60,9 +60,7 @@ Shell programmers who need access to the utility. .Pp The available values are as follows: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_ARG_MAX The maximum bytes of argument to .Xr execve 2 . @@ -165,9 +163,7 @@ otherwise \-1. .El .Pp These values also exist, but may not be standard: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_PHYS_PAGES The number of pages of physical memory. Note that it is possible that the product of this value and the value of Modified: head/lib/libc/gen/sysctl.3 == --- head/lib/libc/gen/sysctl.3 Wed Apr 14 18:29:01 2010(r206614) +++ head/lib/libc/gen/sysctl.3 Wed Apr 14 18:29:26 2010(r206615) @@ -286,7 +286,6 @@ privilege may change the value. .It "HW_MACHINE_ARCH string no" .It "HW_REALMEMinteger no" .El -.Pp .Bl -tag -width 6n .It Li HW_MACHINE The machine class. @@ -352,7 +351,6 @@ information. .It "KERN_VERSION string no" .It "KERN_VNODEstruct vnodeno" .El -.Pp .Bl -tag -width 6n .It Li KERN_ARGMAX The maximum bytes of argument to @@ -543,7 +541,6 @@ privilege may change the value. .It "PF_INET IPv4 values yes" .It "PF_INET6 IPv6 values yes" .El -.Pp .Bl -tag -width 6n .It Li PF_ROUTE Return the entire routing table or a subset of it. @@ -650,7 +647,6 @@ privilege may change the value. .It "USER_TZNAME_MAX integer no" .El .Bl -tag -width 6n -.Pp .It Li USER_BC_BASE_MAX The maximum ibase/obase values in the .Xr bc 1 @@ -740,7 +736,6 @@ privilege may change the value. .It "VM_V_INACTIVE_TARGET integer yes" .It "VM_V_PAGEOUT_FREE_MIN integer yes" .El -.Pp .Bl -tag -width 6n .It Li VM_LOADAVG Return the load average history. Modified: head/lib/libc/locale/isalnum.3 == --- head/lib/libc/locale/isalnum.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/locale/isalnum.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" .It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" Modified: head/lib/libc/locale/isalpha.3 == --- head/lib/libc/locale/isalpha.3 Wed Apr 14 18:29:01 2010 (r206614) +++ head/lib/libc/locale/isalpha.3 Wed Apr 14 18:29:26 2010 (r206615) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" .It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" ___ 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: r206616 - head/lib/libc/gen
Author: uqs Date: Wed Apr 14 18:29:34 2010 New Revision: 206616 URL: http://svn.freebsd.org/changeset/base/206616 Log: mdoc: don't abuse Bo/Pc to get what looks like an interval Be explicit and use the general bracketing form plus symbols which are to be interpreted mathematically in this case. Complaint by: mdocml Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/lib/libc/gen/frexp.3 Modified: head/lib/libc/gen/frexp.3 == --- head/lib/libc/gen/frexp.3 Wed Apr 14 18:29:26 2010(r206615) +++ head/lib/libc/gen/frexp.3 Wed Apr 14 18:29:34 2010(r206616) @@ -70,7 +70,7 @@ such that is a .Vt double with magnitude in the interval -.Bo 1/2 , 1 Pc +.Eo [ 1/2 , 1 Ec ) or zero, and .Fa value equals ___ 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: r206617 - head/sys/net80211
Author: rpaulo Date: Wed Apr 14 18:29:40 2010 New Revision: 206617 URL: http://svn.freebsd.org/changeset/base/206617 Log: Make this code a little more portable by wrapping the mtx calls into macros. MFC after:1 week Modified: head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_freebsd.h == --- head/sys/net80211/ieee80211_freebsd.h Wed Apr 14 18:29:34 2010 (r206616) +++ head/sys/net80211/ieee80211_freebsd.h Wed Apr 14 18:29:40 2010 (r206617) @@ -148,6 +148,16 @@ typedef struct mtx acl_lock_t; mtx_assert((&(_as)->as_lock), MA_OWNED) /* + * Scan table definitions. + */ +typedef struct mtx ieee80211_scan_table_lock_t; +#defineIEEE80211_SCAN_TABLE_LOCK_INIT(_st, _name) \ + mtx_init(&(_st)->st_lock, _name, "802.11 scan table", MTX_DEF) +#defineIEEE80211_SCAN_TABLE_LOCK_DESTROY(_st) mtx_destroy(&(_st)->st_lock) +#defineIEEE80211_SCAN_TABLE_LOCK(_st) mtx_lock(&(_st)->st_lock) +#defineIEEE80211_SCAN_TABLE_UNLOCK(_st) mtx_unlock(&(_st)->st_lock) + +/* * Node reference counting definitions. * * ieee80211_node_initref initialize the reference count to 1 Modified: head/sys/net80211/ieee80211_scan_sta.c == --- head/sys/net80211/ieee80211_scan_sta.c Wed Apr 14 18:29:34 2010 (r206616) +++ head/sys/net80211/ieee80211_scan_sta.c Wed Apr 14 18:29:40 2010 (r206617) @@ -97,7 +97,7 @@ struct sta_entry { CTASSERT(MAX_IEEE_CHAN >= 256); struct sta_table { - struct mtx st_lock;/* on scan table */ + ieee80211_scan_table_lock_t st_lock;/* on scan table */ TAILQ_HEAD(, sta_entry) st_entry; /* all entries */ LIST_HEAD(, sta_entry) st_hash[STA_HASHSIZE]; struct mtx st_scanlock;/* on st_scaniter */ @@ -161,7 +161,7 @@ sta_attach(struct ieee80211_scan_state * M_80211_SCAN, M_NOWAIT | M_ZERO); if (st == NULL) return 0; - mtx_init(&st->st_lock, "scantable", "802.11 scan table", MTX_DEF); + IEEE80211_SCAN_TABLE_LOCK_INIT(st, "scantable"); mtx_init(&st->st_scanlock, "scangen", "802.11 scangen", MTX_DEF); TAILQ_INIT(&st->st_entry); ss->ss_priv = st; @@ -179,7 +179,7 @@ sta_detach(struct ieee80211_scan_state * if (st != NULL) { sta_flush_table(st); - mtx_destroy(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK_DESTROY(st); mtx_destroy(&st->st_scanlock); free(st, M_80211_SCAN); KASSERT(nrefs > 0, ("imbalanced attach/detach")); @@ -196,9 +196,9 @@ sta_flush(struct ieee80211_scan_state *s { struct sta_table *st = ss->ss_priv; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); sta_flush_table(st); - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); ss->ss_last = 0; return 0; } @@ -244,14 +244,14 @@ sta_add(struct ieee80211_scan_state *ss, hash = STA_HASH(macaddr); - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); LIST_FOREACH(se, &st->st_hash[hash], se_hash) if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr)) goto found; se = (struct sta_entry *) malloc(sizeof(struct sta_entry), M_80211_SCAN, M_NOWAIT | M_ZERO); if (se == NULL) { - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); return 0; } se->se_scangen = st->st_scaniter-1; @@ -370,7 +370,7 @@ found: if (rssi > st->st_maxrssi[sp->bchan]) st->st_maxrssi[sp->bchan] = rssi; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); /* * If looking for a quick choice and nothing's @@ -1132,7 +1132,7 @@ sta_update_notseen(struct sta_table *st) { struct sta_entry *se; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) { /* * If seen the reset and don't bump the count; @@ -1146,7 +1146,7 @@ sta_update_notseen(struct sta_table *st) else se->se_notseen++; } - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st); } static void @@ -1154,11 +1154,11 @@ sta_dec_fails(struct sta_table *st) { struct sta_entry *se; - mtx_lock(&st->st_lock); + IEEE80211_SCAN_TABLE_LOCK(st); TAILQ_FOREACH(se, &st->st_entry, se_list) if (se->se_fails) se->se_fails--; - mtx_unlock(&st->st_lock); + IEEE80211_SCAN_TABLE_UNLOCK(st);
svn commit: r206618 - head
Author: imp Date: Wed Apr 14 18:56:07 2010 New Revision: 206618 URL: http://svn.freebsd.org/changeset/base/206618 Log: Add note about TARGET_ARCH Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Apr 14 18:29:40 2010(r206617) +++ head/Makefile.inc1 Wed Apr 14 18:56:07 2010(r206618) @@ -15,6 +15,7 @@ # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # TARGET="machine" to crossbuild world for a different machine type +# TARGET_ARCH= may be required when a TARGET supports multiple endians # # The intended user-driven targets are: ___ 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: r206619 - head/contrib/binutils/bfd
Author: imp Date: Wed Apr 14 19:03:27 2010 New Revision: 206619 URL: http://svn.freebsd.org/changeset/base/206619 Log: Add armeb-*-freebsd* to the list of known architectures. This is like arm-*-freebsd*, except it defaults to big endian builds instead of little endian builds. Modified: head/contrib/binutils/bfd/config.bfd Modified: head/contrib/binutils/bfd/config.bfd == --- head/contrib/binutils/bfd/config.bfdWed Apr 14 18:56:07 2010 (r206618) +++ head/contrib/binutils/bfd/config.bfdWed Apr 14 19:03:27 2010 (r206619) @@ -221,6 +221,10 @@ case "${targ}" in targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; + armeb-*-freebsd*) +targ_defvec=bfd_elf32_bigarm_vec +targ_selvecs=bfd_elf32_littlearm_vec +;; arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks) targ_defvec=bfd_elf32_littlearm_vec ___ 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: r206621 - head/usr.bin/csup
Author: uqs Date: Wed Apr 14 19:06:39 2010 New Revision: 206621 URL: http://svn.freebsd.org/changeset/base/206621 Log: Add and expand $FreeBSD$ keyword to allow committing to this file. Modified: head/usr.bin/csup/cpasswd.1 (contents, props changed) Modified: head/usr.bin/csup/cpasswd.1 == --- head/usr.bin/csup/cpasswd.1 Wed Apr 14 19:04:38 2010(r206620) +++ head/usr.bin/csup/cpasswd.1 Wed Apr 14 19:06:39 2010(r206621) @@ -27,7 +27,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: cvpasswd.1,v 1.4 2003/03/04 18:24:42 jdp Exp $ -.\" $FreeBSD $ +.\" $FreeBSD$ .\" .Dd June 27, 2007 .Os FreeBSD ___ 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: r206622 - in head: bin/pwait contrib/com_err gnu/usr.bin/gdb/kgdb lib/libc/gen lib/libc/posix1e lib/libc/stdlib lib/libcam lib/libcompat/4.1 lib/libcompat/4.4 lib/libedit lib/libelf lib...
Author: uqs Date: Wed Apr 14 19:08:06 2010 New Revision: 206622 URL: http://svn.freebsd.org/changeset/base/206622 Log: mdoc: order prologue macros consistently by Dd/Dt/Os Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors) Modified: head/bin/pwait/pwait.1 head/contrib/com_err/compile_et.1 head/gnu/usr.bin/gdb/kgdb/kgdb.1 head/lib/libc/gen/check_utility_compat.3 head/lib/libc/gen/dladdr.3 head/lib/libc/gen/dlinfo.3 head/lib/libc/gen/dllockinit.3 head/lib/libc/gen/dlopen.3 head/lib/libc/gen/fmtcheck.3 head/lib/libc/gen/ftok.3 head/lib/libc/gen/getutxent.3 head/lib/libc/gen/setproctitle.3 head/lib/libc/gen/stringlist.3 head/lib/libc/posix1e/mac_prepare.3 head/lib/libc/stdlib/hcreate.3 head/lib/libc/stdlib/ptsname.3 head/lib/libcam/cam.3 head/lib/libcam/cam_cdbparse.3 head/lib/libcompat/4.1/cftime.3 head/lib/libcompat/4.4/cuserid.3 head/lib/libedit/editline.3 head/lib/libedit/editrc.5 head/lib/libelf/elf.3 head/lib/libelf/elf_begin.3 head/lib/libelf/elf_cntl.3 head/lib/libelf/elf_end.3 head/lib/libelf/elf_errmsg.3 head/lib/libelf/elf_fill.3 head/lib/libelf/elf_flagdata.3 head/lib/libelf/elf_getarhdr.3 head/lib/libelf/elf_getarsym.3 head/lib/libelf/elf_getbase.3 head/lib/libelf/elf_getdata.3 head/lib/libelf/elf_getident.3 head/lib/libelf/elf_getphnum.3 head/lib/libelf/elf_getscn.3 head/lib/libelf/elf_getshnum.3 head/lib/libelf/elf_getshstrndx.3 head/lib/libelf/elf_hash.3 head/lib/libelf/elf_kind.3 head/lib/libelf/elf_memory.3 head/lib/libelf/elf_next.3 head/lib/libelf/elf_rand.3 head/lib/libelf/elf_rawfile.3 head/lib/libelf/elf_strptr.3 head/lib/libelf/elf_update.3 head/lib/libelf/elf_version.3 head/lib/libelf/gelf.3 head/lib/libelf/gelf_checksum.3 head/lib/libelf/gelf_fsize.3 head/lib/libelf/gelf_getcap.3 head/lib/libelf/gelf_getclass.3 head/lib/libelf/gelf_getdyn.3 head/lib/libelf/gelf_getehdr.3 head/lib/libelf/gelf_getmove.3 head/lib/libelf/gelf_getphdr.3 head/lib/libelf/gelf_getrel.3 head/lib/libelf/gelf_getrela.3 head/lib/libelf/gelf_getshdr.3 head/lib/libelf/gelf_getsym.3 head/lib/libelf/gelf_getsyminfo.3 head/lib/libelf/gelf_getsymshndx.3 head/lib/libelf/gelf_newehdr.3 head/lib/libelf/gelf_newphdr.3 head/lib/libelf/gelf_update_ehdr.3 head/lib/libelf/gelf_xlatetof.3 head/lib/libgssapi/gss_accept_sec_context.3 head/lib/libgssapi/gss_acquire_cred.3 head/lib/libgssapi/gss_add_cred.3 head/lib/libgssapi/gss_add_oid_set_member.3 head/lib/libgssapi/gss_canonicalize_name.3 head/lib/libgssapi/gss_compare_name.3 head/lib/libgssapi/gss_context_time.3 head/lib/libgssapi/gss_create_empty_oid_set.3 head/lib/libgssapi/gss_delete_sec_context.3 head/lib/libgssapi/gss_display_name.3 head/lib/libgssapi/gss_display_status.3 head/lib/libgssapi/gss_duplicate_name.3 head/lib/libgssapi/gss_export_name.3 head/lib/libgssapi/gss_export_sec_context.3 head/lib/libgssapi/gss_get_mic.3 head/lib/libgssapi/gss_import_name.3 head/lib/libgssapi/gss_import_sec_context.3 head/lib/libgssapi/gss_indicate_mechs.3 head/lib/libgssapi/gss_init_sec_context.3 head/lib/libgssapi/gss_inquire_context.3 head/lib/libgssapi/gss_inquire_cred.3 head/lib/libgssapi/gss_inquire_cred_by_mech.3 head/lib/libgssapi/gss_inquire_mechs_for_name.3 head/lib/libgssapi/gss_inquire_names_for_mech.3 head/lib/libgssapi/gss_process_context_token.3 head/lib/libgssapi/gss_release_buffer.3 head/lib/libgssapi/gss_release_cred.3 head/lib/libgssapi/gss_release_name.3 head/lib/libgssapi/gss_release_oid_set.3 head/lib/libgssapi/gss_test_oid_set_member.3 head/lib/libgssapi/gss_unwrap.3 head/lib/libgssapi/gss_verify_mic.3 head/lib/libgssapi/gss_wrap.3 head/lib/libgssapi/gss_wrap_size_limit.3 head/lib/libmemstat/libmemstat.3 head/lib/libpmc/pmc.3 head/lib/libpmc/pmc.atom.3 head/lib/libpmc/pmc.core.3 head/lib/libpmc/pmc.core2.3 head/lib/libpmc/pmc.corei7.3 head/lib/libpmc/pmc.corei7uc.3 head/lib/libpmc/pmc.iaf.3 head/lib/libpmc/pmc.k7.3 head/lib/libpmc/pmc.k8.3 head/lib/libpmc/pmc.p4.3 head/lib/libpmc/pmc.p5.3 head/lib/libpmc/pmc.p6.3 head/lib/libpmc/pmc.tsc.3 head/lib/libpmc/pmc.ucf.3 head/lib/libpmc/pmc.westmere.3 head/lib/libpmc/pmc.westmereuc.3 head/lib/libpmc/pmc_allocate.3 head/lib/libpmc/pmc_attach.3 head/lib/libpmc/pmc_capabilities.3 head/lib/libpmc/pmc_configure_logfile.3 head/lib/libpmc/pmc_disable.3 head/lib/libpmc/pmc_event_names_of_class.3 head/lib/libpmc/pmc_get_driver_stats.3 head/lib/libpmc/pmc_get_msr.3 head/lib/libpmc/pmc_init.3 head/lib/libpmc/pmc_name_of_capability.3 head/lib/libpmc/pmc_read.3 head/lib/libpmc/pmc_set.3 head/lib/libpmc/pmc_start.3 head/lib/libpmc/pmclog.3 head/lib/libthr/libthr.3 head/lib/libugidfw/bsde_get_rule.3 head/lib/libugidfw/bsde_get_rule_co
svn commit: r206623 - head/sys/amd64/amd64
Author: kib Date: Wed Apr 14 20:04:55 2010 New Revision: 206623 URL: http://svn.freebsd.org/changeset/base/206623 Log: ld_gs_base is executing with stack containing only the frame, temporary pushed %rflags has been popped already. Pointy hat to:kib MFC after:3 days Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S == --- head/sys/amd64/amd64/exception.SWed Apr 14 19:08:06 2010 (r206622) +++ head/sys/amd64/amd64/exception.SWed Apr 14 20:04:55 2010 (r206623) @@ -815,7 +815,6 @@ fsbase_load_fault: ALIGN_TEXT .globl gsbase_load_fault gsbase_load_fault: - popfq movl$T_PROTFLT,TF_TRAPNO(%rsp) movq%rsp, %rdi calltrap ___ 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: r206624 - head/gnu/usr.bin/gdb/gdbserver
Author: imp Date: Wed Apr 14 20:31:06 2010 New Revision: 206624 URL: http://svn.freebsd.org/changeset/base/206624 Log: Make this directory more regular. Since it is one we control, use the freebsd-based names for filenames. This allows us to eliminate almost all of the uses of ${MACHINE_ARCH} here to do special things, and instead we use it to include filenames. This makes new architectures easier to support. Added: head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c head/gnu/usr.bin/gdb/gdbserver/reg-amd64.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c head/gnu/usr.bin/gdb/gdbserver/reg-powerpc.c - copied unchanged from r206623, head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c Deleted: head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c head/gnu/usr.bin/gdb/gdbserver/reg-ppc.c head/gnu/usr.bin/gdb/gdbserver/reg-x86-64.c Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile Modified: head/gnu/usr.bin/gdb/gdbserver/Makefile == --- head/gnu/usr.bin/gdb/gdbserver/Makefile Wed Apr 14 20:04:55 2010 (r206623) +++ head/gnu/usr.bin/gdb/gdbserver/Makefile Wed Apr 14 20:31:06 2010 (r206624) @@ -14,20 +14,9 @@ SRCS=inferiors.c mem-break.c regcache.c server.c signals.c target.c utils.c SRCS+= fbsd-low.c -.if ${MACHINE_ARCH} == "amd64" -SRCS+= fbsd-amd64-low.c i387-fp.c reg-x86-64.c -.endif - -.if ${MACHINE_ARCH} == "arm" -SRCS+= fbsd-arm-low.c reg-arm.c -.endif - -.if ${MACHINE_ARCH} == "i386" -SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c -.endif - -.if ${MACHINE_ARCH} == "powerpc" -SRCS+= fbsd-ppc-low.c reg-ppc.c +SRCS+= fbsd-${MACHINE_ARCH}-low.c reg-${MACHINE_ARCH}.c +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +SRCS+= i387-fp.c .endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} Copied: head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c (from r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/gdb/gdbserver/fbsd-powerpc-low.c Wed Apr 14 20:31:06 2010(r206624, copy of r206623, head/gnu/usr.bin/gdb/gdbserver/fbsd-ppc-low.c) @@ -0,0 +1,156 @@ +/* FreeBSD/PowerPC specific low level interface, for the remote server for + GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#include +#include + +#define ppc_num_regs 71 + +/* Currently, don't check/send MQ. */ +static int ppc_regmap[] = + { 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + 64, 68, 72, 76, 80, 84, 88, 92, + 96, 100, 104, 108, 112, 116, 120, 124, +#if 0 + /* + * XXX on FreeBSD the gdbserver for PowerPC was only tested with FPU-less + * cores i.e. e500. Let's leave the original FPR references around in case + * someone picks up and brings support for AIM-like FPU machines. + */ + PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24, + PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56, + PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88, + PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120, + PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152, + PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184, + PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216, + PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248, +#endif + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + 144, -1, 132, 128, 140, 136, -1 + }; + +static int +ppc_cannot_store_register (int regno) +{ + /* Some kernels do not allow us to store fpscr. */ + if (regno == find_regno ("fpscr")) +return 2; + + return 0; +} + +static int +ppc_cannot_fetch_register (int regno) +{ + return 0; +} + +static CORE_ADDR +ppc_get_pc (void) +{ + unsigned long pc; + +
svn commit: r206625 - in head/sys: amd64/conf boot/forth conf dev/sge i386/conf modules modules/sge
Author: yongari Date: Wed Apr 14 20:45:33 2010 New Revision: 206625 URL: http://svn.freebsd.org/changeset/base/206625 Log: Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet. This driver was written by Alexander Pohoyda and greatly enhanced by Nikolay Denev. I don't have these hardwares but this driver was tested by Nikolay Denev and xclin. Because SiS didn't release data sheet for this controller, programming information came from Linux driver and OpenSolaris. Unlike other open source driver for SiS190/191, sge(4) takes full advantage of TX/RX checksum offloading and does not require additional copy operation in RX handler. The controller seems to have advanced offloading features like VLAN hardware tag insertion/stripping, TCP segmentation offload(TSO) as well as jumbo frame support but these features are not available yet. Special thanks to xclin cs dot nctu dot edu dot tw> who sent fix for receiving VLAN oversized frames. Added: head/sys/dev/sge/ head/sys/dev/sge/if_sge.c (contents, props changed) head/sys/dev/sge/if_sgereg.h (contents, props changed) head/sys/modules/sge/ head/sys/modules/sge/Makefile (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/files head/sys/i386/conf/GENERIC head/sys/modules/Makefile Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Wed Apr 14 20:31:06 2010(r206624) +++ head/sys/amd64/conf/GENERIC Wed Apr 14 20:45:33 2010(r206625) @@ -224,6 +224,7 @@ device pcn # AMD Am79C97x PCI 10/100 ( device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) Modified: head/sys/boot/forth/loader.conf == --- head/sys/boot/forth/loader.conf Wed Apr 14 20:31:06 2010 (r206624) +++ head/sys/boot/forth/loader.conf Wed Apr 14 20:45:33 2010 (r206625) @@ -271,6 +271,7 @@ if_rl_load="NO" # RealTek 8129/8139 if_rue_load="NO" # RealTek RTL8150 USB to Fast Ethernet if_sbni_load="NO" # Granch SBNI12 leased line adapters if_sf_load="NO"# Adaptec Duralink PCI (AIC-6915 "starfire") +if_sge_load="NO" # Silicon Integrated Systems SiS190/191 if_sis_load="NO" # Silicon Integrated Systems SiS 900/7016 if_sk_load="NO"# SysKonnect SK-984x series PCI Gigabit Ethernet if_sn_load="NO"# SMC 91Cxx Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Wed Apr 14 20:31:06 2010(r206624) +++ head/sys/conf/NOTES Wed Apr 14 20:45:33 2010(r206625) @@ -1952,6 +1952,7 @@ devicexmphy # XaQti XMAC II # This includes dual and quad port cards, as well as one 100baseFX card. # Most of these are 64-bit PCI devices, except for one single port # card which is 32-bit. +# sge: Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet adapter # sis: Support for NICs based on the Silicon Integrated Systems SiS 900, # SiS 7016 and NS DP83815 PCI fast ethernet controller chips. # sk: Support for the SysKonnect SK-984x series PCI gigabit ethernet NICs. @@ -2046,6 +2047,7 @@ devicere # RealTek 8139C+/8169/8169S/ device rl # RealTek 8129/8139 device pcn # AMD Am79C97x PCI 10/100 NICs device sf # Adaptec AIC-6915 (``Starfire'') +device sge # Silicon Integrated Systems SiS190/191 device sis # Silicon Integrated Systems SiS 900/SiS 7016 device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) Modified: head/sys/conf/files == --- head/sys/conf/files Wed Apr 14 20:31:06 2010(r206624) +++ head/sys/conf/files Wed Apr 14 20:45:33 2010(r206625) @@ -1490,6 +1490,7 @@ dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa dev/sdhci/sdhci.c optional sdhci pci dev/sf/if_sf.c optional sf pci +dev/sge/if_sge.c optional sge pci dev/si/si.c
svn commit: r206627 - head/sys/contrib/ipfilter/netinet
Author: imp Date: Wed Apr 14 20:50:07 2010 New Revision: 206627 URL: http://svn.freebsd.org/changeset/base/206627 Log: We don't need the definition for in_cksum repeated here since we get it from machine/in_cksum.h. This definition prevents us from using hand-tuned assembler versions of in_cksum. # this fixes the modules build on arm for ipfilter. Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h == --- head/sys/contrib/ipfilter/netinet/ip_compat.h Wed Apr 14 20:48:13 2010(r206626) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Wed Apr 14 20:50:07 2010(r206627) @@ -975,7 +975,6 @@ typedef u_int32_t u_32_t; # define SPL_NET(x) ; # define SPL_IMP(x) ; # define SPL_SCHED(x); -extern int in_cksum __P((struct mbuf *, int)); # else # define SPL_SCHED(x)x = splhigh() # endif /* __FreeBSD_version >= 500043 */ ___ 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: r206628 - head/usr.sbin/sysinstall
Author: yongari Date: Wed Apr 14 20:54:23 2010 New Revision: 206628 URL: http://svn.freebsd.org/changeset/base/206628 Log: Add sge(4) to the list of supported network interface. Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c == --- head/usr.sbin/sysinstall/devices.c Wed Apr 14 20:50:07 2010 (r206627) +++ head/usr.sbin/sysinstall/devices.c Wed Apr 14 20:54:23 2010 (r206628) @@ -150,6 +150,7 @@ static struct _devname { NETWORK("rue", "RealTek USB Ethernet card"), NETWORK("rum", "Ralink Technology USB IEEE 802.11 wireless adapter"), NETWORK("sf", "Adaptec AIC-6915 PCI Ethernet card"), +NETWORK("sge", "Silicon Integrated Systems SiS190/191 Ethernet"), NETWORK("sis", "SiS 900/SiS 7016 PCI Ethernet card"), #ifdef PC98 NETWORK("snc", "SONIC Ethernet card"), ___ 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: r206629 - head/sys/dev/e1000
Author: jfv Date: Wed Apr 14 20:55:33 2010 New Revision: 206629 URL: http://svn.freebsd.org/changeset/base/206629 Log: Add a missing fragment in the tx msix handler to invoke another if all work is not done. Sync the igb driver with changes suggested by yongari and made in em, these made sense to be in both drivers. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Wed Apr 14 20:54:23 2010(r206628) +++ head/sys/dev/e1000/if_em.c Wed Apr 14 20:55:33 2010(r206629) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /* * Driver version: */ -char em_driver_version[] = "7.0.4"; +char em_driver_version[] = "7.0.5"; /* @@ -1484,12 +1484,17 @@ em_msix_tx(void *arg) { struct tx_ring *txr = arg; struct adapter *adapter = txr->adapter; + boolmore; ++txr->tx_irq; EM_TX_LOCK(txr); - em_txeof(txr); + more = em_txeof(txr); EM_TX_UNLOCK(txr); - E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); + if (more) + taskqueue_enqueue(txr->tq, &txr->tx_task); + else + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); return; } Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Wed Apr 14 20:54:23 2010(r206628) +++ head/sys/dev/e1000/if_igb.c Wed Apr 14 20:55:33 2010(r206629) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /* * Driver version: */ -char igb_driver_version[] = "version - 1.9.4"; +char igb_driver_version[] = "version - 1.9.5"; /* @@ -758,8 +758,15 @@ igb_start_locked(struct tx_ring *txr, st if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail <= IGB_TX_OP_THRESHOLD) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -779,6 +786,7 @@ igb_start_locked(struct tx_ring *txr, st ETHER_BPF_MTAP(ifp, m_head); /* Set watchdog on */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } } @@ -817,8 +825,6 @@ igb_mq_start(struct ifnet *ifp, struct m /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; - else - i = curcpu % adapter->num_queues; txr = &adapter->tx_rings[i]; @@ -847,6 +853,10 @@ igb_mq_start_locked(struct ifnet *ifp, s return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) + igb_txeof(txr); + enq = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -856,6 +866,7 @@ igb_mq_start_locked(struct ifnet *ifp, s next = drbr_dequeue(ifp, txr->br); } else next = m; + /* Process the queue */ while (next != NULL) { if ((err = igb_xmit(txr, &next)) != 0) { @@ -877,6 +888,7 @@ igb_mq_start_locked(struct ifnet *ifp, s if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -1248,19 +1260,13 @@ igb_handle_que(void *context, int pendin struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet*ifp = adapter->ifp; - u32 loop = IGB_MAX_LOOP; boolmore; - /* RX first */ - do { + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { more = igb_rxeof(que, -1); - } while (loop-- && more); - if (IGB_TX_TRYLOCK(txr)) { - loop = IGB_MAX_LOOP; - do { - more = igb_txeof(txr); - } while (loop-- && more); + IGB_TX_LOCK(tx
Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
On Wed, Apr 14, 2010 at 06:05:54PM +0200, Fabio Checconi wrote: > - Some classes (from a quick look I've seen only g_mirror, but I'm > pretty sure there were some other ones) cache pointers to their > providers. With these classes this implementation does not work. This can be easly changed to go though geom to provider. Many of my classes do that. -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgph03k0U0w5K.pgp Description: PGP signature
svn commit: r206631 - head/share/man/man4
Author: yongari Date: Wed Apr 14 21:27:48 2010 New Revision: 206631 URL: http://svn.freebsd.org/changeset/base/206631 Log: Add sge(4) man page and hook up sge(4) to the build. Also add Xr to appropriate man pages. Added: head/share/man/man4/sge.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/altq.4 head/share/man/man4/miibus.4 head/share/man/man4/vlan.4 Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileWed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/MakefileWed Apr 14 21:27:48 2010 (r206631) @@ -350,6 +350,7 @@ MAN=aac.4 \ sem.4 \ ses.4 \ sf.4 \ + sge.4 \ si.4 \ siba.4 \ sio.4 \ Modified: head/share/man/man4/altq.4 == --- head/share/man/man4/altq.4 Wed Apr 14 20:59:37 2010(r206630) +++ head/share/man/man4/altq.4 Wed Apr 14 21:27:48 2010(r206631) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 26, 2009 +.Dd April 14, 2010 .Dt ALTQ 4 .Os .Sh NAME @@ -151,6 +151,7 @@ They have been applied to the following .Xr rl 4 , .Xr rum 4 , .Xr sf 4 , +.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , Modified: head/share/man/man4/miibus.4 == --- head/share/man/man4/miibus.4Wed Apr 14 20:59:37 2010 (r206630) +++ head/share/man/man4/miibus.4Wed Apr 14 21:27:48 2010 (r206631) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd April 14, 2010 .Dt MIIBUS 4 .Os .Sh NAME @@ -97,6 +97,8 @@ RealTek 8129/8139 RealTek RTL8150 USB To Fast Ethernet .It Xr sf 4 Adaptec AIC-6915 +.It Xr sge 4 +Silicon Integrated Systems SiS190/191 Ethernet .It Xr sis 4 Silicon Integrated Systems SiS 900/SiS 7016 .It Xr sk 4 @@ -158,6 +160,7 @@ but as a result are not well behaved new .Xr rl 4 , .Xr rue 4 , .Xr sf 4 , +.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , Added: head/share/man/man4/sge.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/sge.4 Wed Apr 14 21:27:48 2010(r206631) @@ -0,0 +1,120 @@ +.\" Copyright (c) 2010 Pyun YongHyeon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 14, 2010 +.Dt SGE 4 +.Os +.Sh NAME +.Nm sge +.Nd Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device miibus" +.Cd "device sge" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_sge="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for SiS190 Fast Ethernet +controllers and SiS191 Fast/Gigabit Ethernet controllers. +.Pp +All LOMs supported by the +.Nm +driver have TCP/UDP/IP checksum offload for transmit and receive. +Due to lack of documentation more offloading features like TCP +segmentation offload (TSO), hardware VLAN tag stripping/insertion +features, Wake On Lan (WOL), Jumbo frame and an interrupt moderation +mechanism are not supported yet. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually
svn commit: r206632 - head/sys/kern
Author: julian Date: Wed Apr 14 21:42:29 2010 New Revision: 206632 URL: http://svn.freebsd.org/changeset/base/206632 Log: Change the semantics of the debug.ktr.alq_enable control so that when you disable alq, it acts as if alq had not been enabled in the build. in other words, the rest of ktr is still available for use. If you really don't want that as well, set the mask to 0. MFC after:3 weeks Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c == --- head/sys/kern/kern_ktr.cWed Apr 14 21:27:48 2010(r206631) +++ head/sys/kern/kern_ktr.cWed Apr 14 21:42:29 2010(r206632) @@ -199,9 +199,8 @@ ktr_tracepoint(u_int mask, const char *f struct ktr_entry *entry; #ifdef KTR_ALQ struct ale *ale = NULL; -#else - int newindex, saveindex; #endif + int newindex, saveindex; #if defined(KTR_VERBOSE) || defined(KTR_ALQ) struct thread *td; #endif @@ -221,27 +220,30 @@ ktr_tracepoint(u_int mask, const char *f td->td_pflags |= TDP_INKTR; #endif #ifdef KTR_ALQ - if (ktr_alq_enabled && - td->td_critnest == 0 && - (td->td_flags & TDF_IDLETD) == 0 && - td != ald_thread) { - if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max) - goto done; - if ((ale = alq_get(ktr_alq, ALQ_NOWAIT)) == NULL) { - ktr_alq_failed++; + if (ktr_alq_enabled) { + if (td->td_critnest == 0 && + (td->td_flags & TDF_IDLETD) == 0 && + td != ald_thread) { + if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max) + goto done; + if ((ale = alq_get(ktr_alq, ALQ_NOWAIT)) == NULL) { + ktr_alq_failed++; + goto done; + } + ktr_alq_cnt++; + entry = (struct ktr_entry *)ale->ae_data; + } else { goto done; } - ktr_alq_cnt++; - entry = (struct ktr_entry *)ale->ae_data; } else - goto done; -#else - do { - saveindex = ktr_idx; - newindex = (saveindex + 1) & (KTR_ENTRIES - 1); - } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); - entry = &ktr_buf[saveindex]; #endif + { + do { + saveindex = ktr_idx; + newindex = (saveindex + 1) & (KTR_ENTRIES - 1); + } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); + entry = &ktr_buf[saveindex]; + } entry->ktr_timestamp = KTR_TIME; entry->ktr_cpu = cpu; entry->ktr_thread = curthread; @@ -271,7 +273,7 @@ ktr_tracepoint(u_int mask, const char *f entry->ktr_parms[4] = arg5; entry->ktr_parms[5] = arg6; #ifdef KTR_ALQ - if (ale) + if (ktr_alq_enabled && ale) alq_post(ktr_alq, ale); done: #endif @@ -295,7 +297,9 @@ DB_SHOW_COMMAND(ktr, db_ktr_all) tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); tstate.first = -1; - db_ktr_verbose = index(modif, 'v') != NULL; + db_ktr_verbose = 0; + db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0; + db_ktr_verbose |= (index(modif, 'V') != NULL) ? 1 : 0; /* just timestap please */ if (index(modif, 'a') != NULL) { db_disable_pager(); while (cncheckc() != -1) @@ -329,9 +333,11 @@ db_mach_vtrace(void) db_printf(":cpu%d", kp->ktr_cpu); #endif db_printf(")"); - if (db_ktr_verbose) { - db_printf(" %10.10lld %s.%d", (long long)kp->ktr_timestamp, - kp->ktr_file, kp->ktr_line); + if (db_ktr_verbose >= 1) { + db_printf(" %10.10lld", (long long)kp->ktr_timestamp); + } + if (db_ktr_verbose >= 2) { + db_printf(" %s.%d", kp->ktr_file, kp->ktr_line); } db_printf(": "); db_printf(kp->ktr_desc, kp->ktr_parms[0], kp->ktr_parms[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"
svn commit: r206633 - head/share/man/man4
Author: julian Date: Wed Apr 14 21:44:14 2010 New Revision: 206633 URL: http://svn.freebsd.org/changeset/base/206633 Log: Man page change to documant slight change in ktr_alq behaviour. Modified: head/share/man/man4/ktr.4 Modified: head/share/man/man4/ktr.4 == --- head/share/man/man4/ktr.4 Wed Apr 14 21:42:29 2010(r206632) +++ head/share/man/man4/ktr.4 Wed Apr 14 21:44:14 2010(r206633) @@ -122,7 +122,7 @@ option sets the flag to one. The KTR buffer can be examined from within .Xr ddb 4 via the -.Ic show ktr Op Cm /v +.Ic show ktr Op Cm /vV command. This command displays the contents of the trace buffer one page at a time. At the @@ -136,6 +136,10 @@ If the .Cm /v modifier is specified, then they are displayed in addition to the normal output. +If the +.Cm /V +modifier is specified, then just the timestamp is displayed in +addition to the normal output. Note that the events are displayed in reverse chronological order. That is, the most recent events are displayed first. .Ss Logging ktr to Disk @@ -167,7 +171,9 @@ the next invocation. enables logging of .Nm entries to disk if it is set to one. -Setting this to 0 will terminate logging. +Setting this to 0 will terminate logging to disk and revert to +logging to the normal ktr ring buffer. +Data is not sent to the ring buffer while logging to disk. .It Va debug.ktr.alq_max is the maximum number of entries that will be recorded to disk, or 0 for infinite. ___ 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: r206635 - head/usr.sbin/pmcstat
Author: fabient Date: Wed Apr 14 21:53:27 2010 New Revision: 206635 URL: http://svn.freebsd.org/changeset/base/206635 Log: Move fatal error at the right place. Fix exit from top mode when checking if PMC is available. MFC after: 3 days Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c head/usr.sbin/pmcstat/pmcpl_gprof.c head/usr.sbin/pmcstat/pmcstat_log.c Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c == --- head/usr.sbin/pmcstat/pmcpl_callgraph.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcpl_callgraph.c Wed Apr 14 21:53:27 2010 (r206635) @@ -581,6 +581,8 @@ pmcpl_cg_topdisplay(void) struct pmcstat_pmcrecord *pmcr; pmcr = pmcstat_pmcindex_to_pmcr(pmcstat_pmcinfilter); + if (!pmcr) + err(EX_SOFTWARE, "ERROR: invalid pmcindex"); /* * We pull out all callgraph nodes in the top-level hash table Modified: head/usr.sbin/pmcstat/pmcpl_gprof.c == --- head/usr.sbin/pmcstat/pmcpl_gprof.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcpl_gprof.c Wed Apr 14 21:53:27 2010 (r206635) @@ -171,6 +171,8 @@ pmcstat_gmon_create_name(const char *sam char fullpath[PATH_MAX]; pmcname = pmcstat_pmcid_to_name(pmcid); + if (!pmcname) + err(EX_SOFTWARE, "ERROR: cannot find pmcid"); (void) snprintf(fullpath, sizeof(fullpath), "%s/%s/%s", samplesdir, pmcname, Modified: head/usr.sbin/pmcstat/pmcstat_log.c == --- head/usr.sbin/pmcstat/pmcstat_log.c Wed Apr 14 21:46:22 2010 (r206634) +++ head/usr.sbin/pmcstat/pmcstat_log.c Wed Apr 14 21:53:27 2010 (r206635) @@ -1050,7 +1050,6 @@ pmcstat_pmcid_to_name(pmc_id_t pmcid) if (pr->pr_pmcid == pmcid) return (pmcstat_string_unintern(pr->pr_pmcname)); - err(EX_SOFTWARE, "ERROR: cannot find pmcid"); return NULL; } @@ -1083,7 +1082,6 @@ pmcstat_pmcindex_to_pmcr(int pmcin) if (pr->pr_pmcin == pmcin) return pr; - err(EX_SOFTWARE, "ERROR: invalid pmcindex"); return NULL; } ___ 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: r206637 - in head: sbin/ifconfig share/man/man4 sys/net
Author: delphij Date: Wed Apr 14 22:02:19 2010 New Revision: 206637 URL: http://svn.freebsd.org/changeset/base/206637 Log: When an underlying ioctl(2) handler returns an error, our ioctl(2) interface considers that it hits a fatal error, and will not copyout the request structure back for _IOW and _IOWR ioctls, keeping them untouched. The previous implementation of the SIOCGIFDESCR ioctl intends to feed the buffer length back to userland. However, if we return an error, the feedback would be defeated and ifconfig(8) would trap into an infinite loop. This commit changes SIOCGIFDESCR to set buffer field to NULL to indicate the previous ENAMETOOLONG case. Reported by: bschmidt MFC after:2 weeks Modified: head/sbin/ifconfig/ifconfig.c head/share/man/man4/netintro.4 head/sys/net/if.c Modified: head/sbin/ifconfig/ifconfig.c == --- head/sbin/ifconfig/ifconfig.c Wed Apr 14 21:59:22 2010 (r206636) +++ head/sbin/ifconfig/ifconfig.c Wed Apr 14 22:02:19 2010 (r206637) @@ -922,19 +922,20 @@ status(const struct afswtch *afp, const ifr.ifr_buffer.buffer = descr; ifr.ifr_buffer.length = descrlen; if (ioctl(s, SIOCGIFDESCR, &ifr) == 0) { - if (strlen(descr) > 0) - printf("\tdescription: %s\n", descr); - break; - } else if (errno == ENAMETOOLONG) - descrlen = ifr.ifr_buffer.length; - else - break; - } else { + if (ifr.ifr_buffer.buffer == descr) { + if (strlen(descr) > 0) + printf("\tdescription: %s\n", + descr); + } else if (ifr.ifr_buffer.length > descrlen) { + descrlen = ifr.ifr_buffer.length; + continue; + } + } + } else warn("unable to allocate memory for interface" "description"); - break; - } - }; + break; + } if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) == 0) { if (ifr.ifr_curcap != 0) { Modified: head/share/man/man4/netintro.4 == --- head/share/man/man4/netintro.4 Wed Apr 14 21:59:22 2010 (r206636) +++ head/share/man/man4/netintro.4 Wed Apr 14 22:02:19 2010 (r206637) @@ -32,7 +32,7 @@ .\" @(#)netintro.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd April 14, 2010 .Dt NETINTRO 4 .Os .Sh NAME @@ -292,8 +292,11 @@ field of struct passed in as parameter, and the length would include the terminating nul character. If there is not enough space to hold the interface length, -no copy would be done and an -error would be returned. +no copy would be done and the +.Va buffer +field of +.Va ifru_buffer +would be set to NULL. The kernel will store the buffer length in the .Va length field upon return, regardless whether the buffer itself is Modified: head/sys/net/if.c == --- head/sys/net/if.c Wed Apr 14 21:59:22 2010(r206636) +++ head/sys/net/if.c Wed Apr 14 22:02:19 2010(r206637) @@ -2049,14 +2049,13 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, case SIOCGIFDESCR: error = 0; sx_slock(&ifdescr_sx); - if (ifp->if_description == NULL) { - ifr->ifr_buffer.length = 0; + if (ifp->if_description == NULL) error = ENOMSG; - } else { + else { /* space for terminating nul */ descrlen = strlen(ifp->if_description) + 1; if (ifr->ifr_buffer.length < descrlen) - error = ENAMETOOLONG; + ifr->ifr_buffer.buffer = NULL; else error = copyout(ifp->if_description, ifr->ifr_buffer.buffer, descrlen); ___ 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: r206638 - head/sys/dev/usb/input
Author: gavin Date: Wed Apr 14 22:03:48 2010 New Revision: 206638 URL: http://svn.freebsd.org/changeset/base/206638 Log: Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local (almost identically named) local #define. Reviewed by: hselasky Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c == --- head/sys/dev/usb/input/ukbd.c Wed Apr 14 22:02:19 2010 (r206637) +++ head/sys/dev/usb/input/ukbd.c Wed Apr 14 22:03:48 2010 (r206638) @@ -102,8 +102,6 @@ TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_d TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds); #endif -#defineUPROTO_BOOT_KEYBOARD 1 - #defineUKBD_EMULATE_ATSCANCODE1 #defineUKBD_DRIVER_NAME "ukbd" #defineUKBD_NMOD 8 /* units */ @@ -770,7 +768,7 @@ ukbd_probe(device_t dev) return (ENXIO); if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - (uaa->info.bInterfaceProtocol == UPROTO_BOOT_KEYBOARD)) { + (uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD)) { if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) return (ENXIO); 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: r206639 - in head/sys: ddb net
Author: julian Date: Wed Apr 14 23:06:07 2010 New Revision: 206639 URL: http://svn.freebsd.org/changeset/base/206639 Log: Move two copies of the same definition to a common include file. MFC after: 3 weeks Modified: head/sys/ddb/db_sym.c head/sys/net/vnet.c head/sys/net/vnet.h Modified: head/sys/ddb/db_sym.c == --- head/sys/ddb/db_sym.c Wed Apr 14 22:03:48 2010(r206638) +++ head/sys/ddb/db_sym.c Wed Apr 14 23:06:07 2010(r206639) @@ -64,12 +64,6 @@ static boolean_t db_line_at_pc(c_db_sym_ static int db_cpu = -1; #ifdef VIMAGE -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#defineVNET_START (uintptr_t)&__start_set_vnet -#defineVNET_STOP (uintptr_t)&__stop_set_vnet - static void *db_vnet = NULL; #endif Modified: head/sys/net/vnet.c == --- head/sys/net/vnet.c Wed Apr 14 22:03:48 2010(r206638) +++ head/sys/net/vnet.c Wed Apr 14 23:06:07 2010(r206639) @@ -154,15 +154,6 @@ struct vnet *vnet0; */ /* - * Location of the kernel's 'set_vnet' linker set. - */ -extern uintptr_t *__start_set_vnet; -extern uintptr_t *__stop_set_vnet; - -#defineVNET_START (uintptr_t)&__start_set_vnet -#defineVNET_STOP (uintptr_t)&__stop_set_vnet - -/* * Number of bytes of data in the 'set_vnet' linker set, and hence the total * size of all kernel virtualized global variables, and the malloc(9) type * that will be used to allocate it. Modified: head/sys/net/vnet.h == --- head/sys/net/vnet.h Wed Apr 14 22:03:48 2010(r206638) +++ head/sys/net/vnet.h Wed Apr 14 23:06:07 2010(r206639) @@ -92,6 +92,15 @@ struct vnet { #include /* + * Location of the kernel's 'set_vnet' linker set. + */ +extern uintptr_t *__start_set_vnet; +extern uintptr_t *__stop_set_vnet; + +#defineVNET_START (uintptr_t)&__start_set_vnet +#defineVNET_STOP (uintptr_t)&__stop_set_vnet + +/* * Functions to allocate and destroy virtual network stacks. */ struct vnet *vnet_alloc(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: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: delphij Date: Thu Apr 15 01:20:30 2010 New Revision: 206640 URL: http://svn.freebsd.org/changeset/base/206640 Log: MFC r205198: Merge OpenSolaris revision 8802:010b31dd4c53: 6773366 "zfs list" memory consumption can be further reduced PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c == --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cWed Apr 14 23:06:07 2010(r206639) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Apr 15 01:20:30 2010(r206640) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -58,6 +58,7 @@ typedef struct callback_data { zfs_type_t cb_types; zfs_sort_column_t *cb_sortcol; zprop_list_t**cb_proplist; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -98,11 +99,20 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist && - zfs_expand_proplist(zhp, cb->cb_proplist) != 0) { - free(node); - return (-1); + + if (cb->cb_proplist) { + if ((*cb->cb_proplist) && + !(*cb->cb_proplist)->pl_all) + zfs_prune_proplist(zhp, + cb->cb_props_table); + + if (zfs_expand_proplist(zhp, cb->cb_proplist) + != 0) { + free(node); + return (-1); + } } + uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -328,7 +338,7 @@ zfs_for_each(int argc, char **argv, int zfs_sort_column_t *sortcol, zprop_list_t **proplist, zfs_iter_f callback, void *data) { - callback_data_t cb; + callback_data_t cb = {0}; int ret = 0; zfs_node_t *node; uu_avl_walk_t *walk; @@ -346,6 +356,39 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; + + /* +* If cb_proplist is provided then in the zfs_handles created we +* retain only those properties listed in cb_proplist and sortcol. +* The rest are pruned. So, the caller should make sure that no other +* properties other than those listed in cb_proplist/sortcol are +* accessed. +* +* If cb_proplist is NULL then we retain all the properties. +*/ + if (cb.cb_proplist && *cb.cb_proplist) { + zprop_list_t *p = *cb.cb_proplist; + + while (p) { + if (p->pl_prop >= ZFS_PROP_TYPE && + p->pl_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[p->pl_prop] = B_TRUE; + } + p = p->pl_next; + } + + while (sortcol) { + if (sortcol->sc_prop >= ZFS_PROP_TYPE && + sortcol->sc_prop < ZFS_NUM_PROPS) { + cb.cb_props_table[sortcol->sc_prop] = B_TRUE; + } + sortcol = sortcol->sc_next; + } + } else { + (void) memset(cb.cb_props_table, B_TRUE, + sizeof (cb.cb_props_table)); + } + if ((cb.cb_avl = uu_avl_create(avl_pool, NULL, UU_DEFAULT)) == NULL) { (void) fprintf(stderr, gettext("internal error: out of memory\n")); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h == --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs
svn commit: r206641 - stable/8/cddl/contrib/opensolaris/cmd/zfs
Author: delphij Date: Thu Apr 15 01:22:38 2010 New Revision: 206641 URL: http://svn.freebsd.org/changeset/base/206641 Log: MFC r205199: Merge OpenSolaris revision 9365:7838a22eccd6: PSARC/2009/171 zfs list -d and zfs get -d 6762432 zfs list --depth PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c == --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Apr 15 01:20:30 2010(r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Apr 15 01:22:38 2010(r206641) @@ -53,12 +53,14 @@ typedef struct zfs_node { } zfs_node_t; typedef struct callback_data { - uu_avl_t*cb_avl; - int cb_flags; - zfs_type_t cb_types; - zfs_sort_column_t *cb_sortcol; - zprop_list_t**cb_proplist; - uint8_t cb_props_table[ZFS_NUM_PROPS]; + uu_avl_t*cb_avl; + int cb_flags; + zfs_type_t cb_types; + zfs_sort_column_t *cb_sortcol; + zprop_list_t**cb_proplist; + int cb_depth_limit; + int cb_depth; + uint8_t cb_props_table[ZFS_NUM_PROPS]; } callback_data_t; uu_avl_pool_t *avl_pool; @@ -99,7 +101,6 @@ zfs_callback(zfs_handle_t *zhp, void *da uu_avl_node_init(node, &node->zn_avlnode, avl_pool); if (uu_avl_find(cb->cb_avl, node, cb->cb_sortcol, &idx) == NULL) { - if (cb->cb_proplist) { if ((*cb->cb_proplist) && !(*cb->cb_proplist)->pl_all) @@ -112,7 +113,6 @@ zfs_callback(zfs_handle_t *zhp, void *da return (-1); } } - uu_avl_insert(cb->cb_avl, node, idx); dontclose = 1; } else { @@ -123,11 +123,15 @@ zfs_callback(zfs_handle_t *zhp, void *da /* * Recurse if necessary. */ - if (cb->cb_flags & ZFS_ITER_RECURSE) { + if (cb->cb_flags & ZFS_ITER_RECURSE && + ((cb->cb_flags & ZFS_ITER_DEPTH_LIMIT) == 0 || + cb->cb_depth < cb->cb_depth_limit)) { + cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) (void) zfs_iter_snapshots(zhp, zfs_callback, data); + cb->cb_depth--; } if (!dontclose) @@ -335,7 +339,7 @@ zfs_sort(const void *larg, const void *r int zfs_for_each(int argc, char **argv, int flags, zfs_type_t types, -zfs_sort_column_t *sortcol, zprop_list_t **proplist, +zfs_sort_column_t *sortcol, zprop_list_t **proplist, int limit, zfs_iter_f callback, void *data) { callback_data_t cb = {0}; @@ -356,7 +360,7 @@ zfs_for_each(int argc, char **argv, int cb.cb_flags = flags; cb.cb_proplist = proplist; cb.cb_types = types; - + cb.cb_depth_limit = limit; /* * If cb_proplist is provided then in the zfs_handles created we * retain only those properties listed in cb_proplist and sortcol. Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h == --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hThu Apr 15 01:20:30 2010(r206640) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.hThu Apr 15 01:22:38 2010(r206641) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -41,9 +41,10 @@ typedef struct zfs_sort_column { #defineZFS_ITER_RECURSE (1 << 0) #defineZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1) #defineZFS_ITER_PROP_LISTSNAPS(1 << 2) +#defineZFS_ITER_DEPTH_LIMIT (1 << 3) int zfs_for_each(int, char **, int options, zfs_type_t, -zfs_sort_column_t *, zprop_list_t **, zfs_iter_f, void *); +zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *);
svn commit: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
Author: delphij Date: Thu Apr 15 01:25:17 2010 New Revision: 206642 URL: http://svn.freebsd.org/changeset/base/206642 Log: MFC r205200 + r206199 Merge OpenSolaris revision 9396:f41cf682d0d3: 6830813 zfs list -t all fails assertion *Note that this is only a partial merge of this revision addressing only this one issue.* PR: bin/144720 Submitted by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c == --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Apr 15 01:22:38 2010(r206641) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.cThu Apr 15 01:25:17 2010(r206642) @@ -368,7 +368,10 @@ zfs_for_each(int argc, char **argv, int * properties other than those listed in cb_proplist/sortcol are * accessed. * -* If cb_proplist is NULL then we retain all the properties. +* If cb_proplist is NULL then we retain all the properties. We +* always retain the zoned property, which some other properties +* need (userquota & friends), and the createtxg property, which +* we need to sort snapshots. */ if (cb.cb_proplist && *cb.cb_proplist) { zprop_list_t *p = *cb.cb_proplist; @@ -388,6 +391,9 @@ zfs_for_each(int argc, char **argv, int } sortcol = sortcol->sc_next; } + + cb.cb_props_table[ZFS_PROP_ZONED] = B_TRUE; + cb.cb_props_table[ZFS_PROP_CREATETXG] = B_TRUE; } else { (void) memset(cb.cb_props_table, B_TRUE, sizeof (cb.cb_props_table)); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:22:38 2010(r206641) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Apr 15 01:25:17 2010(r206642) @@ -4285,7 +4285,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* +* We leave user:props in the nvlist, so there will be +* some ZPROP_INVAL. To be extra safe, don't prune +* those. +*/ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; ___ 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: r206640 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
on 15/04/2010 04:20 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:20:30 2010 > New Revision: 206640 > URL: http://svn.freebsd.org/changeset/base/206640 > > Log: > MFC r205198: > > Merge OpenSolaris revision 8802:010b31dd4c53: > > 6773366 "zfs list" memory consumption can be further reduced > > PR: bin/144720 > Submitted by: mm I wonder why you haven't also included into this MFC the commit that fixes crash with user properties. I think it's not nice to MFC a change with a known bug without a fix. > + while (curr) { > + zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > + nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > + > + if (props[zfs_prop] == B_FALSE) zfs_prop can be -1 here, remember? -- Andriy Gapon ___ 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: r206642 - in stable/8/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common
on 15/04/2010 04:25 Xin LI said the following: > Author: delphij > Date: Thu Apr 15 01:25:17 2010 > New Revision: 206642 > URL: http://svn.freebsd.org/changeset/base/206642 > > Log: > MFC r205200 + r206199 > > Merge OpenSolaris revision 9396:f41cf682d0d3: > > 6830813 zfs list -t all fails assertion > > *Note that this is only a partial merge of this revision addressing only > this one issue.* > > PR: bin/144720 > Submitted by: mm Oh here it is :) The window between the commits is sufficiently small, but I still think that it would have been better to MFC the fix in one go. > - if (props[zfs_prop] == B_FALSE) > + /* > + * We leave user:props in the nvlist, so there will be > + * some ZPROP_INVAL. To be extra safe, don't prune > + * those. > + */ > + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) > (void) nvlist_remove(zhp->zfs_props, > nvpair_name(curr), nvpair_type(curr)); > curr = next; -- Andriy Gapon ___ 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: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gs
On Wed, Apr 14, 2010 at 11:01:17PM +0200, Pawel Jakub Dawidek wrote: > On Wed, Apr 14, 2010 at 06:05:54PM +0200, Fabio Checconi wrote: > > - Some classes (from a quick look I've seen only g_mirror, but I'm > > pretty sure there were some other ones) cache pointers to their > > providers. With these classes this implementation does not work. > > This can be easly changed to go though geom to provider. Many of my > classes do that. Absolutely. The above was just to explain why we only implemented insert/remove within geom_sched instead of globally. If/when we make the feature globally available, we also need to inspect all classes to make sure that there are no surprises. cheers luigi > > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > p...@freebsd.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! ___ 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"