From patchwork Mon Jan 25 19:19:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12044123 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 BB858C433DB for ; Mon, 25 Jan 2021 19:19:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 69D9D224DF for ; Mon, 25 Jan 2021 19:19:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69D9D224DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 472B28D0001; Mon, 25 Jan 2021 14:19:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F2758D0025; Mon, 25 Jan 2021 14:19:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F00B48D0001; Mon, 25 Jan 2021 14:19:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id D50468D0023 for ; Mon, 25 Jan 2021 14:19:41 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BBF4C180AD804 for ; Mon, 25 Jan 2021 19:19:40 +0000 (UTC) X-FDA: 77745261720.30.music90_4f1495027588 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id F4132180B31BF for ; Mon, 25 Jan 2021 19:19:35 +0000 (UTC) X-HE-Tag: music90_4f1495027588 X-Filterd-Recvd-Size: 6108 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 19:19:35 +0000 (UTC) Received: by mail-qt1-f182.google.com with SMTP id z22so10513187qto.7 for ; Mon, 25 Jan 2021 11:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3FwrG1DRKa930mcqv1CQX/Ow19T+ppBoJGHaLYA3Zn4=; b=OMM+n/NgLxxolTPSpQfFupxi8pL7prIM8KcL0yuUt6nWfKRTlR6APYpr/V8F9WNvA1 ikIhnojbMioMSri7RLzroDZGFYn/E6gh220XP8IJyVS3exiStf/6gCaet1KfKtTGtzSB hUwZY6sdDa4bLX25PetOw90C87Q6MClcrvHBbWn37ai8bBgV5A9XsgIe+309KgWBm0o4 PM5Hgbdxd/Z4Wf3Z9Uy9rmMFm46l1p1ggWGl3Glxu55yQPOxsT+XaTwTkEaSpvjMbD6M 6rT7T58457HNNABrDb3FqPJjaoGnar+ESiEAa6nYAAfBmFI+ipXzsBU1dI23SbYeBsye z4Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3FwrG1DRKa930mcqv1CQX/Ow19T+ppBoJGHaLYA3Zn4=; b=mMnHFEtYhiT29lkYC1Fv+6RVuDCNoFzuTgZvYLZjKxNH3y6G/bg7Ce2+b+WQ3otHCc Oc1c2rT/d6e92P9VOv1AQsqZwzmNg13iRIVi+/HrdwkKIklzK90RHggb82ygVOPw3CXz Ud5NJIJS7iDXMBlSZd9ujKwS3I9CPPjc1MX02o6+SPVNBb5zAKZX+EIHuXV1I9pvl+HB rKAvfcn2ruhqs9VkVQXzhSRJIcpzgjUB820tSgOFfXO1tZUTYHqNqwiGR13gNYGM7d8x 55ImgEdj3YFWq8jTvv6TiXTlx1P1KhETe22d3rw9WH89QghPk04BvQy0uzv5ktB1KcD/ dX8g== X-Gm-Message-State: AOAM531z/YOIRBeUFftqmUR2tw+x9YZRUzEJOR+UeLTaHeaACEQOSLi7 3QgMGm1+o1YVoWf1sEi+SPzp1w== X-Google-Smtp-Source: ABdhPJzYpijMw9x6eiYnJkfIhvZXHqaaGkTUev606A5PQKAYeMNfq2YM+YhFDIUaCji9oVYPnb8lLA== X-Received: by 2002:ac8:3571:: with SMTP id z46mr2020689qtb.83.1611602374721; Mon, 25 Jan 2021 11:19:34 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id s6sm9047638qtx.63.2021.01.25.11.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 11:19:34 -0800 (PST) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de, selindag@gmail.com, tyhicks@linux.microsoft.com Subject: [PATCH v10 06/18] arm64: trans_pgd: pass NULL instead of init_mm to *_populate functions Date: Mon, 25 Jan 2021 14:19:11 -0500 Message-Id: <20210125191923.1060122-7-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210125191923.1060122-1-pasha.tatashin@soleen.com> References: <20210125191923.1060122-1-pasha.tatashin@soleen.com> 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: trans_pgd_* should be independent from mm context because the tables that are created by this code are used when there are no mm context around, as it is between kernels. Simply replace mm_init's with NULL. Signed-off-by: Pavel Tatashin Acked-by: James Morse --- arch/arm64/mm/trans_pgd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/mm/trans_pgd.c b/arch/arm64/mm/trans_pgd.c index 47b6b7029907..ded8e2ba0308 100644 --- a/arch/arm64/mm/trans_pgd.c +++ b/arch/arm64/mm/trans_pgd.c @@ -67,7 +67,7 @@ static int copy_pte(struct trans_pgd_info *info, pmd_t *dst_pmdp, dst_ptep = trans_alloc(info); if (!dst_ptep) return -ENOMEM; - pmd_populate_kernel(&init_mm, dst_pmdp, dst_ptep); + pmd_populate_kernel(NULL, dst_pmdp, dst_ptep); dst_ptep = pte_offset_kernel(dst_pmdp, start); src_ptep = pte_offset_kernel(src_pmdp, start); @@ -90,7 +90,7 @@ static int copy_pmd(struct trans_pgd_info *info, pud_t *dst_pudp, dst_pmdp = trans_alloc(info); if (!dst_pmdp) return -ENOMEM; - pud_populate(&init_mm, dst_pudp, dst_pmdp); + pud_populate(NULL, dst_pudp, dst_pmdp); } dst_pmdp = pmd_offset(dst_pudp, start); @@ -126,7 +126,7 @@ static int copy_pud(struct trans_pgd_info *info, p4d_t *dst_p4dp, dst_pudp = trans_alloc(info); if (!dst_pudp) return -ENOMEM; - p4d_populate(&init_mm, dst_p4dp, dst_pudp); + p4d_populate(NULL, dst_p4dp, dst_pudp); } dst_pudp = pud_offset(dst_p4dp, start); @@ -241,7 +241,7 @@ int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd, p4dp = trans_alloc(info); if (!pgdp) return -ENOMEM; - pgd_populate(&init_mm, pgdp, p4dp); + pgd_populate(NULL, pgdp, p4dp); } p4dp = p4d_offset(pgdp, dst_addr); @@ -249,7 +249,7 @@ int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd, pudp = trans_alloc(info); if (!pudp) return -ENOMEM; - p4d_populate(&init_mm, p4dp, pudp); + p4d_populate(NULL, p4dp, pudp); } pudp = pud_offset(p4dp, dst_addr); @@ -257,7 +257,7 @@ int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd, pmdp = trans_alloc(info); if (!pmdp) return -ENOMEM; - pud_populate(&init_mm, pudp, pmdp); + pud_populate(NULL, pudp, pmdp); } pmdp = pmd_offset(pudp, dst_addr); @@ -265,7 +265,7 @@ int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd, ptep = trans_alloc(info); if (!ptep) return -ENOMEM; - pmd_populate_kernel(&init_mm, pmdp, ptep); + pmd_populate_kernel(NULL, pmdp, ptep); } ptep = pte_offset_kernel(pmdp, dst_addr);