svn commit: r223411 - in stable/8/sys: dev/sound/usb dev/usb dev/usb/input dev/usb/storage netgraph/bluetooth/drivers/ubt
Author: avg Date: Wed Jun 22 07:08:44 2011 New Revision: 223411 URL: http://svn.freebsd.org/changeset/base/223411 Log: MFC r222051,222055: usb: change to one-pass probing of device drivers Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/usb/input/uhid.c stable/8/sys/dev/usb/input/ukbd.c stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/storage/ustorage_fs.c stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usbdi.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.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) Modified: stable/8/sys/dev/sound/usb/uaudio.c == --- stable/8/sys/dev/sound/usb/uaudio.c Wed Jun 22 06:58:42 2011 (r223410) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Jun 22 07:08:44 2011 (r223411) @@ -539,9 +539,6 @@ uaudio_probe(device_t dev) if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); - if (uaa->use_generic == 0) - return (ENXIO); - /* lookup non-standard device */ if (uaa->info.bInterfaceClass != UICLASS_AUDIO) { @@ -555,7 +552,7 @@ uaudio_probe(device_t dev) if (usb_test_quirk(uaa, UQ_BAD_AUDIO)) return (ENXIO); else - return (0); + return (BUS_PROBE_GENERIC); } /* check for MIDI stream */ @@ -564,7 +561,7 @@ uaudio_probe(device_t dev) if (usb_test_quirk(uaa, UQ_BAD_MIDI)) return (ENXIO); else - return (0); + return (BUS_PROBE_GENERIC); } return (ENXIO); } Modified: stable/8/sys/dev/usb/input/uhid.c == --- stable/8/sys/dev/usb/input/uhid.c Wed Jun 22 06:58:42 2011 (r223410) +++ stable/8/sys/dev/usb/input/uhid.c Wed Jun 22 07:08:44 2011 (r223411) @@ -617,10 +617,6 @@ uhid_probe(device_t dev) if (uaa->usb_mode != USB_MODE_HOST) { return (ENXIO); } - if (uaa->use_generic == 0) { - /* give Mouse and Keyboard drivers a try first */ - return (ENXIO); - } if (uaa->info.bInterfaceClass != UICLASS_HID) { /* the Xbox 360 gamepad doesn't use the HID class */ Modified: stable/8/sys/dev/usb/input/ukbd.c == --- stable/8/sys/dev/usb/input/ukbd.c Wed Jun 22 06:58:42 2011 (r223410) +++ stable/8/sys/dev/usb/input/ukbd.c Wed Jun 22 07:08:44 2011 (r223411) @@ -771,7 +771,7 @@ ukbd_probe(device_t dev) if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) return (ENXIO); else - return (BUS_PROBE_GENERIC); + return (BUS_PROBE_DEFAULT); } error = usbd_req_get_hid_desc(uaa->device, NULL, @@ -793,7 +793,7 @@ ukbd_probe(device_t dev) if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) error = ENXIO; else - error = BUS_PROBE_GENERIC; + error = BUS_PROBE_DEFAULT; } else error = ENXIO; Modified: stable/8/sys/dev/usb/input/ums.c == --- stable/8/sys/dev/usb/input/ums.cWed Jun 22 06:58:42 2011 (r223410) +++ stable/8/sys/dev/usb/input/ums.cWed Jun 22 07:08:44 2011 (r223411) @@ -373,7 +373,7 @@ ums_probe(device_t dev) if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) - return (BUS_PROBE_GENERIC); + return (BUS_PROBE_DEFAULT); error = usbd_req_get_hid_desc(uaa->device, NULL, &d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex); @@ -383,7 +383,7 @@ ums_probe(device_t dev) if (hid_is_collection(d_ptr, d_len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) - error = BUS_PROBE_GENERIC; + error = BUS_PROBE_DEFAULT; else error = ENXIO; Modified: stable/8/sys/dev/usb/storage/umass.c == --- stable/8/sys/dev/usb/storage/umass.cWed Jun 22 06:58:42 2011 (r223410) +++ stable/8/sys/dev/usb/storage/umass.cWed Jun 22 07:08:44 2011 (r223411) @@ -782,6 +782,7 @@ umass_probe_proto(device_t dev, struct u uint32_t proto = umass_get_proto(uaa->iface);
svn commit: r223412 - in stable/8/sys/cddl/compat/opensolaris: kern sys
Author: avg Date: Wed Jun 22 07:15:57 2011 New Revision: 223412 URL: http://svn.freebsd.org/changeset/base/223412 Log: MFC r222670: opensolaris compat / zfs: avoid early overflow in ddi_get_lbolt* Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c stable/8/sys/cddl/compat/opensolaris/sys/time.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) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c == --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Wed Jun 22 07:08:44 2011(r223411) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Wed Jun 22 07:15:57 2011(r223412) @@ -40,6 +40,7 @@ cpu_core_t cpu_core[MAXCPU]; kmutex_t cpu_lock; solaris_cpu_t solaris_cpu[MAXCPU]; +intnsec_per_tick; /* * OpenSolaris subsystem initialisation. @@ -60,6 +61,8 @@ opensolaris_load(void *dummy) } mutex_init(&cpu_lock, "OpenSolaris CPU lock", MUTEX_DEFAULT, NULL); + + nsec_per_tick = NANOSEC / hz; } SYSINIT(opensolaris_register, SI_SUB_OPENSOLARIS, SI_ORDER_FIRST, opensolaris_load, NULL); Modified: stable/8/sys/cddl/compat/opensolaris/sys/time.h == --- stable/8/sys/cddl/compat/opensolaris/sys/time.h Wed Jun 22 07:08:44 2011(r223411) +++ stable/8/sys/cddl/compat/opensolaris/sys/time.h Wed Jun 22 07:15:57 2011(r223412) @@ -62,8 +62,21 @@ gethrtime(void) { #definegethrestime(ts) getnanotime(ts) #definegethrtime_waitfree()gethrtime() -#defineddi_get_lbolt() ((gethrtime() * hz) / NANOSEC) -#defineddi_get_lbolt64() (int64_t)((gethrtime() * hz) / NANOSEC) +extern int nsec_per_tick; /* nanoseconds per clock tick */ + +static __inline int64_t +ddi_get_lbolt64(void) +{ + + return (gethrtime() / nsec_per_tick); +} + +static __inline clock_t +ddi_get_lbolt(void) +{ + + return (ddi_get_lbolt64()); +} #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: r223413 - in stable/8/sys: amd64/amd64 i386/i386
Author: avg Date: Wed Jun 22 07:18:14 2011 New Revision: 223413 URL: http://svn.freebsd.org/changeset/base/223413 Log: MFC r222756: don't use cpuid level 4 in x86 cpu topology detection if it's not supported Modified: stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/i386/i386/mp_machdep.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) Modified: stable/8/sys/amd64/amd64/mp_machdep.c == --- stable/8/sys/amd64/amd64/mp_machdep.c Wed Jun 22 07:15:57 2011 (r223412) +++ stable/8/sys/amd64/amd64/mp_machdep.c Wed Jun 22 07:18:14 2011 (r223413) @@ -234,8 +234,11 @@ topo_probe_0x4(void) * logical processors that belong to the same core * as BSP thus deducing number of threads per core. */ - cpuid_count(0x04, 0, p); - max_cores = ((p[0] >> 26) & 0x3f) + 1; + if (cpu_high >= 0x4) { + cpuid_count(0x04, 0, p); + max_cores = ((p[0] >> 26) & 0x3f) + 1; + } else + max_cores = 1; core_id_bits = mask_width(max_logical/max_cores); if (core_id_bits < 0) return; Modified: stable/8/sys/i386/i386/mp_machdep.c == --- stable/8/sys/i386/i386/mp_machdep.c Wed Jun 22 07:15:57 2011 (r223412) +++ stable/8/sys/i386/i386/mp_machdep.c Wed Jun 22 07:18:14 2011 (r223413) @@ -288,8 +288,11 @@ topo_probe_0x4(void) * logical processors that belong to the same core * as BSP thus deducing number of threads per core. */ - cpuid_count(0x04, 0, p); - max_cores = ((p[0] >> 26) & 0x3f) + 1; + if (cpu_high >= 0x4) { + cpuid_count(0x04, 0, p); + max_cores = ((p[0] >> 26) & 0x3f) + 1; + } else + max_cores = 1; core_id_bits = mask_width(max_logical/max_cores); if (core_id_bits < 0) return; ___ 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: r223372 - head/bin/realpath
On Tue, Jun 21, 2011 at 10:28:03PM +0200, Jilles Tjoelker wrote: > On Tue, Jun 21, 2011 at 07:34:57PM +, Ruslan Ermilov wrote: > > Author: ru > > Date: Tue Jun 21 19:34:57 2011 > > New Revision: 223372 > > URL: http://svn.freebsd.org/changeset/base/223372 > > > Log: > > Make ``realpath'' behave like ``realpath .''. > > Is this being added for compatibility with something? > > If not, why do we need this non-standard extension if the shorter and > standard pwd -P already fulfills this function? I treat it as a convenient addition to a non-standard utility. realpath(1) was first added in FreeBSD in year 2000 by phk@, as a convenience utility. In r90523 the ability to call "realpath" without arguments (with a similar behavior but different implementation) was added by mike@. Ten months later, this syntax was removed by johan@ in r108034. I'm not aware of any standard and/or another non-FreeBSD based OS that also have this utility (only saw a mention of a patch that adds an utility of the same name into GNU shell-utils, but it seems to have never happened). We could emphasize this: Index: realpath.1 === --- realpath.1 (revision 223372) +++ realpath.1 (working copy) @@ -69,6 +69,10 @@ fails. .Sh EXIT STATUS .Ex -std +.Sh COMPATIBILITY +The +.Nm +utility is non-standard and should not be used in portable scripts. .Sh SEE ALSO .Xr realpath 3 .Sh HISTORY Cheers, -- Ruslan Ermilov r...@freebsd.org FreeBSD committer ___ 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: r223414 - stable/8/sys/dev/usb
Author: hselasky Date: Wed Jun 22 08:01:44 2011 New Revision: 223414 URL: http://svn.freebsd.org/changeset/base/223414 Log: MFC r222786 and r222790: Improve enumeration of Low- and Full-speed devices connected through a High-speed USB HUB. Modified: stable/8/sys/dev/usb/usb_device.h stable/8/sys/dev/usb/usb_freebsd.h stable/8/sys/dev/usb/usb_generic.c stable/8/sys/dev/usb/usb_hub.c stable/8/sys/dev/usb/usb_request.c stable/8/sys/dev/usb/usb_request.h stable/8/sys/dev/usb/usb_transfer.c stable/8/sys/dev/usb/usbdi.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) Modified: stable/8/sys/dev/usb/usb_device.h == --- stable/8/sys/dev/usb/usb_device.h Wed Jun 22 07:18:14 2011 (r223413) +++ stable/8/sys/dev/usb/usb_device.h Wed Jun 22 08:01:44 2011 (r223414) @@ -187,6 +187,8 @@ struct usb_device { struct usb_host_endpoint *linux_endpoint_end; uint16_t devnum; #endif + + uint32_t clear_stall_errors;/* number of clear-stall failures */ }; /* globals */ Modified: stable/8/sys/dev/usb/usb_freebsd.h == --- stable/8/sys/dev/usb/usb_freebsd.h Wed Jun 22 07:18:14 2011 (r223413) +++ stable/8/sys/dev/usb/usb_freebsd.h Wed Jun 22 08:01:44 2011 (r223414) @@ -58,6 +58,7 @@ #defineUSB_HUB_MAX_DEPTH 5 #defineUSB_EP0_BUFSIZE 1024/* bytes */ +#defineUSB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ typedef uint32_t usb_timeout_t;/* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: stable/8/sys/dev/usb/usb_generic.c == --- stable/8/sys/dev/usb/usb_generic.c Wed Jun 22 07:18:14 2011 (r223413) +++ stable/8/sys/dev/usb/usb_generic.c Wed Jun 22 08:01:44 2011 (r223414) @@ -966,10 +966,8 @@ ugen_re_enumerate(struct usb_fifo *f) /* ignore any errors */ DPRINTFN(6, "no FIFOs\n"); } - if (udev->re_enumerate_wait == 0) { - udev->re_enumerate_wait = 1; - usb_needs_explore(udev->bus, 0); - } + /* start re-enumeration of device */ + usbd_start_re_enumerate(udev); return (0); } Modified: stable/8/sys/dev/usb/usb_hub.c == --- stable/8/sys/dev/usb/usb_hub.c Wed Jun 22 07:18:14 2011 (r223413) +++ stable/8/sys/dev/usb/usb_hub.c Wed Jun 22 08:01:44 2011 (r223414) @@ -242,9 +242,14 @@ uhub_explore_sub(struct uhub_softc *sc, if (child->flags.usb_mode == USB_MODE_HOST) { usbd_enum_lock(child); if (child->re_enumerate_wait) { - err = usbd_set_config_index(child, USB_UNCONFIG_INDEX); - if (err == 0) - err = usbd_req_re_enumerate(child, NULL); + err = usbd_set_config_index(child, + USB_UNCONFIG_INDEX); + if (err != 0) { + DPRINTF("Unconfigure failed: " + "%s: Ignored.\n", + usbd_errstr(err)); + } + err = usbd_req_re_enumerate(child, NULL); if (err == 0) err = usbd_set_config_index(child, 0); if (err == 0) { @@ -2471,3 +2476,19 @@ usbd_filter_power_mode(struct usb_device /* use fixed power mode given by hardware driver */ return (temp); } + +/** + * usbd_start_re_enumerate + * + * This function starts re-enumeration of the given USB device. This + * function does not need to be called BUS-locked. This function does + * not wait until the re-enumeration is completed. + **/ +void +usbd_start_re_enumerate(struct usb_device *udev) +{ + if (udev->re_enumerate_wait == 0) { + udev->re_enumerate_wait = 1; + usb_needs_explore(udev->bus, 0); + } +} Modified: stable/8/sys/dev/usb/usb_request.c == --- stable/8/sys/dev/usb/usb_request.c Wed Jun 22 07:18:14 2011 (r223413) +++ stable/8/sys/dev/usb/usb_request.c Wed Jun 22 08:01:44 2011 (r223414) @@ -238,6 +238,10 @@ usb_do_clear_stall_callback(struct usb_x swi
svn commit: r223415 - stable/8/sys/dev/usb/serial
Author: hselasky Date: Wed Jun 22 08:09:50 2011 New Revision: 223415 URL: http://svn.freebsd.org/changeset/base/223415 Log: MFC r219221: Remove dependency to ucom from ulpt. Modified: stable/8/sys/dev/usb/serial/ulpt.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) Modified: stable/8/sys/dev/usb/serial/ulpt.c == --- stable/8/sys/dev/usb/serial/ulpt.c Wed Jun 22 08:01:44 2011 (r223414) +++ stable/8/sys/dev/usb/serial/ulpt.c Wed Jun 22 08:09:50 2011 (r223415) @@ -743,5 +743,4 @@ static driver_t ulpt_driver = { DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass, NULL, 0); MODULE_DEPEND(ulpt, usb, 1, 1, 1); -MODULE_DEPEND(ulpt, ucom, 1, 1, 1); MODULE_VERSION(ulpt, 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: r223416 - head/sbin/ipfw
Author: glebius Date: Wed Jun 22 08:20:01 2011 New Revision: 223416 URL: http://svn.freebsd.org/changeset/base/223416 Log: One more braino from me. Pointy hat to:glebius Submitted by: Alexander V. Chernikov Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c == --- head/sbin/ipfw/nat.cWed Jun 22 08:09:50 2011(r223415) +++ head/sbin/ipfw/nat.cWed Jun 22 08:20:01 2011(r223416) @@ -785,8 +785,9 @@ ipfw_config_nat(int ac, char **av) len += estimate_redir_port(&ac1, &av1); av1 += 2; ac1 -= 2; /* Skip optional remoteIP/port */ - if (ac1 != 0 && isdigit(**av1)) + if (ac1 != 0 && isdigit(**av1)) { av1++; ac1--; + } break; case TOK_REDIR_PROTO: if (ac1 < 2) @@ -795,10 +796,12 @@ ipfw_config_nat(int ac, char **av) len += sizeof(struct cfg_redir); av1 += 2; ac1 -= 2; /* Skip optional remoteIP/port */ - if (ac1 != 0 && isdigit(**av1)) + if (ac1 != 0 && isdigit(**av1)) { av1++; ac1--; - if (ac1 != 0 && isdigit(**av1)) + } + if (ac1 != 0 && isdigit(**av1)) { av1++; ac1--; + } break; default: errx(EX_DATAERR, "unrecognised option ``%s''", av1[-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: r223417 - in stable/8/sys/dev/usb: . net
Author: hselasky Date: Wed Jun 22 08:22:29 2011 New Revision: 223417 URL: http://svn.freebsd.org/changeset/base/223417 Log: MFC r218864 and r223288. Add new USB ID's. Modified: stable/8/sys/dev/usb/net/if_udav.c stable/8/sys/dev/usb/usbdevs 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) Modified: stable/8/sys/dev/usb/net/if_udav.c == --- stable/8/sys/dev/usb/net/if_udav.c Wed Jun 22 08:20:01 2011 (r223416) +++ stable/8/sys/dev/usb/net/if_udav.c Wed Jun 22 08:22:29 2011 (r223417) @@ -206,6 +206,11 @@ static const struct usb_device_id udav_d {USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ST268, 0)}, /* Corega USB-TXC */ {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TXC, 0)}, + /* ShanTou AMD8515 USB NIC */ + {USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515, 0)}, + /* Kontron AG USB Ethernet */ + {USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_DM9601, 0)}, + {USB_VPI(USB_VENDOR_KONTRON, USB_PRODUCT_KONTRON_JP1082, 0)}, }; static void Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsWed Jun 22 08:20:01 2011 (r223416) +++ stable/8/sys/dev/usb/usbdevsWed Jun 22 08:22:29 2011 (r223417) @@ -551,6 +551,7 @@ vendor VTECH0x0f88 VTech vendor FALCOM 0x0f94 Falcom Wireless Communications GmbH vendor RIM 0x0fca Research In Motion vendor DYNASTREAM 0x0fcf Dynastream Innovations +vendor KONTRON 0x0fe6 Kontron AG vendor QUALCOMM0x1004 Qualcomm vendor APACER 0x1005 Apacer vendor MOTOROLA4 0x100d Motorola @@ -2009,6 +2010,10 @@ product KODAK DC290 0x0112 Digital Scie product KODAK DC2400x0120 Digital Science DC240 product KODAK DC2800x0130 Digital Science DC280 +/* Kontron AG products */ +product KONTRON DM9601 0x8101 USB Ethernet +product KONTRON JP1082 0x9700 USB Ethernet + /* Konica Corp. Products */ product KONICA CAMERA 0x0720 Digital Color Camera @@ -2858,6 +2863,7 @@ product SENAO RT3072_50x9801 RT3072 /* ShanTou products */ product SHANTOU ST268 0x0268 ST268 product SHANTOU DM9601 0x9601 DM 9601 +product SHANTOU ADM85150x8515 ADM8515 /* Shark products */ product SHARK PA 0x0400 Pocket Adapter ___ 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: r223418 - stable/8/sys/dev/usb
Author: hselasky Date: Wed Jun 22 08:52:16 2011 New Revision: 223418 URL: http://svn.freebsd.org/changeset/base/223418 Log: MFC r213852: - Add support for LibUSB in 32-bit compatibility mode. Modified: stable/8/sys/dev/usb/usb_ioctl.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) Modified: stable/8/sys/dev/usb/usb_ioctl.h == --- stable/8/sys/dev/usb/usb_ioctl.hWed Jun 22 08:22:29 2011 (r223417) +++ stable/8/sys/dev/usb/usb_ioctl.hWed Jun 22 08:52:16 2011 (r223418) @@ -41,13 +41,21 @@ #defineUSB_GENERIC_NAME "ugen" struct usb_read_dir { +#ifdef COMPAT_32BIT + uint64_t urd_data; +#else void *urd_data; +#endif uint32_t urd_startentry; uint32_t urd_maxlen; }; struct usb_ctl_request { +#ifdef COMPAT_32BIT + uint64_t ucr_data; +#else void *ucr_data; +#endif uint16_t ucr_flags; uint16_t ucr_actlen;/* actual length transferred */ uint8_t ucr_addr; /* zero - currently not used */ @@ -60,7 +68,11 @@ struct usb_alt_interface { }; struct usb_gen_descriptor { +#ifdef COMPAT_32BIT + uint64_t ugd_data; +#else void *ugd_data; +#endif uint16_t ugd_lang_id; uint16_t ugd_maxlen; uint16_t ugd_actlen; @@ -126,9 +138,14 @@ struct usb_fs_endpoint { * NOTE: isochronous USB transfer only use one buffer, but can have * multiple frame lengths ! */ +#ifdef COMPAT_32BIT + uint64_t ppBuffer; + uint64_t pLength; +#else void **ppBuffer; /* pointer to userland buffers */ uint32_t *pLength; /* pointer to frame lengths, updated * to actual length */ +#endif uint32_t nFrames; /* number of frames */ uint32_t aFrames; /* actual number of frames */ uint16_t flags; @@ -150,7 +167,11 @@ struct usb_fs_endpoint { struct usb_fs_init { /* userland pointer to endpoints structure */ +#ifdef COMPAT_32BIT + uint64_t pEndpoints; +#else struct usb_fs_endpoint *pEndpoints; +#endif /* maximum number of endpoints */ uint8_t ep_index_max; }; ___ 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: r223419 - stable/8/lib/libusb
Author: hselasky Date: Wed Jun 22 08:55:00 2011 New Revision: 223419 URL: http://svn.freebsd.org/changeset/base/223419 Log: MFC r210823, r211397, r210933, r219101, r213852, r213849 and r208020: - Add support for LibUSB in 32-bit compatibility mode. - Some manpage related fixes. Modified: stable/8/lib/libusb/Makefile stable/8/lib/libusb/libusb.3 stable/8/lib/libusb/libusb10_desc.c stable/8/lib/libusb/libusb10_io.c stable/8/lib/libusb/libusb20.3 stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20_int.h stable/8/lib/libusb/libusb20_ugen20.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/Makefile == --- stable/8/lib/libusb/MakefileWed Jun 22 08:52:16 2011 (r223418) +++ stable/8/lib/libusb/MakefileWed Jun 22 08:55:00 2011 (r223419) @@ -28,5 +28,180 @@ SRCS+= libusb10.c SRCS+= libusb10_desc.c SRCS+= libusb10_io.c +.if defined(COMPAT_32BIT) +CFLAGS+= -DCOMPAT_32BIT +.endif + .include +# LibUSB v1.0 +MLINKS += libusb.3 libusb_init.3 +MLINKS += libusb.3 libusb_exit.3 +MLINKS += libusb.3 libusb_strerror.3 +MLINKS += libusb.3 libusb_set_debug.3 +MLINKS += libusb.3 libusb_get_device_list.3 +MLINKS += libusb.3 libusb_free_device_list.3 +MLINKS += libusb.3 libusb_get_bus_number.3 +MLINKS += libusb.3 libusb_get_device_address.3 +MLINKS += libusb.3 libusb_get_max_packet_size.3 +MLINKS += libusb.3 libusb_ref_device.3 +MLINKS += libusb.3 libusb_unref_device.3 +MLINKS += libusb.3 libusb_open.3 +MLINKS += libusb.3 libusb_open_device_with_vid_pid.3 +MLINKS += libusb.3 libusb_close.3 +MLINKS += libusb.3 libusb_get_device.3 +MLINKS += libusb.3 libusb_get_configuration.3 +MLINKS += libusb.3 libusb_set_configuration.3 +MLINKS += libusb.3 libusb_claim_interface.3 +MLINKS += libusb.3 libusb_release_interface.3 +MLINKS += libusb.3 libusb_set_interface_alt_setting.3 +MLINKS += libusb.3 libusb_clear_halt.3 +MLINKS += libusb.3 libusb_reset_device.3 +MLINKS += libusb.3 libusb_check_connected.3 +MLINKS += libusb.3 libusb_kernel_driver_active.3 +MLINKS += libusb.3 libusb_get_driver.3 +MLINKS += libusb.3 libusb_get_driver_np.3 +MLINKS += libusb.3 libusb_detach_kernel_driver.3 +MLINKS += libusb.3 libusb_detach_kernel_driver_np.3 +MLINKS += libusb.3 libusb_attach_kernel_driver.3 +MLINKS += libusb.3 libusb_get_device_descriptor.3 +MLINKS += libusb.3 libsub_get_active_config_descriptor.3 +MLINKS += libusb.3 libusb_get_config_descriptor.3 +MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 +MLINKS += libusb.3 libusb_free_config_descriptor.3 +MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 +MLINKS += libusb.3 libusb_alloc_transfer.3 +MLINKS += libusb.3 libusb_free_transfer.3 +MLINKS += libusb.3 libusb_submit_transfer.3 +MLINKS += libusb.3 libusb_cancel_transfer.3 +MLINKS += libusb.3 libusb_control_transfer.3 +MLINKS += libusb.3 libusb_bulk_transfer.3 +MLINKS += libusb.3 libusb_interrupt_transfer.3 +MLINKS += libusb.3 libusb_try_lock_events.3 +MLINKS += libusb.3 libusb_lock_events.3 +MLINKS += libusb.3 libusb_unlock_events.3 +MLINKS += libusb.3 libusb_event_handling_ok.3 +MLINKS += libusb.3 libusb_event_handler_active.3 +MLINKS += libusb.3 libusb_lock_event_waiters.3 +MLINKS += libusb.3 libusb_unlock_event_waiters.3 +MLINKS += libusb.3 libusb_wait_for_event.3 +MLINKS += libusb.3 libusb_handle_events_timeout.3 +MLINKS += libusb.3 libusb_handle_events.3 +MLINKS += libusb.3 libusb_handle_events_locked.3 +MLINKS += libusb.3 libusb_get_next_timeout.3 +MLINKS += libusb.3 libusb_set_pollfd_notifiers.3 +MLINKS += libusb.3 libusb_get_pollfds.3 + +# LibUSB v0.1 +MLINKS += libusb.3 usb_open.3 +MLINKS += libusb.3 usb_close.3 +MLINKS += libusb.3 usb_get_string.3 +MLINKS += libusb.3 usb_get_string_simple.3 +MLINKS += libusb.3 usb_get_descriptor_by_endpoint.3 +MLINKS += libusb.3 usb_get_descriptor.3 +MLINKS += libusb.3 usb_parse_descriptor.3 +MLINKS += libusb.3 usb_parse_configuration.3 +MLINKS += libusb.3 usb_destroy_configuration.3 +MLINKS += libusb.3 usb_fetch_and_parse_descriptors.3 +MLINKS += libusb.3 usb_bulk_write.3 +MLINKS += libusb.3 usb_bulk_read.3 +MLINKS += libusb.3 usb_interrupt_write.3 +MLINKS += libusb.3 usb_interrupt_read.3 +MLINKS += libusb.3 usb_control_msg.3 +MLINKS += libusb.3 usb_set_configuration.3 +MLINKS += libusb.3 usb_claim_interface.3 +MLINKS += libusb.3 usb_release_interface.3 +MLINKS += libusb.3 usb_set_altinterface.3 +MLINKS += libusb.3 usb_resetep.3 +MLINKS += libusb.3 usb_clear_halt.3 +MLINKS += libusb.3 usb_reset.3 +MLINKS += libusb.3 usb_strerror.3 +MLINKS += libusb.3 usb_init.3 +MLINKS += libusb.3 usb_set_debug.3 +MLINKS += libusb.3 usb_find_busses.3 +MLINKS += libusb.3 usb_find_devices.3 +MLINKS += libusb.3 usb_device.3 +MLINKS += libusb.3 usb_get_busses.3 +MLINKS += libusb.3 usb_check_connected.3 + +# LibUSB v2.0 +MLINKS += libusb20.3 libu
svn commit: r223420 - stable/8/sys/dev/usb/wlan
Author: kevlo Date: Wed Jun 22 09:16:32 2011 New Revision: 223420 URL: http://svn.freebsd.org/changeset/base/223420 Log: MFC r221199: Guard against default ni_chan PR: kern/144642 Submitted by: Arthur Hartwig Modified: stable/8/sys/dev/usb/wlan/if_rum.c Modified: stable/8/sys/dev/usb/wlan/if_rum.c == --- stable/8/sys/dev/usb/wlan/if_rum.c Wed Jun 22 08:55:00 2011 (r223419) +++ stable/8/sys/dev/usb/wlan/if_rum.c Wed Jun 22 09:16:32 2011 (r223420) @@ -207,7 +207,7 @@ static void rum_init(void *); static voidrum_stop(struct rum_softc *); static voidrum_load_microcode(struct rum_softc *, const uint8_t *, size_t); -static int rum_prepare_beacon(struct rum_softc *, +static voidrum_prepare_beacon(struct rum_softc *, struct ieee80211vap *); static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); @@ -2118,7 +2118,7 @@ rum_load_microcode(struct rum_softc *sc, rum_pause(sc, hz / 8); } -static int +static void rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -2126,9 +2126,12 @@ rum_prepare_beacon(struct rum_softc *sc, struct rum_tx_desc desc; struct mbuf *m0; + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + return; + m0 = ieee80211_beacon_alloc(vap->iv_bss, &RUM_VAP(vap)->bo); if (m0 == NULL) { - return ENOBUFS; + return; } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)]; @@ -2143,8 +2146,6 @@ rum_prepare_beacon(struct rum_softc *sc, m0->m_pkthdr.len); m_freem(m0); - - return 0; } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r223307 - head/sys/vm
2011/6/22 Warner Losh : > > On Jun 21, 2011, at 5:27 PM, Alan Cox wrote: > > On 06/21/2011 16:09, Attilio Rao wrote: > > 2011/6/21 Bruce Evans: > > On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: > > On Jun 19, 2011, at 7:13 PM, Alan Cox wrote: > > Hi Alan, > > Author: alc > > Date: Sun Jun 19 19:13:24 2011 > > New Revision: 223307 > > URL: http://svn.freebsd.org/changeset/base/223307 > > Log: > > Precisely document the synchronization rules for the page's dirty field. > > (Saying that the lock on the object that the page belongs to must be > > held > > only represents one aspect of the rules.) > > Eliminate the use of the page queues lock for atomically performing > > read- > > modify-write operations on the dirty field when the underlying > > architecture > > supports atomic operations on char and short types. > > Document the fact that 32KB pages aren't really supported. > > contrary to the tinderbox I'd like to point out that all mips kernels > > built by universe are broken with a SVN HEAD from earlier today. Could you > > please check and see if you can fix it? The errors I get are: > > vm_page.o: In function `vm_page_clear_dirty': > > /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' > > /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 > > against `atomic_clear_8' > > vm_page.o: In function `vm_page_set_validclean': > > /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' > > /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 > > against `atomic_clear_8' > > Atomic types shorter than int cannot be used in MI code, since they might > > not exist. Apparently they don't exist on mips. jake@ fixed all their > > old uses for sparc4 in ~Y2K. > > I'm sure they do, they exist in support.S though and may not have the > > _8 form (they may just have the _char version). I may look at the code > > again to be sure. > > > It appears that while mips/include/atomic.h declares the existence of > atomic_clear_8, mips/mips/support.S doesn't implement it. In other words, > only support for int's and short's is currently implemented, not char's: > > # grep atomic_clear mips/mips/support.S > * atomic_clear_32(u_int32_t *a, u_int32_t b) > LEAF(atomic_clear_32) > END(atomic_clear_32) > * atomic_clear_16(u_int16_t *a, u_int16_t b) > LEAF(atomic_clear_16) > END(atomic_clear_16) > > The current crop of atomic*16 and atomic*8 functions have the restriction > that the address must be 32-bit aligned (and it forces this by aligning to > 32-bits silently and then operates on the low 8 or 16 bits in that word!) > I'm guessing that this is likely just wrong. Comments? > Warner That is wrong, of course, and my personal opinion is that one should not implement atomic operations if they cannot be done efficiently (example: if you need to disable interrupts or similar expensive operation just to assure atomicity of operation, just don't support it) as long as not having _8/_char is perfectly fine. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r223421 - head/sys/netinet/libalias
Author: ae Date: Wed Jun 22 09:55:28 2011 New Revision: 223421 URL: http://svn.freebsd.org/changeset/base/223421 Log: Document PKT_ALIAS_SKIP_GLOBAL option. Submitted by: Alexander V. Chernikov Modified: head/sys/netinet/libalias/libalias.3 Modified: head/sys/netinet/libalias/libalias.3 == --- head/sys/netinet/libalias/libalias.3Wed Jun 22 09:16:32 2011 (r223420) +++ head/sys/netinet/libalias/libalias.3Wed Jun 22 09:55:28 2011 (r223421) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2006 +.Dd June 22, 2011 .Dt LIBALIAS 3 .Os .Sh NAME @@ -257,6 +257,16 @@ Normal packet aliasing is not performed. See .Fn LibAliasProxyRule below for details. +.It Dv PKT_ALIAS_SKIP_GLOBAL +This option is used by +.Pa ipfw_nat +only. Specifying it as a flag to +.Fn LibAliasSetMode +has no effect. See section +.Sx NETWORK ADDRESS TRANSLATION +in +.Xr ipfw 8 +for more details. .El .Ed .Pp ___ 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: r222950 - in head: cddl/compat/opensolaris/include sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
on 10/06/2011 23:10 Justin T. Gibbs said the following: > Author: gibbs > Date: Fri Jun 10 20:10:30 2011 > New Revision: 222950 > URL: http://svn.freebsd.org/changeset/base/222950 > > Log: > Remove C constructs that are incompatible with C++ from various > OpenSolaris and ZFS header files. These changes are sufficient > to allow a C++ program to use the libzfs library. Is this going to affect any possible (but improbable?) merges from upstream? And/or from other ZFS/OpenSolaris forks (which should be more likely)? > Note: The majority of these files already included 'extern "C"' > declarations, so the intention of providing C++ compatibility > already existed even if it wasn't provided. > > cddl/compat/opensolaris/include/assert.h: > Wrap our compatibility assert implementation in > 'extern "C"'. Since this is a compatibility header > I matched the Solaris style of doing this explicitly > rather than rely on FreeBSD's __BEGIN/END_DECLS macro. > > sys/cddl/compat/opensolaris/sys/kstat.h: > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h: > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h: > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h: > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h: > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h: > Rename parameters in function declarations that conflict > with C++ keywords. This was the solution preferred by > members of the Illumos community. > > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h: > In C, nested structures are visible in the global namespace, > but in C++, they take on the namespace of the structure in > which they are contained. Flatten nested structure > definitions within struct zfs_cmd so these structures are > visible in the global namespace when compiled in both > languages. > > Sponsored by:Spectra Logic Corporation > > Modified: > head/cddl/compat/opensolaris/include/assert.h > head/sys/cddl/compat/opensolaris/sys/kstat.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h -- 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: r223307 - head/sys/vm
On Tuesday, June 21, 2011 4:58:10 pm Bruce Evans wrote: > On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: > > > On Jun 19, 2011, at 7:13 PM, Alan Cox wrote: > > > > Hi Alan, > > > >> Author: alc > >> Date: Sun Jun 19 19:13:24 2011 > >> New Revision: 223307 > >> URL: http://svn.freebsd.org/changeset/base/223307 > >> > >> Log: > >> Precisely document the synchronization rules for the page's dirty field. > >> (Saying that the lock on the object that the page belongs to must be held > >> only represents one aspect of the rules.) > >> > >> Eliminate the use of the page queues lock for atomically performing read- > >> modify-write operations on the dirty field when the underlying > >> architecture > >> supports atomic operations on char and short types. > >> > >> Document the fact that 32KB pages aren't really supported. > > > > contrary to the tinderbox I'd like to point out that all mips kernels built > > by universe are broken with a SVN HEAD from earlier today. Could you please check and see if you can fix it? The errors I get are: > > > > vm_page.o: In function `vm_page_clear_dirty': > > /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' > > /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 > > against `atomic_clear_8' > > vm_page.o: In function `vm_page_set_validclean': > > /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' > > /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 > > against `atomic_clear_8' > > Atomic types shorter than int cannot be used in MI code, since they might > not exist. Apparently they don't exist on mips. jake@ fixed all their > old uses for sparc4 in ~Y2K. I agree. Is there any harm in having the 'dirty' and 'valid' fields in vm_page always be at least of size 'int'? In the case of amd64, vm_page would change from a size of 120 bytes to 128. On i386 I think you'd end up changing the size from 68 to 76. (Using an int results in alignment padding after 'busy'.) Hmm, that's around 120k of extra vm_page_t space for a machine with 64M of RAM, so around 0.18% of RAM would be used on both platforms (presumably the usage would be similar on other platforms as well). At 24 GB of RAM, the extra space is just under 0.20% of RAM (48M). -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r223307 - head/sys/vm
2011/6/22 John Baldwin : > On Tuesday, June 21, 2011 4:58:10 pm Bruce Evans wrote: >> On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: >> >> > On Jun 19, 2011, at 7:13 PM, Alan Cox wrote: >> > >> > Hi Alan, >> > >> >> Author: alc >> >> Date: Sun Jun 19 19:13:24 2011 >> >> New Revision: 223307 >> >> URL: http://svn.freebsd.org/changeset/base/223307 >> >> >> >> Log: >> >> Precisely document the synchronization rules for the page's dirty field. >> >> (Saying that the lock on the object that the page belongs to must be held >> >> only represents one aspect of the rules.) >> >> >> >> Eliminate the use of the page queues lock for atomically performing read- >> >> modify-write operations on the dirty field when the underlying >> >> architecture >> >> supports atomic operations on char and short types. >> >> >> >> Document the fact that 32KB pages aren't really supported. >> > >> > contrary to the tinderbox I'd like to point out that all mips kernels >> > built by universe are broken with a SVN HEAD from earlier today. Could > you please check and see if you can fix it? The errors I get are: >> > >> > vm_page.o: In function `vm_page_clear_dirty': >> > /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' >> > /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 >> > against `atomic_clear_8' >> > vm_page.o: In function `vm_page_set_validclean': >> > /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' >> > /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 >> > against `atomic_clear_8' >> >> Atomic types shorter than int cannot be used in MI code, since they might >> not exist. Apparently they don't exist on mips. jake@ fixed all their >> old uses for sparc4 in ~Y2K. > > I agree. Is there any harm in having the 'dirty' and 'valid' fields in > vm_page always be at least of size 'int'? > > In the case of amd64, vm_page would change from a size of 120 bytes to 128. > > On i386 I think you'd end up changing the size from 68 to 76. > > (Using an int results in alignment padding after 'busy'.) > > Hmm, that's around 120k of extra vm_page_t space for a machine with 64M of > RAM, so around 0.18% of RAM would be used on both platforms (presumably the > usage would be similar on other platforms as well). At 24 GB of RAM, the > extra space is just under 0.20% of RAM (48M). I think that there is a bit of misunderstanding here. The idea here is to use just the atomic 8bits for the architectures that support it and otherwise use the vm_page_queue_lock. Anyway, as not all the architectures have this implementation, rather than replicate a lot of MD code to be used in MI, Alan just went with an explicit stub, where necessary. The real bug I see here is that we thought mips was supporting _8 atomic ops while it doesn't seem to be the case (sorry for being lazy on checking, but I nearly have 0 time). Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r223307 - head/sys/vm
On Jun 22, 2011, at 3:26 AM, Attilio Rao wrote: > 2011/6/22 Warner Losh : >> >> On Jun 21, 2011, at 5:27 PM, Alan Cox wrote: >> >> On 06/21/2011 16:09, Attilio Rao wrote: >> >> 2011/6/21 Bruce Evans: >> >> On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: >> >> On Jun 19, 2011, at 7:13 PM, Alan Cox wrote: >> >> Hi Alan, >> >> Author: alc >> >> Date: Sun Jun 19 19:13:24 2011 >> >> New Revision: 223307 >> >> URL: http://svn.freebsd.org/changeset/base/223307 >> >> Log: >> >> Precisely document the synchronization rules for the page's dirty field. >> >> (Saying that the lock on the object that the page belongs to must be >> >> held >> >> only represents one aspect of the rules.) >> >> Eliminate the use of the page queues lock for atomically performing >> >> read- >> >> modify-write operations on the dirty field when the underlying >> >> architecture >> >> supports atomic operations on char and short types. >> >> Document the fact that 32KB pages aren't really supported. >> >> contrary to the tinderbox I'd like to point out that all mips kernels >> >> built by universe are broken with a SVN HEAD from earlier today. Could you >> >> please check and see if you can fix it? The errors I get are: >> >> vm_page.o: In function `vm_page_clear_dirty': >> >> /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' >> >> /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 >> >> against `atomic_clear_8' >> >> vm_page.o: In function `vm_page_set_validclean': >> >> /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' >> >> /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 >> >> against `atomic_clear_8' >> >> Atomic types shorter than int cannot be used in MI code, since they might >> >> not exist. Apparently they don't exist on mips. jake@ fixed all their >> >> old uses for sparc4 in ~Y2K. >> >> I'm sure they do, they exist in support.S though and may not have the >> >> _8 form (they may just have the _char version). I may look at the code >> >> again to be sure. >> >> >> It appears that while mips/include/atomic.h declares the existence of >> atomic_clear_8, mips/mips/support.S doesn't implement it. In other words, >> only support for int's and short's is currently implemented, not char's: >> >> # grep atomic_clear mips/mips/support.S >> * atomic_clear_32(u_int32_t *a, u_int32_t b) >> LEAF(atomic_clear_32) >> END(atomic_clear_32) >> * atomic_clear_16(u_int16_t *a, u_int16_t b) >> LEAF(atomic_clear_16) >> END(atomic_clear_16) >> >> The current crop of atomic*16 and atomic*8 functions have the restriction >> that the address must be 32-bit aligned (and it forces this by aligning to >> 32-bits silently and then operates on the low 8 or 16 bits in that word!) >> I'm guessing that this is likely just wrong. Comments? >> Warner > > That is wrong, of course, and my personal opinion is that one should > not implement atomic operations if they cannot be done efficiently > (example: if you need to disable interrupts or similar expensive > operation just to assure atomicity of operation, just don't support > it) as long as not having _8/_char is perfectly fine. I think it can be efficient, for some reasonable definition of efficient. The masking and shifting operations aren't that onerous to write and the instructions cycles would be dwarfed by the ll/sc pair, which are required to implement atomic. The issue is that the code today is clearly wrong and needs to be fixed. Warner___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r223424 - in head/sys: amd64/pci dev/acpica i386/pci
Author: jhb Date: Wed Jun 22 16:15:15 2011 New Revision: 223424 URL: http://svn.freebsd.org/changeset/base/223424 Log: Add a helper routine to conditionally modify the start address of a resource allocation from an x86 Host-PCI bridge driver so that it can be reused by the ACPI Host-PCI bridge driver (and eventually the MPTable Host-PCI bridge driver) instead of duplicating the same logic. Note that this means that hw.acpi.host_mem_start is now replaced with the hw.pci.host_mem_start tunable that was already used in the non-ACPI case. This also removes hw.acpi.host_mem_start on ia64 where it was not applicable (the implementation was very x86-specific). While here, adjust the logic to apply the new start address on any "wildcard" allocation even if that allocation comes from a subset of the allowable address range. Reviewed by: imp (1) Modified: head/sys/amd64/pci/pci_bus.c head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/i386/pci/pci_bus.c Modified: head/sys/amd64/pci/pci_bus.c == --- head/sys/amd64/pci/pci_bus.cWed Jun 22 14:33:16 2011 (r223423) +++ head/sys/amd64/pci/pci_bus.cWed Jun 22 16:15:15 2011 (r223424) @@ -302,35 +302,45 @@ legacy_pcib_write_ivar(device_t dev, dev return ENOENT; } +/* + * Helper routine for x86 Host-PCI bridge driver resource allocation. + * This is used to adjust the start address of wildcard allocation + * requests to avoid low addresses that are known to be problematic. + * + * If no memory preference is given, use upper 32MB slot most BIOSes + * use for their memory window. This is typically only used on older + * laptops that don't have PCI busses behind a PCI bridge, so assuming + * > 32MB is likely OK. + * + * However, this can cause problems for other chipsets, so we make + * this tunable by hw.pci.host_mem_start. + */ SYSCTL_DECL(_hw_pci); -static unsigned long legacy_host_mem_start = 0x8000; -TUNABLE_ULONG("hw.pci.host_mem_start", &legacy_host_mem_start); -SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, -&legacy_host_mem_start, 0x8000, -"Limit the host bridge memory to being above this address. Must be\n\ -set at boot via a tunable."); +static unsigned long host_mem_start = 0x8000; +TUNABLE_ULONG("hw.pci.host_mem_start", &host_mem_start); +SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, &host_mem_start, +0, "Limit the host bridge memory to being above this address."); + +u_long +hostb_alloc_start(int type, u_long start, u_long end, u_long count) +{ + + if (start + count - 1 != end) { + if (type == SYS_RES_MEMORY && start < host_mem_start) + start = host_mem_start; + if (type == SYS_RES_IOPORT && start < 0x1000) + start = 0x1000; + } + return (start); +} struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { -/* - * If no memory preference is given, use upper 32MB slot most - * bioses use for their memory window. Typically other bridges - * before us get in the way to assert their preferences on memory. - * Hardcoding like this sucks, so a more MD/MI way needs to be - * found to do it. This is typically only used on older laptops - * that don't have pci busses behind pci bridge, so assuming > 32MB - * is liekly OK. - * - * However, this can cause problems for other chipsets, so we make - * this tunable by hw.pci.host_mem_start. - */ -if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) - start = legacy_host_mem_start; -if (type == SYS_RES_IOPORT && start == 0UL && end == ~0UL) - start = 0x1000; + +start = hostb_alloc_start(type, start, end, count); return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } Modified: head/sys/dev/acpica/acpi_pcib_acpi.c == --- head/sys/dev/acpica/acpi_pcib_acpi.cWed Jun 22 14:33:16 2011 (r223423) +++ head/sys/dev/acpica/acpi_pcib_acpi.cWed Jun 22 16:15:15 2011 (r223424) @@ -357,32 +357,14 @@ acpi_pcib_map_msi(device_t pcib, device_ return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } -static u_long acpi_host_mem_start = 0x8000; -TUNABLE_ULONG("hw.acpi.host_mem_start", &acpi_host_mem_start); - struct resource * acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { -/* - * If no memory preference is given, use upper 32MB slot most - * bioses use for their memory window. Typically other bridges - * before us get in the way to assert their preferences on memory. - *
svn commit: r223426 - in head/sys: dev/acpica kern sys x86/x86
Author: jkim Date: Wed Jun 22 16:40:45 2011 New Revision: 223426 URL: http://svn.freebsd.org/changeset/base/223426 Log: Set negative quality to TSC timecounter when C3 state is enabled for Intel processors unless the invariant TSC bit of CPUID is set. Intel processors may stop incrementing TSC when DPSLP# pin is asserted, according to Intel processor manuals, i. e., TSC timecounter is useless if the processor can enter deep sleep state (C3/C4). This problem was accidentally uncovered by r222869, which increased timecounter quality of P-state invariant TSC, e.g., for Core2 Duo T5870 (Family 6, Model f) and Atom N270 (Family 6, Model 1c). Reported by: Fabian Keil (freebsd-listen at fabiankeil dot de) Ian FREISLICH (ianf at clue dot co dot za) Tested by:Fabian Keil (freebsd-listen at fabiankeil dot de) - Core2 Duo T5870 (C3 state available/enabled) jkim - Xeon X5150 (C3 state unavailable) Modified: head/sys/dev/acpica/acpi_cpu.c head/sys/kern/kern_clocksource.c head/sys/sys/systm.h head/sys/x86/x86/tsc.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Wed Jun 22 16:26:21 2011 (r223425) +++ head/sys/dev/acpica/acpi_cpu.c Wed Jun 22 16:40:45 2011 (r223426) @@ -856,6 +856,8 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) sc->cpu_non_c3 = i; + else + cpu_can_deep_sleep = 1; } sbuf_trim(&sb); sbuf_finish(&sb); Modified: head/sys/kern/kern_clocksource.c == --- head/sys/kern/kern_clocksource.cWed Jun 22 16:26:21 2011 (r223425) +++ head/sys/kern/kern_clocksource.cWed Jun 22 16:40:45 2011 (r223426) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); cyclic_clock_func_tcyclic_clock_func = NULL; #endif +intcpu_can_deep_sleep = 0; /* C3 state is available. */ intcpu_disable_deep_sleep = 0; /* Timer dies in C3. */ static voidsetuptimer(void); Modified: head/sys/sys/systm.h == --- head/sys/sys/systm.hWed Jun 22 16:26:21 2011(r223425) +++ head/sys/sys/systm.hWed Jun 22 16:40:45 2011(r223426) @@ -253,6 +253,7 @@ voidcpu_startprofclock(void); void cpu_stopprofclock(void); void cpu_idleclock(void); void cpu_activeclock(void); +extern int cpu_can_deep_sleep; extern int cpu_disable_deep_sleep; intcr_cansee(struct ucred *u1, struct ucred *u2); Modified: head/sys/x86/x86/tsc.c == --- head/sys/x86/x86/tsc.c Wed Jun 22 16:26:21 2011(r223425) +++ head/sys/x86/x86/tsc.c Wed Jun 22 16:40:45 2011(r223426) @@ -444,6 +444,19 @@ init_TSC_tc(void) goto init; } + /* +* We cannot use the TSC if it stops incrementing in deep sleep. +* Currently only Intel CPUs are known for this problem unless +* the invariant TSC bit is set. +*/ + if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && + (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { + tsc_timecounter.tc_quality = -1000; + if (bootverbose) + printf("TSC timecounter disabled: C3 enabled.\n"); + goto init; + } + #ifdef SMP /* * We can not use the TSC in SMP mode unless the TSCs on all CPUs 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"
Re: svn commit: r223426 - in head/sys: dev/acpica kern sys x86/x86
on 22/06/2011 19:40 Jung-uk Kim said the following: > Author: jkim > Date: Wed Jun 22 16:40:45 2011 > New Revision: 223426 > URL: http://svn.freebsd.org/changeset/base/223426 > > Log: > Set negative quality to TSC timecounter when C3 state is enabled for Intel > processors unless the invariant TSC bit of CPUID is set. Intel processors > may stop incrementing TSC when DPSLP# pin is asserted, according to Intel > processor manuals, i. e., TSC timecounter is useless if the processor can > enter deep sleep state (C3/C4). This problem was accidentally uncovered by > r222869, which increased timecounter quality of P-state invariant TSC, e.g., > for Core2 Duo T5870 (Family 6, Model f) and Atom N270 (Family 6, Model 1c). > > Reported by:Fabian Keil (freebsd-listen at fabiankeil dot de) > Ian FREISLICH (ianf at clue dot co dot za) > Tested by: Fabian Keil (freebsd-listen at fabiankeil dot de) > - Core2 Duo T5870 (C3 state available/enabled) > jkim - Xeon X5150 (C3 state unavailable) I think that this change should have a counterpart similar to what was done for event timers. That is, if a user forces use of TSC as a timecounter vis sysctl and it is known that TSC stops in the deep C-state, then the deep C-states should not be entered. This is what cpu_disable_deep_sleep does for LAPIC timers. > Modified: > head/sys/dev/acpica/acpi_cpu.c > head/sys/kern/kern_clocksource.c > head/sys/sys/systm.h > head/sys/x86/x86/tsc.c > > Modified: head/sys/dev/acpica/acpi_cpu.c > == > --- head/sys/dev/acpica/acpi_cpu.cWed Jun 22 16:26:21 2011 > (r223425) > +++ head/sys/dev/acpica/acpi_cpu.cWed Jun 22 16:40:45 2011 > (r223426) > @@ -856,6 +856,8 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * > sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); > if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) > sc->cpu_non_c3 = i; > + else > + cpu_can_deep_sleep = 1; > } > sbuf_trim(&sb); > sbuf_finish(&sb); > > Modified: head/sys/kern/kern_clocksource.c > == > --- head/sys/kern/kern_clocksource.c Wed Jun 22 16:26:21 2011 > (r223425) > +++ head/sys/kern/kern_clocksource.c Wed Jun 22 16:40:45 2011 > (r223426) > @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); > cyclic_clock_func_t cyclic_clock_func = NULL; > #endif > > +int cpu_can_deep_sleep = 0; /* C3 state is available. */ > int cpu_disable_deep_sleep = 0; /* Timer dies in C3. */ > > static void setuptimer(void); > > Modified: head/sys/sys/systm.h > == > --- head/sys/sys/systm.h Wed Jun 22 16:26:21 2011(r223425) > +++ head/sys/sys/systm.h Wed Jun 22 16:40:45 2011(r223426) > @@ -253,6 +253,7 @@ void cpu_startprofclock(void); > void cpu_stopprofclock(void); > void cpu_idleclock(void); > void cpu_activeclock(void); > +extern int cpu_can_deep_sleep; > extern int cpu_disable_deep_sleep; > > int cr_cansee(struct ucred *u1, struct ucred *u2); > > Modified: head/sys/x86/x86/tsc.c > == > --- head/sys/x86/x86/tsc.cWed Jun 22 16:26:21 2011(r223425) > +++ head/sys/x86/x86/tsc.cWed Jun 22 16:40:45 2011(r223426) > @@ -444,6 +444,19 @@ init_TSC_tc(void) > goto init; > } > > + /* > + * We cannot use the TSC if it stops incrementing in deep sleep. > + * Currently only Intel CPUs are known for this problem unless > + * the invariant TSC bit is set. > + */ > + if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && > + (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { > + tsc_timecounter.tc_quality = -1000; > + if (bootverbose) > + printf("TSC timecounter disabled: C3 enabled.\n"); > + goto init; > + } > + > #ifdef SMP > /* >* We can not use the TSC in SMP mode unless the TSCs on all CPUs are -- 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
On Wednesday 22 June 2011 12:47 pm, Andriy Gapon wrote: > on 22/06/2011 19:40 Jung-uk Kim said the following: > > Author: jkim > > Date: Wed Jun 22 16:40:45 2011 > > New Revision: 223426 > > URL: http://svn.freebsd.org/changeset/base/223426 > > > > Log: > > Set negative quality to TSC timecounter when C3 state is > > enabled for Intel processors unless the invariant TSC bit of > > CPUID is set. Intel processors may stop incrementing TSC when > > DPSLP# pin is asserted, according to Intel processor manuals, i. > > e., TSC timecounter is useless if the processor can enter deep > > sleep state (C3/C4). This problem was accidentally uncovered by > > r222869, which increased timecounter quality of P-state invariant > > TSC, e.g., for Core2 Duo T5870 (Family 6, Model f) and Atom N270 > > (Family 6, Model 1c). > > > > Reported by: Fabian Keil (freebsd-listen at fabiankeil dot de) > > Ian FREISLICH (ianf at clue dot co dot za) > > Tested by:Fabian Keil (freebsd-listen at fabiankeil dot de) > > - Core2 Duo T5870 (C3 state available/enabled) > > jkim - Xeon X5150 (C3 state unavailable) > > I think that this change should have a counterpart similar to what > was done for event timers. That is, if a user forces use of TSC as > a timecounter vis sysctl and it is known that TSC stops in the deep > C-state, then the deep C-states should not be entered. This is > what cpu_disable_deep_sleep does for LAPIC timers. Yes. We have to teach tc_windup() to increase/decrease cpu_disable_deep_sleep. Currently, the user must disable C3 and force TSC timecounter manually if power consumption is not important, e.g., /etc/rc.conf: economy_cx_lowest="C2" /etc/sysctl.conf: kern.timecounter.hardware=TSC Jung-uk Kim ___ 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: r223428 - in head/sys: amd64/pci i386/pci
Author: jhb Date: Wed Jun 22 17:55:16 2011 New Revision: 223428 URL: http://svn.freebsd.org/changeset/base/223428 Log: Use uintXX_t instead of u_intXX_t. Modified: head/sys/amd64/pci/pci_bus.c head/sys/i386/pci/pci_bus.c Modified: head/sys/amd64/pci/pci_bus.c == --- head/sys/amd64/pci/pci_bus.cWed Jun 22 17:31:50 2011 (r223427) +++ head/sys/amd64/pci/pci_bus.cWed Jun 22 17:55:16 2011 (r223428) @@ -135,7 +135,7 @@ static void legacy_pcib_identify(driver_t *driver, device_t parent) { int bus, slot, func; - u_int8_t hdrtype; + uint8_t hdrtype; int found = 0; int pcifunchigh; int found824xx = 0; @@ -178,8 +178,8 @@ legacy_pcib_identify(driver_t *driver, d /* * Read the IDs and class from the device. */ - u_int32_t id; - u_int8_t class, subclass, busnum; + uint32_t id; + uint8_t class, subclass, busnum; const char *s; device_t *devs; int ndevs, i; Modified: head/sys/i386/pci/pci_bus.c == --- head/sys/i386/pci/pci_bus.c Wed Jun 22 17:31:50 2011(r223427) +++ head/sys/i386/pci/pci_bus.c Wed Jun 22 17:55:16 2011(r223428) @@ -62,7 +62,7 @@ legacy_pcib_maxslots(device_t dev) /* read configuration space register */ -u_int32_t +uint32_t legacy_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, int bytes) { @@ -73,7 +73,7 @@ legacy_pcib_read_config(device_t dev, u_ void legacy_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, -u_int reg, u_int32_t data, int bytes) +u_int reg, uint32_t data, int bytes) { pci_cfgregwrite(bus, slot, func, reg, data, bytes); } @@ -342,7 +342,7 @@ static void legacy_pcib_identify(driver_t *driver, device_t parent) { int bus, slot, func; - u_int8_t hdrtype; + uint8_t hdrtype; int found = 0; int pcifunchigh; int found824xx = 0; @@ -385,8 +385,8 @@ legacy_pcib_identify(driver_t *driver, d /* * Read the IDs and class from the device. */ - u_int32_t id; - u_int8_t class, subclass, busnum; + uint32_t id; + uint8_t class, subclass, busnum; const char *s; device_t *devs; int ndevs, i; ___ 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: r223429 - head/sbin/growfs
Author: trasz Date: Wed Jun 22 17:59:53 2011 New Revision: 223429 URL: http://svn.freebsd.org/changeset/base/223429 Log: Cosmetic fixes; mostly s/file system/filesystem/g and removing weird indent from messages. Modified: head/sbin/growfs/growfs.8 head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.8 == --- head/sbin/growfs/growfs.8 Wed Jun 22 17:55:16 2011(r223428) +++ head/sbin/growfs/growfs.8 Wed Jun 22 17:59:53 2011(r223429) @@ -37,12 +37,12 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd May 8, 2011 +.Dd June 22, 2011 .Dt GROWFS 8 .Os .Sh NAME .Nm growfs -.Nd grow size of an existing UFS file system +.Nd expand an existing UFS filesystem .Sh SYNOPSIS .Nm .Op Fl Ny @@ -58,26 +58,26 @@ Before starting .Nm the disk must be labeled to a bigger size using .Xr bsdlabel 8 . -If you wish to grow a file system beyond the boundary of -the slice it resides in, you must re-size the slice using -.Xr fdisk 8 +If you wish to grow a filesystem beyond the boundary of +the slice it resides in, you must resize the slice using +.Xr gpart 8 before running .Nm . If you are using volumes you must enlarge them by using -.Xr vinum 8 . +.Xr gvinum 8 . The .Nm -utility extends the size of the file system on the specified special file. +utility extends the size of the filesystem on the specified special file. Currently .Nm -can only enlarge unmounted file systems. -Do not try enlarging a mounted file system, your system may panic and you will -not be able to use the file system any longer. +can only enlarge unmounted filesystems. +Do not try enlarging a mounted filesystem, your system may panic and you will +not be able to use the filesystem any longer. Most of the .Xr newfs 8 options cannot be changed by .Nm . -In fact, you can only increase the size of the file system. +In fact, you can only increase the size of the filesystem. Use .Xr tunefs 8 for other changes. @@ -86,8 +86,8 @@ The following options are available: .Bl -tag -width indent .It Fl N .Dq Test mode . -Causes the new file system parameters to be printed out without actually -enlarging the file system. +Causes the new filesystem parameters to be printed out without actually +enlarging the filesystem. .It Fl y .Dq Expert mode . Usually @@ -102,12 +102,12 @@ So use this option with great care! .It Fl s Ar size Determines the .Ar size -of the file system after enlarging in sectors. +of the filesystem after enlarging in sectors. This value defaults to the size of the raw partition specified in .Ar special (in other words, .Nm -will enlarge the file system to the size of the entire partition). +will enlarge the filesystem to the size of the entire partition). .El .Sh EXAMPLES .Dl growfs -s 4194304 /dev/vinum/testvol @@ -119,12 +119,12 @@ up to 2GB if there is enough space in .Sh SEE ALSO .Xr bsdlabel 8 , .Xr dumpfs 8 , -.Xr fdisk 8 , .Xr ffsinfo 8 , .Xr fsck 8 , +.Xr gpart 8 , .Xr newfs 8 , .Xr tunefs 8 , -.Xr vinum 8 +.Xr gvinum 8 .Sh HISTORY The .Nm @@ -144,12 +144,12 @@ There may be cases on .Fx 3.x only, when .Nm -does not recognize properly whether or not the file system is mounted and +does not recognize properly whether or not the filesystem is mounted and exits with an error message. Then please use .Nm .Fl y -if you are sure that the file system is not mounted. +if you are sure that the filesystem is not mounted. It is also recommended to always use .Xr fsck 8 after enlarging (just to be on the safe side). @@ -183,8 +183,8 @@ on the first cylinder group to verify th in the CYLINDER SUMMARY (internal cs) of the CYLINDER GROUP .Em cgr0 has enough blocks. -As a rule of thumb for default file system parameters one block is needed for -every 2 GB of total file system size. +As a rule of thumb for default filesystem parameters one block is needed for +every 2 GB of total filesystem size. .Pp Normally .Nm Modified: head/sbin/growfs/growfs.c == --- head/sbin/growfs/growfs.c Wed Jun 22 17:55:16 2011(r223428) +++ head/sbin/growfs/growfs.c Wed Jun 22 17:59:53 2011(r223429) @@ -160,7 +160,7 @@ static void get_dev_size(int, int *); /* growfs * */ /* - * Here we actually start growing the file system. We basically read the + * Here we actually start growing the filesystem. We basically read the * cylinder summary from the first cylinder group as we want to update * this on the fly during our various operations. First we handle the * changes in the former last cylinder group. Afterwards we create all new @@ -231,7 +231,7 @@ growfs(int fsi, int fso, unsigned int Nf updjcg(osblock.fs_ncg-1, modtime, fsi, fso, Nflag); /* -* Dump out summary inform
svn commit: r223430 - in head/sbin: newfs tunefs
Author: trasz Date: Wed Jun 22 18:02:28 2011 New Revision: 223430 URL: http://svn.freebsd.org/changeset/base/223430 Log: Advertise growfs(8) a little better. Modified: head/sbin/newfs/newfs.8 head/sbin/tunefs/tunefs.8 Modified: head/sbin/newfs/newfs.8 == --- head/sbin/newfs/newfs.8 Wed Jun 22 17:59:53 2011(r223429) +++ head/sbin/newfs/newfs.8 Wed Jun 22 18:02:28 2011(r223430) @@ -28,7 +28,7 @@ .\" @(#)newfs.88.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd May 25, 2011 +.Dd June 22, 2011 .Dt NEWFS 8 .Os .Sh NAME @@ -297,6 +297,7 @@ on file systems that contain many small .Xr dumpfs 8 , .Xr fsck 8 , .Xr gjournal 8 , +.Xr growfs 8 , .Xr makefs 8 , .Xr mount 8 , .Xr tunefs 8 , Modified: head/sbin/tunefs/tunefs.8 == --- head/sbin/tunefs/tunefs.8 Wed Jun 22 17:59:53 2011(r223429) +++ head/sbin/tunefs/tunefs.8 Wed Jun 22 18:02:28 2011(r223430) @@ -28,7 +28,7 @@ .\" @(#)tunefs.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd May 8, 2011 +.Dd June 22, 2011 .Dt TUNEFS 8 .Os .Sh NAME @@ -165,6 +165,7 @@ specified mount point. .Xr fs 5 , .Xr dumpfs 8 , .Xr gjournal 8 , +.Xr growfs 8 , .Xr newfs 8 .Rs .%A M. McKusick ___ 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: r223431 - in stable/8/sys/dev/usb: . serial
Author: gavin Date: Wed Jun 22 18:18:05 2011 New Revision: 223431 URL: http://svn.freebsd.org/changeset/base/223431 Log: Merge r217202 from head: Add support for the Zeagle N2iTion3 Dive Computer to uplcom(4). Requested by: hselasky Modified: stable/8/sys/dev/usb/serial/uplcom.c stable/8/sys/dev/usb/usbdevs 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) Modified: stable/8/sys/dev/usb/serial/uplcom.c == --- stable/8/sys/dev/usb/serial/uplcom.cWed Jun 22 18:02:28 2011 (r223430) +++ stable/8/sys/dev/usb/serial/uplcom.cWed Jun 22 18:18:05 2011 (r223431) @@ -257,6 +257,7 @@ static const struct usb_device_id uplcom UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 USB to Serial */ UPLCOM_DEV(COREGA, CGUSBRS232R),/* Corega CG-USBRS232R */ UPLCOM_DEV(EPSON, CRESSI_EDY), /* Cressi Edy diving computer */ + UPLCOM_DEV(EPSON, N2ITION3),/* Zeagle N2iTion3 diving computer */ UPLCOM_DEV(ELECOM, UCSGT), /* ELECOM UC-SGT Serial Adapter */ UPLCOM_DEV(ELECOM, UCSGT0), /* ELECOM UC-SGT Serial Adapter */ UPLCOM_DEV(HAL, IMR001),/* HAL Corporation Crossam2+USB */ Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsWed Jun 22 18:02:28 2011 (r223430) +++ stable/8/sys/dev/usb/usbdevsWed Jun 22 18:18:05 2011 (r223431) @@ -1536,6 +1536,7 @@ product EPSON 24800x0121 Perfection 24 product EPSON 3590 0x0122 Perfection 3590 scanner product EPSON 4990 0x012a Perfection 4990 Photo scanner product EPSON CRESSI_EDY 0x0521 Cressi Edy diving computer +product EPSON N2ITION3 0x0522 Zeagle N2iTion3 diving computer product EPSON STYLUS_875DC 0x0601 Stylus Photo 875DC Card Reader product EPSON STYLUS_895 0x0602 Stylus Photo 895 Card Reader product EPSON CX5400 0x0808 CX5400 scanner ___ 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: r223432 - svnadmin/conf
Author: jhb Date: Wed Jun 22 18:22:53 2011 New Revision: 223432 URL: http://svn.freebsd.org/changeset/base/223432 Log: Take mux's commit bit into safekeeping per his request. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access == --- svnadmin/conf/accessWed Jun 22 18:18:05 2011(r223431) +++ svnadmin/conf/accessWed Jun 22 18:22:53 2011(r223432) @@ -166,7 +166,6 @@ mp mpp mr mtm -mux n_hibmadevnull neel netchild ___ 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: r223433 - in head/sys: amd64/include i386/include
Author: jhb Date: Wed Jun 22 18:48:07 2011 New Revision: 223433 URL: http://svn.freebsd.org/changeset/base/223433 Log: Oops, missed these in 223424. Reported by: jkim Modified: head/sys/amd64/include/pci_cfgreg.h head/sys/i386/include/pci_cfgreg.h Modified: head/sys/amd64/include/pci_cfgreg.h == --- head/sys/amd64/include/pci_cfgreg.h Wed Jun 22 18:22:53 2011 (r223432) +++ head/sys/amd64/include/pci_cfgreg.h Wed Jun 22 18:48:07 2011 (r223433) @@ -37,6 +37,7 @@ #define CONF1_ENABLE_MSK1 0x8001ul #define CONF1_ENABLE_RES1 0x8000ul +u_long hostb_alloc_start(int type, u_long start, u_long end, u_long count); intpcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); intpci_cfgregopen(void); u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); Modified: head/sys/i386/include/pci_cfgreg.h == --- head/sys/i386/include/pci_cfgreg.h Wed Jun 22 18:22:53 2011 (r223432) +++ head/sys/i386/include/pci_cfgreg.h Wed Jun 22 18:48:07 2011 (r223433) @@ -43,6 +43,7 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e +u_long hostb_alloc_start(int type, u_long start, u_long end, u_long count); intpcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); intpci_cfgregopen(void); u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); ___ 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
On Wednesday 22 June 2011 12:47 pm, Andriy Gapon wrote: > on 22/06/2011 19:40 Jung-uk Kim said the following: > > Author: jkim > > Date: Wed Jun 22 16:40:45 2011 > > New Revision: 223426 > > URL: http://svn.freebsd.org/changeset/base/223426 > > > > Log: > > Set negative quality to TSC timecounter when C3 state is > > enabled for Intel processors unless the invariant TSC bit of > > CPUID is set. Intel processors may stop incrementing TSC when > > DPSLP# pin is asserted, according to Intel processor manuals, i. > > e., TSC timecounter is useless if the processor can enter deep > > sleep state (C3/C4). This problem was accidentally uncovered by > > r222869, which increased timecounter quality of P-state invariant > > TSC, e.g., for Core2 Duo T5870 (Family 6, Model f) and Atom N270 > > (Family 6, Model 1c). > > > > Reported by: Fabian Keil (freebsd-listen at fabiankeil dot de) > > Ian FREISLICH (ianf at clue dot co dot za) > > Tested by:Fabian Keil (freebsd-listen at fabiankeil dot de) > > - Core2 Duo T5870 (C3 state available/enabled) > > jkim - Xeon X5150 (C3 state unavailable) > > I think that this change should have a counterpart similar to what > was done for event timers. That is, if a user forces use of TSC as > a timecounter vis sysctl and it is known that TSC stops in the deep > C-state, then the deep C-states should not be entered. This is > what cpu_disable_deep_sleep does for LAPIC timers. Can you please review/test the attached patch? Also available from here: http://people.freebsd.org/~jkim/tc_c3stop.diff Thanks! Jung-uk Kim Index: sys/kern/kern_tc.c === --- sys/kern/kern_tc.c (revision 223426) +++ sys/kern/kern_tc.c (working copy) @@ -492,6 +492,10 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { + if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) + cpu_disable_deep_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) + cpu_disable_deep_sleep--; th->th_counter = timecounter; th->th_offset_count = ncount; tc_min_ticktock_freq = max(1, timecounter->tc_frequency / Index: sys/sparc64/sparc64/counter.c === --- sys/sparc64/sparc64/counter.c (revision 223426) +++ sys/sparc64/sparc64/counter.c (working copy) @@ -98,6 +98,7 @@ sparc64_counter_init(const char *name, bus_space_t tc->tc_name = strdup(name, M_DEVBUF); tc->tc_priv = sc; tc->tc_quality = COUNTER_QUALITY; + tc->tc_flags = 0; tc_init(tc); } Index: sys/sys/timetc.h === --- sys/sys/timetc.h(revision 223426) +++ sys/sys/timetc.h(working copy) @@ -57,6 +57,8 @@ struct timecounter { * another timecounter higher means better. Negative * means "only use at explicit request". */ + u_int tc_flags; +#defineTC_FLAGS_C3STOP 1 /* Timer dies in C3. */ void*tc_priv; /* Pointer to the timecounter's private parts. */ Index: sys/x86/x86/tsc.c === --- sys/x86/x86/tsc.c (revision 223426) +++ sys/x86/x86/tsc.c (working copy) @@ -451,6 +451,7 @@ init_TSC_tc(void) */ if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { + tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP; tsc_timecounter.tc_quality = -1000; if (bootverbose) printf("TSC timecounter disabled: C3 enabled.\n"); ___ 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: r223307 - head/sys/vm
On Wed, 22 Jun 2011, John Baldwin wrote: On Tuesday, June 21, 2011 4:58:10 pm Bruce Evans wrote: On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: ... vm_page.o: In function `vm_page_clear_dirty': /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' vm_page.o: In function `vm_page_set_validclean': /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' Atomic types shorter than int cannot be used in MI code, since they might not exist. Apparently they don't exist on mips. jake@ fixed all their old uses for sparc4 in ~Y2K. I agree. Is there any harm in having the 'dirty' and 'valid' fields in vm_page always be at least of size 'int'? In the case of amd64, vm_page would change from a size of 120 bytes to 128. On i386 I think you'd end up changing the size from 68 to 76. (Using an int results in alignment padding after 'busy'.) That is quite a bit. Perhaps the struct should be packed better so that each char -> int expansion takes <= 3 bytes instead of >= 4. The expansion might even be negative. It is only moderately well packed now. Hmm, that's around 120k of extra vm_page_t space for a machine with 64M of RAM, so around 0.18% of RAM would be used on both platforms (presumably the usage would be similar on other platforms as well). At 24 GB of RAM, the extra space is just under 0.20% of RAM (48M). Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r223434 - head/libexec/ftpd
Author: trasz Date: Wed Jun 22 19:14:49 2011 New Revision: 223434 URL: http://svn.freebsd.org/changeset/base/223434 Log: Add LOGIN_SETCPUMASK and LOGIN_SETLOGINCLASS to the setusercontext(3) calls in ftpd(8). Modified: head/libexec/ftpd/ftpd.c Modified: head/libexec/ftpd/ftpd.c == --- head/libexec/ftpd/ftpd.cWed Jun 22 18:48:07 2011(r223433) +++ head/libexec/ftpd/ftpd.cWed Jun 22 19:14:49 2011(r223434) @@ -1191,9 +1191,9 @@ end_login(void) ftpd_logwtmp(wtmpid, NULL, NULL); pw = NULL; #ifdef LOGIN_CAP - setusercontext(NULL, getpwuid(0), 0, - LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK| - LOGIN_SETMAC); + setusercontext(NULL, getpwuid(0), 0, LOGIN_SETALL & ~(LOGIN_SETLOGIN | + LOGIN_SETUSER | LOGIN_SETGROUP | LOGIN_SETPATH | + LOGIN_SETENV)); #endif #ifdef USE_PAM if (pamh) { @@ -1465,9 +1465,8 @@ skip: return; } } - setusercontext(lc, pw, 0, - LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY| - LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC); + setusercontext(lc, pw, 0, LOGIN_SETALL & + ~(LOGIN_SETUSER | LOGIN_SETPATH | LOGIN_SETENV)); #else setlogin(pw->pw_name); (void) initgroups(pw->pw_name, pw->pw_gid); ___ 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: r223307 - head/sys/vm
On Wed, 22 Jun 2011, Warner Losh wrote: On Jun 22, 2011, at 3:26 AM, Attilio Rao wrote: 2011/6/22 Warner Losh : On Jun 21, 2011, at 5:27 PM, Alan Cox wrote: On 06/21/2011 16:09, Attilio Rao wrote: 2011/6/21 Bruce Evans: On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: On Jun 19, 2011, at 7:13 PM, Alan Cox wrote: Hi Alan, Author: alc Date: Sun Jun 19 19:13:24 2011 New Revision: 223307 URL: http://svn.freebsd.org/changeset/base/223307 Log: Precisely document the synchronization rules for the page's dirty field. (Saying that the lock on the object that the page belongs to must be held only represents one aspect of the rules.) Eliminate the use of the page queues lock for atomically performing read- modify-write operations on the dirty field when the underlying architecture supports atomic operations on char and short types. Document the fact that 32KB pages aren't really supported. contrary to the tinderbox I'd like to point out that all mips kernels built by universe are broken with a SVN HEAD from earlier today. Could you please check and see if you can fix it? The errors I get are: vm_page.o: In function `vm_page_clear_dirty': /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' vm_page.o: In function `vm_page_set_validclean': /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' Atomic types shorter than int cannot be used in MI code, since they might not exist. Apparently they don't exist on mips. jake@ fixed all their old uses for sparc4 in ~Y2K. I'm sure they do, they exist in support.S though and may not have the _8 form (they may just have the _char version). I may look at the code again to be sure. It appears that while mips/include/atomic.h declares the existence of atomic_clear_8, mips/mips/support.S doesn't implement it. In other words, only support for int's and short's is currently implemented, not char's: # grep atomic_clear mips/mips/support.S * atomic_clear_32(u_int32_t *a, u_int32_t b) LEAF(atomic_clear_32) END(atomic_clear_32) * atomic_clear_16(u_int16_t *a, u_int16_t b) LEAF(atomic_clear_16) END(atomic_clear_16) The current crop of atomic*16 and atomic*8 functions have the restriction that the address must be 32-bit aligned (and it forces this by aligning to 32-bits silently and then operates on the low 8 or 16 bits in that word!) I'm guessing that this is likely just wrong. Comments? Warner That is wrong, of course, and my personal opinion is that one should not implement atomic operations if they cannot be done efficiently (example: if you need to disable interrupts or similar expensive operation just to assure atomicity of operation, just don't support it) as long as not having _8/_char is perfectly fine. I think it can be efficient, for some reasonable definition of efficient. The masking and shifting operations aren't that onerous to write and the instructions cycles would be dwarfed by the ll/sc pair, which are required to implement atomic. The issue is that the code today is clearly wrong and needs to be fixed. I think it is still good to discourage use of non-bus-width atomic ops by not supporting at the MI level them for any arch. Suppose only bus-width accesses are atomic, as seems to be the case on mips. Then you can still do atomic accesses on bytes by doing an atomic op on the neigbouring 3 or 7 bytes. But this may increase memory contention by a factor of 3 or 7. The contention can be reduced either by putting only rarely-accessed bytes near the bytes that need the atomic ops, or by putting unused padding there, or by not using byte-sized objects to begin with (this gives the same effect and even the same memory accesses as unused padding bytes -- there are unused bits in the objects instead of external unused bytes). The former can be arranged easily enough in the vm_page struct. But MI code shouldn't know about this. Suppose byte accesses are atomic at the instruction level. Then the hardware probably still needs to expand to the bus width. Depending on how well it virtualizes this, there may be the same factor of 3, 7 or more in memory contention. The relevant bus width may be the cache line size which on modern CPUs is much more than 4 bytes and probably more like 32. So the CPU must already being doing good virtualization to make 4-byte atomic accesses not too slow (non-atomic accesses are already virtualized by the caches). For efficiency, we really should pay more attention to packing related int variables into cache lines (either the same line to increase cache hits or separate lines, to reduce contention), but the best way to do this is very MD and unclear. Bruce ___ svn-src-all@freebsd.org mailing list http://lis
svn commit: r223436 - head/sys/fs/nfs
Author: rmacklem Date: Wed Jun 22 19:47:45 2011 New Revision: 223436 URL: http://svn.freebsd.org/changeset/base/223436 Log: Fix the new NFSv4 client so that it uses the same uid as was used for doing a mount when performing system operations on AUTH_SYS mounts. This resolved an issue when mounting a Linux server. Found during testing at the recent NFSv4 interoperability Bakeathon. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c == --- head/sys/fs/nfs/nfs_commonkrpc.cWed Jun 22 19:42:32 2011 (r223435) +++ head/sys/fs/nfs/nfs_commonkrpc.cWed Jun 22 19:47:45 2011 (r223436) @@ -526,6 +526,20 @@ newnfs_request(struct nfsrv_descript *nd else secflavour = RPCSEC_GSS_KRB5; srv_principal = NFSMNT_SRVKRBNAME(nmp); + } else if (nmp != NULL && !NFSHASKERB(nmp) && + nd->nd_procnum != NFSPROC_NULL && + (nd->nd_flag & ND_USEGSSNAME) != 0) { + /* +* Use the uid that did the mount when the RPC is doing +* NFSv4 system operations, as indicated by the +* ND_USEGSSNAME flag, for the AUTH_SYS case. +*/ + saved_uid = cred->cr_uid; + if (nmp->nm_uid != (uid_t)-1) + cred->cr_uid = nmp->nm_uid; + else + cred->cr_uid = 0; + set_uid = 1; } if (nmp != 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"
Re: svn commit: r223429 - head/sbin/growfs
On Wed, 22 Jun 2011, Edward Tomasz Napierala wrote: Log: Cosmetic fixes; mostly s/file system/filesystem/g and removing weird indent from messages. The first part seems backwards. It undoes the 2002 change that does s/filesystem/file system/g, except the 2002 change was not restricted to growfs. 'file system' seems best English in most contexts, but not all, so such changes should not be done mechanically. 'filesystem' might be best German or Danish. I like to use 'file system' for individual file systems, but `filesystem' for things like the handler of a file system. But I don't like renaming things and wouldn't touch this :-). Modified: head/sbin/growfs/growfs.8 == --- head/sbin/growfs/growfs.8 Wed Jun 22 17:55:16 2011(r223428) +++ head/sbin/growfs/growfs.8 Wed Jun 22 17:59:53 2011(r223429) @@ -37,12 +37,12 @@ .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $ .\" $FreeBSD$ .\" -.Dd May 8, 2011 +.Dd June 22, 2011 .Dt GROWFS 8 .Os .Sh NAME .Nm growfs -.Nd grow size of an existing UFS file system +.Nd expand an existing UFS filesystem Also, UFS doesn't exist. See ffs(7), the fastfs paper in /usr/share/doc, and ufs(nonexistent). I would use 'file system' here since it is an individual file system being expanded, and 'filesystem' for the ffs filesystem implementation. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r223437 - head/sys/netinet/libalias
Author: ae Date: Wed Jun 22 20:00:27 2011 New Revision: 223437 URL: http://svn.freebsd.org/changeset/base/223437 Log: Export AddLink() function from libalias. It can be used when custom alias address needs to be specified. Add inbound handler to the alias_ftp module. It helps handle active FTP transfer mode for the case with external clients and FTP server behind NAT. Fix passive FTP transfer case for server behind NAT using redirect with external IP address different from NAT ip address. PR: kern/157957 Submitted by: Alexander V. Chernikov Modified: head/sys/netinet/libalias/alias_db.c head/sys/netinet/libalias/alias_ftp.c head/sys/netinet/libalias/alias_local.h head/sys/netinet/libalias/libalias.3 Modified: head/sys/netinet/libalias/alias_db.c == --- head/sys/netinet/libalias/alias_db.cWed Jun 22 19:47:45 2011 (r223436) +++ head/sys/netinet/libalias/alias_db.cWed Jun 22 20:00:27 2011 (r223437) @@ -552,10 +552,6 @@ static voidIncrementalCleanup(struct li static voidDeleteLink(struct alias_link *); static struct alias_link * -AddLink(struct libalias *, struct in_addr, struct in_addr, struct in_addr, -u_short, u_short, int, int); - -static struct alias_link * ReLink(struct alias_link *, struct in_addr, struct in_addr, struct in_addr, u_short, u_short, int, int); @@ -572,9 +568,6 @@ static struct alias_link * #define ALIAS_PORT_MASK_EVEN 0x07ffe #define GET_NEW_PORT_MAX_ATTEMPTS 20 -#define GET_ALIAS_PORT -1 -#define GET_ALIAS_IDGET_ALIAS_PORT - #define FIND_EVEN_ALIAS_BASE 1 /* GetNewPort() allocates port numbers. Note that if a port number @@ -937,17 +930,12 @@ DeleteLink(struct alias_link *lnk) } -static struct alias_link * -AddLink(struct libalias *la, struct in_addr src_addr, -struct in_addr dst_addr, -struct in_addr alias_addr, -u_short src_port, -u_short dst_port, -int alias_port_param, /* if less than zero, alias */ -int link_type) -{ /* port will be automatically *//* chosen. -* If greater than*/ - u_int start_point; /* zero, equal to alias port */ +struct alias_link * +AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr, +struct in_addr alias_addr, u_short src_port, u_short dst_port, +int alias_port_param, int link_type) +{ + u_int start_point; struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); Modified: head/sys/netinet/libalias/alias_ftp.c == --- head/sys/netinet/libalias/alias_ftp.c Wed Jun 22 19:47:45 2011 (r223436) +++ head/sys/netinet/libalias/alias_ftp.c Wed Jun 22 20:00:27 2011 (r223437) @@ -100,38 +100,68 @@ __FBSDID("$FreeBSD$"); #define FTP_CONTROL_PORT_NUMBER 21 static void -AliasHandleFtpOut(struct libalias *, struct ip *, struct alias_link *, - int maxpacketsize); +AliasHandleFtpOut(struct libalias *, struct ip *, struct alias_link *, +int maxpacketsize); +static void +AliasHandleFtpIn(struct libalias *, struct ip *, struct alias_link *); -static int -fingerprint(struct libalias *la, struct alias_data *ah) +static int +fingerprint_out(struct libalias *la, struct alias_data *ah) { - if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || - ah->maxpktsize == 0) + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || + ah->maxpktsize == 0) return (-1); - if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER - || ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) + if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || + ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) return (0); return (-1); } -static int -protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) +static int +fingerprint_in(struct libalias *la, struct alias_data *ah) +{ + + if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL) + return (-1); + if (ntohs(*ah->dport) == FTP_CONTROL_PORT_NUMBER || + ntohs(*ah->sport) == FTP_CONTROL_PORT_NUMBER) + return (0); + return (-1); +} + +static int +protohandler_out(struct libalias *la, struct ip *pip, struct alias_data *ah) { - + AliasHandleFtpOut(la, pip, ah->lnk, ah->maxpktsize); return (0); } + +static int +protohandler_in(struct libalias *la, struct ip *pip, struct alias_data *ah) +{ + + AliasHandleFtpIn(la, pip, ah->lnk); + return (0); +} + struct proto_handler handlers[] = { - { - .pri = 80, - .dir = OUT, - .proto = TCP, - .fingerprint = &fingerprint, - .prot
svn commit: r223440 - in head/sys: amd64/include amd64/pci conf i386/include i386/pci x86/include x86/pci
Author: jhb Date: Wed Jun 22 21:04:13 2011 New Revision: 223440 URL: http://svn.freebsd.org/changeset/base/223440 Log: Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to the x86 tree. The $PIR code is still only enabled on i386 and not amd64. While here, make the qpi(4) driver on conditional on 'device pci'. Added: head/sys/x86/include/pci_cfgreg.h - copied, changed from r223433, head/sys/i386/include/pci_cfgreg.h head/sys/x86/pci/pci_bus.c - copied, changed from r223428, head/sys/i386/pci/pci_bus.c Deleted: head/sys/amd64/pci/pci_bus.c head/sys/i386/pci/pci_bus.c Modified: head/sys/amd64/include/pci_cfgreg.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/include/param.h head/sys/i386/include/pci_cfgreg.h Modified: head/sys/amd64/include/pci_cfgreg.h == --- head/sys/amd64/include/pci_cfgreg.h Wed Jun 22 20:20:49 2011 (r223439) +++ head/sys/amd64/include/pci_cfgreg.h Wed Jun 22 21:04:13 2011 (r223440) @@ -1,44 +1,6 @@ /*- - * Copyright (c) 1997, Stefan Esser - * 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 unmodified, this list of conditions, and the following - *disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR 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$ - * + * This file is in the public domain. */ +/* $FreeBSD$ */ -#define CONF1_ADDR_PORT0x0cf8 -#define CONF1_DATA_PORT0x0cfc - -#define CONF1_ENABLE 0x8000ul -#define CONF1_ENABLE_CHK 0x8000ul -#define CONF1_ENABLE_MSK 0x7f00ul -#define CONF1_ENABLE_CHK1 0xff01ul -#define CONF1_ENABLE_MSK1 0x8001ul -#define CONF1_ENABLE_RES1 0x8000ul - -u_long hostb_alloc_start(int type, u_long start, u_long end, u_long count); -intpcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); -intpci_cfgregopen(void); -u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); -void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes); +#include Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Wed Jun 22 20:20:49 2011(r223439) +++ head/sys/conf/files.amd64 Wed Jun 22 21:04:13 2011(r223440) @@ -128,7 +128,6 @@ amd64/amd64/trap.c standard amd64/amd64/uio_machdep.c standard amd64/amd64/uma_machdep.c standard amd64/amd64/vm_machdep.c standard -amd64/pci/pci_bus.coptionalpci amd64/pci/pci_cfgreg.c optionalpci crypto/aesni/aesencdec_amd64.S optional aesni crypto/aesni/aeskeys_amd64.S optional aesni @@ -315,7 +314,8 @@ x86/isa/isa.c standard x86/isa/isa_dma.c standard x86/isa/nmi.c standard x86/isa/orm.c optionalisa -x86/pci/qpi.c standard +x86/pci/pci_bus.c optionalpci +x86/pci/qpi.c optionalpci x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/io_apic.c standard Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Wed Jun 22 20:20:49 2011(r223439) +++ head/sys/conf/files.i386Wed Jun 22 21:04:13 2011(r223440) @@ -352,7 +352,6 @@ i386/linux/linux_support.s optional comp dependency "linux_assym.h" i386/linux/linux_sysent.c optional compat_linux i386/linux/linux_sysvec.c optional compat_linux -i386/pci/pci_bus.c optional pci i386/pci/pci_cfgreg.c optional pci i386/pci/pci_pir.c optional p
svn commit: r223441 - head/sys/fs/nfs
Author: rmacklem Date: Wed Jun 22 21:10:12 2011 New Revision: 223441 URL: http://svn.freebsd.org/changeset/base/223441 Log: Plug an mbuf leak in the new NFS client that occurred when a server replied NFS3ERR_JUKEBOX/NFS4ERR_DELAY to an rpc. This affected both NFSv3 and NFSv4. Found during testing at the recent NFSv4 interoperability Bakeathon. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c == --- head/sys/fs/nfs/nfs_commonkrpc.cWed Jun 22 21:04:13 2011 (r223440) +++ head/sys/fs/nfs/nfs_commonkrpc.cWed Jun 22 21:10:12 2011 (r223441) @@ -733,6 +733,8 @@ tryagain: while (NFSD_MONOSEC < waituntil) (void) nfs_catnap(PZERO, 0, "nfstry"); trylater_delay *= 2; + m_freem(nd->nd_mrep); + nd->nd_mrep = NULL; goto tryagain; } ___ 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: r223443 - head/sys/cam/ata
Author: will Date: Wed Jun 22 21:43:10 2011 New Revision: 223443 URL: http://svn.freebsd.org/changeset/base/223443 Log: Plumb support for the device advanced information CCB in the ATA XPT. This was previously done only for SCSI XPT in r223081, on which the change in r223089 depended in order to respond to serial number requests. As a result of r223089, da(4) and ada(4) devices register a d_getattr for geom to use to obtain the information. Reported by: ache Reviewed by: ken Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c == --- head/sys/cam/ata/ata_xpt.c Wed Jun 22 21:18:37 2011(r223442) +++ head/sys/cam/ata/ata_xpt.c Wed Jun 22 21:43:10 2011(r223443) @@ -1601,6 +1601,34 @@ ata_device_transport(struct cam_path *pa } static void +ata_dev_advinfo(union ccb *start_ccb) +{ + struct cam_ed *device; + struct ccb_dev_advinfo *cdai; + off_t amt; + + start_ccb->ccb_h.status = CAM_REQ_INVALID; + device = start_ccb->ccb_h.path->device; + cdai = &start_ccb->cdai; + switch(cdai->buftype) { + case CDAI_TYPE_SERIAL_NUM: + if (cdai->flags & CDAI_FLAG_STORE) + break; + start_ccb->ccb_h.status = CAM_REQ_CMP; + cdai->provsiz = device->serial_num_len; + if (device->serial_num_len == 0) + break; + amt = device->serial_num_len; + if (cdai->provsiz > cdai->bufsiz) + amt = cdai->bufsiz; + memcpy(cdai->buf, device->serial_num, amt); + break; + default: + break; + } +} + +static void ata_action(union ccb *start_ccb) { @@ -1652,6 +1680,11 @@ ata_action(union ccb *start_ccb) } /* FALLTHROUGH */ } + case XPT_DEV_ADVINFO: + { + ata_dev_advinfo(start_ccb); + break; + } default: xpt_action_default(start_ccb); break; ___ 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: r223444 - head/libexec/tftpd
Author: rodrigc Date: Wed Jun 22 21:53:45 2011 New Revision: 223444 URL: http://svn.freebsd.org/changeset/base/223444 Log: Clarify tftpd's -d flag in the new TFTP implementation. Bump date. Modified: head/libexec/tftpd/tftpd.8 Modified: head/libexec/tftpd/tftpd.8 == --- head/libexec/tftpd/tftpd.8 Wed Jun 22 21:43:10 2011(r223443) +++ head/libexec/tftpd/tftpd.8 Wed Jun 22 21:53:45 2011(r223444) @@ -32,7 +32,7 @@ .\"@(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 14, 2000 +.Dd June 22, 2011 .Dt TFTPD 8 .Os .Sh NAME @@ -150,9 +150,27 @@ compatible format string for the creatio .Fl W is specified. By default the string "%Y%m%d" is used. -.It Fl d +.It Fl d, d Ar [value] Enables debug output. -If specified twice, it will log DATA and ACK packets too. +If +.Ar value +is not specified, then the debug level is increased by one +for each instance of +.Fl d +which is specified. +.Pp +If +.Ar value +is specified, then the debug level is set to +.Ar value . +The debug level is a bitmask implemented in +.Pa src/libexec/tftpd/tftp-utils.h . +Valid values are 0 (DEBUG_NONE), 1 (DEBUG_PACKETS), 2, (DEBUG_SIMPLE), +4 (DEBUG_OPTIONS), and 8 (DEBUG_ACCESS). Multiple debug values can be combined +in the bitmask by logically OR'ing the values. For example, specifying +.Fl d +.Ar 15 +will enable all the debug values. .It Fl l Log all requests using .Xr syslog 3 ___ 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: r223445 - head/libexec/tftpd
Author: rodrigc Date: Wed Jun 22 22:05:37 2011 New Revision: 223445 URL: http://svn.freebsd.org/changeset/base/223445 Log: Fix typo. Reported by: Nick Mann Modified: head/libexec/tftpd/tftpd.8 Modified: head/libexec/tftpd/tftpd.8 == --- head/libexec/tftpd/tftpd.8 Wed Jun 22 21:53:45 2011(r223444) +++ head/libexec/tftpd/tftpd.8 Wed Jun 22 22:05:37 2011(r223445) @@ -273,7 +273,7 @@ was introduced in .Fx 7.4 . .Sh NOTES Files larger than 33488896 octets (65535 blocks) cannot be transferred -without client and server supporting the the TFTP blocksize option (RFC2348), +without client and server supporting the TFTP blocksize option (RFC2348), or the non-standard TFTP rollover option. .Pp Many tftp clients will not transfer files over 1678 octets (32767 blocks). ___ 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: r223446 - head/sys/dev/usb/wlan
Author: gavin Date: Wed Jun 22 22:08:55 2011 New Revision: 223446 URL: http://svn.freebsd.org/changeset/base/223446 Log: Use USB_VENDOR_OVISLINK define rather than the vendor ID. PR: usb/158142 Submitted by: Robert Millan MFC after:1 week Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c == --- head/sys/dev/usb/wlan/if_urtw.c Wed Jun 22 22:05:37 2011 (r223445) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Jun 22 22:08:55 2011 (r223446) @@ -115,7 +115,7 @@ static const struct usb_device_id urtw_d URTW_DEV_L(REALTEK, RTL8187), URTW_DEV_L(SITECOMEU, WL168V1), URTW_DEV_L(SURECOM, EP9001G2A), - { USB_VPI(0x1b75, 0x8187, URTW_REV_RTL8187L) }, + { USB_VPI(USB_VENDOR_OVISLINK, 0x8187, URTW_REV_RTL8187L) }, { USB_VPI(USB_VENDOR_DICKSMITH, 0x9401, URTW_REV_RTL8187L) }, { USB_VPI(USB_VENDOR_HP, 0xca02, URTW_REV_RTL8187L) }, { USB_VPI(USB_VENDOR_LOGITEC, 0x010c, URTW_REV_RTL8187L) }, ___ 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: r223447 - head/usr.bin/tftp
Author: rodrigc Date: Wed Jun 22 22:55:51 2011 New Revision: 223447 URL: http://svn.freebsd.org/changeset/base/223447 Log: Bump date. Document the following commands which were added in the new TFTP implementation: blocksize, blocksize2, packetdrop, options, rollover Modified: head/usr.bin/tftp/tftp.1 Modified: head/usr.bin/tftp/tftp.1 == --- head/usr.bin/tftp/tftp.1Wed Jun 22 22:08:55 2011(r223446) +++ head/usr.bin/tftp/tftp.1Wed Jun 22 22:55:51 2011(r223447) @@ -28,7 +28,7 @@ .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 1, 2003 +.Dd June 22, 2011 .Dt TFTP 1 .Os .Sh NAME @@ -70,6 +70,21 @@ Shorthand for "mode ascii" .It Cm binary Shorthand for "mode binary" .Pp +.It Cm blocksize Ar [size] +Sets the TFTP blksize option in TFTP Read Request or Write Request packets +to +.Ar [size] +as specified in RFC 2348. Valid values are between 8 and 65464. +If no blocksize is specified, then by default a blocksize of 512 bytes +will be used. +.Pp +.It Cm blocksize2 Ar [size] +Sets the TFTP blksize2 option in TFTP Read Request or Write Request packets +to +.Ar [size] . +Values are restricted to powers of 2 between 8 and 32768. This is a +non-standard TFTP option. +.Pp .It Cm connect Ar host Op Ar port Set the .Ar host @@ -93,6 +108,14 @@ or .Cm put commands. .Pp +.It Cm debug Ar level +Enable or disable debugging levels during verbose output. The value of +.Ar level +can be one of +.Cm packet, simple, options, +or +.Cm access. +.Pp .It Cm get Oo Ar host : Oc Ns Ar file Op Ar localname .It Cm get Xo .Oo Ar host1 : Oc Ns Ar file1 @@ -130,6 +153,11 @@ or The default is .Em ascii . .Pp +.It Cm packetdrop [arg] +Randomly drop +.Ar arg +out of 100 packets during a transfer. This is a debugging feature. +.Pp .It Cm put Ar file Op Oo Ar host : Oc Ns Ar remotename .It Cm put Ar file1 file2 ... fileN Op Oo Ar host : Oc Ns Ar remote-directory Put a file or set of files to the remote host. @@ -149,6 +177,17 @@ see the example under the .Cm get command. .Pp +.It Cm options Ar [arg] +Enable or disable support for TFTP options. The valid values of +.Ar arg +are +.Cm on +(enable RFC 2347 options), +.Cm off +(disable RFC 2347 options), and +.Cm extra +(toggle support for non-RFC defined options). +.Pp .It Cm quit Exit .Nm . @@ -157,6 +196,15 @@ An end of file also exits. .It Cm rexmt Ar retransmission-timeout Set the per-packet retransmission timeout, in seconds. .Pp +.It Cm rollover [arg] +Specify the rollover option in TFTP Read Request or Write +Request packets. After 65535 packets have been transmitted, set the block +counter to +.Ar arg . +Valid values of +.Ar arg +are 0 and 1. This is a non-standard TFTP option. +.Pp .It Cm status Show current status. .Pp ___ 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: r223448 - head/sys/cam/scsi
Author: will Date: Wed Jun 22 22:55:51 2011 New Revision: 223448 URL: http://svn.freebsd.org/changeset/base/223448 Log: Return CAM_REQ_INVALID if the SCSI XPT receives an unsupported operation via the XPT_DEV_ADVINFO CCB. Reviewed by: ken Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c == --- head/sys/cam/scsi/scsi_xpt.cWed Jun 22 22:55:51 2011 (r223447) +++ head/sys/cam/scsi/scsi_xpt.cWed Jun 22 22:55:51 2011 (r223448) @@ -2440,12 +2440,13 @@ scsi_dev_advinfo(union ccb *start_ccb) struct ccb_dev_advinfo *cdai; off_t amt; + start_ccb->ccb_h.status = CAM_REQ_INVALID; device = start_ccb->ccb_h.path->device; cdai = &start_ccb->cdai; switch(cdai->buftype) { case CDAI_TYPE_SCSI_DEVID: if (cdai->flags & CDAI_FLAG_STORE) - break; + return; cdai->provsiz = device->device_id_len; if (device->device_id_len == 0) break; @@ -2456,7 +2457,7 @@ scsi_dev_advinfo(union ccb *start_ccb) break; case CDAI_TYPE_SERIAL_NUM: if (cdai->flags & CDAI_FLAG_STORE) - break; + return; cdai->provsiz = device->serial_num_len; if (device->serial_num_len == 0) break; @@ -2490,7 +2491,7 @@ scsi_dev_advinfo(union ccb *start_ccb) } break; default: - break; + return; } start_ccb->ccb_h.status = CAM_REQ_CMP; ___ 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: r223449 - head/sys/dev/acpica
Author: jkim Date: Wed Jun 22 22:56:42 2011 New Revision: 223449 URL: http://svn.freebsd.org/changeset/base/223449 Log: Fix build on ia64 after r223426. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Wed Jun 22 22:55:51 2011 (r223448) +++ head/sys/dev/acpica/acpi_cpu.c Wed Jun 22 22:56:42 2011 (r223449) @@ -856,8 +856,10 @@ acpi_cpu_cx_list(struct acpi_cpu_softc * sbuf_printf(&sb, "C%d/%d ", i + 1, sc->cpu_cx_states[i].trans_lat); if (sc->cpu_cx_states[i].type < ACPI_STATE_C3) sc->cpu_non_c3 = i; +#ifndef __ia64__ else cpu_can_deep_sleep = 1; +#endif } sbuf_trim(&sb); sbuf_finish(&sb); ___ 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
On Wednesday 22 June 2011 02:55 pm, Jung-uk Kim wrote: > On Wednesday 22 June 2011 12:47 pm, Andriy Gapon wrote: > > on 22/06/2011 19:40 Jung-uk Kim said the following: > > > Author: jkim > > > Date: Wed Jun 22 16:40:45 2011 > > > New Revision: 223426 > > > URL: http://svn.freebsd.org/changeset/base/223426 > > > > > > Log: > > > Set negative quality to TSC timecounter when C3 state is > > > enabled for Intel processors unless the invariant TSC bit of > > > CPUID is set. Intel processors may stop incrementing TSC when > > > DPSLP# pin is asserted, according to Intel processor manuals, > > > i. e., TSC timecounter is useless if the processor can enter > > > deep sleep state (C3/C4). This problem was accidentally > > > uncovered by r222869, which increased timecounter quality of > > > P-state invariant TSC, e.g., for Core2 Duo T5870 (Family 6, > > > Model f) and Atom N270 (Family 6, Model 1c). > > > > > > Reported by:Fabian Keil (freebsd-listen at fabiankeil dot > > > de) Ian FREISLICH (ianf at clue dot co dot za) > > > Tested by: Fabian Keil (freebsd-listen at fabiankeil dot de) > > > - Core2 Duo T5870 (C3 state available/enabled) > > > jkim - Xeon X5150 (C3 state unavailable) > > > > I think that this change should have a counterpart similar to > > what was done for event timers. That is, if a user forces use of > > TSC as a timecounter vis sysctl and it is known that TSC stops in > > the deep C-state, then the deep C-states should not be entered. > > This is what cpu_disable_deep_sleep does for LAPIC timers. > > Can you please review/test the attached patch? Also available from > here: > > http://people.freebsd.org/~jkim/tc_c3stop.diff I just realized kern_clocksource.c was excluded for arm and ia64. Here is updated patch. Please ignore the previous one. Thanks, Jung-uk Kim Index: sys/kern/kern_tc.c === --- sys/kern/kern_tc.c (revision 223446) +++ sys/kern/kern_tc.c (working copy) @@ -492,6 +492,12 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { +#if !defined(__arm__) && !defined(__ia64__) + if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) + cpu_disable_deep_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) + cpu_disable_deep_sleep--; +#endif th->th_counter = timecounter; th->th_offset_count = ncount; tc_min_ticktock_freq = max(1, timecounter->tc_frequency / Index: sys/sparc64/sparc64/counter.c === --- sys/sparc64/sparc64/counter.c (revision 223446) +++ sys/sparc64/sparc64/counter.c (working copy) @@ -98,6 +98,7 @@ sparc64_counter_init(const char *name, bus_space_t tc->tc_name = strdup(name, M_DEVBUF); tc->tc_priv = sc; tc->tc_quality = COUNTER_QUALITY; + tc->tc_flags = 0; tc_init(tc); } Index: sys/sys/timetc.h === --- sys/sys/timetc.h(revision 223446) +++ sys/sys/timetc.h(working copy) @@ -57,6 +57,8 @@ struct timecounter { * another timecounter higher means better. Negative * means "only use at explicit request". */ + u_int tc_flags; +#defineTC_FLAGS_C3STOP 1 /* Timer dies in C3. */ void*tc_priv; /* Pointer to the timecounter's private parts. */ Index: sys/x86/x86/tsc.c === --- sys/x86/x86/tsc.c (revision 223446) +++ sys/x86/x86/tsc.c (working copy) @@ -452,6 +452,7 @@ init_TSC_tc(void) if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { tsc_timecounter.tc_quality = -1000; + tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP; if (bootverbose) printf("TSC timecounter disabled: C3 enabled.\n"); goto init; ___ 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: r223450 - head/libexec/tftpd
Author: rodrigc Date: Wed Jun 22 23:25:24 2011 New Revision: 223450 URL: http://svn.freebsd.org/changeset/base/223450 Log: Update references to RFC's that the newer TFTP implementation supports. Modified: head/libexec/tftpd/tftpd.8 Modified: head/libexec/tftpd/tftpd.8 == --- head/libexec/tftpd/tftpd.8 Wed Jun 22 22:56:42 2011(r223449) +++ head/libexec/tftpd/tftpd.8 Wed Jun 22 23:25:24 2011(r223450) @@ -235,12 +235,34 @@ option. .Xr services 5 , .Xr syslog.conf 5 , .Xr inetd 8 +.Pp +The following RFC's are supported: .Rs -.%A K. R. Sollins +RFC 1350 .%T The TFTP Protocol (Revision 2) -.%D July 1992 -.%O RFC 1350, STD 33 .Re +.Rs +RFC 2347 +.%T TFTP Option Extension +.Re +.Rs +RFC 2348 +.%T TFTP Blocksize Option +.Re +.Rs +RFC 2349 +.%T TFTP Timeout Interval and Transfer Size Options +.Re +.Pp +The non-standard +.Cm rollover +and +.Cm blksize2 +TFTP options are mentioned here: +.Rs +.%T Extending TFTP +.%U http://www.compuphase.com/tftp.htm +.Re .Sh HISTORY The .Nm ___ 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: r223451 - head/usr.bin/tftp
Author: rodrigc Date: Wed Jun 22 23:26:04 2011 New Revision: 223451 URL: http://svn.freebsd.org/changeset/base/223451 Log: Update references to RFC's that the newer TFTP implementation supports. Modified: head/usr.bin/tftp/tftp.1 Modified: head/usr.bin/tftp/tftp.1 == --- head/usr.bin/tftp/tftp.1Wed Jun 22 23:25:24 2011(r223450) +++ head/usr.bin/tftp/tftp.1Wed Jun 22 23:26:04 2011(r223451) @@ -217,6 +217,40 @@ Toggle packet tracing. .It Cm verbose Toggle verbose mode. .El +.Sh SEE ALSO +.Xr tftp 1 +.Pp +The following RFC's are supported: +.Rs +RFC 1350 +.%T The TFTP Protocol (Revision 2) +.Re +.Rs +RFC 2347 +.%T TFTP Option Extension +.Re +.Rs +RFC 2348 +.%T TFTP Blocksize Option +.Re +.Rs +RFC 2349 +.%T TFTP Timeout Interval and Transfer Size Options +.Re +.Rs +RFC 3617 +.%T Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) +.Re +.Pp +The non-standard +.Cm rollover +and +.Cm blksize2 +TFTP options are mentioned here: +.Rs +.%T Extending TFTP +.%U http://www.compuphase.com/tftp.htm +.Re .Sh HISTORY The .Nm ___ 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
On Jun 22, 2011, at 4:24 PM, Jung-uk Kim wrote: > > I just realized kern_clocksource.c was excluded for arm and ia64. > Here is updated patch. Please ignore the previous one. Any reason why we're not adding kern_clocksource.c for them? -- Marcel Moolenaar mar...@xcllnt.net ___ 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: r223454 - stable/8/contrib/less
Author: delphij Date: Thu Jun 23 00:27:45 2011 New Revision: 223454 URL: http://svn.freebsd.org/changeset/base/223454 Log: MFC r222906: less v444. Modified: stable/8/contrib/less/NEWS stable/8/contrib/less/README stable/8/contrib/less/command.c stable/8/contrib/less/funcs.h stable/8/contrib/less/less.man stable/8/contrib/less/less.nro stable/8/contrib/less/lessecho.man stable/8/contrib/less/lessecho.nro stable/8/contrib/less/lesskey.man stable/8/contrib/less/lesskey.nro stable/8/contrib/less/optfunc.c stable/8/contrib/less/opttbl.c stable/8/contrib/less/version.c Directory Properties: stable/8/contrib/less/ (props changed) Modified: stable/8/contrib/less/NEWS == --- stable/8/contrib/less/NEWS Thu Jun 23 00:04:06 2011(r223453) +++ stable/8/contrib/less/NEWS Thu Jun 23 00:27:45 2011(r223454) @@ -12,6 +12,15 @@ == + Major changes between "less" versions 443 and 444 + +* Fix bug in unget handling that can cause strange effects on the + command line. + +* Remove vestiges of obsolete -l option that can cause a crash. + +== + Major changes between "less" versions 436 and 443 * Change search behavior such that when a search is given an explicit Modified: stable/8/contrib/less/README == --- stable/8/contrib/less/READMEThu Jun 23 00:04:06 2011 (r223453) +++ stable/8/contrib/less/READMEThu Jun 23 00:27:45 2011 (r223454) @@ -7,9 +7,9 @@ ** ** -Less, version 443 +Less, version 444 -This is the distribution of less, version 443, released 09 Apr 2011. +This is the distribution of less, version 444, released 09 Jun 2011. This program is part of the GNU project (http://www.gnu.org). This program is free software. You may redistribute it and/or Modified: stable/8/contrib/less/command.c == --- stable/8/contrib/less/command.c Thu Jun 23 00:04:06 2011 (r223453) +++ stable/8/contrib/less/command.c Thu Jun 23 00:27:45 2011 (r223454) @@ -302,7 +302,7 @@ is_erase_char(c) */ static int mca_opt_first_char(c) - int c; +int c; { int flag = (optflag & ~OPT_NO_PROMPT); if (flag == OPT_NO_TOGGLE) @@ -846,6 +846,7 @@ ungetcc(c) ug->ug_char = c; ug->ug_next = ungot; ungot = ug; + unget_end = 0; } /* Modified: stable/8/contrib/less/funcs.h == --- stable/8/contrib/less/funcs.h Thu Jun 23 00:04:06 2011 (r223453) +++ stable/8/contrib/less/funcs.h Thu Jun 23 00:27:45 2011 (r223454) @@ -194,7 +194,6 @@ public void unmark (); public void opt_o (); public void opt__O (); - public void opt_l (); public void opt_j (); public void calc_jump_sline (); public void opt_shift (); Modified: stable/8/contrib/less/less.man == --- stable/8/contrib/less/less.man Thu Jun 23 00:04:06 2011 (r223453) +++ stable/8/contrib/less/less.man Thu Jun 23 00:27:45 2011 (r223454) @@ -1156,7 +1156,7 @@ LESS(1) next 8bcccbcc18b95.bb125.bb If neither LESSCHARSET nor LESSCHARDEF is set, but any of the strings - "UTF-8", "UTF8", "utf-8" or "utf8" is found in the LC_ALL, LC_TYPE or + "UTF-8", "UTF8", "utf-8" or "utf8" is found in the LC_ALL, LC_CTYPE or LANG environment variables, then the default character set is utf-8. If that string is not found, but your system supports the [4msetlocale[0m @@ -1580,4 +1580,4 @@ LESS(1) - Version 443: 09 Apr 2011LESS(1) + Version 444: 09 Jun 2011LESS(1) Modified: stable/8/contrib/less/less.nro == --- stable/8/contrib/less/less.nro Thu Jun 23 00:04:06 2011 (r223453) +++ stable/8/contrib/less/less.nro Thu Jun 23 00:27:45 2011 (r223454) @@ -1,4 +1,4 @@ -.TH LESS 1 "Version 443: 09 Apr 2011" +.TH LESS 1 "Version 444: 09 Jun 2011" .SH NAME less \- opposite of more .SH SYNOPSIS @@ -1276,7 +1276,7 @@ to each of the possible values for LESSC .PP If neither LESSCHARSET nor LESS
svn commit: r223455 - stable/8/sys/dev/atkbdc
Author: delphij Date: Thu Jun 23 00:29:35 2011 New Revision: 223455 URL: http://svn.freebsd.org/changeset/base/223455 Log: MFC r223341: Correct a typo. Submitted by: Fabian Keil Modified: stable/8/sys/dev/atkbdc/atkbd.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) Modified: stable/8/sys/dev/atkbdc/atkbd.c == --- stable/8/sys/dev/atkbdc/atkbd.c Thu Jun 23 00:27:45 2011 (r223454) +++ stable/8/sys/dev/atkbdc/atkbd.c Thu Jun 23 00:29:35 2011 (r223455) @@ -1100,7 +1100,7 @@ get_typematic(keyboard_t *kbd) /* * Traditional entry points of int 0x15 and 0x16 are fixed * and later BIOSes follow them. (U)EFI CSM specification -* also mandate these fixed entry points. +* also mandates these fixed entry points. * * Validate the entry points here before we proceed further. * It's known that some recent laptops does not have the ___ 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
Marcel Moolenaar wrote: > On Jun 22, 2011, at 4:24 PM, Jung-uk Kim wrote: >> I just realized kern_clocksource.c was excluded for arm and ia64. >> Here is updated patch. Please ignore the previous one. > > Any reason why we're not adding kern_clocksource.c for them? Their event timers code still waits for refactoring. I have neither documentation nor hardware for them. Help would be appreciated. -- 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: r223456 - in stable/7: contrib/less usr.bin/less
Author: delphij Date: Thu Jun 23 00:36:49 2011 New Revision: 223456 URL: http://svn.freebsd.org/changeset/base/223456 Log: MFC less v444. Deleted: stable/7/contrib/less/COPYING Modified: stable/7/contrib/less/LICENSE stable/7/contrib/less/Makefile.aut stable/7/contrib/less/Makefile.wnm stable/7/contrib/less/NEWS stable/7/contrib/less/README stable/7/contrib/less/brac.c stable/7/contrib/less/ch.c stable/7/contrib/less/charset.c stable/7/contrib/less/charset.h stable/7/contrib/less/cmd.h stable/7/contrib/less/cmdbuf.c stable/7/contrib/less/command.c stable/7/contrib/less/configure stable/7/contrib/less/configure.ac stable/7/contrib/less/cvt.c stable/7/contrib/less/decode.c stable/7/contrib/less/defines.ds stable/7/contrib/less/defines.h.in stable/7/contrib/less/defines.o2 stable/7/contrib/less/defines.o9 stable/7/contrib/less/defines.wn stable/7/contrib/less/edit.c stable/7/contrib/less/filename.c stable/7/contrib/less/forwback.c stable/7/contrib/less/funcs.h stable/7/contrib/less/help.c stable/7/contrib/less/ifile.c stable/7/contrib/less/input.c stable/7/contrib/less/jump.c stable/7/contrib/less/less.h stable/7/contrib/less/less.hlp stable/7/contrib/less/less.man stable/7/contrib/less/less.nro stable/7/contrib/less/lessecho.c stable/7/contrib/less/lessecho.man stable/7/contrib/less/lessecho.nro stable/7/contrib/less/lesskey.c stable/7/contrib/less/lesskey.h stable/7/contrib/less/lesskey.man stable/7/contrib/less/lesskey.nro stable/7/contrib/less/lglob.h stable/7/contrib/less/line.c stable/7/contrib/less/linenum.c stable/7/contrib/less/lsystem.c stable/7/contrib/less/main.c stable/7/contrib/less/mark.c stable/7/contrib/less/mkhelp.c stable/7/contrib/less/optfunc.c stable/7/contrib/less/option.c stable/7/contrib/less/option.h stable/7/contrib/less/opttbl.c stable/7/contrib/less/os.c stable/7/contrib/less/output.c stable/7/contrib/less/pattern.c stable/7/contrib/less/pattern.h stable/7/contrib/less/pckeys.h stable/7/contrib/less/position.c stable/7/contrib/less/position.h stable/7/contrib/less/prompt.c stable/7/contrib/less/screen.c stable/7/contrib/less/scrsize.c stable/7/contrib/less/search.c stable/7/contrib/less/signal.c stable/7/contrib/less/tags.c stable/7/contrib/less/ttyin.c stable/7/contrib/less/version.c stable/7/usr.bin/less/defines.h Directory Properties: stable/7/contrib/less/ (props changed) stable/7/usr.bin/less/ (props changed) Modified: stable/7/contrib/less/LICENSE == --- stable/7/contrib/less/LICENSE Thu Jun 23 00:29:35 2011 (r223455) +++ stable/7/contrib/less/LICENSE Thu Jun 23 00:36:49 2011 (r223456) @@ -2,7 +2,7 @@ Less -Copyright (C) 1984-2009 Mark Nudelman +Copyright (C) 1984-2011 Mark Nudelman Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/7/contrib/less/Makefile.aut == --- stable/7/contrib/less/Makefile.aut Thu Jun 23 00:29:35 2011 (r223455) +++ stable/7/contrib/less/Makefile.aut Thu Jun 23 00:36:49 2011 (r223456) @@ -34,6 +34,14 @@ DISTFILES = \ all: help.c funcs.h ${srcdir}/configure +release: .FORCE + ${MAKE} -f Makefile.aut tagall + ${MAKE} -f Makefile.aut all + ${MAKE} -f Makefile.aut clean + ${MAKE} -f Makefile.aut dist + +.FORCE: + help.c: less.hlp mkhelp -mv -f ${srcdir}/help.c ${srcdir}/help.c.old rm -rf help.c Modified: stable/7/contrib/less/Makefile.wnm == --- stable/7/contrib/less/Makefile.wnm Thu Jun 23 00:29:35 2011 (r223455) +++ stable/7/contrib/less/Makefile.wnm Thu Jun 23 00:36:49 2011 (r223456) @@ -7,11 +7,11 @@ CC = cl # Normal flags CFLAGS = /nologo /ML /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -LDFLAGS = /subsystem:console /incremental:no /machine:I386 +LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386 # Debugging flags #CFLAGS = /nologo /MDd /W3 /GX /Od /Gm /Zi /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -#LDFLAGS = /subsystem:console /incremental:yes /debug /machine:I386 +#LDFLAGS = /nologo /subsystem:console /incremental:yes /debug /machine:I386 LD = link LIBS = user32.lib Modified: stable/7/contrib/less/NEWS == --- stable/7/contrib/less/NEWS Thu Jun 23 00:29:35 2011(r223455) +++ stable/7/contrib/less/NEWS Thu Jun 23 00:36:49 2011(r223456) @@ -12,6 +12,46 @@ == + Major changes between "less" versions 443 and
Re: svn commit: r223426 - in head/sys: dev/acpica kern sys x86/x86
On Jun 22, 2011, at 5:30 PM, Alexander Motin wrote: > Marcel Moolenaar wrote: >> On Jun 22, 2011, at 4:24 PM, Jung-uk Kim wrote: >>> I just realized kern_clocksource.c was excluded for arm and ia64. >>> Here is updated patch. Please ignore the previous one. >> >> Any reason why we're not adding kern_clocksource.c for them? > > Their event timers code still waits for refactoring. I have neither > documentation nor hardware for them. Help would be appreciated. Can you give me a pointer to a document orpage that describes what is being refactored, why and how? Thanks, -- Marcel Moolenaar mar...@xcllnt.net ___ 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: r223342 - head/contrib/top
On Mon Jun 20 11, Xin LI wrote: > Author: delphij > Date: Mon Jun 20 16:48:00 2011 > New Revision: 223342 > URL: http://svn.freebsd.org/changeset/base/223342 > > Log: > Revert r214857 pursudant to 9.0-RELEASE cycle. why does top(1) have so much problems with finding the applicable number of available columns? ps(1) works great regarding this matter. for me it works without the need for the -w or -ww switch under the console and under X and always makes perfect use of the available columns. i've never been able to make `top -a` display complete commands, although there defenately are enough columns available. cheers. alex > > Requested by: jh > > Modified: > head/contrib/top/display.c > head/contrib/top/top.h > > Modified: head/contrib/top/display.c > == > --- head/contrib/top/display.cMon Jun 20 16:42:20 2011 > (r223341) > +++ head/contrib/top/display.cMon Jun 20 16:48:00 2011 > (r223342) > @@ -698,7 +698,7 @@ char *text; > int width; > > s = NULL; > - width = screen_width; > + width = display_width; > header_length = strlen(text); > if (header_length >= width) { > s = malloc((width + 1) * sizeof(char)); > @@ -706,14 +706,6 @@ char *text; > return (NULL); > strncpy(s, text, width); > s[width] = '\0'; > - } else { > - s = malloc((width + 1) * sizeof(char)); > - if (s == NULL) > - return (NULL); > - strncpy(s, text, width); > - while (screen_width > header_length) > - s[header_length++] = ' '; > - s[width] = '\0'; > } > return (s); > } > @@ -738,7 +730,7 @@ char *text; > if (header_status == ON) > { > putchar('\n'); > - standout(text, stdout); > + fputs(text, stdout); > lastline++; > } > else if (header_status == ERASE) > > Modified: head/contrib/top/top.h > == > --- head/contrib/top/top.hMon Jun 20 16:42:20 2011(r223341) > +++ head/contrib/top/top.hMon Jun 20 16:48:00 2011(r223342) > @@ -14,7 +14,7 @@ > extern int Header_lines; /* 7 */ > > /* Maximum number of columns allowed for display */ > -#define MAX_COLS 512 > +#define MAX_COLS 128 > > /* Log base 2 of 1024 is 10 (2^10 == 1024) */ > #define LOG1024 10 ___ 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: r223426 - in head/sys: dev/acpica kern sys x86/x86
Marcel Moolenaar wrote: > On Jun 22, 2011, at 5:30 PM, Alexander Motin wrote: >> Marcel Moolenaar wrote: >>> On Jun 22, 2011, at 4:24 PM, Jung-uk Kim wrote: I just realized kern_clocksource.c was excluded for arm and ia64. Here is updated patch. Please ignore the previous one. >>> Any reason why we're not adding kern_clocksource.c for them? >> Their event timers code still waits for refactoring. I have neither >> documentation nor hardware for them. Help would be appreciated. > > Can you give me a pointer to a document orpage that describes > what is being refactored, why and how? In short, timer management code was unified and formalized. Instead of direct programming periodic timers from MD code and calling hard-/ stat-/ profclock() from there, timer hardware should be exposed to the MI kernel using sys/timeet.h API to allow kern_clocksource.c manage it. Last require calling its cpu_initclocks_bsp() and cpu_initclocks_ap() callbacks from MD initialization code, and cpu_idleclock() and cpu_activeclock() from MD cpu_idle(). Here is some references: man 4 eventtimers http://wiki.freebsd.org/201010DevSummit?action=AttachFile&do=view&target=timers.pdf http://svnweb.freebsd.org/base?view=revision&revision=209371 http://svnweb.freebsd.org/base?view=revision&revision=212541 All architectures except ia64 and non-Marvell arm are already done, so you may took any of them as reference. Ask me if you have any questions. -- 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: r223457 - head/release/doc/en_US.ISO8859-1/readme
Author: hrs Date: Thu Jun 23 02:35:55 2011 New Revision: 223457 URL: http://svn.freebsd.org/changeset/base/223457 Log: Remove links to mirrorlist.FreeBSD.org. Submitted by: ryusuke Reported by: gavin, brucec Modified: head/release/doc/en_US.ISO8859-1/readme/article.sgml Modified: head/release/doc/en_US.ISO8859-1/readme/article.sgml == --- head/release/doc/en_US.ISO8859-1/readme/article.sgmlThu Jun 23 00:36:49 2011(r223456) +++ head/release/doc/en_US.ISO8859-1/readme/article.sgmlThu Jun 23 02:35:55 2011(r223457) @@ -184,8 +184,7 @@ Lists of locations that mirror &os; can be found in the FTP - Sites section of the Handbook, or on the http://mirrorlist.FreeBSD.org/";> Web pages. + Sites section of the Handbook. Finding a close (in networking terms) mirror from which to download the distribution is highly recommended. ___ 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: r223307 - head/sys/vm
Can this commit please be reverted whilst the kinks are worked out for MIPS? I'm currently knee deep in MIPS related hackery and I'd rather stay on an unpatched -HEAD so dogfood can be properly self-consumed. Thanks, Adrian On 20 June 2011 03:13, Alan Cox wrote: > Author: alc > Date: Sun Jun 19 19:13:24 2011 > New Revision: 223307 > URL: http://svn.freebsd.org/changeset/base/223307 > > Log: > Precisely document the synchronization rules for the page's dirty field. > (Saying that the lock on the object that the page belongs to must be held > only represents one aspect of the rules.) > > Eliminate the use of the page queues lock for atomically performing read- > modify-write operations on the dirty field when the underlying architecture > supports atomic operations on char and short types. > > Document the fact that 32KB pages aren't really supported. > > Reviewed by: attilio, kib > > Modified: > head/sys/vm/vm_fault.c > head/sys/vm/vm_page.c > head/sys/vm/vm_page.h > > Modified: head/sys/vm/vm_fault.c > == > --- head/sys/vm/vm_fault.c Sun Jun 19 18:34:49 2011 (r223306) > +++ head/sys/vm/vm_fault.c Sun Jun 19 19:13:24 2011 (r223307) > @@ -1089,10 +1089,20 @@ vm_fault_quick_hold_pages(vm_map_t map, > * caller's changes may go unnoticed because they are > * performed through an unmanaged mapping or by a DMA > * operation. > + * > + * The object lock is not held here. Therefore, like > + * a pmap operation, the page queues lock may be > + * required in order to call vm_page_dirty(). See > + * vm_page_clear_dirty_mask(). > */ > +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || \ > + defined(__mips__) > + vm_page_dirty(*mp); > +#else > vm_page_lock_queues(); > vm_page_dirty(*mp); > vm_page_unlock_queues(); > +#endif > } > } > if (pmap_failed) { > > Modified: head/sys/vm/vm_page.c > == > --- head/sys/vm/vm_page.c Sun Jun 19 18:34:49 2011 (r223306) > +++ head/sys/vm/vm_page.c Sun Jun 19 19:13:24 2011 (r223307) > @@ -729,7 +729,12 @@ vm_page_sleep(vm_page_t m, const char *m > /* > * vm_page_dirty: > * > - * make page all dirty > + * Set all bits in the page's dirty field. > + * > + * The object containing the specified page must be locked if the call is > + * made from the machine-independent layer. If, however, the call is > + * made from the pmap layer, then the page queues lock may be required. > + * See vm_page_clear_dirty_mask(). > */ > void > vm_page_dirty(vm_page_t m) > @@ -2325,15 +2330,41 @@ vm_page_clear_dirty_mask(vm_page_t m, in > /* > * If the object is locked and the page is neither VPO_BUSY nor > * PG_WRITEABLE, then the page's dirty field cannot possibly be > - * modified by a concurrent pmap operation. > + * set by a concurrent pmap operation. > */ > VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED); > if ((m->oflags & VPO_BUSY) == 0 && (m->flags & PG_WRITEABLE) == 0) > m->dirty &= ~pagebits; > else { > +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || \ > + defined(__mips__) > + /* > + * On the aforementioned architectures, the page queues lock > + * is not required by the following read-modify-write > + * operation. The combination of the object's lock and an > + * atomic operation suffice. Moreover, the pmap layer on > + * these architectures can call vm_page_dirty() without > + * holding the page queues lock. > + */ > +#if PAGE_SIZE == 4096 > + atomic_clear_char(&m->dirty, pagebits); > +#elif PAGE_SIZE == 8192 > + atomic_clear_short(&m->dirty, pagebits); > +#elif PAGE_SIZE == 16384 > + atomic_clear_int(&m->dirty, pagebits); > +#else > +#error "PAGE_SIZE is not supported." > +#endif > +#else > + /* > + * Otherwise, the page queues lock is required to ensure that > + * a concurrent pmap operation does not set the page's dirty > + * field during the following read-modify-write operation. > + */ > vm_page_lock_queues(); > m->dirty &= ~pagebits; > vm_page_unlock_queues(); > +#endif > } > } > > > Modified: head/sys/vm/vm_page.h > == > --- head/sys/vm/
svn commit: r223458 - head/release/doc/share/sgml
Author: hrs Date: Thu Jun 23 02:38:06 2011 New Revision: 223458 URL: http://svn.freebsd.org/changeset/base/223458 Log: Bump &release.manpath.*;. Modified: head/release/doc/share/sgml/release.ent Modified: head/release/doc/share/sgml/release.ent == --- head/release/doc/share/sgml/release.ent Thu Jun 23 02:35:55 2011 (r223457) +++ head/release/doc/share/sgml/release.ent Thu Jun 23 02:38:06 2011 (r223458) @@ -36,8 +36,8 @@ http://www.FreeBSD.org/cgi/man.cgi";> - - + + ___ 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: r223459 - in head/sys/dev/ath: . ath_hal ath_hal/ar5210 ath_hal/ar5211 ath_hal/ar5212 ath_hal/ar5416
Author: adrian Date: Thu Jun 23 02:38:36 2011 New Revision: 223459 URL: http://svn.freebsd.org/changeset/base/223459 Log: Break out most of the HAL related tweaks into a per-HAL instance, rather than global variables. This specifically allows for debugging to be enabled per-NIC, rather than globally. Since the ath driver doesn't know about AH_DEBUG, and to keep the ABI consistent regardless of whether AH_DEBUG is enabled or not, enable the debug parameter always but only conditionally compile in the debug methods if needed. The ALQ support is currently still global pending some brainstorming. Submitted by: ssgriffonu...@gmail.com Reviewed by: adrian, bschmidt Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c head/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c head/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c head/sys/dev/ath/ath_hal/ar5416/ar2133.c head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_sysctl.h Modified: head/sys/dev/ath/ah_osdep.c == --- head/sys/dev/ath/ah_osdep.c Thu Jun 23 02:38:06 2011(r223458) +++ head/sys/dev/ath/ah_osdep.c Thu Jun 23 02:38:36 2011(r223459) @@ -76,33 +76,6 @@ extern void DO_HALDEBUG(struct ath_hal * /* NB: put this here instead of the driver to avoid circular references */ SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters"); -SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters"); - -#ifdef AH_DEBUG -int ath_hal_debug = 0; -SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, CTLFLAG_RW, &ath_hal_debug, - 0, "Atheros HAL debugging printfs"); -TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); -#endif /* AH_DEBUG */ - -int ath_hal_ar5416_biasadj = 0; -SYSCTL_INT(_hw_ath_hal, OID_AUTO, ar5416_biasadj, CTLFLAG_RW, - &ath_hal_ar5416_biasadj, 0, "Enable 2ghz AR5416 direction sensitivity" - " bias adjust"); - -/* NB: these are deprecated; they exist for now for compatibility */ -intath_hal_dma_beacon_response_time = 2; /* in TU's */ -SYSCTL_INT(_hw_ath_hal, OID_AUTO, dma_brt, CTLFLAG_RW, - &ath_hal_dma_beacon_response_time, 0, - "Atheros HAL DMA beacon response time"); -intath_hal_sw_beacon_response_time = 10; /* in TU's */ -SYSCTL_INT(_hw_ath_hal, OID_AUTO, sw_brt, CTLFLAG_RW, - &ath_hal_sw_beacon_response_time, 0, - "Atheros HAL software beacon response time"); -intath_hal_additional_swba_backoff = 0;/* in TU's */ -SYSCTL_INT(_hw_ath_hal, OID_AUTO, swba_backoff, CTLFLAG_RW, - &ath_hal_additional_swba_backoff, 0, - "Atheros HAL additional SWBA backoff time"); MALLOC_DEFINE(M_ATH_HAL, "ath_hal", "ath hal data"); @@ -146,7 +119,7 @@ ath_hal_ether_sprintf(const u_int8_t *ma void DO_HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) { - if ((mask == HAL_DEBUG_UNMASKABLE) || (ath_hal_debug & mask)) { + if ((mask == HAL_DEBUG_UNMASKABLE) || (ah->ah_config.ah_debug & mask)) { __va_list ap; va_start(ap, fmt); ath_hal_vprintf(ah, fmt, ap); @@ -174,6 +147,8 @@ DO_HALDEBUG(struct ath_hal *ah, u_int ma #include #include +SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters"); + static struct alq *ath_hal_alq; static int ath_hal_alq_emitdev;/* need to emit DEVICE record */ static u_int ath_hal_alq_lost; /* count of lost records */ Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Thu Jun 23 02:38:06 2011 (r223458) +++ head/sys/dev/ath/ath_hal/ah.h Thu Jun 23 02:38:36 2011 (r223459) @@ -756,6 +756,17 @@ struct dfs_event { }; typedef struct dfs_event HAL_DFS_EVENT; +typedef struct +{ + int ah_debug; /* only used if AH_DEBUG is defined */ + int ah_ar5416_biasadj; /* enable AR2133 radio specific bias fiddling */ + + /* NB: these are deprecated; they exist for now for compatibility */ + int ah_dma_beacon_response_time;/* in TU's */ + int ah_sw_beacon_response_time; /* in TU's */ + int ah_additional_swba_backoff; /* in TU's */ +}HAL_OPS_CONFIG; + /* * Hardware Access Layer (HAL) API. * @@ -784,6 +795,7 @@ struct ath_hal { uint16_t*ah_eepromdata; /* eeprom buffer, if needed */ + HAL_OPS_CONFIG ah_config; const HAL_RATE_TABLE *__ahdecl(*ah_getRateTable)(struct ath_hal *,
svn commit: r223460 - head/sys/powerpc/ps3
Author: nwhitehorn Date: Thu Jun 23 03:20:11 2011 New Revision: 223460 URL: http://svn.freebsd.org/changeset/base/223460 Log: Add hypervisor call error codes. Modified: head/sys/powerpc/ps3/ps3-hvcall.h head/sys/powerpc/ps3/ps3-hvcall.master Modified: head/sys/powerpc/ps3/ps3-hvcall.h == --- head/sys/powerpc/ps3/ps3-hvcall.h Thu Jun 23 02:38:36 2011 (r223459) +++ head/sys/powerpc/ps3/ps3-hvcall.h Thu Jun 23 03:20:11 2011 (r223460) @@ -11,6 +11,34 @@ enum lpar_id { PS3_LPAR_ID_PME = 0x01, }; +/* Return codes from hypercalls */ +#define LV1_SUCCESS0 +#define LV1_RESOURCE_SHORTAGE -2 +#define LV1_NO_PRIVILEGE -3 +#define LV1_DENIED_BY_POLICY -4 +#define LV1_ACCESS_VIOLATION -5 +#define LV1_NO_ENTRY -6 +#define LV1_DUPLICATE_ENTRY-7 +#define LV1_TYPE_MISMATCH -8 +#define LV1_BUSY -9 +#define LV1_EMPTY -10 +#define LV1_WRONG_STATE-11 +#define LV1_NO_MATCH -13 +#define LV1_ALREADY_CONNECTED -14 +#define LV1_UNSUPPORTED_PARAMETER_VALUE-15 +#define LV1_CONDITION_NOT_SATISFIED-16 +#define LV1_ILLEGAL_PARAMETER_VALUE-17 +#define LV1_BAD_OPTION -18 +#define LV1_IMPLEMENTATION_LIMITATION -19 +#define LV1_NOT_IMPLEMENTED-20 +#define LV1_INVALID_CLASS_ID -21 +#define LV1_CONSTRAINT_NOT_SATISFIED -22 +#define LV1_ALIGNMENT_ERROR-23 +#define LV1_HARDWARE_ERROR -24 +#define LV1_INVALID_DATA_FORMAT-25 +#define LV1_INVALID_OPERATION -26 +#define LV1_INTERNAL_ERROR -32768 + static inline uint64_t lv1_repository_string(const char *str) { Modified: head/sys/powerpc/ps3/ps3-hvcall.master == --- head/sys/powerpc/ps3/ps3-hvcall.master Thu Jun 23 02:38:36 2011 (r223459) +++ head/sys/powerpc/ps3/ps3-hvcall.master Thu Jun 23 03:20:11 2011 (r223460) @@ -11,6 +11,34 @@ enum lpar_id { PS3_LPAR_ID_PME = 0x01, }; +/* Return codes from hypercalls */ +#define LV1_SUCCESS0 +#define LV1_RESOURCE_SHORTAGE -2 +#define LV1_NO_PRIVILEGE -3 +#define LV1_DENIED_BY_POLICY -4 +#define LV1_ACCESS_VIOLATION -5 +#define LV1_NO_ENTRY -6 +#define LV1_DUPLICATE_ENTRY-7 +#define LV1_TYPE_MISMATCH -8 +#define LV1_BUSY -9 +#define LV1_EMPTY -10 +#define LV1_WRONG_STATE-11 +#define LV1_NO_MATCH -13 +#define LV1_ALREADY_CONNECTED -14 +#define LV1_UNSUPPORTED_PARAMETER_VALUE-15 +#define LV1_CONDITION_NOT_SATISFIED-16 +#define LV1_ILLEGAL_PARAMETER_VALUE-17 +#define LV1_BAD_OPTION -18 +#define LV1_IMPLEMENTATION_LIMITATION -19 +#define LV1_NOT_IMPLEMENTED-20 +#define LV1_INVALID_CLASS_ID -21 +#define LV1_CONSTRAINT_NOT_SATISFIED -22 +#define LV1_ALIGNMENT_ERROR-23 +#define LV1_HARDWARE_ERROR -24 +#define LV1_INVALID_DATA_FORMAT-25 +#define LV1_INVALID_OPERATION -26 +#define LV1_INTERNAL_ERROR -32768 + static inline uint64_t lv1_repository_string(const char *str) { ___ 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: r223461 - head/sys/powerpc/ps3
Author: nwhitehorn Date: Thu Jun 23 03:37:25 2011 New Revision: 223461 URL: http://svn.freebsd.org/changeset/base/223461 Log: Rework the PS3 disk driver to support NCQ and do its DMA a little differently. Modified: head/sys/powerpc/ps3/ps3disk.c Modified: head/sys/powerpc/ps3/ps3disk.c == --- head/sys/powerpc/ps3/ps3disk.c Thu Jun 23 03:20:11 2011 (r223460) +++ head/sys/powerpc/ps3/ps3disk.c Thu Jun 23 03:37:25 2011 (r223461) @@ -116,39 +116,25 @@ struct ps3disk_softc { struct disk **sc_disk; struct bio_queue_head sc_bioq; + struct bio_queue_head sc_deferredq; + struct proc *sc_task; - struct proc *sc_task; - - int sc_bounce_maxblocks; - bus_dma_tag_t sc_bounce_dmatag; - bus_dmamap_t sc_bounce_dmamap; - bus_addr_t sc_bounce_dmaphys; - char *sc_bounce; - uint64_t sc_bounce_lpar; - int sc_bounce_busy; - uint64_t sc_bounce_tag; - uint64_t sc_bounce_status; + bus_dma_tag_t sc_dmatag; int sc_running; - int sc_debug; }; static int ps3disk_open(struct disk *dp); static int ps3disk_close(struct disk *dp); static void ps3disk_strategy(struct bio *bp); -static void ps3disk_task(void *arg); -static int ps3disk_intr_filter(void *arg); +static void ps3disk_task(void *arg); static void ps3disk_intr(void *arg); -static void ps3disk_getphys(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static int ps3disk_get_disk_geometry(struct ps3disk_softc *sc); static int ps3disk_enum_regions(struct ps3disk_softc *sc); -static int ps3disk_read(struct ps3disk_softc *sc, int regidx, - uint64_t start_sector, uint64_t sector_count, char *data); -static int ps3disk_write(struct ps3disk_softc *sc, int regidx, - uint64_t start_sector, uint64_t sector_count, char *data); -static int ps3disk_flush(struct ps3disk_softc *sc); +static void ps3disk_transfer(void *arg, bus_dma_segment_t *segs, int nsegs, +int error); static void ps3disk_sysctlattach(struct ps3disk_softc *sc); @@ -172,6 +158,7 @@ ps3disk_attach(device_t dev) struct ps3disk_softc *sc; struct disk *d; intmax_t mb; + uint64_t junk; char unit; int i, err; @@ -205,7 +192,6 @@ ps3disk_attach(device_t dev) } /* Setup interrupt handler */ - sc->sc_irqid = 0; sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_irqid, RF_ACTIVE); @@ -217,52 +203,24 @@ ps3disk_attach(device_t dev) err = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_BIO | INTR_MPSAFE | INTR_ENTROPY, - ps3disk_intr_filter, ps3disk_intr, sc, &sc->sc_irqctx); + NULL, ps3disk_intr, sc, &sc->sc_irqctx); if (err) { device_printf(dev, "Could not setup IRQ\n"); err = ENXIO; goto fail_release_intr; } - /* Setup DMA bounce buffer */ - - sc->sc_bounce_maxblocks = DFLTPHYS / sc->sc_blksize; - + /* Setup DMA */ err = bus_dma_tag_create(bus_get_dma_tag(dev), 4096, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, - sc->sc_bounce_maxblocks * sc->sc_blksize, 1, - sc->sc_bounce_maxblocks * sc->sc_blksize, - 0, NULL, NULL, &sc->sc_bounce_dmatag); + BUS_SPACE_UNRESTRICTED, 1, PAGE_SIZE, 0, + busdma_lock_mutex, &sc->sc_mtx, &sc->sc_dmatag); if (err) { - device_printf(dev, "Could not create DMA tag for bounce buffer\n"); + device_printf(dev, "Could not create DMA tag\n"); err = ENXIO; goto fail_teardown_intr; } - err = bus_dmamem_alloc(sc->sc_bounce_dmatag, (void **) &sc->sc_bounce, - BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO, - &sc->sc_bounce_dmamap); - if (err) { - device_printf(dev, "Could not allocate DMA memory for bounce buffer\n"); - err = ENXIO; - goto fail_destroy_dmatag; - } - - err = bus_dmamap_load(sc->sc_bounce_dmatag, sc->sc_bounce_dmamap, - sc->sc_bounce, sc->sc_bounce_maxblocks * sc->sc_blksize, - ps3disk_getphys, &sc->sc_bounce_dmaphys, 0); - if (err) { - device_printf(dev, "Could not load DMA map for bounce buffer\n"); - err = ENXIO; - goto fail_free_dmamem; - } - - sc->sc_bounce_lpar = vtophys(sc->sc_bounce); - - if (bootverbose) - device_printf(dev, "bounce buffer lpar address 0x%016lx\n", - sc->sc_bounce_lpar); - /* Setup disks */ sc->sc_disk = malloc(sc->sc_nregs * sizeof(struct disk *), @@ -270,7 +228,7 @@ ps3disk_attach(device_t dev) if (!sc->sc_disk) { device_printf(dev, "Could not allocate disk(s)\n"); err = ENOMEM;
svn commit: r223462 - head/sys/powerpc/ps3
Author: nwhitehorn Date: Thu Jun 23 04:06:33 2011 New Revision: 223462 URL: http://svn.freebsd.org/changeset/base/223462 Log: Use 4 KB pages for storage bus devices, which seems to be what the HV uses internally. Modified: head/sys/powerpc/ps3/ps3bus.c Modified: head/sys/powerpc/ps3/ps3bus.c == --- head/sys/powerpc/ps3/ps3bus.c Thu Jun 23 03:37:25 2011 (r223461) +++ head/sys/powerpc/ps3/ps3bus.c Thu Jun 23 04:06:33 2011 (r223462) @@ -629,7 +629,7 @@ ps3bus_get_dma_tag(device_t dev, device_ { struct ps3bus_devinfo *dinfo = device_get_ivars(child); struct ps3bus_softc *sc = device_get_softc(dev); - int i, err, flags; + int i, err, flags, pagesize; if (dinfo->bustype != PS3_BUSTYPE_SYSBUS && dinfo->bustype != PS3_BUSTYPE_STORAGE) @@ -646,9 +646,13 @@ ps3bus_get_dma_tag(device_t dev, device_ dinfo->devtype == PS3_DEVTYPE_USB) flags = 2; /* 8-bit mode */ + pagesize = 24; /* log_2(16 MB) */ + if (dinfo->bustype == PS3_BUSTYPE_STORAGE) + pagesize = 12; /* 4 KB */ + for (i = 0; i < sc->rcount; i++) { err = lv1_allocate_device_dma_region(dinfo->bus, dinfo->dev, - sc->regions[i].mr_size, 24 /* log_2(16 MB) */, flags, + sc->regions[i].mr_size, pagesize, flags, &dinfo->dma_base[i]); if (err != 0) { device_printf(child, ___ 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: r223463 - head/sys/powerpc/ps3
Author: nwhitehorn Date: Thu Jun 23 04:35:45 2011 New Revision: 223463 URL: http://svn.freebsd.org/changeset/base/223463 Log: Use atomic operations to mask and unmask IRQs. This prevents a problem (obvious in retrospect) in which interrupts on one CPU that are temporarily masked can end up permanently masked when a handler on another CPU clobbers the interrupt mask register with an old copy. Modified: head/sys/powerpc/ps3/ps3pic.c Modified: head/sys/powerpc/ps3/ps3pic.c == --- head/sys/powerpc/ps3/ps3pic.c Thu Jun 23 04:06:33 2011 (r223462) +++ head/sys/powerpc/ps3/ps3pic.c Thu Jun 23 04:35:45 2011 (r223463) @@ -56,10 +56,10 @@ static void ps3pic_mask(device_t, u_int) static voidps3pic_unmask(device_t, u_int); struct ps3pic_softc { - uint64_t*bitmap_thread0; - uint64_t*mask_thread0; - uint64_t*bitmap_thread1; - uint64_t*mask_thread1; + volatile uint64_t *bitmap_thread0; + volatile uint64_t *mask_thread0; + volatile uint64_t *bitmap_thread1; + volatile uint64_t *mask_thread1; uint64_tsc_ipi_outlet[2]; int sc_vector[64]; @@ -219,8 +219,8 @@ ps3pic_mask(device_t dev, u_int irq) if (irq == sc->sc_ipi_outlet[0]) return; - sc->mask_thread0[0] &= ~(1UL << (63 - irq)); - sc->mask_thread1[0] &= ~(1UL << (63 - irq)); + atomic_clear_64(&sc->mask_thread0[0], 1UL << (63 - irq)); + atomic_clear_64(&sc->mask_thread1[0], 1UL << (63 - irq)); lv1_get_logical_ppe_id(&ppe); lv1_did_update_interrupt_mask(ppe, 0); @@ -234,8 +234,8 @@ ps3pic_unmask(device_t dev, u_int irq) uint64_t ppe; sc = device_get_softc(dev); - sc->mask_thread0[0] |= (1UL << (63 - irq)); - sc->mask_thread1[0] |= (1UL << (63 - irq)); + atomic_set_64(&sc->mask_thread0[0], 1UL << (63 - irq)); + atomic_set_64(&sc->mask_thread1[0], 1UL << (63 - irq)); lv1_get_logical_ppe_id(&ppe); lv1_did_update_interrupt_mask(ppe, 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: r223464 - head/sys/vm
Author: alc Date: Thu Jun 23 05:23:59 2011 New Revision: 223464 URL: http://svn.freebsd.org/changeset/base/223464 Log: Revert to using the page queues lock in vm_page_clear_dirty_mask() on MIPS. (At present, although atomic_clear_char() is defined by atomic.h on MIPS, it is not actually implemented by support.S.) Modified: head/sys/vm/vm_fault.c head/sys/vm/vm_page.c Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Thu Jun 23 04:35:45 2011(r223463) +++ head/sys/vm/vm_fault.c Thu Jun 23 05:23:59 2011(r223464) @@ -1095,8 +1095,7 @@ vm_fault_quick_hold_pages(vm_map_t map, * required in order to call vm_page_dirty(). See * vm_page_clear_dirty_mask(). */ -#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || \ -defined(__mips__) +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) vm_page_dirty(*mp); #else vm_page_lock_queues(); Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Thu Jun 23 04:35:45 2011(r223463) +++ head/sys/vm/vm_page.c Thu Jun 23 05:23:59 2011(r223464) @@ -2336,8 +2336,7 @@ vm_page_clear_dirty_mask(vm_page_t m, in if ((m->oflags & VPO_BUSY) == 0 && (m->flags & PG_WRITEABLE) == 0) m->dirty &= ~pagebits; else { -#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || \ -defined(__mips__) +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) /* * On the aforementioned architectures, the page queues lock * is not required by the following read-modify-write ___ 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: r223307 - head/sys/vm
On 06/22/2011 21:36, Adrian Chadd wrote: Can this commit please be reverted whilst the kinks are worked out for MIPS? I've reverted the MIPS-specific code. Alan ___ 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: r223307 - head/sys/vm
On 23 June 2011 13:28, Alan Cox wrote: > On 06/22/2011 21:36, Adrian Chadd wrote: >> >> Can this commit please be reverted whilst the kinks are worked out for >> MIPS? > > I've reverted the MIPS-specific code. Thanks! Adrian ___ 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: r223465 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Author: adrian Date: Thu Jun 23 06:53:13 2011 New Revision: 223465 URL: http://svn.freebsd.org/changeset/base/223465 Log: Fix indenting issues introduced by the previous commit. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Thu Jun 23 05:23:59 2011(r223464) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Thu Jun 23 06:53:13 2011(r223465) @@ -84,9 +84,9 @@ ar5212BeaconInit(struct ath_hal *ah, case HAL_M_HOSTAP: case HAL_M_IBSS: bt.bt_nextdba = (next_beacon - - ah->ah_config.ah_dma_beacon_response_time) << 3; /* 1/8 TU */ + ah->ah_config.ah_dma_beacon_response_time) << 3; /* 1/8 TU */ bt.bt_nextswba = (next_beacon - -ah->ah_config.ah_sw_beacon_response_time) << 3;/* 1/8 TU */ + ah->ah_config.ah_sw_beacon_response_time) << 3; /* 1/8 TU */ break; } /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Thu Jun 23 05:23:59 2011(r223464) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Thu Jun 23 06:53:13 2011(r223465) @@ -93,9 +93,9 @@ ar5416BeaconInit(struct ath_hal *ah, /* fall thru... */ case HAL_M_HOSTAP: bt.bt_nextdba = (next_beacon - - ah->ah_config.ah_dma_beacon_response_time) << 3; /* 1/8 TU */ + ah->ah_config.ah_dma_beacon_response_time) << 3;/* 1/8 TU */ bt.bt_nextswba = (next_beacon - -ah->ah_config.ah_sw_beacon_response_time) << 3;/* 1/8 TU */ + ah->ah_config.ah_sw_beacon_response_time) << 3; /* 1/8 TU */ bt.bt_flags |= AR_TIMER_MODE_TBTT | AR_TIMER_MODE_DBA | AR_TIMER_MODE_SWBA; ___ 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: r223466 - in head/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 ar5416 ar9001 ar9002
Author: adrian Date: Thu Jun 23 06:55:29 2011 New Revision: 223466 URL: http://svn.freebsd.org/changeset/base/223466 Log: Re-introduce a global ath_hal_debug again for now, whilst I figure out what to do about the few cases where the HAL state isn't available (regdomain) or isn't yet setup (probe/attach.) The global ath_hal_debug now affects all instances of the HAL. This also restores the ability for probe/attach debugging to work; as the sysctl tree may not be attached at that point. Users can just set the global "hw.ath.hal.debug" to a suitable value to enable probe/attach related debugging. Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ah_regdomain.c head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c head/sys/dev/ath/ath_hal/ar5212/ar5112.c head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Thu Jun 23 06:53:13 2011 (r223465) +++ head/sys/dev/ath/ath_hal/ah_internal.h Thu Jun 23 06:55:29 2011 (r223466) @@ -498,10 +498,29 @@ externvoid ath_hal_free(void *); /* common debugging interfaces */ #ifdef AH_DEBUG #include "ah_debug.h" +extern int ath_hal_debug; /* Global debug flags */ + +/* + * This is used for global debugging, when ahp doesn't yet have the + * related debugging state. For example, during probe/attach. + */ +#defineHALDEBUG_G(_ah, __m, ...) \ + do {\ + if ((__m) == HAL_DEBUG_UNMASKABLE ||\ + ath_hal_debug & (__m)) {\ + DO_HALDEBUG((_ah), (__m), __VA_ARGS__); \ + } \ + } while (0); + +/* + * This is used for local debugging, when ahp isn't NULL and + * thus may have debug flags set. + */ #defineHALDEBUG(_ah, __m, ...) \ do {\ if ((__m) == HAL_DEBUG_UNMASKABLE ||\ - ((_ah != AH_NULL) && (((struct ath_hal*)_ah)->ah_config.ah_debug & (__m { \ + ath_hal_debug & (__m) ||\ + (_ah)->ah_config.ah_debug & (__m)) {\ DO_HALDEBUG((_ah), (__m), __VA_ARGS__); \ } \ } while(0); Modified: head/sys/dev/ath/ath_hal/ah_regdomain.c == --- head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Jun 23 06:53:13 2011 (r223465) +++ head/sys/dev/ath/ath_hal/ah_regdomain.c Thu Jun 23 06:55:29 2011 (r223466) @@ -167,7 +167,7 @@ isEepromValid(struct ath_hal *ah) if (regDomainPairs[i].regDmnEnum == rd) return AH_TRUE; } - HALDEBUG(ah, HAL_DEBUG_REGDOMAIN, + HALDEBUG_G(ah, HAL_DEBUG_REGDOMAIN, "%s: invalid regulatory domain/country code 0x%x\n", __func__, rd); return AH_FALSE; } @@ -609,7 +609,7 @@ ath_hal_mapgsm(int sku, int freq) return 1544 + freq; if (sku == SKU_SR9) return 3344 - freq; - HALDEBUG(AH_NULL, HAL_DEBUG_ANY, + HALDEBUG_G(AH_NULL, HAL_DEBUG_ANY, "%s: cannot map freq %u unknown gsm sku %u\n", __func__, freq, sku); return freq; Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c == --- head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Jun 23 06:53:13 2011(r223465) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Thu Jun 23 06:55:29 2011(r223466) @@ -181,14 +181,14 @@ ar5210Attach(uint16_t devid, HAL_SOFTC s HAL_STATUS ecode; int i; - HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, + HALDEBUG_G(AH_NULL, HAL_DEBUG_ATTACH, "%s: devid 0x%x sc %p st %p sh %p\n", __func__, devid, sc, (void*) st, (void*) sh); /* NB: memory is returned zero'd */ ahp = ath_hal_malloc(sizeof (struct ath_hal_5210)); if (ahp == AH_NULL) { - HALDEBUG(AH_NULL, HAL_DEBUG_ANY, + HALDEBUG_G(AH_NULL, HAL_DEBUG_ANY, "%s: no memory for state block\n", __func__); ecode = HAL_ENOM