* [PATCH]: linux-2.5.42uc1 (MMU-less support) @ 2002-10-15 15:25 Greg Ungerer 2002-10-15 17:16 ` Christoph Hellwig 2002-10-16 5:42 ` [PATCH]: linux-2.5.42uc1 (MMU-less support) Miles Bader 0 siblings, 2 replies; 14+ messages in thread From: Greg Ungerer @ 2002-10-15 15:25 UTC (permalink / raw) To: linux-kernel Hi All, An updated uClinux patch is available at: http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1.patch.gz Changelog: 1. v850 update 2. cleaned up mm/page_alloc.c Smaller specific patches: . FEC ColdFire 5272 ethernet driver http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-fec.patch.gz . m68k/ColdFire/v850 serial drivers http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-serial.patch.gz . 68328 frame buffer http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-fb.patch.gz . binfmt_flat loader http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-binflat.patch.gz . m68knommu architecture http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-m68knommu.patch.gz . v850 architecture http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-v850.patch.gz . mm (MMU-less) only patch http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1-mm.patch.gz Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Wizard EMAIL: gerg@snapgear.com Snapgear Pty Ltd PHONE: +61 7 3279 1822 825 Stanley St, FAX: +61 7 3279 1820 Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-15 15:25 [PATCH]: linux-2.5.42uc1 (MMU-less support) Greg Ungerer @ 2002-10-15 17:16 ` Christoph Hellwig 2002-10-16 14:41 ` Greg Ungerer ` (2 more replies) 2002-10-16 5:42 ` [PATCH]: linux-2.5.42uc1 (MMU-less support) Miles Bader 1 sibling, 3 replies; 14+ messages in thread From: Christoph Hellwig @ 2002-10-15 17:16 UTC (permalink / raw) To: Greg Ungerer; +Cc: linux-kernel On Wed, Oct 16, 2002 at 01:25:49AM +1000, Greg Ungerer wrote: > Hi All, > > An updated uClinux patch is available at: > > http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.42uc1.patch.gz > > Changelog: > > 1. v850 update There are a bunch of CVS .#* files left from this one. v850_defs.h wants updating to the generic generate-asm-offsets.h mechanism (check the toplevel Makefile) Please stop the ugly symlink hell with the linker scripts - we have vmlinux.lds.S for that. it should read something like: #include <linux/config.h> #ifdef BOARD1 #include "board1.lds" #else ... #endif for v850 Could you please explain the rootfs hacks in v850? I don't think we want those in mainline but rather generic initrd/initramfs. Also please remove arch/v850/sim/* - that stuff doesn't belong into the kernel tree. > 2. cleaned up mm/page_alloc.c Why do you put set_page_refs into a header? Separating it out looks good to me, but IMHO it should stay in page_alloc.c. BTW, are you sure that you don't need to set the refs in the other caller of prep_new_page? To me it looks like you should and then you could merge it into prep_new_page. Also, what is CONFIG_CONTIGUOUS_PAGE_ALLOC doing? It seems not fully implemented but adds lots of uglieness :) CONFIG_NO_MMU_LARGE_ALLOCS might want a saner name, btw (CONFIG_LARGE_ALLOCS?). General commets: - Config.in files have three-space, not two-space indentation - I don't think you want to keep around the old binfmt_flat format when merghin into mainline - MAX_SHARED_LIBS is never used ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-15 17:16 ` Christoph Hellwig @ 2002-10-16 14:41 ` Greg Ungerer 2002-10-16 14:48 ` Christoph Hellwig 2002-11-26 7:46 ` [PATCH] Make some EXPORT_SYMBOLs dependent on CONFIG_MMU Miles Bader 2002-11-26 7:49 ` [PATCH] v850 additions to include/linux/elf.h Miles Bader 2 siblings, 1 reply; 14+ messages in thread From: Greg Ungerer @ 2002-10-16 14:41 UTC (permalink / raw) To: Christoph Hellwig; +Cc: linux-kernel Hi Christoph, Christoph Hellwig wrote: > There are a bunch of CVS .#* files left from this one. Cleaned out now. > v850_defs.h wants updating to the generic generate-asm-offsets.h > mechanism (check the toplevel Makefile) Miles cleaned this up. > Please stop the ugly symlink hell with the linker scripts - > we have vmlinux.lds.S for that. Hmph. Hardly seems any better... > Could you please explain the rootfs hacks in v850? > I don't think we want those in mainline but rather generic > initrd/initramfs. > > Also please remove arch/v850/sim/* - that stuff doesn't > belong into the kernel tree. Done. >>2. cleaned up mm/page_alloc.c > > Why do you put set_page_refs into a header? It looked might it might be usefull elsewhere. (but currently isn't used for anything else). > Separating it out > looks good to me, but IMHO it should stay in page_alloc.c. > BTW, are you sure that you don't need to set the refs in the > other caller of prep_new_page? To me it looks like you should > and then you could merge it into prep_new_page. No, you don't want that. > Also, what is CONFIG_CONTIGUOUS_PAGE_ALLOC doing? It seems not > fully implemented but adds lots of uglieness :) It was a second allocator that more cleverly allocated large memory chunks - not using the power of 2 allocator. I have not carried this into the 2.5 patches. Very nice to have, since you suffer much more from memory fragmentation without VM. But not strictly neccessary, and to minimize and simplify the current patch sets I left it out. Cleanup out all references to it now. > CONFIG_NO_MMU_LARGE_ALLOCS might want a saner name, btw > (CONFIG_LARGE_ALLOCS?). Yes, no doubt the NO_MMU name is universally disliked :-) Changed to COFNIG_LARGE_ALLOCS now. > > General commets: > - Config.in files have three-space, not two-space indentation Fixed. > - I don't think you want to keep around the old binfmt_flat This isn't old. It is the primary format used on uClinux. ELF and a.out are not practical, since you would need to do the final link/locate on them at exec load time (you won't know what address in memory they will get loaded to until them). You don have the VM luxary of just locating it at a fixed address at compile time. FLAT format is a light weight, mostly architecture independant way to carry around relocs, and to keep the program binaries small. > format when merghin into mainline > - MAX_SHARED_LIBS is never used Another "feature" I have not carried into 2.5. Removed. Thanks Greg -- ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Wizard EMAIL: gerg@snapgear.com SnapGear Pty Ltd PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-16 14:41 ` Greg Ungerer @ 2002-10-16 14:48 ` Christoph Hellwig 2002-10-16 15:36 ` Greg Ungerer 0 siblings, 1 reply; 14+ messages in thread From: Christoph Hellwig @ 2002-10-16 14:48 UTC (permalink / raw) To: Greg Ungerer; +Cc: linux-kernel > This isn't old. It is the primary format used on uClinux. ELF > and a.out are not practical, since you would need to do the final > link/locate on them at exec load time (you won't know what address > in memory they will get loaded to until them). You don have the > VM luxary of just locating it at a fixed address at compile time. > > FLAT format is a light weight, mostly architecture independant > way to carry around relocs, and to keep the program binaries > small. I don't meant binfmt_flat itself but the support for the old-style relocs that is still in the code. BTW, does binfmt_flat for for any non-uClinux port? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-16 14:48 ` Christoph Hellwig @ 2002-10-16 15:36 ` Greg Ungerer 0 siblings, 0 replies; 14+ messages in thread From: Greg Ungerer @ 2002-10-16 15:36 UTC (permalink / raw) To: Christoph Hellwig; +Cc: linux-kernel Christoph Hellwig wrote: >>This isn't old. It is the primary format used on uClinux. ELF >>and a.out are not practical, since you would need to do the final >>link/locate on them at exec load time (you won't know what address >>in memory they will get loaded to until them). You don have the >>VM luxary of just locating it at a fixed address at compile time. >> >>FLAT format is a light weight, mostly architecture independant >>way to carry around relocs, and to keep the program binaries >>small. >> > > I don't meant binfmt_flat itself but the support for the old-style relocs > that is still in the code. OK, I'll have a look at that. > BTW, does binfmt_flat for for any non-uClinux port? Don't beleive so. Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Wizard EMAIL: gerg@snapgear.com SnapGear Pty Ltd PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Make some EXPORT_SYMBOLs dependent on CONFIG_MMU 2002-10-15 17:16 ` Christoph Hellwig 2002-10-16 14:41 ` Greg Ungerer @ 2002-11-26 7:46 ` Miles Bader 2002-11-26 7:49 ` [PATCH] v850 additions to include/linux/elf.h Miles Bader 2 siblings, 0 replies; 14+ messages in thread From: Miles Bader @ 2002-11-26 7:46 UTC (permalink / raw) To: Greg Ungerer, Christoph Hellwig; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 233 bytes --] [I'm not sure who to send this to, so I'm guessing. Pointers appreciated!] Hi, A few symbols are only defined when CONFIG_MMU=y, but are exported (by kernel/ksyms.c) unconditionally. This patch makes them conditional. Patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: nommu-exports-20021126.patch --] [-- Type: text/x-patch, Size: 757 bytes --] diff -ruN -X../cludes ../orig/linux-2.5.49-uc0/kernel/ksyms.c kernel/ksyms.c --- ../orig/linux-2.5.49-uc0/kernel/ksyms.c 2002-11-25 10:30:10.000000000 +0900 +++ kernel/ksyms.c 2002-11-25 14:32:43.000000000 +0900 @@ -324,7 +324,9 @@ /* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */ EXPORT_SYMBOL(default_llseek); EXPORT_SYMBOL(dentry_open); +#ifdef CONFIG_MMU EXPORT_SYMBOL(filemap_nopage); +#endif EXPORT_SYMBOL(filemap_fdatawrite); EXPORT_SYMBOL(filemap_fdatawait); EXPORT_SYMBOL(lock_page); @@ -525,7 +527,9 @@ EXPORT_SYMBOL(single_release); /* Program loader interfaces */ +#ifdef CONFIG_MMU EXPORT_SYMBOL(setup_arg_pages); +#endif EXPORT_SYMBOL(copy_strings_kernel); EXPORT_SYMBOL(do_execve); EXPORT_SYMBOL(flush_old_exec); [-- Attachment #3: Type: text/plain, Size: 163 bytes --] Thanks, -Miles -- Love is a snowmobile racing across the tundra. Suddenly it flips over, pinning you underneath. At night the ice weasels come. --Nietzsche ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] v850 additions to include/linux/elf.h 2002-10-15 17:16 ` Christoph Hellwig 2002-10-16 14:41 ` Greg Ungerer 2002-11-26 7:46 ` [PATCH] Make some EXPORT_SYMBOLs dependent on CONFIG_MMU Miles Bader @ 2002-11-26 7:49 ` Miles Bader 2002-11-26 15:41 ` Alan Cox 2 siblings, 1 reply; 14+ messages in thread From: Miles Bader @ 2002-11-26 7:49 UTC (permalink / raw) To: Greg Ungerer; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 112 bytes --] Hi, This patch adds more stuff to include/linux/elf.h for the v850 (used by the new module loader). Patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: v850-elfdefs-20021126.patch --] [-- Type: text/x-patch, Size: 1529 bytes --] diff -ruN -X../cludes ../orig/linux-2.5.49-uc0/include/linux/elf.h include/linux/elf.h --- ../orig/linux-2.5.49-uc0/include/linux/elf.h 2002-11-25 10:34:44.000000000 +0900 +++ include/linux/elf.h 2002-11-26 11:10:41.000000000 +0900 @@ -92,6 +92,9 @@ */ #define EM_ALPHA 0x9026 +/* Bogus old v850 magic number, used by old tools. */ +#define EM_CYGNUS_V850 0x9080 + /* * This is the old interim value for S/390 architecture */ @@ -450,6 +453,31 @@ /* Keep this the last entry. */ #define R_390_NUM 27 + +/* v850 relocations. */ +#define R_V850_NONE 0 +#define R_V850_9_PCREL 1 +#define R_V850_22_PCREL 2 +#define R_V850_HI16_S 3 +#define R_V850_HI16 4 +#define R_V850_LO16 5 +#define R_V850_32 6 +#define R_V850_16 7 +#define R_V850_8 8 +#define R_V850_SDA_16_16_OFFSET 9 /* For ld.b, st.b, set1, clr1, + not1, tst1, movea, movhi */ +#define R_V850_SDA_15_16_OFFSET 10 /* For ld.w, ld.h, ld.hu, st.w, st.h */ +#define R_V850_ZDA_16_16_OFFSET 11 /* For ld.b, st.b, set1, clr1, + not1, tst1, movea, movhi */ +#define R_V850_ZDA_15_16_OFFSET 12 /* For ld.w, ld.h, ld.hu, st.w, st.h */ +#define R_V850_TDA_6_8_OFFSET 13 /* For sst.w, sld.w */ +#define R_V850_TDA_7_8_OFFSET 14 /* For sst.h, sld.h */ +#define R_V850_TDA_7_7_OFFSET 15 /* For sst.b, sld.b */ +#define R_V850_TDA_16_16_OFFSET 16 /* For set1, clr1, not1, tst1, + movea, movhi */ +#define R_V850_NUM 17 + + /* Legal values for e_flags field of Elf64_Ehdr. */ #define EF_ALPHA_32BIT 1 /* All addresses are below 2GB */ [-- Attachment #3: Type: text/plain, Size: 208 bytes --] Thanks, -Miles -- [|nurgle|] ddt- demonic? so quake will have an evil kinda setting? one that will make every christian in the world foamm at the mouth? [iddt] nurg, that's the goal ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] v850 additions to include/linux/elf.h 2002-11-26 7:49 ` [PATCH] v850 additions to include/linux/elf.h Miles Bader @ 2002-11-26 15:41 ` Alan Cox 2002-11-27 1:19 ` Miles Bader 0 siblings, 1 reply; 14+ messages in thread From: Alan Cox @ 2002-11-26 15:41 UTC (permalink / raw) To: Miles Bader; +Cc: Greg Ungerer, Linux Kernel Mailing List On Tue, 2002-11-26 at 07:49, Miles Bader wrote: > Hi, > > This patch adds more stuff to include/linux/elf.h for the v850 (used by > the new module loader). To save cluttering a linux/*.h file couldnt the module loader for v850 include an asm/*.h file holding the extra info ? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] v850 additions to include/linux/elf.h 2002-11-26 15:41 ` Alan Cox @ 2002-11-27 1:19 ` Miles Bader 2002-11-27 13:01 ` Alan Cox 0 siblings, 1 reply; 14+ messages in thread From: Miles Bader @ 2002-11-27 1:19 UTC (permalink / raw) To: Alan Cox; +Cc: Greg Ungerer, Linux Kernel Mailing List Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > > This patch adds more stuff to include/linux/elf.h for the v850 (used by > > the new module loader). > > To save cluttering a linux/*.h file couldnt the module loader for v850 > include an asm/*.h file holding the extra info ? I suppose so, but the v850 is not exceptional in this regard. The various relocation type constants (R_...) in elf.h are completely unused in the kernel on _every_ architecture, except by the new module loader. If tidying is needed, then it seems like the best thing would be to move all the arch-specific stuff into the corresponding <asm/elf.h> file for each architecture. I presume the reason this hasn't been done is simply convention -- userland elf.h files are also giant conglomerations of defines for every supported architecture ... -Miles -- Next to fried food, the South has suffered most from oratory. -- Walter Hines Page ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] v850 additions to include/linux/elf.h 2002-11-27 1:19 ` Miles Bader @ 2002-11-27 13:01 ` Alan Cox 2002-11-28 1:20 ` Miles Bader 0 siblings, 1 reply; 14+ messages in thread From: Alan Cox @ 2002-11-27 13:01 UTC (permalink / raw) To: Miles Bader; +Cc: Greg Ungerer, Linux Kernel Mailing List On Wed, 2002-11-27 at 01:19, Miles Bader wrote: > If tidying is needed, then it seems like the best thing would be to move > all the arch-specific stuff into the corresponding <asm/elf.h> file for > each architecture. I presume the reason this hasn't been done is simply > convention -- userland elf.h files are also giant conglomerations of > defines for every supported architecture ... I agree entirely. So lets start with v850 8) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] v850 additions to include/linux/elf.h 2002-11-27 13:01 ` Alan Cox @ 2002-11-28 1:20 ` Miles Bader 0 siblings, 0 replies; 14+ messages in thread From: Miles Bader @ 2002-11-28 1:20 UTC (permalink / raw) To: Alan Cox; +Cc: Greg Ungerer, Linux Kernel Mailing List Alan Cox <alan@lxorguk.ukuu.org.uk> writes: > > If tidying is needed, then it seems like the best thing would be to move > > all the arch-specific stuff into the corresponding <asm/elf.h> file for > > each architecture. > > I agree entirely. So lets start with v850 8) Okay. I sent the previous patch to Linus and he doesn't seem to have taken it; perhaps your suggestion will fare better. I'd like to remain consistent with other archs though -- does anyone want to make a patch (I guess just move all the R_... constants) for them? -Miles -- Yo mama's so fat when she gets on an elevator it HAS to go down. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-15 15:25 [PATCH]: linux-2.5.42uc1 (MMU-less support) Greg Ungerer 2002-10-15 17:16 ` Christoph Hellwig @ 2002-10-16 5:42 ` Miles Bader 2002-10-16 12:49 ` Greg Ungerer 1 sibling, 1 reply; 14+ messages in thread From: Miles Bader @ 2002-10-16 5:42 UTC (permalink / raw) To: Greg Ungerer; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 578 bytes --] Hi, Here's a v850 update for 2.5.42uc1. I addressed two of Christoph Hellwig's concerns, (1) vmlinux.lds.S [barf] and (2) the asm-constant generation mechanism. He also complained about using the MD driver &c instead of initrd, but I'm not sure what do about that -- it'd be nice to use a `standard' solution, but when I originally looked at the initrd stuff, it seemed very convoluted and confusing; since earlier lkml discussion had pointed to using MD as the nearest thing to the old blkmem device, that seemed like the way to go. What's your opinion on this? Patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: linux-2.5.42uc1-v850-20021016-dist.patch --] [-- Type: text/x-patch, Size: 10759 bytes --] diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/Makefile arch/v850/Makefile --- ../orig/linux-2.5.42uc1/arch/v850/Makefile 2002-10-16 10:45:53.000000000 +0900 +++ arch/v850/Makefile 2002-10-16 13:46:51.000000000 +0900 @@ -23,32 +23,6 @@ CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" -# linker scripts -ifdef CONFIG_V850E_SIM -LINKER_SCRIPT = $(arch_dir)/sim.ld -endif -ifdef CONFIG_V850E2_SIM85E2C -LINKER_SCRIPT = $(arch_dir)/sim85e2c.ld -endif -ifdef CONFIG_V850E2_FPGA85E2C -LINKER_SCRIPT = $(arch_dir)/fpga85e2c.ld -endif -ifdef CONFIG_V850E2_ANNA -LINKER_SCRIPT = $(arch_dir)/anna.ld -endif -ifdef CONFIG_RTE_CB_MA1 -ifdef CONFIG_ROM_KERNEL -LINKER_SCRIPT = $(arch_dir)/rte_ma1_cb-rom.ld -else -ifdef CONFIG_RTE_CB_MA1_KSRAM -LINKER_SCRIPT = $(arch_dir)/rte_ma1_cb-ksram.ld -else -LINKER_SCRIPT = $(arch_dir)/rte_ma1_cb.ld -endif -endif -endif - - HEAD := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o core-y += $(arch_dir)/kernel/ libs-y += $(arch_dir)/lib/ @@ -73,17 +47,19 @@ endif -# Barf. -$(arch_dir)/vmlinux.lds.S: $(LINKER_SCRIPT) - cp $< $@ - - -archmrproper: - -archdep: +prepare: include/asm-$(ARCH)/asm-consts.h -archclean: - rm -f vmlinux - rm -f root_fs_image.o - rm -f $(arch_dir)/kernel/v850_defs.h $(arch_dir)/kernel/v850_defs.d - rm -f $(arch_dir)/vmlinux.lds.S $(arch_dir)/vmlinux.lds.s +# Generate constants from C code for use by asm files +arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \ + include/config/MARKER +include/asm-$(ARCH)/asm-consts.h.tmp: arch/$(ARCH)/kernel/asm-consts.s + @$(generate-asm-offsets.h) < $< > $@ +include/asm-$(ARCH)/asm-consts.h: include/asm-$(ARCH)/asm-consts.h.tmp + @echo -n ' Generating $@' + @$(update-if-changed) + + +CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h.tmp \ + include/asm-$(ARCH)/asm-consts.h \ + arch/$(ARCH)/kernel/asm-consts.s \ + root_fs_image.o diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/kernel/Makefile arch/v850/kernel/Makefile --- ../orig/linux-2.5.42uc1/arch/v850/kernel/Makefile 2002-10-16 10:45:54.000000000 +0900 +++ arch/v850/kernel/Makefile 2002-10-16 13:47:05.000000000 +0900 @@ -36,17 +36,3 @@ include $(TOPDIR)/Rules.make - - -$(obj)/head.o: $(src)/head.S $(obj)/v850_defs.h -$(obj)/entry.o: $(src)/entry.S $(obj)/v850_defs.h - --include $(obj)/v850_defs.d - -$(obj)/v850_defs.h: $(src)/v850_defs.c $(src)/v850_defs.head - rm -f $(obj)/v850_defs.d - SUNPRO_DEPENDENCIES="$(obj)/v850_defs.d $(obj)/v850_defs.h" \ - $(CC) $(filter-out -MD,$(CFLAGS)) -S -o $(obj)/v850_defs.s $(src)/v850_defs.c - cp $(src)/v850_defs.head $(src)/v850_defs.h - grep '^#define' $(obj)/v850_defs.s >> $(obj)/v850_defs.h - rm $(obj)/v850_defs.s diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/kernel/asm-consts.c arch/v850/kernel/asm-consts.c --- ../orig/linux-2.5.42uc1/arch/v850/kernel/asm-consts.c 1970-01-01 09:00:00.000000000 +0900 +++ arch/v850/kernel/asm-consts.c 2002-10-16 13:51:15.000000000 +0900 @@ -0,0 +1,60 @@ +/* + * This program is used to generate definitions needed by + * assembly language modules. + * + * We use the technique used in the OSF Mach kernel code: + * generate asm statements containing #defines, + * compile this file to assembler, and then extract the + * #defines from the assembly-language output. + */ + +#include <linux/stddef.h> +#include <linux/sched.h> +#include <linux/kernel_stat.h> +#include <asm/irq.h> +#include <asm/hardirq.h> +#include <asm/errno.h> + +#define DEFINE(sym, val) \ + asm volatile("\n->" #sym " %0 " #val : : "i" (val)) + +#define BLANK() asm volatile("\n->" : : ) + +int main (void) +{ + /* offsets into the task struct */ + DEFINE (TASK_STATE, offsetof (struct task_struct, state)); + DEFINE (TASK_FLAGS, offsetof (struct task_struct, flags)); + DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace)); + DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked)); + DEFINE (TASK_THREAD, offsetof (struct task_struct, thread)); + DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, thread_info)); + DEFINE (TASK_MM, offsetof (struct task_struct, mm)); + DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); + DEFINE (TASK_PID, offsetof (struct task_struct, pid)); + + /* offsets into the kernel_stat struct */ + DEFINE (STAT_IRQ, offsetof (struct kernel_stat, irqs)); + + + /* signal defines */ + DEFINE (SIGSEGV, SIGSEGV); + DEFINE (SEGV_MAPERR, SEGV_MAPERR); + DEFINE (SIGTRAP, SIGTRAP); + DEFINE (SIGCHLD, SIGCHLD); + DEFINE (SIGILL, SIGILL); + DEFINE (TRAP_TRACE, TRAP_TRACE); + + /* ptrace flag bits */ + DEFINE (PT_PTRACED, PT_PTRACED); + DEFINE (PT_DTRACE, PT_DTRACE); + + /* error values */ + DEFINE (ENOSYS, ENOSYS); + + /* clone flag bits */ + DEFINE (CLONE_VFORK, CLONE_VFORK); + DEFINE (CLONE_VM, CLONE_VM); + + return 0; +} diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/kernel/entry.S arch/v850/kernel/entry.S --- ../orig/linux-2.5.42uc1/arch/v850/kernel/entry.S 2002-10-16 10:45:54.000000000 +0900 +++ arch/v850/kernel/entry.S 2002-10-16 13:44:55.000000000 +0900 @@ -22,7 +22,7 @@ #include <asm/irq.h> #include <asm/errno.h> -#include "v850_defs.h" +#include <asm/asm-consts.h> /* Make a slightly more convenient alias for C_SYMBOL_NAME. */ diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/kernel/v850_defs.c arch/v850/kernel/v850_defs.c --- ../orig/linux-2.5.42uc1/arch/v850/kernel/v850_defs.c 2002-10-16 10:45:54.000000000 +0900 +++ arch/v850/kernel/v850_defs.c 1970-01-01 09:00:00.000000000 +0900 @@ -1,58 +0,0 @@ -/* - * This program is used to generate definitions needed by - * assembly language modules. - * - * We use the technique used in the OSF Mach kernel code: - * generate asm statements containing #defines, - * compile this file to assembler, and then extract the - * #defines from the assembly-language output. - */ - -#include <linux/stddef.h> -#include <linux/sched.h> -#include <linux/kernel_stat.h> -#include <asm/irq.h> -#include <asm/hardirq.h> -#include <asm/errno.h> - -#define DEFINE(sym, val) \ - asm volatile ("\n#define " #sym " %0" : : "i" (val)) - -int main (void) -{ - /* offsets into the task struct */ - DEFINE (TASK_STATE, offsetof (struct task_struct, state)); - DEFINE (TASK_FLAGS, offsetof (struct task_struct, flags)); - DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace)); - DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked)); - DEFINE (TASK_THREAD, offsetof (struct task_struct, thread)); - DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, thread_info)); - DEFINE (TASK_MM, offsetof (struct task_struct, mm)); - DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm)); - DEFINE (TASK_PID, offsetof (struct task_struct, pid)); - - /* offsets into the kernel_stat struct */ - DEFINE (STAT_IRQ, offsetof (struct kernel_stat, irqs)); - - - /* signal defines */ - DEFINE (SIGSEGV, SIGSEGV); - DEFINE (SEGV_MAPERR, SEGV_MAPERR); - DEFINE (SIGTRAP, SIGTRAP); - DEFINE (SIGCHLD, SIGCHLD); - DEFINE (SIGILL, SIGILL); - DEFINE (TRAP_TRACE, TRAP_TRACE); - - /* ptrace flag bits */ - DEFINE (PT_PTRACED, PT_PTRACED); - DEFINE (PT_DTRACE, PT_DTRACE); - - /* error values */ - DEFINE (ENOSYS, ENOSYS); - - /* clone flag bits */ - DEFINE (CLONE_VFORK, CLONE_VFORK); - DEFINE (CLONE_VM, CLONE_VM); - - return 0; -} diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/kernel/v850_defs.head arch/v850/kernel/v850_defs.head --- ../orig/linux-2.5.42uc1/arch/v850/kernel/v850_defs.head 2002-10-16 10:45:54.000000000 +0900 +++ arch/v850/kernel/v850_defs.head 1970-01-01 09:00:00.000000000 +0900 @@ -1,5 +0,0 @@ -/* - * WARNING! This file is automatically generated - DO NOT EDIT! - */ - -#define TS_MAGICKEY 0x5a5a5a5a diff -ruN -X../cludes ../orig/linux-2.5.42uc1/arch/v850/vmlinux.lds.S arch/v850/vmlinux.lds.S --- ../orig/linux-2.5.42uc1/arch/v850/vmlinux.lds.S 1970-01-01 09:00:00.000000000 +0900 +++ arch/v850/vmlinux.lds.S 2002-10-16 13:30:43.000000000 +0900 @@ -0,0 +1,27 @@ +#include <linux/config.h> + +#ifdef CONFIG_V850E_SIM +#include "sim.ld" +#endif + +#ifdef CONFIG_V850E2_SIM85E2C +#include "sim85e2c.ld" +#endif + +#ifdef CONFIG_V850E2_FPGA85E2C +#include "fpga85e2c.ld" +#endif + +#ifdef CONFIG_V850E2_ANNA +#include "anna.ld" +#endif + +#ifdef CONFIG_RTE_CB_MA1 +# ifdef CONFIG_ROM_KERNEL +# include "rte_ma1_cb-rom.ld" +# elif CONFIG_RTE_CB_MA1_KSRAM +# include "rte_ma1_cb-ksram.ld" +# else /* !CONFIG_ROM_KERNEL && !CONFIG_RTE_CB_MA1_KSRAM */ +# include "rte_ma1_cb.ld" +# endif /* CONFIG_ROM_KERNEL */ +#endif /* CONFIG_RTE_CB_MA1 */ diff -ruN -X../cludes ../orig/linux-2.5.42uc1/include/asm-v850/page.h include/asm-v850/page.h --- ../orig/linux-2.5.42uc1/include/asm-v850/page.h 2002-10-16 10:45:57.000000000 +0900 +++ include/asm-v850/page.h 2002-10-16 11:53:42.000000000 +0900 @@ -21,6 +21,7 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) + /* * PAGE_OFFSET -- the first address of the first page of memory. For archs with * no MMU this corresponds to the first free page in physical memory (aligned @@ -30,11 +31,6 @@ #define PAGE_OFFSET 0x0000000 #endif -/* - * MAP_NR -- given an address, calculate the index of the page struct which - * points to the address's page. - */ -#define MAP_NR(addr) (((unsigned long)(addr) - PAGE_OFFSET) >> PAGE_SHIFT) #ifdef __KERNEL__ #ifndef __ASSEMBLY__ @@ -91,9 +87,11 @@ #endif /* !__ASSEMBLY__ */ + /* to align the pointer to the (next) page boundary */ #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) + #ifndef __ASSEMBLY__ extern void __bug (void) __attribute__ ((noreturn)); @@ -116,18 +114,31 @@ #endif /* !__ASSEMBLY__ */ -#define __pa(x) __virt_to_phys ((unsigned long)(x)) -#define __va(x) ((void *)__phys_to_virt ((unsigned long)(x))) /* No current v850 processor has virtual memory. */ #define __virt_to_phys(addr) (addr) #define __phys_to_virt(addr) (addr) -#define virt_to_page(kaddr) (mem_map + MAP_NR (kaddr)) +#define virt_to_pfn(kaddr) (__virt_to_phys (kaddr) >> PAGE_SHIFT) +#define pfn_to_virt(pfn) __phys_to_virt ((pfn) << PAGE_SHIFT) + +#define MAP_NR(kaddr) \ + (((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) +#define virt_to_page(kaddr) (mem_map + MAP_NR (kaddr)) +#define page_to_virt(page) \ + ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) + +#define pfn_to_page(pfn) virt_to_page (pfn_to_virt (pfn)) +#define page_to_pfn(page) virt_to_pfn (page_to_virt (page)) + #define virt_addr_valid(kaddr) \ (((void *)(kaddr) >= (void *)PAGE_OFFSET) && MAP_NR (kaddr) < max_mapnr) +#define __pa(x) __virt_to_phys ((unsigned long)(x)) +#define __va(x) ((void *)__phys_to_virt ((unsigned long)(x))) + + #endif /* KERNEL */ #ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC [-- Attachment #3: Type: text/plain, Size: 86 bytes --] Thanks, -Miles -- Occam's razor split hairs so well, I bought the whole argument! ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH]: linux-2.5.42uc1 (MMU-less support) 2002-10-16 5:42 ` [PATCH]: linux-2.5.42uc1 (MMU-less support) Miles Bader @ 2002-10-16 12:49 ` Greg Ungerer 0 siblings, 0 replies; 14+ messages in thread From: Greg Ungerer @ 2002-10-16 12:49 UTC (permalink / raw) To: Miles Bader; +Cc: linux-kernel Hi Miles, Miles Bader wrote: > Here's a v850 update for 2.5.42uc1. I have rolled this into, linux-2.5.43uc0. I have also removed the gdb patches under arch/v850. > I addressed two of Christoph Hellwig's concerns, (1) vmlinux.lds.S > [barf] and (2) the asm-constant generation mechanism. > > He also complained about using the MD driver &c instead of initrd, but > I'm not sure what do about that -- it'd be nice to use a `standard' > solution, but when I originally looked at the initrd stuff, it seemed > very convoluted and confusing; since earlier lkml discussion had pointed > to using MD as the nearest thing to the old blkmem device, that seemed > like the way to go. I very much like using a specific MTD map driver. I haven't carried my initrd patches through to the 2.5 code yet. But it was pretty simple to do for 2.4... Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Wizard EMAIL: gerg@snapgear.com SnapGear Pty Ltd PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH]: linux-2.5.42uc1 (MMU-less support) @ 2002-10-16 15:49 Greg Ungerer 0 siblings, 0 replies; 14+ messages in thread From: Greg Ungerer @ 2002-10-16 15:49 UTC (permalink / raw) To: linux-kernel Hi All, An updated uClinux patch is available at: http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0.patch.gz Changelog: 1. patched against 2.5.43 2. removed v850 gdb stuff 3. change CONFIG_NO_MMU_LARGE_ALLOCS to CONFIG_LARGE_ALLOCS 4. remove unused CONFIG_CONTIGUOUS_PAGE_ALLOC code 5. reformated config.in files 6. removed unused MAX_SHARED_LIBS in flat.h 7. modified vmlinux.ld.S to include appropriate linker scripts 8. moved set_page_refs() back into page_alloc.c Smaller specific patches: . FEC ColdFire 5272 ethernet driver http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-fec.patch.gz . m68k/ColdFire/v850 serial drivers http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-serial.patch.gz . 68328 frame buffer http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-fb.patch.gz . binfmt_flat loader http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-binflat.patch.gz . m68knommu architecture http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-m68knommu.patch.gz . v850 architecture http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-v850.patch.gz . mm (MMU-less) only patch http://www.uclinux.org/pub/uClinux/uClinux-2.5.x/linux-2.5.43uc0-mm.patch.gz Regards Greg ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Wizard EMAIL: gerg@snapgear.com Snapgear Pty Ltd PHONE: +61 7 3279 1822 825 Stanley St, FAX: +61 7 3279 1820 Woolloongabba, QLD, 4102, Australia WEB: www.SnapGear.com ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2002-11-28 1:14 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-10-15 15:25 [PATCH]: linux-2.5.42uc1 (MMU-less support) Greg Ungerer 2002-10-15 17:16 ` Christoph Hellwig 2002-10-16 14:41 ` Greg Ungerer 2002-10-16 14:48 ` Christoph Hellwig 2002-10-16 15:36 ` Greg Ungerer 2002-11-26 7:46 ` [PATCH] Make some EXPORT_SYMBOLs dependent on CONFIG_MMU Miles Bader 2002-11-26 7:49 ` [PATCH] v850 additions to include/linux/elf.h Miles Bader 2002-11-26 15:41 ` Alan Cox 2002-11-27 1:19 ` Miles Bader 2002-11-27 13:01 ` Alan Cox 2002-11-28 1:20 ` Miles Bader 2002-10-16 5:42 ` [PATCH]: linux-2.5.42uc1 (MMU-less support) Miles Bader 2002-10-16 12:49 ` Greg Ungerer -- strict thread matches above, loose matches on Subject: below -- 2002-10-16 15:49 Greg Ungerer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox