Skip to content

Commit 855684c

Browse files
committed
Merge tag 'x86_tdx_for_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 tdx update from Dave Hansen: - Fix sparse warning from TDX use of movdir64b() * tag 'x86_tdx_for_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Remove the __iomem annotation of movdir64b()'s dst argument
2 parents 555b684 + 5bdd181 commit 855684c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

arch/x86/include/asm/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static inline void iosubmit_cmds512(void __iomem *dst, const void *src,
379379
const u8 *end = from + count * 64;
380380

381381
while (from < end) {
382-
movdir64b(dst, from);
382+
movdir64b_io(dst, from);
383383
from += 64;
384384
}
385385
}

arch/x86/include/asm/special_insns.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ static inline void serialize(void)
224224
}
225225

226226
/* The dst parameter must be 64-bytes aligned */
227-
static inline void movdir64b(void __iomem *dst, const void *src)
227+
static inline void movdir64b(void *dst, const void *src)
228228
{
229229
const struct { char _[64]; } *__src = src;
230-
struct { char _[64]; } __iomem *__dst = dst;
230+
struct { char _[64]; } *__dst = dst;
231231

232232
/*
233233
* MOVDIR64B %(rdx), rax.
@@ -245,6 +245,11 @@ static inline void movdir64b(void __iomem *dst, const void *src)
245245
: "m" (*__src), "a" (__dst), "d" (__src));
246246
}
247247

248+
static inline void movdir64b_io(void __iomem *dst, const void *src)
249+
{
250+
movdir64b((void __force *)dst, src);
251+
}
252+
248253
/**
249254
* enqcmds - Enqueue a command in supervisor (CPL0) mode
250255
* @dst: destination, in MMIO space (must be 512-bit aligned)

0 commit comments

Comments
 (0)