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: M. R. B. <mr...@0x...> - 2002-03-01 01:25:40
|
* Jeremy Siegel <js...@mv...> on Thu, Feb 28, 2002: > "M. R. Brown" wrote: >=20 > > Wow (wipes drool from face), I've been waiting for something like this = for > > awhile, I definitely would like to see it go in ASAP. Heh, just last n= ite > > Paul and I were discussing the best way to proceed debugging the current > > 2.5.x issues ... and here it is! Thanks! >=20 > Uh... this is against 2.4, unfortunately -- but hopefully it's pretty clo= se, > and you can move it to 2.5! >=20 That was the plan :P. M. R. |
From: Jeremy S. <js...@mv...> - 2002-03-01 01:24:37
|
"M. R. Brown" wrote: > Wow (wipes drool from face), I've been waiting for something like this for > awhile, I definitely would like to see it go in ASAP. Heh, just last nite > Paul and I were discussing the best way to proceed debugging the current > 2.5.x issues ... and here it is! Thanks! Uh... this is against 2.4, unfortunately -- but hopefully it's pretty close, and you can move it to 2.5! --Jeremy |
From: M. R. B. <mr...@0x...> - 2002-03-01 00:34:11
|
* Jeremy Siegel <js...@mv...> on Thu, Feb 28, 2002: >=20 > A couple months ago I sent an email about moving the gdb stub from sh-ipl > into the kernel for a SW-only kgdb, and heard back from Henry Bell at ST > Micro who was working on the same thing -- we've since exchanged some code > and I've played around with it some more; the resulting patch is > attached. I'd like to add this to the CVS tree in hopes that it will help > to have some sort of KGDB available for developers w/o sh-ipl+g or other > debug aids; any objections? (It is clearly far from perfect, and is not > exhaustively tested, but I've been using it or its cousins for a while and > it doesn't seem to break anything too horribly.) >=20 Wow (wipes drool from face), I've been waiting for something like this for awhile, I definitely would like to see it go in ASAP. Heh, just last nite Paul and I were discussing the best way to proceed debugging the current 2.5.x issues ... and here it is! Thanks! M. R. |
From: Jeremy S. <js...@mv...> - 2002-03-01 00:26:31
|
A couple months ago I sent an email about moving the gdb stub from sh-ipl into the kernel for a SW-only kgdb, and heard back from Henry Bell at ST Micro who was working on the same thing -- we've since exchanged some code and I've played around with it some more; the resulting patch is attached. I'd like to add this to the CVS tree in hopes that it will help to have some sort of KGDB available for developers w/o sh-ipl+g or other debug aids; any objections? (It is clearly far from perfect, and is not exhaustively tested, but I've been using it or its cousins for a while and it doesn't seem to break anything too horribly.) Credit for most of this patch goes to Henry; his patch seemed more complete than mine (included threads, sysrq, and gdb-console support) so I went with his... but of course everything is based on existing copies of the stub (such as sh-ipl+g) so thanks to everyone else too! Current major defect: not set up to use ^C or break to get into the running system; if you don't request a startup halt to set breakpoints, you need to use sysrq-g or NMI to get in. (Other aspects of the serial port handling could use serious improvement as well.) While trying this stuff, a couple problems with SCIF handling popped up (esp. w.r.t. break on SH3); this patch includes code which attempt to address these. Comments on those would be appreciated, since they are NOT under KGDB configuration flags. In brief: 1) Flow-control. The sci_throttle() function turns off Rx interrupts, and nothing turns them on again... added an interrupt enable line in sci_unthrottle(), which seemed appropriate? 2) On the SH3 (at least the SH7709A) a <BREAK> caused repeated NUL/FE and BRK interrupts, resulting in a vareity of problems from hanging the port to hanging the kernel [in continuous interrupts]. The best results seemed to be adding a break "hold-down": a flag set on the first BRK interrupt, which causes subsequent BRK an NUL/FE events to be ignored until the first non-NUL. (That char is also discarded if it's 1's then 0's, e.g. 0xF8 or 0xC0 -- the space-to-mark transition ending the break, interpreted as a char.) It's still occasionally flaky: misses a break, gets one extra, or something -- but seems a lot better. I put it under __SH3__ flags, assuming this is common to all SH3 SCI/Fs, though I only have a 7709A and so couldn't test any others. Thanks! --Jeremy Siegel |
From: Paul M. <le...@Ch...> - 2002-02-28 23:05:35
|
On Thu, Feb 28, 2002 at 03:37:28PM -0700, boy...@su... wrote: > All the core architecture has been available without any non-disclosure > agreements being required. We're aiming to publish more in the next few > weeks in time for ESC in San Francisco in 2 weeks time and I've been assu= red > it'll go onto the main web site by the end of next week. > =20 Sounds good. I already have existing documentation, but that was all reciev= ed under NDA, so I was just curious as to what the status of this stuff was. > If anyone is interested we're running a workshop on SH-5 at ESC (see > http://www.esconline.com/sf/workshop.htm ). We're likely to have some dem= os > running on a couple of SH-5 boards on the stand. > =20 Looks promising. Just signed up. > I'll post the links as soon as I get them from the docs. group in SuperH. > =20 I look forward to reading the new documentation when it becomes available. Regards, --=20 Paul Mundt <le...@ch...> |
From: Paul M. <le...@Ch...> - 2002-02-28 22:56:26
|
On Thu, Feb 28, 2002 at 09:59:58PM +0000, Stuart Menefy wrote: > Short answer, I've no idea. SH8000 is Hitachi's part (and as fasr as I kn= ow > is the only chip with an SH5 core at the moment). >=20 So how does this relate to reference hardware? Does everyone have to go through Hitachi for reference hardware? And what about ST50, is there anyth= ing special about that? or hardware? > Unfortunatly it's not so clear cut. Yes, the instructions are twice as bi= g, > but you shouldn't need as many do do the same thing: > - the SH-Media instructions are three address (as opposed to SH3/4's two > address) > - you have access to a lot more general purpose registers > - the instruction set handles branches better (less pipeline stalls) > - the instruction set handles loading constants better (most are now > encoded directly in the instruction). > Plus loading instructions can be easily predicted, so you should rarely > still the pipe for an I fetch, but data fetches are less predictable, and > tend to result in stalls, so should be avoided as far as possible, > especially on embedded devices which tend to have smaller caches. So even > if you fetch more instructions, you should fetch less data, resulting in > a net performance gain. >=20 > In summary, using SH-Media instructions should be faster than SH-Compact, > but may be slightly larger. =20 >=20 That puts a slightly different spin on things.. it no doubt would probably = be faster from what you've described, but the object/binary size will also be considerably larger .. much in the way that mips32 is considerably larger in comparison to SH4 right now (since mips uses 32bit instructions as well). But, if you can get more done with less instructions, that seems to be a considerable win as well.. I guess we'll have to wait and see how things wo= rk out. > The 64 bit issue has several aspects: > - the compiler - gcc should support both 64 and 32 bit modes, but 64 bit= hasn't > been tested much (here at least) > - the architecture - this has been designed for 64 bit > - the implementation - this is 32 bit. Many registers only have 32 bits > implemented (eg PC) > - the OS >=20 > Again, its a difficult question. The decision was made that as the current > implementaion of SH5 is 32 bit, there was no benefit in making the OS 64 = bit, > and probably a performance and memory size penalty in doing so. If an > implementation with more then 32 bits is ever produced, then some work wi= ll > be needed in the kernel to support it. >=20 There rarely are any advantages to running the OS 64-bit. Even mips64 and friends still usually get away with a 32-bit userland .. much in the same w= ay that IRIX64 wasn't run on the majority of 64-bit platforms. There's usually more drawbacks then there are benefits with going this route.. > It hasn't been forgotten about, and there are plenty of places in the code > where typedef's and macros have been used to make moving to 64 bit easier. > Whether this makes it a 64 bit port though, I'm not sure. >=20 With the code structured the way it is, it would be interesting to play with doing things as a 64-bit port and still permit it running 32-bit.. mips64 duplicates some things around in this fashion, though things are usually preferrably running in 32-bit. > Things like entry.S have to be in SH_Media. When the CPU takes a trap, it > always reverts to SH-Media. Plus many of the registers and instructions y= ou > need to access to handle traps, caches etc are only available in SH-Media. >=20 That's what I was afraid of.. > A lot depends on your point of view. Personally, I feel that the SH5 effe= ctivly > a new CPU, which just happens to be able to run SH4 executables. In a sim= ilar > way the ia64 is new CPU, which is capable of running i386 binaries (maybe= ..). >=20 > I understand marketing people have a slightly different opinion, because = they > want to preserve the appearence of a SuperH family line, from SH1 through > to SH5 and beyond. >=20 > Its not an obvious decision either way. This is partly why I proposed the > new project. We can get the code out in the open, thrash out issues like = this, > before comitting to a naming scheme and possibly merge, and ditch the sh5 > project. >=20 That might not be a bad idea for initial work.. though keeping it in the LinuxSH CVS under its own module would still seem to be the more useful answer, since it can be scrapped later when its obsoleted. Plus, if no one = is interested in cleaning up the website the way it is now, it's still not hard to add a link to some SH5 space and toss all information regarding the state of the tree and such there. > > If there's interest in this, I'd have no problems taking care of updati= ng the > > SH5 tree and merging it into the existing drop-in, if there are no other > > takers. >=20 > Its pretty high on our TODO list, but how long it will take to happen rem= ains > to be seen. I may need to take you up on that! >=20 Lack of hardware makes testing a bit of a peculiarity, but as long as someo= ne else is willing to do testing, I'm more then willing to do the kernel work. > > Either way.. lets have a look at the tree first, and then we can figure= out > > what the best course of action might be. Or if anyone else has any simi= lar > > insight on the matter, that could be helpful too. > >=20 >=20 > OK, so how about before we go any further I post it on an FTP server > first, and then we can have a more informed discussion? >=20 Sounds like a plan. Regards, --=20 Paul Mundt <le...@ch...> |
From: <boy...@su...> - 2002-02-28 22:38:22
|
Paul, Stuart and everyone, =20 All the core architecture has been available without any non-disclosure = agreements being required. We're aiming to publish more in the next few = weeks in time for ESC in San Francisco in 2 weeks time and I've been = assured it'll go onto the main web site by the end of next week. =20 If anyone is interested we're running a workshop on SH-5 at ESC (see = http://www.esconline.com/sf/workshop.htm ). We're likely to have some = demos running on a couple of SH-5 boards on the stand. =20 I'll post the links as soon as I get them from the docs. group in = SuperH. =20 Regards Boyd =20 -----Original Message-----=20 From: Stuart Menefy [mailto:stu...@st...]=20 Sent: Thu 28/02/2002 21:59=20 To: le...@Ch...=20 Cc: lin...@li...=20 Subject: Re: [linuxsh-dev] SH5 kernel Yep, all the docs which were used are now available without NDA. Boyd posted a note on how to get them a few months ago: http://sourceforge.net/mailarchive/forum.php?thread_id=3D261311&forum_id=3D= 5348 Unfortunatly SuperH still haven't posted them on their web site. |
From: Jeremy S. <js...@mv...> - 2002-02-28 22:05:53
|
I'd like to include the following timer.c patch to set up TMU1 as a free-running timer for timestamp or instrumentation purposes (or maybe a future port of hi-res timers to the SH kernel). This'll be in our distribution under ifdefs specific to features that use it; in this patch it's just under CONFIG_START_TMU1 since that seemed more general (could be turned on by features needing it). [I've also attached a modified preem_latency.h file, just as an example of how it'd be used; it seems simpler than what's currently in the preempt_stats patch for SH.] To Masahiro Abe: is this usage similar enough to your usage in RT-Linux that it doesn't conflict? Would it help to put the startup code under a conditional check on whether the timer has already been activated? Last month I sent out a query about this, and one question I had was that even TMU0 seems to be running faster than the specs allow, and I've been running both TMU1 and TMU0 at the same speed w/o apparent problems yet... again, I'm assuming that aspect of the spec is incorrect (irrelvant to SH3/SH4) but if that's a bad assumption please let me know! Any objections to the timer.c change? Thanks, --Jeremy Siegel |
From: Stuart M. <stu...@st...> - 2002-02-28 22:00:44
|
Folks On Wed, 27 Feb 2002 20:23:42 -0800 le...@Ch... wrote: > On Wed, Feb 27, 2002 at 11:54:02PM +0000, Stuart Menefy wrote: > > Following the release of an SH5 compiler and associated tools last week, > > I pleased to be able to say that we are also almost ready to release > > an SH5 Linux kernel. > > > Good to hear. Any idea when the SH8000's will be readily available? Short answer, I've no idea. SH8000 is Hitachi's part (and as fasr as I know is the only chip with an SH5 core at the moment). > Speaking of the kernel, what's the status of your guys kgdb work? Are there > only SH5 specific hacks and stubs in your tree? The kgdb stuff on www.linuxsh.st.com is for SH4 only. There is is currently no kgdb support in the SH5 tree. > > This work has been going for some time, in another group within ST, but > > it is only now that the tools are available, and the architecture is > > public, that we are able to release it. > > > Does this mean that any code that was developed using the NDA'd documentation > can be pushed into CVS now? Also, are there any updates to the documentation? > If so, are these available without NDA? Yep, all the docs which were used are now available without NDA. Boyd posted a note on how to get them a few months ago: http://sourceforge.net/mailarchive/forum.php?thread_id=261311&forum_id=5348 Unfortunatly SuperH still haven't posted them on their web site. > > I say almost ready, because there are some last minute details to tidy > > up, but mainly because I'd like to get people's suggestions on where we > > should be putting this. > > > Since you're looking for comments and suggestions on how the source tree is > done presently, is there some place where we can take a look at the tree the > way it is now, so that more accurate feedback can be offered? No. I'm just waiting for a couple of key updates from the developers, which they tell me will be available early next week. > > First a bit of background: > > > > As far as a kernel is concerned, SH5 is not a variant of the current SH > > architecture, in the way that SH3 and SH4 are. It is a 64 bit processor, > > with more and wider registers, different caches, MMU, interrupt controller > > etc. > > > > The CPU supports two instruction sets, the new instruction set > > (called SH-Media) gives access to all the new facilities of the machine, > > however it also supports a second instruction set (SH-Compact) which > > is a subset of the SH4 instruction set, sufficient to support native > > execution of SH4 _user_ _mode_ binaries. This means that a new kernel > > must, at least in part, be written in SH-Media instructions. It could > > also use SH-Compact if desired, but we've chosen not to do this at the > > moment. And yes, Linux could support the native execution of SH4 binaries > > if somebody felt like doing the necessary work in the kernel. > > > I suppose the use of SH-Media extensively makes the most sense for the initial > port, but in the long run, doing as much as possibly in SH-Compact would > probably be faster and cut down on the overall object/resultant kernel size .. > especially considering the differences in instruction sizes (and with -g > turned on, saving as much space as possible is always a plus..). While this > may not be worth thinking about right now, it still seems like something worth > looking into in the future.. Unfortunatly it's not so clear cut. Yes, the instructions are twice as big, but you shouldn't need as many do do the same thing: - the SH-Media instructions are three address (as opposed to SH3/4's two address) - you have access to a lot more general purpose registers - the instruction set handles branches better (less pipeline stalls) - the instruction set handles loading constants better (most are now encoded directly in the instruction). Plus loading instructions can be easily predicted, so you should rarely still the pipe for an I fetch, but data fetches are less predictable, and tend to result in stalls, so should be avoided as far as possible, especially on embedded devices which tend to have smaller caches. So even if you fetch more instructions, you should fetch less data, resulting in a net performance gain. In summary, using SH-Media instructions should be faster than SH-Compact, but may be slightly larger. > > So for this reason we decided not to merge the SH5 code with the current > > SH3/4 kernel. We have created a new architecture called "sh5" in the kernel > > source code, which is completely separate from the current "sh" > > architecture. However it does share device drivers with the other SH > > devices, such as the SCIF. > > > > It could have been called sh64, but we decided against that as it > > is not really a 64 bit port - pointers and longs are still 32 bits. > > A full 64 bit port is still a possibility for the future. > > > I'm not so sure that this is a good idea.. in the tradition of architecture > naming schemes under linux things always follow the arch/arch64 approach. > If the system is capable of sanely mapping things to 64-bit addresses without > the system choking, then the arch64 thing seems to make more sense. If on the > other hand, the system has issues with this, then it doesn't have much place > in an arch64-type layout. From your indication of pointers being 32 bits, this > would certainly seem to indicate that it's not ready for an sh64 convention. The 64 bit issue has several aspects: - the compiler - gcc should support both 64 and 32 bit modes, but 64 bit hasn't been tested much (here at least) - the architecture - this has been designed for 64 bit - the implementation - this is 32 bit. Many registers only have 32 bits implemented (eg PC) - the OS Again, its a difficult question. The decision was made that as the current implementaion of SH5 is 32 bit, there was no benefit in making the OS 64 bit, and probably a performance and memory size penalty in doing so. If an implementation with more then 32 bits is ever produced, then some work will be needed in the kernel to support it. It hasn't been forgotten about, and there are plenty of places in the code where typedef's and macros have been used to make moving to 64 bit easier. Whether this makes it a 64 bit port though, I'm not sure. > On the other hand, adding "sh5" completely goes against the natural order of > things and should try to be avoided as vigorously as possible. While the SH5 > might not follow typical SH3/4 convention, that hardly warrants the creation > of a new arch directory. Under MIPS, many systems have completely different > caches, MMU's, TLB handling, etc, etc. all of these things are dealt with in a > rather sane fashion -- of which I'm trying to achieve the same goal with the > SH tree for 2.5, though I'm still working on restructuring things. > > As long as the majority of things are done in SH-Compact, changes to things > like entry.S should be rather minimalistic.. but it's hard to determine what > the severity of the changes are without having any code to look at. Things like entry.S have to be in SH_Media. When the CPU takes a trap, it always reverts to SH-Media. Plus many of the registers and instructions you need to access to handle traps, caches etc are only available in SH-Media. A lot depends on your point of view. Personally, I feel that the SH5 effectivly a new CPU, which just happens to be able to run SH4 executables. In a similar way the ia64 is new CPU, which is capable of running i386 binaries (maybe..). I understand marketing people have a slightly different opinion, because they want to preserve the appearence of a SuperH family line, from SH1 through to SH5 and beyond. Its not an obvious decision either way. This is partly why I proposed the new project. We can get the code out in the open, thrash out issues like this, before comitting to a naming scheme and possibly merge, and ditch the sh5 project. > > So, the proposal: > > > > I'd like to get this code checked into a CVS repository on SourceForge > > as soon as possible. There are already several groups here who want > > access to the sources, so this is easier than just putting it up for > > FTP somewhere. Plus it allows other developers to join in as things > > develop. > > > > At the moment I think it may be better to create a new SourceForge > > project for this, rather than use the current LinuxSH one. > > > > This is mainly: > > > - the kernel is currently only of interest to kernel hackers, its > > not ready for general consumption. > > The 2.5 restructuring tree for the LinuxSH isn't suitable for mere mortals > either, and shouldn't even be approached by anyone other then kernel hackers. > Yet it sits in CVS just fine. > > > - because the current SH5 code is based around the old kernel, and is > > still fairly immature, it doesn't make sense to put it in the > > "linux" directory in CVS. It could go in a separate directory in > > CVS though. > > In my opinion, there isn't enough reason to divide this stuff out into a > completely seperate project.. putting SH5 under its own module for the time > being would be fine, but it would be nice to forward port this stuff to > current 2.4, and merge it into the 2.4 branch of the drop-in tree, where it > can then be used by everybody and the other module could be removed in its > entirety. > > If there's interest in this, I'd have no problems taking care of updating the > SH5 tree and merging it into the existing drop-in, if there are no other > takers. Its pretty high on our TODO list, but how long it will take to happen remains to be seen. I may need to take you up on that! > > > - things are still very changable. Its quite possible major > > restructuring may still happen (renaming the architacture for example!), > > and we don't know at the moment how things will turn out. > > I'd say concentrate on stable changes under the 2.4 branch if that's where > this ends up going.. or just leave it in HEAD.. I'd prefer if major > restructuring would be postponed until I'm done with the 2.5 restructuring of > the tree, otherwise we might end up duplicating efforts. Plus, it should make > assimilating SH5 in a sane fashion a lot easier.. > > > and then at some point in the future when the kernel is more mature, > > and we know better what it will look like, we can think about merging > > it into the LinuxSH project. > > > If you start maintaining it independantly of the LinuxSH project from the > beginning, it's just going to be more of a nuisance when you try and do the > merge later. At present, the code is in its infancy, things can still be > changed, etc, etc. with these things in mind, it's the best time to merge this > into the LinuxSH project and beat it into submission.. > > Either way.. lets have a look at the tree first, and then we can figure out > what the best course of action might be. Or if anyone else has any similar > insight on the matter, that could be helpful too. > > Regards, > > -- > Paul Mundt <le...@ch...> OK, so how about before we go any further I post it on an FTP server first, and then we can have a more informed discussion? Stuart -- Stuart Menefy stu...@st... STMicroelectronics Ltd ST Intranet: mo.bri.st.com Bristol, UK Rest of the World: www.linuxsh.st.com |
From: M. R. B. <mr...@0x...> - 2002-02-28 10:28:35
|
This is pretty trival stuff, but I think it's a good idea to distinguish our tree via EXTRAVERSION in the toplevel Makefile. The reasoning should be obvious, our port differs enough to where we can't call ourselves "stock" 2.4.18 or whatever, and the -sh postfix ensures there is no confusion. I'll commit if there are no objections. M. R. Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.7 diff -u -3 -p -r1.7 Makefile --- Makefile 26 Feb 2002 09:15:15 -0000 1.7 +++ Makefile 28 Feb 2002 10:20:18 -0000 @@ -1,7 +1,7 @@ VERSION =3D 2 PATCHLEVEL =3D 5 SUBLEVEL =3D 3 -EXTRAVERSION =3D +EXTRAVERSION =3D -sh =20 KERNELRELEASE=3D$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) =20 Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/ChangeLog,v retrieving revision 1.32 diff -u -3 -p -r1.32 ChangeLog --- ChangeLog 26 Feb 2002 09:15:15 -0000 1.32 +++ ChangeLog 28 Feb 2002 10:20:18 -0000 @@ -1,3 +1,7 @@ +2002-02-28 M. R. Brown <mr...@0x...> + + * Makefile: Add -sh to EXTRAVERSION. + 2002-02-26 NIIBE Yutaka <gn...@m1...> =20 Updated to 2.5.3. Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.1.1.1.2.4 diff -u -3 -p -r1.1.1.1.2.4 Makefile --- Makefile 26 Feb 2002 11:42:27 -0000 1.1.1.1.2.4 +++ Makefile 28 Feb 2002 10:18:52 -0000 @@ -1,7 +1,7 @@ VERSION =3D 2 PATCHLEVEL =3D 4 SUBLEVEL =3D 18 -EXTRAVERSION =3D +EXTRAVERSION =3D -sh =20 KERNELRELEASE=3D$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) =20 Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/ChangeLog,v retrieving revision 1.1.1.1.2.21 diff -u -3 -p -r1.1.1.1.2.21 ChangeLog --- ChangeLog 28 Feb 2002 01:24:48 -0000 1.1.1.1.2.21 +++ ChangeLog 28 Feb 2002 10:18:52 -0000 @@ -1,3 +1,7 @@ +2002-02-28 M. R. Brown <mr...@0x...> + + * Makefile: Added -sh to EXTRAVERSION. + 2002-02-27 Jeremy Siegel <js...@mv...> * arch/sh/kernel/sh_ksyms.c: (memscan, __down_trylock): Added * include/asm-sh/system.h: make save_flags asm code volatile Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.4.2.2 diff -u -3 -p -r1.4.2.2 Makefile --- Makefile 21 Jan 2002 04:08:01 -0000 1.4.2.2 +++ Makefile 28 Feb 2002 10:21:33 -0000 @@ -1,7 +1,7 @@ VERSION =3D 2 PATCHLEVEL =3D 5 SUBLEVEL =3D 2 -EXTRAVERSION =3D +EXTRAVERSION =3D -sh =20 KERNELRELEASE=3D$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) =20 Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/ChangeLog,v retrieving revision 1.20 diff -u -3 -p -r1.20 ChangeLog --- ChangeLog 15 Jan 2002 08:16:55 -0000 1.20 +++ ChangeLog 28 Feb 2002 10:21:33 -0000 @@ -1,3 +1,7 @@ +2002-02-28 M. R. Brown <mr...@0x...> + + * Makefile: Add -sh to EXTRAVERSION. + 2002-01-15 NIIBE Yutaka <gn...@m1...> =20 Updated to 2.5.2. |
From: Paul M. <le...@Ch...> - 2002-02-28 08:16:32
|
Hello, As I continue looking through some of my local pending changes, this was the next one that popped up.. The current implementation of show_trace_task() is a bit on the .. uneventf= ul side of things. This patch removes the old dump_stack() in favor of a new show_task() which happily either recieves a stack pointer, or reads it in in the existing manner that dump_stack() did. I haven't had the chance to do any extensive testing on this.. so any comme= nts on the patch would be appreciated. Regards, --=20 Paul Mundt <le...@ch...> Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/ChangeLog,v retrieving revision 1.32 diff -u -r1.32 ChangeLog --- ChangeLog 26 Feb 2002 09:15:15 -0000 1.32 +++ ChangeLog 28 Feb 2002 08:05:20 -0000 @@ -1,3 +1,10 @@ +2002-02-27 Paul Mundt <le...@ch...> + + * arch/sh/kernel/traps.c (dump_stack): Removed. + (show_task): Added. + (show_trace_task): Hand off actual stack pointer to show_task() + to do a real backtrace. + 2002-02-26 NIIBE Yutaka <gn...@m1...> =20 Updated to 2.5.3. Index: arch/sh/kernel/traps.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/traps.c,v retrieving revision 1.3.2.2 diff -u -r1.3.2.2 traps.c --- arch/sh/kernel/traps.c 19 Jan 2002 23:55:14 -0000 1.3.2.2 +++ arch/sh/kernel/traps.c 25 Feb 2002 08:42:48 -0000 @@ -5,6 +5,7 @@ * SuperH version: Copyright (C) 1999 Niibe Yutaka * Copyright (C) 2000 Philipp Rumpf * Copyright (C) 2000 David Howells + * Copyright (C) 2002 Paul Mundt */ =20 /* @@ -560,29 +561,51 @@ : "memory"); } =20 -void dump_stack(void) +void show_task(unsigned long *sp) { - unsigned long *start; - unsigned long *end; - unsigned long *p; - - asm("mov r15, %0" : "=3Dr" (start)); - asm("stc r7_bank, %0" : "=3Dr" (end)); - end +=3D 8192/4; - - printk("%08lx:%08lx\n", (unsigned long)start, (unsigned long)end); - for (p=3Dstart; p < end; p++) { - extern long _text, _etext; - unsigned long v=3D*p; - - if ((v >=3D (unsigned long )&_text) - && (v <=3D (unsigned long )&_etext)) { - printk("%08lx\n", v); + unsigned long *stack, addr; + unsigned long module_start =3D VMALLOC_START; + unsigned long module_end =3D VMALLOC_END; + extern long _text, _etext; + int i =3D 1; + + if (!sp) { + __asm__ __volatile__ ( + "mov r15, %0\n\t" + "stc r7_bank, %1\n\t" + : "=3Dr" (module_start), + "=3Dr" (module_end) + ); + =09 + sp =3D (unsigned long *)module_start; + } + + stack =3D sp; + + printk("\nCall trace: "); + + while (((long)stack & (THREAD_SIZE - 1))) { + if (__get_user(addr, stack)) { + printk("Failing address 0x%lx\n", *stack); + break; + } + stack++; + + if (((addr >=3D (unsigned long)&_text) && + (addr <=3D (unsigned long)&_etext)) || + ((addr >=3D module_start) && (addr <=3D module_end))) { + if (i && ((i % 8) =3D=3D 0)) + printk("\n "); + + printk("[<%08lx>] ", addr); + i++; } } + + printk("\n"); } =20 void show_trace_task(struct task_struct *tsk) { - printk("Backtrace not yet implemented for SH.\n"); + show_task((unsigned long *)tsk->thread.sp); } |
From: Paul M. <le...@Ch...> - 2002-02-28 07:47:24
|
Hello, These are a small set of cleanups for the SH4 caches that have been sitting= in my home directory for a little while, and after having just recently reciev= ed testing, have been deemed permissible to see the light of day. The changes are pretty simplistic, a few sanity checks here and there to av= oid some wasted cache flushes.. as well as a proper flush_cache_range() implementation that doesn't just act as a dummy wrapper to flush_cache_all(= ). Seems to be holding up so far. With what testing this patch has recieved thus far (thanks to M. R. Brown), it's been a bit quicker in the majority of cases..=20 Writeback - original Lethal's=20 tunnel 13.4169fps 13.4272fps flamme 12.6753fps 12.6564fps - dawafire 9.3169fps 9.300047fps - bump 10.8493fps 10.8635fps rotozoom 12.0676fps 12.054fps - plasma 8.33784fps 8.37143fps sdl/testwin 2175ms 2111ms sdl/testsprite 29.88fps 30.04fps sdl/testpalette 531/15.06fps 673/15.09fps These are obviously not very concrete benchmarks, and perhaps a bit of kern= el profiling is called for if anyone is really hesitant about any of the chang= es. Though I'd like to avoid writing a new test suite for stressing caches if at all possible.. These changes are of course only related to SH4 caches configured in write-back mode.. I've started on a patch for write-through, but that's sti= ll a work-in-progress. Regards, --=20 Paul Mundt <le...@ch...> Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/ChangeLog,v retrieving revision 1.32 diff -u -r1.32 ChangeLog --- ChangeLog 26 Feb 2002 09:15:15 -0000 1.32 +++ ChangeLog 28 Feb 2002 07:34:14 -0000 @@ -1,3 +1,9 @@ +2002-02-27 Paul Mundt <le...@ch...> + + * arch/sh/mm/cache-sh4.c (__flush_icache_page): Added back in. + (flush_cache_range): Rewritten entirely. + (flush_cache_mm): Only flush caches on a valid mm context. + 2002-02-26 NIIBE Yutaka <gn...@m1...> =20 Updated to 2.5.3. Index: arch/sh/mm/cache-sh4.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 cache-sh4.c --- arch/sh/mm/cache-sh4.c 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/mm/cache-sh4.c 25 Feb 2002 08:43:04 -0000 @@ -3,7 +3,7 @@ * linux/arch/sh/mm/cache.c * * Copyright (C) 1999, 2000 Niibe Yutaka - * + * Copyright (C) 2001, 2002 Paul Mundt */ =20 #include <linux/config.h> @@ -109,7 +114,7 @@ unsigned long size, unsigned long flags); =20 if (remap_area_pages(P3SEG, 0, PAGE_SIZE*4, _PAGE_CACHABLE)) - panic("p3_cachie_init failed."); + panic("%s failed.", __FUNCTION__); sema_init (&p3map_sem[0], 1); sema_init (&p3map_sem[1], 1); sema_init (&p3map_sem[2], 1); @@ -231,19 +236,30 @@ ctrl_outl(0, addr); } =20 -#if 0 /* DEBUG DEBUG */ + back_to_P1(); + restore_flags(flags); +} + +static void __flush_icache_page(unsigned long phys) +{ + unsigned long addr, data; + unsigned long flags; + + phys |=3D CACHE_VALID; + + save_and_cli(flags); + jump_to_P2(); + /* Loop all the I-cache */ for (addr =3D CACHE_IC_ADDRESS_ARRAY; addr < (CACHE_IC_ADDRESS_ARRAY +(CACHE_IC_NUM_ENTRIES<< CACHE_IC_ENTRY_SHIFT)); addr +=3D (1<<CACHE_IC_ENTRY_SHIFT)) { data =3D ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); - if (data =3D=3D phys) { - printk(KERN_INFO "__flush_cache_page: I-cache entry found\n"); + if (data =3D=3D phys) ctrl_outl(0, addr); - } } -#endif + back_to_P1(); restore_flags(flags); } @@ -283,7 +299,19 @@ { /* Is there any good way? */ /* XXX: possibly call flush_cache_range for each vm area */ - flush_cache_all(); + /*=20 + * 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). + * + * 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 + */ + if (mm->context !=3D 0) + flush_cache_all(); } =20 /* @@ -298,14 +326,39 @@ void flush_cache_range(struct mm_struct *mm, unsigned long start, unsigned long end) { - /* - * We could call flush_cache_page for the pages of these range, - * but it's not efficient (scan the caches all the time...). - * - * We can't use A-bit magic, as there's the case we don't have - * valid entry on TLB. - */ - flush_cache_all(); + unsigned long flags; + + if (mm->context =3D=3D 0) + return; + + start &=3D PAGE_MASK; + + if (!find_vma(mm, start)) + return; + if (mm->context !=3D current->active_mm->context) { + flush_cache_all(); + } else { + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte; + + save_and_cli(flags); + jump_to_P2(); + + for (start; start < end; start +=3D PAGE_SIZE) { + pgd =3D pgd_offset(mm, start); + pmd =3D pmd_offset(pgd, start); + pte =3D pte_offset(pmd, start); + + if (pte_val(*pte) & _PAGE_PRESENT) { + __flush_icache_page(start); + __flush_dcache_page(start); + } + } + + back_to_P1(); + restore_flags(flags); + } } =20 /* |
From: Paul M. <le...@Ch...> - 2002-02-28 04:24:20
|
On Wed, Feb 27, 2002 at 11:54:02PM +0000, Stuart Menefy wrote: > Following the release of an SH5 compiler and associated tools last week, > I pleased to be able to say that we are also almost ready to release > an SH5 Linux kernel. >=20 Good to hear. Any idea when the SH8000's will be readily available? Speaking of the kernel, what's the status of your guys kgdb work? Are there only SH5 specific hacks and stubs in your tree? > This work has been going for some time, in another group within ST, but > it is only now that the tools are available, and the architecture is > public, that we are able to release it. >=20 Does this mean that any code that was developed using the NDA'd documentati= on can be pushed into CVS now? Also, are there any updates to the documentatio= n? If so, are these available without NDA? > I say almost ready, because there are some last minute details to tidy > up, but mainly because I'd like to get people's suggestions on where we > should be putting this. >=20 Since you're looking for comments and suggestions on how the source tree is done presently, is there some place where we can take a look at the tree the way it is now, so that more accurate feedback can be offered? > First a bit of background: >=20 > As far as a kernel is concerned, SH5 is not a variant of the current SH > architecture, in the way that SH3 and SH4 are. It is a 64 bit processor, > with more and wider registers, different caches, MMU, interrupt controller > etc. >=20 > The CPU supports two instruction sets, the new instruction set > (called SH-Media) gives access to all the new facilities of the machine, > however it also supports a second instruction set (SH-Compact) which > is a subset of the SH4 instruction set, sufficient to support native > execution of SH4 _user_ _mode_ binaries. This means that a new kernel > must, at least in part, be written in SH-Media instructions. It could > also use SH-Compact if desired, but we've chosen not to do this at the > moment. And yes, Linux could support the native execution of SH4 binaries > if somebody felt like doing the necessary work in the kernel. >=20 I suppose the use of SH-Media extensively makes the most sense for the init= ial port, but in the long run, doing as much as possibly in SH-Compact would probably be faster and cut down on the overall object/resultant kernel size= .. especially considering the differences in instruction sizes (and with -g turned on, saving as much space as possible is always a plus..). While this may not be worth thinking about right now, it still seems like something wo= rth looking into in the future.. > So for this reason we decided not to merge the SH5 code with the current > SH3/4 kernel. We have created a new architecture called "sh5" in the kern= el > source code, which is completely separate from the current "sh" > architecture. However it does share device drivers with the other SH > devices, such as the SCIF. >=20 > It could have been called sh64, but we decided against that as it > is not really a 64 bit port - pointers and longs are still 32 bits. > A full 64 bit port is still a possibility for the future. >=20 I'm not so sure that this is a good idea.. in the tradition of architecture naming schemes under linux things always follow the arch/arch64 approach. If the system is capable of sanely mapping things to 64-bit addresses witho= ut the system choking, then the arch64 thing seems to make more sense. If on t= he other hand, the system has issues with this, then it doesn't have much place in an arch64-type layout. From your indication of pointers being 32 bits, t= his would certainly seem to indicate that it's not ready for an sh64 convention. On the other hand, adding "sh5" completely goes against the natural order of things and should try to be avoided as vigorously as possible. While the SH5 might not follow typical SH3/4 convention, that hardly warrants the creation of a new arch directory. Under MIPS, many systems have completely different caches, MMU's, TLB handling, etc, etc. all of these things are dealt with i= n a rather sane fashion -- of which I'm trying to achieve the same goal with the SH tree for 2.5, though I'm still working on restructuring things. As long as the majority of things are done in SH-Compact, changes to things like entry.S should be rather minimalistic.. but it's hard to determine what the severity of the changes are without having any code to look at. > Work on this port started some time ago, and hasn't kept track with > current kernel developments. So the port is still based on a 2.4.0-test4 > kernel. One of the things we want to do in the not too distant future is > upgrade to a more recent tree, but I'd rather release now and get > people looking at it than wait any longer. >=20 Agreed, this seems like the best possible course of action. > So, the proposal: >=20 > I'd like to get this code checked into a CVS repository on SourceForge > as soon as possible. There are already several groups here who want > access to the sources, so this is easier than just putting it up for > FTP somewhere. Plus it allows other developers to join in as things > develop. >=20 > At the moment I think it may be better to create a new SourceForge > project for this, rather than use the current LinuxSH one. >=20 > This is mainly: > - to try and reduce confusion - a lot of the current web content is not > applicable to SH5, and adding qualifying statements would make it > messy. A lot of the LinuxSH website is out of date and needing to be revamped the = way it is. While it might not presently be the best place to discuss SH5, it certainly should be. If someone had the time to spend on cleaning up the website, that'd seem to be the best solution. Any volunteers? > - the kernel is currently only of interest to kernel hackers, its > not ready for general consumption. The 2.5 restructuring tree for the LinuxSH isn't suitable for mere mortals either, and shouldn't even be approached by anyone other then kernel hacker= s. Yet it sits in CVS just fine.=20 > - because the current SH5 code is based around the old kernel, and is > still fairly immature, it doesn't make sense to put it in the > "linux" directory in CVS. It could go in a separate directory in > CVS though. In my opinion, there isn't enough reason to divide this stuff out into a completely seperate project.. putting SH5 under its own module for the time being would be fine, but it would be nice to forward port this stuff to current 2.4, and merge it into the 2.4 branch of the drop-in tree, where it can then be used by everybody and the other module could be removed in its entirety. If there's interest in this, I'd have no problems taking care of updating t= he SH5 tree and merging it into the existing drop-in, if there are no other takers. > - things are still very changable. Its quite possible major > restructuring may still happen (renaming the architacture for example!= ), > and we don't know at the moment how things will turn out. I'd say concentrate on stable changes under the 2.4 branch if that's where this ends up going.. or just leave it in HEAD.. I'd prefer if major restructuring would be postponed until I'm done with the 2.5 restructuring= of the tree, otherwise we might end up duplicating efforts. Plus, it should ma= ke assimilating SH5 in a sane fashion a lot easier.. > and then at some point in the future when the kernel is more mature, > and we know better what it will look like, we can think about merging > it into the LinuxSH project. >=20 If you start maintaining it independantly of the LinuxSH project from the beginning, it's just going to be more of a nuisance when you try and do the merge later. At present, the code is in its infancy, things can still be changed, etc, etc. with these things in mind, it's the best time to merge t= his into the LinuxSH project and beat it into submission.. Either way.. lets have a look at the tree first, and then we can figure out what the best course of action might be. Or if anyone else has any similar insight on the matter, that could be helpful too. Regards, --=20 Paul Mundt <le...@ch...> |
From: M. R. B. <mr...@0x...> - 2002-02-28 00:06:51
|
* NIIBE Yutaka <gn...@m1...> on Thu, Feb 28, 2002: >=20 > I have a question (to Hitachi, perhaps, for us in Japan). Are there > any (possibly cheap) eva board available? =46rom what I understand there is a looong waiting list :P. I guess ST is still trying to stabilize the SH5 core. M. R. |
From: NIIBE Y. <gn...@m1...> - 2002-02-28 00:02:21
|
Congratulation, for the new adventure! I think that different repository makes sense at this time. I have a question (to Hitachi, perhaps, for us in Japan). Are there any (possibly cheap) eva board available? -- |
From: Stuart M. <stu...@st...> - 2002-02-27 23:54:16
|
Folks Following the release of an SH5 compiler and associated tools last week, I pleased to be able to say that we are also almost ready to release an SH5 Linux kernel. This work has been going for some time, in another group within ST, but it is only now that the tools are available, and the architecture is public, that we are able to release it. I say almost ready, because there are some last minute details to tidy up, but mainly because I'd like to get people's suggestions on where we should be putting this. First a bit of background: As far as a kernel is concerned, SH5 is not a variant of the current SH architecture, in the way that SH3 and SH4 are. It is a 64 bit processor, with more and wider registers, different caches, MMU, interrupt controller etc. The CPU supports two instruction sets, the new instruction set (called SH-Media) gives access to all the new facilities of the machine, however it also supports a second instruction set (SH-Compact) which is a subset of the SH4 instruction set, sufficient to support native execution of SH4 _user_ _mode_ binaries. This means that a new kernel must, at least in part, be written in SH-Media instructions. It could also use SH-Compact if desired, but we've chosen not to do this at the moment. And yes, Linux could support the native execution of SH4 binaries if somebody felt like doing the necessary work in the kernel. So for this reason we decided not to merge the SH5 code with the current SH3/4 kernel. We have created a new architecture called "sh5" in the kernel source code, which is completely separate from the current "sh" architecture. However it does share device drivers with the other SH devices, such as the SCIF. It could have been called sh64, but we decided against that as it is not really a 64 bit port - pointers and longs are still 32 bits. A full 64 bit port is still a possibility for the future. Work on this port started some time ago, and hasn't kept track with current kernel developments. So the port is still based on a 2.4.0-test4 kernel. One of the things we want to do in the not too distant future is upgrade to a more recent tree, but I'd rather release now and get people looking at it than wait any longer. So, the proposal: I'd like to get this code checked into a CVS repository on SourceForge as soon as possible. There are already several groups here who want access to the sources, so this is easier than just putting it up for FTP somewhere. Plus it allows other developers to join in as things develop. At the moment I think it may be better to create a new SourceForge project for this, rather than use the current LinuxSH one. This is mainly: - to try and reduce confusion - a lot of the current web content is not applicable to SH5, and adding qualifying statements would make it messy. - the kernel is currently only of interest to kernel hackers, its not ready for general consumption. - because the current SH5 code is based around the old kernel, and is still fairly immature, it doesn't make sense to put it in the "linux" directory in CVS. It could go in a separate directory in CVS though. - things are still very changable. Its quite possible major restructuring may still happen (renaming the architacture for example!), and we don't know at the moment how things will turn out. - I suspect the number of people interested in both ports is actually quite small - I may be wrong of course... and then at some point in the future when the kernel is more mature, and we know better what it will look like, we can think about merging it into the LinuxSH project. Comments please Stuart |
From: NIIBE Y. <gn...@m1...> - 2002-02-27 02:16:46
|
Tool chain update: ftp://ftp.m17n.org/pub/linux-sh/testing/ binutils_2.11.92.0.12.3-6.dodes.1.diff.gz binutils-sh-linux_2.11.2-6.diff.gz glibc_2.2.5-3.dodes.0.diff.gz gcc-sh-linux_3.0.4-0.diff.gz This is diff for Debian system, but it could be used for other systems. I use binutils-sh-linux_2.11.2-6.diff.gz for cross compile, and binutils_2.11.92.0.12.3-6.dodes.1.diff.gz for native compile. -- |
From: NIIBE Y. <gn...@m1...> - 2002-02-27 00:24:50
|
I have _not_ yet finished this work, but I think that it's good to share this so that people can see the move, even if it's partial update. It's not complete, cannot compile. I'll do the work to support new asm-sh/thread_info.h, along with asm-sh/io.h, asm-sh/processor.h, asm-sh/hardirq.h, asm-sh/hw_irq.h, and arch/sh/kernel/fpu.c. And move of joystick driver. HOWTO: I have list of our files in CVS repository, say, it's called FILES. Removing first space of output of $ gzip -c -d patch-2.5.4.gz | diffstat | sort we get the list of changes in the patch, say, it's saved to changes-2.5.4. Then, $ join changes-2.5.4 FILES let you know changes required to our repository. Then, I check arch/i386/* and asm-i386/* changes to follow. 2002-02-27 NIIBE Yutaka <gn...@m1...> Updated to 2.5.4. * Makefile: Version 2.5.4 * AGAINST-2.5.4: New file. * AGAINST-2.5.3: Removed. * arch/sh/kernel/signal.c (setup_frame): Use current_thread_info. (setup_rt_frame): Likewise. * include/asm-sh/uaccess.h (get_fs,set_fs,__addr_ok,__range_ok): Likewise. * arch/sh/kernel/setup.c (setup_arch): Use set_thread_flag. * arch/sh/kernel/fpu.c (save_fpu,ieee_fpe_handler,do_fpu_state_restore): Likewise. * arch/sh/kernel/ptrace.c (sys_ptrace): Use set_tsk_thread_flag and clear_tsk_thread_flag. (do_syscall_trace): Follow the change of i386. * arch/sh/kernel/pci-dma.c (pci_alloc_consistent): Use virt_to_phys instead of virt_to_bus. * arch/sh/kernel/init_task.c (init_thread_union): New variable. * arch/sh/kernel/entry.S (syscall_call): Rename from syscall_traced. 2002-02-27 NIIBE Yutaka <gn...@m1...> * drivers/char/joystick -> drivers/input/joystick. * include/linux/input.h: Updated to version 1.57. * include/asm-sh/siginfo.h (SI_TKILL): Added. * include/asm-sh/scatterlist.h (struct scatterlist): Remove member address. * include/asm-sh/pci.h (pci_map_sg, pci_dma_sync_sg): Follow struct scatterlist interface change. * drivers/net/8139too.c: Merged version 0.9.24. * drivers/char/sh-sci.c (sci_ioctl TIOCGSERIAL): Set return code. * arch/sh/vmlinux.lds.S (.text.lock): Removed. * arch/sh/kernel/signal.c (do_signal): Use sig_exit. * Makefile: Version 2.5.4. Merged. * arch/sh/kernel/entry.S (sys_tkill): Added. * drivers/char/Makefile: Merged (Removed joystick). * drivers/Makefile (subdir-$(CONFIG_SERIO), subdir-$(CONFIG_GAMEPORT)): Merged. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.7 diff -u -3 -p -r1.7 Makefile --- Makefile 26 Feb 2002 09:15:15 -0000 1.7 +++ Makefile 27 Feb 2002 00:14:15 -0000 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 3 +SUBLEVEL = 4 EXTRAVERSION = KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -140,7 +140,6 @@ DRIVERS-y += drivers/base/base.o \ DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a -DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o DRIVERS-$(CONFIG_APPLETALK) += drivers/net/appletalk/appletalk.o DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o @@ -178,6 +177,8 @@ DRIVERS-$(CONFIG_HAMRADIO) += drivers/ne DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o +DRIVERS-$(CONFIG_GAMEPORT) += drivers/input/gameport/gamedrv.o +DRIVERS-$(CONFIG_SERIO) += drivers/input/serio/seriodrv.o DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o @@ -185,6 +186,7 @@ DRIVERS-$(CONFIG_PHONE) += drivers/telep DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o +DRIVERS-$(CONFIG_ISDN) += drivers/isdn/vmlinux-obj.a DRIVERS-$(CONFIG_MAPLE) += drivers/maple/maplebus.o DRIVERS := $(DRIVERS-y) @@ -206,7 +208,7 @@ CLEAN_FILES = \ drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ drivers/scsi/aic7xxx/aicasm/y.tab.h \ drivers/scsi/aic7xxx/aicasm/aicasm \ - drivers/scsi/53c700-mem.c \ + drivers/scsi/53c700_d.h \ net/khttpd/make_times_h \ net/khttpd/times.h \ submenu* @@ -325,6 +327,8 @@ include/linux/compile.h: $(CONFIGURATION @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver @mv -f .ver $@ +comma := , + include/linux/version.h: ./Makefile @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver @@ -332,10 +336,10 @@ include/linux/version.h: ./Makefile @mv -f .ver $@ init/version.o: init/version.c include/linux/compile.h include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c init/main.o: init/main.c include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< init/do_mounts.o: init/do_mounts.c include/config/MARKER $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< Index: arch/sh/vmlinux.lds.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/vmlinux.lds.S,v retrieving revision 1.2 diff -u -3 -p -r1.2 vmlinux.lds.S --- arch/sh/vmlinux.lds.S 24 Jan 2002 11:04:15 -0000 1.2 +++ arch/sh/vmlinux.lds.S 27 Feb 2002 00:14:15 -0000 @@ -23,7 +23,6 @@ SECTIONS *(.fixup) *(.gnu.warning) } = 0x0009 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.3 diff -u -3 -p -r1.3 entry.S --- arch/sh/kernel/entry.S 26 Feb 2002 09:15:15 -0000 1.3 +++ arch/sh/kernel/entry.S 27 Feb 2002 00:14:16 -0000 @@ -426,7 +426,7 @@ system_call: tst r10, r10 bf syscall_trace_entry ! -syscall_traced: +syscall_call: shll2 r9 ! x4 mov.l 3f, r11 ! Load the address of sys_call_table add r11, r9 @@ -530,7 +530,7 @@ syscall_trace_entry: ! again as the system call returns. mov.l 2f, r10 ! Number of syscalls cmp/hs r10, r3 - bf syscall_traced + bf syscall_call bra syscall_exit mov #-ENOSYS, r0 @@ -1164,6 +1164,7 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_removexattr) /* 235 */ .long SYMBOL_NAME(sys_lremovexattr) .long SYMBOL_NAME(sys_fremovexattr) + .long SYMBOL_NAME(sys_tkill) .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) Index: arch/sh/kernel/fpu.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/fpu.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 fpu.c --- arch/sh/kernel/fpu.c 29 Dec 2001 06:50:38 -0000 1.2 +++ arch/sh/kernel/fpu.c 27 Feb 2002 00:14:16 -0000 @@ -67,7 +67,7 @@ save_fpu(struct task_struct *tsk) "r" (FPSCR_INIT) : "memory"); - tsk->flags &= ~PF_USEDFPU; + clear_thread_flag(TIF_USEDFPU); release_fpu(); } @@ -260,7 +260,7 @@ ieee_fpe_handler (struct pt_regs *regs) ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); grab_fpu(); restore_fpu(tsk); - tsk->flags |= PF_USEDFPU; + set_thread_flag(TIF_USEDFPU); } else { tsk->thread.trap_no = 11; tsk->thread.error_code = 0; @@ -310,5 +310,5 @@ do_fpu_state_restore(unsigned long r4, u fpu_init(); tsk->used_math = 1; } - tsk->flags |= PF_USEDFPU; + set_thread_flag(TIF_USEDFPU); } Index: arch/sh/kernel/init_task.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/init_task.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 init_task.c --- arch/sh/kernel/init_task.c 24 Jan 2002 11:04:15 -0000 1.2 +++ arch/sh/kernel/init_task.c 27 Feb 2002 00:14:16 -0000 @@ -12,12 +12,19 @@ static struct signal_struct init_signals struct mm_struct init_mm = INIT_MM(init_mm); /* - * Initial task structure. + * Initial thread structure. * * We need to make sure that this is 8192-byte aligned due to the * way process stacks are handled. This is done by having a special * "init_task" linker map entry.. */ -union task_union init_task_union +union thread_union init_thread_union __attribute__((__section__(".data.init_task"))) = - { INIT_TASK(init_task_union.task) }; + { INIT_THREAD_INFO(init_task) }; + +/* + * Initial task structure. + * + * All other task structs will be allocated on slabs in fork.c + */ +struct task_struct init_task = INIT_TASK(init_task); Index: arch/sh/kernel/pci-dma.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/pci-dma.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 pci-dma.c --- arch/sh/kernel/pci-dma.c 15 Oct 2001 20:44:50 -0000 1.1 +++ arch/sh/kernel/pci-dma.c 27 Feb 2002 00:14:16 -0000 @@ -26,7 +26,7 @@ void *pci_alloc_consistent(struct pci_de if (ret != NULL) { /* Is it neccessary to do the memset? */ memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); + *dma_handle = virt_to_phys(ret); } /* We must flush the cache before we pass it on to the device */ dma_cache_wback_inv(ret, size); Index: arch/sh/kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/ptrace.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 ptrace.c --- arch/sh/kernel/ptrace.c 26 Feb 2002 09:15:15 -0000 1.2 +++ arch/sh/kernel/ptrace.c 27 Feb 2002 00:14:16 -0000 @@ -275,9 +275,9 @@ asmlinkage int sys_ptrace(long request, if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) - child->ptrace |= PT_SYSCALLTRACE; + set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); else - child->ptrace &= ~PT_SYSCALLTRACE; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); child->exit_code = data; wake_up_process(child); ret = 0; @@ -308,7 +308,7 @@ asmlinkage int sys_ptrace(long request, ret = -EIO; if ((unsigned long) data > _NSIG) break; - child->ptrace &= ~PT_SYSCALLTRACE; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); if ((child->ptrace & PT_DTRACE) == 0) { /* Spurious delayed TF traps may occur */ child->ptrace |= PT_DTRACE; @@ -366,7 +366,7 @@ asmlinkage int sys_ptrace(long request, break; } out_tsk: - free_task_struct(child); + put_task_struct(child); out: unlock_kernel(); return ret; @@ -376,8 +376,9 @@ asmlinkage void do_syscall_trace(void) { struct task_struct *tsk = current; - if ((tsk->ptrace & (PT_PTRACED|PT_SYSCALLTRACE)) - != (PT_PTRACED|PT_SYSCALLTRACE)) + if (!test_thread_flag(TIF_SYSCALL_TRACE)) + return; + if (!(current->ptrace & PT_PTRACED)) return; /* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ Index: arch/sh/kernel/setup.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/setup.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 setup.c --- arch/sh/kernel/setup.c 15 Jan 2002 07:59:52 -0000 1.3 +++ arch/sh/kernel/setup.c 27 Feb 2002 00:14:16 -0000 @@ -476,7 +476,7 @@ void __init setup_arch(char **cmdline_p) #if defined(__SH4__) /* We already grab/initialized FPU in head.S. Make it consisitent. */ init_task.used_math = 1; - init_task.flags |= PF_USEDFPU; + set_thread_flag(TIF_USEDFPU); #endif paging_init(); } Index: arch/sh/kernel/signal.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/signal.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 signal.c --- arch/sh/kernel/signal.c 24 Jan 2002 11:24:57 -0000 1.2 +++ arch/sh/kernel/signal.c 27 Feb 2002 00:14:16 -0000 @@ -390,10 +390,10 @@ static void setup_frame(int sig, struct if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - signal = current->exec_domain - && current->exec_domain->signal_invmap + signal = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap && sig < 32 - ? current->exec_domain->signal_invmap[sig] + ? current_thread_info()->exec_domain->signal_invmap[sig] : sig; err |= setup_sigcontext(&frame->sc, regs, set->sig[0]); @@ -455,10 +455,10 @@ static void setup_rt_frame(int sig, stru if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - signal = current->exec_domain - && current->exec_domain->signal_invmap + signal = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap && sig < 32 - ? current->exec_domain->signal_invmap[sig] + ? current_thread_info()->exec_domain->signal_invmap[sig] : sig; err |= __put_user(&frame->info, &frame->pinfo); @@ -673,10 +673,7 @@ int do_signal(struct pt_regs *regs, sigs /* FALLTHRU */ default: - sigaddset(¤t->pending.signal, signr); - recalc_sigpending(current); - current->flags |= PF_SIGNALED; - do_exit(exit_code); + sig_exit(signr, exit_code, &info); /* NOTREACHED */ } } Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.3 diff -u -3 -p -r1.3 Makefile --- drivers/Makefile 26 Feb 2002 09:15:15 -0000 1.3 +++ drivers/Makefile 27 Feb 2002 00:14:16 -0000 @@ -8,7 +8,7 @@ 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 maple + fc4 net/hamradio i2c acpi bluetooth input/serio input/gameport maple subdir-y := base parport char block net sound misc media cdrom hotplug subdir-m := $(subdir-y) @@ -27,6 +27,8 @@ subdir-$(CONFIG_MAC) += macintosh subdir-$(CONFIG_ALL_PPC) += macintosh subdir-$(CONFIG_USB) += usb subdir-$(CONFIG_INPUT) += input +subdir-$(CONFIG_SERIO) += input/serio +subdir-$(CONFIG_GAMEPORT) += input/gameport subdir-$(CONFIG_PHONE) += telephony subdir-$(CONFIG_SGI) += sgi subdir-$(CONFIG_IDE) += ide Index: drivers/char/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Makefile,v retrieving revision 1.2 diff -u -3 -p -r1.2 Makefile --- drivers/char/Makefile 3 Dec 2001 22:15:34 -0000 1.2 +++ drivers/char/Makefile 27 Feb 2002 00:14:16 -0000 @@ -25,7 +25,7 @@ export-objs := busmouse.o console.o misc.o pty.o random.o selection.o serial.o \ sonypi.o tty_io.o tty_ioctl.o generic_serial.o -mod-subdirs := joystick ftape drm pcmcia +mod-subdirs := ftape drm pcmcia list-multi := @@ -166,15 +166,10 @@ obj-$(CONFIG_BVME6000_SCC) += generic_se obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o subdir-$(CONFIG_RIO) += rio -subdir-$(CONFIG_INPUT) += joystick obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o obj-$(CONFIG_PRINTER) += lp.o - -ifeq ($(CONFIG_INPUT),y) -obj-y += joystick/js.o -endif obj-$(CONFIG_MAPLE_KEYBOARD) += maple_keyb.o obj-$(CONFIG_MAPLE_MOUSE) += maplemouse.o Index: drivers/char/sh-sci.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/sh-sci.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 sh-sci.c --- drivers/char/sh-sci.c 15 Jan 2002 07:59:52 -0000 1.2 +++ drivers/char/sh-sci.c 27 Feb 2002 00:14:16 -0000 @@ -919,7 +919,7 @@ static int sci_ioctl(struct tty_struct * case TIOCGSERIAL: if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) == 0) - gs_getserial(&port->gs, (struct serial_struct *) arg); + rc = gs_getserial(&port->gs, (struct serial_struct *) arg); break; case TIOCSSERIAL: if ((rc = verify_area(VERIFY_READ, (void *) arg, Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 8139too.c --- drivers/net/8139too.c 25 Jan 2002 02:07:59 -0000 1.6 +++ drivers/net/8139too.c 27 Feb 2002 00:14:16 -0000 @@ -92,7 +92,7 @@ */ #define DRV_NAME "8139too" -#define DRV_VERSION "0.9.22" +#define DRV_VERSION "0.9.24" #include <linux/config.h> @@ -168,6 +168,9 @@ static int max_interrupt_work = 20; The RTL chips use a 64 element hash table based on the Ethernet CRC. */ static int multicast_filter_limit = 32; +/* bitmapped message enable number */ +static int debug = -1; + /* Size of the in-memory receive ring. */ #ifdef CONFIG_8139TOO_BUF16K #define RX_BUF_LEN_IDX 1 /* 0==8K, 1==16K, 2==32K, 3==64K */ @@ -225,6 +228,7 @@ typedef enum { ADDTRON8139, DFE538TX, DFE690TXD, + FE2000VX, SEGABBA, RTL8129, } board_t; @@ -243,6 +247,7 @@ static struct { { "Addtron Technolgy 8139 10/100BaseTX", RTL8139_CAPS }, { "D-Link DFE-538TX (RealTek RTL8139)", RTL8139_CAPS }, { "D-Link DFE-690TXD (RealTek RTL8139)", RTL8139_CAPS }, + { "AboCom FE2000VX (RealTek RTL8139)", RTL8139_CAPS }, { "SEGA Broadband Adapter", RTL8139_CAPS }, { "RealTek RTL8129", RTL8129_CAPS }, }; @@ -257,6 +262,7 @@ static struct pci_device_id rtl8139_pci_ {0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ADDTRON8139 }, {0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE538TX }, {0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE690TXD }, + {0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FE2000VX }, {0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SEGABBA }, #ifdef CONFIG_8139TOO_8129 @@ -269,6 +275,7 @@ static struct pci_device_id rtl8139_pci_ */ {PCI_ANY_ID, 0x8139, 0x10ec, 0x8139, 0, 0, RTL8139 }, {PCI_ANY_ID, 0x8139, 0x1186, 0x1300, 0, 0, DFE538TX }, + {PCI_ANY_ID, 0x8139, 0x13d1, 0xab06, 0, 0, FE2000VX }, {0,} }; @@ -541,6 +548,7 @@ struct rtl_extra_stats { unsigned long early_rx; unsigned long tx_buf_mapped; unsigned long tx_timeouts; + unsigned long rx_lost_in_ring; }; struct rtl8139_private { @@ -559,12 +567,8 @@ struct rtl8139_private { dma_addr_t tx_bufs_dma; signed char phys[4]; /* MII device addresses. */ char twistie, twist_row, twist_col; /* Twister tune state. */ - unsigned int full_duplex:1; /* Full-duplex operation requested. */ - unsigned int duplex_lock:1; unsigned int default_port:4; /* Last dev->if_port value. */ - unsigned int media2:4; /* Secondary monitored media port. */ unsigned int medialock:1; /* Don't sense media type. */ - unsigned int mediasense:1; /* Media sensing in progress. */ spinlock_t lock; chip_t chipset; pid_t thr_pid; @@ -573,6 +577,7 @@ struct rtl8139_private { u32 rx_config; struct rtl_extra_stats xstats; int time_to_die; + struct mii_if_info mii; }; MODULE_AUTHOR ("Jeff Garzik <jg...@ma...>"); @@ -583,6 +588,8 @@ MODULE_PARM (multicast_filter_limit, "i" MODULE_PARM (max_interrupt_work, "i"); MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM (debug, "i"); +MODULE_PARM_DESC (debug, "8139too bitmapped message enable number"); MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses"); MODULE_PARM_DESC (max_interrupt_work, "8139too maximum events handled per interrupt"); MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); @@ -970,6 +977,9 @@ static int __devinit rtl8139_init_one (s spin_lock_init (&tp->lock); init_waitqueue_head (&tp->thr_wait); init_completion (&tp->thr_exited); + tp->mii.dev = dev; + tp->mii.mdio_read = mdio_read; + tp->mii.mdio_write = mdio_write; /* dev is fully set up and ready to use now */ DPRINTK("about to register device named %s (%p)...\n", dev->name, dev); @@ -1021,18 +1031,18 @@ static int __devinit rtl8139_init_one (s /* The lower four bits are the media type. */ option = (board_idx >= MAX_UNITS) ? 0 : media[board_idx]; if (option > 0) { - tp->full_duplex = (option & 0x210) ? 1 : 0; + tp->mii.full_duplex = (option & 0x210) ? 1 : 0; tp->default_port = option & 0xFF; if (tp->default_port) tp->medialock = 1; } if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0) - tp->full_duplex = full_duplex[board_idx]; - if (tp->full_duplex) { + tp->mii.full_duplex = full_duplex[board_idx]; + if (tp->mii.full_duplex) { printk(KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name); /* Changing the MII-advertised media because might prevent re-connection. */ - tp->duplex_lock = 1; + tp->mii.duplex_lock = 1; } if (tp->default_port) { printk(KERN_INFO " Forcing %dMbps %s-duplex operation.\n", @@ -1289,7 +1299,7 @@ static int rtl8139_open (struct net_devi } - tp->full_duplex = tp->duplex_lock; + tp->mii.full_duplex = tp->mii.duplex_lock; tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000; tp->twistie = 1; tp->time_to_die = 0; @@ -1301,7 +1311,7 @@ static int rtl8139_open (struct net_devi " GP Pins %2.2x %s-duplex.\n", dev->name, pci_resource_start (tp->pci_dev, 1), dev->irq, RTL_R8 (MediaStatus), - tp->full_duplex ? "full" : "half"); + tp->mii.full_duplex ? "full" : "half"); tp->thr_pid = kernel_thread (rtl8139_thread, dev, CLONE_FS | CLONE_FILES); if (tp->thr_pid < 0) @@ -1317,18 +1327,18 @@ static void rtl_check_media (struct net_ struct rtl8139_private *tp = dev->priv; if (tp->phys[0] >= 0) { - u16 mii_reg5 = mdio_read(dev, tp->phys[0], 5); - if (mii_reg5 == 0xffff) + u16 mii_lpa = mdio_read(dev, tp->phys[0], MII_LPA); + if (mii_lpa == 0xffff) ; /* Not there */ - else if ((mii_reg5 & 0x0100) == 0x0100 - || (mii_reg5 & 0x00C0) == 0x0040) - tp->full_duplex = 1; + else if ((mii_lpa & LPA_100FULL) == LPA_100FULL + || (mii_reg5 & 0x00C0) == LPA_10FULL) + tp->mii.full_duplex = 1; printk (KERN_INFO"%s: Setting %s%s-duplex based on" " auto-negotiated partner ability %4.4x.\n", - dev->name, mii_reg5 == 0 ? "" : - (mii_reg5 & 0x0180) ? "100mbps " : "10mbps ", - tp->full_duplex ? "full" : "half", mii_reg5); + dev->name, mii_lpa == 0 ? "" : + (mii_lpa & 0x0180) ? "100mbps " : "10mbps ", + tp->mii.full_duplex ? "full" : "half", mii_lpa); } } @@ -1517,30 +1527,30 @@ static inline void rtl8139_thread_iter ( struct rtl8139_private *tp, void *ioaddr) { - int mii_reg5; + int mii_lpa; - mii_reg5 = mdio_read (dev, tp->phys[0], 5); + mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA); - if (!tp->duplex_lock && mii_reg5 != 0xffff) { - int duplex = (mii_reg5 & 0x0100) - || (mii_reg5 & 0x01C0) == 0x0040; - if (tp->full_duplex != duplex) { - tp->full_duplex = duplex; + if (!tp->mii.duplex_lock && mii_lpa != 0xffff) { + int duplex = (mii_lpa & LPA_100FULL) + || (mii_lpa & 0x01C0) == 0x0040; + if (tp->mii.full_duplex != duplex) { + tp->mii.full_duplex = duplex; - if (mii_reg5) { + if (mii_lpa) { printk (KERN_INFO "%s: Setting %s-duplex based on MII #%d link" " partner ability of %4.4x.\n", dev->name, - tp->full_duplex ? "full" : "half", - tp->phys[0], mii_reg5); + tp->mii.full_duplex ? "full" : "half", + tp->phys[0], mii_lpa); } else { printk(KERN_INFO"%s: media is unconnected, link down, or incompatible connection\n", dev->name); } #if 0 RTL_W8 (Cfg9346, Cfg9346_Unlock); - RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20); + RTL_W8 (Config1, tp->mii.full_duplex ? 0x60 : 0x20); RTL_W8 (Cfg9346, Cfg9346_Lock); #endif } @@ -1773,23 +1783,36 @@ static void rtl8139_rx_err (u32 rx_statu struct rtl8139_private *tp, void *ioaddr) { u8 tmp8; +#ifndef CONFIG_8139_NEW_RX_RESET int tmp_work; +#endif DPRINTK ("%s: Ethernet frame had errors, status %8.8x.\n", dev->name, rx_status); - if (rx_status & RxTooLong) { - DPRINTK ("%s: Oversized Ethernet frame, status %4.4x!\n", - dev->name, rx_status); - /* A.C.: The chip hangs here. */ - } tp->stats.rx_errors++; - if (rx_status & (RxBadSymbol | RxBadAlign)) - tp->stats.rx_frame_errors++; - if (rx_status & (RxRunt | RxTooLong)) - tp->stats.rx_length_errors++; - if (rx_status & RxCRCErr) - tp->stats.rx_crc_errors++; + if (!(rx_status & RxStatusOK)) { + if (rx_status & RxTooLong) { + DPRINTK ("%s: Oversized Ethernet frame, status %4.4x!\n", + dev->name, rx_status); + /* A.C.: The chip hangs here. */ + } + if (rx_status & (RxBadSymbol | RxBadAlign)) + tp->stats.rx_frame_errors++; + if (rx_status & (RxRunt | RxTooLong)) + tp->stats.rx_length_errors++; + if (rx_status & RxCRCErr) + tp->stats.rx_crc_errors++; + } else { + tp->xstats.rx_lost_in_ring++; + } +#ifdef CONFIG_8139_NEW_RX_RESET + tmp8 = RTL_R8 (ChipCmd); + RTL_W8 (ChipCmd, tmp8 & ~CmdRxEnb); + RTL_W8 (ChipCmd, tmp8); + RTL_W32 (RxConfig, tp->rx_config); + tp->cur_rx = 0; +#else /* Reset the receiver, based on RealTek recommendation. (Bug?) */ /* disable receive */ @@ -1834,6 +1857,7 @@ static void rtl8139_rx_err (u32 rx_statu /* A.C.: Reset the multicast list. */ __set_rx_mode (dev); +#endif } static void rtl8139_rx_interrupt (struct net_device *dev, @@ -1968,13 +1992,13 @@ static void rtl8139_weird_interrupt (str (tp->drv_flags & HAS_LNK_CHNG)) { /* Really link-change on new chips. */ int lpar = RTL_R16 (NWayLPAR); - int duplex = (lpar & 0x0100) || (lpar & 0x01C0) == 0x0040 - || tp->duplex_lock; - if (tp->full_duplex != duplex) { - tp->full_duplex = duplex; + int duplex = (lpar & LPA_100FULL) || (lpar & 0x01C0) == 0x0040 + || tp->mii.duplex_lock; + if (tp->mii.full_duplex != duplex) { + tp->mii.full_duplex = duplex; #if 0 RTL_W8 (Cfg9346, Cfg9346_Unlock); - RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20); + RTL_W8 (Config1, tp->mii.full_duplex ? 0x60 : 0x20); RTL_W8 (Cfg9346, Cfg9346_Lock); #endif } @@ -2133,48 +2157,6 @@ static int rtl8139_close (struct net_dev } -/* Get the ethtool settings. Assumes that eset points to kernel - memory, *eset has been initialized as {ETHTOOL_GSET}, and other - threads or interrupts aren't messing with the 8139. */ -static void netdev_get_eset (struct net_device *dev, struct ethtool_cmd *eset) -{ - struct rtl8139_private *np = dev->priv; - void *ioaddr = np->mmio_addr; - u16 advert; - - eset->supported = SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full - | SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full - | SUPPORTED_Autoneg - | SUPPORTED_TP; - - eset->advertising = ADVERTISED_TP | ADVERTISED_Autoneg; - advert = mdio_read (dev, np->phys[0], 4); - if (advert & 0x0020) - eset->advertising |= ADVERTISED_10baseT_Half; - if (advert & 0x0040) - eset->advertising |= ADVERTISED_10baseT_Full; - if (advert & 0x0080) - eset->advertising |= ADVERTISED_100baseT_Half; - if (advert & 0x0100) - eset->advertising |= ADVERTISED_100baseT_Full; - - eset->speed = (RTL_R8 (MediaStatus) & 0x08) ? 10 : 100; - /* (KON)FIXME: np->full_duplex is set or reset by the thread, - which means this always shows half duplex if the interface - isn't up yet, even if it has already autonegotiated. */ - eset->duplex = np->full_duplex ? DUPLEX_FULL : DUPLEX_HALF; - eset->port = PORT_TP; - /* (KON)FIXME: Is np->phys[0] correct? starfire.c uses that. */ - eset->phy_address = np->phys[0]; - eset->transceiver = XCVR_INTERNAL; - eset->autoneg = (mdio_read (dev, np->phys[0], 0) & 0x1000) != 0; - eset->maxtxpkt = 1; - eset->maxrxpkt = 1; -} - - /* Get the ethtool Wake-on-LAN settings. Assumes that wol points to kernel memory, *wol has been initialized as {ETHTOOL_GWOL}, and other threads or interrupts aren't messing with the 8139. */ @@ -2249,7 +2231,6 @@ static int netdev_set_wol (struct net_de return 0; } - static int netdev_ethtool_ioctl (struct net_device *dev, void *useraddr) { struct rtl8139_private *np = dev->priv; @@ -2258,33 +2239,70 @@ static int netdev_ethtool_ioctl (struct /* dev_ioctl() in ../../net/core/dev.c has already checked capable(CAP_NET_ADMIN), so don't bother with that here. */ - if (copy_from_user (ðcmd, useraddr, sizeof (ethcmd))) + if (get_user (ethcmd, (u32 *)useraddr)) return -EFAULT; switch (ethcmd) { - case ETHTOOL_GSET: - { - struct ethtool_cmd eset = { ETHTOOL_GSET }; - spin_lock_irq (&np->lock); - netdev_get_eset (dev, &eset); - spin_unlock_irq (&np->lock); - if (copy_to_user (useraddr, &eset, sizeof (eset))) - return -EFAULT; - return 0; - } + case ETHTOOL_GDRVINFO: { + struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; + strcpy (info.driver, DRV_NAME); + strcpy (info.version, DRV_VERSION); + strcpy (info.bus_info, np->pci_dev->slot_name); + if (copy_to_user (useraddr, &info, sizeof (info))) + return -EFAULT; + return 0; + } - /* TODO: ETHTOOL_SSET */ + /* get settings */ + case ETHTOOL_GSET: { + struct ethtool_cmd ecmd = { ETHTOOL_GSET }; + spin_lock_irq(&np->lock); + mii_ethtool_gset(&np->mii, &ecmd); + spin_unlock_irq(&np->lock); + if (copy_to_user(useraddr, &ecmd, sizeof(ecmd))) + return -EFAULT; + return 0; + } + /* set settings */ + case ETHTOOL_SSET: { + int r; + struct ethtool_cmd ecmd; + if (copy_from_user(&ecmd, useraddr, sizeof(ecmd))) + return -EFAULT; + spin_lock_irq(&np->lock); + r = mii_ethtool_sset(&np->mii, &ecmd); + spin_unlock_irq(&np->lock); + return r; + } + /* restart autonegotiation */ + case ETHTOOL_NWAY_RST: { + return mii_nway_restart(&np->mii); + } + /* get link status */ + case ETHTOOL_GLINK: { + struct ethtool_value edata = {ETHTOOL_GLINK}; + edata.data = mii_link_ok(&np->mii); + if (copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } - case ETHTOOL_GDRVINFO: - { - struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; - strcpy (info.driver, DRV_NAME); - strcpy (info.version, DRV_VERSION); - strcpy (info.bus_info, np->pci_dev->slot_name); - if (copy_to_user (useraddr, &info, sizeof (info))) - return -EFAULT; - return 0; - } + /* get message-level */ + case ETHTOOL_GMSGLVL: { + struct ethtool_value edata = {ETHTOOL_GMSGLVL}; + edata.data = debug; + if (copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } + /* set message-level */ + case ETHTOOL_SMSGLVL: { + struct ethtool_value edata; + if (copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + debug = edata.data; + return 0; + } case ETHTOOL_GWOL: { @@ -2338,17 +2356,14 @@ static int netdev_ioctl (struct net_devi return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data); case SIOCGMIIPHY: /* Get the address of the PHY in use. */ - case SIOCDEVPRIVATE: /* binary compat, remove in 2.5 */ data->phy_id = phy; /* Fall Through */ case SIOCGMIIREG: /* Read the specified MII register. */ - case SIOCDEVPRIVATE+1: /* binary compat, remove in 2.5 */ data->val_out = mdio_read (dev, data->phy_id, data->reg_num); break; case SIOCSMIIREG: /* Write the specified MII register */ - case SIOCDEVPRIVATE+2: /* binary compat, remove in 2.5 */ if (!capable (CAP_NET_ADMIN)) { rc = -EPERM; break; @@ -2361,9 +2376,9 @@ static int netdev_ioctl (struct net_devi /* Check for autonegotiation on or reset. */ tp->medialock = (value & 0x9000) ? 0 : 1; if (tp->medialock) - tp->full_duplex = (value & 0x0100) ? 1 : 0; + tp->mii.full_duplex = (value & 0x0100) ? 1 : 0; break; - case 4: /* tp->advertising = value; */ break; + case 4: tp->mii.advertising = value; break; } } mdio_write(dev, data->phy_id, data->reg_num, data->val_in); Index: drivers/net/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.help,v retrieving revision 1.2 diff -u -3 -p -r1.2 Config.help --- drivers/net/Config.help 25 Jan 2002 04:27:53 -0000 1.2 +++ drivers/net/Config.help 27 Feb 2002 00:14:16 -0000 @@ -1160,6 +1160,17 @@ CONFIG_NATSEMI More specific information and updates are available from <http://www.scyld.com/network/natsemi.html>. +CONFIG_NATSEMI_CABLE_MAGIC + Some systems see lots of errors with NatSemi ethernet controllers + on certain cables. If you are seeing lots of errors, try turning + this option on. Some boards have incorrect values for supporting + resistors that can cause this change to break. If you turn this + option on and your network suddenly stops working, turn this + option off. + + Say N unless you are certain you need this option. + Vendors should not enable this option by default. + CONFIG_SK_G16 If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from Index: drivers/net/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.in,v retrieving revision 1.3 diff -u -3 -p -r1.3 Config.in --- drivers/net/Config.in 24 Jan 2002 11:04:15 -0000 1.3 +++ drivers/net/Config.in 27 Feb 2002 00:14:16 -0000 @@ -67,7 +67,6 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the if [ "$CONFIG_SUPERH" = "y" ]; then tristate ' National DP83902AV support' CONFIG_STNIC fi - dep_tristate ' Sun LANCE support' CONFIG_SUNLANCE $CONFIG_SBUS if [ "$CONFIG_SBUS" = "y" -o "$CONFIG_PCI" = "y" ]; then tristate ' Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL fi @@ -171,6 +170,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the dep_tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI dep_tristate ' National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI + if [ "$CONFIG_NATSEMI" = "y" -o "$CONFIG_NATSEMI" = "m" ]; then + bool ' NatSemi workaround for high errors' CONFIG_NATSEMI_CABLE_MAGIC + fi dep_tristate ' PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI dep_tristate ' Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL @@ -179,6 +181,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the dep_mbool ' Use PIO instead of MMIO' CONFIG_8139TOO_PIO $CONFIG_8139TOO dep_mbool ' Support for automatic channel equalization (EXPERIMENTAL)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_mbool ' Support for older RTL-8129/8130 boards' CONFIG_8139TOO_8129 $CONFIG_8139TOO + dep_mbool ' Experiment for better RX reset (EXPERIMENTAL)' CONFIG_8139_NEW_RX_RESET $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_mbool ' Support for Dreamcast Broad Band Adaptor' CONFIG_8139TOO_DREAMCAST $CONFIG_8139TOO dep_tristate ' SiS 900/7016 PCI Fast Ethernet Adapter support' CONFIG_SIS900 $CONFIG_PCI dep_tristate ' SMC EtherPower II' CONFIG_EPIC100 $CONFIG_PCI Index: include/asm-sh/current.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/current.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 current.h --- include/asm-sh/current.h 15 Oct 2001 20:45:06 -0000 1.1.1.1 +++ include/asm-sh/current.h 27 Feb 2002 00:14:16 -0000 @@ -6,16 +6,13 @@ * */ +#include <asm/thread_info.h> + struct task_struct; static __inline__ struct task_struct * get_current(void) { - struct task_struct *current; - - __asm__("stc r7_bank, %0" - :"=r" (current)); - - return current; + return current_thread_info()->task; } #define current get_current() Index: include/asm-sh/pci.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pci.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 pci.h --- include/asm-sh/pci.h 24 Jan 2002 11:04:15 -0000 1.4 +++ include/asm-sh/pci.h 27 Feb 2002 00:14:16 -0000 @@ -155,7 +155,7 @@ static inline int pci_map_sg(struct pci_ int i; for (i=0; i<nents; i++) - dma_cache_wback_inv(sg[i].address, sg[i].length); + dma_cache_wback_inv(page_address(sg[i].page) + sg[i].offset, sg[i].length); #endif if (direction == PCI_DMA_NONE) BUG(); @@ -212,7 +212,8 @@ static inline void pci_dma_sync_sg(struc int i; for (i=0; i<nelems; i++) - dma_cache_wback_inv(sg[i].address, sg[i].length); + dma_cache_wback_inv(page_address(sg[i].page) + sg[i].offset, sg[i].length); + #endif } Index: include/asm-sh/scatterlist.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/scatterlist.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 scatterlist.h --- include/asm-sh/scatterlist.h 7 Jan 2002 03:57:48 -0000 1.2 +++ include/asm-sh/scatterlist.h 27 Feb 2002 00:14:16 -0000 @@ -2,8 +2,6 @@ #define __ASM_SH_SCATTERLIST_H struct scatterlist { - char * address; /* Location data is to be transferred to, NULL for - * highmem page */ struct page * page; /* Location for highmem page, if any */ unsigned int offset;/* for highmem, page offset */ dma_addr_t dma_address; Index: include/asm-sh/siginfo.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/siginfo.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 siginfo.h --- include/asm-sh/siginfo.h 15 Oct 2001 20:45:07 -0000 1.1.1.1 +++ include/asm-sh/siginfo.h 27 Feb 2002 00:14:16 -0000 @@ -107,6 +107,7 @@ typedef struct siginfo { #define SI_MESGQ -3 /* sent by real time mesq state change */ #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_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) Index: include/asm-sh/uaccess.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/uaccess.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 uaccess.h --- include/asm-sh/uaccess.h 3 Nov 2001 00:54:51 -0000 1.2 +++ include/asm-sh/uaccess.h 27 Feb 2002 00:14:16 -0000 @@ -32,12 +32,12 @@ #define USER_DS MAKE_MM_SEG(0x80000000) #define get_ds() (KERNEL_DS) -#define get_fs() (current->addr_limit) -#define set_fs(x) (current->addr_limit=(x)) +#define get_fs() (current_thread_info()->addr_limit) +#define set_fs(x) (current_thread_info()->addr_limit=(x)) #define segment_eq(a,b) ((a).seg == (b).seg) -#define __addr_ok(addr) ((unsigned long)(addr) < (current->addr_limit.seg)) +#define __addr_ok(addr) ((unsigned long)(addr) < (current_thread_info()->addr_limit.seg)) /* * Uhhuh, this needs 33-bit arithmetic. We have a carry.. @@ -49,7 +49,7 @@ 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" (current->addr_limit.seg) \ + :"1" (addr), "r" ((int)(size)), "r" (current_thread_info()->addr_limit.seg) \ :"t"); \ flag; }) Index: include/linux/input.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/linux/input.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 input.h --- include/linux/input.h 15 Oct 2001 20:45:12 -0000 1.1.1.1 +++ include/linux/input.h 27 Feb 2002 00:14:16 -0000 @@ -2,11 +2,9 @@ #define _INPUT_H /* - * $Id: input.h,v 1.2 2001/10/15 04:32:06 mrbrown Exp $ + * $Id: input.h,v 1.57 2002/01/02 11:59:56 vojtech Exp $ * - * Copyright (c) 1999-2000 Vojtech Pavlik - * - * Sponsored by SuSE + * Copyright (c) 1999-2001 Vojtech Pavlik */ /* @@ -17,7 +15,7 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License @@ -25,8 +23,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Should you need to contact me, the author, you can do so either by - * e-mail - mail your message to <vo...@su...>, or by paper mail: - * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic + * e-mail - mail your message to <vo...@uc...>, or by paper mail: + * Vojtech Pavlik, Ucitelska 1594, Prague 8, 182 00 Czech Republic */ #ifdef __KERNEL__ @@ -64,17 +62,21 @@ struct input_event { #define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ -#define EVIOCGKEY _IOR('E', 0x05, int[2]) /* get key value */ + #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ -#define EVIOCGBUS _IOR('E', 0x07, short[4]) /* get bus address */ +#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ +#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ + +#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ +#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ +#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ + #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */ #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ -#define EVIOCSGAIN _IOW('E', 0x82, unsigned short) /* Set overall gain */ -#define EVIOCSAUTOCENTER _IOW('E', 0x83, unsigned short) /* Enable or disable auto-centering */ #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ /* @@ -90,6 +92,8 @@ struct input_event { #define EV_SND 0x12 #define EV_REP 0x14 #define EV_FF 0x15 +#define EV_PWR 0x16 +#define EV_FF_STATUS 0x17 #define EV_MAX 0x1f /* @@ -304,8 +308,23 @@ struct input_event { #define KEY_PROG4 203 #define KEY_SUSPEND 205 #define KEY_CLOSE 206 +#define KEY_PLAY 207 +#define KEY_FASTFORWARD 208 +#define KEY_BASSBOOST 209 +#define KEY_PRINT 210 +#define KEY_HP 211 +#define KEY_CAMERA 212 +#define KEY_SOUND 213 +#define KEY_QUESTION 214 +#define KEY_EMAIL 215 +#define KEY_CHAT 216 +#define KEY_SEARCH 217 +#define KEY_CONNECT 218 +#define KEY_FINANCE 219 +#define KEY_SPORT 220 +#define KEY_SHOP 221 -#define KEY_UNKNOWN 220 +#define KEY_UNKNOWN 240 #define BTN_MISC 0x100 #define BTN_0 0x100 @@ -415,14 +434,16 @@ struct input_event { #define ABS_DISTANCE 0x19 #define ABS_TILT_X 0x1a #define ABS_TILT_Y 0x1b -#define ABS_MISC 0x1c -#define ABS_MAX 0x1f +#define ABS_VOLUME 0x20 +#define ABS_MISC 0x28 +#define ABS_MAX 0x3f /* * Misc events */ #define MSC_SERIAL 0x00 +#define MSC_PULSELED 0x01 #define MSC_MAX 0x07 /* @@ -468,6 +489,7 @@ struct input_event { #define BUS_PCI 0x01 #define BUS_ISAPNP 0x02 #define BUS_USB 0x03 +#define BUS_HIL 0x04 #define BUS_ISA 0x10 #define BUS_I8042 0x11 @@ -481,46 +503,55 @@ struct input_event { #define BUS_MAPLE 0x19 /* + * Values describing the status of an effect + */ +#define FF_STATUS_STOPPED 0x00 +#define FF_STATUS_PLAYING 0x01 +#define FF_STATUS_MAX 0x01 + +/* * Structures used in ioctls to upload effects to a device * The first structures are not passed directly by using ioctls. * They are sub-structures of the actually sent structure (called ff_effect) + * + * Ranges: + * 0 <= __u16 <= 65535 + * -32767 <= __s16 <= +32767 ! Not -32768 for lower bound ! */ struct ff_replay { - __u16 length; /* Duration of an effect */ + __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */ __u16 delay; /* Time to wait before to start playing an effect */ }; struct ff_trigger { __u16 button; /* Number of button triggering an effect */ - __u16 interval; /* Time to wait before an effect can be re-triggered */ + __u16 interval; /* Time to wait before an effect can be re-triggered (ms) */ }; struct ff_shape { - __u16 attack_length; /* Duration of attack */ - __s16 attack_level; /* Level at beginning of attack */ - __u16 fade_length; /* Duration of fade */ - __s16 fade_level; /* Level at end of fade */ + __u16 attack_length; /* Duration of attack (ms) */ + __u16 attack_level; /* Level at beginning of attack */ + __u16 fade_length; /* Duration of fade (ms) */ + __u16 fade_level; /* Level at end of fade */ }; /* FF_CONSTANT */ struct ff_constant_effect { - __s16 level; /* Strength of effect */ - __u16 direction; /* Direction of effect (see periodic effects) */ - struct ff_shape shape; + __s16 level; /* Strength of effect. Negative values are OK */ struct ff_shape shape; }; /* FF_SPRING of FF_FRICTION */ struct ff_interactive_effect { /* Axis along which effect must be created. If null, the field named direction * is used - * It is a bit array (ie to enable axes X and Y, use BIT(ABS_X) | BIT(ABS_Y) + * It overrides the value of ff_effect::direction, which is used only if + * axis == 0 */ __u16 axis; - __u16 direction; - __s16 right_saturation; /* Max level when joystick is on the right */ - __s16 left_saturation; /* Max level when joystick in on the left */ + __u16 right_saturation; /* Max level when joystick is on the right */ + __u16 left_saturation; /* Max level when joystick in on the left */ __s16 right_coeff; /* Indicates how fast the force grows when the joystick moves to the right */ @@ -534,12 +565,10 @@ struct ff_interactive_effect { /* FF_PERIODIC */ struct ff_periodic_effect { __u16 waveform; /* Kind of wave (sine, square...) */ - __u16 period; + __u16 period; /* in ms */ __s16 magnitude; /* Peak value */ __s16 offset; /* Mean value of wave (roughly) */ __u16 phase; /* 'Horizontal' shift */ - __u16 direction; /* Direction. 0 deg -> 0x0000 - 90 deg -> 0x4000 */ struct ff_shape shape; }; @@ -550,10 +579,17 @@ struct ff_periodic_effect { struct ff_effect { __u16 type; /* Following field denotes the unique id assigned to an effect. - * It is set by the driver. + * If user sets if to -1, a new effect is created, and its id is returned in the same field + * Else, the user sets it to the effect id it wants to update. */ __s16 id; + __u16 direction; /* Direction. 0 deg -> 0x0000 (down) + 90 deg -> 0x4000 (left) + 180 deg -> 0x8000 (up) + 270 deg -> 0xC000 (right) + */ + struct ff_trigger trigger; struct ff_replay replay; @@ -565,7 +601,7 @@ struct ff_effect { }; /* - * Buttons that can trigger effects. Use for example FF_BTN(BTN_TRIGGER) to + * Buttons that can trigger effects. Use for example FF_BTN(BTN_TRIGGER) to * access the bitmap. */ @@ -626,8 +662,11 @@ struct input_dev { void *private; - int number; char *name; + char *phys; + char *uniq; + int number; + unsigned short idbus; unsigned short idvendor; unsigned short idproduct; @@ -650,6 +689,9 @@ struct input_dev { unsigned int repeat_key; struct timer_list timer; + struct pm_dev *pm_dev; + int state; + int abs[ABS_MAX + 1]; int rep[REP_MAX + 1]; @@ -662,8 +704,12 @@ struct input_dev { int absfuzz[ABS_MAX + 1]; int absflat[ABS_MAX + 1]; + int only_one_writer; + int (*open)(struct input_dev *dev); void (*close)(struct input_dev *dev); + int (*accept)(struct input_dev *dev, struct file *file); + int (*flush)(struct input_dev *dev, struct file *file); int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); int (*erase_effect)(struct input_dev *dev, int effect_id); @@ -672,16 +718,63 @@ struct input_dev { struct input_dev *next; }; +/* + * Structure for hotplug & device<->driver matching. + */ + +#define INPUT_DEVICE_ID_MATCH_BUS 1 +#define INPUT_DEVICE_ID_MATCH_VENDOR 2 +#define INPUT_DEVICE_ID_MATCH_PRODUCT 4 +#define INPUT_DEVICE_ID_MATCH_VERSION 8 + +#define INPUT_DEVICE_ID_MATCH_EVBIT 0x010 +#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x020 +#define INPUT_DEVICE_ID_MATCH_RELBIT 0x040 +#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x080 +#define INPUT_DEVICE_ID_MATCH_MSCIT 0x100 +#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 +#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 +#define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 + +#define INPUT_DEVICE_ID_MATCH_DEVICE\ + (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) +#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION\ + (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) + +struct input_device_id { + + unsigned long flags; + + unsigned short idbus; + unsigned short idvendor; + unsigned short idproduct; + unsigned short idversion; + + unsigned long evbit[NBITS(EV_MAX)]; + unsigned long keybit[NBITS(KEY_MAX)]; + unsigned long relbit[NBITS(REL_MAX)]; + unsigned long absbit[NBITS(ABS_MAX)]; + unsigned long mscbit[NBITS(MSC_MAX)]; + unsigned long ledbit[NBITS(LED_MAX)]; + unsigned long sndbit[NBITS(SND_MAX)]; + unsigned long ffbit[NBITS(FF_MAX)]; + + unsigned long driver_info; +}; + struct input_handler { void *private; void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); - struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev); + struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); void (*disconnect)(struct input_handle *handle); struct file_operations *fops; int minor; + char *name; + + struct input_device_id *id_table; struct input_handle *handle; struct input_handler *next; @@ -692,6 +785,7 @@ struct input_handle { void *private; int open; + char *name; struct input_dev *dev; struct input_handler *handler; @@ -709,6 +803,9 @@ void input_unregister_handler(struct inp int input_open_device(struct input_handle *); void input_close_device(struct input_handle *); +int input_accept_process(struct input_handle *handle, struct file *file); +int input_flush_device(struct input_handle* handle, struct file* file); + devfs_handle_t input_register_minor(char *name, int minor, int minor_base); void input_unregister_minor(devfs_handle_t handle); @@ -717,6 +814,8 @@ void input_event(struct input_dev *dev, #define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c)) #define input_report_rel(a,b,c) input_event(a, EV_REL, b, c) #define input_report_abs(a,b,c) input_event(a, EV_ABS, b, c) +#define input_report_ff(a,b,c) input_event(a, EV_FF, b, c) +#define input_report_ff_status(a,b,c) input_event(a, EV_FF_STATUS, b, c) #endif #endif |
From: NIIBE Y. <gn...@m1...> - 2002-02-27 00:10:30
|
M. R. Brown wrote: > Just to clarify, is it ok for any of us who are qualified to update from > mainline to our tree? I think that any of us could do that, provided it won't result conflicts. For example, I have been busy these weeks chasing binutils issues, it would not make sense to stop kernel development if someone wants to proceed. Now, I try to update to 2.5.4 (and then, 2.5.5). As the changes are somewhat huge (for architecture specific changes required), it takes time for me. -- |
From: M. R. B. <mr...@0x...> - 2002-02-26 14:30:05
|
* NIIBE Yutaka <gn...@m1...> on Tue, Feb 26, 2002: > For 2.4, I'll commit following update from mainline. >=20 Just to clarify, is it ok for any of us who are qualified to update from mainline to our tree? Or would you rather you be the only one to do all syncs (I know you're the only one who can sync to mainline)? M. R. |
From: NIIBE Y. <gn...@m1...> - 2002-02-26 11:40:08
|
For 2.4, I'll commit following update from mainline. 2002-02-26 NIIBE Yutaka <gn...@m1...> Updated to 2.4.18 * Makefile: Version 2.4.18. Merged. * AGAINST-2.4.18: New file. * AGAINST-2.4.17: Removed. * drivers/Makefile, drivers/block/rd.c, drivers/char/Makefile, drivers/net/8139too.c, drivers/net/Config.in, drivers/pci/pci.ids, kernel/ptrace.c, mm/memory.c: Merge the changes. * include/asm-sh/pci.h (DECLARE_PCI_UNMAP_ADDR, DECLARE_PCI_UNMAP_LEN, pci_unmap_addr, pci_unmap_addr_set, pci_unmap_len, pci_unmap_len_set): New API added. * drivers/char/sh-sci.c (sci_ioctl TIOCGSERIAL): set return code "rc". * arch/sh/vmlinux.lds.S (.text.lock): Removed. * arch/sh/kernel/sh_ksyms.c (simple_strtol): Removed. * include/asm-sh/unistd.h (__NR_security, __NR_gettid, __NR_readahead): Added. * arch/sh/kernel/entry.S (sys_gettid, sys_readahead): Added. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.1.1.1.2.3 diff -u -3 -p -r1.1.1.1.2.3 Makefile --- Makefile 24 Jan 2002 10:15:28 -0000 1.1.1.1.2.3 +++ Makefile 26 Feb 2002 11:37:01 -0000 @@ -1,12 +1,12 @@ VERSION = 2 PATCHLEVEL = 4 -SUBLEVEL = 17 +SUBLEVEL = 18 EXTRAVERSION = KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//") +KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g") CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ @@ -137,7 +137,8 @@ DRIVERS-y += drivers/char/char.o \ drivers/net/net.o \ drivers/media/media.o DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o -DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o +DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o +DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o @@ -205,7 +206,7 @@ CLEAN_FILES = \ drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ drivers/scsi/aic7xxx/aicasm/y.tab.h \ drivers/scsi/aic7xxx/aicasm/aicasm \ - drivers/scsi/53c700-mem.c \ + drivers/scsi/53c700_d.h \ net/khttpd/make_times_h \ net/khttpd/times.h \ submenu* @@ -243,14 +244,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 @@ -330,11 +331,13 @@ include/linux/version.h: ./Makefile @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver @mv -f .ver $@ +comma := , + init/version.o: init/version.c include/linux/compile.h include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c init/main.o: init/main.c include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< fs lib mm ipc kernel drivers net: dummy $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) Index: arch/sh/vmlinux.lds.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/vmlinux.lds.S,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 vmlinux.lds.S --- arch/sh/vmlinux.lds.S 15 Oct 2001 20:44:47 -0000 1.1.1.1 +++ arch/sh/vmlinux.lds.S 26 Feb 2002 11:37:01 -0000 @@ -23,7 +23,6 @@ SECTIONS *(.fixup) *(.gnu.warning) } = 0x0009 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.1.1.1.2.1 diff -u -3 -p -r1.1.1.1.2.1 entry.S --- arch/sh/kernel/entry.S 25 Jan 2002 00:51:42 -0000 1.1.1.1.2.1 +++ arch/sh/kernel/entry.S 26 Feb 2002 11:37:01 -0000 @@ -1195,6 +1195,10 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_madvise) .long SYMBOL_NAME(sys_getdents64) /* 220 */ .long SYMBOL_NAME(sys_fcntl64) + .long SYMBOL_NAME(sys_ni_syscall) /* reserved for TUX */ + .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */ + .long SYMBOL_NAME(sys_gettid) + .long SYMBOL_NAME(sys_readahead) /* 225 */ /* * NOTE!! This doesn't have to be exact - we just have @@ -1202,7 +1206,7 @@ ENTRY(sys_call_table) * entries. Don't panic if you notice that this hasn't * been shrunk every time we add a new system call. */ - .rept NR_syscalls-221 + .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) .endr Index: arch/sh/kernel/sh_ksyms.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/sh_ksyms.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 sh_ksyms.c --- arch/sh/kernel/sh_ksyms.c 15 Oct 2001 20:44:53 -0000 1.1.1.1 +++ arch/sh/kernel/sh_ksyms.c 26 Feb 2002 11:37:01 -0000 @@ -39,8 +39,6 @@ EXPORT_SYMBOL(no_irq_type); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy); -EXPORT_SYMBOL(simple_strtol); - EXPORT_SYMBOL(strtok); EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 Makefile --- drivers/Makefile 30 Nov 2001 23:03:47 -0000 1.1.1.1.2.2 +++ drivers/Makefile 26 Feb 2002 11:37:01 -0000 @@ -1,7 +1,7 @@ # # Makefile for the Linux kernel device drivers. # -# 15 Sep 2000, Christoph Hellwig <hc...@ca...> +# 15 Sep 2000, Christoph Hellwig <hc...@in...> # Rewritten to use lists instead of if-statements. # Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.1.1.1.2.4 diff -u -3 -p -r1.1.1.1.2.4 rd.c --- drivers/block/rd.c 24 Jan 2002 10:15:32 -0000 1.1.1.1.2.4 +++ drivers/block/rd.c 26 Feb 2002 11:37:01 -0000 @@ -191,26 +191,44 @@ __setup("ramdisk_blocksize=", ramdisk_bl * 2000 Transmeta Corp. * aops copied from ramfs. */ -static int ramdisk_readpage(struct file *file, struct page * page) +static void ramdisk_updatepage(struct page * page, int need_kmap) { if (!Page_Uptodate(page)) { - memset(kmap(page), 0, PAGE_CACHE_SIZE); - kunmap(page); + struct buffer_head *bh = page->buffers; + void * address; + + if (need_kmap) + kmap(page); + address = page_address(page); + if (bh) { + struct buffer_head *tmp = bh; + do { + if (!buffer_uptodate(tmp)) { + memset(address, 0, tmp->b_size); + mark_buffer_uptodate(tmp, 1); + } + address += tmp->b_size; + tmp = tmp->b_this_page; + } while (tmp != bh); + } else + memset(address, 0, PAGE_CACHE_SIZE); + if (need_kmap) + kunmap(page); flush_dcache_page(page); SetPageUptodate(page); } +} + +static int ramdisk_readpage(struct file *file, struct page * page) +{ + ramdisk_updatepage(page, 1); UnlockPage(page); return 0; } static int ramdisk_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to) { - if (!Page_Uptodate(page)) { - void *addr = page_address(page); - memset(addr, 0, PAGE_CACHE_SIZE); - flush_dcache_page(page); - SetPageUptodate(page); - } + ramdisk_updatepage(page, 0); SetPageDirty(page); return 0; } @@ -233,44 +251,40 @@ static int rd_blkdev_pagecache_IO(int rw unsigned long index; int offset, size, err; - err = -EIO; err = 0; mapping = rd_bdev[minor]->bd_inode->i_mapping; + /* writing a buffer cache not uptodate must not clear it */ + if (sbh->b_page->mapping == mapping) { + if (rw == WRITE) { + mark_buffer_uptodate(sbh, 1); + SetPageDirty(sbh->b_page); + } + goto out; + } + index = sbh->b_rsector >> (PAGE_CACHE_SHIFT - 9); offset = (sbh->b_rsector << 9) & ~PAGE_CACHE_MASK; size = sbh->b_size; do { int count; - struct page ** hash; struct page * page; char * src, * dst; - int unlock = 0; count = PAGE_CACHE_SIZE - offset; if (count > size) count = size; size -= count; - hash = page_hash(mapping, index); - page = __find_get_page(mapping, index, hash); + page = grab_cache_page(mapping, index); if (!page) { - page = grab_cache_page(mapping, index); err = -ENOMEM; - if (!page) - goto out; - err = 0; - - if (!Page_Uptodate(page)) { - memset(kmap(page), 0, PAGE_CACHE_SIZE); - kunmap(page); - SetPageUptodate(page); - } - - unlock = 1; + goto out; } + ramdisk_updatepage(page, 1); + index++; if (rw == READ) { @@ -294,8 +308,7 @@ static int rd_blkdev_pagecache_IO(int rw } else { SetPageDirty(page); } - if (unlock) - UnlockPage(page); + UnlockPage(page); __free_page(page); } while (size); Index: drivers/char/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Makefile,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 Makefile --- drivers/char/Makefile 30 Nov 2001 23:03:52 -0000 1.1.1.1.2.2 +++ drivers/char/Makefile 26 Feb 2002 11:37:01 -0000 @@ -25,7 +25,7 @@ export-objs := busmouse.o console.o misc.o pty.o random.o selection.o serial.o \ sonypi.o tty_io.o tty_ioctl.o generic_serial.o -mod-subdirs := joystick ftape drm pcmcia +mod-subdirs := joystick ftape drm drm-4.0 pcmcia list-multi := @@ -203,7 +203,8 @@ obj-$(CONFIG_INTEL_RNG) += i810_rng.o obj-$(CONFIG_QIC02_TAPE) += tpqic02.o subdir-$(CONFIG_FTAPE) += ftape -subdir-$(CONFIG_DRM) += drm +subdir-$(CONFIG_DRM_OLD) += drm-4.0 +subdir-$(CONFIG_DRM_NEW) += drm subdir-$(CONFIG_PCMCIA) += pcmcia subdir-$(CONFIG_AGP) += agp Index: drivers/char/sh-sci.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/sh-sci.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 sh-sci.c --- drivers/char/sh-sci.c 15 Oct 2001 20:44:59 -0000 1.1.1.1 +++ drivers/char/sh-sci.c 26 Feb 2002 11:37:01 -0000 @@ -919,7 +919,7 @@ static int sci_ioctl(struct tty_struct * case TIOCGSERIAL: if ((rc = verify_area(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) == 0) - gs_getserial(&port->gs, (struct serial_struct *) arg); + rc = gs_getserial(&port->gs, (struct serial_struct *) arg); break; case TIOCSSERIAL: if ((rc = verify_area(VERIFY_READ, (void *) arg, Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.1.1.1.2.4 diff -u -3 -p -r1.1.1.1.2.4 8139too.c --- drivers/net/8139too.c 24 Jan 2002 10:15:32 -0000 1.1.1.1.2.4 +++ drivers/net/8139too.c 26 Feb 2002 11:37:01 -0000 @@ -3,7 +3,7 @@ 8139too.c: A RealTek RTL-8139 Fast Ethernet driver for Linux. Maintained by Jeff Garzik <jg...@ma...> - Copyright 2000,2001 Jeff Garzik + Copyright 2000-2002 Jeff Garzik Much code comes from Donald Becker's rtl8139.c driver, versions 1.13 and older. This driver was originally based @@ -92,7 +92,7 @@ */ #define DRV_NAME "8139too" -#define DRV_VERSION "0.9.22" +#define DRV_VERSION "0.9.24" #include <linux/config.h> @@ -167,6 +167,9 @@ static int max_interrupt_work = 20; The RTL chips use a 64 element hash table based on the Ethernet CRC. */ static int multicast_filter_limit = 32; +/* bitmapped message enable number */ +static int debug = -1; + /* Size of the in-memory receive ring. */ #ifdef CONFIG_8139TOO_BUF16K #define RX_BUF_LEN_IDX 1 /* 0==8K, 1==16K, 2==32K, 3==64K */ @@ -225,6 +228,8 @@ typedef enum { DFE538TX, DFE690TXD, SEGABBA, + FE2000VX, + ALLIED8139, RTL8129, } board_t; @@ -242,6 +247,8 @@ static struct { { "Addtron Technolgy 8139 10/100BaseTX", RTL8139_CAPS }, { "D-Link DFE-538TX (RealTek RTL8139)", RTL8139_CAPS }, { "D-Link DFE-690TXD (RealTek RTL8139)", RTL8139_CAPS }, + { "AboCom FE2000VX (RealTek RTL8139)", RTL8139_CAPS }, + { "Allied Telesyn 8139 CardBus", RTL8139_CAPS }, { "SEGA Broadband Adapter", RTL8139_CAPS }, { "RealTek RTL8129", RTL8129_CAPS }, }; @@ -256,6 +263,8 @@ static struct pci_device_id rtl8139_pci_ {0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ADDTRON8139 }, {0x1186, 0x1300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE538TX }, {0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE690TXD }, + {0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FE2000VX }, + {0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALLIED8139 }, {0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SEGABBA }, #ifdef CONFIG_8139TOO_8129 @@ -268,6 +277,7 @@ static struct pci_device_id rtl8139_pci_ */ {PCI_ANY_ID, 0x8139, 0x10ec, 0x8139, 0, 0, RTL8139 }, {PCI_ANY_ID, 0x8139, 0x1186, 0x1300, 0, 0, DFE538TX }, + {PCI_ANY_ID, 0x8139, 0x13d1, 0xab06, 0, 0, FE2000VX }, {0,} }; @@ -540,6 +550,7 @@ struct rtl_extra_stats { unsigned long early_rx; unsigned long tx_buf_mapped; unsigned long tx_timeouts; + unsigned long rx_lost_in_ring; }; struct rtl8139_private { @@ -558,12 +569,8 @@ struct rtl8139_private { dma_addr_t tx_bufs_dma; signed char phys[4]; /* MII device addresses. */ char twistie, twist_row, twist_col; /* Twister tune state. */ - unsigned int full_duplex:1; /* Full-duplex operation requested. */ - unsigned int duplex_lock:1; unsigned int default_port:4; /* Last dev->if_port value. */ - unsigned int media2:4; /* Secondary monitored media port. */ unsigned int medialock:1; /* Don't sense media type. */ - unsigned int mediasense:1; /* Media sensing in progress. */ spinlock_t lock; chip_t chipset; pid_t thr_pid; @@ -572,6 +579,7 @@ struct rtl8139_private { u32 rx_config; struct rtl_extra_stats xstats; int time_to_die; + struct mii_if_info mii; }; MODULE_AUTHOR ("Jeff Garzik <jg...@ma...>"); @@ -582,6 +590,8 @@ MODULE_PARM (multicast_filter_limit, "i" MODULE_PARM (max_interrupt_work, "i"); MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM (full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +MODULE_PARM (debug, "i"); +MODULE_PARM_DESC (debug, "8139too bitmapped message enable number"); MODULE_PARM_DESC (multicast_filter_limit, "8139too maximum number of filtered multicast addresses"); MODULE_PARM_DESC (max_interrupt_work, "8139too maximum events handled per interrupt"); MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); @@ -970,6 +980,9 @@ static int __devinit rtl8139_init_one (s spin_lock_init (&tp->lock); init_waitqueue_head (&tp->thr_wait); init_completion (&tp->thr_exited); + tp->mii.dev = dev; + tp->mii.mdio_read = mdio_read; + tp->mii.mdio_write = mdio_write; /* dev is fully set up and ready to use now */ DPRINTK("about to register device named %s (%p)...\n", dev->name, dev); @@ -1021,18 +1034,18 @@ static int __devinit rtl8139_init_one (s /* The lower four bits are the media type. */ option = (board_idx >= MAX_UNITS) ? 0 : media[board_idx]; if (option > 0) { - tp->full_duplex = (option & 0x210) ? 1 : 0; + tp->mii.full_duplex = (option & 0x210) ? 1 : 0; tp->default_port = option & 0xFF; if (tp->default_port) tp->medialock = 1; } if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0) - tp->full_duplex = full_duplex[board_idx]; - if (tp->full_duplex) { + tp->mii.full_duplex = full_duplex[board_idx]; + if (tp->mii.full_duplex) { printk(KERN_INFO "%s: Media type forced to Full Duplex.\n", dev->name); /* Changing the MII-advertised media because might prevent re-connection. */ - tp->duplex_lock = 1; + tp->mii.duplex_lock = 1; } if (tp->default_port) { printk(KERN_INFO " Forcing %dMbps %s-duplex operation.\n", @@ -1289,7 +1302,7 @@ static int rtl8139_open (struct net_devi } - tp->full_duplex = tp->duplex_lock; + tp->mii.full_duplex = tp->mii.duplex_lock; tp->tx_flag = (TX_FIFO_THRESH << 11) & 0x003f0000; tp->twistie = 1; tp->time_to_die = 0; @@ -1301,7 +1314,7 @@ static int rtl8139_open (struct net_devi " GP Pins %2.2x %s-duplex.\n", dev->name, pci_resource_start (tp->pci_dev, 1), dev->irq, RTL_R8 (MediaStatus), - tp->full_duplex ? "full" : "half"); + tp->mii.full_duplex ? "full" : "half"); tp->thr_pid = kernel_thread (rtl8139_thread, dev, CLONE_FS | CLONE_FILES); if (tp->thr_pid < 0) @@ -1317,18 +1330,18 @@ static void rtl_check_media (struct net_ struct rtl8139_private *tp = dev->priv; if (tp->phys[0] >= 0) { - u16 mii_reg5 = mdio_read(dev, tp->phys[0], 5); - if (mii_reg5 == 0xffff) + u16 mii_lpa = mdio_read(dev, tp->phys[0], MII_LPA); + if (mii_lpa == 0xffff) ; /* Not there */ - else if ((mii_reg5 & 0x0100) == 0x0100 - || (mii_reg5 & 0x00C0) == 0x0040) - tp->full_duplex = 1; + else if ((mii_lpa & LPA_100FULL) == LPA_100FULL + || (mii_lpa & 0x00C0) == LPA_10FULL) + tp->mii.full_duplex = 1; printk (KERN_INFO"%s: Setting %s%s-duplex based on" " auto-negotiated partner ability %4.4x.\n", - dev->name, mii_reg5 == 0 ? "" : - (mii_reg5 & 0x0180) ? "100mbps " : "10mbps ", - tp->full_duplex ? "full" : "half", mii_reg5); + dev->name, mii_lpa == 0 ? "" : + (mii_lpa & 0x0180) ? "100mbps " : "10mbps ", + tp->mii.full_duplex ? "full" : "half", mii_lpa); } } @@ -1517,30 +1530,30 @@ static inline void rtl8139_thread_iter ( struct rtl8139_private *tp, void *ioaddr) { - int mii_reg5; + int mii_lpa; - mii_reg5 = mdio_read (dev, tp->phys[0], 5); + mii_lpa = mdio_read (dev, tp->phys[0], MII_LPA); - if (!tp->duplex_lock && mii_reg5 != 0xffff) { - int duplex = (mii_reg5 & 0x0100) - || (mii_reg5 & 0x01C0) == 0x0040; - if (tp->full_duplex != duplex) { - tp->full_duplex = duplex; + if (!tp->mii.duplex_lock && mii_lpa != 0xffff) { + int duplex = (mii_lpa & LPA_100FULL) + || (mii_lpa & 0x01C0) == 0x0040; + if (tp->mii.full_duplex != duplex) { + tp->mii.full_duplex = duplex; - if (mii_reg5) { + if (mii_lpa) { printk (KERN_INFO "%s: Setting %s-duplex based on MII #%d link" " partner ability of %4.4x.\n", dev->name, - tp->full_duplex ? "full" : "half", - tp->phys[0], mii_reg5); + tp->mii.full_duplex ? "full" : "half", + tp->phys[0], mii_lpa); } else { printk(KERN_INFO"%s: media is unconnected, link down, or incompatible connection\n", dev->name); } #if 0 RTL_W8 (Cfg9346, Cfg9346_Unlock); - RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20); + RTL_W8 (Config1, tp->mii.full_duplex ? 0x60 : 0x20); RTL_W8 (Cfg9346, Cfg9346_Lock); #endif } @@ -1774,23 +1787,36 @@ static void rtl8139_rx_err (u32 rx_statu struct rtl8139_private *tp, void *ioaddr) { u8 tmp8; +#ifndef CONFIG_8139_NEW_RX_RESET int tmp_work; +#endif DPRINTK ("%s: Ethernet frame had errors, status %8.8x.\n", dev->name, rx_status); - if (rx_status & RxTooLong) { - DPRINTK ("%s: Oversized Ethernet frame, status %4.4x!\n", - dev->name, rx_status); - /* A.C.: The chip hangs here. */ - } tp->stats.rx_errors++; - if (rx_status & (RxBadSymbol | RxBadAlign)) - tp->stats.rx_frame_errors++; - if (rx_status & (RxRunt | RxTooLong)) - tp->stats.rx_length_errors++; - if (rx_status & RxCRCErr) - tp->stats.rx_crc_errors++; + if (!(rx_status & RxStatusOK)) { + if (rx_status & RxTooLong) { + DPRINTK ("%s: Oversized Ethernet frame, status %4.4x!\n", + dev->name, rx_status); + /* A.C.: The chip hangs here. */ + } + if (rx_status & (RxBadSymbol | RxBadAlign)) + tp->stats.rx_frame_errors++; + if (rx_status & (RxRunt | RxTooLong)) + tp->stats.rx_length_errors++; + if (rx_status & RxCRCErr) + tp->stats.rx_crc_errors++; + } else { + tp->xstats.rx_lost_in_ring++; + } +#ifdef CONFIG_8139_NEW_RX_RESET + tmp8 = RTL_R8 (ChipCmd); + RTL_W8 (ChipCmd, tmp8 & ~CmdRxEnb); + RTL_W8 (ChipCmd, tmp8); + RTL_W32 (RxConfig, tp->rx_config); + tp->cur_rx = 0; +#else /* Reset the receiver, based on RealTek recommendation. (Bug?) */ /* disable receive */ @@ -1835,6 +1861,7 @@ static void rtl8139_rx_err (u32 rx_statu /* A.C.: Reset the multicast list. */ __set_rx_mode (dev); +#endif } static void rtl8139_rx_interrupt (struct net_device *dev, @@ -1969,13 +1996,13 @@ static void rtl8139_weird_interrupt (str (tp->drv_flags & HAS_LNK_CHNG)) { /* Really link-change on new chips. */ int lpar = RTL_R16 (NWayLPAR); - int duplex = (lpar & 0x0100) || (lpar & 0x01C0) == 0x0040 - || tp->duplex_lock; - if (tp->full_duplex != duplex) { - tp->full_duplex = duplex; + int duplex = (lpar & LPA_100FULL) || (lpar & 0x01C0) == 0x0040 + || tp->mii.duplex_lock; + if (tp->mii.full_duplex != duplex) { + tp->mii.full_duplex = duplex; #if 0 RTL_W8 (Cfg9346, Cfg9346_Unlock); - RTL_W8 (Config1, tp->full_duplex ? 0x60 : 0x20); + RTL_W8 (Config1, tp->mii.full_duplex ? 0x60 : 0x20); RTL_W8 (Cfg9346, Cfg9346_Lock); #endif } @@ -2134,48 +2161,6 @@ static int rtl8139_close (struct net_dev } -/* Get the ethtool settings. Assumes that eset points to kernel - memory, *eset has been initialized as {ETHTOOL_GSET}, and other - threads or interrupts aren't messing with the 8139. */ -static void netdev_get_eset (struct net_device *dev, struct ethtool_cmd *eset) -{ - struct rtl8139_private *np = dev->priv; - void *ioaddr = np->mmio_addr; - u16 advert; - - eset->supported = SUPPORTED_10baseT_Half - | SUPPORTED_10baseT_Full - | SUPPORTED_100baseT_Half - | SUPPORTED_100baseT_Full - | SUPPORTED_Autoneg - | SUPPORTED_TP; - - eset->advertising = ADVERTISED_TP | ADVERTISED_Autoneg; - advert = mdio_read (dev, np->phys[0], 4); - if (advert & 0x0020) - eset->advertising |= ADVERTISED_10baseT_Half; - if (advert & 0x0040) - eset->advertising |= ADVERTISED_10baseT_Full; - if (advert & 0x0080) - eset->advertising |= ADVERTISED_100baseT_Half; - if (advert & 0x0100) - eset->advertising |= ADVERTISED_100baseT_Full; - - eset->speed = (RTL_R8 (MediaStatus) & 0x08) ? 10 : 100; - /* (KON)FIXME: np->full_duplex is set or reset by the thread, - which means this always shows half duplex if the interface - isn't up yet, even if it has already autonegotiated. */ - eset->duplex = np->full_duplex ? DUPLEX_FULL : DUPLEX_HALF; - eset->port = PORT_TP; - /* (KON)FIXME: Is np->phys[0] correct? starfire.c uses that. */ - eset->phy_address = np->phys[0]; - eset->transceiver = XCVR_INTERNAL; - eset->autoneg = (mdio_read (dev, np->phys[0], 0) & 0x1000) != 0; - eset->maxtxpkt = 1; - eset->maxrxpkt = 1; -} - - /* Get the ethtool Wake-on-LAN settings. Assumes that wol points to kernel memory, *wol has been initialized as {ETHTOOL_GWOL}, and other threads or interrupts aren't messing with the 8139. */ @@ -2250,7 +2235,6 @@ static int netdev_set_wol (struct net_de return 0; } - static int netdev_ethtool_ioctl (struct net_device *dev, void *useraddr) { struct rtl8139_private *np = dev->priv; @@ -2259,33 +2243,71 @@ static int netdev_ethtool_ioctl (struct /* dev_ioctl() in ../../net/core/dev.c has already checked capable(CAP_NET_ADMIN), so don't bother with that here. */ - if (copy_from_user (ðcmd, useraddr, sizeof (ethcmd))) + if (get_user(ethcmd, (u32 *)useraddr)) return -EFAULT; switch (ethcmd) { - case ETHTOOL_GSET: - { - struct ethtool_cmd eset = { ETHTOOL_GSET }; - spin_lock_irq (&np->lock); - netdev_get_eset (dev, &eset); - spin_unlock_irq (&np->lock); - if (copy_to_user (useraddr, &eset, sizeof (eset))) - return -EFAULT; - return 0; - } - /* TODO: ETHTOOL_SSET */ + case ETHTOOL_GDRVINFO: { + struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; + strcpy (info.driver, DRV_NAME); + strcpy (info.version, DRV_VERSION); + strcpy (info.bus_info, np->pci_dev->slot_name); + if (copy_to_user (useraddr, &info, sizeof (info))) + return -EFAULT; + return 0; + } - case ETHTOOL_GDRVINFO: - { - struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; - strcpy (info.driver, DRV_NAME); - strcpy (info.version, DRV_VERSION); - strcpy (info.bus_info, np->pci_dev->slot_name); - if (copy_to_user (useraddr, &info, sizeof (info))) - return -EFAULT; - return 0; - } + /* get settings */ + case ETHTOOL_GSET: { + struct ethtool_cmd ecmd = { ETHTOOL_GSET }; + spin_lock_irq(&np->lock); + mii_ethtool_gset(&np->mii, &ecmd); + spin_unlock_irq(&np->lock); + if (copy_to_user(useraddr, &ecmd, sizeof(ecmd))) + return -EFAULT; + return 0; + } + /* set settings */ + case ETHTOOL_SSET: { + int r; + struct ethtool_cmd ecmd; + if (copy_from_user(&ecmd, useraddr, sizeof(ecmd))) + return -EFAULT; + spin_lock_irq(&np->lock); + r = mii_ethtool_sset(&np->mii, &ecmd); + spin_unlock_irq(&np->lock); + return r; + } + /* restart autonegotiation */ + case ETHTOOL_NWAY_RST: { + return mii_nway_restart(&np->mii); + } + /* get link status */ + case ETHTOOL_GLINK: { + struct ethtool_value edata = {ETHTOOL_GLINK}; + edata.data = mii_link_ok(&np->mii); + if (copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } + + /* get message-level */ + case ETHTOOL_GMSGLVL: { + struct ethtool_value edata = {ETHTOOL_GMSGLVL}; + edata.data = debug; + if (copy_to_user(useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } + /* set message-level */ + case ETHTOOL_SMSGLVL: { + struct ethtool_value edata; + if (copy_from_user(&edata, useraddr, sizeof(edata))) + return -EFAULT; + debug = edata.data; + return 0; + } case ETHTOOL_GWOL: { @@ -2325,6 +2347,9 @@ static int netdev_ioctl (struct net_devi int rc = 0; int phy = tp->phys[0] & 0x3f; + if (!netif_running(dev)) + return -EINVAL; + if (cmd != SIOCETHTOOL) { /* With SIOCETHTOOL, this would corrupt the pointer. */ data->phy_id &= 0x1f; @@ -2359,9 +2384,9 @@ static int netdev_ioctl (struct net_devi /* Check for autonegotiation on or reset. */ tp->medialock = (value & 0x9000) ? 0 : 1; if (tp->medialock) - tp->full_duplex = (value & 0x0100) ? 1 : 0; + tp->mii.full_duplex = (value & 0x0100) ? 1 : 0; break; - case 4: /* tp->advertising = value; */ break; + case 4: tp->mii.advertising = value; break; } } mdio_write(dev, data->phy_id, data->reg_num, data->val_in); Index: drivers/net/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.in,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 Config.in --- drivers/net/Config.in 30 Nov 2001 23:03:55 -0000 1.1.1.1.2.2 +++ drivers/net/Config.in 26 Feb 2002 11:37:01 -0000 @@ -36,11 +36,15 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the if [ "$CONFIG_PPC" = "y" ]; then dep_tristate ' MACE (Power Mac ethernet) support' CONFIG_MACE $CONFIG_ALL_PPC if [ "$CONFIG_MACE" != "n" ]; then - bool ' Use AAUI port instead of TP by default' CONFIG_MACE_AAUI_PORT + bool ' Use AAUI port instead of TP by default' CONFIG_MACE_AAUI_PORT fi dep_tristate ' BMAC (G3 ethernet) support' CONFIG_BMAC $CONFIG_ALL_PPC dep_tristate ' GMAC (G4/iBook ethernet) support' CONFIG_GMAC $CONFIG_ALL_PPC - tristate ' National DP83902AV (Oak ethernet) support' CONFIG_OAKNET + if [ "$CONFIG_4xx" = "y" ]; then + if [ "$CONFIG_STB03xxx" = "y" -o "$CONFIG_403GCX" = "y" ]; then + tristate ' National DP83902AV (Oak ethernet) support' CONFIG_OAKNET + fi + fi fi if [ "$CONFIG_ZORRO" = "y" ]; then tristate ' Ariadne support' CONFIG_ARIADNE @@ -75,7 +79,6 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the fi dep_tristate ' Sun BigMAC 10/100baseT support (EXPERIMENTAL)' CONFIG_SUNBMAC $CONFIG_SBUS $CONFIG_EXPERIMENTAL dep_tristate ' Sun QuadEthernet support' CONFIG_SUNQE $CONFIG_SBUS - dep_tristate ' Sun LANCE support' CONFIG_SUNLANCE $CONFIG_SBUS dep_tristate ' Sun GEM support' CONFIG_SUNGEM $CONFIG_PCI bool ' 3COM cards' CONFIG_NET_VENDOR_3COM if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then @@ -173,6 +176,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the dep_tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI dep_tristate ' National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI + if [ "$CONFIG_NATSEMI" = "y" -o "$CONFIG_NATSEMI" = "m" ]; then + bool ' NatSemi workaround for high errors' CONFIG_NATSEMI_CABLE_MAGIC + fi dep_tristate ' PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI dep_tristate ' Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL @@ -181,6 +187,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the dep_mbool ' Use PIO instead of MMIO' CONFIG_8139TOO_PIO $CONFIG_8139TOO dep_mbool ' Support for automatic channel equalization (EXPERIMENTAL)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_mbool ' Support for older RTL-8129/8130 boards' CONFIG_8139TOO_8129 $CONFIG_8139TOO + dep_mbool ' Experiment for better RX reset (EXPERIMENTAL)' CONFIG_8139_NEW_RX_RESET $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_mbool ' Support for Dreamcast Broad Band Adaptor' CONFIG_8139TOO_DREAMCAST $CONFIG_8139TOO dep_tristate ' SiS 900/7016 PCI Fast Ethernet Adapter support' CONFIG_SIS900 $CONFIG_PCI dep_tristate ' SMC EtherPower II' CONFIG_EPIC100 $CONFIG_PCI Index: drivers/pci/pci.ids =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pci/pci.ids,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 pci.ids --- drivers/pci/pci.ids 30 Nov 2001 23:03:55 -0000 1.1.1.1.2.2 +++ drivers/pci/pci.ids 26 Feb 2002 11:37:02 -0000 @@ -1180,11 +1180,21 @@ 0017 Paddington Mac I/O 0018 UniNorth FireWire 0019 KeyLargo USB - 001e UniNorth PCI + 001e UniNorth Internal PCI 001f UniNorth PCI 0020 UniNorth AGP - 0021 UniNorth GMAC + 0021 UniNorth GMAC (Sun GEM) 0022 KeyLargo Mac I/O + 0024 UniNorth/Pangea GMAC (Sun GEM) + 0025 KeyLargo/Pangea Mac I/O + 0026 KeyLargo/Pangea USB + 0027 UniNorth/Pangea AGP + 0028 UniNorth/Pangea PCI + 0029 UniNorth/Pangea Internal PCI + 002d UniNorth 1.5 AGP + 002e UniNorth 1.5 PCI + 002f UniNorth 1.5 Internal PCI + 0030 UniNorth/Pangea FireWire 106c Hyundai Electronics America 8801 Dual Pentium ISA/PCI Motherboard 8802 PowerPC ISA/PCI Motherboard @@ -2602,6 +2612,8 @@ 0005 ATP850UF 0006 ATP860 NO-BIOS 0007 ATP860 + 0008 ATP865 NO-ROM + 0009 ATP865 8002 AEC6710 SCSI-2 Host Adapter 8010 AEC6712UW SCSI 8020 AEC6712U SCSI Index: include/asm-sh/pci.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pci.h,v retrieving revision 1.1.1.1.2.1 diff -u -3 -p -r1.1.1.1.2.1 pci.h --- include/asm-sh/pci.h 30 Oct 2001 23:22:18 -0000 1.1.1.1.2.1 +++ include/asm-sh/pci.h 26 Feb 2002 11:37:02 -0000 @@ -89,6 +89,31 @@ static inline dma_addr_t pci_map_single( return virt_to_bus(ptr); } +/* pci_unmap_{single,page} being a nop depends upon the + * configuration. + */ +#ifdef CONFIG_SH_PCIDMA_NONCOHERENT +#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ + dma_addr_t ADDR_NAME; +#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ + __u32 LEN_NAME; +#define pci_unmap_addr(PTR, ADDR_NAME) \ + ((PTR)->ADDR_NAME) +#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ + (((PTR)->ADDR_NAME) = (VAL)) +#define pci_unmap_len(PTR, LEN_NAME) \ + ((PTR)->LEN_NAME) +#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ + (((PTR)->LEN_NAME) = (VAL)) +#else +#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) +#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) +#define pci_unmap_addr(PTR, ADDR_NAME) (0) +#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) +#define pci_unmap_len(PTR, LEN_NAME) (0) +#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) +#endif + /* Unmap a single streaming mode DMA translation. The dma_addr and size * must match what was provided for in a previous pci_map_single call. All * other usages are undefined. Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 unistd.h --- include/asm-sh/unistd.h 15 Oct 2001 20:45:10 -0000 1.1.1.1 +++ include/asm-sh/unistd.h 26 Feb 2002 11:37:02 -0000 @@ -231,6 +231,9 @@ #define __NR_madvise 219 #define __NR_getdents64 220 #define __NR_fcntl64 221 +#define __NR_security 223 /* syscall for security modules */ +#define __NR_gettid 224 +#define __NR_readahead 225 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ Index: kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/kernel/ptrace.c,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 ptrace.c --- kernel/ptrace.c 24 Jan 2002 10:15:32 -0000 1.1.1.1.2.2 +++ kernel/ptrace.c 26 Feb 2002 11:37:02 -0000 @@ -174,6 +174,7 @@ int access_process_vm(struct task_struct put_page(page); len -= bytes; buf += bytes; + addr += bytes; } up_read(&mm->mmap_sem); mmput(mm); Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.1.1.1.2.4 diff -u -3 -p -r1.1.1.1.2.4 memory.c --- mm/memory.c 24 Jan 2002 10:15:32 -0000 1.1.1.1.2.4 +++ mm/memory.c 26 Feb 2002 11:37:02 -0000 @@ -177,7 +177,7 @@ int copy_page_range(struct mm_struct *ds pgd_t * src_pgd, * dst_pgd; unsigned long address = vma->vm_start; unsigned long end = vma->vm_end; - unsigned long cow = (vma->vm_flags & (VM_SHARED | VM_WRITE)) == VM_WRITE; + unsigned long cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; src_pgd = pgd_offset(src, address)-1; dst_pgd = pgd_offset(dst, address)-1; @@ -245,7 +245,7 @@ skip_copy_pte_range: address = (address goto cont_copy_pte_range; /* If it's a COW mapping, write protect it both in the parent and the child */ - if (cow) { + if (cow && pte_write(pte)) { ptep_set_wrprotect(src_pte); pte = *src_pte; } @@ -442,23 +442,34 @@ static inline struct page * get_page_map return page; } +/* + * Please read Documentation/cachetlb.txt before using this function, + * accessing foreign memory spaces can cause cache coherency problems. + * + * Accessing a VM_IO area is even more dangerous, therefore the function + * fails if pages is != NULL and a VM_IO area is found. + */ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int len, int write, int force, struct page **pages, struct vm_area_struct **vmas) { - int i = 0; + int i; + unsigned int flags; + + /* + * Require read or write permissions. + * If 'force' is set, we only require the "MAY" flags. + */ + flags = write ? (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD); + flags &= force ? (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); + i = 0; do { struct vm_area_struct * vma; vma = find_extend_vma(mm, start); - if ( !vma || - (!force && - ((write && (!(vma->vm_flags & VM_WRITE))) || - (!write && (!(vma->vm_flags & VM_READ))) ) )) { - if (i) return i; - return -EFAULT; - } + if ( !vma || (pages && vma->vm_flags & VM_IO) || !(flags & vma->vm_flags) ) + return i ? : -EFAULT; spin_lock(&mm->page_table_lock); do { @@ -486,8 +497,9 @@ int get_user_pages(struct task_struct *t /* FIXME: call the correct function, * depending on the type of the found page */ - if (pages[i]) - page_cache_get(pages[i]); + if (!pages[i]) + goto bad_page; + page_cache_get(pages[i]); } if (vmas) vmas[i] = vma; @@ -497,7 +509,19 @@ int get_user_pages(struct task_struct *t } while(len && start < vma->vm_end); spin_unlock(&mm->page_table_lock); } while(len); +out: return i; + + /* + * We found an invalid page in the VMA. Release all we have + * so far and fail. + */ +bad_page: + spin_unlock(&mm->page_table_lock); + while (i--) + page_cache_release(pages[i]); + i = -EFAULT; + goto out; } /* |
From: <Raj...@ln...> - 2002-02-26 10:12:27
|
Hi I have found your email Id while browsing net. well,we are succusfully able to port ARM linux on Strong ARM sa1110/sa1111 development board but the problem is, On board we have SMC91c96 ethernet controller but we unable to wakeup ethernet controller and also in ARM linux config file, there is no option to select smc91c96(but you find 91c92 or 91c96) .So i request you to send solution and procedures to enable ethernet controller.yours fast response is highly appreciated. thanks and regards Rajesh MK Communicaion and Embedded Systems KIADB Industrial Estate Hootagalli MYSORE-571186 Tel: 91-821-402561 Ext:2611/2609 Res:O80-5214563 e-mail: r_...@ho...,raj...@ya... |
From: NIIBE Y. <gn...@m1...> - 2002-02-26 08:26:11
|
Jeremy Siegel wrote: > 1. Not long ago I had a problem with optimization around save_flags(). > Don't recall the exact details... I think it was a save/cli/restore > sequence with a nested (in an inline function?) save/cli/restore after the > first cli; the compiler assumed the initial SR value was usable for the > second save as well, causing the first restore to re-enable interrupts too > early. Making save_flags volatile (like cli and sti) fixed it. Also, some > symbols are missing for certain modules (e.g. ext3). The attached patch > addresses both items, let me know if there's any reason not to commit it. Nothing. Please commit. > 2. I've noticed that when we build the new gcc (3.0.3) the resulting specs > file no longer includes stuff to propogate endian and cpu arguments along > -- e.g. to cpp. If it's built for sh3le, for example, I can pass -m4 or > -mb and I still get __SH3__ rather than __SH4__ define, or > __LITTLE_ENDIAN__ rather than __BIG_ENDIAN__; what am I missing? (As far > as I know, our compiler includes all the latest patches referenced on this > list, maybe it's specific to the config?) You mean, configured as sh3-unknown-linux-gnu and use it for sh4-unknown-linux-gnu? I don't think it works. sh-unknown-linux-gnu supports sh3, sh3 big endian, sh4, sh4 big endian, and possibly sh64. sh3-unknown-linux-gnu is single specific target. -- |
From: NIIBE Y. <gn...@m1...> - 2002-02-26 08:13:58
|
And I'll commit following changes to follow mainline kernel. I haven't tested yet. Only compile it. 2002-02-26 NIIBE Yutaka <gn...@m1...> Updated to 2.5.3. * Makefile: Version 2.5.3 * AGAINST-2.5.3: New file. * AGAINST-2.5.3-pre5: Removed. * include/asm-sh/bitops.h (__ffs): Implemented. * include/asm-sh/mmu_context.h (sched_find_first_bit): Implemented (copied i386 implementation). (sched_find_first_zero_bit): Removed. * arch/sh/kernel/ptrace.c (sys_ptrace): Use ptrace_check_attach. Replace PT_TRACESYS -> PT_SYSCALLTRACE. * arch/sh/kernel/entry.S (sys_call_table): Added entries. Remove COMPAT_OLD_SYSCALL_ABI things. Follow up to new member "task_work" in task_struct. * include/asm-sh/unistd.h (__NR_security, __NR_gettid, __NR_setxattr, __NR_lsetxattr, __NR_fsetxattr, __NR_getxattr, __NR_lgetxattr, __NR_fgetxattr, __NR_listxattr, __NR_llistxattr, __NR_flistxattr, __NR_removexattr, __NR_lremovexattr, __NR_fremovexattr): Added. 2002-02-26 NIIBE Yutaka <gn...@m1...> Merge changes in 2.5.3-pre6. * Makefile (Drivers-y): Added drivers/base/base.o. * drivers/Makefile (subdir-y): Added "base". * drivers/char/Config.help (CONFIG_WATCHDOG): Added. * arch/sh/Config.help (CONFIG_PCI_GOBIOS, CONFIG_KCORE_ELF, CONFIG_SH_GENERIC, CONFIG_SH_SOLUTION_ENGINE, CONFIG_SH_7751_SOLUTION_ENGINE, CONFIG_SH_HP620, CONFIG_SH_HP680, CONFIG_SH_HP690, CONFIG_SH_CQREEK, CONFIG_SH_DMIDA, CONFIG_SH_EC3104, CONFIG_SH_DREAMCAST, CONFIG_SH_UNKNOWN): Added. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.6 diff -u -3 -p -r1.6 Makefile --- Makefile 25 Jan 2002 02:07:58 -0000 1.6 +++ Makefile 26 Feb 2002 08:10:47 -0000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 3 -EXTRAVERSION =-pre5 +EXTRAVERSION = KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -131,7 +131,8 @@ DRIVERS- := DRIVERS-$(CONFIG_ACPI) += drivers/acpi/acpi.o DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o -DRIVERS-y += drivers/char/char.o \ +DRIVERS-y += drivers/base/base.o \ + drivers/char/char.o \ drivers/block/block.o \ drivers/misc/misc.o \ drivers/net/net.o \ @@ -169,7 +170,7 @@ DRIVERS-$(CONFIG_ZORRO) += drivers/zorro DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o +DRIVERS-$(CONFIG_PNP) += drivers/pnp/pnp.o DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a DRIVERS-$(CONFIG_VT) += drivers/video/video.o DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a Index: arch/sh/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Config.help,v retrieving revision 1.2 diff -u -3 -p -r1.2 Config.help --- arch/sh/Config.help 25 Jan 2002 04:27:53 -0000 1.2 +++ arch/sh/Config.help 26 Feb 2002 08:10:47 -0000 @@ -4,122 +4,6 @@ CONFIG_SUPERH gaming console. The SuperH port has a home page at <http://www.sh-linux.org/>. -CONFIG_SH_GENERIC - Select Generic if configuring for a generic SuperH system. - The "generic" option compiles in *all* the possible hardware - support and relies on the sh_mv= kernel commandline option to choose - at runtime which routines to use. "MV" stands for "machine vector"; - each of the machines below is described by a machine vector. - - Select SolutionEngine if configuring for a Hitachi SH7709 - or SH7750/7750S evalutation board. - - Select Overdrive if configuring for a ST407750 Overdrive board. - More information at - <http://linuxsh.sourceforge.net/docs/7750overdrive.php3>. - - Select HP620 if configuring for a HP Jornada HP620. - More information (hardware only) at - <http://www.hp.com/jornada/>. - - Select HP680 if configuring for a HP Jornada HP680. - More information (hardware only) at - <http://www.hp.com/jornada/products/680/>. - - Select HP690 if configuring for a HP Jornada HP690. - More information (hardware only) at - <http://www.hp.com/jornada/products/680/>. - - Select CqREEK if configuring for a CqREEK SH7708 or SH7750. - More information at - <http://sources.redhat.com/ecos/hardware.html#SuperH>. - - Select DMIDA if configuring for a DataMyte 4000 Industrial - Digital Assistant. More information at <http://www.dmida.com/>. - - Select EC3104 if configuring for a system with an Eclipse - International EC3104 chip, e.g. the Harris AD2000 or Compaq Aero 8000. - - Select Dreamcast if configuring for a SEGA Dreamcast. - More information at - <http://www.m17n.org/linux-sh/dreamcast/>. There is a - Dreamcast project is at <http://linuxdc.sourceforge.net/>. - - Select BareCPU if you know what this means, and it applies - to your system. - -# These may have to be merged in when we go to CML2: -# - "SolutionEngine7751" for Hitachi SolutionEngine (7751) -# - "STB1_Harp" for STMicroelectronics HARP -# - "CqREEK" for CQ Publishing CqREEK SH-4 -# - "CAT68701" for CAT 68701 Evaluation Board (SH7708) -# - "BigSur" for Big Sur Evaluation Board -# - "ADX" for A&D ADX - -CONFIG_SH_SOLUTION_ENGINE - Select SolutionEngine if configuring for a Hitachi SH7709 - or SH7750 evalutation board. - -CONFIG_SH_7751_SOLUTION_ENGINE - Select 7751 SolutionEngine if configuring for a Hitachi SH7751 - evalutation board. - -CONFIG_SH_OVERDRIVE - Select Overdrive if configuring for a ST407750 Overdrive board. - More information at - <http://linuxsh.sourceforge.net/docs/7750overdrive.php3>. - -CONFIG_SH_HP620 - Select HP620 if configuring for a HP jornada HP620. - More information (hardware only) at - <http://www.hp.com/jornada/>. - -CONFIG_SH_HP680 - Select HP680 if configuring for a HP Jornada HP680. - More information (hardware only) at - <http://www.hp.com/jornada/products/680/>. - -CONFIG_SH_HP690 - Select HP690 if configuring for a HP Jornada HP690. - More information (hardware only) - at <http://www.hp.com/jornada/products/680/>. - -CONFIG_SH_CQREEK - Select CqREEK if configuring for a CqREEK SH7708 or SH7750. - More information at - <http://sources.redhat.com/ecos/hardware.html#SuperH>. - -CONFIG_SH_DMIDA - Select DMIDA if configuring for a DataMyte 4000 Industrial - Digital Assistant. More information at <http://www.dmida.com/>. - -CONFIG_SH_EC3104 - Select EC3104 if configuring for a system with an Eclipse - International EC3104 chip, e.g. the Harris AD2000. - -CONFIG_SH_DREAMCAST - Select Dreamcast if configuring for a SEGA Dreamcast. - More information at - <http://www.m17n.org/linux-sh/dreamcast/>. There is a - Dreamcast project is at <http://linuxdc.sourceforge.net/>. - -CONFIG_SH_SH2000 - SH-2000 is a single-board computer based around SH7709A chip - intended for embedded applications. - It has an Ethernet interface (CS8900A), direct connected - Compact Flash socket, three serial ports and PC-104 bus. - More information at <http://sh2000.sh-linux.org>. - -CONFIG_SH_UNKNOWN - "Bare CPU" aka "unknown" means an SH-based system which is not one - of the specific ones mentioned above, which means you need to enter - all sorts of stuff like CONFIG_MEMORY_START because the config - system doesn't already know what it is. You get a machine vector - without any platform-specific code in it, so things like the RTC may - not work. - - This option is for the early stages of porting to a new machine. - CONFIG_IDE If you say Y here, your kernel will be able to manage low cost mass storage units such as ATA/(E)IDE and ATAPI units. The most common @@ -198,6 +82,20 @@ CONFIG_PCI information about which PCI hardware does work under Linux and which doesn't. +CONFIG_PCI_GOBIOS + On PCI systems, the BIOS can be used to detect the PCI devices and + determine their configuration. However, some old PCI motherboards + have BIOS bugs and may crash if this is done. Also, some embedded + PCI-based systems don't have any BIOS at all. Linux can also try to + detect the PCI hardware directly without using the BIOS. + + With this option, you can specify how Linux should detect the PCI + devices. If you choose "BIOS", the BIOS will be used, if you choose + "Direct", the BIOS won't be used, and if you choose "Any", the + kernel will try the direct access method and falls back to the BIOS + if that doesn't work. If unsure, go with the default, which is + "Any". + CONFIG_MCA MicroChannel Architecture is found in some IBM PS/2 machines and laptops. It is a bus system similar to PCI or ISA. See @@ -252,6 +150,29 @@ CONFIG_PCMCIA and ds.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. +CONFIG_KCORE_ELF + If you enabled support for /proc file system then the file + /proc/kcore will contain the kernel core image. This can be used + in gdb: + + $ cd /usr/src/linux ; gdb vmlinux /proc/kcore + + You have two choices here: ELF and A.OUT. Selecting ELF will make + /proc/kcore appear in ELF core format as defined by the Executable + and Linking Format specification. Selecting A.OUT will choose the + old "a.out" format which may be necessary for some old versions + of binutils or on some architectures. + + This is especially useful if you have compiled the kernel with the + "-g" option to preserve debugging information. It is mainly used + for examining kernel data structures on the live kernel so if you + don't understand what this means or are not a kernel hacker, just + leave it at its default value ELF. + +CONFIG_KCORE_AOUT + Not necessary unless you're using a very out-of-date binutils + version. You probably want KCORE_ELF. + CONFIG_BINFMT_ELF ELF (Executable and Linkable Format) is a format for libraries and executables used across different architectures and operating @@ -774,6 +695,109 @@ CONFIG_CF_ENABLER primary IDE drive (only tested for SanDisk). If in doubt, select 'N'. + +CONFIG_SH_GENERIC + Select Generic if configuring for a generic SuperH system. + The "generic" option compiles in *all* the possible hardware + support and relies on the sh_mv= kernel commandline option to choose + at runtime which routines to use. "MV" stands for "machine vector"; + each of the machines below is described by a machine vector. + + Select SolutionEngine if configuring for a Hitachi SH7709 + or SH7750/7750S evalutation board. + + Select Overdrive if configuring for a ST407750 Overdrive board. + More information at + <http://linuxsh.sourceforge.net/docs/7750overdrive.php3>. + + Select HP620 if configuring for a HP Jornada HP620. + More information (hardware only) at + <http://www.hp.com/jornada/>. + + Select HP680 if configuring for a HP Jornada HP680. + More information (hardware only) at + <http://www.hp.com/jornada/products/680/>. + + Select HP690 if configuring for a HP Jornada HP690. + More information (hardware only) at + <http://www.hp.com/jornada/products/680/>. + + Select CqREEK if configuring for a CqREEK SH7708 or SH7750. + More information at + <http://sources.redhat.com/ecos/hardware.html#SuperH>. + + Select DMIDA if configuring for a DataMyte 4000 Industrial + Digital Assistant. More information at <http://www.dmida.com/>. + + Select EC3104 if configuring for a system with an Eclipse + International EC3104 chip, e.g. the Harris AD2000 or Compaq Aero 8000. + + Select Dreamcast if configuring for a SEGA Dreamcast. + More information at + <http://www.m17n.org/linux-sh/dreamcast/>. There is a + Dreamcast project is at <http://linuxdc.sourceforge.net/>. + + Select BareCPU if you know what this means, and it applies + to your system. + +CONFIG_SH_SOLUTION_ENGINE + Select SolutionEngine if configuring for a Hitachi SH7709 + or SH7750 evalutation board. + +CONFIG_SH_7751_SOLUTION_ENGINE + Select 7751 SolutionEngine if configuring for a Hitachi SH7751 + evalutation board. + +CONFIG_SH_HP620 + Select HP620 if configuring for a HP jornada HP620. + More information (hardware only) at + <http://www.hp.com/jornada/>. + +CONFIG_SH_HP680 + Select HP680 if configuring for a HP Jornada HP680. + More information (hardware only) at + <http://www.hp.com/jornada/products/680/>. + +CONFIG_SH_HP690 + Select HP690 if configuring for a HP Jornada HP690. + More information (hardware only) + at <http://www.hp.com/jornada/products/680/>. + +CONFIG_SH_CQREEK + Select CqREEK if configuring for a CqREEK SH7708 or SH7750. + More information at + <http://sources.redhat.com/ecos/hardware.html#SuperH>. + +CONFIG_SH_DMIDA + Select DMIDA if configuring for a DataMyte 4000 Industrial + Digital Assistant. More information at <http://www.dmida.com/>. + +CONFIG_SH_EC3104 + Select EC3104 if configuring for a system with an Eclipse + International EC3104 chip, e.g. the Harris AD2000. + +CONFIG_SH_DREAMCAST + Select Dreamcast if configuring for a SEGA Dreamcast. + More information at + <http://www.m17n.org/linux-sh/dreamcast/>. There is a + Dreamcast project is at <http://linuxdc.sourceforge.net/>. + +CONFIG_SH_SH2000 + SH-2000 is a single-board computer based around SH7709A chip + intended for embedded applications. + It has an Ethernet interface (CS8900A), direct connected + Compact Flash socket, three serial ports and PC-104 bus. + More information at <http://sh2000.sh-linux.org>. + +CONFIG_SH_UNKNOWN + "Bare CPU" aka "unknown" means an SH-based system which is not one + of the specific ones mentioned above, which means you need to enter + all sorts of stuff like CONFIG_MEMORY_START because the config + system doesn't already know what it is. You get a machine vector + without any platform-specific code in it, so things like the RTC may + not work. + + This option is for the early stages of porting to a new machine. CONFIG_CPU_SUBTYPE_SH7707 Select the type of SuperH processor you have. This information is Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.2 diff -u -3 -p -r1.2 entry.S --- arch/sh/kernel/entry.S 29 Dec 2001 06:50:38 -0000 1.2 +++ arch/sh/kernel/entry.S 26 Feb 2002 08:10:47 -0000 @@ -15,12 +15,6 @@ #include <linux/config.h> -/* - * Define this to turn on compatibility with the previous - * system call ABI. This feature is not properly maintained. - */ -#undef COMPAT_OLD_SYSCALL_ABI - ! NOTE: ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address ! to be jumped is too far, but it causes illegal slot exception. @@ -61,11 +55,8 @@ * These are offsets into the task-struct. */ flags = 4 -sigpending = 8 -need_resched = 20 -tsk_ptrace = 24 - -PT_TRACESYS = 0x00000002 +work = 8 +syscall_trace = work+1 ENOSYS = 38 EINVAL = 22 @@ -208,6 +199,7 @@ address_error_store: bra call_dae mov #1,r5 ! writeaccess = 1 + .align 2 call_dae: mov.l 1f, r0 mov.l @r0, r6 ! address @@ -275,50 +267,107 @@ debug_trap: nop .align 2 -1: .long SYMBOL_NAME(break_point_trap_software) - - .align 2 error: ! STI() - mov.l 1f, r0 + mov.l 2f, r0 jmp @r0 nop - .align 2 -1: .long SYMBOL_NAME(do_exception_error) - ! -! -! ENTRY(ret_from_fork) mov.l @r15+,r0 + mov r0, r4 ! Call schedule_tail + mov.l 3f, r1 + mova syscall_exit, r0 + jmp @r1 + lds r0, pr + + .align 2 +1: .long SYMBOL_NAME(break_point_trap_software) +2: .long SYMBOL_NAME(do_exception_error) +3: .long SYMBOL_NAME(schedule_tail) + + .align 2 +work_pending: + ! r1: current->work +#ifdef __LITTLE_ENDIAN__ +#else + swap.w r1, r0 + swap.b r0, r0 +#endif + and #0xff,r0 + ! r0: current->work.need_resched + tst r0, r0 + bt work_notifysig + + .align 2 +work_resched: mov.l 1f, r1 - jsr @r1 - mov r0, r4 - ! If we're being traced, return via syscall_ret_trace, otherwise - ! return directly to ret_from_syscall - stc k_current, r0 - mov.l @(tsk_ptrace,r0), r0 ! Is current PTRACE_SYSCALL'd? - mov #PT_TRACESYS, r1 - tst r1, r0 - bt ret_from_syscall - bra syscall_ret_trace - nop + jsr @r1 + nop + /* CLI */ + stc sr, r0 + or #0xf0, r0 + ldc r0, sr + ! + stc k_current, r1 + mov.l @(work,r1), r1 + mov.l 2f, r0 + and r1, r0 + tst r0, r0 + bt restore_all + bra work_pending + nop .align 2 -1: .long SYMBOL_NAME(schedule_tail) +work_notifysig: + ! r1: current->work +#ifdef __LITTLE_ENDIAN__ + swap.w r1, r0 +#else + swap.b r0, r0 +#endif + and #0xff,r0 + ! r0: current->work.sigpending + tst r0, r0 + bt restore_all + mov r15, r4 + mov #0, r5 + mov.l 3f, r1 + mova restore_all, r0 + jmp @r1 + lds r0, pr + +ENTRY(resume_userspace) + /* CLI */ + stc sr, r0 + or #0xf0, r0 + ldc r0, sr + ! + stc k_current, r1 + mov.l @(work,r1), r1 ! current->work + mov.l 2f, r0 + and r1, r0 + tst r0, r0 + bf work_pending + bra restore_all + nop + + .align 2 +1: .long SYMBOL_NAME(schedule) +2: ! ignore syscall trace counter +#ifdef __LITTLE_ENDIAN__ + .long 0xffff00ff +#else + .long 0xff00ffff +#endif +3: + .long SYMBOL_NAME(do_signal) /* - * Old syscall interface: - * - * Syscall #: R0 - * Arguments #0 to #3: R4--R7 - * more arguments: On the stack - * TRA: (number of arguments on the stack) x 4 - * - * New syscall interface: + * Syscall interface: * * Syscall #: R3 * Arguments #0 to #3: R4--R7 @@ -340,9 +389,10 @@ ENTRY(ret_from_fork) * argument. */ + .align 2 system_call: - mov.l __TRA, r9 - mov.l @r9, r8 + mov.l 1f, r9 + mov.l @r9, r8 ! Read from TRA (Trap Address) Register ! ! Is the trap argument >= 0x20? (TRA will be >= 0x80) mov #0x20, r9 @@ -354,217 +404,46 @@ system_call: mov #SYSCALL_NR, r14 add r15, r14 ! -#ifdef COMPAT_OLD_SYSCALL_ABI - mov #0x40, r9 - cmp/hs r9, r8 - bf/s old_abi_system_call - nop -#endif - ! New Syscall ABI add #-0x40, r8 shlr2 r8 shll8 r8 shll8 r8 ! r8 = num_args<<16 mov r3, r10 - or r8, r10 ! Encode syscall # and # of arguments + or r8, r10 ! Encode syscall # and # of arguments mov.l r10, @r14 ! set syscall_nr STI() - ! - stc k_current, r11 - mov.l @(tsk_ptrace,r11), r10 ! Is current PTRACE_SYSCALL'd? - mov #PT_TRACESYS, r11 - tst r11, r10 - bt 5f - ! Yes it is traced. - mov.l __syscall_trace, r11 ! Call syscall_trace() which notifies - jsr @r11 ! superior (will chomp R[0-7]) - nop - ! Reload R0-R4 from kernel stack, where the - ! parent may have modified them using - ! ptrace(POKEUSR). (Note that R0-R2 are - ! used by the system call handler directly - ! from the kernel stack anyway, so don't need - ! to be reloaded here.) This allows the parent - ! to rewrite system calls and args on the fly. - mov.l @(OFF_R4,r15), r4 ! arg0 - mov.l @(OFF_R5,r15), r5 - mov.l @(OFF_R6,r15), r6 - mov.l @(OFF_R7,r15), r7 ! arg3 - mov.l @(OFF_R3,r15), r3 ! syscall_nr - ! Arrange for syscall_trace() to be called - ! again as the system call returns. - mov.l __syscall_ret_trace, r10 - bra 6f - lds r10, pr - ! No it isn't traced. - ! Arrange for normal system call return. -5: mov.l __syscall_ret, r10 - lds r10, pr ! Call the system call handler through the table. - ! (both normal and ptrace'd) ! First check for bad syscall number -6: mov r3, r9 - mov.l __n_sys, r10 + mov r3, r9 + mov.l 2f, r10 ! Number of syscalls cmp/hs r10, r9 - bf 2f - ! Bad syscall number - rts ! go to syscall_ret or syscall_ret_trace - mov #-ENOSYS, r0 + bt syscall_badsys + ! ! Good syscall number -2: shll2 r9 ! x4 - mov.l __sct, r11 + stc k_current, r11 + add #syscall_trace, r11 + mov.b @r11, r10 + tst r10, r10 + bf syscall_trace_entry + ! +syscall_traced: + shll2 r9 ! x4 + mov.l 3f, r11 ! Load the address of sys_call_table add r11, r9 mov.l @r9, r11 - jmp @r11 ! jump to specific syscall handler + jsr @r11 ! jump to specific syscall handler nop - - ! In case of trace -syscall_ret_trace: mov.l r0, @(OFF_R0,r15) ! save the return value - mov.l __syscall_trace, r1 - mova SYMBOL_NAME(ret_from_syscall), r0 - jmp @r1 ! Call syscall_trace() which notifies superior - lds r0, pr ! Then return to ret_from_syscall() - - - -#ifdef COMPAT_OLD_SYSCALL_ABI -! Handle old ABI system call. -! Note that ptrace(SYSCALL) is not supported for the old ABI. -! At this point: -! r0, r4-7 as per ABI -! r8 = value of TRA register (= num_args<<2) -! r14 = points to SYSCALL_NR in stack frame -old_abi_system_call: - mov r0, r9 ! Save system call number in r9 - ! ! arrange for return which pops stack - mov.l __old_abi_syscall_ret, r10 - lds r10, pr - ! Build the stack frame if TRA > 0 - mov r8, r10 - cmp/pl r10 - bf 0f - mov.l @(OFF_SP,r15), r0 ! get original user stack -7: add #-4, r10 -4: mov.l @(r0,r10), r1 ! May cause address error exception.. - mov.l r1, @-r15 - cmp/pl r10 - bt 7b -0: - mov.l r9, @r14 ! set syscall_nr - STI() - ! Call the system call handler through the table. - ! First check for bad syscall number - mov.l __n_sys, r10 - cmp/hs r10, r9 - bf 2f - ! Bad syscall number - rts ! return to old_abi_syscall_ret - mov #-ENOSYS, r0 - ! Good syscall number -2: shll2 r9 ! x4 - mov.l __sct, r11 - add r11, r9 - mov.l @r9, r11 - jmp @r11 ! call specific syscall handler, - nop - - .align 2 -__old_abi_syscall_ret: - .long old_abi_syscall_ret - - ! This code gets called on address error exception when copying - ! syscall arguments from user stack to kernel stack. It is - ! supposed to return -EINVAL through old_abi_syscall_ret, but it - ! appears to have been broken for a long time in that the r0 - ! return value will be saved into the kernel stack relative to r15 - ! but the value of r15 is not correct partway through the loop. - ! So the user prog is returned its old r0 value, not -EINVAL. - ! Greg Banks 28 Aug 2000. - .section .fixup,"ax" -fixup_syscall_argerr: - ! First get r15 back to - rts - mov #-EINVAL, r0 - .previous - - .section __ex_table, "a" - .align 2 - .long 4b,fixup_syscall_argerr - .previous -#endif - - .align 2 -__TRA: .long TRA -__syscall_trace: - .long SYMBOL_NAME(syscall_trace) -__n_sys:.long NR_syscalls -__sct: .long SYMBOL_NAME(sys_call_table) -__syscall_ret_trace: - .long syscall_ret_trace -__syscall_ret: - .long syscall_ret -__INV_IMASK: - .long 0xffffff0f ! ~(IMASK) - - - .align 2 -reschedule: - mova SYMBOL_NAME(ret_from_syscall), r0 - mov.l 1f, r1 - jmp @r1 - lds r0, pr - .align 2 -1: .long SYMBOL_NAME(schedule) - -ret_from_irq: -ret_from_exception: - mov #OFF_SR, r0 - mov.l @(r0,r15), r0 ! get status register - shll r0 - shll r0 ! kernel space? - bt restore_all ! Yes, it's from kernel, go back soon - ! - bra ret_from_syscall - nop - - .align 2 -#ifdef COMPAT_OLD_SYSCALL_ABI -old_abi_syscall_ret: - add r8, r15 ! pop off the arguments - /* fall through */ -#endif -syscall_ret: - mov.l r0, @(OFF_R0,r15) ! save the return value - /* fall through */ - -ENTRY(ret_from_syscall) +syscall_exit: /* CLI */ stc sr, r0 or #0xf0, r0 ldc r0, sr ! stc k_current, r1 - mov.l @(need_resched,r1), r0 - tst r0, r0 - bf reschedule - mov.l @(sigpending,r1), r0 - tst r0, r0 - bt restore_all -signal_return: - mov r15, r4 - mov #0, r5 - mov.l __do_signal, r1 - mova restore_all, r0 - jmp @r1 - lds r0, pr - .align 2 -__do_signal: - .long SYMBOL_NAME(do_signal) -__irq_stat: - .long SYMBOL_NAME(irq_stat) - - .align 2 + mov.l @(work,r1), r1 ! current->work + tst r1, r1 + bf syscall_exit_work restore_all: mov.l @r15+, r0 mov.l @r15+, r1 @@ -576,8 +455,8 @@ restore_all: mov.l @r15+, r7 ! stc sr, r8 - mov.l __blrb_flags, r9 ! BL =1, RB=1 - or r9, r8 + mov.l 7f, r9 + or r9, r8 ! BL =1, RB=1 ldc r8, sr ! here, change the register bank ! mov.l @r15+, r8 @@ -598,10 +477,10 @@ restore_all: ! ! Calculate new SR value mov k3, k2 ! original SR value - mov.l 1f, k1 + mov.l 8f, k1 stc sr, k0 and k1, k0 ! Get current FD-bit - mov.l 2f, k1 + mov.l 9f, k1 and k1, k2 ! Mask orignal SR value or k0, k2 ! Inherit current FD-bit ! @@ -609,11 +488,11 @@ restore_all: shlr2 k0 and #0x3c, k0 cmp/eq #0x3c, k0 - bt/s 7f + bt/s 6f shll2 k0 mov g_imask, k0 ! -7: or k0, k2 ! Set the IMASK-bits +6: or k0, k2 ! Set the IMASK-bits ldc k2, ssr ! mov k4, r15 @@ -621,10 +500,82 @@ restore_all: nop .align 2 -__blrb_flags: .long 0x30000000 -1: .long 0x00008000 ! FD -2: .long 0xffff7f0f ! ~(IMASK+FD) -3: .long 0x00080000 ! SZ=0, PR=1 +1: .long TRA +2: .long NR_syscalls +3: .long SYMBOL_NAME(sys_call_table) +7: .long 0x30000000 +8: .long 0x00008000 ! FD +9: .long 0xffff7f0f ! ~(IMASK+FD) + + .align 2 +syscall_trace_entry: + ! Yes it is traced. + ! XXX setup arguments... + mov.l 1f, r11 ! Call do_syscall_trace which notifies + jsr @r11 ! superior (will chomp R[0-7]) + nop + ! Reload R0-R4 from kernel stack, where the + ! parent may have modified them using + ! ptrace(POKEUSR). (Note that R0-R2 are + ! used by the system call handler directly + ! from the kernel stack anyway, so don't need + ! to be reloaded here.) This allows the parent + ! to rewrite system calls and args on the fly. + mov.l @(OFF_R4,r15), r4 ! arg0 + mov.l @(OFF_R5,r15), r5 + mov.l @(OFF_R6,r15), r6 + mov.l @(OFF_R7,r15), r7 ! arg3 + mov.l @(OFF_R3,r15), r3 ! syscall_nr + ! Arrange for do_syscall_trace to be called + ! again as the system call returns. + mov.l 2f, r10 ! Number of syscalls + cmp/hs r10, r3 + bf syscall_traced + bra syscall_exit + mov #-ENOSYS, r0 + + .align 2 +syscall_exit_work: + ! r1: current->work +#ifdef __LITTLE_ENDIAN__ + swap.b r1, r0 +#else + swap.w r1, r0 +#endif + and #0xff,r0 + ! r0: current->work.syscall_trace + tst r0, 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: + .long 0xffffff0f ! ~(IMASK) + + .align 2 +syscall_badsys: ! Bad syscall number + bra resume_userspace + mov #-ENOSYS, r0 + + .align 2 +ret_from_irq: +ret_from_exception: + mov #OFF_SR, r0 + mov.l @(r0,r15), r0 ! get status register + shll r0 + shll r0 ! kernel space? + bt restore_all ! Yes, it's from kernel, go back soon + ! + bra resume_userspace + nop ! Exception Vector Base ! @@ -641,8 +592,8 @@ general_exception: bra handle_exception mov.l @k2, k2 .align 2 -2: .long ret_from_exception 1: .long EXPEVT +2: .long ret_from_exception ! ! .balign 1024,0,1024 @@ -667,6 +618,7 @@ interrupt: ! ! + .align 2 handle_exception: ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), ! save all registers onto stack. @@ -674,7 +626,7 @@ handle_exception: stc ssr, k0 ! Is it from kernel space? shll k0 ! Check MD bit (bit30) by shifting it into... shll k0 ! ...the T bit - bt/s 9f ! It's a kernel to kernel transition. + bt/s 1f ! It's a kernel to kernel transition. mov r15, k0 ! save original stack to k0 /* User space to kernel */ mov #0x20, k1 @@ -682,8 +634,8 @@ handle_exception: add current, k1 mov k1, r15 ! change to kernel stack ! -9: mov #-1, k4 - mov.l 3f, k1 +1: mov #-1, k4 + mov.l 2f, k1 ! Save the user registers on the stack. mov.l k4, @-r15 ! syscall_nr (default: -1) ! @@ -707,7 +659,7 @@ handle_exception: ! stc sr, r8 ! Back to normal register bank, and or k1, r8 ! Block all interrupts - mov.l 5f, k1 + mov.l 3f, k1 and k1, r8 ! ... ldc r8, sr ! ...changed here. ! @@ -723,17 +675,18 @@ handle_exception: stc k_ex_code, r8 shlr2 r8 shlr r8 - mov.l 1f, r9 + mov.l 4f, r9 add r8, r9 mov.l @r9, r9 jmp @r9 nop + .align 2 -1: .long SYMBOL_NAME(exception_handling_table) -3: .long 0x000000f0 ! FD=0, IMASK=15 -5: .long 0xcfffffff ! RB=0, BL=0 -6: .long 0x00080000 ! SZ=0, PR=1 +2: .long 0x000000f0 ! FD=0, IMASK=15 +3: .long 0xcfffffff ! RB=0, BL=0 +4: .long SYMBOL_NAME(exception_handling_table) + .align 2 none: rts nop @@ -1195,14 +1148,24 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_madvise) .long SYMBOL_NAME(sys_getdents64) /* 220 */ .long SYMBOL_NAME(sys_fcntl64) + .long SYMBOL_NAME(sys_ni_syscall) /* reserved for TUX */ + .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */ + .long SYMBOL_NAME(sys_gettid) + .long SYMBOL_NAME(sys_readahead) /* 225 */ + .long SYMBOL_NAME(sys_setxattr) + .long SYMBOL_NAME(sys_lsetxattr) + .long SYMBOL_NAME(sys_fsetxattr) + .long SYMBOL_NAME(sys_getxattr) + .long SYMBOL_NAME(sys_lgetxattr) /* 230 */ + .long SYMBOL_NAME(sys_fgetxattr) + .long SYMBOL_NAME(sys_listxattr) + .long SYMBOL_NAME(sys_llistxattr) + .long SYMBOL_NAME(sys_flistxattr) + .long SYMBOL_NAME(sys_removexattr) /* 235 */ + .long SYMBOL_NAME(sys_lremovexattr) + .long SYMBOL_NAME(sys_fremovexattr) - /* - * NOTE!! This doesn't have to be exact - we just have - * to make sure we have _enough_ of the "sys_ni_syscall" - * entries. Don't panic if you notice that this hasn't - * been shrunk every time we add a new system call. - */ - .rept NR_syscalls-221 + .rept NR_syscalls-(.-sys_call_table)/4 .long SYMBOL_NAME(sys_ni_syscall) .endr Index: arch/sh/kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/ptrace.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 ptrace.c --- arch/sh/kernel/ptrace.c 15 Oct 2001 20:44:51 -0000 1.1 +++ arch/sh/kernel/ptrace.c 26 Feb 2002 08:10:47 -0000 @@ -191,15 +191,11 @@ asmlinkage int sys_ptrace(long request, ret = ptrace_attach(child); goto out_tsk; } - ret = -ESRCH; - if (!(child->ptrace & PT_PTRACED)) - goto out_tsk; - if (child->state != TASK_STOPPED) { - if (request != PTRACE_KILL) - goto out_tsk; - } - if (child->p_pptr != tsk) + + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret < 0) goto out_tsk; + switch (request) { /* when I and D space are separate, these will need to be fixed. */ case PTRACE_PEEKTEXT: /* read word at location addr. */ @@ -279,9 +275,9 @@ asmlinkage int sys_ptrace(long request, if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) - child->ptrace |= PT_TRACESYS; + child->ptrace |= PT_SYSCALLTRACE; else - child->ptrace &= ~PT_TRACESYS; + child->ptrace &= ~PT_SYSCALLTRACE; child->exit_code = data; wake_up_process(child); ret = 0; @@ -312,7 +308,7 @@ asmlinkage int sys_ptrace(long request, ret = -EIO; if ((unsigned long) data > _NSIG) break; - child->ptrace &= ~PT_TRACESYS; + child->ptrace &= ~PT_SYSCALLTRACE; if ((child->ptrace & PT_DTRACE) == 0) { /* Spurious delayed TF traps may occur */ child->ptrace |= PT_DTRACE; @@ -376,12 +372,12 @@ out: return ret; } -asmlinkage void syscall_trace(void) +asmlinkage void do_syscall_trace(void) { struct task_struct *tsk = current; - if ((tsk->ptrace & (PT_PTRACED|PT_TRACESYS)) - != (PT_PTRACED|PT_TRACESYS)) + if ((tsk->ptrace & (PT_PTRACED|PT_SYSCALLTRACE)) + != (PT_PTRACED|PT_SYSCALLTRACE)) return; /* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.2 diff -u -3 -p -r1.2 Makefile --- drivers/Makefile 3 Dec 2001 22:15:34 -0000 1.2 +++ drivers/Makefile 26 Feb 2002 08:10:47 -0000 @@ -10,7 +10,7 @@ mod-subdirs := dio mtd sbus video macint message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ fc4 net/hamradio i2c acpi bluetooth maple -subdir-y := parport char block net sound misc media cdrom hotplug +subdir-y := base parport char block net sound misc media cdrom hotplug subdir-m := $(subdir-y) Index: drivers/char/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Config.help,v retrieving revision 1.1 diff -u -3 -p -r1.1 Config.help --- drivers/char/Config.help 25 Jan 2002 02:07:59 -0000 1.1 +++ drivers/char/Config.help 26 Feb 2002 08:10:47 -0000 @@ -818,6 +818,28 @@ CONFIG_INTEL_RNG If unsure, say N. +CONFIG_WATCHDOG + If you say Y here (and to one of the following options) and create a + character special file /dev/watchdog with major number 10 and minor + number 130 using mknod ("man mknod"), you will get a watchdog, i.e.: + subsequently opening the file and then failing to write to it for + longer than 1 minute will result in rebooting the machine. This + could be useful for a networked machine that needs to come back + online as fast as possible after a lock-up. There's both a watchdog + implementation entirely in software (which can sometimes fail to + reboot the machine) and a driver for hardware watchdog boards, which + are more robust and can also keep track of the temperature inside + your computer. For details, read <file:Documentation/watchdog.txt> + in the kernel source. + + The watchdog is usually used together with the watchdog daemon + which is available from + <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can + also monitor NFS connections and can reboot the machine when the process + table is full. + + If unsure, say N. + CONFIG_WATCHDOG_NOWAYOUT The default watchdog behaviour (which you get if you say N here) is to stop the timer if the process managing it closes the file Index: include/asm-sh/bitops.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/bitops.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 bitops.h --- include/asm-sh/bitops.h 15 Oct 2001 20:45:06 -0000 1.1.1.1 +++ include/asm-sh/bitops.h 26 Feb 2002 08:10:47 -0000 @@ -186,6 +186,26 @@ static __inline__ unsigned long ffz(unsi return result; } +/** + * __ffs - find first bit in word. + * @word: The word to search + * + * Undefined if no bit exists, so code should check against 0 first. + */ +static __inline__ unsigned long __ffs(unsigned long word) +{ + unsigned long result; + + __asm__("1:\n\t" + "shlr %1\n\t" + "bf/s 1b\n\t" + " add #1, %0" + : "=r" (result), "=r" (word) + : "0" (~0L), "1" (word) + : "t"); + return result; +} + static __inline__ int find_next_zero_bit(void *addr, int size, int offset) { unsigned long *p = ((unsigned long *) addr) + (offset >> 5); Index: include/asm-sh/mmu_context.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/mmu_context.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 mmu_context.h --- include/asm-sh/mmu_context.h 24 Jan 2002 11:20:11 -0000 1.4 +++ include/asm-sh/mmu_context.h 26 Feb 2002 08:10:47 -0000 @@ -166,7 +166,7 @@ static __inline__ void switch_mm(struct struct mm_struct *next, struct task_struct *tsk, unsigned int cpu) { - if (prev != next) { + if (likely(prev != next)) { unsigned long __pgdir = (unsigned long)next->pgd; clear_bit(cpu, &prev->cpu_vm_mask); @@ -196,7 +196,7 @@ enter_lazy_tlb(struct mm_struct *mm, str # error update this function. #endif -static inline int sched_find_first_zero_bit(unsigned long *b) +static inline int sched_find_first_bit(unsigned long *b) { unsigned int rt; @@ -207,6 +207,17 @@ static inline int sched_find_first_zero_ if (b[4] != ~0) return ffz(b[4]) + MAX_RT_PRIO; return ffz(b[5]) + 32 + MAX_RT_PRIO; + if (unlikely(b[0])) + return __ffs(b[0]); + if (unlikely(b[1])) + return __ffs(b[1]) + 32; + if (unlikely(b[2])) + return __ffs(b[2]) + 64; + if (unlikely(b[3])) + return __ffs(b[3]) + 96; + if (b[4]) + return __ffs(b[4]) + 128; + return __ffs(b[5]) + 32 + 128; } #endif /* __ASM_SH_MMU_CONTEXT_H */ Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/unistd.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 unistd.h --- include/asm-sh/unistd.h 15 Oct 2001 20:45:10 -0000 1.1.1.1 +++ include/asm-sh/unistd.h 26 Feb 2002 08:10:47 -0000 @@ -231,6 +231,20 @@ #define __NR_madvise 219 #define __NR_getdents64 220 #define __NR_fcntl64 221 +#define __NR_security 223 /* syscall for security modules */ +#define __NR_gettid 224 +#define __NR_setxattr 226 +#define __NR_lsetxattr 227 +#define __NR_fsetxattr 228 +#define __NR_getxattr 229 +#define __NR_lgetxattr 230 +#define __NR_fgetxattr 231 +#define __NR_listxattr 232 +#define __NR_llistxattr 233 +#define __NR_flistxattr 234 +#define __NR_removexattr 235 +#define __NR_lremovexattr 236 +#define __NR_fremovexattr 237 /* user-visible error numbers are in the range -1 - -125: see <asm-sh/errno.h> */ |
From: NIIBE Y. <gn...@m1...> - 2002-02-26 04:06:46
|
I need following patch to stabilize SolutionEngine SH7709A. I don't know the reason, but access to Area 0 is too fast for SolutionEngine SH7709A. We could set BSC, for normal setting of SolutionEngine SH7709A, more delay is needed (In my case, stnic.c with PINGPONG enabled). I'll apply this to 2.4 too. 2002-02-26 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/io_se.c (delay): More delay needed for SolutionEngine SH7709A. Index: arch/sh/kernel/io_se.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/io_se.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 io_se.c --- arch/sh/kernel/io_se.c 15 Oct 2001 20:44:48 -0000 1.1.1.1 +++ arch/sh/kernel/io_se.c 26 Feb 2002 04:02:06 -0000 @@ -23,6 +23,7 @@ int sh_pcic_io_dummy; static inline void delay(void) { ctrl_inw(0xa0000000); + ctrl_inw(0xa0000000); } /* MS7750 requires special versions of in*, out* routines, since -- |