[PATCH v7 057/120] dmaengine: ioatdma: Remove custom UP local APID IC code

"Ahmed S. Darwish" <[email protected]> Thu, 28 May 2026 17:38:19 +0200
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Since

  commit b4033c1715cb ("[PATCH] PCI: Change MSI to use physical delivery mode always")

and a cpu_physical_id() implementation exists for UP kernels.

Replace the driver's private UP APIC ID implementation with the kernel's
generic cpu_physical_id() helper.  This also avoids a direct CPUID query.

Signed-off-by: Ahmed S. Darwish <[email protected]>
---
 drivers/dma/ioat/dca.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
index 5d3c0ae6b342..07c977bef5f8 100644
--- a/drivers/dma/ioat/dca.c
+++ b/drivers/dma/ioat/dca.c
@@ -11,13 +11,9 @@
 #include <linux/dca.h>
 
 #include <asm/cpuid/api.h>
-
-/* either a kernel change is needed, or we need something like this in kernel */
-#ifndef CONFIG_SMP
+#include <asm/mpspec.h>
+#include <asm/cpu.h>
 #include <asm/smp.h>
-#undef cpu_physical_id
-#define cpu_physical_id(cpu) (cpuid_ebx(1) >> 24)
-#endif
 
 #include "dma.h"
 #include "registers.h"
-- 
2.54.0