1. 10 Feb, 2022 5 commits
    • Jonathan Corbet's avatar
      Merge branch 'pdf-conversion' into docs-next · f647de4b
      Jonathan Corbet authored
      PDF-generation improvements from Akira Yokasawa; Akira says:
      
      This patch set improves conversions of DOT -> PDF and SVG -> PDF
      for PDF docs.
      
      * DOT -> PDF conversion
      
      Current scheme uses "dot -Tpdf" (of graphviz).
      
      Cons:
        - openSUSE's dot(1) does not support -Tpdf.
        - Other distro's dot(1) generates PDFs with unnecessarily wide
          margins for inclusion into LaTeX docs.
      
      Patch 1/4 changes the route to the following two steps:
      
        1. DOT -> SVG by "dot -Tsvg"
        2. SVG -> PDF by "rsvg-convert -f pdf" with fallback to convert(1)
      
      Pros:
        - Improved portability across distros
        - Less space around graphs in final PDF documents
      
      Con:
        - On systems without rsvg-convert, generated PDF will be of raster
          image.
      
      Patch 2/4 avoids raster-image PDF by using "dot -Tpdf" on systems where
      the option is available.
      
      * SVG -> PDF conversion
      
      Current scheme uses convert(1) (of ImageMagick)
      
      Cons:
        - Generated PDFs are of raster image.  Some of them look blurry.
        - Raster images tend to be large in size.
        - convert(1) delegates SVG decoding to rsvg-convert(1).
          It doesn't cover full range of Inkscape-specific SVG features
          and fails to convert some of SVG figures properly.
      
      Improper conversions are observed with SVGs listed below (incomplete,
      conversion quality depends on the version of rsvg-convert):
        - Documentation/userspace-api/media/v4l/selection.svg
        - Documentation/userspace-api/media/v4l/vbi_525.svg
        - Documentation/userspace-api/media/v4l/vbi_625.svg
        - Documentation/userspace-api/media/v4l/vbi_hsync.svg
        - Documentation/admin-guide/blockdev/drbd/DRBD-8.3-data-packets.svg
        - Documentation/admin-guide/blockdev/drbd/DRBD-data-packages.svg
      
      If you have Inkscape installed as well, convert(1) delegates SVG
      decoding to inkscape(1) rather than to rsvg-convert(1) and SVGs listed
      above can be rendered properly.
      
      So if Inkscape is required for converting those SVGs properly, why not
      use it directly in the first place?
      
      Patches 3/4 and 4/4 add code to utilize inkscape(1) for SVG -> PDF
      conversion when it is available.  They don't modify any existing
      requirements for kernel-doc.
      
      Patch 3/4 adds the alternative route of SVG -> PDF conversion by
      inkscape(1).
      Patch 4/4 delegates warning messages from inkscape(1) to kernellog.verbose
      as they are likely harmless in command-line uses.
      
      Pros:
        - Generated PDFs are of vector graphics.
        - Vector graphics tends to be smaller in size and looks nicer when
          zoomed in.
        - SVGs drawn by Inkscape are fully supported.
      
      On systems without Inkscape, no regression is expected by these two
      patches.
      f647de4b
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Delegate inkscape msg to kernellog.verbose · f30a7ac8
      Akira Yokosawa authored
      Depending on its version, distro config, and system-setup type,
      inkscape(1) emits various warning messages which are harmless in
      command-line uses.
      
      List of such warning messages (incomplete, long ones wrapped):
      
        - Gtk-Message: hh:mm:ss.nnn: Failed to load module "canberra-gtk-module"
        - Unable to init server: Could not connect: Connection refused
        - Failed to get connection
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_proxy_new_for_name:
          assertion 'connection != NULL' failed
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_proxy_call:
          assertion 'DBUS_IS_G_PROXY (proxy)' failed
        - ** (inkscape:xxx): CRITICAL **: hh:mm:ss.nnn: dbus_g_connection_register_g_object:
          assertion 'connection != NULL' failed
        - ** (inkscape:xxx): WARNING **: hh:mm:ss.nnn:
          Fonts dir '/usr/share/inkscape/fonts' does not exist and will be ignored.
      
      To avoid unnecessary anxiety, capture the message and output it via
      kernellog.verbose or kernellog.warn depending on the exit code.
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/e26a7b53-9155-8394-4a31-6006379b65a5@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      f30a7ac8
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Use inkscape(1) for SVG -> PDF conversion · 8ccd0569
      Akira Yokosawa authored
      Using convert(1) of ImageMagick for SVG -> PDF conversion results in
      PDFs containing raster (bitmap) images which sometimes look blurry.
      
      Ideally speaking, SVG to PDF conversion should retain vector graphics
      in SVG.
      
      rsvg-convert(1) can do such conversions with regard to SVG files
      generated by dot(1).
      
      Unfortunately, rsvg-convert(1) does not cover some of SVG features
      specific to Inkscape.
      inkscape(1) of Inkscape naturally covers such SVG features.
      
      So add a route in svg2pdf() so that inkscape(1) is used when it is
      available.
      
      Note:
          After this change, if you have Inkscape installed, ImageMagick nor
          librsvg are not required.
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Link: https://lore.kernel.org/r/3eea2a8d-c52d-ee07-cf7b-83784c6f6e4b@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      8ccd0569
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Add check of 'dot -Tpdf' · ecf5fb58
      Akira Yokosawa authored
      To prevent any regression on existing build systems, limit the
      fallback of converting DOT -> raster PDF only when both of the
      following conditions are met.
      
       o dot(1) doesn't support -Tpdf
       o rsvg-convert(1) is not found
      
      While we are here, add kernellog.verbose messages related to
      rsvg-convert, 'dot -Tpdf', and 'dot -Tsvg' commands.
      Suggested-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Link: https://lore.kernel.org/r/e76f61e1-7366-ba00-b119-8ea6a2499861@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      ecf5fb58
    • Akira Yokosawa's avatar
      docs: sphinx/kfigure.py: Use rsvg-convert(1) for DOT -> PDF conversion · c9edbe1e
      Akira Yokosawa authored
      On openSUSE, dot(1) command does not support direct PDF output.
      On other distros, generated PDF images have unnecessarily wide margins,
      especially for small graphs.
      
      By using dot(1) for DOT -> SVG, then rsvg-convert(1) for SVG -> PDF,
      more optimal PDF images can be obtained, with the bonus of improved
      portability across various distros.
      
      Add rules in kfigure.py so that the above mentioned route is taken
      when rsvg-convert(1) is available.
      
      Note that rsvg-convert(1) is recommended by sphinx_pre_install.
      So it is most likely that existing systems for building pdfdocs have
      rsvg-convert(1) installed.
      
      Note:
          SVG features supported by rsvg-convert(1) vary depending on its
          version and distro config.
          For example, the one found on Ubuntu Bionic (version 2.40.20) does
          poor job in rendering some of SVG files drawn by Inkscape.
          SVG files generated by dot(1) are converted nicely even with such
          old versions of rsvg-convert.
      
          So this change does not affect the quality of such figures in any
          way.
      Signed-off-by: default avatarAkira Yokosawa <akiyks@gmail.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Link: https://lore.kernel.org/r/15b56dd3-081a-2469-c3a4-dfc1ca4c6c2d@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      c9edbe1e
  2. 01 Feb, 2022 2 commits
  3. 27 Jan, 2022 20 commits
  4. 23 Jan, 2022 6 commits
    • Linus Torvalds's avatar
      Linux 5.17-rc1 · e783362e
      Linus Torvalds authored
      e783362e
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of... · 40c84321
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Fix printing 'phys_addr' in 'perf script'.
      
       - Fix failure to add events with 'perf probe' in ppc64 due to not
         removing leading dot (ppc64 ABIv1).
      
       - Fix cpu_map__item() python binding building.
      
       - Support event alias in form foo-bar-baz, add pmu-events and
         parse-event tests for it.
      
       - No need to setup affinities when starting a workload or attaching to
         a pid.
      
       - Use path__join() to compose a path instead of ad-hoc snprintf()
         equivalent.
      
       - Override attr->sample_period for non-libpfm4 events.
      
       - Use libperf cpumap APIs instead of accessing the internal state
         directly.
      
       - Sync x86 arch prctl headers and files changed by the new
         set_mempolicy_home_node syscall with the kernel sources.
      
       - Remove duplicate include in cpumap.h.
      
       - Remove redundant err variable.
      
      * tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Remove redundant err variable
        perf test: Add parse-events test for aliases with hyphens
        perf test: Add pmu-events test for aliases with hyphens
        perf parse-events: Support event alias in form foo-bar-baz
        perf evsel: Override attr->sample_period for non-libpfm4 events
        perf cpumap: Remove duplicate include in cpumap.h
        perf cpumap: Migrate to libperf cpumap api
        perf python: Fix cpu_map__item() building
        perf script: Fix printing 'phys_addr' failure issue
        tools headers UAPI: Sync files changed by new set_mempolicy_home_node syscall
        tools headers UAPI: Sync x86 arch prctl headers with the kernel sources
        perf machine: Use path__join() to compose a path instead of snprintf(dir, '/', filename)
        perf evlist: No need to setup affinities when disabling events for pid targets
        perf evlist: No need to setup affinities when enabling events for pid targets
        perf stat: No need to setup affinities when starting a workload
        perf affinity: Allow passing a NULL arg to affinity__cleanup()
        perf probe: Fix ppc64 'perf probe add events failed' case
      40c84321
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 67bfce0e
      Linus Torvalds authored
      Pull ftrace fix from Steven Rostedt:
       "Fix s390 breakage from sorting mcount tables.
      
        The latest merge of the tracing tree sorts the mcount table at build
        time. But s390 appears to do things differently (like always) and
        replaces the sorted table back to the original unsorted one. As the
        ftrace algorithm depends on it being sorted, bad things happen when it
        is not, and s390 experienced those bad things.
      
        Add a new config to tell the boot if the mcount table is sorted or
        not, and allow s390 to opt out of it"
      
      * tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix assuming build time sort works for s390
      67bfce0e
    • Steven Rostedt (Google)'s avatar
      ftrace: Fix assuming build time sort works for s390 · 6b9b6413
      Steven Rostedt (Google) authored
      To speed up the boot process, as mcount_loc needs to be sorted for ftrace
      to work properly, sorting it at build time is more efficient than boot up
      and can save milliseconds of time. Unfortunately, this change broke s390
      as it will modify the mcount_loc location after the sorting takes place
      and will put back the unsorted locations. Since the sorting is skipped at
      boot up if it is believed that it was sorted at run time, ftrace can crash
      as its algorithms are dependent on the list being sorted.
      
      Add a new config BUILDTIME_MCOUNT_SORT that is set when
      BUILDTIME_TABLE_SORT but not if S390 is set. Use this config to determine
      if sorting should take place at boot up.
      
      Link: https://lore.kernel.org/all/yt9dee51ctfn.fsf@linux.ibm.com/
      
      Fixes: 72b3942a ("scripts: ftrace - move the sort-processing in ftrace_init")
      Reported-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Tested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      6b9b6413
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.17' of... · 473aec0e
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Bring include/uapi/linux/nfc.h into the UAPI compile-test coverage
      
       - Revert the workaround of CONFIG_CC_IMPLICIT_FALLTHROUGH
      
       - Fix build errors in certs/Makefile
      
      * tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI
        Revert "Makefile: Do not quote value for CONFIG_CC_IMPLICIT_FALLTHROUGH"
        usr/include/Makefile: add linux/nfc.h to the compile-test coverage
      473aec0e
    • Linus Torvalds's avatar
      Merge tag 'bitmap-5.17-rc1' of git://github.com/norov/linux · 3689f9f8
      Linus Torvalds authored
      Pull bitmap updates from Yury Norov:
      
       - introduce for_each_set_bitrange()
      
       - use find_first_*_bit() instead of find_next_*_bit() where possible
      
       - unify for_each_bit() macros
      
      * tag 'bitmap-5.17-rc1' of git://github.com/norov/linux:
        vsprintf: rework bitmap_list_string
        lib: bitmap: add performance test for bitmap_print_to_pagebuf
        bitmap: unify find_bit operations
        mm/percpu: micro-optimize pcpu_is_populated()
        Replace for_each_*_bit_from() with for_each_*_bit() where appropriate
        find: micro-optimize for_each_{set,clear}_bit()
        include/linux: move for_each_bit() macros from bitops.h to find.h
        cpumask: replace cpumask_next_* with cpumask_first_* where appropriate
        tools: sync tools/bitmap with mother linux
        all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
        cpumask: use find_first_and_bit()
        lib: add find_first_and_bit()
        arch: remove GENERIC_FIND_FIRST_BIT entirely
        include: move find.h from asm_generic to linux
        bitops: move find_bit_*_le functions from le.h to find.h
        bitops: protect find_first_{,zero}_bit properly
      3689f9f8
  5. 22 Jan, 2022 7 commits