1. 01 Jun, 2022 3 commits
    • Masahiro Yamada's avatar
      kbuild: make *.mod rule robust against too long argument error · c6031b1d
      Masahiro Yamada authored
      Like built-in.a, the command length of the *.mod rule scales with
      the depth of the directory times the number of objects in the Makefile.
      
      Add $(obj)/ by the shell command (awk) instead of by Make's builtin
      function.
      
      In-tree modules still have some room to the limit (ARG_MAX=2097152),
      but this is more future-proof for big modules in a deep directory.
      
      For example, you can build i915 as a module (CONFIG_DRM_I915=m) and
      compare drivers/gpu/drm/i915/.i915.mod.cmd with/without this commit.
      
      The issue is more critical for external modules because the M= path
      can be very long as Jeff Johnson reported before [1].
      
      [1] https://lore.kernel.org/linux-kbuild/4c02050c4e95e4cb8cc04282695f8404@codeaurora.org/Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      c6031b1d
    • Masahiro Yamada's avatar
      kbuild: make built-in.a rule robust against too long argument error · cd968b97
      Masahiro Yamada authored
      Kbuild runs at the top of objtree instead of changing the working
      directory to subdirectories. I think this design is nice overall but
      some commands have a scalability issue.
      
      The build command of built-in.a is one of them whose length scales with:
      
          O(D * N)
      
      Here, D is the length of the directory path (i.e. $(obj)/ prefix),
      N is the number of objects in the Makefile, O() is the big O notation.
      
      The deeper directory the Makefile directory is located, the more easily
      it will hit the too long argument error.
      
      We can make it better. Trim the $(obj)/ by Make's builtin function, and
      restore it by a shell command (sed).
      
      With this, the command length scales with:
      
          O(D + N)
      
      In-tree modules still have some room to the limit (ARG_MAX=2097152),
      but this is more future-proof for big modules in a deep directory.
      
      For example, you can build i915 as builtin (CONFIG_DRM_I915=y) and
      compare drivers/gpu/drm/i915/.built-in.a.cmd with/without this commit.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      cd968b97
    • Masahiro Yamada's avatar
      kbuild: check static EXPORT_SYMBOL* by script instead of modpost · 31cb50b5
      Masahiro Yamada authored
      The 'static' specifier and EXPORT_SYMBOL() are an odd combination.
      
      Commit 15bfc234 ("modpost: check for static EXPORT_SYMBOL*
      functions") tried to detect it, but this check has false negatives.
      
      Here is the sample code.
      
        Makefile:
      
          obj-y += foo1.o foo2.o
      
        foo1.c:
      
          #include <linux/export.h>
          static void foo(void) {}
          EXPORT_SYMBOL(foo);
      
        foo2.c:
      
          void foo(void) {}
      
      foo1.c exports the static symbol 'foo', but modpost cannot catch it
      because it is fooled by foo2.c, which has a global symbol with the
      same name.
      
      s->is_static is cleared if a global symbol with the same name is found
      somewhere, but EXPORT_SYMBOL() and the global symbol do not necessarily
      belong to the same compilation unit.
      
      This check should be done per compilation unit, but I do not know how
      to do it in modpost. modpost runs against vmlinux.o or modules, which
      merges multiple objects, then forgets their origin.
      
      modpost cannot parse individual objects because they may not be ELF but
      LLVM IR when CONFIG_LTO_CLANG=y.
      
      Add a simple bash script to parse the output from ${NM}. This works for
      CONFIG_LTO_CLANG=y because llvm-nm can dump symbols of LLVM IR files.
      
      Revert 15bfc234.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      31cb50b5
  2. 29 May, 2022 4 commits
  3. 27 May, 2022 15 commits
    • Masahiro Yamada's avatar
      kbuild: replace $(if A,A,B) with $(or A,B) in scripts/Makefile.modpost · c9db1884
      Masahiro Yamada authored
      Similar cleanup to commit 5c816641 ("kbuild: replace $(if A,A,B)
      with $(or A,B)").
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      c9db1884
    • Masahiro Yamada's avatar
      modpost: squash if...else-if in find_elf_symbol2() · 68fef670
      Masahiro Yamada authored
      if ((addr - sym->st_value) < distance) {
                  distance = addr - sym->st_value;
                  near = sym;
          } else if ((addr - sym->st_value) == distance) {
                  near = sym;
          }
      
      is equivalent to:
      
          if (addr - sym->st_value <= distance) {
                  distance = addr - sym->st_value;
                  near = sym;
          }
      
      (The else-if block can overwrite 'distance' with the same value).
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      68fef670
    • Masahiro Yamada's avatar
      modpost: reuse ARRAY_SIZE() macro for section_mismatch() · c5c468dc
      Masahiro Yamada authored
      Move ARRAY_SIZE() from file2alias.c to modpost.h to reuse it in
      section_mismatch().
      
      Also, move the variable 'check' inside the for-loop.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      c5c468dc
    • Masahiro Yamada's avatar
      modpost: remove the unused argument of check_sec_ref() · 76954527
      Masahiro Yamada authored
      check_sec_ref() does not use the first parameter 'mod'.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      76954527
    • Masahiro Yamada's avatar
      modpost: fix undefined behavior of is_arm_mapping_symbol() · d6b73266
      Masahiro Yamada authored
      The return value of is_arm_mapping_symbol() is unpredictable when "$"
      is passed in.
      
      strchr(3) says:
        The strchr() and strrchr() functions return a pointer to the matched
        character or NULL if the character is not found. The terminating null
        byte is considered part of the string, so that if c is specified as
        '\0', these functions return a pointer to the terminator.
      
      When str[1] is '\0', strchr("axtd", str[1]) is not NULL, and str[2] is
      referenced (i.e. buffer overrun).
      
      Test code
      ---------
      
        char str1[] = "abc";
        char str2[] = "ab";
      
        strcpy(str1, "$");
        strcpy(str2, "$");
      
        printf("test1: %d\n", is_arm_mapping_symbol(str1));
        printf("test2: %d\n", is_arm_mapping_symbol(str2));
      
      Result
      ------
      
        test1: 0
        test2: 1
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      d6b73266
    • Alexander Lobakin's avatar
      modpost: fix removing numeric suffixes · b5beffa2
      Alexander Lobakin authored
      With the `-z unique-symbol` linker flag or any similar mechanism,
      it is possible to trigger the following:
      
      ERROR: modpost: "param_set_uint.0" [vmlinux] is a static EXPORT_SYMBOL
      
      The reason is that for now the condition from remove_dot():
      
      if (m && (s[n + m] == '.' || s[n + m] == 0))
      
      which was designed to test if it's a dot or a '\0' after the suffix
      is never satisfied.
      This is due to that `s[n + m]` always points to the last digit of a
      numeric suffix, not on the symbol next to it (from a custom debug
      print added to modpost):
      
      param_set_uint.0, s[n + m] is '0', s[n + m + 1] is '\0'
      
      So it's off-by-one and was like that since 2014.
      
      Fix this for the sake of any potential upcoming features, but don't
      bother stable-backporting, as it's well hidden -- apart from that
      LD flag, it can be triggered only with GCC LTO which never landed
      upstream.
      
      Fixes: fcd38ed0 ("scripts: modpost: fix compilation warning")
      Signed-off-by: default avatarAlexander Lobakin <alexandr.lobakin@intel.com>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      b5beffa2
    • Yuntao Wang's avatar
      scripts/kallsyms: update usage message of the kallsyms program · 8d3a7507
      Yuntao Wang authored
      The kallsyms program supports --absolute-percpu option but does not display
      it in the usage message, fix it.
      Signed-off-by: default avatarYuntao Wang <ytcoode@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      8d3a7507
    • Jing Leng's avatar
      kbuild: Fix include path in scripts/Makefile.modpost · 23a0cb8e
      Jing Leng authored
      When building an external module, if users don't need to separate the
      compilation output and source code, they run the following command:
      "make -C $(LINUX_SRC_DIR) M=$(PWD)". At this point, "$(KBUILD_EXTMOD)"
      and "$(src)" are the same.
      
      If they need to separate them, they run "make -C $(KERNEL_SRC_DIR)
      O=$(KERNEL_OUT_DIR) M=$(OUT_DIR) src=$(PWD)". Before running the
      command, they need to copy "Kbuild" or "Makefile" to "$(OUT_DIR)" to
      prevent compilation failure.
      
      So the kernel should change the included path to avoid the copy operation.
      Signed-off-by: default avatarJing Leng <jleng@ambarella.com>
      [masahiro: I do not think "M=$(OUT_DIR) src=$(PWD)" is the official way,
      but this patch is a nice clean up anyway.]
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      23a0cb8e
    • Linus Torvalds's avatar
      Merge tag 'for-5.19/dm-changes' of... · 7e284070
      Linus Torvalds authored
      Merge tag 'for-5.19/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper updates from Mike Snitzer:
      
       - Enable DM core bioset's per-cpu bio cache if QUEUE_FLAG_POLL set.
         This change improves DM's hipri bio polling (REQ_POLLED) performance
         by 7 - 20% depending on the system.
      
       - Update DM core to use jump_labels to further reduce cost of unlikely
         branches for zoned block devices, dm-stats and swap_bios throttling.
      
       - Various DM core changes to reduce bio-based DM overhead and simplify
         IO accounting.
      
       - Fundamental DM core improvements to dm_io reference counting and the
         elimination of using bio_split()+bio_chain() -- instead DM's
         bio-based IO accounting is updated to account that a split occurred.
      
       - Improve DM core's abnormal bio processing to do less work.
      
       - Improve DM core's hipri polling support to use a single list rather
         than an hlist.
      
       - Update DM core to pass NULL bdev to bio_alloc_clone() so that
         initialization that isn't useful for DM can be elided.
      
       - Add cond_resched to DM stats' various loops that loop over all
         entries.
      
       - Fix incorrect error code return from DM integrity's constructor.
      
       - Make DM crypt's printing of the key constant-time.
      
       - Update bio-based DM multipath to provide high-resolution timer to the
         Historical Service Time (HST) path selector.
      
      * tag 'for-5.19/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (26 commits)
        dm: pass NULL bdev to bio_alloc_clone
        dm cache metadata: remove unnecessary variable in __dump_mapping
        dm mpath: provide high-resolution timer to HST for bio-based
        dm crypt: make printing of the key constant-time
        dm integrity: fix error code in dm_integrity_ctr()
        dm stats: add cond_resched when looping over entries
        dm: improve abnormal bio processing
        dm: simplify bio-based IO accounting further
        dm: put all polled dm_io instances into a single list
        dm: improve dm_io reference counting
        dm: don't grab target io reference in dm_zone_map_bio
        dm: improve bio splitting and associated IO accounting
        dm: switch to bdev based IO accounting interfaces
        dm: pass dm_io instance to dm_io_acct directly
        dm: don't pass bio to __dm_start_io_acct and dm_end_io_acct
        dm: use bio_sectors in dm_aceept_partial_bio
        dm: simplify basic targets
        dm: conditionally enable branching for less used features
        dm: introduce dm_{get,put}_live_table_bio called from dm_submit_bio
        dm: move hot dm_io members to same cacheline as dm_target_io
        ...
      7e284070
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 780d8ce7
      Linus Torvalds authored
      Pull rdma updates from Jason Gunthorpe:
       "Small collection of incremental improvement patches:
      
         - Minor code cleanup patches, comment improvements, etc from static
           tools
      
         - Clean the some of the kernel caps, reducing the historical stealth
           uAPI leftovers
      
         - Bug fixes and minor changes for rdmavt, hns, rxe, irdma
      
         - Remove unimplemented cruft from rxe
      
         - Reorganize UMR QP code in mlx5 to avoid going through the IB verbs
           layer
      
         - flush_workqueue(system_unbound_wq) removal
      
         - Ensure rxe waits for objects to be unused before allowing the core
           to free them
      
         - Several rc quality bug fixes for hfi1"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (67 commits)
        RDMA/rtrs-clt: Fix one kernel-doc comment
        RDMA/hfi1: Remove all traces of diagpkt support
        RDMA/hfi1: Consolidate software versions
        RDMA/hfi1: Remove pointless driver version
        RDMA/hfi1: Fix potential integer multiplication overflow errors
        RDMA/hfi1: Prevent panic when SDMA is disabled
        RDMA/hfi1: Prevent use of lock before it is initialized
        RDMA/rxe: Fix an error handling path in rxe_get_mcg()
        IB/core: Fix typo in comment
        RDMA/core: Fix typo in comment
        IB/hf1: Fix typo in comment
        IB/qib: Fix typo in comment
        IB/iser: Fix typo in comment
        RDMA/mlx4: Avoid flush_scheduled_work() usage
        IB/isert: Avoid flush_scheduled_work() usage
        RDMA/mlx5: Remove duplicate pointer assignment in mlx5_ib_alloc_implicit_mr()
        RDMA/qedr: Remove unnecessary synchronize_irq() before free_irq()
        RDMA/hns: Use hr_reg_read() instead of remaining roce_get_xxx()
        RDMA/hns: Use hr_reg_xxx() instead of remaining roce_set_xxx()
        RDMA/irdma: Add SW mechanism to generate completions on error
        ...
      780d8ce7
    • Linus Torvalds's avatar
      Merge tag 'hardening-v5.19-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 090b39af
      Linus Torvalds authored
      Pull kernel hardening fix from Kees Cook:
       "This fixes an unlucky build race condition when using the GCC plugins,
        noticed by a few folks.
      
         - Avoid GCC plugins needing utsrelease.h build target (Masahiro Yamada)"
      
      * tag 'hardening-v5.19-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        gcc-plugins: use KERNELVERSION for plugin version
      090b39af
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 6d29d7fe
      Linus Torvalds authored
      Pull nfsd updates from Chuck Lever:
       "We introduce 'courteous server' in this release. Previously NFSD would
        purge open and lock state for an unresponsive client after one lease
        period (typically 90 seconds). Now, after one lease period, another
        client can open and lock those files and the unresponsive client's
        lease is purged; otherwise if the unresponsive client's open and lock
        state is uncontended, the server retains that open and lock state for
        up to 24 hours, allowing the client's workload to resume after a
        lengthy network partition.
      
        A longstanding issue with NFSv4 file creation is also addressed.
        Previously a file creation can fail internally, returning an error to
        the client, but leave the newly created file in place as an artifact.
        The file creation code path has been reorganized so that internal
        failures and race conditions are less likely to result in an unwanted
        file creation.
      
        A fault injector has been added to help exercise paths that are run
        during kernel metadata cache invalidation. These caches contain
        information maintained by user space about exported filesystems. Many
        of our test workloads do not trigger cache invalidation.
      
        There is one patch that is needed to support PREEMPT_RT and a fix for
        an ancient 'sleep while spin-locked' splat that seems to have become
        easier to hit since v5.18-rc3"
      
      * tag 'nfsd-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (36 commits)
        NFSD: nfsd_file_put() can sleep
        NFSD: Add documenting comment for nfsd4_release_lockowner()
        NFSD: Modernize nfsd4_release_lockowner()
        NFSD: Fix possible sleep during nfsd4_release_lockowner()
        nfsd: destroy percpu stats counters after reply cache shutdown
        nfsd: Fix null-ptr-deref in nfsd_fill_super()
        nfsd: Unregister the cld notifier when laundry_wq create failed
        SUNRPC: Use RMW bitops in single-threaded hot paths
        NFSD: Clean up the show_nf_flags() macro
        NFSD: Trace filecache opens
        NFSD: Move documenting comment for nfsd4_process_open2()
        NFSD: Fix whitespace
        NFSD: Remove dprintk call sites from tail of nfsd4_open()
        NFSD: Instantiate a struct file when creating a regular NFSv4 file
        NFSD: Clean up nfsd_open_verified()
        NFSD: Remove do_nfsd_create()
        NFSD: Refactor NFSv4 OPEN(CREATE)
        NFSD: Refactor NFSv3 CREATE
        NFSD: Refactor nfsd_create_setattr()
        NFSD: Avoid calling fh_drop_write() twice in do_nfsd_create()
        ...
      6d29d7fe
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of https://github.com/openrisc/linux · 7f50d4df
      Linus Torvalds authored
      Pull OpenRISC updates from Stafford Horne:
      
       - A few sparse warning fixups and other cleanups I noticed when working
         on a recent TLB bug found on a new OpenRISC core bring up.
      
       - A few fixup's from me and Jason A Donenfeld to help shutdown OpenRISC
         platforms when running CI tests
      
      * tag 'for-linus' of https://github.com/openrisc/linux:
        openrisc: Allow power off handler overriding
        openrisc: Remove unused IMMU tlb workardound
        openrisc/fault: Fix symbol scope warnings
        openrisc/delay: Add include to fix symbol not declared warning
        openrisc/time: Fix symbol scope warnings
        openrisc/traps: Declare unhandled_exception for asmlinkage
        openrisc/traps: Remove die_if_kernel function
        openrisc/traps: Declare file scope symbols as static
        openrisc: Update litex defconfig to support glibc userland
        openrisc: Pretty print show_registers memory dumps
        openrisc: Add syscall details to emergency syscall debugging
        openrisc: Add support for liteuart emergency printing
        openrisc: Cleanup emergency print handling
        openrisc: Add gcc machine instruction flag configuration
        openrisc: define nop command for simulator reboot
        openrisc: remove bogus nops and shutdowns
        openrisc: fix typos in comments
      7f50d4df
    • Linus Torvalds's avatar
      Merge tag 'arc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · ba62a537
      Linus Torvalds authored
      Pull ARC updates from Vineet Gupta:
      
       - Basic eBPF support (Sergey)
      
      * tag 'arc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: bpf: define uapi for BPF_PROG_TYPE_PERF_EVENT program type
        ARC: disasm: handle ARCv2 case in kprobe get/set functions
        ARC: implement syscall tracepoints
        ARC: enable HAVE_REGS_AND_STACK_ACCESS_API feature
      ba62a537
    • Linus Torvalds's avatar
      Merge tag 'modules-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · ef98f9cf
      Linus Torvalds authored
      Pull modules updates from  Luis Chamberlain:
      
       - It was time to tidy up kernel/module.c and one way of starting with
         that effort was to split it up into files. At my request Aaron Tomlin
         spearheaded that effort with the goal to not introduce any functional
         at all during that endeavour. The penalty for the split is +1322
         bytes total, +112 bytes in data, +1210 bytes in text while bss is
         unchanged. One of the benefits of this other than helping make the
         code easier to read and review is summoning more help on review for
         changes with livepatching so kernel/module/livepatch.c is now pegged
         as maintained by the live patching folks.
      
         The before and after with just the move on a defconfig on x86-64:
      
           $ size kernel/module.o
              text    data     bss     dec     hex filename
             38434    4540     104   43078    a846 kernel/module.o
      
           $ size -t kernel/module/*.o
              text    data     bss     dec     hex filename
             4785     120       0    4905    1329 kernel/module/kallsyms.o
            28577    4416     104   33097    8149 kernel/module/main.o
             1158       8       0    1166     48e kernel/module/procfs.o
              902     108       0    1010     3f2 kernel/module/strict_rwx.o
             3390       0       0    3390     d3e kernel/module/sysfs.o
              832       0       0     832     340 kernel/module/tree_lookup.o
            39644    4652     104   44400    ad70 (TOTALS)
      
       - Aaron added module unload taint tracking (MODULE_UNLOAD_TAINT_TRACKING),
         to enable tracking unloaded modules which did taint the kernel.
      
       - Christophe Leroy added CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC
         which lets architectures to request having modules data in vmalloc
         area instead of module area. There are three reasons why an
         architecture might want this:
      
          a) On some architectures (like book3s/32) it is not possible to
             protect against execution on a page basis. The exec stuff can be
             mapped by different arch segment sizes (on book3s/32 that is 256M
             segments). By default the module area is in an Exec segment while
             vmalloc area is in a NoExec segment. Using vmalloc lets you muck
             with module data as NoExec on those architectures whereas before
             you could not.
      
          b) By pushing more module data to vmalloc you also increase the
             probability of module text to remain within a closer distance
             from kernel core text and this reduces trampolines, this has been
             reported on arm first and powerpc folks are following that lead.
      
          c) Free'ing module_alloc() (Exec by default) area leaves this
             exposed as Exec by default, some architectures have some security
             enhancements to set this as NoExec on free, and splitting module
             data with text let's future generic special allocators be added
             to the kernel without having developers try to grok the tribal
             knowledge per arch. Work like Rick Edgecombe's permission vmalloc
             interface [0] becomes easier to address over time.
      
             [0] https://lore.kernel.org/lkml/20201120202426.18009-1-rick.p.edgecombe@intel.com/#r
      
       - Masahiro Yamada's symbol search enhancements
      
      * tag 'modules-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (33 commits)
        module: merge check_exported_symbol() into find_exported_symbol_in_section()
        module: do not binary-search in __ksymtab_gpl if fsa->gplok is false
        module: do not pass opaque pointer for symbol search
        module: show disallowed symbol name for inherit_taint()
        module: fix [e_shstrndx].sh_size=0 OOB access
        module: Introduce module unload taint tracking
        module: Move module_assert_mutex_or_preempt() to internal.h
        module: Make module_flags_taint() accept a module's taints bitmap and usable outside core code
        module.h: simplify MODULE_IMPORT_NS
        powerpc: Select ARCH_WANTS_MODULES_DATA_IN_VMALLOC on book3s/32 and 8xx
        module: Remove module_addr_min and module_addr_max
        module: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC
        module: Introduce data_layout
        module: Prepare for handling several RB trees
        module: Always have struct mod_tree_root
        module: Rename debug_align() as strict_align()
        module: Rework layout alignment to avoid BUG_ON()s
        module: Move module_enable_x() and frob_text() in strict_rwx.c
        module: Make module_enable_x() independent of CONFIG_ARCH_HAS_STRICT_MODULE_RWX
        module: Move version support into a separate file
        ...
      ef98f9cf
  4. 26 May, 2022 18 commits
    • Linus Torvalds's avatar
      Merge tag 'sysctl-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 44d35720
      Linus Torvalds authored
      Pull sysctl updates from Luis Chamberlain:
       "For two kernel releases now kernel/sysctl.c has been being cleaned up
        slowly, since the tables were grossly long, sprinkled with tons of
        #ifdefs and all this caused merge conflicts with one susbystem or
        another.
      
        This tree was put together to help try to avoid conflicts with these
        cleanups going on different trees at time. So nothing exciting on this
        pull request, just cleanups.
      
        Thanks a lot to the Uniontech and Huawei folks for doing some of this
        nasty work"
      
      * tag 'sysctl-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (28 commits)
        sched: Fix build warning without CONFIG_SYSCTL
        reboot: Fix build warning without CONFIG_SYSCTL
        kernel/kexec_core: move kexec_core sysctls into its own file
        sysctl: minor cleanup in new_dir()
        ftrace: fix building with SYSCTL=y but DYNAMIC_FTRACE=n
        fs/proc: Introduce list_for_each_table_entry for proc sysctl
        mm: fix unused variable kernel warning when SYSCTL=n
        latencytop: move sysctl to its own file
        ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y
        ftrace: Fix build warning
        ftrace: move sysctl_ftrace_enabled to ftrace.c
        kernel/do_mount_initrd: move real_root_dev sysctls to its own file
        kernel/delayacct: move delayacct sysctls to its own file
        kernel/acct: move acct sysctls to its own file
        kernel/panic: move panic sysctls to its own file
        kernel/lockdep: move lockdep sysctls to its own file
        mm: move page-writeback sysctls to their own file
        mm: move oom_kill sysctls to their own file
        kernel/reboot: move reboot sysctls to its own file
        sched: Move energy_aware sysctls to topology.c
        ...
      44d35720
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.19' of git://git.linaro.org/landing-teams/working/fujitsu/integration · cdeffe87
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
       "api:
         - hrtimer fix
      
        qcom:
         - log pending irq during resume
         - minor cosmetic changes
      
        omap:
         - use pm_runtime_resume_and_get
      
        imx:
         - use pm_runtime_resume_and_get
         - remove redundant initializer
      
        mtk:
         - added GCE header for MT8186
         - enable support for MT8186
      
        tegra:
         - remove redundant NULL check
         - added hsp_sm_ops for send/recv api
         - support shared mailboxes
      
        stm:
         - remove unsupported "wakeup" irq
      
        pcc:
         - sanitize mbox allocated memory before use
      
        misc:
         - documentation fixes for arm_mhu and qcom-ipcc"
      
      * tag 'mailbox-v5.19' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n
        mailbox: forward the hrtimer if not queued and under a lock
        mailbox: qcom-ipcc: Log the pending interrupt during resume
        mailbox: pcc: Fix an invalid-load caught by the address sanitizer
        dt-bindings: mailbox: remove the IPCC "wakeup" IRQ
        mailbox: correct kerneldoc
        mailbox: omap: using pm_runtime_resume_and_get to simplify the code
        mailbox:imx: using pm_runtime_resume_and_get
        mailbox: mediatek: support mt8186 adsp mailbox
        dt-bindings: mailbox: mtk,adsp-mbox: add mt8186 compatible name
        mailbox: tegra-hsp: Add 128-bit shared mailbox support
        dt-bindings: tegra186-hsp: add type for shared mailboxes
        mailbox: tegra-hsp: Add tegra_hsp_sm_ops
        dt-bindings: gce: add the GCE header file for MT8186
        mailbox: remove an unneeded NULL check on list iterator
        mailbox: imx: remove redundant initializer
        dt-bindings: mailbox: qcom-ipcc: simplify the example
      cdeffe87
    • Linus Torvalds's avatar
      Merge tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 7182e897
      Linus Torvalds authored
      Pull gpio updates from Bartosz Golaszewski:
       "We have lots of small changes all over the place, but no huge reworks
        or new drivers:
      
         - use ioread()/iowrite() interfaces instead of raw inb()/outb() in
           drivers
      
         - make irqchips immutable due to the new warning popping up when
           drivers try to modify the irqchip structures
      
         - add new compatibles to dt-bindings for realtek-otto, renesas-rcar
           and pca95xx
      
         - add support for new models to gpio-rcar, gpio-pca953x &
           gpio-realtek-otto
      
         - allow parsing of GPIO hogs represented as children nodes of
           gpio-uniphier
      
         - define a set of common GPIO consumer strings in dt-bindings
      
         - shrink code in gpio-ml-ioh by using more devres interfaces
      
         - pass arguments to devm_kcalloc() in correct order in gpio-sim
      
         - add new helpers for iterating over GPIO firmware nodes and
           descriptors to gpiolib core and use it in several drivers
      
         - drop unused syscon_regmap_lookup_by_compatible() function
      
         - correct format specifiers and signedness of variables in GPIO ACPI
      
         - drop unneeded error checks in gpio-ftgpio
      
         - stop using the deprecated of_gpio.h header in gpio-zevio
      
         - drop platform_data support in gpio-max732x
      
         - simplify Kconfig dependencies in gpio-vf610
      
         - use raw spinlocks where needed to make PREEMPT_RT happy
      
         - fix return values in board files using gpio-pcf857x
      
         - convert more drivers to using fwnode instead of of_node
      
         - minor fixes and improvements in gpiolib core"
      
      * tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (55 commits)
        gpio: sifive: Make the irqchip immutable
        gpio: rcar: Make the irqchip immutable
        gpio: pcf857x: Make the irqchip immutable
        gpio: pca953x: Make the irqchip immutable
        gpio: dwapb: Make the irqchip immutable
        gpio: sim: Use correct order for the parameters of devm_kcalloc()
        gpio: ml-ioh: Convert to use managed functions pcim* and devm_*
        gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare
        gpio: ws16c48: Utilize iomap interface
        gpio: gpio-mm: Utilize iomap interface
        gpio: 104-idio-16: Utilize iomap interface
        gpio: 104-idi-48: Utilize iomap interface
        gpio: 104-dio-48e: Utilize iomap interface
        gpio: zevio: drop of_gpio.h header
        gpio: max77620: Make the irqchip immutable
        dt-bindings: gpio: pca95xx: add entry for pca6408
        gpio: pca953xx: Add support for pca6408
        gpio: max732x: Drop unused support for irq and setup code via platform data
        gpio: vf610: drop the SOC_VF610 dependency for GPIO_VF610
        gpio: syscon: Remove usage of syscon_regmap_lookup_by_compatible
        ...
      7182e897
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v5.19' of... · f1f88bb5
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Tzung-Bi Shih:
       "cros_ec:
         - Fix wrong error handling path
         - Clean-up patches
      
        cros_ec_chardev:
         - Re-introduce cros_ec_cmd_xfer to fix ABI broken
      
        cros_ec_lpcs:
         - Support the Framework Laptop
      
        cros_ec_typec:
         - Fix NULL dereference
      
        chromeos_acpi:
         - Add ChromeOS ACPI device driver
         - Fix Sphinx errors when `make htmldocs`
      
        misc:
         - Drop BUG_ON()s"
      
      * tag 'tag-chrome-platform-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: Use imperative mood for ChromeOS ACPI sysfs ABI descriptions
        platform/chrome: Use tables for values lists of ChromeOS ACPI sysfs ABI
        platform/chrome: cros_ec_spi: drop BUG_ON() if `din` isn't large enough
        platform/chrome: cros_ec_spi: drop unneeded BUG_ON()
        platform/chrome: cros_ec_i2c: drop BUG_ON() in cros_ec_pkt_xfer_i2c()
        platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_get_host_event()
        platform/chrome: cros_ec_proto: drop BUG_ON() in cros_ec_prepare_tx()
        platform/chrome: correct cros_ec_prepare_tx() usage
        platform/chrome: cros_ec_proto: drop unneeded BUG_ON() in prepare_packet()
        platform/chrome: Add ChromeOS ACPI device driver
        platform/chrome: cros_ec_typec: Check for EC driver
        platform/chrome: cros_ec_lpcs: reserve the MEC LPC I/O ports first
        platform/chrome: cros_ec_lpcs: detect the Framework Laptop
        platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
        platform/chrome: cros_ec: append newline to all logs
        platform/chrome: cros_ec: sort header inclusion alphabetically
        platform/chrome: cros_ec: determine `wake_enabled` in cros_ec_suspend()
        platform/chrome: cros_ec: remove unused variable `was_wake_device`
        platform/chrome: cros_ec: fix error handling in cros_ec_register()
      f1f88bb5
    • Sean Young's avatar
      media: lirc: add missing exceptions for lirc uapi header file · b1c8312c
      Sean Young authored
      Commit e5499dd7 ("media: lirc: revert removal of unused feature
      flags") reintroduced unused feature flags in the lirc uapi header, but
      failed to reintroduce the necessary exceptions for the docs.
      
      Fixes: e5499dd7 ("media: lirc: revert removal of unused feature flags")
      Signed-off-by: default avatarSean Young <sean@mess.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b1c8312c
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · bf909542
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "S390:
      
         - ultravisor communication device driver
      
         - fix TEID on terminating storage key ops
      
        RISC-V:
      
         - Added Sv57x4 support for G-stage page table
      
         - Added range based local HFENCE functions
      
         - Added remote HFENCE functions based on VCPU requests
      
         - Added ISA extension registers in ONE_REG interface
      
         - Updated KVM RISC-V maintainers entry to cover selftests support
      
        ARM:
      
         - Add support for the ARMv8.6 WFxT extension
      
         - Guard pages for the EL2 stacks
      
         - Trap and emulate AArch32 ID registers to hide unsupported features
      
         - Ability to select and save/restore the set of hypercalls exposed to
           the guest
      
         - Support for PSCI-initiated suspend in collaboration with userspace
      
         - GICv3 register-based LPI invalidation support
      
         - Move host PMU event merging into the vcpu data structure
      
         - GICv3 ITS save/restore fixes
      
         - The usual set of small-scale cleanups and fixes
      
        x86:
      
         - New ioctls to get/set TSC frequency for a whole VM
      
         - Allow userspace to opt out of hypercall patching
      
         - Only do MSR filtering for MSRs accessed by rdmsr/wrmsr
      
        AMD SEV improvements:
      
         - Add KVM_EXIT_SHUTDOWN metadata for SEV-ES
      
         - V_TSC_AUX support
      
        Nested virtualization improvements for AMD:
      
         - Support for "nested nested" optimizations (nested vVMLOAD/VMSAVE,
           nested vGIF)
      
         - Allow AVIC to co-exist with a nested guest running
      
         - Fixes for LBR virtualizations when a nested guest is running, and
           nested LBR virtualization support
      
         - PAUSE filtering for nested hypervisors
      
        Guest support:
      
         - Decoupling of vcpu_is_preempted from PV spinlocks"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (199 commits)
        KVM: x86: Fix the intel_pt PMI handling wrongly considered from guest
        KVM: selftests: x86: Sync the new name of the test case to .gitignore
        Documentation: kvm: reorder ARM-specific section about KVM_SYSTEM_EVENT_SUSPEND
        x86, kvm: use correct GFP flags for preemption disabled
        KVM: LAPIC: Drop pending LAPIC timer injection when canceling the timer
        x86/kvm: Alloc dummy async #PF token outside of raw spinlock
        KVM: x86: avoid calling x86 emulator without a decoded instruction
        KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel data leak
        x86/fpu: KVM: Set the base guest FPU uABI size to sizeof(struct kvm_xsave)
        s390/uv_uapi: depend on CONFIG_S390
        KVM: selftests: x86: Fix test failure on arch lbr capable platforms
        KVM: LAPIC: Trace LAPIC timer expiration on every vmentry
        KVM: s390: selftest: Test suppression indication on key prot exception
        KVM: s390: Don't indicate suppression on dirtying, failing memop
        selftests: drivers/s390x: Add uvdevice tests
        drivers/s390/char: Add Ultravisor io device
        MAINTAINERS: Update KVM RISC-V entry to cover selftests support
        RISC-V: KVM: Introduce ISA extension register
        RISC-V: KVM: Cleanup stale TLB entries when host CPU changes
        RISC-V: KVM: Add remote HFENCE functions based on VCPU requests
        ...
      bf909542
    • Linus Torvalds's avatar
      Merge tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 98931dd9
      Linus Torvalds authored
      Pull MM updates from Andrew Morton:
       "Almost all of MM here. A few things are still getting finished off,
        reviewed, etc.
      
         - Yang Shi has improved the behaviour of khugepaged collapsing of
           readonly file-backed transparent hugepages.
      
         - Johannes Weiner has arranged for zswap memory use to be tracked and
           managed on a per-cgroup basis.
      
         - Munchun Song adds a /proc knob ("hugetlb_optimize_vmemmap") for
           runtime enablement of the recent huge page vmemmap optimization
           feature.
      
         - Baolin Wang contributes a series to fix some issues around hugetlb
           pagetable invalidation.
      
         - Zhenwei Pi has fixed some interactions between hwpoisoned pages and
           virtualization.
      
         - Tong Tiangen has enabled the use of the presently x86-only
           page_table_check debugging feature on arm64 and riscv.
      
         - David Vernet has done some fixup work on the memcg selftests.
      
         - Peter Xu has taught userfaultfd to handle write protection faults
           against shmem- and hugetlbfs-backed files.
      
         - More DAMON development from SeongJae Park - adding online tuning of
           the feature and support for monitoring of fixed virtual address
           ranges. Also easier discovery of which monitoring operations are
           available.
      
         - Nadav Amit has done some optimization of TLB flushing during
           mprotect().
      
         - Neil Brown continues to labor away at improving our swap-over-NFS
           support.
      
         - David Hildenbrand has some fixes to anon page COWing versus
           get_user_pages().
      
         - Peng Liu fixed some errors in the core hugetlb code.
      
         - Joao Martins has reduced the amount of memory consumed by
           device-dax's compound devmaps.
      
         - Some cleanups of the arch-specific pagemap code from Anshuman
           Khandual.
      
         - Muchun Song has found and fixed some errors in the TLB flushing of
           transparent hugepages.
      
         - Roman Gushchin has done more work on the memcg selftests.
      
        ... and, of course, many smaller fixes and cleanups. Notably, the
        customary million cleanup serieses from Miaohe Lin"
      
      * tag 'mm-stable-2022-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (381 commits)
        mm: kfence: use PAGE_ALIGNED helper
        selftests: vm: add the "settings" file with timeout variable
        selftests: vm: add "test_hmm.sh" to TEST_FILES
        selftests: vm: check numa_available() before operating "merge_across_nodes" in ksm_tests
        selftests: vm: add migration to the .gitignore
        selftests/vm/pkeys: fix typo in comment
        ksm: fix typo in comment
        selftests: vm: add process_mrelease tests
        Revert "mm/vmscan: never demote for memcg reclaim"
        mm/kfence: print disabling or re-enabling message
        include/trace/events/percpu.h: cleanup for "percpu: improve percpu_alloc_percpu event trace"
        include/trace/events/mmflags.h: cleanup for "tracing: incorrect gfp_t conversion"
        mm: fix a potential infinite loop in start_isolate_page_range()
        MAINTAINERS: add Muchun as co-maintainer for HugeTLB
        zram: fix Kconfig dependency warning
        mm/shmem: fix shmem folio swapoff hang
        cgroup: fix an error handling path in alloc_pagecache_max_30M()
        mm: damon: use HPAGE_PMD_SIZE
        tracing: incorrect isolate_mote_t cast in mm_vmscan_lru_isolate
        nodemask.h: fix compilation error with GCC12
        ...
      98931dd9
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · df202b45
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Add HOSTPKG_CONFIG env variable to allow users to override pkg-config
      
       - Support W=e as a shorthand for KCFLAGS=-Werror
      
       - Fix CONFIG_IKHEADERS build to support toybox cpio
      
       - Add scripts/dummy-tools/pahole to ease distro packagers' life
      
       - Suppress false-positive warnings from checksyscalls.sh for W=2 build
      
       - Factor out the common code of arch/*/boot/install.sh into
         scripts/install.sh
      
       - Support 'kernel-install' tool in scripts/prune-kernel
      
       - Refactor module-versioning to link the symbol versions at the final
         link of vmlinux and modules
      
       - Remove CONFIG_MODULE_REL_CRCS because module-versioning now works in
         an arch-agnostic way
      
       - Refactor modpost, Makefiles
      
      * tag 'kbuild-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (56 commits)
        genksyms: adjust the output format to modpost
        kbuild: stop merging *.symversions
        kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS
        modpost: extract symbol versions from *.cmd files
        modpost: add sym_find_with_module() helper
        modpost: change the license of EXPORT_SYMBOL to bool type
        modpost: remove left-over cross_compile declaration
        kbuild: record symbol versions in *.cmd files
        kbuild: generate a list of objects in vmlinux
        modpost: move *.mod.c generation to write_mod_c_files()
        modpost: merge add_{intree_flag,retpoline,staging_flag} to add_header
        scripts/prune-kernel: Use kernel-install if available
        kbuild: factor out the common installation code into scripts/install.sh
        modpost: split new_symbol() to symbol allocation and hash table addition
        modpost: make sym_add_exported() always allocate a new symbol
        modpost: make multiple export error
        modpost: dump Module.symvers in the same order of modules.order
        modpost: traverse the namespace_list in order
        modpost: use doubly linked list for dump_lists
        modpost: traverse unresolved symbols in order
        ...
      df202b45
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · 16477cdf
      Linus Torvalds authored
      Pull asm-generic updates from Arnd Bergmann:
       "The asm-generic tree contains three separate changes for linux-5.19:
      
         - The h8300 architecture is retired after it has been effectively
           unmaintained for a number of years. This is the last architecture
           we supported that has no MMU implementation, but there are still a
           few architectures (arm, m68k, riscv, sh and xtensa) that support
           CPUs with and without an MMU.
      
         - A series to add a generic ticket spinlock that can be shared by
           most architectures with a working cmpxchg or ll/sc type atomic,
           including the conversion of riscv, csky and openrisc. This series
           is also a prerequisite for the loongarch64 architecture port that
           will come as a separate pull request.
      
         - A cleanup of some exported uapi header files to ensure they can be
           included from user space without relying on other kernel headers"
      
      * tag 'asm-generic-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        h8300: remove stale bindings and symlink
        sparc: add asm/stat.h to UAPI compile-test coverage
        powerpc: add asm/stat.h to UAPI compile-test coverage
        mips: add asm/stat.h to UAPI compile-test coverage
        riscv: add linux/bpf_perf_event.h to UAPI compile-test coverage
        kbuild: prevent exported headers from including <stdlib.h>, <stdbool.h>
        agpgart.h: do not include <stdlib.h> from exported header
        csky: Move to generic ticket-spinlock
        RISC-V: Move to queued RW locks
        RISC-V: Move to generic spinlocks
        openrisc: Move to ticket-spinlock
        asm-generic: qrwlock: Document the spinlock fairness requirements
        asm-generic: qspinlock: Indicate the use of mixed-size atomics
        asm-generic: ticket-lock: New generic ticket-based spinlock
        remove the h8300 architecture
      16477cdf
    • Linus Torvalds's avatar
      Merge tag 'arm-multiplatform-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · ecf0aa53
      Linus Torvalds authored
      Pull ARMv4T/v5 multiplatform support from Arnd Bergmann:
       "This series has been 12 years in the making, it mostly finishes the
        work that was started with the founding of Linaro to clean up platform
        support in the kernel.
      
        The largest change here is a cleanup of the omap1 platform, which is
        the final ARM machine type to get converted to the common-clk
        subsystem. All the omap1 specific drivers are now made independent of
        the mach/*.h headers to allow the platform to be part of a generic
        ARMv4/v5 multiplatform kernel.
      
        The last bit that enables this support is still missing here while we
        wait for some last dependencies to make it into the mainline kernel
        through other subsystems.
      
        The s3c24xx, ixp4xx, iop32x, ep93xx and dove platforms were all almost
        at the point of allowing multiplatform kernels, this work gets
        completed here along with a few additional cleanup. At the same time,
        the s3c24xx and s3c64xx are now deprecated and expected to get removed
        in the future.
      
        The PXA and OMAP1 bits are in a separate branch because of
        dependencies. Once both branches are merged, only the three Intel
        StrongARM platforms (RiscPC, Footbridge/NetWinder and StrongARM1100)
        need separate kernels, and there are no plans to include these"
      
      * tag 'arm-multiplatform-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (61 commits)
        ARM: ixp4xx: Consolidate Kconfig fixing issue
        ARM: versatile: Add missing of_node_put in dcscb_init
        ARM: config: Refresh IXP4xx config after multiplatform
        ARM: omap1: add back omap_set_dma_priority() stub
        ARM: omap: fix missing declaration warnings
        ARM: omap: fix address space warnings from sparse
        ARM: spear: remove include/mach/ subdirectory
        ARM: davinci: remove include/mach/ subdirectory
        ARM: omap2: remove include/mach/ subdirectory
        integrator: remove empty ap_init_early()
        ARM: s3c: fix include path
        MAINTAINERS: omap1: Add Janusz as an additional maintainer
        ARM: omap1: htc_herald: fix typos in comments
        ARM: OMAP1: fix typos in comments
        ARM: OMAP1: clock: Remove noop code
        ARM: OMAP1: clock: Remove unused code
        ARM: OMAP1: clock: Fix UART rate reporting algorithm
        ARM: OMAP1: clock: Fix early UART rate issues
        ARM: OMAP1: Prepare for conversion of OMAP1 clocks to CCF
        ARM: omap1: fix build with no SoC selected
        ...
      ecf0aa53
    • Linus Torvalds's avatar
      Merge tag 'arm-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · a0439cf4
      Linus Torvalds authored
      Pull ARM defconfig updates from Arnd Bergmann:
       "Lots of smaller additions to the defconfig files for both 32-bit and
        64-bit arm platforms, enabling drivers that are now usable on common
        hardware, and a few options to make it possible to boot a file system
        image using systemd"
      
      * tag 'arm-defconfig-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (39 commits)
        ARM: configs: Enable ASoC AC'97 glue
        ARM: configs: Enable audio on BeagleBone Black in multi_v7_defconfig
        ARM: configs: at91: Enable AUTOFS_FS required by systemd
        ARM: configs: at91: Enable options required for systemd
        ARM: configs: at91: sama7: enable CONFIG_RESET_CONTROLLER
        ARM: configs: at91: sama7: add MCHP PDMC and DMIC drivers
        ARM: configs: at91: sama7: Enable MTD_UBI_BLOCK
        ARM: configs: at91: sama7: Enable MTD_UBI_FASTMAP
        ARM: configs: at91: sama7: add xisc and csi2dc
        ARM: multi_v7_defconfig: add atmel video pipeline modules
        ARM: configs: at91: Remove MTD_BLOCK and use MTD_UBI_BLOCK for read only block FS
        arm64: defconfig: Enable the WM8524 codec driver
        arm64: defconfig: Enable modules for arm displays
        arm: nomadik: drop selecting obsolete CLKSRC_NOMADIK_MTU_SCHED_CLOCK
        arm64: defconfig: Enable Renesas RZ/V2M SoC
        arm64: defconfig: Enable ARCH_R9A07G043
        arm64: defconfig: Enable configs for DisplayPort on J721e
        arm64: defconfig: Build Tegra ASRC module
        ARM: multi_v7_defconfig: enable CONFIG_ARCH_BCMBCA in armv7 defconfig
        arm: mediatek: select arch timer for mt7629
        ...
      a0439cf4
    • Linus Torvalds's avatar
      Merge tag 'arm-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · cc3c470a
      Linus Torvalds authored
      Pull ARM driver updates from Arnd Bergmann:
       "There are minor updates to SoC specific drivers for chips by Rockchip,
        Samsung, NVIDIA, TI, NXP, i.MX, Qualcomm, and Broadcom.
      
        Noteworthy driver changes include:
      
         - Several conversions of DT bindings to yaml format.
      
         - Renesas adds driver support for R-Car V4H, RZ/V2M and RZ/G2UL SoCs.
      
         - Qualcomm adds a bus driver for the SSC (Snapdragon Sensor Core),
           and support for more chips in the RPMh power domains and the
           soc-id.
      
         - NXP has a new driver for the HDMI blk-ctrl on i.MX8MP.
      
         - Apple M1 gains support for the on-chip NVMe controller, making it
           possible to finally use the internal disks. This also includes SoC
           drivers for their RTKit IPC and for the SART DMA address filter.
      
        For other subsystems that merge their drivers through the SoC tree, we
        have
      
         - Firmware drivers for the ARM firmware stack including TEE, OP-TEE,
           SCMI and FF-A get a number of smaller updates and cleanups. OP-TEE
           now has a cache for firmware argument structures as an
           optimization, and SCMI now supports the 3.1 version of the
           specification.
      
         - Reset controller updates to Amlogic, ASpeed, Renesas and ACPI
           drivers
      
         - Memory controller updates for Tegra, and a few updates for other
           platforms"
      
      * tag 'arm-drivers-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (159 commits)
        memory: tegra: Add MC error logging on Tegra186 onward
        memory: tegra: Add memory controller channels support
        memory: tegra: Add APE memory clients for Tegra234
        memory: tegra: Add Tegra234 support
        nvme-apple: fix sparse endianess warnings
        soc/tegra: pmc: Document core domain fields
        soc: qcom: pdr: use static for servreg_* variables
        soc: imx: fix semicolon.cocci warnings
        soc: renesas: R-Car V3U is R-Car Gen4
        soc: imx: add i.MX8MP HDMI blk-ctrl
        soc: imx: imx8m-blk-ctrl: Add i.MX8MP media blk-ctrl
        soc: imx: add i.MX8MP HSIO blk-ctrl
        soc: imx: imx8m-blk-ctrl: set power device name
        soc: qcom: llcc: Add sc8180x and sc8280xp configurations
        dt-bindings: arm: msm: Add sc8180x and sc8280xp LLCC compatibles
        soc/tegra: pmc: Select REGMAP
        dt-bindings: reset: st,sti-powerdown: Convert to yaml
        dt-bindings: reset: st,sti-picophyreset: Convert to yaml
        dt-bindings: reset: socfpga: Convert to yaml
        dt-bindings: reset: snps,axs10x-reset: Convert to yaml
        ...
      cc3c470a
    • Linus Torvalds's avatar
      Merge tag 'arm-dt-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · ae862183
      Linus Torvalds authored
      Pull ARM DT updates from Arnd Bergmann:
       "There are 40 branches this time, adding a lot of new hardware support,
        and cleanups. Krzysztof Kozlowski continues his treewide cleanups.
      
        There are a number of new SoCs, all of them as part of existing
        families, and typically added along with a reference board:
      
         - Renesas RZ/G2UL (R9A07G043) is the single-core version of the
           RZ/G2L general-purpose MPU.
      
         - Renesas RZ/V2M (R9A09G011) is a smart camera SoC
      
         - Renesas R-Car V4H (R8A779G0) is an automotive chip with Cortex-A76
           cores and deep learning accerlation.
      
         - Broadcom BCM47622 is a new broadband SoC based on a quad Cortex-A7
           and dual Wifi-6.
      
         - Corstone1000 is a generic platform from Arm that is used for
           designing custom SoCs, the support for now is for the Fixed Virtual
           Platform emulation for it.
      
         - Mediatek MT8195 (Kompanio 1200) is a high-end consumer chip used in
           upcoming Chromebooks.
      
         - NXP i.MXRT1050 is a Cortex-M7 based microcontroller, the first
           MMU-less SoC to be added in a while
      
        New machines based on already supported SoCs this time are mainly for
        32-bit platforms and include:
      
         - Two wireless routers based on Broadcom bcm4708
      
         - 30 new boards based on NXP i.MX6, i.MX7 and i.MX8 families, mostly
           for the industrial embedded market, and on NXP LS1021A based IOT
           board.
      
         - Two ethernet switches based on Microchip LAN966
      
         - Eight Qualcomm Snapdragon based machines, including a smartwatch, a
           Chromebook board and some phones
      
         - Another phone based on the old ST-Ericsson Ux500 platform
      
         - Seven STM32MP1 based boards
      
         - Four single-board computers based on Rockchip RK3566/RK3568"
      
      * tag 'arm-dt-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (791 commits)
        ARM: dts: kswitch-d10: enable networking
        ARM: dts: lan966x: add switch node
        ARM: dts: lan966x: add serdes node
        ARM: dts: lan966x: add reset switch reset node
        ARM: dts: lan966x: add MIIM nodes
        ARM: dts: lan966x: add hwmon node
        ARM: dts: lan966x: add basic Kontron KSwitch D10 support
        ARM: dts: lan966x: add flexcom I2C nodes
        ARM: dts: lan966x: add flexcom SPI nodes
        ARM: dts: lan966x: add all flexcom usart nodes
        ARM: dts: lan966x: add missing uart DMA channel
        ARM: dts: lan966x: add sgpio node
        ARM: dts: lan966x: swap dma channels for crypto node
        ARM: dts: lan966x: rename pinctrl nodes
        ARM: dts: at91: sama7g5: remove interrupt-parent from gic node
        ARM: dts: at91: use generic node name for dataflash
        ARM: dts: turris-omnia: Add atsha204a node
        arm64: dts: mt8192: Follow binding order for SCP registers
        arm64: dts: mediatek: add mtk-snfi for mt7622
        arm64: dts: mediatek: mt8195-demo: enable uart1
        ...
      ae862183
    • Linus Torvalds's avatar
      Merge tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · c011dd53
      Linus Torvalds authored
      Pull 32-bit ARM SoC updates from Arnd Bergmann:
       "These updates are for platform specific code in arch/arm/, mostly
        fixing minor issues.
      
        The at91 platform gains support for better power management on the
        lan966 platform and new firmware on the sama5 platform. The mediatek
        soc drivers in turn are enabled for the new mt8195 SoC"
      
      * tag 'arm-soc-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (34 commits)
        ARM: at91: debug: add lan966 support
        ARM: at91: pm: add support for sama5d2 secure suspend
        ARM: at91: add code to handle secure calls
        ARM: at91: Kconfig: implement PIT64B selection
        ARM: at91: pm: add quirks for pm
        ARM: at91: pm: use kernel documentation style
        ARM: at91: pm: introduce macros for pm mode replacement
        ARM: at91: pm: keep documentation inline with structure members
        orion5x: fix typos in comments
        ARM: hisi: Add missing of_node_put after of_find_compatible_node
        ARM: shmobile: rcar-gen2: Drop comma after OF match table sentinel
        ARM: shmobile: Drop commas after dt_compat sentinels
        soc: mediatek: mutex: remove mt8195 MOD0 and SOF0 definition
        MAINTAINERS: Add Broadcom BCMBCA entry
        arm: bcmbca: add arch bcmbca machine entry
        MAINTAINERS: Broadcom internal lists aren't maintainers
        dt-bindings: pwrap: mediatek: Update pwrap document for mt8195
        soc: mediatek: add DDP_DOMPONENT_DITHER0 enum for mt8195 vdosys0
        soc: mediatek: add mtk-mutex support for mt8195 vdosys0
        soc: mediatek: add mtk-mmsys support for mt8195 vdosys0
        ...
      c011dd53
    • Uros Bizjak's avatar
      locking/lockref: Use try_cmpxchg64 in CMPXCHG_LOOP macro · 3378323b
      Uros Bizjak authored
      Use try_cmpxchg64 instead of cmpxchg64 in CMPXCHG_LOOP macro.
      x86 CMPXCHG instruction returns success in ZF flag, so this
      change saves a compare after cmpxchg (and related move instruction
      in front of cmpxchg). The main loop of lockref_get improves from:
      
        13:	48 89 c1             	mov    %rax,%rcx
        16:	48 c1 f9 20          	sar    $0x20,%rcx
        1a:	83 c1 01             	add    $0x1,%ecx
        1d:	48 89 ce             	mov    %rcx,%rsi
        20:	89 c1                	mov    %eax,%ecx
        22:	48 89 d0             	mov    %rdx,%rax
        25:	48 c1 e6 20          	shl    $0x20,%rsi
        29:	48 09 f1             	or     %rsi,%rcx
        2c:	f0 48 0f b1 4d 00    	lock cmpxchg %rcx,0x0(%rbp)
        32:	48 39 d0             	cmp    %rdx,%rax
        35:	75 17                	jne    4e <lockref_get+0x4e>
      
      to:
      
        13:	48 89 ca             	mov    %rcx,%rdx
        16:	48 c1 fa 20          	sar    $0x20,%rdx
        1a:	83 c2 01             	add    $0x1,%edx
        1d:	48 89 d6             	mov    %rdx,%rsi
        20:	89 ca                	mov    %ecx,%edx
        22:	48 c1 e6 20          	shl    $0x20,%rsi
        26:	48 09 f2             	or     %rsi,%rdx
        29:	f0 48 0f b1 55 00    	lock cmpxchg %rdx,0x0(%rbp)
        2f:	75 02                	jne    33 <lockref_get+0x33>
      
      [ Michael Ellerman and Mark Rutland confirm that code generation on
        powerpc and arm64 respectively is also ok, even though they do not
        have a native arch_try_cmpxchg() implementation, and rely on the
        default fallback case    - Linus ]
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Waiman.Long@hp.com
      Cc: paulmck@linux.vnet.ibm.com
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3378323b
    • Chuck Lever's avatar
      NFSD: nfsd_file_put() can sleep · 08af54b3
      Chuck Lever authored
      Now that there are no more callers of nfsd_file_put() that might
      hold a spin lock, ensure the lockdep infrastructure can catch
      newly introduced calls to nfsd_file_put() made while a spinlock
      is held.
      
      Link: https://lore.kernel.org/linux-nfs/ece7fd1d-5fb3-5155-54ba-347cfc19bd9a@oracle.com/T/#mf1855552570cf9a9c80d1e49d91438cd9085aadaSigned-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      08af54b3
    • Chuck Lever's avatar
      NFSD: Add documenting comment for nfsd4_release_lockowner() · 043862b0
      Chuck Lever authored
      And return explicit nfserr values that match what is documented in the
      new comment / API contract.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      043862b0
    • Chuck Lever's avatar
      NFSD: Modernize nfsd4_release_lockowner() · bd8fdb6e
      Chuck Lever authored
      Refactor: Use existing helpers that other lock operations use. This
      change removes several automatic variables, so re-organize the
      variable declarations for readability.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      bd8fdb6e