Summary of differences between the 2.4 kernel in the Netwinder.org CVS versus the corresponding RMK version. Current as of 2.4.17-rmk1. The patch in question is located at ftp://ftp.netwinder.org in /users/r/ralphs/kernel/beta/patch-2.4.17-nw1.gz 27-Jan-2002 Ralph Siemsen Updated 29-Jan-2002 to include PhilB's comments. Each major change is described as follows. Feature: Files affected: Status: Notes: *** Feature: Placement of the init_task struct Files: arch/arm/vmlinux-arm*.lds.in Status: unknown Notes: RMK places .init_task segment into the text section NW places it in data segment and aligns to 8k boundary *** Feature: Build options Files: arch/arm/Makefile Status: needs investigation Notes: RMK CFLAGS include -fnocommon and -pipe PhilB: I think -pipe turns out to be a loss in terms of performance, though it might be worth re-benchmarking to be sure. The -fno-common thing was controversial at the time but I don't remember what it was put in for in the first place. *** Feature: FutureTV/Nexus CONFIG name Files: many many many Status: check with FutureTV Notes: CONFIG_ARCH_NEXUSPCI appears to have been renamed CONFIG_ARCH_FTVPCI in the NW tree Note2: RMK tree missing several FTV-related config.in options PhilP: It's kind of tempting to drop that stuff altogether. As far as I know nobody at FutureTV is especially interested in maintaining it. You could ask ewan.mellor@futuretv.com, who I gather is in charge of their software effort these days. *** Feature: Kernel support for flat binaries Files: arch/arm/config.in, binfmt_flat.c, fs/Makefiles Status: does anyone use it? Notes: NW tree flat binary support code, but it is commented out. Appears to be halfway implemented, or halfway removed. Which direction are we going in? PhilP: The flat binary support is a ucLinux thing. It got broken during a merge a while ago and I never had time to fix it. Having support for this stuff in the kernel seems like a nice idea, since it lets people run the same binaries on both platforms; on the other hand, it doesn't work at the moment, so I guess the thing to do would be to take it out until and unless someone has the time to make it work again. *** Feature: NWFPE extended precision Files: arch/arm/config.in, arch/arm/nwfpe/* Status: Notes: gcc does not generate extended precision (80bit) ops therefore emulator code is redundant emulator runs faster without it *** Feature: Reduced size for buffers/hashes CONFIG_SMALL_BUFFERS Files: Status: unknown Notes: Option not present in RMK *** Feature: Netwinder debug helper CONFIG_NWDEBUG Files: nwdebug.c, arch/arm/makefile, arch/arm/config.in Status: recommend eliminate Notes: implements some low-level debugging primitives same features available via /proc/kmem and others *** Feature: Extended profiling CONFIG_EXTENDED_PROFILING Files: arch/arm/config.in, ... Status: will-be-removed Notes: apparently implements profiling of modules PhilB: That was a patch for gprof-style profiling. I thought I had reverted it already but obviously not. In any case, I would recommend pulling it out. *** Feature: Default-configs for different machines Files: arch/arm/def-configs/* Status: to-be-merged Notes: RMK is either missing or has old configs for clps7500, ftvpci, netwinder, shark, tbox, debian/* Note2: Perhaps the number of differnet configs has grown a bit too large; could we come up with a better way to keep the common options updated through kernel versions while keeping machine-specific requirements also? *** Feature: PCI fixups for Ali, cmd640, shark Files: arch/arm/kernel/bios32.c Status: Notes: NW tree provides several pci_fixup_XXX calls here. *** Feature: Kernel tag list fixups for riscpc Files: arch/arm/kernel/compat.c Status: Notes: NW tree contains fixup for linloader bug on riscpc to do with start address of initrd *** Feature: EBSA285 debugging support w/o MMU Files: arch/arm/kernel/debug-armv.S Status: Notes: NW version appears to support debugging with disabled MMU Could be old code that's no longer needed. PhilB: Seems like a worthwhile thing to keep. *** Feature: ds2400 driver support Files: arch/arm/kernel/ds2400.c Status: Notes: not present in RMK *** Feature: ecard support Files: arch/arm/kernel/ecard.c Status: more-info-required Notes: NW version supports locking page 0 via modify_domain() Comments indicate this is "required by some expansion card loader programs". PhilB: This is all a bit mysterious. As far as I can gather, "some" expansion cards require the kernel to go doing random memory pokes in order to make their loaders work. In recent kernels, that will cause an oops unless it's wrapped with modify_domain() calls; this trips up the etherh at least, and maybe some others. *** Feature: Booting from ROM support Files: arch/arm/kernel/head-arm*.S, makefiles, config.in Status: Notes: NW tree contains support for this (does it work?) *** Feature: Archemides arch detection Files: arch/arm/kernel/head-armo.S Status: Notes: RMK version has comment from DAG indicating its outdated. NW version checks for IOEB. *** Feature: Shark magic tidbits Files: arch/arm/kernel/head-armv.S arch/arm/mm/init.c drivers/net/cs89x0.c Status: Notes: Shark has some little #ifdef CONFIG_ARCH_SHARK sprinkled around Probably these could be implemented some other way. RMK to check? Note2: Shark can only DMA in first 4MB of memory; this requirement is currently coded into paging_init() Note3: Shark always compiles in enhanced RTC support, is this required to boot or can this move to appropriate defconfig file? Shark plays some games with static keyword in drivers/char/rtc.c Note4: Shark-specifics present in cs89x0 probing routine, and special EEPROM, irq treatment. Mac addr hack for clps7500. *** Feature: IRQ lock detection Files: arch/arm/kernel/irq.c Status: Notes: NW tree allows this feature to be turned off. *** Feature: PLX PCI9000 host bridge Files: arch/arm/kernel/plx90x0 Status: need-more-info Notes: NW version has some additional reset magic. PhilB: The idea of this was to allow the kernel to change the memory clock rate on the 7500. This happens via the IOMD registers so you can only do it once the memory map is set up. I don't have any particular feelings about this either way: on the one hand you could argue that the bootloader should be doing this stuff; on the other, maybe this feature could be more generally useful. I dunno. *** Feature: Arch-specific post-mmu-enable hook Files: arch/arm/kernel/setup.c, include/asm-arm/mach/arch.h Status: Notes: NW tree provides hook to call arch-specific post-mmu-setup routine. Used by some of Phil's architectures. Increases SIZEOF_MACHINE_DESC from 48 to 52. *** Feature: floppy DMA Files: arch/arm/lib/floppydma.S Status: Notes: NW seem to use an additional parameter in r9 Not sure what's going on here... PhilB: I think you have this one backwards. The NW code is the version that doesn't use R9. From what I recall, the idea was that it isn't actually necessary for the pseudo-DMA code to use the "stop" register; the floppy controller will just stop sucking when it's had enough. And the code is rather simpler without those checks. Ralph: Quite possible. The eyes go numb at some point in a 300kB gzipped patch. *** Feature: Netwinder tone module Files: Status: nwtone.c, arch/arm/mach-footbridge/Makefile Notes: enables keyboard beep on netwinder could this be generalized? *** Feature: Netwinder power down Files: arch/arm/mach-footbridge/arch.c, nwpwrdwn.c Status: to-be-merged Notes: Implements pseudo sleep mode for netwinder. *** Feature: Netwinder VGA textmode suppport Files: arch/arm/mach-footbridge/cyber2000text.c Status: Notes: Patb's lowlevel init code for VGA text. Missing from RMK. Don't know if it is useful. Would be nice to have VGA support (smaller than FB) *** Feature: Ugly netwinder sound module detection Files: arch/arm/mach-footbridge/netwinder-hw.c Status: Notes: NW tree tries to check for SB being present, and if not there, turns the nwtone drive code into no-ops. *** Feature: Netwinder LED control Files: netwinder-leds.c Status: propose eliminate Notes: NW version remembers state of LED when user claims it, restores the state when user releases it. This behaviour seems to encourage sloppy handling of the LED in clients. Also makes it impossible for a client to set the led state then exit. *** Feature: Architecture names Files: arch/arm/mm/proc-arm2,3.S Status: does-rmk-agree? Notes: NW and RMK are not agreeing on naming of arch. v2 => v1, and v2a => v2. PhilB: I think the one in CVS is correct. This is talking about ARM2, which is ARMv2 and ARM250/ARM3, which are ARMv2a. ARMv1 never really existed outside Acorn's lab; it was implemented in the ARM1 chips, but very few were produced and I don't think either GCC or Linux support that architecture properly. *** Feature: NWFPE Files: arch/arm/nwfpe/* Status: Notes: There are many changes. Both RMK and NW have some optimizations not shared in the others code. Should merge them. Its been suggested to drop 80bit support entirely. *** Feature: Acorn keyboard and ps2mouse support Files: drivers/char/Makefile, mouse_ps2.c, keyb_ps2.c, Config.in Status: Notes: RMK seems to be missing PSMOUSE_IOMD support in makefile Apparently clps7500 needs special ps2 mouse driver *** Feature: Acorn network drivers ec6854 ec6854_fiq Files: drivers/acorn/Makefile, ec6854.c, ic6854_fiq.S Status: Notes: Missing entirely from RMK *** Feature: A680 scsi support Files: drivers/acorn/scsi/Config.in, Makefile, a680.c, a680.h Status: Notes: Seem to be missing from RMK *** Feature: clps7500 DMA support Files: arch/arm/kernel/Makefile, arch/arm/kernel/dma-clps7500 Status: Notes: probably should be merged to RMK also arch/arm/kernel/dma-tbox.c *** Feature: clps7500 flash disk support Files: drivers/block/Config.in, Makefile, fld7500.c, ll_rw_blk.c Status: will-be-removed Notes: Missing entirely from RMK PhilB: I think we can safely regard that stuff as obsolete now. It should probably be deleted. *** Feature: SCC2691 serial port support CONFIG_SERIAL_2691_CONSOLE Files: drivers/char/Config.in, scc2691.c, tty_io.c Status: Notes: *** Feature: Oddball header file differences Files: drivers/char/joystick/gameport.c, lightnign.c, pcigame.c drivers/char/mem.c, drivers/char/misc.c, fs/fat/inode.c Status: Notes: NW tree has some diffs to RMK that are either rearrangement, or adding or removing some #include directives. Speculate these are to quiet build warnings. Should merge these. Issue: how to tell if they are needed or not? *** Feature: Making keyboard optional Files: drivers/char/pc_keyb.c include/linux/pc_keyb.h Status: Notes: NW driver allows bypassing of kbd self test on startup and some other changes (KBD_CCMD_WRITE_MODE) Note2: NW version forces scan-code conversion mode1 for ARM. Note3: Additional IOMD commands added in pc_keyb.h *** Feature: Shark RTC handling Files: drivers/char/rtc.c Status: Notes: rather messy special-cases for shark in here *** Feature: x86-ism in synclink.c Files: drivers/char/synclink.c Status: Notes: break_on_load in synclink_init() breaks on ARM, NW version wraps that section in #ifdef __i386__ *** Feature: footbridge watchdog timer Files: drivers/char/wdt285.c Status: suggest revert. Notes: RMK version intentionally wont initialize on netwinder Netwinder uses different watchdog normally, but I don't see why we should block use of the FB timer. *** Feature: ali 15x5 DMA support Files: drivers/ide/alim15x3.c Status: does-anyone-use-it? Notes: NW version assumes all drives have broken DMA, and disables DMA for them. Seems overly paranoid... PhilB: The actual issue here is that the driver doesn't work at all when DMA is enabled, or at least it didn't last time I tried. Ralph: IIRC the same driver was used on the crusoe netwinder. It definately did DMA just fine. Prossibly an arm cache-coherency problem. *** Feature: CMD640x driver Files: drivers/ide/cmd640.c, drivers/ide/ide-pci.c Status: Notes: NW tree has arm-specific probing code (pci method 3). Should be merged to rmk unless not used. Note2: Minor difference in setup_device_ptrs() routine, should be reviewed. Note3: Some discrepancy about calling of init routine PhilB: The setup_device_ptrs thing is needed for it to build at all. I don't remember why the IDE_IGNORE got removed or even what it does. The "method 3" pci thing is perhaps a bit of a hack but I think it's necessary. Methods 1 and 2 don't look like they will work on anything other than x86; method 3, although it does precisely the thing that this code was originally trying to avoid, stands rather more of a chance. *** Feature: 3c505 network driver Files: drivers/net/3c505.c Status: Notes: Timing difference writing adapter control register. NW does it inside a claim_dma_lock() region RMK does it outside (before) the locked region. PhilB: I think the NW tree is probably correct. This probably wants sending to Linus directly. *** Feature: Ash driver Files: driver/net/Config.in, ashpci64.c, Space.c include/linux/if_ether.h Status: Notes: Driver not present in RMK Note2: Needs frame type officially in if_ether.h (using 0x0012 now) PhilB: Same as the rest of the FutureTV stuff. *** Feature: Archimedes onboard 6854 (econet) driver Files: driver/net/Config.in, Space.c Status: Notes: *** Feature: de4x5.c driver Files: drivers/net/de4x5.c Status: Notes: NW version has two magic offsets of 8 bytes in the insert_device(). Apparently stores private data in struct net_device structure. *** Feature: hamradio sixpack driver Files: drivers/net/hamradio/6pack.c Status: Notes: NW tree has a commented out a struct size sanity check. RMK tree doesn't have the check at all. *** Feature: rtl8129 driver Files: drivers/net/rtl8129.c Status: Notes: Present in NW tree, but not in RMK. *** Feature: FTV PCI address space Files: drivers/pci/pci.c Status: Notes: FTV apparently has some PCI address space restrictions, base addresses are aligned on PCI_BASE_ADDRESS_SPACE *** Feature: PCI device initialization Files: drivers/pci/setup-bus.c Status: Notes: NW tree doesn't enable PCI devices automatically *** Feature: Chrontel 7003 video support Files: drivers/video/Config.in, Makefile Status: needs-further-investigation Notes: PhilB: I think the code for this is actually in acornfb.c. If that has gone missing, it won't do anything. The 7003 is a TV-output chip that was on the CLPS7500 evaluation board; it probably doesn't have any great relevance in the 21st century. Personally I would ditch it. *** Feature: Swapbits support in framebuffer Files: drivers/video/swabits*, Makefile, fbcon-mfb.c, fbcon Status: Notes: Apparently for systems with wrong byte order Used also to render FB logo PhilB: This is used on Acorn machines. *** Feature: cyber2000fb PLL calculation Files: drivers/video/cyber2000fb.c Status: will-be-removed Notes: RMK seems to have the most recent version. PhilB: That was one of Woody's. I never really knew what the difference between the two PLL algorithms was supposed to be, but it does seem a bit silly to have two of them. The one in the King tree works well enough, so far as I can tell, so I guess we could just quietly drop the other. Ralph: Agreed. *** Feature: TBOX framebuffer Files: drivers/video/tboxfb.c Status: Notes: Missing from RMK PhilB: FutureTV again. *** Feature: CONFIG_SMALL_BUFFERS in ext2 Files: fs/ext2/super.c Status: Notes: Not present in RMK. Reduce size of error_buf from 1024 to 256 if defined. *** Feature: atomic_add/sub Files: include/asm-arm/atomic.h Status: Notes: NW version can do multiple incremnt/decrement in one go. Not sure if this actually gets used. Backwards compatible. *** Feature: const declaration of checksum routines Files: include/asm-arm/checksum.h Status: Notes: NW version marks several routines returning const unsigned int, RMK missign the const. Not sure what the effect is. Note2: Implementation of csum_tcpudp_magic() differs, *** Feature: ELF stuff Files: include/asm-arm/elf.h include/asm/proc-armo/elf.h include/asm-arm/proc/armv.h Status: Notes: RMK has more thorough elf_check_arch(). NW defines elf_fpregset_t better. Comments about "arm2" etc differ between NW and RMK. Note2: RMK checks for 26bit ELF in 26bit mode. Note3: RMK has iBCS workaround for older netwinder binaries. *** Feature: FIQ handling Files: include/asm-arm/fiq.h Status: Notes: NW version seems to have a "downgrade" option PhilB: Yeah, it goes with some changes in include/arch-arc/irq.h or somewhere like that. The general idea is to allow FIQ users that want to use the downgrade bit to do so, without increasing the latency that other users see. In more concrete terms, it's a somewhat special purpose hack to allow Econet to co-exist with the floppy pseudo-DMA driver on an A5000. This would be a pre-requisite for merging any of the stuff in ec6854.c and its friends. *** Feature: save_flags_clif() Files: include/asm-arm/proc-armo/system.h Status: Notes: this macro only present in NW. Same as save_flags_cli but disables FIQ as well. *** Feature: Block device Flash disk Files: include/linux/blk.h include/linux/major.h Status: Notes: NW has flash disk block device with major FLD_MAJOR (92) missing from RMK PhilB: Part of the CLPS7500 flash stuff. Take it out. *** Feature: Extended profiling CONFIG_EXTENDED_PROFILING Files: init/main.c, include/linux/proc_fs.h, include/linux/profile.h Status: Notes: Adds proc entries, new header file in linux/ *** THE END.