* [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init
@ 2018-09-12 16:45 Zubin Mithra
2018-09-12 16:50 ` Guenter Roeck
2018-09-12 21:27 ` [tip:perf/core] perf/x86/intel/pt: Annotate 'pt_cap_group' " tip-bot for Zubin Mithra
0 siblings, 2 replies; 3+ messages in thread
From: Zubin Mithra @ 2018-09-12 16:45 UTC (permalink / raw)
To: tglx, mingo, hpa, x86; +Cc: linux-kernel, groeck, keescook, zsm
pt_cap_group is written to in pt_pmu_hw_init and not modified after. This makes
it a suitable candidate for annotating as __ro_after_init.
Signed-off-by: Zubin Mithra <zsm@chromium.org>
---
arch/x86/events/intel/pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 8d016ce5b80d..3a0aa83cbd07 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
}
-static struct attribute_group pt_cap_group = {
+static struct attribute_group pt_cap_group __ro_after_init = {
.name = "caps",
};
--
2.18.0.597.ga71716f1ad-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init
2018-09-12 16:45 [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init Zubin Mithra
@ 2018-09-12 16:50 ` Guenter Roeck
2018-09-12 21:27 ` [tip:perf/core] perf/x86/intel/pt: Annotate 'pt_cap_group' " tip-bot for Zubin Mithra
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2018-09-12 16:50 UTC (permalink / raw)
To: Zubin Mithra
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel,
Guenter Roeck, Kees Cook
On Wed, Sep 12, 2018 at 9:45 AM Zubin Mithra <zsm@chromium.org> wrote:
>
> pt_cap_group is written to in pt_pmu_hw_init and not modified after. This makes
> it a suitable candidate for annotating as __ro_after_init.
>
> Signed-off-by: Zubin Mithra <zsm@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
> ---
> arch/x86/events/intel/pt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
> index 8d016ce5b80d..3a0aa83cbd07 100644
> --- a/arch/x86/events/intel/pt.c
> +++ b/arch/x86/events/intel/pt.c
> @@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
> return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
> }
>
> -static struct attribute_group pt_cap_group = {
> +static struct attribute_group pt_cap_group __ro_after_init = {
> .name = "caps",
> };
>
> --
> 2.18.0.597.ga71716f1ad-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
2018-09-12 16:45 [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init Zubin Mithra
2018-09-12 16:50 ` Guenter Roeck
@ 2018-09-12 21:27 ` tip-bot for Zubin Mithra
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Zubin Mithra @ 2018-09-12 21:27 UTC (permalink / raw)
To: linux-tip-commits
Cc: torvalds, groeck, hpa, linux-kernel, mingo, tglx, zsm, peterz
Commit-ID: 49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61
Gitweb: https://git.kernel.org/tip/49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61
Author: Zubin Mithra <zsm@chromium.org>
AuthorDate: Wed, 12 Sep 2018 09:45:10 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 12 Sep 2018 21:16:16 +0200
perf/x86/intel/pt: Annotate 'pt_cap_group' with __ro_after_init
'pt_cap_group' is written to in pt_pmu_hw_init() and not modified after.
This makes it a suitable candidate for annotating as __ro_after_init.
Signed-off-by: Zubin Mithra <zsm@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: keescook@chromium.org
Link: http://lkml.kernel.org/r/20180912164510.23444-1-zsm@chromium.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/events/intel/pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
index 8d016ce5b80d..3a0aa83cbd07 100644
--- a/arch/x86/events/intel/pt.c
+++ b/arch/x86/events/intel/pt.c
@@ -95,7 +95,7 @@ static ssize_t pt_cap_show(struct device *cdev,
return snprintf(buf, PAGE_SIZE, "%x\n", pt_cap_get(cap));
}
-static struct attribute_group pt_cap_group = {
+static struct attribute_group pt_cap_group __ro_after_init = {
.name = "caps",
};
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-12 21:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 16:45 [PATCH] perf/pt: Annotate pt_cap_group with __ro_after_init Zubin Mithra
2018-09-12 16:50 ` Guenter Roeck
2018-09-12 21:27 ` [tip:perf/core] perf/x86/intel/pt: Annotate 'pt_cap_group' " tip-bot for Zubin Mithra
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).