“81fc8dfa002728aa012cf4969fbf2e781a7d0ed3”上不存在“...security/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 de90ff82 编写于 作者: T Tianli Xiong 提交者: openeuler-sync-bot

PCI: Check if entry->offset already exist for mem resource

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP

--------------------------------

Fix patch "LoongArch: Add PCI controller support"
Signed-off-by: NTianli Xiong <xiongtianli@loongson.cn>
Change-Id: I796b1224d8990fed952643adac491228d6541696
(cherry picked from commit 4fcec201)
上级 c757e12a
...@@ -210,9 +210,11 @@ static int acpi_prepare_root_resources(struct acpi_pci_root_info *ci) ...@@ -210,9 +210,11 @@ static int acpi_prepare_root_resources(struct acpi_pci_root_info *ci)
if (status > 0) { if (status > 0) {
resource_list_for_each_entry_safe(entry, tmp, &ci->resources) { resource_list_for_each_entry_safe(entry, tmp, &ci->resources) {
if (entry->res->flags & IORESOURCE_MEM) { if (entry->res->flags & IORESOURCE_MEM) {
entry->offset = ci->root->mcfg_addr & GENMASK_ULL(63, 40); if(!entry->offset) {
entry->res->start |= entry->offset; entry->offset = ci->root->mcfg_addr & GENMASK_ULL(63, 40);
entry->res->end |= entry->offset; entry->res->start |= entry->offset;
entry->res->end |= entry->offset;
}
} }
} }
return status; return status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册