Skip to content

Commit b00d416

Browse files
committed
Revert "iommu/amd: Skip enabling command/event buffers for kdump"
This reverts commit 3344716 which is commit 9be15fb upstream. This causes problems in older kernel trees as SNP host kdump is not supported in them, so drop it from the stable branches. Reported-by: Ashish Kalra <ashish.kalra@amd.com> Link: https://lore.kernel.org/r/dacdff7f-0606-4ed5-b056-2de564404d51@amd.com Cc: Vasant Hegde <vasant.hegde@amd.com> Cc: Sairaj Kodilkar <sarunkod@amd.com> Cc: Joerg Roedel <joerg.roedel@amd.com> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 69f542a commit b00d416

1 file changed

Lines changed: 9 additions & 19 deletions

File tree

drivers/iommu/amd/init.c

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -816,16 +816,11 @@ static void iommu_enable_command_buffer(struct amd_iommu *iommu)
816816

817817
BUG_ON(iommu->cmd_buf == NULL);
818818

819-
if (!is_kdump_kernel()) {
820-
/*
821-
* Command buffer is re-used for kdump kernel and setting
822-
* of MMIO register is not required.
823-
*/
824-
entry = iommu_virt_to_phys(iommu->cmd_buf);
825-
entry |= MMIO_CMD_SIZE_512;
826-
memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
827-
&entry, sizeof(entry));
828-
}
819+
entry = iommu_virt_to_phys(iommu->cmd_buf);
820+
entry |= MMIO_CMD_SIZE_512;
821+
822+
memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET,
823+
&entry, sizeof(entry));
829824

830825
amd_iommu_reset_cmd_buffer(iommu);
831826
}
@@ -874,15 +869,10 @@ static void iommu_enable_event_buffer(struct amd_iommu *iommu)
874869

875870
BUG_ON(iommu->evt_buf == NULL);
876871

877-
if (!is_kdump_kernel()) {
878-
/*
879-
* Event buffer is re-used for kdump kernel and setting
880-
* of MMIO register is not required.
881-
*/
882-
entry = iommu_virt_to_phys(iommu->evt_buf) | EVT_LEN_MASK;
883-
memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET,
884-
&entry, sizeof(entry));
885-
}
872+
entry = iommu_virt_to_phys(iommu->evt_buf) | EVT_LEN_MASK;
873+
874+
memcpy_toio(iommu->mmio_base + MMIO_EVT_BUF_OFFSET,
875+
&entry, sizeof(entry));
886876

887877
/* set head and tail to zero manually */
888878
writel(0x00, iommu->mmio_base + MMIO_EVT_HEAD_OFFSET);

0 commit comments

Comments
 (0)