[tip:irq/urgent] irqchip/mips-gic: Mark count and compare accessors notrace

2017-06-20 Thread tip-bot for Marcin Nowakowski
Commit-ID:  9f93d87cba63e3d18629261243b1f633519eabb5
Gitweb: http://git.kernel.org/tip/9f93d87cba63e3d18629261243b1f633519eabb5
Author: Marcin Nowakowski 
AuthorDate: Fri, 9 Jun 2017 09:04:05 +0200
Committer:  Thomas Gleixner 
CommitDate: Tue, 20 Jun 2017 21:41:58 +0200

irqchip/mips-gic: Mark count and compare accessors notrace

gic_read_count(), gic_write_compare() and gic_write_cpu_compare() are
often used in a sequence to update the compare register with a count
value increased by a small offset.
With small delta values used to update the compare register, the time to
update function trace for these operations may be longer than the update
timeout leading to update failure.

Signed-off-by: Marcin Nowakowski 
Signed-off-by: Thomas Gleixner 
Cc: Marc Zyngier 
Cc: linux-m...@linux-mips.org
Cc: Jason Cooper 
Link: 
http://lkml.kernel.org/r/1496991845-27031-1-git-send-email-marcin.nowakow...@imgtec.com

---
 drivers/irqchip/irq-mips-gic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index eb7fbe1..929f855 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -140,7 +140,7 @@ static inline void gic_map_to_vpe(unsigned int intr, 
unsigned int vpe)
 }
 
 #ifdef CONFIG_CLKSRC_MIPS_GIC
-u64 gic_read_count(void)
+u64 notrace gic_read_count(void)
 {
unsigned int hi, hi2, lo;
 
@@ -167,7 +167,7 @@ unsigned int gic_get_count_width(void)
return bits;
 }
 
-void gic_write_compare(u64 cnt)
+void notrace gic_write_compare(u64 cnt)
 {
if (mips_cm_is64) {
gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE), cnt);
@@ -179,7 +179,7 @@ void gic_write_compare(u64 cnt)
}
 }
 
-void gic_write_cpu_compare(u64 cnt, int cpu)
+void notrace gic_write_cpu_compare(u64 cnt, int cpu)
 {
unsigned long flags;
 


[tip:irq/urgent] irqchip/mips-gic: Mark count and compare accessors notrace

2017-06-20 Thread tip-bot for Marcin Nowakowski
Commit-ID:  9f93d87cba63e3d18629261243b1f633519eabb5
Gitweb: http://git.kernel.org/tip/9f93d87cba63e3d18629261243b1f633519eabb5
Author: Marcin Nowakowski 
AuthorDate: Fri, 9 Jun 2017 09:04:05 +0200
Committer:  Thomas Gleixner 
CommitDate: Tue, 20 Jun 2017 21:41:58 +0200

irqchip/mips-gic: Mark count and compare accessors notrace

gic_read_count(), gic_write_compare() and gic_write_cpu_compare() are
often used in a sequence to update the compare register with a count
value increased by a small offset.
With small delta values used to update the compare register, the time to
update function trace for these operations may be longer than the update
timeout leading to update failure.

Signed-off-by: Marcin Nowakowski 
Signed-off-by: Thomas Gleixner 
Cc: Marc Zyngier 
Cc: linux-m...@linux-mips.org
Cc: Jason Cooper 
Link: 
http://lkml.kernel.org/r/1496991845-27031-1-git-send-email-marcin.nowakow...@imgtec.com

---
 drivers/irqchip/irq-mips-gic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index eb7fbe1..929f855 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -140,7 +140,7 @@ static inline void gic_map_to_vpe(unsigned int intr, 
unsigned int vpe)
 }
 
 #ifdef CONFIG_CLKSRC_MIPS_GIC
-u64 gic_read_count(void)
+u64 notrace gic_read_count(void)
 {
unsigned int hi, hi2, lo;
 
@@ -167,7 +167,7 @@ unsigned int gic_get_count_width(void)
return bits;
 }
 
