From patchwork Mon Jul 1 06:40:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11025105 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 03F54746 for ; Mon, 1 Jul 2019 06:41:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 051C4284DA for ; Mon, 1 Jul 2019 06:41:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED35A284ED; Mon, 1 Jul 2019 06:41:04 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 99151284DA for ; Mon, 1 Jul 2019 06:41:04 +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=MMl8OowmJsTUqfrkexN7tdJSoOsi5CN/EAH7iCKlB5w=; b=vBTtRHqhsusGWj LRrnCQFrRuEZ4N6r9Vl+GSISoZhtcyUfmRUOXQUtU75/0woQcfEsISyhmY3KjCXVxpMxQkygUH6IJ XJsoBRbTse7c/3cSJHmPpgctdYIHFcDFZ3nGmZrgDBTOjLajNZMuPXjgshKHNpNouCAiMLSX2b38q 0NKiJXVUd2y4Yf4BoWi+iWBaVS1LvoRTKtZyLzwZk7/wKp99G9su7jUfDHf0sK3Nw+GnfsY8v8+1Z N74SY2K6VG/8cxWGaelcjca1dyZOmkiMwner6kskvybQ+vwXhfFhRH6htkqInHoY6LYwBPlZhXjNV fvMhSk7zU20BOYuWN6gA==; 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 1hhpzk-0005cO-2b; Mon, 01 Jul 2019 06:40:56 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhpzh-0005bE-Ex for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2019 06:40:54 +0000 Received: by mail-pf1-x444.google.com with SMTP id q10so6042543pff.9 for ; Sun, 30 Jun 2019 23:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dcNOnkZ3QNA3naQZL2QsN8O60WJ6liuss/shdVWzI/w=; b=jt7i+Ah0OIALx3FcRZ1UZkdX1H4ILpm/ltZc9KwQYbH8WrH3GEdinTHq+ex7/HsTed Q/DFlt5PofGsqai1Az11oYNvC8+cxbsQJXJx40MYtNrrkVLO3bvbYJT8wLGxeNRtOg+o 57Hf/eY+JfZUT3NpcNl6/8Uk+X1AO8MWtOT3zpnCnacQdmAqcwOrmxUTuqxdZ7RhEzqK Am48lIIHnwHV8AfSk/jpE+HgXctcEK5PWZhSQXmtFvkQPkQZ3BwTSuM3AfroF++KSYjC 9/BpKeJlEHYoI/ciZKoAF3S3Fc7bM+QF/p7hCLb11IzbCjyKkltoxPZepQ/YfMGX1jkD GVlQ== 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=dcNOnkZ3QNA3naQZL2QsN8O60WJ6liuss/shdVWzI/w=; b=j/kE9cxArHVKl1dTrt5PiuWcKRFbH469bHKqwOAj3sqW0crBeFKb6wRD9rK+21M2us SzgEKXi1adpsGr+rGr8z28A4L+QVRdcZ0z/GBa5T5j6+jZ7oSmuly3KB1aZaHPimpsp7 hZYTyqRXZBQ+9lth6zcAWyq5oNAlaOvUcQLCkfZQ2DHUXQxLT79aqIp83TzPyTox8wPu +jVxF5hkFoZ/2W/ORnhW7fIG9+Ks9uEgMMaUevyfBAOi9syLKdzdAvf3xTsWo1P79gGb yCGt1eW+NvXv1+ypXxObP+Mt1Jp7xx0EQlMva5G1WKRHryc6U1o6d6KHQ3Tka2cPxYQs FFCQ== X-Gm-Message-State: APjAAAXN8T7DriytZbtUK92s1XpmHxOQDjf/Z5tMmKDj82I+farAAND8 lSRz5G25lXD8TmB95tJw8do= X-Google-Smtp-Source: APXvYqyhm6G/Dxj/LNC8ofHNrlWkegS32az/Q37ZJ9wniqzmJWd0cS85z1rpS5JiVW3uLe2ZPBrYNQ== X-Received: by 2002:a65:5248:: with SMTP id q8mr14304334pgp.259.1561963249300; Sun, 30 Jun 2019 23:40:49 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id x128sm24238285pfd.17.2019.06.30.23.40.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 23:40:48 -0700 (PDT) From: Nicholas Piggin To: "linux-mm @ kvack . org" Subject: [PATCH v2 0/3] fix vmalloc_to_page for huge vmap mappings Date: Mon, 1 Jul 2019 16:40:23 +1000 Message-Id: <20190701064026.970-1-npiggin@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190630_234053_530096_8B012A38 X-CRM114-Status: GOOD ( 11.09 ) 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: Christophe Leroy , Mark Rutland , Anshuman Khandual , Ard Biesheuvel , Nicholas Piggin , Andrew Morton , "linuxppc-dev @ lists . ozlabs . org" , "linux-arm-kernel @ lists . infradead . org" 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 change broken out from the huge vmap vmalloc series as requested. There is a little bit of dependency juggling across trees, but patches are pretty trivial. Ideally if Andrew accepts this patch and queues it up for next, then the arch patches would be merged through those trees then patch 3 gets sent by Andrew. I've tested this with other powerpc and vmalloc patches, with code that explicitly tests vmalloc_to_page on vmalloced memory and results look fine. v2: change the order of testing pxx_large and pxx_bad, to avoid issues with arm64 Thanks, Nick Nicholas Piggin (3): arm64: mm: Add p?d_large() definitions powerpc/64s: Add p?d_large definitions mm/vmalloc: fix vmalloc_to_page for huge vmap mappings arch/arm64/include/asm/pgtable.h | 2 ++ arch/powerpc/include/asm/book3s/64/pgtable.h | 24 ++++++++----- include/asm-generic/4level-fixup.h | 1 + include/asm-generic/5level-fixup.h | 1 + mm/vmalloc.c | 37 +++++++++++++------- 5 files changed, 43 insertions(+), 22 deletions(-)