Re: svn commit: r276123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2014-12-31 Thread Xin Li
Hi, Steven,

On 12/30/14 22:01, Steven Hartland wrote:
> 
> On 31/12/2014 02:12, Xin Li wrote:
>> On 12/23/14 01:31, Steven Hartland wrote:
>>> Author: smh
>>> Date: Tue Dec 23 09:31:24 2014
>>> New Revision: 276123
>>> URL: https://svnweb.freebsd.org/changeset/base/276123
>>>
>>> Log:
>>>Always sync the global ZFS config cache to reflect the new mosconfig
>>>   This fixes out of date zpool.cache for root pools, which can
>>> cause issues
>>>such as confusion of zdb etc.
>>>   MFC after:1 month
>>>
>>> Modified:
>>>head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
>>>
>>> Modified:
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
>>> ==
>>>
>>> ---
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c   
>>> Tue Dec 23 08:51:30 2014(r276122)
>>> +++
>>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c   
>>> Tue Dec 23 09:31:24 2014(r276123)
>>> @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what)
>>>   /*
>>>* Update the global config cache to reflect the new mosconfig.
>>>*/
>>> -if (!spa->spa_is_root)
>>> -spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL);
>>> +spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL);
>>> if (what == SPA_CONFIG_UPDATE_POOL)
>>>   spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
>> It seems like that this change breaks systems where not all pools are
>> available (e.g. some of pools are encrypted) at boot time, by removing
>> all these pools from the cache file.
>>
>> As a result, on the next boot, these pools would not be imported even
>> when the devices are available (geli attached), and reverting this
>> change would restore the system to its previous behavior.
>>
>> Perhaps it have exposed an existing bug?
> 
> I've managed to reproduce this here with mdX backed test pools, and
> looking into it this is due to spa_config_sync:
> 
> /*
>  * Skip over our own pool if we're about to remove
>  * ourselves from the spa namespace or any pool
> that
>  * is readonly. Since we cannot guarantee that a
>  * readonly pool would successfully import upon
> reboot,
>  * we don't allow them to be written to the
> cache file.
>  */
> if ((spa == target && removing) ||
> !spa_writeable(spa)) {
> continue;
> }
> 
> This was added by upstream:
> https://github.com/illumos/illumos-gate/commit/fb02ae025247e3b662600e5a9c1b4c33ecab7d72
> 
> https://www.illumos.org/issues/3639
> 
> It seems the desired behavior was to exclude read only pools, to prevent
> them being mounted writable on reboot, but the check is too wide and
> also excludes unavailable pools too.
> 
> The attached patch corrects the test to only check writable on active
> pools so I believe should fix the issue your seeing.
> 
> If you can test it and lmk that would be great.

This is an improvement (the attaching of pool is now working) but the
cached configuration is somewhat corrupted, it shows many lines of
vdev_stats[] contents.

I'll take a look at the code tomorrow and see if I can do some
instruments and possibly figure out the underlying issue.

Cheers,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276462 - in head: . sys/sys

2014-12-31 Thread Bjoern A. Zeeb
Author: bz
Date: Wed Dec 31 10:00:43 2014
New Revision: 276462
URL: https://svnweb.freebsd.org/changeset/base/276462

Log:
  Bump copyright year.
  
  Happy New Year 2015!

Modified:
  head/COPYRIGHT
  head/sys/sys/copyright.h

Modified: head/COPYRIGHT
==
--- head/COPYRIGHT  Wed Dec 31 09:52:57 2014(r276461)
+++ head/COPYRIGHT  Wed Dec 31 10:00:43 2014(r276462)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2014 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2015 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: head/sys/sys/copyright.h
==
--- head/sys/sys/copyright.hWed Dec 31 09:52:57 2014(r276461)
+++ head/sys/sys/copyright.hWed Dec 31 10:00:43 2014(r276462)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 1992-2014 The FreeBSD Project. All rights reserved.
+ * Copyright (C) 1992-2015 The FreeBSD Project. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
 
 /* FreeBSD */
 #define COPYRIGHT_FreeBSD \
-   "Copyright (c) 1992-2014 The FreeBSD Project.\n"
+   "Copyright (c) 1992-2015 The FreeBSD Project.\n"
 
 /* Foundation */
 #defineTRADEMARK_Foundation \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276469 - head/sys/dev/sdhci

2014-12-31 Thread Marius Strobl
Author: marius
Date: Wed Dec 31 16:06:26 2014
New Revision: 276469
URL: https://svnweb.freebsd.org/changeset/base/276469

Log:
  - Switching the mode of Ricoh R5CE823 to SD2.0 causes their PCI device ID
to change to 0xe822, which may be persistent across reboots and, thus,
confuse other OSes. Therefore, restore the original mode and frequency
setting on detach and shutdown.
  - Report Ricoh R5CE822 as such.
  - According to Linux, Ricoh R5CE822 also need SDHCI_QUIRK_LOWER_FREQUENCY.
  - Nuke an unused softc member.
  
  MFC after:3 days

Modified:
  head/sys/dev/sdhci/sdhci_pci.c

Modified: head/sys/dev/sdhci/sdhci_pci.c
==
--- head/sys/dev/sdhci/sdhci_pci.c  Wed Dec 31 10:08:17 2014
(r276468)
+++ head/sys/dev/sdhci/sdhci_pci.c  Wed Dec 31 16:06:26 2014
(r276469)
@@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
  */
 #defineSDHC_PCI_MODE_KEY   0xf9
 #defineSDHC_PCI_MODE   0x150
-#defineSDHC_PCI_MODE_SD20  0x10
+#define SDHC_PCI_MODE_SD20 0x10
 #defineSDHC_PCI_BASE_FREQ_KEY  0xfc
 #defineSDHC_PCI_BASE_FREQ  0xe1
 
@@ -83,8 +83,9 @@ static const struct sdhci_device {
 } sdhci_devices[] = {
{ 0x08221180,   0x, "RICOH R5C822 SD",
SDHCI_QUIRK_FORCE_DMA },
-   { 0xe8221180,   0x, "RICOH SD",
-   SDHCI_QUIRK_FORCE_DMA },
+   { 0xe8221180,   0x, "RICOH R5CE822 SD",
+   SDHCI_QUIRK_FORCE_DMA |
+   SDHCI_QUIRK_LOWER_FREQUENCY },
{ 0xe8231180,   0x, "RICOH R5CE823 SD",
SDHCI_QUIRK_LOWER_FREQUENCY },
{ 0x8034104c,   0x, "TI XX21/XX11 SD",
@@ -109,7 +110,6 @@ static const struct sdhci_device {
 };
 
 struct sdhci_pci_softc {
-   device_tdev;/* Controller device */
u_int   quirks; /* Chip specific quirks */
struct resource *irq_res;   /* IRQ resource */
void*intrhand;  /* Interrupt handle */
@@ -117,6 +117,8 @@ struct sdhci_pci_softc {
int num_slots;  /* Number of slots on this controller */
struct sdhci_slot slots[6];
struct resource *mem_res[6];/* Memory resource */
+   uint8_t cfg_freq;   /* Saved mode */
+   uint8_t cfg_mode;   /* Saved frequency */
 };
 
 static int sdhci_enable_msi = 1;
@@ -206,21 +208,43 @@ static void sdhci_pci_intr(void *arg);
 static void
 sdhci_lower_frequency(device_t dev)
 {
+   struct sdhci_pci_softc *sc = device_get_softc(dev);
 
-   /* Enable SD2.0 mode. */
+   /*
+* Enable SD2.0 mode.
+* NB: for RICOH R5CE823, this changes the PCI device ID to 0xe822.
+*/
pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1);
+   sc->cfg_mode = pci_read_config(dev, SDHC_PCI_MODE, 1);
pci_write_config(dev, SDHC_PCI_MODE, SDHC_PCI_MODE_SD20, 1);
pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1);
 
/*
 * Some SD/MMC cards don't work with the default base
-* clock frequency of 200MHz.  Lower it to 50Hz.
+* clock frequency of 200 MHz.  Lower it to 50 MHz.
 */
pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1);
+   sc->cfg_freq = pci_read_config(dev, SDHC_PCI_BASE_FREQ, 1);
pci_write_config(dev, SDHC_PCI_BASE_FREQ, 50, 1);
pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1);
 }
 
