All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 10:04 ` Bastian Hecht
  0 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
system initialization for Suspend and CPUIdle.

This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
ARM: hw_breakpoint: Debug powerdown support for self-hosted debug

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
Hi,

I've experienced a kernel oops while working on Suspend-To-Ram and CPUIdle
on the Armadillo800EVA from Renesas. After echo mem >/sys/power/state I get:

Unable to handle kernel paging request at virtual address e7fddef0
PC is at 0xe7fddef0
LR is at notifier_call_chain+0x40/0x70

I've bisected the kernel to the commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1

    ARM: hw_breakpoint: Debug powerdown support for self-hosted debug

and succeeded to fix it by removing the __cpuinitdata tag.

Cheers,

 Bastian

 arch/arm/kernel/hw_breakpoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 96093b7..8eb67bc 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1043,7 +1043,7 @@ static int dbg_cpu_pm_notify(struct notifier_block *self, unsigned long action,
 	return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata dbg_cpu_pm_nb = {
+static struct notifier_block dbg_cpu_pm_nb = {
 	.notifier_call = dbg_cpu_pm_notify,
 };
 
-- 
1.7.9.5


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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 10:04 ` Bastian Hecht
  0 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
system initialization for Suspend and CPUIdle.

This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
ARM: hw_breakpoint: Debug powerdown support for self-hosted debug

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
Hi,

I've experienced a kernel oops while working on Suspend-To-Ram and CPUIdle
on the Armadillo800EVA from Renesas. After echo mem >/sys/power/state I get:

Unable to handle kernel paging request at virtual address e7fddef0
PC is at 0xe7fddef0
LR is at notifier_call_chain+0x40/0x70

I've bisected the kernel to the commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1

    ARM: hw_breakpoint: Debug powerdown support for self-hosted debug

and succeeded to fix it by removing the __cpuinitdata tag.

Cheers,

 Bastian

 arch/arm/kernel/hw_breakpoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 96093b7..8eb67bc 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1043,7 +1043,7 @@ static int dbg_cpu_pm_notify(struct notifier_block *self, unsigned long action,
 	return NOTIFY_OK;
 }
 
