Hi,Greg,
-----原始邮件----- 发件人: "Greg Kroah-Hartman" gregkh@linuxfoundation.org 发送时间:2025-11-27 22:45:04 (星期四) 收件人: stable@vger.kernel.org 抄送: "Greg Kroah-Hartman" gregkh@linuxfoundation.org, patches@lists.linux.dev, "Jiaxun Yang" jiaxun.yang@flygoat.com, "Huacai Chen" chenhuacai@loongson.cn 主题: [PATCH 6.17 051/175] LoongArch: Dont panic if no valid cache info for PCI
Why Don't became Dont when backport this patch to stable branchs?
Huacai
6.17-stable review patch. If anyone has any objections, please let me know.
From: Huacai Chen chenhuacai@loongson.cn
commit a6b533adfc05ba15360631e019d3e18275080275 upstream.
If there is no valid cache info detected (may happen in virtual machine) for pci_dfl_cache_line_size, kernel shouldn't panic. Because in the PCI core it will be evaluated to (L1_CACHE_BYTES >> 2).
Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang jiaxun.yang@flygoat.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
arch/loongarch/pci/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
--- a/arch/loongarch/pci/pci.c +++ b/arch/loongarch/pci/pci.c @@ -50,11 +50,11 @@ static int __init pcibios_init(void) */ lsize = cpu_last_level_cache_line_size();
- BUG_ON(!lsize);
- if (lsize) {
pci_dfl_cache_line_size = lsize >> 2;
- pci_dfl_cache_line_size = lsize >> 2;
- pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize);
pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize);- }
return 0; }
本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it.