+static void
+sdhci_restore_frequency(device_t dev)
+{
+   struct sdhci_pci_softc *sc = device_get_softc(dev);
+
+   /* Restore mode. */
+   pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1);
+   pci_write_config(dev, SDHC_PCI_MODE, sc->cfg_mode, 1);
+   pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1);
+
+   /* Restore frequency. */
+   pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1);
+   pci_write_config(dev, SDHC_PCI_BASE_FREQ, sc->cfg_freq, 1);
+   pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1);
+}
+
 static int
 sdhci_pci_probe(device_t dev)
 {
@@ -262,7 +286,6 @@ sdhci_pci_attach(device_t dev)
uint16_t subvendor;
int bar, err, rid, slots, i;
 
-   sc->dev = dev;
model = (uint32_t)pci_get_device(dev) << 16;
model |= (uint32_t)pci_get_vendor(dev) & 0x;
subvendor = pci_get_subvendor(dev);
@@ -352,6 +375,18 @@ sdhci_pci_detach(device_t dev)
bus_release_resource(dev, SYS_RES_MEMORY,
rman_get_rid(sc->mem_res[i]), sc->mem_res[i]);
}
+   if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY)
+   sdhci_restore_frequency(dev);
+   return (0);
+}
+
+static int
+sdhci_pci_shutdown(device_t dev)
+{
+   struct sdhci_pci_softc *sc = device_get_softc(dev);
+
+   if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY)
+   sdhci_restore_frequency(dev);
return (

svn commit: r276470 - head/sys/arm/arm

2014-12-31 Thread Ian Lepore
Author: ian
Date: Wed Dec 31 16:15:43 2014
New Revision: 276470
URL: https://svnweb.freebsd.org/changeset/base/276470

Log:
  A couple small fixes to make clang 3.5 happy... Move END(sigcode) to the
  end of the actual instruction sequence for the function but before some
  misc data in the text segment.  This eliminates a strange "size must be
  constant" error from the integrated assembler.  Also, the build_pagetables
  function was missing an END(), but really the problem is that it shouldn't
  have an ASENTRY() because it's not a function that needs to be a global
  symbol with unwind info and all, it's just a little private subroutine
  used in very early kernel init.

Modified:
  head/sys/arm/arm/locore-v6.S

Modified: head/sys/arm/arm/locore-v6.S
==
--- head/sys/arm/arm/locore-v6.SWed Dec 31 16:06:26 2014
(r276469)
+++ head/sys/arm/arm/locore-v6.SWed Dec 31 16:15:43 2014
(r276470)
@@ -339,7 +339,7 @@ END(reinit_mmu)
  *
  * Addresses must be 1MiB aligned
  */
-ASENTRY_NP(build_pagetables)
+build_pagetables:
/* Set the required page attributed */
 #if defined(ARM_NEW_PMAP)
ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0
@@ -520,6 +520,7 @@ ENTRY_NP(sigcode)
 
/* Branch back to retry SYS_sigreturn */
b   . - 16
+END(sigcode)
 
.word   SYS_sigreturn
.word   SYS_exit
@@ -532,5 +533,5 @@ ENTRY_NP(sigcode)
.global szsigcode
 szsigcode:
.long esigcode-sigcode
-END(sigcode)
+
 /* End of locore.S */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276472 - head/usr.bin/patch

2014-12-31 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Dec 31 16:30:33 2014
New Revision: 276472
URL: https://svnweb.freebsd.org/changeset/base/276472

Log:
  Fixes to exit status.
  
  Exit with EXIT_FAILURE for invalid arguments.
  Fixes NetBSD-PR 43517.
  
  Print version string to stdout instead of stderr;
  it is user-requested and not an error.
  
  Obtained from:NetBSD
  MFC after:5 days

Modified:
  head/usr.bin/patch/patch.c
  head/usr.bin/patch/util.c

Modified: head/usr.bin/patch/patch.c
==
--- head/usr.bin/patch/patch.c  Wed Dec 31 16:28:16 2014(r276471)
+++ head/usr.bin/patch/patch.c  Wed Dec 31 16:30:33 2014(r276472)
@@ -634,7 +634,7 @@ usage(void)
 " [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\n"
 " [--posix] [origfile [patchfile]]\n"
 "   patch http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276474 - head/sys/vm

2014-12-31 Thread Alan Cox
Author: alc
Date: Wed Dec 31 17:44:57 2014
New Revision: 276474
URL: https://svnweb.freebsd.org/changeset/base/276474

Log:
  Eliminate a stale debug message.  The per-CPU cache locks were replaced
  by critical sections in r145686.
  
  PR:   193254
  Submitted by: luke...@gmail.com
  MFC after:3 days

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Wed Dec 31 16:50:46 2014(r276473)
+++ head/sys/vm/uma_core.c  Wed Dec 31 17:44:57 2014(r276474)
@@ -1834,9 +1834,6 @@ uma_startup(void *bootmem, int boot_page
zone_ctor(zones, sizeof(struct uma_zone), &args, M_WAITOK);
 
 #ifdef UMA_DEBUG
-   printf("Initializing pcpu cache locks.\n");
-#endif
-#ifdef UMA_DEBUG
printf("Creating slab and hash zones.\n");
 #endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276187 - head/sys/arm/arm

2014-12-31 Thread John Baldwin
On Wednesday, December 24, 2014 9:05:47 pm Rui Paulo wrote:
> On Dec 24, 2014, at 17:31, Ian Lepore  wrote:
> > In every architecture and every place it's used, or just arm just here?
> 
> You're right, it can be found at least in MIPS and amd64.
> 
> > This appears to be an idiom, or at least something that has been pasted
> > in identical form in every arch so far.
> 
> The idiom is a bit different in amd64: the variable in the for-loop isn't 
immediately reused, but it's a global variable anyway...  That's what I 
thought deserves a comment.
> 
> Regarding the pmap_kenter_temporary(), the first problem is the function 
name: it might be a temporary mapping, but the real use is for crash dumps (I 
wonder why ACPI abuses this mapping).  The other problem is the fact that a 
pmap function is so tied to crash dumps.  However, that's a bigger problem.

ACPI abuses it because it is available (and we can't possibly generate a crash
dump early when ACPI uses it).  ACPI is only use it to map ACPI tables before
the VM system is initalized enough to map the tables using normal KVA.

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276477 - head/contrib/elftoolchain/readelf

2014-12-31 Thread Ed Maste
Author: emaste
Date: Wed Dec 31 19:21:53 2014
New Revision: 276477
URL: https://svnweb.freebsd.org/changeset/base/276477

Log:
  readelf: Add stdint.h for C99 fixed size types
  
  Upstream elftoolchain brings in stdint.h via an ELF header that we
  do not use in FreeBSD.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/readelf/readelf.c

Modified: head/contrib/elftoolchain/readelf/readelf.c
==
--- head/contrib/elftoolchain/readelf/readelf.c Wed Dec 31 18:16:50 2014
(r276476)
+++ head/contrib/elftoolchain/readelf/readelf.c Wed Dec 31 19:21:53 2014
(r276477)
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276480 - in head/sys: amd64/conf conf modules

2014-12-31 Thread Navdeep Parhar
Author: np
Date: Wed Dec 31 20:34:12 2014
New Revision: 276480
URL: https://svnweb.freebsd.org/changeset/base/276480

Log:
  Temporarily unplug cxgbe(4) from !amd64 builds.

Modified:
  head/sys/amd64/conf/NOTES
  head/sys/conf/NOTES
  head/sys/modules/Makefile

Modified: head/sys/amd64/conf/NOTES
==
--- head/sys/amd64/conf/NOTES   Wed Dec 31 20:31:32 2014(r276479)
+++ head/sys/amd64/conf/NOTES   Wed Dec 31 20:34:12 2014(r276480)
@@ -300,6 +300,7 @@ options DRM_DEBUG   # Include debug print
 
 # bxe:  Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet
 #   adapters.
+# cxgbe: Chelsio T4/T5 1GbE/10GbE/40GbE PCIe Ethernet adapters
 # ed:   Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503
 #   HP PC Lan+, various PC Card devices
 #   (requires miibus)
@@ -322,6 +323,7 @@ options DRM_DEBUG   # Include debug print
 #  Requires the wpi firmware module
 
 device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE
+device cxgbe   # Chelsio T4/T5 1GbE/10GbE/40GbE
 device ed  # NE[12]000, SMC Ultra, 3c503, DS8390 cards
 optionsED_3C503
 optionsED_HPP

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Dec 31 20:31:32 2014(r276479)
+++ head/sys/conf/NOTES Wed Dec 31 20:34:12 2014(r276480)
@@ -1918,8 +1918,6 @@ devicexmphy   # XaQti XMAC II
 # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn
 # cm:  Arcnet SMC COM90c26 / SMC COM90c56
 #  (and SMC COM90c66 in '56 compatibility mode) adapters.
-# cxgbe: Support for PCI express 10Gb/1Gb adapters based on the Chelsio T4
-#   (Terminator 4) ASIC.
 # dc:   Support for PCI fast ethernet adapters based on the DEC/Intel 21143
 #   and various workalikes including:
 #   the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics
@@ -2096,7 +2094,6 @@ devicewb  # Winbond W89C840F
 device xl  # 3Com 3c90x (``Boomerang'', ``Cyclone'')
 
 # PCI Ethernet NICs.
-device cxgbe   # Chelsio T4 10GbE PCIe adapter
 device de  # DEC/Intel DC21x4x (``Tulip'')
 device em  # Intel Pro/1000 Gigabit Ethernet
 device igb # Intel Pro/1000 PCIE Gigabit Ethernet

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Wed Dec 31 20:31:32 2014(r276479)
+++ head/sys/modules/Makefile   Wed Dec 31 20:34:12 2014(r276480)
@@ -433,7 +433,6 @@ _pfsync=pfsync
 
 .if ${MK_SOURCELESS_UCODE} != "no"
 _bce=  bce
-_cxgbe=cxgbe
 _fatm= fatm
 _fxp=  fxp
 _ispfw=ispfw
@@ -445,6 +444,9 @@ _ti=ti
 _txp=  txp
 .endif
 
+.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64"
+_cxgbe=cxgbe
+.endif
 
 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" && \
${MACHINE_CPUARCH} != "powerpc"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276479 - in head: . contrib/ipfilter contrib/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms contrib/llvm/include/llvm/ADT contrib/ll

2014-12-31 Thread Justin Hibbits
That's fantastic! Thanks for doing this!

-Justin
On Dec 31, 2014 1:33 PM, "Dimitry Andric"  wrote:

> Author: dim
> Date: Wed Dec 31 20:31:32 2014
> New Revision: 276479
> URL: https://svnweb.freebsd.org/changeset/base/276479
>
> Log:
>   Upgrade our copy of clang, llvm and lldb to 3.5.0 release.
>
>   Please note that this version now requires C++11 support to build; see
>   UPDATING for more information.
>
>   Release notes for llvm and clang can be found here:
>   
>   
>
>   Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and
>   Antoine Brodin for their invaluable help with this import.
>
>   Approved by:  portmgr (antoine)
>   MFC after:1 month
>
> Added:
>   head/contrib/llvm/include/llvm-c/module.modulemap
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm-c/module.modulemap
>   head/contrib/llvm/include/llvm/ADT/iterator.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/ADT/iterator.h
>   head/contrib/llvm/include/llvm/ADT/iterator_range.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/ADT/iterator_range.h
>   head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
>   head/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h
>   head/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
>   head/contrib/llvm/include/llvm/Analysis/JumpInstrTableInfo.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/JumpInstrTableInfo.h
>   head/contrib/llvm/include/llvm/Analysis/LazyCallGraph.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/LazyCallGraph.h
>   head/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h
>   head/contrib/llvm/include/llvm/Analysis/TargetFolder.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Analysis/TargetFolder.h
>   head/contrib/llvm/include/llvm/AsmParser/
>  - copied from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/AsmParser/
>   head/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h
>   head/contrib/llvm/include/llvm/CodeGen/JumpInstrTables.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/JumpInstrTables.h
>   head/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h
>   head/contrib/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
>   head/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/MachineRegionInfo.h
>   head/contrib/llvm/include/llvm/CodeGen/MachineValueType.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/MachineValueType.h
>   head/contrib/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h
>   head/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h
>   head/contrib/llvm/include/llvm/CodeGen/PBQP/RegAllocSolver.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/PBQP/RegAllocSolver.h
>   head/contrib/llvm/include/llvm/CodeGen/StackMapLivenessAnalysis.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/CodeGen/StackMapLivenessAnalysis.h
>   head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
>   head/contrib/llvm/include/llvm/IR/AssemblyAnnotationWriter.h
>  - copied unchanged from r276476,
> projects/clang350-import/contrib/llvm/include/llvm/IR/AssemblyAnnotationWriter.h
>  

svn commit: r276481 - head/usr.sbin/gpioctl

2014-12-31 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Dec 31 21:58:03 2014
New Revision: 276481
URL: https://svnweb.freebsd.org/changeset/base/276481

Log:
  Free the buffer returned by gpio_pin_list() after the use.
  
  Reported by:  Coverity Scan
  CID:  1257468

Modified:
  head/usr.sbin/gpioctl/gpioctl.c

Modified: head/usr.sbin/gpioctl/gpioctl.c
==
--- head/usr.sbin/gpioctl/gpioctl.c Wed Dec 31 20:34:12 2014
(r276480)
+++ head/usr.sbin/gpioctl/gpioctl.c Wed Dec 31 21:58:03 2014
(r276481)
@@ -159,6 +159,7 @@ dump_pins(gpio_handle_t handle, int verb
}
printf("\n");
}
+   free(cfgs);
 }
 
 static void
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276483 - head/share/man/man7

