lkml.org 
[lkml]   [2018]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/4] x86/boot/KASLR: Walk srat tables to filter immovable memory
On 08/27/18 at 10:56am, Chao Fan wrote:

> >> +#ifdef CONFIG_MEMORY_HOTREMOVE
> >> +/*
> >> + * According to ACPI table, filter the immvoable memory regions
> >> + * and store them in immovable_mem[].
> >> + */
> >> +static void handle_immovable_mem(void)
> >
> >Can we change this function like below, passed in the immovable_mem and
> >the array lengty, the value of num_immovable_mem will be passed back?
> >
> >static void handle_immovable_mem(char* region, int max, int *num)
> >{
> >}
> >
> >Like this, you don't need patch 1/4 to make a header file, just put this
> >function handle_immovable_mem() into acpitb.c since it's handling acpi
> >tables. And its name can be get_immovable_mem().
>
> That makes sense.
> But if we change like this, we can put the whole function to acpitb.c.
> It will be like:
> static void handle_immovable_mem(int *num)
> {
> }
> Because the value of immovable_mem is filled in handle_immovable_mem,
> it's better to put immovable_mem in acpitb.c also, then extern in
> kaslr.c.

Yes, it's fine to me. Thanks.

>
>

\
 
 \ /
  Last update: 2018-08-27 05:09    [W:0.049 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site