1. 16 Oct, 2022 7 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.1' of... · 2df76606
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y compile error for the
         combination of Clang >= 14 and GAS <= 2.35.
      
       - Drop vmlinux.bz2 from the rpm package as it just annoyingly increased
         the package size.
      
       - Fix modpost error under build environments using musl.
      
       - Make *.ll files keep value names for easier debugging
      
       - Fix single directory build
      
       - Prevent RISC-V from selecting the broken DWARF5 support when Clang
         and GAS are used together.
      
      * tag 'kbuild-fixes-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        lib/Kconfig.debug: Add check for non-constant .{s,u}leb128 support to DWARF5
        kbuild: fix single directory build
        kbuild: add -fno-discard-value-names to cmd_cc_ll_c
        scripts/clang-tools: Convert clang-tidy args to list
        modpost: put modpost options before argument
        kbuild: Stop including vmlinux.bz2 in the rpm's
        Kconfig.debug: add toolchain checks for DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
        Kconfig.debug: simplify the dependency of DEBUG_INFO_DWARF4/5
      2df76606
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 2fcd8f10
      Linus Torvalds authored
      Pull more clk updates from Stephen Boyd:
       "This is the final part of the clk patches for this merge window.
      
        The clk rate range series needed another week to fully bake. Maxime
        fixed the bug that broke clk notifiers and prevented this from being
        included in the first pull request. He also added a unit test on top
        to make sure it doesn't break so easily again. The majority of the
        series fixes up how the clk_set_rate_*() APIs work, particularly
        around when the rate constraints are dropped and how they move around
        when reparenting clks. Overall it's a much needed improvement to the
        clk rate range APIs that used to be pretty broken if you looked
        sideways.
      
        Beyond the core changes there are a few driver fixes for a compilation
        issue or improper data causing clks to fail to register or have the
        wrong parents. These are good to get in before the first -rc so that
        the system actually boots on the affected devices"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (31 commits)
        clk: tegra: Fix Tegra PWM parent clock
        clk: at91: fix the build with binutils 2.27
        clk: qcom: gcc-msm8660: Drop hardcoded fixed board clocks
        clk: mediatek: clk-mux: Add .determine_rate() callback
        clk: tests: Add tests for notifiers
        clk: Update req_rate on __clk_recalc_rates()
        clk: tests: Add missing test case for ranges
        clk: qcom: clk-rcg2: Take clock boundaries into consideration for gfx3d
        clk: Introduce the clk_hw_get_rate_range function
        clk: Zero the clk_rate_request structure
        clk: Stop forwarding clk_rate_requests to the parent
        clk: Constify clk_has_parent()
        clk: Introduce clk_core_has_parent()
        clk: Switch from __clk_determine_rate to clk_core_round_rate_nolock
        clk: Add our request boundaries in clk_core_init_rate_req
        clk: Introduce clk_hw_init_rate_request()
        clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller
        clk: Change clk_core_init_rate_req prototype
        clk: Set req_rate on reparenting
        clk: Take into account uncached clocks in clk_set_rate_range()
        ...
      2fcd8f10
    • Linus Torvalds's avatar
      Merge tag '6.1-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · b08cd744
      Linus Torvalds authored
      Pull more cifs updates from Steve French:
      
       - fix a regression in guest mounts to old servers
      
       - improvements to directory leasing (caching directory entries safely
         beyond the root directory)
      
       - symlink improvement (reducing roundtrips needed to process symlinks)
      
       - an lseek fix (to problem where some dir entries could be skipped)
      
       - improved ioctl for returning more detailed information on directory
         change notifications
      
       - clarify multichannel interface query warning
      
       - cleanup fix (for better aligning buffers using ALIGN and round_up)
      
       - a compounding fix
      
       - fix some uninitialized variable bugs found by Coverity and the kernel
         test robot
      
      * tag '6.1-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: improve SMB3 change notification support
        cifs: lease key is uninitialized in two additional functions when smb1
        cifs: lease key is uninitialized in smb1 paths
        smb3: must initialize two ACL struct fields to zero
        cifs: fix double-fault crash during ntlmssp
        cifs: fix static checker warning
        cifs: use ALIGN() and round_up() macros
        cifs: find and use the dentry for cached non-root directories also
        cifs: enable caching of directories for which a lease is held
        cifs: prevent copying past input buffer boundaries
        cifs: fix uninitialised var in smb2_compound_op()
        cifs: improve symlink handling for smb2+
        smb3: clarify multichannel warning
        cifs: fix regression in very old smb1 mounts
        cifs: fix skipping to incorrect offset in emit_cached_dirents
      b08cd744
    • Tetsuo Handa's avatar
      Revert "cpumask: fix checking valid cpu range". · 80493877
      Tetsuo Handa authored
      This reverts commit 78e5a339 ("cpumask: fix checking valid cpu range").
      
      syzbot is hitting WARN_ON_ONCE(cpu >= nr_cpumask_bits) warning at
      cpu_max_bits_warn() [1], for commit 78e5a339 ("cpumask: fix checking
      valid cpu range") is broken.  Obviously that patch hits WARN_ON_ONCE()
      when e.g.  reading /proc/cpuinfo because passing "cpu + 1" instead of
      "cpu" will trivially hit cpu == nr_cpumask_bits condition.
      
      Although syzbot found this problem in linux-next.git on 2022/09/27 [2],
      this problem was not fixed immediately.  As a result, that patch was
      sent to linux.git before the patch author recognizes this problem, and
      syzbot started failing to test changes in linux.git since 2022/10/10
      [3].
      
      Andrew Jones proposed a fix for x86 and riscv architectures [4].  But
      [2] and [5] indicate that affected locations are not limited to arch
      code.  More delay before we find and fix affected locations, less tested
      kernel (and more difficult to bisect and fix) before release.
      
      We should have inspected and fixed basically all cpumask users before
      applying that patch.  We should not crash kernels in order to ask
      existing cpumask users to update their code, even if limited to
      CONFIG_DEBUG_PER_CPU_MAPS=y case.
      
      Link: https://syzkaller.appspot.com/bug?extid=d0fd2bf0dd6da72496dd [1]
      Link: https://syzkaller.appspot.com/bug?extid=21da700f3c9f0bc40150 [2]
      Link: https://syzkaller.appspot.com/bug?extid=51a652e2d24d53e75734 [3]
      Link: https://lkml.kernel.org/r/20221014155845.1986223-1-ajones@ventanamicro.com [4]
      Link: https://syzkaller.appspot.com/bug?extid=4d46c43d81c3bd155060 [5]
      Reported-by: default avatarAndrew Jones <ajones@ventanamicro.com>
      Reported-by: syzbot+d0fd2bf0dd6da72496dd@syzkaller.appspotmail.com
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      80493877
    • Nathan Chancellor's avatar
      lib/Kconfig.debug: Add check for non-constant .{s,u}leb128 support to DWARF5 · 0a6de78c
      Nathan Chancellor authored
      When building with a RISC-V kernel with DWARF5 debug info using clang
      and the GNU assembler, several instances of the following error appear:
      
        /tmp/vgettimeofday-48aa35.s:2963: Error: non-constant .uleb128 is not supported
      
      Dumping the .s file reveals these .uleb128 directives come from
      .debug_loc and .debug_ranges:
      
        .Ldebug_loc0:
                .byte   4                               # DW_LLE_offset_pair
                .uleb128 .Lfunc_begin0-.Lfunc_begin0    #   starting offset
                .uleb128 .Ltmp1-.Lfunc_begin0           #   ending offset
                .byte   1                               # Loc expr size
                .byte   90                              # DW_OP_reg10
                .byte   0                               # DW_LLE_end_of_list
      
        .Ldebug_ranges0:
                .byte   4                               # DW_RLE_offset_pair
                .uleb128 .Ltmp6-.Lfunc_begin0           #   starting offset
                .uleb128 .Ltmp27-.Lfunc_begin0          #   ending offset
                .byte   4                               # DW_RLE_offset_pair
                .uleb128 .Ltmp28-.Lfunc_begin0          #   starting offset
                .uleb128 .Ltmp30-.Lfunc_begin0          #   ending offset
                .byte   0                               # DW_RLE_end_of_list
      
      There is an outstanding binutils issue to support a non-constant operand
      to .sleb128 and .uleb128 in GAS for RISC-V but there does not appear to
      be any movement on it, due to concerns over how it would work with
      linker relaxation.
      
      To avoid these build errors, prevent DWARF5 from being selected when
      using clang and an assembler that does not have support for these symbol
      deltas, which can be easily checked in Kconfig with as-instr plus the
      small test program from the dwz test suite from the binutils issue.
      
      Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27215
      Link: https://github.com/ClangBuiltLinux/linux/issues/1719Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      0a6de78c
    • Masahiro Yamada's avatar
      kbuild: fix single directory build · 3753af77
      Masahiro Yamada authored
      Commit f110e5a2 ("kbuild: refactor single builds of *.ko") was wrong.
      
      KBUILD_MODULES _is_ needed for single builds.
      
      Otherwise, "make foo/bar/baz/" does not build module objects at all.
      
      Fixes: f110e5a2 ("kbuild: refactor single builds of *.ko")
      Reported-by: default avatarDavid Sterba <dsterba@suse.cz>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarDavid Sterba <dsterba@suse.com>
      3753af77
    • Linus Torvalds's avatar
      Merge tag 'slab-for-6.1-rc1-hotfix' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · 1501278b
      Linus Torvalds authored
      Pull slab hotfix from Vlastimil Babka:
       "A single fix for the common-kmalloc series, for warnings on mips and
        sparc64 reported by Guenter Roeck"
      
      * tag 'slab-for-6.1-rc1-hotfix' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
        mm/slab: use kmalloc_node() for off slab freelist_idx_t array allocation
      1501278b
  2. 15 Oct, 2022 14 commits
  3. 14 Oct, 2022 19 commits
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-fixes-6.1-1' of... · 73344a3f
      Linus Torvalds authored
      Merge tag 'asm-generic-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
      
      Pull asm-generic fix from Arnd Bergmann:
       "A last-minute arch/alpha regression fix: the previous asm-generic
        branch contained a new regression from a typo"
      
      * tag 'asm-generic-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        alpha: fix marvel_ioread8 build regression
      73344a3f
    • Linus Torvalds's avatar
      Merge tag 'arm-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · ca1aaf99
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "These are three fixes for build warnings that came in during the merge
        window"
      
      * tag 'arm-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: mmp: Make some symbols static
        ARM: spear6xx: Staticize few definitions
        clk: spear: Move prototype to accessible header
      ca1aaf99
    • Stephen Boyd's avatar
      Merge branch 'clk-rate-range' into clk-next · a7b78bef
      Stephen Boyd authored
       - Various clk rate range fixes
       - Drop clk rate range constraints on clk_put() (redux)
      
      * clk-rate-range: (28 commits)
        clk: mediatek: clk-mux: Add .determine_rate() callback
        clk: tests: Add tests for notifiers
        clk: Update req_rate on __clk_recalc_rates()
        clk: tests: Add missing test case for ranges
        clk: qcom: clk-rcg2: Take clock boundaries into consideration for gfx3d
        clk: Introduce the clk_hw_get_rate_range function
        clk: Zero the clk_rate_request structure
        clk: Stop forwarding clk_rate_requests to the parent
        clk: Constify clk_has_parent()
        clk: Introduce clk_core_has_parent()
        clk: Switch from __clk_determine_rate to clk_core_round_rate_nolock
        clk: Add our request boundaries in clk_core_init_rate_req
        clk: Introduce clk_hw_init_rate_request()
        clk: Move clk_core_init_rate_req() from clk_core_round_rate_nolock() to its caller
        clk: Change clk_core_init_rate_req prototype
        clk: Set req_rate on reparenting
        clk: Take into account uncached clocks in clk_set_rate_range()
        clk: tests: Add some tests for orphan with multiple parents
        clk: tests: Add tests for mux with multiple parents
        clk: tests: Add tests for single parent mux
        ...
      a7b78bef
    • Jon Hunter's avatar
      clk: tegra: Fix Tegra PWM parent clock · c461c677
      Jon Hunter authored
      Commit 8c193f47 ("pwm: tegra: Optimize period calculation") updated
      the period calculation in the Tegra PWM driver and now returns an error
      if the period requested is less than minimum period supported. This is
      breaking PWM support on various Tegra platforms. For example, on the
      Tegra210 Jetson Nano platform this is breaking the PWM fan support and
      probing the PWM fan driver now fails ...
      
       pwm-fan pwm-fan: Failed to configure PWM: -22
       pwm-fan: probe of pwm-fan failed with error -22
      
      The problem is that the default parent clock for the PWM on Tegra210 is
      a 32kHz clock and is unable to support the requested PWM period.
      
      Fix PWM support on Tegra20, Tegra30, Tegra114, Tegra124 and Tegra210 by
      updating the parent clock for the PWM to be the PLL_P.
      
      Fixes: 8c193f47 ("pwm: tegra: Optimize period calculation")
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Tested-by: Robert Eckelmann <longnoserob@gmail.com> # TF101 T20
      Tested-by: Antoni Aloy Torrens <aaloytorrens@gmail.com> # TF101 T20
      Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # TF201 T30
      Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # TF700T T3
      Link: https://lore.kernel.org/r/20221010100046.6477-1-jonathanh@nvidia.comAcked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      c461c677
    • Kefeng Wang's avatar
      clk: at91: fix the build with binutils 2.27 · 57d84963
      Kefeng Wang authored
      There is an issue when build with older versions of binutils 2.27.0,
      
      arch/arm/mach-at91/pm_suspend.S: Assembler messages:
      arch/arm/mach-at91/pm_suspend.S:1086: Error: garbage following instruction -- `ldr tmp1,=0x00020010UL'
      
      Use UL() macro to fix the issue in assembly file.
      
      Fixes: 4fd36e45 ("ARM: at91: pm: add plla disable/enable support for sam9x60")
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      Link: https://lore.kernel.org/r/20221012030635.13140-1-wangkefeng.wang@huawei.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      57d84963
    • Linus Walleij's avatar
      clk: qcom: gcc-msm8660: Drop hardcoded fixed board clocks · 8c7bc6ca
      Linus Walleij authored
      These two clocks are now registered in the device tree as fixed clocks,
      causing a regression in the driver as the clock already exists with
      e.g. the name "pxo_board" as the MSM8660 GCC driver probes.
      
      Fix this by just not hard-coding this anymore and everything works
      like a charm.
      
      Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Fixes: baecbda5 ("ARM: dts: qcom: msm8660: fix node names for fixed clocks")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20221013140745.7801-1-linus.walleij@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      8c7bc6ca
    • AngeloGioacchino Del Regno's avatar
      clk: mediatek: clk-mux: Add .determine_rate() callback · b05ea331
      AngeloGioacchino Del Regno authored
      Since commit 262ca38f ("clk: Stop forwarding clk_rate_requests
      to the parent"), the clk_rate_request is .. as the title says, not
      forwarded anymore to the parent: this produces an issue with the
      MediaTek clock MUX driver during GPU DVFS on MT8195, but not on
      MT8192 or others.
      
      This is because, differently from others, like MT8192 where all of
      the clocks in the MFG parents tree are of mtk_mux type, but in the
      parent tree of MT8195's MFG clock, we have one mtk_mux clock and
      one (clk framework generic) mux clock, like so:
      
      names: mfg_bg3d -> mfg_ck_fast_ref -> top_mfg_core_tmp (or) mfgpll
      types: mtk_gate ->      mux        ->     mtk_mux      (or) mtk_pll
      
      To solve this issue and also keep the GPU DVFS clocks code working
      as expected, wire up a .determine_rate() callback for the mtk_mux
      ops; for that, the standard clk_mux_determine_rate_flags() was used
      as it was possible to.
      
      This commit was successfully tested on MT6795 Xperia M5, MT8173 Elm,
      MT8192 Spherion and MT8195 Tomato; no regressions were seen.
      
      For the sake of some more documentation about this issue here's the
      trace of it:
      
      [   12.211587] ------------[ cut here ]------------
      [   12.211589] WARNING: CPU: 6 PID: 78 at drivers/clk/clk.c:1462 clk_core_init_rate_req+0x84/0x90
      [   12.211593] Modules linked in: stp crct10dif_ce mtk_adsp_common llc rfkill snd_sof_xtensa_dsp
                     panfrost(+) sbs_battery cros_ec_lid_angle cros_ec_sensors snd_sof_of
                     cros_ec_sensors_core hid_multitouch cros_usbpd_logger snd_sof gpu_sched
                     snd_sof_utils fuse ipv6
      [   12.211614] CPU: 6 PID: 78 Comm: kworker/u16:2 Tainted: G        W          6.0.0-next-20221011+ #58
      [   12.211616] Hardware name: Acer Tomato (rev2) board (DT)
      [   12.211617] Workqueue: devfreq_wq devfreq_monitor
      [   12.211620] pstate: 40400009 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [   12.211622] pc : clk_core_init_rate_req+0x84/0x90
      [   12.211625] lr : clk_core_forward_rate_req+0xa4/0xe4
      [   12.211627] sp : ffff80000893b8e0
      [   12.211628] x29: ffff80000893b8e0 x28: ffffdddf92f9b000 x27: ffff46a2c0e8bc05
      [   12.211632] x26: ffff46a2c1041200 x25: 0000000000000000 x24: 00000000173eed80
      [   12.211636] x23: ffff80000893b9c0 x22: ffff80000893b940 x21: 0000000000000000
      [   12.211641] x20: ffff46a2c1039f00 x19: ffff46a2c1039f00 x18: 0000000000000000
      [   12.211645] x17: 0000000000000038 x16: 000000000000d904 x15: 0000000000000003
      [   12.211649] x14: ffffdddf9357ce48 x13: ffffdddf935e71c8 x12: 000000000004803c
      [   12.211653] x11: 00000000a867d7ad x10: 00000000a867d7ad x9 : ffffdddf90c28df4
      [   12.211657] x8 : ffffdddf9357a980 x7 : 0000000000000000 x6 : 0000000000000004
      [   12.211661] x5 : ffffffffffffffc8 x4 : 00000000173eed80 x3 : ffff80000893b940
      [   12.211665] x2 : 00000000173eed80 x1 : ffff80000893b940 x0 : 0000000000000000
      [   12.211669] Call trace:
      [   12.211670]  clk_core_init_rate_req+0x84/0x90
      [   12.211673]  clk_core_round_rate_nolock+0xe8/0x10c
      [   12.211675]  clk_mux_determine_rate_flags+0x174/0x1f0
      [   12.211677]  clk_mux_determine_rate+0x1c/0x30
      [   12.211680]  clk_core_determine_round_nolock+0x74/0x130
      [   12.211682]  clk_core_round_rate_nolock+0x58/0x10c
      [   12.211684]  clk_core_round_rate_nolock+0xf4/0x10c
      [   12.211686]  clk_core_set_rate_nolock+0x194/0x2ac
      [   12.211688]  clk_set_rate+0x40/0x94
      [   12.211691]  _opp_config_clk_single+0x38/0xa0
      [   12.211693]  _set_opp+0x1b0/0x500
      [   12.211695]  dev_pm_opp_set_rate+0x120/0x290
      [   12.211697]  panfrost_devfreq_target+0x3c/0x50 [panfrost]
      [   12.211705]  devfreq_set_target+0x8c/0x2d0
      [   12.211707]  devfreq_update_target+0xcc/0xf4
      [   12.211708]  devfreq_monitor+0x40/0x1d0
      [   12.211710]  process_one_work+0x294/0x664
      [   12.211712]  worker_thread+0x7c/0x45c
      [   12.211713]  kthread+0x104/0x110
      [   12.211716]  ret_from_fork+0x10/0x20
      [   12.211718] irq event stamp: 7102
      [   12.211719] hardirqs last  enabled at (7101): [<ffffdddf904ea5a0>] finish_task_switch.isra.0+0xec/0x2f0
      [   12.211723] hardirqs last disabled at (7102): [<ffffdddf91794b74>] el1_dbg+0x24/0x90
      [   12.211726] softirqs last  enabled at (6716): [<ffffdddf90410be4>] __do_softirq+0x414/0x588
      [   12.211728] softirqs last disabled at (6507): [<ffffdddf904171d8>] ____do_softirq+0x18/0x24
      [   12.211730] ---[ end trace 0000000000000000 ]---
      
      Fixes: 262ca38f ("clk: Stop forwarding clk_rate_requests to the parent")
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Link: https://lore.kernel.org/r/20221011135548.318323-1-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      b05ea331
    • Nick Desaulniers's avatar
      kbuild: add -fno-discard-value-names to cmd_cc_ll_c · c67a85be
      Nick Desaulniers authored
      When debugging LLVM IR, it can be handy for clang to not discard value
      names used for local variables and parameters. Compare the generated IR.
      
      -fdiscard-value-names:
        define i32 @core_sys_select(i32 %0, ptr %1, ptr %2, ptr %3, ptr %4) {
          %6 = alloca i64
          %7 = alloca %struct.poll_wqueues
          %8 = alloca [64 x i32]
      
      -fno-discard-value-names:
        define i32 @core_sys_select(i32 %n, ptr %inp, ptr %outp, ptr %exp,
                                    ptr %end_time) {
          %expire.i = alloca i64
          %table.i = alloca %struct.poll_wqueues
          %stack_fds = alloca [64 x i32]
      
      The rule for generating human readable LLVM IR (.ll) is only useful as a
      debugging feature:
      
      $ make LLVM=1 fs/select.ll
      
      As Fangrui notes:
        A LLVM_ENABLE_ASSERTIONS=off build of Clang defaults to
        -fdiscard-value-names.
      
        A LLVM_ENABLE_ASSERTIONS=on build of Clang defaults to
        -fno-discard-value-names.
      
      Explicitly enable -fno-discard-value-names so that the IR always contains
      value names regardless of whether assertions were enabled or not.
      Assertions generally are not enabled in releases of clang packaged by
      distributions.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/1467Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarFangrui Song <maskray@google.com>
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      c67a85be
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · dca45efb
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are a few remaining patches for 6.1-rc1.
      
        The major changes are the hibernation fixes for HD-audio CS35L41 codec
        and the USB-audio small fixes against the last change. In addition, a
        couple of HD-audio regression fixes and a couple of potential
        mutex-deadlock fixes with OSS emulation in ALSA core side are seen"
      
      * tag 'sound-fix-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: cs35l41: Support System Suspend
        ALSA: hda: cs35l41: Remove suspend/resume hda hooks
        ALSA: hda/cs_dsp_ctl: Fix mutex inversion when creating controls
        ALSA: hda: hda_cs_dsp_ctl: Ensure pwr_lock is held before reading/writing controls
        ALSA: hda: hda_cs_dsp_ctl: Minor clean and redundant code removal
        ALSA: oss: Fix potential deadlock at unregistration
        ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
        ALSA: hda/realtek: Add Intel Reference SSID to support headset keys
        ALSA: hda/realtek: Add quirk for ASUS GV601R laptop
        ALSA: hda/realtek: Correct pin configs for ASUS G533Z
        ALSA: usb-audio: Avoid superfluous endpoint setup
        ALSA: usb-audio: Correct the return code from snd_usb_endpoint_set_params()
        ALSA: usb-audio: Apply mutex around snd_usb_endpoint_set_params()
        ALSA: usb-audio: Avoid unnecessary interface change at EP close
        ALSA: hda: Update register polling macros
        ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
      dca45efb
    • Linus Torvalds's avatar
      Merge tag 'leds-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds · 5964c927
      Linus Torvalds authored
      Pull LED updates from Pavel Machek:
       "This is very quiet release for LEDs, pca963 got blinking support and
        that's pretty much it"
      
      * tag 'leds-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds:
        leds: pca963: fix misleading indentation
        dt-bindings: leds: Document mmc trigger
        leds: pca963x: fix blink with hw acceleration
      5964c927
    • Linus Torvalds's avatar
      Merge tag 'sched-psi-2022-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bd9a3dba
      Linus Torvalds authored
      Pull PSI updates from Ingo Molnar:
      
       - Various performance optimizations, resulting in a 4%-9% speedup in
         the mmtests/config-scheduler-perfpipe micro-benchmark.
      
       - New interface to turn PSI on/off on a per cgroup level.
      
      * tag 'sched-psi-2022-10-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/psi: Per-cgroup PSI accounting disable/re-enable interface
        sched/psi: Cache parent psi_group to speed up group iteration
        sched/psi: Consolidate cgroup_psi()
        sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure
        sched/psi: Remove NR_ONCPU task accounting
        sched/psi: Optimize task switch inside shared cgroups again
        sched/psi: Move private helpers to sched/stats.h
        sched/psi: Save percpu memory when !psi_cgroups_enabled
        sched/psi: Don't create cgroup PSI files when psi_disabled
        sched/psi: Fix periodic aggregation shut off
      bd9a3dba
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 1df046ab
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Cortex-A55 errata workaround (repeat TLBI)
      
       - AMPERE1 added to the Spectre-BHB affected list
      
       - MTE fix to avoid setting PG_mte_tagged if no tags have been touched
         on a page
      
       - Fixed typo in the SCTLR_EL1.SPINTMASK bit naming (the commit log has
         other typos)
      
       - perf: return value check in ali_drw_pmu_probe(),
         ALIBABA_UNCORE_DRW_PMU dependency on ACPI
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Add AMPERE1 to the Spectre-BHB affected list
        arm64: mte: Avoid setting PG_mte_tagged if no tags cleared or restored
        MAINTAINERS: rectify file entry in ALIBABA PMU DRIVER
        drivers/perf: ALIBABA_UNCORE_DRW_PMU should depend on ACPI
        drivers/perf: fix return value check in ali_drw_pmu_probe()
        arm64: errata: Add Cortex-A55 to the repeat tlbi list
        arm64/sysreg: Fix typo in SCTR_EL1.SPINTMASK
      1df046ab
    • Linus Torvalds's avatar
      Merge tag 'mm-stable-2022-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 5e714bf1
      Linus Torvalds authored
      Pull more MM updates from Andrew Morton:
      
       - fix a race which causes page refcounting errors in ZONE_DEVICE pages
         (Alistair Popple)
      
       - fix userfaultfd test harness instability (Peter Xu)
      
       - various other patches in MM, mainly fixes
      
      * tag 'mm-stable-2022-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (29 commits)
        highmem: fix kmap_to_page() for kmap_local_page() addresses
        mm/page_alloc: fix incorrect PGFREE and PGALLOC for high-order page
        mm/selftest: uffd: explain the write missing fault check
        mm/hugetlb: use hugetlb_pte_stable in migration race check
        mm/hugetlb: fix race condition of uffd missing/minor handling
        zram: always expose rw_page
        LoongArch: update local TLB if PTE entry exists
        mm: use update_mmu_tlb() on the second thread
        kasan: fix array-bounds warnings in tests
        hmm-tests: add test for migrate_device_range()
        nouveau/dmem: evict device private memory during release
        nouveau/dmem: refactor nouveau_dmem_fault_copy_one()
        mm/migrate_device.c: add migrate_device_range()
        mm/migrate_device.c: refactor migrate_vma and migrate_deivce_coherent_page()
        mm/memremap.c: take a pgmap reference on page allocation
        mm: free device private pages have zero refcount
        mm/memory.c: fix race when faulting a device private page
        mm/damon: use damon_sz_region() in appropriate place
        mm/damon: move sz_damon_region to damon_sz_region
        lib/test_meminit: add checks for the allocation functions
        ...
      5e714bf1
    • Bjorn Helgaas's avatar
      Revert "PCI: Distribute available resources for root buses, too" · 5632e2be
      Bjorn Helgaas authored
      This reverts commit e96e27fc.
      
      Jonathan reported that this commit broke this topology, where all the space
      available on bus 02 was assigned to the 02:00.0 bridge window, leaving none
      for the e1000 device at 02:00.1:
      
        pci 0000:00:04.0: bridge window [mem 0x10200000-0x103fffff] to [bus 02-04]
        pci 0000:02:00.0: bridge window [mem 0x10200000-0x103fffff] to [bus 03-04]
        pci 0000:02:00.1: BAR 0: failed to assign [mem size 0x00020000]
        e1000 0000:02:00.1: can't ioremap BAR 0: [??? 0x00000000 flags 0x0]
      
      Link: https://lore.kernel.org/r/20221014124553.0000696f@huawei.comReported-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5632e2be
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · f2e44139
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "Fixes:
      
         - When we added basic vDSO support in kernel 5.18 we introduced a bug
           which prevented a mmap() of graphic card memory. This is because we
           used the DMB (data memory break trap bit) page flag as special-bit,
           but missed to clear that bit when loading the TLB.
      
         - Graphics card memory size was not correctly aligned
      
         - Spelling fixes (from Colin Ian King)
      
        Enhancements:
      
         - PDC console (which uses firmware calls) now rewritten as early
           console
      
         - Reduced size of alternative tables"
      
      * tag 'parisc-for-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix spelling mistake "mis-match" -> "mismatch" in eisa driver
        parisc: Fix userspace graphics card breakage due to pgtable special bit
        parisc: fbdev/stifb: Align graphics memory size to 4MB
        parisc: Convert PDC console to an early console
        parisc: Reduce kernel size by packing alternative tables
      f2e44139
    • Linus Torvalds's avatar
      Merge tag 's390-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · ebdca8ec
      Linus Torvalds authored
      Pull more s390 updates from Vasily Gorbik:
      
       - Generate a change uevent on unsolicited device end I/O interrupt for
         z/VM unit record devices supported by the vmur driver. This event can
         be used to automatically trigger processing of files as they arrive
         in the z/VM reader.
      
      * tag 's390-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/vmur: generate uevent on unsolicited device end
        s390/vmur: remove unnecessary BUG statement
      ebdca8ec
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.1-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 49857497
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
      
       - DT updates for the PolarFire SOC
      
       - a fix to correct the handling of write-only mappings
      
       - m{vetndor,arcd,imp}id is now in /proc/cpuinfo
      
       - the SiFive L2 cache controller support has been refactored to also
         support L3 caches
      
       - misc fixes, cleanups and improvements throughout the tree
      
      * tag 'riscv-for-linus-6.1-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (42 commits)
        MAINTAINERS: add RISC-V's patchwork
        RISC-V: Make port I/O string accessors actually work
        riscv: enable software resend of irqs
        RISC-V: Re-enable counter access from userspace
        riscv: vdso: fix NULL deference in vdso_join_timens() when vfork
        riscv: Add cache information in AUX vector
        soc: sifive: ccache: define the macro for the register shifts
        soc: sifive: ccache: use pr_fmt() to remove CCACHE: prefixes
        soc: sifive: ccache: reduce printing on init
        soc: sifive: ccache: determine the cache level from dts
        soc: sifive: ccache: Rename SiFive L2 cache to Composable cache.
        dt-bindings: sifive-ccache: change Sifive L2 cache to Composable cache
        riscv: check for kernel config option in t-head memory types errata
        riscv: use BIT() marco for cpufeature probing
        riscv: use BIT() macros in t-head errata init
        riscv: drop some idefs from CMO initialization
        riscv: cleanup svpbmt cpufeature probing
        riscv: Pass -mno-relax only on lld < 15.0.0
        RISC-V: Avoid dereferening NULL regs in die()
        dt-bindings: riscv: add new riscv,isa strings for emulators
        ...
      49857497
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 70609c14
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix 32-bit syscall wrappers with 64-bit arguments of unaligned
         register-pairs. Notably this broke ftruncate64 & pread/write64, which
         can lead to file corruption.
      
       - Fix lost interrupts when returning to soft-masked context on 64-bit.
      
       - Fix build failure when CONFIG_DTL=n.
      
      Thanks to Nicholas Piggin, Jason A. Donenfeld, Guenter Roeck, Arnd
      Bergmann, and Sachin Sant.
      
      * tag 'powerpc-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/pseries: Fix CONFIG_DTL=n build
        powerpc/64s/interrupt: Fix lost interrupts when returning to soft-masked context
        powerpc/32: fix syscall wrappers with 64-bit arguments of unaligned register-pairs
      70609c14
    • Nathan Chancellor's avatar
      drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n · 2130b87b
      Nathan Chancellor authored
      After commit 8799c0be ("drm/amd/display: Fix vblank refcount in vrr
      transition"), a build with CONFIG_DEBUG_FS=n is broken due to a
      misplaced brace, along the lines of:
      
        In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_trace.h:39,
                         from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:41:
        drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: At top level:
        ./include/drm/drm_atomic.h:864:9: error: expected identifier or ‘(’ before ‘for’
          864 |         for ((__i) = 0;                                                 \
              |         ^~~
        drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8317:9: note: in expansion of macro ‘for_each_new_crtc_in_state’
         8317 |         for_each_new_crtc_in_state(state, crtc, new_crtc_state, j)
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Move the brace within the #ifdef so that the file can be built with or
      without CONFIG_DEBUG_FS.
      
      Fixes: 8799c0be ("drm/amd/display: Fix vblank refcount in vrr transition")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2130b87b