svn commit: r276988 - in projects/arm_intrng: contrib/ofed/libmlx4/src share/man/man9 sys/arm/allwinner/a20 sys/arm/altera/socfpga sys/arm/arm sys/arm/broadcom/bcm2835 sys/arm/include sys/arm/rockc...

Andrew Turner andrew at FreeBSD.org
Sun Jan 11 17:19:22 UTC 2015


Author: andrew
Date: Sun Jan 11 17:19:17 2015
New Revision: 276988
URL: https://svnweb.freebsd.org/changeset/base/276988

Log:
  Merge to r276986

Modified:
  projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4-abi.h
  projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.c
  projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.h
  projects/arm_intrng/share/man/man9/netisr.9
  projects/arm_intrng/sys/arm/allwinner/a20/a20_mp.c
  projects/arm_intrng/sys/arm/altera/socfpga/socfpga_mp.c
  projects/arm_intrng/sys/arm/arm/gic.c
  projects/arm_intrng/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
  projects/arm_intrng/sys/arm/include/intr.h
  projects/arm_intrng/sys/arm/rockchip/rk30xx_mp.c
  projects/arm_intrng/sys/arm/samsung/exynos/exynos5_mp.c
  projects/arm_intrng/sys/arm/xilinx/zy7_mp.c
  projects/arm_intrng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
  projects/arm_intrng/sys/sys/mbuf.h
Directory Properties:
  projects/arm_intrng/   (props changed)
  projects/arm_intrng/share/   (props changed)
  projects/arm_intrng/sys/   (props changed)
  projects/arm_intrng/sys/cddl/contrib/opensolaris/   (props changed)

Modified: projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4-abi.h
==============================================================================
--- projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4-abi.h	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4-abi.h	Sun Jan 11 17:19:17 2015	(r276988)
@@ -38,6 +38,13 @@
 #define MLX4_UVERBS_MIN_ABI_VERSION	2
 #define MLX4_UVERBS_MAX_ABI_VERSION	4
 
+struct mlx4_alloc_ucontext_resp_v3 {
+	struct ibv_get_context_resp	ibv_resp;
+	__u32				qp_tab_size;
+	__u16				bf_reg_size;
+	__u16				bf_regs_per_page;
+};
+
 struct mlx4_alloc_ucontext_resp {
 	struct ibv_get_context_resp	ibv_resp;
 	__u32				dev_caps;

Modified: projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.c
==============================================================================
--- projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -142,8 +142,10 @@ static struct ibv_context *mlx4_alloc_co
 	struct mlx4_context	       *context;
 	struct ibv_get_context		cmd;
 	struct mlx4_alloc_ucontext_resp resp;
+	struct mlx4_alloc_ucontext_resp_v3 resp_v3;
 	int				i;
 	struct ibv_device_attr		dev_attrs;
+	unsigned int			bf_reg_size;
 
 	context = calloc(1, sizeof *context);
 	if (!context)
@@ -151,11 +153,26 @@ static struct ibv_context *mlx4_alloc_co
 
 	context->ibv_ctx.cmd_fd = cmd_fd;
 
-	if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd,
-				&resp.ibv_resp, sizeof resp))
-		goto err_free;
+	if (to_mdev(ibdev)->driver_abi_ver > 3) {
+		if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd,
+					&resp.ibv_resp, sizeof resp))
+			goto err_free;
+
+		context->num_qps	= resp.qp_tab_size;
+		context->num_xrc_srqs	= resp.qp_tab_size;
+		bf_reg_size		= resp.bf_reg_size;
+		context->cqe_size	= resp.cqe_size;
+	} else {
+		if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd,
+					&resp_v3.ibv_resp, sizeof resp_v3))
+			goto err_free;
+
+		context->num_qps	= resp_v3.qp_tab_size;
+		context->num_xrc_srqs	= resp_v3.qp_tab_size;
+		bf_reg_size		= resp_v3.bf_reg_size;
+		context->cqe_size	= 32;
+	}
 
