Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp441472ybn; Wed, 2 Oct 2019 00:12:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyao6zFLhlUKYIOyWhXlLiZCeukeTIuGWpD8EThvnBsE+RrL9lJnk2KPPoM7agBobG2OI0o X-Received: by 2002:a50:87ca:: with SMTP id 10mr2213251edz.77.1570000343614; Wed, 02 Oct 2019 00:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570000343; cv=none; d=google.com; s=arc-20160816; b=BT9A5dXlyqj61LDybhl7KOa7qmqsbncfT2Tyh1mK8nsXJI3WOg7La4p0PxgoIg9L5A YWAgMilZmGl9yEpGJOxFn+Z8VnVsH9JYAmJRmOg9FCOQz9zaOng98XGZHqhP7E62rcCX mqR5ghqpnwiMnxsh4XwpWD6P8SluwWvedRN47D4OZqp0Kd7/0NwfA5HMTpAgkjk24LgM 6Wglk6PeRzyHpAOuLMl3z/oM6u5w63vakkv14HP/JFZ3RPO8Yz7rKU3cYJpMRI/Vzjc4 qOVKzZB+S9ITwnJ2Oyk0LFX4gWpGQXXhZJui7miQniowJoiRhv1wt0ZGuamq54tcAh+b NWAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=W2hytF/mzr2BQvvVjKssPNABBb9T0OJyFxCwPzrAxwI=; b=MhY9oVZrHlzU3SpyzJxg6nPrUlumkhbWW59jY2ZHwQSH8RH9rlxHExNkFUflV1c4dj ZI6dFSA8ZLWpwtlWWfcyWhBqT7iqnDpIRU83AeUM6KRnI2g6MKuUTvKtojXXnJ6O8+Gl IvpSU08RszLZ1VXx2epq8mD5TmN7lRh7StSmufKUjaymtpVigBazMJj+rwZ1I5sGg+VD BZKIx5pd8oI+ydWLdGwPEuuQSfKm+VOIER1KJsK0EaqNGV5T7EIMnxNnOZA8W5AJduNv /OrZBvNbXveLIe3ebymsqup53GgFeaEMujxxdkiZHVv8dFTcYOFO4WPPKE87df5I3/aQ iBRg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x25si10600677edd.350.2019.10.02.00.11.59; Wed, 02 Oct 2019 00:12:23 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726207AbfJBGqR (ORCPT + 99 others); Wed, 2 Oct 2019 02:46:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9472 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726150AbfJBGqQ (ORCPT ); Wed, 2 Oct 2019 02:46:16 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x926gxjx026617 for ; Wed, 2 Oct 2019 02:46:15 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2vckptmywa-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 02 Oct 2019 02:46:15 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 2 Oct 2019 07:46:13 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 2 Oct 2019 07:46:09 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x926k7io55902332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 2 Oct 2019 06:46:07 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 739E752050; Wed, 2 Oct 2019 06:46:07 +0000 (GMT) Received: from osiris (unknown [9.152.212.201]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 257275204E; Wed, 2 Oct 2019 06:46:07 +0000 (GMT) Date: Wed, 2 Oct 2019 08:46:05 +0200 From: Heiko Carstens To: Jiri Kosina Cc: Vasily Gorbik , Christian Borntraeger , Masahiro Yamada , Linus Torvalds , linux-s390@vger.kernel.org, Michal Kubecek , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5.4-rc1 BUILD FIX] s390: mark __cpacf_query() as __always_inline References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 x-cbid: 19100206-4275-0000-0000-0000036D3BA5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19100206-4276-0000-0000-000038803D26 Message-Id: <20191002064605.GA7405@osiris> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-02_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910020062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 01, 2019 at 10:08:01PM +0200, Jiri Kosina wrote: > arch/s390/kvm/kvm-s390.c calls on several places __cpacf_query() directly, > which makes it impossible to meet the "i" constraint for the asm operands > (opcode in this case). > > As we are now force-enabling CONFIG_OPTIMIZE_INLINING on all > architectures, this causes a build failure on s390: > > In file included from arch/s390/kvm/kvm-s390.c:44: > ./arch/s390/include/asm/cpacf.h: In function '__cpacf_query': > ./arch/s390/include/asm/cpacf.h:179:2: warning: asm operand 3 probably doesn't match constraints > 179 | asm volatile( > | ^~~ > ./arch/s390/include/asm/cpacf.h:179:2: error: impossible constraint in 'asm' > > Mark __cpacf_query() as __always_inline in order to fix that, analogically > how we fixes __cpacf_check_opcode(), cpacf_query_func() and scpacf_query() > already. > > Reported-and-tested-by: Michal Kubecek > Fixes: d83623c5eab2 ("s390: mark __cpacf_check_opcode() and cpacf_query_func() as __always_inline") > Fixes: e60fb8bf68d4 ("s390/cpacf: mark scpacf_query() as __always_inline") > Fixes: ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") > Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") > Signed-off-by: Jiri Kosina > --- > > I am wondering how is it possible that none of the build-testing > infrastructure we have running against linux-next caught this? Not enough > non-x86 coverage? Well, there is plenty of s390 coverage with respect to daily builds (also here). It doesn't fail for me with gcc 9.1; so you may either have a different gcc version or different config options(?) so the compiler decided to not inline the function. I'll apply this in any case, since your patch is obviously fine. Thanks! > arch/s390/include/asm/cpacf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/s390/include/asm/cpacf.h b/arch/s390/include/asm/cpacf.h > index a092f63aac6a..c0f3bfeddcbe 100644 > --- a/arch/s390/include/asm/cpacf.h > +++ b/arch/s390/include/asm/cpacf.h > @@ -171,7 +171,7 @@ typedef struct { unsigned char bytes[16]; } cpacf_mask_t; > * > * Returns 1 if @func is available for @opcode, 0 otherwise > */ > -static inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask) > +static __always_inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask) > { > register unsigned long r0 asm("0") = 0; /* query function */ > register unsigned long r1 asm("1") = (unsigned long) mask; > > -- > Jiri Kosina > SUSE Labs >