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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 052CAC43331 for ; Fri, 6 Sep 2019 17:41:44 +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 CF47C206BB for ; Fri, 6 Sep 2019 17:41:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LmE6e6S7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="KWbZvsNI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF47C206BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nma5CTaGmXsYLLD8EKAGv7PPgKHICFBPNpJmVwWzZMs=; b=LmE6e6S75lPkto 51bHkzMCXv4MgQ7+QIMHeqMP+eaFMWv44isYTq1/8dUKjXy990UL9fxfXfaOy+4KA2U8IiBVXXqhS ERtW8XvMGts6RkViuYLyX3n2F9LSEssLK7zrfgBu8fwlmjh9ufNazR4kglYCUem8oaSjTWzNBBi5W K9rchiRe50978USEf1Yw75DETYw+1PztvfpjqtbT2ZSDdRclLpHGaJM0kInYHTNeSNdSYTIpkN7+B RoMBKGhzDAGntbBowttYJfw5UjdP5dR0p0yvGmVmy1N2JYc22TtpLT/WIvvtpdCj7UNOVglszcIO5 DHWNpMavxgzdbeJUOMew==; 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 1i6IEq-00006r-PT; Fri, 06 Sep 2019 17:41:36 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i6IEk-0008WO-Dy for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2019 17:41:32 +0000 Received: by mail-ed1-x543.google.com with SMTP id a23so4776253edv.5 for ; Fri, 06 Sep 2019 10:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VBkiR/7BisGtZVmNVXhHtJrfmofi1qU8Pxcjpjv/ZgU=; b=KWbZvsNIkISQq4DJ0Jn0+DC13xFv36DJ+INz1iCwsDURlinnxi/FqltluIcUdyKEH+ rohLlAAcGa9S/ZYLvc1vTaR6e7aQaHawkNyzLp29w4f6Au1gxqx6ccQi15xWrUysZLko l0O4EcJcNb3Zxrza5Xu2Cdd0Q8c1MNJiep4Y23PuKjCm1JHlOUjUXO3rjxiUgpMuxdBZ 195WYeYAEX+sfEiPtjph8YRPHJ5jQAWbkYH6/UE6sgH5I3Tkdk2sSbsvvqd+Xnpv0uvu 1ilSBFkcIXgD0EgHuYTfM1YDM5ly+poGMtxFMSDOaOGhgSkdDDpWTmBO4MBPmbtsnmHo MKVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VBkiR/7BisGtZVmNVXhHtJrfmofi1qU8Pxcjpjv/ZgU=; b=cmKFcmNiKWq6rmDe8AvsHC5uh40LaFT96WUw06KfwSZGOJXWSPm6wrDGPjkLoRw5n4 x0MUGSH3NSeNEbzIjCNNdm/b7fBwt2rHkHy1Q3nBrV5/gmDWlTdgxrOg3LR1paKvh8ry w9j7MVGV5r5BtUKQviYUE376teTjCeYBudMkSGEIr1aBGEBMmGr5x0Uh4ugVsDVRKjEn pMqxecyGT2C1ouCT4W7MIvyK2GhFNuyCPeC/Q6PV8eRvSy3K3G5ifZxLUjU+ZFTkrqo1 w9sY4rdINelsa+Dht8762VBb2m2ONTkPE/K/HnabOf6KFOEleFXpF5XKNMO685rUk2MM ZxkA== X-Gm-Message-State: APjAAAVWNATkxHbsa00mLK9lfDA0CDKFamwYRXkiox7Y93PBcoCSb6V7 xB70I5FD9UipJNkQMXyxCqt9l/nzC8T8LycNGmECGg== X-Google-Smtp-Source: APXvYqzdydAQq2XsQ/paSb9m4rgwscf0/CCdiPGGGSWL+1ARUwePukKygj3cKHXfmSeUdjAS/Egx8Zb0S9m9dpj+AVQ= X-Received: by 2002:aa7:c40c:: with SMTP id j12mr11037477edq.80.1567791688713; Fri, 06 Sep 2019 10:41:28 -0700 (PDT) MIME-Version: 1.0 References: <20190821183204.23576-1-pasha.tatashin@soleen.com> <20190821183204.23576-8-pasha.tatashin@soleen.com> In-Reply-To: From: Pavel Tatashin Date: Fri, 6 Sep 2019 13:41:17 -0400 Message-ID: Subject: Re: [PATCH v3 07/17] arm64, hibernate: move page handling function to new trans_pgd.c To: James Morse X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190906_104130_888056_6F86FBA5 X-CRM114-Status: GOOD ( 17.87 ) 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: Sasha Levin , Mark Rutland , Vladimir Murzin , Jonathan Corbet , Marc Zyngier , Catalin Marinas , Bhupesh Sharma , kexec mailing list , LKML , James Morris , linux-mm , "Eric W. Biederman" , Matthias Brugger , will@kernel.org, Linux ARM 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 Fri, Sep 6, 2019 at 11:18 AM James Morse wrote: > > Hi Pavel, > > On 21/08/2019 19:31, Pavel Tatashin wrote: > > Now, that we abstracted the required functions move them to a new home. > > Later, we will generalize these function in order to be useful outside > > of hibernation. > > > diff --git a/arch/arm64/mm/trans_pgd.c b/arch/arm64/mm/trans_pgd.c > > new file mode 100644 > > index 000000000000..00b62d8640c2 > > --- /dev/null > > +++ b/arch/arm64/mm/trans_pgd.c > > @@ -0,0 +1,211 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > + > > +/* > > + * Copyright (c) 2019, Microsoft Corporation. > > + * Pavel Tatashin > > Hmmm, while line-count isn't a useful metric: this file contains 41% of the code that was > in hibernate.c, but has stripped the substantial copyright-pedigree that the hibernate > code had built up over the years. > (counting lines identified by 'cloc' as code, not comments or blank) > > If you are copying or moving a non trivial quantity of code, you need to preserve the > copyright. Something like 'Derived from the arm64 hibernate support which has:'.... I will do that. The copyright thing was meant to appear in "generalization" patch that comes later, where I unified most of the code to be symmetric. So, I will add it there, and also do the derived message that you suggested. > > > > + */ > > + > > +/* > > + * Transitional tables are used during system transferring from one world to > > + * another: such as during hibernate restore, and kexec reboots. During these > > + * phases one cannot rely on page table not being overwritten. > > I think you need to mention that hibernate and kexec are rewriting memory, and may > overwrite the live page tables, therefore ... Will add, thank you. Pasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel