diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5 index 61643a7afe3f..e4dea72fd317 100644 --- a/sbin/devd/devd.conf.5 +++ b/sbin/devd/devd.conf.5 @@ -283,7 +283,7 @@ Hub port number (USB) Product ID (pccard/USB). .It Li release Hardware revision (USB) -.It Li serial +.It Li sernum Serial Number (USB). .It Li slot Card slot. diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 88133dbdcc40..96561b742f9e 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: head/tools/build/options/makeman 221161 2011-04-28 11:21:49Z des +.\" from FreeBSD: head/tools/build/options/makeman 221733 2011-05-10 13:01:11Z ru .\" $FreeBSD$ -.Dd April 30, 2011 +.Dd May 10, 2011 .Dt SRC.CONF 5 .Os .Sh NAME @@ -78,9 +78,9 @@ The following list provides a name and short description for variables that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 183242 2008-09-21 22:02:26Z sam +.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 221540 2011-05-06 19:13:03Z ru Set to not build process accounting tools such as -.Xr ac 8 +.Xr ac 8 and .Xr accton 8 . .It Va WITHOUT_ACPI @@ -132,6 +132,8 @@ When set, it also enforces the following options: .It .Va WITHOUT_BIND_ETC .It +.Va WITHOUT_BIND_LIBS +.It .Va WITHOUT_BIND_LIBS_LWRES .It .Va WITHOUT_BIND_MTREE @@ -253,6 +255,15 @@ When set, it also enforces the following options: .It Va WITHOUT_CLANG .\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG 208971 2010-06-10 06:20:26Z ed Set to not build the Clang C/C++ compiler. +.Pp +It is a default setting on +arm/arm, arm/armeb, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, powerpc/powerpc64, sparc64/sparc64 and sun4v/sparc64. +.It Va WITH_CLANG +.\" from FreeBSD: head/tools/build/options/WITH_CLANG 221730 2011-05-10 11:14:40Z ru +Set to build the Clang C/C++ compiler. +.Pp +It is a default setting on +amd64/amd64, i386/i386, pc98/i386 and powerpc/powerpc. .It Va WITHOUT_CPP .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build @@ -264,10 +275,6 @@ When set, it also enforces the following options: .Pp .Bl -item -compact .It -.Va WITHOUT_GSSAPI -(can be overridden with -.Va WITH_GSSAPI ) -.It .Va WITHOUT_KERBEROS .It .Va WITHOUT_KERBEROS_SUPPORT @@ -276,6 +283,15 @@ When set, it also enforces the following options: .It .Va WITHOUT_OPENSSL .El +.Pp +When set, the following options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_GSSAPI +(unless +.Va WITH_GSSAPI +is set explicitly) +.El .It Va WITHOUT_CTM .\" from FreeBSD: head/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build @@ -285,7 +301,7 @@ and related utilities. .\" from FreeBSD: head/tools/build/options/WITHOUT_CVS 156932 2006-03-21 07:50:50Z ru Set to not build CVS. .It Va WITHOUT_CXX -.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220401 2011-04-06 20:08:23Z uqs +.\" from FreeBSD: head/tools/build/options/WITHOUT_CXX 220402 2011-04-06 20:19:07Z uqs Set to not build .Xr g++ 1 and related libraries. @@ -316,12 +332,22 @@ dynamically. Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITHOUT_FDT -.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 218942 2011-02-22 08:20:12Z uqs -Set to not build Flattened Device Tree support as part of the base system. This -includes the device tree compiler (dtc) and libfdt support library. +.\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru +Set to not build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. +.Pp +It is a default setting on +amd64/amd64, i386/i386, ia64/ia64, mips/mipsel, mips/mipseb, mips/mips64el, mips/mips64eb, mips/mipsn32eb, pc98/i386, powerpc/powerpc64, sparc64/sparc64 and sun4v/sparc64. +.It Va WITH_FDT +.\" from FreeBSD: head/tools/build/options/WITH_FDT 221730 2011-05-10 11:14:40Z ru +Set to build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. +.Pp +It is a default setting on +arm/arm, arm/armeb and powerpc/powerpc. .It Va WITHOUT_FLOPPY -.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 183306 2008-09-23 16:15:42Z sam -Set to not build or install programs +.\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru +Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FORTH .\" from FreeBSD: head/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru @@ -367,9 +393,11 @@ Set to build some programs without optional GNU support. .It Va WITHOUT_GPIB .\" from FreeBSD: head/tools/build/options/WITHOUT_GPIB 156932 2006-03-21 07:50:50Z ru Set to not build GPIB bus support. -.It Va WITH_GPIO -.\" from FreeBSD: head/tools/build/options/WITH_GPIO 213463 2010-10-05 22:26:01Z gonzo -Set to build gpioctl(8) as part of the base system. +.It Va WITHOUT_GPIO +.\" from FreeBSD: head/tools/build/options/WITHOUT_GPIO 221541 2011-05-06 19:14:06Z ru +Set to not build +.Xr gpioctl 8 +as part of the base system. .It Va WITHOUT_GROFF .\" from FreeBSD: head/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build @@ -398,7 +426,7 @@ It is .Em "YOUR RESPONSIBILITY" to determine if you can legally use IDEA. .It Va WITHOUT_INET -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -420,7 +448,7 @@ When set, it also enforces the following options: .\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. .It Va WITHOUT_INET_SUPPORT -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INFO .\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru @@ -464,12 +492,17 @@ When set, it also enforces the following options: .Pp .Bl -item -compact .It -.Va WITHOUT_GSSAPI -(can be overridden with -.Va WITH_GSSAPI ) -.It .Va WITHOUT_KERBEROS_SUPPORT .El +.Pp +When set, the following options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_GSSAPI +(unless +.Va WITH_GSSAPI +is set explicitly) +.El .It Va WITHOUT_KERBEROS_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_KERBEROS_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without Kerberos support, like @@ -525,6 +558,8 @@ When set, it also enforces the following options: .It .Va WITHOUT_BIND_ETC .It +.Va WITHOUT_BIND_LIBS +.It .Va WITHOUT_BIND_LIBS_LWRES .It .Va WITHOUT_BIND_MTREE @@ -551,6 +586,8 @@ When set, it also enforces the following options: .It .Va WITHOUT_BIND_ETC .It +.Va WITHOUT_BIND_LIBS +.It .Va WITHOUT_BIND_LIBS_LWRES .It .Va WITHOUT_BIND_MTREE @@ -597,13 +634,13 @@ and related support files. .It Va WITHOUT_MAN .\" from FreeBSD: head/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. -When set, it also enforces the following options: +When set, the following options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_MAN_UTILS -(can be overridden with -.Va WITH_MAN_UTILS ) +.Bl -inset -compact +.It Va WITHOUT_MAN_UTILS +(unless +.Va WITH_MAN_UTILS +is set explicitly) .El .It Va WITHOUT_MAN_UTILS .\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim @@ -675,9 +712,6 @@ will not be built either if this option is set. Set to not build .Xr ntpd 8 and related programs. -.It Va WITHOUT_OBJC -.\" from FreeBSD: head/tools/build/options/WITHOUT_OBJC 156932 2006-03-21 07:50:50Z ru -Set to not build Objective C support. .It Va WITHOUT_OPENSSH .\" from FreeBSD: head/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. @@ -688,16 +722,21 @@ When set, it also enforces the following options: .Pp .Bl -item -compact .It -.Va WITHOUT_GSSAPI -(can be overridden with -.Va WITH_GSSAPI ) -.It .Va WITHOUT_KERBEROS .It .Va WITHOUT_KERBEROS_SUPPORT .It .Va WITHOUT_OPENSSH .El +.Pp +When set, the following options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_GSSAPI +(unless +.Va WITH_GSSAPI +is set explicitly) +.El .It Va WITHOUT_PAM .\" from FreeBSD: head/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 8b9dcf88f418..cbbe7c92d71e 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -297,7 +297,6 @@ __DEFAULT_YES_OPTIONS = \ BIND_MTREE \ BIND_NAMED \ BIND_UTILS \ - BINUTILS \ BLUETOOTH \ BOOT \ BSD_CPIO \ @@ -318,7 +317,6 @@ __DEFAULT_YES_OPTIONS = \ FP_LIBC \ FREEBSD_UPDATE \ GAMES \ - GCC \ GCOV \ GDB \ GNU \ @@ -394,7 +392,6 @@ __DEFAULT_NO_OPTIONS = \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ - GNU_CPIO \ HESIOD \ ICONV \ IDEA \ @@ -405,7 +402,7 @@ __DEFAULT_NO_OPTIONS = \ # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not # used at all in bsd.*.mk, but we have to make an exception here if we want -# to allow defaults for some things like clang and ftd to vary by target +# to allow defaults for some things like clang and fdt to vary by target # architecture. # .if defined(TARGET_ARCH) diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index bc4b8b62b985..0b86eacfe935 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -358,26 +358,6 @@ static uint64_t nsec_scale; /* See below for the explanation of this macro. */ #define SCALE_SHIFT 28 -static void -dtrace_gethrtime_init_sync(void *arg) -{ -#ifdef CHECK_SYNC - /* - * Delay this function from returning on one - * of the CPUs to check that the synchronisation - * works. - */ - uintptr_t cpu = (uintptr_t) arg; - - if (cpu == curcpu) { - int i; - for (i = 0; i < 1000000000; i++) - tgt_cpu_tsc = rdtsc(); - tgt_cpu_tsc = 0; - } -#endif -} - static void dtrace_gethrtime_init_cpu(void *arg) { @@ -435,7 +415,7 @@ dtrace_gethrtime_init(void *arg) map = PCPU_GET(cpumask); CPU_OR(&map, &pc->pc_cpumask); - smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync, + smp_rendezvous_cpus(map, NULL, dtrace_gethrtime_init_cpu, smp_no_rendevous_barrier, (void *)(uintptr_t) i); diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 7d460bc2e03b..412fc38e6a56 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -359,26 +359,6 @@ static uint64_t nsec_scale; /* See below for the explanation of this macro. */ #define SCALE_SHIFT 28 -static void -dtrace_gethrtime_init_sync(void *arg) -{ -#ifdef CHECK_SYNC - /* - * Delay this function from returning on one - * of the CPUs to check that the synchronisation - * works. - */ - uintptr_t cpu = (uintptr_t) arg; - - if (cpu == curcpu) { - int i; - for (i = 0; i < 1000000000; i++) - tgt_cpu_tsc = rdtsc(); - tgt_cpu_tsc = 0; - } -#endif -} - static void dtrace_gethrtime_init_cpu(void *arg) { @@ -436,7 +416,7 @@ dtrace_gethrtime_init(void *arg) map = PCPU_GET(cpumask); CPU_OR(&map, &pc->pc_cpumask); - smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync, + smp_rendezvous_cpus(map, NULL, dtrace_gethrtime_init_cpu, smp_no_rendevous_barrier, (void *)(uintptr_t) i); diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c index 129f094079f5..b7ed27d21324 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c @@ -74,8 +74,33 @@ static void ar9285WriteIni(struct ath_hal *ah, static void ar9285AniSetup(struct ath_hal *ah) { - /* NB: disable ANI for reliable RIFS rx */ - ar5416AniAttach(ah, AH_NULL, AH_NULL, AH_FALSE); + /* + * These are the parameters from the AR5416 ANI code; + * they likely need quite a bit of adjustment for the + * AR9285. + */ + static const struct ar5212AniParams aniparams = { + .maxNoiseImmunityLevel = 4, /* levels 0..4 */ + .totalSizeDesired = { -55, -55, -55, -55, -62 }, + .coarseHigh = { -14, -14, -14, -14, -12 }, + .coarseLow = { -64, -64, -64, -64, -70 }, + .firpwr = { -78, -78, -78, -78, -80 }, + .maxSpurImmunityLevel = 2, + .cycPwrThr1 = { 2, 4, 6 }, + .maxFirstepLevel = 2, /* levels 0..2 */ + .firstep = { 0, 4, 8 }, + .ofdmTrigHigh = 500, + .ofdmTrigLow = 200, + .cckTrigHigh = 200, + .cckTrigLow = 100, + .rssiThrHigh = 40, + .rssiThrLow = 7, + .period = 100, + }; + /* NB: disable ANI noise immmunity for reliable RIFS rx */ + AH5416(ah)->ah_ani_function &= ~ HAL_ANI_NOISE_IMMUNITY_LEVEL; + + ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } /* @@ -122,10 +147,6 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc, AH5416(ah)->ah_cal.adcDcCalInitData.calData = &ar9280_adc_init_dc_cal; AH5416(ah)->ah_cal.suppCals = ADC_GAIN_CAL | ADC_DC_CAL | IQ_MISMATCH_CAL; - if (AR_SREV_KITE_12_OR_LATER(ah)) - AH5416(ah)->ah_cal_initcal = ar9285InitCalHardware; - AH5416(ah)->ah_cal_pacal = ar9002_hw_pa_cal; - AH5416(ah)->ah_spurMitigate = ar9280SpurMitigate; AH5416(ah)->ah_writeIni = ar9285WriteIni; AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; @@ -173,6 +194,12 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc, } ar5416AttachPCIE(ah); + /* Attach methods that require MAC version/revision info */ + if (AR_SREV_KITE_12_OR_LATER(ah)) + AH5416(ah)->ah_cal_initcal = ar9285InitCalHardware; + if (AR_SREV_KITE_11_OR_LATER(ah)) + AH5416(ah)->ah_cal_pacal = ar9002_hw_pa_cal; + ecode = ath_hal_v4kEepromAttach(ah); if (ecode != HAL_OK) goto bad; diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c b/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c index bcb5959c2cc7..f972ecb47f9d 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c @@ -60,13 +60,13 @@ ar9285_hw_pa_cal(struct ath_hal *ah, HAL_BOOL is_reset) { 0x7838, 0 }, }; - HALDEBUG(ah, HAL_DEBUG_PERCAL, "Running PA Calibration\n"); - /* PA CAL is not needed for high power solution */ if (ath_hal_eepromGet(ah, AR_EEP_TXGAIN_TYPE, AH_NULL) == AR5416_EEP_TXGAIN_HIGH_POWER) return; + HALDEBUG(ah, HAL_DEBUG_PERCAL, "Running PA Calibration\n"); + for (i = 0; i < N(regList); i++) regList[i][1] = OS_REG_READ(ah, regList[i][0]); @@ -151,7 +151,7 @@ ar9285_hw_pa_cal(struct ath_hal *ah, HAL_BOOL is_reset) void ar9002_hw_pa_cal(struct ath_hal *ah, HAL_BOOL is_reset) { - if (AR_SREV_KITE_12_OR_LATER(ah)) { + if (AR_SREV_KITE_11_OR_LATER(ah)) { if (is_reset || !AH9285(ah)->pacal_info.skipcount) ar9285_hw_pa_cal(ah, is_reset); else @@ -260,7 +260,8 @@ HAL_BOOL ar9285InitCalHardware(struct ath_hal *ah, const struct ieee80211_channel *chan) { - if (! ar9285_hw_clc(ah, chan)) + if (AR_SREV_KITE(ah) && AR_SREV_KITE_10_OR_LATER(ah) && + (! ar9285_hw_clc(ah, chan))) return AH_FALSE; return AH_TRUE; diff --git a/sys/dev/puc/pucdata.c b/sys/dev/puc/pucdata.c index 4d19ddae2838..6b1dedaa5aef 100644 --- a/sys/dev/puc/pucdata.c +++ b/sys/dev/puc/pucdata.c @@ -638,6 +638,12 @@ const struct puc_cfg puc_pci_devices[] = { PUC_PORT_4S, 0x10, 0, 8, }, + { 0x1415, 0x9501, 0x131f, 0x2052, + "SIIG Quartet Serial 850", + DEFAULT_RCLK * 10, + PUC_PORT_4S, 0x10, 0, 8, + }, + { 0x1415, 0x9501, 0x14db, 0x2150, "Kuroutoshikou SERIAL4P-LPPCI2", DEFAULT_RCLK * 10, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 60d791cb0055..3d3dc46807c9 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -681,6 +681,7 @@ vendor HAUPPAUGE2 0x2040 Hauppauge Computer Works vendor TLAYTECH 0x20b9 Tlay Tech vendor ENCORE 0x203d Encore vendor PARA 0x20b8 PARA Industrial +vendor SIMTEC 0x20df Simtec Electronics vendor ERICSSON 0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor TRIPPLITE 0x2478 Tripp-Lite @@ -2513,6 +2514,9 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP50P6-S 50in Touch Panel /* PARA Industrial products */ product PARA RT3070 0x8888 RT3070 +/* Simtec Electronics products */ +product SIMTEC ENTROPYKEY 0x0001 Entropy Key + /* Pegatron products */ product PEGATRON RT2870 0x0002 RT2870 product PEGATRON RT3070 0x000c RT3070 diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index 2026b05bc16f..1e6342cb754a 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -398,18 +398,22 @@ powerpc_enable_intr(void) #ifdef SMP /* Install an IPI handler. */ - for (n = 0; n < npics; n++) { - if (piclist[n].dev != root_pic) - continue; + if (mp_ncpus > 1) { + for (n = 0; n < npics; n++) { + if (piclist[n].dev != root_pic) + continue; - KASSERT(piclist[n].ipis != 0, ("%s", __func__)); - error = powerpc_setup_intr("IPI", - MAP_IRQ(piclist[n].node, piclist[n].irqs), - powerpc_ipi_handler, NULL, NULL, - INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie); - if (error) { - printf("unable to setup IPI handler\n"); - return (error); + KASSERT(piclist[n].ipis != 0, + ("%s: SMP root PIC does not supply any IPIs", + __func__)); + error = powerpc_setup_intr("IPI", + MAP_IRQ(piclist[n].node, piclist[n].irqs), + powerpc_ipi_handler, NULL, NULL, + INTR_TYPE_MISC | INTR_EXCL, &ipi_cookie); + if (error) { + printf("unable to setup IPI handler\n"); + return (error); + } } } #endif diff --git a/sys/sys/systm.h b/sys/sys/systm.h index edd59c4a21be..80fb0a93fef6 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -374,44 +374,8 @@ int alloc_unrl(struct unrhdr *uh); void free_unr(struct unrhdr *uh, u_int item); /* - * This is about as magic as it gets. fortune(1) has got similar code - * for reversing bits in a word. Who thinks up this stuff?? - * - * Yes, it does appear to be consistently faster than: - * while (i = ffs(m)) { - * m >>= i; - * bits++; - * } - * and - * while (lsb = (m & -m)) { // This is magic too - * m &= ~lsb; // or: m ^= lsb - * bits++; - * } - * Both of these latter forms do some very strange things on gcc-3.1 with - * -mcpu=pentiumpro and/or -march=pentiumpro and/or -O or -O2. - * There is probably an SSE or MMX popcnt instruction. - * - * I wonder if this should be in libkern? - * - * XXX Stop the presses! Another one: - * static __inline u_int32_t - * popcnt1(u_int32_t v) - * { - * v -= ((v >> 1) & 0x55555555); - * v = (v & 0x33333333) + ((v >> 2) & 0x33333333); - * v = (v + (v >> 4)) & 0x0F0F0F0F; - * return (v * 0x01010101) >> 24; - * } - * The downside is that it has a multiply. With a pentium3 with - * -mcpu=pentiumpro and -march=pentiumpro then gcc-3.1 will use - * an imull, and in that case it is faster. In most other cases - * it appears slightly slower. - * - * Another variant (also from fortune): - * #define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) - * #define BX_(x) ((x) - (((x)>>1)&0x77777777) \ - * - (((x)>>2)&0x33333333) \ - * - (((x)>>3)&0x11111111)) + * Population count algorithm using SWAR approach + * - "SIMD Within A Register". */ static __inline uint32_t bitcount32(uint32_t x) diff --git a/tools/build/options/WITHOUT_OBJC b/tools/build/options/WITHOUT_OBJC deleted file mode 100644 index 3a220ac06db9..000000000000 --- a/tools/build/options/WITHOUT_OBJC +++ /dev/null @@ -1,2 +0,0 @@ -.\" $FreeBSD$ -Set to not build Objective C support. diff --git a/tools/build/options/WITH_CLANG b/tools/build/options/WITH_CLANG new file mode 100644 index 000000000000..b0e300a488b1 --- /dev/null +++ b/tools/build/options/WITH_CLANG @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build the Clang C/C++ compiler. diff --git a/tools/build/options/WITH_FDT b/tools/build/options/WITH_FDT new file mode 100644 index 000000000000..b812e3b33dc8 --- /dev/null +++ b/tools/build/options/WITH_FDT @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. diff --git a/tools/build/options/makeman b/tools/build/options/makeman index 68ed87bead81..d29fe0a20920 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -2,34 +2,98 @@ # # This file is in the public domain. +set -o errexit + ident='$FreeBSD$' +t=$(mktemp -d -t makeman) +trap 'test -d $t && rm -rf $t' exit + # -# usage: show { settings | options } ... +# usage: no_targets all_targets yes_targets +# +no_targets() +{ + for t1 in $1 ; do + for t2 in $2 ; do + if [ "${t1}" = "${t2}" ] ; then + continue 2 + fi + done + echo ${t1} + done +} + +show_options() +{ + ALL_TARGETS=$(echo $(make -C ../../.. targets | tail -n +2)) + rm -f $t/settings + for target in ${ALL_TARGETS} ; do + make -C ../../.. showconfig \ + SRCCONF=/dev/null __MAKE_CONF=/dev/null \ + TARGET_ARCH=${target#*/} TARGET=${target%/*} | + while read var _ val ; do + opt=${var#MK_} + case ${val} in + yes) + echo ${opt} ${target} + ;; + no) + echo ${opt} + ;; + *) + echo 'make showconfig broken' >&2 + exit 1 + ;; + esac + done > $t/settings.target + if [ -r $t/settings ] ; then + join -t\ $t/settings $t/settings.target > $t/settings.new + mv $t/settings.new $t/settings + else + mv $t/settings.target $t/settings + fi + done + + cat $t/settings | while read opt targets ; do + if [ "${targets}" = "${ALL_TARGETS}" ] ; then + echo "WITHOUT_${opt}" + elif [ -z "${targets}" ] ; then + echo "WITH_${opt}" + else + echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" "${targets}") + echo "WITH_${opt} ${targets}" + fi + done +} + +# +# usage: show { settings | with | without } ... # show() { - mode=$1; shift + mode=$1 ; shift case ${mode} in settings) yes_prefix=WITH no_prefix=WITHOUT ;; - options) - yes_prefix=WITHOUT + with) + yes_prefix=WITH no_prefix=WITH ;; + without) + yes_prefix=WITHOUT + no_prefix=WITHOUT + ;; *) - echo "internal error" >/dev/stderr + echo 'internal error' >&2 exit 1 ;; esac - ( - cd ../../.. - make "$@" showconfig SRCCONF=/dev/null __MAKE_CONF=/dev/null - ) | - while read var _ val; do + make -C ../../.. "$@" showconfig __MAKE_CONF=/dev/null | + while read var _ val ; do opt=${var#MK_} case ${val} in yes) @@ -39,7 +103,7 @@ show() echo ${no_prefix}_${opt} ;; *) - echo "make showconfig broken" >/dev/stderr + echo 'make showconfig broken' >&2 exit 1 ;; esac @@ -49,7 +113,6 @@ show() main() { - trap 'rm -f _defcfg _config _config2 _deps _deps2' exit ident=${ident#$} ident=${ident% $} fbsdid='$'FreeBSD'$' @@ -57,7 +120,7 @@ main() .\" DO NOT EDIT-- this file is automatically generated. .\" from ${ident} .\" ${fbsdid} -.Dd $(LC_TIME=C date +'%B %e, %Y') +.Dd $(echo $(LC_TIME=C date +'%B %e, %Y')) .Dt SRC.CONF 5 .Os .Sh NAME @@ -134,47 +197,70 @@ The following list provides a name and short description for variables that can be used for source builds. .Bl -tag -width indent EOF - show settings |sort >_defcfg - show options | - while read opt; do - if [ -f ${opt} ]; then - cat </dev/stderr + show settings SRCCONF=/dev/null | sort > $t/config_default + show with SRCCONF=/dev/null | sort > $t/config_WITH_ALL + show without SRCCONF=/dev/null | sort > $t/config_WITHOUT_ALL + + show_options | + while read opt targets ; do + if [ ! -f ${opt} ] ; then + echo "no description found for ${opt}, skipping" >&2 continue fi - show settings -D${opt} |sort >_config - comm -13 _defcfg _config |grep -v "^${opt}$" >_deps - if [ -s _deps ]; then - cat <_config2 - comm -13 _config _config2 >_deps2 - if [ -s _deps2 ]; then - cat < $t/src.conf + show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITH_ALL_${opt} + comm -13 $t/config_WITH_ALL $t/config_WITH_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps + elif [ "${opt%%_*}" = 'WITH' ] ; then + sed -n "/^WITHOUT${opt#WITH}$/!s/$/=/p" $t/config_WITHOUT_ALL > $t/src.conf + show settings SRCCONF=$t/src.conf -D${opt} | sort > $t/config_WITHOUT_ALL_${opt} + comm -13 $t/config_WITHOUT_ALL $t/config_WITHOUT_ALL_${opt} | sed -n "/^${opt}$/!p" > $t/deps + else + echo 'internal error' >&2 + exit 1 + fi + + if [ -s $t/deps ] ; then + echo 'When set, it also enforces the following options:' + echo '.Pp' + echo '.Bl -item -compact' + cat $t/deps | while read opt2 ; do + echo '.It' + echo ".Va ${opt2}" + done + echo '.El' + fi + + show settings SRCCONF=/dev/null -D${opt} | sort > $t/config_${opt} + comm -13 $t/config_default $t/config_${opt} | sed -n "/^${opt}$/!p" | + comm -13 $t/deps - > $t/deps2 + + if [ -s $t/deps2 ] ; then + if [ -s $t/deps ] ; then + echo '.Pp' + fi + echo 'When set, the following options are also in effect:' + echo '.Pp' + echo '.Bl -inset -compact' + cat $t/deps2 | while read opt2 ; do + echo ".It Va ${opt2}" + noopt=$(echo ${opt2} | sed -e's/WITH_/WITHOUT_/;t' -e's/WITHOUT_/WITH_/') + echo '(unless' + echo ".Va ${noopt}" + echo 'is set explicitly)' + done + echo '.El' + fi + twiddle >&2 done cat <= ' ' && *cp <= '~') || + any(*cp, value(EXCEPTIONS))) + putc(*cp, fscript); + } + for (cp = buf; cp < buf + cnt; cp++) { + if (!isgraph(*cp)) { + fflush(fscript); + break; + } } - for (cp = buf; cp < buf + cnt; cp++) - if ((*cp >= ' ' && *cp <= '~') || - any(*cp, value(EXCEPTIONS))) - putc(*cp, fscript); } } }