2014-12-31 Thread Garrett Cooper
Author: ngie
Date: Wed Dec 31 22:49:02 2014
New Revision: 276483
URL: https://svnweb.freebsd.org/changeset/base/276483

Log:
  The variable used with install(1) for stripping should be STRIPBIN, not
  STRIP_CMD
  
  MFC after: 3 days
  Reported by: lev

Modified:
  head/share/man/man7/build.7

Modified: head/share/man/man7/build.7
==
--- head/share/man/man7/build.7 Wed Dec 31 22:15:28 2014(r276482)
+++ head/share/man/man7/build.7 Wed Dec 31 22:49:02 2014(r276483)
@@ -445,10 +445,10 @@ process.
 .Bd -literal -offset indent
 make PORTS_MODULES=emulators/kqemu-kmod kernel
 .Ed
-.It Va STRIP_CMD
+.It Va STRIPBIN
 Command to use at install time when stripping binaries.
 Be sure to add any additional tools required to run
-.Va STRIP_CMD
+.Va STRIPBIN
 to the
 .Va LOCAL_ITOOLS
 .Xr make 1
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276484 - in head/sys: netinet netinet6

2014-12-31 Thread Adrian Chadd
Author: adrian
Date: Wed Dec 31 22:52:43 2014
New Revision: 276484
URL: https://svnweb.freebsd.org/changeset/base/276484

Log:
  Migrate the RSS IPv6 hash code to use pointers to the v6 addresses
  rather than passing them in by value.
  
  The eventual aim is to do incremental hash construction rather than
  all of the memcpy()'ing into a contiguous buffer for the hash
  function, which does show up as taking quite a bit of CPU during
  profiling.
  
  Tested:
  
  * a variety of laptops/desktop setups I have, with v6 connectivity
  
  Differential Revision:D1404
  Reviewed by:  bz, rpaulo

