From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Alexander Antonov <alexander.antonov@linux.intel.com>
Subject: Re: [PATCH 1/4] perf/x86/intel/uncore: Constify intel_uncore_ops
Date: Tue, 8 Jun 2021 15:50:52 -0400 [thread overview]
Message-ID: <c823311c-7685-17fa-aa62-25746d768474@linux.intel.com> (raw)
In-Reply-To: <YL/CQIA0vk1CiQcf@rikard>
On 6/8/2021 3:17 PM, Rikard Falkeborn wrote:
> On Mon, Jun 07, 2021 at 03:09:11PM -0400, Liang, Kan wrote:
>>
>> On 6/5/2021 11:56 AM, Rikard Falkeborn wrote:
>>> These are not modified, so make them const to allow the compiler to put
>>> them in read-only memory.
>> For most of the cases, yes, but the ops are modified for the TGL/RKL. We may
>> want to create a read-only ops for the TGL/RKL as below, and make both
>> skl_uncore_msr_ops and rkl_uncore_msr_ops const as well.
>>
> Thanks for the feedback.
>
> Yes, that was the odd one out, the commit message could have been
> clearer. What I meant above was "Constify all intel_uncore_ops that are
> not modified", which was all but skl_uncore_msr_ops. So the patch is
> correct, but in order to also constify skl_uncore_msr_ops, we could do
> as you suggested. Is it worth doing?
Since the patch set changes the intel_uncore_ops *ops to const, I think
it's better to change them all at once. It will bring confusion if some
of them are read-only but others can be modified.
> And if so, in a V2 of this patch,
> or as a follow-up patch?
Either is fine for me.
Thanks,
Kan
next prev parent reply other threads:[~2021-06-08 19:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 15:56 [PATCH 0/4] perf/x86/intel: Constify static structs Rikard Falkeborn
2021-06-05 15:56 ` [PATCH 1/4] perf/x86/intel/uncore: Constify intel_uncore_ops Rikard Falkeborn
2021-06-07 19:09 ` Liang, Kan
2021-06-08 19:17 ` Rikard Falkeborn
2021-06-08 19:50 ` Liang, Kan [this message]
2021-06-05 15:56 ` [PATCH 2/4] perf/x86/intel: Constify static attribute_group structs Rikard Falkeborn
2021-06-05 15:56 ` [PATCH 3/4] perf/x86/intel/uncore: Constify freerunning_counters Rikard Falkeborn
2021-06-05 15:56 ` [PATCH 4/4] perf/x86/intel/uncore: Constify unmodified static extra_reg structs Rikard Falkeborn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c823311c-7685-17fa-aa62-25746d768474@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=alexander.antonov@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rikard.falkeborn@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).