-	context->num_qps	= resp.qp_tab_size;
 	context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS;
 	context->qp_table_mask	= (1 << context->qp_table_shift) - 1;
 
@@ -163,7 +180,6 @@ static struct ibv_context *mlx4_alloc_co
 	for (i = 0; i < MLX4_QP_TABLE_SIZE; ++i)
 		context->qp_table[i].refcnt = 0;
 
-	context->num_xrc_srqs = resp.qp_tab_size;
 	context->xrc_srq_table_shift = ffs(context->num_xrc_srqs) - 1
 				       - MLX4_XRC_SRQ_TABLE_BITS;
 	context->xrc_srq_table_mask = (1 << context->xrc_srq_table_shift) - 1;
@@ -182,7 +198,7 @@ static struct ibv_context *mlx4_alloc_co
 	if (context->uar == MAP_FAILED)
 		goto err_free;
 
-	if (resp.bf_reg_size) {
+	if (bf_reg_size) {
 		context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size,
 					PROT_WRITE, MAP_SHARED, cmd_fd,
 					to_mdev(ibdev)->page_size);
@@ -192,7 +208,7 @@ static struct ibv_context *mlx4_alloc_co
 				context->bf_page     = NULL;
 				context->bf_buf_size = 0;
 		} else {
-			context->bf_buf_size = resp.bf_reg_size / 2;
+			context->bf_buf_size = bf_reg_size / 2;
 			context->bf_offset   = 0;
 			pthread_spin_init(&context->bf_lock, PTHREAD_PROCESS_PRIVATE);
 		}
@@ -201,7 +217,6 @@ static struct ibv_context *mlx4_alloc_co
 		context->bf_buf_size = 0;
 	}
 
-	context->cqe_size = resp.cqe_size;
 	pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE);
 
 	context->ibv_ctx.ops = mlx4_ctx_ops;
@@ -294,6 +309,7 @@ found:
 
 	dev->ibv_dev.ops = mlx4_dev_ops;
 	dev->page_size   = sysconf(_SC_PAGESIZE);
+	dev->driver_abi_ver = abi_version;
 
 	return &dev->ibv_dev;
 }

Modified: projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.h
==============================================================================
--- projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.h	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/contrib/ofed/libmlx4/src/mlx4.h	Sun Jan 11 17:19:17 2015	(r276988)
@@ -162,6 +162,7 @@ enum {
 struct mlx4_device {
 	struct ibv_device		ibv_dev;
 	int				page_size;
+	int				driver_abi_ver;
 };
 
 struct mlx4_db_page;

Modified: projects/arm_intrng/share/man/man9/netisr.9
==============================================================================
--- projects/arm_intrng/share/man/man9/netisr.9	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/share/man/man9/netisr.9	Sun Jan 11 17:19:17 2015	(r276988)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 22, 2010
+.Dd January 11, 2015
 .Dt NETISR 9
 .Os
 .Sh NAME
@@ -126,13 +126,13 @@ MIB names, so should not contain whitesp
 Protocol handler function that will be invoked on each packet received for
 the protocol.
 .It Vt netisr_m2flow_t Va nh_m2flow
-Optional protocol function to generate a flow ID and set
-.Dv M_FLOWID
-for packets that do not enter
+Optional protocol function to generate a flow ID and set a valid
+hashtype for packets that enter the
 .Nm
 with
-.Dv M_FLOWID
-defined.
+.Dv M_HASHTYPE_GET(m)
+equal to
+.Dv M_HASHTYPE_NONE .
 Will be used only with
 .Dv NETISR_POLICY_FLOW .
 .It Vt netisr_m2cpuid_t Va nh_m2cpuid

Modified: projects/arm_intrng/sys/arm/allwinner/a20/a20_mp.c
==============================================================================
--- projects/arm_intrng/sys/arm/allwinner/a20/a20_mp.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/allwinner/a20/a20_mp.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -57,7 +57,7 @@ void
 platform_mp_init_secondary(void)
 {
 
-	gic_init_secondary();
+	arm_init_secondary_ic();
 }
 
 void

Modified: projects/arm_intrng/sys/arm/altera/socfpga/socfpga_mp.c
==============================================================================
--- projects/arm_intrng/sys/arm/altera/socfpga/socfpga_mp.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/altera/socfpga/socfpga_mp.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -84,7 +84,7 @@ void
 platform_mp_init_secondary(void)
 {
 
-	gic_init_secondary();
+	arm_init_secondary_ic();
 }
 
 void

Modified: projects/arm_intrng/sys/arm/arm/gic.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/gic.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/arm/gic.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -555,7 +555,7 @@ arm_get_next_irq(int last_irq)
 }
 
 void
