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: dong in k. <dk...@ea...> - 2002-02-25 22:44:53
|
Hello, I want to know if the current linuxSH contains the code for clock scaling? Or is somebody working on it? Thanks, Dong-In |
From: JPL G. <pa...@jp...> - 2002-02-25 17:43:49
|
Sorry for the cold email but I appreciate you may normally be bombarded by= telephone calls throughout the day=2E JPL Group specialise in the placement of SOFTWARE/HARDWARE DSP, EMBEDDED E= NGINEERS suitable for Software/Hardware Houses and Major Electronic Manufacturers=2E Innovations in Digital Signal Processing (DSP) have sparked a digital revo= lution=2EDSP's are at the centre of modern communications, whilst applicat= ions such as internet audio, digital still cameras and digital radio are i= ncreasing the appetite for DSP's=2E With the shift to digital embedded sys= tems design, now in software rather than hardware, demand for skilled Deve= lopers is high=2E JPL Group can provide high calibre candidates who are experts in their fie= ld from our continually updated network of actively looking DSP profession= als=2E As you can see from our website at www=2Ejplg=2Ecom we are specialists in = our field and therefore understand your industry and your particular secto= r, therefore we are able to provide staff which best suit your requirement= s=2E We would be pleased to assist you with any current requirements for staff = that you may have and should this be the case then please do not hesitate = to contact us or forward your vacancy requirements to us via email=2E If you are not currently looking to employ any new staff then please keep = our details for future reference=2E Regards Paul Szczepanski JPL Group Telephone: 0870 800 9493 Fax: 0870 800 9495 Take a look at our interactive website at www=2Ejplg=2Ecom |
From: NIIBE Y. <gn...@m1...> - 2002-02-22 02:21:09
|
Michael Eager wrote: > What problem does this patch fix? I've encountered following problem. Upgraded to glibc 2.2.5 and newer binutils. Build whole things. Building libgcc.so, libobjc.so, libgcj.so, the assertion in elf32-sh.c:sh_elf_relocate_section BFD_ASSERT (off != (bfd_vma) -1); failed. (And with this libobjc.so, half of testsuites failed). This is because we have relocation of type GOT32 for __cxa_finalize in crtbeginS.o and it's offset is 0 (ZERO). The value ZERO is valid here. However, when got.offset is 0, it is wrongly overwritten to -1 in elf.c:_bfd_elf_link_hash_copy_indirect, this is cause of assertion failure. Note that got.refcount and got.offset is union, and placed in same memory. It works fine provided got.offset > 0, but when got.offset ==0, accessing as got.refcount, it looks it's not used (from view of refcount). Backend with can_refcount==0 used to work fine. But it seems for me that can_refcount==1 is the trend. In backend with can_refcount==1, got.refcount is used untill last time. At last time, the role will change to have offset and offset value will be set. -- |
From: Michael E. <ea...@mv...> - 2002-02-22 01:56:24
|
What problem does this patch fix? NIIBE Yutaka wrote: > > I've been struggling binutils... > > Binutils 2.11.2 (with our patch) works fine. > > Newer has issues, wrt got.{refcount,offset} implementation. > I'm using following patch to binutils-2.11.92.0.12.3. > > The workaround is in bfd/elflink.h and bfd/elf.c. > > Sh backend should adopt new refcount base scheme (currently use offset > from the beginning, and not using refcount). > > --- binutils-2.11.92.0.12.3/gas/configure.in 2001/12/08 03:45:55 1.85 > +++ binutils-2.11.92.0.12.3/gas/configure.in 2001/12/13 10:30:48 > @@ -394,8 +394,13 @@ changequote([,])dnl > s390x-*-linux-gnu*) fmt=elf em=linux ;; > s390-*-linux-gnu*) fmt=elf em=linux ;; > > - sh*eb-*-linux*) fmt=elf em=linux endian=big ;; > - sh*-*-linux*) fmt=elf em=linux endian=little ;; > + sh-*-linux*) fmt=elf em=linux > + case ${cpu} in > + sh*eb) > + endian=big ;; > + sh*) > + endian=little ;; > + esac ;; > sh-*-elf*) fmt=elf ;; > sh-*-coff*) fmt=coff bfd_gas=yes;; > sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; > --- binutils-2.11.92.0.12.3/gas/configure~ Sat Nov 17 07:05:52 2001 > +++ binutils-2.11.92.0.12.3/gas/configure Tue Jan 22 11:02:20 2002 > @@ -2518,8 +2518,13 @@ > s390x-*-linux-gnu*) fmt=elf em=linux ;; > s390-*-linux-gnu*) fmt=elf em=linux ;; > > - sh*eb-*-linux*) fmt=elf em=linux endian=big ;; > - sh*-*-linux*) fmt=elf em=linux endian=little ;; > + sh-*-linux*) fmt=elf em=linux > + case ${cpu} in > + sh*eb) > + endian=big ;; > + sh*) > + endian=little ;; > + esac ;; > sh-*-elf*) fmt=elf ;; > sh-*-coff*) fmt=coff bfd_gas=yes;; > sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; > --- binutils-2.11.92.0.12.3/bfd/elflink.h~ Thu Nov 29 15:55:47 2001 > +++ binutils-2.11.92.0.12.3/bfd/elflink.h Wed Feb 20 17:37:09 2002 > @@ -7914,7 +7914,7 @@ > { > bfd_vma *off = (bfd_vma *) offarg; > > - if (h->got.refcount > 0) > + if (h->got.refcount >= 0) > { > h->got.offset = off[0]; > off[0] += ARCH_SIZE / 8; > --- binutils-2.11.92.0.12.3/bfd/elf.c~ Sat Nov 17 07:05:51 2001 > +++ binutils-2.11.92.0.12.3/bfd/elf.c Wed Feb 20 17:36:39 2002 > @@ -1213,7 +1213,7 @@ > /* Copy over the global and procedure linkage table refcount entries. > These may have been already set up by a check_relocs routine. */ > tmp = dir->got.refcount; > - if (tmp <= 0) > + if (tmp < 0) > { > dir->got.refcount = ind->got.refcount; > ind->got.refcount = tmp; > @@ -1222,7 +1222,7 @@ > BFD_ASSERT (ind->got.refcount <= 0); > > tmp = dir->plt.refcount; > - if (tmp <= 0) > + if (tmp < 0) > { > dir->plt.refcount = ind->plt.refcount; > ind->plt.refcount = tmp; > --- binutils-2.11.92.0.12.3/bfd/elf32-sh.c.orig Wed Feb 20 17:34:17 2002 > +++ binutils-2.11.92.0.12.3/bfd/elf32-sh.c Wed Feb 20 17:35:40 2002 > @@ -2624,14 +2624,18 @@ > { > if (! info->shared > && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 > - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) > + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 > + /* XXX: Should be reverted after linker behaviour will be fixed */ > + && h->root.type != bfd_link_hash_undefweak > + && h->root.type != bfd_link_hash_undefined) > { > /* This case can occur if we saw a PLT reloc in an input > file, but the symbol was never referred to by a dynamic > - object. In such a case, we don't actually need to build > - a procedure linkage table, and we can just do a REL32 > - reloc instead. */ > - BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0); > + object, or if all references were garbage collected. In > + such a case, we don't actually need to build a procedure > + linkage table, and we can just do a REL32 reloc instead. */ > + h->plt.offset = (bfd_vma) -1; > + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; > return true; > } > > @@ -2986,6 +2990,11 @@ > sgot = NULL; > splt = NULL; > sreloc = NULL; > + if (dynobj != NULL) > + { > + splt = bfd_get_section_by_name (dynobj, ".plt"); > + sgot = bfd_get_section_by_name (dynobj, ".got"); > + } > > rel = relocs; > relend = relocs + input_section->reloc_count; > @@ -3101,6 +3110,7 @@ > sec->output_section will be NULL. */ > if (r_type == R_SH_GOTPC > || (r_type == R_SH_PLT32 > + && splt != NULL > && h->plt.offset != (bfd_vma) -1) > || (r_type == R_SH_GOT32 > && elf_hash_table (info)->dynamic_sections_created > @@ -3126,7 +3136,9 @@ > sections against symbols defined externally > in shared libraries. We can't do anything > with them here. */ > - || (input_section->flags & SEC_DEBUGGING) != 0))) > + || ((input_section->flags & SEC_DEBUGGING) != 0 > + && (h->elf_link_hash_flags > + & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))) > relocation = 0; > else if (sec->output_section == NULL) > { > @@ -3144,14 +3156,17 @@ > else if (h->root.type == bfd_link_hash_undefweak) > relocation = 0; > else if (info->shared > - && (!info->symbolic || info->allow_shlib_undefined) > - && !info->no_undefined) > + && (!info->symbolic || info->allow_shlib_undefined) > + && !info->no_undefined > + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) > relocation = 0; > else > { > if (! ((*info->callbacks->undefined_symbol) > (info, h->root.root.string, input_bfd, > - input_section, rel->r_offset, true))) > + input_section, rel->r_offset, > + (!info->shared || info->no_undefined > + || ELF_ST_VISIBILITY (h->other))))) > return false; > relocation = 0; > } > @@ -3465,7 +3480,8 @@ > || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) > goto final_link_relocate; > > - if (h->plt.offset == (bfd_vma) -1) > + if (h->plt.offset == (bfd_vma) -1 > + || splt == NULL) > { > /* We didn't make a PLT entry for this symbol. This > happens when statically linking PIC code, or when > @@ -3473,12 +3489,6 @@ > goto final_link_relocate; > } > > - if (splt == NULL) > - { > - splt = bfd_get_section_by_name (dynobj, ".plt"); > - BFD_ASSERT (splt != NULL); > - } > - > relocation = (splt->output_section->vma > + splt->output_offset > + h->plt.offset); > @@ -3920,7 +3930,6 @@ > break; > > h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; > - > break; > > case R_SH_DIR32: > @@ -3945,6 +3954,7 @@ > && (ELF32_R_TYPE (rel->r_info) != R_SH_REL32 > || (h != NULL > && (! info->symbolic > + || h->root.type == bfd_link_hash_defweak > || (h->elf_link_hash_flags > & ELF_LINK_HASH_DEF_REGULAR) == 0)))) > { > -- -- Michael Eager ea...@mv... 408-328-8426 MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA 94085 |
From: NIIBE Y. <gn...@m1...> - 2002-02-22 00:54:52
|
I've been struggling binutils... Binutils 2.11.2 (with our patch) works fine. Newer has issues, wrt got.{refcount,offset} implementation. I'm using following patch to binutils-2.11.92.0.12.3. The workaround is in bfd/elflink.h and bfd/elf.c. Sh backend should adopt new refcount base scheme (currently use offset from the beginning, and not using refcount). --- binutils-2.11.92.0.12.3/gas/configure.in 2001/12/08 03:45:55 1.85 +++ binutils-2.11.92.0.12.3/gas/configure.in 2001/12/13 10:30:48 @@ -394,8 +394,13 @@ changequote([,])dnl s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; - sh*eb-*-linux*) fmt=elf em=linux endian=big ;; - sh*-*-linux*) fmt=elf em=linux endian=little ;; + sh-*-linux*) fmt=elf em=linux + case ${cpu} in + sh*eb) + endian=big ;; + sh*) + endian=little ;; + esac ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff bfd_gas=yes;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; --- binutils-2.11.92.0.12.3/gas/configure~ Sat Nov 17 07:05:52 2001 +++ binutils-2.11.92.0.12.3/gas/configure Tue Jan 22 11:02:20 2002 @@ -2518,8 +2518,13 @@ s390x-*-linux-gnu*) fmt=elf em=linux ;; s390-*-linux-gnu*) fmt=elf em=linux ;; - sh*eb-*-linux*) fmt=elf em=linux endian=big ;; - sh*-*-linux*) fmt=elf em=linux endian=little ;; + sh-*-linux*) fmt=elf em=linux + case ${cpu} in + sh*eb) + endian=big ;; + sh*) + endian=little ;; + esac ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff bfd_gas=yes;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; --- binutils-2.11.92.0.12.3/bfd/elflink.h~ Thu Nov 29 15:55:47 2001 +++ binutils-2.11.92.0.12.3/bfd/elflink.h Wed Feb 20 17:37:09 2002 @@ -7914,7 +7914,7 @@ { bfd_vma *off = (bfd_vma *) offarg; - if (h->got.refcount > 0) + if (h->got.refcount >= 0) { h->got.offset = off[0]; off[0] += ARCH_SIZE / 8; --- binutils-2.11.92.0.12.3/bfd/elf.c~ Sat Nov 17 07:05:51 2001 +++ binutils-2.11.92.0.12.3/bfd/elf.c Wed Feb 20 17:36:39 2002 @@ -1213,7 +1213,7 @@ /* Copy over the global and procedure linkage table refcount entries. These may have been already set up by a check_relocs routine. */ tmp = dir->got.refcount; - if (tmp <= 0) + if (tmp < 0) { dir->got.refcount = ind->got.refcount; ind->got.refcount = tmp; @@ -1222,7 +1222,7 @@ BFD_ASSERT (ind->got.refcount <= 0); tmp = dir->plt.refcount; - if (tmp <= 0) + if (tmp < 0) { dir->plt.refcount = ind->plt.refcount; ind->plt.refcount = tmp; --- binutils-2.11.92.0.12.3/bfd/elf32-sh.c.orig Wed Feb 20 17:34:17 2002 +++ binutils-2.11.92.0.12.3/bfd/elf32-sh.c Wed Feb 20 17:35:40 2002 @@ -2624,14 +2624,18 @@ { if (! info->shared && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 + /* XXX: Should be reverted after linker behaviour will be fixed */ + && h->root.type != bfd_link_hash_undefweak + && h->root.type != bfd_link_hash_undefined) { /* This case can occur if we saw a PLT reloc in an input file, but the symbol was never referred to by a dynamic - object. In such a case, we don't actually need to build - a procedure linkage table, and we can just do a REL32 - reloc instead. */ - BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0); + object, or if all references were garbage collected. In + such a case, we don't actually need to build a procedure + linkage table, and we can just do a REL32 reloc instead. */ + h->plt.offset = (bfd_vma) -1; + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; return true; } @@ -2986,6 +2990,11 @@ sgot = NULL; splt = NULL; sreloc = NULL; + if (dynobj != NULL) + { + splt = bfd_get_section_by_name (dynobj, ".plt"); + sgot = bfd_get_section_by_name (dynobj, ".got"); + } rel = relocs; relend = relocs + input_section->reloc_count; @@ -3101,6 +3110,7 @@ sec->output_section will be NULL. */ if (r_type == R_SH_GOTPC || (r_type == R_SH_PLT32 + && splt != NULL && h->plt.offset != (bfd_vma) -1) || (r_type == R_SH_GOT32 && elf_hash_table (info)->dynamic_sections_created @@ -3126,7 +3136,9 @@ sections against symbols defined externally in shared libraries. We can't do anything with them here. */ - || (input_section->flags & SEC_DEBUGGING) != 0))) + || ((input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))) relocation = 0; else if (sec->output_section == NULL) { @@ -3144,14 +3156,17 @@ else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; else if (info->shared - && (!info->symbolic || info->allow_shlib_undefined) - && !info->no_undefined) + && (!info->symbolic || info->allow_shlib_undefined) + && !info->no_undefined + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { if (! ((*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, true))) + input_section, rel->r_offset, + (!info->shared || info->no_undefined + || ELF_ST_VISIBILITY (h->other))))) return false; relocation = 0; } @@ -3465,7 +3480,8 @@ || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) goto final_link_relocate; - if (h->plt.offset == (bfd_vma) -1) + if (h->plt.offset == (bfd_vma) -1 + || splt == NULL) { /* We didn't make a PLT entry for this symbol. This happens when statically linking PIC code, or when @@ -3473,12 +3489,6 @@ goto final_link_relocate; } - if (splt == NULL) - { - splt = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (splt != NULL); - } - relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); @@ -3920,7 +3930,6 @@ break; h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; - break; case R_SH_DIR32: @@ -3945,6 +3954,7 @@ && (ELF32_R_TYPE (rel->r_info) != R_SH_REL32 || (h != NULL && (! info->symbolic + || h->root.type == bfd_link_hash_defweak || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) { -- |
From: Jeremy S. <js...@mv...> - 2002-02-20 17:07:33
|
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. 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?) Thanks, --Jeremy Siegel |
From: Vladimir D. <vdo...@wa...> - 2002-02-14 17:15:53
|
Hi, I just tested with latest 2.4.17. Approximatly a new kernel runs 3-4 times faster but i still got the same problem.... Thanks, vlad kaz Kojima wrote: > Vladimir Doukhanine <vdo...@wa...> wrote: > >> Vladimir Doukhanine <vdo...@wa...> wrote: > >>> If I copy data from one place to another after each megabyte (delta > >>> between src and dst) > >>> there is some kind of "black hole" 32 bytes long in which processor > >>> works 15 times > >>> slower. > >> > >> Which version of kernel are you testing? > > > > 2.4.5 > > 2.4.5 kernel has SH-4 cache and other problems. Can you please > get and test newer kernel? > > kaz > > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev |
From: Paul M. <pm...@mv...> - 2002-02-09 23:03:26
|
On Sat, Feb 09, 2002 at 02:49:39PM -0800, Slater wrote: > help > --- lin...@li... wrote: > > Send linuxsh-dev mailing list submissions to > > lin...@li... > >=20 > > To subscribe or unsubscribe via the World Wide Web, > > visit > >=20 > > > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > > or, via email, send a message with subject or body > > 'help' to > > lin...@li... Note the: ^^^^^^^^ Try harder. Regards, --=20 Paul Mundt <pm...@mv...> MontaVista Software, Inc. |
From: Slater <tu...@ya...> - 2002-02-09 22:49:40
|
help --- lin...@li... wrote: > Send linuxsh-dev mailing list submissions to > lin...@li... > > To subscribe or unsubscribe via the World Wide Web, > visit > > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > or, via email, send a message with subject or body > 'help' to > lin...@li... > > You can reach the person managing the list at > lin...@li... > > When replying, please edit your Subject line so it > is more specific > than "Re: Contents of linuxsh-dev digest..." > > > Today's Topics: > > 1. IDE detection problem 2.4.17 (Vladimir > Doukhanine) > 2. Re: Linux on Cassiopeia A21S (Andrey Shuvikov) > > ATTACHMENT part 3.1 message/rfc822 > Date: Fri, 08 Feb 2002 15:35:01 -0500 > From: Vladimir Doukhanine <vdo...@wa...> > CC: lin...@li... > Subject: [linuxsh-dev] IDE detection problem 2.4.17 > > Hi, > > I'm upgrading a linux kernel on SolutionEngine(7750) > to 2.4.17. > Everything seems to be OK except... the kernel has a > problem detecting > IDE CF. > (configured with Area6 CF and with IDE/ATA-2 > support). > 2.4.5 kernel working without any problems with the > same configuration. > It doesn't matter how I build it with 3.0.3 or 2.97. > > Thanks, > Vlad > > > Uncompressing Linux... Ok, booting the kernel. > Linux version 2.4.17 (ro...@vd...) > (gcc version 3.0.3) > #16 Fri > Feb 8 13:58:36 EST 2002 > On node 0 totalpages: 16380 > zone(0): 16380 pages. > zone(1): 0 pages. > zone(2): 0 pages. > Kernel command line: mem=65520K sh_mv=SolutionEngine > console=ttySC1,115200 > Setting GDB trap vector to 0x80000100 > CPU clock: 200.02MHz > Bus clock: 33.33MHz > Module clock: 33.33MHz > Interval .Linux version 2.4.17 > (ro...@vd...) (gcc > version 3.0.3) #16 Fri Feb 8 13:58:36 EST 2002 > Linux version 2.4.17 (ro...@vd...) > (gcc version 3.0.3) > #16 Fri > Feb 8 13:58:36 EST 2002 > On node 0 totalpages: 16380 > On node 0 totalpages: 16380 > zone(0): 16380 pages. > zone(0): 16380 pages. > zone(1): 0 pages. > zone(1): 0 pages. > zone(2): 0 pages. > zone(2): 0 pages. > Kernel command line: mem=65520K sh_mv=SolutionEngine > console=ttySC1,115200 > Kernel command line: mem=65520K sh_mv=SolutionEngine > console=ttySC1,115200 > Setting GDB trap vector to 0x80000100 > Setting GDB trap vector to 0x80000100 > CPU clock: 200.02MHz > CPU clock: 200.02MHz > Bus clock: 33.33MHz > Bus clock: 33.33MHz > Module clock: 33.33MHz > Module clock: 33.33MHz > Interval = 83343 > Interval = 83343 > Calibrating delay loop... 199.47 BogoMIPS > Memory: 63160k/65520k available (1169k kernel code, > 2360k reserved, 34k > data, 36k init) > Dentry-cache hash table entries: 8192 (order: 4, > 65536 bytes) > Inode-cache hash table entries: 4096 (order: 3, > 32768 bytes) > Mount-cache hash table entries: 1024 (order: 1, 8192 > bytes) > Buffer-cache hash table entries: 1024 (order: 0, > 4096 bytes) > Page-cache hash table entries: 16384 (order: 4, > 65536 bytes) > CPU: SH7750/SH7751 > POSIX conformance testing by UNIFIX > Linux NET4.0 for Linux 2.4 > Based upon Swansea University Computer Society > NET3.039 > Initializing RT netlink socket > Starting kswapd > Journalled Block Device driver loaded > JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed > by Axis > Communications AB. > SuperH SCI(F) driver initialized > ttySC0 at 0xffe00000 is a SCI > ttySC1 at 0xffe80000 is a SCIF > Real Time Clock Driver v1.10e > block: 128 slots per queue, batch=32 > RAMDISK driver initialized: 16 RAM disks of 4096K > size 1024 blocksize > Uniform Multi-Platform E-IDE driver Revision: 6.31 > > ide: Assuming 50MHz system bus speed for PIO modes; > override with > idebus=xx > hda: no response (status = 0xa1), resetting drive > hda: no response (status = 0xa1) > hdb: no response (status = 0xa1), resetting drive > hdb: no response (status = 0xa1) > > NS ST-NIC 83902A > physmap flash device: 400000 at 0 > Amd/Fujitsu Extended Query Table v1.0 at 0x0040 > Physically mapped flash: JEDEC Device ID is 0xC4. > Assuming broken CFI > table. > Physically mapped flash: Swapping erase regions for > broken CFI table. > number of CFI chips: 1 > NET4: Linux TCP/IP 1.0 for NET4.0 > IP Protocols: ICMP, UDP, TCP > IP: routing cache hash table of 512 buckets, 4Kbytes > TCP: Hash tables configured (established 4096 bind > 8192) > NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. > request_module[block-major-3]: Root fs not mounted > VFS: Cannot open root device "" or 03:01> begin:vcard > n:Doukhanine;Vladimir > tel;work:1 613 225-9266 ext 231 > x-mozilla-html:FALSE > org:Wann Connection Devices;Wann R&D > adr:;;18 Auriga Drive ;Ottawa;Ontario;K2E > 7T9;Canada > version:2.1 > email;internet:vdo...@wa... > title:Software Designer > x-mozilla-cpt:;5824 > fn:Vladimir Doukhanine > end:vcard > > ATTACHMENT part 3.2 message/rfc822 > From: "Andrey Shuvikov" <hy...@ho...> > To: Chr...@fn... > CC: lin...@li... > Subject: Re: [linuxsh-dev] Linux on Cassiopeia A21S > Date: Fri, 08 Feb 2002 23:48:32 +0000 > > Hi Christian, > > I didn't really intend to run shlo on my Cassiopeia > because this definitely > requires some changes to shlo (unless newer versions > were already ported to > Cassiopeia), I just wanted to know how it works. > > As for SetKMode, I tried it on A21S using dsForth > environment and even was > able to read first 64K of WinCE ROM :-) The address > of it is A0000000 and if > you try to read it in user mode you'll get an > exception. > > BTW where did you find shlo source? > > Sincerely, > Andrey. > > > >Hello Andrey, > > > >In the meantime I've found one source of shlo (Jan > 10 2001). > >AFAIK SetKMode doesn't exist under WinCE 2.0 . > >Have you really got shlo running under WinCE 2.0 ? > >If so I'm interested to get your executable to try > on my A 20... > > > >Cheers, > > > >Christian > > > _________________________________________________________________ > Join the worlds largest e-mail service with MSN > Hotmail. > http://www.hotmail.com > > > > > > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxsh-dev > > __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com |
From: Andrey S. <hy...@ho...> - 2002-02-08 23:48:48
|
Hi Christian, I didn't really intend to run shlo on my Cassiopeia because this definitely requires some changes to shlo (unless newer versions were already ported to Cassiopeia), I just wanted to know how it works. As for SetKMode, I tried it on A21S using dsForth environment and even was able to read first 64K of WinCE ROM :-) The address of it is A0000000 and if you try to read it in user mode you'll get an exception. BTW where did you find shlo source? Sincerely, Andrey. >Hello Andrey, > >In the meantime I've found one source of shlo (Jan 10 2001). >AFAIK SetKMode doesn't exist under WinCE 2.0 . >Have you really got shlo running under WinCE 2.0 ? >If so I'm interested to get your executable to try on my A 20... > >Cheers, > >Christian _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
From: Vladimir D. <vdo...@wa...> - 2002-02-08 20:35:20
|
Hi, I'm upgrading a linux kernel on SolutionEngine(7750) to 2.4.17. Everything seems to be OK except... the kernel has a problem detecting IDE CF. (configured with Area6 CF and with IDE/ATA-2 support). 2.4.5 kernel working without any problems with the same configuration. It doesn't matter how I build it with 3.0.3 or 2.97. Thanks, Vlad Uncompressing Linux... Ok, booting the kernel. Linux version 2.4.17 (ro...@vd...) (gcc version 3.0.3) #16 Fri Feb 8 13:58:36 EST 2002 On node 0 totalpages: 16380 zone(0): 16380 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: mem=65520K sh_mv=SolutionEngine console=ttySC1,115200 Setting GDB trap vector to 0x80000100 CPU clock: 200.02MHz Bus clock: 33.33MHz Module clock: 33.33MHz Interval .Linux version 2.4.17 (ro...@vd...) (gcc version 3.0.3) #16 Fri Feb 8 13:58:36 EST 2002 Linux version 2.4.17 (ro...@vd...) (gcc version 3.0.3) #16 Fri Feb 8 13:58:36 EST 2002 On node 0 totalpages: 16380 On node 0 totalpages: 16380 zone(0): 16380 pages. zone(0): 16380 pages. zone(1): 0 pages. zone(1): 0 pages. zone(2): 0 pages. zone(2): 0 pages. Kernel command line: mem=65520K sh_mv=SolutionEngine console=ttySC1,115200 Kernel command line: mem=65520K sh_mv=SolutionEngine console=ttySC1,115200 Setting GDB trap vector to 0x80000100 Setting GDB trap vector to 0x80000100 CPU clock: 200.02MHz CPU clock: 200.02MHz Bus clock: 33.33MHz Bus clock: 33.33MHz Module clock: 33.33MHz Module clock: 33.33MHz Interval = 83343 Interval = 83343 Calibrating delay loop... 199.47 BogoMIPS Memory: 63160k/65520k available (1169k kernel code, 2360k reserved, 34k data, 36k init) Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes) Inode-cache hash table entries: 4096 (order: 3, 32768 bytes) Mount-cache hash table entries: 1024 (order: 1, 8192 bytes) Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 16384 (order: 4, 65536 bytes) CPU: SH7750/SH7751 POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd Journalled Block Device driver loaded JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB. SuperH SCI(F) driver initialized ttySC0 at 0xffe00000 is a SCI ttySC1 at 0xffe80000 is a SCIF Real Time Clock Driver v1.10e block: 128 slots per queue, batch=32 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Uniform Multi-Platform E-IDE driver Revision: 6.31 ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx hda: no response (status = 0xa1), resetting drive hda: no response (status = 0xa1) hdb: no response (status = 0xa1), resetting drive hdb: no response (status = 0xa1) NS ST-NIC 83902A physmap flash device: 400000 at 0 Amd/Fujitsu Extended Query Table v1.0 at 0x0040 Physically mapped flash: JEDEC Device ID is 0xC4. Assuming broken CFI table. Physically mapped flash: Swapping erase regions for broken CFI table. number of CFI chips: 1 NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 4096 bind 8192) NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. request_module[block-major-3]: Root fs not mounted VFS: Cannot open root device "" or 03:01 |
From: Free C. <eb...@ot...> - 2002-01-30 09:35:42
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title></title> </head> <body text="#000000"> <div align="center"> <center> <table cellSpacing="0" cellPadding="0" width="596" bgColor="#000000" border="0"> <tbody> <tr> <td vAlign="top" align="middle" width="590" bgColor="#000000" colSpan="2"> <p align="center"><font color="#FFFFFF"><font face="Webdings" size="6"> </font></font><b><font face="Verdana" size="5" color="#FFFFFF">Need a new Computer system NOW? <br> </font><font face="Verdana" size="5" color="#FF0000">Get one for FREE!! </font></b></p> </td> </tr> <tr> <td vAlign="top" width="590" colSpan="2"> <table height="1" cellSpacing="0" cellPadding="0" width="596" bgColor="black" border="0"> <tbody> <tr> <td><img height="1" width="1"></td> </tr> </tbody> </table> </td> </tr> <tr> <td vAlign="center" align="middle" width="1" bgColor="#00FF00" height="17"> <div align="center" style="width: 1; height: 19"> </div> </td> <td vAlign="center" align="right" width="593" bgColor="#00FF00" height="17"> <div align="center"> <b><font face="Arial" size="2">This offer is limited to the first 100 people who contact me today!</font></b> </div> </td> <tr> <td vAlign="top" align="middle" width="590" bgColor="#b0d8ff" colSpan="2"> <table height="1" cellSpacing="0" cellPadding="0" width="596" bgColor="black" border="0"> <tbody> <tr> <td><img height="1" width="1"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </center> </div> <center> <table height="1" cellSpacing="0" cellPadding="0" width="595" align="center" bgColor="#000000" border="0"> <tbody> <tr> <td vAlign="top" align="middle" bgColor="#000000" height="118" width="441"> <div align="center"> <table cellSpacing="0" cellPadding="0" bgColor="#000000" border="0" width="440"> <tbody> <tr> <td width="37" bgColor="#EEEEEE"> </td> </center> <td vAlign="top" align="middle" bgColor="#EEEEEE" width="731"> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">Hello -<br> <br> Let me <b>i</b>ntroduce myself. I am an entrepreneur who can <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><font size="3"><span style="mso-bidi-font-size: 12.0pt">help </span>you <b>Earn a </b> </font><font size="3"> phenomenal income</font><font size="3"><b>. <font color="#FF0000">STARTING<br> IMMEDIATELY</font>.</b> Does this interest you?</font></p> <p style="margin: 0" align="left">I<b>n just minutes</b> I can show you how to <b>get</b> a <b><font color="#FF0000">FREE </font></b></p> <p style="margin: 0" align="left"><b><font color="#FF0000">Computer</font></b>, PLUS a <b><font color="#FF0000">Rewards Package</font></b> worth over</p> <p style="margin: 0" align="left"><font color="#FF0000"><b>$25,000</b></font>, AND a simple, step-by-step plan to earn</p> <p style="margin: 0" align="left">a <b>phenomenal income</b> giving free Products and</p> <p style="margin: 0" align="left">Services away!! </p> <p style="margin: 0"> </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left">For more information right away, </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><font size="3"> <b> Click Now. </b><br> </font><span style="mso-bidi-font-size: 12.0pt"><font size="3"> <a href="http://www.getafreecomputer.net">http://www.getafreecomputer.net</a> </font></span><font size="3"><br> </font><font size="3"><br> I am <b><font color="#FF0000">serious</font></b> about <b>this opportunity</b>. I work from the</font></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><font size="3"><b>comfort</b> of<span style="mso-spacerun: yes"> </span><span style="mso-bidi-font-size: 12.0pt">my <b>home</b>, with just a phone and computer. <o:p> </o:p> </span></font></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">It took all of <b>30 minutes to set-up</b>. I was provided with <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">Immediate <b><font color="#FF0000">Free Training</font></b>, by a <b>team of experts</b> committed <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">to my <b>success</b>. </o:p><br> <br> If you can follow a <b>simple step by step process</b>, and <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">you have a <b>burning desire to succeed</b>, I will expose <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">you to it like I was.<br> <br> And if you and I agree that you should be a part of <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">our team, I will <b>provide</b> you with <b>full immediate training</b> <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">and <b>advertising assistance</b> on your road to success. <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">That's <b>how</b> we do things here.<br> <br> This is an <b>honest and ethical enterprise</b>, with a proven <o:p> </o:p> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3">roadmap!<br> <br> So, <b><font color="#FF0000">if you are serious</font></b> about making your <b>dreams <o:p> </o:p> </b></font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><span style="mso-bidi-font-size: 12.0pt"><font size="3"><b>come true</b>, <b>Click Now</b>. <br> <a href="http://www.getafreecomputer.net">http://www.getafreecomputer.net</a> </font></span></p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><b>THIS IS A LIMITED TIME OFFER! </b><br> We are offering you a package that includes a </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"><b><font color="#FF0000"> FREE COMPUTER WITH MONITOR</font></b>. </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> We don't stop there. In addition to the <font color="#FF0000"><b> $25,000 <br> Reward Package</b></font>, you also get $700 worth of </p> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> marketing tools including a <b> free web site</b>. <br><br><br> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> <p class="MsoNormal" style="margin-top: 0; margin-bottom: 0" align="left"> <td vAlign="top" align="middle" bgColor="#00FF00" width="80"> </tr> <tr> <td width="767" bgColor="#00FF00" colSpan="2" height="10"> <p align="left"><font size="3"> </font><font size="2"><b><br> TO BE REMOVED FROM THIS LIST PLEASE SEE BELOW:</b></font></p> <p align="left"> If you have been added to this list by mistake and no longer <br> wish to receive email from us, send a email with "<font color="#000000">remove</font>" in <br> the subject line to:<b> </b><a href="mailto:re...@ge..."><br> <font color="#00FF00"> </font><span style="mso-bidi-font-size: 12.0pt"> <font size="3">re...@ge...</font></span></a><span style="mso-bidi-font-size: 12.0pt"><font size="3"> </font></span><br> PLEASE BE SURE TO TYPE ONLY "REMOVE" IN THE <br> <font color="#000000">SUBJECT LINE</font>, OR YOU MAY NOT BE REMOVED AS<br> YOUR REQUEST MAY BE MISSED BY US.</p> <b> </b></td> <td width="99" bgColor="#00FF00" height="10"> </td> </tr> </tbody> </table> </div> </td> <td vAlign="top" align="middle" width="1" bgColor="#000000" height="118"> </td> <td vAlign="top" width="148" bgColor="#000000" height="1" rowSpan="2"> <p align="center"><br><font color="#FFFFFF"><b>Look what else You get for</b> </font><b><font color="#FFFFFF">Free</font></b><font color="#FFFFFF"> <b> In our</b> </font><font color="#FF0000"><b> $25,000 <br> Reward Package </b></font></p> <font color="#FFFFFF" size="2">-Free Global Positioning System - Free Dish Network Satellite System - Free Web TV System -Free Home Security System  - A Family Photo Package And A 35mm Camera - Movie Discounts -Restaurant 2 For 1 Discount Book - Elegant Dining At Half Price Book - Guaranteed! 2 Unsecured Credit Cards - $1500 Grocery Coupon Savings Book - 35% Off Any Music CD's, DVD's Or Videos -TAB Wholesale Network. Up To 70% Off Of Over 800 Retail Products -Automotive Discounts -1,001 Free Things You Can Get On The Net - Discount Health Services </font><font size="2" color="#FFFFFF">- Deep Discounts On Caribbean Cruises - Free Mini Vacations - Discounts 2 For 1 Sand & Sea Cruises</font> <font size="2" color="#FFFFFF">4Day/3Night Fabulous Florida</font> <font size="2" color="#FFFFFF">Getaways</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">Free Airfare To Hawaii for 2 Free Airfare For 2 To Orlando</font> <font color="#FFFFFF">-</font><font size="2" color="#FFFFFF">20 3day/2night Mini Vacations</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">4 Travel Fun Books Filled With Discounts</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">America At 50% to 80% Off 8,000 Motels</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">$2,000 In Airline Ticket Discounts</font> <font color="#FFFFFF">-</font><font size="2" color="#FFFFFF">Discount Legal Service</font><font color="#FFFFFF">-</font><font size="2" color="#FFFFFF">Discount Pet Insurance & Care Service</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">National Golf Network 50% Off Greens Fees </font><font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">Extreme Sports Discounts of 50%</font> <font color="#FFFFFF">-</font><font size="2" color="#FFFFFF">Discount Tickets At Major Theme Parks</font> <font color="#FFFFFF">- </font><font size="2" color="#FFFFFF">10% Off Cruise America RV Rentals</font> <p align="center"><b><font color="#FFFFFF"><font size="3">This Entire $25,000 Package can be yours Free if You Act Fast!!</font></font></b></p> </td> </tr> </tbody> </table> <div align="center"> <center> <table height="1" cellSpacing="0" cellPadding="0" width="595" bgColor="#000000" border="0"> <tbody> <tr> <td vAlign="center" align="middle" width="589" bgColor="#000000" height="1"><font face="Arial" color="#000000" size="1">a</font></td> </tr> </tbody> </table> </center> </div> </body> </html> |
From: NIIBE Y. <gn...@m1...> - 2002-01-25 04:43:22
|
The file init/main.c has no difference (it's moved to init/do_mounts.c) to mainline version. End of last year, I've ignored the difference of include/linux/highmem.h, but it was correctly introduced in mainline (the flush_dcache_page call), and has no (potential) difference now too. I'll remove them from the repository. The file drivers/block/rd.c will remain for a while, as I don't know my removal of flushing the cache is OK or not. -- |
From: Jordan P. <jo...@hi...> - 2002-01-25 03:50:40
|
Great, We download the latest toolchain from http://www.sh-linux.org . It = successfully builds the Qt/embedded v2.3.1 in dynamic link and works = fine in our R2 (SH7727) platform. Thanks Jordan -----Original Message----- From: SUGIOKA Toshinobu [mailto:su...@it...] Sent: Thursday, January 24, 2002 3:23 PM To: lin...@m1...; lin...@li... Subject: [linux-sh:02123] Re: New GCC patch At 21:21 02/01/23 +0200, Matan <ma...@sv...> wrote: >On Wed, 23 Jan 2002, Jordan Pan wrote: > >> Again I still face problem in the C++ dynamic link. I follow the >> patch for GCC and the new glibc 2.2.5(pre) build for Qt/embedded. It >> seems the compilation stage is passed, but fail in the runtime. Same >> problem is cleared when we link as static. > > >Might this be related to a c++ dynamic link problem I see? > >The attached file shows a simple c++ program that works ok when linked >statically, but segfaults when linked dynamically. The dynamic version >does work correctly on x86 processor. This problem seems to be related on struct return from shared library. It is not only c++ specific, but also occurs on c program. I have uploaded updated binutils RPM packages. Thanks Kojima-san for the = patch. http://www.sh-linux.org/rpm/RPMS/i386/Laser5-6.4/binutils-sh-linux-2.11.2= -4.i386.rpm http://www.sh-linux.org/rpm/RPMS/i386/RedHat7.1/binutils-sh-linux-2.11.2-= 4.i386.rpm http://www.sh-linux.org/rpm/SRPMS/binutils-2.11.2-4.src.rpm Please retry with them. ---- SUGIOKA Toshinobu |
From: NIIBE Y. <gn...@m1...> - 2002-01-25 02:57:49
|
NIIBE Yutaka wrote: > OK, Linus got our update, and here is sync to 2.5.3-pre5. > I'll soon update following two files: > arch/sh/Config.help > drivers/net/Config.help I attached the change at end of this mail. M. R. Brown wrote: > Wow, has CML2 arrived already? We'd better get our act together. No, not yet. It's just a "divide-and-concur" of Configure.help. Yes, it's better to follow CML2. If we can put enough constraints to CML2 rules, we don't need to gather default config for each variant of machines. > Paul and > I will try to finish the reorganization this weekend so that we can start > getting things ready to merge with HEAD. We still have the new PCI backend > and machvec cleaning to do, we might wait until the tree is switched over > before pushing those changes (unless you have other suggestions?). I think that it's better to wait, well, a week or so, after reorganization before introducing new things. * arch/sh/Config.help (CONFIG_CPU_SUBTYPE_SH7751, CONFIG_CPU_SUBTYPE_ST40STB1) Added subtypes. (CONFIG_SH_SH2000): Added machine. (CONFIG_SH_7751_SOLUTION_ENGINE,CONFIG_SH_CQREEK,CONFIG_SH_DMIDA, CONFIG_SH_DREAMCAST,CONFIG_SH_EC3104,CONFIG_SH_GENERIC, CONFIG_SH_HP620,CONFIG_SH_HP680,CONFIG_SH_HP690, CONFIG_SH_OVERDRIVE,CONFIG_SH_SOLUTION_ENGINE,CONFIG_SH_UNKNOWN): Added entries lost in transition to divided Config.help. * drivers/net/Config.help (CONFIG_8139TOO_DREAMCAST): Added. Index: arch/sh/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/Config.help,v retrieving revision 1.1 diff -u -3 -p -r1.1 Config.help --- arch/sh/Config.help 2002/01/25 02:07:59 1.1 +++ arch/sh/Config.help 2002/01/25 02:48:17 @@ -4,6 +4,122 @@ 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 @@ -685,6 +801,12 @@ CONFIG_CPU_SUBTYPE_SH7709 CONFIG_CPU_SUBTYPE_SH7750 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. + +CONFIG_CPU_SUBTYPE_SH7751 + Select SH7750 if you have a 166 Mhz SH-4 HD6417751 CPU. + +CONFIG_CPU_SUBTYPE_ST40STB1 + Select ST40STB1 if you have a ST40STB1 CPU. CONFIG_MEMORY_START Computers built with Hitachi SuperH processors always Index: drivers/net/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.help,v retrieving revision 1.1 diff -u -3 -p -r1.1 Config.help --- drivers/net/Config.help 2002/01/25 02:07:59 1.1 +++ drivers/net/Config.help 2002/01/25 02:48:18 @@ -674,6 +674,12 @@ CONFIG_8139TOO_8129 instead of an internal one. Disabling this option will save some memory by making the code size smaller. If unsure, say Y. +Support for Dreamcast Broad Band Adaptor +CONFIG_8139TOO_DREAMCAST + This enables support for the SEGA Broad Band Adaptor for Dreamcast. + It uses 16KB buffer and doesn't support mapping main memory to DMA. + If unsure, say N. + CONFIG_SIS900 This is a driver for the Fast Ethernet PCI network cards based on the SiS 900 and SiS 7016 chips. The SiS 900 core is also embedded in |
From: M. R. B. <mr...@0x...> - 2002-01-25 02:37:27
|
* NIIBE Yutaka <gn...@m1...> on Fri, Jan 25, 2002: > OK, Linus got our update, and here is sync to 2.5.3-pre5. > I'll soon update following two files: > arch/sh/Config.help > drivers/net/Config.help >=20 Wow, has CML2 arrived already? We'd better get our act together. Paul and I will try to finish the reorganization this weekend so that we can start getting things ready to merge with HEAD. We still have the new PCI backend and machvec cleaning to do, we might wait until the tree is switched over before pushing those changes (unless you have other suggestions?). M. R. |
From: NIIBE Y. <gn...@m1...> - 2002-01-25 02:07:38
|
OK, Linus got our update, and here is sync to 2.5.3-pre5. I'll soon update following two files: arch/sh/Config.help drivers/net/Config.help 2002-01-25 NIIBE Yutaka <gn...@m1...> Updated to 2.5.3-pre5. * Documentation/Configure.help: Removed. * arch/sh/Config.help: New file. * drivers/cdrom/Config.help: New file. * drivers/char/Config.help: New file. * drivers/char/joystick/Config.help: New file. * drivers/mtd/Config.help: New file. * drivers/mtd/maps/Config.help: New file. * drivers/net/Config.help: New file. * drivers/net/8139too.c: Include changes from mainline (2.5.3-pre5). * arch/sh/config.in: Include changes from mainline (2.5.3-pre5). * Makefile: Version 2.5.3-pre5. * AGAINST-2.5.3-pre5: New file. * AGAINST-2.5.3-pre4: Removed. -- |
From: NIIBE Y. <gn...@m1...> - 2002-01-25 00:41:51
|
Current 2.5.3-pre5 (or our CVS) doesn't support FPU usage in kernel. Once I've tried to support it (and I think it worked well at that time), but eventually, I gave up. You can check, say, 2.4.0 implementation, if you really have interests. It goes like this: We have FPU lazy switching mechanism. Wnen kernel asks FPU use, we pretend as if the task "init" use FPU. On Kernel -> Kernel transition, we save FPU registers on kernel stack. This works well _provided_ the use of FPU in kernel can be seen as if "init" use FPU. However, the kernel thread softirqd has been introduced in 2.4.X. With it, the bottom-half of the driver is invoked by that thread. If bottom-half uses FPU, it results quite a mess, because it breaks the condition (of it's "init" who use FPU). -- |
From: David W. <dw...@in...> - 2002-01-24 23:33:59
|
If you think you want FP in the kernel, you're almost certainly approaching the problem wrong. Why can't you move the FP tasks to userspace? -- dwmw2 |
From: Pete L. <pet...@st...> - 2002-01-24 16:58:53
|
Hi all, I have a question concerning floating point support in the Linux kernel for SH4 processors. My situation is this, I am trying to port an x86 driver to an SH4 HARP board. The x86 driver makes extensive use of floating point math, which I know is not supposed to be used in Linux Kernel mode, but I do not have an alternative approach to avoid making use of floating point. My question is this, is there a version of kernel, or the tool chain that is more likely to support the usage of floating point in the kernel? Alternatively, is it possible to say definitively that floating point math will or will not work in a kernel mode driver? Thank you for your time, it is much appreciated, - pete |
From: NIIBE Y. <gn...@m1...> - 2002-01-24 11:50:04
|
Here's the changes against linux-2.5.3-pre4, I'm about to send to Linus. -------------------------- All are SuperH specific. Improvement: include/asm-sh/pgtable.h: Implement pgprot_noncached (Takashi Yoshii) drivers/char/shwdt.c: SH Watchdog timer update (Paul Mundt) arch/sh/kernel/entry.S arch/sh/kernel/fpu.c arch/sh/kernel/head.S arch/sh/kernel/processor.h FPU handling change (Kazumoto Kojima, NIIBE Yutaka) Bug fix: arch/sh/kernel/traps.c: Unaligned access (Jeremy Siegel) arch/sh/mm/fault.c: null current->mm (Jeremy Siegel) arch/sh/kernel/rtc.c HW-bug workaround of RTC (SUGIOKA Toshinobu) Follow up (NIIBE Yutaka): asm-sh/mmu_context.h: sched_find_first_zero_bit() implementation. asm-sh/scatterlist.h: Add members. arch/sh/mm/fault.c: Use of yield(). arch/sh/kernel/irq.c: Include <linux/mm.h> arch/sh/kernel/process.c: Include <linux/mm.h> and <linux/a.out.h> Don't call init_idle from cpu_idle. Don't set ->nice. arch/sh/kernel/setup.c: kdev_t change for EARLY-printk support. arch/sh/kernel/signal.c: Include <linux/tty.h>. diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/entry.S linux/arch/sh/kernel/entry.S --- linux-2.5.3-pre4/arch/sh/kernel/entry.S Tue Jan 8 14:23:13 2002 +++ linux/arch/sh/kernel/entry.S Sat Dec 29 15:50:38 2001 @@ -66,7 +66,6 @@ need_resched = 20 tsk_ptrace = 24 PT_TRACESYS = 0x00000002 -PF_USEDFPU = 0x00100000 ENOSYS = 38 EINVAL = 22 @@ -567,12 +566,6 @@ __irq_stat: .align 2 restore_all: -#if defined(__SH4__) - mov.l __fpu_prepare_fd, r0 - jsr @r0 - stc sr, r4 -#endif - ! mov.l @r15+, r0 mov.l @r15+, r1 mov.l @r15+, r2 @@ -585,7 +578,7 @@ restore_all: stc sr, r8 mov.l __blrb_flags, r9 ! BL =1, RB=1 or r9, r8 - ldc r8, sr ! here, change the register bank + ldc r8, sr ! here, change the register bank ! mov.l @r15+, r8 mov.l @r15+, r9 @@ -594,25 +587,25 @@ restore_all: mov.l @r15+, r12 mov.l @r15+, r13 mov.l @r15+, r14 - mov.l @r15+, k4 ! original stack pointer + mov.l @r15+, k4 ! original stack pointer ldc.l @r15+, spc lds.l @r15+, pr - mov.l @r15+, k3 ! original SR + mov.l @r15+, k3 ! original SR ldc.l @r15+, gbr lds.l @r15+, mach lds.l @r15+, macl - add #4, r15 ! Skip syscall number + add #4, r15 ! Skip syscall number ! ! Calculate new SR value - mov k3, k2 ! original SR value + mov k3, k2 ! original SR value mov.l 1f, k1 stc sr, k0 - and k1, k0 ! Get current FD-bit + and k1, k0 ! Get current FD-bit mov.l 2f, k1 - and k1, k2 ! Mask orignal SR value - or k0, k2 ! Inherit current FD-bit + and k1, k2 ! Mask orignal SR value + or k0, k2 ! Inherit current FD-bit ! - mov k3, k0 ! Calculate IMASK-bits + mov k3, k0 ! Calculate IMASK-bits shlr2 k0 and #0x3c, k0 cmp/eq #0x3c, k0 @@ -620,69 +613,15 @@ restore_all: shll2 k0 mov g_imask, k0 ! -7: or k0, k2 ! Set the IMASK-bits +7: or k0, k2 ! Set the IMASK-bits ldc k2, ssr ! -#if defined(__SH4__) - shll k2 - shll k2 - bf 9f ! user mode - /* Kernel to kernel transition */ - mov.l 1f, k1 - tst k1, k3 - bf 9f ! it hadn't FPU - ! Kernel to kernel and FPU was used - ! There's the case we don't get FPU now - stc sr, k2 - tst k1, k2 - bt 8f - ! We need to grab FPU here - xor k1, k2 - ldc k2, sr ! Grab FPU - mov.l __init_task_flags, k1 - mov.l @k1, k2 - mov.l __PF_USEDFPU, k0 - or k0, k2 - mov.l k2, @k1 ! Set init_task.flags |= PF_USEDFPU - ! - ! Restoring FPU... - ! -8: mov.l 3f, k1 - lds k1, fpscr - fmov.s @r15+, fr0 - fmov.s @r15+, fr1 - fmov.s @r15+, fr2 - fmov.s @r15+, fr3 - fmov.s @r15+, fr4 - fmov.s @r15+, fr5 - fmov.s @r15+, fr6 - fmov.s @r15+, fr7 - fmov.s @r15+, fr8 - fmov.s @r15+, fr9 - fmov.s @r15+, fr10 - fmov.s @r15+, fr11 - fmov.s @r15+, fr12 - fmov.s @r15+, fr13 - fmov.s @r15+, fr14 - fmov.s @r15+, fr15 - lds.l @r15+, fpscr - lds.l @r15+, fpul -9: -#endif mov k4, r15 rte nop .align 2 __blrb_flags: .long 0x30000000 -#if defined(__SH4__) -__fpu_prepare_fd: - .long SYMBOL_NAME(fpu_prepare_fd) -__init_task_flags: - .long SYMBOL_NAME(init_task_union)+4 -__PF_USEDFPU: - .long PF_USEDFPU -#endif 1: .long 0x00008000 ! FD 2: .long 0xffff7f0f ! ~(IMASK+FD) 3: .long 0x00080000 ! SZ=0, PR=1 @@ -732,61 +671,21 @@ handle_exception: ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), ! save all registers onto stack. ! - stc ssr, k0 ! from kernel space? - shll k0 ! Check MD bit (bit30) by shifting it into the T bit - shll k0 -#if defined(__SH4__) - bf/s 8f ! it's from user to kernel transition - mov r15, k0 ! save original stack to k0 - /* It's a kernel to kernel transition. */ - /* Is the FPU disabled? */ - mov.l 2f, k1 - stc ssr, k0 - tst k1, k0 - mov.l 4f, k1 - bf/s 9f ! FPU is not enabled, no need to save it - mov r15, k0 ! save original stack to k0 - ! FPU is enabled, save it - ! /* XXX: Need to save another bank of FPU if all FPU feature is used */ - ! /* Currently it's not the case for GCC (only udivsi3_i4, divsi3_i4) */ - sts.l fpul, @-r15 - sts.l fpscr, @-r15 - mov.l 6f, k1 - lds k1, fpscr - mov.l 3f, k1 - fmov.s fr15, @-r15 - fmov.s fr14, @-r15 - fmov.s fr13, @-r15 - fmov.s fr12, @-r15 - fmov.s fr11, @-r15 - fmov.s fr10, @-r15 - fmov.s fr9, @-r15 - fmov.s fr8, @-r15 - fmov.s fr7, @-r15 - fmov.s fr6, @-r15 - fmov.s fr5, @-r15 - fmov.s fr4, @-r15 - fmov.s fr3, @-r15 - fmov.s fr2, @-r15 - fmov.s fr1, @-r15 - bra 9f - fmov.s fr0, @-r15 -#else - mov.l 3f, k1 - bt/s 9f ! it's a kernel to kernel transition, and skip the FPU save. - mov r15, k0 ! save original stack to k0 anyway -#endif -8: /* User space to kernel */ + 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. + mov r15, k0 ! save original stack to k0 + /* User space to kernel */ mov #0x20, k1 - shll8 k1 ! k1 <= 8192 == THREAD_SIZE + shll8 k1 ! k1 <= 8192 == THREAD_SIZE add current, k1 mov k1, r15 ! change to kernel stack ! - mov.l 4f, k1 ! let kernel release FPU -9: ! Save the user registers on the stack. - ! At this point, k1 should have been set to the new SR value - mov #-1, k4 - mov.l k4, @-r15 ! syscall_nr (default: -1) +9: mov #-1, k4 + mov.l 3f, k1 + ! Save the user registers on the stack. + mov.l k4, @-r15 ! syscall_nr (default: -1) ! sts.l macl, @-r15 sts.l mach, @-r15 @@ -806,11 +705,11 @@ handle_exception: mov.l r9, @-r15 mov.l r8, @-r15 ! - stc sr, r8 ! Back to normal register bank, and - or k1, r8 ! Block all interrupts, may release FPU + stc sr, r8 ! Back to normal register bank, and + or k1, r8 ! Block all interrupts mov.l 5f, k1 - and k1, r8 ! ... - ldc r8, sr ! ...changed here. + and k1, r8 ! ... + ldc r8, sr ! ...changed here. ! mov.l r7, @-r15 mov.l r6, @-r15 @@ -831,9 +730,7 @@ handle_exception: nop .align 2 1: .long SYMBOL_NAME(exception_handling_table) -2: .long 0x00008000 ! FD=1 3: .long 0x000000f0 ! FD=0, IMASK=15 -4: .long 0x000080f0 ! FD=1, IMASK=15 5: .long 0xcfffffff ! RB=0, BL=0 6: .long 0x00080000 ! SZ=0, PR=1 diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/fpu.c linux/arch/sh/kernel/fpu.c --- linux-2.5.3-pre4/arch/sh/kernel/fpu.c Tue Jan 8 14:23:13 2002 +++ linux/arch/sh/kernel/fpu.c Sat Dec 29 15:50:38 2001 @@ -18,6 +18,10 @@ #include <asm/processor.h> #include <asm/io.h> +/* + * Save FPU registers onto task structure. + * Assume called with FPU enabled (SR.FD=0). + */ void save_fpu(struct task_struct *tsk) { @@ -118,7 +122,8 @@ restore_fpu(struct task_struct *tsk) * double precission represents signaling NANS. */ -void fpu_init(void) +static void +fpu_init(void) { asm volatile("lds %0, fpul\n\t" "lds %1, fpscr\n\t" @@ -160,15 +165,125 @@ void fpu_init(void) : "r" (0), "r" (FPSCR_INIT)); } +/** + * denormal_to_double - Given denormalized float number, + * store double float + * + * @fpu: Pointer to sh_fpu_hard structure + * @n: Index to FP register + */ +static void +denormal_to_double (struct sh_fpu_hard_struct *fpu, int n) +{ + unsigned long du, dl; + unsigned long x = fpu->fpul; + int exp = 1023 - 126; + + if (x != 0 && (x & 0x7f800000) == 0) { + du = (x & 0x80000000); + while ((x & 0x00800000) == 0) { + x <<= 1; + exp--; + } + x &= 0x007fffff; + du |= (exp << 20) | (x >> 3); + dl = x << 29; + + fpu->fp_regs[n] = du; + fpu->fp_regs[n+1] = dl; + } +} + +/** + * ieee_fpe_handler - Handle denormalized number exception + * + * @regs: Pointer to register structure + * + * Returns 1 when it's handled (should not cause exception). + */ +static int +ieee_fpe_handler (struct pt_regs *regs) +{ + unsigned short insn = *(unsigned short *) regs->pc; + unsigned short finsn; + unsigned long nextpc; + int nib[4] = { + (insn >> 12) & 0xf, + (insn >> 8) & 0xf, + (insn >> 4) & 0xf, + insn & 0xf}; + + if (nib[0] == 0xb || + (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */ + regs->pr = regs->pc + 4; + + if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */ + nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */ + if (regs->sr & 1) + nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); + else + nextpc = regs->pc + 4; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */ + if (regs->sr & 1) + nextpc = regs->pc + 4; + else + nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x4 && nib[3] == 0xb && + (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */ + nextpc = regs->regs[nib[1]]; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x0 && nib[3] == 0x3 && + (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */ + nextpc = regs->pc + 4 + regs->regs[nib[1]]; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (insn == 0x000b) { /* rts */ + nextpc = regs->pr; + finsn = *(unsigned short *) (regs->pc + 2); + } else { + nextpc = regs->pc + 2; + finsn = insn; + } + + if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */ + struct task_struct *tsk = current; + + save_fpu(tsk); + if ((tsk->thread.fpu.hard.fpscr & (1 << 17))) { + /* FPU error */ + denormal_to_double (&tsk->thread.fpu.hard, + (finsn >> 8) & 0xf); + tsk->thread.fpu.hard.fpscr &= + ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); + grab_fpu(); + restore_fpu(tsk); + tsk->flags |= PF_USEDFPU; + } else { + tsk->thread.trap_no = 11; + tsk->thread.error_code = 0; + force_sig(SIGFPE, tsk); + } + + regs->pc = nextpc; + return 1; + } + + return 0; +} + asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs regs) { struct task_struct *tsk = current; - regs.pc += 2; + if (ieee_fpe_handler (®s)) + return; - grab_fpu(); + regs.pc += 2; save_fpu(tsk); tsk->thread.trap_no = 11; tsk->thread.error_code = 0; @@ -181,102 +296,12 @@ do_fpu_state_restore(unsigned long r4, u { struct task_struct *tsk = current; - if (!user_mode(®s)) { - if (tsk != &init_task) { - unlazy_fpu(tsk); - } - tsk = &init_task; - if (tsk->flags & PF_USEDFPU) { - /* - * This weird situation can be occurred. - * - * There's race condition in __cli: - * - * (1) SR --> register - * (2) Set IMASK of register - * (3) SR <-- register - * - * Between (1) and (2), or (2) and (3) getting - * interrupt, and interrupt handler (or - * softirq) may use FPU. - * - * Then, SR.FD is overwritten by (3). - * - * This results init_task.PF_USEDFPU is on, - * with SR.FD == 1. - * - */ - release_fpu(); - return; - } - } - grab_fpu(); - if (tsk->used_math) { - /* Using the FPU again. */ - restore_fpu(tsk); - } else { - /* First time FPU user. */ - fpu_init(); - tsk->used_math = 1; - } - tsk->flags |= PF_USEDFPU; - release_fpu(); -} - -/* - * Change current FD flag to set FD flag back to exception - */ -asmlinkage void -fpu_prepare_fd(unsigned long sr, unsigned long r5, unsigned long r6, - unsigned long r7, struct pt_regs regs) -{ - __cli(); if (!user_mode(®s)) { - if (init_task.flags & PF_USEDFPU) - grab_fpu(); - else { - if (!(sr & SR_FD)) { - BUG(); - release_fpu(); - } - } + printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); return; } - if (sr & SR_FD) { /* Kernel doesn't grab FPU */ - if (current->flags & PF_USEDFPU) - grab_fpu(); - else { - if (init_task.flags & PF_USEDFPU) { - /* - * This weird situation can be occurred. - * See the comment in do_fpu_state_restore. - */ - grab_fpu(); - save_fpu(&init_task); - } - } - } else { - if (init_task.flags & PF_USEDFPU) - save_fpu(&init_task); - else { - BUG(); - release_fpu(); - } - } -} - -/* Short cut for the FPU exception */ -asmlinkage void -enable_fpu_in_danger(void) -{ - struct task_struct *tsk = current; - - if (tsk != &init_task) - unlazy_fpu(tsk); - - tsk = &init_task; if (tsk->used_math) { /* Using the FPU again. */ restore_fpu(tsk); diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/head.S linux/arch/sh/kernel/head.S --- linux-2.5.3-pre4/arch/sh/kernel/head.S Tue Jan 8 14:23:13 2002 +++ linux/arch/sh/kernel/head.S Sat Dec 29 15:50:38 2001 @@ -50,12 +50,6 @@ ENTRY(_stext) sub r1, r0 ! ldc r0, r7_bank ! ... and init_task ! -#if defined(__SH4__) - ! Initialize fpu - mov.l 7f, r0 - jsr @r0 - nop -#endif ! Enable cache mov.l 6f, r0 jsr @r0 @@ -74,12 +68,9 @@ ENTRY(_stext) nop .balign 4 -1: .long 0x400000F0 ! MD=1, RB=0, BL=0, FD=0, IMASK=0xF +1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF 2: .long SYMBOL_NAME(stack) 3: .long SYMBOL_NAME(__bss_start) 4: .long SYMBOL_NAME(_end) 5: .long SYMBOL_NAME(start_kernel) 6: .long SYMBOL_NAME(cache_init) -#if defined(__SH4__) -7: .long SYMBOL_NAME(fpu_init) -#endif diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/irq.c linux/arch/sh/kernel/irq.c --- linux-2.5.3-pre4/arch/sh/kernel/irq.c Tue Jan 8 11:22:54 2002 +++ linux/arch/sh/kernel/irq.c Tue Jan 8 15:38:26 2002 @@ -22,6 +22,7 @@ #include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/timex.h> +#include <linux/mm.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/smp.h> diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/process.c linux/arch/sh/kernel/process.c --- linux-2.5.3-pre4/arch/sh/kernel/process.c Thu Jan 24 20:27:10 2002 +++ linux/arch/sh/kernel/process.c Thu Jan 24 20:21:40 2002 @@ -12,7 +12,9 @@ */ #include <linux/unistd.h> +#include <linux/mm.h> #include <linux/slab.h> +#include <linux/a.out.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -39,9 +41,6 @@ void enable_hlt(void) void cpu_idle(void *unused) { /* endless idle loop with no priority at all */ - init_idle(); - current->nice = 20; - while (1) { if (hlt_counter) { if (need_resched()) diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/rtc.c linux/arch/sh/kernel/rtc.c --- linux-2.5.3-pre4/arch/sh/kernel/rtc.c Tue Jan 8 14:23:13 2002 +++ linux/arch/sh/kernel/rtc.c Wed Dec 12 19:14:20 2001 @@ -46,7 +46,7 @@ void sh_rtc_gettimeofday(struct timeval } while ((ctrl_inb(RCR1) & RCR1_CF) != 0); #if RTC_BIT_INVERTED != 0 - /* Work around to avoid reading correct value. */ + /* Work around to avoid reading incorrect value. */ if (sec128 == RTC_BIT_INVERTED) { schedule_timeout(1); goto again; @@ -81,12 +81,18 @@ void sh_rtc_gettimeofday(struct timeval goto again; } +#if RTC_BIT_INVERTED != 0 + if ((sec128 & RTC_BIT_INVERTED)) + sec--; +#endif + tv->tv_sec = mktime(yr100 * 100 + yr, mon, day, hr, min, sec); - tv->tv_usec = ((sec128 ^ RTC_BIT_INVERTED) * 1000000) / 128; + tv->tv_usec = (sec128 * 1000000) / 128; } -static int set_rtc_time(unsigned long nowtime) +int sh_rtc_settimeofday(const struct timeval *tv) { + unsigned long nowtime = tv->tv_sec; int retval = 0; int real_seconds, real_minutes, cmos_minutes; @@ -122,13 +128,4 @@ static int set_rtc_time(unsigned long no ctrl_outb(RCR2_RTCEN|RCR2_START, RCR2); /* Start RTC */ return retval; -} - -int sh_rtc_settimeofday(const struct timeval *tv) -{ -#if RTC_BIT_INVERTED != 0 - /* This is not accurate, but better than nothing. */ - schedule_timeout(HZ/2); -#endif - return set_rtc_time(tv->tv_sec); } diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/setup.c linux/arch/sh/kernel/setup.c --- linux-2.5.3-pre4/arch/sh/kernel/setup.c Tue Jan 8 12:24:43 2002 +++ linux/arch/sh/kernel/setup.c Tue Jan 8 15:49:05 2002 @@ -142,9 +142,8 @@ static void sh_console_write(struct cons static kdev_t sh_console_device(struct console *c) { - /* TODO: this is totally bogus */ - /* return MKDEV(SCI_MAJOR, SCI_MINOR_START + c->index); */ - return 0; + /* /dev/null */ + return mk_kdev(MEM_MAJOR, 3); } /* diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/signal.c linux/arch/sh/kernel/signal.c --- linux-2.5.3-pre4/arch/sh/kernel/signal.c Tue Oct 16 05:36:48 2001 +++ linux/arch/sh/kernel/signal.c Thu Jan 24 20:24:16 2002 @@ -22,6 +22,8 @@ #include <linux/unistd.h> #include <linux/stddef.h> #include <linux/personality.h> +#include <linux/tty.h> + #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/pgtable.h> diff -ruN3p linux-2.5.3-pre4/arch/sh/kernel/traps.c linux/arch/sh/kernel/traps.c --- linux-2.5.3-pre4/arch/sh/kernel/traps.c Tue Jan 8 14:23:13 2002 +++ linux/arch/sh/kernel/traps.c Fri Dec 28 11:46:10 2001 @@ -300,10 +300,19 @@ static inline int handle_unaligned_delay /* * handle an instruction that does an unaligned memory access * - have to be careful of branch delay-slot instructions that fault + * SH3: * - if the branch would be taken PC points to the branch * - if the branch would not be taken, PC points to delay-slot + * SH4: + * - PC always points to delayed branch * - return 0 if handled, -EFAULT if failed (may not return if in kernel) */ + +/* Macros to determine offset from current PC for branch instructions */ +/* Explicit type coercion is used to force sign extension where needed */ +#define SH_PC_8BIT_OFFSET(instr) ((((signed char)(instr))*2) + 4) +#define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4) + static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) { u_int rm; @@ -392,15 +401,27 @@ static int handle_unaligned_access(u16 i break; case 0x0F00: /* bf/s lab */ ret = handle_unaligned_delayslot(regs); - if (ret==0) - regs->pc += (instruction&0x00FF)*2 + 4; + if (ret==0) { +#if defined(__SH4__) + if ((regs->sr & 0x00000001) != 0) + regs->pc += 4; /* next after slot */ + else +#endif + regs->pc += SH_PC_8BIT_OFFSET(instruction); + } break; case 0x0900: /* bt lab - no delayslot */ break; case 0x0D00: /* bt/s lab */ ret = handle_unaligned_delayslot(regs); - if (ret==0) - regs->pc += (instruction&0x00FF)*2 + 4; + if (ret==0) { +#if defined(__SH4__) + if ((regs->sr & 0x00000001) == 0) + regs->pc += 4; /* next after slot */ + else +#endif + regs->pc += SH_PC_8BIT_OFFSET(instruction); + } break; } break; @@ -408,14 +429,14 @@ static int handle_unaligned_access(u16 i case 0xA000: /* bra label */ ret = handle_unaligned_delayslot(regs); if (ret==0) - regs->pc += (instruction&0x0FFF)*2 + 4; + regs->pc += SH_PC_12BIT_OFFSET(instruction); break; case 0xB000: /* bsr label */ ret = handle_unaligned_delayslot(regs); if (ret==0) { regs->pr = regs->pc + 4; - regs->pc += (instruction&0x0FFF)*2 + 4; + regs->pc += SH_PC_12BIT_OFFSET(instruction); } break; } diff -ruN3p linux-2.5.3-pre4/arch/sh/mm/fault.c linux/arch/sh/mm/fault.c --- linux-2.5.3-pre4/arch/sh/mm/fault.c Thu Jan 24 20:27:10 2002 +++ linux/arch/sh/mm/fault.c Thu Jan 24 19:50:06 2002 @@ -207,8 +207,7 @@ no_context: out_of_memory: up_read(&mm->mmap_sem); if (current->pid == 1) { - current->policy |= SCHED_YIELD; - schedule(); + yield(); down_read(&mm->mmap_sem); goto survive; } @@ -248,6 +247,8 @@ asmlinkage int __do_page_fault(struct pt if (address >= P3SEG && address < P4SEG) dir = pgd_offset_k(address); else if (address >= TASK_SIZE) + return 1; + else if (!current->mm) return 1; else dir = pgd_offset(current->mm, address); diff -ruN3p linux-2.5.3-pre4/drivers/char/shwdt.c linux/drivers/char/shwdt.c --- linux-2.5.3-pre4/drivers/char/shwdt.c Tue Jan 8 14:23:13 2002 +++ linux/drivers/char/shwdt.c Tue Jan 8 13:13:00 2002 @@ -19,7 +19,6 @@ #include <linux/watchdog.h> #include <linux/reboot.h> #include <linux/notifier.h> -#include <linux/smp_lock.h> #include <linux/ioport.h> #include <asm/io.h> @@ -47,18 +46,47 @@ #define WTCSR_CKS1 0x02 #define WTCSR_CKS0 0x01 -#define WTCSR_CKS 0x07 -#define WTCSR_CKS_1 0x00 -#define WTCSR_CKS_4 0x01 -#define WTCSR_CKS_16 0x02 -#define WTCSR_CKS_32 0x03 -#define WTCSR_CKS_64 0x04 -#define WTCSR_CKS_256 0x05 -#define WTCSR_CKS_1024 0x06 +/* + * CKS0-2 supports a number of clock division ratios. At the time the watchdog + * is enabled, it defaults to a 41 usec overflow period .. we overload this to + * something a little more reasonable, and really can't deal with anything + * lower than WTCSR_CKS_1024, else we drop back into the usec range. + * + * Clock Division Ratio Overflow Period + * -------------------------------------------- + * 1/32 (initial value) 41 usecs + * 1/64 82 usecs + * 1/128 164 usecs + * 1/256 328 usecs + * 1/512 656 usecs + * 1/1024 1.31 msecs + * 1/2048 2.62 msecs + * 1/4096 5.25 msecs + */ +#define WTCSR_CKS_32 0x00 +#define WTCSR_CKS_64 0x01 +#define WTCSR_CKS_128 0x02 +#define WTCSR_CKS_256 0x03 +#define WTCSR_CKS_512 0x04 +#define WTCSR_CKS_1024 0x05 +#define WTCSR_CKS_2048 0x06 #define WTCSR_CKS_4096 0x07 -static int sh_is_open = 0; +/* + * Default clock division ratio is 5.25 msecs. Overload this at module load + * time. Any value not in the msec range will default to a timeout of one + * jiffy, which exceeds the usec overflow periods. + */ +static int clock_division_ratio = WTCSR_CKS_4096; + +#define msecs_to_jiffies(msecs) (jiffies + ((HZ * msecs + 999) / 1000)) +#define next_ping_period(cks) msecs_to_jiffies(cks - 4) +#define user_ping_period(cks) (next_ping_period(cks) * 10) + +static unsigned long sh_is_open = 0; static struct watchdog_info sh_wdt_info; +static struct timer_list timer; +static unsigned long next_heartbeat; /** * sh_wdt_write_cnt - Write to Counter @@ -93,6 +121,10 @@ static void sh_wdt_write_csr(__u8 val) */ static void sh_wdt_start(void) { + timer.expires = next_ping_period(clock_division_ratio); + next_heartbeat = user_ping_period(clock_division_ratio); + add_timer(&timer); + sh_wdt_write_csr(WTCSR_WT | WTCSR_CKS_4096); sh_wdt_write_cnt(0); sh_wdt_write_csr((ctrl_inb(WTCSR) | WTCSR_TME)); @@ -105,6 +137,8 @@ static void sh_wdt_start(void) */ static void sh_wdt_stop(void) { + del_timer(&timer); + sh_wdt_write_csr((ctrl_inb(WTCSR) & ~WTCSR_TME)); } @@ -117,8 +151,13 @@ static void sh_wdt_stop(void) */ static void sh_wdt_ping(unsigned long data) { - sh_wdt_write_csr((ctrl_inb(WTCSR) & ~WTCSR_IOVF)); - sh_wdt_write_cnt(0); + if (time_before(jiffies, next_heartbeat)) { + sh_wdt_write_csr((ctrl_inb(WTCSR) & ~WTCSR_IOVF)); + sh_wdt_write_cnt(0); + + timer.expires = next_ping_period(clock_division_ratio); + add_timer(&timer); + } } /** @@ -133,14 +172,12 @@ static int sh_wdt_open(struct inode *ino { switch (minor(inode->i_rdev)) { case WATCHDOG_MINOR: - if (sh_is_open) { + if (test_and_set_bit(0, &sh_is_open)) return -EBUSY; - } - sh_is_open = 1; sh_wdt_start(); - return 0; + break; default: return -ENODEV; } @@ -158,17 +195,13 @@ static int sh_wdt_open(struct inode *ino */ static int sh_wdt_close(struct inode *inode, struct file *file) { - lock_kernel(); - if (minor(inode->i_rdev) == WATCHDOG_MINOR) { #ifndef CONFIG_WATCHDOG_NOWAYOUT sh_wdt_stop(); #endif - sh_is_open = 0; + clear_bit(0, &sh_is_open); } - unlock_kernel(); - return 0; } @@ -206,7 +239,7 @@ static ssize_t sh_wdt_write(struct file return -ESPIPE; if (count) { - sh_wdt_ping(0); + next_heartbeat = user_ping_period(clock_division_ratio); return 1; } @@ -245,7 +278,7 @@ static int sh_wdt_ioctl(struct inode *in break; case WDIOC_KEEPALIVE: - sh_wdt_ping(0); + next_heartbeat = user_ping_period(clock_division_ratio); break; default: @@ -336,6 +369,10 @@ static int __init sh_wdt_init(void) return -EINVAL; } + init_timer(&timer); + timer.function = sh_wdt_ping; + timer.data = 0; + return 0; } @@ -358,6 +395,8 @@ EXPORT_NO_SYMBOLS; MODULE_AUTHOR("Paul Mundt <le...@ch...>"); MODULE_DESCRIPTION("SH 3/4 watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_PARM(clock_division_ratio, "i"); +MODULE_PARM_DESC(clock_division_ratio, "Clock division ratio. Valid ranges are from 0x5 (1.31ms) to 0x7 (5.25ms). Defaults to 0x7."); module_init(sh_wdt_init); module_exit(sh_wdt_exit); diff -ruN3p linux-2.5.3-pre4/include/asm-sh/mmu_context.h linux/include/asm-sh/mmu_context.h --- linux-2.5.3-pre4/include/asm-sh/mmu_context.h Sun Sep 9 04:29:09 2001 +++ linux/include/asm-sh/mmu_context.h Thu Jan 24 20:10:38 2002 @@ -185,4 +185,28 @@ static __inline__ void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) { } + +/* + * Every architecture must define this function. It's the fastest + * way of searching a 168-bit bitmap where the first 128 bits are + * unlikely to be set. It's guaranteed that at least one of the 168 + * bits is cleared. + */ +#if MAX_RT_PRIO != 128 || MAX_PRIO != 168 +# error update this function. +#endif + +static inline int sched_find_first_zero_bit(unsigned long *b) +{ + unsigned int rt; + + rt = b[0] & b[1] & b[2] & b[3]; + if (unlikely(rt != 0xffffffff)) + return find_first_zero_bit(b, MAX_RT_PRIO); + + if (b[4] != ~0) + return ffz(b[4]) + MAX_RT_PRIO; + return ffz(b[5]) + 32 + MAX_RT_PRIO; +} + #endif /* __ASM_SH_MMU_CONTEXT_H */ diff -ruN3p linux-2.5.3-pre4/include/asm-sh/pgtable.h linux/include/asm-sh/pgtable.h --- linux-2.5.3-pre4/include/asm-sh/pgtable.h Thu Jan 24 20:27:20 2002 +++ linux/include/asm-sh/pgtable.h Thu Jan 24 20:16:41 2002 @@ -237,6 +237,19 @@ static inline pte_t pte_mkyoung(pte_t pt static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } /* + * Macro and implementation to make a page protection as uncachable. + */ +#define pgprot_noncached pgprot_noncached + +static inline pgprot_t pgprot_noncached(pgprot_t _prot) +{ + unsigned long prot = pgprot_val(_prot); + + prot &= ~_PAGE_CACHABLE; + return __pgprot(prot); +} + +/* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. * diff -ruN3p linux-2.5.3-pre4/include/asm-sh/processor.h linux/include/asm-sh/processor.h --- linux-2.5.3-pre4/include/asm-sh/processor.h Tue Jan 8 14:23:13 2002 +++ linux/include/asm-sh/processor.h Thu Jan 24 20:16:41 2002 @@ -184,18 +184,22 @@ extern void save_fpu(struct task_struct #define unlazy_fpu(tsk) do { \ if ((tsk)->flags & PF_USEDFPU) { \ - grab_fpu(); \ save_fpu(tsk); \ } \ } while (0) #define clear_fpu(tsk) do { \ - if ((tsk)->flags & PF_USEDFPU) \ + if ((tsk)->flags & PF_USEDFPU) { \ (tsk)->flags &= ~PF_USEDFPU; \ + release_fpu(); \ + } \ } while (0) /* Double presision, NANS as NANS, rounding to nearest, no exceptions */ #define FPSCR_INIT 0x00080000 + +#define FPSCR_CAUSE_MASK 0x0001f000 /* Cause bits */ +#define FPSCR_FLAG_MASK 0x0000007c /* Flag bits */ /* * Return saved PC of a blocked thread. diff -ruN3p linux-2.5.3-pre4/include/asm-sh/scatterlist.h linux/include/asm-sh/scatterlist.h --- linux-2.5.3-pre4/include/asm-sh/scatterlist.h Tue Jan 8 14:23:13 2002 +++ linux/include/asm-sh/scatterlist.h Sat Jan 5 16:29:31 2002 @@ -2,7 +2,11 @@ #define __ASM_SH_SCATTERLIST_H struct scatterlist { - char * address; /* Location data is to be transferred to */ + 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; unsigned int length; }; -- |
From: NIIBE Y. <gn...@m1...> - 2002-01-24 11:03:28
|
Here's the change from mainline. (2.5.2 has been tagged.) Obviously, we need to do some work for drivers/pcmcia/hd64465_ss.c. Anyone? Updated to 2.5.3-pre4. * Documentation/Configure.help, Documentation/cachetlb.txt, arch/sh/vmlinux.lds.S, arch/sh/kernel/init_task.c, arch/sh/kernel/process.c, arch/sh/mm/cache-sh4.c, arch/sh/mm/fault.c, arch/sh/vmlinux.lds.S, drivers/net/Config.in, drivers/pcmcia/hd64465_ss.c, drivers/video/hitfb.c, drivers/video/pvr2fb.c, include/asm-sh/ide.h, include/asm-sh/pci.h, include/asm-sh/pgalloc.h, include/asm-sh/pgtable.h, include/linux/highmem.h, init/main.c, mm/memory.c: Include changes from mainline (2.5.3-pre4). * AGAINST-2.5.3-pre4: New file. * AGAINST-2.5.2: Removed. Index: Documentation/Configure.help =================================================================== RCS file: /cvsroot/linuxsh/linux/Documentation/Configure.help,v retrieving revision 1.4 diff -u -3 -p -r1.4 Configure.help --- Documentation/Configure.help 2002/01/15 07:59:52 1.4 +++ Documentation/Configure.help 2002/01/24 10:53:18 @@ -2433,6 +2433,14 @@ CONFIG_IP_NF_MATCH_LENGTH If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `N'. +AH/ESP match support +CONFIG_IP_NF_MATCH_AH_ESP + These two match extensions (`ah' and `esp') allow you to match a + range of SPIs inside AH or ESP headers of IPSec packets. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + TOS match support CONFIG_IP_NF_MATCH_TOS TOS matching allows you to match packets based on the Type Of @@ -2600,6 +2608,19 @@ CONFIG_IP_NF_MATCH_TCPMSS If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `N'. +ULOG target support +CONFIG_IP_NF_TARGET_ULOG + This option adds a `ULOG' target, which allows you to create rules in + any iptables table. The packet is passed to a userspace logging + daemon using netlink multicast sockets; unlike the LOG target + which can only be viewed through syslog. + + The apropriate userspace logging daemon (ulogd) may be obtained from + http://www.gnumonks.org/projects/ulogd + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + LOG target support CONFIG_IP_NF_TARGET_LOG This option adds a `LOG' target, which allows you to create rules in @@ -2656,6 +2677,23 @@ CONFIG_IP6_NF_MATCH_MULTIPORT If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `N'. +IPV6 queue handler (EXPERIMENTAL) +CONFIG_IP6_NF_QUEUE + + This option adds a queue handler to the kernel for IPv6 + packets which lets us to receive the filtered packets + with QUEUE target using libiptc as we can do with + the IPv4 now. + + (C) Fernando Anton 2001 + IPv64 Project - Work based in IPv64 draft by Arturo Azcorra. + Universidad Carlos III de Madrid + Universidad Politecnica de Alcala de Henares + email: fa...@it... + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'. + Owner match support CONFIG_IP6_NF_MATCH_OWNER Packet owner matching allows you to match locally-generated packets @@ -4128,6 +4166,16 @@ CONFIG_FB_L7200 This driver supports the L7200 Color LCD. Say Y if you want graphics support. +NeoMagic display support (EXPERIMENTAL) +CONFIG_FB_NEOMAGIC + This driver supports notebooks with NeoMagic PCI chips. + Say Y if you have such a graphics card. + + The driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called neofb.o. If you want to compile it as a + module, say M here and read Documentation/modules.txt. + PowerMac "control" frame buffer device support CONFIG_FB_CONTROL This driver supports a frame buffer for the graphics adapter in the @@ -5949,32 +5997,6 @@ CONFIG_PACKET_MMAP If unsure, say N. -Kernel/User network link driver -CONFIG_NETLINK - This driver allows for two-way communication between the kernel and - user processes. It does so by creating a new socket family, - PF_NETLINK. Over this socket, the kernel can send and receive - datagrams carrying information. It is documented on many systems in - netlink(7). - - So far, the kernel uses this feature to publish some network related - information if you say Y to "Routing messages", below. You also need - to say Y here if you want to use arpd, a daemon that helps keep the - internal ARP cache (a mapping between IP addresses and hardware - addresses on the local network) small. The ethertap device, which - lets user space programs read and write raw Ethernet frames, also - needs the network link driver. - - If unsure, say Y. - -Routing messages -CONFIG_RTNETLINK - If you say Y here, user space programs can receive some network - related routing information over the netlink. 'rtmon', supplied - with the iproute2 package (<ftp://ftp.inr.ac.ru/>), can read and - interpret this data. Information sent to the kernel over this link - is ignored. - Netlink device emulation CONFIG_NETLINK_DEV This option will be removed soon. Any programs that want to use @@ -8158,6 +8180,19 @@ CONFIG_IEEE1394_VIDEO1394 this option only if you have an IEEE 1394 video device connected to an OHCI-1394 card. +OHCI-DV I/O support +CONFIG_IEEE1394_DV1394 + This driver allows you to transmit and receive DV (digital video) + streams on an OHCI-1394 card using a simple frame-oriented + interface. + + The user-space API for dv1394 is documented in dv1394.h. + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read <file:Documentation/modules.txt>. The module + will be called dv1394.o. + SBP-2 support (Harddisks etc.) CONFIG_IEEE1394_SBP2 This option enables you to use SBP-2 devices connected to your IEEE @@ -10133,6 +10168,12 @@ CONFIG_8139TOO_8129 instead of an internal one. Disabling this option will save some memory by making the code size smaller. If unsure, say Y. +Support for Dreamcast Broad Band Adaptor +CONFIG_8139TOO_DREAMCAST + This enables support for the SEGA Broad Band Adaptor for Dreamcast. + It uses 16KB buffer and doesn't support mapping main memory to DMA. + If unsure, say N. + SiS 900/7016 PCI Fast Ethernet Adapter support CONFIG_SIS900 This is a driver for the Fast Ethernet PCI network cards based on @@ -23873,6 +23914,14 @@ CONFIG_SH_DREAMCAST <http://www.m17n.org/linux-sh/dreamcast/>. There is a Dreamcast project is at <http://linuxdc.sourceforge.net/>. +SH-2000 +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>. + BareCPU CONFIG_SH_UNKNOWN "Bare CPU" aka "unknown" means an SH-based system which is not one @@ -23916,6 +23965,14 @@ SH7750 CONFIG_CPU_SUBTYPE_SH7750 Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. +SH7751 +CONFIG_CPU_SUBTYPE_SH7751 + Select SH7750 if you have a 166 Mhz SH-4 HD6417751 CPU. + +ST40STB1 +CONFIG_CPU_SUBTYPE_ST40STB1 + Select ST40STB1 if you have a ST40STB1 CPU. + Physical memory start address CONFIG_MEMORY_START Computers built with Hitachi SuperH processors always @@ -24029,6 +24086,16 @@ CONFIG_GDB_CONSOLE would like kernel messages to be formatted into GDB $O packets so that GDB prints them as program output, say 'Y'. +802.1Q VLAN Support +CONFIG_VLAN_8021Q + Select this and you will be able to create 802.1Q VLAN interfaces on your + ethernet interfaces. 802.1Q VLAN supports almost everything a regular + ethernet interface does, including firewalling, bridging, and of course + IP traffic. You will need the 'vconfig' tool from the VLAN project in + order to effectively use VLANs. See the VLAN web page for more + information: http://www.candelatech.com/~greear/vlan.html If unsure, + you can safely say 'N'. + # # A couple of things I keep forgetting: # capitalize: AppleTalk, Ethernet, DOS, DMA, FAT, FTP, Internet, @@ -24078,10 +24145,10 @@ CONFIG_GDB_CONSOLE # LocalWords: filesystems smbfs ATA ppp PCTech RZ www powerquest txt CMD ESDI # LocalWords: chipset FB multicast MROUTE appletalk ifconfig IBMTR multiport # LocalWords: Multisession STALDRV EasyIO EC EasyConnection ISTALLION ONboard -# LocalWords: Brumby pci TNC cis ohio faq usenet NETLINK dev hydra ca Tyne mem +# LocalWords: Brumby pci TNC cis ohio faq usenet dev hydra ca Tyne mem # LocalWords: carleton DECstation SUNFD JENSEN Noname XXXM SLiRP LILO's amifb # LocalWords: pppd Zilog ZS SRM bootloader ez mainmenu rarp ipfwadm paride pcd -# LocalWords: RTNETLINK mknod xos MTU lwared Macs netatalk macs cs Wolff +# LocalWords: mknod xos MTU lwared Macs netatalk macs cs Wolff # LocalWords: dartmouth flowerpt MultiMaster FlashPoint tudelft etherexpress # LocalWords: ICL EtherTeam ETH IDESCSI TXC SmartRAID SmartCache httpd sjc dlp # LocalWords: thesphere TwoServers BOOTP DHCP ncpfs BPQETHER BPQ MG HIPPI cern Index: Documentation/cachetlb.txt =================================================================== RCS file: /cvsroot/linuxsh/linux/Documentation/cachetlb.txt,v retrieving revision 1.2 diff -u -3 -p -r1.2 cachetlb.txt --- Documentation/cachetlb.txt 2001/12/03 22:15:34 1.2 +++ Documentation/cachetlb.txt 2002/01/24 10:53:18 @@ -49,17 +49,18 @@ changes occur: page table operations such as what happens during fork, and exec. -3) void flush_tlb_range(struct mm_struct *mm, +3) void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) Here we are flushing a specific range of (user) virtual address translations from the TLB. After running, this interface must make sure that any previous page table - modifications for the address space 'mm' in the range 'start' - to 'end' will be visible to the cpu. That is, after running, - there will be no entries in the TLB for 'mm' for virtual - addresses in the range 'start' to 'end'. + modifications for the address space 'vma->vm_mm' in the range + 'start' to 'end' will be visible to the cpu. That is, after + running, here will be no entries in the TLB for 'mm' for + virtual addresses in the range 'start' to 'end'. + The "vma" is the backing store being used for the region. Primarily, this is used for munmap() type operations. The interface is provided in hopes that the port can find @@ -130,9 +131,9 @@ the sequence will be in one of the follo change_all_page_tables_of(mm); flush_tlb_mm(mm); - 2) flush_cache_range(mm, start, end); + 2) flush_cache_range(vma, start, end); change_range_of_page_tables(mm, start, end); - flush_tlb_range(mm, start, end); + flush_tlb_range(vma, start, end); 3) flush_cache_page(vma, page); set_pte(pte_pointer, new_pte_val); @@ -173,14 +174,15 @@ Here are the routines, one by one: page table operations such as what happens during fork, exit, and exec. -3) void flush_cache_range(struct mm_struct *mm, +3) void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) Here we are flushing a specific range of (user) virtual addresses from the cache. After running, there will be no - entries in the cache for 'mm' for virtual addresses in the - range 'start' to 'end'. + entries in the cache for 'vma->vm_mm' for virtual addresses in + the range 'start' to 'end'. + The "vma" is the backing store being used for the region. Primarily, this is used for munmap() type operations. The interface is provided in hopes that the port can find @@ -275,7 +277,7 @@ Here is the new interface: for example, uses this technique. The "address" parameter tells the virtual address where the - user will ultimately this page mapped. + user will ultimately have this page mapped. If D-cache aliasing is not an issue, these two routines may simply call memcpy/memset directly and do nothing more. 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 2001/10/15 20:44:47 1.1.1.1 +++ arch/sh/vmlinux.lds.S 2002/01/24 10:53:18 @@ -63,7 +63,15 @@ SECTIONS .setup.init : { *(.setup.init) } __setup_end = .; __initcall_start = .; - .initcall.init : { *(.initcall.init) } + .initcall.init : { + *(.initcall1.init) + *(.initcall2.init) + *(.initcall3.init) + *(.initcall4.init) + *(.initcall5.init) + *(.initcall6.init) + *(.initcall7.init) + } __initcall_end = .; __machvec_start = .; .machvec.init : { *(.machvec.init) } Index: arch/sh/kernel/init_task.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/init_task.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 init_task.c --- arch/sh/kernel/init_task.c 2001/10/15 20:44:48 1.1 +++ arch/sh/kernel/init_task.c 2002/01/24 10:53:18 @@ -1,6 +1,7 @@ #include <linux/mm.h> #include <linux/sched.h> #include <linux/init.h> +#include <linux/init_task.h> #include <asm/uaccess.h> #include <asm/pgtable.h> Index: arch/sh/kernel/process.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/process.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 process.c --- arch/sh/kernel/process.c 2002/01/15 07:59:52 1.2 +++ arch/sh/kernel/process.c 2002/01/24 10:53:18 @@ -42,11 +42,11 @@ void cpu_idle(void *unused) /* endless idle loop with no priority at all */ while (1) { if (hlt_counter) { - if (current->need_resched) + if (need_resched()) break; } else { __cli(); - while (!current->need_resched) { + while (!need_resched()) { __sti(); asm volatile("sleep" : : : "memory"); __cli(); Index: arch/sh/mm/cache-sh4.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/cache-sh4.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 cache-sh4.c --- arch/sh/mm/cache-sh4.c 2001/10/15 20:44:53 1.1.1.1 +++ arch/sh/mm/cache-sh4.c 2002/01/24 10:53:18 @@ -295,7 +295,7 @@ void flush_cache_mm(struct mm_struct *mm * Flushing the cache lines for U0 only isn't enough. * We need to flush for P1 too, which may contain aliases. */ -void flush_cache_range(struct mm_struct *mm, unsigned long start, +void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { /* Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/mm/fault.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 fault.c --- arch/sh/mm/fault.c 2002/01/15 07:59:52 1.3 +++ arch/sh/mm/fault.c 2002/01/24 10:53:18 @@ -375,9 +375,11 @@ void flush_tlb_page(struct vm_area_struc } } -void flush_tlb_range(struct mm_struct *mm, unsigned long start, +void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { + struct mm_struct *mm = vma->vm_mm; + if (mm->context != NO_CONTEXT) { unsigned long flags; int size; Index: drivers/net/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.in,v retrieving revision 1.2 diff -u -3 -p -r1.2 Config.in --- drivers/net/Config.in 2001/12/03 22:15:34 1.2 +++ drivers/net/Config.in 2002/01/24 10:53:18 @@ -10,9 +10,7 @@ tristate 'Bonding driver support' CONFIG tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER tristate 'Universal TUN/TAP device driver support' CONFIG_TUN if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - if [ "$CONFIG_NETLINK" = "y" ]; then - tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP - fi + tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP fi if [ "$CONFIG_ISAPNP" = "y" -o "$CONFIG_ISAPNP" = "m" ]; then @@ -294,7 +292,6 @@ comment 'Wireless LAN (non-hamradio)' bool 'Wireless LAN (non-hamradio)' CONFIG_NET_RADIO if [ "$CONFIG_NET_RADIO" = "y" ]; then dep_tristate ' STRIP (Metricom starmode radio IP)' CONFIG_STRIP $CONFIG_INET - tristate ' AT&T WaveLAN & DEC RoamAbout DS support' CONFIG_WAVELAN tristate ' Aironet Arlan 655 & IC2200 DS support' CONFIG_ARLAN tristate ' Aironet 4500/4800 series adapters' CONFIG_AIRONET4500 dep_tristate ' Aironet 4500/4800 ISA/PCI/PNP/365 support ' CONFIG_AIRONET4500_NONCS $CONFIG_AIRONET4500 Index: drivers/pcmcia/hd64465_ss.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pcmcia/hd64465_ss.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 hd64465_ss.c --- drivers/pcmcia/hd64465_ss.c 2001/10/15 20:45:05 1.1.1.1 +++ drivers/pcmcia/hd64465_ss.c 2002/01/24 10:53:18 @@ -673,6 +673,10 @@ static int hs_set_io_map(unsigned int so */ DPRINTK("remap_page_range(vaddr=0x%08lx, paddr=0x%08lx, size=0x%08lxx)\n", vaddrbase + pstart, paddrbase + pstart, psize); +#error This does not work. Firstly remap_page_range() uses current->mm for +#error the address space, which is wrong for kernel mappings. remap_page_range +#error also does flush_{cache,tlb}_range() which ONLY works for user mappings. +#error Next, remap_page_range() now wants to take a vm_area_struct arg. remap_page_range(vaddrbase + pstart, paddrbase + pstart, psize, prot); /* Index: drivers/video/hitfb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/hitfb.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 hitfb.c --- drivers/video/hitfb.c 2001/10/15 20:45:05 1.1.1.1 +++ drivers/video/hitfb.c 2002/01/24 10:53:18 @@ -344,7 +344,7 @@ static struct fb_ops hitfb_ops = { int __init hitfb_init(void) { strcpy(fb_info.gen.info.modename, "Hitachi HD64461"); - fb_info.gen.info.node = -1; + fb_info.gen.info.node = NODEV; fb_info.gen.info.flags = FBINFO_FLAG_DEFAULT; fb_info.gen.info.fbops = &hitfb_ops; fb_info.gen.info.disp = &fb_info.disp; Index: drivers/video/pvr2fb.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/video/pvr2fb.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 pvr2fb.c --- drivers/video/pvr2fb.c 2001/10/15 20:45:05 1.1.1.1 +++ drivers/video/pvr2fb.c 2002/01/24 10:53:18 @@ -1034,7 +1034,7 @@ int __init pvr2fb_init(void) strcpy(fb_info.modename, pvr2fb_name); fb_info.changevar = NULL; - fb_info.node = -1; + fb_info.node = NODEV; fb_info.fbops = &pvr2fb_ops; fb_info.disp = &disp; fb_info.switch_con = &pvr2fbcon_switch; Index: include/asm-sh/ide.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/ide.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 ide.h --- include/asm-sh/ide.h 2001/10/15 20:45:08 1.1.1.1 +++ include/asm-sh/ide.h 2002/01/24 10:53:18 @@ -116,7 +116,19 @@ typedef union { unsigned lba : 1; /* using LBA instead of CHS */ unsigned bit7 : 1; /* always 1 */ } b; - } select_t; +} select_t; + +typedef union { + unsigned all : 8; /* all of the bits together */ + struct { + unsigned bit0 : 1; + unsigned nIEN : 1; /* device INTRQ to host */ + unsigned SRST : 1; /* host soft reset bit */ + unsigned bit3 : 1; /* ATA-2 thingy */ + unsigned reserved456 : 3; + unsigned HOB : 1; /* 48-bit address ordering */ + } b; +} control_t; #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) #define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) Index: include/asm-sh/pci.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pci.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 pci.h --- include/asm-sh/pci.h 2002/01/20 07:32:17 1.3 +++ include/asm-sh/pci.h 2002/01/24 10:53:18 @@ -95,6 +95,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/pgalloc.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgalloc.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 pgalloc.h --- include/asm-sh/pgalloc.h 2001/10/15 20:45:11 1.1.1.1 +++ include/asm-sh/pgalloc.h 2002/01/24 10:53:18 @@ -78,14 +78,14 @@ static inline int do_check_pgt_cache(int * - flush_tlb_all() flushes all processes TLBs * - flush_tlb_mm(mm) flushes the specified mm context TLB's * - flush_tlb_page(vma, vmaddr) flushes one page - * - flush_tlb_range(mm, start, end) flushes a range of pages + * - flush_tlb_range(vma, start, end) flushes a range of pages * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables */ extern void flush_tlb(void); extern void flush_tlb_all(void); extern void flush_tlb_mm(struct mm_struct *mm); -extern void flush_tlb_range(struct mm_struct *mm, unsigned long start, +extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); extern void __flush_tlb_page(unsigned long asid, unsigned long page); Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/pgtable.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 pgtable.h --- include/asm-sh/pgtable.h 2001/12/22 10:26:56 1.3 +++ include/asm-sh/pgtable.h 2002/01/24 10:53:18 @@ -23,7 +23,7 @@ extern void paging_init(void); * - flush_cache_all() flushes entire cache * - flush_cache_mm(mm) flushes the specified mm context's cache lines * - flush_cache_page(mm, vmaddr) flushes a single page - * - flush_cache_range(mm, start, end) flushes a range of pages + * - flush_cache_range(vma, start, end) flushes a range of pages * * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache * - flush_page_to_ram(page) write back kernel page to ram @@ -35,7 +35,7 @@ extern void paging_init(void); */ #define flush_cache_all() do { } while (0) #define flush_cache_mm(mm) do { } while (0) -#define flush_cache_range(mm, start, end) do { } while (0) +#define flush_cache_range(vma, start, end) do { } while (0) #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) #define flush_dcache_page(page) do { } while (0) @@ -55,7 +55,7 @@ extern void paging_init(void); extern void flush_cache_all(void); extern void flush_cache_mm(struct mm_struct *mm); -extern void flush_cache_range(struct mm_struct *mm, unsigned long start, +extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); extern void flush_dcache_page(struct page *pg); Index: include/linux/highmem.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/linux/highmem.h,v retrieving revision 1.3 diff -u -3 -p -r1.3 highmem.h --- include/linux/highmem.h 2002/01/07 03:57:48 1.3 +++ include/linux/highmem.h 2002/01/24 10:53:18 @@ -95,17 +95,6 @@ static inline void clear_highpage(struct kunmap(page); } -static inline void memclear_highpage(struct page *page, unsigned int offset, unsigned int size) -{ - char *kaddr; - - if (offset + size > PAGE_SIZE) - BUG(); - kaddr = kmap(page); - memset(kaddr + offset, 0, size); - kunmap(page); -} - /* * Same but also flushes aliased cache contents to RAM. */ @@ -117,6 +106,7 @@ static inline void memclear_highpage_flu BUG(); kaddr = kmap(page); memset(kaddr + offset, 0, size); + flush_dcache_page(page); flush_page_to_ram(page); kunmap(page); } @@ -130,17 +120,6 @@ static inline void copy_user_highpage(st copy_user_page(vto, vfrom, vaddr); kunmap_atomic(vfrom, KM_USER0); kunmap_atomic(vto, KM_USER1); -} - -static inline void copy_highpage(struct page *to, struct page *from) -{ - char *vfrom, *vto; - - vfrom = kmap(from); - vto = kmap(to); - copy_page(vto, vfrom); - kunmap(from); - kunmap(to); } #endif /* _LINUX_HIGHMEM_H */ Index: init/main.c =================================================================== RCS file: /cvsroot/linuxsh/linux/init/main.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 main.c --- init/main.c 2002/01/15 08:16:56 1.5 +++ init/main.c 2002/01/24 10:53:19 @@ -38,35 +38,10 @@ #include <asm/ccwcache.h> #endif -#ifdef CONFIG_PCI -#include <linux/pci.h> -#endif - -#ifdef CONFIG_DIO -#include <linux/dio.h> -#endif - -#ifdef CONFIG_ZORRO -#include <linux/zorro.h> -#endif - #ifdef CONFIG_MTRR # include <asm/mtrr.h> #endif -#ifdef CONFIG_NUBUS -#include <linux/nubus.h> -#endif - -#ifdef CONFIG_ISAPNP -#include <linux/isapnp.h> -#endif - -#ifdef CONFIG_IRDA -extern int irda_proto_init(void); -extern int irda_device_init(void); -#endif - #ifdef CONFIG_X86_LOCAL_APIC #include <asm/smp.h> #endif @@ -92,10 +67,8 @@ extern void sock_init(void); extern void fork_init(unsigned long); extern void mca_init(void); extern void sbus_init(void); -extern void ppc_init(void); extern void sysctl_init(void); extern void signals_init(void); -extern int init_pcmcia_ds(void); extern void free_initmem(void); @@ -103,8 +76,6 @@ extern void free_initmem(void); extern void tc_init(void); #endif -extern void ecard_init(void); - #if defined(CONFIG_SYSVIPC) extern void ipc_init(void); #endif @@ -290,8 +261,6 @@ static void __init parse_options(char *l extern void setup_arch(char **); extern void cpu_idle(void); -unsigned long wait_init_idle; - #ifndef CONFIG_SMP #ifdef CONFIG_X86_LOCAL_APIC @@ -305,6 +274,16 @@ static void __init smp_init(void) #else +static unsigned long __initdata wait_init_idle; + +void __init idle_startup_done(void) +{ + clear_bit(smp_processor_id(), &wait_init_idle); + while (wait_init_idle) { + cpu_relax(); + barrier(); + } +} /* Called by boot processor to activate the rest. */ static void __init smp_init(void) @@ -315,6 +294,7 @@ static void __init smp_init(void) smp_threads_ready=1; smp_commence(); + idle_startup_done(); } #endif @@ -411,12 +391,15 @@ asmlinkage void __init start_kernel(void check_bugs(); printk("POSIX conformance testing by UNIFIX\n"); + init_idle(); /* * We count on the initial thread going ok * Like idlers init is an unlocked kernel thread, which will * make syscalls (and thus be locked). */ smp_init(); + + /* Do the rest non-__init'ed, we're now alive */ rest_init(); } @@ -480,50 +463,11 @@ static void __init do_basic_setup(void) /* bring up the device tree */ device_driver_init(); -#ifdef CONFIG_PCI - pci_init(); -#endif -#ifdef CONFIG_SBUS - sbus_init(); -#endif -#if defined(CONFIG_PPC) - ppc_init(); -#endif -#ifdef CONFIG_MCA - mca_init(); -#endif -#ifdef CONFIG_ARCH_ACORN - ecard_init(); -#endif -#ifdef CONFIG_ZORRO - zorro_init(); -#endif -#ifdef CONFIG_DIO - dio_init(); -#endif -#ifdef CONFIG_NUBUS - nubus_init(); -#endif -#ifdef CONFIG_ISAPNP - isapnp_init(); -#endif -#ifdef CONFIG_TC - tc_init(); -#endif - /* Networking initialization needs a process context */ sock_init(); start_context_thread(); do_initcalls(); - -#ifdef CONFIG_IRDA - irda_proto_init(); - irda_device_init(); /* Must be done after protocol initialization */ -#endif -#ifdef CONFIG_PCMCIA - init_pcmcia_ds(); /* Do this last */ -#endif } extern void prepare_namespace(void); Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 memory.c --- mm/memory.c 2002/01/15 07:59:52 1.5 +++ mm/memory.c 2002/01/24 10:53:19 @@ -355,8 +355,9 @@ static inline int zap_pmd_range(mmu_gath /* * remove user pages in a given range. */ -void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size) +void zap_page_range(struct vm_area_struct *vma, unsigned long address, unsigned long size) { + struct mm_struct *mm = vma->vm_mm; mmu_gather_t *tlb; pgd_t * dir; unsigned long start = address, end = address + size; @@ -374,8 +375,8 @@ void zap_page_range(struct mm_struct *mm if (address >= end) BUG(); spin_lock(&mm->page_table_lock); - flush_cache_range(mm, address, end); - tlb = tlb_gather_mmu(mm); + flush_cache_range(vma, address, end); + tlb = tlb_gather_mmu(vma); do { freed += zap_pmd_range(tlb, dir, address, end - address); @@ -757,16 +758,16 @@ static inline int zeromap_pmd_range(stru return 0; } -int zeromap_page_range(unsigned long address, unsigned long size, pgprot_t prot) +int zeromap_page_range(struct vm_area_struct *vma, unsigned long address, unsigned long size, pgprot_t prot) { int error = 0; pgd_t * dir; unsigned long beg = address; unsigned long end = address + size; - struct mm_struct *mm = current->mm; + struct mm_struct *mm = vma->vm_mm; dir = pgd_offset(mm, address); - flush_cache_range(mm, beg, end); + flush_cache_range(vma, beg, end); if (address >= end) BUG(); @@ -783,7 +784,7 @@ int zeromap_page_range(unsigned long add dir++; } while (address && (address < end)); spin_unlock(&mm->page_table_lock); - flush_tlb_range(mm, beg, end); + flush_tlb_range(vma, beg, end); return error; } @@ -838,17 +839,17 @@ static inline int remap_pmd_range(struct } /* Note: this is only safe if the mm semaphore is held when called. */ -int remap_page_range(unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot) +int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot) { int error = 0; pgd_t * dir; unsigned long beg = from; unsigned long end = from + size; - struct mm_struct *mm = current->mm; + struct mm_struct *mm = vma->vm_mm; phys_addr -= from; dir = pgd_offset(mm, from); - flush_cache_range(mm, beg, end); + flush_cache_range(vma, beg, end); if (from >= end) BUG(); @@ -865,7 +866,7 @@ int remap_page_range(unsigned long from, dir++; } while (from && (from < end)); spin_unlock(&mm->page_table_lock); - flush_tlb_range(mm, beg, end); + flush_tlb_range(vma, beg, end); return error; } @@ -980,7 +981,6 @@ no_mem: static void vmtruncate_list(struct vm_area_struct *mpnt, unsigned long pgoff) { do { - struct mm_struct *mm = mpnt->vm_mm; unsigned long start = mpnt->vm_start; unsigned long end = mpnt->vm_end; unsigned long len = end - start; @@ -988,7 +988,7 @@ static void vmtruncate_list(struct vm_ar /* mapping wholly truncated? */ if (mpnt->vm_pgoff >= pgoff) { - zap_page_range(mm, start, len); + zap_page_range(mpnt, start, len); continue; } @@ -1001,7 +1001,7 @@ static void vmtruncate_list(struct vm_ar /* Ok, partially affected.. */ start += diff << PAGE_SHIFT; len = (len - diff) << PAGE_SHIFT; - zap_page_range(mm, start, len); + zap_page_range(mpnt, start, len); } while ((mpnt = mpnt->vm_next_share) != NULL); } @@ -1242,7 +1242,7 @@ static int do_no_page(struct mm_struct * page_cache_release(new_page); return -1; } - copy_highpage(page, new_page); + copy_user_highpage(page, new_page, address); page_cache_release(new_page); lru_cache_add(page); new_page = page; |
From: NIIBE Y. <gn...@m1...> - 2002-01-24 10:27:02
|
Here's a patch to trunk. I've found this working 2.4 branch. I'll follow to 2.5.3-pre4. 2002-01-24 NIIBE Yutaka <gn...@m1...> * kernel/ptrace.c (access_process_vm): Added flush_dcache_page lost in 2.5.2 merge. Index: kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/kernel/ptrace.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 ptrace.c --- kernel/ptrace.c 2002/01/15 07:59:52 1.3 +++ kernel/ptrace.c 2002/01/24 10:24:38 @@ -150,6 +150,7 @@ int access_process_vm(struct task_struct maddr = kmap(page); if (write) { memcpy(maddr + offset, buf, bytes); + flush_dcache_page(page); flush_page_to_ram(page); flush_icache_page(vma, page); } else { |
From: NIIBE Y. <gn...@m1...> - 2002-01-24 10:20:39
|
NIIBE Yutaka wrote: > Paul, I've found ChangeLog entry but not find the new file. > Could you please add the file to 2.4 branch too. Sorry, my mistake. It is there. I forgot to add "-P" option when cvs update. Well here is FPU patch. 2002-01-25 NIIBE Yutaka <gn...@m1...> Backport from 2.5. FPU change. 2001-12-28 NIIBE Yutaka <gn...@m1...> (do_fpu_error): Handle denormalized floating point number. Remove un-needed grab_fpu. * arch/sh/kernel/head.S (_stext): Don't initialize FPU, as FPU is not used by kernel. (SR): Initial value with FD=1 (no FPU use). * include/asm-sh/processor.h (unlazy_fpu): Don't need to grab_fpu. (clear_fpu): Call release_fpu. * arch/sh/kernel/entry.S (PF_USEDFPU, __PF_USEDFPU): Removed. (restore_all, handle_exception): Simplified. (__fpu_prepare_fd, __init_task_flags): Removed * arch/sh/kernel/fpu.c (enable_fpu_in_danger): Removed. (fpu_prepare_fd): Removed. 2001-12-28 Kazumoto Kojima <kk...@rr...> * include/asm-sh/processor.h (FPSCR_ENABLE_MASK, FPSCR_FLAG_MASK): New macros. * arch/sh/kernel/fpu.c (denormal_to_double, ieee_fpe_handler): New functions. Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/entry.S,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 entry.S --- arch/sh/kernel/entry.S 2001/10/15 20:44:47 1.1.1.1 +++ arch/sh/kernel/entry.S 2002/01/24 10:18:55 @@ -66,7 +66,6 @@ need_resched = 20 tsk_ptrace = 24 PT_TRACESYS = 0x00000002 -PF_USEDFPU = 0x00100000 ENOSYS = 38 EINVAL = 22 @@ -567,12 +566,6 @@ __irq_stat: .align 2 restore_all: -#if defined(__SH4__) - mov.l __fpu_prepare_fd, r0 - jsr @r0 - stc sr, r4 -#endif - ! mov.l @r15+, r0 mov.l @r15+, r1 mov.l @r15+, r2 @@ -585,7 +578,7 @@ restore_all: stc sr, r8 mov.l __blrb_flags, r9 ! BL =1, RB=1 or r9, r8 - ldc r8, sr ! here, change the register bank + ldc r8, sr ! here, change the register bank ! mov.l @r15+, r8 mov.l @r15+, r9 @@ -594,25 +587,25 @@ restore_all: mov.l @r15+, r12 mov.l @r15+, r13 mov.l @r15+, r14 - mov.l @r15+, k4 ! original stack pointer + mov.l @r15+, k4 ! original stack pointer ldc.l @r15+, spc lds.l @r15+, pr - mov.l @r15+, k3 ! original SR + mov.l @r15+, k3 ! original SR ldc.l @r15+, gbr lds.l @r15+, mach lds.l @r15+, macl - add #4, r15 ! Skip syscall number + add #4, r15 ! Skip syscall number ! ! Calculate new SR value - mov k3, k2 ! original SR value + mov k3, k2 ! original SR value mov.l 1f, k1 stc sr, k0 - and k1, k0 ! Get current FD-bit + and k1, k0 ! Get current FD-bit mov.l 2f, k1 - and k1, k2 ! Mask orignal SR value - or k0, k2 ! Inherit current FD-bit + and k1, k2 ! Mask orignal SR value + or k0, k2 ! Inherit current FD-bit ! - mov k3, k0 ! Calculate IMASK-bits + mov k3, k0 ! Calculate IMASK-bits shlr2 k0 and #0x3c, k0 cmp/eq #0x3c, k0 @@ -620,69 +613,15 @@ restore_all: shll2 k0 mov g_imask, k0 ! -7: or k0, k2 ! Set the IMASK-bits +7: or k0, k2 ! Set the IMASK-bits ldc k2, ssr ! -#if defined(__SH4__) - shll k2 - shll k2 - bf 9f ! user mode - /* Kernel to kernel transition */ - mov.l 1f, k1 - tst k1, k3 - bf 9f ! it hadn't FPU - ! Kernel to kernel and FPU was used - ! There's the case we don't get FPU now - stc sr, k2 - tst k1, k2 - bt 8f - ! We need to grab FPU here - xor k1, k2 - ldc k2, sr ! Grab FPU - mov.l __init_task_flags, k1 - mov.l @k1, k2 - mov.l __PF_USEDFPU, k0 - or k0, k2 - mov.l k2, @k1 ! Set init_task.flags |= PF_USEDFPU - ! - ! Restoring FPU... - ! -8: mov.l 3f, k1 - lds k1, fpscr - fmov.s @r15+, fr0 - fmov.s @r15+, fr1 - fmov.s @r15+, fr2 - fmov.s @r15+, fr3 - fmov.s @r15+, fr4 - fmov.s @r15+, fr5 - fmov.s @r15+, fr6 - fmov.s @r15+, fr7 - fmov.s @r15+, fr8 - fmov.s @r15+, fr9 - fmov.s @r15+, fr10 - fmov.s @r15+, fr11 - fmov.s @r15+, fr12 - fmov.s @r15+, fr13 - fmov.s @r15+, fr14 - fmov.s @r15+, fr15 - lds.l @r15+, fpscr - lds.l @r15+, fpul -9: -#endif mov k4, r15 rte nop .align 2 __blrb_flags: .long 0x30000000 -#if defined(__SH4__) -__fpu_prepare_fd: - .long SYMBOL_NAME(fpu_prepare_fd) -__init_task_flags: - .long SYMBOL_NAME(init_task_union)+4 -__PF_USEDFPU: - .long PF_USEDFPU -#endif 1: .long 0x00008000 ! FD 2: .long 0xffff7f0f ! ~(IMASK+FD) 3: .long 0x00080000 ! SZ=0, PR=1 @@ -732,61 +671,21 @@ handle_exception: ! Using k0, k1 for scratch registers (r0_bank1, r1_bank), ! save all registers onto stack. ! - stc ssr, k0 ! from kernel space? - shll k0 ! Check MD bit (bit30) by shifting it into the T bit - shll k0 -#if defined(__SH4__) - bf/s 8f ! it's from user to kernel transition - mov r15, k0 ! save original stack to k0 - /* It's a kernel to kernel transition. */ - /* Is the FPU disabled? */ - mov.l 2f, k1 - stc ssr, k0 - tst k1, k0 - mov.l 4f, k1 - bf/s 9f ! FPU is not enabled, no need to save it - mov r15, k0 ! save original stack to k0 - ! FPU is enabled, save it - ! /* XXX: Need to save another bank of FPU if all FPU feature is used */ - ! /* Currently it's not the case for GCC (only udivsi3_i4, divsi3_i4) */ - sts.l fpul, @-r15 - sts.l fpscr, @-r15 - mov.l 6f, k1 - lds k1, fpscr - mov.l 3f, k1 - fmov.s fr15, @-r15 - fmov.s fr14, @-r15 - fmov.s fr13, @-r15 - fmov.s fr12, @-r15 - fmov.s fr11, @-r15 - fmov.s fr10, @-r15 - fmov.s fr9, @-r15 - fmov.s fr8, @-r15 - fmov.s fr7, @-r15 - fmov.s fr6, @-r15 - fmov.s fr5, @-r15 - fmov.s fr4, @-r15 - fmov.s fr3, @-r15 - fmov.s fr2, @-r15 - fmov.s fr1, @-r15 - bra 9f - fmov.s fr0, @-r15 -#else - mov.l 3f, k1 - bt/s 9f ! it's a kernel to kernel transition, and skip the FPU save. - mov r15, k0 ! save original stack to k0 anyway -#endif -8: /* User space to kernel */ + 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. + mov r15, k0 ! save original stack to k0 + /* User space to kernel */ mov #0x20, k1 - shll8 k1 ! k1 <= 8192 == THREAD_SIZE + shll8 k1 ! k1 <= 8192 == THREAD_SIZE add current, k1 mov k1, r15 ! change to kernel stack ! - mov.l 4f, k1 ! let kernel release FPU -9: ! Save the user registers on the stack. - ! At this point, k1 should have been set to the new SR value - mov #-1, k4 - mov.l k4, @-r15 ! syscall_nr (default: -1) +9: mov #-1, k4 + mov.l 3f, k1 + ! Save the user registers on the stack. + mov.l k4, @-r15 ! syscall_nr (default: -1) ! sts.l macl, @-r15 sts.l mach, @-r15 @@ -806,11 +705,11 @@ handle_exception: mov.l r9, @-r15 mov.l r8, @-r15 ! - stc sr, r8 ! Back to normal register bank, and - or k1, r8 ! Block all interrupts, may release FPU + stc sr, r8 ! Back to normal register bank, and + or k1, r8 ! Block all interrupts mov.l 5f, k1 - and k1, r8 ! ... - ldc r8, sr ! ...changed here. + and k1, r8 ! ... + ldc r8, sr ! ...changed here. ! mov.l r7, @-r15 mov.l r6, @-r15 @@ -831,9 +730,7 @@ handle_exception: nop .align 2 1: .long SYMBOL_NAME(exception_handling_table) -2: .long 0x00008000 ! FD=1 3: .long 0x000000f0 ! FD=0, IMASK=15 -4: .long 0x000080f0 ! FD=1, IMASK=15 5: .long 0xcfffffff ! RB=0, BL=0 6: .long 0x00080000 ! SZ=0, PR=1 Index: arch/sh/kernel/fpu.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/fpu.c,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 fpu.c --- arch/sh/kernel/fpu.c 2001/10/15 20:44:48 1.1.1.1 +++ arch/sh/kernel/fpu.c 2002/01/24 10:18:55 @@ -18,6 +18,10 @@ #include <asm/processor.h> #include <asm/io.h> +/* + * Save FPU registers onto task structure. + * Assume called with FPU enabled (SR.FD=0). + */ void save_fpu(struct task_struct *tsk) { @@ -118,7 +122,8 @@ restore_fpu(struct task_struct *tsk) * double precission represents signaling NANS. */ -void fpu_init(void) +static void +fpu_init(void) { asm volatile("lds %0, fpul\n\t" "lds %1, fpscr\n\t" @@ -160,15 +165,125 @@ void fpu_init(void) : "r" (0), "r" (FPSCR_INIT)); } +/** + * denormal_to_double - Given denormalized float number, + * store double float + * + * @fpu: Pointer to sh_fpu_hard structure + * @n: Index to FP register + */ +static void +denormal_to_double (struct sh_fpu_hard_struct *fpu, int n) +{ + unsigned long du, dl; + unsigned long x = fpu->fpul; + int exp = 1023 - 126; + + if (x != 0 && (x & 0x7f800000) == 0) { + du = (x & 0x80000000); + while ((x & 0x00800000) == 0) { + x <<= 1; + exp--; + } + x &= 0x007fffff; + du |= (exp << 20) | (x >> 3); + dl = x << 29; + + fpu->fp_regs[n] = du; + fpu->fp_regs[n+1] = dl; + } +} + +/** + * ieee_fpe_handler - Handle denormalized number exception + * + * @regs: Pointer to register structure + * + * Returns 1 when it's handled (should not cause exception). + */ +static int +ieee_fpe_handler (struct pt_regs *regs) +{ + unsigned short insn = *(unsigned short *) regs->pc; + unsigned short finsn; + unsigned long nextpc; + int nib[4] = { + (insn >> 12) & 0xf, + (insn >> 8) & 0xf, + (insn >> 4) & 0xf, + insn & 0xf}; + + if (nib[0] == 0xb || + (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */ + regs->pr = regs->pc + 4; + + if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */ + nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */ + if (regs->sr & 1) + nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); + else + nextpc = regs->pc + 4; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */ + if (regs->sr & 1) + nextpc = regs->pc + 4; + else + nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x4 && nib[3] == 0xb && + (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */ + nextpc = regs->regs[nib[1]]; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (nib[0] == 0x0 && nib[3] == 0x3 && + (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */ + nextpc = regs->pc + 4 + regs->regs[nib[1]]; + finsn = *(unsigned short *) (regs->pc + 2); + } else if (insn == 0x000b) { /* rts */ + nextpc = regs->pr; + finsn = *(unsigned short *) (regs->pc + 2); + } else { + nextpc = regs->pc + 2; + finsn = insn; + } + + if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */ + struct task_struct *tsk = current; + + save_fpu(tsk); + if ((tsk->thread.fpu.hard.fpscr & (1 << 17))) { + /* FPU error */ + denormal_to_double (&tsk->thread.fpu.hard, + (finsn >> 8) & 0xf); + tsk->thread.fpu.hard.fpscr &= + ~(FPSCR_CAUSE_MASK | FPSCR_FLAG_MASK); + grab_fpu(); + restore_fpu(tsk); + tsk->flags |= PF_USEDFPU; + } else { + tsk->thread.trap_no = 11; + tsk->thread.error_code = 0; + force_sig(SIGFPE, tsk); + } + + regs->pc = nextpc; + return 1; + } + + return 0; +} + asmlinkage void do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, struct pt_regs regs) { struct task_struct *tsk = current; - regs.pc += 2; + if (ieee_fpe_handler (®s)) + return; - grab_fpu(); + regs.pc += 2; save_fpu(tsk); tsk->thread.trap_no = 11; tsk->thread.error_code = 0; @@ -181,102 +296,12 @@ do_fpu_state_restore(unsigned long r4, u { struct task_struct *tsk = current; - if (!user_mode(®s)) { - if (tsk != &init_task) { - unlazy_fpu(tsk); - } - tsk = &init_task; - if (tsk->flags & PF_USEDFPU) { - /* - * This weird situation can be occurred. - * - * There's race condition in __cli: - * - * (1) SR --> register - * (2) Set IMASK of register - * (3) SR <-- register - * - * Between (1) and (2), or (2) and (3) getting - * interrupt, and interrupt handler (or - * softirq) may use FPU. - * - * Then, SR.FD is overwritten by (3). - * - * This results init_task.PF_USEDFPU is on, - * with SR.FD == 1. - * - */ - release_fpu(); - return; - } - } - grab_fpu(); - if (tsk->used_math) { - /* Using the FPU again. */ - restore_fpu(tsk); - } else { - /* First time FPU user. */ - fpu_init(); - tsk->used_math = 1; - } - tsk->flags |= PF_USEDFPU; - release_fpu(); -} - -/* - * Change current FD flag to set FD flag back to exception - */ -asmlinkage void -fpu_prepare_fd(unsigned long sr, unsigned long r5, unsigned long r6, - unsigned long r7, struct pt_regs regs) -{ - __cli(); if (!user_mode(®s)) { - if (init_task.flags & PF_USEDFPU) - grab_fpu(); - else { - if (!(sr & SR_FD)) { - BUG(); - release_fpu(); - } - } + printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); return; } - if (sr & SR_FD) { /* Kernel doesn't grab FPU */ - if (current->flags & PF_USEDFPU) - grab_fpu(); - else { - if (init_task.flags & PF_USEDFPU) { - /* - * This weird situation can be occurred. - * See the comment in do_fpu_state_restore. - */ - grab_fpu(); - save_fpu(&init_task); - } - } - } else { - if (init_task.flags & PF_USEDFPU) - save_fpu(&init_task); - else { - BUG(); - release_fpu(); - } - } -} - -/* Short cut for the FPU exception */ -asmlinkage void -enable_fpu_in_danger(void) -{ - struct task_struct *tsk = current; - - if (tsk != &init_task) - unlazy_fpu(tsk); - - tsk = &init_task; if (tsk->used_math) { /* Using the FPU again. */ restore_fpu(tsk); Index: arch/sh/kernel/head.S =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/head.S,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 head.S --- arch/sh/kernel/head.S 2001/10/15 20:44:48 1.1.1.1 +++ arch/sh/kernel/head.S 2002/01/24 10:18:55 @@ -50,12 +50,6 @@ ENTRY(_stext) sub r1, r0 ! ldc r0, r7_bank ! ... and init_task ! -#if defined(__SH4__) - ! Initialize fpu - mov.l 7f, r0 - jsr @r0 - nop -#endif ! Enable cache mov.l 6f, r0 jsr @r0 @@ -74,12 +68,9 @@ ENTRY(_stext) nop .balign 4 -1: .long 0x400000F0 ! MD=1, RB=0, BL=0, FD=0, IMASK=0xF +1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF 2: .long SYMBOL_NAME(stack) 3: .long SYMBOL_NAME(__bss_start) 4: .long SYMBOL_NAME(_end) 5: .long SYMBOL_NAME(start_kernel) 6: .long SYMBOL_NAME(cache_init) -#if defined(__SH4__) -7: .long SYMBOL_NAME(fpu_init) -#endif Index: include/asm-sh/processor.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/processor.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 processor.h --- include/asm-sh/processor.h 2001/10/15 20:45:10 1.1.1.1 +++ include/asm-sh/processor.h 2002/01/24 10:18:55 @@ -184,18 +184,22 @@ extern void save_fpu(struct task_struct #define unlazy_fpu(tsk) do { \ if ((tsk)->flags & PF_USEDFPU) { \ - grab_fpu(); \ save_fpu(tsk); \ } \ } while (0) #define clear_fpu(tsk) do { \ - if ((tsk)->flags & PF_USEDFPU) \ + if ((tsk)->flags & PF_USEDFPU) { \ (tsk)->flags &= ~PF_USEDFPU; \ + release_fpu(); \ + } \ } while (0) /* Double presision, NANS as NANS, rounding to nearest, no exceptions */ #define FPSCR_INIT 0x00080000 + +#define FPSCR_CAUSE_MASK 0x0001f000 /* Cause bits */ +#define FPSCR_FLAG_MASK 0x0000007c /* Flag bits */ /* * Return saved PC of a blocked thread. |
From: NIIBE Y. <gn...@m1...> - 2002-01-24 10:15:06
|
I'll commit following changes soon to update to 2.4.17, rotating ChangeLog. (I've done the tag of 2.4.16 already.) Then, I'll backport FPU changes from 2.5. Paul, I've found ChangeLog entry but not find the new file. Could you please add the file to 2.4 branch too. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.1.1.1.2.2 diff -u -3 -p -r1.1.1.1.2.2 Makefile --- Makefile 2001/11/30 23:03:19 1.1.1.1.2.2 +++ Makefile 2002/01/24 10:09:29 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 4 -SUBLEVEL = 16 +SUBLEVEL = 17 EXTRAVERSION = KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Index: TODO =================================================================== RCS file: /cvsroot/linuxsh/linux/TODO,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 TODO --- TODO 2001/10/15 20:44:31 1.1.1.1 +++ TODO 2002/01/24 10:09:29 @@ -1,4 +1,5 @@ -* Support zImage with big-endian. +* include/asm-sh/pgalloc.h + Use slab for pgd_alloc * include/asm-sh/hw_irq.h Kernel profiling @@ -82,3 +83,5 @@ DONE: * reboot SR.BL=1 and address error + +* Support zImage with big-endian. Index: Documentation/cachetlb.txt =================================================================== RCS file: /cvsroot/linuxsh/linux/Documentation/cachetlb.txt,v retrieving revision 1.1.2.1 diff -u -3 -p -r1.1.2.1 cachetlb.txt --- Documentation/cachetlb.txt 2001/11/30 01:06:04 1.1.2.1 +++ Documentation/cachetlb.txt 2002/01/24 10:09:33 @@ -275,7 +275,7 @@ Here is the new interface: for example, uses this technique. The "address" parameter tells the virtual address where the - user will ultimately this page mapped. + user will ultimately have this page mapped. If D-cache aliasing is not an issue, these two routines may simply call memcpy/memset directly and do nothing more. Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.1.1.1.2.3 diff -u -3 -p -r1.1.1.1.2.3 rd.c --- drivers/block/rd.c 2001/12/17 07:26:46 1.1.1.1.2.3 +++ drivers/block/rd.c 2002/01/24 10:09:33 @@ -110,7 +110,7 @@ static struct block_device *rd_bdev[NUM_ */ int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */ /* - * It would be very desiderable to have a soft-blocksize (that in the case + * It would be very desirable to have a soft-blocksize (that in the case * of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because * doing that we'll achieve a far better MM footprint. Using a rd_blocksize of * BLOCK_SIZE in the worst case we'll make PAGE_SIZE/BLOCK_SIZE buffer-pages Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.1.1.1.2.3 diff -u -3 -p -r1.1.1.1.2.3 8139too.c --- drivers/net/8139too.c 2001/11/30 23:03:54 1.1.1.1.2.3 +++ drivers/net/8139too.c 2002/01/24 10:09:33 @@ -1659,23 +1659,24 @@ static int rtl8139_start_xmit (struct sk struct rtl8139_private *tp = dev->priv; void *ioaddr = tp->mmio_addr; unsigned int entry; + unsigned int len = skb->len; /* Calculate the next Tx descriptor entry. */ entry = tp->cur_tx % NUM_TX_DESC; - if (likely(skb->len < TX_BUF_SIZE)) { + if (likely(len < TX_BUF_SIZE)) { skb_copy_and_csum_dev(skb, tp->tx_buf[entry]); dev_kfree_skb(skb); } else { dev_kfree_skb(skb); tp->stats.tx_dropped++; return 0; - } + } /* Note: the chip doesn't have auto-pad! */ spin_lock_irq(&tp->lock); RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), - tp->tx_flag | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN)); + tp->tx_flag | max(len, (unsigned int) ETH_ZLEN)); dev->trans_start = jiffies; @@ -1687,7 +1688,7 @@ static int rtl8139_start_xmit (struct sk spin_unlock_irq(&tp->lock); DPRINTK ("%s: Queued Tx packet at %p size %u to slot %d.\n", - dev->name, skb->data, skb->len, entry); + dev->name, skb->data, len, entry); return 0; } @@ -2516,7 +2517,7 @@ static struct pci_driver rtl8139_pci_dri name: DRV_NAME, id_table: rtl8139_pci_tbl, probe: rtl8139_init_one, - remove: rtl8139_remove_one, + remove: __devexit_p(rtl8139_remove_one), #ifdef CONFIG_PM suspend: rtl8139_suspend, resume: rtl8139_resume, Index: include/linux/highmem.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/linux/highmem.h,v retrieving revision 1.1.1.1.2.1 diff -u -3 -p -r1.1.1.1.2.1 highmem.h --- include/linux/highmem.h 2001/12/17 07:26:46 1.1.1.1.2.1 +++ include/linux/highmem.h 2002/01/24 10:09:33 @@ -93,15 +93,4 @@ static inline void copy_user_highpage(st kunmap_atomic(vto, KM_USER1); } -static inline void copy_highpage(struct page *to, struct page *from) -{ - char *vfrom, *vto; - - vfrom = kmap(from); - vto = kmap(to); - copy_page(vto, vfrom); - kunmap(from); - kunmap(to); -} - #endif /* _LINUX_HIGHMEM_H */ Index: kernel/ptrace.c =================================================================== RCS file: /cvsroot/linuxsh/linux/kernel/ptrace.c,v retrieving revision 1.1.1.1.2.1 diff -u -3 -p -r1.1.1.1.2.1 ptrace.c --- kernel/ptrace.c 2001/11/30 23:03:57 1.1.1.1.2.1 +++ kernel/ptrace.c 2002/01/24 10:09:33 @@ -121,120 +121,17 @@ int ptrace_detach(struct task_struct *ch } /* - * Access another process' address space, one page at a time. + * Access another process' address space. + * Source/target buffer must be kernel space, + * Do not walk the page table directly, use get_user_pages */ -static int access_one_page(struct mm_struct * mm, struct vm_area_struct * vma, unsigned long addr, void *buf, int len, int write) -{ - pgd_t * pgdir; - pmd_t * pgmiddle; - pte_t * pgtable; - char *maddr; - struct page *page; - -repeat: - spin_lock(&mm->page_table_lock); - pgdir = pgd_offset(vma->vm_mm, addr); - if (pgd_none(*pgdir)) - goto fault_in_page; - if (pgd_bad(*pgdir)) - goto bad_pgd; - pgmiddle = pmd_offset(pgdir, addr); - if (pmd_none(*pgmiddle)) - goto fault_in_page; - if (pmd_bad(*pgmiddle)) - goto bad_pmd; - pgtable = pte_offset(pgmiddle, addr); - if (!pte_present(*pgtable)) - goto fault_in_page; - if (write && (!pte_write(*pgtable) || !pte_dirty(*pgtable))) - goto fault_in_page; - page = pte_page(*pgtable); - - /* ZERO_PAGE is special: reads from it are ok even though it's marked reserved */ - if (page != ZERO_PAGE(addr) || write) { - if ((!VALID_PAGE(page)) || PageReserved(page)) { - spin_unlock(&mm->page_table_lock); - return 0; - } - } - get_page(page); - spin_unlock(&mm->page_table_lock); - flush_cache_page(vma, addr); - if (write) { - maddr = kmap(page); - memcpy(maddr + (addr & ~PAGE_MASK), buf, len); - flush_dcache_page(page); - flush_page_to_ram(page); - flush_icache_page(vma, page); - kunmap(page); - } else { - maddr = kmap(page); - memcpy(buf, maddr + (addr & ~PAGE_MASK), len); - flush_page_to_ram(page); - kunmap(page); - } - put_page(page); - return len; - -fault_in_page: - spin_unlock(&mm->page_table_lock); - /* -1: out of memory. 0 - unmapped page */ - if (handle_mm_fault(mm, vma, addr, write) > 0) - goto repeat; - return 0; - -bad_pgd: - spin_unlock(&mm->page_table_lock); - pgd_ERROR(*pgdir); - return 0; - -bad_pmd: - spin_unlock(&mm->page_table_lock); - pmd_ERROR(*pgmiddle); - return 0; -} - -static int access_mm(struct mm_struct *mm, struct vm_area_struct * vma, unsigned long addr, void *buf, int len, int write) -{ - int copied = 0; - - for (;;) { - unsigned long offset = addr & ~PAGE_MASK; - int this_len = PAGE_SIZE - offset; - int retval; - - if (this_len > len) - this_len = len; - retval = access_one_page(mm, vma, addr, buf, this_len, write); - copied += retval; - if (retval != this_len) - break; - - len -= retval; - if (!len) - break; - - addr += retval; - buf += retval; - - if (addr < vma->vm_end) - continue; - if (!vma->vm_next) - break; - if (vma->vm_next->vm_start != vma->vm_end) - break; - - vma = vma->vm_next; - } - return copied; -} - int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write) { - int copied; struct mm_struct *mm; - struct vm_area_struct * vma; + struct vm_area_struct *vma; + struct page *page; + void *old_buf = buf; /* Worry about races with exit() */ task_lock(tsk); @@ -246,14 +143,42 @@ int access_process_vm(struct task_struct return 0; down_read(&mm->mmap_sem); - vma = find_extend_vma(mm, addr); - copied = 0; - if (vma) - copied = access_mm(mm, vma, addr, buf, len, write); + /* ignore errors, just check how much was sucessfully transfered */ + while (len) { + int bytes, ret, offset; + void *maddr; + + ret = get_user_pages(current, mm, addr, 1, + write, 1, &page, &vma); + if (ret <= 0) + break; + + bytes = len; + offset = addr & (PAGE_SIZE-1); + if (bytes > PAGE_SIZE-offset) + bytes = PAGE_SIZE-offset; + flush_cache_page(vma, addr); + + maddr = kmap(page); + if (write) { + memcpy(maddr + offset, buf, bytes); + flush_dcache_page(page); + flush_page_to_ram(page); + flush_icache_page(vma, page); + } else { + memcpy(buf, maddr + offset, bytes); + flush_page_to_ram(page); + } + kunmap(page); + put_page(page); + len -= bytes; + buf += bytes; + } up_read(&mm->mmap_sem); mmput(mm); - return copied; + + return buf - old_buf; } int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int len) Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.1.1.1.2.3 diff -u -3 -p -r1.1.1.1.2.3 memory.c --- mm/memory.c 2001/12/12 00:11:59 1.1.1.1.2.3 +++ mm/memory.c 2002/01/24 10:09:33 @@ -397,17 +397,16 @@ void zap_page_range(struct mm_struct *mm spin_unlock(&mm->page_table_lock); } - /* * Do a quick page-table lookup for a single page. */ -static struct page * follow_page(unsigned long address, int write) +static struct page * follow_page(struct mm_struct *mm, unsigned long address, int write) { pgd_t *pgd; pmd_t *pmd; pte_t *ptep, pte; - pgd = pgd_offset(current->mm, address); + pgd = pgd_offset(mm, address); if (pgd_none(*pgd) || pgd_bad(*pgd)) goto out; @@ -443,21 +442,74 @@ static inline struct page * get_page_map return page; } +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; + + 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; + } + + spin_lock(&mm->page_table_lock); + do { + struct page *map; + while (!(map = follow_page(mm, start, write))) { + spin_unlock(&mm->page_table_lock); + switch (handle_mm_fault(mm, vma, start, write)) { + case 1: + tsk->min_flt++; + break; + case 2: + tsk->maj_flt++; + break; + case 0: + if (i) return i; + return -EFAULT; + default: + if (i) return i; + return -ENOMEM; + } + spin_lock(&mm->page_table_lock); + } + if (pages) { + pages[i] = get_page_map(map); + /* FIXME: call the correct function, + * depending on the type of the found page + */ + if (pages[i]) + page_cache_get(pages[i]); + } + if (vmas) + vmas[i] = vma; + i++; + start += PAGE_SIZE; + len--; + } while(len && start < vma->vm_end); + spin_unlock(&mm->page_table_lock); + } while(len); + return i; +} + /* * Force in an entire range of pages from the current process's user VA, * and pin them in physical memory. */ - #define dprintk(x...) + int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t len) { - unsigned long ptr, end; - int err; + int pgcount, err; struct mm_struct * mm; - struct vm_area_struct * vma = 0; - struct page * map; - int i; - int datain = (rw == READ); /* Make sure the iobuf is not already mapped somewhere. */ if (iobuf->nr_pages) @@ -466,79 +518,37 @@ int map_user_kiobuf(int rw, struct kiobu mm = current->mm; dprintk ("map_user_kiobuf: begin\n"); - ptr = va & PAGE_MASK; - end = (va + len + PAGE_SIZE - 1) & PAGE_MASK; - err = expand_kiobuf(iobuf, (end - ptr) >> PAGE_SHIFT); + pgcount = (va + len + PAGE_SIZE - 1)/PAGE_SIZE - va/PAGE_SIZE; + /* mapping 0 bytes is not permitted */ + if (!pgcount) BUG(); + err = expand_kiobuf(iobuf, pgcount); if (err) return err; - down_read(&mm->mmap_sem); - - err = -EFAULT; iobuf->locked = 0; - iobuf->offset = va & ~PAGE_MASK; + iobuf->offset = va & (PAGE_SIZE-1); iobuf->length = len; - i = 0; - - /* - * First of all, try to fault in all of the necessary pages - */ - while (ptr < end) { - if (!vma || ptr >= vma->vm_end) { - vma = find_vma(current->mm, ptr); - if (!vma) - goto out_unlock; - if (vma->vm_start > ptr) { - if (!(vma->vm_flags & VM_GROWSDOWN)) - goto out_unlock; - if (expand_stack(vma, ptr)) - goto out_unlock; - } - if (((datain) && (!(vma->vm_flags & VM_WRITE))) || - (!(vma->vm_flags & VM_READ))) { - err = -EACCES; - goto out_unlock; - } - } - spin_lock(&mm->page_table_lock); - while (!(map = follow_page(ptr, datain))) { - int ret; - - spin_unlock(&mm->page_table_lock); - ret = handle_mm_fault(current->mm, vma, ptr, datain); - if (ret <= 0) { - if (!ret) - goto out_unlock; - else { - err = -ENOMEM; - goto out_unlock; - } - } - spin_lock(&mm->page_table_lock); - } - map = get_page_map(map); - if (map) { - flush_dcache_page(map); - page_cache_get(map); - } else - printk (KERN_INFO "Mapped page missing [%d]\n", i); - spin_unlock(&mm->page_table_lock); - iobuf->maplist[i] = map; - iobuf->nr_pages = ++i; - - ptr += PAGE_SIZE; - } - + /* Try to fault in all of the necessary pages */ + down_read(&mm->mmap_sem); + /* rw==READ means read from disk, write into memory area */ + err = get_user_pages(current, mm, va, pgcount, + (rw==READ), 0, iobuf->maplist, NULL); up_read(&mm->mmap_sem); + if (err < 0) { + unmap_kiobuf(iobuf); + dprintk ("map_user_kiobuf: end %d\n", err); + return err; + } + iobuf->nr_pages = err; + while (pgcount--) { + /* FIXME: flush superflous for rw==READ, + * probably wrong function for rw==WRITE + */ + flush_dcache_page(iobuf->maplist[pgcount]); + } dprintk ("map_user_kiobuf: end OK\n"); return 0; - - out_unlock: - up_read(&mm->mmap_sem); - unmap_kiobuf(iobuf); - dprintk ("map_user_kiobuf: end %d\n", err); - return err; } /* @@ -588,6 +598,9 @@ void unmap_kiobuf (struct kiobuf *iobuf) if (map) { if (iobuf->locked) UnlockPage(map); + /* FIXME: cache flush missing for rw==READ + * FIXME: call the correct reference counting function + */ page_cache_release(map); } } @@ -1026,16 +1039,10 @@ out_unlock: do_expand: limit = current->rlim[RLIMIT_FSIZE].rlim_cur; - if (limit != RLIM_INFINITY) { - if (inode->i_size >= limit) { - send_sig(SIGXFSZ, current, 0); - goto out; - } - if (offset > limit) { - send_sig(SIGXFSZ, current, 0); - offset = limit; - } - } + if (limit != RLIM_INFINITY && offset > limit) + goto out_sig; + if (offset > inode->i_sb->s_maxbytes) + goto out; inode->i_size = offset; out_truncate: @@ -1044,8 +1051,11 @@ out_truncate: inode->i_op->truncate(inode); unlock_kernel(); } -out: return 0; +out_sig: + send_sig(SIGXFSZ, current, 0); +out: + return -EFBIG; } /* @@ -1108,6 +1118,8 @@ static int do_swap_page(struct mm_struct ret = 2; } + mark_page_accessed(page); + lock_page(page); /* @@ -1178,6 +1190,7 @@ static int do_anonymous_page(struct mm_s flush_page_to_ram(page); entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); lru_cache_add(page); + mark_page_accessed(page); } set_pte(page_table, entry); @@ -1225,9 +1238,11 @@ static int do_no_page(struct mm_struct * */ if (write_access && !(vma->vm_flags & VM_SHARED)) { struct page * page = alloc_page(GFP_HIGHUSER); - if (!page) + if (!page) { + page_cache_release(new_page); return -1; - copy_highpage(page, new_page); + } + copy_user_highpage(page, new_page, address); page_cache_release(new_page); lru_cache_add(page); new_page = page; @@ -1416,23 +1431,19 @@ out: return pte_offset(pmd, address); } -/* - * Simplistic page force-in.. - */ int make_pages_present(unsigned long addr, unsigned long end) { - int write; - struct mm_struct *mm = current->mm; + int ret, len, write; struct vm_area_struct * vma; - vma = find_vma(mm, addr); + vma = find_vma(current->mm, addr); write = (vma->vm_flags & VM_WRITE) != 0; if (addr >= end) BUG(); - do { - if (handle_mm_fault(mm, vma, addr, write) < 0) - return -1; - addr += PAGE_SIZE; - } while (addr < end); - return 0; + if (end > vma->vm_end) + BUG(); + len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE; + ret = get_user_pages(current, current->mm, addr, + len, write, 0, NULL, NULL); + return ret == len ? 0 : -1; } -- |