Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] deepin: extra ci: add i386_defconfig#1623

Merged
opsiff merged 3 commits intodeepin-community:linux-6.6.yfrom
Avenger-285714:linux-6.6.y
Apr 22, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.6-y] deepin: extra ci: add i386_defconfig#1623
opsiff merged 3 commits intodeepin-community:linux-6.6.yfrom
Avenger-285714:linux-6.6.y

Conversation

@Avenger-285714
Copy link
Copy Markdown
Member

@Avenger-285714 Avenger-285714 commented Apr 14, 2026

  1. It seems our peers also check for build success under this configuration.

  2. At this moment, the code in the deepin linux-6.6.y branch indeed fails to build under that branch.

Summary by Sourcery

Extend extra kernel CI to cover i386_defconfig and fix related build issues.

Bug Fixes:

  • Guard sched_itmt_work_fn and sched_set_itmt with CONFIG_ACPI_CPPC_LIB to avoid build failures when CPPC support is disabled.
  • Fix HDA Intel diagnostic logging to use phys_addr formatting for the DIU framebuffer base address on 32-bit builds.

CI:

  • Update the extra kernel GitHub Actions workflow to build the kernel with i386_defconfig.

1. It seems our peers also check for build success under this
configuration.

2. At this moment, the code in the deepin linux-6.6.y branch indeed
fails to build under that branch.

Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 14, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Extends the kernel extra CI workflow to build the i386_defconfig configuration (GCC and Clang) and fixes 32‑bit build issues in ACPI cpufreq and HDA Intel driver code uncovered by this configuration.

Flow diagram for build-kernel-extra i386_defconfig jobs

flowchart LR
  Start["PR opened or updated"] --> Trigger["GitHub Actions triggers build-kernel-extra"]
  Trigger --> Matrix["Job matrix expands configurations"]

  Matrix -->|"x86_64_defconfig (existing)"| JobX86_64["Build job for x86_64_defconfig"]
  Matrix -->|"i386_defconfig + GCC (new)"| JobGCCi386["Build job gcc_i386_defconfig"]
  Matrix -->|"i386_defconfig + Clang (new)"| JobClangi386["Build job clang_i386_defconfig"]

  subgraph gcc_i386_defconfig
    JobGCCi386 --> CheckoutGCC["Checkout kernel source"]
    CheckoutGCC --> ConfigGCC["Configure kernel: i386_defconfig"]
    ConfigGCC --> BuildGCC["Build kernel with GCC"]
    BuildGCC --> TestGCC["Run basic build checks"]
    TestGCC --> ResultGCC["Upload logs and artifacts"]
  end

  subgraph clang_i386_defconfig
    JobClangi386 --> CheckoutClang["Checkout kernel source"]
    CheckoutClang --> ConfigClang["Configure kernel: i386_defconfig"]
    ConfigClang --> BuildClang["Build kernel with Clang"]
    BuildClang --> TestClang["Run basic build checks"]
    TestClang --> ResultClang["Upload logs and artifacts"]
  end

  JobX86_64 --> Done["All jobs complete; report status on PR"]
  ResultGCC --> Done
  ResultClang --> Done
Loading

File-Level Changes

Change Details Files
Guard ITMT-related helper functions with CONFIG_ACPI_CPPC_LIB to fix missing symbol/build issues on configurations without CPPC.
  • Move the CONFIG_ACPI_CPPC_LIB ifdef to also cover sched_itmt_work_fn and sched_set_itmt so these helpers are only compiled when CPPC support is enabled
  • Ensure ITMT-related code is excluded from i386_defconfig (and similar) builds that lack CONFIG_ACPI_CPPC_LIB
drivers/cpufreq/acpi-cpufreq.c
Fix format-string usage for printing physical addresses in the HDA Intel driver to be 32/64‑bit safe.
  • Replace %llx format with %pa and pass the address by reference when logging gf_hda DIU framebuffer base address
  • Avoid compiler warnings or errors related to incorrect printf format on 32‑bit builds
sound/pci/hda/hda_intel.c
Extend extra CI to build i386_defconfig with both GCC and Clang toolchains.
  • Add i386_defconfig to the build matrix or job list in the extra kernel CI workflow
  • Configure both GCC and Clang builds for the new configuration, mirroring existing patterns used for other defconfigs
.github/workflows/build-kernel-extra.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds extra CI coverage to validate that the Deepin 6.6-y kernel tree builds under i386_defconfig, aligning with peer CI expectations and helping surface existing 32-bit build regressions earlier.

