Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1712408pxy; Mon, 2 Aug 2021 08:26:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzFNgnkar3YkxtyGNLv3nPz/4SF2JJidnoel9NKgwQ0CIhCSDutAMJrpHphc214JXSyQ5C X-Received: by 2002:a17:906:eb4c:: with SMTP id mc12mr15721817ejb.311.1627918010721; Mon, 02 Aug 2021 08:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627918010; cv=none; d=google.com; s=arc-20160816; b=QA/WK5jigSxo17LlEcL2usD3grzjspV2aXolkxeUB0YHBxhn7oTCUtf7aBcuMLCWKR DG8sRK8cHEAs3lGXsatZ8C2ZV9TbHXQwIT8c5UxBZJ1YqOz/wzqaN/W1uPPGd1fQRUc7 BwtDYtl48ToJRkIoPcsrnZXrmlWrsiYiFCZ1zsFVj2T8VuXqNH8j/OiTfOrlkQ1YlRrv V4ybEpBcioKIP+lOWok/T2pTuH+e8gRKWaQvc0TBHEX4OAjsjV4NVDI0AG3DxveWjnku weAGlcBAzgOdtNBbsiuLWjRPTY5ldHqMBtBJ4sJnb3qqN3CQ1P/TBemxRao7M9udGX11 ocsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=UdSCENaJT0arj7oj4FTiKNnXC8Hj/GB7PsHzm7VWZ8k=; b=WJtJsfebLypoJ2Of5emM6ixZwrCapw6BWHh8i2uRj587fvmX3EKSWuAGGY+PTsI5iR kVnEdX/oB9nU/RzJXMlK2IAagK29qsgDzusl3Ke9CE4PP+Lq7QlC+eVK1LmOo74ToQR0 /8ie/9PjmI1F2vNxD8Lr9M/PuDGpt+fGJBeJQCiNPzmCYEdHgE92gZQDjKT++eKpiV5q fnSsSAMJ0xjXDBgO6jArja8WcRYRtZAALy08e/YFhwubXArExdU/bnimNidw9tWKK/Tn P6rAAg9QbXujU23PEj7K8rzx1ir+HPxUggnLKr5VtptsQ4LXVa9M2f18eEbaDKNilAZr dRaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si3855726edw.279.2021.08.02.08.26.28; Mon, 02 Aug 2021 08:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234998AbhHBPW6 (ORCPT + 99 others); Mon, 2 Aug 2021 11:22:58 -0400 Received: from mga04.intel.com ([192.55.52.120]:40341 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234995AbhHBPW5 (ORCPT ); Mon, 2 Aug 2021 11:22:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10064"; a="211605926" X-IronPort-AV: E=Sophos;i="5.84,289,1620716400"; d="scan'208";a="211605926" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2021 08:22:48 -0700 X-IronPort-AV: E=Sophos;i="5.84,289,1620716400"; d="scan'208";a="419348696" Received: from nradovan-mobl.amr.corp.intel.com (HELO [10.212.45.122]) ([10.212.45.122]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2021 08:22:47 -0700 Subject: Re: [PATCH] x86/asm: fix gcc-5 enqcmds() build failure To: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org Cc: Arnd Bergmann , "H. Peter Anvin" , Tony Luck , Dan Williams , Ben Widawsky , Ricardo Neri , Arvind Sankar , Peter Zijlstra , Vinod Koul , linux-kernel@vger.kernel.org References: <20210802145356.1154321-1-arnd@kernel.org> From: Dave Jiang Message-ID: <196808b0-fa78-eab4-d68b-45bded788f86@intel.com> Date: Mon, 2 Aug 2021 08:22:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210802145356.1154321-1-arnd@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/2021 7:53 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 Acked-by: Dave Jiang Thanks! > --- > 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