summaryrefslogtreecommitdiffstats
path: root/Documentation/mic
Commit message (Collapse)AuthorAgeFilesLines
* samples: move mic/mpssd example code from DocumentationShuah Khan2016-09-208-2427/+0
| | | | | | | | | | | Move mic/mpssd examples to samples and remove it from Documentation Makefile. Create a new Makefile to build mic/mpssd. It can be built from top level directory or from mic/mpssd directory: Run make -C samples/mic/mpssd or cd samples/mic/mpssd; make Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
* mpssd: fix buffer overflow warningMike Danese2016-06-031-2/+2
| | | | | | | | | | | | | | | | | The compilation emits a warning in function ‘snprintf’, inlined from ‘set_cmdline’ at ../Documentation/mic/mpssd/mpssd.c:1541:9: /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: warning: call to __builtin___snprintf_chk will always overflow destination buffer This was introduced in commit f4a66c204482 ("misc: mic: Update MIC host daemon with COSM changes") and is fixed by reverting the changes to the size argument of these snprintf statements. Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Mike Danese <mikedanese@google.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge tag 'char-misc-4.6-rc1' of ↵Linus Torvalds2016-03-173-26/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here is the big char/misc driver update for 4.6-rc1. The majority of the patches here is hwtracing and some new mic drivers, but there's a lot of other driver updates as well. Full details in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'char-misc-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (238 commits) goldfish: Fix build error of missing ioremap on UM nvmem: mediatek: Fix later provider initialization nvmem: imx-ocotp: Fix return value of imx_ocotp_read nvmem: Fix dependencies for !HAS_IOMEM archs char: genrtc: replace blacklist with whitelist drivers/hwtracing: make coresight-etm-perf.c explicitly non-modular drivers: char: mem: fix IS_ERROR_VALUE usage char: xillybus: Fix internal data structure initialization pch_phub: return -ENODATA if ROM can't be mapped Drivers: hv: vmbus: Support kexec on ws2012 r2 and above Drivers: hv: vmbus: Support handling messages on multiple CPUs Drivers: hv: utils: Remove util transport handler from list if registration fails Drivers: hv: util: Pass the channel information during the init call Drivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload() Drivers: hv: vmbus: remove code duplication in message handling Drivers: hv: vmbus: avoid wait_for_completion() on crash Drivers: hv: vmbus: don't loose HVMSG_TIMER_EXPIRED messages misc: at24: replace memory_accessor with nvmem_device_read eeprom: 93xx46: extend driver to plug into the NVMEM framework eeprom: at25: extend driver to plug into the NVMEM framework ...
| * misc: mic: MIC host and card driver changes to enable VOPSudeep Dutt2016-02-093-26/+32
| | | | | | | | | | | | | | | | | | | | | | This patch modifies the MIC host and card drivers to start using the VOP driver. The MIC host and card drivers now implement the VOP bus operations and register a VOP device on the VOP bus. MIC driver stack documentation is also updated to include the new VOP driver. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Documentation: Fix int/unsigned int comparisonMahesh Khanwalkar2016-02-171-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | Signed int - unsigned int comparison fixed in mpssd, prctl, ptp, and timers in Documentation. In places where 'int argc' and 'const char **argv' are not used, they are replaced with void Documentation/mic/mpssd/mpssd.c: Fixed comparison in sum_iovec_len and disp_iovec Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c: main signature changed to void, as parameters 'argc' and 'argv' are never used Documentation/prctl/disable-tsc-on-off-stress-test.c: main signature changed to void Documentation/prctl/disable-tsc-test.c: main signature changed to void Documentation/ptp/testptp.c: Sign comparison fix Documentation/timers/hpet_example.c: Sign comparision fix Signed-off-by: Mahesh Khanwalkar <maheshkhanwalkar@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* misc: mic: Update MIC host daemon with COSM changesAshutosh Dixit2015-10-044-147/+251
| | | | | | | | | | | | This patch updates the MIC host daemon to work with corresponding changes in COSM. Other MIC daemon fixes, cleanups and enhancements as are also rolled into this patch. Changes to MIC sysfs ABI which go into effect with this patch are also documented. Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'char-misc-4.2-rc1' of ↵Linus Torvalds2015-06-263-25/+125
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver pull request for 4.2-rc1. Lots of mei, extcon, coresight, uio, mic, and other driver updates in here. Full details in the shortlog. All of these have been in linux-next for some time with no reported problems" * tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits) mei: me: wait for power gating exit confirmation mei: reset flow control on the last client disconnection MAINTAINERS: mei: add mei_cl_bus.h to maintained file list misc: sram: sort and clean up included headers misc: sram: move reserved block logic out of probe function misc: sram: add private struct device and virt_base members misc: sram: report correct SRAM pool size misc: sram: bump error message level on unclean driver unbinding misc: sram: fix device node reference leak on error misc: sram: fix enabled clock leak on error path misc: mic: Fix reported static checker warning misc: mic: Fix randconfig build error by including errno.h uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config uio: pruss: Add CONFIG_HAS_IOMEM dependence uio: pruss: Include <linux/sizes.h> extcon: Redefine the unique id of supported external connectors without 'enum extcon' type char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration(). Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion parport: check exclusive access before register w1: use correct lock on error in w1_seq_show() ...
| * misc: mic: add support for loading/unloading SCIF driverSudeep Dutt2015-05-241-13/+11
| | | | | | | | | | | | | | | | | | modprobe SCIF driver upon start and remove it upon unload Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: mic: SCIF header file and IOCTL interfaceSudeep Dutt2015-05-242-12/+114
| | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the SCIF documentation in the header file and describes the IOCTL interface for user mode. mic_overview.txt is updated with documentation on SCIF and a new document describing SCIF in more details is available in scif_overview.txt. Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Documentation/mic/mpssd: don't build x86 userspace when cross compilingPaul Gortmaker2015-06-221-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following was seen in linux-next build coverage, which is somewhat unique since it uses powerpc host to cross compile x86: Documentation/mic/mpssd/mpssd.c:93:10: error: braced-group within expression allowed only inside a function Documentation/mic/mpssd/mpssd.c:96:10: error: braced-group within expression allowed only inside a function Documentation/mic/mpssd/mpssd.c:113:10: error: braced-group within expression allowed only inside a function Documentation/mic/mpssd/mpssd.c:116:10: error: braced-group within expression allowed only inside a function Documentation/mic/mpssd/mpssd.c:119:3: error: initializer element is not constant Documentation/mic/mpssd/mpssd.c:119:3: error: (near initialization for 'virtnet_dev_page.host_features') Documentation/mic/mpssd/mpssd.c:146:10: error: braced-group within expression allowed only inside a function Documentation/mic/mpssd/mpssd.c:149:3: error: initializer element is not constant Documentation/mic/mpssd/mpssd.c:149:3: error: (near initialization for 'virtblk_dev_page.host_features') Documentation/mic/mpssd/mpssd.c:151:3: error: initializer element is not constant Documentation/mic/mpssd/mpssd.c:151:3: error: (near initialization for 'virtblk_dev_page.blk_config.seg_max') Documentation/mic/mpssd/mpssd.c:152:3: error: initializer element is not constant Documentation/mic/mpssd/mpssd.c:152:3: error: (near initialization for 'virtblk_dev_page.blk_config.capacity') make[5]: *** [Documentation/mic/mpssd/mpssd.o] Error 1 Since it is building /usr/sbin/mpssd and /usr/sbin/micctrl for x86_64 and the original authors indicated[1] that: MIC card is expected to work with x86_64 host, not with ppc64. We have never compiled on ppc host.. so it probably makes sense to just skip building these userspace programs when we are cross compiling. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-December/123296.html Cc: Jonathan Corbet <corbet@lwn.net> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Cc: Sudeep Dutt <sudeep.dutt@intel.com> Cc: Caz Yokoyama <Caz.Yokoyama@intel.com> Cc: linux-doc@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Documentation: Build mic/mpssd only for x86_64Ashutosh Dixit2014-12-051-1/+1
| | | | | | | | | | | | mic/mpssd along with MIC drivers are currently only usable on x86_64. So build mic/mpssd only for x86_64 to avoid build breaks on big-endian systems. Reported-by: Daniel Borkmann <dborkman@redhat.com> Reported-by: Dan Streetman <ddstreet@gmail.com> Suggested-by: Peter Foley <pefoley2@pefoley.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Documentation: update include path for mpssdPeter Foley2014-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | sysfs.c includes mpssd.h which includes virtio_ids.h. sysfs.c doesn't have the proper include flags set to use the latest headers, so this causes a build error if the system headers are too old. Signed-off-by: Peter Foley <pefoley2@pefoley.com> Cc: rdunlap@infradead.org Cc: linux-doc@vger.kernel.org Cc: sudeep.dutt@intel.com Cc: nikhil.rao@intel.com Cc: ashutosh.dixit@intel.com Cc: akpm@linux-foundation.org Cc: gregkh@linuxfoundation.org Cc: harshavardhan.r.kharche@intel.com Cc: caz.yokoyama@intel.com Cc: dasaratharaman.chandramouli@intel.com Cc: jkosina@suse.cz Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Documentation: support glibc versions without htole macrosPeter Foley2014-09-262-1/+2
| | | | | | | | | | glibc 2.9 introduced the htole<16/32/64> macros, add them to tools/include to support older versions of glibc. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Peter Foley <pefoley2@pefoley.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Documentation: fix misc. warningsPeter Foley2014-09-261-2/+2
| | | | | | | | Fix a few warnings that gcc emits during a default build. Signed-off-by: Peter Foley <pefoley2@pefoley.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Documentation: add makefiles for more targetsPeter Foley2014-09-262-12/+13
| | | | | | | | | Add a bunch of previously unbuilt source files to the Documentation build machinery. Signed-off-by: Peter Foley <pefoley2@pefoley.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* misc: mic: add support for loading/unloading dma driverSiva Yerramreddy2014-07-111-7/+7
| | | | | | | modprobe dma driver upon start and remove it upon unload. Signed-off-by: Siva Yerramreddy <yshivakrishna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Add mic bus and dma driver documentationSiva Yerramreddy2014-07-111-26/+41
| | | | | | | | | | Added an overview of mic bus and dma driver. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Siva Yerramreddy <yshivakrishna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Fix endianness issues.Ashutosh Dixit2013-11-271-4/+4
| | | | | | | | | | | | | Endianness issues are now consistent as per the documentation in host/mic_virtio.h. Sparse warnings related to endianness are also fixed. Note that the MIC driver implementation assumes that the host can be both BE or LE whereas the card is always LE. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Fix user space namespace pollution from mic_common.h.Ashutosh Dixit2013-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid declaring ALIGN() and __aligned() in include/uapi/linux/mic_common.h since they pollute user space namespace. Also, mic_aligned_size() can be simply replaced simply by sizeof() since all structures where mic_aligned_size() is used are declared using __attribute__ ((aligned(8))); -- >From mail from H Peter Anvin about this: On Fri, Nov 08, 2013 H Peter Anvin <h.peter.anvin@intel.com> wrote: Subject: Namespace pollution in mic_common.h This puts two macros, ALIGN() and __aligned(), into arbitrary user space namespace. This really isn't safe or acceptable, especially since those symbols are highly generic. ... When these structures are forced-aligned, they will in fact have padding automatically added by the compiler to an 8-byte boundary anyway, so mic_aligned_size() does nothing. ... Reported-by: H Peter Anvin <h.peter.anvin@intel.com> Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Bug fix for sysfs poll usage.Ashutosh Dixit2013-11-271-0/+6
| | | | | | | | | | | | | | | MIC user space daemon poll's on sysfs changes. The documentation for sysfs_poll(...) in fs/sysfs/file.c states that "Once poll/select indicates that the value has changed, you need to close and re-open the file, or seek to 0 and read again". This step was missed out earlier and resulted in the daemon spinning continuously rather than getting blocked in 'poll'. This bug was exposed by commit aea585ef8fa65163 introduced as part of sysfs changes in 3.13-rc1. A seek to 0 has been introduced to fix it. Reviewed-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Enable OSPM suspend and resume support.Dasaratharaman Chandramouli2013-10-053-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables support for OSPM suspend and resume in the MIC driver. During a host suspend event, the driver performs an orderly shutdown of the cards if they are online. Upon resume, any cards that were previously online before suspend are rebooted. The driver performs an orderly shutdown of the card primarily to ensure that applications in the card are terminated and mounted devices are safely un-mounted before the card is powered down in the event of an OSPM suspend. The driver makes use of the MIC daemon to accomplish OSPM suspend and resume. The driver registers a PM notifier per MIC device. The devices get notified synchronously during PM_SUSPEND_PREPARE and PM_POST_SUSPEND phases. During the PM_SUSPEND_PREPARE phase, the driver performs one of the following three tasks. 1) If the card is 'offline', the driver sets the card to a 'suspended' state and returns. 2) If the card is 'online', the driver initiates card shutdown by setting the card state to suspending. This notifies the MIC daemon which invokes shutdown and sets card state to 'suspended'. The driver returns after the shutdown is complete. 3) If the card is already being shutdown, possibly by a host user space application, the driver sets the card state to 'suspended' and returns after the shutdown is complete. During the PM_POST_SUSPEND phase, the driver simply notifies the daemon and returns. The daemon boots those cards that were previously online during the suspend phase. Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Fix build issues in sample daemon.Sudeep Dutt2013-10-032-11/+12
| | | | | | | | | | | | | | Specifying gcc format function attribute for mpsslog(..) and building on 32 bit systems exposed a few build issues in the sample MIC daemon which are fixed by this patch. Some of these changes were authored by Joe Perches @ https://lkml.org/lkml/2013/9/27/419 Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Caz Yokoyama <Caz.Yokoyama@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: cleanups for "--strict" checkpatch.Ashutosh Dixit2013-09-272-34/+35
| | | | | | | | | | | | | These changes were mostly authored by Joe Perches <joe@perches.com> @ https://lkml.org/lkml/2013/9/5/602 Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Sample Implementation of Intel MIC User Space Daemon.Caz Yokoyama2013-09-268-0/+2347
This patch introduces a sample user space daemon which implements the virtio device backends on the host. The daemon creates/removes/configures virtio device backends by communicating with the Intel MIC Host Driver. The virtio devices currently supported are virtio net, virtio console and virtio block. Virtio net supports TSO/GSO. The daemon also monitors card shutdown status and takes appropriate actions like killing the virtio backends and resetting the card upon card shutdown and crashes. Co-author: Ashutosh Dixit <ashutosh.dixit@intel.com> Co-author: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Caz Yokoyama <Caz.Yokoyama@intel.com> Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Signed-off-by: Harshavardhan R Kharche <harshavardhan.r.kharche@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Acked-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>