From: Marek Vasut Date: Sun, 7 Feb 2021 15:33:25 +0100 Subject: [RESEND PATCH 12/16] arm: omap3: Compile lowlevel_init() function only when it is used In-Reply-To: <20210207135041.mzskgseawrky5ohj@pali> References: <20210205191212.7644-1-pali@kernel.org> <20210205191212.7644-13-pali@kernel.org> <929660ba-ee14-1586-d481-494ea987887f@denx.de> <20210206154550.slnaaubqtrpzdq5j@pali> <20210207135041.mzskgseawrky5ohj@pali> Message-ID: <1ee58dec-152c-f4e8-e94f-cc438cf84c8a@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2/7/21 2:50 PM, Pali Roh?r wrote: > On Saturday 06 February 2021 17:50:54 Marek Vasut wrote: >> On 2/6/21 4:45 PM, Pali Roh?r wrote: >>> On Saturday 06 February 2021 16:40:18 Marek Vasut wrote: >>>> On 2/5/21 8:12 PM, Pali Roh?r wrote: >>>>> Function lowlevel_init() is called only from cpu_init_crit() and this >>>>> function is wrapped into #if .. #endif section. So compile also >>>>> lowlevel_init() function under same #if condition. >>>>> >>>>> Signed-off-by: Pali Roh?r >>>>> --- >>>>> arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- >>>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/arch/arm/mach-omap2/omap3/lowlevel_init.S b/arch/arm/mach-omap2/omap3/lowlevel_init.S >>>>> index 2a05b5e521..4fa89418a1 100644 >>>>> --- a/arch/arm/mach-omap2/omap3/lowlevel_init.S >>>>> +++ b/arch/arm/mach-omap2/omap3/lowlevel_init.S >>>>> @@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) >>>>> ENTRY(cpy_clk_code) >>>>> /* Copy DPLL code into SRAM */ >>>>> adr r0, go_to_speed /* copy from start of go_to_speed... */ >>>>> - adr r2, lowlevel_init /* ... up to start of low_level_init */ >>>>> + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ >>>>> next2: >>>>> ldmia r0!, {r3 - r10} /* copy from source address [r0] */ >>>>> stmia r1!, {r3 - r10} /* copy to target address [r1] */ >>>>> @@ -167,8 +167,11 @@ pll_div_add5: >>>>> pll_div_val5: >>>>> .word CLSEL1_EMU_VAL >>>>> +go_to_speed_end: >>>>> #endif >>>> >>>> This hunk above seems like an unrelated change ^ ? >>> >>> Entry 'lowlevel_init' is defined 3 lines below and is available only >>> when !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_SKIP_LOWLEVEL_INIT_ONLY. >>> >>> Few lines above is code which copies DPLL code into SRAM and this code >>> ends at address where 'lowlevel_init' entry starts. >>> >>> Entry 'cpy_clk_code' is compiled also when CONFIG_SKIP_LOWLEVEL_INIT is >>> defined, therefore it is required to define label which is outside of >>> the #if code defined below and ends after the 'go_to_speed' code. >>> >>> So I defined a new 'go_to_speed_end' label to allow compiling >>> 'cpy_clk_code' entry when CONFIG_SKIP_LOWLEVEL_INIT is defined. >> >> Can you add exactly this description to the commit message -- the change >> isn't immediately obviously, collect the RBs and resend the patchset, so it >> can be picked ? > > Done! I fixed commit messages and sent all patches again. Thanks