Modified:
  head/sys/netinet/in_rss.c
  head/sys/netinet/in_rss.h
  head/sys/netinet6/in6_pcbgroup.c
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet/in_rss.c
==
--- head/sys/netinet/in_rss.c   Wed Dec 31 22:49:02 2014(r276483)
+++ head/sys/netinet/in_rss.c   Wed Dec 31 22:52:43 2014(r276484)
@@ -346,16 +346,16 @@ rss_hash_ip4_4tuple(struct in_addr src, 
  * Hash an IPv6 2-tuple.
  */
 uint32_t
-rss_hash_ip6_2tuple(struct in6_addr src, struct in6_addr dst)
+rss_hash_ip6_2tuple(const struct in6_addr *src, const struct in6_addr *dst)
 {
-   uint8_t data[sizeof(src) + sizeof(dst)];
+   uint8_t data[sizeof(*src) + sizeof(*dst)];
u_int datalen;
 
datalen = 0;
-   bcopy(&src, &data[datalen], sizeof(src));
-   datalen += sizeof(src);
-   bcopy(&dst, &data[datalen], sizeof(dst));
-   datalen += sizeof(dst);
+   bcopy(src, &data[datalen], sizeof(*src));
+   datalen += sizeof(*src);
+   bcopy(dst, &data[datalen], sizeof(*dst));
+   datalen += sizeof(*dst);
return (rss_hash(datalen, data));
 }
 
@@ -363,18 +363,18 @@ rss_hash_ip6_2tuple(struct in6_addr src,
  * Hash an IPv6 4-tuple.
  */
 uint32_t
-rss_hash_ip6_4tuple(struct in6_addr src, u_short srcport,
-struct in6_addr dst, u_short dstport)
+rss_hash_ip6_4tuple(const struct in6_addr *src, u_short srcport,
+const struct in6_addr *dst, u_short dstport)
 {
-   uint8_t data[sizeof(src) + sizeof(dst) + sizeof(srcport) +
+   uint8_t data[sizeof(*src) + sizeof(*dst) + sizeof(srcport) +
sizeof(dstport)];
u_int datalen;
 
datalen = 0;
-   bcopy(&src, &data[datalen], sizeof(src));
-   datalen += sizeof(src);
-   bcopy(&dst, &data[datalen], sizeof(dst));
-   datalen += sizeof(dst);
+   bcopy(src, &data[datalen], sizeof(*src));
+   datalen += sizeof(*src);
+   bcopy(dst, &data[datalen], sizeof(*dst));
+   datalen += sizeof(*dst);
bcopy(&srcport, &data[datalen], sizeof(srcport));
datalen += sizeof(srcport);
bcopy(&dstport, &data[datalen], sizeof(dstport));

Modified: head/sys/netinet/in_rss.h
==
--- head/sys/netinet/in_rss.h   Wed Dec 31 22:49:02 2014(r276483)
+++ head/sys/netinet/in_rss.h   Wed Dec 31 22:52:43 2014(r276484)
@@ -112,10 +112,10 @@ u_int rss_gethashconfig(void);
 uint32_t   rss_hash_ip4_4tuple(struct in_addr src, u_short srcport,
struct in_addr dst, u_short dstport);
 uint32_t   rss_hash_ip4_2tuple(struct in_addr src, struct in_addr dst);
-uint32_t   rss_hash_ip6_4tuple(struct in6_addr src, u_short srcport,
-   struct in6_addr dst, u_short dstport);
-uint32_t   rss_hash_ip6_2tuple(struct in6_addr src,
-   struct in6_addr dst);
+uint32_t   rss_hash_ip6_4tuple(const struct in6_addr *src, u_short srcport,
+   const struct in6_addr *dst, u_short dstport);
+uint32_t   rss_hash_ip6_2tuple(const struct in6_addr *src,
+   const struct in6_addr *dst);
 
 /*
  * Network stack interface to query desired CPU affinity of a packet.

Modified: head/sys/netinet6/in6_pcbgroup.c
==
--- head/sys/netinet6/in6_pcbgroup.cWed Dec 31 22:49:02 2014
(r276483)
+++ head/sys/netinet6/in6_pcbgroup.cWed Dec 31 22:52:43 2014
(r276484)
@@ -105,7 +105,7 @@ in6_pcbgroup_bytuple(struct inpcbinfo *p
switch (pcbinfo->ipi_hashfields) {
case IPI_HASHFIELDS_4TUPLE:
 #ifdef RSS
-   hash = rss_hash_ip6_4tuple(*faddrp, fport, *laddrp, lport);
+   hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport);
 #else
hash = faddrp->s6_addr32[3] ^ fport;
 #endif
@@ -113,7 +113,7 @@ in6_pcbgroup_bytuple(struct inpcbinfo *p
 
case IPI_HASHFIELDS_2TUPLE:
 #ifdef RSS
-   hash = rss_hash_ip6_2tuple(*faddrp, *laddrp);
+   hash = rss_hash_ip6_2tuple(faddrp, laddrp);
 #else
hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3];
 #endif

Modified: head/sys/netinet6/udp6_usrreq.c
==
--- head/

svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe

2014-12-31 Thread Navdeep Parhar
Author: np
Date: Wed Dec 31 23:19:16 2014
New Revision: 276485
URL: https://svnweb.freebsd.org/changeset/base/276485

Log:
  cxgbe(4): major tx rework.
  
  a) Front load as much work as possible in if_transmit, before any driver
  lock or software queue has to get involved.
  
  b) Replace buf_ring with a brand new mp_ring (multiproducer ring).  This
  is specifically for the tx multiqueue model where one of the if_transmit
  producer threads becomes the consumer and other producers carry on as
  usual.  mp_ring is implemented as standalone code and it should be
  possible to use it in any driver with tx multiqueue.  It also has:
  - the ability to enqueue/dequeue multiple items.  This might become
significant if packet batching is ever implemented.
  - an abdication mechanism to allow a thread to give up writing tx
descriptors and have another if_transmit thread take over.  A thread
that's writing tx descriptors can end up doing so for an unbounded
time period if a) there are other if_transmit threads continuously
feeding the sofware queue, and b) the chip keeps up with whatever the
thread is throwing at it.
  - accurate statistics about interesting events even when the stats come
at the expense of additional branches/conditional code.
  
  The NIC txq lock is uncontested on the fast path at this point.  I've
  left it there for synchronization with the control events (interface
  up/down, modload/unload).
  
  c) Add support for "type 1" coalescing work request in the normal NIC tx
  path.  This work request is optimized for frames with a single item in
  the DMA gather list.  These are very common when forwarding packets.
  Note that netmap tx in cxgbe already uses these "type 1" work requests.
  
  d) Do not request automatic cidx updates every 32 descriptors.  Instead,
  request updates via bits in individual work requests (still every 32
  descriptors approximately).  Also, request an automatic final update
  when the queue idles after activity.  This means NIC tx reclaim is still
  performed lazily but it will catch up quickly as soon as the queue
  idles.  This seems to be the best middle ground and I'll probably do
  something similar for netmap tx as well.
  
  e) Implement a faster tx path for WRQs (used by TOE tx and control
  queues, _not_ by the normal NIC tx).  Allow work requests to be written
  directly to the hardware descriptor ring if room is available.  I will
  convert t4_tom and iw_cxgbe modules to this faster style gradually.
  
  MFC after:2 months

Added:
  head/sys/dev/cxgbe/t4_mp_ring.c   (contents, props changed)
  head/sys/dev/cxgbe/t4_mp_ring.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_l2t.c
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c
  head/sys/modules/cxgbe/if_cxgbe/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Dec 31 22:52:43 2014(r276484)
+++ head/sys/conf/files Wed Dec 31 23:19:16 2014(r276485)
@@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c  optional cxgb p
compile-with "${NORMAL_C} -I$S/dev/cxgb"
 dev/cxgb/cxgb_t3fw.c   optional cxgb cxgb_t3fw \
compile-with "${NORMAL_C} -I$S/dev/cxgb"
+dev/cxgbe/t4_mp_ring.c optional cxgbe pci \
+   compile-with "${NORMAL_C} -I$S/dev/cxgbe"
 dev/cxgbe/t4_main.coptional cxgbe pci \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
 dev/cxgbe/t4_netmap.c  optional cxgbe pci \

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hWed Dec 31 22:52:43 2014
(r276484)
+++ head/sys/dev/cxgbe/adapter.hWed Dec 31 23:19:16 2014
(r276485)
@@ -152,7 +152,8 @@ enum {
CL_METADATA_SIZE = CACHE_LINE_SIZE,
 
SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */
-   TX_SGL_SEGS = 36,
+   TX_SGL_SEGS = 39,
+   TX_SGL_SEGS_TSO = 38,
TX_WR_FLITS = SGE_MAX_WR_LEN / 8
 };
 
@@ -273,6 +274,7 @@ struct port_info {
struct timeval last_refreshed;
struct port_stats stats;
u_int tnl_cong_drops;
+   u_int tx_parse_error;
 
eventhandler_tag vlan_c;
 
@@ -308,23 +310,9 @@ struct tx_desc {
__be64 flit[8];
 };
 
-struct tx_map {
-   struct mbuf *m;
-   bus_dmamap_t map;
-};
-
-/* DMA maps used for tx */
-struct tx_maps {
-   struct tx_map *maps;
-   uint32_t map_total; /* # of DMA maps */
-   uint32_t map_pidx;  /* next map to be used */
-   uint32_t map_cidx;  /* reclaimed up to this index */
-   uint32_t map_avail; /* # of available maps */
-};
-
 struct tx_sdesc {
+   struct mbuf *m; /* m_nextpkt linked chain of frames */
uint8_t desc_used;  /* # of hardware descriptors used by the WR */

svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Warner Losh
Author: imp
Date: Thu Jan  1 02:00:04 2015
New Revision: 276488
URL: https://svnweb.freebsd.org/changeset/base/276488

Log:
  Fix module builds on arm (and maybe others) by turning off a whole
  raft of new warnings that appear to be on by default in clang 3.5.0.
  Fix RPI-B build issues with new clang not liking the ability to pass
  arbitrary flags to as, since some flags are more arbitrary (and thus
  verboten) than others.
  
  These warnings should be actually fixed in the code, but this is a
  band-aide to get things (almost) building again.

Modified:
  head/share/mk/bsd.kmod.mk
  head/share/mk/bsd.sys.mk
  head/sys/arm/broadcom/bcm2835/std.bcm2835
  head/sys/conf/kern.mk

Modified: head/share/mk/bsd.kmod.mk
==
--- head/share/mk/bsd.kmod.mk   Thu Jan  1 01:43:00 2015(r276487)
+++ head/share/mk/bsd.kmod.mk   Thu Jan  1 02:00:04 2015(r276488)
@@ -13,5 +13,3 @@ SYSDIR=   ${_dir}
 .endif
 
 .include "${SYSDIR}/conf/kmod.mk"
-
-.include 

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkThu Jan  1 01:43:00 2015(r276487)
+++ head/share/mk/bsd.sys.mkThu Jan  1 02:00:04 2015(r276488)
@@ -110,11 +110,7 @@ CWARNFLAGS+=   -Wno-format
 CWARNFLAGS+=   -Wno-unknown-pragmas
 .endif # IGNORE_PRAGMA
 
-.if ${COMPILER_TYPE} == "clang"
-# Would love to do this unconditionally, but can't due to its use in
-# kernel build coupled with CFLAGS.${TARGET} feature
 CLANG_NO_IAS=   -no-integrated-as
-.endif
 CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
 -mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
 CFLAGS.clang+=  -Qunused-arguments

Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
==
--- head/sys/arm/broadcom/bcm2835/std.bcm2835   Thu Jan  1 01:43:00 2015
(r276487)
+++ head/sys/arm/broadcom/bcm2835/std.bcm2835   Thu Jan  1 02:00:04 2015
(r276488)
@@ -2,7 +2,7 @@
 
 machinearm armv6
 cpuCPU_ARM1176
-makeoptionsCONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
+makeoptionsCONF_CFLAGS="-mcpu=arm1176jzf-s"
 
 files  "../broadcom/bcm2835/files.bcm2835"
 

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Thu Jan  1 01:43:00 2015(r276487)
+++ head/sys/conf/kern.mk   Thu Jan  1 02:00:04 2015(r276488)
@@ -164,4 +164,26 @@ CFLAGS+=   -fstack-protector
 CFLAGS+=   -gdwarf-2
 .endif
 
+# A whole bunch of new default warnings in clang 3.5 subpress for now until
+# this can be cleaned up.
+.if ${COMPILER_VERSION} >= 30500
+CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format \
+   -Wno-shift-count-negative -Wno-tautological-pointer-compare \
+   -Wno-shift-count-overflow -Wno-tautological-compare
+.endif
+
 CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
+
+# Tell bmake not to mistake standard targets for things to be searched for
+# or expect to ever be up-to-date.
+PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
+   beforelinking build build-tools buildfiles buildincludes \
+   checkdpadd clean cleandepend cleandir cleanobj configure \
+   depend dependall distclean distribute exe \
+   html includes install installfiles installincludes lint \
+   obj objlink objs objwarn realall realdepend \
+   realinstall regress subdir-all subdir-depend subdir-install \
+   tags whereobj
+
+.PHONY: ${PHONY_NOTMAIN}
+.NOTMAIN: ${PHONY_NOTMAIN}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276489 - head/sys/dev/virtio/network

2014-12-31 Thread Bryan Venteicher
Author: bryanv
Date: Thu Jan  1 02:03:09 2015
New Revision: 276489
URL: https://svnweb.freebsd.org/changeset/base/276489

Log:
  Use the appropriate IPv4 or IPv6 TSO HW assist flag
  
  MFC after:2 weeks

Modified:
  head/sys/dev/virtio/network/if_vtnet.c

Modified: head/sys/dev/virtio/network/if_vtnet.c
==
--- head/sys/dev/virtio/network/if_vtnet.c  Thu Jan  1 02:00:04 2015
(r276488)
+++ head/sys/dev/virtio/network/if_vtnet.c  Thu Jan  1 02:03:09 2015
(r276489)
@@ -3006,9 +3006,9 @@ vtnet_reinit(struct vtnet_softc *sc)
if (ifp->if_capenable & IFCAP_TXCSUM_IPV6)
ifp->if_hwassist |= VTNET_CSUM_OFFLOAD_IPV6;
if (ifp->if_capenable & IFCAP_TSO4)
-   ifp->if_hwassist |= CSUM_TSO;
+   ifp->if_hwassist |= CSUM_IP_TSO;
if (ifp->if_capenable & IFCAP_TSO6)
-   ifp->if_hwassist |= CSUM_TSO; /* No CSUM_TSO_IPV6. */
+   ifp->if_hwassist |= CSUM_IP6_TSO;
 
if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ)
vtnet_init_rx_filters(sc);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r276491 - head/sys/dev/virtio/network

2014-12-31 Thread Bryan Venteicher
Author: bryanv
Date: Thu Jan  1 02:06:00 2015
New Revision: 276491
URL: https://svnweb.freebsd.org/changeset/base/276491

Log:
  Add softc flag for when the indirect descriptor feature was negotiated
  
  MFC after:2 weeks

Modified:
  head/sys/dev/virtio/network/if_vtnet.c
  head/sys/dev/virtio/network/if_vtnetvar.h

Modified: head/sys/dev/virtio/network/if_vtnet.c
==
--- head/sys/dev/virtio/network/if_vtnet.c  Thu Jan  1 02:04:44 2015
(r276490)
+++ head/sys/dev/virtio/network/if_vtnet.c  Thu Jan  1 02:06:00 2015
(r276491)
@@ -599,6 +599,8 @@ vtnet_setup_features(struct vtnet_softc 
 
vtnet_negotiate_features(sc);
 
+   if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC))
+   sc->vtnet_flags |= VTNET_FLAG_INDIRECT;
if (virtio_with_feature(dev, VIRTIO_RING_F_EVENT_IDX))
sc->vtnet_flags |= VTNET_FLAG_EVENT_IDX;
 
@@ -3653,7 +3655,7 @@ vtnet_set_tx_intr_threshold(struct vtnet
 * Without indirect descriptors, leave enough room for the most
 * segments we handle.
 */
-   if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0 &&
+   if ((sc->vtnet_flags & VTNET_FLAG_INDIRECT) == 0 &&
thresh < sc->vtnet_tx_nsegs)
thresh = sc->vtnet_tx_nsegs;
 

Modified: head/sys/dev/virtio/network/if_vtnetvar.h
==
--- head/sys/dev/virtio/network/if_vtnetvar.h   Thu Jan  1 02:04:44 2015
(r276490)
+++ head/sys/dev/virtio/network/if_vtnetvar.h   Thu Jan  1 02:06:00 2015
(r276491)
@@ -140,7 +140,8 @@ struct vtnet_softc {
 #define VTNET_FLAG_MRG_RXBUFS   0x0080
 #define VTNET_FLAG_LRO_NOMRG0x0100
 #define VTNET_FLAG_MULTIQ   0x0200
-#define VTNET_FLAG_EVENT_IDX0x0400
+#define VTNET_FLAG_INDIRECT 0x0400
+#define VTNET_FLAG_EVENT_IDX0x0800
 
int  vtnet_link_active;
int  vtnet_hdr_size;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Dimitry Andric
On 01 Jan 2015, at 03:00, Warner Losh  wrote:
> 
> Author: imp
> Date: Thu Jan  1 02:00:04 2015
> New Revision: 276488
> URL: https://svnweb.freebsd.org/changeset/base/276488
> 
> Log:
>  Fix module builds on arm (and maybe others) by turning off a whole
>  raft of new warnings that appear to be on by default in clang 3.5.0.
>  Fix RPI-B build issues with new clang not liking the ability to pass
>  arbitrary flags to as, since some flags are more arbitrary (and thus
>  verboten) than others.
> 
>  These warnings should be actually fixed in the code, but this is a
>  band-aide to get things (almost) building again.
> 
> Modified:
>  head/share/mk/bsd.kmod.mk
>  head/share/mk/bsd.sys.mk
>  head/sys/arm/broadcom/bcm2835/std.bcm2835
>  head/sys/conf/kern.mk
> 
> Modified: head/share/mk/bsd.kmod.mk
> ==
> --- head/share/mk/bsd.kmod.mk Thu Jan  1 01:43:00 2015(r276487)
> +++ head/share/mk/bsd.kmod.mk Thu Jan  1 02:00:04 2015(r276488)
> @@ -13,5 +13,3 @@ SYSDIR= ${_dir}
> .endif
> 
> .include "${SYSDIR}/conf/kmod.mk"
> -
> -.include 
> 
> Modified: head/share/mk/bsd.sys.mk
> ==
> --- head/share/mk/bsd.sys.mk  Thu Jan  1 01:43:00 2015(r276487)
> +++ head/share/mk/bsd.sys.mk  Thu Jan  1 02:00:04 2015(r276488)
> @@ -110,11 +110,7 @@ CWARNFLAGS+= -Wno-format
> CWARNFLAGS+=  -Wno-unknown-pragmas
> .endif # IGNORE_PRAGMA
> 
> -.if ${COMPILER_TYPE} == "clang"
> -# Would love to do this unconditionally, but can't due to its use in
> -# kernel build coupled with CFLAGS.${TARGET} feature
> CLANG_NO_IAS=  -no-integrated-as
> -.endif
> CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>-mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
> CFLAGS.clang+= -Qunused-arguments

This should not be removed from bsd.sys.mk, since other things depend on
it, are you sure that you want this? :)

As far as I know, there are still a few places in the tree that use the
CLANG_NO_IAS macro.  It would be nice if those all went away, though...


> Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
> ==
> --- head/sys/arm/broadcom/bcm2835/std.bcm2835 Thu Jan  1 01:43:00 2015
> (r276487)
> +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Thu Jan  1 02:00:04 2015
> (r276488)
> @@ -2,7 +2,7 @@
> 
> machine   arm armv6
> cpu   CPU_ARM1176
> -makeoptions  CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
> +makeoptions  CONF_CFLAGS="-mcpu=arm1176jzf-s"
> 
> files "../broadcom/bcm2835/files.bcm2835"
> 
> 
> Modified: head/sys/conf/kern.mk
> ==
> --- head/sys/conf/kern.mk Thu Jan  1 01:43:00 2015(r276487)
> +++ head/sys/conf/kern.mk Thu Jan  1 02:00:04 2015(r276488)
> @@ -164,4 +164,26 @@ CFLAGS+= -fstack-protector
> CFLAGS+=  -gdwarf-2
> .endif
> 
> +# A whole bunch of new default warnings in clang 3.5 subpress for now until
> +# this can be cleaned up.
> +.if ${COMPILER_VERSION} >= 30500
> +CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format \
> + -Wno-shift-count-negative -Wno-tautological-pointer-compare \
> + -Wno-shift-count-overflow -Wno-tautological-compare
> +.endif
> +
> CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}

Note that for x86, all of these warnings were already either fixed or
suppressed.  I assume this will be fleshed out later?


> +# Tell bmake not to mistake standard targets for things to be searched for
> +# or expect to ever be up-to-date.
> +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
> + beforelinking build build-tools buildfiles buildincludes \
> + checkdpadd clean cleandepend cleandir cleanobj configure \
> + depend dependall distclean distribute exe \
> + html includes install installfiles installincludes lint \
> + obj objlink objs objwarn realall realdepend \
> + realinstall regress subdir-all subdir-depend subdir-install \
> + tags whereobj
> +
> +.PHONY: ${PHONY_NOTMAIN}
> +.NOTMAIN: ${PHONY_NOTMAIN}
> 

Was this latter part intentional?  It does not seem to have anything to
do with clang at all.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r276493 - head/share/mk

2014-12-31 Thread Garrett Cooper
Author: ngie
Date: Thu Jan  1 04:10:56 2015
New Revision: 276493
URL: https://svnweb.freebsd.org/changeset/base/276493

Log:
  Unbreak the build for some modules that depend on -std flags to be passed
  through via CFLAGS, as noted by Jenkins when building sparc64 by re-adding
  bsd.sys.mk to bsd.kmod.mk:
  https://jenkins.freebsd.org/job/FreeBSD_HEAD_sparc64/225/changes
  
  Tested with:
  % cd /sys/modules/bce; make obj; make depend; make all

Modified:
  head/share/mk/bsd.kmod.mk

Modified: head/share/mk/bsd.kmod.mk
==
--- head/share/mk/bsd.kmod.mk   Thu Jan  1 02:12:43 2015(r276492)
+++ head/share/mk/bsd.kmod.mk   Thu Jan  1 04:10:56 2015(r276493)
@@ -13,3 +13,5 @@ SYSDIR=   ${_dir}
 .endif
 
 .include "${SYSDIR}/conf/kmod.mk"
+
+.include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Warner Losh

> On Dec 31, 2014, at 8:52 PM, Dimitry Andric  wrote:
> 
> On 01 Jan 2015, at 03:00, Warner Losh  wrote:
>> 
>> Author: imp
>> Date: Thu Jan  1 02:00:04 2015
>> New Revision: 276488
>> URL: https://svnweb.freebsd.org/changeset/base/276488
>> 
>> Log:
>> Fix module builds on arm (and maybe others) by turning off a whole
>> raft of new warnings that appear to be on by default in clang 3.5.0.
>> Fix RPI-B build issues with new clang not liking the ability to pass
>> arbitrary flags to as, since some flags are more arbitrary (and thus
>> verboten) than others.
>> 
>> These warnings should be actually fixed in the code, but this is a
>> band-aide to get things (almost) building again.
>> 
>> Modified:
>> head/share/mk/bsd.kmod.mk
>> head/share/mk/bsd.sys.mk
>> head/sys/arm/broadcom/bcm2835/std.bcm2835
>> head/sys/conf/kern.mk
>> 
>> Modified: head/share/mk/bsd.kmod.mk
>> ==
>> --- head/share/mk/bsd.kmod.mkThu Jan  1 01:43:00 2015
>> (r276487)
>> +++ head/share/mk/bsd.kmod.mkThu Jan  1 02:00:04 2015
>> (r276488)
>> @@ -13,5 +13,3 @@ SYSDIR=${_dir}
>> .endif
>> 
>> .include "${SYSDIR}/conf/kmod.mk"
>> -
>> -.include 
>> 
>> Modified: head/share/mk/bsd.sys.mk
>> ==
>> --- head/share/mk/bsd.sys.mk Thu Jan  1 01:43:00 2015(r276487)
>> +++ head/share/mk/bsd.sys.mk Thu Jan  1 02:00:04 2015(r276488)
>> @@ -110,11 +110,7 @@ CWARNFLAGS+=-Wno-format
>> CWARNFLAGS+= -Wno-unknown-pragmas
>> .endif # IGNORE_PRAGMA
>> 
>> -.if ${COMPILER_TYPE} == "clang"
>> -# Would love to do this unconditionally, but can't due to its use in
>> -# kernel build coupled with CFLAGS.${TARGET} feature
>> CLANG_NO_IAS= -no-integrated-as
>> -.endif
>> CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>>   -mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
>> CFLAGS.clang+=-Qunused-arguments
> 
> This should not be removed from bsd.sys.mk, since other things depend on
> it, are you sure that you want this? :)

I may be wrong here for boot stuff that uses it.

> As far as I know, there are still a few places in the tree that use the
> CLANG_NO_IAS macro.  It would be nice if those all went away, though…

Only for boot. Thanks, though I think they may be CFLAGS.clang += there.

> Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
>> ==
>> --- head/sys/arm/broadcom/bcm2835/std.bcm2835Thu Jan  1 01:43:00 
>> 2015(r276487)
>> +++ head/sys/arm/broadcom/bcm2835/std.bcm2835Thu Jan  1 02:00:04 
>> 2015(r276488)
>> @@ -2,7 +2,7 @@
>> 
>> machine  arm armv6
>> cpu  CPU_ARM1176
>> -makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
>> +makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s"
>> 
>> files"../broadcom/bcm2835/files.bcm2835"
>> 
>> 
>> Modified: head/sys/conf/kern.mk
>> ==
>> --- head/sys/conf/kern.mkThu Jan  1 01:43:00 2015(r276487)
>> +++ head/sys/conf/kern.mkThu Jan  1 02:00:04 2015(r276488)
>> @@ -164,4 +164,26 @@ CFLAGS+=-fstack-protector
>> CFLAGS+= -gdwarf-2
>> .endif
>> 
>> +# A whole bunch of new default warnings in clang 3.5 subpress for now until
>> +# this can be cleaned up.
>> +.if ${COMPILER_VERSION} >= 30500
>> +CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format \
>> +-Wno-shift-count-negative -Wno-tautological-pointer-compare \
>> +-Wno-shift-count-overflow -Wno-tautological-compare
>> +.endif
>> +
>> CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
> 
> Note that for x86, all of these warnings were already either fixed or
> suppressed.  I assume this will be fleshed out later?

Yea, but since a build universe wasn’t done, they were present in the
build. They are harmless on other architectures.

>> +# Tell bmake not to mistake standard targets for things to be searched for
>> +# or expect to ever be up-to-date.
>> +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
>> +beforelinking build build-tools buildfiles buildincludes \
>> +checkdpadd clean cleandepend cleandir cleanobj configure \
>> +depend dependall distclean distribute exe \
>> +html includes install installfiles installincludes lint \
>> +obj objlink objs objwarn realall realdepend \
>> +realinstall regress subdir-all subdir-depend subdir-install \
>> +tags whereobj
>> +
>> +.PHONY: ${PHONY_NOTMAIN}
>> +.NOTMAIN: ${PHONY_NOTMAIN}
>> 
> 
> Was this latter part intentional?  It does not seem to have anything to
> do with clang at all.

It was the only bit of bsd.sys.mk that was needed.

Warner


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Garrett Cooper
On Dec 31, 2014, at 20:12, Warner Losh  wrote:

>> On Dec 31, 2014, at 8:52 PM, Dimitry Andric  wrote:
>> 
>> On 01 Jan 2015, at 03:00, Warner Losh  wrote:
>>> 
>>> Author: imp
>>> Date: Thu Jan  1 02:00:04 2015
>>> New Revision: 276488
>>> URL: https://svnweb.freebsd.org/changeset/base/276488
>>> 
>>> Log:
>>> Fix module builds on arm (and maybe others) by turning off a whole
>>> raft of new warnings that appear to be on by default in clang 3.5.0.
>>> Fix RPI-B build issues with new clang not liking the ability to pass
>>> arbitrary flags to as, since some flags are more arbitrary (and thus
>>> verboten) than others.
>>> 
>>> These warnings should be actually fixed in the code, but this is a
>>> band-aide to get things (almost) building again.
>>> 
>>> Modified:
>>> head/share/mk/bsd.kmod.mk
>>> head/share/mk/bsd.sys.mk
>>> head/sys/arm/broadcom/bcm2835/std.bcm2835
>>> head/sys/conf/kern.mk
>>> 
>>> Modified: head/share/mk/bsd.kmod.mk
>>> ==
>>> --- head/share/mk/bsd.kmod.mk   Thu Jan  1 01:43:00 2015
>>> (r276487)
>>> +++ head/share/mk/bsd.kmod.mk   Thu Jan  1 02:00:04 2015
>>> (r276488)
>>> @@ -13,5 +13,3 @@ SYSDIR=   ${_dir}
>>> .endif
>>> 
>>> .include "${SYSDIR}/conf/kmod.mk"
>>> -
>>> -.include 
>>> 
>>> Modified: head/share/mk/bsd.sys.mk
>>> ==
>>> --- head/share/mk/bsd.sys.mkThu Jan  1 01:43:00 2015
>>> (r276487)
>>> +++ head/share/mk/bsd.sys.mkThu Jan  1 02:00:04 2015
>>> (r276488)
>>> @@ -110,11 +110,7 @@ CWARNFLAGS+=   -Wno-format
>>> CWARNFLAGS+=-Wno-unknown-pragmas
>>> .endif # IGNORE_PRAGMA
>>> 
>>> -.if ${COMPILER_TYPE} == "clang"
>>> -# Would love to do this unconditionally, but can't due to its use in
>>> -# kernel build coupled with CFLAGS.${TARGET} feature
>>> CLANG_NO_IAS=-no-integrated-as
>>> -.endif
>>> CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>>>  -mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
>>> CFLAGS.clang+=   -Qunused-arguments
>> 
>> This should not be removed from bsd.sys.mk, since other things depend on
>> it, are you sure that you want this? :)
> 
> I may be wrong here for boot stuff that uses it.
> 
>> As far as I know, there are still a few places in the tree that use the
>> CLANG_NO_IAS macro.  It would be nice if those all went away, though…
> 
> Only for boot. Thanks, though I think they may be CFLAGS.clang += there.
> 
>> Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
>>> ==
>>> --- head/sys/arm/broadcom/bcm2835/std.bcm2835   Thu Jan  1 01:43:00 
>>> 2015(r276487)
>>> +++ head/sys/arm/broadcom/bcm2835/std.bcm2835   Thu Jan  1 02:00:04 
>>> 2015(r276488)
>>> @@ -2,7 +2,7 @@
>>> 
>>> machine arm armv6
>>> cpu CPU_ARM1176
>>> -makeoptionsCONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
>>> +makeoptionsCONF_CFLAGS="-mcpu=arm1176jzf-s"
>>> 
>>> files   "../broadcom/bcm2835/files.bcm2835"
>>> 
>>> 
>>> Modified: head/sys/conf/kern.mk
>>> ==
>>> --- head/sys/conf/kern.mk   Thu Jan  1 01:43:00 2015(r276487)
>>> +++ head/sys/conf/kern.mk   Thu Jan  1 02:00:04 2015(r276488)
>>> @@ -164,4 +164,26 @@ CFLAGS+=   -fstack-protector
>>> CFLAGS+=-gdwarf-2
>>> .endif
>>> 
>>> +# A whole bunch of new default warnings in clang 3.5 subpress for now until
>>> +# this can be cleaned up.
>>> +.if ${COMPILER_VERSION} >= 30500
>>> +CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format \
>>> +   -Wno-shift-count-negative -Wno-tautological-pointer-compare \
>>> +   -Wno-shift-count-overflow -Wno-tautological-compare
>>> +.endif
>>> +
>>> CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
>> 
>> Note that for x86, all of these warnings were already either fixed or
>> suppressed.  I assume this will be fleshed out later?
> 
> Yea, but since a build universe wasn’t done, they were present in the
> build. They are harmless on other architectures.
> 
>>> +# Tell bmake not to mistake standard targets for things to be searched for
>>> +# or expect to ever be up-to-date.
>>> +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
>>> +   beforelinking build build-tools buildfiles buildincludes \
>>> +   checkdpadd clean cleandepend cleandir cleanobj configure \
>>> +   depend dependall distclean distribute exe \
>>> +   html includes install installfiles installincludes lint \
>>> +   obj objlink objs objwarn realall realdepend \
>>> +   realinstall regress subdir-all subdir-depend subdir-install \
>>> +   tags whereobj
>>> +
>>> +.PHONY: ${PHONY_NOTMAIN}
>>> +.NOTMAIN: ${PHONY_NOTMAIN}
>>> 
>> 
>> Was this latter part intentiona

svn commit: r276494 - head/share/mk

2014-12-31 Thread Warner Losh
Author: imp
Date: Thu Jan  1 04:26:45 2015
New Revision: 276494
URL: https://svnweb.freebsd.org/changeset/base/276494

Log:
  Eliminate bsd.sys.mk on purpose. Do not put it back.

Modified:
  head/share/mk/bsd.kmod.mk

Modified: head/share/mk/bsd.kmod.mk
==
--- head/share/mk/bsd.kmod.mk   Thu Jan  1 04:10:56 2015(r276493)
+++ head/share/mk/bsd.kmod.mk   Thu Jan  1 04:26:45 2015(r276494)
@@ -13,5 +13,3 @@ SYSDIR=   ${_dir}
 .endif
 
 .include "${SYSDIR}/conf/kmod.mk"
-
-.include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Warner Losh

> On Dec 31, 2014, at 9:15 PM, Garrett Cooper  wrote:
> 
> On Dec 31, 2014, at 20:12, Warner Losh  wrote:
> 
>>> On Dec 31, 2014, at 8:52 PM, Dimitry Andric  wrote:
>>> 
>>> On 01 Jan 2015, at 03:00, Warner Losh  wrote:
 
 Author: imp
 Date: Thu Jan  1 02:00:04 2015
 New Revision: 276488
 URL: https://svnweb.freebsd.org/changeset/base/276488
 
 Log:
 Fix module builds on arm (and maybe others) by turning off a whole
 raft of new warnings that appear to be on by default in clang 3.5.0.
 Fix RPI-B build issues with new clang not liking the ability to pass
 arbitrary flags to as, since some flags are more arbitrary (and thus
 verboten) than others.
 
 These warnings should be actually fixed in the code, but this is a
 band-aide to get things (almost) building again.
 
 Modified:
 head/share/mk/bsd.kmod.mk
 head/share/mk/bsd.sys.mk
 head/sys/arm/broadcom/bcm2835/std.bcm2835
 head/sys/conf/kern.mk
 
 Modified: head/share/mk/bsd.kmod.mk
 ==
 --- head/share/mk/bsd.kmod.mk  Thu Jan  1 01:43:00 2015
 (r276487)
 +++ head/share/mk/bsd.kmod.mk  Thu Jan  1 02:00:04 2015
 (r276488)
 @@ -13,5 +13,3 @@ SYSDIR=  ${_dir}
 .endif
 
 .include "${SYSDIR}/conf/kmod.mk"
 -
 -.include 
 
 Modified: head/share/mk/bsd.sys.mk
 ==
 --- head/share/mk/bsd.sys.mk   Thu Jan  1 01:43:00 2015
 (r276487)
 +++ head/share/mk/bsd.sys.mk   Thu Jan  1 02:00:04 2015
 (r276488)
 @@ -110,11 +110,7 @@ CWARNFLAGS+=  -Wno-format
 CWARNFLAGS+=   -Wno-unknown-pragmas
 .endif # IGNORE_PRAGMA
 
 -.if ${COMPILER_TYPE} == "clang"
 -# Would love to do this unconditionally, but can't due to its use in
 -# kernel build coupled with CFLAGS.${TARGET} feature
 CLANG_NO_IAS=   -no-integrated-as
 -.endif
 CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
 -mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
 CFLAGS.clang+=  -Qunused-arguments
>>> 
>>> This should not be removed from bsd.sys.mk, since other things depend on
>>> it, are you sure that you want this? :)
>> 
>> I may be wrong here for boot stuff that uses it.
>> 
>>> As far as I know, there are still a few places in the tree that use the
>>> CLANG_NO_IAS macro.  It would be nice if those all went away, though…
>> 
>> Only for boot. Thanks, though I think they may be CFLAGS.clang += there.
>> 
>>> Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
 ==
 --- head/sys/arm/broadcom/bcm2835/std.bcm2835  Thu Jan  1 01:43:00 
 2015(r276487)
 +++ head/sys/arm/broadcom/bcm2835/std.bcm2835  Thu Jan  1 02:00:04 
 2015(r276488)
 @@ -2,7 +2,7 @@
 
 machinearm armv6
 cpuCPU_ARM1176
 -makeoptions   CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
 +makeoptions   CONF_CFLAGS="-mcpu=arm1176jzf-s"
 
 files  "../broadcom/bcm2835/files.bcm2835"
 
 
 Modified: head/sys/conf/kern.mk
 ==
 --- head/sys/conf/kern.mk  Thu Jan  1 01:43:00 2015(r276487)
 +++ head/sys/conf/kern.mk  Thu Jan  1 02:00:04 2015(r276488)
 @@ -164,4 +164,26 @@ CFLAGS+=  -fstack-protector
 CFLAGS+=   -gdwarf-2
 .endif
 
 +# A whole bunch of new default warnings in clang 3.5 subpress for now 
 until
 +# this can be cleaned up.
 +.if ${COMPILER_VERSION} >= 30500
 +CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format \
 +  -Wno-shift-count-negative -Wno-tautological-pointer-compare \
 +  -Wno-shift-count-overflow -Wno-tautological-compare
 +.endif
 +
 CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