-static struct notifier_block __cpuinitdata dbg_cpu_pm_nb = {
+static struct notifier_block dbg_cpu_pm_nb = {
 	.notifier_call = dbg_cpu_pm_notify,
 };
 
-- 
1.7.9.5

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 10:04 ` Bastian Hecht
@ 2013-04-10 11:11   ` Will Deacon
  -1 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2013-04-10 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
> system initialization for Suspend and CPUIdle.
> 
> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
> 
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Thanks Bastian, I'll take this into my tree.

Will

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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 11:11   ` Will Deacon
  0 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2013-04-10 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
> system initialization for Suspend and CPUIdle.
> 
> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
> 
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Thanks Bastian, I'll take this into my tree.

Will

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 11:11   ` Will Deacon
@ 2013-04-10 11:26     ` Bastian Hecht
  -1 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

2013/4/10 Will Deacon <will.deacon@arm.com>:
> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>> system initialization for Suspend and CPUIdle.
>>
>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>
>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>
> Thanks Bastian, I'll take this into my tree.
>
> Will

Nice, thanks!

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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 11:26     ` Bastian Hecht
  0 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 11:26 UTC (permalink / raw)
  To: linux-arm-kernel

2013/4/10 Will Deacon <will.deacon@arm.com>:
> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>> system initialization for Suspend and CPUIdle.
>>
>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>
>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>
> Thanks Bastian, I'll take this into my tree.
>
> Will

Nice, thanks!

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 11:26     ` Bastian Hecht
@ 2013-04-10 12:04       ` Dietmar Eggemann
  -1 siblings, 0 replies; 14+ messages in thread
From: Dietmar Eggemann @ 2013-04-10 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/04/13 12:26, Bastian Hecht wrote:
> 2013/4/10 Will Deacon <will.deacon@arm.com>:
>> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>>> system initialization for Suspend and CPUIdle.
>>>
>>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>>
>>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>>
>> Thanks Bastian, I'll take this into my tree.
>>
>> Will
>
> Nice, thanks!
>

Hi Bastian,

thanks for catching this. Is my assumption right that you used an UP kernel?

I didn't catch this error during my Suspend-To-Ram/CPUidle tests because
I tested only on SMP kernels where 'dbg_cpu_pm_nb' is placed into the
.data and not in the .init.data section.


Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
Lorenzo is currently working on an appropriate patch.

-- Dietmar

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.


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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 12:04       ` Dietmar Eggemann
  0 siblings, 0 replies; 14+ messages in thread
From: Dietmar Eggemann @ 2013-04-10 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/04/13 12:26, Bastian Hecht wrote:
> 2013/4/10 Will Deacon <will.deacon@arm.com>:
>> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>>> system initialization for Suspend and CPUIdle.
>>>
>>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>>
>>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>>
>> Thanks Bastian, I'll take this into my tree.
>>
>> Will
>
> Nice, thanks!
>

Hi Bastian,

thanks for catching this. Is my assumption right that you used an UP kernel?

I didn't catch this error during my Suspend-To-Ram/CPUidle tests because
I tested only on SMP kernels where 'dbg_cpu_pm_nb' is placed into the
.data and not in the .init.data section.


Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
Lorenzo is currently working on an appropriate patch.

-- Dietmar

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 12:04       ` Dietmar Eggemann
@ 2013-04-10 12:11         ` Bastian Hecht
  -1 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dietmar,

2013/4/10 Dietmar Eggemann <dietmar.eggemann@arm.com>:
> On 10/04/13 12:26, Bastian Hecht wrote:
>>
>> 2013/4/10 Will Deacon <will.deacon@arm.com>:
>>>
>>> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>>>>
>>>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>>>> system initialization for Suspend and CPUIdle.
>>>>
>>>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>>>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>>>
>>>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>>>
>>>
>>> Thanks Bastian, I'll take this into my tree.
>>>
>>> Will
>>
>>
>> Nice, thanks!
>>
>
> Hi Bastian,
>
> thanks for catching this. Is my assumption right that you used an UP kernel?

Yes exactly, it's for a Cortex A9 UP core, so a UP kernel. Glad I could help.

> I didn't catch this error during my Suspend-To-Ram/CPUidle tests because
> I tested only on SMP kernels where 'dbg_cpu_pm_nb' is placed into the
> .data and not in the .init.data section.
>
>
> Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
> Lorenzo is currently working on an appropriate patch.
>
> -- Dietmar
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium.  Thank you.
>

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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 12:11         ` Bastian Hecht
  0 siblings, 0 replies; 14+ messages in thread
From: Bastian Hecht @ 2013-04-10 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dietmar,

2013/4/10 Dietmar Eggemann <dietmar.eggemann@arm.com>:
> On 10/04/13 12:26, Bastian Hecht wrote:
>>
>> 2013/4/10 Will Deacon <will.deacon@arm.com>:
>>>
>>> On Wed, Apr 10, 2013 at 11:04:38AM +0100, Bastian Hecht wrote:
>>>>
>>>> We must not declare dbg_cpu_pm_nb as __cpuinitdata as we need it after
>>>> system initialization for Suspend and CPUIdle.
>>>>
>>>> This was done in commit 9a6eb310eaa5336b89a27a0bbb78da4bba35f6f1
>>>> ARM: hw_breakpoint: Debug powerdown support for self-hosted debug
>>>>
>>>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>>>
>>>
>>> Thanks Bastian, I'll take this into my tree.
>>>
>>> Will
>>
>>
>> Nice, thanks!
>>
>
> Hi Bastian,
>
> thanks for catching this. Is my assumption right that you used an UP kernel?

Yes exactly, it's for a Cortex A9 UP core, so a UP kernel. Glad I could help.

> I didn't catch this error during my Suspend-To-Ram/CPUidle tests because
> I tested only on SMP kernels where 'dbg_cpu_pm_nb' is placed into the
> .data and not in the .init.data section.
>
>
> Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
> Lorenzo is currently working on an appropriate patch.
>
> -- Dietmar
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium.  Thank you.
>

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 12:11         ` Bastian Hecht
@ 2013-04-10 12:53           ` Will Deacon
  -1 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2013-04-10 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 01:11:16PM +0100, Bastian Hecht wrote:
> > Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
> > Lorenzo is currently working on an appropriate patch.

I don't think we do. The __cpuinitdata annotation there is only used on a
hotplug notifier, which should be fine.

Will

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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 12:53           ` Will Deacon
  0 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2013-04-10 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 01:11:16PM +0100, Bastian Hecht wrote:
> > Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
> > Lorenzo is currently working on an appropriate patch.

I don't think we do. The __cpuinitdata annotation there is only used on a
hotplug notifier, which should be fine.

Will

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

* Re: [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
  2013-04-10 12:53           ` Will Deacon
@ 2013-04-10 13:04             ` Dietmar Eggemann
  -1 siblings, 0 replies; 14+ messages in thread
From: Dietmar Eggemann @ 2013-04-10 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/04/13 13:53, Will Deacon wrote:
> On Wed, Apr 10, 2013 at 01:11:16PM +0100, Bastian Hecht wrote:
>>> Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
>>> Lorenzo is currently working on an appropriate patch.
>
> I don't think we do. The __cpuinitdata annotation there is only used on a
> hotplug notifier, which should be fine.

You right, I got confused about what is already upstream.

-- Dietmar

>
> Will
>

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.


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

* [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb
@ 2013-04-10 13:04             ` Dietmar Eggemann
  0 siblings, 0 replies; 14+ messages in thread
From: Dietmar Eggemann @ 2013-04-10 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/04/13 13:53, Will Deacon wrote:
> On Wed, Apr 10, 2013 at 01:11:16PM +0100, Bastian Hecht wrote:
>>> Will, we have the same issue in arch/arm/kernel/perf_event_cpu.c.
>>> Lorenzo is currently working on an appropriate patch.
>
> I don't think we do. The __cpuinitdata annotation there is only used on a
> hotplug notifier, which should be fine.

You right, I got confused about what is already upstream.

-- Dietmar

>
> Will
>

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

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

end of thread, other threads:[~2013-04-10 13:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10 10:04 [PATCH] ARM: hw_breakpoint: Do not use __cpuinitdata for dbg_cpu_pm_nb Bastian Hecht
2013-04-10 10:04 ` Bastian Hecht
2013-04-10 11:11 ` Will Deacon
2013-04-10 11:11   ` Will Deacon
2013-04-10 11:26   ` Bastian Hecht
2013-04-10 11:26     ` Bastian Hecht
2013-04-10 12:04     ` Dietmar Eggemann
2013-04-10 12:04       ` Dietmar Eggemann
2013-04-10 12:11       ` Bastian Hecht
2013-04-10 12:11         ` Bastian Hecht
2013-04-10 12:53         ` Will Deacon
2013-04-10 12:53           ` Will Deacon
2013-04-10 13:04           ` Dietmar Eggemann
2013-04-10 13:04             ` Dietmar Eggemann

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.