linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: perf: ath79: Fix perfcount IRQ assignment
@ 2019-04-11 18:06 Petr Štetiar
  2019-04-12 21:08 ` [PATCH v2] " Petr Štetiar
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Štetiar @ 2019-04-11 18:06 UTC (permalink / raw)
  To: linux-mips
  Cc: Ralf Baechle, Paul Burton, James Hogan, Thomas Gleixner,
	Jason Cooper, Marc Zyngier, John Crispin, Petr Štetiar

Currently it's not possible to use perf on ath79 due to genirq flags
mismatch happening on static IRQ 13 which is used for performance
counters interrupt.

On TP-Link Archer C7v5:

           CPU0
  2:          0      MIPS   2  ath9k
  4:        318      MIPS   4  19000000.eth
  7:      55034      MIPS   7  timer
  8:       1236      MISC   3  ttyS0
 12:          0      INTC   1  ehci_hcd:usb1
 13:          0  gpio-ath79   2  keys
 14:          0  gpio-ath79   5  keys
 15:         31  AR724X PCI    1  ath10k_pci

 $ perf top
 genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)

On TP-Link Archer C7v4:

         CPU0
  4:          0      MIPS   4  19000000.eth
  5:       7135      MIPS   5  1a000000.eth
  7:      98379      MIPS   7  timer
  8:         30      MISC   3  ttyS0
 12:      90028      INTC   0  ath9k
 13:       5520      INTC   1  ehci_hcd:usb1
 14:       4623      INTC   2  ehci_hcd:usb2
 15:      32844  AR724X PCI    1  ath10k_pci
 16:          0  gpio-ath79  16  keys
 23:          0  gpio-ath79  23  keys

 $ perf top
 genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)

This problem is happening, because the statically assigned IRQ 13 for
performance counters is not claimed during the initialization of MIPS
PMU during the bootup, so the IRQ subsystem doesn't know, that this
interrupt isn't available for further use.

So this patch simply books IRQ 13 for MIPS PMU if the kernel is compiled
with performance counters functionality.

Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 arch/mips/ath79/setup.c          |  6 ------
 drivers/irqchip/irq-ath79-misc.c | 13 +++++++++++++
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 4a70c5d..25a5789 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -210,12 +210,6 @@ const char *get_system_type(void)
 	return ath79_sys_type;
 }
 
-int get_c0_perfcount_int(void)
-{
-	return ATH79_MISC_IRQ(5);
-}
-EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
-
 unsigned int get_c0_compare_int(void)
 {
 	return CP0_LEGACY_COMPARE_IRQ;
diff --git a/drivers/irqchip/irq-ath79-misc.c b/drivers/irqchip/irq-ath79-misc.c
index aa72907..77b3348 100644
--- a/drivers/irqchip/irq-ath79-misc.c
+++ b/drivers/irqchip/irq-ath79-misc.c
@@ -22,6 +22,15 @@
 #define AR71XX_RESET_REG_MISC_INT_ENABLE	4
 
 #define ATH79_MISC_IRQ_COUNT			32
+#define ATH79_MISC_PERF_IRQ			ATH79_MISC_IRQ(5)
+
+static int ath79_perfcount_irq;
+
+int get_c0_perfcount_int(void)
+{
+	return ath79_perfcount_irq;
+}
+EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
 
 static void ath79_misc_irq_handler(struct irq_desc *desc)
 {
@@ -113,6 +122,10 @@ static void __init ath79_misc_intc_domain_init(
 {
 	void __iomem *base = domain->host_data;
 
+#ifdef CONFIG_PERF_EVENTS
+	ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
+#endif
+
 	/* Disable and clear all interrupts */
 	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
  2019-04-11 18:06 [PATCH] MIPS: perf: ath79: Fix perfcount IRQ assignment Petr Štetiar
@ 2019-04-12 21:08 ` Petr Štetiar
  2019-04-12 21:16   ` John Crispin
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Petr Štetiar @ 2019-04-12 21:08 UTC (permalink / raw)
  To: linux-mips
  Cc: Ralf Baechle, Paul Burton, James Hogan, Thomas Gleixner,
	Jason Cooper, Marc Zyngier, John Crispin, Petr Štetiar

Currently it's not possible to use perf on ath79 due to genirq flags
mismatch happening on static virtual IRQ 13 which is used for
performance counters hardware IRQ 5.

On TP-Link Archer C7v5:

           CPU0
  2:          0      MIPS   2  ath9k
  4:        318      MIPS   4  19000000.eth
  7:      55034      MIPS   7  timer
  8:       1236      MISC   3  ttyS0
 12:          0      INTC   1  ehci_hcd:usb1
 13:          0  gpio-ath79   2  keys
 14:          0  gpio-ath79   5  keys
 15:         31  AR724X PCI    1  ath10k_pci

 $ perf top
 genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)

On TP-Link Archer C7v4:

         CPU0
  4:          0      MIPS   4  19000000.eth
  5:       7135      MIPS   5  1a000000.eth
  7:      98379      MIPS   7  timer
  8:         30      MISC   3  ttyS0
 12:      90028      INTC   0  ath9k
 13:       5520      INTC   1  ehci_hcd:usb1
 14:       4623      INTC   2  ehci_hcd:usb2
 15:      32844  AR724X PCI    1  ath10k_pci
 16:          0  gpio-ath79  16  keys
 23:          0  gpio-ath79  23  keys

 $ perf top
 genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)

This problem is happening, because currently statically assigned virtual
IRQ 13 for performance counters is not claimed during the initialization
of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
this interrupt isn't available for further use.

So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.

Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---

Changes since v1:

 I've incorporated two comments which I've received on IRC from blogic and
 I've also reworded the commit message to match the changes in v2 of this
 patch.

  * use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
  * dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping

 arch/mips/ath79/setup.c          |  6 ------
 drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 4a70c5d..25a5789 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -210,12 +210,6 @@ const char *get_system_type(void)
 	return ath79_sys_type;
 }
 
-int get_c0_perfcount_int(void)
-{
-	return ATH79_MISC_IRQ(5);
-}
-EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
-
 unsigned int get_c0_compare_int(void)
 {
 	return CP0_LEGACY_COMPARE_IRQ;
diff --git a/drivers/irqchip/irq-ath79-misc.c b/drivers/irqchip/irq-ath79-misc.c
index aa72907..0390603 100644
--- a/drivers/irqchip/irq-ath79-misc.c
+++ b/drivers/irqchip/irq-ath79-misc.c
@@ -22,6 +22,15 @@
 #define AR71XX_RESET_REG_MISC_INT_ENABLE	4
 
 #define ATH79_MISC_IRQ_COUNT			32
+#define ATH79_MISC_PERF_IRQ			5
+
+static int ath79_perfcount_irq;
+
+int get_c0_perfcount_int(void)
+{
+	return ath79_perfcount_irq;
+}
+EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
 
 static void ath79_misc_irq_handler(struct irq_desc *desc)
 {
@@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domain_init(
 {
 	void __iomem *base = domain->host_data;
 
+	ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
+
 	/* Disable and clear all interrupts */
 	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
 	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
  2019-04-12 21:08 ` [PATCH v2] " Petr Štetiar
