[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+CK2bBK40T_DEhNvz8nQaKSsanxXpGYhBm05N_NmZtq+JDVTg@mail.gmail.com>
Date: Tue, 10 Sep 2019 10:20:43 +0100
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: Matthias Brugger <mbrugger@...e.com>
Cc: James Morris <jmorris@...ei.org>, Sasha Levin <sashal@...nel.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
kexec mailing list <kexec@...ts.infradead.org>,
LKML <linux-kernel@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>, will@...nel.org,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Marc Zyngier <marc.zyngier@....com>,
James Morse <james.morse@....com>,
Vladimir Murzin <vladimir.murzin@....com>,
Bhupesh Sharma <bhsharma@...hat.com>,
linux-mm <linux-mm@...ck.org>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH v4 10/17] arm64: trans_pgd: make trans_pgd_map_page generic
> > +/*
> > + * Add map entry to trans_pgd for a base-size page at PTE level.
> > + * page: page to be mapped.
> > + * dst_addr: new VA address for the pages
> > + * pgprot: protection for the page.
>
> For consistency please describe all function parameters. From my experience
> function parameter description is normally done in the C-file that implements
> the logic. Don't ask me why.
Ok, I move the comment, and will describe every parameter. Thank you.
>
> > + */
> > +int trans_pgd_map_page(struct trans_pgd_info *info, pgd_t *trans_pgd,
> > + void *page, unsigned long dst_addr, pgprot_t pgprot);
> >
> > #endif /* _ASM_TRANS_TABLE_H */
> > diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
> > index 94ede33bd777..9b75b680ab70 100644
> > --- a/arch/arm64/kernel/hibernate.c
> > +++ b/arch/arm64/kernel/hibernate.c
> > @@ -179,6 +179,12 @@ int arch_hibernation_header_restore(void *addr)
> > }
> > EXPORT_SYMBOL(arch_hibernation_header_restore);
> >
> > +static void *
> > +hibernate_page_alloc(void *arg)
>
> AFAICS no new line needed here.
Right, will fix it.
>
> > +{
> > + return (void *)get_safe_page((gfp_t)(unsigned long)arg);
> > +}
> > +
> > /*
> > * Copies length bytes, starting at src_start into an new page,
> > * perform cache maintenance, then maps it at the specified address low
> > @@ -195,6 +201,10 @@ static int create_safe_exec_page(void *src_start, size_t length,
> > unsigned long dst_addr,
> > phys_addr_t *phys_dst_addr)
> > {
> > + struct trans_pgd_info trans_info = {
> > + .trans_alloc_page = hibernate_page_alloc,
> > + .trans_alloc_arg = (void *)GFP_ATOMIC,
> > + };
>
> New line between end of struct and other variables.
Sure.
>
> With these changes:
> Reviewed-by: Matthias Brugger <mbrugger@...e.com>
Thank you,
Pasha
Powered by blists - more mailing lists