-void gic_write_compare(u64 cnt)
+void notrace gic_write_compare(u64 cnt)
 {
if (mips_cm_is64) {
gic_write(GIC_REG(VPE_LOCAL, GIC_VPE_COMPARE), cnt);
@@ -179,7 +179,7 @@ void gic_write_compare(u64 cnt)
}
 }
 
-void gic_write_cpu_compare(u64 cnt, int cpu)
+void notrace gic_write_cpu_compare(u64 cnt, int cpu)
 {
unsigned long flags;
 


[tip:sched/urgent] sched/fair: Fix typo in printk message

2017-06-11 Thread tip-bot for Marcin Nowakowski
Commit-ID:  f67abed585efe251edda52dc9690020d6441890f
Gitweb: http://git.kernel.org/tip/f67abed585efe251edda52dc9690020d6441890f
Author: Marcin Nowakowski 
AuthorDate: Fri, 9 Jun 2017 10:00:29 +0200
Committer:  Ingo Molnar 
CommitDate: Sun, 11 Jun 2017 10:00:33 +0200

sched/fair: Fix typo in printk message

'schedstats' kernel parameter should be set to enable/disable, so
correct the printk hint saying that it should be set to 'enable'
rather than 'enabled' to enable scheduler tracepoints.

Signed-off-by: Marcin Nowakowski 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Link: 
http://lkml.kernel.org/r/1496995229-31245-1-git-send-email-marcin.nowakow...@imgtec.com
Signed-off-by: Ingo Molnar 
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d711093..c77e4b1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3563,7 +3563,7 @@ static inline void check_schedstat_required(void)
trace_sched_stat_runtime_enabled())  {
printk_deferred_once("Scheduler tracepoints stat_sleep, 
stat_iowait, "
 "stat_blocked and stat_runtime require the "
-"kernel parameter schedstats=enabled or "
+"kernel parameter schedstats=enable or "
 "kernel.sched_schedstats=1\n");
}
 #endif


[tip:sched/urgent] sched/fair: Fix typo in printk message

2017-06-11 Thread tip-bot for Marcin Nowakowski
Commit-ID:  f67abed585efe251edda52dc9690020d6441890f
Gitweb: http://git.kernel.org/tip/f67abed585efe251edda52dc9690020d6441890f
Author: Marcin Nowakowski 
AuthorDate: Fri, 9 Jun 2017 10:00:29 +0200
Committer:  Ingo Molnar 
CommitDate: Sun, 11 Jun 2017 10:00:33 +0200

sched/fair: Fix typo in printk message

'schedstats' kernel parameter should be set to enable/disable, so
correct the printk hint saying that it should be set to 'enable'
rather than 'enabled' to enable scheduler tracepoints.

Signed-off-by: Marcin Nowakowski 
Cc: Linus Torvalds 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Link: 
http://lkml.kernel.org/r/1496995229-31245-1-git-send-email-marcin.nowakow...@imgtec.com
Signed-off-by: Ingo Molnar 
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d711093..c77e4b1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3563,7 +3563,7 @@ static inline void check_schedstat_required(void)
trace_sched_stat_runtime_enabled())  {
printk_deferred_once("Scheduler tracepoints stat_sleep, 
stat_iowait, "
 "stat_blocked and stat_runtime require the "
-"kernel parameter schedstats=enabled or "
+"kernel parameter schedstats=enable or "
 "kernel.sched_schedstats=1\n");
}
 #endif


[tip:perf/urgent] uprobes: Fix uprobes on MIPS, allow for a cache flush after ixol breakpoint creation

2016-12-19 Thread tip-bot for Marcin Nowakowski
Commit-ID:  297e765e390a2ac996000b5f7228cbd84d995174
Gitweb: http://git.kernel.org/tip/297e765e390a2ac996000b5f7228cbd84d995174
Author: Marcin Nowakowski 
AuthorDate: Tue, 13 Dec 2016 11:40:57 +0100
Committer:  Ingo Molnar 
CommitDate: Sun, 18 Dec 2016 09:42:11 +0100

uprobes: Fix uprobes on MIPS, allow for a cache flush after ixol breakpoint 
creation