-gic_init_secondary(void)
+arm_init_secondary_ic(void)
 {
 
 	arm_gic_init_secondary(arm_gic_sc->gic_dev);

Modified: projects/arm_intrng/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- projects/arm_intrng/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -124,6 +124,7 @@ struct bcm_sdhci_softc {
 	bus_dma_tag_t		sc_dma_tag;
 	bus_dmamap_t		sc_dma_map;
 	vm_paddr_t		sc_sdhci_buffer_phys;
+	uint32_t		cmd_and_mode;
 };
 
 static int bcm_sdhci_probe(device_t);
@@ -341,6 +342,14 @@ bcm_sdhci_read_2(device_t dev, struct sd
 	struct bcm_sdhci_softc *sc = device_get_softc(dev);
 	uint32_t val = RD4(sc, off & ~3);
 
+	/*
+	 * Standard 32-bit handling of command and transfer mode.
+	 */
+	if (off == SDHCI_TRANSFER_MODE) {
+		return (sc->cmd_and_mode >> 16);
+	} else if (off == SDHCI_COMMAND_FLAGS) {
+		return (sc->cmd_and_mode & 0x0000ffff);
+	}
 	return ((val >> (off & 3)*8) & 0xffff);
 }
 
@@ -375,16 +384,15 @@ static void
 bcm_sdhci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val)
 {
 	struct bcm_sdhci_softc *sc = device_get_softc(dev);
-	static uint32_t cmd_and_trandfer_mode;
 	uint32_t val32;
 	if (off == SDHCI_COMMAND_FLAGS)
-		val32 = cmd_and_trandfer_mode;
+		val32 = sc->cmd_and_mode;
 	else
 		val32 = RD4(sc, off & ~3);
 	val32 &= ~(0xffff << (off & 3)*8);
 	val32 |= (val << (off & 3)*8);
 	if (off == SDHCI_TRANSFER_MODE)
-		cmd_and_trandfer_mode = val32;
+		sc->cmd_and_mode = val32;
 	else
 		WR4(sc, off & ~3, val32);
 }

Modified: projects/arm_intrng/sys/arm/include/intr.h
==============================================================================
--- projects/arm_intrng/sys/arm/include/intr.h	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/include/intr.h	Sun Jan 11 17:19:17 2015	(r276988)
@@ -113,14 +113,13 @@ extern void (*arm_post_filter)(void *);
 extern int (*arm_config_irq)(int irq, enum intr_trigger trig,
     enum intr_polarity pol);
 
-void gic_init_secondary(void);
-
 #endif /* !ARM_INTRNG */
 
 const char *arm_describe_irq(int irq);
 void arm_intrnames_init(void);
 void arm_irq_memory_barrier(uintptr_t);
 
+void arm_init_secondary_ic(void);
 int  gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt,
     int *trig, int *pol);
 

Modified: projects/arm_intrng/sys/arm/rockchip/rk30xx_mp.c
==============================================================================
--- projects/arm_intrng/sys/arm/rockchip/rk30xx_mp.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/rockchip/rk30xx_mp.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -79,7 +79,7 @@ void
 platform_mp_init_secondary(void)
 {
 
-	gic_init_secondary();
+	arm_init_secondary_ic();
 }
 
 void

