From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baoquan He Subject: Re: [PATCH v9 5/8] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdlien from kexec Date: Mon, 22 Oct 2018 14:06:13 +0800 Message-ID: <20181022060613.GK1885@192.168.1.4> References: <20181017102012.872-1-fanc.fnst@cn.fujitsu.com> <20181017102012.872-6-fanc.fnst@cn.fujitsu.com> <20181021022650.GI1885@192.168.1.4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Fan, Chao" , dyoung@redhat.com Cc: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "bp@alien8.de" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "keescook@chromium.org" , "msys.mizuma@gmail.com" , "Indoh, Takao" , "Cao, Jin" List-Id: linux-acpi@vger.kernel.org On 10/22/18 at 05:30am, Fan, Chao wrote: > >> +static void get_acpi_rsdp(acpi_physical_address *rsdp_addr) > >> +{ > >> +#ifdef CONFIG_KEXEC > >> + unsigned long long res; > >> + int len = 0; > >> + char *val; > >> + > >> + val = malloc(20); > > > >Why is the length 20? Defined a macro? > > > > Not a calculation, if it's enough to store the address, that will be OK. Sorry, I didn't catch. It's 16 in setup_acpi_rsdp() of drivers/acpi/osl.c . What does 'that' mean? Wondering why not making it 200, it's also enough to store the address.