From: Joerg Roedel Date: Fri, 26 Sep 2025 08:03:33 +0000 (+0200) Subject: Merge branches 'apple/dart', 'ti/omap', 'riscv', 'intel/vt-d' and 'amd/amd-vi' into... X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5f4b8c03f41782f37d278946296d9443a7194153;p=users%2Fjedix%2Flinux-maple.git Merge branches 'apple/dart', 'ti/omap', 'riscv', 'intel/vt-d' and 'amd/amd-vi' into next --- 5f4b8c03f41782f37d278946296d9443a7194153 diff --cc MAINTAINERS index 520fb4e379a3,fe168477caa4,fe168477caa4,af562bb23bef,fed6cd812d79,fe168477caa4..bf140c0899a8 --- a/MAINTAINERS +++ b/MAINTAINERS @@@@@@@ -17482,8 -17451,6 -17451,6 -17452,6 -17478,7 -17451,6 +17483,8 @@@@@@@ F: drivers/net/ethernet/neterion NETFILTER M: Pablo Neira Ayuso M: Jozsef Kadlecsik +++ +M: Florian Westphal +++++R: Phil Sutter L: netfilter-devel@vger.kernel.org L: coreteam@netfilter.org S: Maintained diff --cc drivers/iommu/amd/init.c index ba9e582a8bbe,7b5af6176de9,7b5af6176de9,7b5af6176de9,8de689b2c5ed,186a567e6823..f2991c11867c --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@@@@@@ -942,8 -942,8 -942,8 -942,8 -942,8 -978,91 +978,91 @@@@@@@ err_out static int __init alloc_cwwb_sem(struct amd_iommu *iommu) { iommu->cmd_sem = iommu_alloc_4k_pages(iommu, GFP_KERNEL, 1); +++++ if (!iommu->cmd_sem) +++++ return -ENOMEM; +++++ iommu->cmd_sem_paddr = iommu_virt_to_phys((void *)iommu->cmd_sem); +++++ return 0; +++++ } +++++ +++++ static int __init remap_event_buffer(struct amd_iommu *iommu) +++++ { +++++ u64 paddr; +++++ +++++ pr_info_once("Re-using event buffer from the previous kernel\n"); +++++ paddr = readq(iommu->mmio_base + MMIO_EVT_BUF_OFFSET) & PM_ADDR_MASK; +++++ iommu->evt_buf = iommu_memremap(paddr, EVT_BUFFER_SIZE); +++++ +++++ return iommu->evt_buf ? 0 : -ENOMEM; +++++ } +++++ +++++ static int __init remap_command_buffer(struct amd_iommu *iommu) +++++ { +++++ u64 paddr; +++++ +++++ pr_info_once("Re-using command buffer from the previous kernel\n"); +++++ paddr = readq(iommu->mmio_base + MMIO_CMD_BUF_OFFSET) & PM_ADDR_MASK; +++++ iommu->cmd_buf = iommu_memremap(paddr, CMD_BUFFER_SIZE); +++++ +++++ return iommu->cmd_buf ? 0 : -ENOMEM; +++++ } +++++ +++++ static int __init remap_or_alloc_cwwb_sem(struct amd_iommu *iommu) +++++ { +++++ u64 paddr; +++++ +++++ if (check_feature(FEATURE_SNP)) { +++++ /* +++++ * When SNP is enabled, the exclusion base register is used for the +++++ * completion wait buffer (CWB) address. Read and re-use it. +++++ */ +++++ pr_info_once("Re-using CWB buffers from the previous kernel\n"); +++++ paddr = readq(iommu->mmio_base + MMIO_EXCL_BASE_OFFSET) & PM_ADDR_MASK; +++++ iommu->cmd_sem = iommu_memremap(paddr, PAGE_SIZE); +++++ if (!iommu->cmd_sem) +++++ return -ENOMEM; +++++ iommu->cmd_sem_paddr = paddr; +++++ } else { +++++ return alloc_cwwb_sem(iommu); +++++ } + + --- return iommu->cmd_sem ? 0 : -ENOMEM; +++++ return 0; +++++ } +++++ +++++ static int __init alloc_iommu_buffers(struct amd_iommu *iommu) +++++ { +++++ int ret; +++++ +++++ /* +++++ * Reuse/Remap the previous kernel's allocated completion wait +++++ * command and event buffers for kdump boot. +++++ */ +++++ if (is_kdump_kernel()) { +++++ ret = remap_or_alloc_cwwb_sem(iommu); +++++ if (ret) +++++ return ret; +++++ +++++ ret = remap_command_buffer(iommu); +++++ if (ret) +++++ return ret; ++++ - return iommu->cmd_sem ? 0 : -ENOMEM; +++++ ret = remap_event_buffer(iommu); +++++ if (ret) +++++ return ret; +++++ } else { +++++ ret = alloc_cwwb_sem(iommu); +++++ if (ret) +++++ return ret; ++++ - return iommu->cmd_sem ? 0 : -ENOMEM; +++++ ret = alloc_command_buffer(iommu); +++++ if (ret) +++++ return ret; +++++ +++++ ret = alloc_event_buffer(iommu); +++++ if (ret) +++++ return ret; +++++ } +++++ +++++ return 0; } static void __init free_cwwb_sem(struct amd_iommu *iommu) @@@@@@@ -1015,19 -1015,19 -1015,19 -1015,19 -1015,19 -1163,13 +1163,13 @@@@@@@ static bool __reuse_device_table(struc pr_err("The address of old device table is above 4G, not trustworthy!\n"); return false; } ----- old_devtb = (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT) && is_kdump_kernel()) ----- ? (__force void *)ioremap_encrypted(old_devtb_phys, ----- pci_seg->dev_table_size) ----- : memremap(old_devtb_phys, pci_seg->dev_table_size, MEMREMAP_WB); - - - - if (!old_devtb) - - return false; --- if (!old_devtb) --- return false; --- ----- pci_seg->old_dev_tbl_cpy = iommu_alloc_pages_sz( ----- GFP_KERNEL | GFP_DMA32, pci_seg->dev_table_size); +++++ /* +++++ * Re-use the previous kernel's device table for kdump. +++++ */ +++++ pci_seg->old_dev_tbl_cpy = iommu_memremap(old_devtb_phys, pci_seg->dev_table_size); if (pci_seg->old_dev_tbl_cpy == NULL) { ----- pr_err("Failed to allocate memory for copying old device table!\n"); ----- memunmap(old_devtb); +++++ pr_err("Failed to remap memory for reusing old device table!\n"); return false; }