Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5096567imu; Sat, 1 Dec 2018 09:04:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/U870lkQaE3Lmq1Do5IGiDCW21GEmc9NEd+oGLtivWmmaNePLeKSDOB/jKUXz2kzTTrP4O6 X-Received: by 2002:a63:6445:: with SMTP id y66mr8595254pgb.250.1543683865673; Sat, 01 Dec 2018 09:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543683865; cv=none; d=google.com; s=arc-20160816; b=wSU66jXHr8fJ3+GijuHtGJOL7MQaGpOAM9awWmz+9B9P9V6GEV4vFCxyjkn7huJGDX iLQR1CKXE4YaQ69tOgpnYZbFsGBvxUv1FTXaoXR67XCBCk+xhvs3ZHjlNJwGhDEuH4GV BAFcWaTZlLrhI8y0r5um1AC/115uJ/iiQFGnGO/POIaKx/Nq2UPcGCWUIdZRgI69MswK U9h5bvLJxv523swRO2z8DMI9IAoOWLQGdk4v8Di1fM5XuxPU2nxq9uvMJ0qzVuRV3Qga NH3/uiind1ji+925KslwT9Yvgpbqj1PA+9ZnSMH1+y9DvAvdyx4DSxxtfOoIasGiaUNJ BRIA== 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; bh=8VPm8OpGQTOzFmED5+FWFaBQuO91tHEqK+WvVRQC/qA=; b=jHpSQrZHk8o3jihsg/FQMmx/GlATYuoNLDiuaPbRSFvqxh7YM/xxnBnSLIyCt8Iz98 TtnodRnboMemgHfYi2pCcXI37n88wyynPoyQwahLPtERzfaYTqoOeXAk+IO7GbRh1S/6 b5Q61Kyyb0w3OY8CC8TpN/hlm/TncjEQlhdLXgaC/Ij/pQqpxlCakj75TDVh25my+rEd EG44vtf2qPOg2zTkY6tk7RNTInoT/JYgqidyQzTdHLPFZ/UJG0/qKi4LkQNWZf4136Gq reZYy/JQWYtip9pXwrbl4pRqG5HdQdf9me35/y+VQjVg2y/sK+pmQRkq+JtcO2aLzxE1 YxRg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p185si9533231pfg.112.2018.12.01.09.04.09; Sat, 01 Dec 2018 09:04:25 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727134AbeLBEQY (ORCPT + 99 others); Sat, 1 Dec 2018 23:16:24 -0500 Received: from verein.lst.de ([213.95.11.211]:56788 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbeLBEQY (ORCPT ); Sat, 1 Dec 2018 23:16:24 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id BD4726732A; Sat, 1 Dec 2018 18:03:25 +0100 (CET) Date: Sat, 1 Dec 2018 18:03:25 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Catalin Marinas , Will Deacon , Guo Ren , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/9] dma-mapping: move the arm64 ncoherent alloc/free support to common code Message-ID: <20181201170325.GD20912@lst.de> References: <20181105121931.13481-1-hch@lst.de> <20181105121931.13481-5-hch@lst.de> <5526bc61-57a3-54ff-60c6-e9963230af22@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5526bc61-57a3-54ff-60c6-e9963230af22@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 07:05:23PM +0000, Robin Murphy wrote: > It's a bit yuck that we now end up with arch_* hooks being a mix of arch > code and not-actually-arch-code, but I guess there's some hope of coming > back and streamlining things in future once all the big moves are done. Yes, I hope we can use some form of common code here for most architectures eventually. But that will some time. > I can't really be bothered to nitpick the typos above and the slight > inconsistencies in some of the cosmetic code changes, but one worthwhile > thing stands out... I'm usually fine picking up nitpicks. For now I'll apply the series with the pointed out fixups, but if you want to send the fixups I'd be glad. >> + val = gen_pool_alloc(atomic_pool, size); >> + if (val) { >> + phys_addr_t phys = gen_pool_virt_to_phys(atomic_pool, val); >> + >> + *ret_page = phys_to_page(phys); > > Looks like phys_to_page() isn't particularly portable, so we probably want > an explicit pfn_to_page(__phys_to_pfn(phys)) here. Otherwise, the > fundamental refactoring looks OK. Ok, I'll updated it.