[PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
From: f.fainelli@gmail.com (Florian Fainelli)
Date: 2018-11-13 00:52:56
Also in:
linux-devicetree, lkml
From: f.fainelli@gmail.com (Florian Fainelli)
Date: 2018-11-13 00:52:56
Also in:
linux-devicetree, lkml
On 11/12/18 4:40 PM, Vineet Gupta wrote:
On 11/12/18 4:38 PM, Florian Fainelli wrote:quoted
quoted
quoted
#ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); + if (phys_initrd_size) { + memblock_reserve(phys_initrd_start, phys_initrd_size); + initrd_start = (unsigned long)__va(phys_initrd_start); + initrd_end = initrd_start + phys_initrd_size; + } #endifThe common code now uses phys_initrd*, and you also use the same in ARC code, do we still need the initrd_* setting here ? ARC semantics was using them as PA anyways.Yes, the generic initrd code expects initrd_start/end to be virtual addresses, which we now directly derive from phys_initrd_start, that should really be equivalent.So we can skip this explicit setting above - ARC arch code doesn't access the virt initrd_start
OK, you are saying we could just have the generic initrd code do this assignment instead of having each architecture do it, is that a correct understanding? If so, I suppose it could be done, whether as of this patch series or as a follow-up, either way is fine with me. One possible caveat is if __va() and __phys_to_virt() behave differently (e.g: because of CONFIG_DEBUG_VIRTUAL or other things). -- Florian