Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1468215
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section |
| Date | 2016-08-23 03:00 +0200 |
| Message-ID | <s98em-5c0-7@gated-at.bofh.it> (permalink) |
| References | <s8NCV-mn-3@gated-at.bofh.it> <s8NCV-mn-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/22, Chanwoo Choi wrote:
> This patch moves the all samsung_cmu_info struct to initconst section
> because they are used only in initconst section.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
> drivers/clk/samsung/clk-exynos5260.c | 350 +++++++++++++++++------------------
> 1 file changed, 175 insertions(+), 175 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
> index a43642c36039..fd1d9bfc151b 100644
> --- a/drivers/clk/samsung/clk-exynos5260.c
> +++ b/drivers/clk/samsung/clk-exynos5260.c
> @@ -131,21 +131,21 @@ static const struct samsung_gate_clock aud_gate_clks[] __initconst = {
> EN_IP_AUD, 4, 0, 0),
> };
>
> +static const struct samsung_cmu_info aud_cmu __initconst = {
> + .mux_clks = aud_mux_clks,
> + .nr_mux_clks = ARRAY_SIZE(aud_mux_clks),
> + .div_clks = aud_div_clks,
> + .nr_div_clks = ARRAY_SIZE(aud_div_clks),
> + .gate_clks = aud_gate_clks,
> + .nr_gate_clks = ARRAY_SIZE(aud_gate_clks),
> + .nr_clk_ids = AUD_NR_CLK,
> + .clk_regs = aud_clk_regs,
> + .nr_clk_regs = ARRAY_SIZE(aud_clk_regs),
> +};
> +
> static void __init exynos5260_clk_aud_init(struct device_node *np)
> {
> - struct samsung_cmu_info cmu = { NULL };
> -
I presume this was done this way to save some initdata space by
only allocating the array that's needed at runtime? I would
expect to see some more kernel image bloat from this change but
runtime memory usage would stay the same. Is there any real
benefit from this patch though?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-22 05:00 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-23 03:00 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-23 04:40 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Sylwester Nawrocki <s.nawrocki@samsung.com> - 2016-08-23 12:20 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-24 06:50 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-24 10:40 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Stephen Boyd <sboyd@codeaurora.org> - 2016-08-25 07:00 +0200
Re: [PATCH 1/2] clk: samsung: exynos5260: Move struct samsung_cmu_info to init section Chanwoo Choi <cw00.choi@samsung.com> - 2016-08-25 09:50 +0200
csiph-web