From: kaz K. <kk...@rr...> - 2003-05-06 07:20:09
|
Hi, I'm working on 2.5.6x SH-4 kernel for NPTL. Now I can get an userland on 2.5.69 kernel based on sourceforge CVS HEAD. It seems that merging restructure version to the head is going on yet but it would be not so bad to check my local patch with many eyes :-) Anyway, it works on 7750 Solution Engine and I can run NPTL tests of the latest GNU libc and nptl-0.37. I add the kernel support for TLS and many i386 changes as local patches. Niibe-san's gUSA support is deadly needed for the new NPTL implementation for SH. Changes in tlb.h were suggested by Sugioka-san to solve very weird cache alias problem. I've tested it only for 7750 Solution Engine with nfs root. The different local version of 2.5.66 was more widely tested by Saito-san <ksaito at interface dot co dot jp> with his company's board and he reported that modules, IDE, PCI and USB devices are basically ok. The change of pci.h is given by him. The attached list is the ChangeLog of this local patch. The patch itself is slightly big to attach here as a plain text, so I put it at: <URL:http://dodo.nurs.or.jp/~kkojima/linux-sh4/patch-sf-20030506.diff.bz2>. Regards, kaz -- * Makefile (CFLAGS): Use -O1 to avoid miss compiling by gcc-3.2. (core-y): Add usr/. * arch/sh/Makefile (LDFLAGS_BLOB): Define. * arch/sh/kernel/cpu/rtc.c (sh_rtc_gettimeofday): Don't make overflow. * arch/sh/kernel/entry.S: Add gUSA support. Call syscall_tail only when returning from fork. Add new syscalls. * arch/sh/kernel/io_7751se.c: Fix typo. * arch/sh/kernel/io_se.c (delay): Wait more. * arch/sh/kernel/irq.c: Follow i386 changes. * arch/sh/kernel/module.c: Rewriting. * arch/sh/kernel/process.c (kernel_thread_helper): New. (kernel_thread): Use kernel_thread_helper. Return error value also. (dump_task_regs, dump_task_fpu): New. (copy_thread): Handle CLONE_SETTLS flag and initialize child tids. (__switch_to): Return PREV pointer. (sys_clone): Handle tid pointers. * arch/sh/kernel/ptrace.c: Cleanup and follow i386 changes. * arch/sh/kernel/signal.c (handle_signal): Add gUSA support. (do_signal): Handle ERESTART_RESTARTBLOCK case. * arch/sh/kernel/sys_sh.c (sys_ipc): Use sys_semtimedop and handle SEMTIMEDOP. * arch/sh/kernel/time.c (TICK_SIZE): Use tick_nsec. (do_gettimeoffset): Lock critical region. (do_gettimeofday): Follow i386 changes. (time_init): Override tick_nsec here. * arch/sh/lib/Makefile (obj-y): Add div64.o. * arch/sh/lib/div64.S: New file. * arch/sh/mm/cache-sh2.c (detect_cpu_and_cache_system): Use SH_CACHE_* instead of CACHE_* because CACHE_VALID collides with the one in NFS header file. * arch/sh/mm/cache-sh3.c (detect_cpu_and_cache_system): Likewise. (__flush_wback_region): Likewise. (__flush_purge_region): Likewise. * arch/sh/mm/cache-sh4.c (flush_cache_4096): Likewise. * arch/sh/mm/init.c (sh_cache_init): Likewise. * arch/sh/mm/extable.c (fixup_exception): New. * arch/sh/mm/tlb-sh4.c (update_mmu_cache): Set write through bit of PTEL if CONFIG_SH_WRITETHROUGH defined. * drivers/net/stnic.c (ei_interrupet): Change return type. * include/asm-sh/byteorder.h (___arch__swab64): New. (__arch__swab64): Define. * include/asm-sh/cache.h: Rename CACHE_* to SH_CACHE_*. * include/asm-sh/delay.h (ndelay): Define. * include/asm-sh/div64.h (do_div): Implement a real 64/32-bit division. * include/asm-sh/elf.h: Follow i386 change. * include/asm-sh/hardirq.h: Likewise. * include/asm-sh/ide.h: Include generic definitions. * include/asm-sh/ipc.h (SEMTIMEDOP): Define. * include/asm-sh/module.h (MODULE_PROC_FAMILY): Define. * include/asm-sh/param.h: Follow i386 changes. * include/asm-sh/pci.h (pci_map_sg): Fix dma_address in loop. (pci_dma_sync_sg): Likewise. * include/asm-sh/pgtable.h: Change _PAGE_FILE to 0x80 and drop this bit from _PAGE_FLAGS_HARDWARE_MASK. * include/asm-sh/processor.h: Follow i386 changes. * include/asm-sh/ptrace.h: Remove PTRACE_OLDSETOPTIONS and define PTRACE_O_TRACESYSGOOD. * include/asm-sh/rwsem.h: Cut© from i386. * include/asm-sh/semaphore.h: Follow i386 changes. * include/asm-sh/thread_info.h: Follow i386 changes. (struct thread_info): Make CPU and PREEMPT_COUNT 32-bit. * include/asm-sh/tlb.h (tlb_start_vma): Call flush_cache_range. (tlb_end_vma): Call flush_tlb_range. * include/asm-sh/types.h: Follow i386 changes. * include/asm-sh/uaccess.h: Remove fixup_exception. * include/asm-sh/unistd.h: Define new system call numbers. * include/linux/elf.h: Define SH relocation types. * include/linux/mm.h (put_page): Revert sf local change. ??? * include/linux/page-flags.h: Revert sf local change. ??? * /kernel/timer.c (tick_sec): Don't use static initializer. (tick_nsec): Likewise. (init_timers): Initialize tick_sec and tick_nsec here. |