Modified: projects/arm_intrng/sys/arm/samsung/exynos/exynos5_mp.c
==============================================================================
--- projects/arm_intrng/sys/arm/samsung/exynos/exynos5_mp.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/samsung/exynos/exynos5_mp.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -70,7 +70,7 @@ void
 platform_mp_init_secondary(void)
 {
 
-	gic_init_secondary();
+	arm_init_secondary_ic();
 }
 
 void

Modified: projects/arm_intrng/sys/arm/xilinx/zy7_mp.c
==============================================================================
--- projects/arm_intrng/sys/arm/xilinx/zy7_mp.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/arm/xilinx/zy7_mp.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -43,7 +43,7 @@ void
 platform_mp_init_secondary(void)
 {
 
-	gic_init_secondary();
+	arm_init_secondary_ic();
 }
 
 void

Modified: projects/arm_intrng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c
==============================================================================
--- projects/arm_intrng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c	Sun Jan 11 17:19:17 2015	(r276988)
@@ -244,17 +244,23 @@ trim_map_segment_add(trim_map_t *tm, uin
 		ts_after->ts_start = ts_before->ts_start;
 		ts_after->ts_txg = txg;
 		ts_after->ts_time = time;
+		list_remove(&tm->tm_head, ts_after);
+		list_insert_tail(&tm->tm_head, ts_after);
 		kmem_free(ts_before, sizeof (*ts_before));
 	} else if (merge_before) {
 		TRIM_MAP_SINC(tm, end - ts_before->ts_end);
 		ts_before->ts_end = end;
 		ts_before->ts_txg = txg;
 		ts_before->ts_time = time;
+		list_remove(&tm->tm_head, ts_before);
+		list_insert_tail(&tm->tm_head, ts_before);
 	} else if (merge_after) {
 		TRIM_MAP_SINC(tm, ts_after->ts_start - start);
 		ts_after->ts_start = start;
 		ts_after->ts_txg = txg;
 		ts_after->ts_time = time;
+		list_remove(&tm->tm_head, ts_after);
+		list_insert_tail(&tm->tm_head, ts_after);
 	} else {
 		TRIM_MAP_SINC(tm, end - start);
 		TRIM_MAP_QINC(tm);

Modified: projects/arm_intrng/sys/sys/mbuf.h
==============================================================================
--- projects/arm_intrng/sys/sys/mbuf.h	Sun Jan 11 17:18:14 2015	(r276987)
+++ projects/arm_intrng/sys/sys/mbuf.h	Sun Jan 11 17:19:17 2015	(r276988)
@@ -221,7 +221,7 @@ struct mbuf {
 #define	M_MCAST		0x00000020 /* send/received as link-level multicast */
 #define	M_PROMISC	0x00000040 /* packet was not for us */
 #define	M_VLANTAG	0x00000080 /* ether_vtag is valid */
-#define	M_FLOWID	0x00000100 /* deprecated: flowid is valid */
+#define	M_UNUSED_8	0x00000100 /* --available-- */
 #define	M_NOFREE	0x00000200 /* do not free mbuf, embedded in cluster */
 
 #define	M_PROTO1	0x00001000 /* protocol-specific */
@@ -248,7 +248,7 @@ struct mbuf {
  * Flags preserved when copying m_pkthdr.
  */
 #define M_COPYFLAGS \
-    (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG|M_FLOWID| \
+    (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG| \
      M_PROTOFLAGS)
 
 /*
@@ -256,7 +256,7 @@ struct mbuf {
  */
 #define	M_FLAG_BITS \
     "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \
-    "\7M_PROMISC\10M_VLANTAG\11M_FLOWID"
+    "\7M_PROMISC\10M_VLANTAG"
 #define	M_FLAG_PROTOBITS \
     "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \
     "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \


More information about the svn-src-projects mailing list