From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B3E2C433E2 for ; Thu, 10 Sep 2020 10:55:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCD6C20665 for ; Thu, 10 Sep 2020 10:55:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cWetuXlh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ybqq+kR+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCD6C20665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HzCPVmpNXQPIJm4sKxYjeqInvzM5zCMtltlmZNecC94=; b=cWetuXlh4uKw9/jWGJLpgH5ve KudnNRnEjd6WGCGSYqgYMFj/5Q3CqurqHSX5OV+7APMlLQABJlGbXaOiUmuN9EV8MgH0y0Ngni0Il IjT02ma4rgC7lOLFTVQGer+8AjEb26NUoqic42eUmN7iISFSrlVfOQtRppgACT2WbpdOvJeU0Dz2Q Aay0VlThC10CJk5QScYcl/nrPIrFuTvKdDQL+SiswagFvCSBcYBnkiFO1aUFUDN10TLHbbrfddLpR ow9HKeoJnuKv9WYS9LcyNwf25m6X3XMK5kH8qPHYCyMTG+FkII/zA1l14W2pDQ/jP9AdAZUhrWGvV y67cUqb9A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGKDj-0007rk-7u; Thu, 10 Sep 2020 10:54:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGKDg-0007qQ-OS for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 10:54:25 +0000 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AEB5820872; Thu, 10 Sep 2020 10:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599735263; bh=B49DuGNOigMrDqW7bKVyAZLBmxoG0fJF+8dh7POpkWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ybqq+kR+57x8buVBMHY+SZDNgtFiP6kk+LkLLE2kCUEj9IO5PlLoPSS5g6vtRzurX bwwKjMvZPhlZ4pj8KZHauSZ1cYsMgzo22lWd8NKHj3P3BxrdEu1a45zWH+3JL0bdoH axjJEWhiA1Zom7Mx1exJ3fUVqaygRZRIYKabrXjQ= Date: Thu, 10 Sep 2020 13:54:19 +0300 From: Leon Romanovsky To: Lorenzo Pieralisi Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs Message-ID: <20200910105419.GH421756@unreal> References: <20200831151827.pumm2p54fyj7fz5s@amazon.com> <20200902113207.GA27676@e121166-lin.cambridge.arm.com> <20200902142922.xc4x6m33unkzewuh@amazon.com> <20200902164702.GA30611@e121166-lin.cambridge.arm.com> <20200903110844.GB11284@e121166-lin.cambridge.arm.com> <28d333afc73bd854390f8c39691a735040ba5b39.camel@kernel.crashing.org> <20200910094600.GA22840@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200910094600.GA22840@e121166-lin.cambridge.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_065424_853393_149F79BE X-CRM114-Status: GOOD ( 26.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, Benjamin Herrenschmidt , Bjorn Helgaas , jgg@nvidia.com, linux-pci@vger.kernel.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, Clint Sbisa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 10, 2020 at 10:46:00AM +0100, Lorenzo Pieralisi wrote: > [+Jason] > > On Tue, Sep 08, 2020 at 09:33:42AM +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2020-09-03 at 12:08 +0100, Lorenzo Pieralisi wrote: > > > > It's been what other architectures have been doing for mroe than a > > > > decade without significant issues... I don't think you should worry > > > > too > > > > much about this. > > > > > > Minus what I wrote above, I agree with you. I'd still be able to > > > understand what this patch changes in the mellanox driver HW > > > handling though - not sure what they expect from > > > arch_can_pci_mmap_wc() > > > returning 1. > > > > I don't know enough to get into the finer details but looking a bit it > > seems when this is set, they allow extra ioctls to create buffers > > mapped with pgprot_writecombine(). > > > > I suppose this means faster MMIO backet buffers for small packets (ie, > > non-DMA use case). > > > > Also note that mlx5_ib_test_wc() only uses arch_can_pci_mmap_wc() for a > > non-ROCE ethernet port on a PF... For anyting else, it just seems to > > actually try to do it and see what happens :-) > > > > Leon: Can you clarify the use of arch_can_pci_mmap_wc() in mlx5 and > > whether you see an issue with enabling this on arm64 ? > > Hi Jason, > > I was wondering if you could help us with this question, we are trying > to understand what enabling arch_can_pci_mmap_wc() on arm64 would cause > in mellanox drivers wrt mappings and whether there is an expected > behaviour behind them, in particular whether there is an implicit > reliance on x86 write-combine arch/interconnect details. Sorry, somehow I missed this email. The arch_can_pci_mmap_wc() used in IB representors, special mode where we can't perform write-combine test below. The commit 1f3db161881b ("IB/mlx5: Generally use the WC auto detection test result") describes it. I don't see any problem with enabling arch_can_pci_mmap_wc() on ARM. Thanks > > Thanks, > Lorenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel