* [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie
@ 2018-03-19 10:32 Christophe Leroy
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Christophe Leroy @ 2018-03-19 10:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood
Cc: linux-kernel, linuxppc-dev, Balbir Singh
commit 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
added tracepoints for tlbie calls, but _tlbil_va() was forgotten
Fixes: 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/mm/mmu_decl.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 57fbc554c785..b9991e0c61a2 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -21,6 +21,7 @@
#include <linux/mm.h>
#include <asm/tlbflush.h>
#include <asm/mmu.h>
+#include <asm/trace.h>
#ifdef CONFIG_PPC_MMU_NOHASH
@@ -56,6 +57,7 @@ static inline void _tlbil_va(unsigned long address, unsigned int pid,
unsigned int tsize, unsigned int ind)
{
asm volatile ("tlbie %0; sync" : : "r" (address) : "memory");
+ trace_tlbie(pid, 0, address, 0, 0, 0, 0);
}
#elif defined(CONFIG_PPC_BOOK3E)
extern void _tlbil_va(unsigned long address, unsigned int pid,
--
2.13.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] powerpc/mm: Trace tlbia instruction
2018-03-19 10:32 [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Christophe Leroy
@ 2018-03-19 10:32 ` Christophe Leroy
2018-03-19 22:43 ` Balbir Singh
2018-03-20 12:32 ` kbuild test robot
2018-03-19 22:39 ` [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Balbir Singh
2018-03-20 8:02 ` kbuild test robot
2 siblings, 2 replies; 8+ messages in thread
From: Christophe Leroy @ 2018-03-19 10:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood
Cc: linux-kernel, linuxppc-dev, Balbir Singh
Add a trace point for tlbia (Translation Lookaside Buffer Invalidate
All) instruction.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/trace.h | 15 +++++++++++++++
arch/powerpc/mm/mmu_decl.h | 2 ++
2 files changed, 17 insertions(+)
diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
index 33f3b479138b..d1d63b173dd7 100644
--- a/arch/powerpc/include/asm/trace.h
+++ b/arch/powerpc/include/asm/trace.h
@@ -202,6 +202,21 @@ TRACE_EVENT(tlbie,
__entry->r)
);
+TRACE_EVENT(tlbia,
+
+ TP_PROTO(unsigned long lpid),
+ TP_ARGS(lpid),
+ TP_STRUCT__entry(
+ __field(unsigned long, lpid)
+ ),
+
+ TP_fast_assign(
+ __entry->lpid = lpid;
+ ),
+
+ TP_printk("lpid=%ld", __entry->lpid)
+);
+
#endif /* _TRACE_POWERPC_H */
#undef TRACE_INCLUDE_PATH
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index b9991e0c61a2..d4ae7b5d45fe 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -32,10 +32,12 @@
static inline void _tlbil_all(void)
{
asm volatile ("sync; tlbia; isync" : : : "memory");
+ trace_tlbia(MMU_NO_CONTEXT);
}
static inline void _tlbil_pid(unsigned int pid)
{
asm volatile ("sync; tlbia; isync" : : : "memory");
+ trace_tlbia(pid);
}
#define _tlbil_pid_noind(pid) _tlbil_pid(pid)
--
2.13.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie
2018-03-19 10:32 [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Christophe Leroy
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
@ 2018-03-19 22:39 ` Balbir Singh
2018-03-20 7:57 ` Christophe LEROY
2018-03-20 8:02 ` kbuild test robot
2 siblings, 1 reply; 8+ messages in thread
From: Balbir Singh @ 2018-03-19 22:39 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood, linux-kernel, linuxppc-dev
On Mon, 19 Mar 2018 11:32:38 +0100 (CET)
Christophe Leroy <christophe.leroy@c-s.fr> wrote:
> commit 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
> added tracepoints for tlbie calls, but _tlbil_va() was forgotten
>
> Fixes: 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/mm/mmu_decl.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
> index 57fbc554c785..b9991e0c61a2 100644
> --- a/arch/powerpc/mm/mmu_decl.h
> +++ b/arch/powerpc/mm/mmu_decl.h
> @@ -21,6 +21,7 @@
> #include <linux/mm.h>
> #include <asm/tlbflush.h>
> #include <asm/mmu.h>
> +#include <asm/trace.h>
>
> #ifdef CONFIG_PPC_MMU_NOHASH
>
> @@ -56,6 +57,7 @@ static inline void _tlbil_va(unsigned long address, unsigned int pid,
> unsigned int tsize, unsigned int ind)
> {
> asm volatile ("tlbie %0; sync" : : "r" (address) : "memory");
> + trace_tlbie(pid, 0, address, 0, 0, 0, 0);
I did not really cover a whole lot of NOHASH, any idea why its
called tlbil_va and not _tlbie_va?
The first field is really the lpid and should be 0 for non-virtualized
systems. Can I recommend that we rs field for pid and the rb field for
address? so effectively something like
trace_tlbie(0, 0, address, pid, 0, 0, 0);
Balbir
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] powerpc/mm: Trace tlbia instruction
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
@ 2018-03-19 22:43 ` Balbir Singh
2018-03-20 7:44 ` Christophe LEROY
2018-03-20 12:32 ` kbuild test robot
1 sibling, 1 reply; 8+ messages in thread
From: Balbir Singh @ 2018-03-19 22:43 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood, linux-kernel, linuxppc-dev
On Mon, 19 Mar 2018 11:32:40 +0100 (CET)
Christophe Leroy <christophe.leroy@c-s.fr> wrote:
> Add a trace point for tlbia (Translation Lookaside Buffer Invalidate
> All) instruction.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/include/asm/trace.h | 15 +++++++++++++++
> arch/powerpc/mm/mmu_decl.h | 2 ++
> 2 files changed, 17 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
> index 33f3b479138b..d1d63b173dd7 100644
> --- a/arch/powerpc/include/asm/trace.h
> +++ b/arch/powerpc/include/asm/trace.h
> @@ -202,6 +202,21 @@ TRACE_EVENT(tlbie,
> __entry->r)
> );
>
> +TRACE_EVENT(tlbia,
> +
> + TP_PROTO(unsigned long lpid),
> + TP_ARGS(lpid),
> + TP_STRUCT__entry(
> + __field(unsigned long, lpid)
> + ),
> +
> + TP_fast_assign(
> + __entry->lpid = lpid;
> + ),
> +
> + TP_printk("lpid=%ld", __entry->lpid)
> +);
Do we want to call this lpid?
Balbir Singh.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] powerpc/mm: Trace tlbia instruction
2018-03-19 22:43 ` Balbir Singh
@ 2018-03-20 7:44 ` Christophe LEROY
0 siblings, 0 replies; 8+ messages in thread
From: Christophe LEROY @ 2018-03-20 7:44 UTC (permalink / raw)
To: Balbir Singh
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood, linux-kernel, linuxppc-dev
Le 19/03/2018 à 23:43, Balbir Singh a écrit :
> On Mon, 19 Mar 2018 11:32:40 +0100 (CET)
> Christophe Leroy <christophe.leroy@c-s.fr> wrote:
>
>> Add a trace point for tlbia (Translation Lookaside Buffer Invalidate
>> All) instruction.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>> ---
>> arch/powerpc/include/asm/trace.h | 15 +++++++++++++++
>> arch/powerpc/mm/mmu_decl.h | 2 ++
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
>> index 33f3b479138b..d1d63b173dd7 100644
>> --- a/arch/powerpc/include/asm/trace.h
>> +++ b/arch/powerpc/include/asm/trace.h
>> @@ -202,6 +202,21 @@ TRACE_EVENT(tlbie,
>> __entry->r)
>> );
>>
>> +TRACE_EVENT(tlbia,
>> +
>> + TP_PROTO(unsigned long lpid),
>> + TP_ARGS(lpid),
>> + TP_STRUCT__entry(
>> + __field(unsigned long, lpid)
>> + ),
>> +
>> + TP_fast_assign(
>> + __entry->lpid = lpid;
>> + ),
>> +
>> + TP_printk("lpid=%ld", __entry->lpid)
>> +);
>
>
> Do we want to call this lpid?
>
Should we can it rs in consistence with tlbie trace ? Or just pid ?
Allthough it is not an argument used by tlbia, I think it is good to
keep a trace of it to keep track of the reason why tlbia is called.
Christophe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie
2018-03-19 22:39 ` [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Balbir Singh
@ 2018-03-20 7:57 ` Christophe LEROY
0 siblings, 0 replies; 8+ messages in thread
From: Christophe LEROY @ 2018-03-20 7:57 UTC (permalink / raw)
To: Balbir Singh, Kumar Gala
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Scott Wood, linux-kernel, linuxppc-dev
Le 19/03/2018 à 23:39, Balbir Singh a écrit :
> On Mon, 19 Mar 2018 11:32:38 +0100 (CET)
> Christophe Leroy <christophe.leroy@c-s.fr> wrote:
>
>> commit 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
>> added tracepoints for tlbie calls, but _tlbil_va() was forgotten
>>
>> Fixes: 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions")
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>> ---
>> arch/powerpc/mm/mmu_decl.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
>> index 57fbc554c785..b9991e0c61a2 100644
>> --- a/arch/powerpc/mm/mmu_decl.h
>> +++ b/arch/powerpc/mm/mmu_decl.h
>> @@ -21,6 +21,7 @@
>> #include <linux/mm.h>
>> #include <asm/tlbflush.h>
>> #include <asm/mmu.h>
>> +#include <asm/trace.h>
>>
>> #ifdef CONFIG_PPC_MMU_NOHASH
>>
>> @@ -56,6 +57,7 @@ static inline void _tlbil_va(unsigned long address, unsigned int pid,
>> unsigned int tsize, unsigned int ind)
>> {
>> asm volatile ("tlbie %0; sync" : : "r" (address) : "memory");
>> + trace_tlbie(pid, 0, address, 0, 0, 0, 0);
>
>
> I did not really cover a whole lot of NOHASH, any idea why its
> called tlbil_va and not _tlbie_va?
Seems it comes from
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0ba3418b8b1c85ee1771c63f1dd12041614e56ff
Kumar ?
>
> The first field is really the lpid and should be 0 for non-virtualized
> systems. Can I recommend that we rs field for pid and the rb field for
> address? so effectively something like
Yes having the address in rb is expected since it is the name of the
only field tlbie has in the 32bits instruction set.
Yes I can use rb for the pid.
Christophe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie
2018-03-19 10:32 [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Christophe Leroy
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
2018-03-19 22:39 ` [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Balbir Singh
@ 2018-03-20 8:02 ` kbuild test robot
2 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2018-03-20 8:02 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Scott Wood, linux-kernel, linuxppc-dev,
Balbir Singh
[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180319]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-mm-Add-missing-tracepoint-for-tlbie/20180320-130831
config: powerpc-maple_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x0): multiple definition of `__tracepoint_tlbie'
arch/powerpc/kernel/irq.o:(__tracepoints+0x50): first defined here
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x28): multiple definition of `__tracepoint_hash_fault'
arch/powerpc/kernel/irq.o:(__tracepoints+0x78): first defined here
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x50): multiple definition of `__tracepoint_timer_interrupt_exit'
arch/powerpc/kernel/irq.o:(__tracepoints+0xa0): first defined here
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x78): multiple definition of `__tracepoint_timer_interrupt_entry'
arch/powerpc/kernel/irq.o:(__tracepoints+0xc8): first defined here
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0xa0): multiple definition of `__tracepoint_irq_exit'
arch/powerpc/kernel/irq.o:(__tracepoints+0x28): first defined here
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0xc8): multiple definition of `__tracepoint_irq_entry'
arch/powerpc/kernel/irq.o:(__tracepoints+0x0): first defined here
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 17658 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] powerpc/mm: Trace tlbia instruction
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
2018-03-19 22:43 ` Balbir Singh
@ 2018-03-20 12:32 ` kbuild test robot
1 sibling, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2018-03-20 12:32 UTC (permalink / raw)
To: Christophe Leroy
Cc: kbuild-all, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Scott Wood, linux-kernel, linuxppc-dev,
Balbir Singh
[-- Attachment #1: Type: text/plain, Size: 2167 bytes --]
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180320]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-mm-Add-missing-tracepoint-for-tlbie/20180320-130831
config: powerpc-g5_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x0): multiple definition of `__tracepoint_tlbia'
arch/powerpc/kernel/irq.o:(__tracepoints+0x50): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x28): multiple definition of `__tracepoint_tlbie'
arch/powerpc/kernel/irq.o:(__tracepoints+0x78): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x50): multiple definition of `__tracepoint_hash_fault'
arch/powerpc/kernel/irq.o:(__tracepoints+0xa0): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0x78): multiple definition of `__tracepoint_timer_interrupt_exit'
arch/powerpc/kernel/irq.o:(__tracepoints+0xc8): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0xa0): multiple definition of `__tracepoint_timer_interrupt_entry'
arch/powerpc/kernel/irq.o:(__tracepoints+0xf0): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0xc8): multiple definition of `__tracepoint_irq_exit'
arch/powerpc/kernel/irq.o:(__tracepoints+0x28): first defined here
arch/powerpc/mm/pgtable-hash64.o:(__tracepoints+0xf0): multiple definition of `__tracepoint_irq_entry'
arch/powerpc/kernel/irq.o:(__tracepoints+0x0): first defined here
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20798 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-03-20 12:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 10:32 [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Christophe Leroy
2018-03-19 10:32 ` [PATCH 2/2] powerpc/mm: Trace tlbia instruction Christophe Leroy
2018-03-19 22:43 ` Balbir Singh
2018-03-20 7:44 ` Christophe LEROY
2018-03-20 12:32 ` kbuild test robot
2018-03-19 22:39 ` [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie Balbir Singh
2018-03-20 7:57 ` Christophe LEROY
2018-03-20 8:02 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox