21 Sep, 2016

1 commit

  • 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
    Signed-off-by: Shuah Khan

    Shuah Khan
     

04 Jun, 2016

1 commit

  • 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
    Signed-off-by: Mike Danese
    Signed-off-by: Jonathan Corbet

    Mike Danese
     

18 Mar, 2016

1 commit

  • 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
    ...

    Linus Torvalds
     

18 Feb, 2016

1 commit

  • 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
    Signed-off-by: Jonathan Corbet

    Mahesh Khanwalkar
     

10 Feb, 2016

1 commit

  • 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
    Signed-off-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Dutt
     

04 Oct, 2015

1 commit

  • 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
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     

27 Jun, 2015

1 commit

  • 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
    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()
    ...

    Linus Torvalds
     

23 Jun, 2015

1 commit

  • 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
    Cc: Ashutosh Dixit
    Cc: Sudeep Dutt
    Cc: Caz Yokoyama
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Jonathan Corbet

    Paul Gortmaker
     

25 May, 2015

2 commits


06 Dec, 2014

1 commit

  • 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
    Reported-by: Dan Streetman
    Suggested-by: Peter Foley
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Jonathan Corbet

    Ashutosh Dixit
     

03 Oct, 2014

1 commit

  • 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
    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

    Peter Foley
     

26 Sep, 2014

3 commits


12 Jul, 2014

2 commits


28 Nov, 2013

3 commits

  • 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
    Reviewed-by: Sudeep Dutt
    Reviewed-by: Nikhil Rao
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     
  • 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 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
    Reviewed-by: Sudeep Dutt
    Signed-off-by: Nikhil Rao
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     
  • 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
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     

06 Oct, 2013

1 commit

  • 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
    Signed-off-by: Nikhil Rao
    Signed-off-by: Harshavardhan R Kharche
    Signed-off-by: Sudeep Dutt
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Greg Kroah-Hartman

    Dasaratharaman Chandramouli
     

04 Oct, 2013

1 commit

  • 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
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Caz Yokoyama
    Signed-off-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Sudeep Dutt
     

28 Sep, 2013

1 commit

  • These changes were mostly authored by Joe Perches
    @ https://lkml.org/lkml/2013/9/5/602

    Reported-by: Joe Perches
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Nikhil Rao
    Signed-off-by: Harshavardhan R Kharche
    Signed-off-by: Sudeep Dutt
    Signed-off-by: Greg Kroah-Hartman

    Ashutosh Dixit
     

27 Sep, 2013

1 commit

  • 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
    Co-author: Sudeep Dutt
    Signed-off-by: Ashutosh Dixit
    Signed-off-by: Caz Yokoyama
    Signed-off-by: Dasaratharaman Chandramouli
    Signed-off-by: Nikhil Rao
    Signed-off-by: Harshavardhan R Kharche
    Signed-off-by: Sudeep Dutt
    Acked-by: Yaozu (Eddie) Dong
    Signed-off-by: Greg Kroah-Hartman

    Caz Yokoyama