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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 238BFC3A5A4 for ; Fri, 30 Aug 2019 08:58:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E3CF8206BB for ; Fri, 30 Aug 2019 08:58:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AmB7iDFR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3CF8206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.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=bf8fBat3/mIQmqJHZMWCJDgopbwTZIyuSP9Rutc30uI=; b=AmB7iDFR7P54Yy AVAd23dzfA8CRJ8jzwOUiXwu91QDfUeKcQDT0QXacGukNXYz20F9Yz0s7Eda1XbysN8sFHX6JyZ2M 36wilSYxIPDds9vGTKh1Sok+iXivnVB1n1bsSXOw5nyAqMy66aig1ibBr4W7IBSMaL+DbVnvPOk4j LwBo0cIRZz0CKpTWKqvA/CA3CBGhXTVFH5Ez3YLxBkpvVjqMRJ8w0ia324LO3p05byeAyAqAFaE08 ZfAQ8VOuk84mdC4itl4CNxGcr0JM5P+83ZNx5SxN5Nw6e6wZD2aXXZuj9ItBnn66nQYaB69MsWmQP W2vxm+98nKLyKfk5I9BA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i3cjR-0008IX-Kv; Fri, 30 Aug 2019 08:58:09 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i3cjP-0008II-I4; Fri, 30 Aug 2019 08:58:07 +0000 Date: Fri, 30 Aug 2019 01:58:07 -0700 From: Christoph Hellwig To: Julien Grall Subject: Re: [PATCH V2] arm: xen: mm: use __GPF_DMA32 for arm64 Message-ID: <20190830085807.GA15771@infradead.org> References: <1567175255-1798-1-git-send-email-peng.fan@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) 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: Peng Fan , "sstabellini@kernel.org" , Catalin Marinas , "linux@armlinux.org.uk" , dl-linux-imx , "xen-devel@lists.xenproject.org" , nd , "will@kernel.org" , "linux-arm-kernel@lists.infradead.org" , Robin Murphy Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Can we take a step back and figure out what we want to do here? AFAICS this function allocates memory for the swiotlb-xen buffer, and that means it must be <= 32-bit addressable to satisfy the DMA API guarantees. That means we generally want to use GFP_DMA32 everywhere that exists, but on systems with odd zones we might want to dip into GFP_DMA. This also means swiotlb-xen doesn't actually do the right thing on x86 at the moment. So shouldn't we just have one common routine in swiotlb-xen.c that checks if we have CONFIG_ZONE_DMA32 set, then try GFP_DMA32, and if not check if CONFIG_ZONE_DMA is set and then try that, else default to GFP_KERNEL? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel