Skip to contentSkip to conversation

arm64: add screen_info for console support

PATCH In review Mark Salter 3 participants 4 messages Aug 18, 2013 – Aug 20, 2013 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: add screen_info for console support

The arm64 port doesn't provide a screen_info struct for console support which leads to a build failure with some configurations:

drivers/video/console/vgacon.c:820: undefined reference to `screen_info'

This patch adds an empty declaration of screen_info to fix the build problem. Some additional runtime code is needed to actually make it useful.

---
 arch/arm64/kernel/setup.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/kernel/setup.c +4 -0
index add6ea6..eb9f93a 100644
@@ -64,6 +64,10 @@ static const char *cpu_name;
 static const char *machine_name;
 phys_addr_t __fdt_pointer __initdata;
 
+#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)                                               
+struct screen_info screen_info;                                                                                
+#endif                                                                                                         
+
 /*
  * Standard memory resources
  */
Signature · 1 line
1.8.1.4
#1 lore raw

Hi Mark,

Quoted 19 lines · Mark Salter

The arm64 port doesn't provide a screen_info struct for console support which leads to a build failure with some configurations:

drivers/video/console/vgacon.c:820: undefined reference to `screen_info'

This patch adds an empty declaration of screen_info to fix the build problem. Some additional runtime code is needed to actually make it useful.

---
 arch/arm64/kernel/setup.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/kernel/setup.c +0 -0
index add6ea6..eb9f93a 100644

arch/arm64/kernel/setup.c static const char *cpu_name; · line 69

Quoted 6 lines
arch/arm64/kernel/setup.c +3 -0
@@ -64,6 +64,10 @@ static const char *cpu_name;
 static const char *machine_name;
 phys_addr_t __fdt_pointer __initdata;
 
+#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)                                               
+struct screen_info screen_info;                                                                                
+#endif                                                                                                         

You may be able to do something similar to the proposal for PARPORT here and factor out the lengthy "depends on" clause for VGA_CONSOLE instead of adding the dummy info.

Unfortunately, I can't make any promise of further bonus points :)

Will

maintainer
#2 lore raw
Quoted 25 lines · Will Deacon

Hi Mark,

Quoted 22 lines · Mark Salter

The arm64 port doesn't provide a screen_info struct for console support which leads to a build failure with some configurations:

drivers/video/console/vgacon.c:820: undefined reference to `screen_info'

This patch adds an empty declaration of screen_info to fix the build problem. Some additional runtime code is needed to actually make it useful.

---
 arch/arm64/kernel/setup.c | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/kernel/setup.c +0 -0
index add6ea6..eb9f93a 100644
@@ -64,6 +64,10 @@ static const char *cpu_name;
 static const char *machine_name;
 phys_addr_t __fdt_pointer __initdata;
 
Quoted 7 lines

arch/arm64/kernel/setup.c static const char *cpu_name; · line 69

Quoted 3 lines
arch/arm64/kernel/setup.c +3 -0
+#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
+struct screen_info screen_info;
+#endif

You may be able to do something similar to the proposal for PARPORT here and factor out the lengthy "depends on" clause for VGA_CONSOLE instead of adding the dummy info.

I was wondering about this but do we need screen_info for DUMMY_CONSOLE as well?

Signature · 1 line
Catalin
#3 lore raw
Quoted 2 lines · Catalin Marinas

I was wondering about this but do we need screen_info for DUMMY_CONSOLE as well?

I thought so because my grep turned up a reference to screen_info in dummycon.c but a closer look shows that only applies to arm.

--Mark