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: BrainCoders.com <mai...@br...> - 2002-03-27 23:32:49
|
<html> <head> <title>BrainCoders.com - Low Cost Software Development</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="description" content= "BrainCoders.com is a software company dedicated to designing and developing the highest-quality software to provide our clients with workable, maintainable and leading-edge solutions. We are specializing in IT services and software outsourcing."> <meta name="keywords" content= "BrainCoders, BrainCoders.com, outsourcing, software development, software, development, programmer, developer, programmers, developers, design, 3D, graphics, digital, video, computer, editing, webdesign, animation, special effects, tools, media"> <script type="text/javascript" language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) { if ((appName == "Netscape") && (parseInt(appVersion) == 4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; } } else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </script> <style type="text/css"> .link { font-family: Verdana; font-size: 8pt; font-weight: normal; } BODY { scrollbar-darkshadow-color: #1F2406; scrollbar-track-color: #6B762D; scrollbar-face-color: #CFD89E; scrollbar-arrow-color: #FFFFFF; scrollbar-highlight-color: black; scrollbar-3dlight-color: #1F2406; font-family: Verdana; font-size: 8pt; } TD, TH { font-family: Verdana; font-size: 8pt; } BLOCKQUOTE { font-family: Verdana; font-size: 9pt; } .menutext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: normal; color: #525200; text-decoration: none } .tabletxt { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #525200; text-decoration: none } .bottomtxt { font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-weight: normal; color: #525200; text-decoration: none } </style> </head> <body background="http://www.braincoders.com/background.gif" text= "#000000" topmargin="1" leftmargin="1" marginwidth="0" marginheight="0" onload="MM_reloadPage(true);"> <table width="600" border="0" cellspacing="0" cellpadding="0" height="89" background="http://www.braincoders.com/background.gif"> <tr> <td width="39" height="90"></td> <td width="760" height="90"> <div align="right"><img src= "http://www.braincoders.com/toplogo.jpg" width="550" height="64" border="0"></div> </td> </tr> </table> <table width="601" border="0" cellspacing="0" cellpadding="0" height="30" align="left" bgcolor="#CFD89E"> <tr> <td nowrap width="22"> </td> <td nowrap> <div align="right">| <a href= "http://www.braincoders.com/about.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">About Us</a> | <a href= "http://www.braincoders.com/srv.html" class="menutext" onmouseover= "this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">Services</a> | <a href= "http://www.braincoders.com/staff.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">Staff</a> | <a href= "http://www.braincoders.com/workflow.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">Workflow</a> | <a href= "http://www.braincoders.com/contact.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">Contact Us</a> | <a href= "http://www.braincoders.com/outadv.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">Outsourcing Advantages</a> | <a href="http://www.braincoders.com/faq.html" class="menutext" onmouseover="this.style.color='#F5FAD3'" onmouseout= "this.style.color='#525200'">FAQ</a> |</div> </td> </tr> </table> <p> </p> <div style= "position:absolute; width:560; z-index:1; left: 57px; top: 154px; visibility: visible"> <table width="545" border="1" cellspacing="0" cellpadding="1"> <tr> <td> <table width="500" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td bordercolor="#CCCC99" valign="top" align="left" height="500"> <blockquote> <p><br> </p> </blockquote> <p><br> <font class="tabletxt"><b>Dear Internet User,</b></font></p> <p><font class="tabletxt"><b>The eBusiness</b> is changing the <b>software applications</b> and services landcape in a way that has not been seen earlier. Companies worldwide are waking up to the fact that the difference between just having an <b>Online Presence</b> and using the web as a <b>strategic medium</b> can mean all the difference to success.</font></p> <p><font class="tabletxt">What this also means is that you need <b>technology providers</b> who understand the business implications of technology and can make sure that the solutions work with your exisiting business processes as also enable you to integrate new processes without massive investments in changing the whole <b>Application Architecture</b>.</font></p> <p><font class="tabletxt"><b>BrainCoders.com</b> is a software company dedicated to designing and developing the <b>highest-quality</b> software to provide our clients with workable, maintainable and leading-edge solutions. We are specializing in IT services and <b>software outsourcing</b>.</font></p> <ul> <li><font class="tabletxt"><b>Our prices are one of the lowest on the market. We charge our customers from $8 to $15 per working hour depending on the length and complexity of the project.</b></font></li> <li><font class="tabletxt"><b>Our leading principle is to consistently deliver on time and on budget.</b></font></li> <li><font class="tabletxt"><b>Our most value asset is our team of most committed and capable people.</b></font></li> </ul> <p><font class="tabletxt">This dedication to high degrees of professionalism translates to innovative and <b>cost effective</b> solutions. The bottom line is that we help our clients gain competitive advantage and maintain their <b>leading positions</b> in their respective industries.</font></p> <p><font class="tabletxt"><b>BrainCoders.com</b>' software development services may be of special interest to the following groups of potential customers:</font></p> <ul> <li><font class="tabletxt"><b>Software houses that wish to reduce their development costs by means of outsourcing.</b></font></li> <li><font class="tabletxt"><b>Companies not directly involved in software development, but which have or need their proprietary software business applications and wish to delegate the development, upgrades and support of these applications to a software company.</b></font></li> </ul> <br> <p><font class="tabletxt">I am looking forward to hearing from you.</font></p> <br> <p><font class="tabletxt"><b>Best Regards,</b></font></p> <p><font class="tabletxt">Vesselin Sladkov<br> BrainCoders.com<br> E-mail: <a href= "mailto:sl...@br...">sl...@br...</a></font></p> <br> </td> </tr> </table> </td> </tr> <tr> <td bordercolor="#CCCC99" valign="top" align="left" height="21"> </td> </tr> <tr> <td bordercolor="#CCCC99" valign="top" align="center"><font class= "bottomtxt">This mailing is done only to people who have requested info from one of our sites, or downloaded our Software. If you have recieved this email in error and you wish to be removed from future mailings, please reply with the subject "<b>Remove</b>" and our software will automatically block you from their future mailings.<br> <br> </font> </td> </tr> </table> </div> </body> </html> |
From: David M. <dav...@st...> - 2002-03-27 16:40:54
|
gn...@m1... wrote: > > Optimized the flushing. > > There is a requirement in SH4 to control cache from P2 area. P2 area > is the area where cache is not used at all. This means, the cycles > for instruction could be quite large. In other word, if we could > save number of instructions, we see performance improvement. > Niibe-san, One of the differences between the 7750 and 7751 (and ST40) processors is that the restriction to flush D-cache from P2 only has been lifted. This does provide a significant performance increase. We did spend a while trying to find out if this was a documentation change or a real change, but as far as we can tell it does appear to be a genuine change in the core. I ran a modified kernel and saw no problems not doing the change to P2. You have to read the manual really carefully to realise it has changed! -- Dave McKay Software Engineer STMicroelectronics Email: dav...@st... |
From: M. R. B. <mr...@0x...> - 2002-03-27 15:02:29
|
* NIIBE Yutaka <gn...@m1...> on Wed, Mar 27, 2002: > Optimized the flushing.=20 >=20 > There is a requirement in SH4 to control cache from P2 area. P2 area > is the area where cache is not used at all. This means, the cycles > for instruction could be quite large. In other word, if we could > save number of instructions, we see performance improvement. >=20 > I've done: Four --> Three instruction fetch per single cache line flush. >=20 Wow ... were you planning on merging these with linux-2_4-branch also? For this and your other changes, do you have numbers to show your improvements? Thanks, M. R. |
From: NIIBE Y. <gn...@m1...> - 2002-03-27 10:39:03
|
Bug fix for syscall restart. Besides, sh_do_profile implemented. 2002-03-27 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/entry.S (IS_SYSCALL): Renamed from SYSCALL_NR. (system_call, handle_exception): Set is_syscall. * arch/sh/kernel/signal.c (restore_sigcontext, handle_signal, do_signal): Use is_syscall. * include/asm-sh/ptrace.h (is_syscall): Renamed from syscall_nr. * arch/sh/kernel/signal.c (save_sigcontext_fpu): Use __put_user (was: __copy_to_user). (handle_signal, do_signal): Bug fix. Don't set register 0. * include/asm-sh/hw_irq.h (sh_do_profile): Removed from here. * arch/sh/kernel/time.c (sh_do_profile): But implemented here. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.10 diff -u -3 -p -r1.10 entry.S --- arch/sh/kernel/entry.S 22 Mar 2002 14:28:34 -0000 1.10 +++ arch/sh/kernel/entry.S 27 Mar 2002 10:35:42 -0000 @@ -85,7 +85,7 @@ OFF_R6 = 24 /* New ABI: ar OFF_R7 = 28 /* New ABI: arg3 */ OFF_SP = (15*4) OFF_SR = (16*4+8) -SYSCALL_NR = (16*4+6*4) +IS_SYSCALL = (16*4+6*4) #define k0 r0 @@ -404,19 +404,13 @@ system_call: mov.l @r9, r8 ! Read from TRA (Trap Address) Register ! ! Is the trap argument >= 0x20? (TRA will be >= 0x80) - mov #0x20, r9 - shll2 r9 - cmp/hs r9, r8 + mov #0x7f, r9 + cmp/hi r9, r8 bt/s debug_trap - mov #SYSCALL_NR, r9 - add r15, r9 + mov #IS_SYSCALL, r8 + add r15, r8 ! - add #-0x40, r8 - shlr2 r8 - shll8 r8 - shll8 r8 ! r8 = num_args<<16 - or r3, r8 ! Encode syscall # and # of arguments - mov.l r8, @r9 ! set syscall_nr + mov.l r9, @r8 ! set 0x7f to is_syscall STI() ! Call the system call handler through the table. ! First check for bad syscall number @@ -578,10 +572,10 @@ handle_exception: add current, k1 mov k1, r15 ! change to kernel stack ! -1: mov #-1, k4 +1: mov #0, 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 is_syscall (default: 0) ! sts.l macl, @-r15 sts.l mach, @-r15 Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 signal.c --- arch/sh/kernel/signal.c 22 Mar 2002 12:57:10 -0000 1.6 +++ arch/sh/kernel/signal.c 27 Mar 2002 10:35:42 -0000 @@ -199,16 +199,13 @@ static inline int save_sigcontext_fpu(st { 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. @@ -257,7 +254,7 @@ restore_sigcontext(struct pt_regs *regs, } #endif - regs->syscall_nr = -1; /* disable syscall checks */ + regs->is_syscall = 0; /* disable syscall checks */ err |= __get_user(*r0_p, &sc->sc_regs[0]); return err; } @@ -526,7 +523,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->is_syscall) { /* If so, check system call restarting.. */ switch (regs->regs[0]) { case -ERESTARTNOHAND: @@ -540,7 +537,6 @@ handle_signal(unsigned long sig, struct } /* fallthrough */ case -ERESTARTNOINTR: - regs->regs[0] = regs->syscall_nr; regs->pc -= 2; } } @@ -684,12 +680,11 @@ int do_signal(struct pt_regs *regs, sigs } /* Did we come from a system call? */ - if (regs->syscall_nr >= 0) { + if (regs->is_syscall) { /* 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; } } Index: arch/sh/kernel/time.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/time.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 time.c --- arch/sh/kernel/time.c 15 Oct 2001 20:44:50 -0000 1.1 +++ arch/sh/kernel/time.c 27 Mar 2002 10:35:42 -0000 @@ -176,6 +176,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, * as well as call the "do_timer()" routine every clocktick Index: include/asm-sh/hw_irq.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/hw_irq.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 hw_irq.h --- include/asm-sh/hw_irq.h 15 Oct 2001 20:45:08 -0000 1.1.1.1 +++ include/asm-sh/hw_irq.h 27 Mar 2002 10:35:42 -0000 @@ -1,6 +1,4 @@ #ifndef __ASM_SH_HW_IRQ_H #define __ASM_SH_HW_IRQ_H -static __inline__ void sh_do_profile (unsigned long pc) {/*Not implemented yet*/} - static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ } #endif /* __ASM_SH_HW_IRQ_H */ Index: include/asm-sh/ptrace.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/ptrace.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 ptrace.h --- include/asm-sh/ptrace.h 15 Oct 2001 20:45:11 -0000 1.1.1.1 +++ include/asm-sh/ptrace.h 27 Mar 2002 10:35:42 -0000 @@ -61,7 +61,7 @@ struct pt_regs { unsigned long gbr; unsigned long mach; unsigned long macl; - long syscall_nr; + long is_syscall; }; #ifdef __KERNEL__ |
From: NIIBE Y. <gn...@m1...> - 2002-03-27 05:56:00
|
Optimized the flushing. There is a requirement in SH4 to control cache from P2 area. P2 area is the area where cache is not used at all. This means, the cycles for instruction could be quite large. In other word, if we could save number of instructions, we see performance improvement. I've done: Four --> Three instruction fetch per single cache line flush. 2002-03-27 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/copy_page.S: File merged with __copy_user_page-sh4.S. * arch/sh/mm/clear_page.S: File merged with __clear_user.S. (__flush_cache_4096): New function. * arch/sh/mm/Makefile: Remove __copy_user_page-sh4.S and __clear_user.S. * arch/sh/mm/cache-sh4.c (__flush_icache_page): Removed. (flush_cache_4096): New function. 2002-03-27 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/cache-sh4.c (__flush_cache_page): New function. (flush_cache_range, flush_cache_page, flush_icache_user_range): Use __flush_cache_page. Index: arch/sh/mm/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/Makefile,v retrieving revision 1.2 diff -u -3 -p -r1.2 Makefile --- arch/sh/mm/Makefile 26 Mar 2002 01:56:39 -0000 1.2 +++ arch/sh/mm/Makefile 27 Mar 2002 05:15:07 -0000 @@ -10,8 +10,8 @@ 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 __clear_user.o -obj-$(CONFIG_CPU_SH4) += cache-sh4.o __clear_user.o __copy_user_page-sh4.o ioremap.o +obj-$(CONFIG_CPU_SH3) += cache-sh3.o +obj-$(CONFIG_CPU_SH4) += cache-sh4.o ioremap.o USE_STANDARD_AS_RULE := true Index: arch/sh/mm/__clear_user.S =================================================================== RCS file: arch/sh/mm/__clear_user.S diff -N arch/sh/mm/__clear_user.S --- arch/sh/mm/__clear_user.S 26 Mar 2002 01:56:39 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,138 +0,0 @@ -/* $Id: __clear_user.S,v 1.1 2002/03/26 01:56:39 gniibe Exp $ - * - * __clear_user_page implementation of SuperH - * - * Copyright (C) 2001, 2002 Niibe Yutaka & Kaz Kojima - * - */ - -#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 - */ -#include <linux/linkage.h> -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 -#endif - -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 Index: arch/sh/mm/__copy_user_page-sh4.S =================================================================== RCS file: arch/sh/mm/__copy_user_page-sh4.S diff -N arch/sh/mm/__copy_user_page-sh4.S --- arch/sh/mm/__copy_user_page-sh4.S 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,69 +0,0 @@ -/* $Id: __copy_user_page-sh4.S,v 1.1.1.1 2001/10/15 20:44:53 mrbrown 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 Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.7 diff -u -3 -p -r1.7 cache-sh4.c --- arch/sh/mm/cache-sh4.c 27 Mar 2002 00:07:19 -0000 1.7 +++ arch/sh/mm/cache-sh4.c 27 Mar 2002 05:15:07 -0000 @@ -208,54 +208,40 @@ void flush_cache_sigtramp(unsigned long restore_flags(flags); } +static inline void flush_cache_4096(unsigned long start, + unsigned long phys) +{ + 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"); +} + /* * Writeback&Invalidate the D-cache of the page */ static void __flush_dcache_page(unsigned long phys) { - 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); - } - - back_to_P1(); - restore_flags(flags); -} - -static void __flush_icache_page(unsigned long phys) -{ - unsigned long addr, data; - unsigned long flags; - - phys |= CACHE_VALID; - - save_and_cli(flags); - jump_to_P2(); + 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); - /* 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) - ctrl_outl(0, addr); - } - - back_to_P1(); restore_flags(flags); } @@ -307,6 +293,36 @@ void flush_cache_mm(struct mm_struct *mm 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. * @@ -319,31 +335,35 @@ void flush_cache_mm(struct mm_struct *mm void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { - unsigned long flags; - struct mm_struct *mm = vma->vm_mm; + unsigned long p = start & PAGE_MASK; + pgd_t *dir; + pmd_t *pmd; + pte_t *pte; + pte_t entry; + unsigned long phys; - start &= PAGE_MASK; - - save_and_cli(flags); - for (; start < end; start += PAGE_SIZE) { - pgd_t *pgd = pgd_offset(mm, start); - pmd_t *pmd = pmd_offset(pgd, start); - pte_t *pte; - unsigned long phys; + dir = pgd_offset(vma->vm_mm, p); + pmd = pmd_offset(dir, p); + do { if (pmd_none(*pmd) || pmd_bad(*pmd)) { - start &= ~((1 << PMD_SHIFT) -1); - start += (1 << PMD_SHIFT); + p &= ~((1 << PMD_SHIFT) -1); + p += (1 << PMD_SHIFT); + pmd++; continue; } - pte = pte_offset_kernel(pmd, start); - phys = pte_val(*pte)&PTE_PHYS_MASK; - if (pte_val(*pte) & _PAGE_PRESENT) { - __flush_icache_page(phys); - __flush_dcache_page(phys); - } - } - restore_flags(flags); + pte = pte_offset_kernel(pmd, p); + do { + entry = *pte; + if ((pte_val(entry) & _PAGE_PRESENT)) { + phys = pte_val(entry)&PTE_PHYS_MASK; + __flush_cache_page(vma, p, phys); + } + pte++; + p += PAGE_SIZE; + } while (p < end && (unsigned long)pte & PAGE_MASK); + pmd++; + } while (p < end); } /* @@ -357,8 +377,7 @@ 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); @@ -366,49 +385,11 @@ void flush_cache_page(struct vm_area_str return; 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; - - 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_cache_page(vma, address, phys); } /* @@ -421,10 +402,7 @@ void flush_cache_page(struct vm_area_str void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, unsigned long addr, int len) { - if (test_bit(PG_mapped, &page->flags)) { - __flush_icache_page(PHYSADDR(page_address(page))); - __flush_dcache_page(PHYSADDR(page_address(page))); - } + __flush_cache_page(vma, addr, PHYSADDR(page_address(page))); } /* Index: arch/sh/mm/clear_page.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/clear_page.S,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 clear_page.S --- arch/sh/mm/clear_page.S 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/mm/clear_page.S 27 Mar 2002 05:15:07 -0000 @@ -1,10 +1,11 @@ /* $Id: clear_page.S,v 1.1.1.1 2001/10/15 20:44:53 mrbrown 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, 2002 Niibe Yutaka & Kaz Kojima * */ +#include <linux/linkage.h> /* * clear_page @@ -18,7 +19,6 @@ * r4 --- to * r5 --- to + 4096 */ -#include <linux/linkage.h> ENTRY(clear_page) mov r4,r5 mov.w .Llimit,r0 @@ -50,3 +50,160 @@ 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 + +/************* + 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); + } +*************/ +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 +#endif Index: arch/sh/mm/copy_page.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/copy_page.S,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 copy_page.S --- arch/sh/mm/copy_page.S 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/mm/copy_page.S 27 Mar 2002 05:15:07 -0000 @@ -1,10 +1,11 @@ /* $Id: copy_page.S,v 1.1.1.1 2001/10/15 20:44:53 mrbrown 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,67 @@ 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 + */ +#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 +#endif .L4096: .word 4096 |
From: Fabio G. <fg...@ti...> - 2002-03-26 18:17:24
|
Hi everyone, To make running on my board the sh-boot-cvs-25-03-2002 I wrote my config.h config.mk init-mycard.S (for BSC initialization) I modified Makefile sh-sci.c and I modified enrty.S in the following way #if defined(CONFIG_MYCARD) INITIAL_SR: .long 0x500000f0 /* MD=1, RD=0, BL=1 I3,I2,I1,I0 = 1, interrupt masked */ #else INITIAL_SR: .long 0x50000000 /* MD=1, RD=0, BL=1 */ #endif What are the side effect of this modification? The following is the output of my sh-linux-gnu-gdb: bash-2.05# sh-linux-gnu-gdb /root/sh/linux/vmlinux GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh-linux-gnu"... (gdb) set endian little The target is assumed to be little endian (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 0x800022c6 in ?? () warning: shared library handler failed to enable breakpoint (gdb) load Loading section .empty_zero_page, size 0x1000 lma 0x8c001000 Loading section .text, size 0x71594 lma 0x8c002000 Loading section .rodata, size 0x847c lma 0x8c073594 Loading section __ex_table, size 0x1468 lma 0x8c07ba10 Loading section .data, size 0x3f48 lma 0x8c07ce78 Loading section .data.init_task, size 0x2000 lma 0x8c082000 Loading section .text.init, size 0x6440 lma 0x8c084000 Loading section .data.init, size 0x3bc lma 0x8c08a440 Loading section .setup.init, size 0xa0 lma 0x8c08a800 Loading section .initcall.init, size 0x50 lma 0x8c08a8a0 Loading section .data.cacheline_aligned, size 0xb70 lma 0x8c08b000 Start address 0x8c002000, load size 561692 Transfer rate: 59913 bits/sec, 149 bytes/write. (gdb) cont Continuing. and now everything is stopped. Some questions: 1) warning: shared library handler failed to enable breakpoint Is this dangerous for corretly running of the kernel using the upper procedure? 2) How and where I have to put the breakpoints which is written about in http://linuxsh.sourceforge.net/docs/gdb.php3 >> (gdb) load >> >> >> GDB will print a line of output as each section of the ELF file is loaded. >>This can take several minutes. >> >> Once the kernel has been loaded you can set any breakpoints required, as >>normal. Finally start the kernel running: >> >>cont 3) How can I easily debug why my kernel doesn't work? Attached my config file and my kernel is 2.4.18. Thanks a lot. |
From: M. R. B. <mr...@0x...> - 2002-03-26 15:18:22
|
* Dan Kegel <da...@ke...> on Tue, Mar 26, 2002: > Hi, > I forget how to grab the current linux-sh 2.4 tree; can > someone refresh my memory? The CVS archive appears to > be against 2.5.7 now. Does that mean all the 2.4 patches for sh > are already in the mainline kernel? >=20 Add "-r linux-2_4-branch" when checking out the linux/ module. > I wanted to check to see if this patch had already been applied. > It's against the sh kernel as of 2.4.16, and it fixes a buglet > which only shows up when you write a new networking driver > and try to include asm/checksum.h. > (See http://www.cs.helsinki.fi/linux/linux-kernel/2002-03/0357.html > for a similar patch for i386 for 2.4.17.) As of 2.4.18 it's not there. I'll commit this in a couple of hours if no o= ne objects. I don't see any problems with it. M. R. > - Dan >=20 > diff -au linux-2.4.16/include/asm-sh/checksum.h{.orig,} > --- linux-2.4.16/include/asm-sh/checksum.h.orig Tue Mar 26 04:51:51 2002 > +++ linux-2.4.16/include/asm-sh/checksum.h Tue Mar 26 04:52:04 2002 > @@ -10,6 +10,7 @@ > */ >=20 > #include <linux/config.h> > +#include <asm/uaccess.h> >=20 > /* > * computes the checksum of a memory block at buff, length len, |
From: NIIBE Y. <gn...@m1...> - 2002-03-26 05:49:55
|
Clean it up a bit. 2002-03-26 NIIBE Yutaka <gn...@m1...> * include/asm-sh/mmu_context.h (switch_mm): Remove setting/resetting of mm->cpu_vm_mask. It's for SMP implementation. (get_new_mmu_context): Removed. (get_mmu_context): Merved with get_new_mmu_context. Index: include/asm-sh/mmu_context.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mmu_context.h,v retrieving revision 1.6 diff -u -3 -p -r1.6 mmu_context.h --- include/asm-sh/mmu_context.h 22 Mar 2002 03:58:40 -0000 1.6 +++ include/asm-sh/mmu_context.h 26 Mar 2002 05:43:04 -0000 @@ -6,9 +6,10 @@ #ifndef __ASM_SH_MMU_CONTEXT_H #define __ASM_SH_MMU_CONTEXT_H -/* The MMU "context" consists of two things: - (a) TLB cache version (or round, cycle whatever expression you like) - (b) ASID (Address Space IDentifier) +/* + * The MMU "context" consists of two things: + * (a) TLB cache version (or round, cycle whatever expression you like) + * (b) ASID (Address Space IDentifier) */ /* @@ -29,19 +30,32 @@ extern unsigned long mmu_context_cache; */ #define MMU_VPN_MASK 0xfffff000 +/* + * Get MMU context if needed. + */ static __inline__ void -get_new_mmu_context(struct mm_struct *mm) +get_mmu_context(struct mm_struct *mm) { extern void flush_tlb_all(void); + unsigned long mc = mmu_context_cache; - unsigned long mc = ++mmu_context_cache; + /* Check if we have old version of context. */ + if (((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0) + /* It's up to date, do nothing */ + return; + /* It's old, we need to get new context with new version. */ + mc = ++mmu_context_cache; if (!(mc & MMU_CONTEXT_ASID_MASK)) { - /* We exhaust ASID of this version. - Flush all TLB and start new cycle. */ + /* + * We exhaust ASID of this version. + * Flush all TLB and start new cycle. + */ flush_tlb_all(); - /* Fix version if needed. - Note that we avoid version #0 to distingush NO_CONTEXT. */ + /* + * Fix version; Note that we avoid version #0 + * to distingush NO_CONTEXT. + */ if (!mc) mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION; } @@ -49,21 +63,6 @@ get_new_mmu_context(struct mm_struct *mm } /* - * Get MMU context if needed. - */ -static __inline__ void -get_mmu_context(struct mm_struct *mm) -{ - if (mm) { - unsigned long mc = mmu_context_cache; - /* Check if we have old version of context. - If it's old, we need to get new context with new version. */ - if ((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK) - get_new_mmu_context(mm); - } -} - -/* * Initialize the context related info for a new mm_struct * instance. */ @@ -169,8 +168,6 @@ static __inline__ void switch_mm(struct if (likely(prev != next)) { unsigned long __pgdir = (unsigned long)next->pgd; - clear_bit(cpu, &prev->cpu_vm_mask); - set_bit(cpu, &next->cpu_vm_mask); __asm__ __volatile__("mov.l %0, %1" : /* no output */ : "r" (__pgdir), "m" (__m(MMU_TTB))); |
From: NIIBE Y. <gn...@m1...> - 2002-03-26 05:49:02
|
OK, I've fixed cache-sh4.c. The problem was confusion of virtual address and physcall address. Note that new flush_cache_range is quite slow for exec. It's two to four time slower than simple flush_cache_all implementation. New flush_cache_range would be good if we want cache to have valid data (avoid flushing), but it takes long time for SuperH to handle cache. 2002-03-26 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/cache-sh4.c (flush_cache_mm): Don't check mm->context, it's for TLB handling. (flush_cache_range): Likewise. (flush_cache_mm): Fix the comment. The alias issue is there for write-through cache too. (flush_cache_range): Don't handle in P2. 2002-03-26 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/cache-sh4.c (flush_cache_range): Bug fix. Handle the case where PMD is none or bad. The argument to __flush_icache_page/__flush_dcache_page is physical address (was: virtual address). Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 cache-sh4.c --- arch/sh/mm/cache-sh4.c 22 Mar 2002 12:57:10 -0000 1.6 +++ arch/sh/mm/cache-sh4.c 26 Mar 2002 05:43:03 -0000 @@ -298,15 +298,13 @@ void flush_cache_mm(struct mm_struct *mm * 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? (This is a non-issue if the - * SH4 cache is configured in write-through mode). + * SPARC) .. is this possible for SuperH? * - * In the meantime, we'll just flush all of the caches if we have a - * valid mm context.. this seems to be the simplest way to avoid at - * least a few wasted cache flushes. -Lethal + * 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 */ - if (mm->context != 0) - flush_cache_all(); + flush_cache_all(); } /* @@ -324,35 +322,28 @@ void flush_cache_range(struct vm_area_st unsigned long flags; struct mm_struct *mm = vma->vm_mm; - if (mm->context == 0) - return; - start &= PAGE_MASK; - if (mm->context != current->active_mm->context) { - flush_cache_all(); - } else { - pgd_t *pgd; - pmd_t *pmd; + save_and_cli(flags); + for (; start < end; start += PAGE_SIZE) { + pgd_t *pgd = pgd_offset(mm, start); + pmd_t *pmd = pmd_offset(pgd, start); pte_t *pte; + unsigned long phys; - save_and_cli(flags); - jump_to_P2(); - - for (start; start < end; start += PAGE_SIZE) { - pgd = pgd_offset(mm, start); - pmd = pmd_offset(pgd, start); - pte = pte_offset_kernel(pmd, start); - - if (pte_val(*pte) & _PAGE_PRESENT) { - __flush_icache_page(start); - __flush_dcache_page(start); - } + if (pmd_none(*pmd) || pmd_bad(*pmd)) { + start &= ~((1 << PMD_SHIFT) -1); + start += (1 << PMD_SHIFT); + continue; + } + pte = pte_offset_kernel(pmd, start); + phys = pte_val(*pte)&PTE_PHYS_MASK; + if (pte_val(*pte) & _PAGE_PRESENT) { + __flush_icache_page(phys); + __flush_dcache_page(phys); } - - back_to_P1(); - restore_flags(flags); } + restore_flags(flags); } /* |
From: NIIBE Y. <gn...@m1...> - 2002-03-26 01:56:05
|
It seems it's obsolete. Let's try not to include it. 2002-03-25 NIIBE Yutaka <gn...@m1...> * arch/sh/lib/Makefile (obj-y): Removed old-checksum.o as it seems nothing depends on that. * arch/sh/kernel/sh_ksyms.c (csum_partial_copy): Don't export old (possibly obsolete) function. Index: arch/sh/kernel/sh_ksyms.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/sh_ksyms.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 sh_ksyms.c --- arch/sh/kernel/sh_ksyms.c 15 Oct 2001 20:44:53 -0000 1.1 +++ arch/sh/kernel/sh_ksyms.c 26 Mar 2002 01:52:33 -0000 @@ -36,9 +36,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(simple_strtol); EXPORT_SYMBOL(strtok); @@ -84,7 +81,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); Index: arch/sh/lib/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/lib/Makefile,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 Makefile --- arch/sh/lib/Makefile 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/lib/Makefile 26 Mar 2002 01:52:33 -0000 @@ -3,7 +3,7 @@ # L_TARGET = lib.a -obj-y = delay.o memcpy.o memset.o memmove.o memchr.o old-checksum.o \ +obj-y = delay.o memcpy.o memset.o memmove.o memchr.o \ checksum.o strcasecmp.o strlen.o USE_STANDARD_AS_RULE := true |
From: <boy...@su...> - 2002-03-25 18:25:39
|
Everyone, =20 We have added further information to the website at = www.superh-software.com The SH-5 System Architecture Manuals + datasheets etc are probably the = main items of interest. =20 Those who have registered for updates either have received or will = receive an e-mail notifying you in addition to this post. =20 Regards Boyd =20 ---------------------------------------------------- Boyd Moffat SuperH, Inc. 2430 Aztec West, Almondsbury, Bristol, UK, BS32 4AQ. e-mail: boy...@su... ---------------------------------------------------- |
From: akira <aki...@ho...> - 2002-03-25 18:03:58
|
=20 Hi, now my ipl work and i will try to compile a kernel. I have some = question: 1.. which version of kernel is better to use? 2.. i have the src 2.4.18, i have to use some patch? And where can I = find it? 3.. My board is a solution engine, which parameter i have to choose in = menuconfig? I have formerly compiled a kernel, i have use the commands: make ARCH=3Dsh menuconfig make ARCH=3Dsh CROSS_COMPILE=3Dsh-linux- dep make ARCH=3Dsh CROSS_COMPILE=3Dsh-linux- the vmlinux kernel was 32 Mbyte big, it is normally? After I have use: make ARCH=3Dsh CROSS_COMPILE=3Dsh-linux- zImage=20 and I have find in the ARCH/sh/boot/ path a kernel image zImage, that = was 700 kbyte big. Now I will load and boot it, how i can make it? (I have the gdb that = work whit ipl, i have already tested it.) Thanks. |
From: NIIBE Y. <gn...@m1...> - 2002-03-25 10:01:31
|
With (microscopic) optimization of the functionality of __addr_ok (which is used to access user space memory from kernel), kernel runs slightly faster. Besides, I've re-wrote __clear_user function which has been left as not-so-good implementation for three years (it's not so important as its use is so limited). 2002-03-25 NIIBE Yutaka <gn...@m1...> * include/asm-sh/uaccess.h (__clear_user): Make it external function. (Was: inline function). * arch/sh/mm/Makefile: Added the entry for __clear_user.o. * arch/sh/mm/__clear_user.S: File name change. As it's also used by SH-3, renamed from __clear_user_page-sh4.S, (__clear_user): New function. 2002-03-24 NIIBE Yutaka <gn...@m1...> * include/asm-sh/system.h (mm_segment_t): Move the definition to... * include/asm-sh/uaccess.h: ... here. And change it to have boolean is_user_space. (KERNEL_DS, USER_DS): New value domain: 0 or 1. (get_fs): Simplified. (set_fs): Optimized by asm. (__get_user_check): New implementation. (__get_user_1, __get_user_2, __get_user_4): New macros. (strnlen_user): Use __access_ok function. (strlen_user): Implemented as inline function. 2002-03-23 NIIBE Yutaka <gn...@m1...> * include/asm-sh/uaccess.h (__range_ok): Removed. (__access_ok, access_ok): New implementation. * include/asm-sh/thread_info.h (TIF_USERSPACE): Change to 31, so that expression can be simple (was: 18). Index: arch/sh/mm/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/Makefile,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 Makefile --- arch/sh/mm/Makefile 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/mm/Makefile 25 Mar 2002 09:51:56 -0000 @@ -10,8 +10,8 @@ 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_SH3) += cache-sh3.o __clear_user.o +obj-$(CONFIG_CPU_SH4) += cache-sh4.o __clear_user.o __copy_user_page-sh4.o ioremap.o USE_STANDARD_AS_RULE := true Index: arch/sh/mm/__clear_user.S =================================================================== RCS file: arch/sh/mm/__clear_user.S diff -N arch/sh/mm/__clear_user.S --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ arch/sh/mm/__clear_user.S 25 Mar 2002 09:51:56 -0000 @@ -0,0 +1,138 @@ +/* $Id: __clear_user_page.S,v 1.1.1.1 2001/10/15 20:44:53 mrbrown Exp $ + * + * __clear_user_page implementation of SuperH + * + * Copyright (C) 2001, 2002 Niibe Yutaka & Kaz Kojima + * + */ + +#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 + */ +#include <linux/linkage.h> +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 +#endif + +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 Index: arch/sh/mm/__clear_user_page-sh4.S =================================================================== RCS file: arch/sh/mm/__clear_user_page-sh4.S diff -N arch/sh/mm/__clear_user_page-sh4.S --- arch/sh/mm/__clear_user_page-sh4.S 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,49 +0,0 @@ -/* $Id: __clear_user_page-sh4.S,v 1.1.1.1 2001/10/15 20:44:53 mrbrown Exp $ - * - * __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 Index: include/asm-sh/system.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/system.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 system.h --- include/asm-sh/system.h 22 Mar 2002 12:57:10 -0000 1.3 +++ include/asm-sh/system.h 25 Mar 2002 09:51:56 -0000 @@ -12,10 +12,6 @@ * switch_to() should switch tasks to task nr n, first */ -typedef struct { - unsigned long seg; -} mm_segment_t; - #ifdef CONFIG_SMP #error no SMP SuperH #else Index: include/asm-sh/thread_info.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/thread_info.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 thread_info.h --- include/asm-sh/thread_info.h 22 Mar 2002 12:57:10 -0000 1.3 +++ include/asm-sh/thread_info.h 25 Mar 2002 09:51:56 -0000 @@ -94,7 +94,7 @@ static inline struct thread_info *curren #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ -#define TIF_USERSPACE 18 /* true if FS sets userspace */ +#define TIF_USERSPACE 31 /* true if FS sets userspace */ #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) Index: include/asm-sh/uaccess.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/uaccess.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 uaccess.h --- include/asm-sh/uaccess.h 6 Mar 2002 23:04:52 -0000 1.4 +++ include/asm-sh/uaccess.h 25 Mar 2002 09:51:56 -0000 @@ -2,7 +2,7 @@ * * User space memory access functions * - * Copyright (C) 1999 Niibe Yutaka + * Copyright (C) 1999, 2002 Niibe Yutaka * * Based on: * MIPS implementation version 1.15 by @@ -15,9 +15,21 @@ #include <linux/errno.h> #include <linux/sched.h> +/* + * NOTE: Macro/functions in this file depends on threads_info.h implementation. + * Assumes: + * TI_FLAGS == 8 + * TIF_USERSPACE == 31 + * USER_ADDR_LIMIT == 0x80000000 + */ + #define VERIFY_READ 0 #define VERIFY_WRITE 1 +typedef struct { + unsigned int is_user_space; +} mm_segment_t; + /* * The fs value determines whether argument validity checking should be * performed or not. If get_fs() == USER_DS, checking is performed, with @@ -28,50 +40,83 @@ #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) -#define KERN_ADDR_LIMIT 0xFFFFFFFF #define USER_ADDR_LIMIT 0x80000000 -#define KERNEL_DS MAKE_MM_SEG(KERN_ADDR_LIMIT) -#define USER_DS MAKE_MM_SEG(USER_ADDR_LIMIT) +#define KERNEL_DS MAKE_MM_SEG(0) +#define USER_DS MAKE_MM_SEG(1) #define get_ds() (KERNEL_DS) static inline mm_segment_t get_fs(void) { - if (test_thread_flag(TIF_USERSPACE)) - return USER_DS; - else - return KERNEL_DS; + return MAKE_MM_SEG(test_thread_flag(TIF_USERSPACE)); } static inline void set_fs(mm_segment_t s) { - if (s.seg == USER_ADDR_LIMIT) + unsigned long ti, flag; + __asm__ __volatile__( + "stc r7_bank, %0\n\t" + "mov.l @(8,%0), %1\n\t" + "shal %1\n\t" + "cmp/pl %2\n\t" + "rotcr %1\n\t" + "mov.l %1, @(8,%0)" + : "=&r" (ti), "=&r" (flag) + : "r" (s.is_user_space) + : "t"); +/**** + if (s.is_user_space) set_thread_flag(TIF_USERSPACE); else clear_thread_flag(TIF_USERSPACE); +****/ } -#define segment_eq(a,b) ((a).seg == (b).seg) - -#define __addr_ok(addr) ((unsigned long)(addr) < (get_fs().seg)) +#define segment_eq(a,b) ((a).is_user_space == (b).is_user_space) /* - * Uhhuh, this needs 33-bit arithmetic. We have a carry.. + * __access_ok: Check if address with size is OK or not. * - * sum := addr + size; carry? --> flag = true; - * if (sum >= addr_limit) flag = true; + * We do three checks: + * (1) is it user space? + * (2) addr + size --> carry? + * (3) addr + size >= 0x80000000 (USER_ADDR_LIMIT) + * + * (1) (2) (3) | RESULT + * 0 0 0 | ok + * 0 0 1 | ok + * 0 1 0 | bad + * 0 1 1 | bad + * 1 0 0 | ok + * 1 0 1 | bad + * 1 1 0 | bad + * 1 1 1 | bad */ -#define __range_ok(addr,size) ({ \ - unsigned long flag,sum; \ - __asm__("clrt; addc %3, %1; movt %0; cmp/hi %4, %1; rotcl %0" \ - :"=&r" (flag), "=r" (sum) \ - :"1" (addr), "r" ((int)(size)), "r" (get_fs().seg) \ - :"t"); \ - flag; }) +static int __access_ok(unsigned long addr, unsigned long size) +{ + unsigned long flag, tmp; -#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) -#define __access_ok(addr,size) (__range_ok(addr,size) == 0) + __asm__("stc r7_bank, %0\n\t" + "mov.l @(8,%0), %0\n\t" + "clrt\n\t" + "addc %2, %1\n\t" + "and %1, %0\n\t" + "rotcl %0\n\t" + "rotcl %0\n\t" + "and #3, %0" + : "=&z" (flag), "=r" (tmp) + : "r" (addr), "1" (size) + : "t"); + + return flag == 0; +} + +static inline int access_ok(int type, const void *p, unsigned long size) +{ + unsigned long addr = (unsigned long)p; + return __access_ok(addr, size); +} static inline int verify_area(int type, const void * addr, unsigned long size) { @@ -118,20 +163,92 @@ case 4: __get_user_asm("l"); break; \ default: __get_user_unknown(); break; \ } x = (__typeof__(*(ptr))) __gu_val; __gu_err; }) -#define __get_user_check(x,ptr,size) ({ \ -long __gu_err; \ -__typeof__(*(ptr)) __gu_val; \ -long __gu_addr; \ -__asm__("":"=r" (__gu_val)); \ -__gu_addr = (long) (ptr); \ -__asm__("":"=r" (__gu_err)); \ -if (__access_ok(__gu_addr,size)) { \ -switch (size) { \ -case 1: __get_user_asm("b"); break; \ -case 2: __get_user_asm("w"); break; \ -case 4: __get_user_asm("l"); break; \ -default: __get_user_unknown(); break; \ -} } x = (__typeof__(*(ptr))) __gu_val; __gu_err; }) +#define __get_user_check(x,ptr,size) \ +({ __typeof__(*(ptr)) __val; long __err; \ + switch(size) { \ + case 1: __err = __get_user_1(__val, ptr); break; \ + case 2: __err = __get_user_2(__val, ptr); break; \ + case 4: __err = __get_user_4(__val, ptr); break; \ + default: __get_user_unknown(); break; \ + } \ + (x) = __val; __err; }) + +#define __get_user_1(x,ptr) ({ \ +long __gu_err; \ +__typeof__(*(ptr)) __gu_val; \ +long __gu_addr = (long) (ptr); \ +__asm__("stc r7_bank, %1\n\t" \ + "mov.l @(8,%1), %1\n\t" \ + "and %2, %1\n\t" \ + "cmp/pz %1\n\t" \ + "bt/s 1f\n\t" \ + " mov #0, %0\n\t" \ + "0:\n" \ + "mov #-14, %0\n\t" \ + "bra 2f\n\t" \ + " mov #0, %1\n" \ + "1:\n\t" \ + "mov.b @%2, %1\n\t" \ + "extu.b %1, %1\n" \ + "2:\n" \ + ".section __ex_table,\"a\"\n\t" \ + ".long 1b, 0b\n\t" \ + ".previous" \ + : "=&r" (__gu_err), "=&r" (__gu_val) \ + : "r" (__gu_addr) \ + : "t"); \ +x = (__typeof__(*(ptr))) __gu_val; __gu_err; }) + +#define __get_user_2(x,ptr) ({ \ +long __gu_err; \ +__typeof__(*(ptr)) __gu_val; \ +long __gu_addr = (long) (ptr); \ +__asm__("stc r7_bank, %1\n\t" \ + "mov.l @(8,%1), %1\n\t" \ + "and %2, %1\n\t" \ + "cmp/pz %1\n\t" \ + "bt/s 1f\n\t" \ + " mov #0, %0\n\t" \ + "0:\n" \ + "mov #-14, %0\n\t" \ + "bra 2f\n\t" \ + " mov #0, %1\n" \ + "1:\n\t" \ + "mov.w @%2, %1\n\t" \ + "extu.w %1, %1\n" \ + "2:\n" \ + ".section __ex_table,\"a\"\n\t" \ + ".long 1b, 0b\n\t" \ + ".previous" \ + : "=&r" (__gu_err), "=&r" (__gu_val) \ + : "r" (__gu_addr) \ + : "t"); \ +x = (__typeof__(*(ptr))) __gu_val; __gu_err; }) + +#define __get_user_4(x,ptr) ({ \ +long __gu_err; \ +__typeof__(*(ptr)) __gu_val; \ +long __gu_addr = (long) (ptr); \ +__asm__("stc r7_bank, %1\n\t" \ + "mov.l @(8,%1), %1\n\t" \ + "and %2, %1\n\t" \ + "cmp/pz %1\n\t" \ + "bt/s 1f\n\t" \ + " mov #0, %0\n\t" \ + "0:\n" \ + "mov #-14, %0\n\t" \ + "bra 2f\n\t" \ + " mov #0, %1\n" \ + "1:\n\t" \ + "mov.l @%2, %1\n\t" \ + "2:\n" \ + ".section __ex_table,\"a\"\n\t" \ + ".long 1b, 0b\n\t" \ + ".previous" \ + : "=&r" (__gu_err), "=&r" (__gu_val) \ + : "r" (__gu_addr) \ + : "t"); \ +x = (__typeof__(*(ptr))) __gu_val; __gu_err; }) #define __get_user_asm(insn) \ ({ \ @@ -325,39 +442,11 @@ __copy_res; }) __copy_user((void *)(to), \ (void *)(from), n) -/* XXX: Not sure it works well.. - should be such that: 4byte clear and the rest. */ -static __inline__ __kernel_size_t -__clear_user(void *addr, __kernel_size_t size) -{ - unsigned long __a; - - __asm__ __volatile__( - "9:\n\t" - "dt %0\n" - "1:\n\t" - "mov.b %4, @%1\n\t" - "bf/s 9b\n\t" - " add #1, %1\n" - "2:\n" - ".section .fixup,\"ax\"\n" - "3:\n\t" - "mov.l 4f, %1\n\t" - "jmp @%1\n\t" - " nop\n" - ".balign 4\n" - "4: .long 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .balign 4\n" - " .long 1b,3b\n" - ".previous" - : "=r" (size), "=r" (__a) - : "0" (size), "1" (addr), "r" (0) - : "memory", "t"); - - return size; -} +/* + * Clear the area and return remaining number of bytes + * (on failure. Usually it's 0.) + */ +extern __kernel_size_t __clear_user(void *addr, __kernel_size_t size); #define clear_user(addr,n) ({ \ void * __cl_addr = (addr); \ @@ -413,8 +502,6 @@ if(__access_ok(__sfu_src, __sfu_count)) __sfu_res = __strncpy_from_user((unsigned long) (dest), __sfu_src, __sfu_count); \ } __sfu_res; }) -#define strlen_user(str) strnlen_user(str, ~0UL >> 1) - /* * Return the size of a string (including the ending 0!) */ @@ -453,10 +540,18 @@ static __inline__ long __strnlen_user(co static __inline__ long strnlen_user(const char *s, long n) { - if (!__addr_ok(s)) + if (!access_ok(VERIFY_READ, s, n)) return 0; else return __strnlen_user(s, n); +} + +static __inline__ long strlen_user(const char *s) +{ + if (!access_ok(VERIFY_READ, s, 0)) + return 0; + else + return __strnlen_user(s, ~0UL >> 1); } struct exception_table_entry -- |
From: Fabio G. <fg...@ti...> - 2002-03-25 09:30:09
|
>You don't mention whether you still have minicom running or not. >To allow gdb clear communication to the stub, you need to terminate or >suspend >minicom. Yes. I suspend minicom. > >Regarding your later mail, moving io.h up is definitely the right fix; if >you Yes. I muved up io.h and the compilation finishes good. >don't do the sti() then the breakpoint() tries to do a trapa while the BL >bit is >set and the CPU will take a reset exception. > >Have you already moved io.h up and it didn't help -- you don't see the 'g' >or the >initial GDB packet ($S05#b8)? I understand, and I verified the commenting sti(); a reset is generated. I have to add: 1) I'm using sh SCI port and not SCIF; 2) to communicate with the extern world I need a connector simulating the full rs232 connection (pin 1 and 5 of the DB-9 connector connected togheter), so I have: PC ---- connector ---- cable ----- my board 3) If I connect my linux PC to a wi98 PC instead of my board and I run iperterminal, when I run "gdb) target remote /dev/ttyS0" I see +$Hc-1#09$Hc-1#09$Hc-1#09$Hc-1#09---+$qC#b4$qC#b4$qC#b4$qC#b4---+$qOffsets#4b $qOffsets#4b$qOffsets#4b$qOffsets#4b---+ Is it right? Thanks. P.S. After suspending minicom I run the following steps. Are they correct? bash-2.05# sh-linux-gnu-gdb ./sh/linux/vmlinux GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh-linux-gnu"... (gdb) set endian little The target is assumed to be little endian (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Couldn't establish connection to remote target Malformed response to offset query, timeout (gdb) |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 18:11:48
|
Fabio Giovagnini wrote: > If I move the "io.h" include on top of main.c > everything works good. This is correct fix. -- |
From: Fabio G. <fg...@ti...> - 2002-03-22 17:43:52
|
Sorry for my many mails, but I don't understand. if I compile sh-ipl+g-2001-06-04 following the http://linuxsh.sourceforge.net/docs/gdb.php3 instructions, main.c fails because sti is not declared. If I move the "io.h" include on top of main.c everything works good. If I compile main.c case 'g': case '#': /* GDB Stub */ // sti (); putString ("g\n"); breakpoint (); break; when I execute the sh-ipl+g restart; this is the minicom output: SH IPL+g version 0.9, Copyright (C) 2000 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. > l SH IPL+g is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundatin; either version 2.1 of the License, or (at your option) any later version. > g SH IPL+g version 0.9, Copyright (C) 2000 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. > If I compile main.c case 'g': case '#': /* GDB Stub */ // sti (); putString ("g\n"); breakpoint (); break; the board stop to run. This is the output: SH IPL+g version 0.9, Copyright (C) 2000 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. > l SH IPL+g is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundatin; either version 2.1 of the License, or (at your option) any later version. > ---------------> here I press g but I can't read the echo. > Where am I in error? Thanks and regards. P.S. config.h #define CONFIG_LITTLE_ENDIAN 1 #define CONFIG_SCI 1 #define CONFIG_SHCARD7709A 1 config.mk CONFIG_LITTLE_ENDIAN=y CONFIG_CPU_SH3=y CONFIG_MYSHCARD=y .mem MEMORY { ROM (rx): ORIGIN = 0x80000000, LENGTH = 16384 RAM (rw): ORIGIN = 0x8c000000, LENGTH = 2560 STACK (rw): ORIGIN = 0x8c000a00, LENGTH = 1536 } |
From: Fabio G. <fg...@ti...> - 2002-03-22 15:58:00
|
I'm using sh-ipl+g-2001-06-04 and when I run g command, my board seems to stop execution. In fact after g command nothing I can do futher using minicom terminal. My board seems to die. So I thougth after g command I had to use only sh-linux-gnu-gdb vmlinux and I follow : (gdb) set endian little (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyS1 but instad of to see something similar to: 0xadff18c6 in ?? () I read an error about the impossibility to connect to target. Why this? Thanks |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 14:06:05
|
Fabio Giovagnini wrote: > I'm newby of LinuxSH. I'm working on a board sh3-7709A based and > now I'm able to run sh-ipl+g. Welcome! 2.4.18 is the stable kernel. Please try 2.4.18 at first. If you really want to "edge" thing, let's improve 2.5 mainline. I haven't tested 2.5 well. -- |
From: Fabio G. <fg...@ti...> - 2002-03-22 13:04:37
|
Hi, I'm newby of LinuxSH. I'm working on a board sh3-7709A based and now I'm able to run sh-ipl+g. I compiled kernel 2.4.18 using solution engine option beause my board has the same hitachi standard layout: 00000000h Area0 Flash ROM 04000000h Area1 SH7709A Internal Registers 08000000h Area2 SH Bus 0C000000h Area3 SDRAM 10000000h Area4 Companion Chip 14000000h Area5 SED 1355 18000000h Area6 PCMCIA/ISA 1C000000h Area7 SH7709A Internal Registers Now I should like to boot my kernel, and later I should like to begin the porting for all my board (peripherals and video). So I should like to start from the state of art of your development and I should like to work with you. If ican, tell me what I have to do. Thanks. |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 13:02:22
|
Altough I'm not sure where the problem is, current 2.5 CVS kernel doesn't run with new flush_cache_range. Sorry, I'm a bit tired today, it's not tested well. My data point is reverting the change of flush_cache_range (I mean, just call flush_cache_all), all goes well. With new flush_cache_range, in the boot process, many shell scripts in /etc/init.d/* fails. I needed to change the text of flush_cache_range (pte_offset_kernel), but it's just a textual change with no difference of semantics. Thought? -- |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 12:54:25
|
And bug fixes. 2002-03-22 NIIBE Yutaka <gn...@m1...> * include/asm-sh/thread_info.h: Define cpu and preempt_count as 16-bit to fit cache (for SH-3). (INIT_THREAD_INFO): Initialize the member 'cpu'. * include/asm-sh/system.h (switch_to): Use __dummy output argument for r0. * include/asm-sh/pgtable.h (pte_offset): Removed. (pte_offset_map, pte_offset_map_nested): Define as pte_offset_kernel. * include/asm-sh/pgalloc.h (pte_alloc_one): Bug fix for clear_page. * arch/sh/mm/cache-sh4.c (flush_cache_range): Don't need to check find_vma. * arch/sh/mm/cache-sh4.c (flush_cache_range, flush_cache_page, clear_user_page, copy_user_page): Use pte_offset_kernel. * arch/sh/mm/fault.c (__do_page_fault): Likewise. * arch/sh/kernel/signal.c (restore_sigcontext): Use tsk. * arch/sh/kernel/setup.c (setup_arch): Bug fix for FPU initialization. * arch/sh/kernel/ptrace.c (sys_ptrace): Remove unused variable tsk. (do_syscall_trace): Use tsk. * arch/sh/kernel/process.c (alloc_task_struct, free_task_struct): Removed. (copy_thread): Bug fix for thread_info. Clear TIF_USEDFPU flag. (copy_thread, dump_thread): Don't distingush init_task specially. (switch_to): Bug fix, use next->thread_info. * arch/sh/kernel/entry.S (work_resched, resume_userspace, syscall_exit): Use r8 for current_thread_info. (syscall_exit_work): Bug fix, load do_syscall_trace. (system_call): Don't need to ext.u. Micro opt. for syscall_nr. (syscall_trace_entry, syscall_badsys): Bug fix for error return value. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.8 diff -u -3 -p -r1.8 entry.S --- arch/sh/kernel/entry.S 22 Mar 2002 10:52:09 -0000 1.8 +++ arch/sh/kernel/entry.S 22 Mar 2002 12:49:43 -0000 @@ -129,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 @@ -257,7 +257,7 @@ 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 @@ -278,22 +278,21 @@ error: .align 2 work_pending: ! r0: current_thread_info->flags + ! r8: current_thread_info tst #_TIF_NEED_RESCHED, r0 bt work_notifysig .align 2 work_resched: mov.l 1f, r1 - jsr @r1 + jsr @r1 ! schedule nop /* CLI */ stc sr, r0 or #0xf0, r0 ldc r0, sr ! - GET_THREAD_INFO(r1) - add #TI_FLAGS, r1 - mov.l @r1, r0 ! current_thread_info->flags + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags tst #_TIF_WORK_MASK, r0 bt restore_all bra work_pending @@ -317,9 +316,8 @@ ENTRY(resume_userspace) or #0xf0, r0 ldc r0, sr ! - GET_THREAD_INFO(r1) - add #TI_FLAGS, r1 - mov.l @r1, r0 ! current_thread_info->flags + GET_THREAD_INFO(r8) + mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags tst #_TIF_WORK_MASK, r0 bf work_pending bra restore_all @@ -327,17 +325,17 @@ ENTRY(resume_userspace) .align 2 1: .long SYMBOL_NAME(schedule) -2: - .long SYMBOL_NAME(do_signal) +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 work_pending STI() ! XXX setup arguments... - mov.l 1f, r0 + mov.l 4f, r0 ! do_syscall_trace jsr @r0 nop bra resume_userspace @@ -373,7 +371,6 @@ system_call: ! ! 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 @@ -385,31 +382,29 @@ system_call: 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 + or r3, r8 ! Encode syscall # and # of arguments + mov.l r8, @r14 ! set syscall_nr STI() ! Call the system call handler through the table. ! First check for bad syscall number mov r3, r9 - mov.l 2f, r10 ! Number of syscalls - cmp/hs r10, r9 + mov.l 2f, r8 ! Number of syscalls + cmp/hs r8, r9 bt syscall_badsys ! ! Good syscall number - GET_THREAD_INFO(r11) - add #TI_FLAGS, r11 - mov.l @r11, r10 - mov #_TIF_SYSCALL_TRACE, r11 - tst r11, r10 + GET_THREAD_INFO(r8) + 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, r11 ! Load the address of sys_call_table - add r11, r9 - mov.l @r9, r11 - jsr @r11 ! jump to specific syscall handler + 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 mov.l r0, @(OFF_R0,r15) ! save the return value ENTRY(ret_from_fork) @@ -419,9 +414,8 @@ syscall_exit: or #0xf0, r0 ldc r0, sr ! - GET_THREAD_INFO(r1) - add #TI_FLAGS, r1 - mov.l @r1, r0 ! current_thread_info->flags + 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: @@ -483,6 +477,7 @@ restore_all: 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) @@ -511,8 +506,9 @@ syscall_trace_entry: mov.l 2f, r10 ! Number of syscalls cmp/hs r10, r3 bf syscall_call + mov #-ENOSYS, r0 bra syscall_exit - mov #-ENOSYS, r0 + mov.l r0, @(OFF_R0,r15) ! Return value .align 2 1: .long SYMBOL_NAME(do_syscall_trace) @@ -522,8 +518,9 @@ __INV_IMASK: .align 2 syscall_badsys: ! Bad syscall number + mov #-ENOSYS, r0 bra resume_userspace - mov #-ENOSYS, r0 + mov.l r0, @(OFF_R0,r15) ! Return value .align 2 ret_from_irq: @@ -590,7 +587,7 @@ handle_exception: 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 ! Index: arch/sh/kernel/head.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/head.S,v retrieving revision 1.2 diff -u -3 -p -r1.2 head.S --- arch/sh/kernel/head.S 29 Dec 2001 06:50:38 -0000 1.2 +++ arch/sh/kernel/head.S 22 Mar 2002 12:49:43 -0000 @@ -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 Index: arch/sh/kernel/process.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/process.c,v retrieving revision 1.7 diff -u -3 -p -r1.7 process.c --- arch/sh/kernel/process.c 22 Mar 2002 03:58:40 -0000 1.7 +++ arch/sh/kernel/process.c 22 Mar 2002 12:49:43 -0000 @@ -96,17 +96,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 */ @@ -197,26 +186,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 */ @@ -224,6 +201,19 @@ 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__) + { + unsigned long flags; + struct task_struct *tsk = current; + + save_and_cli(flags); + unlazy_fpu(tsk); + restore_flags(flags); + p->thread.fpu = tsk->thread.fpu; + p->used_math = tsk->used_math; + clear_ti_thread_flag(p->thread_info, TIF_USEDFPU); + } +#endif return 0; } @@ -254,7 +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); @@ -268,7 +258,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, Index: arch/sh/kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/ptrace.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 ptrace.c --- arch/sh/kernel/ptrace.c 1 Mar 2002 01:55:10 -0000 1.3 +++ arch/sh/kernel/ptrace.c 22 Mar 2002 12:49:43 -0000 @@ -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; @@ -378,11 +378,11 @@ asmlinkage void do_syscall_trace(void) if (!test_thread_flag(TIF_SYSCALL_TRACE)) return; - if (!(current->ptrace & PT_PTRACED)) + 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); Index: arch/sh/kernel/setup.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/setup.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 setup.c --- arch/sh/kernel/setup.c 1 Mar 2002 01:55:10 -0000 1.4 +++ arch/sh/kernel/setup.c 22 Mar 2002 12:49:43 -0000 @@ -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; - set_thread_flag(TIF_USEDFPU); + /* FPU initialization */ + clear_thread_flag(TIF_USEDFPU); + current->used_math = 0; #endif paging_init(); } Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 signal.c --- arch/sh/kernel/signal.c 22 Mar 2002 10:52:09 -0000 1.5 +++ arch/sh/kernel/signal.c 22 Mar 2002 12:49:43 -0000 @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.5 2002/03/22 10:52:09 gniibe Exp $ +/* $Id: signal.c,v 1.4 2002/03/22 00:59:15 gniibe Exp $ * * linux/arch/sh/kernel/signal.c * @@ -250,7 +250,7 @@ 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); Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 cache-sh4.c --- arch/sh/mm/cache-sh4.c 22 Mar 2002 03:58:40 -0000 1.5 +++ arch/sh/mm/cache-sh4.c 22 Mar 2002 12:49:43 -0000 @@ -329,8 +329,6 @@ void flush_cache_range(struct vm_area_st start &= PAGE_MASK; - if (!find_vma(mm, start)) - return; if (mm->context != current->active_mm->context) { flush_cache_all(); } else { @@ -344,7 +342,7 @@ void flush_cache_range(struct vm_area_st for (start; start < end; start += PAGE_SIZE) { pgd = pgd_offset(mm, start); pmd = pmd_offset(pgd, start); - pte = pte_offset(pmd, start); + pte = pte_offset_kernel(pmd, start); if (pte_val(*pte) & _PAGE_PRESENT) { __flush_icache_page(start); @@ -375,7 +373,7 @@ void flush_cache_page(struct vm_area_str 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)) return; @@ -459,7 +457,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; @@ -498,7 +496,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; Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/fault.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 fault.c --- arch/sh/mm/fault.c 24 Jan 2002 11:04:15 -0000 1.4 +++ arch/sh/mm/fault.c 22 Mar 2002 12:49:43 -0000 @@ -261,7 +261,7 @@ asmlinkage int __do_page_fault(struct pt pmd_clear(pmd); return 1; } - pte = pte_offset(pmd, address); + pte = pte_offset_kernel(pmd, address); entry = *pte; if (pte_none(entry) || pte_not_present(entry) || (writeaccess && !pte_write(entry))) Index: include/asm-sh/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.5 diff -u -3 -p -r1.5 pgalloc.h --- include/asm-sh/pgalloc.h 22 Mar 2002 10:52:09 -0000 1.5 +++ include/asm-sh/pgalloc.h 22 Mar 2002 12:49:44 -0000 @@ -64,7 +64,7 @@ static inline struct page *pte_alloc_one do { pte = alloc_pages(GFP_KERNEL, 0); if (pte) - clear_page(pte); + clear_page(page_address(pte)); else { current->state = TASK_UNINTERRUPTIBLE; schedule_timeout(HZ); Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgtable.h,v retrieving revision 1.6 diff -u -3 -p -r1.6 pgtable.h --- include/asm-sh/pgtable.h 22 Mar 2002 03:58:40 -0000 1.6 +++ include/asm-sh/pgtable.h 22 Mar 2002 12:49:44 -0000 @@ -288,13 +288,10 @@ static inline pte_t pte_modify(pte_t pte /* Find an entry in the third-level page table.. */ #define __pte_offset(address) \ ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) -#define pte_offset(dir, address) \ - ((pte_t *)pmd_page(*(dir)) + __pte_offset(address)) #define pte_offset_kernel(dir, address) \ ((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address)) -#define pte_offset_map(dir, address) \ - ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) -#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address) +#define pte_offset_map(dir, address) pte_offset_kernel(dir, address) +#define pte_offset_map_nested(dir, address) pte_offset_kernel(dir, address) #define pte_unmap(pte) do { } while (0) #define pte_unmap_nested(pte) do { } while (0) @@ -304,7 +301,7 @@ extern void update_mmu_cache(struct vm_a /* Encode and de-code a swap entry */ /* * NOTE: We should set ZEROs at the position of _PAGE_PRESENT - * and _PAGE_PROTONOE bits + * and _PAGE_PROTNONE bits */ #define SWP_TYPE(x) ((x).val & 0xff) #define SWP_OFFSET(x) ((x).val >> 10) Index: include/asm-sh/system.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/system.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 system.h --- include/asm-sh/system.h 22 Mar 2002 03:58:40 -0000 1.2 +++ include/asm-sh/system.h 22 Mar 2002 12:49:44 -0000 @@ -20,48 +20,48 @@ typedef struct { #error no SMP SuperH #else #define prepare_to_switch() do { } while(0) -#define switch_to(prev, next) do { \ - register unsigned long *__ts1 __asm__ ("r1") = &prev->thread.sp; \ - register unsigned long *__ts2 __asm__ ("r2") = &prev->thread.pc; \ - register unsigned long *__ts4 __asm__ ("r4") = (unsigned long *)prev; \ - register unsigned long *__ts5 __asm__ ("r5") = (unsigned long *)next; \ - register unsigned long *__ts6 __asm__ ("r6") = &next->thread.sp; \ - register unsigned long __ts7 __asm__ ("r7") = next->thread.pc; \ - __asm__ __volatile__ (".balign 4\n\t" \ - "stc.l gbr, @-r15\n\t" \ - "sts.l pr, @-r15\n\t" \ - "mov.l r8, @-r15\n\t" \ - "mov.l r9, @-r15\n\t" \ - "mov.l r10, @-r15\n\t" \ - "mov.l r11, @-r15\n\t" \ - "mov.l r12, @-r15\n\t" \ - "mov.l r13, @-r15\n\t" \ - "mov.l r14, @-r15\n\t" \ - "mov.l r15, @r1 ! save SP\n\t" \ +#define switch_to(prev, next) do { \ + register unsigned long __dummy; \ + register unsigned long *__ts1 __asm__ ("r1") = &prev->thread.sp; \ + register unsigned long *__ts2 __asm__ ("r2") = &prev->thread.pc; \ + register unsigned long *__ts4 __asm__ ("r4") = (unsigned long *)prev; \ + register unsigned long *__ts5 __asm__ ("r5") = (unsigned long *)next; \ + register unsigned long *__ts6 __asm__ ("r6") = &next->thread.sp; \ + register unsigned long __ts7 __asm__ ("r7") = next->thread.pc; \ + __asm__ __volatile__ (".balign 4\n\t" \ + "stc.l gbr, @-r15\n\t" \ + "sts.l pr, @-r15\n\t" \ + "mov.l r8, @-r15\n\t" \ + "mov.l r9, @-r15\n\t" \ + "mov.l r10, @-r15\n\t" \ + "mov.l r11, @-r15\n\t" \ + "mov.l r12, @-r15\n\t" \ + "mov.l r13, @-r15\n\t" \ + "mov.l r14, @-r15\n\t" \ + "mov.l r15, @r1 ! save SP\n\t" \ "mov.l @r6, r15 ! change to new stack\n\t" \ - "mova 1f, %0\n\t" \ - "mov.l %0, @r2 ! save PC\n\t" \ - "mov.l 2f, %0\n\t" \ + "mova 1f, %0\n\t" \ + "mov.l %0, @r2 ! save PC\n\t" \ + "mov.l 2f, %0\n\t" \ "jmp @%0 ! call __switch_to\n\t" \ - " lds r7, pr ! with return to new PC\n\t" \ - ".balign 4\n" \ - "2:\n\t" \ - ".long " "__switch_to\n" \ - "1:\n\t" \ - "mov.l @r15+, r14\n\t" \ - "mov.l @r15+, r13\n\t" \ - "mov.l @r15+, r12\n\t" \ - "mov.l @r15+, r11\n\t" \ - "mov.l @r15+, r10\n\t" \ - "mov.l @r15+, r9\n\t" \ - "mov.l @r15+, r8\n\t" \ - "lds.l @r15+, pr\n\t" \ - "ldc.l @r15+, gbr\n\t" \ - : /* No output */ \ - : "z" (prev), \ - "r" (__ts1), "r" (__ts2), \ - "r" (__ts4), "r" (__ts5), "r" (__ts6), "r" (__ts7) \ - : "r3", "t"); \ + " lds r7, pr ! with return to new PC\n\t" \ + ".balign 4\n" \ + "2:\n\t" \ + ".long __switch_to\n" \ + "1:\n\t" \ + "mov.l @r15+, r14\n\t" \ + "mov.l @r15+, r13\n\t" \ + "mov.l @r15+, r12\n\t" \ + "mov.l @r15+, r11\n\t" \ + "mov.l @r15+, r10\n\t" \ + "mov.l @r15+, r9\n\t" \ + "mov.l @r15+, r8\n\t" \ + "lds.l @r15+, pr\n\t" \ + "ldc.l @r15+, gbr\n\t" \ + : "=z" (__dummy) \ + : "r" (__ts1), "r" (__ts2), "r" (__ts4), \ + "r" (__ts5), "r" (__ts6), "r" (__ts7) \ + : "r3", "t"); \ } while (0) #endif Index: include/asm-sh/thread_info.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/thread_info.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 thread_info.h --- include/asm-sh/thread_info.h 19 Mar 2002 23:48:06 -0000 1.2 +++ include/asm-sh/thread_info.h 22 Mar 2002 12:49:44 -0000 @@ -27,9 +27,9 @@ struct thread_info { struct task_struct *task; /* main task structure */ struct exec_domain *exec_domain; /* execution domain */ __u32 flags; /* low level flags */ - __s32 preempt_count; /* 0 => preemptable, <0 => BUG */ + __u16 cpu; + __s16 preempt_count; /* 0 => preemptable, <0 => BUG */ - __u32 cpu; __u8 supervisor_stack[0]; }; @@ -52,6 +52,7 @@ struct thread_info { task: &tsk, \ exec_domain: &default_exec_domain, \ flags: 0, \ + cpu: 0, \ preempt_count: 0, \ } |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 05:40:01
|
Follow up to 2.5.7. 2002-03-22 NIIBE Yutaka <gn...@m1...> * include/asm-sh/mman.h (PROT_SEM): Added. * arch/sh/kernel/signal.c (do_signal): Follow the name change of p_ptr -> parent of the task. * include/asm-sh/unistd.h (__NR_futex): Added. * arch/sh/kernel/entry.S (sys_call_table): Added sys_futex. (syscall_exit_work): Move up. (Near work_pending.) (sys_nfsservctl): Define to sys_ni_syscall, when not NFSD. * include/asm-sh/pgalloc.h (check_pgt_cache): New macro. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.7 diff -u -3 -p -r1.7 entry.S --- arch/sh/kernel/entry.S 22 Mar 2002 04:44:45 -0000 1.7 +++ arch/sh/kernel/entry.S 22 Mar 2002 05:37:34 -0000 @@ -2,7 +2,7 @@ * * 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 @@ -15,6 +15,9 @@ #include <linux/config.h> #include <asm/thread_info.h> +#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 @@ -327,6 +330,19 @@ ENTRY(resume_userspace) 2: .long SYMBOL_NAME(do_signal) + .align 2 +syscall_exit_work: + ! r0: current_thread_info->flags + tst #_TIF_SYSCALL_TRACE, r0 + bt work_pending + STI() + ! XXX setup arguments... + mov.l 1f, r0 + jsr @r0 + nop + bra resume_userspace + nop + /* * Syscall interface: * @@ -499,19 +515,6 @@ syscall_trace_entry: mov #-ENOSYS, r0 .align 2 -syscall_exit_work: - ! r0: current_thread_info->flags - tst #_TIF_SYSCALL_TRACE, r0 - bt work_pending - STI() - ! XXX setup arguments... - mov.l 1f, r0 - jsr @r0 - nop - bra resume_userspace - nop - - .align 2 1: .long SYMBOL_NAME(do_syscall_trace) 2: .long NR_syscalls __INV_IMASK: @@ -1123,6 +1126,7 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_fremovexattr) .long SYMBOL_NAME(sys_tkill) .long SYMBOL_NAME(sys_sendfile64) + .long SYMBOL_NAME(sys_futex) /* 240 */ .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 signal.c --- arch/sh/kernel/signal.c 22 Mar 2002 00:59:15 -0000 1.4 +++ arch/sh/kernel/signal.c 22 Mar 2002 05:37:34 -0000 @@ -620,8 +620,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 +660,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; Index: include/asm-sh/mman.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mman.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 mman.h --- include/asm-sh/mman.h 15 Oct 2001 20:45:10 -0000 1.1.1.1 +++ include/asm-sh/mman.h 22 Mar 2002 05:37:34 -0000 @@ -4,6 +4,7 @@ #define PROT_READ 0x1 /* page can be read */ #define PROT_WRITE 0x2 /* page can be written */ #define PROT_EXEC 0x4 /* page can be executed */ +#define PROT_SEM 0x8 /* page may be used for atomic ops */ #define PROT_NONE 0x0 /* page can not be accessed */ #define MAP_SHARED 0x01 /* Share changes */ Index: include/asm-sh/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 pgalloc.h --- include/asm-sh/pgalloc.h 22 Mar 2002 04:44:46 -0000 1.4 +++ include/asm-sh/pgalloc.h 22 Mar 2002 05:37:35 -0000 @@ -173,4 +173,7 @@ static inline void ptep_mkdirty(pte_t *p pte_t old_pte = *ptep; set_pte(ptep, pte_mkdirty(old_pte)); } + +#define check_pgt_cache() do { } while (0) + #endif /* __ASM_SH_PGALLOC_H */ Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 unistd.h --- include/asm-sh/unistd.h 22 Mar 2002 04:44:46 -0000 1.3 +++ include/asm-sh/unistd.h 22 Mar 2002 05:37:35 -0000 @@ -247,6 +247,7 @@ #define __NR_fremovexattr 237 #define __NR_tkill 238 #define __NR_sendfile64 239 +#define __NR_futex 240 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ |
From: <web...@mb...> - 2002-03-22 05:28:38
|
VW50aXRsZWQgRG9jdW1lbnQgICAgICAgICAgICC+yLPnx8+8vL/kLg0KICAgILmruvHA17Hb uK69rCDA1LTPtNkuDQogICC5q7rxwNex27iuvay0wiC8vLDowPvAziC/+cautfDB7rTPu+e/ zSC75773wabI3rfOILjWxry5zLXwvu4gIMXrx9Wx4rz6wLsgwMy/68fRDQogICDD1sO3tNwg tfDB9sXQILGzwOe3ziC1pcDMxc0gvtDD4LnmvcTAziBNUEVHuKYgsbjH9sfPv6kgILi4tem+ +r3AtM+02S4gv6mx4r+htMIgxLi8x7HitMnAzCDDt7ChDQogILXHvu4ov7W5rsDauLcsIMfR sdjA2ri3LCC5q8DauLcpvLHFw7D6IERJQ1RBVElPTiCx4rTJwMwgIMO3sKG1x77uIMHvvK6/ obytILXoseK0ybfCICDG8rChuKYNCiAgx9IgvPYgwNa1tbfPILHiyLm1x776vcC0z7TZLiAg DQogIL+pt6+60LKyIMDnuczA1rDUv7W+7rD4us64piDH0iC89iDA1rTCICCx4si4uKYgteW4 s7TPtNkuDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPMPivcPA2yC51yC787+1wNs+ICAg ICAgICAgICAgICAgICAgICAgICAgICAgPMPivcPA2yC51yC787+1wNs+ICAgICAgICAgICAg ICAgICAgIDy9xcO7vK3A27y6PiAgICAgILmruvHA17HbuK69rCDBpsewwLsgucy4riC757/r x9gguri9x7z2ICDA1r3AtM+02S4gvcXDu8fYwda9w7jpILmrt+FjZLimILnfvNvH2LXluK6w 2r3AtM+02S4NCsioxuTAzMH2IDogIHd3dy5tYmNtb3ZpZWVuZ2xpc2guY28ua3INCiAgICAg IA0KIKHhILq7ILjewM/AuiDBpLq4xeu9xbjBIMDMv+sgw8vB+CC51yDBpLq4ILq4yKMgte6/ oSCw/MfRILn9t/wgwaYgNTDBtr+hIMHYx9FbsaSw7V243sDPwNS0z7TZLg0KIKHhIEUtbWFp bCDB1rzStMIgsMu79r+hIMDHx9ggvPbB/bXHvvrAuLjnLMHWvNLAzL/cwMcgvu62sMfRILCz wM7BpLq4tbUgsKHB9rDtIMDWwfYgvsq9wLTPtNkuDQogoeEgvPbB/bXIIEUtbWFpbMHWvNK0 wiDIq7q4vLogwMy/3MDHIL7utrDH0SC48cD7wLi3zrW1ILvnv+u1x77uwfbB9iC+yr3AtM+0 2S4gDQogDQogoeEgtPXAzLvzILjewM/AuyC/+MShvsrAuL3DuOkgvPa9xbDFus64piC0rbev wda8vL/kLg0KICA= |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 04:57:42
|
Include changes from mainline 2.5.7. 2002-03-22 NIIBE Yutaka <gn...@m1...> Update to 2.5.7. * AGAINST-2.5.7: New file. * AGAINST-2.5.6: Removed. * Makefile: Version 2.5.7. * Makefile, arch/sh/Config.help, arch/sh/config.in, drivers/Makefile, drivers/pci/pci.ids, kernel/ptrace.c, mm/memory.c: Include changes from mainline (2.5.7). Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.11 diff -u -3 -p -r1.11 Makefile --- Makefile 22 Mar 2002 04:44:45 -0000 1.11 +++ Makefile 22 Mar 2002 04:55:46 -0000 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = -sh KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -167,7 +167,6 @@ DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drive DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o DRIVERS-$(CONFIG_PNP) += drivers/pnp/pnp.o @@ -247,14 +246,14 @@ MRPROPER_DIRS = \ include arch/$(ARCH)/Makefile -export CPPFLAGS CFLAGS AFLAGS +export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS .S.s: - $(CPP) $(AFLAGS) -traditional -o $*.s $< + $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $< .S.o: - $(CC) $(AFLAGS) -traditional -c -o $*.o $< + $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $< Version: dummy @rm -f include/linux/compile.h Index: arch/sh/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Config.help,v retrieving revision 1.3 diff -u -3 -p -r1.3 Config.help --- arch/sh/Config.help 26 Feb 2002 09:15:15 -0000 1.3 +++ arch/sh/Config.help 22 Mar 2002 04:55:46 -0000 @@ -623,34 +623,6 @@ CONFIG_RTC The module is called rtc.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. -CONFIG_SOUND - If you have a sound card in your computer, i.e. if it can say more - than an occasional beep, say Y. Be sure to have all the information - about your sound card and its configuration down (I/O port, - interrupt and DMA channel), because you will be asked for it. - - You want to read the Sound-HOWTO, available from - <http://www.linuxdoc.org/docs.html#howto>. General information about - the modular sound system is contained in the files - <file:Documentation/sound/Introduction>. The file - <file:Documentation/sound/README.OSS> contains some slightly - outdated but still useful information as well. - - If you have a PnP sound card and you want to configure it at boot - time using the ISA PnP tools (read - <http://www.roestock.demon.co.uk/isapnptools/>), then you need to - compile the sound card support as a module ( = code which can be - inserted in and removed from the running kernel whenever you want) - and load that module after the PnP configuration is finished. To do - this, say M here and read <file:Documentation/modules.txt> as well - as <file:Documentation/sound/README.modules>; the module will be - called soundcore.o. - - I'm told that even without a sound card, you can make your computer - say more than an occasional beep, by programming the PC speaker. - Kernel patches and supporting utilities to do that are in the pcsp - package, available at <ftp://ftp.infradead.org/pub/pcsp/>. - CONFIG_MAGIC_SYSRQ If you say Y here, you will have some control over the system even if the system crashes for example during kernel debugging (e.g., you Index: arch/sh/config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/config.in,v retrieving revision 1.6 diff -u -3 -p -r1.6 config.in --- arch/sh/config.in 22 Mar 2002 00:59:15 -0000 1.6 +++ arch/sh/config.in 22 Mar 2002 04:55:47 -0000 @@ -218,7 +218,6 @@ tristate 'ATA/IDE/MFM/RLL support' CONFI if [ "$CONFIG_IDE" != "n" ]; then source drivers/ide/Config.in else - define_bool CONFIG_BLK_DEV_IDE_MODES n define_bool CONFIG_BLK_DEV_HD n fi endmenu Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.6 diff -u -3 -p -r1.6 Makefile --- drivers/Makefile 22 Mar 2002 04:44:45 -0000 1.6 +++ drivers/Makefile 22 Mar 2002 04:55:47 -0000 @@ -8,12 +8,14 @@ mod-subdirs := dio mtd sbus video macintosh usb input telephony sgi ide \ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ - fc4 net/hamradio i2c acpi bluetooth input/serio input/gameport maple + fc4 net/hamradio i2c acpi bluetooth input/serio \ + input/gameport parport hotplug maple -subdir-y := base parport char block net misc media cdrom hotplug +subdir-y := base char block net misc media cdrom subdir-m := $(subdir-y) - +subdir-$(CONFIG_PARPORT) += parport +subdir-$(CONFIG_HOTPLUG_PCI) += hotplug subdir-$(CONFIG_DIO) += dio subdir-$(CONFIG_PCI) += pci subdir-$(CONFIG_PCMCIA) += pcmcia Index: drivers/pci/pci.ids =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pci/pci.ids,v retrieving revision 1.4 diff -u -3 -p -r1.4 pci.ids --- drivers/pci/pci.ids 22 Mar 2002 04:44:46 -0000 1.4 +++ drivers/pci/pci.ids 22 Mar 2002 04:55:47 -0000 @@ -526,8 +526,10 @@ 2040 79c974 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge - 700e AMD-760 [Irongate] System Controller - 700f AMD-760 [Irongate] AGP Bridge + 700c AMD-760 MP [IGD4-2P] System Controller + 700d AMD-760 MP [IGD4-2P] AGP Bridge + 700e AMD-760 [IGD4-1P] System Controller + 700f AMD-760 [IGD4-1P] AGP Bridge 7400 AMD-755 [Cobra] ISA 7401 AMD-755 [Cobra] IDE 7403 AMD-755 [Cobra] ACPI @@ -540,11 +542,21 @@ 7411 AMD-765 [Viper] IDE 7413 AMD-765 [Viper] ACPI 7414 AMD-765 [Viper] USB - 7440 AMD-768 [??] ISA - 7441 AMD-768 [??] IDE - 7443 AMD-768 [??] ACPI - 7448 AMD-768 [??] PCI - 7449 AMD-768 [??] USB + 7440 AMD-768 [Opus] ISA + 7441 AMD-768 [Opus] IDE + 7443 AMD-768 [Opus] ACPI + 7448 AMD-768 [Opus] PCI + 7449 AMD-768 [Opus] USB + 7454 AMD-8151 System Controller + 7455 AMD-8151 AGP Bridge + 7460 AMD-8111 PCI + 7461 AMD-8111 USB + 7462 AMD-8111 Ethernet + 7468 AMD-8111 LPC + 7469 AMD-8111 IDE + 746a AMD-8111 SMBus 2.0 + 746b AMD-8111 ACPI + 746d AMD-8111 AC97 Audio 1023 Trident Microsystems 0194 82C194 2000 4DWave DX @@ -1055,11 +1067,11 @@ 1052 ?Young Micro Systems 1053 Young Micro Systems 1054 Hitachi, Ltd -1055 EFAR Microsystems - 9130 EIDE Controller - 9460 PCI to ISA Bridge - 9462 USB Universal Host Controller [OHCI] - 9463 Power Management Controller [Bridge] +1055 Efar Microsystems + 9130 slc90e66 [Victory66] IDE + 9460 slc90e66 [Victory66] ISA + 9462 slc90e66 [Victory66] USB + 9463 slc90e66 [Victory66] ACPI 1056 ICL # Motorola made a mistake and used 1507 instead of 1057 in some chips. Please look at the 1507 entry as well when updating this. 1057 Motorola @@ -1925,6 +1937,7 @@ 0151 NV15 DDR (GeForce2 GTS) 0152 NV15 Bladerunner (GeForce2 Ultra) 0153 NV15 GL (Quadro2 Pro) + 01bc nForce IDE 0200 NV20 (GeForce3) 0203 Quadro DCC 10df Emulex Corporation @@ -5068,6 +5081,8 @@ 244c 82820 820 (Camino 2) Chipset ISA Bridge (ICH2-M) 244e 82820 820 (Camino 2) Chipset PCI 2485 AC'97 Audio Controller + 248a 82801CAM ICH3-M IDE + 248b 82801CA ICH3 IDE 2500 82820 820 (Camino) Chipset Host Bridge (MCH) 1043 801c P3C-2000 system chipset 2501 82820 820 (Camino) Chipset Host Bridge (MCH) @@ -5120,10 +5135,10 @@ 71a0 440GX - 82443GX Host bridge 71a1 440GX - 82443GX AGP bridge 71a2 440GX - 82443GX Host bridge (AGP disabled) - 7600 82372FB PCI to ISA Bridge - 7601 82372FB PIIX4 IDE - 7602 82372FB [PCI-to-USB UHCI] - 7603 82372FB System Management Bus Controller + 7600 82372FB PIIX5 ISA + 7601 82372FB PIIX5 IDE + 7602 82372FB PIIX5 USB + 7603 82372FB PIIX5 SMBus 7800 i740 1092 0100 Stealth II G460 8086 0100 Intel740 Graphics Accelerator Index: kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/kernel/ptrace.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 ptrace.c --- kernel/ptrace.c 22 Mar 2002 03:58:40 -0000 1.6 +++ kernel/ptrace.c 22 Mar 2002 04:55:47 -0000 @@ -24,7 +24,7 @@ int ptrace_check_attach(struct task_stru if (!(child->ptrace & PT_PTRACED)) return -ESRCH; - if (child->p_pptr != current) + if (child->parent != current) return -ESRCH; if (!kill) { @@ -70,9 +70,9 @@ int ptrace_attach(struct task_struct *ta task_unlock(task); write_lock_irq(&tasklist_lock); - if (task->p_pptr != current) { + if (task->parent != current) { REMOVE_LINKS(task); - task->p_pptr = current; + task->parent = current; SET_LINKS(task); } write_unlock_irq(&tasklist_lock); @@ -98,7 +98,7 @@ int ptrace_detach(struct task_struct *ch child->exit_code = data; write_lock_irq(&tasklist_lock); REMOVE_LINKS(child); - child->p_pptr = child->p_opptr; + child->parent = child->real_parent; SET_LINKS(child); write_unlock_irq(&tasklist_lock); Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.8 diff -u -3 -p -r1.8 memory.c --- mm/memory.c 22 Mar 2002 04:44:46 -0000 1.8 +++ mm/memory.c 22 Mar 2002 04:55:47 -0000 @@ -140,6 +140,9 @@ void clear_page_tables(struct mm_struct page_dir++; } while (--nr); spin_unlock(&mm->page_table_lock); + + /* keep the page table cache within bounds */ + check_pgt_cache(); } pte_t * pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address) |
From: NIIBE Y. <gn...@m1...> - 2002-03-22 04:44:00
|
Follow up to 2.5.6. 2002-03-22 NIIBE Yutaka <gn...@m1...> * include/asm-sh/pgalloc.h (ptep_get_and_clear): Follow the change of type of member i_map_shared. * include/asm-sh/unistd.h (__NR_tkill, __NR_sendfile64): Added. * include/asm-sh/siginfo.h (SI_DETHREAD): Added. * arch/sh/kernel/entry.S (sys_call_table): Added sys_sendfile64. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.6 diff -u -3 -p -r1.6 entry.S --- arch/sh/kernel/entry.S 22 Mar 2002 03:58:40 -0000 1.6 +++ arch/sh/kernel/entry.S 22 Mar 2002 04:29:18 -0000 @@ -1122,6 +1122,7 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_lremovexattr) .long SYMBOL_NAME(sys_fremovexattr) .long SYMBOL_NAME(sys_tkill) + .long SYMBOL_NAME(sys_sendfile64) .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) Index: include/asm-sh/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 pgalloc.h --- include/asm-sh/pgalloc.h 22 Mar 2002 03:58:40 -0000 1.3 +++ include/asm-sh/pgalloc.h 22 Mar 2002 04:42:16 -0000 @@ -127,9 +127,8 @@ static inline pte_t ptep_get_and_clear(p pte_clear(ptep); if (!pte_not_present(pte)) { struct page *page = pte_page(pte); - if (VALID_PAGE(page)&& - (!page->mapping || !(page->mapping->i_mmap_shared))) - __clear_bit(PG_mapped, &page->flags); + if (VALID_PAGE(page) && + (!page->mapping || list_empty(&page->mapping->i_mmap_shared))) __clear_bit(PG_mapped, &page->flags); } return pte; } Index: include/asm-sh/siginfo.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/siginfo.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 siginfo.h --- include/asm-sh/siginfo.h 1 Mar 2002 01:55:10 -0000 1.2 +++ include/asm-sh/siginfo.h 22 Mar 2002 04:29:19 -0000 @@ -108,6 +108,7 @@ typedef struct siginfo { #define SI_ASYNCIO -4 /* sent by AIO completion */ #define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_TKILL -6 /* sent by tkill system call */ +#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 unistd.h --- include/asm-sh/unistd.h 26 Feb 2002 09:15:16 -0000 1.2 +++ include/asm-sh/unistd.h 22 Mar 2002 04:29:19 -0000 @@ -245,6 +245,8 @@ #define __NR_removexattr 235 #define __NR_lremovexattr 236 #define __NR_fremovexattr 237 +#define __NR_tkill 238 +#define __NR_sendfile64 239 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ |