Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp164985ybm; Mon, 20 May 2019 13:55:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+A6CraiVrkfeiHStaVGHIdQZl0RgnNLQPkSgOGeAvJkbAIuql3xeFOdAO63046bna+WHn X-Received: by 2002:a65:42cd:: with SMTP id l13mr24365511pgp.72.1558385748826; Mon, 20 May 2019 13:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558385748; cv=none; d=google.com; s=arc-20160816; b=jbz/N1HyLXEw7rmYMObum6CUFymQU4qUEhur/aB71bzlyor3waHsx9uFw1D3lFF9fi lmpE6NEY9fLegpxFTftH8SHTfjd51DWoUrgOpiF1wNLJByW2GrDB8yforiSzVrt3Y8ml kI1lb35oSO057k/dCAH20xrFwDMj7mXI8soL9htaLkh2LjjDDD8rq5aO+5lfRHL2Smhs bvsaAvgaFp1FiPurXBzSPTvY02/GUxzQKkblbWlxsaK1QEwd6hGaQmqu2S+HPg5k6D00 2nGihm4aIBlJCMsn8xXSVPi4WWwXHZ3psUJk2oP6OYpt/jHWkfqhKZuwg3u0kz0uCwCV EcFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jgtaH3BaB88SvVVWGIdw/jgKWg3CUtWtW+8PvA7IK1Q=; b=p+Ssod8EnXmWo6mKnT+qMUrpzJ0kUxTktDu5YDZkWfoAfX1MiapiybS4JkAaNEaND4 /y4QC2QNgzFCJgK2aJWP0n6bB2jwk4nPt6VWF11OWWdsmQ+RPhBjnYRLcKIpPcaIFUa1 PDHv71h/WXaTrVQ59kh65Z3WXddkvJQE9KpkKUIoArYfvmaf9ZVTQyxnNEHgOv9QrBlk EQve/To+ypx8UerCnOVKrhGBk6WPWIUVJvO/B8H1c9+PDylZWzf4LZc//2SlulhjmVSQ 3uKblG7fn4AmtS2nnfbSiCp3mwYOylrMuQ1KNqKwpm8485lDWkVo+YpxAUXqrl/mNzK3 YN1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=I42Mz43w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q82si21090654pfc.12.2019.05.20.13.55.32; Mon, 20 May 2019 13:55:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=I42Mz43w; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbfETUxD (ORCPT + 99 others); Mon, 20 May 2019 16:53:03 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52148 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfETUxC (ORCPT ); Mon, 20 May 2019 16:53:02 -0400 Received: by mail-wm1-f67.google.com with SMTP id c77so721403wmd.1 for ; Mon, 20 May 2019 13:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jgtaH3BaB88SvVVWGIdw/jgKWg3CUtWtW+8PvA7IK1Q=; b=I42Mz43wtZ1nWQ3sKCUUx3kqQRt2Y/rpluQ5sNqCf53WVKOnn3Y7ddXUMvFSbJIASR JCb5HmK8niEMQ2s7Rsy+dfVGk9sphSLJsl1DNaLTbfTwvr+mf2X3X1jLtub4U7lVzR0Q 0lZKwxt63wJK0O0iSXvIbfWc5CPz0pTJ8fjDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jgtaH3BaB88SvVVWGIdw/jgKWg3CUtWtW+8PvA7IK1Q=; b=f1GJcvSJ6CQ5fuX5KL1c63iRhRxDfAzBfjFPS45VcTEZiP8FW7YklRHJyI7pkat9S4 RGhKN/1WM32gzowzGnDWZ2CgPS+ZNBtb57QXnPKkOF9G9FDehVhHSlqqEKYnWjqy6mmx GbpKZyEhQ0qTx6vnxonY4zG4OQo1a1vaq7M5B/aCrvZr9tNp/+FyxbI2miOLW0uuIGav /t94rC/9Rnf+c6fXl6xwaFmspUqBddm/NIHcaC+DoLnVPvZcZDCB87j5Bxcle4zc9g9+ 3B2Z2Dv9/cfRj6zmWoXwojeTZD0529f7BkGLCcw5K3NvE3bCBPDecXLwjLioUo50JEd5 tnAA== X-Gm-Message-State: APjAAAUn+50xvv40aUjR5izRvOY5rydP9/rmlClGmiKF0noFi2yCAIio GmB/GoU+AP1FKBZ+8L68bbpcISNikJBOwG2KrtItRmIngoZYMA== X-Received: by 2002:a1c:c7c8:: with SMTP id x191mr674058wmf.126.1558385580358; Mon, 20 May 2019 13:53:00 -0700 (PDT) MIME-Version: 1.0 References: <20190517065424.24453-1-yamada.masahiro@socionext.com> In-Reply-To: <20190517065424.24453-1-yamada.masahiro@socionext.com> From: Justin Forbes Date: Mon, 20 May 2019 15:52:49 -0500 Message-ID: Subject: Re: [PATCH] s390: mark __cpacf_check_opcode() and cpacf_query_func() as __always_inline To: Masahiro Yamada Cc: Martin Schwidefsky , Heiko Carstens , linux-s390@vger.kernel.org, Arnd Bergmann , Laura Abbott , LKML , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 17, 2019 at 1:55 AM Masahiro Yamada wrote: > > Commit e60fb8bf68d4 ("s390/cpacf: mark scpacf_query() as __always_inline") > was not enough to make sure to meet the 'i' (immediate) constraint for the > asm operands. > > With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error > with gcc 9.1.1: > > In file included from arch/s390/crypto/prng.c:29: > ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query_func': > ./arch/s390/include/asm/cpacf.h:170:2: warning: asm operand 3 probably doesn't match constraints > 170 | asm volatile( > | ^~~ > ./arch/s390/include/asm/cpacf.h:170:2: error: impossible constraint in 'asm' > > Add more __always_inline to force inlining. > > Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") > Reported-by: Laura Abbott > Signed-off-by: Masahiro Yamada > --- > Thanks for the fix, this does indeed fix the build issues for us. Justin Tested-by: Justin Forbes > arch/s390/include/asm/cpacf.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h > index f316de40e51b..19459dfb4295 100644 > --- a/arch/s390/include/asm/cpacf.h > +++ b/arch/s390/include/asm/cpacf.h > @@ -177,7 +177,7 @@ static inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask) > : "cc"); > } > > -static inline int __cpacf_check_opcode(unsigned int opcode) > +static __always_inline int __cpacf_check_opcode(unsigned int opcode) > { > switch (opcode) { > case CPACF_KMAC: > @@ -217,7 +217,7 @@ static inline int cpacf_test_func(cpacf_mask_t *mask, unsigned int func) > return (mask->bytes[func >> 3] & (0x80 >> (func & 7))) != 0; > } > > -static inline int cpacf_query_func(unsigned int opcode, unsigned int func) > +static __always_inline int cpacf_query_func(unsigned int opcode, unsigned int func) > { > cpacf_mask_t mask; > > -- > 2.17.1 >