[PATCH 3.2 111/185] ARM: footbridge: fix VGA initialisation

2013-12-28 Thread Ben Hutchings
3.2.54-rc1 review patch.  If anyone has any objections, please let me know.

--

From: Russell King 

commit 43659222e7a0113912ed02f6b2231550b3e471ac upstream.

It's no good setting vga_base after the VGA console has been
initialised, because if we do that we get this:

Unable to handle kernel paging request at virtual address 000b8000
pgd = c0004000
[000b8000] *pgd=07ffc831, *pte=, *ppte=
0Internal error: Oops: 5017 [#1] ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0+ #49
task: c03e2974 ti: c03d8000 task.ti: c03d8000
PC is at vgacon_startup+0x258/0x39c
LR is at request_resource+0x10/0x1c
pc : []lr : []psr: 6053
sp : c03d9f68  ip : 000b8000  fp : c03d9f8c
r10: 55aa  r9 : 4401a103  r8 : aa55
r7 : c03e357c  r6 : c051b460  r5 : 00ff  r4 : 000c
r3 : 000b8000  r2 : c03e0514  r1 :   r0 : c0304971
Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel

which is an access to the 0xb8000 without the PCI offset required to
make it work.

Fixes: cc22b4c18540 ("ARM: set vga memory base at run-time")
Signed-off-by: Russell King 
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings 
---
 arch/arm/mach-footbridge/common.c  | 3 +++
 arch/arm/mach-footbridge/dc21285.c | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
  
 #include 
 #include 
@@ -197,6 +198,8 @@ void __init footbridge_map_io(void)
 */
if (footbridge_cfn_mode())
iotable_init(ebsa285_host_io_desc, 
ARRAY_SIZE(ebsa285_host_io_desc));
+
+   vga_base = PCIMEM_BASE;
 }
 
 #ifdef CONFIG_FOOTBRIDGE_ADDIN
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -18,7 +18,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -297,7 +296,6 @@ void __init dc21285_preinit(void)
int cfn_mode;
 
pcibios_min_mem = 0x8100;
-   vga_base = PCIMEM_BASE;
 
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
for (mem_mask = 0x0010; mem_mask < 0x1000; mem_mask <<= 1)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3.2 111/185] ARM: footbridge: fix VGA initialisation

2013-12-28 Thread Ben Hutchings
3.2.54-rc1 review patch.  If anyone has any objections, please let me know.

--

From: Russell King rmk+ker...@arm.linux.org.uk

commit 43659222e7a0113912ed02f6b2231550b3e471ac upstream.

It's no good setting vga_base after the VGA console has been
initialised, because if we do that we get this:

Unable to handle kernel paging request at virtual address 000b8000
pgd = c0004000
[000b8000] *pgd=07ffc831, *pte=, *ppte=
0Internal error: Oops: 5017 [#1] ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0+ #49
task: c03e2974 ti: c03d8000 task.ti: c03d8000
PC is at vgacon_startup+0x258/0x39c
LR is at request_resource+0x10/0x1c
pc : [c01725d0]lr : [c0022b50]psr: 6053
sp : c03d9f68  ip : 000b8000  fp : c03d9f8c
r10: 55aa  r9 : 4401a103  r8 : aa55
r7 : c03e357c  r6 : c051b460  r5 : 00ff  r4 : 000c
r3 : 000b8000  r2 : c03e0514  r1 :   r0 : c0304971
Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel

which is an access to the 0xb8000 without the PCI offset required to
make it work.

Fixes: cc22b4c18540 (ARM: set vga memory base at run-time)
Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 arch/arm/mach-footbridge/common.c  | 3 +++
 arch/arm/mach-footbridge/dc21285.c | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -15,6 +15,7 @@
 #include linux/init.h
 #include linux/io.h
 #include linux/spinlock.h
+#include video/vga.h
  
 #include asm/pgtable.h
 #include asm/page.h
@@ -197,6 +198,8 @@ void __init footbridge_map_io(void)
 */
if (footbridge_cfn_mode())
iotable_init(ebsa285_host_io_desc, 
ARRAY_SIZE(ebsa285_host_io_desc));
+
+   vga_base = PCIMEM_BASE;
 }
 
 #ifdef CONFIG_FOOTBRIDGE_ADDIN
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -18,7 +18,6 @@
 #include linux/irq.h
 #include linux/io.h
 #include linux/spinlock.h
-#include video/vga.h
 
 #include asm/irq.h
 #include asm/system.h
@@ -297,7 +296,6 @@ void __init dc21285_preinit(void)
int cfn_mode;
 
pcibios_min_mem = 0x8100;
-   vga_base = PCIMEM_BASE;
 
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
for (mem_mask = 0x0010; mem_mask  0x1000; mem_mask = 1)

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/