>>> 
>>> Note that for x86, all of these warnings were already either fixed or
>>> suppressed.  I assume this will be fleshed out later?
>> 
>> Yea, but since a build universe wasn’t done, they were present in the
>> build. They are harmless on other architectures.
>> 
 +# Tell bmake not to mistake standard targets for things to be searched for
 +# or expect to ever be up-to-date.
 +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
 +  beforelinking build build-tools buildfiles buildincludes \
 +  checkdpadd clean cleandepend cleandir cleanobj configure \
 +  depend dependall distclean distribute exe \
 +  html includes install installfiles installincludes lint \
 +  obj objlink objs objwarn realall realdepend \
 +  realinstall regress subdir-all subdir-de

Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Garrett Cooper
On Dec 31, 2014, at 20:25, Warner Losh  wrote:

>> On Dec 31, 2014, at 9:15 PM, Garrett Cooper  wrote:
>> 
>> On Dec 31, 2014, at 20:12, Warner Losh  wrote:
>> 
 On Dec 31, 2014, at 8:52 PM, Dimitry Andric  wrote:
 
 On 01 Jan 2015, at 03:00, Warner Losh  wrote:
> 
> Author: imp
> Date: Thu Jan  1 02:00:04 2015
> New Revision: 276488
> URL: https://svnweb.freebsd.org/changeset/base/276488
> 
> Log:
> Fix module builds on arm (and maybe others) by turning off a whole
> raft of new warnings that appear to be on by default in clang 3.5.0.
> Fix RPI-B build issues with new clang not liking the ability to pass
> arbitrary flags to as, since some flags are more arbitrary (and thus
> verboten) than others.
> 
> These warnings should be actually fixed in the code, but this is a
> band-aide to get things (almost) building again.
> 
> Modified:
> head/share/mk/bsd.kmod.mk
> head/share/mk/bsd.sys.mk
> head/sys/arm/broadcom/bcm2835/std.bcm2835
> head/sys/conf/kern.mk
> 
> Modified: head/share/mk/bsd.kmod.mk
> ==
> --- head/share/mk/bsd.kmod.mk Thu Jan  1 01:43:00 2015
> (r276487)
> +++ head/share/mk/bsd.kmod.mk Thu Jan  1 02:00:04 2015
> (r276488)
> @@ -13,5 +13,3 @@ SYSDIR= ${_dir}
> .endif
> 
> .include "${SYSDIR}/conf/kmod.mk"
> -
> -.include 
> 
> Modified: head/share/mk/bsd.sys.mk
> ==
> --- head/share/mk/bsd.sys.mk  Thu Jan  1 01:43:00 2015
> (r276487)
> +++ head/share/mk/bsd.sys.mk  Thu Jan  1 02:00:04 2015
> (r276488)
> @@ -110,11 +110,7 @@ CWARNFLAGS+= -Wno-format
> CWARNFLAGS+=  -Wno-unknown-pragmas
> .endif # IGNORE_PRAGMA
> 
> -.if ${COMPILER_TYPE} == "clang"
> -# Would love to do this unconditionally, but can't due to its use in
> -# kernel build coupled with CFLAGS.${TARGET} feature
> CLANG_NO_IAS=  -no-integrated-as
> -.endif
> CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\
>-mllvm -simplifycfg-dup-ret -mllvm -enable-gvn=false
> CFLAGS.clang+= -Qunused-arguments
 
 This should not be removed from bsd.sys.mk, since other things depend on
 it, are you sure that you want this? :)