@ 2019-04-12 21:16   ` John Crispin
  2019-04-15 17:28   ` Paul Burton
  2019-04-16 22:10   ` Paul Burton
  2 siblings, 0 replies; 6+ messages in thread
From: John Crispin @ 2019-04-12 21:16 UTC (permalink / raw)
  To: Petr Štetiar, linux-mips
  Cc: Ralf Baechle, Paul Burton, James Hogan, Thomas Gleixner,
	Jason Cooper, Marc Zyngier


On 12/04/2019 23:08, Petr Štetiar wrote:
> Currently it's not possible to use perf on ath79 due to genirq flags
> mismatch happening on static virtual IRQ 13 which is used for
> performance counters hardware IRQ 5.
>
> On TP-Link Archer C7v5:
>
>             CPU0
>    2:          0      MIPS   2  ath9k
>    4:        318      MIPS   4  19000000.eth
>    7:      55034      MIPS   7  timer
>    8:       1236      MISC   3  ttyS0
>   12:          0      INTC   1  ehci_hcd:usb1
>   13:          0  gpio-ath79   2  keys
>   14:          0  gpio-ath79   5  keys
>   15:         31  AR724X PCI    1  ath10k_pci
>
>   $ perf top
>   genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
>
> On TP-Link Archer C7v4:
>
>           CPU0
>    4:          0      MIPS   4  19000000.eth
>    5:       7135      MIPS   5  1a000000.eth
>    7:      98379      MIPS   7  timer
>    8:         30      MISC   3  ttyS0
>   12:      90028      INTC   0  ath9k
>   13:       5520      INTC   1  ehci_hcd:usb1
>   14:       4623      INTC   2  ehci_hcd:usb2
>   15:      32844  AR724X PCI    1  ath10k_pci
>   16:          0  gpio-ath79  16  keys
>   23:          0  gpio-ath79  23  keys
>
>   $ perf top
>   genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
>
> This problem is happening, because currently statically assigned virtual
> IRQ 13 for performance counters is not claimed during the initialization
> of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
> this interrupt isn't available for further use.
>
> So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
>
> Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>

Thanks for the fast turn around

Acked-by: John Crispin <john@phrozen.org>


> ---
>
> Changes since v1:
>
>   I've incorporated two comments which I've received on IRC from blogic and
>   I've also reworded the commit message to match the changes in v2 of this
>   patch.
>
>    * use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
>    * dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping
>
>   arch/mips/ath79/setup.c          |  6 ------
>   drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
>   2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
> index 4a70c5d..25a5789 100644
> --- a/arch/mips/ath79/setup.c
> +++ b/arch/mips/ath79/setup.c
> @@ -210,12 +210,6 @@ const char *get_system_type(void)
>   	return ath79_sys_type;
>   }
>   
> -int get_c0_perfcount_int(void)
> -{
> -	return ATH79_MISC_IRQ(5);
> -}
> -EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
> -
>   unsigned int get_c0_compare_int(void)
>   {
>   	return CP0_LEGACY_COMPARE_IRQ;
> diff --git a/drivers/irqchip/irq-ath79-misc.c b/drivers/irqchip/irq-ath79-misc.c
> index aa72907..0390603 100644
> --- a/drivers/irqchip/irq-ath79-misc.c
> +++ b/drivers/irqchip/irq-ath79-misc.c
> @@ -22,6 +22,15 @@
>   #define AR71XX_RESET_REG_MISC_INT_ENABLE	4
>   
>   #define ATH79_MISC_IRQ_COUNT			32
> +#define ATH79_MISC_PERF_IRQ			5
> +
> +static int ath79_perfcount_irq;
> +
> +int get_c0_perfcount_int(void)
> +{
> +	return ath79_perfcount_irq;
> +}
> +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
>   
>   static void ath79_misc_irq_handler(struct irq_desc *desc)
>   {
> @@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domain_init(
>   {
>   	void __iomem *base = domain->host_data;
>   
> +	ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
> +
>   	/* Disable and clear all interrupts */
>   	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
>   	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
  2019-04-12 21:08 ` [PATCH v2] " Petr Štetiar
  2019-04-12 21:16   ` John Crispin
@ 2019-04-15 17:28   ` Paul Burton
  2019-04-16 10:14     ` Marc Zyngier
  2019-04-16 22:10   ` Paul Burton
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Burton @ 2019-04-15 17:28 UTC (permalink / raw)
  To: Petr Štetiar
  Cc: linux-mips@vger.kernel.org, Ralf Baechle, James Hogan,
	Thomas Gleixner, Jason Cooper, Marc Zyngier, John Crispin

