svn commit: r261650 - in head/sys: net netinet netinet/cc

2014-02-09 Thread Mikolaj Golub
Author: trociny
Date: Sun Feb  9 08:13:17 2014
New Revision: 261650
URL: http://svnweb.freebsd.org/changeset/base/261650

Log:
  Fixup for r261590 (vnet sysctl handlers cleanup).
  
  Reviewed by:  glebius

Modified:
  head/sys/net/vnet.h
  head/sys/netinet/cc/cc_cdg.c
  head/sys/netinet/sctp_sysctl.c

Modified: head/sys/net/vnet.h
==
--- head/sys/net/vnet.h Sun Feb  9 02:39:00 2014(r261649)
+++ head/sys/net/vnet.h Sun Feb  9 08:13:17 2014(r261650)
@@ -303,7 +303,7 @@ void vnet_data_free(void *start_arg, in
descr)  \
SYSCTL_OID(parent, nbr, name,   \
CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, len, \
-   vnet_sysctl_handle_opaque, fmt, descr)
+   sysctl_handle_opaque, fmt, descr)
 #defineSYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr)  
\
SYSCTL_OID(parent, nbr, name,   \
CTLTYPE_STRING|CTLFLAG_VNET|(access),   \

Modified: head/sys/netinet/cc/cc_cdg.c
==
--- head/sys/netinet/cc/cc_cdg.cSun Feb  9 02:39:00 2014
(r261649)
+++ head/sys/netinet/cc/cc_cdg.cSun Feb  9 08:13:17 2014
(r261650)
@@ -81,11 +81,6 @@ __FBSDID($FreeBSD$);
 
 #defineCAST_PTR_INT(X) (*((int*)(X)))
 
-#ifndefVIMAGE
-#definevnet_sysctl_handle_uint(oidp, arg1, arg2, req) \
-sysctl_handle_int(oidp, arg1, arg2, req)
-#endif
-
 /* Private delay-gradient induced congestion control signal. */
 #defineCC_CDG_DELAY 0x0100
 
@@ -357,7 +352,7 @@ cdg_beta_handler(SYSCTL_HANDLER_ARGS)
(CAST_PTR_INT(req-newptr) == 0 || CAST_PTR_INT(req-newptr)  100))
return (EINVAL);
 
-   return (vnet_sysctl_handle_uint(oidp, arg1, arg2, req));
+   return (sysctl_handle_int(oidp, arg1, arg2, req));
 }
 
 static int
@@ -367,7 +362,7 @@ cdg_exp_backoff_scale_handler(SYSCTL_HAN
if (req-newptr != NULL  CAST_PTR_INT(req-newptr)  1)
return (EINVAL);
 
-   return (vnet_sysctl_handle_uint(oidp, arg1, arg2, req));
+   return (sysctl_handle_int(oidp, arg1, arg2, req));
 }
 
 static inline unsigned long

Modified: head/sys/netinet/sctp_sysctl.c
==
--- head/sys/netinet/sctp_sysctl.c  Sun Feb  9 02:39:00 2014
(r261649)
+++ head/sys/netinet/sctp_sysctl.c  Sun Feb  9 08:13:17 2014
(r261650)
@@ -587,11 +587,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS)
 {
int error;
 
-#ifdef VIMAGE
-   error = vnet_sysctl_handle_int(oidp, oidp-oid_arg1, oidp-oid_arg2, 
req);
-#else
error = sysctl_handle_int(oidp, oidp-oid_arg1, oidp-oid_arg2, req);
-#endif
if (error == 0) {
RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), 
SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX);
RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), 
SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r261266 - in head: sys/dev/drm sys/kern sys/sys usr.sbin/jail

2014-02-09 Thread Edward Tomasz Napierała
Wiadomość napisana przez James Gritton w dniu 4 lut 2014, o godz. 14:49:
 On 2/4/2014 6:23 AM, Julian Elischer wrote:
 On 2/4/14, 3:40 PM, Robert N. M. Watson wrote:
 On 3 Feb 2014, at 23:53, Doug Ambrisko ambri...@ambrisko.com wrote:
 
 It's unfortunate that vimage requires jail.  I want to use vimage but
 not have the security restrictions of a jail.  To do this I patched
 jail to basically let everything through.  It would be nice to be
 able to run jail in an insecure mode which I understand is a contradition.
 I do use the jail infrastructure to set the uname*/getosreldate so
 that a specific jail thinks it is FreeBSD version blah.  Then I can ssh
 into that jail and pkg_add things, make ports etc.  I use this on
 my laptop running current on the base.  My other jails run various
 versions of FreeBSD.  I don't care about security in this case.
 
 vimage was not originally tied to jails. I can't remember why we decided to 
 do that :-)
 
 Leaving the smiley aside for the present, I remember that one - and
 it's closely tied to this discussion.  It was part of this more
 flexible vision of jails that had added features, of which security
 was just one (optional) part.  I thought of them as a more general
 encapsulation framework as needs would arise.

Just for the record, that's the exact same reason I didn't invent yet another
encapsulation mechanism for RCTL - the idea was to use jails when you need
any kind of nested hierarchy.

-- 
If you cut off my head, what would I say?  Me and my head, or me and my body?

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


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

2014-02-09 Thread Andrew Turner
Author: andrew
Date: Sun Feb  9 12:52:39 2014
New Revision: 261651
URL: http://svnweb.freebsd.org/changeset/base/261651

Log:
  Remove the now unused MMU_INIT macro.

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

Modified: head/sys/arm/arm/locore.S
==
--- head/sys/arm/arm/locore.S   Sun Feb  9 08:13:17 2014(r261650)
+++ head/sys/arm/arm/locore.S   Sun Feb  9 12:52:39 2014(r261651)
@@ -277,11 +277,6 @@ build_pagetables:
 
RET
 
-#define MMU_INIT(va,pa,n_sec,attr) \
-   .word   n_sec   ; \
-   .word   4*((va)L1_S_SHIFT); \
-   .word   (pa)|(attr) ;
-
 Lvirtaddr:
.word   KERNVIRTADDR
 Lphysaddr:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261652 - in stable/9/sys: dev/drm2 modules/drm2/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 13:50:08 2014
New Revision: 261652
URL: http://svnweb.freebsd.org/changeset/base/261652

Log:
  MFC r254817:
  
  drm: Import drm_dp_helper.c from Linux 3.8-rc3
  
  While here, update drm_dp_helper.h to better match Linux one.

Added:
  stable/9/sys/dev/drm2/drm_dp_helper.c
 - copied unchanged from r254817, head/sys/dev/drm2/drm_dp_helper.c
Modified:
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/drm_dp_helper.h
  stable/9/sys/modules/drm2/drm2/Makefile
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 12:52:39 2014
(r261651)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 13:50:08 2014
(r261652)
@@ -316,6 +316,9 @@ typedef int8_t s8;
 
 #define DRM_HZ hz
 #define DRM_UDELAY(udelay) DELAY(udelay)
+#define DRM_MDELAY(msecs)  do { int loops = (msecs);   \
+ while (loops--) DELAY(1000);  \
+   } while (0)
 #define DRM_TIME_SLICE (hz/20)  /* Time slice for GLXContexts*/
 
 #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do {  \