>>> 
>>> I may be wrong here for boot stuff that uses it.
>>> 
 As far as I know, there are still a few places in the tree that use the
 CLANG_NO_IAS macro.  It would be nice if those all went away, though…
>>> 
>>> Only for boot. Thanks, though I think they may be CFLAGS.clang += there.
>>> 
 Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835
> ==
> --- head/sys/arm/broadcom/bcm2835/std.bcm2835 Thu Jan  1 01:43:00 
> 2015(r276487)
> +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Thu Jan  1 02:00:04 
> 2015(r276488)
> @@ -2,7 +2,7 @@
> 
> machine   arm armv6
> cpu   CPU_ARM1176
> -makeoptions  CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s"
> +makeoptions  CONF_CFLAGS="-mcpu=arm1176jzf-s"
> 
> files "../broadcom/bcm2835/files.bcm2835"
> 
> 
> Modified: head/sys/conf/kern.mk
> ==
> --- head/sys/conf/kern.mk Thu Jan  1 01:43:00 2015(r276487)
> +++ head/sys/conf/kern.mk Thu Jan  1 02:00:04 2015(r276488)
> @@ -164,4 +164,26 @@ CFLAGS+= -fstack-protector
> CFLAGS+=  -gdwarf-2
> .endif
> 
> +# A whole bunch of new default warnings in clang 3.5 subpress for now 
> until
> +# this can be cleaned up.
> +.if ${COMPILER_VERSION} >= 30500
> +CFLAGS.clang+=-Wno-pointer-sign -Wno-constant-conversion -Wno-format 
> \
> + -Wno-shift-count-negative -Wno-tautological-pointer-compare \
> + -Wno-shift-count-overflow -Wno-tautological-compare
> +.endif
> +
> CFLAGS+= ${CFLAGS.${COMPILER_TYPE}}
 
 Note that for x86, all of these warnings were already either fixed or
 suppressed.  I assume this will be fleshed out later?
