1. 25 1月, 2018 1 次提交
  2. 08 1月, 2018 1 次提交
  3. 28 11月, 2017 1 次提交
  4. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  5. 17 9月, 2017 1 次提交
  6. 03 6月, 2017 1 次提交
  7. 11 11月, 2016 1 次提交
  8. 10 11月, 2016 1 次提交
    • A
      base: soc: Introduce soc_device_match() interface · c97db7cc
      Arnd Bergmann 提交于
      We keep running into cases where device drivers want to know the exact
      version of the a SoC they are currently running on. In the past, this has
      usually been done through a vendor specific API that can be called by a
      driver, or by directly accessing some kind of version register that is
      not part of the device itself but that belongs to a global register area
      of the chip.
      
      Common reasons for doing this include:
      
      - A machine is not using devicetree or similar for passing data about
        on-chip devices, but just announces their presence using boot-time
        platform devices, and the machine code itself does not care about the
        revision.
      
      - There is existing firmware or boot loaders with existing DT binaries
        with generic compatible strings that do not identify the particular
        revision of each device, but the driver knows which SoC revisions
        include which part.
      
      - A prerelease version of a chip has some quirks and we are using the same
        version of the bootloader and the DT blob on both the prerelease and the
        final version. An update of the DT binding seems inappropriate because
        that would involve maintaining multiple copies of the dts and/or
        bootloader.
      
      This patch introduces the soc_device_match() interface that is meant to
      work like of_match_node() but instead of identifying the version of a
      device, it identifies the SoC itself using a vendor-agnostic interface.
      
      Unlike of_match_node(), we do not do an exact string compare but instead
      use glob_match() to allow wildcards in strings.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NYangbo Lu <yangbo.lu@nxp.com>
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c97db7cc
  9. 27 10月, 2016 1 次提交
  10. 25 10月, 2016 1 次提交
    • C
      dma-buf: Rename struct fence to dma_fence · f54d1867
      Chris Wilson 提交于
      I plan to usurp the short name of struct fence for a core kernel struct,
      and so I need to rename the specialised fence/timeline for DMA
      operations to make room.
      
      A consensus was reached in
      https://lists.freedesktop.org/archives/dri-devel/2016-July/113083.html
      that making clear this fence applies to DMA operations was a good thing.
      Since then the patch has grown a bit as usage increases, so hopefully it
      remains a good thing!
      
      (v2...: rebase, rerun spatch)
      v3: Compile on msm, spotted a manual fixup that I broke.
      v4: Try again for msm, sorry Daniel
      
      coccinelle script:
      @@
      
      @@
      - struct fence
      + struct dma_fence
      @@
      
      @@
      - struct fence_ops
      + struct dma_fence_ops
      @@
      
      @@
      - struct fence_cb
      + struct dma_fence_cb
      @@
      
      @@
      - struct fence_array
      + struct dma_fence_array
      @@
      
      @@
      - enum fence_flag_bits
      + enum dma_fence_flag_bits
      @@
      
      @@
      (
      - fence_init
      + dma_fence_init
      |
      - fence_release
      + dma_fence_release
      |
      - fence_free
      + dma_fence_free
      |
      - fence_get
      + dma_fence_get
      |
      - fence_get_rcu
      + dma_fence_get_rcu
      |
      - fence_put
      + dma_fence_put
      |
      - fence_signal
      + dma_fence_signal
      |
      - fence_signal_locked
      + dma_fence_signal_locked
      |
      - fence_default_wait
      + dma_fence_default_wait
      |
      - fence_add_callback
      + dma_fence_add_callback
      |
      - fence_remove_callback
      + dma_fence_remove_callback
      |
      - fence_enable_sw_signaling
      + dma_fence_enable_sw_signaling
      |
      - fence_is_signaled_locked
      + dma_fence_is_signaled_locked
      |
      - fence_is_signaled
      + dma_fence_is_signaled
      |
      - fence_is_later
      + dma_fence_is_later
      |
      - fence_later
      + dma_fence_later
      |
      - fence_wait_timeout
      + dma_fence_wait_timeout
      |
      - fence_wait_any_timeout
      + dma_fence_wait_any_timeout
      |
      - fence_wait
      + dma_fence_wait
      |
      - fence_context_alloc
      + dma_fence_context_alloc
      |
      - fence_array_create
      + dma_fence_array_create
      |
      - to_fence_array
      + to_dma_fence_array
      |
      - fence_is_array
      + dma_fence_is_array
      |
      - trace_fence_emit
      + trace_dma_fence_emit
      |
      - FENCE_TRACE
      + DMA_FENCE_TRACE
      |
      - FENCE_WARN
      + DMA_FENCE_WARN
      |
      - FENCE_ERR
      + DMA_FENCE_ERR
      )
       (
       ...
       )
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161025120045.28839-1-chris@chris-wilson.co.uk
      f54d1867
  11. 31 8月, 2016 1 次提交
  12. 11 12月, 2014 1 次提交
    • A
      cma: make default CMA area size zero for x86 · d7be003a
      Akinobu Mita 提交于
      This makes CMA memory area size zero for x86 in default configuration
      (doesn't change on the other architectures).  If default CMA size is
      zero, DMA_CMA is disabled.  It can be enabled by passing cma= to the
      kernel.
      
      This makes less impact on x86.  Because there is no mainline driver that
      requires it for x86, and Peter Hurley reported the performance
      regression, as this is trying to drive _all_ dma mapping allocations
      through a _very_ small window.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Reported-by: NPeter Hurley <peter@hurleysoftware.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Chuck Ebbert <cebbert.lkml@gmail.com>
      Cc: Jean Delvare <jdelvare@suse.de>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Don Dutile <ddutile@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7be003a
  13. 08 11月, 2014 2 次提交
  14. 10 10月, 2014 1 次提交
  15. 24 9月, 2014 1 次提交
    • J
      device coredump: add new device coredump class · 833c9545
      Johannes Berg 提交于
      Many devices run firmware and/or complex hardware, and most of that
      can have bugs. When it misbehaves, however, it is often much harder
      to debug than software running on the host.
      
      Introduce a "device coredump" mechanism to allow dumping internal
      device/firmware state through a generalized mechanism. As devices
      are different and information needed can vary accordingly, this
      doesn't prescribe a file format - it just provides mechanism to
      get data to be able to capture it in a generalized way (e.g. in
      distributions.)
      
      The dumped data will be readable in sysfs in the virtual device's
      data file under /sys/class/devcoredump/devcd*/. Writing to it will
      free the data and remove the device, as does a 5-minute timeout.
      
      Note that generalized capturing of such data may result in privacy
      issues, so users generally need to be involved. In order to allow
      certain users/system integrators/... to disable the feature at all,
      introduce a Kconfig option to override the drivers that would like
      to have the feature.
      
      For now, this provides two ways of dumping data:
       1) with a vmalloc'ed area, that is then given to the subsystem
          and freed after retrieval or timeout
       2) with a generalized reader/free function method
      
      We could/should add more options, e.g. a list of pages, since the
      vmalloc area is very limited on some architectures.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      833c9545
  16. 07 8月, 2014 1 次提交
  17. 09 7月, 2014 2 次提交
    • T
      firmware loader: allow disabling of udev as firmware loader · 5a1379e8
      Takashi Iwai 提交于
      [The patch was originally proposed by Tom Gundersen, and rewritten
       afterwards by me; most of changelogs below borrowed from Tom's
       original patch -- tiwai]
      
      Currently (at least) the dell-rbu driver selects FW_LOADER_USER_HELPER,
      which means that distros can't really stop loading firmware through
      udev without breaking other users (though some have).
      
      Ideally we would remove/disable the udev firmware helper in both the
      kernel and in udev, but if we were to disable it in udev and not the
      kernel, the result would be (seemingly) hung kernels as no one would
      be around to cancel firmware requests.
      
      This patch allows udev firmware loading to be disabled while still
      allowing non-udev firmware loading, as done by the dell-rbu driver, to
      continue working. This is achieved by only using the fallback
      mechanism when the uevent is suppressed.
      
      The patch renames the user-selectable Kconfig from FW_LOADER_USER_HELPER
      to FW_LOADER_USER_HELPER_FALLBACK, and the former is reverse-selected
      by the latter or the drivers that need userhelper like dell-rbu.
      
      Also, the "default y" is removed together with this change, since it's
      been deprecated in udev upstream, thus rather better to disable it
      nowadays.
      
      Tested with
          FW_LOADER_USER_HELPER=n
          LATTICE_ECP3_CONFIG=y
          DELL_RBU=y
      and udev without the firmware loading support, but I don't have the
      hardware to test the lattice/dell drivers, so additional testing would
      be appreciated.
      Reviewed-by: NTom Gundersen <teg@jklm.no>
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: Abhay Salunke <Abhay_Salunke@dell.com>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Kay Sievers <kay@vrfy.org>
      Tested-by: NBalaji Singh <B_B_Singh@DELL.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5a1379e8
    • M
      fence: dma-buf cross-device synchronization (v18) · e941759c
      Maarten Lankhorst 提交于
      A fence can be attached to a buffer which is being filled or consumed
      by hw, to allow userspace to pass the buffer without waiting to another
      device.  For example, userspace can call page_flip ioctl to display the
      next frame of graphics after kicking the GPU but while the GPU is still
      rendering.  The display device sharing the buffer with the GPU would
      attach a callback to get notified when the GPU's rendering-complete IRQ
      fires, to update the scan-out address of the display, without having to
      wake up userspace.
      
      A driver must allocate a fence context for each execution ring that can
      run in parallel. The function for this takes an argument with how many
      contexts to allocate:
        + fence_context_alloc()
      
      A fence is transient, one-shot deal.  It is allocated and attached
      to one or more dma-buf's.  When the one that attached it is done, with
      the pending operation, it can signal the fence:
        + fence_signal()
      
      To have a rough approximation whether a fence is fired, call:
        + fence_is_signaled()
      
      The dma-buf-mgr handles tracking, and waiting on, the fences associated
      with a dma-buf.
      
      The one pending on the fence can add an async callback:
        + fence_add_callback()
      
      The callback can optionally be cancelled with:
        + fence_remove_callback()
      
      To wait synchronously, optionally with a timeout:
        + fence_wait()
        + fence_wait_timeout()
      
      When emitting a fence, call:
        + trace_fence_emit()
      
      To annotate that a fence is blocking on another fence, call:
        + trace_fence_annotate_wait_on(fence, on_fence)
      
      A default software-only implementation is provided, which can be used
      by drivers attaching a fence to a buffer when they have no other means
      for hw sync.  But a memory backed fence is also envisioned, because it
      is common that GPU's can write to, or poll on some memory location for
      synchronization.  For example:
      
        fence = custom_get_fence(...);
        if ((seqno_fence = to_seqno_fence(fence)) != NULL) {
          dma_buf *fence_buf = seqno_fence->sync_buf;
          get_dma_buf(fence_buf);
      
          ... tell the hw the memory location to wait ...
          custom_wait_on(fence_buf, seqno_fence->seqno_ofs, fence->seqno);
        } else {
          /* fall-back to sw sync * /
          fence_add_callback(fence, my_cb);
        }
      
      On SoC platforms, if some other hw mechanism is provided for synchronizing
      between IP blocks, it could be supported as an alternate implementation
      with it's own fence ops in a similar way.
      
      enable_signaling callback is used to provide sw signaling in case a cpu
      waiter is requested or no compatible hardware signaling could be used.
      
      The intention is to provide a userspace interface (presumably via eventfd)
      later, to be used in conjunction with dma-buf's mmap support for sw access
      to buffers (or for userspace apps that would prefer to do their own
      synchronization).
      
      v1: Original
      v2: After discussion w/ danvet and mlankhorst on #dri-devel, we decided
          that dma-fence didn't need to care about the sw->hw signaling path
          (it can be handled same as sw->sw case), and therefore the fence->ops
          can be simplified and more handled in the core.  So remove the signal,
          add_callback, cancel_callback, and wait ops, and replace with a simple
          enable_signaling() op which can be used to inform a fence supporting
          hw->hw signaling that one or more devices which do not support hw
          signaling are waiting (and therefore it should enable an irq or do
          whatever is necessary in order that the CPU is notified when the
          fence is passed).
      v3: Fix locking fail in attach_fence() and get_fence()
      v4: Remove tie-in w/ dma-buf..  after discussion w/ danvet and mlankorst
          we decided that we need to be able to attach one fence to N dma-buf's,
          so using the list_head in dma-fence struct would be problematic.
      v5: [ Maarten Lankhorst ] Updated for dma-bikeshed-fence and dma-buf-manager.
      v6: [ Maarten Lankhorst ] I removed dma_fence_cancel_callback and some comments
          about checking if fence fired or not. This is broken by design.
          waitqueue_active during destruction is now fatal, since the signaller
          should be holding a reference in enable_signalling until it signalled
          the fence. Pass the original dma_fence_cb along, and call __remove_wait
          in the dma_fence_callback handler, so that no cleanup needs to be
          performed.
      v7: [ Maarten Lankhorst ] Set cb->func and only enable sw signaling if
          fence wasn't signaled yet, for example for hardware fences that may
          choose to signal blindly.
      v8: [ Maarten Lankhorst ] Tons of tiny fixes, moved __dma_fence_init to
          header and fixed include mess. dma-fence.h now includes dma-buf.h
          All members are now initialized, so kmalloc can be used for
          allocating a dma-fence. More documentation added.
      v9: Change compiler bitfields to flags, change return type of
          enable_signaling to bool. Rework dma_fence_wait. Added
          dma_fence_is_signaled and dma_fence_wait_timeout.
          s/dma// and change exports to non GPL. Added fence_is_signaled and
          fence_enable_sw_signaling calls, add ability to override default
          wait operation.
      v10: remove event_queue, use a custom list, export try_to_wake_up from
          scheduler. Remove fence lock and use a global spinlock instead,
          this should hopefully remove all the locking headaches I was having
          on trying to implement this. enable_signaling is called with this
          lock held.
      v11:
          Use atomic ops for flags, lifting the need for some spin_lock_irqsaves.
          However I kept the guarantee that after fence_signal returns, it is
          guaranteed that enable_signaling has either been called to completion,
          or will not be called any more.
      
          Add contexts and seqno to base fence implementation. This allows you
          to wait for less fences, by testing for seqno + signaled, and then only
          wait on the later fence.
      
          Add FENCE_TRACE, FENCE_WARN, and FENCE_ERR. This makes debugging easier.
          An CONFIG_DEBUG_FENCE will be added to turn off the FENCE_TRACE
          spam, and another runtime option can turn it off at runtime.
      v12:
          Add CONFIG_FENCE_TRACE. Add missing documentation for the fence->context
          and fence->seqno members.
      v13:
          Fixup CONFIG_FENCE_TRACE kconfig description.
          Move fence_context_alloc to fence.
          Simplify fence_later.
          Kill priv member to fence_cb.
      v14:
          Remove priv argument from fence_add_callback, oops!
      v15:
          Remove priv from documentation.
          Explicitly include linux/atomic.h.
      v16:
          Add trace events.
          Import changes required by android syncpoints.
      v17:
          Use wake_up_state instead of try_to_wake_up. (Colin Cross)
          Fix up commit description for seqno_fence. (Rob Clark)
      v18:
          Rename release_fence to fence_release.
          Move to drivers/dma-buf/.
          Rename __fence_is_signaled and __fence_signal to *_locked.
          Rename __fence_init to fence_init.
          Make fence_default_wait return a signed long, and fix wait ops too.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Signed-off-by: Thierry Reding <thierry.reding@gmail.com> #use smp_mb__before_atomic()
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e941759c
  18. 05 6月, 2014 1 次提交
  19. 26 4月, 2014 1 次提交
  20. 19 2月, 2014 2 次提交
    • A
      x86: align x86 arch with generic CPU modalias handling · 2b9c1f03
      Ard Biesheuvel 提交于
      The x86 CPU feature modalias handling existed before it was reimplemented
      generically. This patch aligns the x86 handling so that it
      (a) reuses some more code that is now generic;
      (b) uses the generic format for the modalias module metadata entry, i.e., it
          now uses 'cpu:type:x86,venVVVVfamFFFFmodMMMM:feature:,XXXX,YYYY' instead of
          the 'x86cpu:vendor:VVVV:family:FFFF:model:MMMM:feature:,XXXX,YYYY' that was
          used before.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b9c1f03
    • A
      cpu: add generic support for CPU feature based module autoloading · 67bad2fd
      Ard Biesheuvel 提交于
      This patch adds support for advertising optional CPU features over udev
      using the modalias, and for declaring compatibility with/dependency upon
      such a feature in a module.
      
      The mapping between feature numbers and actual features should be provided
      by the architecture in a file called <asm/cpufeature.h> which exports the
      following functions/macros:
      - cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
        numeric index;
      - bool cpu_have_feature(n), returning whether this CPU has support for
        feature #n;
      - MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.
      
      The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
      for the architecture.
      
      For instance, a module that registers its module init function using
      
        module_cpu_feature_match(FEAT_X, module_init_function)
      
      will be probed automatically when the CPU's support for the 'FEAT_X'
      feature is advertised over udev, and will only allow the module to be
      loaded by hand if the 'FEAT_X' feature is supported.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67bad2fd
  21. 19 12月, 2013 1 次提交
  22. 02 7月, 2013 1 次提交
  23. 04 6月, 2013 1 次提交
  24. 04 2月, 2013 1 次提交
  25. 26 10月, 2012 1 次提交
  26. 23 10月, 2012 1 次提交
  27. 01 8月, 2012 1 次提交
  28. 21 5月, 2012 1 次提交
  29. 11 2月, 2012 1 次提交
    • L
      drivers/base: add bus for System-on-Chip devices · 74d1d82c
      Lee Jones 提交于
      Traditionally, any System-on-Chip based platform creates a flat list
      of platform_devices directly under /sys/devices/platform.
      
      In order to give these some better structure, this introduces a new
      bus type for soc_devices that are registered with the new
      soc_device_register() function.  All devices that are on the same
      chip should then be registered as child devices of the soc device.
      
      The soc bus also exports a few standardised device attributes which
      allow user space to query the specific type of soc.
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      74d1d82c
  30. 13 1月, 2012 1 次提交
  31. 12 1月, 2012 1 次提交
  32. 06 1月, 2012 2 次提交
    • S
      dma-buf: mark EXPERIMENTAL for 1st release. · a125a394
      Sumit Semwal 提交于
      Mark dma-buf buffer sharing API as EXPERIMENTAL for first release.
      We will remove this in later versions, once it gets smoothed out
      and has more users.
      Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
      Signed-off-by: NSumit Semwal <sumit.semwal@ti.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a125a394
    • S
      dma-buf: Introduce dma buffer sharing mechanism · d15bd7ee
      Sumit Semwal 提交于
      This is the first step in defining a dma buffer sharing mechanism.
      
      A new buffer object dma_buf is added, with operations and API to allow easy
      sharing of this buffer object across devices.
      
      The framework allows:
      - creation of a buffer object, its association with a file pointer, and
         associated allocator-defined operations on that buffer. This operation is
         called the 'export' operation.
      - different devices to 'attach' themselves to this exported buffer object, to
        facilitate backing storage negotiation, using dma_buf_attach() API.
      - the exported buffer object to be shared with the other entity by asking for
         its 'file-descriptor (fd)', and sharing the fd across.
      - a received fd to get the buffer object back, where it can be accessed using
         the associated exporter-defined operations.
      - the exporter and user to share the scatterlist associated with this buffer
         object using map_dma_buf and unmap_dma_buf operations.
      
      Atleast one 'attach()' call is required to be made prior to calling the
      map_dma_buf() operation.
      
      Couple of building blocks in map_dma_buf() are added to ease introduction
      of sync'ing across exporter and users, and late allocation by the exporter.
      
      For this first version, this framework will work with certain conditions:
      - *ONLY* exporter will be allowed to mmap to userspace (outside of this
         framework - mmap is not a buffer object operation),
      - currently, *ONLY* users that do not need CPU access to the buffer are
         allowed.
      
      More details are there in the documentation patch.
      
      This is based on design suggestions from many people at the mini-summits[1],
      most notably from Arnd Bergmann <arnd@arndb.de>, Rob Clark <rob@ti.com> and
      Daniel Vetter <daniel@ffwll.ch>.
      
      The implementation is inspired from proof-of-concept patch-set from
      Tomasz Stanislawski <t.stanislaws@samsung.com>, who demonstrated buffer sharing
      between two v4l2 devices. [2]
      
      [1]: https://wiki.linaro.org/OfficeofCTO/MemoryManagement
      [2]: http://lwn.net/Articles/454389Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
      Signed-off-by: NSumit Semwal <sumit.semwal@ti.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDave Airlie <airlied@redhat.com>
      Reviewed-and-Tested-by: NRob Clark <rob.clark@linaro.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d15bd7ee
  33. 23 7月, 2011 1 次提交
    • M
      regmap: Add generic non-memory mapped register access API · b83a313b
      Mark Brown 提交于
      There are many places in the tree where we implement register access for
      devices on non-memory mapped buses, especially I2C and SPI. Since hardware
      designers seem to have settled on a relatively consistent set of register
      interfaces this can be effectively factored out into shared code.  There
      are a standard set of formats for marshalling data for exchange with the
      device, with the actual I/O mechanisms generally being simple byte
      streams.
      
      We create an abstraction for marshaling data into formats which can be
      sent on the control interfaces, and create a standard method for
      plugging in actual transport underneath that.
      
      This is mostly a refactoring and renaming of the bottom level of the
      existing code for sharing register I/O which we have in ASoC. A
      subsequent patch in this series converts ASoC to use this.  The main
      difference in interface is that reads return values by writing to a
      location provided by a pointer rather than in the return value, ensuring
      we can use the full range of the type for register data.  We also use
      unsigned types rather than ints for the same reason.
      
      As some of the devices can have very large register maps the existing
      ASoC code also contains infrastructure for managing register caches.
      This cache work will be moved over in a future stage to allow for
      separate review, the current patch only deals with the physical I/O.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NWolfram Sang <w.sang@pengutronix.de>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      b83a313b
  34. 02 7月, 2011 3 次提交