All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-01 22:53 ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon

Hi,
series of patches for fixing up attempt to suspend on X15 

Test: http://pastebin.ubuntu.com/15582436/

Based on v4.6-rc1

Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
modules are installed

Nishanth Menon (3):
  ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
  ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
  ARM: OMAP: Catch callers of revision information prior to it being
    populated

 arch/arm/mach-omap1/id.c             | 1 +
 arch/arm/mach-omap2/id.c             | 1 +
 arch/arm/mach-omap2/io.c             | 3 ++-
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 4 files changed, 11 insertions(+), 1 deletion(-)

-- 
2.8.0

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

* [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-01 22:53 ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon

Hi,
series of patches for fixing up attempt to suspend on X15 

Test: http://pastebin.ubuntu.com/15582436/

Based on v4.6-rc1

Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
modules are installed

Nishanth Menon (3):
  ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
  ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
  ARM: OMAP: Catch callers of revision information prior to it being
    populated

 arch/arm/mach-omap1/id.c             | 1 +
 arch/arm/mach-omap2/id.c             | 1 +
 arch/arm/mach-omap2/io.c             | 3 ++-
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 4 files changed, 11 insertions(+), 1 deletion(-)

-- 
2.8.0

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

* [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-01 22:53 ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
series of patches for fixing up attempt to suspend on X15 

Test: http://pastebin.ubuntu.com/15582436/

Based on v4.6-rc1

Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
modules are installed

Nishanth Menon (3):
  ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
  ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
  ARM: OMAP: Catch callers of revision information prior to it being
    populated

 arch/arm/mach-omap1/id.c             | 1 +
 arch/arm/mach-omap2/id.c             | 1 +
 arch/arm/mach-omap2/io.c             | 3 ++-
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 4 files changed, 11 insertions(+), 1 deletion(-)

-- 
2.8.0

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

* [PATCH 1/3] ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
  2016-04-01 22:53 ` Nishanth Menon
  (?)
@ 2016-04-01 22:53   ` Nishanth Menon
  -1 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon

DRA7 has no SAR region for automated save and restore of wakeupgen,
which does not make real since the SoC really does not do legacy OFF
mode anymore. Further wakeupgen should never loose context in CSWR
retention mode for MPU domain on DRA7 since that is the deepest state
we will enter.

So, just skip, instead of oopsing as follows while attemptint to enter
suspend on BeagleBoard-X15.
[   55.589771] Unable to handle kernel paging request at virtual address 00002684
[   55.589771] pgd = ec69c000
[...]
[   55.589771] [<c0123cc8>] (irq_notifier) from [<c015ad70>] (notifier_call_chain+0x4c/0x8c)
[   55.589771] [<c015ad70>] (notifier_call_chain) from [<c021469c>] (cpu_cluster_pm_enter+0x2c/0x78)
[   55.589771] [<c021469c>] (cpu_cluster_pm_enter) from [<c0514508>] (syscore_suspend+0xb8/0x31c)
[   55.589771] [<c0514508>] (syscore_suspend) from [<c0197d24>] (suspend_devices_and_enter+0x308/0x9e4)
[   55.589771] [<c0197d24>] (suspend_devices_and_enter) from [<c0198a40>] (pm_suspend+0x640/0x75c)
[   55.589771] [<c0198a40>] (pm_suspend) from [<c0196bcc>] (state_store+0x64/0xb8)
[   55.589771] [<c0196bcc>] (state_store) from [<c0307914>] (kernfs_fop_write+0xc0/0x1bc)
[   55.589771] [<c0307914>] (kernfs_fop_write) from [<c028ac80>] (__vfs_write+0x1c/0xd8)
[   55.589771] [<c028ac80>] (__vfs_write) from [<c028bb70>] (vfs_write+0x90/0x16c)
[   55.589771] [<c028bb70>] (vfs_write) from [<c028c890>] (SyS_write+0x44/0x9c)
[   55.589771] [<c028c890>] (SyS_write) from [<c0107840>] (ret_fast_syscall+0x0/0x1c)
[...]

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index f397bd6bd6e3..2c04f2741476 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -274,6 +274,10 @@ static inline void omap5_irq_save_context(void)
  */
 static void irq_save_context(void)
 {
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
+
 	if (!sar_base)
 		sar_base = omap4_get_sar_ram_base();
 
@@ -290,6 +294,9 @@ static void irq_sar_clear(void)
 {
 	u32 val;
 	u32 offset = SAR_BACKUP_STATUS_OFFSET;
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
 
 	if (soc_is_omap54xx())
 		offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
-- 
2.8.0

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

* [PATCH 1/3] ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Nishanth Menon, linux-omap, linux-kernel, linux-arm-kernel

DRA7 has no SAR region for automated save and restore of wakeupgen,
which does not make real since the SoC really does not do legacy OFF
mode anymore. Further wakeupgen should never loose context in CSWR
retention mode for MPU domain on DRA7 since that is the deepest state
we will enter.

So, just skip, instead of oopsing as follows while attemptint to enter
suspend on BeagleBoard-X15.
[   55.589771] Unable to handle kernel paging request at virtual address 00002684
[   55.589771] pgd = ec69c000
[...]
[   55.589771] [<c0123cc8>] (irq_notifier) from [<c015ad70>] (notifier_call_chain+0x4c/0x8c)
[   55.589771] [<c015ad70>] (notifier_call_chain) from [<c021469c>] (cpu_cluster_pm_enter+0x2c/0x78)
[   55.589771] [<c021469c>] (cpu_cluster_pm_enter) from [<c0514508>] (syscore_suspend+0xb8/0x31c)
[   55.589771] [<c0514508>] (syscore_suspend) from [<c0197d24>] (suspend_devices_and_enter+0x308/0x9e4)
[   55.589771] [<c0197d24>] (suspend_devices_and_enter) from [<c0198a40>] (pm_suspend+0x640/0x75c)
[   55.589771] [<c0198a40>] (pm_suspend) from [<c0196bcc>] (state_store+0x64/0xb8)
[   55.589771] [<c0196bcc>] (state_store) from [<c0307914>] (kernfs_fop_write+0xc0/0x1bc)
[   55.589771] [<c0307914>] (kernfs_fop_write) from [<c028ac80>] (__vfs_write+0x1c/0xd8)
[   55.589771] [<c028ac80>] (__vfs_write) from [<c028bb70>] (vfs_write+0x90/0x16c)
[   55.589771] [<c028bb70>] (vfs_write) from [<c028c890>] (SyS_write+0x44/0x9c)
[   55.589771] [<c028c890>] (SyS_write) from [<c0107840>] (ret_fast_syscall+0x0/0x1c)
[...]

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index f397bd6bd6e3..2c04f2741476 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -274,6 +274,10 @@ static inline void omap5_irq_save_context(void)
  */
 static void irq_save_context(void)
 {
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
+
 	if (!sar_base)
 		sar_base = omap4_get_sar_ram_base();
 
@@ -290,6 +294,9 @@ static void irq_sar_clear(void)
 {
 	u32 val;
 	u32 offset = SAR_BACKUP_STATUS_OFFSET;
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
 
 	if (soc_is_omap54xx())
 		offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
-- 
2.8.0

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

* [PATCH 1/3] ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

DRA7 has no SAR region for automated save and restore of wakeupgen,
which does not make real since the SoC really does not do legacy OFF
mode anymore. Further wakeupgen should never loose context in CSWR
retention mode for MPU domain on DRA7 since that is the deepest state
we will enter.

So, just skip, instead of oopsing as follows while attemptint to enter
suspend on BeagleBoard-X15.
[   55.589771] Unable to handle kernel paging request at virtual address 00002684
[   55.589771] pgd = ec69c000
[...]
[   55.589771] [<c0123cc8>] (irq_notifier) from [<c015ad70>] (notifier_call_chain+0x4c/0x8c)
[   55.589771] [<c015ad70>] (notifier_call_chain) from [<c021469c>] (cpu_cluster_pm_enter+0x2c/0x78)
[   55.589771] [<c021469c>] (cpu_cluster_pm_enter) from [<c0514508>] (syscore_suspend+0xb8/0x31c)
[   55.589771] [<c0514508>] (syscore_suspend) from [<c0197d24>] (suspend_devices_and_enter+0x308/0x9e4)
[   55.589771] [<c0197d24>] (suspend_devices_and_enter) from [<c0198a40>] (pm_suspend+0x640/0x75c)
[   55.589771] [<c0198a40>] (pm_suspend) from [<c0196bcc>] (state_store+0x64/0xb8)
[   55.589771] [<c0196bcc>] (state_store) from [<c0307914>] (kernfs_fop_write+0xc0/0x1bc)
[   55.589771] [<c0307914>] (kernfs_fop_write) from [<c028ac80>] (__vfs_write+0x1c/0xd8)
[   55.589771] [<c028ac80>] (__vfs_write) from [<c028bb70>] (vfs_write+0x90/0x16c)
[   55.589771] [<c028bb70>] (vfs_write) from [<c028c890>] (SyS_write+0x44/0x9c)
[   55.589771] [<c028c890>] (SyS_write) from [<c0107840>] (ret_fast_syscall+0x0/0x1c)
[...]

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index f397bd6bd6e3..2c04f2741476 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -274,6 +274,10 @@ static inline void omap5_irq_save_context(void)
  */
 static void irq_save_context(void)
 {
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
+
 	if (!sar_base)
 		sar_base = omap4_get_sar_ram_base();
 
@@ -290,6 +294,9 @@ static void irq_sar_clear(void)
 {
 	u32 val;
 	u32 offset = SAR_BACKUP_STATUS_OFFSET;
+	/* DRA7 has no SAR to save */
+	if (soc_is_dra7xx())
+		return;
 
 	if (soc_is_omap54xx())
 		offset = OMAP5_SAR_BACKUP_STATUS_OFFSET;
-- 
2.8.0

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

* [PATCH 2/3] ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
  2016-04-01 22:53 ` Nishanth Menon
  (?)
@ 2016-04-01 22:53   ` Nishanth Menon
  -1 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon, Keerthy

When commit 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision
information for soc_is* calls") introduced SoC check using
omap_revision, it missed providing DRA7 as class for initializing
the omap_version variable. Without doing this, soc_is_dra7xx() will
fail and as a result, omap4_pm_init_early never initializes the dra7
erratum for CPU power state. This causes the suspend path to fail
on DRA7 devices.

Fixes: 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls")
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3c87e40650cf..2b86b25bcb83 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -736,7 +736,8 @@ void __init omap5_init_late(void)
 #ifdef CONFIG_SOC_DRA7XX
 void __init dra7xx_init_early(void)
 {
-	omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
+	omap2_set_globals_tap(DRA7XX_CLASS,
+			      OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
 	omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
 	omap2_control_base_init();
 	omap4_pm_init_early();
-- 
2.8.0

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

* [PATCH 2/3] ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon, Keerthy

When commit 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision
information for soc_is* calls") introduced SoC check using
omap_revision, it missed providing DRA7 as class for initializing
the omap_version variable. Without doing this, soc_is_dra7xx() will
fail and as a result, omap4_pm_init_early never initializes the dra7
erratum for CPU power state. This causes the suspend path to fail
on DRA7 devices.

Fixes: 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls")
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3c87e40650cf..2b86b25bcb83 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -736,7 +736,8 @@ void __init omap5_init_late(void)
 #ifdef CONFIG_SOC_DRA7XX
 void __init dra7xx_init_early(void)
 {
-	omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
+	omap2_set_globals_tap(DRA7XX_CLASS,
+			      OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
 	omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
 	omap2_control_base_init();
 	omap4_pm_init_early();
-- 
2.8.0

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

* [PATCH 2/3] ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

When commit 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision
information for soc_is* calls") introduced SoC check using
omap_revision, it missed providing DRA7 as class for initializing
the omap_version variable. Without doing this, soc_is_dra7xx() will
fail and as a result, omap4_pm_init_early never initializes the dra7
erratum for CPU power state. This causes the suspend path to fail
on DRA7 devices.

Fixes: 06c2d368fc36 ("ARM: OMAP: DRA7: Make use of omap_revision information for soc_is* calls")
Cc: Keerthy <j-keerthy@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap2/io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3c87e40650cf..2b86b25bcb83 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -736,7 +736,8 @@ void __init omap5_init_late(void)
 #ifdef CONFIG_SOC_DRA7XX
 void __init dra7xx_init_early(void)
 {
-	omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
+	omap2_set_globals_tap(DRA7XX_CLASS,
+			      OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
 	omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
 	omap2_control_base_init();
 	omap4_pm_init_early();
-- 
2.8.0

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

* [PATCH 3/3] ARM: OMAP: Catch callers of revision information prior to it being populated
  2016-04-01 22:53 ` Nishanth Menon
  (?)
@ 2016-04-01 22:53   ` Nishanth Menon
  -1 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap, Nishanth Menon

omap_rev is used to detect various SoC types, however any misuse of
the usage by invoking it earlier than it being populated will result
in invalid results. Lets flag them as early as possible to prevent
unintended side effects taking place. We get 0 if it is uninitialized
and -1 when detection is done using device tree (as the case was for
DRA7 as the case was prior to commit 06c2d368fc36 ("ARM: OMAP: DRA7:
Make use of omap_revision information for soc_is* calls")

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap1/id.c | 1 +
 arch/arm/mach-omap2/id.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 52de382fc804..bfabc065d331 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -65,6 +65,7 @@ static struct omap_id omap_ids[] __initdata = {
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d85c24918c17..75fb6c006e86 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -46,6 +46,7 @@ u32 omap_features;
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
-- 
2.8.0

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

* [PATCH 3/3] ARM: OMAP: Catch callers of revision information prior to it being populated
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Nishanth Menon, linux-omap, linux-kernel, linux-arm-kernel

omap_rev is used to detect various SoC types, however any misuse of
the usage by invoking it earlier than it being populated will result
in invalid results. Lets flag them as early as possible to prevent
unintended side effects taking place. We get 0 if it is uninitialized
and -1 when detection is done using device tree (as the case was for
DRA7 as the case was prior to commit 06c2d368fc36 ("ARM: OMAP: DRA7:
Make use of omap_revision information for soc_is* calls")

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap1/id.c | 1 +
 arch/arm/mach-omap2/id.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 52de382fc804..bfabc065d331 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -65,6 +65,7 @@ static struct omap_id omap_ids[] __initdata = {
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d85c24918c17..75fb6c006e86 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -46,6 +46,7 @@ u32 omap_features;
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
-- 
2.8.0

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

* [PATCH 3/3] ARM: OMAP: Catch callers of revision information prior to it being populated
@ 2016-04-01 22:53   ` Nishanth Menon
  0 siblings, 0 replies; 17+ messages in thread
From: Nishanth Menon @ 2016-04-01 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

omap_rev is used to detect various SoC types, however any misuse of
the usage by invoking it earlier than it being populated will result
in invalid results. Lets flag them as early as possible to prevent
unintended side effects taking place. We get 0 if it is uninitialized
and -1 when detection is done using device tree (as the case was for
DRA7 as the case was prior to commit 06c2d368fc36 ("ARM: OMAP: DRA7:
Make use of omap_revision information for soc_is* calls")

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 arch/arm/mach-omap1/id.c | 1 +
 arch/arm/mach-omap2/id.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 52de382fc804..bfabc065d331 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -65,6 +65,7 @@ static struct omap_id omap_ids[] __initdata = {
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index d85c24918c17..75fb6c006e86 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -46,6 +46,7 @@ u32 omap_features;
 
 unsigned int omap_rev(void)
 {
+	WARN_ON_ONCE(!omap_revision || omap_revision == -1);
 	return omap_revision;
 }
 EXPORT_SYMBOL(omap_rev);
-- 
2.8.0

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

* Re: [PATCH 0/3] ARM: OMAP2: Make suspend work again.
  2016-04-01 22:53 ` Nishanth Menon
  (?)
@ 2016-04-04  5:47   ` Keerthy
  -1 siblings, 0 replies; 17+ messages in thread
From: Keerthy @ 2016-04-04  5:47 UTC (permalink / raw)
  To: Nishanth Menon, Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap



On Saturday 02 April 2016 04:23 AM, Nishanth Menon wrote:
> Hi,
> series of patches for fixing up attempt to suspend on X15
>
> Test: http://pastebin.ubuntu.com/15582436/
>
> Based on v4.6-rc1
>
> Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
> modules are installed

Thanks for the series Nishanth.

I tested suspend/resume and used no_console_suspend and woke up using 
uart on DRA7-EVM.

Tested-by: Keerthy <j-keerthy@ti.com>

>
> Nishanth Menon (3):
>    ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
>    ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
>    ARM: OMAP: Catch callers of revision information prior to it being
>      populated
>
>   arch/arm/mach-omap1/id.c             | 1 +
>   arch/arm/mach-omap2/id.c             | 1 +
>   arch/arm/mach-omap2/io.c             | 3 ++-
>   arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
>   4 files changed, 11 insertions(+), 1 deletion(-)
>

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

* Re: [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-04  5:47   ` Keerthy
  0 siblings, 0 replies; 17+ messages in thread
From: Keerthy @ 2016-04-04  5:47 UTC (permalink / raw)
  To: Nishanth Menon, Tony Lindgren; +Cc: linux-kernel, linux-arm-kernel, linux-omap



On Saturday 02 April 2016 04:23 AM, Nishanth Menon wrote:
> Hi,
> series of patches for fixing up attempt to suspend on X15
>
> Test: http://pastebin.ubuntu.com/15582436/
>
> Based on v4.6-rc1
>
> Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
> modules are installed

Thanks for the series Nishanth.

I tested suspend/resume and used no_console_suspend and woke up using 
uart on DRA7-EVM.

Tested-by: Keerthy <j-keerthy@ti.com>

>
> Nishanth Menon (3):
>    ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
>    ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
>    ARM: OMAP: Catch callers of revision information prior to it being
>      populated
>
>   arch/arm/mach-omap1/id.c             | 1 +
>   arch/arm/mach-omap2/id.c             | 1 +
>   arch/arm/mach-omap2/io.c             | 3 ++-
>   arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
>   4 files changed, 11 insertions(+), 1 deletion(-)
>

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

* [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-04  5:47   ` Keerthy
  0 siblings, 0 replies; 17+ messages in thread
From: Keerthy @ 2016-04-04  5:47 UTC (permalink / raw)
  To: linux-arm-kernel



On Saturday 02 April 2016 04:23 AM, Nishanth Menon wrote:
> Hi,
> series of patches for fixing up attempt to suspend on X15
>
> Test: http://pastebin.ubuntu.com/15582436/
>
> Based on v4.6-rc1
>
> Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
> modules are installed

Thanks for the series Nishanth.

I tested suspend/resume and used no_console_suspend and woke up using 
uart on DRA7-EVM.

Tested-by: Keerthy <j-keerthy@ti.com>

>
> Nishanth Menon (3):
>    ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen
>    ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap
>    ARM: OMAP: Catch callers of revision information prior to it being
>      populated
>
>   arch/arm/mach-omap1/id.c             | 1 +
>   arch/arm/mach-omap2/id.c             | 1 +
>   arch/arm/mach-omap2/io.c             | 3 ++-
>   arch/arm/mach-omap2/omap-wakeupgen.c | 7 +++++++
>   4 files changed, 11 insertions(+), 1 deletion(-)
>

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

* Re: [PATCH 0/3] ARM: OMAP2: Make suspend work again.
  2016-04-04  5:47   ` Keerthy
@ 2016-04-08 15:56     ` Tony Lindgren
  -1 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2016-04-08 15:56 UTC (permalink / raw)
  To: Keerthy; +Cc: Nishanth Menon, linux-kernel, linux-arm-kernel, linux-omap

* Keerthy <a0393675@ti.com> [160403 22:48]:
> 
> 
> On Saturday 02 April 2016 04:23 AM, Nishanth Menon wrote:
> >Hi,
> >series of patches for fixing up attempt to suspend on X15
> >
> >Test: http://pastebin.ubuntu.com/15582436/
> >
> >Based on v4.6-rc1
> >
> >Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
> >modules are installed
> 
> Thanks for the series Nishanth.
> 
> I tested suspend/resume and used no_console_suspend and woke up using uart
> on DRA7-EVM.

Applying all three into omap-for-v4.6/fixes thanks.

Tony

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

* [PATCH 0/3] ARM: OMAP2: Make suspend work again.
@ 2016-04-08 15:56     ` Tony Lindgren
  0 siblings, 0 replies; 17+ messages in thread
From: Tony Lindgren @ 2016-04-08 15:56 UTC (permalink / raw)
  To: linux-arm-kernel

* Keerthy <a0393675@ti.com> [160403 22:48]:
> 
> 
> On Saturday 02 April 2016 04:23 AM, Nishanth Menon wrote:
> >Hi,
> >series of patches for fixing up attempt to suspend on X15
> >
> >Test: http://pastebin.ubuntu.com/15582436/
> >
> >Based on v4.6-rc1
> >
> >Also needs https://patchwork.kernel.org/patch/8724791/ if kernel
> >modules are installed
> 
> Thanks for the series Nishanth.
> 
> I tested suspend/resume and used no_console_suspend and woke up using uart
> on DRA7-EVM.

Applying all three into omap-for-v4.6/fixes thanks.

Tony

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

end of thread, other threads:[~2016-04-08 15:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 22:53 [PATCH 0/3] ARM: OMAP2: Make suspend work again Nishanth Menon
2016-04-01 22:53 ` Nishanth Menon
2016-04-01 22:53 ` Nishanth Menon
2016-04-01 22:53 ` [PATCH 1/3] ARM: OMAP: DRA7: wakeupgen: Skip SAR save for wakeupgen Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-01 22:53 ` [PATCH 2/3] ARM: OMAP: DRA7: Provide proper class to omap2_set_globals_tap Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-01 22:53 ` [PATCH 3/3] ARM: OMAP: Catch callers of revision information prior to it being populated Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-01 22:53   ` Nishanth Menon
2016-04-04  5:47 ` [PATCH 0/3] ARM: OMAP2: Make suspend work again Keerthy
2016-04-04  5:47   ` Keerthy
2016-04-04  5:47   ` Keerthy
2016-04-08 15:56   ` Tony Lindgren
2016-04-08 15:56     ` Tony Lindgren

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.