Skip to content

[6.6] Add support for Hygon family 18h model 18h#1629

Merged
opsiff merged 11 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-hygon-m18h
Apr 16, 2026
Merged

[6.6] Add support for Hygon family 18h model 18h#1629
opsiff merged 11 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-hygon-m18h

Conversation

@opsiff
Copy link
Copy Markdown
Member

@opsiff opsiff commented Apr 15, 2026

Link: https://gitcode.com/deepin-community/kernel/pull/15

Summary by Sourcery

Add kernel support for Hygon family 18h model 0x18 processors across memory controller, uncore, IOMMU, MMC/SD, audio, thermal, SPI, and PCI ID handling.

New Features:

  • Handle UMC base address selection for additional Hygon family 18h models, including model 0x18, in the AMD64 EDAC driver.
  • Recognize Hygon family 18h model 0x18 in uncore performance monitoring and IOAPIC/IOMMU setup logic.
  • Add PCI and ACPI identifiers for Hygon family 18h model 0x18 devices to northbridge, SDHCI, HDA audio, hwmon, and SPI drivers so they bind correctly.

Enhancements:

  • Refine family 18h per-model initialization to name and configure the new Hygon model 0x18 memory controller separately from other variants.

commit 41369fd13d4c2193c8ecb92a8072b705e38aabac anolis

ANBZ: #30343

Replaces a chain of if-else statements with a switch statement for
handling Hygon family 18h models processors.

