Permalink
Browse files

Merge branch 'master' of https://github.com/freebsd/freebsd

Conflicts:
	sys/conf/newvers.sh
  • Loading branch information...
2 parents b72a651 + 6cadba0 commit 8db7dadc21e0f05a8704f5e265b37cc8bb4f7474 @kmoore134 kmoore134 committed Sep 29, 2013
Showing with 26,370 additions and 3,666 deletions.
  1. +19 −3 contrib/binutils/bfd/elflink.c
  2. +1 −1 contrib/bmake/make.1
  3. +1 −0 etc/portsnap.conf
  4. +4 −2 include/Makefile
  5. +3 −1 include/mk-osreldate.sh
  6. +3 −1 lib/libarchive/Makefile
  7. +3 −0 lib/libedit/readline.c
  8. +5 −1 sys/amd64/vmm/vmm_msr.c
  9. +3 −0 sys/cam/cam_ccb.h
  10. +2 −0 sys/cam/cam_xpt.c
  11. +16 −1 sys/conf/files
  12. +1 −0 sys/conf/files.powerpc
  13. +4 −1 sys/conf/newvers.sh
  14. +59 −15 sys/contrib/rdma/ib_umem.h
  15. +2 −1 sys/dev/adb/adb_mouse.c
  16. +3 −2 sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
  17. +1 −1 sys/kern/kern_descrip.c
  18. +10 −2 sys/kern/kern_event.c
  19. +6 −1 sys/kern/kern_timeout.c
  20. +2 −0 sys/kern/vfs_subr.c
  21. +5 −2 sys/mips/mips/tlb.c
  22. +14 −0 sys/modules/Makefile
  23. +6 −6 sys/modules/hyperv/netvsc/Makefile
  24. +3 −3 sys/modules/hyperv/stordisengage/Makefile
  25. +2 −2 sys/modules/hyperv/storvsc/Makefile
  26. +2 −2 sys/modules/hyperv/utilities/Makefile
  27. +3 −3 sys/modules/hyperv/vmbus/Makefile
  28. +23 −0 sys/modules/ibcore/Makefile
  29. +31 −0 sys/modules/ipoib/Makefile
  30. +3 −3 sys/modules/mlx4/Makefile
  31. +8 −1 sys/modules/mlx4ib/Makefile
  32. +1 −1 sys/net/if_enc.c
  33. +9 −2 sys/netpfil/ipfw/ip_fw_log.c
  34. +1 −1 sys/ofed/drivers/infiniband/core/addr.c
  35. +1 −1 sys/ofed/drivers/infiniband/core/cma.c
  36. +2 −1 sys/ofed/drivers/infiniband/core/core_priv.h
  37. +20 −4 sys/ofed/drivers/infiniband/core/device.c
  38. +21 −0 sys/ofed/drivers/infiniband/core/sa_query.c
  39. +180 −111 sys/ofed/drivers/infiniband/core/sysfs.c
  40. +15 −15 sys/ofed/drivers/infiniband/core/uverbs_cmd.c
  41. +4 −5 sys/ofed/drivers/infiniband/core/uverbs_main.c
  42. +14 −14 sys/ofed/drivers/infiniband/core/verbs.c
  43. +2 −0 sys/ofed/drivers/infiniband/hw/mlx4/Kconfig
  44. +30 −3 sys/ofed/drivers/infiniband/hw/mlx4/Makefile
  45. +25 −27 sys/ofed/drivers/infiniband/hw/mlx4/ah.c
  46. +688 −0 sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c
  47. +440 −0 sys/ofed/drivers/infiniband/hw/mlx4/cm.c
  48. +98 −62 sys/ofed/drivers/infiniband/hw/mlx4/cq.c
  49. +1,928 −86 sys/ofed/drivers/infiniband/hw/mlx4/mad.c
  50. +1,350 −478 sys/ofed/drivers/infiniband/hw/mlx4/main.c
  51. +1,254 −0 sys/ofed/drivers/infiniband/hw/mlx4/mcg.c
  52. +441 −48 sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
  53. +422 −93 sys/ofed/drivers/infiniband/hw/mlx4/mr.c
  54. +1,506 −706 sys/ofed/drivers/infiniband/hw/mlx4/qp.c
  55. +18 −51 sys/ofed/drivers/infiniband/hw/mlx4/srq.c
  56. +800 −0 sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c
  57. +11 −1 sys/ofed/drivers/infiniband/hw/mlx4/user.h
  58. +0 −1 sys/ofed/drivers/infiniband/hw/mlx4/wc.c
  59. +1 −1 sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
  60. +1 −1 sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
  61. +1 −0 sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c
  62. +2 −2 sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c
  63. +2 −1 sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
  64. +17 −0 sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  65. +31 −6 sys/ofed/drivers/net/mlx4/Makefile
  66. +21 −24 sys/ofed/drivers/net/mlx4/alloc.c
  67. +31 −19 sys/ofed/drivers/net/mlx4/catas.c
  68. +1,747 −36 sys/ofed/drivers/net/mlx4/cmd.c
  69. +152 −68 sys/ofed/drivers/net/mlx4/cq.c
  70. +4 −2 sys/ofed/drivers/net/mlx4/en_cq.c
  71. +13 −9 sys/ofed/drivers/net/mlx4/en_main.c
  72. +6 −4 sys/ofed/drivers/net/mlx4/en_netdev.c
  73. +23 −10 sys/ofed/drivers/net/mlx4/en_port.c
  74. +2 −5 sys/ofed/drivers/net/mlx4/en_port.h
  75. +2 −4 sys/ofed/drivers/net/mlx4/en_rx.c
  76. +2 −2 sys/ofed/drivers/net/mlx4/en_tx.c
  77. +768 −125 sys/ofed/drivers/net/mlx4/eq.c
  78. +884 −118 sys/ofed/drivers/net/mlx4/fw.c
  79. +45 −5 sys/ofed/drivers/net/mlx4/fw.h
  80. +76 −75 sys/ofed/drivers/net/mlx4/icm.c
  81. +8 −12 sys/ofed/drivers/net/mlx4/icm.h
  82. +14 −39 sys/ofed/drivers/net/mlx4/intf.c
  83. +1,624 −448 sys/ofed/drivers/net/mlx4/main.c
  84. +1,124 −64 sys/ofed/drivers/net/mlx4/mcg.c
  85. +926 −34 sys/ofed/drivers/net/mlx4/mlx4.h
  86. +6 −5 sys/ofed/drivers/net/mlx4/mlx4_en.h
  87. +323 −197 sys/ofed/drivers/net/mlx4/mr.c
  88. +99 −8 sys/ofed/drivers/net/mlx4/pd.c
  89. +750 −59 sys/ofed/drivers/net/mlx4/port.c
  90. +24 −16 sys/ofed/drivers/net/mlx4/profile.c
  91. +281 −83 sys/ofed/drivers/net/mlx4/qp.c
  92. +4 −3 sys/ofed/drivers/net/mlx4/reset.c
  93. +4,315 −0 sys/ofed/drivers/net/mlx4/resource_tracker.c
  94. +17 −29 sys/ofed/drivers/net/mlx4/sense.c
  95. +93 −67 sys/ofed/drivers/net/mlx4/srq.c
  96. +325 −0 sys/ofed/drivers/net/mlx4/sys_tune.c
  97. +22 −0 sys/ofed/include/asm/atomic.h
  98. +1 −0 sys/ofed/include/asm/byteorder.h
  99. +53 −0 sys/ofed/include/linux/atomic.h
  100. +166 −0 sys/ofed/include/linux/bitops.h
  101. +17 −0 sys/ofed/include/linux/clocksource.h
  102. +3 −0 sys/ofed/include/linux/compat.h
  103. +6 −0 sys/ofed/include/linux/device.h
  104. +7 −0 sys/ofed/include/linux/dma-mapping.h
  105. +4 −0 sys/ofed/include/linux/gfp.h
  106. +4 −0 sys/ofed/include/linux/idr.h
  107. +5 −0 sys/ofed/include/linux/if_ether.h
  108. +2 −0 sys/ofed/include/linux/in6.h
  109. +70 −0 sys/ofed/include/linux/kernel.h
  110. +2 −0 sys/ofed/include/linux/linux_compat.c
  111. +3 −0 sys/ofed/include/linux/list.h
  112. +112 −3 sys/ofed/include/linux/log2.h
  113. +59 −11 sys/ofed/include/linux/mlx4/cmd.h
  114. +17 −1 sys/ofed/include/linux/mlx4/cq.h
  115. +628 −116 sys/ofed/include/linux/mlx4/device.h
  116. +27 −13 sys/ofed/include/linux/mlx4/driver.h
  117. +52 −19 sys/ofed/include/linux/mlx4/qp.h
  118. +0 −12 sys/ofed/include/linux/mlx4/srq.h
  119. +3 −0 sys/ofed/include/linux/moduleparam.h
  120. +107 −0 sys/ofed/include/linux/pci.h
  121. +6 −0 sys/ofed/include/linux/sysfs.h
  122. +2 −0 sys/ofed/include/linux/types.h
  123. +20 −1 sys/ofed/include/linux/workqueue.h
  124. +15 −0 sys/ofed/include/rdma/ib_cm.h
  125. +1 −1 sys/ofed/include/rdma/ib_mad.h
  126. +156 −0 sys/ofed/include/rdma/ib_pma.h
  127. +34 −0 sys/ofed/include/rdma/ib_sa.h
  128. +86 −5 sys/ofed/include/rdma/ib_user_verbs.h
  129. +212 −41 sys/ofed/include/rdma/ib_verbs.h
  130. +1 −0 sys/powerpc/include/ofw_machdep.h
  131. +10 −31 sys/powerpc/ofw/ofw_machdep.c
  132. +69 −28 sys/powerpc/ofw/ofw_syscons.c
  133. +1 −0 sys/powerpc/ofw/ofw_syscons.h
  134. +31 −0 sys/powerpc/powermac/platform_powermac.c
  135. +0 −11 sys/powerpc/powerpc/mmu_if.m
  136. +13 −6 sys/powerpc/pseries/mmu_phyp.c
  137. +1 −4 sys/powerpc/pseries/phyp_console.c
  138. +1,003 −0 sys/powerpc/pseries/phyp_vscsi.c
  139. +3 −2 sys/powerpc/pseries/platform_chrp.c
  140. +31 −1 sys/powerpc/pseries/vdevice.c
  141. +3 −2 sys/x86/xen/hvm.c
  142. +0 −1 tools/build/mk/OptionalObsoleteFiles.inc
  143. +7 −4 usr.bin/patch/patch.c
  144. +1 −1 usr.bin/patch/util.c
  145. +1 −1 usr.sbin/bhyve/pci_virtio_block.c
  146. +0 −2 usr.sbin/bsdconfig/share/media/ftp.subr
  147. +0 −2 usr.sbin/bsdinstall/scripts/mirrorselect
