1. 25 6月, 2015 1 次提交
    • D
      libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices · 62232e45
      Dan Williams 提交于
      Most discovery/configuration of the nvdimm-subsystem is done via sysfs
      attributes.  However, some nvdimm_bus instances, particularly the
      ACPI.NFIT bus, define a small set of messages that can be passed to the
      platform.  For convenience we derive the initial libnvdimm-ioctl command
      formats directly from the NFIT DSM Interface Example formats.
      
          ND_CMD_SMART: media health and diagnostics
          ND_CMD_GET_CONFIG_SIZE: size of the label space
          ND_CMD_GET_CONFIG_DATA: read label space
          ND_CMD_SET_CONFIG_DATA: write label space
          ND_CMD_VENDOR: vendor-specific command passthrough
          ND_CMD_ARS_CAP: report address-range-scrubbing capabilities
          ND_CMD_ARS_START: initiate scrubbing
          ND_CMD_ARS_STATUS: report on scrubbing state
          ND_CMD_SMART_THRESHOLD: configure alarm thresholds for smart events
      
      If a platform later defines different commands than this set it is
      straightforward to extend support to those formats.
      
      Most of the commands target a specific dimm.  However, the
      address-range-scrubbing commands target the bus.  The 'commands'
      attribute in sysfs of an nvdimm_bus, or nvdimm, enumerate the supported
      commands for that object.
      
      Cc: <linux-acpi@vger.kernel.org>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reported-by: NNicholas Moulin <nicholas.w.moulin@linux.intel.com>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      62232e45
  2. 03 4月, 2015 1 次提交
  3. 29 3月, 2015 1 次提交
  4. 17 2月, 2015 1 次提交
  5. 15 2月, 2015 1 次提交
  6. 20 1月, 2015 1 次提交
  7. 23 12月, 2014 1 次提交
  8. 09 12月, 2014 3 次提交
  9. 06 12月, 2014 1 次提交
  10. 05 12月, 2014 1 次提交
  11. 03 12月, 2014 1 次提交
  12. 25 11月, 2014 1 次提交
  13. 15 11月, 2014 1 次提交
  14. 08 11月, 2014 1 次提交
  15. 04 11月, 2014 1 次提交
  16. 20 10月, 2014 1 次提交
  17. 15 10月, 2014 1 次提交
  18. 04 10月, 2014 1 次提交
    • A
      target: Add a user-passthrough backstore · 7c9e7a6f
      Andy Grover 提交于
      Add a LIO storage engine that presents commands to userspace for execution.
      This would allow more complex backstores to be implemented out-of-kernel,
      and also make experimentation a-la FUSE (but at the SCSI level -- "SUSE"?)
      possible.
      
      It uses a mmap()able UIO device per LUN to share a command ring and data
      area. The commands are raw SCSI CDBs and iovs for in/out data. The command
      ring is also reused for returning scsi command status and optional sense
      data.
      
      This implementation is based on Shaohua Li's earlier version but heavily
      modified. Differences include:
      
      * Shared memory allocated by kernel, not locked-down user pages
      * Single ring for command request and response
      * Offsets instead of embedded pointers
      * Generic SCSI CDB passthrough instead of per-cmd specialization in ring
        format.
      * Uses UIO device instead of anon_file passed in mailbox.
      * Optional in-kernel handling of some commands.
      
      The main reason for these differences is to permit greater resiliency
      if the user process dies or hangs.
      
      Things not yet implemented (on purpose):
      
      * Zero copy. The data area is flexible enough to allow page flipping or
        backend-allocated pages to be used by fabrics, but it's not clear these
        are performance wins. Can come later.
      * Out-of-order command completion by userspace. Possible to add by just
        allowing userspace to change cmd_id in rsp cmd entries, but currently
        not supported.
      * No locks between kernel cmd submission and completion routines. Sounds
        like it's possible, but this can come later.
      * Sparse allocation of mmaped area. Current code vmallocs the whole thing.
        If the mapped area was larger and not fully mapped then the driver would
        have more freedom to change cmd and data area sizes based on demand.
      
      Current code open issues:
      
      * The use of idrs may be overkill -- we maybe can replace them with a
        simple counter to generate cmd_ids, and a hash table to get a cmd_id's
        associated pointer.
      * Use of a free-running counter for cmd ring instead of explicit modulo
        math. This would require power-of-2 cmd ring size.
      
      (Add kconfig depends NET - Randy)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      7c9e7a6f
  19. 11 9月, 2014 1 次提交
  20. 10 9月, 2014 1 次提交
  21. 05 9月, 2014 1 次提交
  22. 22 8月, 2014 1 次提交
  23. 30 4月, 2014 1 次提交
  24. 08 2月, 2014 1 次提交
  25. 26 11月, 2013 1 次提交
    • G
      zorro/UAPI: Disintegrate include/linux/zorro*.h · 986ea58d
      Geert Uytterhoeven 提交于
      The Zorro definitions and device IDs are used by bootstraps, hence they
      should be exported through UAPI.
      
      Unfortunately zorro.h was never marked for export when headers_install
      was introduced, so it was forgotten during the big UAPI disintegration.
      In addition, the removal of zorro_ids.h had been sneaked into commit
      7e7a43c3 ("PCI: don't export device IDs to
      userspace") before, so it was also forgotten.
      
      Split off and export the Zorro definitions used by bootstraps.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      986ea58d
  26. 27 9月, 2013 2 次提交
  27. 05 9月, 2013 1 次提交
    • C
      net: sync some IP headers with glibc · cfd280c9
      Carlos O'Donell 提交于
      Solution:
      =========
      
      - Synchronize linux's `include/uapi/linux/in6.h'
        with glibc's `inet/netinet/in.h'.
      - Synchronize glibc's `inet/netinet/in.h with linux's
        `include/uapi/linux/in6.h'.
      - Allow including the headers in either other.
      - First header included defines the structures and macros.
      
      Details:
      ========
      
      The kernel promises not to break the UAPI ABI so I don't
      see why we can't just have the two userspace headers
      coordinate?
      
      If you include the kernel headers first you get those,
      and if you include the glibc headers first you get those,
      and the following patch arranges a coordination and
      synchronization between the two.
      
      Let's handle `include/uapi/linux/in6.h' from linux,
      and `inet/netinet/in.h' from glibc and ensure they compile
      in any order and preserve the required ABI.
      
      These two patches pass the following compile tests:
      
      cat >> test1.c <<EOF
      int main (void) {
        return 0;
      }
      EOF
      gcc -c test1.c
      
      cat >> test2.c <<EOF
      int main (void) {
        return 0;
      }
      EOF
      gcc -c test2.c
      
      One wrinkle is that the kernel has a different name for one of
      the members in ipv6_mreq. In the kernel patch we create a macro
      to cover the uses of the old name, and while that's not entirely
      clean it's one of the best solutions (aside from an anonymous
      union which has other issues).
      
      I've reviewed the code and it looks to me like the ABI is
      assured and everything matches on both sides.
      
      Notes:
      - You want netinet/in.h to include bits/in.h as early as possible,
        but it needs in_addr so define in_addr early.
      - You want bits/in.h included as early as possible so you can use
        the linux specific code to define __USE_KERNEL_DEFS based on
        the _UAPI_* macro definition and use those to cull in.h.
      - glibc was missing IPPROTO_MH, added here.
      
      Compile tested and inspected.
      Reported-by: NThomas Backlund <tmb@mageia.org>
      Cc: Thomas Backlund <tmb@mageia.org>
      Cc: libc-alpha@sourceware.org
      Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Cc: David S. Miller <davem@davemloft.net>
      Tested-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NCarlos O'Donell <carlos@redhat.com>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfd280c9
  28. 04 9月, 2013 1 次提交
  29. 01 7月, 2013 1 次提交
  30. 20 6月, 2013 1 次提交
  31. 10 4月, 2013 1 次提交
    • D
      net: sctp: introduce uapi header for sctp · 1b866434
      Daniel Borkmann 提交于
      This patch introduces an UAPI header for the SCTP protocol,
      so that we can facilitate the maintenance and development of
      user land applications or libraries, in particular in terms
      of header synchronization.
      
      To not break compatibility, some fragments from lksctp-tools'
      netinet/sctp.h have been carefully included, while taking care
      that neither kernel nor user land breaks, so both compile fine
      with this change (for lksctp-tools I tested with the old
      netinet/sctp.h header and with a newly adapted one that includes
      the uapi sctp header). lksctp-tools smoke test run through
      successfully as well in both cases.
      Suggested-by: NNeil Horman <nhorman@tuxdriver.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b866434
  32. 30 3月, 2013 1 次提交
  33. 20 2月, 2013 1 次提交
  34. 13 12月, 2012 1 次提交
  35. 20 11月, 2012 1 次提交
    • D
      perf: Make perf build for x86 with UAPI disintegration applied · d2709c7c
      David Howells 提交于
      Make perf build for x86 once the UAPI disintegration patches for that arch
      have been applied by adding the appropriate -I flags - in the right order -
      and then converting some #includes that use ../.. notation to find main kernel
      headerfiles to use <asm/foo.h> and <linux/foo.h> instead.
      
      Note that -Iarch/foo/include/uapi is present _before_ -Iarch/foo/include.
      This makes sure we get the userspace version of the pt_regs struct.  Ideally,
      we wouldn't have the latter -I flag at all, but unfortunately we want
      asm/svm.h and asm/vmx.h in builtin-kvm.c and these aren't part of the UAPI -
      at least not for x86.  I wonder if the bits outside of the __KERNEL__ guards
      *should* be transferred there.
      
      I note also that perf seems to do its dependency handling manually by listing
      all the header files it might want to use in LIB_H in the Makefile.  Can this
      be changed to use -MD?
      
      Note that to do make this work, we need to export and UAPI disintegrate
      linux/hw_breakpoint.h, which I think should've been exported previously so that
      perf can access the bits.  We have to do this in the same patch to maintain
      bisectability.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      d2709c7c
  36. 13 10月, 2012 1 次提交
  37. 03 10月, 2012 1 次提交
    • D
      UAPI: Plumb the UAPI Kbuilds into the user header installation and checking · 10b63956
      David Howells 提交于
      Plumb the UAPI Kbuilds into the user header installation and checking system.
      As the headers are split the entries will be transferred across from the old
      Kbuild files to the UAPI Kbuild files.
      
      The changes made in this commit are:
      
       (1) Exported generated files (of which there are currently four) are moved to
           uapi/ directories under the appropriate generated/ directory, thus we
           get:
      
      	include/generated/uapi/linux/version.h
      	arch/x86/include/generated/uapi/asm/unistd_32.h
      	arch/x86/include/generated/uapi/asm/unistd_64.h
      	arch/x86/include/generated/uapi/asm/unistd_x32.h
      
           These paths were added to the build as -I flags in a previous patch.
      
       (2) scripts/Makefile.headersinst is now given the UAPI path to install from
           rather than the old path.
      
           It then determines the old path from that and includes that Kbuild also
           if it exists, thus permitting the headers to exist in either directory
           during the changeover.
      
           I also renamed the "install" variable to "installdir" as it refers to a
           directory not the install program.
      
       (3) scripts/headers_install.pl is altered to take a list of source file paths
           instead of just their names so that the makefile can tell it exactly
           where to find each file.
      
           For the moment, files can be obtained from one of four places for each
           output directory:
      
      	.../include/uapi/foo/
      	.../include/generated/uapi/foo/
      	.../include/foo/
      	.../include/generated/foo/
      
           The non-UAPI paths will be dropped later.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      10b63956