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=-6.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 940D2C61CE4 for ; Sat, 19 Jan 2019 23:57:53 +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 636372086D for ; Sat, 19 Jan 2019 23:57:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Uj35Hs/d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 636372086D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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=ntiVzMIl2Pl+FPXko1qXPrYLTnf3MxKB6XA5e3XRV5s=; b=Uj35Hs/dHFYShC wQ06//HGoMK8beB4NfSRWu6QOhtijXqyaKDGEqxH58OjN2vmA+bOhBoKOBXphqP4F7OfrCJ4ER4lz A02/w9kSintJDWUI/mBDF9h7N+jC1dJhSRw3t8n9QYF6U+i1MtI5V6LSQ5BX/keVoPV18DiytkArD qCSU8Vt3yOuabhfDwJprOPNOML7ety+kuMmxWjq3hCxL92meEu9LA38tCg/kHNp/sY3WIBXrExY4r 1T4oKcR4ukyreALZtmEfgoSDVnz4EdGOVFShhizcB08bBF5qng70NSTG3JasI7h8fM8haxCe0bTy0 RERAFNpetSlDnasOA+kA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gl0Uq-0005d6-OI; Sat, 19 Jan 2019 23:57:52 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gl0Un-0005cg-Bq for linux-arm-kernel@lists.infradead.org; Sat, 19 Jan 2019 23:57:50 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DE4D6A78; Sat, 19 Jan 2019 15:57:48 -0800 (PST) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F3B03F6A8; Sat, 19 Jan 2019 15:57:42 -0800 (PST) Date: Sat, 19 Jan 2019 23:57:39 +0000 From: Will Deacon To: Nicolas Boichat Subject: Re: [PATCH v6 2/3] iommu/io-pgtable-arm-v7s: Request DMA32 memory, and improve debugging Message-ID: <20190119235737.GE26876@brain-police> References: <20181210011504.122604-1-drinkcat@chromium.org> <20181210011504.122604-3-drinkcat@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181210011504.122604-3-drinkcat@chromium.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190119_155749_401722_2AEFF05C X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Hocko , Levin Alexander , linux-mm@kvack.org, Christoph Lameter , Huaisheng Ye , Joerg Roedel , Matthew Wilcox , hch@infradead.org, linux-arm-kernel@lists.infradead.org, David Rientjes , yingjoe.chen@mediatek.com, Vlastimil Babka , Tomasz Figa , Mike Rapoport , hsinyi@chromium.org, Matthias Brugger , Joonsoo Kim , Yong Wu , Robin Murphy , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Pekka Enberg , iommu@lists.linux-foundation.org, Andrew Morton , Mel Gorman 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 On Mon, Dec 10, 2018 at 09:15:03AM +0800, Nicolas Boichat wrote: > IOMMUs using ARMv7 short-descriptor format require page tables > (level 1 and 2) to be allocated within the first 4GB of RAM, even > on 64-bit systems. > > For level 1/2 pages, ensure GFP_DMA32 is used if CONFIG_ZONE_DMA32 > is defined (e.g. on arm64 platforms). > > For level 2 pages, allocate a slab cache in SLAB_CACHE_DMA32. Note > that we do not explicitly pass GFP_DMA[32] to kmem_cache_zalloc, > as this is not strictly necessary, and would cause a warning > in mm/sl*b.c, as we did not update GFP_SLAB_BUG_MASK. > > Also, print an error when the physical address does not fit in > 32-bit, to make debugging easier in the future. > > Cc: stable@vger.kernel.org > Fixes: ad67f5a6545f ("arm64: replace ZONE_DMA with ZONE_DMA32") > Signed-off-by: Nicolas Boichat Assuming you're routing all of this via akpm: Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel