09 May, 2018

2 commits


02 Nov, 2017

1 commit

  • 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
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

03 Aug, 2016

1 commit

  • When a large enough area in the iommu bitmap is found but would span a
    boundary we continue the search starting from the next bit position.
    For large allocations this can lead to several useless invocations of
    bitmap_find_next_zero_area() and iommu_is_span_boundary().

    Continue the search from the start of the next segment (which is the
    next bit position such that we'll not cross the same segment boundary
    again).

    Link: http://lkml.kernel.org/r/alpine.LFD.2.20.1606081910070.3211@schleppi
    Signed-off-by: Sebastian Ott
    Reviewed-by: Gerald Schaefer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sebastian Ott
     

25 Mar, 2012

1 commit

  • Pull cleanup of fs/ and lib/ users of module.h from Paul Gortmaker:
    "Fix up files in fs/ and lib/ dirs to only use module.h if they really
    need it.

    These are trivial in scope vs the work done previously. We now have
    things where any few remaining cleanups can be farmed out to arch or
    subsystem maintainers, and I have done so when possible. What is
    remaining here represents the bits that don't clearly lie within a
    single arch/subsystem boundary, like the fs dir and the lib dir.

    Some duplicate includes arising from overlapping fixes from
    independent subsystem maintainer submissions are also quashed."

    Fix up trivial conflicts due to clashes with other include file cleanups
    (including some due to the previous bug.h cleanup pull).

    * tag 'module-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    lib: reduce the use of module.h wherever possible
    fs: reduce the use of module.h wherever possible
    includecheck: delete any duplicate instances of module.h

    Linus Torvalds
     

08 Mar, 2012

1 commit


01 Mar, 2012

1 commit


10 Aug, 2010

1 commit

  • A profile of a network benchmark showed iommu_num_pages rather high up:

    0.52% iommu_num_pages

    Looking at the profile, an integer divide is taking almost all of the time:

    %
    : c000000000376ea4 :
    1.93 : c000000000376ea4: fb e1 ff f8 std r31,-8(r1)
    0.00 : c000000000376ea8: f8 21 ff c1 stdu r1,-64(r1)
    0.00 : c000000000376eac: 7c 3f 0b 78 mr r31,r1
    3.86 : c000000000376eb0: 38 84 ff ff addi r4,r4,-1
    0.00 : c000000000376eb4: 38 05 ff ff addi r0,r5,-1
    0.00 : c000000000376eb8: 7c 84 2a 14 add r4,r4,r5
    46.95 : c000000000376ebc: 7c 00 18 38 and r0,r0,r3
    45.66 : c000000000376ec0: 7c 84 02 14 add r4,r4,r0
    0.00 : c000000000376ec4: 7c 64 2b 92 divdu r3,r4,r5
    0.00 : c000000000376ec8: 38 3f 00 40 addi r1,r31,64
    0.00 : c000000000376ecc: eb e1 ff f8 ld r31,-8(r1)
    1.61 : c000000000376ed0: 4e 80 00 20 blr

    Since every caller of iommu_num_pages passes in a constant power of two
    we can inline this such that the divide is replaced by a shift. The
    entire function is only a few instructions once optimised, so it is
    a good candidate for inlining overall.

    Signed-off-by: Anton Blanchard
    Cc: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

16 Dec, 2009

1 commit

  • Use bitmap library and kill some unused iommu helper functions.

    1. s/iommu_area_free/bitmap_clear/

    2. s/iommu_area_reserve/bitmap_set/

    3. Use bitmap_find_next_zero_area instead of find_next_zero_area

    This cannot be simple substitution because find_next_zero_area
    doesn't check the last bit of the limit in bitmap

    4. Remove iommu_area_free, iommu_area_reserve, and find_next_zero_area

    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: FUJITA Tomonori
    Cc: Joerg Roedel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

17 Oct, 2008

1 commit

  • This patch introduces the generic iommu_num_pages function. It can be used by
    a given memory area.

    Signed-off-by: Joerg Roedel
    Cc: "David S. Miller"
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joerg Roedel
     

22 Sep, 2008

1 commit

  • x86 has set_bit_string() that does the exact same thing that
    set_bit_area() in lib/iommu-helper.c does.

    This patch exports set_bit_area() in lib/iommu-helper.c as
    iommu_area_reserve(), converts GART, Calgary, and AMD IOMMU to use it.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Joerg Roedel
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

29 Jul, 2008

1 commit

  • This IOMMU helper function doesn't work for some architectures:

    http://marc.info/?l=linux-kernel&m=121699304403202&w=2

    It also breaks POWER and SPARC builds:

    http://marc.info/?l=linux-kernel&m=121730388001890&w=2

    Currently, only x86 IOMMUs use this so let's move it to x86 for
    now.

    Reported-by: Stephen Rothwell
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

26 Jul, 2008

1 commit

  • Calculating the number of pages from given address and length numbers is a task
    required in multiple IOMMU implementations. So implement this as a generic
    function into the IOMMU helper code.

    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    Cc: bhavna.sarathy@amd.com
    Cc: robert.richter@amd.com
    Cc: FUJITA Tomonori
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     

05 Mar, 2008

1 commit

  • iommu_is_span_boundary is used internally in the IOMMU helper
    (lib/iommu-helper.c), a primitive function that judges whether a memory area
    spans LLD's segment boundary or not.

    It's difficult to convert some IOMMUs to use the IOMMU helper but
    iommu_is_span_boundary is still useful for them. So this patch exports it.

    This is needed for the parisc iommu fixes.

    Signed-off-by: FUJITA Tomonori
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Grant Grundler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

06 Feb, 2008

1 commit