Changes:

  • Add a GCC build step for i386_defconfig in the “build kernel extra” workflow.
  • Add a Clang build step for i386_defconfig in the same workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +33
make i386_defconfig
make -j$(nproc)
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This builds i386 and then later x86_64 (and other ARCH values) in the same source/output tree. Kbuild is not reliable when reusing the same output directory across different defconfigs/bitness/architectures; stale objects can lead to flaky failures or false passes. Use per-config out-of-tree build dirs (e.g., via O=/KBUILD_OUTPUT) or run a clean step (e.g., make mrproper) between architecture/bitness switches.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +39
make LLVM=-18 i386_defconfig
make LLVM=-18 -j$(nproc)
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clang i386 build reuses the artifacts from the preceding GCC i386 build in the same directory. Even if many objects rebuild, this can still mask clang-only build issues or cause confusing incremental-build behavior. Consider using a separate O= output dir for the clang pass (or cleaning before the clang build) so it is a true from-scratch clang build for this config.

Copilot uses AI. Check for mistakes.
The gf_init_pci() helper prints the DIU framebuffer base with "%llx"
while passing a phys_addr_t by value:

    dev_info(chip->card->dev,
             "gf_hda diu fb base=0x%llx, size=%dM.\n",
             diu_fb_base, (unsigned int)(fb_size >> 20));

phys_addr_t is a build-option dependent type: on 32-bit x86 without
CONFIG_PHYS_ADDR_T_64BIT (e.g. i386_defconfig) it resolves to
'unsigned int', while "%llx" expects 'unsigned long long'. Building
with clang exposes the mismatch as a hard error due to -Wformat being
promoted to -Werror:

    sound/pci/hda/hda_intel.c:426:72: error: format specifies type
      'unsigned long long' but the argument has type 'phys_addr_t'
      (aka 'unsigned int') [-Werror,-Wformat]
        dev_info(chip->card->dev,
                 "gf_hda diu fb base=0x%llx, size=%dM.\n",
                 diu_fb_base, ...);

Switch to the kernel's dedicated "%pa" specifier, which exists
precisely for this case.

[Per Documentation/core-api/printk-formats.rst:]

    %pa[p]  0x01234567 or 0x0123456789abcdef

    For printing a phys_addr_t type (and its derivatives, such as
    resource_size_t) which can vary based on build options, regardless
    of the width of the CPU data path.

    Passed by reference.

"%pa" is sizeof(phys_addr_t)-aware, emits the "0x" prefix itself and
works correctly on 32-bit, 32-bit+PAE and 64-bit configurations. The
literal "0x" prefix is therefore dropped, and diu_fb_base is passed
by reference as the specifier mandates.

Fixes: b7e8bf1 ("add gf hdaudio 001 patch in deepin kernel 6.6")
Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
sched_itmt_work_fn(), the sched_itmt_work work_struct and the
sched_set_itmt() helper are defined unconditionally, but their only
caller, core_set_itmt_prio(), sits inside #ifdef CONFIG_ACPI_CPPC_LIB.
On configs where CONFIG_ACPI_CPPC_LIB is not set (e.g. i386_defconfig),
these helpers become unreferenced static functions:

  drivers/cpufreq/acpi-cpufreq.c:638:13: error: unused function 'sched_set_itmt' [-Werror,-Wunused-function]
    638 | static void sched_set_itmt(void)
        |             ^~~~~~~~~~~~~~
  1 error generated.
  make[4]: *** [scripts/Makefile.build:243: drivers/cpufreq/acpi-cpufreq.o] Error 1

Move the three helpers into the existing #ifdef CONFIG_ACPI_CPPC_LIB
block so their definitions and the sole call site share the same
compilation condition.

No functional change.

Fixes: 86dc6a6 ("cpufreq: ACPI: add ITMT support when CPPC enabled")
Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
@Avenger-285714 Avenger-285714 marked this pull request as ready for review April 22, 2026 03:10
@Avenger-285714 Avenger-285714 changed the title [WIP] [Deepin-Kernel-SIG] [linux 6.6-y] [RFC] deepin: extra ci: add i386_defconfig [Deepin-Kernel-SIG] [linux 6.6-y] deepin: extra ci: add i386_defconfig Apr 22, 2026
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@opsiff opsiff merged commit 81ac630 into deepin-community:linux-6.6.y Apr 22, 2026
14 of 16 checks passed
@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: opsiff

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants