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: 10677521 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 7F98114E2 for ; Sun, 11 Nov 2018 09:04:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 655C02B08D for ; Sun, 11 Nov 2018 09:04:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 572722B098; Sun, 11 Nov 2018 09:04:07 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3502B08D for ; Sun, 11 Nov 2018 09:04:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7DF656B0003; Sun, 11 Nov 2018 04:04:05 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 78E3B6B0005; Sun, 11 Nov 2018 04:04:05 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67EB06B0006; Sun, 11 Nov 2018 04:04:05 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by kanga.kvack.org (Postfix) with ESMTP id 2824F6B0003 for ; Sun, 11 Nov 2018 04:04:05 -0500 (EST) Received: by mail-pl1-f198.google.com with SMTP id s24-v6so4712772plp.12 for ; Sun, 11 Nov 2018 01:04:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=YH0dpLemzETchXwysz1a293wDlVR1tlxLKZnu56Wuas=; b=H0OUz8AMwE36BnWdbTF3Ek1RZgtC1m0sEMTIobH4nXHkSFmTfP3X1LqbXsV4Jjsr/a adunO/OmE4vcli49QmAtuF4VvbUC/GDPIujO1Pd7c2hxXELf5THW8WjcFOyY7Zznjcv/ P3GOvNCttKOcKF8fuaIFOIhF20Pmj67fu7pFdMq0+rFJcfTe0E/O3Z0+GgKYCRVrTEMh RnRnI8ubxEMCdtlq0tIzIR603kUKDQEhY6QWKc3+YqkAS7G6TA/XXJQWs7VM9H9BA7et r5p6e6F3PQj7TyuyD6dB8gFjbkV3+qlK8aV0gPyXW29JZ2p7gcY2Vz4aINWA2YypzIPq zUgg== X-Gm-Message-State: AGRZ1gJu/lRs8RkTl1qZqJUOhvLV3FqjykI666bUE0EfhV52fXgMow/J xx3xH0Bzwpr0e+UzT13py3whcPEkO/rQH21u7DSxBWPmj4gdc0eiwWog6/+Jcs2gN98VZIevXg/ i0sj7yN0gMTAxqNAEsDOmiOLZfG1M5UhbBSUYg126lxki0y6iT8xjqujU04xJVov5AyOwzNe/PP 0SX8VLL6W1PgNlBeYGsODcn5bqeORSzZzUHGJdRobqZhfE1eTuo9cHBM7ZmkH2iWt4BfDXwEX7Z PJY7vkokLg4ayQ5opqcrWLpbv9OoZMMLkWD0vvUsvwA4OUZtVAbbbRmVdscjedSObYZlSHGi89x Fnsia6SL/tFWqReOKGo0gG2S2ZlB1Uh7SNZ8iPiwhnRpvDNfOpTaaCfL7xr4laW913N1hYfJ2gV + X-Received: by 2002:a17:902:7481:: with SMTP id h1-v6mr343999pll.172.1541927044715; Sun, 11 Nov 2018 01:04:04 -0800 (PST) X-Received: by 2002:a17:902:7481:: with SMTP id h1-v6mr343961pll.172.1541927043808; Sun, 11 Nov 2018 01:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541927043; cv=none; d=google.com; s=arc-20160816; b=CrHAjm6JODIn46usI+jiUP9AJEXAcLxb6jv1QD12Zac5nqPc7Va3xFxn1M4xDMfoy2 w/VWZEu4zfaoRLAaW/2hweC0l3XOw1fMFLvkaG0YkQdleV8D7e6ou8YJtQzww1cG6RZE c92efEMQQZKyNuK3CMzU9Rj9KFi0ao0fFG42ZHHd3BegraTRd5EZyAL1NCtSTX7IicKU kCGAN03im13hC9P8hf6GVQEByqBdKqc6o44GMNjq9smoOmaNVB7XbZa54QluHzcw/Kdf q2c8WNydHlodDY1dgG6BTc2TWnjtWLYKyKTVTcPAfkkF5sMIjZky6ell8x0oZCMXHx7M va+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=YH0dpLemzETchXwysz1a293wDlVR1tlxLKZnu56Wuas=; b=t+zKORSgVgBIKNbQ2SF/LganwhKIoh9i9CHUH/c4Kp4loJEZ/5uT3n9W+nM+8eHTGI EXcQSG4iolKEAi5/btZOp9Z3wtraA2kdjmf+SKxoeqaNQOaqptTiW6jfL0YVvQ0hoAc9 +Fbb61+O0/ZSXtFeBhqidWc7Kv8BIEIiNS0Ed3zlbz+L9du9NZF0BFDbHtyDooa8oxrG DJWt7ggGdHGnEbM04CC18DMr8wAmZd6lU7URkXZajo5QVJ7yBnY3S3wZaI4kH97lvm5i oEubPmCoUvQ5b60oYQ+YgtYwuEjq9cIrsERew3WAJ5FYfdzIi9LZCvo32kCBUURuPeek /rvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nTVGFkxO; spf=pass (google.com: domain of drinkcat@chromium.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=drinkcat@chromium.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id u10-v6sor15292483plr.61.2018.11.11.01.04.03 for (Google Transport Security); Sun, 11 Nov 2018 01:04:03 -0800 (PST) Received-SPF: pass (google.com: domain of drinkcat@chromium.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nTVGFkxO; spf=pass (google.com: domain of drinkcat@chromium.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=drinkcat@chromium.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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-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 Cc: Will Deacon , Joerg Roedel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Michal Hocko , Mel Gorman , Levin Alexander , Huaisheng Ye , Mike Rapoport , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Yong Wu , Matthias Brugger , Tomasz Figa , yingjoe.chen@mediatek.com 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-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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(-)