Hello,

On Fri, Apr 12, 2019 at 11:08:32PM +0200, Petr Štetiar wrote:
> Currently it's not possible to use perf on ath79 due to genirq flags
> mismatch happening on static virtual IRQ 13 which is used for
> performance counters hardware IRQ 5.
> 
> On TP-Link Archer C7v5:
> 
>            CPU0
>   2:          0      MIPS   2  ath9k
>   4:        318      MIPS   4  19000000.eth
>   7:      55034      MIPS   7  timer
>   8:       1236      MISC   3  ttyS0
>  12:          0      INTC   1  ehci_hcd:usb1
>  13:          0  gpio-ath79   2  keys
>  14:          0  gpio-ath79   5  keys
>  15:         31  AR724X PCI    1  ath10k_pci
> 
>  $ perf top
>  genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
> 
> On TP-Link Archer C7v4:
> 
>          CPU0
>   4:          0      MIPS   4  19000000.eth
>   5:       7135      MIPS   5  1a000000.eth
>   7:      98379      MIPS   7  timer
>   8:         30      MISC   3  ttyS0
>  12:      90028      INTC   0  ath9k
>  13:       5520      INTC   1  ehci_hcd:usb1
>  14:       4623      INTC   2  ehci_hcd:usb2
>  15:      32844  AR724X PCI    1  ath10k_pci
>  16:          0  gpio-ath79  16  keys
>  23:          0  gpio-ath79  23  keys
> 
>  $ perf top
>  genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
> 
> This problem is happening, because currently statically assigned virtual
> IRQ 13 for performance counters is not claimed during the initialization
> of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
> this interrupt isn't available for further use.
> 
> So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
> 
> Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
> 
> Changes since v1:
> 
>  I've incorporated two comments which I've received on IRC from blogic and
>  I've also reworded the commit message to match the changes in v2 of this
>  patch.
> 
>   * use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
>   * dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping
> 
>  arch/mips/ath79/setup.c          |  6 ------
>  drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
>  2 files changed, 11 insertions(+), 6 deletions(-)

