LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Arnd Bergmann <arnd@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Dave Jiang <dave.jiang@intel.com>,
	Tony Luck <tony.luck@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Ben Widawsky <ben.widawsky@intel.com>,
	Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
	Arvind Sankar <nivedita@alum.mit.edu>,
	Peter Zijlstra <peterz@infradead.org>,
	Vinod Koul <vkoul@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/asm: fix gcc-5 enqcmds() build failure
Date: Mon, 02 Aug 2021 18:15:00 +0200	[thread overview]
Message-ID: <70BD5ED0-BA08-438E-BF14-C49827617C90@zytor.com> (raw)
In-Reply-To: <20210802145356.1154321-1-arnd@kernel.org>

NAK.

The type of arguments to condition code arguments should be bool.

On August 2, 2021 4:53:42 PM GMT+02:00, Arnd Bergmann <arnd@kernel.org> wrote:
>From: Arnd Bergmann <arnd@arndb.de>
>
>Building drivers/dma/idxd/submit.o with gcc-5.5 results in a cryptic
>error messages:
>
>arch/x86/include/asm/special_insns.h: Assembler messages:
>arch/x86/include/asm/special_insns.h:286: Error: operand size mismatch for `setz'
>make[5]: *** [scripts/Makefile.build:272: drivers/dma/idxd/submit.o] Error 1
>
>It seems that this happens for 32-bit arguments when the instruction
>expects an 8-bit argument. Change the type of the local variable
>accordingly to get a clean build.
>
>Fixes: 7f5933f81bd8 ("x86/asm: Add an enqcmds() wrapper for the ENQCMDS instruction")
>Fixes: 8e50d392652f ("dmaengine: idxd: Add shared workqueue support") # guessed
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>---
> arch/x86/include/asm/special_insns.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h
>index f3fbb84ff8a7..33264839f99e 100644
>--- a/arch/x86/include/asm/special_insns.h
>+++ b/arch/x86/include/asm/special_insns.h
>@@ -275,7 +275,7 @@ static inline int enqcmds(void __iomem *dst, const void *src)
> {
> 	const struct { char _[64]; } *__src = src;
> 	struct { char _[64]; } __iomem *__dst = dst;
>-	int zf;
>+	u8 zf;
> 
> 	/*
> 	 * ENQCMDS %(rdx), rax

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

      parent reply	other threads:[~2021-08-02 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 14:53 Arnd Bergmann
2021-08-02 15:22 ` Dave Jiang
2021-08-02 16:15 ` H. Peter Anvin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70BD5ED0-BA08-438E-BF14-C49827617C90@zytor.com \
    --to=hpa@zytor.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=ben.widawsky@intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nivedita@alum.mit.edu \
    --cc=peterz@infradead.org \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vkoul@kernel.org \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH] x86/asm: fix gcc-5 enqcmds() build failure' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).