Copied: stable/9/sys/dev/drm2/drm_dp_helper.c (from r254817, 
head/sys/dev/drm2/drm_dp_helper.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/sys/dev/drm2/drm_dp_helper.c   Sun Feb  9 13:50:08 2014
(r261652, copy of r254817, head/sys/dev/drm2/drm_dp_helper.c)
@@ -0,0 +1,147 @@
+/*
+ * Copyright © 2009 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided as
+ * is without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include dev/drm2/drmP.h
+#include dev/drm2/drm_dp_helper.h
+
+/**
+ * DOC: dp helpers
+ *
+ * These functions contain some common logic and helpers at various abstraction
+ * levels to deal with Display Port sink devices and related things like DP aux
+ * channel transfers, EDID reading over DP aux channels, decoding certain DPCD
+ * blocks, ...
+ */
+
+static u8 dp_link_status(u8 link_status[DP_LINK_STATUS_SIZE], int r)
+{
+   return link_status[r - DP_LANE0_1_STATUS];
+}
+
+static u8 dp_get_lane_status(u8 link_status[DP_LINK_STATUS_SIZE],
+int lane)
+{
+   int i = DP_LANE0_1_STATUS + (lane  1);
+   int s = (lane  1) * 4;
+   u8 l = dp_link_status(link_status, i);
+   return (l  s)  0xf;
+}
+
+bool drm_dp_channel_eq_ok(u8 link_status[DP_LINK_STATUS_SIZE],
+ int lane_count)
+{
+   u8 lane_align;
+   u8 lane_status;
+   int lane;
+
+   lane_align = dp_link_status(link_status,
+   DP_LANE_ALIGN_STATUS_UPDATED);
+   if ((lane_align  DP_INTERLANE_ALIGN_DONE) == 0)
+   return false;
+   for (lane = 0; lane  lane_count; lane++) {
+   lane_status = dp_get_lane_status(link_status, lane);
+   if ((lane_status  DP_CHANNEL_EQ_BITS) != DP_CHANNEL_EQ_BITS)
+   return false;
+   }
+   return true;
+}
+
+bool drm_dp_clock_recovery_ok(u8 link_status[DP_LINK_STATUS_SIZE],
+ int lane_count)
+{
+   int lane;
+   u8 lane_status;
+
+   for (lane = 0; lane  lane_count; lane++) {
+   lane_status = dp_get_lane_status(link_status, lane);
+   if ((lane_status  DP_LANE_CR_DONE) == 0)
+   return false;
+   }
+   return true;
+}
+
+u8 drm_dp_get_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE],
+int lane)
+{
+   int i = 

svn commit: r261653 - in stable/9/sys/dev/drm2: . i915

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 13:56:37 2014
New Revision: 261653
URL: http://svnweb.freebsd.org/changeset/base/261653

Log:
  MFC r254818:
  
  drm: Move definition of EREMOTEIO to drmP.h
  
  It will be used by both i915 and radeon drivers.
  
  Add ERESTARTSYS definition at the same time.

Modified:
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/i915/intel_dp.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 13:50:08 2014
(r261652)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 13:56:37 2014
(r261653)
@@ -1405,5 +1405,10 @@ do { 
\
 #defineKTR_DRM KTR_DEV
 #defineKTR_DRM_REG KTR_SPARE3
 
+/* Error codes conversion from Linux to FreeBSD. */
+/* XXXKIB what is the right code for EREMOTEIO on FreeBSD? */
+#defineEREMOTEIO   ENXIO
+#defineERESTARTSYS ERESTART
+
 #endif /* __KERNEL__ */
 #endif /* _DRM_P_H_ */

Modified: stable/9/sys/dev/drm2/i915/intel_dp.c
==
--- stable/9/sys/dev/drm2/i915/intel_dp.c   Sun Feb  9 13:50:08 2014
(r261652)
+++ stable/9/sys/dev/drm2/i915/intel_dp.c   Sun Feb  9 13:56:37 2014
(r261653)
@@ -43,9 +43,6 @@ __FBSDID($FreeBSD$);
 
 #define DP_LINK_CONFIGURATION_SIZE 9
 
-/* XXXKIB what is the right code for the FreeBSD ? */
-#define EREMOTEIO  ENXIO
-
 struct intel_dp {
struct intel_encoder base;
uint32_t output_reg;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261654 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 14:02:39 2014
New Revision: 261654
URL: http://svnweb.freebsd.org/changeset/base/261654

Log:
  MFC r254819:
  
  drm: Don't delete already deleted iicbus child from drm_iic_dp_aux
  
  The iic_dp_aux_detach callback is therefore useless: it's replaced by
  bus_generic_detach. This fixes a General protection fault panic during
  second (incorrect) deletion of the child.
  
  Tested by:kwm@
  Reviewed by:  ray@

Modified:
  stable/9/sys/dev/drm2/drm_dp_iic_helper.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_dp_iic_helper.c
==
--- stable/9/sys/dev/drm2/drm_dp_iic_helper.c   Sun Feb  9 13:56:37 2014
(r261653)
+++ stable/9/sys/dev/drm2/drm_dp_iic_helper.c   Sun Feb  9 14:02:39 2014
(r261654)
@@ -216,22 +216,6 @@ iic_dp_aux_attach(device_t idev)
return (0);
 }
 
-static int
-iic_dp_aux_detach(device_t idev)
-{
-   struct iic_dp_aux_data *aux_data;
-   device_t port;
-
-   aux_data = device_get_softc(idev);
-
-   port = aux_data-port;
-   bus_generic_detach(idev);
-   if (port != NULL)
-   device_delete_child(idev, port);
-
-   return (0);
-}
-
 int
 iic_dp_aux_add_bus(device_t dev, const char *name,
 int (*ch)(device_t idev, int mode, uint8_t write_byte, uint8_t *read_byte),
@@ -277,7 +261,7 @@ iic_dp_aux_add_bus(device_t dev, const c
 static device_method_t drm_iic_dp_aux_methods[] = {
DEVMETHOD(device_probe, iic_dp_aux_probe),
DEVMETHOD(device_attach,iic_dp_aux_attach),
-   DEVMETHOD(device_detach,iic_dp_aux_detach),
+   DEVMETHOD(device_detach,bus_generic_detach),
DEVMETHOD(iicbus_reset, iic_dp_aux_reset),
DEVMETHOD(iicbus_transfer,  iic_dp_aux_xfer),
DEVMETHOD_END
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261655 - in head/sbin: growfs newfs

2014-02-09 Thread Christian Brueffer
Author: brueffer
Date: Sun Feb  9 14:28:47 2014
New Revision: 261655
URL: http://svnweb.freebsd.org/changeset/base/261655

Log:
  Refer newfs and growfs users to fsck_ffs instead of
  fsck, the latter does not accept the referred to -b flag.
  
  This change was accidently committed directly to 9-STABLE in
  r237505.
  
  PR:   82720
  Submitted by: David D.W. Downey
  MFC after:1 week

Modified:
  head/sbin/growfs/growfs.c
  head/sbin/newfs/mkfs.c

Modified: head/sbin/growfs/growfs.c
==
--- head/sbin/growfs/growfs.c   Sun Feb  9 14:02:39 2014(r261654)
+++ head/sbin/growfs/growfs.c   Sun Feb  9 14:28:47 2014(r261655)
@@ -201,7 +201,7 @@ growfs(int fsi, int fso, unsigned int Nf
 * Now build the cylinders group blocks and
 * then print out indices of cylinder groups.
 */
-   printf(super-block backups (for fsck -b #) at:\n);
+   printf(super-block backups (for fsck_ffs -b #) at:\n);
i = 0;
width = charsperline();
 

Modified: head/sbin/newfs/mkfs.c
==
--- head/sbin/newfs/mkfs.c  Sun Feb  9 14:02:39 2014(r261654)
+++ head/sbin/newfs/mkfs.c  Sun Feb  9 14:28:47 2014(r261655)
@@ -544,7 +544,7 @@ restart:
 * Now build the cylinders group blocks and
 * then print out indices of cylinder groups.
 */
-   printf(super-block backups (for fsck -b #) at:\n);
+   printf(super-block backups (for fsck_ffs -b #) at:\n);
i = 0;
width = charsperline();
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261656 - in head/sys/arm: arm include

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 14:35:44 2014
New Revision: 261656
URL: http://svnweb.freebsd.org/changeset/base/261656

Log:
  Use vm_paddr_t, not vm_offset_t, when dealing with physical addresses.
  
  Pointed out by:   alc

Modified:
  head/sys/arm/arm/physmem.c
  head/sys/arm/include/physmem.h

Modified: head/sys/arm/arm/physmem.c
==
--- head/sys/arm/arm/physmem.c  Sun Feb  9 14:28:47 2014(r261655)
+++ head/sys/arm/arm/physmem.c  Sun Feb  9 14:35:44 2014(r261656)
@@ -49,7 +49,7 @@ __FBSDID($FreeBSD$);
 #defineMAX_EXCNT   10
 
 struct region {
-   vm_offset_t addr;
+   vm_paddr_t  addr;
vm_size_t   size;
uint32_tflags;
 };
@@ -90,7 +90,7 @@ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES 
 long realmem;
 
 /* The address at which the kernel was loaded.  Set early in initarm(). */
-vm_offset_t arm_physmem_kernaddr;
+vm_paddr_t arm_physmem_kernaddr;
 
 /*
  * Print the contents of the physical and excluded region tables using the
@@ -227,7 +227,7 @@ regions_to_avail(vm_paddr_t *avail, uint
  * Insertion-sort a new entry into a regions list; sorted by start address.
  */
 static void
-insert_region(struct region *regions, size_t rcnt, vm_offset_t addr,
+insert_region(struct region *regions, size_t rcnt, vm_paddr_t addr,
 vm_size_t size, uint32_t flags)
 {
size_t i;
@@ -249,7 +249,7 @@ insert_region(struct region *regions, si
  * Add a hardware memory region.
  */
 void
-arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz)
+arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz)
 {
vm_offset_t adj;
 
@@ -277,7 +277,7 @@ arm_physmem_hardware_region(vm_offset_t 
 /*
  * Add an exclusion region.
  */
-void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t exflags)
+void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags)
 {
vm_offset_t adj;
 

Modified: head/sys/arm/include/physmem.h
==
--- head/sys/arm/include/physmem.h  Sun Feb  9 14:28:47 2014
(r261655)
+++ head/sys/arm/include/physmem.h  Sun Feb  9 14:35:44 2014
(r261656)
@@ -32,7 +32,7 @@
 /*
  * The physical address at which the kernel was loaded.
  */
-extern vm_offset_t arm_physmem_kernaddr;
+extern vm_paddr_t arm_physmem_kernaddr;
 
 /*
  * Routines to help configure physical ram.
@@ -52,8 +52,8 @@ extern vm_offset_t arm_physmem_kernaddr;
 #defineEXFLAG_NODUMP   0x01
 #defineEXFLAG_NOALLOC  0x02
 
-void arm_physmem_hardware_region(vm_offset_t pa, vm_size_t sz);
-void arm_physmem_exclude_region(vm_offset_t pa, vm_size_t sz, uint32_t flags);
+void arm_physmem_hardware_region(vm_paddr_t pa, vm_size_t sz);
+void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags);
 void arm_physmem_init_kernel_globals(void);
 void arm_physmem_print_tables(void);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261657 - in head/sys/arm: arm at91 sa11x0

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 14:46:50 2014
New Revision: 261657
URL: http://svnweb.freebsd.org/changeset/base/261657

Log:
  No need to set physmem in each initarm() instance anymore, it's handled
  in common code now.

Modified:
  head/sys/arm/arm/machdep.c
  head/sys/arm/at91/at91_machdep.c
  head/sys/arm/sa11x0/assabet_machdep.c

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Sun Feb  9 14:35:44 2014(r261656)
+++ head/sys/arm/arm/machdep.c  Sun Feb  9 14:46:50 2014(r261657)
@@ -1215,8 +1215,6 @@ initarm(struct arm_boot_params *abp)
 
cninit();
 
-   physmem = memsize / PAGE_SIZE;
-
debugf(initarm: console initialized\n);
debugf( arg1 kmdp = 0x%08x\n, (uint32_t)kmdp);
debugf( boothowto = 0x%08x\n, boothowto);

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cSun Feb  9 14:35:44 2014
(r261656)
+++ head/sys/arm/at91/at91_machdep.cSun Feb  9 14:46:50 2014
(r261657)
@@ -590,7 +590,6 @@ initarm(struct arm_boot_params *abp)
printf(Warning: No soc support for %s found.\n, 
soc_info.name);
 
memsize = board_init();
-   physmem = memsize / PAGE_SIZE;
 
/*
 * Pages were allocated during the secondary bootstrap for the

Modified: head/sys/arm/sa11x0/assabet_machdep.c
==
--- head/sys/arm/sa11x0/assabet_machdep.c   Sun Feb  9 14:35:44 2014
(r261656)
+++ head/sys/arm/sa11x0/assabet_machdep.c   Sun Feb  9 14:46:50 2014
(r261657)
@@ -205,7 +205,6 @@ initarm(struct arm_boot_params *abp)
arm_physmem_kernaddr = abp-abp_physaddr;
cninit();
set_cpufuncs();
-   physmem = memsize / PAGE_SIZE;
pcpu0_init();
 
/* Do basic tuning, hz etc */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261658 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 14:58:47 2014
New Revision: 261658
URL: http://svnweb.freebsd.org/changeset/base/261658

Log:
  MFC r254820:
  
  drm: Use driver-provided use_msi callback to determine if MSI is blacklisted
  
  For now, keep the static array for i915. But eventually, it should be
  moved to a callback in the driver itself.

Modified:
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/drm_drv.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 14:46:50 2014
(r261657)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 14:58:47 2014
(r261658)
@@ -697,6 +697,7 @@ struct drm_gem_object {
 
 struct drm_driver_info {
int (*load)(struct drm_device *, unsigned long flags);
+   int (*use_msi)(struct drm_device *, unsigned long flags);
int (*firstopen)(struct drm_device *);
int (*open)(struct drm_device *, struct drm_file *);
void(*preclose)(struct drm_device *, struct drm_file *file_priv);
@@ -828,8 +829,10 @@ struct drm_device {
struct drm_driver_info *driver;
drm_pci_id_list_t *id_entry;/* PCI ID, name, and chipset private */
 
-   u_int16_t pci_device;   /* PCI device id */
-   u_int16_t pci_vendor;   /* PCI vendor id */
+   uint16_t pci_device;/* PCI device id */
+   uint16_t pci_vendor;/* PCI vendor id */
+   uint16_t pci_subdevice; /* PCI subsystem device id */
+   uint16_t pci_subvendor; /* PCI subsystem vendor id */
 
char  *unique;  /* Unique identifier: e.g., busid  */
int   unique_len;   /* Length of unique field  */

Modified: stable/9/sys/dev/drm2/drm_drv.c
==
--- stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 14:46:50 2014
(r261657)
+++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 14:58:47 2014
(r261658)
@@ -207,13 +207,22 @@ static struct drm_msi_blacklist_entry dr
{0, 0}
 };
 
-static int drm_msi_is_blacklisted(int vendor, int device)
+static int drm_msi_is_blacklisted(struct drm_device *dev, unsigned long flags)
 {
int i = 0;
 
+   if (dev-driver-use_msi != NULL) {
+   int use_msi;
+
+   use_msi = dev-driver-use_msi(dev, flags);
+
+   return (!use_msi);
+   }
+
+   /* TODO: Maybe move this to a callback in i915? */
for (i = 0; drm_msi_blacklist[i].vendor != 0; i++) {
-   if ((drm_msi_blacklist[i].vendor == vendor) 
-   (drm_msi_blacklist[i].device == device)) {
+   if ((drm_msi_blacklist[i].vendor == dev-pci_vendor) 
+   (drm_msi_blacklist[i].device == dev-pci_device)) {
return 1;
}
}
@@ -262,10 +271,16 @@ int drm_attach(device_t kdev, drm_pci_id
 
dev-pci_vendor = pci_get_vendor(dev-device);
dev-pci_device = pci_get_device(dev-device);
+   dev-pci_subvendor = pci_get_subvendor(dev-device);
+   dev-pci_subdevice = pci_get_subdevice(dev-device);
+
+   id_entry = drm_find_description(dev-pci_vendor,
+   dev-pci_device, idlist);
+   dev-id_entry = id_entry;
 
if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) {
if (drm_msi 
-   !drm_msi_is_blacklisted(dev-pci_vendor, dev-pci_device)) {
+   !drm_msi_is_blacklisted(dev, 
dev-id_entry-driver_private)) {
msicount = pci_msi_count(dev-device);
DRM_DEBUG(MSI count = %d\n, msicount);
if (msicount  1)
@@ -295,10 +310,6 @@ int drm_attach(device_t kdev, drm_pci_id
mtx_init(dev-event_lock, drmev, NULL, MTX_DEF);
sx_init(dev-dev_struct_lock, drmslk);
 
-   id_entry = drm_find_description(dev-pci_vendor,
-   dev-pci_device, idlist);
-   dev-id_entry = id_entry;
-
error = drm_load(dev);
if (error == 0)
error = drm_create_cdevs(kdev);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261659 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 15:17:57 2014
New Revision: 261659
URL: http://svnweb.freebsd.org/changeset/base/261659

Log:
  MFC r254821:
  
  drm: Fix cleanup if device initialization fails
  
  This plugs some memory leaks.

Modified:
  stable/9/sys/dev/drm2/drm_drv.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_drv.c
==
--- stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 14:58:47 2014
(r261658)
+++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 15:17:57 2014
(r261659)
@@ -311,8 +311,22 @@ int drm_attach(device_t kdev, drm_pci_id
sx_init(dev-dev_struct_lock, drmslk);
 
error = drm_load(dev);
-   if (error == 0)
-   error = drm_create_cdevs(kdev);
+   if (error)
+   goto error;
+
+   error = drm_create_cdevs(kdev);
+   if (error)
+   goto error;
+
+   return (error);
+error:
+   if (dev-irqr) {
+   bus_release_resource(dev-device, SYS_RES_IRQ,
+   dev-irqrid, dev-irqr);
+   }
+   if (dev-msi_enabled) {
+   pci_release_msi(dev-device);
+   }
return (error);
 }
 
@@ -570,7 +584,7 @@ static int drm_load(struct drm_device *d
DRM_ERROR(Request to enable bus-master failed.\n);
DRM_UNLOCK(dev);
if (retcode != 0)
-   goto error;
+   goto error1;
}
 
DRM_INFO(Initialized %s %d.%d.%d %s\n,
@@ -584,7 +598,9 @@ static int drm_load(struct drm_device *d
 
 error1:
delete_unrhdr(dev-drw_unrhdr);
+   drm_gem_destroy(dev);
 error:
+   drm_ctxbitmap_cleanup(dev);
drm_sysctl_cleanup(dev);
DRM_LOCK(dev);
drm_lastclose(dev);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261660 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 15:27:26 2014
New Revision: 261660
URL: http://svnweb.freebsd.org/changeset/base/261660

Log:
  MFC r254833:
  
  drm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a
  
  Author: Shirish S s.shir...@samsung.com
  Date:   Thu Aug 30 07:04:06 2012 +
  
  drm: edid: add support for E-DDC
  
  The current logic for probing ddc is limited to
  2 blocks (256 bytes), this patch adds support
  for the 4 block (512) data.
  
  To do this, a single 8-bit segment index is
  passed to the display via the I2C address 30h.
  Data from the selected segment is then immediately
  read via the regular DDC2 address using a repeated
  I2C 'START' signal.
  
  Signed-off-by: Shirish S s.shir...@samsung.com
  Reviewed-by: Jean Delvare jdelv...@suse.de
  Reviewed-by: Daniel Vetter daniel.vet...@ffwll.ch
  Reviewed-by: Ville Syrjala ville.syrj...@linux.intel.com
  Signed-off-by: Dave Airlie airl...@redhat.com

Modified:
  stable/9/sys/dev/drm2/drm_edid.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_edid.c
==
--- stable/9/sys/dev/drm2/drm_edid.cSun Feb  9 15:17:57 2014
(r261659)
+++ stable/9/sys/dev/drm2/drm_edid.cSun Feb  9 15:27:26 2014
(r261660)
@@ -253,6 +253,8 @@ drm_do_probe_ddc_edid(device_t adapter, 
  int block, int len)
 {
unsigned char start = block * EDID_LENGTH;
+   unsigned char segment = block  1;
+   unsigned char xfers = segment ? 3 : 2;
int ret, retries = 5;
 
/* The core i2c driver will automatically retry the transfer if the
@@ -264,6 +266,11 @@ drm_do_probe_ddc_edid(device_t adapter, 
do {
struct iic_msg msgs[] = {
{
+   .slave  = DDC_SEGMENT_ADDR  1,
+   .flags  = 0,
+   .len= 1,
+   .buf= segment,
+   }, {
.slave  = DDC_ADDR  1,
.flags  = IIC_M_WR,
.len= 1,
@@ -275,7 +282,13 @@ drm_do_probe_ddc_edid(device_t adapter, 
.buf= buf,
}
};
-   ret = iicbus_transfer(adapter, msgs, 2);
+
+   /*
+* Avoid sending the segment addr to not upset non-compliant ddc
+* monitors.
+*/
+   ret = iicbus_transfer(adapter, msgs[3 - xfers], xfers);
+
if (ret != 0)
DRM_DEBUG_KMS(iicbus_transfer countdown %d error %d\n,
retries, ret);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261661 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 15:34:38 2014
New Revision: 261661
URL: http://svnweb.freebsd.org/changeset/base/261661

Log:
  MFC r254835:
  
  drm: Fix typo in KASSERT message: s/Dandling/Dangling/

Modified:
  stable/9/sys/dev/drm2/drm_gem.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_gem.c
==
--- stable/9/sys/dev/drm2/drm_gem.c Sun Feb  9 15:27:26 2014
(r261660)
+++ stable/9/sys/dev/drm2/drm_gem.c Sun Feb  9 15:34:38 2014
(r261661)
@@ -163,7 +163,7 @@ void
 drm_gem_object_reference(struct drm_gem_object *obj)
 {
 
-   KASSERT(obj-refcount  0, (Dandling obj %p, obj));
+   KASSERT(obj-refcount  0, (Dangling obj %p, obj));
refcount_acquire(obj-refcount);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261662 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 15:48:49 2014
New Revision: 261662
URL: http://svnweb.freebsd.org/changeset/base/261662

Log:
  MFC r254836, r254837:
  
  drm: Support gem_open_object() and gem_close_object() callbacks
  
  ... in struct drm_driver_info.

Modified:
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/drm_gem.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 15:34:38 2014
(r261661)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 15:48:49 2014
(r261662)
@@ -736,6 +736,8 @@ struct drm_driver_info {
 
int (*gem_init_object)(struct drm_gem_object *obj);
void(*gem_free_object)(struct drm_gem_object *obj);
+   int (*gem_open_object)(struct drm_gem_object *, struct drm_file *);
+   void(*gem_close_object)(struct drm_gem_object *, struct drm_file *);
 
struct cdev_pager_ops *gem_pager_ops;
 

Modified: stable/9/sys/dev/drm2/drm_gem.c
==
--- stable/9/sys/dev/drm2/drm_gem.c Sun Feb  9 15:34:38 2014
(r261661)
+++ stable/9/sys/dev/drm2/drm_gem.c Sun Feb  9 15:48:49 2014
(r261662)
@@ -242,24 +242,40 @@ int
 drm_gem_handle_create(struct drm_file *file_priv, struct drm_gem_object *obj,
 uint32_t *handle)
 {
-   int error;
+   struct drm_device *dev = obj-dev;
+   int ret;
 
-   error = drm_gem_name_create(file_priv-object_names, obj, handle);
-   if (error != 0)
-   return (error);
+   ret = drm_gem_name_create(file_priv-object_names, obj, handle);
+   if (ret != 0)
+   return (ret);
drm_gem_object_handle_reference(obj);
+
+   if (dev-driver-gem_open_object) {
+   ret = dev-driver-gem_open_object(obj, file_priv);
+   if (ret) {
+   drm_gem_handle_delete(file_priv, *handle);
+   return ret;
+   }
+   }
+
return (0);
 }
 
 int
 drm_gem_handle_delete(struct drm_file *file_priv, uint32_t handle)
 {
+   struct drm_device *dev;
struct drm_gem_object *obj;
 
obj = drm_gem_names_remove(file_priv-object_names, handle);
if (obj == NULL)
return (EINVAL);
+
+   dev = obj-dev;
+   if (dev-driver-gem_close_object)
+   dev-driver-gem_close_object(obj, file_priv);
drm_gem_object_handle_unreference_unlocked(obj);
+
return (0);
 }
 
@@ -312,9 +328,17 @@ drm_gem_open(struct drm_device *dev, str
 static int
 drm_gem_object_release_handle(uint32_t name, void *ptr, void *arg)
 {
+   struct drm_file *file_priv;
struct drm_gem_object *obj;
+   struct drm_device *dev;
 
+   file_priv = arg;
obj = ptr;
+   dev = obj-dev;
+
+   if (dev-driver-gem_close_object)
+   dev-driver-gem_close_object(obj, file_priv);
+
drm_gem_object_handle_unreference(obj);
return (0);
 }
@@ -324,7 +348,7 @@ drm_gem_release(struct drm_device *dev, 
 {
 
drm_gem_names_foreach(file_priv-object_names,
-   drm_gem_object_release_handle, NULL);
+   drm_gem_object_release_handle, file_priv);
drm_gem_names_fini(file_priv-object_names);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261663 - in head/sys/arm: arm include

2014-02-09 Thread Andrew Turner
Author: andrew
Date: Sun Feb  9 15:54:31 2014
New Revision: 261663
URL: http://svnweb.freebsd.org/changeset/base/261663

Log:
  Pass the pagetable used from locore.S to initarm to allow it to map data
  in as required.

Modified:
  head/sys/arm/arm/locore.S
  head/sys/arm/include/cpu.h

Modified: head/sys/arm/arm/locore.S
==
--- head/sys/arm/arm/locore.S   Sun Feb  9 15:48:49 2014(r261662)
+++ head/sys/arm/arm/locore.S   Sun Feb  9 15:54:31 2014(r261663)
@@ -221,7 +221,7 @@ mmu_done:
ldr pc, .Lvirt_done
 
 virt_done:
-   mov r1, #24 /* loader info size is 24 bytes also 
second arg */
+   mov r1, #28 /* loader info size is 28 bytes also 
second arg */
subssp, sp, r1  /* allocate arm_boot_params struct on 
stack */
bic sp, sp, #7  /* align stack to 8 bytes */
mov r0, sp  /* loader info pointer is first arg */
@@ -232,6 +232,8 @@ virt_done:
str fp, [r0, #16]   /* store r3 from boot loader */
ldr r5, =KERNPHYSADDR   /* load KERNPHYSADDR as the physical 
address */
str r5, [r0, #20]   /* store the physical address */
+   ldr r5, Lstartup_pagetable
+   str r5, [r0, #24]   /* store the pagetable address */
mov fp, #0  /* trace back starts here */
bl  _C_LABEL(initarm)   /* Off we go */
 

Modified: head/sys/arm/include/cpu.h
==
--- head/sys/arm/include/cpu.h  Sun Feb  9 15:48:49 2014(r261662)
+++ head/sys/arm/include/cpu.h  Sun Feb  9 15:54:31 2014(r261663)
@@ -35,6 +35,11 @@ get_cyclecount(void)
 
 extern vm_offset_t vector_page;
 
+/*
+ * Params passed into initarm. If you change the size of this you will
+ * need to update locore.S to allocate more memory on the stack before
+ * it calls initarm.
+ */
 struct arm_boot_params {
register_t  abp_size;   /* Size of this structure */
register_t  abp_r0; /* r0 from the boot loader */
@@ -42,6 +47,7 @@ struct arm_boot_params {
register_t  abp_r2; /* r2 from the boot loader */
register_t  abp_r3; /* r3 from the boot loader */
vm_offset_t abp_physaddr;   /* The kernel physical address */
+   vm_offset_t abp_pagetable;  /* The early page table */
 };
 
 void   arm_vector_init(vm_offset_t, int);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261664 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 15:56:15 2014
New Revision: 261664
URL: http://svnweb.freebsd.org/changeset/base/261664

Log:
  MFC r254838:
  
  drm: In drm_gem_name_create(), verify argument before acquiring lock
  
  Submitted by: J.R. Oldroyd j...@opal.com

Modified:
  stable/9/sys/dev/drm2/drm_gem_names.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_gem_names.c
==
--- stable/9/sys/dev/drm2/drm_gem_names.c   Sun Feb  9 15:54:31 2014
(r261663)
+++ stable/9/sys/dev/drm2/drm_gem_names.c   Sun Feb  9 15:56:15 2014
(r261664)
@@ -132,12 +132,12 @@ drm_gem_name_create(struct drm_gem_names
 {
struct drm_gem_name *np;
 
-   np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK);
-   mtx_lock(names-lock);
if (*name != 0) {
-   mtx_unlock(names-lock);
return (EALREADY);
}
+
+   np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK);
+   mtx_lock(names-lock);
np-name = alloc_unr(names-unr);
if (np-name == -1) {
mtx_unlock(names-lock);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261665 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 16:01:18 2014
New Revision: 261665
URL: http://svnweb.freebsd.org/changeset/base/261665

Log:
  MFC r254840:
  
  drm: Use DRM_IF_MAJOR  DRM_IF_MINOR from drm_core.h

Modified:
  stable/9/sys/dev/drm2/drm_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_ioctl.c
==
--- stable/9/sys/dev/drm2/drm_ioctl.c   Sun Feb  9 15:56:15 2014
(r261664)
+++ stable/9/sys/dev/drm2/drm_ioctl.c   Sun Feb  9 16:01:18 2014
(r261665)
@@ -37,6 +37,7 @@ __FBSDID($FreeBSD$);
  */
 
 #include dev/drm2/drmP.h
+#include dev/drm2/drm_core.h
 
 /*
  * Beginning in revision 1.1 of the DRM interface, getunique will return
@@ -255,10 +256,6 @@ int drm_getcap(struct drm_device *dev, v
return 0;
 }
 
-
-#define DRM_IF_MAJOR   1
-#define DRM_IF_MINOR   2
-
 int drm_setversion(struct drm_device *dev, void *data,
   struct drm_file *file_priv)
 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261666 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 16:07:24 2014
New Revision: 261666
URL: http://svnweb.freebsd.org/changeset/base/261666

Log:
  MFC r254841:
  
  drm: Import list_for_each_entry_safe_from() macro

Modified:
  stable/9/sys/dev/drm2/drm_linux_list.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_linux_list.h
==
--- stable/9/sys/dev/drm2/drm_linux_list.h  Sun Feb  9 16:01:18 2014
(r261665)
+++ stable/9/sys/dev/drm2/drm_linux_list.h  Sun Feb  9 16:07:24 2014
(r261666)
@@ -144,6 +144,11 @@ list_del_init(struct list_head *entry) {
pos-member != (head); \
pos = n, n = list_entry(n-member.next, __typeof(*n), member))
 
+#define list_for_each_entry_safe_from(pos, n, head, member)
\
+   for (n = list_entry(pos-member.next, __typeof(*pos), member);  
\
+pos-member != (head);
\
+pos = n, n = list_entry(n-member.next, __typeof(*n), member))
+
 #define list_first_entry(ptr, type, member) \
list_entry((ptr)-next, type, member)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261667 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 16:16:24 2014
New Revision: 261667
URL: http://svnweb.freebsd.org/changeset/base/261667

Log:
  MFC r254848, r258930:
  
  drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c
  
  This comes with several PCI_VENDOR_ID_* defines which should go in a
  more central place.

Modified:
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/drm_pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 16:07:24 2014
(r261666)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 16:16:24 2014
(r261667)
@@ -1415,5 +1415,22 @@ do { 
\
 #defineEREMOTEIO   ENXIO
 #defineERESTARTSYS ERESTART
 
+#definePCI_VENDOR_ID_APPLE 0x106b
+#definePCI_VENDOR_ID_ASUSTEK   0x1043
+#definePCI_VENDOR_ID_ATI   0x1002
+#definePCI_VENDOR_ID_DELL  0x1028
+#definePCI_VENDOR_ID_HP0x103c
+#definePCI_VENDOR_ID_IBM   0x1014
+#definePCI_VENDOR_ID_INTEL 0x8086
+#definePCI_VENDOR_ID_SERVERWORKS   0x1166
+#definePCI_VENDOR_ID_SONY  0x104d
+#definePCI_VENDOR_ID_VIA   0x1106
+
+#define DRM_PCIE_SPEED_25 1
+#define DRM_PCIE_SPEED_50 2
+#define DRM_PCIE_SPEED_80 4
+
+extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 
*speed_mask);
+
 #endif /* __KERNEL__ */
 #endif /* _DRM_P_H_ */

Modified: stable/9/sys/dev/drm2/drm_pci.c
==
--- stable/9/sys/dev/drm2/drm_pci.c Sun Feb  9 16:07:24 2014
(r261666)
+++ stable/9/sys/dev/drm2/drm_pci.c Sun Feb  9 16:16:24 2014
(r261667)
@@ -123,3 +123,57 @@ drm_pci_free(struct drm_device *dev, drm
 }
 
 /*@}*/
+
+int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
+{
+   device_t root;
+   int pos;
+   u32 lnkcap = 0, lnkcap2 = 0;
+
+   *mask = 0;
+   if (!drm_device_is_pcie(dev))
+   return -EINVAL;
+
+   root =
+   device_get_parent( /* pcib */
+   device_get_parent( /* `-- pci  */
+   device_get_parent( /* `-- vgapci   */
+   dev-device)));/* `-- drmn */
+
+   pos = 0;
+   pci_find_cap(root, PCIY_EXPRESS, pos);
+   if (!pos)
+   return -EINVAL;
+
+   /* we've been informed via and serverworks don't make the cut */
+   if (pci_get_vendor(root) == PCI_VENDOR_ID_VIA ||
+   pci_get_vendor(root) == PCI_VENDOR_ID_SERVERWORKS)
+   return -EINVAL;
+
+   lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4);
+   lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4);
+
+   lnkcap = PCIEM_LINK_CAP_MAX_SPEED;
+   lnkcap2 = 0xfe;
+
+#definePCI_EXP_LNKCAP2_SLS_2_5GB 0x02  /* Supported Link Speed 2.5GT/s 
*/
+#definePCI_EXP_LNKCAP2_SLS_5_0GB 0x04  /* Supported Link Speed 5.0GT/s 
*/
+#definePCI_EXP_LNKCAP2_SLS_8_0GB 0x08  /* Supported Link Speed 8.0GT/s 
*/
+
+   if (lnkcap2) { /* PCIE GEN 3.0 */
+   if (lnkcap2  PCI_EXP_LNKCAP2_SLS_2_5GB)
+   *mask |= DRM_PCIE_SPEED_25;
+   if (lnkcap2  PCI_EXP_LNKCAP2_SLS_5_0GB)
+   *mask |= DRM_PCIE_SPEED_50;
+   if (lnkcap2  PCI_EXP_LNKCAP2_SLS_8_0GB)
+   *mask |= DRM_PCIE_SPEED_80;
+   } else {
+   if (lnkcap  1)
+   *mask |= DRM_PCIE_SPEED_25;
+   if (lnkcap  2)
+   *mask |= DRM_PCIE_SPEED_50;
+   }
+
+   DRM_INFO(probing gen 2 caps for device %x:%x = %x/%x\n, 
pci_get_vendor(root), pci_get_device(root), lnkcap, lnkcap2);
+   return 0;
+}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261668 - head/lib/libstand

2014-02-09 Thread Ed Maste
Author: emaste
Date: Sun Feb  9 16:37:17 2014
New Revision: 261668
URL: http://svnweb.freebsd.org/changeset/base/261668

Log:
  Build libstand as a 64-bit library on ppc64
  
  The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32,
  so there is no need to force /usr/lib/libstand.a to be 32-bit.
  
  This is equivalent to r261568 for amd64.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/lib/libstand/Makefile
  head/lib/libstand/libstand.3

Modified: head/lib/libstand/Makefile
==
--- head/lib/libstand/Makefile  Sun Feb  9 16:16:24 2014(r261667)
+++ head/lib/libstand/Makefile  Sun Feb  9 16:37:17 2014(r261668)
@@ -35,9 +35,6 @@ CFLAGS+=  -Os
 .if ${MACHINE_CPUARCH} == powerpc
 CFLAGS+=   -msoft-float -D_STANDALONE -DNETIF_DEBUG
 .endif
-.if ${MACHINE_ARCH} == powerpc64
-CFLAGS+=   -m32 -I.
-.endif
 .if ${MACHINE_CPUARCH} == arm
 CFLAGS+=   -msoft-float -D_STANDALONE
 .endif

Modified: head/lib/libstand/libstand.3
==
--- head/lib/libstand/libstand.3Sun Feb  9 16:16:24 2014
(r261667)
+++ head/lib/libstand/libstand.3Sun Feb  9 16:37:17 2014
(r261668)
@@ -674,7 +674,3 @@ the environment functions and this manpa
 .An Mike Smith Aq msm...@freebsd.org .
 .Sh BUGS
 The lack of detailed memory usage data is unhelpful.
-.Pp
-On the powerpc64 architecture
-.Nm
-is a 32-bit library.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261669 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 16:38:58 2014
New Revision: 261669
URL: http://svnweb.freebsd.org/changeset/base/261669

Log:
  MFC r254853:
  
  drm: Import drm_fixed.h from Linux 3.8

Added:
  stable/9/sys/dev/drm2/drm_fixed.h
 - copied unchanged from r254853, head/sys/dev/drm2/drm_fixed.h
Modified:
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Copied: stable/9/sys/dev/drm2/drm_fixed.h (from r254853, 
head/sys/dev/drm2/drm_fixed.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/sys/dev/drm2/drm_fixed.h   Sun Feb  9 16:38:58 2014
(r261669, copy of r254853, head/sys/dev/drm2/drm_fixed.h)
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2009 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Dave Airlie
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#ifndef DRM_FIXED_H
+#define DRM_FIXED_H
+
+typedef union dfixed {
+   u32 full;
+} fixed20_12;
+
+
+#define dfixed_const(A) (u32)(((A)  12))/*  + ((B + 0.000122)*4096)) */
+#define dfixed_const_half(A) (u32)(((A)  12) + 2048)
+#define dfixed_const_666(A) (u32)(((A)  12) + 2731)
+#define dfixed_const_8(A) (u32)(((A)  12) + 3277)
+#define dfixed_mul(A, B) ((u64)((u64)(A).full * (B).full + 2048)  12)
+#define dfixed_init(A) { .full = dfixed_const((A)) }
+#define dfixed_init_half(A) { .full = dfixed_const_half((A)) }
+#define dfixed_trunc(A) ((A).full  12)
+#define dfixed_frac(A) ((A).full  ((1  12) - 1))
+
+static inline u32 dfixed_floor(fixed20_12 A)
+{
+   u32 non_frac = dfixed_trunc(A);
+
+   return dfixed_const(non_frac);
+}
+
+static inline u32 dfixed_ceil(fixed20_12 A)
+{
+   u32 non_frac = dfixed_trunc(A);
+
+   if (A.full  dfixed_const(non_frac))
+   return dfixed_const(non_frac + 1);
+   else
+   return dfixed_const(non_frac);
+}
+
+static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
+{
+   u64 tmp = ((u64)A.full  13);
+
+   do_div(tmp, B.full);
+   tmp += 1;
+   tmp /= 2;
+   return lower_32_bits(tmp);
+}
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261673 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 19:54:39 2014
New Revision: 261673
URL: http://svnweb.freebsd.org/changeset/base/261673

Log:
  MFC r258262:
  
  drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability
  
  This fixes DPMS with KDE and radeonkms. Without this, the display would
  freeze when the monitor is put into sleep state, and only resumes after
  several dozens of minutes once the monitor is powered on again.
  
  Tested by:Mathias Picker mathias.pic...@virtual-earth.de

Modified:
  stable/9/sys/dev/drm2/drm.h
  stable/9/sys/dev/drm2/drmP.h
  stable/9/sys/dev/drm2/drm_drv.c
  stable/9/sys/dev/drm2/drm_ioctl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm.h
==
--- stable/9/sys/dev/drm2/drm.h Sun Feb  9 19:36:27 2014(r261672)
+++ stable/9/sys/dev/drm2/drm.h Sun Feb  9 19:54:39 2014(r261673)
@@ -1015,6 +1015,8 @@ struct drm_event_vblank {
 #define DRM_CAP_VBLANK_HIGH_CRTC 0x2
 #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
 #define DRM_CAP_DUMB_PREFER_SHADOW 0x4
+#define DRM_CAP_PRIME 0x5
+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
 
 #include drm_mode.h
 

Modified: stable/9/sys/dev/drm2/drmP.h
==
--- stable/9/sys/dev/drm2/drmP.hSun Feb  9 19:36:27 2014
(r261672)
+++ stable/9/sys/dev/drm2/drmP.hSun Feb  9 19:54:39 2014
(r261673)
@@ -1005,6 +1005,7 @@ extern intdrm_debug_flag;
 extern int drm_notyet_flag;
 extern unsigned int drm_vblank_offdelay;
 extern unsigned int drm_timestamp_precision;
+extern unsigned int drm_timestamp_monotonic;
 
 /* Device setup support (drm_drv.c) */
 intdrm_probe(device_t kdev, drm_pci_id_list_t *idlist);

Modified: stable/9/sys/dev/drm2/drm_drv.c
==
--- stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 19:36:27 2014
(r261672)
+++ stable/9/sys/dev/drm2/drm_drv.c Sun Feb  9 19:54:39 2014
(r261673)
@@ -56,6 +56,12 @@ int drm_notyet_flag = 0;
 unsigned int drm_vblank_offdelay = 5000;/* Default to 5000 msecs. */
 unsigned int drm_timestamp_precision = 20;  /* Default to 20 usecs. */
 
+/*
+ * Default to use monotonic timestamps for wait-for-vblank and page-flip
+ * complete events.
+ */
+unsigned int drm_timestamp_monotonic = 1;
+
 static int drm_load(struct drm_device *dev);
 static void drm_unload(struct drm_device *dev);
 static drm_pci_id_list_t *drm_find_description(int vendor, int device,

Modified: stable/9/sys/dev/drm2/drm_ioctl.c
==
--- stable/9/sys/dev/drm2/drm_ioctl.c   Sun Feb  9 19:36:27 2014
(r261672)
+++ stable/9/sys/dev/drm2/drm_ioctl.c   Sun Feb  9 19:54:39 2014
(r261673)
@@ -250,6 +250,9 @@ int drm_getcap(struct drm_device *dev, v
case DRM_CAP_DUMB_PREFER_SHADOW:
req-value = dev-mode_config.prefer_shadow;
break;
+   case DRM_CAP_TIMESTAMP_MONOTONIC:
+   req-value = drm_timestamp_monotonic;
+   break;
default:
return EINVAL;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261674 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 20:08:16 2014
New Revision: 261674
URL: http://svnweb.freebsd.org/changeset/base/261674

Log:
  MFC r258549:
  
  drm: Dereference pointers given to qsort_r()'s cmp callback
  
  drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the
  array passed to qsort_r(), not the elements themselves.
  
  Before this fix, the use of qsort_r() shuffled the array, not sorted it,
  because the compare callback accessed random memory locations, not the
  expected elements.
  
  This bug triggered an infinite loop in KDE/xserver:
  
  1. KDE has a kded module called randrmonitor which queries xserver
 for current monitors at startup and then listens to RandR
 notifications from xserver.
  
  2. xserver handles the query from randrmonitor by polling the
 video device using the drm_mode_getconnector() ioctl. This
 ioctl returns a list of connectors and, for those with a
 connected monitor, the available modes. Each modes list is sorted
 by the kernel before returning. When xserver gets the connectors
 list, it sorts the modes lists again.
  
 In the case of this bug, when two modes are equal (in xserver's
 compare function PoV), their order is kept stable (ie. the
 kernel order is kept for those two modes). And because the list
 was shuffled by the kernel, the order of two equal modes was
 frequently changed in the final modes list in xserver.
  
  3. xserver compares the returned connectors list with the list
 obtained earlier. In particular, it compares the sorted
 modes lists for each connector. If a property of a connector
 changes (eg. modes), xserver sends a RRNotify_OutputChange
 notification.
  
 Because of the change of order between equal modes, xserver sent
 a notification after each polling of the connectors.
  
  4. randrmonitor receives a notification, triggered by its query. The
 notification doesn't contain the new connectors list, therefore, it
 asks for the new list using the same function: go back to step #2.

Modified:
  stable/9/sys/dev/drm2/drm_linux_list_sort.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_linux_list_sort.c
==
--- stable/9/sys/dev/drm2/drm_linux_list_sort.c Sun Feb  9 19:54:39 2014
(r261673)
+++ stable/9/sys/dev/drm2/drm_linux_list_sort.c Sun Feb  9 20:08:16 2014
(r261674)
@@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c
struct drm_list_sort_thunk *thunk;
 
thunk = priv;
-   le1 = __DECONST(struct list_head *, d1);
-   le2 = __DECONST(struct list_head *, d2);
+   le1 = *(__DECONST(struct list_head **, d1));
+   le2 = *(__DECONST(struct list_head **, d2));
return ((thunk-cmp)(thunk-priv, le1, le2));
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261675 - stable/9/sys/dev/drm2

2014-02-09 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Feb  9 20:17:40 2014
New Revision: 261675
URL: http://svnweb.freebsd.org/changeset/base/261675

Log:
  MFC r259717:
  
  drm: Lower priority of EDID checksum is invalid message
  
  The priority goes from error to debug.
  
  Connectors are polled every 10 seconds. Reading EDID is part of this
  polling. However, when an invalid EDID is returned, this error message
  is logged. When using Newcons for instance, having a kernel message
  every 10 seconds is getting annoying.
  
  Now that it's a debug message, it'll be logged only if hw.dri.debug is
  enabled. This fix console spamming for some users.
  
  Tested by:Larry Rosenman l...@lerctr.org

Modified:
  stable/9/sys/dev/drm2/drm_edid.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/drm2/drm_edid.c
==
--- stable/9/sys/dev/drm2/drm_edid.cSun Feb  9 20:08:16 2014
(r261674)
+++ stable/9/sys/dev/drm2/drm_edid.cSun Feb  9 20:17:40 2014
(r261675)
@@ -171,7 +171,7 @@ drm_edid_block_valid(u8 *raw_edid)
for (i = 0; i  EDID_LENGTH; i++)
csum += raw_edid[i];
if (csum) {
-   DRM_ERROR(EDID checksum is invalid, remainder is %d\n, csum);
+   DRM_DEBUG(EDID checksum is invalid, remainder is %d\n, csum);
 
/* allow CEA to slide through, switches mangle this */
if (raw_edid[0] != 0x02)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 20:19:41 2014
New Revision: 261676
URL: http://svnweb.freebsd.org/changeset/base/261676

Log:
  Fix the exclude-region clipping logic for the edge-trim case.

Modified:
  head/sys/arm/arm/physmem.c

Modified: head/sys/arm/arm/physmem.c
==
--- head/sys/arm/arm/physmem.c  Sun Feb  9 20:17:40 2014(r261675)
+++ head/sys/arm/arm/physmem.c  Sun Feb  9 20:19:41 2014(r261676)
@@ -198,14 +198,14 @@ regions_to_avail(vm_paddr_t *avail, uint
continue;
}
/*
-* If excluded region partially overlaps this region,
-* trim the excluded portion off the appropriate end.
+* We know the excluded region overlaps either the start
+* or end of this hardware region (but not both), trim
+* the excluded portion off the appropriate end.
 */
-   if ((xstart = start)  (xstart = end)) {
-   end = xstart;
-   } else if ((xend = start)  (xend = end)) {
+   if (xstart = start)
start = xend;
-   }
+   else
+   end = xstart;
}
/*
 * If the trimming actions above left a non-zero size, create an
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 20:20:49 2014
New Revision: 261677
URL: http://svnweb.freebsd.org/changeset/base/261677

Log:
  Add some extra debugging output when DEBUG is defined.

Modified:
  head/sys/arm/arm/physmem.c

Modified: head/sys/arm/arm/physmem.c
==
--- head/sys/arm/arm/physmem.c  Sun Feb  9 20:19:41 2014(r261676)
+++ head/sys/arm/arm/physmem.c  Sun Feb  9 20:20:49 2014(r261677)
@@ -122,6 +122,16 @@ physmem_dump_tables(int (*prfunc)(const 
(flags  EXFLAG_NOALLOC) ? NoAlloc : ,
(flags  EXFLAG_NODUMP)  ? NoDump : );
}
+
+#ifdef DEBUG
+   prfunc(Avail lists:\n);
+   for (i = 0; phys_avail[i] != 0; ++i) {
+   prfunc(  phys_avail[%d] 0x%08x\n, i, phys_avail[i]);
+   }
+   for (i = 0; dump_avail[i] != 0; ++i) {
+   prfunc(  dump_avail[%d] 0x%08x\n, i, dump_avail[i]);
+   }
+#endif
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261680 - head/contrib/llvm/tools/clang/lib/Sema

2014-02-09 Thread Dimitry Andric
Author: dim
Date: Sun Feb  9 20:52:47 2014
New Revision: 261680
URL: http://svnweb.freebsd.org/changeset/base/261680

Log:
  Pull in r200899 from upstream clang trunk:
  
Allow transformation of VariableArray to ConstantArray.
  
In the following code:
  
   struct A { static const int sz; };
   templateclass T void f() { T arr[A::sz]; }
  
the array 'arr' is represented as a variable size array in the template.
If 'A::sz' gets value below in the translation unit, the array in
instantiation can turn into constant size array.
  
This change fixes PR18633.
  
Differential Revision: http://llvm-reviews.chandlerc.com/D2688
  
  This fixes Assertion failed: (T::isKind(*this)), function castAs
  errors, which can occur when building the security/quantis port.
  
  Reported by:  ale
  MFC after:3 days

Modified:
  head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h

Modified: head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h
==
--- head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h  Sun Feb  9 
20:32:27 2014(r261679)
+++ head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h  Sun Feb  9 
20:52:47 2014(r261680)
@@ -3837,7 +3837,9 @@ TreeTransformDerived::TransformVariabl
   return QualType();
   }
 
-  VariableArrayTypeLoc NewTL = TLB.pushVariableArrayTypeLoc(Result);
+  // We might have constant size array now, but fortunately it has the same
+  // location layout.
+  ArrayTypeLoc NewTL = TLB.pushArrayTypeLoc(Result);
   NewTL.setLBracketLoc(TL.getLBracketLoc());
   NewTL.setRBracketLoc(TL.getRBracketLoc());
   NewTL.setSizeExpr(Size);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261681 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 20:55:49 2014
New Revision: 261681
URL: http://svnweb.freebsd.org/changeset/base/261681

Log:
  Add FDT matching code.

Modified:
  head/sys/arm/at91/at91_mci.c

Modified: head/sys/arm/at91/at91_mci.c
==
--- head/sys/arm/at91/at91_mci.cSun Feb  9 20:52:47 2014
(r261680)
+++ head/sys/arm/at91/at91_mci.cSun Feb  9 20:55:49 2014
(r261681)
@@ -25,6 +25,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -62,6 +64,12 @@ __FBSDID($FreeBSD$);
 #include dev/mmc/mmcreg.h
 #include dev/mmc/mmcbrvar.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #include mmcbr_if.h
 
 #include opt_at91.h
@@ -342,7 +350,10 @@ at91_mci_fini(device_t dev)
 static int
 at91_mci_probe(device_t dev)
 {
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,hsmci))
+   return (ENXIO);
+#endif
device_set_desc(dev, MCI mmc/sd host bridge);
return (0);
 }
@@ -1393,5 +1404,10 @@ static driver_t at91_mci_driver = {
 
 static devclass_t at91_mci_devclass;
 
+#ifdef FDT
+DRIVER_MODULE(at91_mci, simplebus, at91_mci_driver, at91_mci_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL,
 NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261682 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 20:56:39 2014
New Revision: 261682
URL: http://svnweb.freebsd.org/changeset/base/261682

Log:
  Add FDT attachment.

Modified:
  head/sys/arm/at91/at91_pio.c

Modified: head/sys/arm/at91/at91_pio.c
==
--- head/sys/arm/at91/at91_pio.cSun Feb  9 20:55:49 2014
(r261681)
+++ head/sys/arm/at91/at91_pio.cSun Feb  9 20:56:39 2014
(r261682)
@@ -24,6 +24,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -48,6 +50,12 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91_pioreg.h
 #include arm/at91/at91_piovar.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #defineMAX_CHANGE  64
 
 struct at91_pio_softc
@@ -122,7 +130,10 @@ static int
 at91_pio_probe(device_t dev)
 {
const char *name;
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91rm9200-gpio))
+   return (ENXIO);
+#endif
switch (device_get_unit(dev)) {
case 0:
name = PIOA;
@@ -136,6 +147,12 @@ at91_pio_probe(device_t dev)
case 3:
name = PIOD;
break;
+   case 4:
+   name = PIOE;
+   break;
+   case 5:
+   name = PIOF;
+   break;
default:
name = PIO;
break;
@@ -609,5 +626,10 @@ static driver_t at91_pio_driver = {
sizeof(struct at91_pio_softc),
 };
 
+#ifdef FDT
+DRIVER_MODULE(at91_pio, simplebus, at91_pio_driver, at91_pio_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_pio, atmelarm, at91_pio_driver, at91_pio_devclass, NULL,
 NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261683 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 20:57:26 2014
New Revision: 261683
URL: http://svnweb.freebsd.org/changeset/base/261683

Log:
  Add FDT attachment, plus minor code shuffle.

Modified:
  head/sys/arm/at91/at91_pit.c

Modified: head/sys/arm/at91/at91_pit.c
==
--- head/sys/arm/at91/at91_pit.cSun Feb  9 20:56:39 2014
(r261682)
+++ head/sys/arm/at91/at91_pit.cSun Feb  9 20:57:26 2014
(r261683)
@@ -24,6 +24,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -48,6 +50,12 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91var.h
 #include arm/at91/at91_pitreg.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #ifndef PIT_PRESCALE
 #define PIT_PRESCALE (16)
 #endif
@@ -83,6 +91,9 @@ at91_pit_delay(int us)
uint64_t pit_freq;
const uint64_t mhz  = 1E6;
 
+   if (sc == NULL)
+   return;
+
last = PIT_PIV(RD4(sc, PIT_PIIR));
 
/* Max delay ~= 260s. @ 133Mhz */
@@ -111,7 +122,10 @@ static struct timecounter at91_pit_timec
 static int
 at91_pit_probe(device_t dev)
 {
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91sam9260-pit))
+   return (ENXIO);
+#endif
device_set_desc(dev, AT91SAM9 PIT);
 return (0);
 }
@@ -121,10 +135,8 @@ at91_pit_attach(device_t dev)
 {
void *ih;
int rid, err = 0;
-   struct at91_softc *at91_sc;
struct resource *irq;
 
-   at91_sc = device_get_softc(device_get_parent(dev));
sc = device_get_softc(dev);
sc-sc_dev = dev;
 
@@ -158,22 +170,6 @@ out:
return (err);
 }
 
-static device_method_t at91_pit_methods[] = {
-   DEVMETHOD(device_probe, at91_pit_probe),
-   DEVMETHOD(device_attach, at91_pit_attach),
-   DEVMETHOD_END
-};
-
-static driver_t at91_pit_driver = {
-   at91_pit,
-   at91_pit_methods,
-   sizeof(struct pit_softc),
-};
-
-static devclass_t at91_pit_devclass;
-
-DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL,
-NULL);
 
 static int
 pit_intr(void *arg)
@@ -202,3 +198,25 @@ at91_pit_get_timecount(struct timecounte
icnt = piir  20;  /* Overflows */
return (timecount + PIT_PIV(piir) + PIT_PIV(RD4(sc, PIT_MR)) * icnt);
 }
+
+static device_method_t at91_pit_methods[] = {
+   DEVMETHOD(device_probe, at91_pit_probe),
+   DEVMETHOD(device_attach, at91_pit_attach),
+   DEVMETHOD_END
+};
+
+static driver_t at91_pit_driver = {
+   at91_pit,
+   at91_pit_methods,
+   sizeof(struct pit_softc),
+};
+
+static devclass_t at91_pit_devclass;
+
+#ifdef FDT
+DRIVER_MODULE(at91_pit, simplebus, at91_pit_driver, at91_pit_devclass, NULL,
+NULL);
+#else
+DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL,
+NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261684 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 20:58:03 2014
New Revision: 261684
URL: http://svnweb.freebsd.org/changeset/base/261684

Log:
  Add FDT attachment.

Modified:
  head/sys/arm/at91/at91_pmc.c

Modified: head/sys/arm/at91/at91_pmc.c
==
--- head/sys/arm/at91/at91_pmc.cSun Feb  9 20:57:26 2014
(r261683)
+++ head/sys/arm/at91/at91_pmc.cSun Feb  9 20:58:03 2014
(r261684)
@@ -24,6 +24,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -49,6 +51,12 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91_pmcreg.h
 #include arm/at91/at91_pmcvar.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 static struct at91_pmc_softc {
bus_space_tag_t sc_st;
bus_space_handle_t  sc_sh;
@@ -526,6 +534,8 @@ at91_pmc_init_clock(void)
uint32_t mckr;
uint32_t mdiv;
 
+   soc_info.soc_data-soc_clock_init();
+
main_clock = at91_pmc_sense_main_clock();
 
if (at91_is_sam9() || at91_is_sam9xe()) {
@@ -650,7 +660,10 @@ errout:
 static int
 at91_pmc_probe(device_t dev)
 {
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91rm9200-pmc))
+   return (ENXIO);
+#endif
device_set_desc(dev, PMC);
return (0);
 }
@@ -695,5 +708,10 @@ static driver_t at91_pmc_driver = {
 };
 static devclass_t at91_pmc_devclass;
 
+#ifdef FDT
+DRIVER_MODULE(at91_pmc, simplebus, at91_pmc_driver, at91_pmc_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_pmc, atmelarm, at91_pmc_driver, at91_pmc_devclass, NULL,
 NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261685 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 20:59:46 2014
New Revision: 261685
URL: http://svnweb.freebsd.org/changeset/base/261685

Log:
  Add FDT attachment. Flag lost functionality with FDT_HACKS so we can
  find it later.

Modified:
  head/sys/arm/at91/at91_rst.c

Modified: head/sys/arm/at91/at91_rst.c
==
--- head/sys/arm/at91/at91_rst.cSun Feb  9 20:58:03 2014
(r261684)
+++ head/sys/arm/at91/at91_rst.cSun Feb  9 20:59:46 2014
(r261685)
@@ -23,6 +23,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -39,10 +41,19 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91_rstreg.h
 #include arm/at91/at91board.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#define FDT_HACKS 1
+#endif
+
 #define RST_TIMEOUT (5)/* Seconds to hold NRST for hard reset */
 #define RST_TICK (20)  /* sample NRST at hz/RST_TICK intervals */
 
+#ifndef FDT
 static int at91_rst_intr(void *arg);
+#endif
 
 static struct at91_rst_softc {
struct resource *mem_res;   /* Memory resource */
@@ -93,6 +104,10 @@ at91_rst_cpu_reset(void)
 static int
 at91_rst_probe(device_t dev)
 {
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91sam9260-rstc))
+   return (ENXIO);
+#endif
 
device_set_desc(dev, AT91SAM9 Reset Controller);
return (0);
@@ -103,7 +118,7 @@ at91_rst_attach(device_t dev)
 {
struct at91_rst_softc *sc;
const char *cause;
-   int rid, err;
+   int rid, err = 0;
 
at91_rst_sc = sc = device_get_softc(dev);
sc-sc_dev = dev;
@@ -118,6 +133,8 @@ at91_rst_attach(device_t dev)
err = ENOMEM;
goto out;
}
+
+#ifndef FDT_HACKS
rid = 0;
sc-irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, rid,
RF_ACTIVE | RF_SHAREABLE);
@@ -132,6 +149,7 @@ at91_rst_attach(device_t dev)
at91_rst_intr, NULL, sc, sc-intrhand);
if (err)
device_printf(dev, could not establish interrupt handler.\n);
+#endif
 
WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | 
RST_MR_KEY);
 
@@ -161,6 +179,7 @@ out:
return (err);
 }
 
+#ifndef FDT_HACKS
 static void
 at91_rst_tick(void *argp)
 {
@@ -191,6 +210,7 @@ at91_rst_intr(void *argp)
}
return (FILTER_STRAY);
 }
+#endif
 
 static device_method_t at91_rst_methods[] = {
DEVMETHOD(device_probe, at91_rst_probe),
@@ -206,5 +226,10 @@ static driver_t at91_rst_driver = {
 
 static devclass_t at91_rst_devclass;
 
+#ifdef FDT
+DRIVER_MODULE(at91_rst, simplebus, at91_rst_driver, at91_rst_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_rst, atmelarm, at91_rst_driver, at91_rst_devclass, NULL,
 NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261686 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 21:00:22 2014
New Revision: 261686
URL: http://svnweb.freebsd.org/changeset/base/261686

Log:
  Add FDT attachment.

Modified:
  head/sys/arm/at91/at91_spi.c

Modified: head/sys/arm/at91/at91_spi.c
==
--- head/sys/arm/at91/at91_spi.cSun Feb  9 20:59:46 2014
(r261685)
+++ head/sys/arm/at91/at91_spi.cSun Feb  9 21:00:22 2014
(r261686)
@@ -25,6 +25,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -49,6 +51,12 @@ __FBSDID($FreeBSD$);
 #include dev/spibus/spi.h
 #include dev/spibus/spibusvar.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #include spibus_if.h
 
 struct at91_spi_softc
@@ -96,7 +104,10 @@ static void at91_spi_intr(void *arg);
 static int
 at91_spi_probe(device_t dev)
 {
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91rm9200-spi))
+   return (ENXIO);
+#endif
device_set_desc(dev, AT91 SPI);
return (0);
 }
@@ -428,5 +439,10 @@ static driver_t at91_spi_driver = {
sizeof(struct at91_spi_softc),
 };
 
+#ifdef FDT
+DRIVER_MODULE(at91_spi, simplebus, at91_spi_driver, at91_spi_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_spi, atmelarm, at91_spi_driver, at91_spi_devclass, NULL,
 NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261687 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 21:01:10 2014
New Revision: 261687
URL: http://svnweb.freebsd.org/changeset/base/261687

Log:
  Add TWI attachment for FDT. We're only matching the SAMG20 device for
  now, others to follow.

Modified:
  head/sys/arm/at91/at91_twi.c

Modified: head/sys/arm/at91/at91_twi.c
==
--- head/sys/arm/at91/at91_twi.cSun Feb  9 21:00:22 2014
(r261686)
+++ head/sys/arm/at91/at91_twi.cSun Feb  9 21:01:10 2014
(r261687)
@@ -23,6 +23,8 @@
  * SUCH DAMAGE.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -46,6 +48,12 @@ __FBSDID($FreeBSD$);
 #include dev/iicbus/iicbus.h
 #include iicbus_if.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #defineTWI_SLOW_CLOCK   1500
 #defineTWI_FAST_CLOCK  45000
 #defineTWI_FASTEST_CLOCK   9
@@ -104,7 +112,11 @@ static void at91_twi_deactivate(device_t
 static int
 at91_twi_probe(device_t dev)
 {
-
+#ifdef FDT
+   /*  need a whole list, since there's at least 4 different ones */
+   if (!ofw_bus_is_compatible(dev, atmel,at91sam9g20-i2c))
+   return (ENXIO);
+#endif
device_set_desc(dev, TWI);
return (0);
 }
@@ -397,7 +409,12 @@ static driver_t at91_twi_driver = {
sizeof(struct at91_twi_softc),
 };
 
+#ifdef FDT
+DRIVER_MODULE(at91_twi, simplebus, at91_twi_driver, at91_twi_devclass, NULL,
+NULL);
+#else
 DRIVER_MODULE(at91_twi, atmelarm, at91_twi_driver, at91_twi_devclass, NULL,
 NULL);
+#endif
 DRIVER_MODULE(iicbus, at91_twi, iicbus_driver, iicbus_devclass, NULL, NULL);
 MODULE_DEPEND(at91_twi, iicbus, 1, 1, 1);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261688 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 21:01:53 2014
New Revision: 261688
URL: http://svnweb.freebsd.org/changeset/base/261688

Log:
  FDT attachment...

Modified:
  head/sys/arm/at91/at91_wdt.c

Modified: head/sys/arm/at91/at91_wdt.c
==
--- head/sys/arm/at91/at91_wdt.cSun Feb  9 21:01:10 2014
(r261687)
+++ head/sys/arm/at91/at91_wdt.cSun Feb  9 21:01:53 2014
(r261688)
@@ -29,6 +29,8 @@
  * handler.  The watchdog is halted in processor debug mode.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -45,6 +47,12 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91var.h
 #include arm/at91/at91_wdtreg.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 struct wdt_softc {
struct mtx  sc_mtx;
device_tsc_dev;
@@ -131,12 +139,12 @@ wdt_tick(void *argp)
 static int
 wdt_probe(device_t dev)
 {
-
-   if (at91_is_sam9() || at91_is_sam9xe()) {
-   device_set_desc(dev, WDT);
-   return (0);
-   }
-   return (ENXIO);
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, atmel,at91sam9260-wdt))
+   return (ENXIO);
+#endif
+   device_set_desc(dev, WDT);
+   return (0);
 }
 
 static int
@@ -223,4 +231,8 @@ static driver_t wdt_driver = {
 
 static devclass_t wdt_devclass;
 
+#ifdef FDT
+DRIVER_MODULE(at91_wdt, simplebus, wdt_driver, wdt_devclass, NULL, NULL);
+#else
 DRIVER_MODULE(at91_wdt, atmelarm, wdt_driver, wdt_devclass, NULL, NULL);
+#endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261689 - head/sys/arm/at91

2014-02-09 Thread Warner Losh
Author: imp
Date: Sun Feb  9 21:02:46 2014
New Revision: 261689
URL: http://svnweb.freebsd.org/changeset/base/261689

Log:
  Add FDT attachment.

Modified:
  head/sys/arm/at91/if_ate.c

Modified: head/sys/arm/at91/if_ate.c
==
--- head/sys/arm/at91/if_ate.c  Sun Feb  9 21:01:53 2014(r261688)
+++ head/sys/arm/at91/if_ate.c  Sun Feb  9 21:02:46 2014(r261689)
@@ -30,6 +30,8 @@
  * 2) GPIO initializtion in board setup code.
  */
 
+#include opt_platform.h
+
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
@@ -74,6 +76,12 @@ __FBSDID($FreeBSD$);
 #include arm/at91/at91var.h
 #include arm/at91/if_atereg.h
 
+#ifdef FDT
+#include dev/fdt/fdt_common.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+#endif
+
 #include miibus_if.h
 
 /*
@@ -229,7 +237,10 @@ static int ate_miibus_writereg(device_t 
 static int
 ate_probe(device_t dev)
 {
-
+#ifdef FDT
+   if (!ofw_bus_is_compatible(dev, cdns,at32ap7000-macb))
+   return (ENXIO);
+#endif
device_set_desc(dev, EMAC);
return (0);
 }
@@ -1458,7 +1469,11 @@ static driver_t ate_driver = {
sizeof(struct ate_softc),
 };
 
+#ifdef FDT
+DRIVER_MODULE(ate, simplebus, ate_driver, ate_devclass, NULL, NULL);
+#else
 DRIVER_MODULE(ate, atmelarm, ate_driver, ate_devclass, NULL, NULL);
+#endif
 DRIVER_MODULE(miibus, ate, miibus_driver, miibus_devclass, NULL, NULL);
 MODULE_DEPEND(ate, miibus, 1, 1, 1);
 MODULE_DEPEND(ate, ether, 1, 1, 1);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261690 - head/sys/arm/at91

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 21:21:10 2014
New Revision: 261690
URL: http://svnweb.freebsd.org/changeset/base/261690

Log:
  If someone tries to boot a generic ATMEL kernel that has no board_init()
  routine compiled in, print a friendly error message about it rather than
  mysteriously hanging while trying to init 4GB of nonexistant ram.

Modified:
  head/sys/arm/at91/at91_machdep.c

Modified: head/sys/arm/at91/at91_machdep.c
==
--- head/sys/arm/at91/at91_machdep.cSun Feb  9 21:02:46 2014
(r261689)
+++ head/sys/arm/at91/at91_machdep.cSun Feb  9 21:21:10 2014
(r261690)
@@ -590,6 +590,11 @@ initarm(struct arm_boot_params *abp)
printf(Warning: No soc support for %s found.\n, 
soc_info.name);
 
memsize = board_init();
+   if (memsize == -1) {
+   printf(board_init() failed, cannot determine ram size; 
+   assuming 16MB\n);
+   memsize = 16 * 1024 * 1024;
+   }
 
/*
 * Pages were allocated during the secondary bootstrap for the
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261691 - head

2014-02-09 Thread Antoine Brodin
Author: antoine
Date: Sun Feb  9 21:27:32 2014
New Revision: 261691
URL: http://svnweb.freebsd.org/changeset/base/261691

Log:
  Add more obsolete files.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Feb  9 21:21:10 2014(r261690)
+++ head/ObsoleteFiles.inc  Sun Feb  9 21:27:32 2014(r261691)
@@ -38,11 +38,15 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20140205: Open Firmware device moved
+OLD_FILES+=usr/include/dev/ofw/ofw_nexus.h
 # 20140128: libelf and libdwarf import
 OLD_LIBS+=usr/lib/libelf.so.1
 OLD_LIBS+=usr/lib32/libelf.so.1
 OLD_LIBS+=usr/lib/libdwarf.so.3
 OLD_LIBS+=usr/lib32/libdwarf.so.3
+# 20140123: apicvar header moved to x86
+OLD_FILES+=usr/include/machine/apicvar.h
 # 20131215: libcam version bumped
 OLD_LIBS+=lib/libcam.so.6 usr/lib32/libcam.so.6
 # 20131202: libcapsicum and libcasper moved to /lib/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261692 - head/sbin/casperd

2014-02-09 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Feb  9 21:42:01 2014
New Revision: 261692
URL: http://svnweb.freebsd.org/changeset/base/261692

Log:
  If the main casperd process exits, zygote process should exit as well
  instead of spinning.
  
  Reported by:  Mikhail m...@lenta.ru

Modified:
  head/sbin/casperd/zygote.c

Modified: head/sbin/casperd/zygote.c
==
--- head/sbin/casperd/zygote.c  Sun Feb  9 21:27:32 2014(r261691)
+++ head/sbin/casperd/zygote.c  Sun Feb  9 21:42:01 2014(r261692)
@@ -132,8 +132,13 @@ zygote_main(int sock)
 
for (;;) {
nvlin = nvlist_recv(sock);
-   if (nvlin == NULL)
+   if (nvlin == NULL) {
+   if (errno == ENOTCONN) {
+   /* Casperd exited. */
+   exit(0);
+   }
continue;
+   }
func = (zygote_func_t *)(uintptr_t)nvlist_get_number(nvlin,
func);
flags = (int)nvlist_get_number(nvlin, flags);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261694 - stable/9/sys/netinet

2014-02-09 Thread George V. Neville-Neil
Author: gnn
Date: Sun Feb  9 21:48:14 2014
New Revision: 261694
URL: http://svnweb.freebsd.org/changeset/base/261694

Log:
  MFC: 260796
  
  Fix various places where we don't properly release a lock.
  
  PR:   185043
  Submitted by: Michael Bentkofsky

Modified:
  stable/9/sys/netinet/in_mcast.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/in_mcast.c
==
--- stable/9/sys/netinet/in_mcast.c Sun Feb  9 21:47:46 2014
(r261693)
+++ stable/9/sys/netinet/in_mcast.c Sun Feb  9 21:48:14 2014
(r261694)
@@ -1446,7 +1446,7 @@ inp_block_unblock_source(struct inpcb *i
error = inm_merge(inm, imf);
if (error) {
CTR1(KTR_IGMPV3, %s: failed to merge inm state, __func__);
-   goto out_imf_rollback;
+   goto out_in_multi_locked;
}
 
CTR1(KTR_IGMPV3, %s: doing igmp downcall, __func__);
@@ -1454,6 +1454,8 @@ inp_block_unblock_source(struct inpcb *i
if (error)
CTR1(KTR_IGMPV3, %s: failed igmp downcall, __func__);
 
+out_in_multi_locked:
+
IN_MULTI_UNLOCK();
 
 out_imf_rollback:
@@ -2094,8 +2096,12 @@ inp_join_group(struct inpcb *inp, struct
if (is_new) {
error = in_joingroup_locked(ifp, gsa-sin.sin_addr, imf,
inm);
-   if (error)
+   if (error) {
+CTR1(KTR_IGMPV3, %s: in_joingroup_locked failed, 
+__func__);
+IN_MULTI_UNLOCK();
goto out_imo_free;
+}
imo-imo_membership[idx] = inm;
} else {
CTR1(KTR_IGMPV3, %s: merge inm state, __func__);
@@ -2103,20 +2109,21 @@ inp_join_group(struct inpcb *inp, struct
if (error) {
CTR1(KTR_IGMPV3, %s: failed to merge inm state,
__func__);
-   goto out_imf_rollback;
+   goto out_in_multi_locked;
}
CTR1(KTR_IGMPV3, %s: doing igmp downcall, __func__);
error = igmp_change_state(inm);
if (error) {
CTR1(KTR_IGMPV3, %s: failed igmp downcall,
__func__);
-   goto out_imf_rollback;
+   goto out_in_multi_locked;
}
}
 
+out_in_multi_locked:
+
IN_MULTI_UNLOCK();
 
-out_imf_rollback:
INP_WLOCK_ASSERT(inp);
if (error) {
imf_rollback(imf);
@@ -2320,7 +2327,7 @@ inp_leave_group(struct inpcb *inp, struc
if (error) {
CTR1(KTR_IGMPV3, %s: failed to merge inm state,
__func__);
-   goto out_imf_rollback;
+   goto out_in_multi_locked;
}
 
CTR1(KTR_IGMPV3, %s: doing igmp downcall, __func__);
@@ -2331,9 +2338,10 @@ inp_leave_group(struct inpcb *inp, struc
}
}
 
+out_in_multi_locked:
+
IN_MULTI_UNLOCK();
 
-out_imf_rollback:
if (error)
imf_rollback(imf);
else
@@ -2567,7 +2575,7 @@ inp_set_source_filters(struct inpcb *inp
error = inm_merge(inm, imf);
if (error) {
CTR1(KTR_IGMPV3, %s: failed to merge inm state, __func__);
-   goto out_imf_rollback;
+   goto out_in_multi_locked;
}
 
CTR1(KTR_IGMPV3, %s: doing igmp downcall, __func__);
@@ -2575,6 +2583,8 @@ inp_set_source_filters(struct inpcb *inp
if (error)
CTR1(KTR_IGMPV3, %s: failed igmp downcall, __func__);
 
+out_in_multi_locked:
+
IN_MULTI_UNLOCK();
 
 out_imf_rollback:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261693 - head/lib/libcasper

2014-02-09 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Feb  9 21:47:46 2014
New Revision: 261693
URL: http://svnweb.freebsd.org/changeset/base/261693

Log:
  Fix descriptor leak.

Modified:
  head/lib/libcasper/libcasper.c

Modified: head/lib/libcasper/libcasper.c
==
--- head/lib/libcasper/libcasper.c  Sun Feb  9 21:42:01 2014
(r261692)
+++ head/lib/libcasper/libcasper.c  Sun Feb  9 21:47:46 2014
(r261693)
@@ -344,7 +344,7 @@ service_message(struct service *service,
if (sock == -1) {
error = errno;
} else {
-   nvlist_add_descriptor(nvlout, sock, sock);
+   nvlist_move_descriptor(nvlout, sock, sock);
error = 0;
}
} else {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261698 - in head/sys/arm: sa11x0 xscale/i80321 xscale/i8134x xscale/pxa

2014-02-09 Thread Ian Lepore
Author: ian
Date: Sun Feb  9 22:10:14 2014
New Revision: 261698
URL: http://svnweb.freebsd.org/changeset/base/261698

Log:
  Update legacy platforms to use new arm_physmem helper routines.

Modified:
  head/sys/arm/sa11x0/assabet_machdep.c
  head/sys/arm/xscale/i80321/ep80219_machdep.c
  head/sys/arm/xscale/i80321/iq31244_machdep.c
  head/sys/arm/xscale/i8134x/crb_machdep.c
  head/sys/arm/xscale/pxa/pxa_machdep.c

Modified: head/sys/arm/sa11x0/assabet_machdep.c
==
--- head/sys/arm/sa11x0/assabet_machdep.c   Sun Feb  9 22:10:00 2014
(r261697)
+++ head/sys/arm/sa11x0/assabet_machdep.c   Sun Feb  9 22:10:14 2014
(r261698)
@@ -374,16 +374,25 @@ initarm(struct arm_boot_params *abp)
cpu_setup();
 
pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x40;
-
-   dump_avail[0] = phys_avail[0] = round_page(virtual_avail);
-   dump_avail[1] = phys_avail[1] = 0xc000 + 0x0200 - 1;
-   dump_avail[2] = phys_avail[2] = 0;
-   dump_avail[3] = phys_avail[3] = 0;
-   
mutex_init();
vm_max_kernel_address = 0xd000;
pmap_bootstrap(freemempos, kernel_l1pt);
 
+   /*
+* Add the physical ram we have available.
+*
+* Exclude the kernel (and all the things we allocated which immediately
+* follow the kernel) from the VM allocation pool but not from crash
+* dumps.  virtual_avail is a global variable which tracks the kva we've
+* allocated while setting up pmaps.
+*
+* Prepare the list of physical memory available to the vm subsystem.
+*/
+   arm_physmem_hardware_region(physical_start, memsize);
+   arm_physmem_exclude_region(abp-abp_physaddr, 
+   virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC);
+   arm_physmem_init_kernel_globals();
+
init_param2(physmem);
kdb_init();
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c
==
--- head/sys/arm/xscale/i80321/ep80219_machdep.cSun Feb  9 22:10:00 
2014(r261697)
+++ head/sys/arm/xscale/i80321/ep80219_machdep.cSun Feb  9 22:10:14 
2014(r261698)
@@ -333,24 +333,27 @@ initarm(struct arm_boot_params *abp)
/* Enable MMU, I-cache, D-cache, write buffer. */
 
arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
-   pmap_curmaxkvaddr = afterkern + PAGE_SIZE;
-   dump_avail[0] = 0xa000;
-   dump_avail[1] = 0xa000 + memsize;
-   dump_avail[2] = 0;
-   dump_avail[3] = 0;
-   
vm_max_kernel_address = 0xe000;
pmap_bootstrap(pmap_curmaxkvaddr, kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
msgbufinit(msgbufp, msgbufsize);
mutex_init();

-   i = 0;
-   phys_avail[i++] = round_page(virtual_avail - KERNBASE + 
IQ80321_SDRAM_START);
-   phys_avail[i++] = trunc_page(0xa000 + memsize - 1);
-   phys_avail[i++] = 0;
-   phys_avail[i] = 0;
-   
+   /*
+* Add the physical ram we have available.
+*
+* Exclude the kernel (and all the things we allocated which immediately
+* follow the kernel) from the VM allocation pool but not from crash
+* dumps.  virtual_avail is a global variable which tracks the kva we've
+* allocated while setting up pmaps.
+*
+* Prepare the list of physical memory available to the vm subsystem.
+*/
+   arm_physmem_hardware_region(IQ80321_SDRAM_START, memsize);
+   arm_physmem_exclude_region(abp-abp_physaddr, 
+   virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC);
+   arm_physmem_init_kernel_globals();
+
init_param2(physmem);
kdb_init();
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -

Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c
==
--- head/sys/arm/xscale/i80321/iq31244_machdep.cSun Feb  9 22:10:00 
2014(r261697)
+++ head/sys/arm/xscale/i80321/iq31244_machdep.cSun Feb  9 22:10:14 
2014(r261698)
@@ -335,23 +335,27 @@ initarm(struct arm_boot_params *abp)
 
arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
pmap_curmaxkvaddr = afterkern + PAGE_SIZE;
-   dump_avail[0] = 0xa000;
-   dump_avail[1] = 0xa000 + memsize;
-   dump_avail[2] = 0;
-   dump_avail[3] = 0;
-   
vm_max_kernel_address = 0xe000;
pmap_bootstrap(pmap_curmaxkvaddr, kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
msgbufinit(msgbufp, msgbufsize);
mutex_init();

-   i = 0;
-   phys_avail[i++] = round_page(virtual_avail 

svn commit: r261702 - head/share/man/man4

2014-02-09 Thread Christian Brueffer
Author: brueffer
Date: Sun Feb  9 22:43:16 2014
New Revision: 261702
URL: http://svnweb.freebsd.org/changeset/base/261702

Log:
  Update and sort the list of iwn(4) firmware.
  
  MFC after:1 week

Modified:
  head/share/man/man4/iwn.4
  head/share/man/man4/iwnfw.4

Modified: head/share/man/man4/iwn.4
==
--- head/share/man/man4/iwn.4   Sun Feb  9 22:42:14 2014(r261701)
+++ head/share/man/man4/iwn.4   Sun Feb  9 22:43:16 2014(r261702)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd March 19, 2013
+.Dd February 9, 2014
 .Dt IWN 4
 .Os
 .Sh NAME
@@ -45,8 +45,10 @@ kernel configuration file:
 You also need to select a firmware for your device.
 Choose one from:
 .Bd -ragged -offset indent
-.Cd device iwn4965fw
 .Cd device iwn1000fw
+.Cd device iwn2000fw
+.Cd device iwn2030fw
+.Cd device iwn4965fw
 .Cd device iwn5000fw
 .Cd device iwn5150fw
 .Cd device iwn6000fw
@@ -67,8 +69,10 @@ module at boot time, place the following
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 if_iwn_load=YES
-iwn4965fw_load=YES
 iwn1000fw_load=YES
+iwn2000fw_load=YES
+iwn2030fw_load=YES
+iwn4965fw_load=YES
 iwn5000fw_load=YES
 iwn5150fw_load=YES
 iwn6000fw_load=YES

Modified: head/share/man/man4/iwnfw.4
==
--- head/share/man/man4/iwnfw.4 Sun Feb  9 22:42:14 2014(r261701)
+++ head/share/man/man4/iwnfw.4 Sun Feb  9 22:43:16 2014(r261702)
@@ -22,7 +22,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd April 20, 2011
+.Dd February 9, 2014
 .Dt IWNFW 4
 .Os
 .Sh NAME
@@ -40,8 +40,10 @@ This will include three firmware images 
 If you want to pick only the firmware image for your network adapter choose one
 of the following:
 .Bd -ragged -offset indent
-.Cd device iwn4965fw
 .Cd device iwn1000fw
+.Cd device iwn2000fw
+.Cd device iwn2030fw
+.Cd device iwn4965fw
 .Cd device iwn5000fw
 .Cd device iwn5150fw
 .Cd device iwn6000fw
@@ -54,8 +56,10 @@ Alternatively, to load the driver as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
-iwn4965fw_load=YES
 iwn1000fw_load=YES
+iwn2000fw_load=YES
+iwn2030fw_load=YES
+iwn4965fw_load=YES
 iwn5000fw_load=YES
 iwn5150fw_load=YES
 iwn6000fw_load=YES
@@ -65,7 +69,7 @@ iwn6050fw_load=YES
 .Ed
 .Sh DESCRIPTION
 This module provides access to firmware sets for the
-Intel Wireless WiFi Link 4965, 1000, 5000 and 6000 series of
+Intel Wireless WiFi Link 1000, 2000, 2030, 4965, 5000 and 6000 series of
 IEEE 802.11n adapters.
 It may be
 statically linked into the kernel, or loaded as a module.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261701 - head/sys/conf

2014-02-09 Thread Christian Brueffer
Author: brueffer
Date: Sun Feb  9 22:42:14 2014
New Revision: 261701
URL: http://svnweb.freebsd.org/changeset/base/261701

Log:
  Allow iwn2000 and iwn2030 firmware to be linked into the kernel.
  
  PR:   184631
  Submitted by: Oliver Pinter
  MFC after:1 week

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Feb  9 22:13:53 2014(r261700)
+++ head/sys/conf/files Sun Feb  9 22:42:14 2014(r261701)
@@ -1569,6 +1569,34 @@ iwn1000.fw   optional iwn1000fw | 
iwnfw  
compile-with${NORMAL_FW}  \
no-obj no-implicit-rule \
clean   iwn1000.fw
+iwn2000fw.coptional iwn2000fw | iwnfw  \
+   compile-with${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw 
-miwn2000fw -c${.TARGET} \
+   no-implicit-rule before-depend local\
+   clean   iwn2000fw.c
+iwn2000fw.fwo  optional iwn2000fw | iwnfw  \
+   dependency  iwn2000.fw\
+   compile-with${NORMAL_FWO} \
+   no-implicit-rule\
+   clean   iwn2000fw.fwo
+iwn2000.fw optional iwn2000fw | iwnfw  \
+   dependency  $S/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu \
+   compile-with${NORMAL_FW}  \
+   no-obj no-implicit-rule \
+   clean   iwn2000.fw
+iwn2030fw.coptional iwn2030fw | iwnfw  \
+   compile-with${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw 
-miwn2030fw -c${.TARGET} \
+   no-implicit-rule before-depend local\
+   clean   iwn2030fw.c
+iwn2030fw.fwo  optional iwn2030fw | iwnfw  \
+   dependency  iwn2030.fw\
+   compile-with${NORMAL_FWO} \
+   no-implicit-rule\
+   clean   iwn2030fw.fwo
+iwn2030.fw optional iwn2030fw | iwnfw  \
+   dependency  $S/contrib/dev/iwn/iwnwifi-2030-18.168.6.1.fw.uu \
+   compile-with${NORMAL_FW}  \
+   no-obj no-implicit-rule \
+   clean   iwn2030.fw
 iwn4965fw.coptional iwn4965fw | iwnfw  \
compile-with${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw 
-miwn4965fw -c${.TARGET} \
no-implicit-rule before-depend local\
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2014-02-09 Thread Lawrence Stewart
On 02/07/14 16:06, Jason Evans wrote:
 On Feb 6, 2014, at 8:01 PM, Lawrence Stewart lstew...@freebsd.org
 wrote:
 On 01/23/14 13:47, Jason Evans wrote:
 Author: jasone Date: Thu Jan 23 02:47:36 2014 New Revision:
 261071 URL: http://svnweb.freebsd.org/changeset/base/261071
 
 Log: Update jemalloc to version 3.5.0.
 
 I suspect that this commit is related to the assertion failures
 I've been seeing on recent head when I updated from r260427 to
 r261453. Here's two I noticed today:
 
 jemalloc: 
 /usr/local/poudriere/jails/head-amd64/usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:7

 
76: Failed assertion: binind == actual_binind
 *** Signal 6
 
 and
 
 jemalloc: 
 /usr/src/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/arena.h:776:

 
Failed assertion: binind == actual_binind
 Abort trap
 
 I seem to be able to reproduce the first one readily when
 poudriere tries to build chromium so I can provide more info and
 help test ideas.
 
 Cheers, Lawrence
 
 Are the failures you saw happening only for the chromium build, or
 have you seen that same failure for other things as well?

Other things as well. The second example came from a completely
unrelated app - dnsmasq if I remember correctly. The assertion failures
are not deterministic. I do recall the machine was using a fairly
substantial amount of swap at the time which might be relevant, as I
haven't noted a failure recently since rebooting the laptop.

 If this is an application bug, it’s probably due do a buffer overrun
 corrupting an adjacent page that contains page run metadata.  If it’s
 a jemalloc bug, I’m going to need to reproduce it and dig in; it’s
 unlikely to be easy to diagnose.

I'll keep an eye out for further failures and see if I can figure out a
reproduction recipe.

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


svn commit: r261705 - stable/10/sys/netinet

2014-02-09 Thread Adrian Chadd
Author: adrian
Date: Mon Feb 10 06:29:05 2014
New Revision: 261705
URL: http://svnweb.freebsd.org/changeset/base/261705

Log:
  MFC r260871:
  
If the flowid is available for the mbuf that finalised the creation
of a syncache connection, copy it into the inp_flowid field.
  
Without this, an incoming TCP connection won't have an inp_flowid marked
until some data comes in, and this means that things like the per-CPU
TCP timer option will choose a different CPU for the timer work.
(It also means that if one grabbed the flowid via an ioctl from userland,
it won't be available until some data has been received.)
  
  Sponsored by: Netflix, Inc.

Modified:
  stable/10/sys/netinet/tcp_syncache.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/tcp_syncache.c
==
--- stable/10/sys/netinet/tcp_syncache.cMon Feb 10 05:37:04 2014
(r261704)
+++ stable/10/sys/netinet/tcp_syncache.cMon Feb 10 06:29:05 2014
(r261705)
@@ -721,6 +721,16 @@ syncache_socket(struct syncache *sc, str
 #endif
 
/*
+* If there's an mbuf and it has a flowid, then let's initialise the
+* inp with that particular flowid.
+*/
+   if (m != NULL  m-m_flags  M_FLOWID) {
+   inp-inp_flags |= INP_HW_FLOWID;
+   inp-inp_flags = ~INP_SW_FLOWID;
+   inp-inp_flowid = m-m_pkthdr.flowid;
+   }
+
+   /*
 * Install in the reservation hash table for now, but don't yet
 * install a connection group since the full 4-tuple isn't yet
 * configured.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261706 - stable/10/release

2014-02-09 Thread Glen Barber
Author: gjb
Date: Mon Feb 10 07:16:46 2014
New Revision: 261706
URL: http://svnweb.freebsd.org/changeset/base/261706

Log:
  Run ldconfig(8) rc script before building ports so
  ld-elf.so.hints exists for pkg(8).
  
  This is a direct commit to stable/10 as generate-release.sh
  does not exist in head/.
  
  PR:   186554
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/generate-release.sh

Modified: stable/10/release/generate-release.sh
==
--- stable/10/release/generate-release.sh   Mon Feb 10 06:29:05 2014
(r261705)
+++ stable/10/release/generate-release.sh   Mon Feb 10 07:16:46 2014
(r261706)
@@ -109,6 +109,7 @@ if [ -d ${CHROOTDIR}/usr/doc ]; then 
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 
# Install docproj to build release documentation
+   ${CHROOT_CMD} /etc/rc.d/ldconfig forcerestart
${CHROOT_CMD} /bin/sh -c \
'make -C /usr/ports/textproc/docproj \
BATCH=yes \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261707 - stable/9/release

2014-02-09 Thread Glen Barber
Author: gjb
Date: Mon Feb 10 07:17:46 2014
New Revision: 261707
URL: http://svnweb.freebsd.org/changeset/base/261707

Log:
  Run ldconfig(8) rc script before building ports so
  ld-elf.so.hints exists for pkg(8).
  
  This is a direct commit to stable/9 as generate-release.sh
  does not exist in head/.
  
  PR:   186554
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/9/release/generate-release.sh

Modified: stable/9/release/generate-release.sh
==
--- stable/9/release/generate-release.shMon Feb 10 07:16:46 2014
(r261706)
+++ stable/9/release/generate-release.shMon Feb 10 07:17:46 2014
(r261707)
@@ -109,6 +109,7 @@ if [ -d ${CHROOTDIR}/usr/doc ]; then 
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 
# Install docproj to build release documentation
+   ${CHROOT_CMD} /etc/rc.d/ldconfig forcerestart
${CHROOT_CMD} /bin/sh -c \
'make -C /usr/ports/textproc/docproj \
BATCH=yes \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org