Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1378016ybe; Fri, 6 Sep 2019 17:01:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjOzfH2xukeBYqV8McSJ/ypUz0uX/+uOY78WJl3dU0sI0ZCrF0fZgoIj7WbkMn4qeouSjs X-Received: by 2002:a17:902:6b06:: with SMTP id o6mr11818780plk.33.1567814468171; Fri, 06 Sep 2019 17:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567814468; cv=none; d=google.com; s=arc-20160816; b=CaKCJjOPGAq8IQDz4Bk0s32S3pOyRBhVmXqagi9tlr1ytbTIxORpW8Gd4oMhPz4q2Q 9a/5Rv8J+YnBBI9JcBHWp6vReIC2U4DLfzvDdhBQifMuWiIVbI8JwwBQONZTAU6XJ6vm YR7TzyfGpboD0wU0gjyjTnxzX8t9yNX2fgxBvx3UHMbs4mi3Z3PQXktA7V0ijlK6EIX1 o/oJQus2UX7Gh2GoVkV7qSXbRhDF7HjP6ROEZJML9FfE+EmhwligVx+MP5u3MnsvJYdX yJ+Wea0pelFDXMFg7HLOflw0gTj/ZrMjlwnuKFNmikPpsKyFuKJu2/T0MzHHD32kQu0N gl9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=y8TtBHLyh9FaXB7YWA2oSVkXqqAPTbDmmbDnNI16F7o=; b=zde1k2zsrz0XZp4ejm9LRCLJW0+g4vkO9dYCoAf7MtZwwb/h9UjLqpgU1WvelVWNnz RF+4ocamVMtLQ+mCWOKQ12Q4rKlgwQ8ZmU6Nup7QDENcYGkwTqoGDNcT6qtQ1km1e+MG 5NCjt3iGtwJjoeF4jm0vWO6JV8n6n1W56uNLVpQQpOoIRR4u7Jrnc43d9qW5j/iaD5Pp atJK8BFdG7RS3wWNpFNhsIEdfdFBLQRTcCLMd49sg0FDWOM23obBhb/xX6OERZJOfaAR QC9e6djBFwT93/nio/RBhcDQXW0hvwO9pCmWsYtMWT+MR1d/ppfMTKBkgvQekMQy9pg5 Bpeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=DOF557n5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si2969117pli.317.2019.09.06.17.00.49; Fri, 06 Sep 2019 17:01:08 -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=@oracle.com header.s=corp-2019-08-05 header.b=DOF557n5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405544AbfIFOmB (ORCPT + 99 others); Fri, 6 Sep 2019 10:42:01 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:37186 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727481AbfIFOmB (ORCPT ); Fri, 6 Sep 2019 10:42:01 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x86Ed6m5079684; Fri, 6 Sep 2019 14:41:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=y8TtBHLyh9FaXB7YWA2oSVkXqqAPTbDmmbDnNI16F7o=; b=DOF557n5O1G3LePDNwr0JmO+vUm1GxrH6KN/LwtR3hkP3O/j3iy8egyMpJJWrEE044Ms 63u4oumZ8oks/ZQRt7gfi0pK7vIAlULQAqYOtlGhhrRO2AZGGB3aE1kS0SNn+hXG9h2j 0e2sQGNUvzrsaDZFQ6WFwgwhQrFW5urHG0xRcT9U5UnygFZRpuhg1toZ5VtMpqbhEJdX KtuV4y/6mgxs7wmro5Da451nB8UjHcp+oaXbc6Bq5IEq+BnYuuiB0W22oulaN3NFJ5sQ nCF9axdCfZyMG1fkwd20WASjft3Kw2kS6qExeFXgNQ6OKHyjfNOrCMLbrU9vRwOEetaz OQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2uus55048m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Sep 2019 14:41:20 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x86Ed28j110378; Fri, 6 Sep 2019 14:41:20 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2uum4h555m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Sep 2019 14:41:20 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x86EfIvV032549; Fri, 6 Sep 2019 14:41:18 GMT Received: from char.us.oracle.com (/10.152.32.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 06 Sep 2019 07:41:17 -0700 Received: by char.us.oracle.com (Postfix, from userid 1000) id BD96F6A00C1; Fri, 6 Sep 2019 10:43:00 -0400 (EDT) Date: Fri, 6 Sep 2019 10:43:00 -0400 From: Konrad Rzeszutek Wilk To: Boris Ostrovsky Cc: Christoph Hellwig , Stefano Stabellini , Juergen Gross , x86@kernel.org, linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/11] swiotlb-xen: simplify cache maintainance Message-ID: <20190906144300.GD7824@char.us.oracle.com> References: <20190905113408.3104-1-hch@lst.de> <20190905113408.3104-10-hch@lst.de> <20190906140123.GA9894@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9372 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=829 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909060155 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9372 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=893 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909060155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 10:19:01AM -0400, Boris Ostrovsky wrote: > On 9/6/19 10:01 AM, Christoph Hellwig wrote: > > On Fri, Sep 06, 2019 at 09:52:12AM -0400, Boris Ostrovsky wrote: > >> We need nop definitions of these two for x86. > >> > >> Everything builds now but that's probably because the calls are under > >> 'if (!dev_is_dma_coherent(dev))' which is always false so compiler > >> optimized is out. I don't think we should rely on that. > > That is how a lot of the kernel works. Provide protypes only for code > > that is semantically compiled, but can't ever be called due to > > IS_ENABLED() checks. It took me a while to get used to it, but it > > actually is pretty nice as the linker does the work for you to check > > that it really is never called. Much better than say a BUILD_BUG_ON(). > > > (with corrected Juergen's email) > > I know about IS_ENABLED() but I didn't realize that this is allowed for > compile-time inlines and such as well. > > Anyway, for non-ARM bits > > Reviewed-by: Boris Ostrovsky Acked-by: Konrad Rzeszutek Wilk as well. Albeit folks have tested this under x86 Xen with 'swiotlb=force' right? I can test it myself but it will take a couple of days. > > If this goes via Xen tree then the first couple of patches need an ack > from ARM maintainers. > > -boris