@@ -488,12 +488,28 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
if (h->root.u.undef.next != NULL || htab->root.undefs_tail == &h->root)
bfd_link_repair_undef_list (&htab->root);
}
-
- if (h->root.type == bfd_link_hash_new)
+ else if (h->root.type == bfd_link_hash_new)
{
bfd_elf_link_mark_dynamic_symbol (info, h, NULL);
h->non_elf = 0;
}
+ else if (h->root.type == bfd_link_hash_indirect)
+ {
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+ struct elf_link_hash_entry *hv = h;
+ do
+ hv = (struct elf_link_hash_entry *) hv->root.u.i.link;
+ while (hv->root.type == bfd_link_hash_indirect
+ || hv->root.type == bfd_link_hash_warning);
+ h->root.type = bfd_link_hash_undefined;
+ hv->root.type = bfd_link_hash_indirect;
+ hv->root.u.i.link = (struct bfd_link_hash_entry *) h;
+ (*bed->elf_backend_copy_indirect_symbol) (info, h, hv);
+ }
+ else if (h->root.type == bfd_link_hash_warning)
+ {
+ abort ();
+ }
/* If this symbol is being provided by the linker script, and it is
currently defined by a dynamic object, but not by a regular
@@ -1417,10 +1433,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
case, we make the versioned symbol point to the normal one. */
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
flip->root.type = h->root.type;
+ flip->root.u.undef.abfd = h->root.u.undef.abfd;
h->root.type = bfd_link_hash_indirect;
h->root.u.i.link = (struct bfd_link_hash_entry *) flip;
(*bed->elf_backend_copy_indirect_symbol) (info, flip, h);
- flip->root.u.undef.abfd = h->root.u.undef.abfd;
if (h->def_dynamic)
{
h->def_dynamic = 0;
@@ -730,7 +730,7 @@ even if the target is not tagged with
The default is
.Ql Pa yes
for backwards compatability with
-.Fx 9
+.Fx 9.0
and earlier.
.It Va .MAKE.DEPENDFILE
Names the makefile (default
View
@@ -32,3 +32,4 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3aede40c98633216c330
# List of INDEX files to build and the DESCRIBE file to use for each
INDEX INDEX-8 DESCRIBE.8
INDEX INDEX-9 DESCRIBE.9
+INDEX INDEX-10 DESCRIBE.10
View
@@ -104,15 +104,17 @@ SHARED?= copies
INCS+= osreldate.h
-NEWVERS_SH= ${.CURDIR}/../sys/conf/newvers.sh
-PARAM_H= ${.CURDIR}/../sys/sys/param.h
+SYSDIR= ${.CURDIR}/../sys
+NEWVERS_SH= ${SYSDIR}/conf/newvers.sh
+PARAM_H= ${SYSDIR}/sys/param.h
MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh
osreldate.h vers.c: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH}
env ECHO="${ECHO}" \
MAKE="${MAKE}" \
NEWVERS_SH=${NEWVERS_SH} \
PARAM_H=${PARAM_H} \
+ SYSDIR=${SYSDIR} \
sh ${MK_OSRELDATE_SH}
.for i in ${LHDRS}
@@ -36,7 +36,9 @@ trap "rm -f $tmpfile" EXIT
${ECHO} creating osreldate.h from newvers.sh
export PARAMFILE="${PARAM_H:=$CURDIR/../sys/sys/param.h}"
-. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}"
+set +e
+. "${NEWVERS_SH:=$CURDIR/../sys/conf/newvers.sh}" || exit 1
+set -e
cat > $tmpfile <<EOF
$COPYRIGHT
#ifdef _KERNEL
@@ -35,7 +35,9 @@ LDADD+= -lmd
.endif
.if ${MK_ICONV} != "no"
-CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
+# TODO: This can be changed back to CFLAGS once iconv works correctly
+# with statically linked binaries.
+SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const
.endif
.if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \
@@ -1363,6 +1363,9 @@ add_history(const char *line)
TYPE(HistEvent) ev;
const Char *wline;
+ if (line == NULL)
+ return 0;
+
if (h == NULL || e == NULL)
rl_initialize();
@@ -57,6 +57,7 @@ static struct vmm_msr vmm_msr[] = {
{ MSR_PAT, VMM_MSR_F_EMULATE | VMM_MSR_F_INVALID },
{ MSR_BIOS_SIGN,VMM_MSR_F_EMULATE },
{ MSR_MCG_CAP, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY },
+ { MSR_IA32_PLATFORM_ID, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY },
{ MSR_IA32_MISC_ENABLE, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY },
};
@@ -129,7 +130,10 @@ guest_msrs_init(struct vm *vm, int cpu)
misc |= (1 << 12) | (1 << 11);
misc &= ~((1 << 18) | (1 << 16));
guest_msrs[i] = misc;
- break;
+ break;
+ case MSR_IA32_PLATFORM_ID:
+ guest_msrs[i] = 0;
+ break;
default:
panic("guest_msrs_init: missing initialization for msr "
"0x%0x", vmm_msr[i].num);
View
@@ -262,6 +262,7 @@ typedef enum {
XPORT_SAS, /* Serial Attached SCSI */
XPORT_SATA, /* Serial AT Attachment */
XPORT_ISCSI, /* iSCSI */
+ XPORT_SRP, /* SCSI RDMA Protocol */
} cam_xport;
#define XPORT_IS_ATA(t) ((t) == XPORT_ATA || (t) == XPORT_SATA)
@@ -1233,6 +1234,7 @@ cam_fill_csio(struct ccb_scsiio *csio, u_int32_t retries,
{
csio->ccb_h.func_code = XPT_SCSI_IO;
csio->ccb_h.flags = flags;
+ csio->ccb_h.xflags = 0;
csio->ccb_h.retry_count = retries;
csio->ccb_h.cbfcnp = cbfcnp;
csio->ccb_h.timeout = timeout;
@@ -1252,6 +1254,7 @@ cam_fill_ctio(struct ccb_scsiio *csio, u_int32_t retries,
{
csio->ccb_h.func_code = XPT_CONT_TARGET_IO;
csio->ccb_h.flags = flags;
+ csio->ccb_h.xflags = 0;
csio->ccb_h.retry_count = retries;
csio->ccb_h.cbfcnp = cbfcnp;
csio->ccb_h.timeout = timeout;
View
@@ -3337,6 +3337,7 @@ xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority)
}
ccb_h->pinfo.index = CAM_UNQUEUED_INDEX;
ccb_h->flags = 0;
+ ccb_h->xflags = 0;
}
/* Path manipulation functions */
@@ -3891,6 +3892,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus)
case XPORT_FC:
case XPORT_USB:
case XPORT_ISCSI:
+ case XPORT_SRP:
case XPORT_PPB:
new_bus->xport = scsi_get_xport();
break;
View
@@ -3542,6 +3542,18 @@ ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \
no-depend \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"
+ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \
+ no-depend obj-prefix "mlx4ib_" \
+ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
+ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \
+ no-depend obj-prefix "mlx4ib_" \
+ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
+ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \
+ no-depend obj-prefix "mlx4ib_" \
+ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
+ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \
+ no-depend obj-prefix "mlx4ib_" \
+ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
@@ -3624,7 +3636,10 @@ ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \
ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
-ofed/drivers/net/mlx4/xrcd.c optional mlx4ib | mlxen \
+ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \
+ no-depend obj-prefix "mlx4_" \
+ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
+ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
@@ -228,6 +228,7 @@ powerpc/ps3/ps3-hvcall.S optional ps3 sc
powerpc/pseries/phyp-hvcall.S optional pseries powerpc64
powerpc/pseries/mmu_phyp.c optional pseries powerpc64
powerpc/pseries/phyp_console.c optional pseries powerpc64
+powerpc/pseries/phyp_vscsi.c optional pseries powerpc64 scbus
powerpc/pseries/platform_chrp.c optional pseries
powerpc/pseries/plpar_iommu.c optional pseries powerpc64
powerpc/pseries/rtas_dev.c optional pseries
View
@@ -38,7 +38,10 @@ if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
fi
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
-SYSDIR=$(dirname $0)/..
+
+if [ "X${SYSDIR}" = "X" ]; then
+ SYSDIR=$(dirname $0)/..
+fi
if [ "X${PARAMFILE}" != "X" ]; then
RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
@@ -28,50 +28,94 @@
* 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.
- *
- * $FreeBSD$
*/
#ifndef IB_UMEM_H
#define IB_UMEM_H
-struct ib_ucontext;
+#include <linux/list.h>
+#include <linux/scatterlist.h>
+#include <linux/workqueue.h>
+#include <linux/dma-attrs.h>
-struct ib_umem_chunk {
- TAILQ_ENTRY(ib_umem_chunk) entry;
- int nents;
- int nmap;
- struct rdma_scatterlist page_list[0];
-};
+struct ib_ucontext;
struct ib_umem {
struct ib_ucontext *context;
size_t length;
int offset;
int page_size;
int writable;
- TAILQ_HEAD(, ib_umem_chunk) chunk_list;
-#ifdef notyet
+ int hugetlb;
+ struct list_head chunk_list;
struct work_struct work;
struct mm_struct *mm;
-#endif
unsigned long diff;
};
+/* contiguous memory structure */
+struct ib_cmem {
+
+ struct ib_ucontext *context;
+ size_t length;
+ /* Link list of contiguous blocks being part of that cmem */
+ struct list_head ib_cmem_block;
+
+ /* Order of cmem block, 2^ block_order will equal number
+ of physical pages per block
+ */
+ unsigned long block_order;
+ /* Refernce counter for that memory area
+ - When value became 0 pages will be returned to the kernel.
+ */
+ struct kref refcount;
+};
+
+
+struct ib_cmem_block {
+
+ struct list_head list;
+ /* page will point to the page struct of the head page
+ in the current compound page.
+ block order is saved once as part of ib_cmem.
+ */
+ struct page *page;
+};
+
+
+
+struct ib_umem_chunk {
+ struct list_head list;
+ int nents;
+ int nmap;
+ struct dma_attrs attrs;
+ struct scatterlist page_list[0];
+};
+
#ifdef CONFIG_INFINIBAND_USER_MEM
struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
- size_t size, int access);
+ size_t size, int access, int dmasync);
void ib_umem_release(struct ib_umem *umem);
int ib_umem_page_count(struct ib_umem *umem);
+int ib_cmem_map_contiguous_pages_to_vma(struct ib_cmem *ib_cmem,
+ struct vm_area_struct *vma);
+struct ib_cmem *ib_cmem_alloc_contiguous_pages(struct ib_ucontext *context,
+ unsigned long total_size,
+ unsigned long page_size_order);
+void ib_cmem_release_contiguous_pages(struct ib_cmem *cmem);
+int ib_umem_map_to_vma(struct ib_umem *umem,
+ struct vm_area_struct *vma);
+
#else /* CONFIG_INFINIBAND_USER_MEM */
+#include <linux/err.h>
static inline struct ib_umem *ib_umem_get(struct ib_ucontext *context,
unsigned long addr, size_t size,
- int access) {
- return ERR_PTR(EINVAL);
+ int access, int dmasync) {
+ return ERR_PTR(-EINVAL);
}
static inline void ib_umem_release(struct ib_umem *umem) { }
static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
@@ -471,7 +471,8 @@ ams_poll(struct cdev *dev, int events, struct thread *p)
mtx_lock(&sc->sc_mtx);
if (sc->xdelta == 0 && sc->ydelta == 0 &&
- sc->buttons == sc->last_buttons) {
+ sc->buttons == sc->last_buttons &&
+ sc->packet_read_len == 0) {
selrecord(p, &sc->rsel);
events = 0;
} else {
@@ -541,7 +541,8 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr,
static struct ib_mr *iwch_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
- u64 virt, int acc, struct ib_udata *udata)
+ u64 virt, int acc, struct ib_udata *udata,
+ int mr_id)
{
__be64 *pages;
int shift, i, n;
@@ -1136,7 +1137,7 @@ int iwch_register_device(struct iwch_dev *dev)
dev->ibdev.iwcm->rem_ref = iwch_qp_rem_ref;
dev->ibdev.iwcm->get_qp = iwch_get_qp;
- ret = ib_register_device(&dev->ibdev);
+ ret = ib_register_device(&dev->ibdev, NULL);
if (ret)
goto bail1;
@@ -1518,7 +1518,7 @@ fdgrowtable(struct filedesc *fdp, int nfd)
/*
* In order to have a valid pattern for fget_unlocked()
- * fdp->fd_nfiles might be the last member to be updated, otherwise
+ * fdp->fd_nfiles must be the last member to be updated, otherwise
* fget_unlocked() consumers may reference a new, higher value for
* fdp->fd_nfiles before to access the fdp->fd_ofiles array,
* resulting in OOB accesses.
View
@@ -554,8 +554,17 @@ static int
filt_timerattach(struct knote *kn)
{
struct callout *calloutp;
+ sbintime_t to;
unsigned int ncallouts;
+ if ((intptr_t)kn->kn_sdata < 0)
+ return (EINVAL);
+ if ((intptr_t)kn->kn_sdata == 0 && (kn->kn_flags & EV_ONESHOT) == 0)
+ kn->kn_sdata = 1;
+ to = timer2sbintime(kn->kn_sdata);
+ if (to < 0)
+ return (EINVAL);
+
ncallouts = atomic_load_explicit(&kq_ncallouts, memory_order_relaxed);
do {
if (ncallouts >= kq_calloutmax)
@@ -569,8 +578,7 @@ filt_timerattach(struct knote *kn)
calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK);
callout_init(calloutp, CALLOUT_MPSAFE);
kn->kn_hook = calloutp;
- callout_reset_sbt_on(calloutp,
- timer2sbintime(kn->kn_sdata), 0 /* 1ms? */,
+ callout_reset_sbt_on(calloutp, to, 0 /* 1ms? */,
filt_timerexpire, kn, PCPU_GET(cpuid), 0);
return (0);
Oops, something went wrong.

0 comments on commit 8db7dad

Please sign in to comment.