>>> 
>>> Yea, but since a build universe wasn’t done, they were present in the
>>> build. They are harmless on other architectures.
>>> 
> +# Tell bmake not to mistake standard targets for things to be searched 
> for
> +# or expect to ever be up-to-date.
> +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \
> + beforelinking build build-tools buildfiles buildincludes \
> + checkdpadd clean cleandepend cleandir cleanobj configure \
> + depend dependall distclean distribute exe \
> + html includes install i

Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Garrett Cooper
On Dec 31, 2014, at 20:44, Garrett Cooper  wrote:

> On Dec 31, 2014, at 20:25, Warner Losh  wrote:

…

>> This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.
> 
> Sorry. Should have asked first. Now the build is broken on all architectures 
> :/. What next?

Also, that code has been in there for over a decade. It seems a bit dangerous 
to remove it without at least a ports -exp or make tinderbox run…

$ svn blame -r 231834 share/mk/bsd.kmod.mk | less
 60963  peter # $FreeBSD$
 60963  peter 
 60963  peter # Search for kernel source tree in standard places.
130835pjd .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. 
${.CURDIR}/../../../.. \
183736imp ${.CURDIR}/../../../../.. /sys /usr/src/sys
130835pjd .if !defined(SYSDIR) && exists(${_dir}/kern/) && 
exists(${_dir}/conf/kmod.mk)
 60963  peter SYSDIR=   ${_dir}
 60963  peter .endif
 60963  peter .endfor
