Skip to content

Commit

Permalink
Merge tag 'x86_tdx_for_6.9' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
Linus Torvalds committed Mar 12, 2024
2 parents 555b684 + 5bdd181 commit 855684c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static inline void iosubmit_cmds512(void __iomem *dst, const void *src,
const u8 *end = from + count * 64;

while (from < end) {
movdir64b(dst, from);
movdir64b_io(dst, from);
from += 64;
}
}
Expand Down
9 changes: 7 additions & 2 deletions arch/x86/include/asm/special_insns.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ static inline void serialize(void)
}

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

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

static inline void movdir64b_io(void __iomem *dst, const void *src)
{
movdir64b((void __force *)dst, src);
}

/**
* enqcmds - Enqueue a command in supervisor (CPL0) mode
* @dst: destination, in MMIO space (must be 512-bit aligned)
Expand Down

0 comments on commit 855684c

Please sign in to comment.