arm64: kernel: need extern variable 'screen_info' for related driver using.
Subsystems (3)
PATCH 1/1 arm64: kernel: need extern variable 'screen_info' for related driver using.
Add the extern variable 'screen_info' according to arm32 has done.
The related error:
drivers/video/console/vgacon.c:1305: undefined reference to `screen_info'
--- arch/arm64/kernel/setup.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
arch/arm64/kernel/setup.c +11 -0
@@ -374,3 +374,14 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show }; + +#if defined(CONFIG_VGA_CONSOLE ) || defined(CONFIG_DUMMY_CONSOLE ) +struct screen_info screen_info = { + .orig_video_lines =30 , + .orig_video_cols =80 , + .orig_video_mode =0 , + .orig_video_ega_bx =0 , + .orig_video_isVGA =1 , + .orig_video_points =8 +}; +#endif
Signature · 1 line
1.7.7.6
Hi Chen,
Quoted 21 lines · Chen Gang
Add the extern variable '
screen_info' according to arm32 has done.The related error:
drivers/video/console/vgacon.c:1305: undefined reference to `screen_info'Signed-off-by Chen Gang <[email protected]>--- arch/arm64/kernel/setup.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)arch/arm64/kernel/setup.c +1
-0@@ -374,3 +374,14 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show }; +
arch/arm64/kernel/setup.c const struct seq_operations cpuinfo_op = { · line 387
Quoted 10 lines
arch/arm64/kernel/setup.c +10
-0+#if defined(CONFIG_VGA_CONSOLE ) || defined(CONFIG_DUMMY_CONSOLE ) +struct screen_info screen_info = { + .orig_video_lines =30 , + .orig_video_cols =80 , + .orig_video_mode =0 , + .orig_video_ega_bx =0 , + .orig_video_isVGA =1 , + .orig_video_points =8 +}; +#endif
I think it would be better if we added a something like CONFIG_HAVE_VGA_CONSOLE, which VGA_CONSOLE can then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.
Will
Quoted 31 lines · Will Deacon
Hi Chen,
Quoted 28 lines · Chen Gang
Add the extern variable '
screen_info' according to arm32 has done.The related error:
drivers/video/console/vgacon.c:1305: undefined reference to `screen_info'Signed-off-by Chen Gang <[email protected]>--- arch/arm64/kernel/setup.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)arch/arm64/kernel/setup.c +8
-0@@ -374,3 +374,14 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show }; + +#if defined(CONFIG_VGA_CONSOLE ) || defined(CONFIG_DUMMY_CONSOLE ) +struct screen_info screen_info = { + .orig_video_lines =30 , + .orig_video_cols =80 , + .orig_video_mode =0 , + .orig_video_ega_bx =0 , + .orig_video_isVGA = 1,
Quoted 9 lines
arch/arm64/kernel/setup.c const struct seq_operations cpuinfo_op = { · line 387
Quoted 3 lines
arch/arm64/kernel/setup.c +3
-0+ .orig_video_points = 8 +}; +#endif I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.
I guess your meaning is:
under arm64, actually, need not support 'VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not define CONFIG_HAVE_VGA_CONSOLE.
Is it correct ?
If so, I recommend to add depend item for VGA_CONSOLE directly:
-------------------diff begin----------------------------------
drivers/video/console/Kconfig +1 -1
@@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EXPERT || !X86 - depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) + depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !ARM64 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) default y help Saying Y here will allow you to use Linux in text mode through a
-------------------diff end------------------------------------
Thanks.
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 11 lines · Chen Gang
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
No, you missed "and we can remove the long list of architectures from the current option".
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:
I strongly support CONFIG_HAVE_VGA_CONSOLE.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Chen Gang
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
No, you missed "and we can remove the long list of architectures from the current option".
OK, thanks.
Is it correct: "it is unnecessary to add 'screen_info' to the code, for arm64 will never support 'VGA_CONSOLE'" ?
Quoted 2 lines
Quoted 1 line
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:I strongly support
CONFIG_HAVE_VGA_CONSOLE.
For me, I still recommend add 'ARM64' in the long list of architectures for 'VGA_CONSOLE', I have 3 reasons, please check:
a. current implementation only changes one area which only related with arm64 and 'VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.
b. We can find some cases to use CONFIG_HAVE_* as dpend on, but I can not find any cases which let CONFIG_'samename' depend on CONFIG_HAVE_'samename'.
c. The original way still has effect, although it seems not quit beautiful, but it is correct and still clear for readers, it is still sustainable.
Thanks.
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 13 lines · Chen Gang
Quoted 12 lines · Geert Uytterhoeven
Quoted 11 lines · Chen Gang
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
Quoted 8 lines
Quoted 3 lines
No, you missed "and we can remove the long list of architectures from the current option".
OK, thanks.
Is it correct: "it is unnecessary to add '
screen_info' to the code, for arm64 will never support 'VGA_CONSOLE'" ?
We can add the screen_info if and when we need to support a VGA console. In the meantime, let's not add things on a whim.
Quoted 10 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:I strongly support
CONFIG_HAVE_VGA_CONSOLE.For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.
That's a weak argument. You might as well propose the cleanup and see what people say.
Quoted 3 lines
b. We can find some cases to use CONFIG_HAVE_* as dpend on, but I can not find any cases which let CONFIG_'samename' depend on CONFIG_HAVE_'samename'.
Erm. PERF_EVENTS, BPF_JIT, IDE, ...?
Quoted 3 lines
c. The original way still has effect, although it seems not quit beautiful, but it is correct and still clear for readers, it is still sustainable.
Sure, it works, but we're just contributing to the mess that's been built up ever time another architecture has done the same thing. It's not hard to try and clean it up.
Will
Quoted 18 lines · Will Deacon
Quoted 17 lines · Chen Gang
Quoted 15 lines · Geert Uytterhoeven
Quoted 11 lines · Chen Gang
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
No, you missed "and we can remove the long list of architectures from the current option".
Quoted 8 lines
Quoted 4 lines
OK, thanks.
Is it correct: "it is unnecessary to add '
screen_info' to the code, for arm64 will never support 'VGA_CONSOLE'" ?We can add the
screen_infoif and when we need to support a VGA console. In the meantime, let's not add things on a whim.
OK, thanks. At least now (for our case), need not add 'screen_info', is it correct ?
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:I strongly support
CONFIG_HAVE_VGA_CONSOLE.For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:
Quoted 8 lines
Quoted 4 lines
a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.That's a weak argument. You might as well propose the cleanup and see what people say.
Hmm.. I think at least, we need discuss it with the 'final applier' firstly (and now, I even do not know who is the 'final applier').
Quoted 6 lines
Quoted 3 lines
b. We can find some cases to use CONFIG_HAVE_* as dpend on, but I can not find any cases which let CONFIG_'samename' depend on CONFIG_HAVE_'samename'.
Erm.
PERF_EVENTS,BPF_JIT, IDE, ...?
CONFIG_PERF_EVENTS is not directly depend on CONFIG_HAVE_PERF_EVENTS. CONFIG_BPF_JIT is not directly depend on CONFIG_HAVE_BPF_JIT. CONFIG_IDE is not directly depend on CONFIG_HAVE_IDE.
...
But I guess what we will do is to let "CONFIG_VGA_CONSOLE is directly depend on CONFIG_HAVE_VGA_CONSOLE".
So I think we really need discuss it firstly with the 'final applier'.
Quoted 8 lines
Quoted 3 lines
c. The original way still has effect, although it seems not quit beautiful, but it is correct and still clear for readers, it is still sustainable.
Sure, it works, but we're just contributing to the mess that's been built up ever time another architecture has done the same thing. It's not hard to try and clean it up.
Can we separate into 2 patches ?. One is for current compiling issue with allmodconfig (the priority is a litter higher), the other is for fixup patch (the priority is lower). ;-)
BTW: In fact, if we really need send the related fixup patch, I am also unwilling to do that, I guess (in my experience), the fixup patch like that, will never be applied. :-(
Thanks.
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 13 lines · Chen Gang
Quoted 12 lines · Geert Uytterhoeven
Quoted 11 lines · Chen Gang
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, whichVGA_CONSOLEcan then depend on. Architectures like x86 can then select the former, and we can remove the long list of architectures from the current option.I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
Quoted 8 lines
Quoted 3 lines
No, you missed "and we can remove the long list of architectures from the current option".
OK, thanks.
Is it correct: "it is unnecessary to add '
screen_info' to the code, for arm64 will never support 'VGA_CONSOLE'" ?
On arm (not (yet?) arm64), drivers/video/console/dummycon.c also uses screen_info. The default text mode resolution may come from atags.
Quoted 10 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:I strongly support
CONFIG_HAVE_VGA_CONSOLE.For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.
Sure. But this can be one cleanup patch.
Quoted 3 lines
b. We can find some cases to use CONFIG_HAVE_* as dpend on, but I can not find any cases which let CONFIG_'samename' depend on CONFIG_HAVE_'samename'.
A similar mechanism is used for PC-style floppy support, but the naming is different, cfr. drivers/block/Kconfig:
config BLK_DEV_FD
tristate "Normal floppy disk support"
depends on ARCH_MAY_HAVE_PC_FDC
so perhaps ARCH_MAY_HAVE_VGA?
PARPORT_PC could use the same mechanism.
Quoted 3 lines
c. The original way still has effect, although it seems not quit beautiful, but it is correct and still clear for readers, it is still sustainable.
Most/every new architecture needs to add a depend to it.
BTW, I should have done this when sending out the patch to add CRIS to the list of dependencies...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 18 lines · Geert Uytterhoeven
Quoted 17 lines · Chen Gang
Quoted 17 lines · Geert Uytterhoeven
Quoted 15 lines
Quoted 15 lines · Chen Gang
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
I think it would be better if we added a something like
CONFIG_HAVE_VGA_CONSOLE, which VGA_CONSOLE can then depend on. Architectures
like x86 can then select the former, and we can remove the long list of
architectures from the current option.I guess your meaning is:
under arm64, actually, need not support '
VGA_CONSOLE', and 'screen_info' is useless.
So better to define 'CONFIG_HAVE_VGA_CONSOLE' which 'VGA_CONSOLE' can depend on it, and in arm64, we do not defineCONFIG_HAVE_VGA_CONSOLE.Is it correct ?
No, you missed "and we can remove the long list of architectures from the current option".
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
OK, thanks.
Is it correct: "it is unnecessary to add '
screen_info' to the code, for arm64 will never support 'VGA_CONSOLE'" ?On arm (not (yet?) arm64),
drivers/video/console/dummycon.calso usesscreen_info. The default text mode resolution may come from atags.
Oh, really it is, we need consider them both.
Quoted 12 lines
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
If so, I recommend to add depend item for
VGA_CONSOLEdirectly:I strongly support
CONFIG_HAVE_VGA_CONSOLE.For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.Sure. But this can be one cleanup patch.
Hmm..., it seems so, but I think we'd better to discuss it with the 'final applier' firstly.
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
b. We can find some cases to use CONFIG_HAVE_* as dpend on, but I can not find any cases which let CONFIG_'samename' depend on CONFIG_HAVE_'samename'.
A similar mechanism is used for PC-style floppy support, but the naming is different, cfr.
drivers/block/Kconfig:
Quoted 8 lines
config
BLK_DEV_FD
tristate "Normal floppy disk support"
depends onARCH_MAY_HAVE_PC_FDCso perhaps
ARCH_MAY_HAVE_VGA?
PARPORT_PCcould use the same mechanism.
Oh, really, it is !!
Hmm.., most of current machines do not have floppy, now, and will be less and less in the future, it has to use the variables in this way to avoid a very very very long list (not only include architectures, but also include the each features companition) !!
But for VIDEO_CONSOL, most of machines need it, and will be more and more in the future (maybe arm64 will also support it, too, in the future).
So...
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
c. The original way still has effect, although it seems not quit beautiful, but it is correct and still clear for readers, it is still sustainable.
Most/every new architecture needs to add a depend to it.
BTW, I should have done this when sending out the patch to add CRIS to the list of dependencies...
I suggest better to discuss it with the 'final applier' firstly.
Good Luck !!
Thanks.
Signature · 3 lines
Chen Gang Asianux Corporation
Catalin Marinas
maintainerQuoted 10 lines · Chen Gang
Quoted 9 lines · Will Deacon
Quoted 7 lines · Chen Gang
For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.
Quoted 5 lines
Quoted 2 lines
That's a weak argument. You might as well propose the cleanup and see what people say.
Hmm.. I think at least, we need discuss it with the 'final applier' firstly (and now, I even do not know who is the 'final applier').
Well, you can post the patch to linux-arch, cc'ing the arch maintainers whose Kconfig files you touch. If there are no comments, it will most likely be picked by Andrew Morton and sent to Linus (make sure you cc Andrew as well).
Signature · 1 line
Catalin
Quoted 14 lines · Catalin Marinas
Quoted 13 lines · Chen Gang
Quoted 13 lines · Will Deacon
Quoted 11 lines
Quoted 11 lines · Chen Gang
Quoted 7 lines
Quoted 7 lines
For me, I still recommend add 'ARM64' in the long list of architectures for '
VGA_CONSOLE', I have 3 reasons, please check:a. current implementation only changes one area which only related with arm64 and '
VGA_CONSOLE', but if use 'CONFIG_HAVE_VGA_CONSOLE', that will touch many multiple platforms dependency, at least we need discuss about it with multiple platforms guys for it, firstly.That's a weak argument. You might as well propose the cleanup and see what people say.
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Hmm.. I think at least, we need discuss it with the 'final applier' firstly (and now, I even do not know who is the 'final applier').
Well, you can post the patch to linux-arch, cc'ing the arch maintainers whose
Kconfigfiles you touch. If there are no comments, it will most likely be picked by Andrew Morton and sent to Linus (make sure you cc Andrew as well).
OK, thanks. I will do with PARPORT_PC firstly, I think, it is a better candidate than VGA_CONSOLE.
And excuse me, I have to do another things now, and I think I should finish the PARPORT_PC within this week.
Thanks.
Signature · 3 lines
Chen Gang Asianux Corporation