All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen
@ 2012-12-17 11:24 Sachin Kamat
  2012-12-17 11:24 ` [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 Sachin Kamat
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-12-17 11:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, patches, sachin.kamat

When DRM support for Samsung SoC and Samsung S3C framebuffer support
are selected, the kernel crashes as it does not get the required
platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD
to fix this.

Without this patch the following crash occurs during bootup:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
PC is at 0x0
LR is at s3c_fb_probe+0x198/0x788
[<c01520e8>] (s3c_fb_probe+0x198/0x788) from [<c01a3dd4>] (platform_drv_probe+0x18/0x1c)
[<c01a3dd4>] (platform_drv_probe+0x18/0x1c) from [<c01a2b8c>] (driver_probe_device+0x70/0x1f0)
[<c01a2b8c>] (driver_probe_device+0x70/0x1f0) from [<c01a2d98>] (__driver_attach+0x8c/0x90)
[<c01a2d98>] (__driver_attach+0x8c/0x90) from [<c01a14e4>] (bus_for_each_dev+0x50/0x7c)
[<c01a14e4>] (bus_for_each_dev+0x50/0x7c) from [<c01a23f4>] (bus_add_driver+0x170/0x23c)
[<c01a23f4>] (bus_add_driver+0x170/0x23c) from [<c01a324c>] (driver_register+0x78/0x144)
[<c01a324c>] (driver_register+0x78/0x144) from [<c000862c>] (do_one_initcall+0x34/0x174)
[<c000862c>] (do_one_initcall+0x34/0x174) from [<c01de210>] (kernel_init+0x100/0x2a0)
[<c01de210>] (kernel_init+0x100/0x2a0) from [<c000e118>] (ret_from_fork+0x14/0x3c)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/mach-origen.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index e6f4191..5e34b9c 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -621,7 +621,7 @@ static struct pwm_lookup origen_pwm_lookup[] = {
 	PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL),
 };
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 	.panel	= {
 		.timing	= {
@@ -793,7 +793,7 @@ static void __init origen_machine_init(void)
 	s5p_i2c_hdmiphy_set_platdata(NULL);
 	s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 	s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 	exynos4_fimd0_gpio_setup_24bpp();
 #else
-- 
1.7.4.1

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

* [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12
  2012-12-17 11:24 [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Sachin Kamat
@ 2012-12-17 11:24 ` Sachin Kamat
  2012-12-17 11:24 ` [PATCH 3/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310 Sachin Kamat
  2012-12-19  4:12 ` [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Kukjin Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-12-17 11:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, patches, sachin.kamat

When DRM support for Samsung SoC and Samsung S3C framebuffer support
are selected, the kernel crashes as it does not get the required
platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD
to fix this.

Fixes the following boot time crash:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
PC is at 0x0
LR is at s3c_fb_probe+0x198/0x788
[<c0152270>] (s3c_fb_probe+0x198/0x788) from [<c019e52c>] (platform_drv_probe+0x18/0x1c)
[<c019e52c>] (platform_drv_probe+0x18/0x1c) from [<c019d2e4>] (driver_probe_device+0x70/0x1f0)
[<c019d2e4>] (driver_probe_device+0x70/0x1f0) from [<c019d4f0>] (__driver_attach+0x8c/0x90)
[<c019d4f0>] (__driver_attach+0x8c/0x90) from [<c019bc3c>] (bus_for_each_dev+0x50/0x7c)
[<c019bc3c>] (bus_for_each_dev+0x50/0x7c) from [<c019cb4c>] (bus_add_driver+0x170/0x23c)
[<c019cb4c>] (bus_add_driver+0x170/0x23c) from [<c019d9a4>] (driver_register+0x78/0x144)
[<c019d9a4>] (driver_register+0x78/0x144) from [<c000862c>] (do_one_initcall+0x34/0x174)
[<c000862c>] (do_one_initcall+0x34/0x174) from [<c020ed7c>] (kernel_init+0x100/0x2a0)
[<c020ed7c>] (kernel_init+0x100/0x2a0) from [<c000e118>] (ret_from_fork+0x14/0x3c)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/mach-smdk4x12.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index a1555a7..ae6da40 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -246,7 +246,7 @@ static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = {
 	.cols		= 8,
 };
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 	.panel	= {
 		.timing	= {
@@ -360,7 +360,7 @@ static void __init smdk4x12_machine_init(void)
 
 	s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata);
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 	s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 	exynos4_fimd0_gpio_setup_24bpp();
 #else
-- 
1.7.4.1

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

* [PATCH 3/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310
  2012-12-17 11:24 [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Sachin Kamat
  2012-12-17 11:24 ` [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 Sachin Kamat
@ 2012-12-17 11:24 ` Sachin Kamat
  2012-12-19  4:12 ` [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Kukjin Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-12-17 11:24 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, patches, sachin.kamat

When DRM support for Samsung SoC and Samsung S3C framebuffer support
are selected, the kernel crashes as it does not get the required
platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD
to fix this.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/mach-smdkv310.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index b738424..35548e3 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -159,7 +159,7 @@ static struct platform_device smdkv310_lcd_lte480wv = {
 	.dev.platform_data	= &smdkv310_lcd_lte480wv_data,
 };
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
 	.panel	= {
 		.timing	= {
@@ -402,7 +402,7 @@ static void __init smdkv310_machine_init(void)
 	samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
 	pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup));
 
-#ifdef CONFIG_DRM_EXYNOS
+#ifdef CONFIG_DRM_EXYNOS_FIMD
 	s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
 	exynos4_fimd0_gpio_setup_24bpp();
 #else
-- 
1.7.4.1

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

* RE: [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen
  2012-12-17 11:24 [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Sachin Kamat
  2012-12-17 11:24 ` [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 Sachin Kamat
  2012-12-17 11:24 ` [PATCH 3/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310 Sachin Kamat
@ 2012-12-19  4:12 ` Kukjin Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2012-12-19  4:12 UTC (permalink / raw)
  To: 'Sachin Kamat', linux-samsung-soc; +Cc: patches

Sachin Kamat wrote:
> 
> When DRM support for Samsung SoC and Samsung S3C framebuffer support
> are selected, the kernel crashes as it does not get the required
> platform data. Change the compile macro to CONFIG_DRM_EXYNOS_FIMD
> to fix this.
> 
> Without this patch the following crash occurs during bootup:
> 
> Unable to handle kernel NULL pointer dereference at virtual address
> 00000000
> PC is at 0x0
> LR is at s3c_fb_probe+0x198/0x788
> [<c01520e8>] (s3c_fb_probe+0x198/0x788) from [<c01a3dd4>]
> (platform_drv_probe+0x18/0x1c)
> [<c01a3dd4>] (platform_drv_probe+0x18/0x1c) from [<c01a2b8c>]
> (driver_probe_device+0x70/0x1f0)
> [<c01a2b8c>] (driver_probe_device+0x70/0x1f0) from [<c01a2d98>]
> (__driver_attach+0x8c/0x90)
> [<c01a2d98>] (__driver_attach+0x8c/0x90) from [<c01a14e4>]
> (bus_for_each_dev+0x50/0x7c)
> [<c01a14e4>] (bus_for_each_dev+0x50/0x7c) from [<c01a23f4>]
> (bus_add_driver+0x170/0x23c)
> [<c01a23f4>] (bus_add_driver+0x170/0x23c) from [<c01a324c>]
> (driver_register+0x78/0x144)
> [<c01a324c>] (driver_register+0x78/0x144) from [<c000862c>]
> (do_one_initcall+0x34/0x174)
> [<c000862c>] (do_one_initcall+0x34/0x174) from [<c01de210>]
> (kernel_init+0x100/0x2a0)
> [<c01de210>] (kernel_init+0x100/0x2a0) from [<c000e118>]
> (ret_from_fork+0x14/0x3c)
> 
Look OK on this whole series. Will apply.

Thanks.

- Kukjin

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

end of thread, other threads:[~2012-12-19  4:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 11:24 [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Sachin Kamat
2012-12-17 11:24 ` [PATCH 2/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12 Sachin Kamat
2012-12-17 11:24 ` [PATCH 3/3] ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310 Sachin Kamat
2012-12-19  4:12 ` [PATCH 1/3] ARM: EXYNOS: Fix NULL pointer dereference bug in Origen Kukjin Kim

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.