Hygon-SIG: commit none hygon anolis: EDAC/amd64: Convert Hygon family 18h model checks to switch-case
Hygon-SIG: commit 41369fd13d4c anolis anolis: EDAC/amd64: Convert Hygon family 18h model checks to switch-case
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by: Xiaochen Shen <shenxiaochen@hygon.cn>
Reviewed-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6454
[ YuntongJin : amend commit log ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit eb162a81e5007122e42bab182a9807dbe34fc029 anolis.

ANBZ: #30343

Add Hygon family 18h model 18h processor support for amd64_edac. For Hygon
family 18h model 0x18h-0x1fh processors, the UMC base are identical, so
modify them uniformly.

Meanwhile, code for Hygon UMC base calculations has been moved to a
dedicated function.

Hygon-SIG: commit none hygon anolis: EDAC/amd64: Add support for Hygon family 18h model 18h

Hygon-SIG: commit eb162a81e500 anolis anolis: EDAC/amd64: Add support for Hygon family 18h model 18h
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by: Xiaochen Shen <shenxiaochen@hygon.cn>
Reviewed-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6454
[ YuntongJin : amend commit log, fix conflict  ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
…to 1 for Hygon family 18h model 18h

commit 301061b5a9bf685af46b38f3ec512ae690d22f9e  anolis.

ANBZ: #31970

Adjust max_mcs for Hygon Family 18h Model 18h processors to reflect the
correct number of memory controllers per node. Set to 1 as this CPU model
hasa single memory controller per node.

Hygon-SIG: commit none hygon anolis: EDAC/amd64: Adjust the maximum number
of memory controllers per node to 1 for Hygon family 18h model 18h

Hygon-SIG: commit 301061b5a9bf anolis anolis: EDAC/amd64: Adjust the maximum number
of memory controllers per node to 1 for Hygon family 18h model 18h
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by: Xiaochen Shen <shenxiaochen@hygon.cn>
Reviewed-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
Reviewed-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6671
[ YuntongJin : amend commit log,fix conflict ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit f8f6147fddc76fe44c4ca6a82241b5772afc0860 anolis.

ANBZ: #30096

Add the new PCI ID 0x1d94 0x2007 for Hygon family 18h model 18h
HDA controller.

Hygon-SIG: commit none hygon anolis: ALSA: hda: Add support for Hygon family 18h model 18h HD-Audio

Hygon-SIG: commit f8f6147fddc7 anolis anolis: ALSA: hda: Add support for Hygon family 18h model 18h HD-Audio
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Xiaochen Shen <shenxiaochen@hygon.cn>
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6459
[ YuntongJin : amend commit log and add PCI_DEVICE_ID_HYGON_18H_M18H_HDA
in pci_ids.h ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit 903e3d7834e2c901fe6371d79d45493c9ca23f9a anolis.

ANBZ: #30093

Add the PCI device IDs for Hygon family 18h model 18h processors.

Hygon-SIG: commit none hygon anolis: x86/amd_nb: Add Hygon family 18h model 18h PCI IDs

Hygon-SIG: commit 903e3d7834e2 anolis anolis: x86/amd_nb: Add Hygon family 18h model 18h PCI IDs
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6456
[ YuntongJin : amend commit log ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit 017d6e72deb966de1cbc6b608f1386a07f26ae2d anolis.

ANBZ: #30094

Add 18H_M18H DF F3 device ID to get the temperature for Hygon
family 18h model 18h processor.

Hygon-SIG: commit none hygon anolis: hwmon/k10temp: Add support for Hygon family 18h model 18h

Hygon-SIG: commit 017d6e72deb9 anolis anolis: hwmon/k10temp: Add support for Hygon family 18h model 18h
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by Xiaochen Shen <shenxiaochen@hygon.cn>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6457
[ YuntongJin: amend commit log ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit ec8b426005d02f1cff53e599d9a5aa1f7a85f920 anolis.

ANBZ: #30095

The SB IOAPIC for Hygon family 18h model 18h processors is also on
the device 0xb.

Hygon-SIG: commit none hygon anolis: iommu/hygon: Add support for Hygon family 18h model 18h IOAPIC

Hygon-SIG: commit ec8b426005d0 anolis anolis: iommu/hygon: Add support for Hygon family 18h model 18h IOAPIC
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6458
[ YuntongJin : amend commit log ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit 42c9284c729ea71b3d363c8c4160b796b738c9f7 anolis.

ANBZ: #30151

Add HID HYGO0040 to support Hygon eMMC controller.

Hygon-SIG: commit none hygon anolis: mmc: sdhci-acpi: Add device HID for Hygon eMMC controller

Hygon-SIG: commit 42c9284c729e anolis anolis: mmc: sdhci-acpi: Add device HID for Hygon eMMC controller
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6462
[ YuntongJin : amend commit log,fix conflict ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit 40cf687b108d607faea96aa28265a77d7b9aa38a anolis.

ANBZ: #30151

Add PCI ID for Hygon SD controller.

Hygon-SIG: commit none hygon anolis: mmc: sdhci-pci: Add support for Hygon SD controller

Hygon-SIG: commit 40cf687b108d anolis anolis: mmc: sdhci-pci: Add support for Hygon SD controller
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6465
[ YuntongJin: amend commit log and fix conflict ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit 4bf4507e1cf3c59031c12d2b7c5e93043dd11c69 anolis.

ANBZ: #30152

Add HID HYGO0062 to support Hygon SPI controller.

Hygon-SIG: commit none hygon anolis: spi: dw: Add device HID for Hygon
SPI controller

Hygon-SIG: commit 4bf4507e1cf3 anolis anolis: spi: dw: Add device HID for Hygon SPI controller
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6463
[ YuntongJin : amend commit log, fix conflict ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
commit dbab1265fda0034466e3d7b1d7c4e1877fbf84d2 anolis.

ANBZ: #30150

Adjust the DF PMU event and umask for Hygon family 18h model 18h processor.

Hygon-SIG: commit none hygon anolis: perf/x86/uncore: Add DF PMU support for Hygon family 18h model 18h

Hygon-SIG: commit dbab1265fda0 anolis anolis: perf/x86/uncore: Add DF PMU support for Hygon family 18h model 18h
Backport from anolis to support Hygon family 18h model 18h

Signed-off-by: Liao Xuan <liaoxuan@hygon.cn>
Cc: hygon-arch@list.openanolis.cn
Reviewed-by Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/6464
[ YuntongJin: amend commit log, fix conflict ]
Signed-off-by: YuntongJin <jinyuntong@hygon.cn>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 15, 2026

Reviewer's Guide

Adds Hygon family 18h model 0x18 support across EDAC, uncore perf, Northbridge, IOMMU, MMC/SDHCI, HDA audio, hwmon k10temp, PCI IDs, and SPI drivers, refactoring Hygon UMC base handling and wiring in new PCI/ACPI IDs so the new CPU/model is correctly detected and configured.

Sequence diagram for PCI-based driver initialization on Hygon F18h M18h

sequenceDiagram
  actor Firmware
  participant PCI_Core
  participant amd_nb as amd_nb_driver
  participant hda as hda_intel_driver
  participant hwmon as k10temp_driver
  participant sdhci_pci as sdhci_pci_core_driver

  Firmware->>PCI_Core: Enumerate PCI bus

  PCI_Core->>amd_nb: Probe HYGON_18H_M18H_ROOT
  amd_nb-->>PCI_Core: Device matched (hygon_root_ids)

  PCI_Core->>amd_nb: Probe HYGON_18H_M18H_DF_F4
  amd_nb-->>PCI_Core: Device matched (hygon_nb_link_ids)

  PCI_Core->>hwmon: Probe HYGON_18H_M18H_DF_F3
  hwmon-->>PCI_Core: Device matched (k10temp_id_table)

  PCI_Core->>hda: Probe HYGON_18H_M18H_HDA
  hda-->>PCI_Core: Device matched (azx_ids)

  PCI_Core->>sdhci_pci: Probe HYGON SYSTEM_SDHCI class
  sdhci_pci-->>PCI_Core: Device matched (pci_ids)
Loading

File-Level Changes

Change Details Files
Refactor Hygon UMC base address handling and add model 0x18 support in AMD64 EDAC driver.
  • Introduce get_umc_base_f18h_m18h and hygon_get_umc_base helper that selects appropriate base depending on Hygon family 18h model and falls back to generic handling
  • Use hygon_get_umc_base when vendor is HYGON in umc_read_base_mask and umc_read_mc_regs instead of only checking f18h_m4h
  • Extend per_family_init family 0x18 case to a switch over model, add explicit handling and ctl_name/max_mcs for model 0x18, and keep a sensible default ctl_name
drivers/edac/amd64_edac.c
Extend Hygon family 18h model support ranges for uncore, IOMMU, and temperature monitoring.
  • Broaden umask format selection for AMD uncore events to treat models 0x6 through 0x18 uniformly for umask12f18h
  • Update AMD IOMMU IOAPIC information check to accept Hygon family 18h models up to 0x18
  • Register Hygon 18h model 0x18 DF function 3 in k10temp PCI ID table so temps are exposed
arch/x86/events/amd/uncore.c
drivers/iommu/amd/init.c
drivers/hwmon/k10temp.c
Wire up new PCI IDs for Hygon 18h model 0x18 northbridge, DF functions, and HDA audio, and use them in relevant subsystems.
  • Define new PCI_DEVICE_ID_HYGON_18H_M18H_* constants for ROOT, DF_F3, DF_F4, and HDA in pci_ids.h and amd_nb.c
  • Add the new root and DF IDs to the Hygon northbridge root/misc/link PCI ID tables so topology discovery works
  • Extend azx_ids in hda_intel to recognize the new HDA ID and apply HYGON driver flags
arch/x86/kernel/amd_nb.c
include/linux/pci_ids.h
sound/pci/hda/hda_intel.c
Add Hygon-specific IDs for MMC/SDHCI and SPI controllers to reuse existing AMD paths.
  • Teach sdhci-acpi to recognize HYGO0040 ACPI UID as using the amd_emmc slot configuration and add it to the ACPI ID table
  • Allow SDHCI PCI core to bind HYGON SYSTEM_SDHCI class devices using the amd host ops
  • Register HYGO0062 ACPI ID in dw_spi_mmio and map it to dw_spi_hssi_init so the Hygon SPI controller uses the HSSI init path
drivers/mmc/host/sdhci-acpi.c
drivers/mmc/host/sdhci-pci-core.c
drivers/spi/spi-dw-mmio.c

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

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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 left some high level feedback:

  • In hygon_get_umc_base() the new block uses space-based indentation instead of tabs, which is inconsistent with the surrounding kernel coding style and should be adjusted.
  • The new Hygon HDA entry in azx_ids uses PCI_DEVICE while the neighboring Hygon entries use PCI_VDEVICE(HYGON, ...); consider switching to PCI_VDEVICE for consistency with the rest of the table.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `hygon_get_umc_base()` the new block uses space-based indentation instead of tabs, which is inconsistent with the surrounding kernel coding style and should be adjusted.
- The new Hygon HDA entry in `azx_ids` uses `PCI_DEVICE` while the neighboring Hygon entries use `PCI_VDEVICE(HYGON, ...)`; consider switching to `PCI_VDEVICE` for consistency with the rest of the table.

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 kernel device- and model-specific handling so Hygon family 0x18 model 0x18 systems bind the right drivers and use correct per-model register/MMIO layouts (EDAC UMC base selection, uncore perf formats, IOAPIC/IOMMU quirks, and PCI/ACPI IDs).

Changes:

  • Extend multiple PCI/ACPI match tables to recognize Hygon F18h M18h devices (HDA, SDHCI, SPI, hwmon).
  • Update AMD IOMMU IOAPIC detection logic to include Hygon model 0x18.
  • Refine AMD64 EDAC Hygon UMC base selection and add per-model naming for F18h M18h; broaden Hygon uncore format selection to include model 0x18.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sound/pci/hda/hda_intel.c Add PCI ID match for Hygon F18h M18h HD-audio controller.
include/linux/pci_ids.h Introduce new Hygon PCI device IDs for M18h (HDA + DF F3).
drivers/spi/spi-dw-mmio.c Add ACPI HID to bind DW SPI MMIO to Hygon platforms.
drivers/mmc/host/sdhci-pci-core.c Add Hygon vendor-class match for SDHCI using existing AMD handler.
drivers/mmc/host/sdhci-acpi.c Add Hygon ACPI HID to reuse AMD eMMC slot handling.
drivers/iommu/amd/init.c Extend Hygon model range for SB IOAPIC detection.
drivers/hwmon/k10temp.c Add DF F3 PCI ID match for Hygon F18h M18h temperature driver binding.
drivers/edac/amd64_edac.c Add Hygon UMC base selection helper for newer models; add F18h M18h per-model EDAC naming.
arch/x86/kernel/amd_nb.c Add northbridge/root/DF IDs for Hygon F18h M18h enumeration.
arch/x86/events/amd/uncore.c Extend Hygon F18h uncore DF umask format selection to include model 0x18.

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

Comment thread arch/x86/kernel/amd_nb.c
Comment on lines 48 to 56
#define PCI_DEVICE_ID_HYGON_18H_M05H_ROOT 0x14a0
#define PCI_DEVICE_ID_HYGON_18H_M10H_ROOT 0x14c0
#define PCI_DEVICE_ID_HYGON_18H_M18H_ROOT 0x2000
#define PCI_DEVICE_ID_HYGON_18H_M04H_DF_F1 0x1491
#define PCI_DEVICE_ID_HYGON_18H_M05H_DF_F1 0x14b1
#define PCI_DEVICE_ID_HYGON_18H_M05H_DF_F4 0x14b4
#define PCI_DEVICE_ID_HYGON_18H_M10H_DF_F4 0x14d4
#define PCI_DEVICE_ID_HYGON_18H_M18H_DF_F4 0x2014
#define PCI_DEVICE_ID_HYGON_18H_M06H_DF_F5 0x14b5
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

These new #define lines introduce stray whitespace before the tab/value alignment (visible trailing spaces). Please align with surrounding defines using a single tab after the macro name and avoid trailing spaces so checkpatch/style tools don't flag it.

Copilot uses AI. Check for mistakes.
Comment thread drivers/iommu/amd/init.c
Comment on lines 3054 to 3058
(boot_cpu_data.x86_vendor == X86_VENDOR_HYGON &&
boot_cpu_data.x86 == 0x18 &&
boot_cpu_data.x86_model >= 0x4 &&
boot_cpu_data.x86_model <= 0x10 &&
boot_cpu_data.x86_model <= 0x18 &&
devid == IOAPIC_SB_DEVID_FAM18H_M4H)) {
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The condition now applies the IOAPIC_SB_DEVID_FAM18H_M4H workaround up to model 0x18, but the surrounding comment/identifier still says it's specific to model 4h. Please update the comment (and/or the constant name) so the code and documentation match the broadened model range.

Copilot uses AI. Check for mistakes.
Comment thread drivers/edac/amd64_edac.c
Comment on lines +117 to +130
u32 umc_base;

if (hygon_f18h_m4h())
umc_base = get_umc_base_f18h_m4h(pvt->mc_node_id, channel);
/*
* For Hygon family 18h model 0x18h-0x1fh processors, the UMC base
* are identical.
*/
else if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18)
umc_base = get_umc_base_f18h_m18h(channel);
else
umc_base = get_umc_base(channel);

return umc_base;
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

New hygon_get_umc_base() block uses space indentation instead of kernel-style tabs, and the comment has grammar issues ("UMC base are"). Also, the new Hygon UMC base selection is only wired into umc_read_base_mask()/umc_read_mc_regs(); umc_dump_misc_regs() still uses the old m4h-only special case and would read wrong registers on F18h M18h (and any other Hygon models that need a non-default base). Consider switching umc_dump_misc_regs() to use the same helper so all UMC register reads stay consistent.

Suggested change
u32 umc_base;
if (hygon_f18h_m4h())
umc_base = get_umc_base_f18h_m4h(pvt->mc_node_id, channel);
/*
* For Hygon family 18h model 0x18h-0x1fh processors, the UMC base
* are identical.
*/
else if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18)
umc_base = get_umc_base_f18h_m18h(channel);
else
umc_base = get_umc_base(channel);
return umc_base;
if (hygon_f18h_m4h())
return get_umc_base_f18h_m4h(pvt->mc_node_id, channel);
/*
* For Hygon family 18h model 0x18-0x1f processors, the UMC base
* addresses are identical.
*/
if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18)
return get_umc_base_f18h_m18h(channel);
return get_umc_base(channel);

Copilot uses AI. Check for mistakes.
@opsiff opsiff merged commit c29712b into deepin-community:linux-6.6.y Apr 16, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants