uml: fix undeclared variables
PATCH 1/1 uml: fix undeclared variables
Fix three compile errors about undeclared variables in arch/um/kernel/mem.c.
---
arch/um/include/asm/fixmap.h +3 -0
@@ -41,6 +41,9 @@ enum fixed_addresses { __end_of_fixed_addresses }; +extern pte_t *pkmap_page_table; +extern pte_t *kmap_pte; +extern pgprot_t kmap_prot;extern void __set_fixmap (enum fixed_addresses idx,unsigned long phys,pgprot_t flags);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 3 lines · Am??rico Wang
Fix three compile errors about undeclared variables in
arch/um/kernel/mem.c.
And what, pray tell, would initialize it?
Quoted 6 lines · Al Viro
Quoted 3 lines · Am??rico Wang
Fix three compile errors about undeclared variables in
arch/um/kernel/mem.c.And what, pray tell, would initialize it?
Sorry, I can't fully understand you. I got the following error:
arch/um/kernel/mem.c: In function ‘init_highmem’:arch/um/kernel/mem.c:177: error: ‘pkmap_page_table’ undeclared (first use in this function)arch/um/kernel/mem.c:177: error: (Each undeclared identifier is reported only oncearch/um/kernel/mem.c:177: error: for each function it appears in.)
Thanks.
Signature · 12 lines
"Sometimes the only way to stay sane is to go a little crazy." ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 8 lines · Am??rico Wang
Quoted 6 lines · Al Viro
Quoted 3 lines · Am??rico Wang
Fix three compile errors about undeclared variables in
arch/um/kernel/mem.c.And what, pray tell, would initialize it?
Quoted 8 lines
Sorry, I can't fully understand you. I got the following error:
arch/um/kernel/mem.c: In function ???init_highmem???:arch/um/kernel/mem.c:177: error: ???pkmap_page_table??? undeclared (first use in this function)arch/um/kernel/mem.c:177: error: (Each undeclared identifier is reported only oncearch/um/kernel/mem.c:177: error: for each function it appears in.)
The error is there, all right. However, proposed patch only hides the real problem. Building uml/i386 with CONFIG_HIGHMEM will result in a badly broken kernel with that patch, with no visible hints at the cause of problems.
You've got it to link, but that's not enough. The problems you are seeing come from arch/x86/mm/highmem_32.c. It uses several variables from arch/x86/mm/init_32.c and you have copied them to arch/um. However, getting these variable defined is not going to make it work - the code that used to set it had been in init_32.c too and you've just left your copy initialized to NULL. Which will *not* work.
IOW, it's still broken, but now you have lost all indications regarding the source of problem.
Folks, "it doesn't build in that config" is _better_ than "it builds with no complaints, but resulting binary is FUBAR". As a short-term solution - make HIGHMEM in arch/um/Kconfig.um depend on BROKEN. The proper fix, of course, is to try and make it _work_, not just compile, but that's going to take a fair amount of digging in uml and x86 low-level VM guts.
Quoted 23 lines · Al Viro
Quoted 8 lines · Am??rico Wang
Quoted 6 lines · Al Viro
Quoted 3 lines · Am??rico Wang
Fix three compile errors about undeclared variables in
arch/um/kernel/mem.c.And what, pray tell, would initialize it?
Quoted 8 lines
Sorry, I can't fully understand you. I got the following error:
arch/um/kernel/mem.c: In function ???init_highmem???:arch/um/kernel/mem.c:177: error: ???pkmap_page_table??? undeclared (first use in this function)arch/um/kernel/mem.c:177: error: (Each undeclared identifier is reported only oncearch/um/kernel/mem.c:177: error: for each function it appears in.)The error is there, all right. However, proposed patch only hides the real problem. Building uml/i386 with
CONFIG_HIGHMEMwill result in a badly broken kernel with that patch, with no visible hints at the cause of problems.
Quoted 7 lines
You've got it to link, but that's not enough. The problems you are seeing come from
arch/x86/mm/highmem_32.c. It uses several variables fromarch/x86/mm/init_32.cand you have copied them toarch/um. However, getting these variable defined is not going to make it work - the code that used to set it had been ininit_32.ctoo and you've just left your copy initialized to NULL. Which will *not* work.
Thanks for teaching this! I will look deep into this problem.
Signature · 12 lines
"Sometimes the only way to stay sane is to go a little crazy." ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel