1. 15 Jul, 2024 25 commits
    • Masahiro Yamada's avatar
      kconfig: change sym_choice_default() to take the choice menu · e8fcd915
      Masahiro Yamada authored
      Change the argument of sym_choice_default() to ease further cleanups.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      e8fcd915
    • Masahiro Yamada's avatar
      kconfig: remove conf_unsaved in conf_read_simple() · cca31837
      Masahiro Yamada authored
      This variable is unnecessary. Call conf_set_changed(true) directly.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      cca31837
    • Masahiro Yamada's avatar
      kconfig: remove sym_get_choice_value() · bd0db4b6
      Masahiro Yamada authored
      sym_get_choice_value(menu->sym) is equivalent to sym_calc_choice(menu).
      
      Convert all call sites of sym_get_choice_value() and then remove it.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      bd0db4b6
    • Masahiro Yamada's avatar
      kconfig: refactor choice value calculation · f79dc03f
      Masahiro Yamada authored
      Handling choices has always been in a PITA in Kconfig.
      
      For example, fixes and reverts were repeated for randconfig with
      KCONFIG_ALLCONFIG:
      
       - 422c809f ("kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG")
       - 23a5dfda ("Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"")
       - 8357b485 ("kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG")
       - 490f1617 ("Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"")
      
      As these commits pointed out, randconfig does not randomize choices when
      KCONFIG_ALLCONFIG is used. This issue still remains.
      
      [Test Case]
      
          choice
                  prompt "choose"
      
          config A
                  bool "A"
      
          config B
                  bool "B"
      
          endchoice
      
          $ echo > all.config
          $ make KCONFIG_ALLCONFIG=1 randconfig
      
      The output is always as follows:
      
          CONFIG_A=y
          # CONFIG_B is not set
      
      Not only randconfig, but other all*config variants are also broken with
      KCONFIG_ALLCONFIG.
      
      With the same Kconfig,
      
          $ echo '# CONFIG_A is not set' > all.config
          $ make KCONFIG_ALLCONFIG=1 allyesconfig
      
      You will get this:
      
          CONFIG_A=y
          # CONFIG_B is not set
      
      This is incorrect because it does not respect all.config.
      
      The correct output should be:
      
          # CONFIG_A is not set
          CONFIG_B=y
      
      To handle user inputs more accurately, this commit refactors the code
      based on the following principles:
      
       - When a user value is given, Kconfig must set it immediately.
         Do not defer it by setting SYMBOL_NEED_SET_CHOICE_VALUES.
      
       - The SYMBOL_DEF_USER flag must not be cleared, unless a new config
         file is loaded. Kconfig must not forget user inputs.
      
      In addition, user values for choices must be managed with priority.
      If user inputs conflict within a choice block, the newest value wins.
      The values given by randconfig have lower priority than explicit user
      inputs.
      
      This commit implements it by using a linked list. Every time a choice
      block gets a new input, it is moved to the top of the list.
      
      Let me explain how it works.
      
      Let's say, we have a choice block that consists of five symbols:
      A, B, C, D, and E.
      
      Initially, the linked list looks like this:
      
          A(=?) --> B(=?) --> C(=?) --> D(=?) --> E(=?)
      
      Suppose randconfig is executed with the following KCONFIG_ALLCONFIG:
      
          CONFIG_C=y
          # CONFIG_A is not set
          CONFIG_D=y
      
      First, CONFIG_C=y is read. C is set to 'y' and moved to the top.
      
          C(=y) --> A(=?) --> B(=?) --> D(=?) --> E(=?)
      
      Next, '# CONFIG_A is not set' is read. A is set to 'n' and moved to
      the top.
      
          A(=n) --> C(=y) --> B(=?) --> D(=?) --> E(=?)
      
      Then, 'CONFIG_D=y' is read. D is set to 'y' and moved to the top.
      
          D(=y) --> A(=n) --> C(=y) --> B(=?) --> E(=?)
      
      Lastly, randconfig shuffles the order of the remaining symbols,
      resulting in:
      
          D(=y) --> A(=n) --> C(=y) --> B(=y) --> E(=y)
      or
          D(=y) --> A(=n) --> C(=y) --> E(=y) --> B(=y)
      
      When calculating the output, the linked list is traversed and the first
      visible symbol with 'y' is taken. In this case, it is D if visible.
      
      If D is hidden by 'depends on', the next node, A, is examined. Since
      it is already specified as 'n', it is skipped. Next, C is checked, and
      selected if it is visible.
      
      If C is also invisible, either B or E is chosen as a result of the
      randomization.
      
      If B and E are also invisible, the linked list is traversed in the
      reverse order, and the least prioritized 'n' symbol is chosen. It is
      A in this case.
      
      Now, Kconfig remembers all user values. This is a big difference from
      the previous implementation, where Kconfig would forget CONFIG_C=y when
      CONFIG_D=y appeared in the same input file.
      
      The new appaorch respects user-specified values as much as possible.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      f79dc03f
    • Masahiro Yamada's avatar
      kconfig: import list_move(_tail) and list_for_each_entry_reverse macros · ee29e620
      Masahiro Yamada authored
      Import more macros from include/linux/list.h.
      
      These will be used in the next commit.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      ee29e620
    • Chen-Yu Tsai's avatar
      scripts/make_fit: Support decomposing DTBs · 17c31ade
      Chen-Yu Tsai authored
      The kernel tree builds some "composite" DTBs, where the final DTB is the
      result of applying one or more DTB overlays on top of a base DTB with
      fdtoverlay.
      
      The FIT image specification already supports configurations having one
      base DTB and overlays applied on top. It is then up to the bootloader to
      apply said overlays and either use or pass on the final result. This
      allows the FIT image builder to reuse the same FDT images for multiple
      configurations, if such cases exist.
      
      The decomposition function depends on the kernel build system, reading
      back the .cmd files for the to-be-packaged DTB files to check for the
      fdtoverlay command being called. This will not work outside the kernel
      tree. The function is off by default to keep compatibility with possible
      existing users.
      
      To facilitate the decomposition and keep the code clean, the model and
      compatitble string extraction have been moved out of the output_dtb
      function. The FDT image description is replaced with the base file name
      of the included image.
      Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      17c31ade
    • Rafael Aquini's avatar
      kbuild: rpm-pkg: make sure to have versioned 'Obsoletes' for kernel.spec · e61b190b
      Rafael Aquini authored
      Fix the following rpmbuild warning:
      
        $ make srcrpm-pkg
        ...
        RPM build warnings:
            line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
      Signed-off-by: default avatarRafael Aquini <aquini@redhat.com>
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      e61b190b
    • Uwe Kleine-König's avatar
      modpost: Enable section warning from *driver to .exit.text · 7308bf8a
      Uwe Kleine-König authored
      There used to be several offenders, but now that for all of them patches
      were sent and most of them were applied, enable the warning also for
      builds without W=1.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      7308bf8a
    • Masahiro Yamada's avatar
      kbuild: move init/build-version to scripts/ · ae4c4cee
      Masahiro Yamada authored
      At first, I thought this script would be needed only in init/Makefile.
      
      However, commit 5db8face ("kbuild: Restore .version auto-increment
      behaviour for Debian packages") and commit 1789fc91 ("kbuild:
      rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg")
      revealed that it was actually needed for scripts/package/mk* as well.
      
      After all, scripts/ is a better place for it.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      ae4c4cee
    • Masahiro Yamada's avatar
      kconfig: remember the current choice while parsing the choice block · 9b114520
      Masahiro Yamada authored
      Instead of the boolean flag, it will be more useful to remember the
      current choice being parsed.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      9b114520
    • Masahiro Yamada's avatar
      kconfig: introduce choice_set_value() helper · bd988e7c
      Masahiro Yamada authored
      Currently, sym_set_tristate_value() is used to set 'y' to a choice
      member, which is confusing because it not only sets 'y' to the given
      symbol but also tweaks flags of other symbols as a side effect.
      
      Add a dedicated function for setting the value of the given choice.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      bd988e7c
    • Masahiro Yamada's avatar
      kconfig: add fallthrough comments to expr_compare_type() · dfe8e56f
      Masahiro Yamada authored
      Clarify the missing 'break' is intentional.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      dfe8e56f
    • Masahiro Yamada's avatar
      kconfig: remove unneeded code in expr_compare_type() · cd909521
      Masahiro Yamada authored
      The condition (t2 == 0) never becomes true because the zero value
      (i.e., E_NONE) is only used as a dummy type for prevtoken. It can
      be passed to t1, but not to t2.
      
      The caller of this function only checks expr_compare_type() > 0.
      Therefore, the distinction between 0 and -1 is unnecessary.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      cd909521
    • Masahiro Yamada's avatar
      kconfig: add -e and -u options to *conf-cfg.sh scripts · e570ef43
      Masahiro Yamada authored
      Set -e to make these scripts fail on the first error.
      
      Set -u because these scripts are invoked by Makefile, and do not work
      properly without necessary variables defined.
      
      Both options are described in POSIX. [1]
      
      [1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.htmlSigned-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      e570ef43
    • Masahiro Yamada's avatar
      kbuild: merge temporary vmlinux for BTF and kallsyms · b1a9a5e0
      Masahiro Yamada authored
      CONFIG_DEBUG_INFO_BTF=y requires one additional link step.
      (.tmp_vmlinux.btf)
      
      CONFIG_KALLSYMS=y requires two additional link steps.
      (.tmp_vmlinux.kallsyms1 and .tmp_vmlinux.kallsyms2)
      
      Enabling both requires three additional link steps.
      
      When CONFIG_DEBUG_INFO_BTF=y and CONFIG_KALLSYMS=y, the current build
      process is as follows:
      
          KSYMS   .tmp_vmlinux.kallsyms0.S
          AS      .tmp_vmlinux.kallsyms0.o
          LD      .tmp_vmlinux.btf             # temporary vmlinux for BTF
          BTF     .btf.vmlinux.bin.o
          LD      .tmp_vmlinux.kallsyms1       # temporary vmlinux for kallsyms step 1
          NM      .tmp_vmlinux.kallsyms1.syms
          KSYMS   .tmp_vmlinux.kallsyms1.S
          AS      .tmp_vmlinux.kallsyms1.o
          LD      .tmp_vmlinux.kallsyms2       # temporary vmlinux for kallsyms step 2
          NM      .tmp_vmlinux.kallsyms2.syms
          KSYMS   .tmp_vmlinux.kallsyms2.S
          AS      .tmp_vmlinux.kallsyms2.o
          LD      vmlinux                      # final vmlinux
      
      This is redundant because the BTF generation and the kallsyms step 1 can
      be performed against the same temporary vmlinux.
      
      When both CONFIG_DEBUG_INFO_BTF and CONFIG_KALLSYMS are enabled, we can
      reduce the number of link steps by one.
      
      This commit changes the build process as follows:
      
          KSYMS   .tmp_vmlinux0.kallsyms.S
          AS      .tmp_vmlinux0.kallsyms.o
          LD      .tmp_vmlinux1                # temporary vmlinux for BTF and kallsyms step 1
          BTF     .tmp_vmlinux1.btf.o
          NM      .tmp_vmlinux1.syms
          KSYMS   .tmp_vmlinux1.kallsyms.S
          AS      .tmp_vmlinux1.kallsyms.o
          LD      .tmp_vmlinux2                # temporary vmlinux for kallsyms step 2
          NM      .tmp_vmlinux2.syms
          KSYMS   .tmp_vmlinux2.kallsyms.S
          AS      .tmp_vmlinux2.kallsyms.o
          LD      vmlinux                      # final vmlinux
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      b1a9a5e0
    • Masahiro Yamada's avatar
      kbuild: remove PROVIDE() for kallsyms symbols · c442db3f
      Masahiro Yamada authored
      This reimplements commit 951bcae6 ("kallsyms: Avoid weak references
      for kallsyms symbols") because I am not a big fan of PROVIDE().
      
      As an alternative solution, this commit prepends one more kallsyms step.
      
          KSYMS   .tmp_vmlinux.kallsyms0.S          # added
          AS      .tmp_vmlinux.kallsyms0.o          # added
          LD      .tmp_vmlinux.btf
          BTF     .btf.vmlinux.bin.o
          LD      .tmp_vmlinux.kallsyms1
          NM      .tmp_vmlinux.kallsyms1.syms
          KSYMS   .tmp_vmlinux.kallsyms1.S
          AS      .tmp_vmlinux.kallsyms1.o
          LD      .tmp_vmlinux.kallsyms2
          NM      .tmp_vmlinux.kallsyms2.syms
          KSYMS   .tmp_vmlinux.kallsyms2.S
          AS      .tmp_vmlinux.kallsyms2.o
          LD      vmlinux
      
      Step 0 takes /dev/null as input, and generates .tmp_vmlinux.kallsyms0.o,
      which has a valid kallsyms format with the empty symbol list, and can be
      linked to vmlinux. Since it is really small, the added compile-time cost
      is negligible.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      c442db3f
    • Masahiro Yamada's avatar
      kbuild: refactor variables in scripts/link-vmlinux.sh · ddf41329
      Masahiro Yamada authored
      Clean up the variables in scripts/link-vmlinux.sh
      
       - Specify the extra objects directly in vmlinux_link()
       - Move the AS rule to kallsyms()
       - Set kallsymso and btf_vmlinux_bin_o where they are generated
       - Remove unneeded variable, kallsymso_prev
       - Introduce the btf_data variable
       - Introduce the strip_debug flag instead of checking the output name
      
      No functional change intended.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      ddf41329
    • Masahiro Yamada's avatar
      kconfig: refactor conf_write_defconfig() to reduce indentation level · 995150e4
      Masahiro Yamada authored
      Reduce the indentation level by continue'ing the loop earlier
      if (!sym || sym_is_choice(sym)).
      
      No functional change intended.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      995150e4
    • Masahiro Yamada's avatar
      kconfig: refactor conf_set_all_new_symbols() to reduce indentation level · 826ee96d
      Masahiro Yamada authored
      The outer switch statement can be avoided by continue'ing earlier the
      loop when the symbol type is neither S_BOOLEAN nor S_TRISTATE.
      
      Remove it to reduce the indentation level by one. In addition, avoid
      the repetition of sym->def[S_DEF_USER].tri.
      
      No functional change intended.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      826ee96d
    • Masahiro Yamada's avatar
      kconfig: remove tristate choice support · fde19251
      Masahiro Yamada authored
      I previously submitted a fix for a bug in the choice feature [1], where
      I mentioned, "Another (much cleaner) approach would be to remove the
      tristate choice support entirely".
      
      There are more issues in the tristate choice feature. For example, you
      can observe a couple of bugs in the following test code.
      
      [Test Code]
      
          config MODULES
                  def_bool y
                  modules
      
          choice
                  prompt "tristate choice"
                  default A
      
          config A
                  tristate "A"
      
          config B
                  tristate "B"
      
          endchoice
      
      Bug 1: the 'default' property is not correctly processed
      
      'make alldefconfig' produces:
      
          CONFIG_MODULES=y
          # CONFIG_A is not set
          # CONFIG_B is not set
      
      However, the correct output should be:
      
          CONFIG_MODULES=y
          CONFIG_A=y
          # CONFIG_B is not set
      
      The unit test file, scripts/kconfig/tests/choice/alldef_expected_config,
      is wrong as well.
      
      Bug 2: choice members never get 'y' with randconfig
      
      For the test code above, the following combinations are possible:
      
                     A    B
              (1)    y    n
              (2)    n    y
              (3)    m    m
              (4)    m    n
              (5)    n    m
              (6)    n    n
      
      'make randconfig' never produces (1) or (2).
      
      These bugs are fixable, but a more critical problem is the lack of a
      sensible syntax to specify the default for the tristate choice.
      The default for the choice must be one of the choice members, which
      cannot specify any of the patterns (3) through (6) above.
      
      In addition, I have never seen it being used in a useful way.
      
      The following commits removed unnecessary use of tristate choices:
      
       - df8df5e4 ("usb: get rid of 'choice' for legacy gadget drivers")
       - bfb57ef0 ("rapidio: remove choice for enumeration")
      
      This commit removes the tristate choice support entirely, which allows
      me to delete a lot of code, making further refactoring easier.
      
      Note:
      This includes the revert of commit fa64e5f6 ("kconfig/symbol.c:
      handle choice_values that depend on 'm' symbols"). It was suspicious
      because it did not address the root cause but introduced inconsistency
      in visibility between choice members and other symbols.
      
      [1]: https://lore.kernel.org/linux-kbuild/20240427104231.2728905-1-masahiroy@kernel.org/T/#m0a1bb6992581462ceca861b409bb33cb8fd7dbaeSigned-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      fde19251
    • Masahiro Yamada's avatar
      kconfig: pass new conf_changed value to the callback · 03638aaa
      Masahiro Yamada authored
      Commit ee06a3ef ("kconfig: Update config changed flag before calling
      callback") pointed out that conf_updated flag must be updated _before_
      calling the callback, which needs to know the new value.
      
      Given that, it makes sense to directly pass the new value to the
      callback.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      03638aaa
    • Masahiro Yamada's avatar
      kconfig: gconf: move conf_changed() definition up · 0b62fe46
      Masahiro Yamada authored
      Define conf_changed() before its call site to remove the forward
      declaration.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      0b62fe46
    • Masahiro Yamada's avatar
      kconfig: gconf: remove unnecessary forward declarations · 300bf53e
      Masahiro Yamada authored
      These are defined before their call sites.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      300bf53e
    • Masahiro Yamada's avatar
      kconfig: qconf: remove initial call to conf_changed() · 060e05c3
      Masahiro Yamada authored
      If any CONFIG option is changed while loading the .config file,
      conf_read() calls conf_set_changed(true) and then the conf_changed()
      callback.
      
      With conf_read() moved after window initialization, the explicit
      conf_changed() call can be removed.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      060e05c3
    • Masahiro Yamada's avatar
      initramfs: shorten cmd_initfs in usr/Makefile · fb3f7f0f
      Masahiro Yamada authored
      Avoid repetition of long variables.
      
      No functional change intended.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
      fb3f7f0f
  2. 07 Jul, 2024 3 commits
    • Linus Torvalds's avatar
      Linux 6.10-rc7 · 256abd8e
      Linus Torvalds authored
      256abd8e
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 5a4bd506
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A set of clk fixes for the Qualcomm, Mediatek, and Allwinner drivers:
      
         - Fix the Qualcomm Stromer Plus PLL set_rate() clk_op to explicitly
           set the alpha enable bit and not set bits that don't exist
      
         - Mark Qualcomm IPQ9574 crypto clks as voted to avoid stuck clk
           warnings
      
         - Fix the parent of some PLLs on Qualcomm sm6530 so their rate is
           correct
      
         - Fix the min/max rate clamping logic in the Allwinner driver that
           got broken in v6.9
      
         - Limit runtime PM enabling in the Mediatek driver to only
           mt8183-mfgcfg so that system wide resume doesn't break on other
           Mediatek SoCs"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: mediatek: mt8183: Only enable runtime PM on mt8183-mfgcfg
        clk: sunxi-ng: common: Don't call hw_to_ccu_common on hw without common
        clk: qcom: gcc-ipq9574: Add BRANCH_HALT_VOTED flag
        clk: qcom: apss-ipq-pll: remove 'config_ctl_hi_val' from Stromer pll configs
        clk: qcom: clk-alpha-pll: set ALPHA_EN bit for Stromer Plus PLLs
        clk: qcom: gcc-sm6350: Fix gpll6* & gpll7 parents
      5a4bd506
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · c6653f49
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix unnecessary copy to 0 when kernel is booted at address 0
      
       - Fix usercopy crash when dumping dtl via debugfs
      
       - Avoid possible crash when PCI hotplug races with error handling
      
       - Fix kexec crash caused by scv being disabled before other CPUs
         call-in
      
       - Fix powerpc selftests build with USERCFLAGS set
      
      Thanks to Anjali K, Ganesh Goudar, Gautam Menghani, Jinglin Wen,
      Nicholas Piggin, Sourabh Jain, Srikar Dronamraju, and Vishal Chourasia.
      
      * tag 'powerpc-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Fix build with USERCFLAGS set
        powerpc/pseries: Fix scv instruction crash with kexec
        powerpc/eeh: avoid possible crash when edev->pdev changes
        powerpc/pseries: Whitelist dtl slub object for copying to userspace
        powerpc/64s: Fix unnecessary copy to 0 when kernel is booted at address 0
      c6653f49
  3. 06 Jul, 2024 3 commits
    • Linus Torvalds's avatar
      Merge tag '6.10-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6 · 256fdd4b
      Linus Torvalds authored
      Pull smb client fix from Steve French:
       "Fix for smb3 readahead performance regression"
      
      * tag '6.10-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix read-performance regression by dropping readahead expansion
      256fdd4b
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 22f902df
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "An i2c driver fix"
      
      * tag 'i2c-for-6.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr
      22f902df
    • Michael Ellerman's avatar
      selftests/powerpc: Fix build with USERCFLAGS set · 8b7f59de
      Michael Ellerman authored
      Currently building the powerpc selftests with USERCFLAGS set to anything
      causes the build to break:
      
        $ make -C tools/testing/selftests/powerpc V=1 USERCFLAGS=-Wno-error
        ...
        gcc -Wno-error    cache_shape.c ...
        cache_shape.c:18:10: fatal error: utils.h: No such file or directory
           18 | #include "utils.h"
              |          ^~~~~~~~~
        compilation terminated.
      
      This happens because the USERCFLAGS are added to CFLAGS in lib.mk, which
      causes the check of CFLAGS in powerpc/flags.mk to skip setting CFLAGS at
      all, resulting in none of the usual CFLAGS being passed. That can
      be seen in the output above, the only flag passed to the compiler is
      -Wno-error.
      
      Fix it by dropping the conditional setting of CFLAGS in flags.mk.
      Instead always set CFLAGS, but also append USERCFLAGS if they are set.
      
      Note that appending to CFLAGS (with +=) wouldn't work, because flags.mk
      is included by multiple Makefiles (to support partial builds), causing
      CFLAGS to be appended to multiple times. Additionally that would place
      the USERCFLAGS prior to the standard CFLAGS, meaning the USERCFLAGS
      couldn't override the standard flags. Being able to override the
      standard flags is desirable, for example for adding -Wno-error.
      
      With the fix in place, the CFLAGS are set correctly, including the
      USERCFLAGS:
      
        $ make -C tools/testing/selftests/powerpc V=1 USERCFLAGS=-Wno-error
        ...
        gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"v6.10-rc2-7-gdea17e7e56c3"'
        -I/home/michael/linux/tools/testing/selftests/powerpc/include -Wno-error
        cache_shape.c ...
      
      Fixes: 5553a793 ("selftests/powerpc: Add flags.mk to support pmu buildable")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://msgid.link/20240706120833.909853-1-mpe@ellerman.id.au
      8b7f59de
  4. 05 Jul, 2024 9 commits