Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3708627imw; Mon, 11 Jul 2022 14:10:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmWEO9eUDSAL6ZyKMfKVo69amyHQfpr9BGLMmoq6I4zPqZdlTvBkGAMTgys/XPXjaECNYd X-Received: by 2002:a17:906:cc48:b0:72a:ff94:d5df with SMTP id mm8-20020a170906cc4800b0072aff94d5dfmr19610329ejb.693.1657573838522; Mon, 11 Jul 2022 14:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657573838; cv=none; d=google.com; s=arc-20160816; b=FLw76PvCQaf1JhnsnY2dsRVlW7cbS3SrH/CSFmFPWTbFg5G1VeNj4RCMX6XKSJBuGm 8kDM0aUUijoTGGQDWPCwBLZx3QVJiafpvx1nFJATC4VI5qO11i30Yhjf1WhaXGpjQsVu txJW8n2eM8JFB2gMjRWueLNE3EAWnpdVbuHd/Sd4cZOLqAEU0DdGHWQMZ+RhtR3NQxYj /+00tGqQPHw9aC+j4p6PW4itCrZs263OsGZ5N6uD01SkqlXdnjQ/KEcvAvOabBlpe7Z2 HhEjEgfzmwbHvcAiI0kusYev+eYup7oF5TeFyBx4CwkIn09fMHhKE32fjHi0x3Up5BBv QTQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=CL88HUxJjuIvMfJ1SUVnNHh234wRUIt4xMlo90AZxro=; b=RgFNZvKhpobrXOzob0PF7YezhNpRmft13QElase9SsVeJpJnU2d5bnYdt1eSiUe6cj QKLJMYJRLnCUYVMGpM75sydcs51uuRFBPC90/pq9LkcQpKJcDxAoimrfbtTcwftvkrVO DVDP2hoMIA3lOYb5Fjmo85y9EfqZZhPR1znjwAWGm2yiP/IvKaHBi3IqFVu/KYQbcXby ekbYyPys/FQguvCULjHRtxc4FycaHQ0KPkspSXZojOUCErYER1GiamNm7x9s+o+s9N8M PhvBMlJ2wfkrbxNkkNgfwd//+FEl48dawrNTD4a/Z5aGtVmuENd2s0svt/bVxR4KxhDm TlZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VwcXpE0F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du20-20020a17090772d400b0072b67a5560fsi4496721ejc.1005.2022.07.11.14.10.13; Mon, 11 Jul 2022 14:10:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VwcXpE0F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231601AbiGKUxR (ORCPT + 99 others); Mon, 11 Jul 2022 16:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbiGKUxP (ORCPT ); Mon, 11 Jul 2022 16:53:15 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D3952E79; Mon, 11 Jul 2022 13:53:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 14F9ECE17D7; Mon, 11 Jul 2022 20:53:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAFFDC34115; Mon, 11 Jul 2022 20:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657572791; bh=KXWk2bwFJGa9viXQjgAbCz3X/tgVw7ZmGdeVHoxdjSs=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=VwcXpE0FwrmOYBh/WgN9Y4npxfHq0ApT+kDw1RnvbQdp81F5iVCR0cx2beMmsgQS4 18768pyPV/FKK4FOYNj+WXWntfcx7oVgK3yA1Glls4So9XytSNe02a/czKjfdSKlw5 /b7k+CGtcBqjLhi034R1q8/ETTUMEuRRU2A8C71BM79pKYS1Jqlx24MmK4Jt2T14Xn OP0VHnx69/Z4RW9XCPpXKgfhvaz3aFFtZjULsYprdtxRoASmAGgdK758EiWN1XGQQV jJmh50BMd4SAIevYQMxjD4jHK9t5bK75fwhJtHh+yQt6JuLCDadfQR6f+jn7NXbJcg Z5LqooGnizDqg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <98363f27-e7a4-7351-fad7-361f7e465b7e@suse.cz> References: <20220623083217.26433-1-jslaby@suse.cz> <20220624004225.0DE4AC3411D@smtp.kernel.org> <0edab0e2-5355-a3da-445d-b6f45e3082ed@suse.cz> <20220629082104.E25D2C34114@smtp.kernel.org> <98363f27-e7a4-7351-fad7-361f7e465b7e@suse.cz> Subject: Re: [PATCH 1/2] clk: pistachio: Fix initconst confusion From: Stephen Boyd Cc: mliska@suse.cz, linux-kernel@vger.kernel.org, Andi Kleen , linux-clk@vger.kernel.org To: Jiri Slaby , mturquette@baylibre.com Date: Mon, 11 Jul 2022 13:53:09 -0700 User-Agent: alot/0.10 Message-Id: <20220711205310.EAFFDC34115@smtp.kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jiri Slaby (2022-07-08 00:16:12) > On 29. 06. 22, 10:21, Stephen Boyd wrote: > > Quoting Jiri Slaby (2022-06-27 00:46:15) > >> On 24. 06. 22, 2:42, Stephen Boyd wrote: > >>> Quoting Jiri Slaby (2022-06-23 01:32:16) > >>>> From: Andi Kleen > >>>> > >>>> A variable pointing to const isn't const itself. It'd have to contain > >>>> "const" keyword after "*" too. Therefore, PNAME() cannot put the str= ings > >>>> to "rodata". Hence use __initdata instead of __initconst to fix thi= s. > >>>> > >>>> [js] more explanatory commit message. > >>>> > >>>> Cc: Michael Turquette > >>>> Cc: Stephen Boyd > >>>> Cc: linux-clk@vger.kernel.org > >>>> Signed-off-by: Andi Kleen > >>>> Signed-off-by: Jiri Slaby > >>>> --- > >>>> drivers/clk/pistachio/clk.h | 2 +- > >>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>> > >>>> diff --git a/drivers/clk/pistachio/clk.h b/drivers/clk/pistachio/clk= .h > >>>> index f9c31e3a0e47..742e5fab00c0 100644 > >>>> --- a/drivers/clk/pistachio/clk.h > >>>> +++ b/drivers/clk/pistachio/clk.h > >>>> @@ -34,7 +34,7 @@ struct pistachio_mux { > >>>> const char **parents; > >>>> }; > >>>> =20 > >>>> -#define PNAME(x) static const char *x[] __initconst > >>>> +#define PNAME(x) static const char *x[] __initdata > >>> > >>> Can it be const char * const and left as __initconst? > >> > >> Let me check, IIRC the struct where this is assigned would need to be > >> updated too. > >> > >> I will get into it only some time next week. > >> > >=20 > > Ok, sounds good. This seems to at least compile locally. >=20 > Yeah, that works. I've sent a v2. >=20 > BTW is the code intended to put the actual strings to .init.rodata? As=20 > that was never the case. Only those PNAME defined arrays (pointers to=20 > strings) end up in .init.rodata now and the strings are in .rodata. I think both the strings and the array should be in .init.rodata. The clk framework deep copies data like parent names.