Re: [PATCH v2 10/18] x86, acpi: Try to find if SRAT is overrided earlier.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-08-02 at 13:49 +0800, Tang Chen wrote:
> On 08/02/2013 09:19 AM, Toshi Kani wrote:
> ......
> >> +phys_addr_t __init early_acpi_override_srat(void)
> >> +{
> >> +	int i;
> >> +	u32 length;
> >> +	long offset;
> >> +	void *ramdisk_vaddr;
> >> +	struct acpi_table_header *table;
> >> +	struct cpio_data file;
> >> +	unsigned long map_step = NR_FIX_BTMAPS<<  PAGE_SHIFT;
> >> +	phys_addr_t ramdisk_image = get_ramdisk_image();
> >> +	char cpio_path[32] = "kernel/firmware/acpi/";
> >
> > Don't you need to check if ramdisk is present before parsing the table?
> > You may need something like:
> >
> >    if (!ramdisk_image || !get_ramdisk_size())
> >          return 0;
> 
> Yes, it is better to do such a check here. But is there a possibility that
> no ramdisk is present and we come to setup_arch() ?

Without a ramdisk, the boot procedure will likely fail in mounting the
root disk due to missing drivers.  But it should come to setup_arch()
without it.

Thanks,
-Toshi


> 
> ......
> >> +
> >> +	return ramdisk_image;
> >
> > Doesn't this function return a physical address regardless of SRAT if a
> > ramdisk is present?
> 
> Yes, and it is not good. I'll add the check above so that this won't happen.
> 
> Thanks.
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux