Date: Tue, 13 Oct 2015 17:22:24 +0000 (UTC) From: "Conrad E. Meyer" <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289234 - in head/sys: conf dev/ntb/ntb_hw Message-ID: <201510131722.t9DHMOWa099952@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Tue Oct 13 17:22:23 2015 New Revision: 289234 URL: https://svnweb.freebsd.org/changeset/base/289234 Log: NTB: Enable 32-bit support Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/files.i386 head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Oct 13 17:21:38 2015 (r289233) +++ head/sys/conf/files.i386 Tue Oct 13 17:22:23 2015 (r289234) @@ -269,6 +269,8 @@ dev/le/if_le_isa.c optional le isa dev/mse/mse.c optional mse dev/mse/mse_isa.c optional mse isa dev/nfe/if_nfe.c optional nfe pci +dev/ntb/if_ntb/if_ntb.c optional if_ntb +dev/ntb/ntb_hw/ntb_hw.c optional if_ntb | ntb_hw dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ctrlr.c optional nvme Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:21:38 2015 (r289233) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 17:22:23 2015 (r289234) @@ -152,6 +152,26 @@ struct ntb_softc { uint8_t link_speed; }; +#ifdef __i386__ +static __inline uint64_t +bus_space_read_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (bus_space_read_4(tag, handle, offset) | + ((uint64_t)bus_space_read_4(tag, handle, offset + 4)) << 32); +} + +static __inline void +bus_space_write_8(bus_space_tag_t tag, bus_space_handle_t handle, + bus_size_t offset, uint64_t val) +{ + + bus_space_write_4(tag, handle, offset, val); + bus_space_write_4(tag, handle, offset + 4, val >> 32); +} +#endif + #define ntb_bar_read(SIZE, bar, offset) \ bus_space_read_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ ntb->bar_info[(bar)].pci_bus_handle, (offset))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510131722.t9DHMOWa099952>