├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── Makefile ├── README ├── README.md ├── debian ├── changelog ├── compat ├── control ├── copyright ├── dirs ├── fio_values ├── iomemory-vsl4-source.install ├── iomemory-vsl4.install ├── iomemory-vsl4.postinst ├── iomemory-vsl4.postrm ├── iomemory-vsl4.prerm └── rules ├── fio-driver.spec ├── root ├── etc │ └── ld.so.conf.d │ │ └── fio.conf └── usr │ ├── lib │ └── fio │ │ └── libvsl_4.so │ ├── share │ └── doc │ │ ├── fio │ │ └── NOTICE.libvsl_4 │ │ └── iomemory-vsl4 │ │ ├── License │ │ └── NOTICE.iomemory-vsl │ └── src │ └── iomemory-vsl4-4.3.7 │ ├── Kbuild │ ├── Makefile │ ├── cdev.c │ ├── check_target_kernel.conf │ ├── check_target_kernel.sh │ ├── common_kinfo.c │ ├── dbgset.c │ ├── dkms.conf │ ├── dkms.conf.example │ ├── driver_init.c │ ├── errno.c │ ├── include │ ├── fio │ │ ├── common │ │ │ ├── kinfo.h │ │ │ ├── tsc.h │ │ │ └── uuid.h │ │ ├── port │ │ │ ├── align.h │ │ │ ├── arch │ │ │ │ ├── ppc │ │ │ │ │ ├── atomic.h │ │ │ │ │ ├── bits.h │ │ │ │ │ └── cache.h │ │ │ │ └── x86_common │ │ │ │ │ ├── atomic.h │ │ │ │ │ ├── bits.h │ │ │ │ │ └── cache.h │ │ │ ├── atomic_list.h │ │ │ ├── bitops.h │ │ │ ├── byteswap.h │ │ │ ├── cdev.h │ │ │ ├── common-linux │ │ │ │ ├── commontypes.h │ │ │ │ ├── div64.h │ │ │ │ ├── errno.h │ │ │ │ ├── kassert.h │ │ │ │ ├── kblock.h │ │ │ │ ├── kcondvar.h │ │ │ │ ├── kfile.h │ │ │ │ ├── kfio.h │ │ │ │ ├── kpci.h │ │ │ │ ├── kscsi.h │ │ │ │ ├── kscsi_config.h │ │ │ │ ├── message_ids.h │ │ │ │ ├── stdint.h │ │ │ │ └── ufio.h │ │ │ ├── commontypes.h │ │ │ ├── compiler.h │ │ │ ├── csr_simulator.h │ │ │ ├── dbgset.h │ │ │ ├── errno.h │ │ │ ├── fio-poppack.h │ │ │ ├── fio-port.h │ │ │ ├── fio-pshpack1.h │ │ │ ├── fio-stat.h │ │ │ ├── fiostring.h │ │ │ ├── gcc │ │ │ │ ├── align.h │ │ │ │ └── compiler.h │ │ │ ├── ifio.h │ │ │ ├── ioctl.h │ │ │ ├── kbio.h │ │ │ ├── kblock.h │ │ │ ├── kcache.h │ │ │ ├── kcondvar.h │ │ │ ├── kcpu.h │ │ │ ├── kcsr.h │ │ │ ├── kfio.h │ │ │ ├── kfio_config.h │ │ │ ├── kglobal.h │ │ │ ├── kinfo.h │ │ │ ├── kmem.h │ │ │ ├── kmsg.h │ │ │ ├── kpci.h │ │ │ ├── kscatter.h │ │ │ ├── kscsi.h │ │ │ ├── ktime.h │ │ │ ├── ktypes.h │ │ │ ├── ktypes_32.h │ │ │ ├── ktypes_64.h │ │ │ ├── libgen.h │ │ │ ├── linux │ │ │ │ ├── ktypes.h │ │ │ │ └── utypes.h │ │ │ ├── list.h │ │ │ ├── message_id_ranges.h │ │ │ ├── message_ids.h │ │ │ ├── nanddev.h │ │ │ ├── nexus.h │ │ │ ├── pci.h │ │ │ ├── port_config.h │ │ │ ├── port_config_macros.h │ │ │ ├── port_config_macros_clear.h │ │ │ ├── port_config_vars_externs.h │ │ │ ├── porting_cdev.h │ │ │ ├── ranges.h │ │ │ ├── sched.h │ │ │ ├── six_lock.h │ │ │ ├── state.h │ │ │ ├── stdint.h │ │ │ ├── types.h │ │ │ ├── ufio.h │ │ │ ├── unaligned.h │ │ │ ├── utypes.h │ │ │ ├── vararg.h │ │ │ └── version.h │ │ └── public │ │ │ └── fioapi.h │ ├── kblock_meta.h │ ├── kfile_meta.h │ └── sysrq_meta.h │ ├── kblock.c │ ├── kcache.c │ ├── kcondvar.c │ ├── kcpu.c │ ├── kcsr.c │ ├── kfile.c │ ├── kfio.c │ ├── kfio │ ├── README.md │ ├── function_hashes.txt │ ├── kfio_operations.sh │ ├── x86_64_cc41_libkfio.o_shipped │ ├── x86_64_cc43_libkfio.o_shipped │ ├── x86_64_cc44_libkfio.o_shipped │ ├── x86_64_cc46_libkfio.o_shipped │ ├── x86_64_cc48_libkfio.o_shipped │ ├── x86_64_cc49_libkfio.o_shipped │ ├── x86_64_cc54_libkfio.o_shipped │ ├── x86_64_cc63_libkfio.o_shipped │ └── x86_64_latest_libkfio.o_shipped │ ├── kfio_common.c │ ├── kfio_config.sh │ ├── khotplug.c │ ├── kinfo.c │ ├── kinit.c │ ├── kmem.c │ ├── kmsg.c │ ├── kscatter.c │ ├── kscsi.c │ ├── kscsi_host.c │ ├── ktime.c │ ├── main.c │ ├── module_operations.sh │ ├── module_param.c │ ├── pci.c │ ├── port-internal-boss.h │ ├── port-internal.h │ ├── sched.c │ ├── six_lock.c │ ├── state.c │ └── sysrq.c └── tools ├── efi ├── README.md └── install-ubuntu.sh └── udev └── rules.d └── 60-persistent-fio.rules /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Bug description 11 | Describe the issue, or paste the full error encountered here. 12 | 13 | ### How to reproduce 14 | What are the steps to reproduce the reported issue. 15 | ``` 16 | git clone https://github.com/snuf/iomemory-vsl4.git 17 | cd iomemory-vsl4 18 | git checkout 19 | make module 20 | ** poof, broken token ** 21 | ``` 22 | 23 | ### Possible solution 24 | Is a solution know, or type any plausible suggestions here, if none leave clear. 25 | 26 | ### Environment information 27 | Information about the system the module is used on 28 | 1. Linux kernel compiled against (uname -a) 29 | 2. The C compiler version used (gcc --version) 30 | 3. distribution, and version (cat /etc/os-release) 31 | 4. The hash, tag and/or Branch of iomemory-vsl4 that is being compiled (`git branch -v`) 32 | 5. FIO device used, if applicable 33 | * fio-status 34 | * lspci -b -nn 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | ioMemory-vsl* 3 | root/.vs 4 | **/license.c 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | FIO_DRIVER = $(shell grep fio_driver_name fio-driver.spec | awk '{print $$3}' | head -1) 2 | FIO_VERSION = $(shell grep fio_version fio-driver.spec | awk '{print $$3}' | head -1) 3 | FIO_SRC_DIR = root/usr/src/$(shell ls root/usr/src) 4 | FIO_DIR = $(shell git rev-parse --show-toplevel) 5 | 6 | all: help 7 | 8 | .PHONY: dkms 9 | dkms: clean 10 | cd ${FIO_SRC_DIR} && \ 11 | $(MAKE) dkms 12 | 13 | .PHONY: dpkg 14 | dpkg: clean patch_module_version 15 | # patch fio_version, fio_short_version in debian/fio_values 16 | cd ${FIO_DIR} && \ 17 | dpkg-buildpackage -rfakeroot --no-check-builddeps --no-sign 18 | 19 | .PHONY: rpm 20 | rpm: clean patch_module_version 21 | # patch fio_version in fio-driver.spec 22 | mkdir -p ~/rpmbuild/SOURCES && \ 23 | tar -zcvf ~/rpmbuild/SOURCES/${FIO_DRIVER}-${FIO_VERSION}.tar.gz \ 24 | --transform s/${FIO_DRIVER}/${FIO_DRIVER}-${FIO_VERSION}/ \ 25 | ../${FIO_DRIVER} && \ 26 | cd ${FIO_DIR} && \ 27 | rpmbuild -ba fio-driver.spec 28 | 29 | .PHONY: module 30 | module: clean 31 | cd ${FIO_SRC_DIR} && \ 32 | $(MAKE) gpl 33 | 34 | clean: 35 | cd ${FIO_SRC_DIR} && \ 36 | $(MAKE) clean 37 | 38 | patch_module_version: 39 | cd ${FIO_SRC_DIR} && \ 40 | $(MAKE) patch_module_version 41 | 42 | 43 | define usage 44 | @echo Stub for making dkms, dpkg, the module and clean 45 | @echo usage: make "(dkms|dpkg|rpm|module|clean)" 46 | endef 47 | help: 48 | $(usage) 49 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | iomemory-vsl4 (4.3.7.1205-1.0) unstable; urgency=low 2 | 3 | * Initial Release. 4 | 5 | -- Support Mon, 07 Dec 2009 23:19:12 -0700 6 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: iomemory-vsl4 2 | Section: non-free 3 | Priority: extra 4 | Maintainer: Support 5 | Build-Depends: debhelper (>= 5), linux-headers | linux-headers-amd64, gcc, make, rsync 6 | Standards-Version: 3.7.3 7 | Homepage: http://support.fusionio.com 8 | 9 | Package: iomemory-vsl4-5.3.0-45-generic 10 | Architecture: amd64 11 | Provides: iomemory-vsl4, 12 | iomemory-vsl4-${fio-version}, 13 | iomemory-vsl, 14 | libvsl 15 | Conflicts: iodrive-driver, fio-driver, libvsl, iomemory-vsl4-source 16 | Replaces: iodrive-driver, fio-driver, libvsl 17 | Description: Driver for SanDisk Fusion ioMemory devices 18 | Driver for SanDisk Fusion ioMemory devices 19 | 20 | Package: iomemory-vsl4-config-5.3.0-45-generic 21 | Architecture: amd64 22 | Provides: iomemory-vsl4-config, 23 | iomemory-vsl4-config-${fio-version} 24 | Description: Configuration of iomemory-vsl4 for SanDisk Fusion ioMemory drivers 25 | Configuration of iomemory-vsl4 for SanDisk Fusion ioMemory drivers 26 | 27 | Package: iomemory-vsl4-source 28 | Architecture: amd64 29 | Depends: linux-headers | linux-headers-amd64, gcc, make, lsb-release 30 | Provides: iomemory-vsl4, 31 | iomemory-vsl4-${fio-version}, 32 | iomemory-vsl, 33 | libvsl 34 | Conflicts: iomemory-vsl4-${fio-version}, iomemory-vsl4 35 | Description: Source to build driver for SanDisk Fusion ioMemory devices 36 | Source to build driver for SanDisk Fusion ioMemory devices 37 | 38 | Package: iomemory-vsl4-di-5.3.0-45-generic 39 | Package-Type: udeb 40 | Architecture: amd64 41 | Depends: 42 | XB-Kernel-Version: 5.3.0-45-generic 43 | Section: debian-installer 44 | Description: Source to build driver for SanDisk Fusion ioMemory devices 45 | Source to build driver for SanDisk Fusion ioMemory devices 46 | 47 | Package: iomemory-vsl4-initrd-5.3.0-45-generic 48 | Architecture: amd64 49 | Depends: iomemory-vsl4 50 | XB-Modaliases: 51 | Description: Driver for SanDisk Fusion ioMemory devices for inclusion in ram disk 52 | Driver for SanDisk Fusion ioMemory devices for inclusion in ram disk 53 | 54 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/debian/dirs -------------------------------------------------------------------------------- /debian/fio_values: -------------------------------------------------------------------------------- 1 | fio_oem_name := fusionio 2 | fio_oem_name_short := fio 3 | fio_sourcedir := /usr/src 4 | fio_driver_name := iomemory-vsl4 5 | fio_version := 4.3.7.1205 6 | fio_short_version := 4.3.7 7 | fio_docdir := /usr/share/doc 8 | -------------------------------------------------------------------------------- /debian/iomemory-vsl4.install: -------------------------------------------------------------------------------- 1 | usr/share/doc/iomemory-vsl4/License 2 | usr/share/doc/iomemory-vsl4/NOTICE.iomemory-vsl 3 | usr/lib/fio/libvsl_4.so 4 | usr/share/doc/fio/NOTICE.libvsl_4 5 | etc/ld.so.conf.d/fio.conf 6 | -------------------------------------------------------------------------------- /debian/iomemory-vsl4.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" = "configure" ]; then 5 | ldconfig 6 | if [ ! -e /usr/lib/fio/libvsl.so ]; then 7 | ln -sf /usr/lib/fio/libvsl_4.so /usr/lib/fio/libvsl.so 8 | fi 9 | fi 10 | -------------------------------------------------------------------------------- /debian/iomemory-vsl4.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" = "remove" ]; then 5 | ldconfig 6 | fi 7 | 8 | -------------------------------------------------------------------------------- /debian/iomemory-vsl4.prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ "$1" = "remove" ]; then 5 | rm -f /usr/lib/fio/libvsl.so* 6 | cp /usr/lib/fio/libvsl_4.so /usr/lib/fio/libvsl-prev.so 7 | fi 8 | -------------------------------------------------------------------------------- /root/etc/ld.so.conf.d/fio.conf: -------------------------------------------------------------------------------- 1 | # fio drive support 2 | /usr/lib/fio 3 | -------------------------------------------------------------------------------- /root/usr/lib/fio/libvsl_4.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/lib/fio/libvsl_4.so -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/Kbuild: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- 2 | ifndef FIO_DRIVER_NAME 3 | $(error FIO_DRIVER_NAME is not defined) 4 | endif 5 | 6 | ifndef KFIO_LIB 7 | $(error KFIO_LIB is not defined - this is the path to the libkfio.o_shipped file) 8 | endif 9 | 10 | 11 | $(src)/license.c: $(src)/Kbuild 12 | printf '#include "linux/module.h"\nMODULE_LICENSE("GPL");\n' >$@ 13 | 14 | 15 | obj-m := $(FIO_DRIVER_NAME).o 16 | 17 | $(FIO_DRIVER_NAME)-y := main.o 18 | $(FIO_DRIVER_NAME)-y += dbgset.o 19 | $(FIO_DRIVER_NAME)-y += license.o 20 | $(FIO_DRIVER_NAME)-y += pci.o 21 | $(FIO_DRIVER_NAME)-y += sysrq.o 22 | $(FIO_DRIVER_NAME)-y += driver_init.o 23 | $(FIO_DRIVER_NAME)-y += kfio.o 24 | $(FIO_DRIVER_NAME)-y += errno.o 25 | $(FIO_DRIVER_NAME)-y += state.o 26 | $(FIO_DRIVER_NAME)-y += kmsg.o 27 | $(FIO_DRIVER_NAME)-y += six_lock.o 28 | $(FIO_DRIVER_NAME)-y += kcache.o 29 | $(FIO_DRIVER_NAME)-y += kfile.o 30 | $(FIO_DRIVER_NAME)-y += kmem.o 31 | $(FIO_DRIVER_NAME)-y += kscatter.o 32 | $(FIO_DRIVER_NAME)-y += ktime.o 33 | $(FIO_DRIVER_NAME)-y += sched.o 34 | $(FIO_DRIVER_NAME)-y += cdev.o 35 | $(FIO_DRIVER_NAME)-y += kscsi.o 36 | $(FIO_DRIVER_NAME)-y += kscsi_host.o 37 | $(FIO_DRIVER_NAME)-y += kblock.o 38 | $(FIO_DRIVER_NAME)-y += kcpu.o 39 | $(FIO_DRIVER_NAME)-y += kcondvar.o 40 | $(FIO_DRIVER_NAME)-y += common_kinfo.o 41 | $(FIO_DRIVER_NAME)-y += kinfo.o 42 | $(FIO_DRIVER_NAME)-y += kinit.o 43 | $(FIO_DRIVER_NAME)-y += kfio_common.o 44 | $(FIO_DRIVER_NAME)-y += khotplug.o 45 | $(FIO_DRIVER_NAME)-y += kcsr.o 46 | $(FIO_DRIVER_NAME)-y += $(patsubst %_shipped,%,$(KFIO_LIB)) 47 | $(FIO_DRIVER_NAME)-y += module_param.o 48 | 49 | # if kfio_internal.c exists, compile it 50 | ifneq ($(wildcard $(FUSION_DRIVER_DIR)/kfio_internal.c),) 51 | $(FIO_DRIVER_NAME)-y += kfio_internal.o 52 | endif 53 | 54 | EXTRA_CFLAGS:= -I$(INCLUDE_DIR) 55 | 56 | # This includes a kernel-specific config file (if one exists). 57 | # The file should be put in 58 | # include/fio/port/linux/kfio_config-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) 59 | # and #defines the macros that are enumerated in 60 | # include/fio/port/linux/kfio_config.h. 61 | KFIOC_H-VER := fio/port/linux/kfio_config-$(KERNELRELEASE).h 62 | KFIOC_H := $(wildcard $(INCLUDE_DIR)/$(KFIOC_H-VER)) 63 | EXTRA_CFLAGS += $(if $(KFIOC_H),-include "$(KFIOC_H-VER)") 64 | 65 | # 66 | # Include extra symbols from common-vsl module, if available 67 | # 68 | KFIO_EXT_SYMS ?= ../../fio-nexus/driverkit/Module.symvers 69 | KBUILD_EXTRA_SYMBOLS := $(wildcard $(KBUILD_EXTMOD)/$(KFIO_EXT_SYMS)) 70 | 71 | INSTALL_MOD_DIR ?= extra/fio 72 | 73 | ifneq ($(FIREHOSE_INSTALL_ROOT),) 74 | EXTRA_ARGS=INSTALL_MOD_PATH="$(FIREHOSE_INSTALL_ROOT)" 75 | endif 76 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/check_target_kernel.conf: -------------------------------------------------------------------------------- 1 | PREV_KERNELVER="6.8.0-52-generic" 2 | PREV_KERNEL_SRC="/lib/modules/6.8.0-52-generic/build" 3 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/check_target_kernel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Sets PREV_KERNELVER, PREV_KERNEL_SRC 4 | CONF="./check_target_kernel.conf" 5 | 6 | # kfio_config.h 7 | KFIO_CONFIG_H="include/fio/port/linux/kfio_config.h" 8 | 9 | if [ -e "$CONF" ] ; then 10 | . "$CONF" 11 | else 12 | PREV_KERNELVER="" 13 | PREV_KERNEL_SRC="" 14 | fi 15 | 16 | CUR_KERNELVER="$1" 17 | CUR_KERNEL_SRC="$2" 18 | 19 | RET=0 20 | if [ "$CUR_KERNELVER" != "$PREV_KERNELVER" ] ; then 21 | RET=1 22 | if [ "$PREV_KERNELVER" != "" ] ; then 23 | echo -n "KERNELVER " 24 | fi 25 | fi 26 | if [ "$CUR_KERNEL_SRC" != "$PREV_KERNEL_SRC" ] ; then 27 | RET=1 28 | if [ "$PREV_KERNEL_SRC" != "" ] ; then 29 | echo -n "KERNEL_SRC " 30 | fi 31 | fi 32 | echo "PREV_KERNELVER=\"$CUR_KERNELVER\"" > "$CONF" 33 | echo "PREV_KERNEL_SRC=\"$CUR_KERNEL_SRC\"" >> "$CONF" 34 | 35 | exit $RET 36 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/dbgset.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | #if defined (__linux__) 29 | #include 30 | #include "port-internal-boss.h" 31 | #endif 32 | /// @cond GENERATED_CODE 33 | #include 34 | /// @endcond 35 | #if (FUSION_INTERNAL==1) 36 | #include 37 | #endif 38 | #include 39 | 40 | #include 41 | #if (FUSION_INTERNAL==1) 42 | #include 43 | #endif 44 | 45 | /* Create storage for the debug flags */ 46 | /// @cond GENERATED_CODE 47 | #include 48 | /// @endcond 49 | 50 | /** 51 | * @ingroup PORT_COMMON_LINUX 52 | * @{ 53 | */ 54 | 55 | #define FIO_PORT_CONFIG_SET_DBGFLAG 56 | #define FIO_PORT_CONFIG_MACRO(dbgf) [_DF_ ## dbgf] = { .name = #dbgf, .mode = S_IRUGO | S_IWUSR, .value = dbgf }, 57 | 58 | #if (FUSION_INTERNAL==1) 59 | #include 60 | #define FIO_CONFIG_SET_DBGFLAG 61 | #define FIO_CONFIG_MACRO(dbgf) [_DF_ ## dbgf] = { .name = #dbgf, .mode = S_IRUGO | S_IWUSR, .value = dbgf }, 62 | #endif 63 | 64 | static struct dbgflag _dbgflags[] = { 65 | /// @cond GENERATED_CODE 66 | #include 67 | #if (FUSION_INTERNAL==1) 68 | #include 69 | #endif 70 | /// @endcond 71 | [_DF_END] = { .name = NULL, .mode = 0, .value =0 } 72 | }; 73 | 74 | struct dbgset _dbgset = { 75 | .flag_dir_name = "debug", 76 | .flags = _dbgflags 77 | }; 78 | 79 | /* Make debug flags module parameters so they can be set at module load-time */ 80 | /// @cond GENERATED_CODE 81 | #include 82 | /// @endcond 83 | #define FIO_PORT_CONFIG_SET_DBGFLAG 84 | #define FIO_PORT_CONFIG_MACRO(dbgf) module_param_named(debug_ ## dbgf, _dbgflags[_DF_ ## dbgf].value, uint, S_IRUGO | S_IWUSR); 85 | /// @cond GENERATED_CODE 86 | #include 87 | /// @endcond 88 | #if (FUSION_INTERNAL==1) 89 | /// @cond GENERATED_CODE 90 | #include 91 | /// @endcond 92 | #define FIO_CONFIG_SET_DBGFLAG 93 | #define FIO_CONFIG_MACRO(dbgf) module_param_named(debug_ ## dbgf, _dbgflags[_DF_ ## dbgf].value, uint, S_IRUGO | S_IWUSR); 94 | /// @cond GENERATED_CODE 95 | #include 96 | /// @endcond 97 | #endif 98 | 99 | /** 100 | * @} 101 | */ 102 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/dkms.conf: -------------------------------------------------------------------------------- 1 | MAKE="'make' DKMS_KERNEL_VERSION=$kernelver" 2 | CLEAN="'make' clean" 3 | BUILT_MODULE_NAME=iomemory-vsl4 4 | BUILT_MODULE_LOCATION='' 5 | PACKAGE_NAME=iomemory-vsl4 6 | PACKAGE_VERSION=4.3.7.1 7 | DEST_MODULE_LOCATION=/kernel/drivers/block 8 | AUTOINSTALL="Yes" 9 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/dkms.conf.example: -------------------------------------------------------------------------------- 1 | MAKE="'make' DKMS_KERNEL_VERSION=$kernelver" 2 | CLEAN="'make' clean" 3 | BUILT_MODULE_NAME=iomemory-vsl4 4 | BUILT_MODULE_LOCATION='' 5 | PACKAGE_NAME=iomemory-vsl4 6 | PACKAGE_VERSION=4.3.7 7 | DEST_MODULE_LOCATION=/kernel/drivers/block 8 | AUTOINSTALL="Yes" 9 | REMAKE_INITRD=Yes 10 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/driver_init.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2016 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | #include 29 | 30 | #include 31 | 32 | #include "fio/port/kfio.h" 33 | 34 | /** 35 | * @ingroup PORT_COMMON_LINUX 36 | * @{ 37 | */ 38 | 39 | // Global driver options 40 | char *numa_node_override[MAX_PCI_DEVICES]; 41 | int num_numa_node_override; 42 | 43 | 44 | MODULE_PARM_DESC(numa_node_override, "Override device to NUMA node binding"); 45 | module_param_array (numa_node_override, charp, &num_numa_node_override, S_IRUGO | S_IWUSR); 46 | 47 | 48 | int use_workqueue = USE_QUEUE_NONE; 49 | module_param (use_workqueue, int, S_IRUGO | S_IWUSR); 50 | 51 | // TODO: do we need any of this? 52 | #if FUSION_MEDIA_TEST_TOOL 53 | #if FUSION_INTERNAL || FUSION_DEBUG 54 | #error FUSION_MEDIA_TEST_TOOL must only be used only with a release build. 55 | #endif 56 | // Evil Hackery to enable module parameters required by the media test tool 57 | // without using an internal build 58 | 59 | int bypass_whitening = 0; // BYPASS_WHITENING; 60 | module_param(bypass_whitening, int, S_IRUGO | S_IWUSR); 61 | MODULE_PARM_DESC(bypass_whitening, "N/A"); 62 | 63 | int bypass_ecc = 0; // BYPASS_ECC; 64 | module_param(bypass_ecc, int, S_IRUGO | S_IWUSR); 65 | MODULE_PARM_DESC(bypass_ecc, "N/A"); 66 | 67 | int iodrive_scan_nv_data = 1; // IODRIVE_SCAN_NV_DATA; 68 | module_param(iodrive_scan_nv_data, int, S_IRUGO | S_IWUSR); 69 | MODULE_PARM_DESC(iodrive_scan_nv_data, "N/A"); 70 | 71 | int disable_rle = 0; // DISABLE_RLE; 72 | module_param(disable_rle, int, S_IRUGO | S_IWUSR); 73 | MODULE_PARM_DESC(disable_rle, "N/A"); 74 | 75 | int use_parity_if_optional = 1; // USE_PARITY_IF_OPTIONAL 76 | module_param(use_parity_if_optional, int, S_IRUGO | S_IWUSR); 77 | MODULE_PARM_DESC(use_parity_if_optional, "N/A"); 78 | 79 | #endif 80 | 81 | /** 82 | * @} 83 | */ 84 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/common/kinfo.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _COMMON_KINFO_H 30 | #define _COMMON_KINFO_H 31 | 32 | kfio_info_node_t *kfio_info_get_root_node(void); 33 | void kfio_info_lock(void); 34 | void kfio_info_unlock(void); 35 | kfio_info_node_t *kfio_info_find_node(kfio_info_node_t *topnode, char *fullname); 36 | int kfio_info_node_pathname(kfio_info_node_t *topnode, kfio_info_node_t *nodep, char *pathname, int len); 37 | int kfio_info_node_walk_tree(kfio_info_node_t *topnode, kfio_info_node_t *startnode, kfio_info_data_t *dbh); 38 | char *kfio_info_get_data_buffer(kfio_info_data_t *dbh); 39 | fio_size_t kfio_info_get_node_size(kfio_info_node_t *nodep); 40 | int kfio_info_get_node_type(kfio_info_node_t *nodep); 41 | 42 | 43 | #endif // _COMMON_KINFO_H 44 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/common/tsc.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // * Redistributions of source code must retain the above copyright notice, 7 | // this list of conditions and the following disclaimer. 8 | // * Redistributions in binary form must reproduce the above copyright notice, 9 | // this list of conditions and the following disclaimer in the documentation 10 | // and/or other materials provided with the distribution. 11 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 12 | // may be used to endorse or promote products derived from this software 13 | // without specific prior written permission. 14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 20 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | // ----------------------------------------------------------------------------- 27 | 28 | #ifndef _FIO_COMMON_TSC_H_ 29 | #define _FIO_COMMON_TSC_H_ 30 | 31 | #include 32 | #include 33 | 34 | #define FIO_TSC_CORES_NOT_SYNCED 0 35 | 36 | #if FIO_TSC_CORES_NOT_SYNCED 37 | #include 38 | #endif 39 | 40 | /// @brief Time Stamp Counter 41 | /// @note The Time Stamp Counter is potentially unique for each CPU, so if we are going 42 | /// to compare them, we had better remember which CPU the value was taken from, 43 | /// unless the TSCs are guaranteed to be synchronized between CPUs 44 | /// (which we think is true in all modern processors). 45 | struct fio_tsc 46 | { 47 | uint64_t tsc_value; 48 | #if FIO_TSC_CORES_NOT_SYNCED 49 | kfio_cpu_t tsc_cpu; 50 | #endif 51 | }; 52 | 53 | /// @brief Get the tsc now. 54 | static inline void fio_tsc_now(struct fio_tsc *tsc) 55 | { 56 | #if FIO_TSC_CORES_NOT_SYNCED 57 | tsc->tsc_cpu = kfio_current_cpu(); 58 | #endif 59 | tsc->tsc_value = kfio_rdtsc(); 60 | } 61 | 62 | /// @brief Find the difference between TSCs. 63 | /// @note If there is a problem finding it, return 0. We can use 0 as an error 64 | /// value because it is impossible to get two TSCs on exactly the same CPU clock. 65 | /// @note If the difference is <0, return 0. 66 | static inline uint64_t fio_tsc_diff(struct fio_tsc *t1, struct fio_tsc *t2) 67 | { 68 | int64_t diff = t2->tsc_value - t1->tsc_value; 69 | 70 | #if FIO_TSC_CORES_NOT_SYNCED 71 | if (t2->tsc_cpu != t1->tsc_cpu) 72 | { 73 | return 0; 74 | } 75 | #endif 76 | 77 | return diff > 0 ? (uint64_t)diff : 0; 78 | } 79 | 80 | /// @brief Find the difference from a TSC and now. 81 | /// @note If there is a problem finding it, return 0. 82 | static inline uint64_t fio_tsc_diff_from_now(struct fio_tsc *tsc1) 83 | { 84 | struct fio_tsc now; 85 | 86 | fio_tsc_now(&now); 87 | return fio_tsc_diff(tsc1, &now); 88 | } 89 | 90 | extern uint64_t fio_tsc_per_us(void); 91 | 92 | #endif // _FIO_COMMON_TSC_H_ 93 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/common/uuid.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_UUID_H_ 30 | #define _FIO_PORT_UUID_H_ 31 | 32 | #include 33 | #include 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | // Used when we really know that casting off a const is ok. 40 | #define FIO_DECONST(x) ((void *)(fio_intptr_t)(x)) 41 | 42 | #define FIO_UUID_STRING_LEN 37 43 | typedef char fio_uuid_str_t[FIO_UUID_STRING_LEN]; 44 | 45 | #define FIO_UUID_LEN 16 46 | typedef unsigned char fio_uuid_t[FIO_UUID_LEN]; 47 | 48 | DllExport 49 | void fio_uuid_copy(fio_uuid_t dest, const fio_uuid_t src); 50 | 51 | void fio_uuid_clear(fio_uuid_t uu); 52 | 53 | int fio_uuid_is_null(const fio_uuid_t uu); 54 | 55 | DllExport 56 | void fio_uuid_generate(fio_uuid_t uu); 57 | 58 | DllExport 59 | void fio_uuid_unparse(const fio_uuid_t uu, char *); 60 | 61 | DllExport 62 | int fio_uuid_parse(const char *in, fio_uuid_t uu); 63 | 64 | int fio_uuid_compare(const fio_uuid_t uu1, const fio_uuid_t uu2); 65 | 66 | // Homegrown functions that deal with the string version of the uuid. 67 | DllExport 68 | void fio_uuid_str_copy(fio_uuid_str_t dest, const fio_uuid_str_t src); 69 | 70 | DllExport 71 | int fio_uuid_str_compare(const fio_uuid_str_t u1, const fio_uuid_str_t u2); 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif /* _FIO_PORT_UUID_H_ */ 78 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/align.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2011-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_ALIGN_H__ 30 | #define __FIO_PORT_ALIGN_H__ 31 | 32 | /* 33 | * This header is for the defintion of FUSION_STRUCT_ALIGN 34 | * and the verification macro FUSION_STRUCT_ALIGN_VERIFY. 35 | * 36 | * The proper way to use FUSION_STRUCT_ALIGN is thus: 37 | * struct FUSION_STRUCT_ALIGN(8) my_struct 38 | * { 39 | * uint32_t my_32_member; 40 | * }; 41 | * FUSION_STRUCT_ALIGN_VERIFY(8, struct my_struct); 42 | * 43 | * or 44 | * typedef struct FUSION_STRUCT_ALIGN(8) my_struct 45 | * { 46 | * uint32_t my_32_member; 47 | * } my_struct_t; 48 | * FUSION_STRUCT_ALIGN_VERIFY(8, my_struct_t); 49 | * 50 | * Since some incorrect uses of FUSION_STRUCT_ALIGN don't produce a compile 51 | * error nor do they align, all common code uses of FUSION_STRUCT_ALIGN 52 | * should verify proper alignment by calling FUSION_STRUCT_ALIGN_VERIFY. 53 | * 54 | * As well we add DECLARE_RESERVE 55 | */ 56 | 57 | #if defined(__GNUC__) 58 | #include 59 | #elif defined(WINNT) || defined(WIN32) || defined(_MSC_VER) 60 | #include 61 | #else 62 | #error Unsupported compiler - needs alignment macros defined 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/arch/ppc/atomic.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_ARCH_PPC_ATOMIC_H 30 | #define _FIO_PORT_ARCH_PPC_ATOMIC_H 31 | 32 | typedef struct fusion_atomic32 { 33 | volatile int32_t value; 34 | } fusion_atomic32_t; 35 | 36 | typedef struct fusion_atomic64 { 37 | volatile int64_t value; 38 | } fusion_atomic64_t; 39 | 40 | // Use the sync builtins, see arch/x86_common/atomic.h for more info 41 | 42 | static inline void fusion_atomic32_set(fusion_atomic32_t *atomp, int32_t val) 43 | { 44 | atomp->value = val; 45 | } 46 | 47 | static inline int32_t fusion_atomic32_read(fusion_atomic32_t *atomp) 48 | { 49 | return atomp->value; 50 | } 51 | 52 | static inline void fusion_atomic32_add(fusion_atomic32_t *atomp, int32_t val) 53 | { 54 | (void)__sync_add_and_fetch(&atomp->value, val); 55 | } 56 | 57 | static inline void fusion_atomic32_inc(fusion_atomic32_t *atomp) 58 | { 59 | (void)__sync_add_and_fetch(&atomp->value, 1); 60 | } 61 | 62 | static inline int32_t fusion_atomic32_incr(fusion_atomic32_t *atomp) 63 | { 64 | return __sync_add_and_fetch(&atomp->value, 1); 65 | } 66 | 67 | static inline int32_t fusion_atomic32_add_return(fusion_atomic32_t *atomp, int32_t val) 68 | { 69 | return __sync_add_and_fetch(&atomp->value, val); 70 | } 71 | 72 | static inline void fusion_atomic32_dec(fusion_atomic32_t *atomp) 73 | { 74 | (void)__sync_sub_and_fetch(&atomp->value, 1); 75 | } 76 | 77 | static inline int32_t fusion_atomic32_decr(fusion_atomic32_t *atomp) 78 | { 79 | return __sync_sub_and_fetch(&atomp->value, 1); 80 | } 81 | 82 | static inline void fusion_atomic32_sub(fusion_atomic32_t *atomp, int32_t val) 83 | { 84 | (void)__sync_sub_and_fetch(&atomp->value, val); 85 | } 86 | 87 | static inline int32_t fusion_atomic32_sub_return(fusion_atomic32_t *atomp, int32_t val) 88 | { 89 | return __sync_sub_and_fetch(&atomp->value, val); 90 | } 91 | 92 | /* 93 | Taken from http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html 94 | 95 | This builtin (__sync_lock_test_and_set), as described by Intel, is not a 96 | traditional test-and-set operation, but rather an atomic exchange operation. 97 | It writes value into *ptr, and returns the previous contents of *ptr. 98 | 99 | Many targets have only minimal support for such locks, and do not support a full 100 | exchange operation. In this case, a target may support reduced functionality here 101 | by which the only valid value to store is the immediate constant 1. The exact value 102 | actually stored in *ptr is implementation defined. 103 | 104 | This builtin is not a full barrier, but rather an acquire barrier. This means that 105 | references after the builtin cannot move to (or be speculated to) before the builtin, 106 | but previous memory stores may not be globally visible yet, and previous memory loads 107 | may not yet be satisfied. 108 | */ 109 | static inline int32_t fusion_atomic32_exchange(fusion_atomic32_t *atomp, int32_t val) 110 | { 111 | return __sync_lock_test_and_set(&atomp->value, val); 112 | } 113 | 114 | #endif /* _FIO_PORT_ARCH_PPC_ATOMIC_H */ 115 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/arch/ppc/cache.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #ifndef __FIO_PORT_PPC_CACHE__ 29 | #define __FIO_PORT_PPC_CACHE__ 30 | 31 | #define FUSION_HAS_PREFETCH 0 32 | 33 | static inline void fusion_prefetch_t0(char *addr) 34 | { 35 | } 36 | 37 | static inline void fusion_prefetch_nta(char *addr) 38 | { 39 | } 40 | 41 | static void fusion_prefetch_page(void *addr) 42 | { 43 | } 44 | 45 | #endif /* __FIO_PORT_PPC_CACHE__ */ 46 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/arch/x86_common/cache.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_X86_CACHE__ 30 | #define __FIO_PORT_X86_CACHE__ 31 | 32 | #define FUSION_HAS_PREFETCH 1 33 | 34 | #ifdef __GNUC__ 35 | 36 | static inline void fusion_prefetch_t0(void *addr){ 37 | __asm__ __volatile__("\n\tprefetcht0 %0" 38 | : 39 | : "m" (addr)); 40 | } 41 | 42 | static inline void fusion_prefetch_nta(void *addr){ 43 | __asm__ __volatile__("\n\tprefetchnta %0" 44 | : 45 | : "m" (addr)); 46 | } 47 | 48 | 49 | static inline void fusion_prefetch_page(void *addr) 50 | { 51 | __asm__ __volatile__( 52 | " prefetcht0 0*64(%0)\n" 53 | : 54 | : "r" (addr)); 55 | } 56 | 57 | #else /* __GNUC__ */ 58 | 59 | /* 60 | The following functions should be provided for different compilers 61 | WINNT in particular. Until then, they are going to do nothing. 62 | */ 63 | 64 | static inline void fusion_prefetch_t0(void *addr) 65 | { 66 | } 67 | 68 | static inline void fusion_prefetch_nta(void *addr) 69 | { 70 | } 71 | 72 | static inline void fusion_prefetch_page(void *addr) 73 | { 74 | } 75 | 76 | #endif /* __GNUC__ */ 77 | 78 | #endif /* __FIO_PORT_X86_CACHE__ */ 79 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/atomic_list.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2011-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FUSION_ATOMIC_LIST_H__ 30 | #define __FUSION_ATOMIC_LIST_H__ 31 | 32 | #include 33 | 34 | /* 35 | * Below is an implementation of a singly linked compare-and-exchange (or 36 | * load and swap) list. It is safe to add to this list without protection 37 | * of locks. 38 | */ 39 | struct fio_atomic_list 40 | { 41 | struct fio_atomic_list *next; 42 | }; 43 | 44 | #define fusion_atomic_list_init(head) ((head)->next = NULL) 45 | 46 | static inline int fusion_atomic_list_empty(struct fio_atomic_list *list) 47 | { 48 | return list->next == NULL; 49 | } 50 | 51 | static inline void fusion_atomic_list_add(struct fio_atomic_list *entry, 52 | struct fio_atomic_list *head) 53 | { 54 | struct fio_atomic_list *cur; 55 | 56 | do 57 | { 58 | cur = head->next; 59 | entry->next = cur; 60 | } while (kfio_cmpxchg(&head->next, cur, entry) != cur); 61 | } 62 | 63 | static inline void fusion_atomic_list_splice(struct fio_atomic_list *list, 64 | struct fio_atomic_list *head) 65 | { 66 | head->next = kfio_xchg(&list->next, NULL); 67 | } 68 | 69 | #define fusion_atomic_list_for_each(pos, n, head) \ 70 | for (pos = (head)->next, (n = pos ? pos->next : NULL); pos; \ 71 | pos = n, n = pos ? pos->next : NULL) 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/cdev.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_COMS_PORT_CDEV_H__ 30 | #define __FIO_COMS_PORT_CDEV_H__ 31 | 32 | #include 33 | 34 | /// @defgroup CDEVAPI-publicport CDEV PUBLICPORT API (public-client or port => cdev interfaces) 35 | /// @{ 36 | 37 | struct coms_cdev; 38 | typedef struct __fusion_poll_struct coms_poll_struct; /// @todo why is this here when the __ version is in port? 39 | 40 | extern uint32_t coms_cdev_get_dev_number(const struct coms_cdev *cdev); 41 | extern const char *coms_cdev_get_name(const struct coms_cdev *cdev); 42 | extern const char *coms_cdev_get_bus_name(const struct coms_cdev *cdev); 43 | 44 | typedef int (*coms_cdev_enum_fn)(void *caller_handle, void *param); 45 | extern struct coms_cdev *coms_port_cdev_enumerate(coms_cdev_enum_fn enum_proc, int fail_on_locked, void *param); 46 | 47 | extern int coms_cdev_is_alerted(struct coms_cdev *cdev); 48 | extern coms_poll_struct *coms_cdev_get_poll_struct(struct coms_cdev *cdev); 49 | extern int coms_cdev_ioctl(struct coms_cdev *cdev, unsigned int cmd, fio_uintptr_t arg); 50 | 51 | // Function to wait for device file creation 52 | extern int coms_wait_for_dev(const char *devname); 53 | /// @} 54 | 55 | #endif //__FIO_COMS_PORT_CDEV_H__ 56 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/commontypes.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | // 30 | // This file is shared between kernel and user source files. All items shared 31 | // between the two environments are included in here... 32 | // 33 | 34 | #ifndef __FUSION_LINUX_COMMONTYPES_H__ 35 | #define __FUSION_LINUX_COMMONTYPES_H__ 36 | 37 | #include 38 | 39 | /** 40 | * @ingroup PORT_COMMON_LINUX 41 | * @{ 42 | */ 43 | 44 | #define ATTRIBUTE_ALIGNED(x) \ 45 | __attribute__((aligned(x))) 46 | 47 | #define UFIO_CONTROL_DEVICE_PATH "/dev/" 48 | #define UFIO_CONTROL_DEVICE_COMMON_PATH UFIO_CONTROL_DEVICE_PATH 49 | #define UFIO_CONTROL_DEVICE_PREFIX "fct" 50 | #define UFIO_BLOCK_DEVICE_PREFIX "fio" 51 | #define UFIO_CONTROL_DEVICE_BASE UFIO_CONTROL_DEVICE_PATH UFIO_CONTROL_DEVICE_PREFIX 52 | 53 | // Add 10 to ensure that we have sufficient padding in the device name 54 | // which will either be "fct" or "fio" plus the identifier. 55 | #define UFIO_DEVICE_FILE_MAX_LEN sizeof(UFIO_CONTROL_DEVICE_PATH) + 10 56 | 57 | /** 58 | * @} 59 | */ 60 | 61 | #endif // __FUSION_LINUX_COMMONTYPES_H__ 62 | 63 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/div64.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | #ifndef _KFIO_LINUX_DIV64_H 31 | #define _KFIO_LINUX_DIV64_H 32 | 33 | /** 34 | * @ingroup PORT_COMMON_LINUX 35 | * @{ 36 | */ 37 | 38 | #if FIO_BITS_PER_LONG == 64 39 | 40 | static inline uint64_t kfio_div64_64(uint64_t dividend, uint64_t divisor) 41 | { 42 | return dividend / divisor; // For 64-bit, can directly return the quotient. 43 | } 44 | 45 | static inline uint64_t kfio_mod64_64(uint64_t dividend, uint64_t divisor) 46 | { 47 | return dividend % divisor; 48 | } 49 | 50 | #else 51 | 52 | uint64_t kfio_div64_64(uint64_t dividend, uint64_t divisor); 53 | uint64_t kfio_mod64_64(uint64_t divident, uint64_t divisor); 54 | 55 | #endif 56 | /** 57 | * @} 58 | */ 59 | 60 | #endif /* _KFIO_LINUX_DIV64_H */ 61 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/errno.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | #ifndef __FIO_PORT_LINUX_ERRNO_H__ 31 | #define __FIO_PORT_LINUX_ERRNO_H__ 32 | 33 | #if !defined(__FIO_PORT_ERRNO_H__) 34 | #error Dont include directly - instead include 35 | #endif 36 | 37 | #if !defined(__KERNEL__) 38 | # include 39 | #elif !defined(__VMKLNX__) 40 | /* 41 | * Including this file lets external file into port compilation, which is technically 42 | * a layering violation - generic code should not depend on external files. We make 43 | * an exception for errno values as these are generally not subject to ABI changes and 44 | * do not bring anything else in. 45 | */ 46 | # include 47 | 48 | /// @ingroup PORT_COMMON_LINUX 49 | /* Linux has no ENOTSUP error code. */ 50 | # define ENOTSUP EOPNOTSUPP 51 | 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/kblock.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | /** @file 29 | * NO OS-SPECIFIC REFERENCES ARE TO BE IN THIS FILE 30 | * 31 | */ 32 | #ifndef __FIO_PORT_LINUX_KBLOCK_H__ 33 | #define __FIO_PORT_LINUX_KBLOCK_H__ 34 | 35 | /** 36 | * @ingroup PORT_COMMON_LINUX 37 | * @{ 38 | */ 39 | #define FIO_NUM_MINORS 16 40 | 41 | // common-linux BLOCK initialization interfaces 42 | 43 | extern int kfio_platform_init_block_interface(void); 44 | extern int kfio_platform_teardown_block_interface(void); 45 | /** 46 | * @} 47 | */ 48 | #endif // __FIO_PORT_LINUX_KBLOCK_H__ 49 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/kcondvar.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | #ifndef __FIO_PORT_KCONDVAR_H__ 31 | #error Please include rather than this file directly. 32 | #endif 33 | #ifndef __FIO_PORT_LINUX_KCONDVAR_H__ 34 | #define __FIO_PORT_LINUX_KCONDVAR_H__ 35 | 36 | #if !defined(__linux__) 37 | #error This file supports only Linux 38 | #endif 39 | 40 | /** 41 | * @ingroup PORT_COMMON_LINUX 42 | * @{ 43 | */ 44 | 45 | typedef fusion_spinlock_t fusion_cv_lock_t; 46 | 47 | #define fusion_cv_lock_init(lk, n) fusion_init_spin(lk, n) 48 | #define fusion_cv_lock_destroy(lk) fusion_destroy_spin(lk) 49 | #define fusion_cv_lock(lk) fusion_spin_lock(lk) 50 | #define fusion_cv_trylock(lk) fusion_spin_trylock(lk) 51 | #define fusion_cv_unlock(lk) fusion_spin_unlock(lk) 52 | #define fusion_cv_lock_irq(lk) fusion_spin_lock_irqsave(lk) 53 | #define fusion_cv_trylock_irq(lk) fusion_spin_trylock_irqsave(lk) 54 | #define fusion_cv_unlock_irq(lk) fusion_spin_unlock_irqrestore(lk) 55 | #define fusion_cv_lock_is_irqsaved(lk) fusion_spin_is_irqsaved(lk) 56 | 57 | /** 58 | * @} 59 | */ 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/kpci.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_LINUX_KPCI_H__ 30 | #define __FIO_PORT_LINUX_KPCI_H__ 31 | 32 | /** 33 | * @ingroup PORT_COMMON_LINUX 34 | * @{ 35 | */ 36 | 37 | // We just need 2x4 bytes on Linux 38 | typedef struct kfio_msix 39 | { 40 | DECLARE_RESERVE(8); 41 | } kfio_msix_t; 42 | 43 | #define PORT_SUPPORTS_MSIX 44 | 45 | typedef struct __kfio_pci_dev kfio_pci_dev_t; 46 | typedef struct __kfio_pci_bus kfio_pci_bus_t; 47 | 48 | #define PORT_SUPPORTS_BUS_EXPLORE 49 | 50 | struct kfio_pci_csr_handle; 51 | 52 | extern int kfio_pci_map_barnum(kfio_pci_dev_t *pci_dev, const char *device_label, void **bar_virt, uint32_t barnum); 53 | extern void kfio_pci_unmap_barnum(kfio_pci_dev_t *pci_dev, void* bar_virt); 54 | 55 | #define kfio_pci_map_bar kfio_pci_map_barnum 56 | #define kfio_pci_unmap_bar kfio_pci_unmap_barnum 57 | 58 | /** 59 | * @} 60 | */ 61 | #endif /* __FIO_PORT_LINUX__KPCI_H__ */ 62 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/kscsi.h: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------- 2 | // Copyright (c) 2013-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // -------------------------------------------------------------------------- 28 | 29 | // This file contains SCSI driver interfaces between the common-linux and specific-linux porting layers. 30 | // It abstracts slight differences in linux variant mid-layer semantics. 31 | 32 | #ifndef _FIO_PORT_COMMON_LINUX_KSCSI_ 33 | #define _FIO_PORT_COMMON_LINUX_KSCSI_ 34 | 35 | #ifndef __FIO_PORT_KSCSI_H__ 36 | #error Do not include this file directly - instead include 37 | #endif 38 | 39 | #include 40 | 41 | /** 42 | * @ingroup PORT_COMMON_LINUX 43 | * @{ 44 | */ 45 | // common-linux => specific-linux interfaces. 46 | 47 | struct Scsi_Host; 48 | struct pci_dev; 49 | 50 | extern int fio_port_scsi_host_register_host(struct Scsi_Host *sh, struct pci_dev *pdev); 51 | extern void fio_port_scsi_host_unregister_host(struct Scsi_Host *sh); 52 | 53 | // common-linux SCSI initialization interfaces 54 | 55 | extern int kfio_platform_init_scsi_interface(void); 56 | extern int kfio_platform_teardown_scsi_interface(void); 57 | 58 | /** 59 | * @} 60 | */ 61 | 62 | #endif // _FIO_PORT_COMMON_LINUX_KSCSI_ 63 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/stdint.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | #ifndef __FIO_PORT_LINUX_STDINT_H__ 31 | #define __FIO_PORT_LINUX_STDINT_H__ 32 | 33 | /** 34 | * @ingroup PORT_COMMON_LINUX 35 | * @{ 36 | */ 37 | #ifndef _LINUX_TYPES_H 38 | 39 | /* Exact integral types. */ 40 | 41 | /* Signed. */ 42 | 43 | typedef signed char int8_t; 44 | typedef short int int16_t; 45 | typedef int int32_t; 46 | # if defined(__x86_64__) || defined(__PPC64__) || defined(__mips64) 47 | typedef long int int64_t; 48 | 49 | # else 50 | __extension__ 51 | typedef long long int int64_t; 52 | 53 | # endif 54 | 55 | /* Unsigned. */ 56 | typedef unsigned char uint8_t; 57 | typedef unsigned short int uint16_t; 58 | #ifndef __uint32_t_defined 59 | typedef unsigned int uint32_t; 60 | # define __uint32_t_defined 61 | #endif 62 | 63 | #if defined(__x86_64__) || defined(__PPC64__) || defined(__mips64) 64 | typedef unsigned long int uint64_t; 65 | 66 | #else 67 | __extension__ 68 | typedef unsigned long long int uint64_t; 69 | 70 | #endif 71 | 72 | #endif // _LINUX_TYPES_H 73 | 74 | #if defined(__x86_64__) || defined(__PPC64__) || defined(__mips64) 75 | #if !defined PRIi64 76 | #define PRIi64 "ld" 77 | #endif 78 | #if !defined PRIu64 79 | #define PRIu64 "lu" 80 | #endif 81 | #if !defined PRIx64 82 | #define PRIx64 "lx" 83 | #endif 84 | 85 | #else 86 | #if !defined PRIi64 87 | #define PRIi64 "lld" 88 | #endif 89 | #if !defined PRIu64 90 | #define PRIu64 "llu" 91 | #endif 92 | #if !defined PRIx64 93 | #define PRIx64 "llx" 94 | #endif 95 | 96 | #endif 97 | 98 | /** 99 | * @} 100 | */ 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/common-linux/ufio.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | #ifndef _FIO_PORT_LINUX_UFIO_H_ 31 | # define _FIO_PORT_LINUX_UFIO_H_ 32 | 33 | # ifndef _FIO_PORT_UFIO_H_ 34 | # error Do not include this file directly - instead include 35 | # endif 36 | 37 | /** 38 | * @ingroup PORT_COMMON_LINUX 39 | * @{ 40 | */ 41 | 42 | # define UFIO_CONTROL_DEVICE_PATH "/dev/" 43 | 44 | # define UFIO_KINFO_ROOT "fusion" 45 | 46 | # define UFIO_MODPARAMS_DIR "/sys/module/" FIO_DRIVER_NAME "/parameters" 47 | 48 | # define _FILE_OFFSET_BITS 64 49 | 50 | # if !defined(__KERNEL__) 51 | # include 52 | # include 53 | # include 54 | 55 | # if FUSION_DEBUG 56 | 57 | #if defined(__x86_64__) || defined(__i386__) 58 | # define kassert(x) do { if(!(x)) { fprintf(stderr, "ASSERT FAILED: %s:%d %s\n", __FILE__, __LINE__, #x); asm("int3"); } } while(0) 59 | #else 60 | # define kassert(x) do { if(!(x)) { fprintf(stderr, "ASSERT FAILED: %s:%d %s\n", __FILE__, __LINE__, #x); exit(-1); } } while(0) 61 | #endif 62 | # define kdebug(x) x 63 | 64 | # else 65 | 66 | # define kassert(x) do { } while(0) 67 | # define kdebug(x) do { } while(0) 68 | 69 | # endif 70 | 71 | /// @brief allocate aligned memory 72 | /// 73 | /// @param ptrptr pointer to the memory that needs to be aligned 74 | /// @param alignment alignment value desired by caller 75 | /// @param size size of the memory requested by caller 76 | /// 77 | /// @return 0 on success 78 | /// EINVAL if alignment is not a power of two or is not a multiple of 79 | /// sizeof(void *) 80 | /// ENOMEM if there was insufficient memory to fulfill the allocation 81 | /// request 82 | 83 | static inline int ufio_memalign(void **ptrptr, size_t alignment, size_t size) 84 | { 85 | return posix_memalign(ptrptr, alignment, size); 86 | } 87 | 88 | # endif /* !defined(__KERNEL__) */ 89 | /** 90 | * @} 91 | */ 92 | 93 | 94 | #endif /* _FIO_PORT_LINUX_UFIO_H_ */ 95 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/commontypes.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_COMMONTYPES_H_ 30 | #define _FIO_PORT_COMMONTYPES_H_ 31 | 32 | #include 33 | 34 | #if defined(USERSPACE_KERNEL) 35 | #include 36 | #elif defined(UEFI) 37 | #include 38 | #elif defined(__VMKAPI__) 39 | #include 40 | #elif defined(__linux__) || defined(__VMKLNX__) 41 | #include 42 | #elif defined(__SVR4) && defined(__sun) 43 | #include 44 | #elif defined(__FreeBSD__) 45 | #include 46 | #elif defined(__OSX__) 47 | #include 48 | #elif defined(WINNT) || defined(WIN32) 49 | #include 50 | #else 51 | #error Unsupported OS - if you are porting, try starting with a copy of stubs 52 | #endif 53 | 54 | //============================================================================ 55 | // Useful pre-processor string manipulation macros 56 | //============================================================================ 57 | 58 | #define FIO_UNICODE_HELPER(str) L##str 59 | #define FIO_UNICODE(str) FIO_UNICODE_HELPER(str) 60 | 61 | #define FIO_STRINGIZE_HELPER(str) #str 62 | #define FIO_STRINGIZE(str) FIO_STRINGIZE_HELPER(str) 63 | 64 | #if !defined(C_ASSERT) 65 | // Assert a compile time condition in a global context 66 | // 67 | // Unfortunately this definition of C_ASSERT is mutually exclusive with 68 | // using -Wredundant-decls. That's the lessor of two evils. 69 | // 70 | #ifdef __cplusplus 71 | // c/c++ linkage errors eliminated 72 | #define C_ASSERT(x) extern "C" int __CPP_ASSERT__ [(x)?1:-1] 73 | #else 74 | #define C_ASSERT(x) extern int __C_ASSERT__ [(x)?1:-1] 75 | #endif 76 | #endif 77 | 78 | #if !defined(STATIC_ASSERT) 79 | // Assert a compile time condition in a function context 80 | #if defined(__cplusplus) && __cplusplus >= 201103l 81 | #define STATIC_ASSERT(x) static_assert(x, "Assertion Failed: " #x) 82 | #else 83 | #define STATIC_ASSERT(x) \ 84 | do \ 85 | { \ 86 | enum { static_assert = 1/(x) }; \ 87 | } while (0) 88 | #endif 89 | #endif /* !STATIC_ASSERT */ 90 | 91 | #endif /* _FIO_PORT_COMMONTYPES_H_ */ 92 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/fio-poppack.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | // NOTE: There is a similar error trap define in include/fio/dev/types.h. 30 | 31 | #if defined(_MSC_VER) 32 | #include 33 | #endif 34 | 35 | #undef ATTRIBUTE_PACKED_ALIGNED 36 | #define ATTRIBUTE_PACKED_ALIGNED(x) ERROR You_must_include_fio_pshpack1_h_before_and_fio_poppack_h_after_any_use_of_ATTRIBUTE_PACKED_ALIGNED_or_UNALIGNED 37 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/fio-port.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | 29 | #include 30 | 31 | #if defined(__KERNEL__) 32 | # include 33 | #endif 34 | 35 | #include 36 | #include 37 | 38 | 39 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/fio-pshpack1.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #if defined(_MSC_VER) 30 | #include 31 | #undef ATTRIBUTE_PACKED_ALIGNED 32 | #define ATTRIBUTE_PACKED_ALIGNED(x) ATTRIBUTE_ALIGNED(x) 33 | 34 | #else 35 | 36 | #undef ATTRIBUTE_PACKED_ALIGNED 37 | #define ATTRIBUTE_PACKED_ALIGNED(x) __attribute__((packed)) __attribute__((aligned(x))) 38 | #endif 39 | 40 | #ifndef ATTRIBUTE_PACKED_UNALIGNED 41 | #define ATTRIBUTE_PACKED_UNALIGNED ATTRIBUTE_PACKED_ALIGNED(1) 42 | #endif 43 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/fio-stat.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2011-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_STAT_H__ 30 | #define __FIO_PORT_STAT_H__ 31 | 32 | // This file creates portability between OS's for the sys/stat.h functions. 33 | 34 | #include 35 | #include 36 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/fiostring.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2010-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_STRINGS_H__ 30 | #define __FIO_STRINGS_H__ 31 | 32 | #include 33 | 34 | 35 | #endif // __FIO_STRINGS_H__ 36 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/gcc/align.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2011-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //---------------------------------------------------------------------------------------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_GCC_ALIGN_H__ 30 | #define __FIO_PORT_GCC_ALIGN_H__ 31 | 32 | #define FUSION_STRUCT_ALIGN(alignment_byte) __attribute__((aligned(alignment_byte))) 33 | 34 | /* 35 | * Since some incorrect uses of FUSION_STRUCT_ALIGN don't produce a compile 36 | * error nor do they align, all common code uses of FUSION_STRUCT_ALIGN 37 | * should verify proper alignment by calling FUSION_STRUCT_ALIGN_VERIFY. 38 | */ 39 | #define FUSION_STRUCT_ALIGN_VERIFY(align_bytes,structure) \ 40 | C_ASSERT(__alignof__(structure) == (align_bytes)) 41 | 42 | #define DECLARE_RESERVE(x) char foo[x] __attribute__ ((aligned(8))) 43 | 44 | #define FUSION_DMA_ALIGN(x) x __attribute__((aligned(32))) 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/gcc/compiler.h: -------------------------------------------------------------------------------- 1 | 2 | //----------------------------------------------------------------------------- 3 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 4 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without 7 | // modification, are permitted provided that the following conditions are met: 8 | // * Redistributions of source code must retain the above copyright notice, 9 | // this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright notice, 11 | // this list of conditions and the following disclaimer in the documentation 12 | // and/or other materials provided with the distribution. 13 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 14 | // may be used to endorse or promote products derived from this software 15 | // without specific prior written permission. 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 18 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 22 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | //----------------------------------------------------------------------------- 29 | 30 | /* FIXME - this should be more selective about which gcc version is covered */ 31 | 32 | #ifndef __FIO_PORT_COMPILER_LINUX_H__ 33 | #define __FIO_PORT_COMPILER_LINUX_H__ 34 | 35 | #ifndef __FIO_PORT_COMPILER_H__ 36 | # error Do not include this file directly - instead inclued 37 | #endif 38 | 39 | #define __must_use_result __attribute__((warn_unused_result)) 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/ifio.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_IFIO_H_ 30 | #define _FIO_PORT_IFIO_H_ 31 | 32 | const char *ifio_strerror(int errnum); 33 | const char *ifio_strerror_sym(int errnum); 34 | 35 | #endif /* _FIO_PORT_IFIO_H_ */ 36 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/kcsr.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2016 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_KCSR_H__ 30 | #define __FIO_PORT_KCSR_H__ 31 | 32 | struct kfio_csr_handle 33 | { 34 | volatile void *bar_virt; 35 | volatile void *bar2_virt; 36 | volatile struct _bar_top_csr *csr_virt; 37 | volatile struct iodrive_nwlogic_s2c_registers *dma_s2c_virt; 38 | volatile struct iodrive_nwlogic_c2s_registers *dma_c2s_virt; 39 | volatile struct iodrive_common_DMA_CSR *dma_common_virt; 40 | void *csr_hdl; 41 | uint8_t indirect_access; 42 | uint8_t initialized; 43 | }; 44 | 45 | extern uint32_t kfio_csr_read_direct(volatile void *addr, void *hdl); 46 | extern uint64_t kfio_csr_read_direct_64(volatile void *addr, void *hdl); 47 | extern void kfio_csr_write_nobarrier(uint32_t val, volatile void *addr, void *hdl); 48 | extern void kfio_csr_write(uint32_t val, volatile void *addr, void *hdl); 49 | extern void kfio_csr_write_64(uint64_t val, volatile void *addr, void *hdl); 50 | 51 | #endif /* __FIO_PORT_KCSR_H__ */ 52 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/kfio_config.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_KFIO_CONFIG_H_ 30 | #define _FIO_PORT_KFIO_CONFIG_H_ 31 | 32 | 33 | #include 34 | 35 | #if defined(USERSPACE_KERNEL) 36 | # include 37 | #elif defined(__linux__) 38 | // created at compile time 39 | #include 40 | #elif defined(__SVR4) && defined(__sun) 41 | #include 42 | #include 43 | #elif defined(__FreeBSD__) 44 | #include 45 | #include 46 | #elif defined(__OSX__) 47 | #include 48 | #include 49 | #elif defined(WINNT) || defined(WIN32) 50 | #define kfio_kmalloc kmalloc 51 | #include 52 | #elif defined(UEFI) 53 | #else 54 | #error Unsupported OS 55 | #endif 56 | 57 | #endif /* _FIO_PORT_KFIO_CONFIG_H_ */ 58 | 59 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/kglobal.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | /** @file 30 | * NO OS-SPECIFIC REFERENCES ARE TO BE IN THIS FILE 31 | * 32 | */ 33 | 34 | /** 35 | * @defgroup PORTING_LAYER Porting Layer 36 | * The top level module for porting layer 37 | * @{ 38 | * 39 | * @defgroup PORT_COMMON_LINUX Common Linux Port 40 | * The module for common linux port 41 | * 42 | * @defgroup PORT_ESXI5 ESXi5 Port 43 | * The module for ESXi5 port 44 | * 45 | * @defgroup PORT_ESXI6 ESXi6 Port 46 | * The module for ESXi6 port 47 | * 48 | * @defgroup PORT_FREEBSD FreeBSD Port 49 | * The module for FreeBSD port 50 | * 51 | * @defgroup PORT_LINUX Linux Port 52 | * The module for Linux port 53 | * 54 | * @defgroup PORT_OSX OSX Port 55 | * The module for OSX port 56 | * 57 | * @defgroup PORT_SOLARIS Solaris Port 58 | * The module for Solaris port 59 | * 60 | * @defgroup PORT_UEFI UEFI Port 61 | * The module for UEFI port 62 | * 63 | * @defgroup PORT_USD USD Port 64 | * The module for USD port 65 | * 66 | * @defgroup PORT_WINDOWS Windows Port 67 | * The module for Windows port 68 | * 69 | * @} 70 | */ 71 | 72 | 73 | /** 74 | * @brief global types that are included by both the core and the porting 75 | * layer code. 76 | */ 77 | 78 | #ifndef __FIO_PORT_GLOBAL_H__ 79 | #define __FIO_PORT_GLOBAL_H__ 80 | 81 | typedef long fio_off_t; 82 | typedef long long fio_loff_t; 83 | typedef int fio_mode_t; 84 | 85 | 86 | typedef long fio_intptr_t; 87 | typedef unsigned long fio_uintptr_t; 88 | typedef unsigned long fio_size_t; 89 | typedef long fio_ssize_t; 90 | 91 | /** 92 | * @typedef kfio_maa_t 93 | * @brief Memory Allocation Action describing the strategy that the 94 | * allocator should use. This corresponds to gfp_t (Get Free Pages) 95 | * in Linux. 96 | */ 97 | typedef unsigned kfio_maa_t; 98 | 99 | typedef unsigned long long fusion_paddr_t; /* dma_addr_t */ 100 | 101 | 102 | #endif //__FIO_PORT_GLOBAL_H__ 103 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/kmsg.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_KMSG_H__ 30 | #define __FIO_PORT_KMSG_H__ 31 | 32 | #ifdef __KERNEL__ 33 | 34 | #include 35 | #include "fio/port/vararg.h" 36 | 37 | typedef enum 38 | { 39 | MSG_LEVEL_ERR = 0, 40 | MSG_LEVEL_WARN, 41 | MSG_LEVEL_INFO, 42 | MSG_LEVEL_ENG, 43 | MSG_LEVEL_DBG 44 | } msg_level_t; 45 | 46 | extern const char *MSG_LEVEL_STR[]; 47 | 48 | // No message ID was provided, do not print one 49 | #define NO_MSG_ID -1 50 | 51 | // max length of the complete format string "fioerr fmt" 52 | #define MSG_FMT_LEN_MAX 512 53 | 54 | // max characters in message id string (including terminating space and null) 55 | #define MSG_ID_LEN_MAX 7 56 | 57 | #if defined(WINNT) || defined(WIN32) 58 | 59 | extern int kmsg_filter(msg_level_t msg_lvl, const char *msg_ctx, int32_t id, 60 | _In_z_ _Printf_format_string_ const char *fmt, ...); 61 | extern int kmsg_subscription(msg_level_t msg_lvl, 62 | _In_z_ _Printf_format_string_ const char *fmt, 63 | va_list ap); 64 | #else 65 | extern int FIO_EFIAPI 66 | kmsg_filter(msg_level_t msg_lvl, const char *msg_ctx, int32_t id, const char *fmt, ...) 67 | #ifdef __GNUC__ 68 | __attribute__((format(printf,4,5))) 69 | #endif 70 | ; 71 | 72 | extern int kmsg_subscription(msg_level_t msg_lvl, const char *fmt, va_list ap); 73 | #endif /* defined WINNT/WIN32 */ 74 | 75 | #endif /* __KERNEL__ */ 76 | 77 | #endif /* __FIO_PORT_KMSG_H__ */ 78 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/ktypes_32.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_KTYPES_32_H 30 | #define _FIO_PORT_KTYPES_32_H 31 | 32 | 33 | #define ptr_to_u64(ptr) ((uint64_t)((uintptr_t)(ptr))) 34 | 35 | #define u64_to_ptr(u64, type) ({ \ 36 | uint64_t _u64 = (u64); \ 37 | kassert(_u64 < 0xffffffffULL); \ 38 | (type)((uintptr_t)_u64); \ 39 | }) 40 | 41 | #if !defined(INT64_C) 42 | #define INT64_C(c) c ## LL 43 | #endif 44 | #if !defined(UINT64_C) 45 | #define UINT64_C(c) c ## ULL 46 | #endif 47 | 48 | #if !defined(INTMAX_C) 49 | #define INTMAX_C(c) c ## LL 50 | #endif 51 | #if !defined(UINTMAX_C) 52 | #define UINTMAX_C(c) c ## ULL 53 | #endif 54 | 55 | #if defined(_MSC_VER) 56 | #define FUSION_ALIGN(x) __declspec(align(4)) x 57 | #else 58 | #define FUSION_ALIGN(x) x __attribute__((aligned(4))) 59 | #endif 60 | 61 | 62 | #endif /* _FIO_PORT_KTYPES_32_H */ 63 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/ktypes_64.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_KTYPES_64_H 30 | #define _FIO_PORT_KTYPES_64_H 31 | 32 | 33 | #define ptr_to_u64(ptr) ((uint64_t)(ptr)) 34 | #define u64_to_ptr(u64) ((void *)(u64)) 35 | 36 | #ifndef INT64_C 37 | #define INT64_C(c) c ## L 38 | #define UINT64_C(c) c ## UL 39 | #endif 40 | 41 | #ifndef INTMAX_C 42 | #define INTMAX_C(c) c ## L 43 | #define UINTMAX_C(c) c ## UL 44 | #endif 45 | 46 | #if defined(_MSC_VER) 47 | #define FUSION_ALIGN(x) __declspec(align(8)) x 48 | #else 49 | #define FUSION_ALIGN(x) x __attribute__((aligned(8))) 50 | #endif 51 | 52 | 53 | #endif /* _FIO_PORT_KTYPES_64_H */ 54 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/libgen.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #if !defined( __PORT_LIBGEN_H__ ) 29 | #define __PORT_LIBGEN_H__ 30 | 31 | #if defined (WIN32) || defined(WINNT) 32 | #include 33 | #else 34 | #include 35 | #endif 36 | 37 | #endif // __PORT_LIBGEN_H__ 38 | 39 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/linux/utypes.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_LINUX_UTYPES_H_ 30 | #define _FIO_PORT_LINUX_UTYPES_H_ 31 | 32 | #ifndef _FIO_PORT_UTYPES_H_ 33 | #error Do not include this file directly - instead include 34 | #endif 35 | 36 | #include 37 | #include 38 | 39 | #endif // _FIO_PORT_LINUX_UTYPES_H_ 40 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/message_id_ranges.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // * Redistributions of source code must retain the above copyright notice, 7 | // this list of conditions and the following disclaimer. 8 | // * Redistributions in binary form must reproduce the above copyright notice, 9 | // this list of conditions and the following disclaimer in the documentation 10 | // and/or other materials provided with the distribution. 11 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 12 | // may be used to endorse or promote products derived from this software 13 | // without specific prior written permission. 14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 20 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | //----------------------------------------------------------------------------- 27 | 28 | #ifndef __FIO_PORT_MESSAGE_ID_RANGES__ 29 | #define __FIO_PORT_MESSAGE_ID_RANGES__ 30 | 31 | /// @defgroup FIO_MSGID_PORT Porting Layer Message Enumerations 32 | /// @ingroup FIO_MSGID 33 | /// 34 | /// Porting layer ID ranges span 0x0000-0x2FFF, inclusive. 35 | /// Generic porting messages may be placed in the 'GENERIC' category. 36 | /// New ports should be assigned the next available sub-layer. 37 | /// The maximum assignable porting layer range is FIO_MSGID_MIN(5,3) 38 | 39 | 40 | /// @defgroup FIO_MSGID_LIMITS Message Enumeration Limits 41 | /// @ingroup FIO_MSGID 42 | /// @{ 43 | 44 | /// Each message ID layer reserves bits [10:0] for sub-layers and unique IDs 45 | #define FIO_MSGID_LAYER_BIT 11 46 | 47 | /// Sub-layers are identified by the two most significant bits [10:9] of the ID layer 48 | #define FIO_MSGID_SUBLAYER_BIT (FIO_MSGID_LAYER_BIT - 2) 49 | 50 | /// Calculates minimum message ID value provided layer and sub-layer 51 | #define FIO_MSGID_MIN(layer, sublayer) \ 52 | (((layer) << FIO_MSGID_LAYER_BIT) | ((sublayer) << FIO_MSGID_SUBLAYER_BIT)) 53 | 54 | /// Number of layer enumerations reserved for the porting layer 55 | #define FIO_MSGID_PORT_LAYER_MAX 6 56 | 57 | /// Get the maximum (exclusive) ID in a layer given the minimum ID in that layer 58 | #define FIO_MSGID_LAYER_MAX(x) ((x) + (1 << FIO_MSGID_LAYER_BIT)) 59 | 60 | /// Get the maximum (exclusive) ID in a sub-layer given the minimum ID in that layer 61 | #define FIO_MSGID_SUBLAYER_MAX(x) ((x) + (1 << FIO_MSGID_SUBLAYER_BIT)) 62 | 63 | /// @} 64 | 65 | 66 | /// @defgroup FIO_MSGID_PORT_LIMITS Porting Layer Enumeration Limits 67 | /// @ingroup FIO_MSGID_PORT 68 | /// @{ 69 | #define FIO_MSGID_PORT_GENERIC_MIN FIO_MSGID_MIN(0, 0) 70 | #define FIO_MSGID_PORT_COMMON_LINUX_MIN FIO_MSGID_MIN(0, 1) 71 | #define FIO_MSGID_PORT_COMMON_VMWARE_MIN FIO_MSGID_MIN(0, 2) 72 | #define FIO_MSGID_PORT_ESX_MIN FIO_MSGID_MIN(0, 3) 73 | #define FIO_MSGID_PORT_ESXI5_MIN FIO_MSGID_MIN(1, 0) 74 | #define FIO_MSGID_PORT_FREEBSD_MIN FIO_MSGID_MIN(1, 1) 75 | #define FIO_MSGID_PORT_LINUX_MIN FIO_MSGID_MIN(1, 2) 76 | #define FIO_MSGID_PORT_OSX_MIN FIO_MSGID_MIN(1, 3) 77 | #define FIO_MSGID_PORT_SOLARIS_MIN FIO_MSGID_MIN(2, 0) 78 | #define FIO_MSGID_PORT_TEST_MIN FIO_MSGID_MIN(2, 1) 79 | #define FIO_MSGID_PORT_UEFI_MIN FIO_MSGID_MIN(2, 2) 80 | #define FIO_MSGID_PORT_USD_MIN FIO_MSGID_MIN(2, 3) 81 | #define FIO_MSGID_PORT_WINDOWS_MIN FIO_MSGID_MIN(3, 0) 82 | #define FIO_MSGID_PORT_VMKAPI_MIN FIO_MSGID_MIN(3, 1) 83 | 84 | /// @} 85 | 86 | #endif // __FIO_PORT_MESSAGE_ID_RANGES___ 87 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/message_ids.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // * Redistributions of source code must retain the above copyright notice, 7 | // this list of conditions and the following disclaimer. 8 | // * Redistributions in binary form must reproduce the above copyright notice, 9 | // this list of conditions and the following disclaimer in the documentation 10 | // and/or other materials provided with the distribution. 11 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 12 | // may be used to endorse or promote products derived from this software 13 | // without specific prior written permission. 14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 20 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | //----------------------------------------------------------------------------- 27 | 28 | #ifndef __FIO_PORT_MESSAGE_IDS_H__ 29 | #define __FIO_PORT_MESSAGE_IDS_H__ 30 | 31 | #include 32 | #include 33 | 34 | #if defined(UEFI) 35 | #include 36 | #elif defined(__FreeBSD__) 37 | #include 38 | #elif defined(__OSX__) 39 | #include 40 | #elif defined(__SVR4) && defined(__sun) 41 | #include 42 | #elif defined(__VMKAPI__) 43 | #include 44 | #elif defined(__linux__) || defined(__VMKLNX__) 45 | #include 46 | #elif defined(WINNT) || defined(WIN32) 47 | #include 48 | #elif !defined(USERSPACE_KERNEL) // Userspace does not have error IDs 49 | #error "Unsupported OS" 50 | #endif 51 | 52 | /// @brief Enumerates the unique message IDs for the generic porting sub-layer ID range. 53 | /// 54 | /// @note New message IDs should be appended to the end of the enum. 55 | /// 56 | /// @warning DO NOT MODIFY ORDERING OR REMOVE ID ENTRIES 57 | /// Removed values must be retained and retired to preserve ID mapping. 58 | /// For retired IDs, append _DEPRECATED to the key 59 | /// For IDs that are used in multiple places, append _DUP to the key 60 | /// 61 | /// @ingroup FIO_MSGID_PORT 62 | enum fio_port_generic_error_ids { 63 | ERRID_PORT_GENERIC_UNK_ERRNO = FIO_MSGID_PORT_GENERIC_MIN, 64 | FIO_MSGID_PORT_GENERIC_CURRENT_MAX ///< Current layer maximum. New entries above. 65 | }; 66 | // Triggering this assert indicates this ID range is exhausted and a new range 67 | // must be allocated. 68 | C_ASSERT(FIO_MSGID_PORT_GENERIC_CURRENT_MAX <= FIO_MSGID_SUBLAYER_MAX(FIO_MSGID_PORT_GENERIC_MIN)); 69 | 70 | #endif /* __FIO_PORT_MESSAGE_IDS_H__ */ 71 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/nanddev.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #ifndef __FIO_PORT_NANDDEV_H__ 29 | #define __FIO_PORT_NANDDEV_H__ 30 | 31 | #include 32 | 33 | struct fusion_nand_device; 34 | 35 | /** 36 | * @brief Get the device number of the nand device 37 | */ 38 | extern uint32_t fusion_nand_get_devnum(struct fusion_nand_device *entry); 39 | 40 | /** 41 | * @brief Get the PCI bus name of the device 42 | */ 43 | extern const char *fusion_nand_get_bus_name(struct fusion_nand_device *entry); 44 | 45 | /** 46 | * @brief Get the device name of the fusion_nand_device 47 | */ 48 | extern const char *fusion_nand_get_dev_name(struct fusion_nand_device *entry); 49 | 50 | /** 51 | * @brief get kfio_pci_dev_t * given fusion_nand_device 52 | */ 53 | extern void *fusion_nand_get_pci_dev(const struct fusion_nand_device *entry); 54 | 55 | /** 56 | * @brief get back the pointer specified by porting layer as contest 57 | * argument in iodrive_pci_create_pipeline call. 58 | */ 59 | extern void *fusion_nand_get_driver_data(struct fusion_nand_device *entry); 60 | 61 | /** 62 | * @brief get the cdev handle given fusion_nand_device 63 | */ 64 | extern void *fusion_nand_get_cdev_handle(struct fusion_nand_device *entry); 65 | 66 | /** 67 | * @brief The wrapper will call this function to get ioctl information to the 68 | * kernel. 69 | */ 70 | extern int fusion_control_ioctl(void *nand, unsigned int cmd, fio_uintptr_t arg); 71 | 72 | /** 73 | * @brief The fusion_control_ioctl will call this function to get fusion 74 | * internal ioctls. 75 | */ 76 | extern int fusion_control_internal_ioctl(void *nand, unsigned int cmd, fio_uintptr_t arg); 77 | 78 | /** 79 | * @brief get kfio_poll_struct * given fusion_nand_device 80 | */ 81 | extern coms_poll_struct *nand_device_get_poll_struct(struct fusion_nand_device *entry); 82 | 83 | /** 84 | * @brief device enumeration callback. 85 | */ 86 | typedef int (*fusion_nand_device_enum_proc_t)(struct fusion_nand_device *nand_dev, void *param); 87 | 88 | /** 89 | * @brief enumerate all known devices, invoking enum_proc for each one. 90 | * when fail_on_locked == 0, it may sleep and wait for mutex. 91 | * when fail_on_locked == 1, it fails out with -EBUSY if can't get mutex. No sleep occurs. Used when a lock is already held 92 | */ 93 | extern int fusion_nand_device_enumerate(fusion_nand_device_enum_proc_t enum_proc, int fail_on_locked, void *param); 94 | 95 | #endif // __FIO_PORT_NANDDEV_H__ 96 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/nexus.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #ifndef __FIO_PORT_NEXUS_H__ 29 | #define __FIO_PORT_NEXUS_H__ 30 | 31 | typedef int iodrive_registry_entry_t(uint32_t version, ...); 32 | 33 | iodrive_registry_entry_t *kfio_platform_locate_registry_entry(void *param); 34 | 35 | void kfio_platform_release_registry_entry(void *param); 36 | 37 | #endif /* __FIO_PORT_NEXUS_H__ */ 38 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/pci.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2016 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_PCI_H__ 30 | #define __FIO_PORT_PCI_H__ 31 | 32 | #define PCI_VENDOR_ID_NWLOGIC 0xFAFA 33 | #define PCI_VENDOR_ID_PLX 0x10b5 34 | #define PCI_VENDOR_ID_FUSION 0x1AED 35 | 36 | #define IODRIVE_OLD_PCI_VENDOR PCI_VENDOR_ID_NWLOGIC 37 | #define IODRIVE_OLD_PCI_DEVICE 0xE003 38 | 39 | #define IODRIVE_PCI_DEVICE 0x1000 ///< Old busted devices only 40 | #define IODRIVE1_PCI_DEVICE 0x1001 ///< All ioDimm1 firmware releases 41 | #define IODRIVE3_OLD_PCI_DEVICE 0x1003 ///< All ioDimm3 firmware released with drivers < 1.2.5 42 | #define IODRIVE3_BOOT_PCI_DEVICE 0x1004 ///< For future use (Boot 6 BAR design) 43 | #define IODRIVE3_PCI_DEVICE 0x1005 ///< All ioDimm3 firmware released with drivers >= 1.2.5 44 | #define IOXTREME_PCI_DEVICE 0x1006 ///< All ioXtreme firmware 45 | #define IOXTREMEPRO_PCI_DEVICE 0x1007 ///< All ioXtreme Pro firmware 46 | #define IOXTREME2_PCI_DEVICE 0x1008 ///< All ioXtreme 2 (180/360) 47 | 48 | #define IODRIVE4_PCI_DEVICE 0x2001 ///< Generation 2 Hardware 49 | 50 | #define IOSCALE3_ORANGE_PCI_DEVICE 0x3001 51 | #define IOSCALE3_TANGERINE_PCI_DEVICE 0x3002 52 | #define IOSCALE3_PEACH_PLUM_PCI_DEVICE 0x3003 53 | #define IOSCALE3_APRICOT_PCI_DEVICE 0x3004 54 | #define IOSCALE4_LANAI_PCI_DEVICE 0x4001 ///< Deprecated, for historical purposes only 55 | #define IOSCALE4OLD_LANAI_PCI_DEVICE 0x7001 ///< Deprecated, for historical purposes only 56 | 57 | #define DEVICEID_MASK 0xF000 58 | #define GEN1_DEVICEID 0x1000 59 | #define GEN2_DEVICEID 0x2000 60 | #define GEN3_DEVICEID 0x3000 61 | 62 | #define FUSION_PCI_SUBSYSTEM_VENDOR_ID PCI_VENDOR_ID_FUSION 63 | #define FUSION_PCI_SUBSYSTEM_DEVICE_ID 0x1010 64 | 65 | #define HPE_PCI_SUBSYSTEM_VENDOR_ID_GEN2_3 0x1590 66 | #define HPE_PCI_SUBSYSTEM_VENDOR_ID 0x103c 67 | #define HPE_PCI_MEZZ_SUBSYSTEM_DEVICE_ID 0x324D 68 | #define HPE_PCI_IODRIVE_SUBSYSTEM_DEVICE_ID 0x324E 69 | 70 | #define DELL_PCI_SUBSYSTEM_VENDOR_ID 0x1028 71 | #define IBM_PCI_SUBSYSTEM_VENDOR_ID 0x1014 72 | 73 | #endif /* __FIO_PORT_PCI_H__ */ 74 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/port_config_macros.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * Copyright (c) 2019, Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | * Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. 4 | * All rights reserved. 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | * A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * ---------------------------------------------------------------------------*/ 28 | 29 | /* Machine generated file - edits will be overwritten. */ 30 | 31 | #ifndef FIO_PORT_CONFIG_MACRO 32 | #define FIO_PORT_CONFIG_MACRO(...) 33 | #endif 34 | 35 | #if defined(FIO_PORT_CONFIG_SET_DBGFLAG) 36 | #endif 37 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/port_config_macros_clear.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * Copyright (c) 2019, Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | * Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. 4 | * All rights reserved. 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | * A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * ---------------------------------------------------------------------------*/ 28 | 29 | /* Machine generated file - edits will be overwritten. */ 30 | 31 | #ifdef FIO_PORT_CONFIG_MACRO 32 | #undef FIO_PORT_CONFIG_MACRO 33 | #endif 34 | 35 | #ifdef FIO_PORT_CONFIG_SET_DBGFLAG 36 | #undef FIO_PORT_CONFIG_SET_DBGFLAG 37 | #endif 38 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/porting_cdev.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // * Redistributions of source code must retain the above copyright notice, 7 | // this list of conditions and the following disclaimer. 8 | // * Redistributions in binary form must reproduce the above copyright notice, 9 | // this list of conditions and the following disclaimer in the documentation 10 | // and/or other materials provided with the distribution. 11 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 12 | // may be used to endorse or promote products derived from this software 13 | // without specific prior written permission. 14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 16 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 20 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | //----------------------------------------------------------------------------- 27 | 28 | #ifndef __SRC_FIO_COMS_PORT_PORTING_CDEV_H__ 29 | #define __SRC_FIO_COMS_PORT_PORTING_CDEV_H__ 30 | 31 | #if !defined(UEFI) 32 | #define PORT_SUPPORTS_CDEV 33 | #endif 34 | 35 | #include 36 | 37 | /// @defgroup CDEVAPI-porting CDEV PORTING API (cdev => port interfaces) 38 | /// @ingroup CDEVAPI 39 | /// @{ 40 | 41 | struct coms_cdev; 42 | 43 | #ifdef PORT_SUPPORTS_CDEV 44 | 45 | /// @brief Create the port's cdev companion 46 | extern int coms_port_cdev_create(struct coms_cdev *cdev, void *port_param, void **handlep); 47 | 48 | /// @brief Destroy the port's cdev companion 49 | extern void coms_port_cdev_destroy(void *port_cdev); 50 | 51 | /// @brief Wake up anything waiting on the control device (e.g., a select) 52 | extern void coms_port_cdev_wake(void *port_cdev, coms_poll_struct *poll_struct); 53 | 54 | #else 55 | 56 | static inline int coms_port_cdev_create(struct coms_cdev *cdev, void *port_param, void **handlep) { return 0; } 57 | static inline void coms_port_cdev_destroy(void *port_cdev) { return; } 58 | static inline void coms_port_cdev_wake(void *port_cdev, coms_poll_struct *ps) { return; } 59 | 60 | #endif 61 | 62 | /// @} 63 | 64 | #endif //__SRC_FIO_COMS_PORT_PORTING_CDEV_H__ 65 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/six_lock.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2012-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | 29 | /* This implementation of multiple granularity locking 30 | * is based in part on the code in Ch. 8.3 of: 31 | * 32 | * Gray, Jim, and Andreas Reuter. Transaction Processing: Concepts and Techniques. 33 | * San Mateo, CA: Morgan Kaufmann, 1993. Print. 34 | * 35 | * and the "rwsem" implementation in linux kernel v3.5. 36 | */ 37 | 38 | #ifndef __SIX_LOCK_H__ 39 | #define __SIX_LOCK_H__ 40 | 41 | #include 42 | 43 | // BIG WARNING 44 | // Notation and *order* is taken from Gray and Reuter (1993) 45 | // This makes it easy to verify the tables 46 | typedef enum 47 | { 48 | LOCK_NULL = 0, 49 | LOCK_IS = 1, // Intent-shared lock 50 | LOCK_IX = 2, // Intent-exclusive lock 51 | LOCK_S = 3, // Shared lock 52 | LOCK_SIX = 4, // Shared + intent-exclusive lock 53 | LOCK_U = 5, // Update lock (p.408) 54 | LOCK_X = 6, // Exclusive lock 55 | NUM_SIX_LOCK_CLASSES = 7 56 | } fusion_sixsem_lock_t; 57 | 58 | typedef int8_t fusion_sixsem_mask_size_t; 59 | typedef uint16_t fusion_sixsem_wait_size_t; 60 | typedef uint16_t fusion_sixsem_held_size_t; 61 | 62 | typedef struct 63 | { 64 | fusion_spinlock_t sixsem_lock; 65 | fusion_condvar_t sixsem_cv; 66 | 67 | fusion_sixsem_mask_size_t cur_locks_mask; 68 | fusion_sixsem_held_size_t lock_counts[NUM_SIX_LOCK_CLASSES]; 69 | fusion_sixsem_wait_size_t wait_count; 70 | uint64_t wake_serial; 71 | uint64_t wait_serial; 72 | } fusion_sixsem_t; 73 | 74 | // These five functions represent the full external API. 75 | extern void fusion_sixsem_init(fusion_sixsem_t *sem, const char* sem_name); 76 | extern int fusion_sixsem_down(fusion_sixsem_t *sem, fusion_sixsem_lock_t mode); 77 | extern bool fusion_sixsem_down_trylock(fusion_sixsem_t *sem, fusion_sixsem_lock_t mode); 78 | extern int fusion_sixsem_upgrade(fusion_sixsem_t *sem, fusion_sixsem_lock_t old_mode, fusion_sixsem_lock_t mode); 79 | extern void fusion_sixsem_up(fusion_sixsem_t *sem, fusion_sixsem_lock_t mode); 80 | extern void fusion_sixsem_destroy(fusion_sixsem_t *sem); 81 | 82 | #endif //__SIX_LOCK_H__ 83 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/stdint.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_STDINT_H__ 30 | #define __FIO_PORT_STDINT_H__ 31 | 32 | #if defined(USERSPACE_KERNEL) 33 | # include 34 | #elif defined(UEFI) 35 | # include 36 | #elif (defined(__linux__) && !defined(SICORTEX)) 37 | # include 38 | #elif defined(__SVR4) && defined(__sun) 39 | # include 40 | #elif defined(__FreeBSD__) 41 | # include 42 | #elif defined(__OSX__) 43 | # include 44 | #elif defined(WIN32) || defined(WINNT) 45 | # include 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/types.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | #ifndef __FIO_PORT_TYPES_H__ 29 | #define __FIO_PORT_TYPES_H__ 30 | 31 | #ifndef ATTRIBUTE_PACKED_ALIGNED 32 | #define ATTRIBUTE_PACKED_ALIGNED(x) ERROR You_must_include_fio_pshpack1_h_before_and_fio_poppack_h_after_any_use_of_ATTRIBUTE_PACKED_ALIGNED_or_UNALIGNED 33 | #endif 34 | 35 | #ifndef ATTRIBUTE_PACKED_UNALIGNED 36 | #define ATTRIBUTE_PACKED_UNALIGNED ATTRIBUTE_PACKED_ALIGNED(1) 37 | #endif 38 | 39 | // Preprocessor scripting madness 40 | #if defined(__KERNEL__) 41 | # include 42 | # include 43 | #else // We're in user-space now 44 | # include 45 | #endif // __KERNEL__ 46 | 47 | #include 48 | 49 | /// 50 | /// Macro to provide a count of the number of elements in a statically defined array x. 51 | /// 52 | #define FIO_STATIC_ARRAY_COUNT(x) ((uint32_t)(sizeof(x)/sizeof(x[0]))) 53 | 54 | #ifndef MIN 55 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 56 | #endif 57 | 58 | #ifndef MAX 59 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 60 | #endif 61 | 62 | #endif // __FIO_PORT_TYPES_H__ 63 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/ufio.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2016 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | /* 30 | * ufio.h contains interface information between kernel and user space. 31 | * Consequently information in ufio.h (or the platform-specific ufio.h) 32 | * must be cautious about anything that must only be in either the kernel 33 | * or user space. Handling such situations is done by checking whether the 34 | * '__KERNEL__' macro is defined (or not). 35 | */ 36 | 37 | #ifndef _FIO_PORT_UFIO_H_ 38 | #define _FIO_PORT_UFIO_H_ 39 | 40 | #include 41 | 42 | #if defined(USERSPACE_KERNEL) 43 | # include 44 | #elif defined(UEFI) 45 | #include 46 | #elif defined(__linux__) 47 | #include 48 | #elif defined(__SVR4) && defined(__sun) 49 | #include 50 | #elif defined(__FreeBSD__) 51 | #include 52 | #else 53 | #error Unsupported OS 54 | #endif 55 | 56 | /* Non-platform specific */ 57 | 58 | #if !defined(__KERNEL__) 59 | #include 60 | #include 61 | #include 62 | #include 63 | 64 | #include 65 | #include 66 | #include 67 | #include 68 | #include 69 | #include 70 | 71 | /* If you're gonna be dumb you gotta be tough... */ 72 | #define kfio_malloc(s) malloc(s) 73 | #define kfio_free(p, s) do { free(p); (void)s; } while(0) 74 | #define kfio_memcpy(x, y, z) memcpy(x, y, z) 75 | #define kfio_memset(x, y, z) memset(x, y, z) 76 | #define kfio_memcmp(x, y, z) memcmp(x, y, z) 77 | #define kfio_memmove(x, y, z) memmove(x, y, z) 78 | #define kfio_strncpy(x, y, z) strncpy(x, y, z) 79 | #define kfio_strtoul(x, y, z) strtoul(x, y, z) 80 | #define kfio_strlen(x) strlen(x) 81 | #define kfio_strchr(x, y) strchr(x, y) 82 | #define kfio_strncmp(x, y, z) strncmp(x, y, z) 83 | #define kfio_strcat(x, y) strcat(x, y) 84 | 85 | #define kfio_div64_64(num, den) ((num) / (den)) 86 | 87 | #define kfio_print(fmt, ...) printf(fmt, ##__VA_ARGS__) 88 | #define kfio_snprintf snprintf 89 | 90 | #define errprint(...) C_ASSERT(0) // errprint is deprecated 91 | #define infprint(...) printf("fioinf " __VA_ARGS__) 92 | #define cinfprint(...) printf(__VA_ARGS__) 93 | #define dbgkprint(...) printf("fiodbg " __VA_ARGS__) 94 | #define cdbgkprint(...) printf(__VA_ARGS__) 95 | #if FUSION_DEBUG 96 | # define engprint(...) printf("fioeng " __VA_ARGS__) 97 | # define cengprint(...) printf(__VA_ARGS__) 98 | #else 99 | # define engprint(...) ((void)0) 100 | # define cengprint(...) ((void)0) 101 | #endif 102 | 103 | #endif /* !defined(__KERNEL__) */ 104 | 105 | #endif /* _FIO_PORT_UFIO_H_ */ 106 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/utypes.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef _FIO_PORT_UTYPES_H_ 30 | #define _FIO_PORT_UTYPES_H_ 31 | 32 | #include 33 | 34 | #if defined(__KERNEL__) 35 | #error You should only include utype.h in user code -- not kernel. 36 | #endif // __KERNEL__ 37 | #if defined(__ESXI5__) 38 | #include 39 | #elif defined(USERSPACE_KERNEL) 40 | # include 41 | #elif defined(__linux__) 42 | #include 43 | #elif defined(__SVR4) && defined (__sun) 44 | #include 45 | #elif defined(__FreeBSD__) 46 | #include 47 | #elif defined(__OSX__) 48 | #include 49 | #elif defined(WINNT) || defined(WIN32) 50 | #include 51 | #elif defined(UEFI) 52 | // There is no file here for UEFI 53 | #else 54 | #error Unsupported OS - if you are porting, try starting with a copy of stubs 55 | #endif 56 | 57 | #include 58 | 59 | #endif /* _FIO_PORT_UTYPES_H_ */ 60 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/vararg.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | 29 | #ifndef __FIO_PORT_STDARG_H__ 30 | #define __FIO_PORT_STDARG_H__ 31 | 32 | #if defined(__FreeBSD__) 33 | #include 34 | #else 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | #ifdef UEFI 39 | #include 40 | 41 | #else 42 | #include 43 | #if __has_include("linux/stdarg.h") 44 | #include 45 | #else 46 | #include "stdarg.h" 47 | #endif 48 | #endif //!UEFI 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/port/version.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * Copyright (c) 2019, Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | * Copyright (c) 2014-2015 SanDisk Corp. and/or all its affiliates. 4 | * All rights reserved. 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | * may be used to endorse or promote products derived from this software 14 | * without specific prior written permission. 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | * A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * ---------------------------------------------------------------------------*/ 28 | 29 | /* Machine generated file - edits will be overwritten. 30 | */ 31 | 32 | #ifndef __FIO_PORT_VERSION_H__ 33 | #define __FIO_PORT_VERSION_H__ 34 | 35 | #define FUSION_VERSION_STRING "4.3.7.1205 bryce@a7e621e6fb50" 36 | #define FUSION_BUILD_VERSION "1205" 37 | #define FUSION_VERSION_MAJOR 4 38 | #define FUSION_VERSION_MINOR 3 39 | #define FUSION_VERSION_MICRO 7 40 | #define FUSION_VERSION_NANO 1205 41 | #ifndef VER_PRODUCTBUILD 42 | #define VER_PRODUCTBUILD 1205 43 | 44 | #define FIO_UTILITIES_VERSION_STRING "4.3.7.1205 bryce@a7e621e6fb50" 45 | #define FIO_UTILITIES_BUILD_VERSION "1205" 46 | #define FIO_UTILITIES_VERSION_MAJOR 4 47 | #define FIO_UTILITIES_VERSION_MINOR 3 48 | #define FIO_UTILITIES_VERSION_MICRO 7 49 | #define FIO_UTILITIES_VERSION_NANO 1205 50 | #endif 51 | 52 | #endif /* __FIO_PORT_VERSION_H__ */ 53 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/fio/public/fioapi.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------- 2 | Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | Copyright (c) 2014 SanDisk Corp. and/or all its affiliates. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -----------------------------------------------------------------------------*/ 28 | 29 | #ifndef _INCLUDE_FIO_PUBLIC_FIOAPI_H_ 30 | #define _INCLUDE_FIO_PUBLIC_FIOAPI_H_ 31 | 32 | #ifdef DllExport 33 | # undef DllExport 34 | #endif 35 | 36 | #if defined(_WIN32) && !defined(UEFI) 37 | # define DllExport __declspec(dllexport) 38 | #else 39 | # define DllExport 40 | #endif 41 | 42 | #endif /* _INCLUDE_FIO_PUBLIC_FIOAPI_H_ */ 43 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/kblock_meta.h: -------------------------------------------------------------------------------- 1 | /* 2 | This "meta" file is supposed to abstract things that change in kblock.c 3 | and should provide simplified defines that are named after their function. 4 | Both aimed at making the code cleaner, more readable and perhaps more 5 | maintainable. Blocks should be isolated and only cover one item. 6 | */ 7 | #ifndef __FIO_KBLOCK_META_H__ 8 | #define __FIO_KBLOCK_META_H__ 9 | 10 | #include 11 | 12 | #if __has_include("linux/part_stat.h") 13 | #include 14 | #endif 15 | #include 16 | #if __has_include("linux/bio-integrity.h") /* added 6.11 */ 17 | #include 18 | #endif 19 | 20 | #if KFIOC_X_BLK_ALLOC_DISK_EXISTS 21 | #define BLK_ALLOC_QUEUE dp->gd->queue; 22 | #define BLK_ALLOC_DISK blk_alloc_disk(FIO_NUM_MINORS); 23 | #define BLK_MQ_ALLOC_QUEUE blk_mq_init_queue(&disk->tag_set); 24 | #elif KFIOC_X_BLK_ALLOC_DISK_HAS_QUEUE_LIMITS 25 | #define BLK_ALLOC_QUEUE dp->gd->queue; 26 | #define BLK_ALLOC_DISK blk_alloc_disk(NULL, FIO_NUM_MINORS); 27 | #define BLK_MQ_ALLOC_QUEUE blk_mq_alloc_queue(&disk->tag_set, NULL, NULL); 28 | #else /* KFIOC_X_BLK_ALLOC_DISK_EXISTS */ 29 | #if KFIOC_X_HAS_MAKE_REQUEST_FN != 1 30 | #define BLK_ALLOC_QUEUE blk_alloc_queue(node); 31 | #endif /* KFIOC_X_HAS_MAKE_REQUEST_FN */ 32 | #define BLK_ALLOC_DISK alloc_disk(FIO_NUM_MINORS); 33 | #define BLK_MQ_ALLOC_QUEUE blk_mq_init_queue(&disk->tag_set); 34 | #endif /* KFIOC_X_BLK_ALLOC_DISK_EXISTS */ 35 | 36 | 37 | #if KFIOC_X_BIO_HAS_BI_BDEV 38 | #define BIO_DISK bi_bdev->bd_disk 39 | #else /* KFIOC_X_BIO_HAS_BI_BDEV */ 40 | #define BIO_DISK bi_disk 41 | #endif /* KFIOC_X_BIO_HAS_BI_BDEV */ 42 | 43 | 44 | #if KFIOC_X_HAS_MAKE_REQUEST_FN 45 | static unsigned int kfio_make_request(struct request_queue *queue, struct bio *bio); 46 | #define KFIO_SUBMIT_BIO_RC return FIO_MFN_RET; 47 | #define BLK_QUEUE_SPLIT blk_queue_split(queue, &bio); 48 | 49 | #if KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS 50 | #define BLK_ALLOC_QUEUE blk_alloc_queue_node(GFP_NOIO, node); 51 | #elif KFIOC_X_BLK_ALLOC_QUEUE_EXISTS 52 | #define BLK_ALLOC_QUEUE blk_alloc_queue(GFP_NOIO); 53 | #else 54 | #define BLK_ALLOC_QUEUE blk_alloc_queue(kfio_make_request, node); 55 | #endif /* KFIOC_X_BLK_ALLOC_QUEUE_NODE_EXISTS */ 56 | 57 | #else /* KFIOC_X_HAS_MAKE_REQUEST_FN */ 58 | #if KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T 59 | #define KFIO_SUBMIT_BIO blk_qc_t kfio_submit_bio(struct bio *bio) 60 | #define KFIO_SUBMIT_BIO_RC return FIO_MFN_RET; 61 | #else 62 | #define KFIO_SUBMIT_BIO void kfio_submit_bio(struct bio *bio) 63 | #define KFIO_SUBMIT_BIO_RC 64 | #endif /*KFIOC_X_SUBMIT_BIO_RETURNS_BLK_QC_T */ 65 | KFIO_SUBMIT_BIO; 66 | 67 | #if KFIOC_X_BIO_SPLIT_TO_LIMITS 68 | #define BLK_QUEUE_SPLIT bio = bio_split_to_limits(bio); 69 | #else 70 | #define BLK_QUEUE_SPLIT blk_queue_split(&bio); 71 | #endif /* KFIOC_X_BIO_SPLIT_TO_LIMITS */ 72 | #endif /* KFIOC_X_HAS_MAKE_REQUEST_FN */ 73 | 74 | // should check for hd_struct vs gendisk 75 | #if KFIOC_X_GENHD_PART0_IS_A_POINTER 76 | #define GD_PART0 disk->gd->part0 77 | #define GET_BDEV disk->gd->part0 78 | #else /* KFIOC_X_GENHD_PART0_IS_A_POINTER */ 79 | #define GD_PART0 &disk->gd->part0 80 | #define GET_BDEV bdget_disk(disk->gd, 0); 81 | #endif /* KFIOC_X_GENHD_PART0_IS_A_POINTER */ 82 | 83 | 84 | #if KFIOC_X_VOID_ADD_DISK 85 | #define ADD_DISK add_disk(disk->gd); 86 | #else 87 | #define ADD_DISK if (add_disk(disk->gd)) { infprint("Error while adding disk!"); } 88 | #endif /* KFIOC_X_VOID_ADD_DISK */ 89 | 90 | #if KFIOC_X_DISK_HAS_OPEN_MUTEX 91 | #define SHUTDOWN_MUTEX &disk->gd->open_mutex 92 | #else 93 | #define SHUTDOWN_MUTEX &linux_bdev->bd_mutex 94 | #endif /* KFIOC_X_DISK_HAS_OPEN_MUTEX */ 95 | 96 | #if !defined(GENHD_FL_EXT_DEVT) 97 | // 5.17 moved GD to explicitly do this by default 98 | #define KFIO_DISABLE_GENHD_FL_EXT_DEVT 1 99 | #endif 100 | 101 | #if !defined(QUEUE_FLAG_DISCARD) 102 | #define BD_OPENERS atomic_read(&linux_bdev->bd_openers) 103 | #define SET_QUEUE_FLAG_DISCARD 104 | #else 105 | #define BD_OPENERS linux_bdev->bd_openers 106 | // https://lore.kernel.org/linux-btrfs/20220409045043.23593-25-hch@lst.de/ 107 | #define SET_QUEUE_FLAG_DISCARD blk_queue_flag_set(QUEUE_FLAG_DISCARD, rq); 108 | #endif /* ! QUEUE_FLAG_DISCARD */ 109 | 110 | 111 | #endif /* __FIO_KBLOCK_META_H__ */ 112 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/kfile_meta.h: -------------------------------------------------------------------------------- 1 | /* 2 | This "meta" file is supposed to abstract things that change in kfile.c 3 | and should provide simplified defines that are named after their function. 4 | Both aimed at making the code cleaner, more readable and perhaps more 5 | maintainable. Blocks should be isolated and only cover one item. 6 | */ 7 | #ifndef __FIO_KFILE_META_H__ 8 | #define __FIO_KFILE_META_H__ 9 | 10 | #include 11 | 12 | #if KFIOC_X_CAPS_PDE_DATA 13 | #define KFIO_PDE_DATA PDE_DATA(ip) 14 | #else 15 | #define KFIO_PDE_DATA pde_data(ip) 16 | #endif /* PDE_DATA */ 17 | 18 | #endif /* __FIO_KFILE_META_H__ */ 19 | 20 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/include/sysrq_meta.h: -------------------------------------------------------------------------------- 1 | /* 2 | This "meta" file is supposed to abstract things that change in sysrq.c 3 | and should provide simplified defines that are named after their function. 4 | Both aimed at making the code cleaner, more readable and perhaps more 5 | maintainable. Blocks should be isolated and only cover one item. 6 | */ 7 | #ifndef __FIO_SYSRQ_META_H__ 8 | #define __FIO_SYSRQ_META_H__ 9 | 10 | #if KFIOC_X_HANDLE_SYSRQ_IS_U8 11 | #define HANDLE_SYSRQ_TYPE u8 12 | #else 13 | #define HANDLE_SYSRQ_TYPE int 14 | #endif /* KFIOC_X_HANDLE_SYSRQ_IS_U8 */ 15 | 16 | #endif /* __FIO_SYSRQ_META_H__ */ 17 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kcsr.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #if defined(__KERNEL__) 29 | #include "port-internal.h" 30 | #include 31 | 32 | uint32_t kfio_csr_read_direct(volatile void *addr, void *hdl); 33 | uint64_t kfio_csr_read_direct_64(volatile void *addr, void *hdl); 34 | void kfio_csr_write_nobarrier(uint32_t val, volatile void *addr, void *hdl); 35 | void kfio_csr_write(uint32_t val, volatile void *addr, void *hdl); 36 | void kfio_csr_write_64(uint64_t val, volatile void *addr, void *hdl); 37 | 38 | #else /* not defined __KERNEL */ 39 | #include 40 | #include 41 | 42 | /** 43 | * @ingroup PORT_COMMON_LINUX 44 | * @{ 45 | */ 46 | 47 | #define __raw_readl(addr) (*(volatile uint32_t *)(addr)) 48 | #define __raw_writel(val, addr) (*(volatile uint32_t *)(addr) = (val)) 49 | 50 | #define __raw_readq(addr) (*(volatile uint64_t *)(addr)) 51 | #define __raw_writeq(val, addr) (*(volatile uint64_t *)(addr) = (val)) 52 | 53 | #endif // __KERNEL__ 54 | 55 | /** @brief in kernel space, the hdl is the handle to access the 56 | * mapped PCI memory, (can be NULL in Linux). 57 | * In user space Linux allow direct access to mapped PCI memory and so 58 | * perfroms like in kernel space. For other OSes where such access is 59 | * not allowed, the hdl is a pointer to a file handle and the 60 | * kfio_csr_read / write() calls perform an ioctl to the required driver 61 | * (which may be in minimal mode). 62 | */ 63 | 64 | // We have these functions because htonl can repeatedly evaluate its argument, which is very, very bad 65 | uint32_t kfio_csr_read_direct(volatile void *addr, void *hdl) 66 | { 67 | uint32_t v = __raw_readl(addr); 68 | v = fusion_card_to_host32(v); 69 | 70 | return v; 71 | } 72 | uint64_t kfio_csr_read_direct_64(volatile void *addr, void *hdl) 73 | { 74 | uint64_t v = __raw_readq(addr); 75 | v = fusion_card_to_host64(v); 76 | 77 | return v; 78 | } 79 | 80 | void kfio_csr_write_nobarrier(uint32_t val, volatile void *addr, void *hdl) 81 | { 82 | val = host_to_fusion_card32(val); 83 | __raw_writel(val, addr); 84 | } 85 | 86 | void kfio_csr_write(uint32_t val, volatile void *addr, void *hdl) 87 | { 88 | kfio_csr_write_nobarrier(val, addr, hdl); 89 | #if defined(__KERNEL__) 90 | kfio_barrier(); 91 | #endif 92 | } 93 | 94 | void kfio_csr_write_64(uint64_t val, volatile void *addr, void *hdl) 95 | { 96 | val = host_to_fusion_card64(val); 97 | __raw_writeq(val, addr); 98 | 99 | #if defined(__KERNEL__) 100 | kfio_barrier(); 101 | #endif 102 | } 103 | 104 | /** 105 | * @} 106 | */ 107 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/README.md: -------------------------------------------------------------------------------- 1 | # kfio object libs 2 | **!!! NON USER SERVICABLE PARTS INSIDE!!!** 3 | 4 | **If you don't know what this is you probably shouldn't poke around here.** 5 | 6 | This directory contains object libraries that are proprietary and fill the 7 | "gaps" in the open source part of the driver code that handles the NAND, 8 | LEB-MAP, FPGA, and other operations on the cards. 9 | 10 | # Goal 11 | The goal of de-mangling the object files is to make sure the driver can be 12 | supported longer term, and make troubleshooting issues with cards more simple 13 | and transparent, hopefully saving cards from the bin. 14 | 15 | ## orig vs latest vs numbers 16 | The `x86_64_cc##_libkfio.o_shipped` names are based on the `gcc` version used 17 | for linking on the host that compiles the driver, they originally accompanied 18 | the driver. Today we look at which cc version someone has, and copy 19 | the `x86_64_libkfio.o_shipped` object file over to that cc version prior to 20 | compiling the driver. The shipped version is/*should be* a copy from 21 | `x86_64_cc63_libkfio.o_shipped`. 22 | 23 | ## procedure 24 | The `function_hash.txt` file contains a hash to function mapping, this mapping 25 | is used to translate obscure function names in the object files to humanly 26 | understandable names, allowing for easier debugging and code de-mangling. 27 | `kfio_operations.sh` contains a function called `patch_objs` which gets called 28 | with `-O`. This function takes the `x86_64_libkfio.o_shipped` and copies 29 | it. After copying the file it will munge the contents of `function_hashes.txt` 30 | and rename the functions in the copied file. By default the output file is 31 | `x86_64_latest_libkfio.o_shipped`, which is used when `make`-`ing` the module. 32 | 33 | ## src 34 | The `src` directory contains a de-compiled version of the library in various 35 | stages. 36 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc41_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc41_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc43_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc43_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc44_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc44_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc46_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc46_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc48_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc48_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc49_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc49_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc54_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc54_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc63_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_cc63_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_latest_libkfio.o_shipped: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RemixVSL/iomemory-vsl4/891270f8a5644dbea2061af8e5ea99c5672a3ab5/root/usr/src/iomemory-vsl4-4.3.7/kfio/x86_64_latest_libkfio.o_shipped -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kinit.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2013-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #if !defined (__linux__) 29 | #error "This file supports Linux only" 30 | #endif 31 | 32 | #include 33 | 34 | #if KFIO_BLOCK_DEVICE 35 | #include 36 | #endif 37 | 38 | // pretty sure we don't need a scsi interface for a PCIE card. 39 | #if KFIO_SCSI_DEVICE 40 | #include 41 | #include 42 | #endif 43 | 44 | int kfio_platform_init_storage_interface(void); 45 | int kfio_platform_teardown_storage_interface(void); 46 | 47 | /** 48 | * @ingroup PORT_COMMON_LINUX 49 | * @{ 50 | */ 51 | 52 | int kfio_platform_init_storage_interface(void) 53 | { 54 | int rc = 0; 55 | 56 | #if KFIO_BLOCK_DEVICE 57 | rc = kfio_platform_init_block_interface(); 58 | if (rc < 0) 59 | { 60 | return rc; 61 | } 62 | #endif 63 | 64 | #if KFIO_SCSI_DEVICE && KFIOC_PORT_SUPPORTS_SCSI 65 | rc = kfio_platform_init_scsi_interface(); 66 | if (rc < 0) 67 | { 68 | return rc; 69 | } 70 | #endif 71 | 72 | return rc; 73 | } 74 | 75 | int kfio_platform_teardown_storage_interface(void) 76 | { 77 | int rc = 0; 78 | 79 | #if KFIO_SCSI_DEVICE && KFIOC_PORT_SUPPORTS_SCSI 80 | rc = kfio_platform_teardown_scsi_interface(); 81 | if (rc < 0) 82 | { 83 | return rc; 84 | } 85 | #endif 86 | 87 | #if KFIO_BLOCK_DEVICE 88 | rc = kfio_platform_teardown_block_interface(); 89 | if (rc < 0) 90 | { 91 | return rc; 92 | } 93 | #endif 94 | 95 | return rc; 96 | } 97 | 98 | /** 99 | * @} 100 | */ 101 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kmsg.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc. (acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------- 28 | 29 | #include 30 | 31 | #if !defined(KFIO_PORT_MSG_LEVEL_DEFINED) 32 | const char *MSG_LEVEL_STR[] = { "fioerr", "fiowrn", "fioinf", "fioeng", "fiodbg" }; 33 | #endif 34 | 35 | /** 36 | * @brief filtering messages based on configuration 37 | * @param msg_lvl Message level, MSG_LEVEL_ERR - MSG_LEVEL_INFO 38 | * @param msg_ctx The device context that this message is originated from 39 | * @param id integer ID of associated message - use NO_MSG_ID for lack thereof. 40 | * @param fmt Message format string 41 | * @return 0 on success, -1 on failure 42 | */ 43 | int FIO_EFIAPI 44 | kmsg_filter(msg_level_t msg_lvl, const char *msg_ctx, int32_t id, 45 | #if defined(WINNT) || defined(WIN32) 46 | _In_z_ _Printf_format_string_ 47 | #endif 48 | const char *fmt, ...) 49 | { 50 | va_list ap; 51 | int rc; 52 | char complete_fmt[MSG_FMT_LEN_MAX]; 53 | 54 | char pad_id[MSG_ID_LEN_MAX]; 55 | //TODO: some filtering here ... 56 | 57 | if (id != NO_MSG_ID) 58 | { 59 | // zero pad if the id is short 60 | kfio_snprintf(pad_id, MSG_ID_LEN_MAX, "%05d ", id); 61 | } 62 | else 63 | { 64 | pad_id[0] = '\0'; // don't print anything for the ID 65 | } 66 | 67 | // assemble a complete format string as "fioerr " 68 | if (msg_ctx && kfio_strlen(msg_ctx) > 0) 69 | { 70 | rc = kfio_snprintf(complete_fmt, MSG_FMT_LEN_MAX, "%s %s: %s%s", 71 | MSG_LEVEL_STR[msg_lvl], msg_ctx, pad_id, fmt); 72 | } 73 | else 74 | { 75 | // coming from the original errprint, context is null or "" 76 | rc = kfio_snprintf(complete_fmt, MSG_FMT_LEN_MAX, "%s %s%s", 77 | MSG_LEVEL_STR[msg_lvl], pad_id, fmt); 78 | } 79 | 80 | va_start(ap, fmt); 81 | if (rc < 0) 82 | { 83 | // fail to generate the complete format, use the passed-in 84 | rc = kmsg_subscription(msg_lvl, fmt, ap); 85 | } 86 | else 87 | { 88 | rc = kmsg_subscription(msg_lvl, complete_fmt, ap); 89 | } 90 | va_end(ap); 91 | 92 | return rc; 93 | } 94 | 95 | /** 96 | * @brief forwarding message to one or more logging mechanisms 97 | * @param msg_lvl Message level, MSG_LEVEL_ERR - MSG_LEVEL_INFO 98 | * @param fmt Complete message format string. It includes "fioerr" "dev context" "fmt" 99 | * @param ap a variable argument list 100 | * @return >=0 on success, <0 on failure 101 | */ 102 | int kmsg_subscription(msg_level_t msg_lvl, 103 | #if defined(WINNT) || defined(WIN32) 104 | _In_z_ _Printf_format_string_ 105 | #endif 106 | const char *fmt, va_list ap) 107 | { 108 | va_list ap_local; 109 | int rc; 110 | 111 | va_copy(ap_local, ap); 112 | rc = kfio_kvprint(msg_lvl, fmt, ap_local); 113 | va_end(ap_local); 114 | 115 | // forwarding to other logging mechanisms ... 116 | 117 | return rc; 118 | } 119 | 120 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/kscsi.c: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------- 2 | // Copyright (c) 2013-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // -------------------------------------------------------------------------- 28 | 29 | // This file implements the functions which interact with the "regular" linux SCSI mid-layer. 30 | 31 | #include 32 | 33 | // Ignore this whole file if the SCSI device is not being used. 34 | #if KFIO_SCSI_DEVICE 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | /** 44 | * @ingroup PORT_LINUX 45 | * @{ 46 | */ 47 | 48 | /* 49 | * Register the host with the operating system 50 | */ 51 | int fio_port_scsi_host_register_host(struct Scsi_Host *shost, struct pci_dev *pdev) 52 | { 53 | return scsi_add_host(shost, NULL); 54 | } 55 | 56 | /* 57 | * Unregister the host with the operating system 58 | */ 59 | void fio_port_scsi_host_unregister_host(struct Scsi_Host *shost) 60 | { 61 | scsi_remove_host(shost); 62 | } 63 | 64 | int kfio_port_scsi_cmd_copy_to_sg(void *port_cmd, void *src_buffer, uint32_t len) 65 | { 66 | struct scsi_cmnd *scmd = (struct scsi_cmnd *)port_cmd; 67 | uint32_t n; 68 | 69 | n = scsi_sg_copy_from_buffer(scmd, src_buffer, len); 70 | 71 | dbgprint(DBGS_SCSI_IO2, "kfio_port_scsi_cmd_copy_to_sg copied %u bytes\n", n); 72 | 73 | return n == len ? 0 : -EIO; 74 | } 75 | 76 | int kfio_port_scsi_cmd_copy_from_sg(void *port_cmd, void *dst_buffer, uint32_t len) 77 | { 78 | struct scsi_cmnd *scmd = (struct scsi_cmnd *)port_cmd; 79 | uint32_t n; 80 | 81 | n = scsi_sg_copy_to_buffer(scmd, dst_buffer, len); 82 | 83 | dbgprint(DBGS_SCSI_IO2, "kfio_port_scsi_cmd_copy_from_sg copied %u bytes\n", n); 84 | 85 | return n == len ? 0 : -EIO; 86 | } 87 | 88 | int kfio_port_scsi_cmd_map_kfio_bio(void *port_cmd, struct kfio_bio *fbio, uint32_t alignment) 89 | { 90 | struct scsi_cmnd *scmd = (struct scsi_cmnd *)port_cmd; 91 | struct scatterlist *sg; 92 | unsigned i; 93 | 94 | for_each_sg(scsi_sglist(scmd), sg, scsi_sg_count(scmd), i) 95 | { 96 | int ret = kfio_sgl_map_page(fbio->fbio_sgl, (fusion_page_t)sg_page(sg), sg->offset, sg->length); 97 | if (ret != 0) 98 | { 99 | return ret; 100 | } 101 | } 102 | 103 | return 0; 104 | } 105 | 106 | /** 107 | * @} 108 | */ 109 | 110 | #endif // KFIO_SCSI_DEVICE 111 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/port-internal-boss.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2014 Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | /** @file 29 | * This file contains OS-specific includes and references for use in the 30 | * porting layer only. Do not include this file directly or indirectly in the 31 | * driver. 32 | * 33 | */ 34 | 35 | #ifdef FUSION_CORE 36 | #error Only include this file when building the porting layer to avoid kernel-specific contamination. 37 | #endif 38 | 39 | #if !defined (__linux__) 40 | #error This file supports linux only 41 | #endif 42 | 43 | /******************************************************************************* 44 | * The constraints include not requiring recompilation for different versions 45 | * (debug/release, linux kernel versions &c.) for our proprietary portion of the 46 | * code. Many internal Fusion-io structures include fusion_event_t stuctures as 47 | * a (non dynamically allocated) member. We can either create and require using 48 | * dynamic allocators/deallocators and internally use pointers to structures, or 49 | * define a character structure large enough to accommodate the platform-specific 50 | * structure of any supported platforms. The latter is ugly, but the one in use. 51 | * 52 | * A corollary to the above is that OS-specific header files should be included 53 | * in the porting layer's source files but _not_ in header files accessed by 54 | * non- porting layer include or source files. 55 | ******************************************************************************/ 56 | 57 | #include 58 | 59 | 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/port-internal.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // ----------------------------------------------------------------------------- 28 | /** @file 29 | * This file contains OS-specific includes and references for use in the 30 | * porting layer only. Do not include this file directly or indirectly in the 31 | * driver. 32 | * 33 | */ 34 | 35 | #ifdef FUSION_CORE 36 | #error Only include this file when building the porting layer to avoid kernel-specific contamination. 37 | #endif 38 | 39 | #if !defined (__linux__) 40 | #error This file supports linux only 41 | #endif 42 | 43 | /******************************************************************************* 44 | * The constraints include not requiring recompilation for different versions 45 | * (debug/release, linux kernel versions &c.) for our proprietary portion of the 46 | * code. Many internal Fusion-io structures include fusion_event_t stuctures as 47 | * a (non dynamically allocated) member. We can either create and require using 48 | * dynamic allocators/deallocators and internally use pointers to structures, or 49 | * define a character structure large enough to accommodate the platform-specific 50 | * structure of any supported platforms. The latter is ugly, but the one in use. 51 | * 52 | * A corollary to the above is that OS-specific header files should be included 53 | * in the porting layer's source files but _not_ in header files accessed by 54 | * non- porting layer include or source files. 55 | ******************************************************************************/ 56 | 57 | #include "port-internal-boss.h" 58 | 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | 68 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/sched.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #include "port-internal.h" 29 | #include 30 | #include 31 | 32 | /** 33 | * @ingroup PORT_COMMON_LINUX 34 | * @{ 35 | */ 36 | 37 | #include 38 | 39 | C_ASSERT(sizeof(struct fusion_work_struct) >= sizeof(struct delayed_work)); 40 | C_ASSERT(sizeof(struct fusion_work_struct) >= sizeof(struct work_struct)); 41 | 42 | void noinline fusion_setup_dpc(fusion_dpc_t *wq, fusion_work_func_t func) 43 | { 44 | INIT_WORK((struct work_struct *) wq, (work_func_t) func); 45 | } 46 | 47 | void noinline fusion_setup_delayed_dpc(fusion_delayed_dpc_t *wq, fusion_work_func_t func) 48 | { 49 | INIT_DELAYED_WORK((struct delayed_work *) wq, (work_func_t) func); 50 | } 51 | 52 | /** 53 | */ 54 | void noinline fusion_schedule_dpc(fusion_dpc_t *work) 55 | { 56 | fusion_schedule_work(work); 57 | } 58 | 59 | /** 60 | * @brief initialize work item 61 | */ 62 | void noinline fusion_init_work(fusion_work_struct_t *wq, fusion_work_func_t func) 63 | { 64 | INIT_WORK((struct work_struct *) wq, (work_func_t) func); 65 | } 66 | 67 | /** 68 | * @brief destroy work item 69 | */ 70 | void noinline fusion_destroy_work(fusion_work_struct_t *work) 71 | { 72 | return; 73 | } 74 | 75 | /** 76 | * @brief schedule some work 77 | */ 78 | void noinline fusion_schedule_work(fusion_work_struct_t *work ) 79 | { 80 | schedule_work((struct work_struct *) work); 81 | } 82 | 83 | /** 84 | * @brief initialize delayed work item 85 | */ 86 | void noinline fusion_init_delayed_work(fusion_work_struct_t *wq, fusion_work_func_t func) 87 | { 88 | INIT_DELAYED_WORK((struct delayed_work *) wq, (work_func_t) func); 89 | } 90 | 91 | /** 92 | * @brief destroy work item 93 | */ 94 | void noinline fusion_destroy_delayed_work(fusion_work_struct_t *work) 95 | { 96 | return; 97 | } 98 | 99 | /** 100 | * @brief schedule delayed work 101 | * @param wq 102 | * @param sleep_time - delay time in micro seconds. 103 | */ 104 | void noinline fusion_schedule_delayed_work(fusion_work_struct_t *wq, uint64_t sleep_time ) 105 | { 106 | schedule_delayed_work((struct delayed_work *) wq, fusion_usectohz(sleep_time)); 107 | } 108 | 109 | void noinline fusion_might_sleep(void) 110 | { 111 | might_sleep(); 112 | } 113 | 114 | /** 115 | * @} 116 | */ 117 | -------------------------------------------------------------------------------- /root/usr/src/iomemory-vsl4-4.3.7/sysrq.c: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Copyright (c) 2006-2014, Fusion-io, Inc.(acquired by SanDisk Corp. 2014) 3 | // Copyright (c) 2014-2015, SanDisk Corp. and/or all its affiliates. All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // * Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // * Neither the name of the SanDisk Corp. nor the names of its contributors 13 | // may be used to endorse or promote products derived from this software 14 | // without specific prior written permission. 15 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 17 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | // A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 21 | // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | //----------------------------------------------------------------------------- 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | void iodrive_handle_sysrq(HANDLE_SYSRQ_TYPE key); 39 | void kfio_iodrive_sysrq_keys(void); 40 | void kfio_iodrive_unreg_sysrq_keys(void); 41 | 42 | /** 43 | * @ingroup PORT_COMMON_LINUX 44 | * @{ 45 | */ 46 | 47 | extern void iodrive_dump_all(void); 48 | extern void iodrive_dump_all_software_state(void); 49 | 50 | #define SYSRQ_SOFTWARE 'x' 51 | #define SYSRQ_CSR 'y' 52 | 53 | void iodrive_handle_sysrq(HANDLE_SYSRQ_TYPE key) 54 | { 55 | switch (key) 56 | { 57 | case SYSRQ_CSR: 58 | iodrive_dump_all(); 59 | break; 60 | case SYSRQ_SOFTWARE: 61 | iodrive_dump_all_software_state(); 62 | break; 63 | } 64 | } 65 | 66 | struct sysrq_key_op csr_key_op = { 67 | .handler = iodrive_handle_sysrq, 68 | .help_msg = "ioDrive CSR (z)", 69 | .action_msg = "ioDrive CSR status:", 70 | .enable_mask = 0, 71 | }; 72 | 73 | struct sysrq_key_op software_key_op = { 74 | .handler = iodrive_handle_sysrq, 75 | .help_msg = "ioDrive software (l)", 76 | .action_msg = "ioDrive Software status:", 77 | .enable_mask = 0, 78 | }; 79 | 80 | void kfio_iodrive_sysrq_keys(void) 81 | { 82 | register_sysrq_key(SYSRQ_CSR, &csr_key_op); 83 | register_sysrq_key(SYSRQ_SOFTWARE, &software_key_op); 84 | } 85 | 86 | void kfio_iodrive_unreg_sysrq_keys(void) 87 | { 88 | unregister_sysrq_key(SYSRQ_CSR, &csr_key_op); 89 | unregister_sysrq_key(SYSRQ_SOFTWARE, &software_key_op); 90 | } 91 | 92 | /** 93 | * @} 94 | */ 95 | -------------------------------------------------------------------------------- /tools/efi/README.md: -------------------------------------------------------------------------------- 1 | # EFI Boot 2 | * NOT ALL VSL DRIVES SUPPORT UEFI, VSL4 DRIVES DO, 3 | check your device documentation and firmware to make sure yours does. 4 | 5 | > snippet from lspci -nnnvvv 6 | > 7 | > 04:00.0 Mass storage controller [0180]: SanDisk ioDrive2 [1aed:2001] (rev 04)
8 | > Subsystem: SanDisk ioDrive2 [1aed:2001] 9 | 10 | Booting from a Fusion-IO device comes with its own challenges. Firstly 11 | making sure the device supports the EFI boot ROM, and secondly installing 12 | the module, and in the case of Linux making the module available to initramfs 13 | when installing the OS so it will actually boot. 14 | 15 | The script in this directory is meant to help achieve and document the 16 | EFI booting from a Fusion-IO device on a new install of Ubuntu. 17 | 18 | ## install-ubuntu.sh 19 | Support for Ubuntu Desktop installation to a Fusion-IO drive as a boot drive. 20 | 21 | 1) Make sure BIOS is set to UEFI boot mode 22 | 2) Make sure FIO device has UEFI enabled 23 | 3) Boot your Ubuntu Desktop install medium 24 | 4) Choose "Try Ubuntu" 25 | 5) Open a terminal 26 | 6) `wget https://raw.githubusercontent.com/RemixVSL/iomemory-vsl/main/tools/efi/install-ubuntu.sh && bash install-ubuntu.sh` 27 | 7) Follow the instructions from the terminal 28 | 8) Proceed to install Ubuntu to the Fusion-IO drive 29 | 9) DON'T REBOOT BEFORE THE SCRIPT FINISHES!!! 30 | -------------------------------------------------------------------------------- /tools/efi/install-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # 1) Make sure BIOS is set to UEFI boot mode 4 | # 2) Make sure FIO device has UEFI enabled 5 | # 3) Boot ubuntu install medium 6 | # 4) Choose "Try Ubuntu" 7 | # 5) Open a terminal 8 | # 6) wget https://192.168.122.1:8080/install.sh && bash install.sh 9 | # 7) Follow the instructions on screen. 10 | # 8) DON'T REBOOT BEFORE THE SCRIPT FINISHES!!! 11 | 12 | mod=vsl4 13 | sp="/-\|" 14 | if [ ! -d "/sys/firmware/efi" ]; then 15 | echo "You have to be running EFI mode and not BIOS mode to do this." 16 | exit 1 17 | fi 18 | 19 | sudo apt-get update 20 | sudo apt-get install -y git build-essential 21 | 22 | git clone https://github.com/RemixVSL/iomemory-${mod}.git 23 | cd iomemory-${mod} 24 | make module 25 | module=$(find . -type f -name iomemory-${mod}.ko) 26 | echo "Inserting module, this may take some time." 27 | sudo insmod $module 28 | 29 | # should we add fio-tools for debugging? 30 | echo "Module loaded!!" 31 | echo "Install the OS to your fio device now. Don't reboot till we are Done." 32 | 33 | waitforit=true 34 | while $waitforit; do 35 | if [ -e "/target/etc/passwd" ]; then 36 | grep -q 1000 /target/etc/passwd && grep -q 1000 /target/etc/group 37 | if [ "$?" == "0" ]; then 38 | waitforit=false 39 | fi 40 | fi 41 | printf "\rwaiting for signs of life \b${sp:i++%${#sp}:1}" 42 | sleep .2 43 | done 44 | echo 45 | waitforit=true 46 | while $waitforit; do 47 | grep -q "finish-install:" /var/log/syslog 48 | if [ "$?" == "0" ]; then 49 | waitforit=false 50 | else 51 | printf "\rwaiting for installer to finish \b${sp:i++%${#sp}:1}" 52 | fi 53 | sleep .2 54 | done 55 | echo 56 | waitforit=true 57 | while $waitforit; do 58 | tail -100 /var/log/syslog | grep -q "Reverting lockdown of the desktop environment." 59 | if [ "$?" == "0" ]; then 60 | waitforit=false 61 | else 62 | printf "\rwaiting for lockdown to finish \b${sp:i++%${#sp}:1}" 63 | fi 64 | sleep .2 65 | done 66 | echo 67 | 68 | echo "" 69 | echo "Copy module to target env root." 70 | sudo cp -pr ~/iomemory-${mod} /target/root 71 | 72 | sudo cp /etc/resolv.conf /target/etc/resolv.conf 73 | for m in proc sys dev; do 74 | sudo mount -o bind /$m /target/$m 75 | done 76 | # use "EOT" to stomp interpration of stuff 77 | echo "Going into chroot to move things around." 78 | sudo chroot /target /bin/bash <<"EOT" 79 | apt-get install -y git build-essential dkms grub-efi-amd64 80 | echo iomemory_vsl4 >> /etc/initramfs-tools/modules 81 | cd /root/iomemory-vsl4 82 | make dkms 83 | release=$(uname -r) 84 | nrelease=$(ls -1 /lib/modules | grep -v $release) 85 | dkms_ver=$(dkms status | grep ^iomemory-vsl4 | awk -F', ' '{ print $2 }') 86 | dkms build -m iomemory-vsl4 -v $dkms_ver -k $nrelease 87 | dkms install -m iomemory-vsl4 -v $dkms_ver -k $nrelease 88 | EOT 89 | 90 | ### NON LVM installs!!! 91 | ## until we fix udev do this... 92 | sudo cp /target/etc/fstab /target/etc/fstab.org 93 | UUIDs=$(cat /target/etc/fstab | perl -ne 'print $1."\n" if /UUID=([\w\d\-]+)/') 94 | for UUID in $UUIDs; do 95 | blkdev=$(blkid | grep $UUID | awk -F: '{print $1}') 96 | line=$(grep $UUID /target/etc/fstab) 97 | sudo perl -pi -e "s#UUID=$UUID#$blkdev#" /target/etc/fstab 98 | echo "# $line" | sudo tee -a /target/etc/fstab 99 | done 100 | echo "DONE!!!, you can restart now." 101 | echo exit 102 | -------------------------------------------------------------------------------- /tools/udev/rules.d/60-persistent-fio.rules: -------------------------------------------------------------------------------- 1 | # persistent storage links for iomemory-vsl devices. 2 | # requires fio-status in /usr/bin. 3 | 4 | ACTION=="remove", GOTO="persistent_fio_end" 5 | ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_fio_end" 6 | 7 | SUBSYSTEM!="block", GOTO="persistent_fio_end" 8 | KERNEL!="fio*", GOTO="persistent_fio_end" 9 | 10 | # this was copied over from 60-persistent-storage, I believe it tries to see 11 | # if /sys/block/fio*/whole_disk merely exists 12 | TEST=="whole_disk", GOTO="persistent_fio_end" 13 | 14 | # partition handling also originates there. 15 | ENV{DEVTYPE}=="partition", \ 16 | IMPORT{parent}="ID_[!F]*", IMPORT{parent}="ID_", \ 17 | IMPORT{parent}="ID_F[!S]*", IMPORT{parent}="ID_F", \ 18 | IMPORT{parent}="ID_FS[!_]*", IMPORT{parent}="ID_FS" 19 | 20 | # by-id 21 | KERNEL=="fio[a-z]", PROGRAM="/usr/bin/fio-status --field iom.format_uuid /dev/%k", SYMLINK+="disk/by-id/fio-%c" 22 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/usr/bin/fio-status --field iom.format_uuid /dev/%P", SYMLINK+="disk/by-id/fio-%c-part%n" 23 | 24 | # by-path 25 | KERNEL=="fio[a-z]", PROGRAM="/usr/bin/fio-status --field iom.pci_addr /dev/%k", SYMLINK+="disk/by-path/pci-0000:%c-%k" 26 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/usr/bin/fio-status --field iom.pci_addr /dev/%P", SYMLINK+="disk/by-path/pci-0000:%c-%P-part%n" 27 | 28 | # by-uuid 29 | # snuf@scipio:~/$ blkid /dev/fioa1 30 | # /dev/fioa1: LABEL="Marvin" UUID="cda7751a-6cc1-4c5e-ba93-b08b843a7788" TYPE="ext4" PARTLABEL="marvin" PARTUUID="55574487-7748-4a44-ae71-02dc16e68a9a" 31 | # 32 | KERNEL!="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", IMPORT{program}="/sbin/blkid -o udev -p /dev/%k%n" 33 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/sbin/blkid -s PARTLABEL -o value /dev/%P%n", SYMLINK+="disk/by-partlabel/%c" 34 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/sbin/blkid -s LABEL -o value /dev/%P%n", SYMLINK+="disk/by-label/%c" 35 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/sbin/blkid -s UUID -o value /dev/%P%n", SYMLINK+="disk/by-uuid/%c" 36 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/sbin/blkid -s UUID_SUB -o value /dev/%P%n", SYMLINK+="disk/by-uuid/%c" 37 | KERNEL=="fio[a-z][0-9]*", ENV{DEVTYPE}=="partition", PROGRAM="/sbin/blkid -s PARTUUID -o value /dev/%P%n", SYMLINK+="disk/by-partuuid/%c" 38 | 39 | LABEL="persistent_fio_end" 40 | --------------------------------------------------------------------------------