Commit:

  72e6ae285a1d ('ARM: 8043/1: uprobes need icache flush after xol write'

... has introduced an arch-specific method to ensure all caches are
flushed appropriately after an instruction is written to an XOL page.

However, when the XOL area is created and the out-of-line breakpoint
instruction is copied, caches are not flushed at all and stale data may
be found in icache.

Replace a simple copy_to_page() with arch_uprobe_copy_ixol() to allow
the arch to ensure all caches are updated accordingly.

This change fixes uprobes on MIPS InterAptiv (tested on Creator Ci40).

Signed-off-by: Marcin Nowakowski 
Cc: Alexander Shishkin 
Cc: Arnaldo Carvalho de Melo 
Cc: Arnaldo Carvalho de Melo 
Cc: Jiri Olsa 
Cc: Linus Torvalds 
Cc: Oleg Nesterov 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: Victor Kamensky 
Cc: linux-m...@linux-mips.org
Link: 
http://lkml.kernel.org/r/1481625657-22850-1-git-send-email-marcin.nowakow...@imgtec.com
Signed-off-by: Ingo Molnar 
---
 kernel/events/uprobes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index f9ec9ad..b5916b4 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1194,7 +1194,7 @@ static struct xol_area *__create_xol_area(unsigned long 
vaddr)
/* Reserve the 1st slot for get_trampoline_vaddr() */
set_bit(0, area->bitmap);
atomic_set(>slot_count, 1);
-   copy_to_page(area->pages[0], 0, , UPROBE_SWBP_INSN_SIZE);
+   arch_uprobe_copy_ixol(area->pages[0], 0, , UPROBE_SWBP_INSN_SIZE);
 
if (!xol_add_vma(mm, area))
return area;


[tip:perf/urgent] uprobes: Fix uprobes on MIPS, allow for a cache flush after ixol breakpoint creation

2016-12-19 Thread tip-bot for Marcin Nowakowski
Commit-ID:  297e765e390a2ac996000b5f7228cbd84d995174
Gitweb: http://git.kernel.org/tip/297e765e390a2ac996000b5f7228cbd84d995174
Author: Marcin Nowakowski 
AuthorDate: Tue, 13 Dec 2016 11:40:57 +0100
Committer:  Ingo Molnar 
CommitDate: Sun, 18 Dec 2016 09:42:11 +0100

uprobes: Fix uprobes on MIPS, allow for a cache flush after ixol breakpoint 
creation

Commit:

  72e6ae285a1d ('ARM: 8043/1: uprobes need icache flush after xol write'

... has introduced an arch-specific method to ensure all caches are
flushed appropriately after an instruction is written to an XOL page.

However, when the XOL area is created and the out-of-line breakpoint
instruction is copied, caches are not flushed at all and stale data may
be found in icache.

Replace a simple copy_to_page() with arch_uprobe_copy_ixol() to allow
the arch to ensure all caches are updated accordingly.

This change fixes uprobes on MIPS InterAptiv (tested on Creator Ci40).

Signed-off-by: Marcin Nowakowski 
Cc: Alexander Shishkin 
Cc: Arnaldo Carvalho de Melo 
Cc: Arnaldo Carvalho de Melo 
Cc: Jiri Olsa 
Cc: Linus Torvalds 
Cc: Oleg Nesterov 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Cc: Victor Kamensky 
Cc: linux-m...@linux-mips.org
Link: 
http://lkml.kernel.org/r/1481625657-22850-1-git-send-email-marcin.nowakow...@imgtec.com
Signed-off-by: Ingo Molnar 
---
 kernel/events/uprobes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index f9ec9ad..b5916b4 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1194,7 +1194,7 @@ static struct xol_area *__create_xol_area(unsigned long 
vaddr)
/* Reserve the 1st slot for get_trampoline_vaddr() */
set_bit(0, area->bitmap);
atomic_set(>slot_count, 1);
-   copy_to_page(area->pages[0], 0, , UPROBE_SWBP_INSN_SIZE);
+   arch_uprobe_copy_ixol(area->pages[0], 0, , UPROBE_SWBP_INSN_SIZE);
 
if (!xol_add_vma(mm, area))
return area;