This change looks reasonable to me - I'd be happy to take it through
mips-fixes with an ack from an irqchip driver maintainer, or I'm happy
for one of them to take it if they prefer in which case:

    Acked-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

> 
> diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
> index 4a70c5d..25a5789 100644
> --- a/arch/mips/ath79/setup.c
> +++ b/arch/mips/ath79/setup.c
> @@ -210,12 +210,6 @@ const char *get_system_type(void)
>  	return ath79_sys_type;
>  }
>  
> -int get_c0_perfcount_int(void)
> -{
> -	return ATH79_MISC_IRQ(5);
> -}
> -EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
> -
>  unsigned int get_c0_compare_int(void)
>  {
>  	return CP0_LEGACY_COMPARE_IRQ;
> diff --git a/drivers/irqchip/irq-ath79-misc.c b/drivers/irqchip/irq-ath79-misc.c
> index aa72907..0390603 100644
> --- a/drivers/irqchip/irq-ath79-misc.c
> +++ b/drivers/irqchip/irq-ath79-misc.c
> @@ -22,6 +22,15 @@
>  #define AR71XX_RESET_REG_MISC_INT_ENABLE	4
>  
>  #define ATH79_MISC_IRQ_COUNT			32
> +#define ATH79_MISC_PERF_IRQ			5
> +
> +static int ath79_perfcount_irq;
> +
> +int get_c0_perfcount_int(void)
> +{
> +	return ath79_perfcount_irq;
> +}
> +EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
>  
>  static void ath79_misc_irq_handler(struct irq_desc *desc)
>  {
> @@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domain_init(
>  {
>  	void __iomem *base = domain->host_data;
>  
> +	ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
> +
>  	/* Disable and clear all interrupts */
>  	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
>  	__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
  2019-04-15 17:28   ` Paul Burton
@ 2019-04-16 10:14     ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2019-04-16 10:14 UTC (permalink / raw)
  To: Paul Burton, Petr Štetiar
  Cc: linux-mips@vger.kernel.org, Ralf Baechle, James Hogan,
	Thomas Gleixner, Jason Cooper, John Crispin

Hi Paul,

On 15/04/2019 18:28, Paul Burton wrote:
> Hello,
> 
> On Fri, Apr 12, 2019 at 11:08:32PM +0200, Petr Štetiar wrote:
>> Currently it's not possible to use perf on ath79 due to genirq flags
>> mismatch happening on static virtual IRQ 13 which is used for
>> performance counters hardware IRQ 5.
>>
>> On TP-Link Archer C7v5:
>>
>>            CPU0
>>   2:          0      MIPS   2  ath9k
>>   4:        318      MIPS   4  19000000.eth
>>   7:      55034      MIPS   7  timer
>>   8:       1236      MISC   3  ttyS0
>>  12:          0      INTC   1  ehci_hcd:usb1
>>  13:          0  gpio-ath79   2  keys
>>  14:          0  gpio-ath79   5  keys
>>  15:         31  AR724X PCI    1  ath10k_pci
>>
>>  $ perf top
>>  genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
>>
>> On TP-Link Archer C7v4:
>>
>>          CPU0
>>   4:          0      MIPS   4  19000000.eth
>>   5:       7135      MIPS   5  1a000000.eth
>>   7:      98379      MIPS   7  timer
>>   8:         30      MISC   3  ttyS0
>>  12:      90028      INTC   0  ath9k
>>  13:       5520      INTC   1  ehci_hcd:usb1
>>  14:       4623      INTC   2  ehci_hcd:usb2
>>  15:      32844  AR724X PCI    1  ath10k_pci
>>  16:          0  gpio-ath79  16  keys
>>  23:          0  gpio-ath79  23  keys
>>
>>  $ perf top
>>  genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
>>
>> This problem is happening, because currently statically assigned virtual
>> IRQ 13 for performance counters is not claimed during the initialization
>> of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
>> this interrupt isn't available for further use.
>>
>> So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
>>
>> Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
>> Signed-off-by: Petr Štetiar <ynezz@true.cz>
>> ---
>>
>> Changes since v1:
>>
>>  I've incorporated two comments which I've received on IRC from blogic and
>>  I've also reworded the commit message to match the changes in v2 of this
>>  patch.
>>
>>   * use actual hardware perfcount IRQ 5 instead of the virtual IRQ 13
>>   * dropped the CONFIG_PERF_EVENTS ifdef around irq_create_mapping
>>
>>  arch/mips/ath79/setup.c          |  6 ------
>>  drivers/irqchip/irq-ath79-misc.c | 11 +++++++++++
>>  2 files changed, 11 insertions(+), 6 deletions(-)
> 
> This change looks reasonable to me - I'd be happy to take it through
> mips-fixes with an ack from an irqchip driver maintainer, or I'm happy
> for one of them to take it if they prefer in which case:
> 
>     Acked-by: Paul Burton <paul.burton@mips.com>

Please take it though the MIPS tree with my

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] MIPS: perf: ath79: Fix perfcount IRQ assignment
  2019-04-12 21:08 ` [PATCH v2] " Petr Štetiar
  2019-04-12 21:16   ` John Crispin
  2019-04-15 17:28   ` Paul Burton
@ 2019-04-16 22:10   ` Paul Burton
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Burton @ 2019-04-16 22:10 UTC (permalink / raw)
  To: Petr Štetiar
  Cc: linux-mips@vger.kernel.org, Ralf Baechle, Paul Burton,
	James Hogan, Thomas Gleixner, Jason Cooper, Marc Zyngier,
	John Crispin, Petr Štetiar, linux-mips@vger.kernel.org

Hello,

Petr Štetiar wrote:
> Currently it's not possible to use perf on ath79 due to genirq flags
> mismatch happening on static virtual IRQ 13 which is used for
> performance counters hardware IRQ 5.
> 
> On TP-Link Archer C7v5:
> 
> CPU0
> 2:          0      MIPS   2  ath9k
> 4:        318      MIPS   4  19000000.eth
> 7:      55034      MIPS   7  timer
> 8:       1236      MISC   3  ttyS0
> 12:          0      INTC   1  ehci_hcd:usb1
> 13:          0  gpio-ath79   2  keys
> 14:          0  gpio-ath79   5  keys
> 15:         31  AR724X PCI    1  ath10k_pci
> 
> $ perf top
> genirq: Flags mismatch irq 13. 00014c83 (mips_perf_pmu) vs. 00002003 (keys)
> 
> On TP-Link Archer C7v4:
> 
> CPU0
> 4:          0      MIPS   4  19000000.eth
> 5:       7135      MIPS   5  1a000000.eth
> 7:      98379      MIPS   7  timer
> 8:         30      MISC   3  ttyS0
> 12:      90028      INTC   0  ath9k
> 13:       5520      INTC   1  ehci_hcd:usb1
> 14:       4623      INTC   2  ehci_hcd:usb2
> 15:      32844  AR724X PCI    1  ath10k_pci
> 16:          0  gpio-ath79  16  keys
> 23:          0  gpio-ath79  23  keys
> 
> $ perf top
> genirq: Flags mismatch irq 13. 00014c80 (mips_perf_pmu) vs. 00000080 (ehci_hcd:usb1)
> 
> This problem is happening, because currently statically assigned virtual
> IRQ 13 for performance counters is not claimed during the initialization
> of MIPS PMU during the bootup, so the IRQ subsystem doesn't know, that
> this interrupt isn't available for further use.
> 
> So this patch fixes the issue by simply booking hardware IRQ 5 for MIPS PMU.
> 
> Tested-by: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
> Signed-off-by: Petr Å tetiar <ynezz@true.cz>
> Acked-by: John Crispin <john@phrozen.org>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-16 22:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 18:06 [PATCH] MIPS: perf: ath79: Fix perfcount IRQ assignment Petr Štetiar
2019-04-12 21:08 ` [PATCH v2] " Petr Štetiar
2019-04-12 21:16   ` John Crispin
2019-04-15 17:28   ` Paul Burton
2019-04-16 10:14     ` Marc Zyngier
2019-04-16 22:10   ` Paul Burton

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).