From patchwork Sun Nov 11 09:03:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 10677529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 996D313AD for ; Sun, 11 Nov 2018 09:04:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89FED2B08D for ; Sun, 11 Nov 2018 09:04:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D7752B098; Sun, 11 Nov 2018 09:04:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 242982B08D for ; Sun, 11 Nov 2018 09:04:21 +0000 (UTC) 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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NXItHO9FHKOe6pgJKTB4HApa5vjKP+Ze7Th7AbxXXbw=; b=dQNVz9gvzA/xYs CBweSnzptK4rohR38uO0vYZ/SC4q65bWQa2V879UZTkVwsd6TRAtzUNR5D8BOE3YtD3v+Tvc3hWmS J29J2UjqgDBqFKhspYFMVgZcW1BmGY7USGwRaE0LkwyYiiuVhTxun4EVW9UhYicJbjSGd9KEkB9Dn GbeiX/UIAOHQfYnClm6fEV+nHxp6ynNlEragXgHCGXnwWXEI3vnX+eejnZKFXADA8sKwiYIwR6vCz cEjEqV7L46iuSi8p+mKWLR0G8HINYi/frW8XcC4w/uuL600b/JSaQ+irBKvpH0IX9PnFCUAorz+Rp CqNElL9T1G5pkqJzYTWw==; 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 1gLlfF-000539-5q; Sun, 11 Nov 2018 09:04:17 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gLlfC-00052k-V8 for linux-arm-kernel@lists.infradead.org; Sun, 11 Nov 2018 09:04:16 +0000 Received: by mail-pl1-x642.google.com with SMTP id f12-v6so2884082plo.1 for ; Sun, 11 Nov 2018 01:04:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YH0dpLemzETchXwysz1a293wDlVR1tlxLKZnu56Wuas=; b=nTVGFkxOErxYFfdmoxWfmHfjGNbk62h55lL3zEjAkuWhGdoO61xN6eXeKEtaT789my lPKE0n4qgCeJCY9/4S2si17Uf5q9HNdIIzAQ9mPXiATgyxuTEa1DJLMi4kahnoegyIkW jTI+kdqxT/lcn8tL7VvR68HG9RudI/BJJ8bAs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YH0dpLemzETchXwysz1a293wDlVR1tlxLKZnu56Wuas=; b=ibVIROrfkGpAn0JciZsFKtZGiBVfOSRv3P1W2Tj/ahpkiYh2L0n1OPDG+hy3siAB43 2LQDYI200lCwWUvQx3iJn5jNvf4yibhrmorAd95MoqvbmTHQtjWH8E52pxoum8toPhfq XaA41FgBeQqBGR9TxTDajum8h4e380te7Aulot9xV5Ze1yuOW8looDQ4N5rs9sc4vuIw 0hs6kLGvOOHvnigGpZPSX4h2hCQSyxaDw6ZBAKenezY4GNbqurKnTCFDmkiDLbK5war5 mxjIb7Dj4dZPCDtdPBEzFAn6rjB9FjOJA5r6np51KxJ45POI9j0YgLKSKN9PFCg0pr6Z rvDw== X-Gm-Message-State: AGRZ1gJBRjBo1s76pk0kGj/kPRIyyTSxSPsgaaJ0vsCCGAd4PI0vGFnf 1gZh7lUGVFcPQmn43jD1umSQMA== X-Google-Smtp-Source: AJdET5ejJwdcyah6PDSi2X+5m2sTUW/Lm9eyOeRrOnLflAJS5sWNkHm/wZ4Yk4wnTwUeEQLKthdWWw== X-Received: by 2002:a17:902:8ec2:: with SMTP id x2-v6mr15716258plo.157.1541927043030; Sun, 11 Nov 2018 01:04:03 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:f659:7f17:ea11:4e8e]) by smtp.gmail.com with ESMTPSA id 69sm8107956pgg.86.2018.11.11.01.03.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Nov 2018 01:04:02 -0800 (PST) From: Nicolas Boichat To: Robin Murphy Subject: [PATCH v2 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables Date: Sun, 11 Nov 2018 17:03:38 +0800 Message-Id: <20181111090341.120786-1-drinkcat@chromium.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181111_010415_027337_1BA45329 X-CRM114-Status: GOOD ( 11.21 ) 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: Levin Alexander , Michal Hocko , Andrew Morton , Huaisheng Ye , Tomasz Figa , Joerg Roedel , Will Deacon , linux-kernel@vger.kernel.org, Pekka Enberg , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Mike Rapoport , linux-arm-kernel@lists.infradead.org, David Rientjes , Matthias Brugger , yingjoe.chen@mediatek.com, Joonsoo Kim , Yong Wu , Mel Gorman , Christoph Lameter , Vlastimil Babka Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is a follow-up to the discussion in [1], to make sure that the page tables allocated by iommu/io-pgtable-arm-v7s are contained within 32-bit physical address space. [1] https://lists.linuxfoundation.org/pipermail/iommu/2018-November/030876.html Fixes since v1: - Add support for SLAB_CACHE_DMA32 in slab and slub (patches 1/2) - iommu/io-pgtable-arm-v7s (patch 3): - Changed approach to use SLAB_CACHE_DMA32 added by the previous commit. - Use DMA or DMA32 depending on the architecture (DMA for arm, DMA32 for arm64). Nicolas Boichat (3): mm: slab/slub: Add check_slab_flags function to check for valid flags mm: Add support for SLAB_CACHE_DMA32 iommu/io-pgtable-arm-v7s: Request DMA32 memory, and improve debugging drivers/iommu/io-pgtable-arm-v7s.c | 20 ++++++++++++++++---- include/linux/slab.h | 2 ++ mm/internal.h | 21 +++++++++++++++++++-- mm/slab.c | 10 +++------- mm/slab.h | 3 ++- mm/slab_common.c | 2 +- mm/slub.c | 24 +++++++++++++++++------- 7 files changed, 60 insertions(+), 22 deletions(-)