You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(82) |
Jun
(72) |
Jul
(39) |
Aug
(104) |
Sep
(61) |
Oct
(55) |
Nov
(101) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(52) |
Feb
(67) |
Mar
(18) |
Apr
(16) |
May
(33) |
Jun
(12) |
Jul
(102) |
Aug
(168) |
Sep
(65) |
Oct
(60) |
Nov
(43) |
Dec
(121) |
2002 |
Jan
(69) |
Feb
(32) |
Mar
(90) |
Apr
(59) |
May
(45) |
Jun
(43) |
Jul
(33) |
Aug
(21) |
Sep
(11) |
Oct
(20) |
Nov
(26) |
Dec
(3) |
2003 |
Jan
(12) |
Feb
(18) |
Mar
(11) |
Apr
(11) |
May
(41) |
Jun
(76) |
Jul
(77) |
Aug
(15) |
Sep
(38) |
Oct
(56) |
Nov
(19) |
Dec
(39) |
2004 |
Jan
(17) |
Feb
(52) |
Mar
(36) |
Apr
(34) |
May
(48) |
Jun
(85) |
Jul
(38) |
Aug
(42) |
Sep
(41) |
Oct
(77) |
Nov
(27) |
Dec
(19) |
2005 |
Jan
(32) |
Feb
(35) |
Mar
(29) |
Apr
(8) |
May
(7) |
Jun
(31) |
Jul
(46) |
Aug
(93) |
Sep
(65) |
Oct
(85) |
Nov
(219) |
Dec
(47) |
2006 |
Jan
(170) |
Feb
(103) |
Mar
(49) |
Apr
(43) |
May
(45) |
Jun
(29) |
Jul
(77) |
Aug
(82) |
Sep
(43) |
Oct
(45) |
Nov
(26) |
Dec
(85) |
2007 |
Jan
(42) |
Feb
(48) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(53) |
Jul
(175) |
Aug
(212) |
Sep
(91) |
Oct
(103) |
Nov
(110) |
Dec
(5) |
2008 |
Jan
(20) |
Feb
(11) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(3) |
Oct
(12) |
Nov
|
Dec
|
From: Fabio G. <fg...@ti...> - 2002-04-12 16:13:08
|
If you know explane to me. Thanks. |
From: Robert L. <rm...@te...> - 2002-04-12 03:26:06
|
On Thu, 2002-04-11 at 23:17, Robert Love wrote: > Hrm, did I put this in arch-dependent headers? Eh, I did ... Er, disregard that. Pulling sched.h into entry.S is probably not a good idea ... include/asm/thread_info.h it is, then. sorry, Robert Love |
From: Robert L. <rm...@te...> - 2002-04-12 03:17:38
|
On Thu, 2002-04-11 at 22:38, NIIBE Yutaka wrote: > * include/asm-sh/thread_info.h (PREEMPT_ACTIVE): Defined. Hrm, did I put this in arch-dependent headers? Eh, I did ... This should go in include/linux/sched.h ... I will send Linus a patch to remove it from include/asm and put it there. It is arch-independent. Robert Love |
From: SUGIOKA T. <su...@it...> - 2002-04-12 03:03:31
|
"__clear_user" seems broken. Hear is a patch. I will commit soon if no objection. --- arch/sh/mm/clear_page.S~ Thu Apr 11 17:45:31 2002 +++ arch/sh/mm/clear_page.S Fri Apr 12 11:34:22 2002 @@ -58,17 +58,19 @@ mov #0, r0 mov #0xe0, r1 ! 0xffffffe0 ! - ! r4..r4&~32 -------- not aligned [ Area 0 ] - ! r4&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] - ! (r4+r5)&~32..r4+r5 -------- not aligned [ Area 2 ] + ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ] + ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] + ! (r4+r5)&~32..r4+r5 -------- not aligned [ Area 2 ] ! ! Clear area 0 mov r4, r2 + add #31, r2 and r1, r2 cmp/eq r4, r2 - bt/s area1 - mov r4, r3 - sub r2, r3 + bt area1 + mov r2, r3 + sub r4, r3 + mov r3, r7 mov r4, r2 ! l0: dt r3 @@ -76,12 +78,16 @@ bf/s l0 add #1, r2 ! + sub r7, r5 + mov r2, r4 +area1: mov r4, r3 add r5, r3 and r1, r3 + cmp/hi r2, r3 + bf area2 ! ! Clear area 1 -area1: #if defined(__SH4__) 1: movca.l r0, @r2 #else @@ -107,22 +113,24 @@ nop ! ! Clear area 2 - add r5, r4 - cmp/eq r4, r2 +area2: + mov r4, r3 + add r5, r3 + cmp/hs r2, r3 bt/s done - sub r2, r4 -l2: dt r4 + sub r2, r3 +l2: dt r3 9: mov.b r0, @r2 bf/s l2 add #1, r2 ! done: rts - nop ! return 0 as normal return + mov #0, r0 ! return 0 as normal return ! return the number of bytes remained bad_clear_user: mov r4, r0 - mov r5, r0 + add r5, r0 rts sub r2, r0 ---- SUGIOKA Toshinobu |
From: NIIBE Y. <gn...@m1...> - 2002-04-12 03:01:54
|
I'll send following patch set to Linus to sync. I'll send only SuperH specific change, leaving drivers changes in our repository. -------------------------- Here's the SuperH update. All changes are SuperH specific. (i.e., under arch/sh/ or include/asm-sh/) Follow up: Introduce thread_info. Implemented (mostly copied from i386 implementation.) Scheduler: sched_find_first_bit, switch_to Macros: SI_DETHREAD, PROT_SEM, VM_DATA_DEFAULT_FLAGS, and PCI_DMA_BUS_IS_PHYS Page handling: pmd_*, pte_* functions/macros change Cache handling function: flush_icache_user_range New system calles: gettid, .., futex, sched_{set,get}affinity, New arch specific headers: cacheflush.h, tlbflush.h Bug fixes: Paul Mundt: arch/sh/kernel/io_7751se.c: Typo fix. Niibe Yutaka: Init task fpu initialization. Signal return. Improvement: Paul Mundt, Niibe Yutaka: arch/sh/mm/cache-sh4.c flush_cache_range implemented (was: flush_cache_all). Paul Mundt: arch/sh/kernel/traps.c show_trace_task implemented. Others: Niibe Yutaka: FPU cleanup Implement kernel profile function (sh_do_profile). diff -ruN3p linux-2.5.8-pre3/arch/sh/Config.help linux/arch/sh/Config.help --- linux-2.5.8-pre3/arch/sh/Config.help Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/Config.help Fri Mar 22 13:49:37 2002 @@ -754,6 +754,13 @@ CONFIG_SH_DREAMCAST <http://www.m17n.org/linux-sh/dreamcast/>. There is a Dreamcast project is at <http://linuxdc.sourceforge.net/>. +CONFIG_SH_SH2000 + SH-2000 is a single-board computer based around SH7709A chip + intended for embedded applications. + It has an Ethernet interface (CS8900A), direct connected + Compact Flash socket, three serial ports and PC-104 bus. + More information at <http://sh2000.sh-linux.org>. + CONFIG_SH_UNKNOWN "Bare CPU" aka "unknown" means an SH-based system which is not one of the specific ones mentioned above, which means you need to enter @@ -790,6 +797,12 @@ CONFIG_CPU_SUBTYPE_SH7709 CONFIG_CPU_SUBTYPE_SH7750 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. + +CONFIG_CPU_SUBTYPE_SH7751 + Select SH7750 if you have a 166 Mhz SH-4 HD6417751 CPU. + +CONFIG_CPU_SUBTYPE_ST40STB1 + Select ST40STB1 if you have a ST40STB1 CPU. CONFIG_MEMORY_START Computers built with Hitachi SuperH processors always diff -ruN3p linux-2.5.8-pre3/arch/sh/config.in linux/arch/sh/config.in --- linux-2.5.8-pre3/arch/sh/config.in Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/config.in Fri Mar 22 13:49:37 2002 @@ -258,7 +258,7 @@ fi endmenu # -# input before char - char/joystick depends on it. As does USB. +# input - input/joystick depends on it. As does USB. # source drivers/input/Config.in @@ -307,7 +307,7 @@ if [ "$CONFIG_SH_DREAMCAST" = "y" -a "$C endmenu fi -source drivers/char/joystick/Config.in +source drivers/input/joystick/Config.in if [ "$CONFIG_PARPORT" != "n" ]; then dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/entry.S linux/arch/sh/kernel/entry.S --- linux-2.5.8-pre3/arch/sh/kernel/entry.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/entry.S Wed Apr 10 20:54:45 2002 @@ -1,8 +1,8 @@ -/* $Id: entry.S,v 1.71 2001/07/27 11:47:50 gniibe Exp $ +/* $Id: entry.S,v 1.72 2002/03/29 00:02:04 gniibe Exp $ * * linux/arch/sh/entry.S * - * Copyright (C) 1999, 2000 Niibe Yutaka + * Copyright (C) 1999, 2000, 2002 Niibe Yutaka * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -13,13 +13,11 @@ #include <linux/sys.h> #include <linux/linkage.h> #include <linux/config.h> +#include <asm/thread_info.h> - -/* - * Define this to turn on compatibility with the previous - * system call ABI. This feature is not properly maintained. - */ -#undef COMPAT_OLD_SYSCALL_ABI +#if !defined(CONFIG_NFSD) && !defined(CONFIG_NFSD_MODULE) +#define sys_nfsservctl sys_ni_syscall +#endif ! NOTE: ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address @@ -57,16 +55,6 @@ * */ -/* - * These are offsets into the task-struct. - */ -flags = 4 -#error sigpending = 8 -#error need_resched = 20 -#error tsk_ptrace = 24 - -#error PT_TRACESYS = 0x00000002 - ENOSYS = 38 EINVAL = 22 @@ -87,17 +75,17 @@ MMU_TEA = 0xff00000c ! TLB Exception Ad #endif /* Offsets to the stack */ -OFF_R0 = 0 /* Return value. New ABI also arg4 */ -OFF_R1 = 4 /* New ABI: arg5 */ -OFF_R2 = 8 /* New ABI: arg6 */ -OFF_R3 = 12 /* New ABI: syscall_nr */ -OFF_R4 = 16 /* New ABI: arg0 */ -OFF_R5 = 20 /* New ABI: arg1 */ -OFF_R6 = 24 /* New ABI: arg2 */ -OFF_R7 = 28 /* New ABI: arg3 */ -OFF_SP = (15*4) -OFF_SR = (16*4+8) -SYSCALL_NR = (16*4+6*4) +OFF_R0 = 0 /* Return value. New ABI also arg4 */ +OFF_R1 = 4 /* New ABI: arg5 */ +OFF_R2 = 8 /* New ABI: arg6 */ +OFF_R3 = 12 /* New ABI: syscall_nr */ +OFF_R4 = 16 /* New ABI: arg0 */ +OFF_R5 = 20 /* New ABI: arg1 */ +OFF_R6 = 24 /* New ABI: arg2 */ +OFF_R7 = 28 /* New ABI: arg3 */ +OFF_SP = (15*4) +OFF_SR = (16*4+8) +OFF_TRA = (16*4+6*4) #define k0 r0 @@ -106,11 +94,10 @@ SYSCALL_NR = (16*4+6*4) #define k3 r3 #define k4 r4 -#define current r7 /* r7_bank1 */ +#define k_ex_code r2_bank /* r2_bank1 */ #define g_imask r6 /* r6_bank1 */ -#define k_current r7_bank /* r7_bank1 */ #define k_g_imask r6_bank /* r6_bank1 */ -#define k_ex_code r2_bank /* r2_bank1 */ +#define current r7 /* r7_bank1 */ /* * Kernel mode register usage: @@ -121,7 +108,7 @@ SYSCALL_NR = (16*4+6*4) * k4 scratch * k5 reserved * k6 Global Interrupt Mask (0--15 << 4) - * k7 CURRENT (pointer to current task) + * k7 CURRENT_THREAD_INFO (pointer to current thread info) */ ! @@ -142,7 +129,7 @@ SYSCALL_NR = (16*4+6*4) mov.l __INV_IMASK, r11; \ stc sr, r10; \ and r11, r10; \ - stc k_g_imask, r11; \ + stc k_g_imask, r11; \ or r11, r10; \ ldc r10, sr @@ -208,6 +195,7 @@ address_error_store: bra call_dae mov #1,r5 ! writeaccess = 1 + .align 2 call_dae: mov.l 1f, r0 mov.l @r0, r6 ! address @@ -269,56 +257,125 @@ debug_trap: shll r0 ! kernel space? bt/s debug_kernel #endif - mov.l @r15, r0 + mov.l @r15, r0 ! Restore R0 value mov.l 1f, r8 jmp @r8 nop .align 2 -1: .long SYMBOL_NAME(break_point_trap_software) - - .align 2 error: ! STI() - mov.l 1f, r0 + mov.l 2f, r0 jmp @r0 nop + +! + .align 2 +1: .long SYMBOL_NAME(break_point_trap_software) +2: .long SYMBOL_NAME(do_exception_error) + .align 2 -1: .long SYMBOL_NAME(do_exception_error) +ret_from_irq: +ret_from_exception: + mov #OFF_SR, r0 + mov.l @(r0,r15), r0 ! get status register + shll r0 + shll r0 ! kernel space? + bt/s restore_all ! Yes, it's from kernel, go back soon + GET_THREAD_INFO(r8) +ENTRY(resume_userspace) + ! r8: current_thread_info + /* CLI */ + stc sr, r0 + or #0xf0, r0 + ldc r0, sr + ! + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags + tst #_TIF_WORK_MASK, r0 + bt/s restore_all + tst #_TIF_NEED_RESCHED, r0 -! -! -! -ENTRY(ret_from_fork) - mov.l @r15+,r0 - ! Call schedule_tail + .align 2 +work_pending: + ! r0: current_thread_info->flags + ! r8: current_thread_info + ! t: result of "tst #_TIF_NEED_RESCHED, r0" + bf/s work_resched + tst #_TIF_SIGPENDING, r0 +work_notifysig: + bt/s restore_all + mov r15, r4 + mov #0, r5 + mov.l 2f, r1 + mova restore_all, r0 + jmp @r1 + lds r0, pr +work_resched: mov.l 1f, r1 - jsr @r1 - mov r0, r4 - ! If we're being traced, return via syscall_ret_trace, otherwise - ! return directly to ret_from_syscall - stc k_current, r0 -#error mov.l @(tsk_ptrace,r0), r0 ! Is current PTRACE_SYSCALL'd? -#error mov #PT_TRACESYS, r1 - tst r1, r0 - bt ret_from_syscall - bra syscall_ret_trace - nop + jsr @r1 ! schedule + nop + /* CLI */ + stc sr, r0 + or #0xf0, r0 + ldc r0, sr + ! + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags + tst #_TIF_WORK_MASK, r0 + bt restore_all + bra work_pending + tst #_TIF_NEED_RESCHED, r0 .align 2 -1: .long SYMBOL_NAME(schedule_tail) +1: .long SYMBOL_NAME(schedule) +2: .long SYMBOL_NAME(do_signal) + + .align 2 +syscall_exit_work: + ! r0: current_thread_info->flags + ! r8: current_thread_info + tst #_TIF_SYSCALL_TRACE, r0 + bt/s work_pending + tst #_TIF_NEED_RESCHED, r0 + STI() + ! XXX setup arguments... + mov.l 4f, r0 ! do_syscall_trace + jsr @r0 + nop + bra resume_userspace + nop + + .align 2 +syscall_trace_entry: + ! Yes it is traced. + ! XXX setup arguments... + mov.l 4f, r11 ! Call do_syscall_trace which notifies + jsr @r11 ! superior (will chomp R[0-7]) + nop + ! Reload R0-R4 from kernel stack, where the + ! parent may have modified them using + ! ptrace(POKEUSR). (Note that R0-R2 are + ! used by the system call handler directly + ! from the kernel stack anyway, so don't need + ! to be reloaded here.) This allows the parent + ! to rewrite system calls and args on the fly. + mov.l @(OFF_R4,r15), r4 ! arg0 + mov.l @(OFF_R5,r15), r5 + mov.l @(OFF_R6,r15), r6 + mov.l @(OFF_R7,r15), r7 ! arg3 + mov.l @(OFF_R3,r15), r3 ! syscall_nr + ! Arrange for do_syscall_trace to be called + ! again as the system call returns. + mov.l 2f, r10 ! Number of syscalls + cmp/hs r10, r3 + bf syscall_call + mov #-ENOSYS, r0 + bra syscall_exit + mov.l r0, @(OFF_R0,r15) ! Return value /* - * Old syscall interface: - * - * Syscall #: R0 - * Arguments #0 to #3: R4--R7 - * more arguments: On the stack - * TRA: (number of arguments on the stack) x 4 - * - * New syscall interface: + * Syscall interface: * * Syscall #: R3 * Arguments #0 to #3: R4--R7 @@ -340,231 +397,58 @@ ENTRY(ret_from_fork) * argument. */ + .align 2 system_call: - mov.l __TRA, r9 - mov.l @r9, r8 + mov.l 1f, r9 + mov.l @r9, r8 ! Read from TRA (Trap Address) Register ! ! Is the trap argument >= 0x20? (TRA will be >= 0x80) - mov #0x20, r9 - extu.b r9, r9 - shll2 r9 - cmp/hs r9, r8 - bt debug_trap - ! - mov #SYSCALL_NR, r14 - add r15, r14 - ! -#ifdef COMPAT_OLD_SYSCALL_ABI - mov #0x40, r9 - cmp/hs r9, r8 - bf/s old_abi_system_call - nop -#endif - ! New Syscall ABI - add #-0x40, r8 - shlr2 r8 - shll8 r8 - shll8 r8 ! r8 = num_args<<16 - mov r3, r10 - or r8, r10 ! Encode syscall # and # of arguments - mov.l r10, @r14 ! set syscall_nr - STI() + mov #0x7f, r9 + cmp/hi r9, r8 + bt/s debug_trap + mov #OFF_TRA, r9 + add r15, r9 ! - stc k_current, r11 -#error mov.l @(tsk_ptrace,r11), r10 ! Is current PTRACE_SYSCALL'd? -#error mov #PT_TRACESYS, r11 - tst r11, r10 - bt 5f - ! Yes it is traced. - mov.l __syscall_trace, r11 ! Call syscall_trace() which notifies - jsr @r11 ! superior (will chomp R[0-7]) - nop - ! Reload R0-R4 from kernel stack, where the - ! parent may have modified them using - ! ptrace(POKEUSR). (Note that R0-R2 are - ! used by the system call handler directly - ! from the kernel stack anyway, so don't need - ! to be reloaded here.) This allows the parent - ! to rewrite system calls and args on the fly. - mov.l @(OFF_R4,r15), r4 ! arg0 - mov.l @(OFF_R5,r15), r5 - mov.l @(OFF_R6,r15), r6 - mov.l @(OFF_R7,r15), r7 ! arg3 - mov.l @(OFF_R3,r15), r3 ! syscall_nr - ! Arrange for syscall_trace() to be called - ! again as the system call returns. - mov.l __syscall_ret_trace, r10 - bra 6f - lds r10, pr - ! No it isn't traced. - ! Arrange for normal system call return. -5: mov.l __syscall_ret, r10 - lds r10, pr - ! Call the system call handler through the table. - ! (both normal and ptrace'd) - ! First check for bad syscall number -6: mov r3, r9 - mov.l __n_sys, r10 - cmp/hs r10, r9 - bf 2f - ! Bad syscall number - rts ! go to syscall_ret or syscall_ret_trace - mov #-ENOSYS, r0 - ! Good syscall number -2: shll2 r9 ! x4 - mov.l __sct, r11 - add r11, r9 - mov.l @r9, r11 - jmp @r11 ! jump to specific syscall handler - nop - - ! In case of trace -syscall_ret_trace: - mov.l r0, @(OFF_R0,r15) ! save the return value - mov.l __syscall_trace, r1 - mova SYMBOL_NAME(ret_from_syscall), r0 - jmp @r1 ! Call syscall_trace() which notifies superior - lds r0, pr ! Then return to ret_from_syscall() - - - -#ifdef COMPAT_OLD_SYSCALL_ABI -! Handle old ABI system call. -! Note that ptrace(SYSCALL) is not supported for the old ABI. -! At this point: -! r0, r4-7 as per ABI -! r8 = value of TRA register (= num_args<<2) -! r14 = points to SYSCALL_NR in stack frame -old_abi_system_call: - mov r0, r9 ! Save system call number in r9 - ! ! arrange for return which pops stack - mov.l __old_abi_syscall_ret, r10 - lds r10, pr - ! Build the stack frame if TRA > 0 - mov r8, r10 - cmp/pl r10 - bf 0f - mov.l @(OFF_SP,r15), r0 ! get original user stack -7: add #-4, r10 -4: mov.l @(r0,r10), r1 ! May cause address error exception.. - mov.l r1, @-r15 - cmp/pl r10 - bt 7b -0: - mov.l r9, @r14 ! set syscall_nr + mov.l r8, @r9 ! set TRA value to tra STI() ! Call the system call handler through the table. ! First check for bad syscall number - mov.l __n_sys, r10 - cmp/hs r10, r9 - bf 2f - ! Bad syscall number - rts ! return to old_abi_syscall_ret - mov #-ENOSYS, r0 - ! Good syscall number -2: shll2 r9 ! x4 - mov.l __sct, r11 - add r11, r9 - mov.l @r9, r11 - jmp @r11 ! call specific syscall handler, - nop - - .align 2 -__old_abi_syscall_ret: - .long old_abi_syscall_ret - - ! This code gets called on address error exception when copying - ! syscall arguments from user stack to kernel stack. It is - ! supposed to return -EINVAL through old_abi_syscall_ret, but it - ! appears to have been broken for a long time in that the r0 - ! return value will be saved into the kernel stack relative to r15 - ! but the value of r15 is not correct partway through the loop. - ! So the user prog is returned its old r0 value, not -EINVAL. - ! Greg Banks 28 Aug 2000. - .section .fixup,"ax" -fixup_syscall_argerr: - ! First get r15 back to - rts - mov #-EINVAL, r0 - .previous - - .section __ex_table, "a" - .align 2 - .long 4b,fixup_syscall_argerr - .previous -#endif - - .align 2 -__TRA: .long TRA -__syscall_trace: -#error .long SYMBOL_NAME(syscall_trace) -__n_sys:.long NR_syscalls -__sct: .long SYMBOL_NAME(sys_call_table) -__syscall_ret_trace: - .long syscall_ret_trace -__syscall_ret: - .long syscall_ret -__INV_IMASK: - .long 0xffffff0f ! ~(IMASK) - - - .align 2 -reschedule: - mova SYMBOL_NAME(ret_from_syscall), r0 - mov.l 1f, r1 - jmp @r1 - lds r0, pr - .align 2 -1: .long SYMBOL_NAME(schedule) - -ret_from_irq: -ret_from_exception: - mov #OFF_SR, r0 - mov.l @(r0,r15), r0 ! get status register - shll r0 - shll r0 ! kernel space? - bt restore_all ! Yes, it's from kernel, go back soon - ! - bra ret_from_syscall + mov r3, r9 + mov.l 2f, r8 ! Number of syscalls + cmp/hs r8, r9 + bf/s good_system_call + GET_THREAD_INFO(r8) +syscall_badsys: ! Bad syscall number + mov #-ENOSYS, r0 + bra resume_userspace + mov.l r0, @(OFF_R0,r15) ! Return value + ! +good_system_call: ! Good syscall number + mov.l @(TI_FLAGS,r8), r8 + mov #_TIF_SYSCALL_TRACE, r10 + tst r10, r8 + bf syscall_trace_entry + ! +syscall_call: + shll2 r9 ! x4 + mov.l 3f, r8 ! Load the address of sys_call_table + add r8, r9 + mov.l @r9, r8 + jsr @r8 ! jump to specific syscall handler nop - - .align 2 -#ifdef COMPAT_OLD_SYSCALL_ABI -old_abi_syscall_ret: - add r8, r15 ! pop off the arguments - /* fall through */ -#endif -syscall_ret: - mov.l r0, @(OFF_R0,r15) ! save the return value - /* fall through */ - -ENTRY(ret_from_syscall) + mov.l r0, @(OFF_R0,r15) ! save the return value + .globl ret_from_fork +ret_from_fork: +syscall_exit: /* CLI */ stc sr, r0 or #0xf0, r0 ldc r0, sr ! - stc k_current, r1 -#error mov.l @(need_resched,r1), r0 - tst r0, r0 - bf reschedule -#error mov.l @(sigpending,r1), r0 - tst r0, r0 - bt restore_all -signal_return: - mov r15, r4 - mov #0, r5 - mov.l __do_signal, r1 - mova restore_all, r0 - jmp @r1 - lds r0, pr - .align 2 -__do_signal: -#error .long SYMBOL_NAME(do_signal) -__irq_stat: - .long SYMBOL_NAME(irq_stat) - - .align 2 + GET_THREAD_INFO(r8) + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags + tst #_TIF_ALLWORK_MASK, r0 + bf syscall_exit_work restore_all: mov.l @r15+, r0 mov.l @r15+, r1 @@ -576,8 +460,8 @@ restore_all: mov.l @r15+, r7 ! stc sr, r8 - mov.l __blrb_flags, r9 ! BL =1, RB=1 - or r9, r8 + mov.l 7f, r9 + or r9, r8 ! BL =1, RB=1 ldc r8, sr ! here, change the register bank ! mov.l @r15+, r8 @@ -598,10 +482,10 @@ restore_all: ! ! Calculate new SR value mov k3, k2 ! original SR value - mov.l 1f, k1 + mov.l 8f, k1 stc sr, k0 and k1, k0 ! Get current FD-bit - mov.l 2f, k1 + mov.l 9f, k1 and k1, k2 ! Mask orignal SR value or k0, k2 ! Inherit current FD-bit ! @@ -609,11 +493,11 @@ restore_all: shlr2 k0 and #0x3c, k0 cmp/eq #0x3c, k0 - bt/s 7f + bt/s 6f shll2 k0 mov g_imask, k0 ! -7: or k0, k2 ! Set the IMASK-bits +6: or k0, k2 ! Set the IMASK-bits ldc k2, ssr ! mov k4, r15 @@ -621,10 +505,15 @@ restore_all: nop .align 2 -__blrb_flags: .long 0x30000000 -1: .long 0x00008000 ! FD -2: .long 0xffff7f0f ! ~(IMASK+FD) -3: .long 0x00080000 ! SZ=0, PR=1 +1: .long TRA +2: .long NR_syscalls +3: .long SYMBOL_NAME(sys_call_table) +4: .long SYMBOL_NAME(do_syscall_trace) +7: .long 0x30000000 +8: .long 0x00008000 ! FD +9: .long 0xffff7f0f ! ~(IMASK+FD) +__INV_IMASK: + .long 0xffffff0f ! ~(IMASK) ! Exception Vector Base ! @@ -641,8 +530,8 @@ general_exception: bra handle_exception mov.l @k2, k2 .align 2 -2: .long ret_from_exception 1: .long EXPEVT +2: .long ret_from_exception ! ! .balign 1024,0,1024 @@ -667,6 +556,7 @@ interrupt: ! ! + .align 2 handle_exception: ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), ! save all registers onto stack. @@ -674,18 +564,18 @@ handle_exception: stc ssr, k0 ! Is it from kernel space? shll k0 ! Check MD bit (bit30) by shifting it into... shll k0 ! ...the T bit - bt/s 9f ! It's a kernel to kernel transition. + bt/s 1f ! It's a kernel to kernel transition. mov r15, k0 ! save original stack to k0 /* User space to kernel */ mov #0x20, k1 - shll8 k1 ! k1 <= 8192 == THREAD_SIZE + shll8 k1 ! k1 := 8192 (== THREAD_SIZE) add current, k1 mov k1, r15 ! change to kernel stack ! -9: mov #-1, k4 - mov.l 3f, k1 +1: mov #-1, k4 + mov.l 2f, k1 ! Save the user registers on the stack. - mov.l k4, @-r15 ! syscall_nr (default: -1) + mov.l k4, @-r15 ! set TRA (default: -1) ! sts.l macl, @-r15 sts.l mach, @-r15 @@ -707,7 +597,7 @@ handle_exception: ! stc sr, r8 ! Back to normal register bank, and or k1, r8 ! Block all interrupts - mov.l 5f, k1 + mov.l 3f, k1 and k1, r8 ! ... ldc r8, sr ! ...changed here. ! @@ -723,17 +613,18 @@ handle_exception: stc k_ex_code, r8 shlr2 r8 shlr r8 - mov.l 1f, r9 + mov.l 4f, r9 add r8, r9 mov.l @r9, r9 jmp @r9 nop + .align 2 -1: .long SYMBOL_NAME(exception_handling_table) -3: .long 0x000000f0 ! FD=0, IMASK=15 -5: .long 0xcfffffff ! RB=0, BL=0 -6: .long 0x00080000 ! SZ=0, PR=1 +2: .long 0x000000f0 ! FD=0, IMASK=15 +3: .long 0xcfffffff ! RB=0, BL=0 +4: .long SYMBOL_NAME(exception_handling_table) + .align 2 none: rts nop @@ -1195,16 +1086,29 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_madvise) .long SYMBOL_NAME(sys_getdents64) /* 220 */ .long SYMBOL_NAME(sys_fcntl64) + .long SYMBOL_NAME(sys_ni_syscall) /* reserved for TUX */ + .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */ .long SYMBOL_NAME(sys_gettid) + .long SYMBOL_NAME(sys_readahead) /* 225 */ + .long SYMBOL_NAME(sys_setxattr) + .long SYMBOL_NAME(sys_lsetxattr) + .long SYMBOL_NAME(sys_fsetxattr) + .long SYMBOL_NAME(sys_getxattr) + .long SYMBOL_NAME(sys_lgetxattr) /* 230 */ + .long SYMBOL_NAME(sys_fgetxattr) + .long SYMBOL_NAME(sys_listxattr) + .long SYMBOL_NAME(sys_llistxattr) + .long SYMBOL_NAME(sys_flistxattr) + .long SYMBOL_NAME(sys_removexattr) /* 235 */ + .long SYMBOL_NAME(sys_lremovexattr) + .long SYMBOL_NAME(sys_fremovexattr) .long SYMBOL_NAME(sys_tkill) + .long SYMBOL_NAME(sys_sendfile64) + .long SYMBOL_NAME(sys_futex) /* 240 */ + .long SYMBOL_NAME(sys_sched_setaffinity) + .long SYMBOL_NAME(sys_sched_getaffinity) - /* - * NOTE!! This doesn't have to be exact - we just have - * to make sure we have _enough_ of the "sys_ni_syscall" - * entries. Don't panic if you notice that this hasn't - * been shrunk every time we add a new system call. - */ - .rept NR_syscalls-221 + .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) .endr diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/fpu.c linux/arch/sh/kernel/fpu.c --- linux-2.5.8-pre3/arch/sh/kernel/fpu.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/fpu.c Fri Mar 22 21:35:26 2002 @@ -67,7 +67,7 @@ save_fpu(struct task_struct *tsk) "r" (FPSCR_INIT) : "memory"); - tsk->flags &= ~PF_USEDFPU; + clear_tsk_thread_flag(tsk, TIF_USEDFPU); release_fpu(); } @@ -260,7 +260,7 @@ ieee_fpe_handler (struct pt_regs *regs) ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); grab_fpu(); restore_fpu(tsk); - tsk->flags |= PF_USEDFPU; + set_tsk_thread_flag(tsk, TIF_USEDFPU); } else { tsk->thread.trap_no = 11; tsk->thread.error_code = 0; @@ -310,5 +310,5 @@ do_fpu_state_restore(unsigned long r4, u fpu_init(); tsk->used_math = 1; } - tsk->flags |= PF_USEDFPU; + set_tsk_thread_flag(tsk, TIF_USEDFPU); } diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/head.S linux/arch/sh/kernel/head.S --- linux-2.5.8-pre3/arch/sh/kernel/head.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/head.S Fri Mar 22 21:57:10 2002 @@ -48,7 +48,7 @@ ENTRY(_stext) mov #0x20, r1 ! shll8 r1 ! r1 = 8192 sub r1, r0 ! - ldc r0, r7_bank ! ... and init_task + ldc r0, r7_bank ! ... and initial thread_info ! ! Enable cache mov.l 6f, r0 diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/init_task.c linux/arch/sh/kernel/init_task.c --- linux-2.5.8-pre3/arch/sh/kernel/init_task.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/init_task.c Tue Feb 26 19:08:42 2002 @@ -12,12 +12,19 @@ static struct signal_struct init_signals struct mm_struct init_mm = INIT_MM(init_mm); /* - * Initial task structure. + * Initial thread structure. * * We need to make sure that this is 8192-byte aligned due to the * way process stacks are handled. This is done by having a special * "init_task" linker map entry.. */ -union task_union init_task_union +union thread_union init_thread_union __attribute__((__section__(".data.init_task"))) = - { INIT_TASK(init_task_union.task) }; + { INIT_THREAD_INFO(init_task) }; + +/* + * Initial task structure. + * + * All other task structs will be allocated on slabs in fork.c + */ +struct task_struct init_task = INIT_TASK(init_task); diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/io_7751se.c linux/arch/sh/kernel/io_7751se.c --- linux-2.5.8-pre3/arch/sh/kernel/io_7751se.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/io_7751se.c Mon Jan 21 08:48:19 2002 @@ -97,7 +97,7 @@ shifted_port(unsigned long port) #define CHECK_SH7751_PCIIO(port) \ ((port >= PCIBIOS_MIN_IO) && (port < (PCIBIOS_MIN_IO + SH7751_PCI_IO_SIZE))) #else -#define CHECK_SH_7751_PCIIO(port) (0) +#define CHECK_SH7751_PCIIO(port) (0) #endif /* diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/io_se.c linux/arch/sh/kernel/io_se.c --- linux-2.5.8-pre3/arch/sh/kernel/io_se.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/io_se.c Tue Feb 26 18:15:15 2002 @@ -22,6 +22,7 @@ int sh_pcic_io_dummy; static inline void delay(void) { + ctrl_inw(0xa0000000); ctrl_inw(0xa0000000); } diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/pci-dma.c linux/arch/sh/kernel/pci-dma.c --- linux-2.5.8-pre3/arch/sh/kernel/pci-dma.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/pci-dma.c Tue Feb 26 19:10:20 2002 @@ -26,7 +26,7 @@ void *pci_alloc_consistent(struct pci_de if (ret != NULL) { /* Is it neccessary to do the memset? */ memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); + *dma_handle = virt_to_phys(ret); } /* We must flush the cache before we pass it on to the device */ dma_cache_wback_inv(ret, size); diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/process.c linux/arch/sh/kernel/process.c --- linux-2.5.8-pre3/arch/sh/kernel/process.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/process.c Wed Apr 10 20:51:54 2002 @@ -15,6 +15,7 @@ #include <linux/mm.h> #include <linux/slab.h> #include <linux/a.out.h> +#include <linux/platform.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -35,16 +36,14 @@ void enable_hlt(void) hlt_counter--; } -/* - * The idle loop on a uniprocessor i386.. - */ -void cpu_idle(void *unused) +void default_idle(void) { /* endless idle loop with no priority at all */ while (1) { if (hlt_counter) { - if (need_resched()) - break; + while (1) + if (need_resched()) + break; } else { __cli(); while (!need_resched()) { @@ -55,10 +54,17 @@ void cpu_idle(void *unused) __sti(); } schedule(); - check_pgt_cache(); } } +/* + * The idle loop on a uniprocessor i386.. + */ +void cpu_idle(void *unused) +{ + default_idle(); +} + void machine_restart(char * __unused) { /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ @@ -97,17 +103,6 @@ void show_regs(struct pt_regs * regs) regs->mach, regs->macl, regs->gbr, regs->pr); } -struct task_struct * alloc_task_struct(void) -{ - /* Get two pages */ - return (struct task_struct *) __get_free_pages(GFP_KERNEL,1); -} - -void free_task_struct(struct task_struct *p) -{ - free_pages((unsigned long) p, 1); -} - /* * Create a kernel thread */ @@ -177,11 +172,7 @@ int dump_fpu(struct pt_regs *regs, elf_f fpvalid = tsk->used_math; if (fpvalid) { - unsigned long flags; - - save_and_cli(flags); unlazy_fpu(tsk); - restore_flags(flags); memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); } @@ -198,26 +189,14 @@ int copy_thread(int nr, unsigned long cl struct task_struct *p, struct pt_regs *regs) { struct pt_regs *childregs; -#if defined(__SH4__) - struct task_struct *tsk = current; - - if (tsk != &init_task) { - unsigned long flags; - save_and_cli(flags); - unlazy_fpu(tsk); - restore_flags(flags); - p->thread.fpu = current->thread.fpu; - p->used_math = tsk->used_math; - } -#endif - childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p)) - 1; + childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p->thread_info)) - 1; *childregs = *regs; if (user_mode(regs)) { childregs->regs[15] = usp; } else { - childregs->regs[15] = (unsigned long)p+2*PAGE_SIZE; + childregs->regs[15] = (unsigned long)p->thread_info+THREAD_SIZE; } childregs->regs[0] = 0; /* Set return value for child */ childregs->sr |= SR_FD; /* Invalidate FPU flag */ @@ -225,6 +204,16 @@ int copy_thread(int nr, unsigned long cl p->thread.sp = (unsigned long) childregs; p->thread.pc = (unsigned long) ret_from_fork; +#if defined(__SH4__) + { + struct task_struct *tsk = current; + + unlazy_fpu(tsk); + p->thread.fpu = tsk->thread.fpu; + p->used_math = tsk->used_math; + clear_ti_thread_flag(p->thread_info, TIF_USEDFPU); + } +#endif return 0; } @@ -255,13 +244,7 @@ void dump_thread(struct pt_regs * regs, void __switch_to(struct task_struct *prev, struct task_struct *next) { #if defined(__SH4__) - if (prev != &init_task) { - unsigned long flags; - - save_and_cli(flags); - unlazy_fpu(prev); - restore_flags(flags); - } + unlazy_fpu(prev); #endif /* * Restore the kernel mode register @@ -269,7 +252,7 @@ void __switch_to(struct task_struct *pre */ asm volatile("ldc %0, r7_bank" : /* no output */ - :"r" (next)); + : "r" (next->thread_info)); } asmlinkage int sys_fork(unsigned long r4, unsigned long r5, @@ -347,23 +330,12 @@ unsigned long get_wchan(struct task_stru /* * The same comment as on the Alpha applies here, too ... */ - pc = thread_saved_pc(&p->thread); + pc = thread_saved_pc(p); if (pc >= (unsigned long) interruptible_sleep_on && pc < (unsigned long) add_timer) { schedule_frame = ((unsigned long *)(long)p->thread.sp)[1]; return (unsigned long)((unsigned long *)schedule_frame)[1]; } return pc; -} - -asmlinkage void print_syscall(int x) -{ - unsigned long flags, sr; - asm("stc sr, %0": "=r" (sr)); - save_and_cli(flags); - printk("%c: %c %c, %c: SYSCALL\n", (x&63)+32, - (current->flags&PF_USEDFPU)?'C':' ', - (init_task.flags&PF_USEDFPU)?'K':' ', (sr&SR_FD)?' ':'F'); - restore_flags(flags); } asmlinkage void break_point_trap(unsigned long r4, unsigned long r5, diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/ptrace.c linux/arch/sh/kernel/ptrace.c --- linux-2.5.8-pre3/arch/sh/kernel/ptrace.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/ptrace.c Fri Apr 5 18:15:40 2002 @@ -39,7 +39,7 @@ static inline int get_stack_long(struct { unsigned char *stack; - stack = (unsigned char *)task + THREAD_SIZE - sizeof(struct pt_regs); + stack = (unsigned char *)task->thread_info + THREAD_SIZE - sizeof(struct pt_regs); stack += offset; return (*((int *)stack)); } @@ -52,7 +52,7 @@ static inline int put_stack_long(struct { unsigned char *stack; - stack = (unsigned char *)task + THREAD_SIZE - sizeof(struct pt_regs); + stack = (unsigned char *)task->thread_info + THREAD_SIZE - sizeof(struct pt_regs); stack += offset; *(unsigned long *) stack = data; return 0; @@ -159,7 +159,7 @@ void ptrace_disable(struct task_struct * asmlinkage int sys_ptrace(long request, long pid, long addr, long data) { - struct task_struct *child, *tsk = current; + struct task_struct *child; struct user * dummy = NULL; int ret; @@ -191,15 +191,11 @@ asmlinkage int sys_ptrace(long request, ret = ptrace_attach(child); goto out_tsk; } - ret = -ESRCH; - if (!(child->ptrace & PT_PTRACED)) - goto out_tsk; - if (child->state != TASK_STOPPED) { - if (request != PTRACE_KILL) - goto out_tsk; - } - if (child->p_pptr != tsk) + + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret < 0) goto out_tsk; + switch (request) { /* when I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ @@ -279,9 +275,9 @@ asmlinkage int sys_ptrace(long request, if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) - child->ptrace |= PT_TRACESYS; + set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); else - child->ptrace &= ~PT_TRACESYS; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); child->exit_code = data; wake_up_process(child); ret = 0; @@ -312,7 +308,7 @@ asmlinkage int sys_ptrace(long request, ret = -EIO; if ((unsigned long) data > _NSIG) break; - child->ptrace &= ~PT_TRACESYS; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); if ((child->ptrace & PT_DTRACE) == 0) { /* Spurious delayed TF traps may occur */ child->ptrace |= PT_DTRACE; @@ -320,7 +316,7 @@ asmlinkage int sys_ptrace(long request, /* Compute next pc. */ pc = get_stack_long(child, (long)&dummy->pc); - regs = (struct pt_regs *)((unsigned long)child + THREAD_SIZE - sizeof(struct pt_regs)); + regs = (struct pt_regs *)(THREAD_SIZE + (unsigned long)child->thread_info) - 1; if (access_process_vm(child, pc&~3, &tmp, sizeof(tmp), 0) != sizeof(tmp)) break; @@ -335,7 +331,7 @@ asmlinkage int sys_ptrace(long request, else insn = tmp >> 16; #endif - compute_next_pc (regs, insn, &nextpc1, &nextpc2); + compute_next_pc(regs, insn, &nextpc1, &nextpc2); if (nextpc1 & 0x80000000) break; @@ -370,22 +366,23 @@ asmlinkage int sys_ptrace(long request, break; } out_tsk: - free_task_struct(child); + put_task_struct(child); out: unlock_kernel(); return ret; } -asmlinkage void syscall_trace(void) +asmlinkage void do_syscall_trace(void) { struct task_struct *tsk = current; - if ((tsk->ptrace & (PT_PTRACED|PT_TRACESYS)) - != (PT_PTRACED|PT_TRACESYS)) + if (!test_thread_flag(TIF_SYSCALL_TRACE)) + return; + if (!(tsk->ptrace & PT_PTRACED)) return; /* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ - tsk->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) + tsk->exit_code = SIGTRAP | ((tsk->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0); tsk->state = TASK_STOPPED; notify_parent(tsk, SIGCHLD); diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/semaphore.c linux/arch/sh/kernel/semaphore.c --- linux-2.5.8-pre3/arch/sh/kernel/semaphore.c Mon Feb 11 10:50:12 2002 +++ linux/arch/sh/kernel/semaphore.c Fri Apr 5 21:24:59 2002 @@ -7,6 +7,7 @@ * specific changes in <asm/semaphore-helper.h> */ +#include <linux/errno.h> #include <linux/sched.h> #include <linux/wait.h> #include <asm/semaphore.h> diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/setup.c linux/arch/sh/kernel/setup.c --- linux-2.5.8-pre3/arch/sh/kernel/setup.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/setup.c Fri Mar 22 21:57:10 2002 @@ -474,9 +474,9 @@ void __init setup_arch(char **cmdline_p) } #if defined(__SH4__) - /* We already grab/initialized FPU in head.S. Make it consisitent. */ - init_task.used_math = 1; - init_task.flags |= PF_USEDFPU; + /* FPU initialization */ + clear_thread_flag(TIF_USEDFPU); + current->used_math = 0; #endif paging_init(); } diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/sh_ksyms.c linux/arch/sh/kernel/sh_ksyms.c --- linux-2.5.8-pre3/arch/sh/kernel/sh_ksyms.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/sh_ksyms.c Wed Apr 10 20:10:51 2002 @@ -10,6 +10,7 @@ #include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/pci.h> +#include <linux/irq.h> #include <asm/semaphore.h> #include <asm/processor.h> @@ -19,7 +20,8 @@ #include <asm/hardirq.h> #include <asm/delay.h> #include <asm/pgalloc.h> -#include <linux/irq.h> +#include <asm/tlbflush.h> +#include <asm/cacheflush.h> extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); @@ -36,9 +38,6 @@ EXPORT_SYMBOL(disable_irq_nosync); EXPORT_SYMBOL(irq_desc); EXPORT_SYMBOL(no_irq_type); -/* Networking helper routines. */ -EXPORT_SYMBOL(csum_partial_copy); - EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); @@ -81,7 +80,7 @@ EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__const_udelay); #define DECLARE_EXPORT(name) extern void name(void);EXPORT_SYMBOL_NOVERS(name) - + /* These symbols are generated by the compiler itself */ DECLARE_EXPORT(__udivsi3); DECLARE_EXPORT(__sdivsi3); diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/signal.c linux/arch/sh/kernel/signal.c --- linux-2.5.8-pre3/arch/sh/kernel/signal.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/signal.c Wed Apr 10 20:47:01 2002 @@ -23,10 +23,12 @@ #include <linux/stddef.h> #include <linux/personality.h> #include <linux/tty.h> +#include <linux/binfmts.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/pgtable.h> +#include <asm/cacheflush.h> #define DEBUG_SIG 0 @@ -198,27 +200,20 @@ static inline int restore_sigcontext_fpu static inline int save_sigcontext_fpu(struct sigcontext *sc) { struct task_struct *tsk = current; - unsigned long flags; - int val; if (!tsk->used_math) { - val = 0; - __copy_to_user(&sc->sc_ownedfp, &val, sizeof(int)); + __put_user(0, &sc->sc_ownedfp); return 0; } - val = 1; - __copy_to_user(&sc->sc_ownedfp, &val, sizeof(int)); + __put_user(1, &sc->sc_ownedfp); /* This will cause a "finit" to be triggered by the next attempted FPU operation by the 'current' process. */ tsk->used_math = 0; - save_and_cli(flags); unlazy_fpu(tsk); - restore_flags(flags); - return __copy_to_user(&sc->sc_fpregs[0], &tsk->thread.fpu.hard, sizeof(long)*(16*2+2)); } @@ -250,14 +245,14 @@ restore_sigcontext(struct pt_regs *regs, regs->sr |= SR_FD; /* Release FPU */ clear_fpu(tsk); - current->used_math = 0; + tsk->used_math = 0; __get_user (owned_fp, &sc->sc_ownedfp); if (owned_fp) err |= restore_sigcontext_fpu(sc); } #endif - regs->syscall_nr = -1; /* disable syscall checks */ + regs->tra = -1; /* disable syscall checks */ err |= __get_user(*r0_p, &sc->sc_regs[0]); return err; } @@ -390,10 +385,10 @@ static void setup_frame(int sig, struct if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - signal = current->exec_domain - && current->exec_domain->signal_invmap + signal = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap && sig < 32 - ? current->exec_domain->signal_invmap[sig] + ? current_thread_info()->exec_domain->signal_invmap[sig] : sig; err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); @@ -455,10 +450,10 @@ static void setup_rt_frame(int sig, stru if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - signal = current->exec_domain - && current->exec_domain->signal_invmap + signal = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap && sig < 32 - ? current->exec_domain->signal_invmap[sig] + ? current_thread_info()->exec_domain->signal_invmap[sig] : sig; err |= __put_user(&frame->info, &frame->pinfo); @@ -526,7 +521,7 @@ handle_signal(unsigned long sig, struct siginfo_t *info, sigset_t *oldset, struct pt_regs * regs) { /* Are we from a system call? */ - if (regs->syscall_nr >= 0) { + if (regs->tra >= 0) { /* If so, check system call restarting.. */ switch (regs->regs[0]) { case -ERESTARTNOHAND: @@ -540,7 +535,6 @@ handle_signal(unsigned long sig, struct } /* fallthrough */ case -ERESTARTNOINTR: - regs->regs[0] = regs->syscall_nr; regs->pc -= 2; } } @@ -620,8 +614,8 @@ int do_signal(struct pt_regs *regs, sigs info.si_signo = signr; info.si_errno = 0; info.si_code = SI_USER; - info.si_pid = current->p_pptr->pid; - info.si_uid = current->p_pptr->uid; + info.si_pid = current->parent->pid; + info.si_uid = current->parent->uid; } /* If the (new) signal is now blocked, requeue it. */ @@ -660,7 +654,7 @@ int do_signal(struct pt_regs *regs, sigs case SIGSTOP: current->state = TASK_STOPPED; current->exit_code = signr; - if (!(current->p_pptr->sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) + if (!(current->parent->sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP)) notify_parent(current, SIGCHLD); schedule(); continue; @@ -684,12 +678,11 @@ int do_signal(struct pt_regs *regs, sigs } /* Did we come from a system call? */ - if (regs->syscall_nr >= 0) { + if (regs->tra >= 0) { /* Restart the system call - no handlers present */ if (regs->regs[0] == -ERESTARTNOHAND || regs->regs[0] == -ERESTARTSYS || regs->regs[0] == -ERESTARTNOINTR) { - regs->regs[0] = regs->syscall_nr; regs->pc -= 2; } } diff -ruN3p linux-2.5.8-pre3/arch/sh/kernel/time.c linux/arch/sh/kernel/time.c --- linux-2.5.8-pre3/arch/sh/kernel/time.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/kernel/time.c Thu Mar 28 10:39:32 2002 @@ -175,6 +175,25 @@ void do_settimeofday(struct timeval *tv) /* last time the RTC clock got updated */ static long last_rtc_update; + +static __inline__ void sh_do_profile (unsigned long pc) +{ + extern int _stext; + + if (!prof_buffer) + return; + + pc -= (unsigned long) &_stext; + pc >>= prof_shift; + /* + * Don't ignore out-of-bounds EIP values silently, + * put them into the last histogram slot, so if + * present, they will show up as a sharp peak. + */ + if (pc > prof_len-1) + pc = prof_len-1; + atomic_inc((atomic_t *)&prof_buffer[pc]); +} /* * timer_interrupt() needs to keep up the real-time clock, diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/Makefile linux/arch/sh/mm/Makefile --- linux-2.5.8-pre3/arch/sh/mm/Makefile Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/Makefile Wed Mar 27 14:08:50 2002 @@ -11,7 +11,7 @@ O_TARGET := mm.o obj-y := init.o fault.o extable.o clear_page.o copy_page.o obj-$(CONFIG_CPU_SH3) += cache-sh3.o -obj-$(CONFIG_CPU_SH4) += cache-sh4.o __clear_user_page-sh4.o __copy_user_page-sh4.o ioremap.o +obj-$(CONFIG_CPU_SH4) += cache-sh4.o ioremap.o USE_STANDARD_AS_RULE := true diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/__clear_user_page-sh4.S linux/arch/sh/mm/__clear_user_page-sh4.S --- linux-2.5.8-pre3/arch/sh/mm/__clear_user_page-sh4.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/__clear_user_page-sh4.S Thu Jan 1 09:00:00 1970 @@ -1,49 +0,0 @@ -/* $Id$ - * - * __clear_user_page implementation of SuperH - * - * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima - * - */ - -/* - * __clear_user_page - * @to: P1 address (with same color) - * @orig_to: P1 address - * - * void __clear_user_page(void *to, void *orig_to) - */ - -/* - * r0 --- scratch - * r4 --- to - * r5 --- orig_to - * r6 --- to + 4096 - */ -#include <linux/linkage.h> -ENTRY(__clear_user_page) - mov r4,r6 - mov.w .L4096,r0 - add r0,r6 - mov #0,r0 - ! -1: ocbi @r5 - add #32,r5 - movca.l r0,@r4 - mov r4,r1 - add #32,r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - add #28,r4 - cmp/eq r6,r4 - bf/s 1b - ocbwb @r1 - ! - rts - nop -.L4096: .word 4096 diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/__copy_user_page-sh4.S linux/arch/sh/mm/__copy_user_page-sh4.S --- linux-2.5.8-pre3/arch/sh/mm/__copy_user_page-sh4.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/__copy_user_page-sh4.S Thu Jan 1 09:00:00 1970 @@ -1,69 +0,0 @@ -/* $Id: __copy_user_page-sh4.S,v 1.1 2001/07/23 09:02:17 gniibe Exp $ - * - * __copy_user_page implementation of SuperH - * - * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima - * - */ - -/* - * __copy_user_page - * @to: P1 address (with same color) - * @from: P1 address - * @orig_to: P1 address - * - * void __copy_user_page(void *to, void *from, void *orig_to) - */ - -/* - * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch - * r8 --- from + 4096 - * r9 --- orig_to - * r10 --- to - * r11 --- from - */ -#include <linux/linkage.h> -ENTRY(__copy_user_page) - mov.l r8,@-r15 - mov.l r9,@-r15 - mov.l r10,@-r15 - mov.l r11,@-r15 - mov r4,r10 - mov r5,r11 - mov r6,r9 - mov r5,r8 - mov.w .L4096,r0 - add r0,r8 - ! -1: ocbi @r9 - add #32,r9 - mov.l @r11+,r0 - mov.l @r11+,r1 - mov.l @r11+,r2 - mov.l @r11+,r3 - mov.l @r11+,r4 - mov.l @r11+,r5 - mov.l @r11+,r6 - mov.l @r11+,r7 - movca.l r0,@r10 - mov r10,r0 - add #32,r10 - mov.l r7,@-r10 - mov.l r6,@-r10 - mov.l r5,@-r10 - mov.l r4,@-r10 - mov.l r3,@-r10 - mov.l r2,@-r10 - mov.l r1,@-r10 - ocbwb @r0 - cmp/eq r11,r8 - bf/s 1b - add #28,r10 - ! - mov.l @r15+,r11 - mov.l @r15+,r10 - mov.l @r15+,r9 - mov.l @r15+,r8 - rts - nop -.L4096: .word 4096 diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/cache-sh3.c linux/arch/sh/mm/cache-sh3.c --- linux-2.5.8-pre3/arch/sh/mm/cache-sh3.c Mon Feb 11 10:50:08 2002 +++ linux/arch/sh/mm/cache-sh3.c Wed Apr 10 20:27:26 2002 @@ -19,6 +19,7 @@ #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> +#include <asm/cacheflush.h> #define CCR 0xffffffec /* Address of Cache Control Register */ diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/cache-sh4.c linux/arch/sh/mm/cache-sh4.c --- linux-2.5.8-pre3/arch/sh/mm/cache-sh4.c Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/cache-sh4.c Wed Apr 10 20:27:33 2002 @@ -20,6 +20,7 @@ #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> +#include <asm/cacheflush.h> #define CCR 0xff00001c /* Address of Cache Control Register */ @@ -109,7 +110,7 @@ void __init p3_cache_init(void) unsigned long size, unsigned long flags); if (remap_area_pages(P3SEG, 0, PAGE_SIZE*4, _PAGE_CACHABLE)) - panic("p3_cachie_init failed."); + panic("%s failed.", __FUNCTION__); sema_init (&p3map_sem[0], 1); sema_init (&p3map_sem[1], 1); sema_init (&p3map_sem[2], 1); @@ -208,44 +209,64 @@ void flush_cache_sigtramp(unsigned long restore_flags(flags); } -/* - * Writeback&Invalidate the D-cache of the page - */ -static void __flush_dcache_page(unsigned long phys) +static void flush_cache_4096_all(unsigned long start) { - unsigned long addr, data; - unsigned long flags; - - phys |= CACHE_VALID; - - save_and_cli(flags); - jump_to_P2(); - - /* Loop all the D-cache */ - for (addr = CACHE_OC_ADDRESS_ARRAY; - addr < (CACHE_OC_ADDRESS_ARRAY - +(CACHE_OC_NUM_ENTRIES<< CACHE_OC_ENTRY_SHIFT)); - addr += (1<<CACHE_OC_ENTRY_SHIFT)) { - data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data == phys) - ctrl_outl(0, addr); - } +#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_ST40STB1) + /* + * SH7751 and ST40 have no restriction to handle cache. + * (While SH7750 must do that at P2 area.) + */ + unsigned long addr; + for (addr = start; addr < start + 4096; addr += 32) + ctrl_outl(0, addr); +#else + register unsigned long __r0 __asm__ ("r0") = 0; + register unsigned long __r1 __asm__ ("r1") = 128; + register unsigned long __r4 __asm__ ("r4"); + register unsigned long __r5 __asm__ ("r5"); + register unsigned long __r6 __asm__ ("r6"); + register unsigned long __r7 __asm__ ("r7"); + extern void __flush_cache_4096_all(unsigned long); + + asm volatile("jsr @%7; nop" + : "=&r" (__r4), "=&r" (__r5), "=&r" (__r6), "=&r" (__r7) + : "0" (start), "r" (__r0), "r" (__r1), + "r" (__flush_cache_4096_all + 0x20000000) + : "pr"); +#endif +} -#if 0 /* DEBUG DEBUG */ - /* Loop all the I-cache */ - for (addr = CACHE_IC_ADDRESS_ARRAY; - addr < (CACHE_IC_ADDRESS_ARRAY - +(CACHE_IC_NUM_ENTRIES<< CACHE_IC_ENTRY_SHIFT)); - addr += (1<<CACHE_IC_ENTRY_SHIFT)) { - data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data == phys) { - printk(KERN_INFO "__flush_cache_page: I-cache entry found\n"); - ctrl_outl(0, addr); +static inline void flush_cache_4096(unsigned long start, + unsigned long phys) +{ +#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_ST40STB1) + if (start >= CACHE_OC_ADDRESS_ARRAY) { + /* + * SH7751 and ST40 have no restriction to handle cache. + * (While SH7750 must do that at P2 area.) + */ + unsigned long addr, data; + for (addr = start; addr < start + 4096; addr += 32) { + data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); + if (data == phys) + ctrl_outl(0, addr); } - } + } else #endif - back_to_P1(); - restore_flags(flags); + { + register unsigned long addr __asm__ ("r4"); + register unsigned long data __asm__ ("r0"); + register unsigned long __r5 __asm__ ("r5") = phys; + register unsigned long __r6 __asm__ ("r6") = (0x1ffff000|CACHE_VALID); + register unsigned long __r7 __asm__ ("r7") = 0; + extern void __flush_cache_4096(unsigned long, unsigned long); + + asm volatile("jsr @%1; nop" + : "=r" (addr), "=r" (data) + : "0" (start), "1" (__flush_cache_4096 + 0x20000000), + "r" (__r5), "r" (__r6), "r" (__r7) + : "pr"); + } } /* @@ -254,38 +275,122 @@ static void __flush_dcache_page(unsigned */ void flush_dcache_page(struct page *page) { - if (test_bit(PG_mapped, &page->flags)) - __flush_dcache_page(PHYSADDR(page_address(page))); + if (test_bit(PG_mapped, &page->flags)) { + unsigned long phys = PHYSADDR(page_address(page)); + unsigned long flags; + + phys |= CACHE_VALID; + + save_and_cli(flags); + + /* Loop all the D-cache */ + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY, phys); + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY | 0x1000, phys); + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY | 0x2000, phys); + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY | 0x3000, phys); + + restore_flags(flags); + } } -void flush_cache_all(void) +static inline void flush_icache_all(void) { - extern unsigned long empty_zero_page[1024]; unsigned long flags; - unsigned long addr; save_and_cli(flags); + jump_to_P2(); + /* Flush I-cache */ + ctrl_outl(CCR_CACHE_VAL|CCR_CACHE_ICI, CCR); + back_to_P1(); + restore_flags(flags); +} + +#undef C_IMPLEMENTATION_OF_CACHE_ALL + +void flush_cache_all(void) +{ + extern unsigned long empty_zero_page[1024]; /* Prefetch the data to write back D-cache */ + +#ifdef C_IMPLEMENTATION_OF_CACHE_ALL + unsigned long addr; + for (addr = (unsigned long)empty_zero_page; addr < (unsigned long)empty_zero_page + 1024*16; addr += L1_CACHE_BYTES) asm volatile("pref @%0"::"r" (addr)); - - jump_to_P2(); - /* Flush D-cache/I-cache */ - ctrl_outl(CCR_CACHE_INIT, CCR); - back_to_P1(); - restore_flags(flags); +#else + unsigned long a0, a1, a2, a3, cnt; + asm volatile( + "mov %0, %1; add #32, %1\n\t" + "mov %0, %2; add #64, %2\n\t" + "mov %1, %3; add #64, %3\n\t" + "1:\n\t" + "pref @%0\n\t" + "dt %4\n\t" + "pref @%1\n\t" + "add %5, %0\n\t" + "pref @%2\n\t" + "add %5, %1\n\t" + "pref @%3\n\t" + "add %5, %2\n\t" + "bf/s 1b\n\t" + " add %5, %3" + : "=&r" (a0), "=&r" (a1), "=&r" (a2), "=&r" (a3), "=&r" (cnt) + : "r" (32*4), "0" (empty_zero_page), "4" (1024*16/32/4) + : "t"); +#endif + flush_icache_all(); } void flush_cache_mm(struct mm_struct *mm) { /* Is there any good way? */ /* XXX: possibly call flush_cache_range for each vm area */ + /* + * FIXME: Really, the optimal solution here would be able to flush out + * individual lines created by the specified context, but this isn't + * feasible for a number of architectures (such as MIPS, and some + * SPARC) .. is this possible for SuperH? + * + * In the meantime, we'll just flush all of the caches.. this + * seems to be the simplest way to avoid at least a few wasted + * cache flushes. -Lethal + */ flush_cache_all(); } +static void __flush_cache_page(struct vm_area_struct *vma, + unsigned long address, + unsigned long phys) +{ + unsigned long flags; + + phys |= CACHE_VALID; + save_and_cli(flags); + + /* We only need to flush D-cache when we have alias */ + if ((address^phys) & CACHE_ALIAS) { + /* Loop 4K of the D-cache */ + flush_cache_4096( + CACHE_OC_ADDRESS_ARRAY | (address & CACHE_ALIAS), + phys); + /* Loop another 4K of the D-cache */ + flush_cache_4096( + CACHE_OC_ADDRESS_ARRAY | (phys & CACHE_ALIAS), + phys); + } + + if (vma->vm_flags & VM_EXEC) + /* Loop 4K (half) of the I-cache */ + flush_cache_4096( + CACHE_IC_ADDRESS_ARRAY | (address & 0x1000), + phys); + + restore_flags(flags); +} + /* * Write back and invalidate D-caches. * @@ -298,14 +403,52 @@ void flush_cache_mm(struct mm_struct *mm void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { - /* - * We could call flush_cache_page for the pages of these range, - * but it's not efficient (scan the caches all the time...). - * - * We can't use A-bit magic, as there's the case we don't have - * valid entry on TLB. - */ - flush_cache_all(); + unsigned long p = start & PAGE_MASK; + pgd_t *dir; + pmd_t *pmd; + pte_t *pte; + pte_t entry; + unsigned long phys; + unsigned long d = 0; + + dir = pgd_offset(vma->vm_mm, p); + pmd = pmd_offset(dir, p); + + do { + if (pmd_none(*pmd) || pmd_bad(*pmd)) { + p &= ~((1 << PMD_SHIFT) -1); + p += (1 << PMD_SHIFT); + pmd++; + continue; + } + pte = pte_offset_kernel(pmd, p); + do { + entry = *pte; + if ((pte_val(entry) & _PAGE_PRESENT)) { + phys = pte_val(entry)&PTE_PHYS_MASK; + if ((p^phys) & CACHE_ALIAS) { + d |= 1 << ((p & CACHE_ALIAS)>>12); + d |= 1 << ((phys & CACHE_ALIAS)>>12); + if (d == 0x0f) + goto loop_exit; + } + } + pte++; + p += PAGE_SIZE; + } while (p < end && (unsigned long)pte & PAGE_MASK); + pmd++; + } while (p < end); + loop_exit: + if (d & 1) + flush_cache_4096_all(CACHE_OC_ADDRESS_ARRAY); + if (d & 2) + flush_cache_4096_all(CACHE_OC_ADDRESS_ARRAY | 0x1000); + if (d & 4) + flush_cache_4096_all(CACHE_OC_ADDRESS_ARRAY | 0x2000); + if (d & 8) + flush_cache_4096_all(CACHE_OC_ADDRESS_ARRAY | 0x3000); + if (vma->vm_flags & VM_EXEC) + flush_icache_all(); } /* @@ -319,58 +462,32 @@ void flush_cache_page(struct vm_area_str pmd_t *pmd; pte_t *pte; pte_t entry; - unsigned long phys, addr, data; - unsigned long flags; + unsigned long phys; dir = pgd_offset(vma->vm_mm, address); pmd = pmd_offset(dir, address); if (pmd_none(*pmd) || pmd_bad(*pmd)) return; - pte = pte_offset(pmd, address); + pte = pte_offset_kernel(pmd, address); entry = *pte; - if (pte_none(entry) || !pte_present(entry)) + if (!(pte_val(entry) & _PAGE_PRESENT)) return; phys = pte_val(entry)&PTE_PHYS_MASK; + __flush_cache_page(vma, address, phys); +} - phys |= CACHE_VALID; - save_and_cli(flags); - jump_to_P2(); - - /* We only need to flush D-cache when we have alias */ - if ((address^phys) & CACHE_ALIAS) { - /* Loop 4K of the D-cache */ - for (addr = CACHE_OC_ADDRESS_ARRAY | (address & CACHE_ALIAS); - addr < (CACHE_OC_ADDRESS_ARRAY + (address & CACHE_ALIAS) - +(CACHE_OC_NUM_ENTRIES/4<<CACHE_OC_ENTRY_SHIFT)); - addr += (1<<CACHE_OC_ENTRY_SHIFT)) { - data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data == phys) - ctrl_outl(0, addr); - } - /* Loop another 4K of the D-cache */ - for (addr = CACHE_OC_ADDRESS_ARRAY | (phys & CACHE_ALIAS); - addr < (CACHE_OC_ADDRESS_ARRAY + (phys & CACHE_ALIAS) - +(CACHE_OC_NUM_ENTRIES/4<<CACHE_OC_ENTRY_SHIFT)); - addr += (1<<CACHE_OC_ENTRY_SHIFT)) { - data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data == phys) - ctrl_outl(0, addr); - } - } - - if (vma->vm_flags & VM_EXEC) - /* Loop 4K of the I-cache */ - for (addr = CACHE_IC_ADDRESS_ARRAY|(address&0x1000); - addr < ((CACHE_IC_ADDRESS_ARRAY|(address&0x1000)) - +(CACHE_IC_NUM_ENTRIES/2<<CACHE_IC_ENTRY_SHIFT)); - addr += (1<<CACHE_IC_ENTRY_SHIFT)) { - data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data == phys) - ctrl_outl(0, addr); - } - back_to_P1(); - restore_flags(flags); +/* + * flush_icache_user_range + * @vma: VMA of the process + * @page: page + * @addr: U0 address + * @len: length of the range (< page size) + */ +void flush_icache_user_range(struct vm_area_struct *vma, + struct page *page, unsigned long addr, int len) +{ + __flush_cache_page(vma, addr, PHYSADDR(page_address(page))); } /* @@ -394,7 +511,7 @@ void clear_user_page(void *to, unsigned unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); pgd_t *dir = pgd_offset_k(p3_addr); pmd_t *pmd = pmd_offset(dir, p3_addr); - pte_t *pte = pte_offset(pmd, p3_addr); + pte_t *pte = pte_offset_kernel(pmd, p3_addr); pte_t entry; unsigned long flags; @@ -433,7 +550,7 @@ void copy_user_page(void *to, void *from unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); pgd_t *dir = pgd_offset_k(p3_addr); pmd_t *pmd = pmd_offset(dir, p3_addr); - pte_t *pte = pte_offset(pmd, p3_addr); + pte_t *pte = pte_offset_kernel(pmd, p3_addr); pte_t entry; unsigned long flags; diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/clear_page.S linux/arch/sh/mm/clear_page.S --- linux-2.5.8-pre3/arch/sh/mm/clear_page.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/clear_page.S Wed Apr 3 11:38:34 2002 @@ -1,10 +1,13 @@ -/* $Id: clear_page.S,v 1.1 2001/07/23 10:08:50 gniibe Exp $ +/* $Id: clear_page.S,v 1.5 2002/04/03 02:38:34 gniibe Exp $ * - * clear_page implementation of SuperH + * __clear_user_page, __clear_user, clear_page implementation of SuperH * - * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima + * Copyright (C) 2001 Kaz Kojima + * Copyright (C) 2001, 2002 Niibe Yutaka * */ +#include <linux/config.h> +#include <linux/linkage.h> /* * clear_page @@ -18,7 +21,6 @@ * r4 --- to * r5 --- to + 4096 */ -#include <linux/linkage.h> ENTRY(clear_page) mov r4,r5 mov.w .Llimit,r0 @@ -50,3 +52,181 @@ ENTRY(clear_page) rts nop .Llimit: .word (4096-28) + +ENTRY(__clear_user) + ! + mov #0, r0 + mov #0xe0, r1 ! 0xffffffe0 + ! + ! r4..r4&~32 -------- not aligned [ Area 0 ] + ! r4&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] + ! (r4+r5)&~32..r4+r5 -------- not aligned [ Area 2 ] + ! + ! Clear area 0 + mov r4, r2 + and r1, r2 + cmp/eq r4, r2 + bt/s area1 + mov r4, r3 + sub r2, r3 + mov r4, r2 + ! +l0: dt r3 +0: mov.b r0, @r2 + bf/s l0 + add #1, r2 + ! + mov r4, r3 + add r5, r3 + and r1, r3 + ! + ! Clear area 1 +area1: +#if defined(__SH4__) +1: movca.l r0, @r2 +#else +1: mov.l r0, @r2 +#endif + add #4, r2 +2: mov.l r0, @r2 + add #4, r2 +3: mov.l r0, @r2 + add #4, r2 +4: mov.l r0, @r2 + add #4, r2 +5: mov.l r0, @r2 + add #4, r2 +6: mov.l r0, @r2 + add #4, r2 +7: mov.l r0, @r2 + add #4, r2 +8: mov.l r0, @r2 + add #4, r2 + cmp/hi r2, r3 + bt/s 1b + nop + ! + ! Clear area 2 + add r5, r4 + cmp/eq r4, r2 + bt/s done + sub r2, r4 +l2: dt r4 +9: mov.b r0, @r2 + bf/s l2 + add #1, r2 + ! +done: rts + nop ! return 0 as normal return + + ! return the number of bytes remained +bad_clear_user: + mov r4, r0 + mov r5, r0 + rts + sub r2, r0 + +.section __ex_table,"a" + .align 2 + .long 0b, bad_clear_user + .long 1b, bad_clear_user + .long 2b, bad_clear_user + .long 3b, bad_clear_user + .long 4b, bad_clear_user + .long 5b, bad_clear_user + .long 6b, bad_clear_user + .long 7b, bad_clear_user + .long 8b, bad_clear_user + .long 9b, bad_clear_user +.previous + +#if defined(__SH4__) +/* + * __clear_user_page + * @to: P1 address (with same color) + * @orig_to: P1 address + * + * void __clear_user_page(void *to, void *orig_to) + */ + +/* + * r0 --- scratch + * r4 --- to + * r5 --- orig_to + * r6 --- to + 4096 + */ +ENTRY(__clear_user_page) + mov.w .L4096,r0 + mov r4,r6 + add r0,r6 + mov #0,r0 + ! +1: ocbi @r5 + add #32,r5 + movca.l r0,@r4 + mov r4,r1 + add #32,r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + mov.l r0,@-r4 + add #28,r4 + cmp/eq r6,r4 + bf/s 1b + ocbwb @r1 + ! + rts + nop +.L4096: .word 4096 + +ENTRY(__flush_cache_4096) + .rept 128 + mov.l @r4,r0 + and r6,r0 + cmp/eq r5,r0 + bf 1f + mov.l r7,@r4 +1: add #32,r4 + .endr + nop + nop + nop + nop + nop + nop + nop + rts + nop + +#if defined(CONFIG_CPU_SUBTYPE_SH7750) +ENTRY(__flush_cache_4096_all) + mov r4,r5 + mov r4,r6 + mov r4,r7 + add #32,r5 + add #-64,r6 + add #-32,r7 + .rept 32 + mov.l r0,@r4 + add r1,r6 + mov.l r0,@r5 + add r1,r7 + mov.l r0,@r6 + add r1,r4 + mov.l r0,@r7 + add r1,r5 + .endr + nop + nop + nop + nop + nop + nop + nop + rts + nop +#endif +#endif diff -ruN3p linux-2.5.8-pre3/arch/sh/mm/copy_page.S linux/arch/sh/mm/copy_page.S --- linux-2.5.8-pre3/arch/sh/mm/copy_page.S Thu Apr 4 18:41:39 2002 +++ linux/arch/sh/mm/copy_page.S Wed Apr 3 11:38:34 2002 @@ -1,10 +1,11 @@ -/* $Id: copy_page.S,v 1.2 2001/07/23 10:27:25 gniibe Exp $ +/* $Id: copy_page.S,v 1.3 2002/04/03 02:38:34 gniibe Exp $ * - * copy_page implementation of SuperH + * copy_page, __copy_user_page implementation of SuperH * * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima * */ +#include <linux/linkage.h> /* * copy_page @@ -21,7 +22,6 @@ * r10 --- to * r11 --- from */ -#include <linux/linkage.h> ENTRY(copy_page) mov.l r8,@-r15 mov.l r10,@-r15 @@ -66,4 +66,66 @@ ENTRY(copy_page) mov.l @r15+,r8 rts nop + +#if defined(__SH4__) +/* + * __copy_user_page + * @to: P1 address (with same color) + * @from: P1 address + * @orig_to: P1 address + * + * void __copy_user_page(void *to, void *from, void *orig_to) + */ + +/* + * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch + * r8 --- from + 4096 + * r9 --- orig_to + * r10 --- to + * r11 --- from + */ +ENTRY(__copy_user_page) + mov.l r8,@-r15 + mov.l r9,@-r15 + mov.l r10,@-r15 + mov.l r11,@-r15 + mov r4,r10 + mov r5,r11 + mov r6,r9 + mov r5,r8 + mov.w .L4096,r0 + add r0,r8 + ! +1: ocbi @r9 + add #32,r9 + mov.l @r11+,r0 + mov.l @r11+,r1 + mov.l @r11+,r2 + mov.l @r11+,r3 + mov.l @r11+,r4 + mov.l @r11+,r5 + mov.l @r11+,r6 + mov.l @r11+,r7 + movca.l r0,@r10 + mov r10,r0 + add #32,r10 + mov.l r7,@-r10 + mov.l r6,@-r10 + mov.l r5,@-r10 + mov.l r4,@-r10 + mov.l r3,@-r10 + mov.l r2,@-r10 + mov.l r1,@-r10 + ocbwb @r0 + cmp/eq r11,r8 + bf/s 1b + add #28,r10 + ! + mov.l @r15+,r11 + mov.l @r15+,r10 + mov.l @r15+,r9 + mov.l @r15... [truncated message content] |
From: NIIBE Y. <gn...@m1...> - 2002-04-12 02:38:09
|
2002-04-12 NIIBE Yutaka <gn...@m1...> Follow up to 2.5.8-pre3. * include/asm-sh/tlbflush.h (flush_tlb_kernel_range): New API. * arch/sh/mm/fault.c (flush_tlb_kernel_range): New function. * arch/sh/kernel/entry.S (sys_sched_setaffinity, sys_sched_getaffinity): New syscall entries. * include/asm-sh/unistd.h (__NR_sched_setaffinity, __NR_sched_getaffinity): New macros. 2002-04-11 NIIBE Yutaka <gn...@m1...> Follow up to 2.5.8-pre2. * arch/sh/kernel/process.c: Include <linux/platform.h>. (default_idle): New function. (cpu_idle): Call default_idle. * arch/sh/kernel/signal.c: Include <linux/binfmt.h>. * include/asm-sh/pgalloc.h: Inline functions move to real functions. * arch/sh/mm/init.c (pgd_alloc, pgd_free, pte_alloc_one_kernel, pte_alloc_one): Moved to here. * include/asm-sh/thread_info.h (PREEMPT_ACTIVE): Defined. * include/asm-sh/cacheflush.h, include/asm-sh/tlbflush.h: New files. * include/asm-sh/mmu_context.h: Include asm/tlbflush.h. * arch/sh/kernel/signal.c: Include asm/cacheflush.h. * arch/sh/mm/cache-sh3.c: Likewise. * arch/sh/mm/cache-sh4.c: Likewise. * arch/sh/mm/fault.c: Likewise. * arch/sh/kernel/sh_ksyms.c: Include asm/tlbflush.h, asm/cacheflush.h. * arch/sh/mm/ioremap.c: Likewise. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.12 diff -u -3 -p -r1.12 entry.S --- arch/sh/kernel/entry.S 29 Mar 2002 00:02:04 -0000 1.12 +++ arch/sh/kernel/entry.S 12 Apr 2002 02:34:32 -0000 @@ -1105,6 +1105,8 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_tkill) .long SYMBOL_NAME(sys_sendfile64) .long SYMBOL_NAME(sys_futex) /* 240 */ + .long SYMBOL_NAME(sys_sched_setaffinity) + .long SYMBOL_NAME(sys_sched_getaffinity) .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) Index: arch/sh/kernel/process.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/process.c,v retrieving revision 1.9 diff -u -3 -p -r1.9 process.c --- arch/sh/kernel/process.c 29 Mar 2002 00:02:04 -0000 1.9 +++ arch/sh/kernel/process.c 12 Apr 2002 02:34:32 -0000 @@ -15,6 +15,7 @@ #include <linux/mm.h> #include <linux/slab.h> #include <linux/a.out.h> +#include <linux/platform.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -35,10 +36,7 @@ void enable_hlt(void) hlt_counter--; } -/* - * The idle loop on a uniprocessor i386.. - */ -void cpu_idle(void *unused) +void default_idle(void) { /* endless idle loop with no priority at all */ while (1) { @@ -57,6 +55,14 @@ void cpu_idle(void *unused) } schedule(); } +} + +/* + * The idle loop on a uniprocessor i386.. + */ +void cpu_idle(void *unused) +{ + default_idle(); } void machine_restart(char * __unused) Index: arch/sh/kernel/sh_ksyms.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/sh_ksyms.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 sh_ksyms.c --- arch/sh/kernel/sh_ksyms.c 4 Apr 2002 09:03:54 -0000 1.3 +++ arch/sh/kernel/sh_ksyms.c 12 Apr 2002 02:34:32 -0000 @@ -10,6 +10,7 @@ #include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/pci.h> +#include <linux/irq.h> #include <asm/semaphore.h> #include <asm/processor.h> @@ -19,7 +20,8 @@ #include <asm/hardirq.h> #include <asm/delay.h> #include <asm/pgalloc.h> -#include <linux/irq.h> +#include <asm/tlbflush.h> +#include <asm/cacheflush.h> extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.8 diff -u -3 -p -r1.8 signal.c --- arch/sh/kernel/signal.c 29 Mar 2002 00:02:04 -0000 1.8 +++ arch/sh/kernel/signal.c 12 Apr 2002 02:34:33 -0000 @@ -23,10 +23,12 @@ #include <linux/stddef.h> #include <linux/personality.h> #include <linux/tty.h> +#include <linux/binfmts.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/pgtable.h> +#include <asm/cacheflush.h> #define DEBUG_SIG 0 Index: arch/sh/mm/cache-sh3.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh3.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 cache-sh3.c --- arch/sh/mm/cache-sh3.c 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/mm/cache-sh3.c 12 Apr 2002 02:34:33 -0000 @@ -19,6 +19,7 @@ #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> +#include <asm/cacheflush.h> #define CCR 0xffffffec /* Address of Cache Control Register */ Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.11 diff -u -3 -p -r1.11 cache-sh4.c --- arch/sh/mm/cache-sh4.c 3 Apr 2002 02:38:34 -0000 1.11 +++ arch/sh/mm/cache-sh4.c 12 Apr 2002 02:34:33 -0000 @@ -20,6 +20,7 @@ #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> +#include <asm/cacheflush.h> #define CCR 0xff00001c /* Address of Cache Control Register */ Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/fault.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 fault.c --- arch/sh/mm/fault.c 22 Mar 2002 12:57:10 -0000 1.5 +++ arch/sh/mm/fault.c 12 Apr 2002 02:34:33 -0000 @@ -26,6 +26,7 @@ #include <asm/pgalloc.h> #include <asm/hardirq.h> #include <asm/mmu_context.h> +#include <asm/cacheflush.h> extern void die(const char *,struct pt_regs *,long); @@ -410,6 +411,32 @@ void flush_tlb_range(struct vm_area_stru } restore_flags(flags); } +} + +void flush_tlb_kernel_range(unsigned long start, unsigned long end) +{ + unsigned long flags; + int size; + + save_and_cli(flags); + size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; + if (size > (MMU_NTLB_ENTRIES/4)) { /* Too many TLB to flush */ + flush_tlb_all(); + } else { + unsigned long asid = init_mm.context&MMU_CONTEXT_ASID_MASK; + unsigned long saved_asid = get_asid(); + + start &= PAGE_MASK; + end += (PAGE_SIZE - 1); + end &= PAGE_MASK; + set_asid(asid); + while (start < end) { + __flush_tlb_page(asid, start); + start += PAGE_SIZE; + } + set_asid(saved_asid); + } + restore_flags(flags); } void flush_tlb_mm(struct mm_struct *mm) Index: arch/sh/mm/init.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/init.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 init.c --- arch/sh/mm/init.c 15 Oct 2001 20:44:54 -0000 1.1.1.1 +++ arch/sh/mm/init.c 12 Apr 2002 02:34:33 -0000 @@ -35,6 +35,7 @@ #include <asm/mmu_context.h> #include <asm/io.h> #include <asm/tlb.h> +#include <asm/cacheflush.h> mmu_gather_t mmu_gathers[NR_CPUS]; @@ -214,4 +215,54 @@ void si_meminfo(struct sysinfo *val) val->freehigh = nr_free_highpages(); val->mem_unit = PAGE_SIZE; return; +} + +pgd_t *pgd_alloc(struct mm_struct *mm) +{ + unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); + pgd_t *pgd = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL); + + if (pgd) + memset(pgd, 0, pgd_size); + + return pgd; +} + +void pgd_free(pgd_t *pgd) +{ + kfree(pgd); +} + +pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) +{ + int count = 0; + pte_t *pte; + + do { + pte = (pte_t *) __get_free_page(GFP_KERNEL); + if (pte) + clear_page(pte); + else { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ); + } + } while (!pte && (count++ < 10)); + return pte; +} + +struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) +{ + int count = 0; + struct page *pte; + + do { + pte = alloc_pages(GFP_KERNEL, 0); + if (pte) + clear_page(page_address(pte)); + else { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ); + } + } while (!pte && (count++ < 10)); + return pte; } Index: arch/sh/mm/ioremap.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/ioremap.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 ioremap.c --- arch/sh/mm/ioremap.c 22 Mar 2002 03:58:40 -0000 1.2 +++ arch/sh/mm/ioremap.c 12 Apr 2002 02:34:33 -0000 @@ -12,6 +12,8 @@ #include <linux/vmalloc.h> #include <asm/io.h> #include <asm/pgalloc.h> +#include <asm/cacheflush.h> +#include <asm/tlbflush.h> static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, unsigned long phys_addr, unsigned long flags) Index: include/asm-sh/cacheflush.h =================================================================== RCS file: include/asm-sh/cacheflush.h diff -N include/asm-sh/cacheflush.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/asm-sh/cacheflush.h 12 Apr 2002 02:34:33 -0000 @@ -0,0 +1,72 @@ +#ifndef __ASM_SH_CACHEFLUSH_H +#define __ASM_SH_CACHEFLUSH_H + +#if defined(__sh3__) +/* Cache flushing: + * + * - flush_cache_all() flushes entire cache + * - flush_cache_mm(mm) flushes the specified mm context's cache lines + * - flush_cache_page(mm, vmaddr) flushes a single page + * - flush_cache_range(vma, start, end) flushes a range of pages + * + * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache + * - flush_page_to_ram(page) write back kernel page to ram + * - flush_icache_range(start, end) flushes(invalidates) a range for icache + * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache + * + * Caches are indexed (effectively) by physical address on SH-3, so + * we don't need them. + */ +#define flush_cache_all() do { } while (0) +#define flush_cache_mm(mm) do { } while (0) +#define flush_cache_range(vma, start, end) do { } while (0) +#define flush_cache_page(vma, vmaddr) do { } while (0) +#define flush_page_to_ram(page) do { } while (0) +#define flush_dcache_page(page) do { } while (0) +#define flush_icache_range(start, end) do { } while (0) +#define flush_icache_page(vma,pg) do { } while (0) +#define flush_icache_user_range(vma,pg,adr,len) do { } while (0) +#define flush_cache_sigtramp(vaddr) do { } while (0) + +#define p3_cache_init() do { } while (0) + +#elif defined(__SH4__) +/* + * Caches are broken on SH-4, so we need them. + */ + +/* Page is 4K, OC size is 16K, there are four lines. */ +#define CACHE_ALIAS 0x00003000 + +extern void flush_cache_all(void); +extern void flush_cache_mm(struct mm_struct *mm); +extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, + unsigned long end); +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); +extern void flush_dcache_page(struct page *pg); +extern void flush_icache_range(unsigned long start, unsigned long end); +extern void flush_cache_sigtramp(unsigned long addr); +extern void flush_icache_user_range(struct vm_area_struct *vma, + struct page *page, unsigned long addr, + int len); + +#define flush_page_to_ram(page) do { } while (0) +#define flush_icache_page(vma,pg) do { } while (0) + +/* Initialization of P3 area for copy_user_page */ +extern void p3_cache_init(void); + +#define PG_mapped PG_arch_1 + +/* We provide our own get_unmapped_area to avoid cache alias issue */ +#define HAVE_ARCH_UNMAPPED_AREA +#endif + +/* Flush (write-back only) a region (smaller than a page) */ +extern void __flush_wback_region(void *start, int size); +/* Flush (write-back & invalidate) a region (smaller than a page) */ +extern void __flush_purge_region(void *start, int size); +/* Flush (invalidate only) a region (smaller than a page) */ +extern void __flush_invalidate_region(void *start, int size); + +#endif /* __ASM_SH_CACHEFLUSH_H */ Index: include/asm-sh/mmu_context.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mmu_context.h,v retrieving revision 1.7 diff -u -3 -p -r1.7 mmu_context.h --- include/asm-sh/mmu_context.h 27 Mar 2002 00:07:19 -0000 1.7 +++ include/asm-sh/mmu_context.h 12 Apr 2002 02:34:33 -0000 @@ -6,6 +6,8 @@ #ifndef __ASM_SH_MMU_CONTEXT_H #define __ASM_SH_MMU_CONTEXT_H +#include <asm/tlbflush.h> + /* * The MMU "context" consists of two things: * (a) TLB cache version (or round, cycle whatever expression you like) Index: include/asm-sh/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.6 diff -u -3 -p -r1.6 pgalloc.h --- include/asm-sh/pgalloc.h 22 Mar 2002 12:57:10 -0000 1.6 +++ include/asm-sh/pgalloc.h 12 Apr 2002 02:34:33 -0000 @@ -22,56 +22,11 @@ static inline void pmd_populate(struct m /* * Allocate and free page tables. */ +extern pgd_t *pgd_alloc(struct mm_struct *); +extern void pgd_free(pgd_t *pgd); -static inline pgd_t *pgd_alloc(struct mm_struct *mm) -{ - unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); - pgd_t *pgd = (pgd_t *)kmalloc(pgd_size, GFP_KERNEL); - - if (pgd) - memset(pgd, 0, pgd_size); - - return pgd; -} - -static inline void pgd_free(pgd_t *pgd) -{ - kfree(pgd); -} - -static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) -{ - int count = 0; - pte_t *pte; - - do { - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pte) - clear_page(pte); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); - return pte; -} - -static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) -{ - int count = 0; - struct page *pte; - - do { - pte = alloc_pages(GFP_KERNEL, 0); - if (pte) - clear_page(page_address(pte)); - else { - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); - } - } while (!pte && (count++ < 10)); - return pte; -} +extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); +extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); static inline void pte_free_kernel(pte_t *pte) { @@ -92,31 +47,9 @@ static inline void pte_free(struct page #define pmd_free(x) do { } while (0) #define pgd_populate(mm, pmd, pte) BUG() -/* - * TLB flushing: - * - * - flush_tlb() flushes the current mm struct TLBs - * - flush_tlb_all() flushes all processes TLBs - * - flush_tlb_mm(mm) flushes the specified mm context TLB's - * - flush_tlb_page(vma, vmaddr) flushes one page - * - flush_tlb_range(vma, start, end) flushes a range of pages - * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables - */ - -extern void flush_tlb(void); -extern void flush_tlb_all(void); -extern void flush_tlb_mm(struct mm_struct *mm); -extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, - unsigned long end); -extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); -extern void __flush_tlb_page(unsigned long asid, unsigned long page); - -static inline void flush_tlb_pgtables(struct mm_struct *mm, - unsigned long start, unsigned long end) -{ /* Nothing to do */ -} - #if defined(__SH4__) +#define PG_mapped PG_arch_1 + /* * For SH-4, we have our own implementation for ptep_get_and_clear */ Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgtable.h,v retrieving revision 1.7 diff -u -3 -p -r1.7 pgtable.h --- include/asm-sh/pgtable.h 22 Mar 2002 12:57:10 -0000 1.7 +++ include/asm-sh/pgtable.h 12 Apr 2002 02:34:33 -0000 @@ -17,75 +17,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; extern void paging_init(void); -#if defined(__sh3__) -/* Cache flushing: - * - * - flush_cache_all() flushes entire cache - * - flush_cache_mm(mm) flushes the specified mm context's cache lines - * - flush_cache_page(mm, vmaddr) flushes a single page - * - flush_cache_range(vma, start, end) flushes a range of pages - * - * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache - * - flush_page_to_ram(page) write back kernel page to ram - * - flush_icache_range(start, end) flushes(invalidates) a range for icache - * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache - * - * Caches are indexed (effectively) by physical address on SH-3, so - * we don't need them. - */ -#define flush_cache_all() do { } while (0) -#define flush_cache_mm(mm) do { } while (0) -#define flush_cache_range(vma, start, end) do { } while (0) -#define flush_cache_page(vma, vmaddr) do { } while (0) -#define flush_page_to_ram(page) do { } while (0) -#define flush_dcache_page(page) do { } while (0) -#define flush_icache_range(start, end) do { } while (0) -#define flush_icache_page(vma,pg) do { } while (0) -#define flush_icache_user_range(vma,pg,adr,len) do { } while (0) -#define flush_cache_sigtramp(vaddr) do { } while (0) - -#define p3_cache_init() do { } while (0) - -#elif defined(__SH4__) -/* - * Caches are broken on SH-4, so we need them. - */ - -/* Page is 4K, OC size is 16K, there are four lines. */ -#define CACHE_ALIAS 0x00003000 - -extern void flush_cache_all(void); -extern void flush_cache_mm(struct mm_struct *mm); -extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, - unsigned long end); -extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); -extern void flush_dcache_page(struct page *pg); -extern void flush_icache_range(unsigned long start, unsigned long end); -extern void flush_cache_sigtramp(unsigned long addr); -extern void flush_icache_user_range(struct vm_area_struct *vma, - struct page *page, unsigned long addr, - int len); - -#define flush_page_to_ram(page) do { } while (0) -#define flush_icache_page(vma,pg) do { } while (0) - -/* Initialization of P3 area for copy_user_page */ -extern void p3_cache_init(void); - -#define PG_mapped PG_arch_1 - -/* We provide our own get_unmapped_area to avoid cache alias issue */ -#define HAVE_ARCH_UNMAPPED_AREA -#endif - -/* Flush (write-back only) a region (smaller than a page) */ -extern void __flush_wback_region(void *start, int size); -/* Flush (write-back & invalidate) a region (smaller than a page) */ -extern void __flush_purge_region(void *start, int size); -/* Flush (invalidate only) a region (smaller than a page) */ -extern void __flush_invalidate_region(void *start, int size); - - /* * Basically we have the same two-level (which is the logical three level * Linux page table layout folded) page tables as the i386. Index: include/asm-sh/thread_info.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/thread_info.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 thread_info.h --- include/asm-sh/thread_info.h 26 Mar 2002 01:56:39 -0000 1.4 +++ include/asm-sh/thread_info.h 12 Apr 2002 02:34:33 -0000 @@ -43,6 +43,8 @@ struct thread_info { #endif +#define PREEMPT_ACTIVE 0x4000 + /* * macros/functions for gaining access to the thread information structure */ Index: include/asm-sh/tlbflush.h =================================================================== RCS file: include/asm-sh/tlbflush.h diff -N include/asm-sh/tlbflush.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/asm-sh/tlbflush.h 12 Apr 2002 02:34:33 -0000 @@ -0,0 +1,31 @@ +#ifndef __ASM_SH_TLBFLUSH_H +#define __ASM_SH_TLBFLUSH_H + +/* + * TLB flushing: + * + * - flush_tlb() flushes the current mm struct TLBs + * - flush_tlb_all() flushes all processes TLBs + * - flush_tlb_mm(mm) flushes the specified mm context TLB's + * - flush_tlb_page(vma, vmaddr) flushes one page + * - flush_tlb_range(vma, start, end) flushes a range of pages + * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages + * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables + */ + +extern void flush_tlb(void); +extern void flush_tlb_all(void); +extern void flush_tlb_mm(struct mm_struct *mm); +extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, + unsigned long end); +extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); +extern void __flush_tlb_page(unsigned long asid, unsigned long page); + +static inline void flush_tlb_pgtables(struct mm_struct *mm, + unsigned long start, unsigned long end) +{ /* Nothing to do */ +} + +extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); + +#endif /* __ASM_SH_TLBFLUSH_H */ Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.5 diff -u -3 -p -r1.5 unistd.h --- include/asm-sh/unistd.h 10 Apr 2002 11:09:40 -0000 1.5 +++ include/asm-sh/unistd.h 12 Apr 2002 02:34:33 -0000 @@ -248,6 +248,8 @@ #define __NR_tkill 238 #define __NR_sendfile64 239 #define __NR_futex 240 +#define __NR_sched_setaffinity 241 +#define __NR_sched_getaffinity 242 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ |
From: Fabio G. <fg...@ti...> - 2002-04-11 17:40:21
|
Hi, having solved the IRQ hw_interrupt handler problem, I'd like to boot my board for the Compact Flash slot. I'm able (or bettr I soppose to be able bat I have to verify) to set my companion chip (CC) in the rigth way to access the PCMCIA bus. But even if I can access the bus I don't know hao to configure the compact flash so that it becames able to be a bootable devices. Do you suggest to me any domumentation and / or examples to stdy compact flash so that I can improve sh-ipl+g with ide support for my board? Thanks a lot. Fabio |
From: Fabio G. <fg...@ti...> - 2002-04-11 08:57:19
|
Hi, Sirs This is my hamletic question. My board has a companion chip (CC) with its own interrupt enabel registers and its own interrutp status register. When someting wired to my CC generates an interupt request the CC generate an interrupt on IQR0 on my sh7709a. So I have to handle the IQR0 request choosing the rigth handler according to the exact source (keyboad, mouse, timer etc). In linux Sh if I understand good there are two ways to solve this problem: 1) using the IRQ0 handler writing an static struct irqaction irq0 = { CC_interrupt, SA_INTERRUPT, 0, "CC", NULL, NULL}; . . . setup_irq(CONFIG_ISP0110_IRQ, &irq0); . . . where CC_interrupt in the iterrupt handler of IRQ0 and inside this fuction I examine the correct source and I do the rigth thing for the exact interrupt source. 2) implementing a dedicated interrupt handler with a demux function. So i have to write: - static struct hw_interrupt_type CC_irq_type = { "CC-IRQ", startup_CC_irq, shutdown_CC_irq, enable_CC_irq, disable_CC_irq, mask_CC_isp0110, end_CC_irq }; - all these functions - for (i = CC_IRQ_BASE; i < CC_IRQ_BASE + 16; i++) { irq_desc[i].handler = &CC_irq_type; } - static struct irqaction irq_src_1 = { irq_src_1_interrupt, SA_INTERRUPT, 0, "SOURCE 1", NULL, NULL}; - static struct irqaction irq_src_2 = { irq_src_2_interrupt, SA_INTERRUPT, 0, "SOURCE 2", NULL, NULL}; and so on for all my external sources - all the functions irq_src_1_interrupt,irq_src_2_interrupt,... Correct? But here my doubts: 1) which way is the best according to performance; 2) which way is the best according to elegance of solution on the linux kernel; 3) what are the unwished effect of solution n.1 and solution .2 Thanks a lot for your support. |
From: NIIBE Y. <gn...@m1...> - 2002-04-11 08:00:57
|
Fabio Giovagnini wrote: > Thanks, yesterday I was thinking about end I reached the same result about to > implement the demux mechanism. Yes. With demux mechanism, it is possible to re-use drivers written for another system, you see. -- |
From: Fabio G. <fg...@ti...> - 2002-04-11 06:35:35
|
Thanks, yesterday I was thinking about end I reached the same result about to implement the demux mechanism. Thanks again On Wednesday 10 April 2002 20:19, Stuart Menefy wrote: > Several of your options dropped off the end of the email I got here, but > if I understand you correctly, you have exactly the same problem as people > using companion chips such as the HD64465. > > Have a look for the macro irq_demux. This is defined differently for > different systems, but in all cases it is used to demux a single interrupt > comming into the CPU into a number of 'soft' interrupts, based on an > external status register. These soft interrupts appear as interrupt > numbers immediatly above the normal interrupts, so you'll also need to > change the defintion of OFFCHIP_NR_IRQS, and register your device > drivers to respond to these soft interrupt numbers. > > Stuart > > > > On Wed, 10 Apr 2002 10:25:33 +0200 > > fg...@ti... wrote: > > Hi, Sirs > > > > This is my hamletic question. > > > > My board has a companion chip (CC) with its own interrupt enabel > > registers and its own interrutp status register. When someting wired to > > my CC generates an interupt request the CC generate an interrupt on IQR0 > > on my sh7709a. So I have to handle the IQR0 request choosing the rigth > > handler according to the exact source (keyboad, mouse, timer etc). > > In linux Sh if I understand good there are two ways to solve this > > problem: 1) using the IRQ0 handler writing an > > static struct irqaction irq0 = { CC_interrupt, SA_INTERRUPT, 0, "CC", > > NULL, NULL}; |
From: Stuart M. <stu...@st...> - 2002-04-10 18:19:36
|
Several of your options dropped off the end of the email I got here, but if I understand you correctly, you have exactly the same problem as people using companion chips such as the HD64465. Have a look for the macro irq_demux. This is defined differently for different systems, but in all cases it is used to demux a single interrupt comming into the CPU into a number of 'soft' interrupts, based on an external status register. These soft interrupts appear as interrupt numbers immediatly above the normal interrupts, so you'll also need to change the defintion of OFFCHIP_NR_IRQS, and register your device drivers to respond to these soft interrupt numbers. Stuart On Wed, 10 Apr 2002 10:25:33 +0200 fg...@ti... wrote: > Hi, Sirs > > This is my hamletic question. > > My board has a companion chip (CC) with its own interrupt enabel registers > and its own interrutp status register. When someting wired to my CC generates > an interupt request the CC generate an interrupt on IQR0 on my sh7709a. So I > have to handle the IQR0 request choosing the rigth handler according to the > exact source (keyboad, mouse, timer etc). > In linux Sh if I understand good there are two ways to solve this problem: > 1) using the IRQ0 handler writing an > static struct irqaction irq0 = { CC_interrupt, SA_INTERRUPT, 0, "CC", NULL, > NULL}; -- Stuart Menefy stu...@st... STMicroelectronics Ltd ST Intranet: mo.bri.st.com Bristol, UK Rest of the World: www.linuxsh.st.com |
From: Fabio G. <fg...@ti...> - 2002-04-10 13:28:37
|
I thing it not posible to compile with VGA support because Linux SH satndard bios does nto support VGA bioa calls. But you can compile with a framebuffer support. I have a board with a SED1355 framebuffer device and I was able to output the console on the monitor usign the framebuffer. What is your board framebuffer device? regards. On Wednesday 10 April 2002 15:14, Harald Fernengel wrote: > Hi, > > I'm trying to cross-compile a 2.4.18 Kernel for a SH4 7750 testboard with > VGA framebuffer support, but compilation stops because there is no > asm/vga.h file... > > Can anyone please give me a hint what I am doing wrong? > > Best regards, > Harry > > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: Harald F. <ha...@bn...> - 2002-04-10 13:15:37
|
Hi, I'm trying to cross-compile a 2.4.18 Kernel for a SH4 7750 testboard with= VGA=20 framebuffer support, but compilation stops because there is no asm/vga.h=20 file... Can anyone please give me a hint what I am doing wrong? Best regards, Harry |
From: NIIBE Y. <gn...@m1...> - 2002-04-10 11:09:30
|
Changes for traps.c:show_task: Paul, I think that we should output the information to fit in 80-column. The stack is kernel space. Also, we need to correctly handle kernel module, current implementation is simply wrong. I leave the kernel module thing now. Changes for semaphore.h: it's just include errno.h Changes from mainline 2.5.8-pre3. 2002-04-10 NIIBE Yutaka <gn...@m1...> * Makefile: Version 2.5.8-pre3. * AGAINST-2.5.8-pre3: New file. * AGAINST-2.5.8-pre1: Removed. * include/asm-sh/unistd.h: Incorporate changes in 2.5.8-pre2 -> pre3. * drivers/block/rd.c: Likewise. * mm/memory.c: Incorporate changes in 2.5.8-pre1 -> pre2. * fs/nfs/inode.c: Incorporate changes in 2.5.8-pre1 -> pre2. 2002-04-07 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/traps.c (show_task): Don't use __get_user, it's kernel space. Assume 80-column. 2002-04-06 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/semaphore.c: Inlcude <linux/errno.h>. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.14 diff -u -3 -p -r1.14 Makefile --- Makefile 4 Apr 2002 09:14:42 -0000 1.14 +++ Makefile 10 Apr 2002 11:03:26 -0000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 8 -EXTRAVERSION =-pre1-sh +EXTRAVERSION =-pre3-sh KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Index: TODO =================================================================== RCS file: /cvsroot/linuxsh/linux/TODO,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 TODO --- TODO 15 Oct 2001 20:44:31 -0000 1.1.1.1 +++ TODO 10 Apr 2002 11:03:26 -0000 @@ -1,8 +1,3 @@ -* Support zImage with big-endian. - -* include/asm-sh/hw_irq.h - Kernel profiling - * arch/sh/kernel/setup.c (setup_arch): request_resource @@ -82,3 +77,9 @@ DONE: * reboot SR.BL=1 and address error + +* Support zImage with big-endian. + +* include/asm-sh/hw_irq.h + Kernel profiling + Index: arch/sh/kernel/semaphore.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/semaphore.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 semaphore.c --- arch/sh/kernel/semaphore.c 15 Oct 2001 20:44:51 -0000 1.1 +++ arch/sh/kernel/semaphore.c 10 Apr 2002 11:03:26 -0000 @@ -7,6 +7,7 @@ * specific changes in <asm/semaphore-helper.h> */ +#include <linux/errno.h> #include <linux/sched.h> #include <linux/wait.h> #include <asm/semaphore.h> Index: arch/sh/kernel/traps.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/traps.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 traps.c --- arch/sh/kernel/traps.c 1 Mar 2002 07:47:11 -0000 1.4 +++ arch/sh/kernel/traps.c 10 Apr 2002 11:03:26 -0000 @@ -585,18 +585,16 @@ void show_task(unsigned long *sp) printk("\nCall trace: "); while (((long)stack & (THREAD_SIZE - 1))) { - if (__get_user(addr, stack)) { - printk("Failing address 0x%lx\n", *stack); - break; - } - stack++; - + addr = *stack++; if (((addr >= (unsigned long)&_text) && (addr <= (unsigned long)&_etext)) || ((addr >= module_start) && (addr <= module_end))) { - if (i && ((i % 8) == 0)) + /* + * For 80-columns display, 6 entry is maximum. + * NOTE: '[<8c00abcd>] ' consumes 13 columns . + */ + if (i && ((i % 6) == 0)) printk("\n "); - printk("[<%08lx>] ", addr); i++; } Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 rd.c --- drivers/block/rd.c 4 Apr 2002 09:03:54 -0000 1.6 +++ drivers/block/rd.c 10 Apr 2002 11:03:26 -0000 @@ -300,19 +300,13 @@ static int rd_ioctl(struct inode *inode, } up(&inode->i_bdev->bd_sem); break; - case BLKGETSIZE: /* Return device size */ - if (!arg) - break; - error = put_user(rd_kbsize[minor] << 1, (unsigned long *) arg); - break; + case BLKGETSIZE: case BLKGETSIZE64: - error = put_user((u64)rd_kbsize[minor]<<10, (u64*)arg); - break; case BLKROSET: case BLKROGET: case BLKSSZGET: error = blk_ioctl(inode->i_bdev, cmd, arg); - }; + } out: return error; } @@ -419,11 +413,10 @@ static void __exit rd_cleanup (void) /* This is the registration and initialization section of the RAM disk driver */ static int __init rd_init (void) { - int i; + int i; if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 || - (rd_blocksize & (rd_blocksize-1))) - { + (rd_blocksize & (rd_blocksize-1))) { printk("RAMDISK: wrong blocksize %d, reverting to defaults\n", rd_blocksize); rd_blocksize = BLOCK_SIZE; @@ -450,7 +443,8 @@ static int __init rd_init (void) &rd_bd_op, NULL); for (i = 0; i < NUM_RAMDISKS; i++) - register_disk(NULL, mk_kdev(MAJOR_NR,i), 1, &rd_bd_op, rd_size<<1); + register_disk(NULL, mk_kdev(MAJOR_NR,i), 1, &rd_bd_op, + rd_size<<1); #ifdef CONFIG_BLK_DEV_INITRD /* We ought to separate initrd operations here */ @@ -459,10 +453,10 @@ static int __init rd_init (void) INITRD_MINOR, S_IFBLK | S_IRUSR, &rd_bd_op, NULL); #endif - blksize_size[MAJOR_NR] = rd_blocksizes; /* Avoid set_blocksize() check */ - blk_size[MAJOR_NR] = rd_kbsize; /* Size of the RAM disk in kB */ + blksize_size[MAJOR_NR] = rd_blocksizes; /* Avoid set_blocksize() check */ + blk_size[MAJOR_NR] = rd_kbsize; /* Size of the RAM disk in kB */ - /* rd_size is given in kB */ + /* rd_size is given in kB */ printk("RAMDISK driver initialized: " "%d RAM disks of %dK size %d blocksize\n", NUM_RAMDISKS, rd_size, rd_blocksize); Index: fs/nfs/inode.c =================================================================== RCS file: /cvsroot/linuxsh/linux/fs/nfs/inode.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 inode.c --- fs/nfs/inode.c 5 Apr 2002 04:52:10 -0000 1.3 +++ fs/nfs/inode.c 10 Apr 2002 11:03:26 -0000 @@ -72,7 +72,9 @@ static struct super_operations nfs_sops /* * RPC cruft for NFS */ -struct rpc_stat nfs_rpcstat = { &nfs_program }; +struct rpc_stat nfs_rpcstat = { + program: &nfs_program +}; static struct rpc_version * nfs_version[] = { NULL, NULL, @@ -83,11 +85,11 @@ static struct rpc_version * nfs_version[ }; struct rpc_program nfs_program = { - "nfs", - NFS_PROGRAM, - sizeof(nfs_version) / sizeof(nfs_version[0]), - nfs_version, - &nfs_rpcstat, + name: "nfs", + number: NFS_PROGRAM, + nrvers: sizeof(nfs_version) / sizeof(nfs_version[0]), + version: nfs_version, + stats: &nfs_rpcstat, }; static inline unsigned long @@ -635,7 +637,10 @@ nfs_fhget(struct dentry *dentry, struct static struct inode * __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) { - struct nfs_find_desc desc = { fh, fattr }; + struct nfs_find_desc desc = { + fh: fh, + fattr: fattr + }; struct inode *inode = NULL; unsigned long ino; @@ -730,6 +735,8 @@ nfs_notify_change(struct dentry *dentry, struct nfs_fattr fattr; int error; + lock_kernel(); + /* * Make sure the inode is up-to-date. */ @@ -778,6 +785,7 @@ printk("nfs_notify_change: revalidate fa NFS_CACHEINV(inode); error = nfs_refresh_inode(inode, &fattr); out: + unlock_kernel(); return error; } Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 unistd.h --- include/asm-sh/unistd.h 22 Mar 2002 10:52:09 -0000 1.4 +++ include/asm-sh/unistd.h 10 Apr 2002 11:03:26 -0000 @@ -382,4 +382,12 @@ static __inline__ pid_t wait(int * wait_ } #endif +/* + * "Conditional" syscalls + * + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), + * but it doesn't work on all toolchains, so we just do it by hand + */ +#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); + #endif /* __ASM_SH_UNISTD_H */ Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.9 diff -u -3 -p -r1.9 memory.c --- mm/memory.c 22 Mar 2002 10:52:09 -0000 1.9 +++ mm/memory.c 10 Apr 2002 11:03:26 -0000 @@ -48,6 +48,7 @@ #include <asm/pgalloc.h> #include <asm/uaccess.h> #include <asm/tlb.h> +#include <asm/tlbflush.h> unsigned long max_mapnr; unsigned long num_physpages; -- |
From: Stuart M. <stu...@st...> - 2002-04-09 19:16:56
|
Hi there On Tue, 9 Apr 2002 15:14:32 +0200 fg...@ti... wrote: > Hi, > > where could I set the Sense Select of My IRQs? From what I can see in a brief scan of the 7709a manual, the IRQ0-3 pins can be used either in encoded (IRL mode), or as individual pins (IRQ mode). It looks like IRQ4-5 are always in IRQ mode. In encoded mode, you have no choise over the trigger mode. In IRQ mode you can choose rising edge, falling edge or active low. No option for active high. Look at Interrupt Control Register 1 (ICR1) for how to set all this up. The PINT interrupts look to be programmable for active high or low though, using Interrupt Control Register 2 (ICR2). Unfortuntaly the interrupt systems on the various SuperH chips are not orthogonal. Each device has its own set of additions to the basic feature set, so its quite likely that a particular feature may only be present on a subset of the interrupts on a particular device. So for example, just because the PINT interrupts can be programmed for active high/low, don't expect the IRQ interrupts to be similarly programmable. > Again, where and how I can an IRQ form a companion chip multiplaxing the > interrupt sources? We've always done it using an FPGA or GAL. But I would guess a standard priority encoder, something like a 74HCT147, would do the job. Stuart -- Stuart Menefy stu...@st... STMicroelectronics Ltd ST Intranet: mo.bri.st.com Bristol, UK Rest of the World: www.linuxsh.st.com |
From: Fabio G. <fg...@ti...> - 2002-04-09 13:17:36
|
Hi, where could I set the Sense Select of My IRQs? Again, where and how I can an IRQ form a companion chip multiplaxing the interrupt sources? Thanks |
From: NIIBE Y. <gn...@m1...> - 2002-04-09 01:05:51
|
I've tested different change in 2.5, and that's one seems be better. So, backported to 2.4. 2002-04-09 NIIBE Yutaka <gn...@m1...> * fs/nfs/inode.c (nfs_find_actor): Don't touch i_mode, but return 0 when i_mode mismatch. Index: fs/nfs/inode.c =================================================================== RCS file: /cvsroot/linuxsh/linux/fs/nfs/inode.c,v retrieving revision 1.1.2.2 diff -u -3 -p -r1.1.2.2 inode.c --- fs/nfs/inode.c 20 Mar 2002 00:11:31 -0000 1.1.2.2 +++ fs/nfs/inode.c 9 Apr 2002 01:03:18 -0000 @@ -677,9 +677,11 @@ nfs_find_actor(struct inode *inode, unsi return 0; if (memcmp(&inode->u.nfs_i.fh, fh, sizeof(inode->u.nfs_i.fh)) != 0) return 0; + if ((inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) + return 0; /* Force an attribute cache update if inode->i_count == 0 */ if (!atomic_read(&inode->i_count)) - inode->i_mode = 0; + NFS_CACHEINV(inode); return 1; } |
From: NIIBE Y. <gn...@m1...> - 2002-04-09 00:30:15
|
Fabio Giovagnini wrote: > Hi everybody, and in particular hi Stuart. > I have a question: > what are the steps to enable a keybord. > I was able to enable a framebuffer, but I have trouble to understand what is > the way to enable a keybord. Perhaps, most easy way is using something like Super I/O chip like SolutionEngine (if you need PC keyboard driver). You can check arch/sh/kernel/setup_se.c. Another way is using key-matrix, like HP Jornada 620. You can check driver/char/scan_keyb.c. -- |
From: Fabio G. <fg...@ti...> - 2002-04-08 15:33:53
|
Hi everybody, and in particular hi Stuart. I have a question: what are the steps to enable a keybord. I was able to enable a framebuffer, but I have trouble to understand what is the way to enable a keybord. Thanks for the support. Regards. |
From: Stuart M. <stu...@st...> - 2002-04-05 18:38:20
|
I just happen to be using a 7750 Solution Engine at the moment, with an NFS mounted root fs. This is the full config I'm using: CONFIG_SUPERH=y CONFIG_UID16=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_EXPERIMENTAL=y CONFIG_MODULES=y CONFIG_SH_SOLUTION_ENGINE=y CONFIG_SH_RTC=y CONFIG_CPU_SUBTYPE_SH7750=y CONFIG_CPU_SH4=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MEMORY_START=0c000000 CONFIG_MEMORY_SIZE=02000000 CONFIG_MEMORY_SET=y CONFIG_BIGPHYS_AREA=y CONFIG_ZIMAGE_ROM=y CONFIG_ZIMAGE_ROM_START=00040000 CONFIG_ISA=y CONFIG_NET=y CONFIG_SYSVIPC=y CONFIG_SYSCTL=y CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_PNP=y CONFIG_IP_PNP_DHCP=y CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_STNIC=y CONFIG_SH_SCI=y CONFIG_SERIAL_CONSOLE=y CONFIG_HEARTBEAT=y CONFIG_RTC=y CONFIG_PROC_FS=y CONFIG_EXT2_FS=y CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y CONFIG_SUNRPC=y CONFIG_LOCKD=y CONFIG_MSDOS_PARTITION=y CONFIG_MAGIC_SYSRQ=y The important ones for NFS mounting are: CONFIG_NET=y (General setup->Networking support) CONFIG_INET=y (Networking options->TCP/IP networking) CONFIG_IP_PNP=y (Networking options->IP: kernel level autoconfiguration) CONFIG_NETDEVICES=y (Network device support->Network device support) CONFIG_NET_ETHERNET=y (" -> Ethernet (10 or 100 Mbit) CONFIG_STNIC=y (" -> " -> National DP3902AV support) CONFIG_NFS_FS=y (File systems->Network file systems->NFS file system support) CONFIG_ROOT_NFS=y ("->"->Root file system on NFS) This assumes the 7709 Solution Engine uses the same network adaptor as the 7750 version. I don't know. Your command line options look good, except that with that netmask you used won't allow your machine see the gateway machine. Make sure you can at least ping the target, to ensure networking is OK. Stuart On Thu, 4 Apr 2002 18:36:32 +0200 aki...@ho... wrote: > > > Hello to all, > > > > > now my kernel work, but I do not succeed to mount a NFS filesystem. > > > > > On the host computer work: portmapper, mountd, nfs. I have shaped also the file export. > > > > > What means: > > > > > VFS: Cannot open root device "nfs" or 00:ff > > Please append a correct "root=" boot option > > Kernel panic: VFS: Unable to mount root fs on 00:ff > > > > > What I can make in order to make he to work correctly? > > > > > Which are the options that I must choose in menuconfig in order making to work the kernel with a NFS filesystem? > > > > > Thanks! > > SH IPL+g version 0.11, Copyright (C) 2001 Free Software Foundation, Inc. > > This software comes with ABSOLUTELY NO WARRANTY; for details type `w'. > > This is free software, and you are welcome to redistribute it under > > certain conditions; type `l' for details. > > > > > > h > > SH IPL+g version 0.11, Copyright (C) 2001 Free Software Foundation, Inc. > > ? --- Show this message (HELP) > > b --- Boot the system > > g --- Invoke GDB stub > > l --- Show about license > > w --- Show about (no)warranty > > > > > e --- Ether Boot > > > e > > Booting from network! > > Searching for server (BOOTP/DHCP)... > > <sleep> > > IP Address: 1.255.12.12 > > Server: 1.255.12.237, Gateway 1.255.8.1 > > Kernel to load: "/tftpboot/boot/zImage" > > HOSTNAME: terra > > ROOT PATH: /home/akira/project/finale/tmp/rootfsdir > > Loading Kernel: /tftpboot/boot/zImage ............................................................................................................................................................................................................................................................................................................SUM: 25f9c0f > > done > > Uncompressing Linux... Ok, booting the kernel. > > Linux version 2.4.18-sh (root@linux) (gcc version 3.0.3) #11 Fri Mar 29 16:22:37 CET 2002 > > On node 0 totalpages: 4096 > > zone(0): 4096 pages. > > zone(1): 0 pages. > > zone(2): 0 pages. > > Kernel command line: mem=16M sh_mv=SolutionEngine console=ttySC1,115200 root=/dev/nfs rw nfsroot=1.255.12.237:/home/akira/project/finale/tmp/rootfsdir ip=1.255.12.12:1.255.12.237:1.255.8.1:255.255.255.0:terra:eth0:off > > Setting GDB trap vector to 0x80000100 > > CPU clock: 133.34MHz > > Bus clock: 66.67MHz > > Module clock: 33.33MHz > > Interval = 83338 > > Linux version 2.4.18-sh (root@linux) (gcc version 3.0.3) #11 Fri Mar 29 16:22:37 CET 2002 > > Linux version 2.4.18-sh (root@linux) (gcc version 3.0.3) #11 Fri Mar 29 16:22:37 CET 2002 > > On node 0 totalpages: 4096 > > On node 0 totalpages: 4096 > > zone(0): 4096 pages. > > zone(0): 4096 pages. > > zone(1): 0 pages. > > zone(1): 0 pages. > > zone(2): 0 pages. > > zone(2): 0 pages. > > Kernel command line: mem=16M sh_mv=SolutionEngine console=ttySC1,115200 root=/dev/nfs rw nfsroot=1.255.12.237:/home/akira/project/finale/tmp/rootfsdir ip=1.255.12.12:1.255.12.237:1.255.8.1:255.255.255.0:terra:eth0:off > > Kernel command line: mem=16M sh_mv=SolutionEngine console=ttySC1,115200 root=/dev/nfs rw nfsroot=1.255.12.237:/home/akira/project/finale/tmp/rootfsdir ip=1.255.12.12:1.255.12.237:1.255.8.1:255.255.255.0:terra:eth0:off > > Setting GDB trap vector to 0x80000100 > > Setting GDB trap vector to 0x80000100 > > CPU clock: 133.34MHz > > CPU clock: 133.34MHz > > Bus clock: 66.67MHz > > Bus clock: 66.67MHz > > Module clock: 33.33MHz > > Module clock: 33.33MHz > > Interval = 83338 > > Interval = 83338 > > Calibrating delay loop... 66.56 BogoMIPS > > Memory: 15452k/16384k available (495k kernel code, 932k reserved, 18k data, 24k init) > > Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes) > > Inode-cache hash table entries: 1024 (order: 1, 8192 bytes) > > Mount-cache hash table entries: 512 (order: 0, 4096 bytes) > > Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) > > Page-cache hash table entries: 4096 (order: 2, 16384 bytes) > > CPU: SH7709A/SH7729 > > POSIX conformance testing by UNIFIX > > Linux NET4.0 for Linux 2.4 > > Based upon Swansea University Computer Society NET3.039 > > Initializing RT netlink socket > > Starting kswapd > > SuperH SCI(F) driver initialized > > ttySC0 at 0xfffffe80 is a SCI > > ttySC1 at 0xa4000150 is a SCIF > > ttySC2 at 0xa4000140 is a SCIF > > block: 64 slots per queue, batch=16 > > VFS: Cannot open root device "nfs" or 00:ff > > Please append a correct "root=" boot option > > Kernel panic: VFS: Unable to mount root fs on 00:ff > > -- Stuart Menefy stu...@st... STMicroelectronics Ltd ST Intranet: mo.bri.st.com Bristol, UK Rest of the World: www.linuxsh.st.com |
From: NIIBE Y. <gn...@m1...> - 2002-04-05 09:04:02
|
2002-04-05 NIIBE Yutaka <gn...@m1...> Bug fix for thread_info. * arch/sh/kernel/ptrace.c (get_stack_long): Use task->thread_info. (put_stack_long): Likewise. (sys_ptrace): Likewise. Index: arch/sh/kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/ptrace.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 ptrace.c --- arch/sh/kernel/ptrace.c 22 Mar 2002 12:57:10 -0000 1.4 +++ arch/sh/kernel/ptrace.c 5 Apr 2002 08:57:40 -0000 @@ -39,7 +39,7 @@ static inline int get_stack_long(struct { unsigned char *stack; - stack = (unsigned char *)task + THREAD_SIZE - sizeof(struct pt_regs); + stack = (unsigned char *)task->thread_info + THREAD_SIZE - sizeof(struct pt_regs); stack += offset; return (*((int *)stack)); } @@ -52,7 +52,7 @@ static inline int put_stack_long(struct { unsigned char *stack; - stack = (unsigned char *)task + THREAD_SIZE - sizeof(struct pt_regs); + stack = (unsigned char *)task->thread_info + THREAD_SIZE - sizeof(struct pt_regs); stack += offset; *(unsigned long *) stack = data; return 0; @@ -316,7 +316,7 @@ asmlinkage int sys_ptrace(long request, /* Compute next pc. */ pc = get_stack_long(child, (long)&dummy->pc); - regs = (struct pt_regs *)((unsigned long)child + THREAD_SIZE - sizeof(struct pt_regs)); + regs = (struct pt_regs *)(THREAD_SIZE + (unsigned long)child->thread_info) - 1; if (access_process_vm(child, pc&~3, &tmp, sizeof(tmp), 0) != sizeof(tmp)) break; @@ -331,7 +331,7 @@ asmlinkage int sys_ptrace(long request, else insn = tmp >> 16; #endif - compute_next_pc (regs, insn, &nextpc1, &nextpc2); + compute_next_pc(regs, insn, &nextpc1, &nextpc2); if (nextpc1 & 0x80000000) break; |
From: Fabio G. <fg...@ti...> - 2002-04-05 06:52:46
|
Claer. Thanks. Fabio On Friday 05 April 2002 07:23, CHU LIH KWEK-HMSA wrote: > Fabio > > If you think of x86 System, the Vga Controller I/O Memory is at 0x3C0 for > I/O registars. Frame Buffer Memory is usually at A0000. SH don't have I/O > memory Map Area. So you need to remap the I/O area to the memory map. As > for the Frame Buffer Memory Location, you must see where the Frame Memory > Buffer will be located in your system. For example VGA Card Base Address is > 0xA1000000, then 0xA10003C0 is the start of the registers that you need to > initialise. 0XA10A0000 could be your frame buffer address if the address in > the Video Chip is set to that address. You just need to write data into the > Framebuffer and you will changes to the image on Screen. Please look at the > Chip Specifications. Normally, VGA don't need to use interrupts. > > Keyboard, you need to remap the I/O area and the irq number. Search for > irq_request. irq_request will hook your interrupt handler with a particular > interrupt. The interrupt number that is link to the interrupt handler is a > shifted number from INTEVT. > > For PC irq 1 is used for Keyboard , 12 for mouse. Therefore ensure that > your Keyboard IRQ is linked directly to IRQ 1. If you are using a companion > Chip, you might need to decode the Companion Chip Interrupts in the main > Interrupt routine DO_IRQ in irq.c (ALL interrupts comes in here to decode > the IRQ number and search for the interrupt handle and run it) and give > the new interrupt number to the function (which means you are remapping the > IRQ). > > > regards > kwek > > > -----Original Message----- > From: Fabio Giovagnini [mailto:fg...@ti...] > Sent: 04 April 2002 19:00 > To: Stuart Menefy > Cc: lin...@m1...; lin...@li... > Subject: [linux-sh:02308] !!! HELP - Video framebuffer and keyboard for > LINUXSH !!! > > > I found what was the problem of the interrupt (PINT initialization); > Now, where can I find the guidelines to implement the support for video in > framebuffer and keyboard? > > On Wednesday 03 April 2002 20:18, Stuart Menefy wrote: > > Fabio > > > > If you look at the bit of code in assembler, it reads the value from > > the INTEVT register, shifts right by 5 and subtracts 16. So an interrupt > > code of 0xd corrisponds to INTEVT code of 0x3a0. Have a look at the > > interrupt code table in the appropriate manual, and you'll see which > > interrupt this corrisponds to. I don't have a 7709 manual to hand, > > but IIRC this is an external interrupt on all SuperH parts. > > > > So something on your board is raising an interrupt, and this error > > message is saying that there is no interrupt handler installed to > > handle it. > > > > This could just be a mis-configuration issue. The interrupt controllers > > on some of the SH3's have quite a few modes and config registers. When > > your board was designed, they probably intended the interrupt controller > > to be set up in a particular way, make sure you're doing this. > > > > Alternativly something on your board really is raising an interrupt. > > > > Hopefully your board has some external logic to control enabling and > > disabling of interrupts from peripherials, so maybe this needs to be > > set up before you enable interrupts at the CPU level. > > > > Or maybe the device which is raising the interrupt at boot time needs > > to be initialised first. > > > > Either would be pretty grotty, most devices power up with interrupts > > disabled and/or inactive until you do something to provoke them, but > > it wouldn't be the first time somebody had designed hardware that didn't > > work that way. > > > > If all else fails, you could look at using the irq_imask routines to > > disable the interrupt using the IMASK in the status register, but > > that should be a last resort, as it results in all interrupts of lower > > priority being disabled, so could disbale something you need. > > > > Hope this helps > > > > Stuart > > > > > > > > On Wed, 3 Apr 2002 16:12:28 +0200 > > > > fg...@ti... wrote: > > > Sorry, > > > but I don't understand what means: > > > "unexpected IRQ trap at vector 0d" > > > > > > I suppose it is an interrupt always entering but I don't understand > > > what is its source. > > > > > > Thanks. > > > > > > Fabio > > > > > > On Tuesday 02 April 2002 14:27, Stuart Menefy wrote: > > > > Hi Fabio > > > > > > > > You might like to have a look at the 'board porting guide' a > > > > colleague here wrote. Have a look at: > > > > http://www.linuxsh.st.com/getting_started/board_porting.php3 > > > > > > > > As far as I know, you'll be the first person to try it in anger, so > > any > > > > > comments welcome! > > > > > > > > You're right, it sounds like you have a pending interrupt. So the > > first > > > > > thing I'd do is stick a printk at the start of do_IRQ(), and print > > > > the irq number (just after the little bit of asm code which retreives > > > > it). > > > > > > > > Stuart > > > > > > > > > > > > On Fri, 29 Mar 2002 10:55:32 +0100 > > > > > > > > fg...@ti... wrote: > > > > > Hi, Stuart, > > > > > I' porting linux SH on my sh3 7709a based board. > > > > > I'm able to compile and run for my board sh-boot got from CVS > > > > > repository, I'm able to compile the kernel 2.4.18 and I can boot it > > > > > using gdb. > > > > > > > > > > Making a debug using printk("...."); while(1); to understant I see > > > > > that kernel stops execution at init/main.c -> start_kernel -> > > > > > sti(); > > > > > > > > > > I compiled my kernel as my board were a SolutionEngine, but my > > > > > board isn't a SolutionEngine. > > > > > > > > > > Having read the Documentation/sh/ document from the CVS kernel and > > > > > seeing you are the father of sh_mv model, I write to you for > > > > > asking: 1) Is it possible when I enable the interrupt mask with > > > > > sti() an interrupt pending occurs which I have no handler for? > > > > > > > > > > 2) There is an optiminezed way to trace this kind of troubles? > > > > > > > > > > > > > > > Thanks a lot. > > > > > > > > > > Fabio |
From: CHU L. KWEK-H. <clk...@ha...> - 2002-04-05 05:24:18
|
Fabio If you think of x86 System, the Vga Controller I/O Memory is at 0x3C0 for I/O registars. Frame Buffer Memory is usually at A0000. SH don't have I/O memory Map Area. So you need to remap the I/O area to the memory map. As for the Frame Buffer Memory Location, you must see where the Frame Memory Buffer will be located in your system. For example VGA Card Base Address is 0xA1000000, then 0xA10003C0 is the start of the registers that you need to initialise. 0XA10A0000 could be your frame buffer address if the address in the Video Chip is set to that address. You just need to write data into the Framebuffer and you will changes to the image on Screen. Please look at the Chip Specifications. Normally, VGA don't need to use interrupts. Keyboard, you need to remap the I/O area and the irq number. Search for irq_request. irq_request will hook your interrupt handler with a particular interrupt. The interrupt number that is link to the interrupt handler is a shifted number from INTEVT. For PC irq 1 is used for Keyboard , 12 for mouse. Therefore ensure that your Keyboard IRQ is linked directly to IRQ 1. If you are using a companion Chip, you might need to decode the Companion Chip Interrupts in the main Interrupt routine DO_IRQ in irq.c (ALL interrupts comes in here to decode the IRQ number and search for the interrupt handle and run it) and give the new interrupt number to the function (which means you are remapping the IRQ). regards kwek -----Original Message----- From: Fabio Giovagnini [mailto:fg...@ti...] Sent: 04 April 2002 19:00 To: Stuart Menefy Cc: lin...@m1...; lin...@li... Subject: [linux-sh:02308] !!! HELP - Video framebuffer and keyboard for LINUXSH !!! I found what was the problem of the interrupt (PINT initialization); Now, where can I find the guidelines to implement the support for video in framebuffer and keyboard? On Wednesday 03 April 2002 20:18, Stuart Menefy wrote: > Fabio > > If you look at the bit of code in assembler, it reads the value from > the INTEVT register, shifts right by 5 and subtracts 16. So an interrupt > code of 0xd corrisponds to INTEVT code of 0x3a0. Have a look at the > interrupt code table in the appropriate manual, and you'll see which > interrupt this corrisponds to. I don't have a 7709 manual to hand, > but IIRC this is an external interrupt on all SuperH parts. > > So something on your board is raising an interrupt, and this error > message is saying that there is no interrupt handler installed to > handle it. > > This could just be a mis-configuration issue. The interrupt controllers > on some of the SH3's have quite a few modes and config registers. When > your board was designed, they probably intended the interrupt controller > to be set up in a particular way, make sure you're doing this. > > Alternativly something on your board really is raising an interrupt. > > Hopefully your board has some external logic to control enabling and > disabling of interrupts from peripherials, so maybe this needs to be > set up before you enable interrupts at the CPU level. > > Or maybe the device which is raising the interrupt at boot time needs > to be initialised first. > > Either would be pretty grotty, most devices power up with interrupts > disabled and/or inactive until you do something to provoke them, but > it wouldn't be the first time somebody had designed hardware that didn't > work that way. > > If all else fails, you could look at using the irq_imask routines to > disable the interrupt using the IMASK in the status register, but > that should be a last resort, as it results in all interrupts of lower > priority being disabled, so could disbale something you need. > > Hope this helps > > Stuart > > > > On Wed, 3 Apr 2002 16:12:28 +0200 > > fg...@ti... wrote: > > Sorry, > > but I don't understand what means: > > "unexpected IRQ trap at vector 0d" > > > > I suppose it is an interrupt always entering but I don't understand what > > is its source. > > > > Thanks. > > > > Fabio > > > > On Tuesday 02 April 2002 14:27, Stuart Menefy wrote: > > > Hi Fabio > > > > > > You might like to have a look at the 'board porting guide' a colleague > > > here wrote. Have a look at: > > > http://www.linuxsh.st.com/getting_started/board_porting.php3 > > > > > > As far as I know, you'll be the first person to try it in anger, so any > > > comments welcome! > > > > > > You're right, it sounds like you have a pending interrupt. So the first > > > thing I'd do is stick a printk at the start of do_IRQ(), and print the > > > irq number (just after the little bit of asm code which retreives it). > > > > > > Stuart > > > > > > > > > On Fri, 29 Mar 2002 10:55:32 +0100 > > > > > > fg...@ti... wrote: > > > > Hi, Stuart, > > > > I' porting linux SH on my sh3 7709a based board. > > > > I'm able to compile and run for my board sh-boot got from CVS > > > > repository, I'm able to compile the kernel 2.4.18 and I can boot it > > > > using gdb. > > > > > > > > Making a debug using printk("...."); while(1); to understant I see > > > > that kernel stops execution at init/main.c -> start_kernel -> sti(); > > > > > > > > I compiled my kernel as my board were a SolutionEngine, but my board > > > > isn't a SolutionEngine. > > > > > > > > Having read the Documentation/sh/ document from the CVS kernel and > > > > seeing you are the father of sh_mv model, I write to you for asking: > > > > 1) Is it possible when I enable the interrupt mask with sti() an > > > > interrupt pending occurs which I have no handler for? > > > > > > > > 2) There is an optiminezed way to trace this kind of troubles? > > > > > > > > > > > > Thanks a lot. > > > > > > > > Fabio |
From: NIIBE Y. <gn...@m1...> - 2002-04-05 04:47:48
|
NIIBE Yutaka wrote: > I've added fs/nfs/inode.c to record this change. It's for linux-2_4 > branch only. When I find it's also there in 2.5, I'll add it > linux-current branch too. I've added it to linux-current branch. -- |
From: NIIBE Y. <gn...@m1...> - 2002-04-05 04:44:42
|
Fix divergence. When joystick driver has been moved, we didn't update the files. Now done. 2002-04-05 NIIBE Yutaka <gn...@m1...> * drivers/input/joystick/Config.in: Updated to 2.5.8-pre1. * drivers/input/joystick/Config.help: Ditto. * drivers/input/joystick/Makefile: Ditto. * drivers/net/Config.in: Ditto. * arch/sh/kernel/pci-sh7751.c: Martin's e-mail change to ucw.cz. (follow the change of arch/i386/*.) * drivers/video/epson1355fb.c (e1355fb_init): Use NODEV Instead of -1. Index: arch/sh/kernel/pci-sh7751.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/pci-sh7751.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 pci-sh7751.c --- arch/sh/kernel/pci-sh7751.c 15 Oct 2001 20:44:49 -0000 1.1 +++ arch/sh/kernel/pci-sh7751.c 5 Apr 2002 04:41:02 -0000 @@ -3,7 +3,7 @@ * * Dustin McIntire (du...@se...) * Derived from arch/i386/kernel/pci-*.c which bore the message: - * (c) 1999--2000 Martin Mares <mj...@su...> + * (c) 1999--2000 Martin Mares <mj...@uc...> * * May be copied or modified under the terms of the GNU General Public * License. See linux/COPYING for more information. Index: drivers/input/joystick/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/input/joystick/Config.help,v retrieving revision 1.1 diff -u -3 -p -r1.1 Config.help --- drivers/input/joystick/Config.help 19 Mar 2002 23:50:07 -0000 1.1 +++ drivers/input/joystick/Config.help 5 Apr 2002 04:41:02 -0000 @@ -1,274 +1,181 @@ -CONFIG_INPUT_GAMEPORT - Gameport support is for the standard 15-pin PC gameport. If you - have a joystick, gamepad, gameport card, a soundcard with a gameport - or anything else that uses the gameport, say Y or M here and also to - at least one of the hardware specific drivers. - Please read the file <file:Documentation/input/joystick.txt> which - contains more information and the location of the joystick package - that you'll need if you use the gameport with a joystick. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called gameport.o. If you want to compile it as - a module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_NS558 - Say Y here if you have an ISA or PnP gameport. - For more information on how to use the driver please read - <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK + If you have a joystick, 6dof controller, gamepad, steering wheel, + weapon control system or something like that you can say Y here + and the list of supported devices will be displayed. This option + doesn't affect the kernel. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called ns558.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_LIGHTNING - Say Y here if you have a PDPI Lightning 4 gamecard. For more - information on how to use the driver please read - <file:Documentation/input/joystick.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called lightning.o. If you want to compile it as - a module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_CS461X - Say Y here if you have a Cirrus CS461x aka "Crystal SoundFusion" - PCI audio accelerator. A product page for the CS4614 is at - <http://www.cirrus.com/design/products/overview/index.cfm?ProductID=40>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called cs461x.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_PCIGAME - Say Y here if you have a Trident 4DWave DX/NX or Aureal Vortex 1/2 - card. For more information on how to use the driver please read - <file:Documentation/input/joystick.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called pcigame.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. + Please read the file <file:Documentation/input/joystick.txt> which + contains more information. -CONFIG_INPUT_EMU10K1 - Say Y here if you have a SoundBlaster Live! card and want to use - its gameport. For more information on how to use the driver - please read <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_ANALOG + Say Y here if you have a joystick that connects to the PC + gameport. In addition to the usual PC analog joystick, this driver + supports many extensions, including joysticks with throttle control, + with rudders, additional hats and buttons compatible with CH + Flightstick Pro, ThrustMaster FCS, 6 and 8 button gamepads, or + Saitek Cyborg joysticks. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called emu10k1-gp.o. If you want to compile it as - a module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_ANALOG - Say Y here if you have a controller that connects to the PC - gameport. This supports many different types, including joysticks - with throttle control, with rudders, or with extensions like - additional hats and buttons compatible with CH Flightstick Pro, - ThrustMaster FCS, 6 and 8 button gamepads, or Saitek Cyborg - joysticks. For more information on how to use the driver please - read <file:Documentation/input/joystick.txt>. + Please read the file <file:Documentation/input/joystick.txt> which + contains more information. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called analog.o. If you want to compile it as a + The module will be called analog.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_A3D +CONFIG_JOYSTICK_A3D Say Y here if you have an FPGaming or MadCatz controller using the - A3D protocol over the PC gameport. For more information on how to - use the driver please read <file:Documentation/input/joystick.txt>. + A3D protocol over the PC gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called a3d.o. If you want to compile it as a + The module will be called a3d.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_ADI +CONFIG_JOYSTICK_ADI Say Y here if you have a Logitech controller using the ADI - protocol over the PC gameport. For more information on how to use - the driver please read <file:Documentation/input/joystick.txt>. + protocol over the PC gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called adi.o. If you want to compile it as a + The module will be called adi.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_COBRA +CONFIG_JOYSTICK_COBRA Say Y here if you have a Creative Labs Blaster Cobra gamepad. - For more information on how to use the driver please read - <file:Documentation/input/joystick.txt>. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called cobra.o. If you want to compile it as a + The module will be called cobra.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_GF2K +CONFIG_JOYSTICK_GF2K Say Y here if you have a Genius Flight2000 or MaxFighter digitally - communicating joystick or gamepad. For more information on how to - use the driver please read <file:Documentation/input/joystick.txt>. + communicating joystick or gamepad. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called gf2k.o. If you want to compile it as a + The module will be called gf2k.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_GRIP +CONFIG_JOYSTICK_GRIP Say Y here if you have a Gravis controller using the GrIP protocol - over the PC gameport. For more information on how to use the driver - please read <file:Documentation/input/joystick.txt>. + over the PC gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called grip.o. If you want to compile it as a + The module will be called grip.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_INTERACT - Say Y hereif you have an InterAct gameport or joystick - communicating digitally over the gameport. For more information on - how to use the driver please read <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_INTERACT + Say Y here if you have an InterAct gameport or joystick + communicating digitally over the gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called interact.o. If you want to compile it as + The module will be called interact.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_TMDC - Say Y here if you have a ThrustMaster controller using the - DirectConnect (BSP) protocol over the PC gameport. For more - information on how to use the driver please read - <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_SIDEWINDER + Say Y here if you have a Microsoft controller using the Digital + Overdrive protocol over PC gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called tmdc.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. + The module will be called sidewinder.o. If you want to compile it + as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_SIDEWINDER - Say Y here if you have a Microsoft controller using the Digital - Overdrive protocol over PC gameport. For more information on how to - use the driver please read <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_TMDC + Say Y here if you have a ThrustMaster controller using the + DirectConnect (BSP) protocol over the PC gameport. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called sidewinder.o. If you want to compile it - as a module, say M here and read <file:Documentation/modules.txt>. + The module will be called tmdc.o. If you want to compile it as a + module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_SERIO - Say Y here and to the Serial port input line discipline option if - you plan to use a joystick that communicates over the serial (COM) - port. For more information on how to use the driver please read - <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_IFORCE_USB + Say Y here if you have an I-Force joystick or steering wheel + connected to your USB port. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called sidewinder.o. If you want to compile it - as a module, say M here and read <file:Documentation/modules.txt>. + The module will be called iforce.o. If you want to compile it as a + module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_SERPORT - Say Y here if you plan to use a joystick that communicates over the - serial (COM) port. For more information on how to use the driver - please read <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_IFORCE_232 + Say Y here if you have an I-Force joystick or steering wheel + connected to your serial (COM) port. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called serport.o. If you want to compile it as a + The module will be called iforce.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_WARRIOR +CONFIG_JOYSTICK_WARRIOR Say Y here if you have a Logitech WingMan Warrior joystick connected - to your computer's serial port. For more information on how to use - the driver please read <file:Documentation/input/joystick.txt>. + to your computer's serial port. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called warrior.o. If you want to compile it as a + The module will be called warrior.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_MAGELLAN +CONFIG_JOYSTICK_MAGELLAN Say Y here if you have a Magellan or Space Mouse 6DOF controller - connected to your computer's serial port. For more information on - how to use the driver please read <file:Documentation/input/joystick.txt>. + connected to your computer's serial port. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called magellan.o. If you want to compile it as + The module will be called magellan.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_SPACEORB +CONFIG_JOYSTICK_SPACEORB Say Y here if you have a SpaceOrb 360 or SpaceBall Avenger 6DOF - controller connected to your computer's serial port. For more - information on how to use the driver please read - <file:Documentation/input/joystick.txt>. + controller connected to your computer's serial port. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called spaceorb.o. If you want to compile it as + The module will be called spaceorb.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_SPACEBALL - Say Y here if you have a SpaceTec SpaceBall 4000 FLX controller - connected to your computer's serial port. For more information on - how to use the driver please read <file:Documentation/input/joystick.txt>. +CONFIG_JOYSTICK_SPACEBALL + Say Y here if you have a SpaceTec SpaceBall 2003/3003/4000 FLX + controller connected to your computer's serial port. For the + SpaceBall 4000 USB model, use the USB HID driver. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called spaceball.o. If you want to compile it as + The module will be called spaceball.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_STINGER +CONFIG_JOYSTICK_STINGER Say Y here if you have a Gravis Stinger connected to one of your - serial ports. For more information on how to use the driver please - read <file:Documentation/input/joystick.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called stinger.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_IFORCE_232 - Say Y here if you have an I-Force joystick or steering wheel - connected to your serial (COM) port. For more information on how - to use the driver please read <file:Documentation/input/joystick.txt>. + serial ports. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called iforce.o. If you want to compile it as a + The module will be called stinger.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_IFORCE_USB - Say Y here if you have an I-Force joystick or steering wheel - connected to your USB port. For more information on how to use the - driver please read <file:Documentation/input/joystick.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called iforce.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -CONFIG_INPUT_DB9 +CONFIG_JOYSTICK_DB9 Say Y here if you have a Sega Master System gamepad, Sega Genesis gamepad, Sega Saturn gamepad, or a Multisystem -- Atari, Amiga, Commodore, Amstrad CPC joystick connected to your parallel port. For more information on how to use the driver please read - <file:Documentation/input/joystick.txt> and <file:Documentation/input/joystick-parport.txt>. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called db9.o. If you want to compile it as a + The module will be called db9.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_GAMECON +CONFIG_JOYSTICK_GAMECON Say Y here if you have a Nintendo Entertainment System gamepad, Super Nintendo Entertainment System gamepad, Nintendo 64 gamepad, Sony PlayStation gamepad or a Multisystem -- Atari, Amiga, Commodore, Amstrad CPC joystick connected to your parallel port. For more information on how to use the driver please read - <file:Documentation/input/joystick.txt> and <file:Documentation/input/joystick-parport.txt>. This driver is also available as a module ( = code which can be @@ -276,25 +183,23 @@ CONFIG_INPUT_GAMECON The module will be called gamecon.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_TURBOGRAFX +CONFIG_JOYSTICK_TURBOGRAFX Say Y here if you have the TurboGraFX interface by Steffen Schwenke, and want to use it with Multisystem -- Atari, Amiga, Commodore, - Amstrad CPC joystick. For more information on how to use the driver - please read <file:Documentation/input/joystick.txt> and - <file:Documentation/input/joystick-parport.txt>. + Amstrad CPC joystick. For more information on how to use the driver + please read <file:Documentation/input/joystick-parport.txt>. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called turbografx.o. If you want to compile it + The module will be called turbografx.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_INPUT_AMIJOY +CONFIG_JOYSTICK_AMIJOY Say Y here if you have an Amiga with a digital joystick connected - to it. For more information on how to use the driver please read - <file:Documentation/input/joystick.txt>. + to it. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called joy-amiga.o. If you want to compile it as + The module will be called joy-amiga.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. Index: drivers/input/joystick/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/input/joystick/Config.in,v retrieving revision 1.1 diff -u -3 -p -r1.1 Config.in --- drivers/input/joystick/Config.in 19 Mar 2002 23:50:07 -0000 1.1 +++ drivers/input/joystick/Config.in 5 Apr 2002 04:41:02 -0000 @@ -2,57 +2,34 @@ # Joystick driver configuration # -mainmenu_option next_comment -comment 'Joysticks' +bool 'Joysticks' CONFIG_INPUT_JOYSTICK -if [ "$CONFIG_INPUT" != "n" ]; then - dep_tristate 'Game port support' CONFIG_INPUT_GAMEPORT $CONFIG_INPUT - dep_tristate ' Classic ISA/PnP gameports' CONFIG_INPUT_NS558 $CONFIG_INPUT_GAMEPORT - dep_tristate ' PDPI Lightning 4 gamecard' CONFIG_INPUT_LIGHTNING $CONFIG_INPUT_GAMEPORT - dep_tristate ' Aureal Vortex and Trident 4DWave gameports' CONFIG_INPUT_PCIGAME $CONFIG_INPUT_GAMEPORT - dep_tristate ' Crystal SoundFusion gameports' CONFIG_INPUT_CS461X $CONFIG_INPUT_GAMEPORT - dep_tristate ' SoundBlaster Live! gameports' CONFIG_INPUT_EMU10K1 $CONFIG_INPUT_GAMEPORT - tristate 'Serial port device support' CONFIG_INPUT_SERIO - dep_tristate ' Serial port input line discipline' CONFIG_INPUT_SERPORT $CONFIG_INPUT_SERIO -else - # Must explicitly set to n for drivers/sound/Config.in - define_tristate CONFIG_INPUT_GAMEPORT n - comment 'Input core support is needed for gameports' -fi - -if [ "$CONFIG_INPUT" != "n" ]; then - comment 'Joysticks' - - dep_tristate ' Classic PC analog joysticks and gamepads' CONFIG_INPUT_ANALOG $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Assasin 3D and MadCatz Panther devices' CONFIG_INPUT_A3D $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Logitech ADI digital joysticks and gamepads' CONFIG_INPUT_ADI $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Creative Labs Blaster Cobra gamepad' CONFIG_INPUT_COBRA $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Genius Flight2000 Digital joysticks and gamepads' CONFIG_INPUT_GF2K $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Gravis GrIP joysticks and gamepads' CONFIG_INPUT_GRIP $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' InterAct digital joysticks and gamepads' CONFIG_INPUT_INTERACT $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_INPUT_TMDC $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' Microsoft SideWinder digital joysticks and gamepads' CONFIG_INPUT_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT - dep_tristate ' I-Force USB joysticks and wheels' CONFIG_INPUT_IFORCE_USB $CONFIG_INPUT $CONFIG_USB - dep_tristate ' I-Force Serial joysticks and wheels' CONFIG_INPUT_IFORCE_232 $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' Logitech WingMan Warrior joystick' CONFIG_INPUT_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' LogiCad3d Magellan/SpaceMouse 6dof controller' CONFIG_INPUT_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controller' CONFIG_INPUT_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' SpaceTec SpaceBall 4000 FLX 6dof controller' CONFIG_INPUT_SPACEBALL $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' Gravis Stinger gamepad' CONFIG_INPUT_STINGER $CONFIG_INPUT $CONFIG_INPUT_SERIO - dep_tristate ' Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_INPUT_DB9 $CONFIG_INPUT $CONFIG_PARPORT - dep_tristate ' Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_INPUT_GAMECON $CONFIG_INPUT $CONFIG_PARPORT - dep_tristate ' Multisystem joysticks via TurboGraFX device' CONFIG_INPUT_TURBOGRAFX $CONFIG_INPUT $CONFIG_PARPORT +dep_tristate ' Classic PC analog joysticks and gamepads' CONFIG_JOYSTICK_ANALOG $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Assasin 3D and MadCatz Panther devices' CONFIG_JOYSTICK_A3D $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Logitech ADI digital joysticks and gamepads' CONFIG_JOYSTICK_ADI $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Creative Labs Blaster Cobra gamepad' CONFIG_JOYSTICK_COBRA $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Genius Flight2000 Digital joysticks and gamepads' CONFIG_JOYSTICK_GF2K $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Gravis GrIP joysticks and gamepads' CONFIG_JOYSTICK_GRIP $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' InterAct digital joysticks and gamepads' CONFIG_JOYSTICK_INTERACT $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' Microsoft SideWinder digital joysticks and gamepads' CONFIG_JOYSTICK_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT +dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_JOYSTICK_TMDC $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_GAMEPORT + +dep_tristate ' I-Force USB joysticks and wheels' CONFIG_JOYSTICK_IFORCE_USB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_USB +dep_tristate ' I-Force Serial joysticks and wheels' CONFIG_JOYSTICK_IFORCE_232 $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO +dep_tristate ' Logitech WingMan Warrior joystick' CONFIG_JOYSTICK_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO +dep_tristate ' LogiCad3d Magellan/SpaceMouse 6dof controllers' CONFIG_JOYSTICK_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO +dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controllers' CONFIG_JOYSTICK_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO +dep_tristate ' SpaceTec SpaceBall 6dof controllers' CONFIG_JOYSTICK_SPACEBALL $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO +dep_tristate ' Gravis Stinger gamepad' CONFIG_JOYSTICK_STINGER $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_SERIO + +dep_tristate ' Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_JOYSTICK_DB9 $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT +dep_tristate ' Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_JOYSTICK_GAMECON $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT +dep_tristate ' Multisystem joysticks via TurboGraFX device' CONFIG_JOYSTICK_TURBOGRAFX $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK $CONFIG_PARPORT - if [ "$CONFIG_AMIGA" = "y" ]; then - dep_tristate ' Amiga joysticks' CONFIG_INPUT_AMIJOY $CONFIG_INPUT - fi - - if [ "$CONFIG_MAPLE" != "n" ]; then - comment 'Dreamcast Maple Bus controllers' - dep_tristate ' Maple Bus controllers' CONFIG_INPUT_MAPLE_CONTROL $CONFIG_INPUT - fi -else - comment 'Input core support is needed for joysticks' +if [ "$CONFIG_AMIGA" = "y" ]; then + dep_tristate ' Amiga joysticks' CONFIG_JOYSTICK_AMIJOY $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK fi -endmenu +if [ "$CONFIG_MAPLE" != "n" ]; then + dep_tristate ' Dreamcast Maple Bus controllers' CONFIG_JOYSTICK_MAPLE_CONTROL $CONFIG_INPUT $CONFIG_INPUT_JOYSTICK +fi Index: drivers/input/joystick/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/input/joystick/Makefile,v retrieving revision 1.1 diff -u -3 -p -r1.1 Makefile --- drivers/input/joystick/Makefile 19 Mar 2002 23:50:07 -0000 1.1 +++ drivers/input/joystick/Makefile 5 Apr 2002 04:41:02 -0000 @@ -1,71 +1,51 @@ # -# Makefile for the joystick drivers. +# Makefile for the input core drivers. # -O_TARGET := js.o +# The target object and module list name. -# Objects that export symbols. - -export-objs := serio.o gameport.o +O_TARGET := joydrv.o # I-Force may need both USB and RS-232 -ifeq ($(CONFIG_INPUT_IFORCE_232),m) - ifeq ($(CONFIG_INPUT_IFORCE_USB),y) - CONFIG_INPUT_IFORCE_USB := m - endif -endif -ifeq ($(CONFIG_INPUT_IFORCE_USB),m) - ifeq ($(CONFIG_INPUT_IFORCE_232),y) - CONFIG_INPUT_IFORCE_232 := m +CONFIG_JOYSTICK_IFORCE := n + +ifeq ($(CONFIG_JOYSTICK_IFORCE_232),y) + ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),y) + CONFIG_JOYSTICK_IFORCE := y endif endif -# Object file lists. +ifeq ($(CONFIG_JOYSTICK_IFORCE_232),m) + CONFIG_JOYSTICK_IFORCE := m +endif -obj-y := -obj-m := -obj-n := -obj- := +ifeq ($(CONFIG_JOYSTICK_IFORCE_USB),m) + CONFIG_JOYSTICK_IFORCE := m +endif # Each configuration option enables a list of files. -obj-$(CONFIG_INPUT_GAMEPORT) += gameport.o -obj-$(CONFIG_INPUT_SERIO) += serio.o - -obj-$(CONFIG_INPUT_SERPORT) += serport.o - -obj-$(CONFIG_INPUT_NS558) += ns558.o -obj-$(CONFIG_INPUT_LIGHTNING) += lightning.o -obj-$(CONFIG_INPUT_PCIGAME) += pcigame.o -obj-$(CONFIG_INPUT_CS461X) += cs461x.o -obj-$(CONFIG_INPUT_EMU10K1) += emu10k1-gp.o - -obj-$(CONFIG_INPUT_WARRIOR) += warrior.o -obj-$(CONFIG_INPUT_MAGELLAN) += magellan.o -obj-$(CONFIG_INPUT_SPACEORB) += spaceorb.o -obj-$(CONFIG_INPUT_SPACEBALL) += spaceball.o -obj-$(CONFIG_INPUT_STINGER) += stinger.o -obj-$(CONFIG_INPUT_IFORCE_232) += iforce.o -obj-$(CONFIG_INPUT_IFORCE_USB) += iforce.o - -obj-$(CONFIG_INPUT_ANALOG) += analog.o -obj-$(CONFIG_INPUT_A3D) += a3d.o -obj-$(CONFIG_INPUT_ADI) += adi.o -obj-$(CONFIG_INPUT_COBRA) += cobra.o -obj-$(CONFIG_INPUT_GF2K) += gf2k.o -obj-$(CONFIG_INPUT_GRIP) += grip.o -obj-$(CONFIG_INPUT_INTERACT) += interact.o -obj-$(CONFIG_INPUT_TMDC) += tmdc.o -obj-$(CONFIG_INPUT_SIDEWINDER) += sidewinder.o - -obj-$(CONFIG_INPUT_DB9) += db9.o -obj-$(CONFIG_INPUT_GAMECON) += gamecon.o -obj-$(CONFIG_INPUT_TURBOGRAFX) += turbografx.o - -obj-$(CONFIG_INPUT_AMIJOY) += amijoy.o - -obj-$(CONFIG_INPUT_MAPLE_CONTROL)+= maplecontrol.o +obj-$(CONFIG_JOYSTICK_A3D) += a3d.o +obj-$(CONFIG_JOYSTICK_ADI) += adi.o +obj-$(CONFIG_JOYSTICK_AMIGA) += amijoy.o +obj-$(CONFIG_JOYSTICK_ANALOG) += analog.o +obj-$(CONFIG_JOYSTICK_COBRA) += cobra.o +obj-$(CONFIG_JOYSTICK_DB9) += db9.o +obj-$(CONFIG_JOYSTICK_GAMECON) += gamecon.o +obj-$(CONFIG_JOYSTICK_GF2K) += gf2k.o +obj-$(CONFIG_JOYSTICK_GRIP) += grip.o +obj-$(CONFIG_JOYSTICK_IFORCE) += iforce.o +obj-$(CONFIG_JOYSTICK_INTERACT) += interact.o +obj-$(CONFIG_JOYSTICK_MAGELLAN) += magellan.o +obj-$(CONFIG_JOYSTICK_MAPLE_CONTROL) += maplecontrol.o +obj-$(CONFIG_JOYSTICK_SIDEWINDER) += sidewinder.o +obj-$(CONFIG_JOYSTICK_SPACEBALL) += spaceball.o +obj-$(CONFIG_JOYSTICK_SPACEORB) += spaceorb.o +obj-$(CONFIG_JOYSTICK_STINGER) += stinger.o +obj-$(CONFIG_JOYSTICK_TMDC) += tmdc.o +obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o +obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o # The global Rules.make. Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.10 diff -u -3 -p -r1.10 8139too.c --- drivers/net/8139too.c 28 Mar 2002 04:27:05 -0000 1.10 +++ drivers/net/8139too.c 5 Apr 2002 04:41:02 -0000 @@ -108,9 +108,8 @@ #include <linux/delay.h> #include <linux/ethtool.h> #include <linux/mii.h> -#include <linux/crc32.h> #include <linux/completion.h> - +#include <linux/crc32.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -2243,10 +2242,11 @@ static int netdev_ethtool_ioctl (struct /* dev_ioctl() in ../../net/core/dev.c has already checked capable(CAP_NET_ADMIN), so don't bother with that here. */ - if (get_user (ethcmd, (u32 *)useraddr)) + if (get_user(ethcmd, (u32 *)useraddr)) return -EFAULT; switch (ethcmd) { + case ETHTOOL_GDRVINFO: { struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; strcpy (info.driver, DRV_NAME); Index: drivers/net/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.in,v retrieving revision 1.7 diff -u -3 -p -r1.7 Config.in --- drivers/net/Config.in 4 Apr 2002 09:03:55 -0000 1.7 +++ drivers/net/Config.in 5 Apr 2002 04:41:02 -0000 @@ -69,12 +69,12 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the if [ "$CONFIG_SUPERH" = "y" ]; then tristate ' National DP83902AV support' CONFIG_STNIC fi + dep_tristate ' Sun LANCE support' CONFIG_SUNLANCE $CONFIG_SBUS if [ "$CONFIG_SBUS" = "y" -o "$CONFIG_PCI" = "y" ]; then tristate ' Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL fi dep_tristate ' Sun BigMAC 10/100baseT support (EXPERIMENTAL)' CONFIG_SUNBMAC $CONFIG_SBUS $CONFIG_EXPERIMENTAL dep_tristate ' Sun QuadEthernet support' CONFIG_SUNQE $CONFIG_SBUS - dep_tristate ' Sun LANCE support' CONFIG_SUNLANCE $CONFIG_SBUS dep_tristate ' Sun GEM support' CONFIG_SUNGEM $CONFIG_PCI bool ' 3COM cards' CONFIG_NET_VENDOR_3COM if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then Index: drivers/pci/pci.ids =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pci/pci.ids,v retrieving revision 1.6 diff -u -3 -p -r1.6 pci.ids --- drivers/pci/pci.ids 4 Apr 2002 09:03:55 -0000 1.6 +++ drivers/pci/pci.ids 5 Apr 2002 04:41:03 -0000 @@ -824,8 +824,8 @@ 0074 56k Voice Modem 1033 8014 RCV56ACF 56k Voice Modem 009b Vrc5476 - 00a6 VRC5477 AC97 - 00e0 USB 2.0 + 00a6 VRC5477 AC97 + 00e0 USB 2.0 1034 Framatome Connectors USA Inc. 1035 Comp. & Comm. Research Lab 1036 Future Domain Corp. @@ -5481,6 +5481,7 @@ C 0c Serial bus controller 03 USB Controller 00 UHCI 10 OHCI + 20 EHCI 80 Unspecified fe USB Device 04 Fibre Channel Index: drivers/video/epson1355fb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/epson1355fb.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 epson1355fb.c --- drivers/video/epson1355fb.c 15 Oct 2001 20:45:05 -0000 1.1.1.1 +++ drivers/video/epson1355fb.c 5 Apr 2002 04:41:03 -0000 @@ -500,7 +500,7 @@ int __init e1355fb_init(void) fb_info.gen.fbhw->detect(); strcpy(fb_info.gen.info.modename, "SED1355"); fb_info.gen.info.changevar = NULL; - fb_info.gen.info.node = -1; + fb_info.gen.info.node = NODEV; fb_info.gen.info.fbops = &e1355fb_ops; fb_info.gen.info.disp = &disp; fb_info.gen.parsize = sizeof(struct e1355_par); -- |