* [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-10 16:11 ` Matt Redfearn
0 siblings, 0 replies; 8+ messages in thread
From: Matt Redfearn @ 2016-08-10 16:11 UTC (permalink / raw)
To: ralf; +Cc: linux-mips, paul.burton, Matt Redfearn
Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
Makefile and the option to build it from KConfig, but left the file
itself floating in the tree.
Remove the unused source file.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
---
arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
1 file changed, 66 deletions(-)
delete mode 100644 arch/mips/kernel/smp-gic.c
diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
deleted file mode 100644
index 9b63829cf929..000000000000
--- a/arch/mips/kernel/smp-gic.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
- *
- * Based on smp-cmp.c:
- * Copyright (C) 2007 MIPS Technologies, Inc.
- * Author: Chris Dearman (chris@mips.com)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <linux/irqchip/mips-gic.h>
-#include <linux/printk.h>
-
-#include <asm/mips-cpc.h>
-#include <asm/smp-ops.h>
-
-void gic_send_ipi_single(int cpu, unsigned int action)
-{
- unsigned long flags;
- unsigned int intr;
- unsigned int core = cpu_data[cpu].core;
-
- pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
- smp_processor_id(), __func__, cpu, action, read_c0_status());
-
- local_irq_save(flags);
-
- switch (action) {
- case SMP_CALL_FUNCTION:
- intr = plat_ipi_call_int_xlate(cpu);
- break;
-
- case SMP_RESCHEDULE_YOURSELF:
- intr = plat_ipi_resched_int_xlate(cpu);
- break;
-
- default:
- BUG();
- }
-
- gic_send_ipi(intr);
-
- if (mips_cpc_present() && (core != current_cpu_data.core)) {
- while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
- mips_cm_lock_other(core, 0);
- mips_cpc_lock_other(core);
- write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
- mips_cpc_unlock_other();
- mips_cm_unlock_other();
- }
- }
-
- local_irq_restore(flags);
-}
-
-void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
-{
- unsigned int i;
-
- for_each_cpu(i, mask)
- gic_send_ipi_single(i, action);
-}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-10 16:11 ` Matt Redfearn
0 siblings, 0 replies; 8+ messages in thread
From: Matt Redfearn @ 2016-08-10 16:11 UTC (permalink / raw)
To: ralf; +Cc: linux-mips, paul.burton, Matt Redfearn
Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
Makefile and the option to build it from KConfig, but left the file
itself floating in the tree.
Remove the unused source file.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
---
arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
1 file changed, 66 deletions(-)
delete mode 100644 arch/mips/kernel/smp-gic.c
diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
deleted file mode 100644
index 9b63829cf929..000000000000
--- a/arch/mips/kernel/smp-gic.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2013 Imagination Technologies
- * Author: Paul Burton <paul.burton@imgtec.com>
- *
- * Based on smp-cmp.c:
- * Copyright (C) 2007 MIPS Technologies, Inc.
- * Author: Chris Dearman (chris@mips.com)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-
-#include <linux/irqchip/mips-gic.h>
-#include <linux/printk.h>
-
-#include <asm/mips-cpc.h>
-#include <asm/smp-ops.h>
-
-void gic_send_ipi_single(int cpu, unsigned int action)
-{
- unsigned long flags;
- unsigned int intr;
- unsigned int core = cpu_data[cpu].core;
-
- pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
- smp_processor_id(), __func__, cpu, action, read_c0_status());
-
- local_irq_save(flags);
-
- switch (action) {
- case SMP_CALL_FUNCTION:
- intr = plat_ipi_call_int_xlate(cpu);
- break;
-
- case SMP_RESCHEDULE_YOURSELF:
- intr = plat_ipi_resched_int_xlate(cpu);
- break;
-
- default:
- BUG();
- }
-
- gic_send_ipi(intr);
-
- if (mips_cpc_present() && (core != current_cpu_data.core)) {
- while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
- mips_cm_lock_other(core, 0);
- mips_cpc_lock_other(core);
- write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
- mips_cpc_unlock_other();
- mips_cm_unlock_other();
- }
- }
-
- local_irq_restore(flags);
-}
-
-void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
-{
- unsigned int i;
-
- for_each_cpu(i, mask)
- gic_send_ipi_single(i, action);
-}
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 8:42 ` Paul Burton
0 siblings, 0 replies; 8+ messages in thread
From: Paul Burton @ 2016-08-11 8:42 UTC (permalink / raw)
To: Matt Redfearn, ralf; +Cc: linux-mips
On 10/08/16 17:11, Matt Redfearn wrote:
> Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
> Makefile and the option to build it from KConfig, but left the file
> itself floating in the tree.
>
> Remove the unused source file.
>
> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
> ---
> arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
> 1 file changed, 66 deletions(-)
> delete mode 100644 arch/mips/kernel/smp-gic.c
>
> diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
> deleted file mode 100644
> index 9b63829cf929..000000000000
> --- a/arch/mips/kernel/smp-gic.c
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -/*
> - * Copyright (C) 2013 Imagination Technologies
> - * Author: Paul Burton <paul.burton@imgtec.com>
> - *
> - * Based on smp-cmp.c:
> - * Copyright (C) 2007 MIPS Technologies, Inc.
> - * Author: Chris Dearman (chris@mips.com)
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - */
> -
> -#include <linux/irqchip/mips-gic.h>
> -#include <linux/printk.h>
> -
> -#include <asm/mips-cpc.h>
> -#include <asm/smp-ops.h>
> -
> -void gic_send_ipi_single(int cpu, unsigned int action)
> -{
> - unsigned long flags;
> - unsigned int intr;
> - unsigned int core = cpu_data[cpu].core;
> -
> - pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
> - smp_processor_id(), __func__, cpu, action, read_c0_status());
> -
> - local_irq_save(flags);
> -
> - switch (action) {
> - case SMP_CALL_FUNCTION:
> - intr = plat_ipi_call_int_xlate(cpu);
> - break;
> -
> - case SMP_RESCHEDULE_YOURSELF:
> - intr = plat_ipi_resched_int_xlate(cpu);
> - break;
> -
> - default:
> - BUG();
> - }
> -
> - gic_send_ipi(intr);
> -
> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
> - mips_cm_lock_other(core, 0);
> - mips_cpc_lock_other(core);
> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
> - mips_cpc_unlock_other();
> - mips_cm_unlock_other();
> - }
> - }
Hi Matt,
This patch itself makes sense, but it does bring to light that the IPI
IRQ domain stuff will have broken cpuidle. When a core goes into one of
the deeper power saving states (becoming clock gated or power gated) it
won't automatically wake back up upon interrupts, which is why the bit
of code above exists to bring it back out of the power saving state via
the CPC.
Thanks,
Paul
> -
> - local_irq_restore(flags);
> -}
> -
> -void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
> -{
> - unsigned int i;
> -
> - for_each_cpu(i, mask)
> - gic_send_ipi_single(i, action);
> -}
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 8:42 ` Paul Burton
0 siblings, 0 replies; 8+ messages in thread
From: Paul Burton @ 2016-08-11 8:42 UTC (permalink / raw)
To: Matt Redfearn, ralf; +Cc: linux-mips
On 10/08/16 17:11, Matt Redfearn wrote:
> Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
> Makefile and the option to build it from KConfig, but left the file
> itself floating in the tree.
>
> Remove the unused source file.
>
> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
> ---
> arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
> 1 file changed, 66 deletions(-)
> delete mode 100644 arch/mips/kernel/smp-gic.c
>
> diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
> deleted file mode 100644
> index 9b63829cf929..000000000000
> --- a/arch/mips/kernel/smp-gic.c
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -/*
> - * Copyright (C) 2013 Imagination Technologies
> - * Author: Paul Burton <paul.burton@imgtec.com>
> - *
> - * Based on smp-cmp.c:
> - * Copyright (C) 2007 MIPS Technologies, Inc.
> - * Author: Chris Dearman (chris@mips.com)
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License as published by the
> - * Free Software Foundation; either version 2 of the License, or (at your
> - * option) any later version.
> - */
> -
> -#include <linux/irqchip/mips-gic.h>
> -#include <linux/printk.h>
> -
> -#include <asm/mips-cpc.h>
> -#include <asm/smp-ops.h>
> -
> -void gic_send_ipi_single(int cpu, unsigned int action)
> -{
> - unsigned long flags;
> - unsigned int intr;
> - unsigned int core = cpu_data[cpu].core;
> -
> - pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
> - smp_processor_id(), __func__, cpu, action, read_c0_status());
> -
> - local_irq_save(flags);
> -
> - switch (action) {
> - case SMP_CALL_FUNCTION:
> - intr = plat_ipi_call_int_xlate(cpu);
> - break;
> -
> - case SMP_RESCHEDULE_YOURSELF:
> - intr = plat_ipi_resched_int_xlate(cpu);
> - break;
> -
> - default:
> - BUG();
> - }
> -
> - gic_send_ipi(intr);
> -
> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
> - mips_cm_lock_other(core, 0);
> - mips_cpc_lock_other(core);
> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
> - mips_cpc_unlock_other();
> - mips_cm_unlock_other();
> - }
> - }
Hi Matt,
This patch itself makes sense, but it does bring to light that the IPI
IRQ domain stuff will have broken cpuidle. When a core goes into one of
the deeper power saving states (becoming clock gated or power gated) it
won't automatically wake back up upon interrupts, which is why the bit
of code above exists to bring it back out of the power saving state via
the CPC.
Thanks,
Paul
> -
> - local_irq_restore(flags);
> -}
> -
> -void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
> -{
> - unsigned int i;
> -
> - for_each_cpu(i, mask)
> - gic_send_ipi_single(i, action);
> -}
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 10:34 ` Matt Redfearn
0 siblings, 0 replies; 8+ messages in thread
From: Matt Redfearn @ 2016-08-11 10:34 UTC (permalink / raw)
To: Paul Burton, ralf; +Cc: linux-mips
Hi Paul,
On 11/08/16 09:42, Paul Burton wrote:
> On 10/08/16 17:11, Matt Redfearn wrote:
>> Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
>> Makefile and the option to build it from KConfig, but left the file
>> itself floating in the tree.
>>
>> Remove the unused source file.
>>
>> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
>> ---
>> arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
>> 1 file changed, 66 deletions(-)
>> delete mode 100644 arch/mips/kernel/smp-gic.c
>>
>> diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
>> deleted file mode 100644
>> index 9b63829cf929..000000000000
>> --- a/arch/mips/kernel/smp-gic.c
>> +++ /dev/null
>> @@ -1,66 +0,0 @@
>> -/*
>> - * Copyright (C) 2013 Imagination Technologies
>> - * Author: Paul Burton <paul.burton@imgtec.com>
>> - *
>> - * Based on smp-cmp.c:
>> - * Copyright (C) 2007 MIPS Technologies, Inc.
>> - * Author: Chris Dearman (chris@mips.com)
>> - *
>> - * This program is free software; you can redistribute it and/or modify it
>> - * under the terms of the GNU General Public License as published by the
>> - * Free Software Foundation; either version 2 of the License, or (at your
>> - * option) any later version.
>> - */
>> -
>> -#include <linux/irqchip/mips-gic.h>
>> -#include <linux/printk.h>
>> -
>> -#include <asm/mips-cpc.h>
>> -#include <asm/smp-ops.h>
>> -
>> -void gic_send_ipi_single(int cpu, unsigned int action)
>> -{
>> - unsigned long flags;
>> - unsigned int intr;
>> - unsigned int core = cpu_data[cpu].core;
>> -
>> - pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
>> - smp_processor_id(), __func__, cpu, action, read_c0_status());
>> -
>> - local_irq_save(flags);
>> -
>> - switch (action) {
>> - case SMP_CALL_FUNCTION:
>> - intr = plat_ipi_call_int_xlate(cpu);
>> - break;
>> -
>> - case SMP_RESCHEDULE_YOURSELF:
>> - intr = plat_ipi_resched_int_xlate(cpu);
>> - break;
>> -
>> - default:
>> - BUG();
>> - }
>> -
>> - gic_send_ipi(intr);
>> -
>> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
>> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
>> - mips_cm_lock_other(core, 0);
>> - mips_cpc_lock_other(core);
>> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
>> - mips_cpc_unlock_other();
>> - mips_cm_unlock_other();
>> - }
>> - }
> Hi Matt,
>
> This patch itself makes sense, but it does bring to light that the IPI
> IRQ domain stuff will have broken cpuidle. When a core goes into one of
> the deeper power saving states (becoming clock gated or power gated) it
> won't automatically wake back up upon interrupts, which is why the bit
> of code above exists to bring it back out of the power saving state via
> the CPC.
There is equivalent code to that removed by the IPI IRQ domain here:
http://lxr.free-electrons.com/source/arch/mips/kernel/smp.c#L185.
With a 2c2t Interaptiv, core 1 does seem to be getting clock & power gated:
# cat /sys/devices/system/cpu/cpu2/cpuidle/state2/desc
core clock gated
# cat /sys/devices/system/cpu/cpu2/cpuidle/state3/desc
core power gated
# cat /sys/devices/system/cpu/cpu2/cpuidle/state2/time
7007
# cat /sys/devices/system/cpu/cpu2/cpuidle/state3/time
300549307
# cat /sys/devices/system/cpu/cpu3/cpuidle/state2/time
8556
# cat /sys/devices/system/cpu/cpu3/cpuidle/state3/time
301527771
So I think it's all good.
Thanks,
Matt
>
> Thanks,
> Paul
>
>> -
>> - local_irq_restore(flags);
>> -}
>> -
>> -void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
>> -{
>> - unsigned int i;
>> -
>> - for_each_cpu(i, mask)
>> - gic_send_ipi_single(i, action);
>> -}
>>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 10:34 ` Matt Redfearn
0 siblings, 0 replies; 8+ messages in thread
From: Matt Redfearn @ 2016-08-11 10:34 UTC (permalink / raw)
To: Paul Burton, ralf; +Cc: linux-mips
Hi Paul,
On 11/08/16 09:42, Paul Burton wrote:
> On 10/08/16 17:11, Matt Redfearn wrote:
>> Commit 7eb8c99db26c ("MIPS: Delete smp-gic.c") removed the file from the
>> Makefile and the option to build it from KConfig, but left the file
>> itself floating in the tree.
>>
>> Remove the unused source file.
>>
>> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
>> ---
>> arch/mips/kernel/smp-gic.c | 66 ----------------------------------------------
>> 1 file changed, 66 deletions(-)
>> delete mode 100644 arch/mips/kernel/smp-gic.c
>>
>> diff --git a/arch/mips/kernel/smp-gic.c b/arch/mips/kernel/smp-gic.c
>> deleted file mode 100644
>> index 9b63829cf929..000000000000
>> --- a/arch/mips/kernel/smp-gic.c
>> +++ /dev/null
>> @@ -1,66 +0,0 @@
>> -/*
>> - * Copyright (C) 2013 Imagination Technologies
>> - * Author: Paul Burton <paul.burton@imgtec.com>
>> - *
>> - * Based on smp-cmp.c:
>> - * Copyright (C) 2007 MIPS Technologies, Inc.
>> - * Author: Chris Dearman (chris@mips.com)
>> - *
>> - * This program is free software; you can redistribute it and/or modify it
>> - * under the terms of the GNU General Public License as published by the
>> - * Free Software Foundation; either version 2 of the License, or (at your
>> - * option) any later version.
>> - */
>> -
>> -#include <linux/irqchip/mips-gic.h>
>> -#include <linux/printk.h>
>> -
>> -#include <asm/mips-cpc.h>
>> -#include <asm/smp-ops.h>
>> -
>> -void gic_send_ipi_single(int cpu, unsigned int action)
>> -{
>> - unsigned long flags;
>> - unsigned int intr;
>> - unsigned int core = cpu_data[cpu].core;
>> -
>> - pr_debug("CPU%d: %s cpu %d action %u status %08x\n",
>> - smp_processor_id(), __func__, cpu, action, read_c0_status());
>> -
>> - local_irq_save(flags);
>> -
>> - switch (action) {
>> - case SMP_CALL_FUNCTION:
>> - intr = plat_ipi_call_int_xlate(cpu);
>> - break;
>> -
>> - case SMP_RESCHEDULE_YOURSELF:
>> - intr = plat_ipi_resched_int_xlate(cpu);
>> - break;
>> -
>> - default:
>> - BUG();
>> - }
>> -
>> - gic_send_ipi(intr);
>> -
>> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
>> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
>> - mips_cm_lock_other(core, 0);
>> - mips_cpc_lock_other(core);
>> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
>> - mips_cpc_unlock_other();
>> - mips_cm_unlock_other();
>> - }
>> - }
> Hi Matt,
>
> This patch itself makes sense, but it does bring to light that the IPI
> IRQ domain stuff will have broken cpuidle. When a core goes into one of
> the deeper power saving states (becoming clock gated or power gated) it
> won't automatically wake back up upon interrupts, which is why the bit
> of code above exists to bring it back out of the power saving state via
> the CPC.
There is equivalent code to that removed by the IPI IRQ domain here:
http://lxr.free-electrons.com/source/arch/mips/kernel/smp.c#L185.
With a 2c2t Interaptiv, core 1 does seem to be getting clock & power gated:
# cat /sys/devices/system/cpu/cpu2/cpuidle/state2/desc
core clock gated
# cat /sys/devices/system/cpu/cpu2/cpuidle/state3/desc
core power gated
# cat /sys/devices/system/cpu/cpu2/cpuidle/state2/time
7007
# cat /sys/devices/system/cpu/cpu2/cpuidle/state3/time
300549307
# cat /sys/devices/system/cpu/cpu3/cpuidle/state2/time
8556
# cat /sys/devices/system/cpu/cpu3/cpuidle/state3/time
301527771
So I think it's all good.
Thanks,
Matt
>
> Thanks,
> Paul
>
>> -
>> - local_irq_restore(flags);
>> -}
>> -
>> -void gic_send_ipi_mask(const struct cpumask *mask, unsigned int action)
>> -{
>> - unsigned int i;
>> -
>> - for_each_cpu(i, mask)
>> - gic_send_ipi_single(i, action);
>> -}
>>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 11:30 ` Paul Burton
0 siblings, 0 replies; 8+ messages in thread
From: Paul Burton @ 2016-08-11 11:30 UTC (permalink / raw)
To: Matt Redfearn, ralf; +Cc: linux-mips
On 11/08/16 11:34, Matt Redfearn wrote:
>>> - gic_send_ipi(intr);
>>> -
>>> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
>>> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
>>> - mips_cm_lock_other(core, 0);
>>> - mips_cpc_lock_other(core);
>>> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
>>> - mips_cpc_unlock_other();
>>> - mips_cm_unlock_other();
>>> - }
>>> - }
>> Hi Matt,
>>
>> This patch itself makes sense, but it does bring to light that the IPI
>> IRQ domain stuff will have broken cpuidle. When a core goes into one of
>> the deeper power saving states (becoming clock gated or power gated) it
>> won't automatically wake back up upon interrupts, which is why the bit
>> of code above exists to bring it back out of the power saving state via
>> the CPC.
>
> There is equivalent code to that removed by the IPI IRQ domain here:
> http://lxr.free-electrons.com/source/arch/mips/kernel/smp.c#L185.
>
> With a 2c2t Interaptiv, core 1 does seem to be getting clock & power gated:
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state2/desc
> core clock gated
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state3/desc
> core power gated
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state2/time
> 7007
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state3/time
> 300549307
> # cat /sys/devices/system/cpu/cpu3/cpuidle/state2/time
> 8556
> # cat /sys/devices/system/cpu/cpu3/cpuidle/state3/time
> 301527771
>
> So I think it's all good.
Hi Matt,
Right you are :) I hadn't realised the code had been copied there.
Thanks,
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] MIPS: Delete unused file smp-gic.c
@ 2016-08-11 11:30 ` Paul Burton
0 siblings, 0 replies; 8+ messages in thread
From: Paul Burton @ 2016-08-11 11:30 UTC (permalink / raw)
To: Matt Redfearn, ralf; +Cc: linux-mips
On 11/08/16 11:34, Matt Redfearn wrote:
>>> - gic_send_ipi(intr);
>>> -
>>> - if (mips_cpc_present() && (core != current_cpu_data.core)) {
>>> - while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
>>> - mips_cm_lock_other(core, 0);
>>> - mips_cpc_lock_other(core);
>>> - write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
>>> - mips_cpc_unlock_other();
>>> - mips_cm_unlock_other();
>>> - }
>>> - }
>> Hi Matt,
>>
>> This patch itself makes sense, but it does bring to light that the IPI
>> IRQ domain stuff will have broken cpuidle. When a core goes into one of
>> the deeper power saving states (becoming clock gated or power gated) it
>> won't automatically wake back up upon interrupts, which is why the bit
>> of code above exists to bring it back out of the power saving state via
>> the CPC.
>
> There is equivalent code to that removed by the IPI IRQ domain here:
> http://lxr.free-electrons.com/source/arch/mips/kernel/smp.c#L185.
>
> With a 2c2t Interaptiv, core 1 does seem to be getting clock & power gated:
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state2/desc
> core clock gated
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state3/desc
> core power gated
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state2/time
> 7007
> # cat /sys/devices/system/cpu/cpu2/cpuidle/state3/time
> 300549307
> # cat /sys/devices/system/cpu/cpu3/cpuidle/state2/time
> 8556
> # cat /sys/devices/system/cpu/cpu3/cpuidle/state3/time
> 301527771
>
> So I think it's all good.
Hi Matt,
Right you are :) I hadn't realised the code had been copied there.
Thanks,
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-08-11 11:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 16:11 [PATCH] MIPS: Delete unused file smp-gic.c Matt Redfearn
2016-08-10 16:11 ` Matt Redfearn
2016-08-11 8:42 ` Paul Burton
2016-08-11 8:42 ` Paul Burton
2016-08-11 10:34 ` Matt Redfearn
2016-08-11 10:34 ` Matt Redfearn
2016-08-11 11:30 ` Paul Burton
2016-08-11 11:30 ` Paul Burton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.