130835pjd .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
130835pjd !exists(${SYSDIR}/conf/kmod.mk)
231834imp .error Unable to locate the kernel source tree. Set SYSDIR to 
override.
 60963  peter .endif
 60963  peter 
 60965  peter .include "${SYSDIR}/conf/kmod.mk"
 76861   kris 
 76861   kris .include 
[ngie@fuji-current-amd64 /usr/src.svn]$ svn log -r 76861

r76861 | kris | 2001-05-19 16:18:21 -0700 (Sat, 19 May 2001) | 8 lines

Bring in the WARNS directive from NetBSD, localized in a new bsd.sys.mk
to avoid polluting sys.mk.  This directive controls the addition of
compiler warning flags to CFLAGS in a relatively compiler-neutral manner.

The idea is that WARNS can be set in Makefile.inc or in individual
Makefiles as they become clean, to prevent the introduction of new
warnings in the code.  -Werror is added by default




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Garrett Cooper
On Dec 31, 2014, at 21:20, Garrett Cooper  wrote:

> On Dec 31, 2014, at 21:12, Garrett Cooper  wrote:
> 
>> On Dec 31, 2014, at 20:44, Garrett Cooper  wrote:
>> 
>>> On Dec 31, 2014, at 20:25, Warner Losh  wrote:
>> 
>> …
>> 
 This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.
>>> 
>>> Sorry. Should have asked first. Now the build is broken on all 
>>> architectures :/. What next?
>> 
>> Also, that code has been in there for over a decade. It seems a bit 
>> dangerous to remove it without at least a ports -exp or make tinderbox run…
> 
> Hmmm… would it make sense to disable clang warnings from within bsd.sys.mk, 
> like we do with sparc64?
> Thanks!
> 
> 117 .if ${MACHINE_CPUARCH} == "sparc64"
> 118 # Don't emit .cfi directives, since we must use GNU as on sparc64, for 
> now.
> 119 CFLAGS.clang+=   -fno-dwarf2-cfi-asm
> 120 .endif # SPARC64

Or just disable -Werror...?


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Garrett Cooper
On Dec 31, 2014, at 21:12, Garrett Cooper  wrote:

> On Dec 31, 2014, at 20:44, Garrett Cooper  wrote:
> 
>> On Dec 31, 2014, at 20:25, Warner Losh  wrote:
> 
> …
> 
>>> This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.
>> 
>> Sorry. Should have asked first. Now the build is broken on all architectures 
>> :/. What next?
> 
> Also, that code has been in there for over a decade. It seems a bit dangerous 
> to remove it without at least a ports -exp or make tinderbox run…

Hmmm… would it make sense to disable clang warnings from within bsd.sys.mk, 
like we do with sparc64?
Thanks!

117 .if ${MACHINE_CPUARCH} == "sparc64"
118 # Don't emit .cfi directives, since we must use GNU as on sparc64, for now.
119 CFLAGS.clang+=   -fno-dwarf2-cfi-asm
120 .endif # SPARC64


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Warner Losh

> On Dec 31, 2014, at 10:12 PM, Garrett Cooper  wrote:
> 
> On Dec 31, 2014, at 20:44, Garrett Cooper  wrote:
> 
>> On Dec 31, 2014, at 20:25, Warner Losh  wrote:
> 
> …
> 
>>> This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.
>> 
>> Sorry. Should have asked first. Now the build is broken on all architectures 
>> :/. What next?
> 
> Also, that code has been in there for over a decade. It seems a bit dangerous 
> to remove it without at least a ports -exp or make tinderbox run…

True. However, this code has been wrong for a very long time since the WARNS 
kris added were just for user land. Too bad the std stuff got mixed in over the 
years.

Warner

> $ svn blame -r 231834 share/mk/bsd.kmod.mk | less
> 60963  peter # $FreeBSD$
> 60963  peter
> 60963  peter # Search for kernel source tree in standard places.
> 130835pjd .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. 
> ${.CURDIR}/../../../.. \
> 183736imp ${.CURDIR}/../../../../.. /sys /usr/src/sys
> 130835pjd .if !defined(SYSDIR) && exists(${_dir}/kern/) && 
> exists(${_dir}/conf/kmod.mk)
> 60963  peter SYSDIR=   ${_dir}
> 60963  peter .endif
> 60963  peter .endfor
> 130835pjd .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
> 130835pjd !exists(${SYSDIR}/conf/kmod.mk)
> 231834imp .error Unable to locate the kernel source tree. Set SYSDIR 
> to override.
> 60963  peter .endif
> 60963  peter
> 60965  peter .include "${SYSDIR}/conf/kmod.mk"
> 76861   kris
> 76861   kris .include 
> [ngie@fuji-current-amd64 /usr/src.svn]$ svn log -r 76861
> 
> r76861 | kris | 2001-05-19 16:18:21 -0700 (Sat, 19 May 2001) | 8 lines
> 
> Bring in the WARNS directive from NetBSD, localized in a new bsd.sys.mk
> to avoid polluting sys.mk.  This directive controls the addition of
> compiler warning flags to CFLAGS in a relatively compiler-neutral manner.
> 
> The idea is that WARNS can be set in Makefile.inc or in individual
> Makefiles as they become clean, to prevent the introduction of new
> warnings in the code.  -Werror is added by default
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r276495 - head/usr.sbin/nfsd

2014-12-31 Thread Xin LI
Author: delphij
Date: Thu Jan  1 06:53:33 2015
New Revision: 276495
URL: https://svnweb.freebsd.org/changeset/base/276495

Log:
  Fix markup for minthreads and maxthreads.
  
  PR:   196403
  MFC after:2 weeks

Modified:
  head/usr.sbin/nfsd/nfsd.8

Modified: head/usr.sbin/nfsd/nfsd.8
==
--- head/usr.sbin/nfsd/nfsd.8   Thu Jan  1 04:26:45 2015(r276494)
+++ head/usr.sbin/nfsd/nfsd.8   Thu Jan  1 06:53:33 2015(r276495)
@@ -28,7 +28,7 @@
 .\"@(#)nfsd.8  8.4 (Berkeley) 3/29/95
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2014
+.Dd January 1, 2015
 .Dt NFSD 8
 .Os
 .Sh NAME
@@ -41,8 +41,8 @@ server
 .Op Fl arduteo
 .Op Fl n Ar num_servers
 .Op Fl h Ar bindip
-.Op Fl maxthreads Ar max_threads
-.Op Fl minthreads Ar min_threads
+.Op Fl Fl maxthreads Ar max_threads
+.Op Fl Fl minthreads Ar min_threads
 .Sh DESCRIPTION
 The
 .Nm
@@ -78,14 +78,14 @@ service with
 without creating any servers.
 .It Fl n Ar threads
 Specifies how many servers to create.  This option is equivalent to specifying
-.Fl maxthreads
+.Fl Fl maxthreads
 and
-.Fl minthreads
+.Fl Fl minthreads
 with their respective arguments to
 .Ar threads .
-.It Fl maxthreads Ar threads
+.It Fl Fl maxthreads Ar threads
 Specifies the maximum servers that will be kept around to service requests.
-.It Fl minthreads Ar threads
+.It Fl Fl minthreads Ar threads
 Specifies the minimum servers that will be kept around to service requests.
 .It Fl h Ar bindip
 Specifies which IP address or hostname to bind to on the local host.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r276488 - in head: share/mk sys/arm/broadcom/bcm2835 sys/conf

2014-12-31 Thread Mark Linimon
On Wed, Dec 31, 2014 at 09:25:51PM -0700, Warner Losh wrote:
> This change is wrong. bsd.sys.mk was eliminated on purpose, dammit.

Aw, our first bikeshed of the year.  Sniff.  I may cry ...

Wait?  The message is still dated 2014???

hg ...

oh wait, the *commit* is UTC.

I win

mcl

(in case you can't guess, happy new year y'all)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"