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: David M. <Dav...@st...> - 2000-11-16 01:02:46
|
The RPMS we uploaded provide a C++ compiler. The SRPMS are also present if you want to built the whole thing from source. This should save you a lot of time! See http://linuxsh.sourceforge.net/docs/shrpm.php3 Cheers! -- Dave McKay Software Engineer STMicroelectronics Email: dav...@st... |
From: Jaswinder S. <jas...@ya...> - 2000-11-16 00:35:31
|
Dear yaegashi-san and others, I am not able to open framebuffer with your kernel with your config . Then i made in dev directory:- mknod fb0 c 29 0 ln -s fb fb0 but framebuffer is not working . Please let me know ,how you are using framebuffer in your X-server . i am also using same code as X-server. Thanks , Happy hacking!! Jaswinder. __________________________________________________ Do You Yahoo!? Yahoo! Calendar - Get organized for the holidays! http://calendar.yahoo.com/ |
From: Bryan R. <br...@ix...> - 2000-11-15 23:23:21
|
Hello, Has anybody successfully built a C++ compiler (into gcc, or as g++) based on the LinuxSH SourceForge gcc-core? If so, I would greatly appreciate any instructions you could provide regarding the proper way to do so. I know some of the needed directories are missing from the CVS archive (probably, to save space) so in theory I can just re-insert what's needed from gcc-2.95.2.tar.gz. I've tried doing this several times, with varying amounts of success, and even got an sh-linux-gnu-gcc w/ C++ support that worked for a while and then sort of mysteriously broke. Is this process documented somewhere? Thanks, Bryan -- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |
From: Mitch D. <md...@po...> - 2000-11-13 16:13:06
|
Hi everyone, Some of you might remember that in May, I sent some mail to the list saying I had joined Pocket Penguins. http://www.geocrawler.com/archives/3/3076/2000/5/0/3818679/ I was joined at the time by Greg Banks, who some of you know from the m17n2000 conference last March. Because of commercial sensitivity, we've not been able to talk about what we've been working on until now. Finally the time has come when we can share it with you. For the last ten weeks, Greg and I have been working pretty intensively on porting Linux to a Hitachi SH4-powered computer, the Industrial Digital Assistant. http://www.pocketpenguins.com/rockwell_ppi.html http://www.dmida.com It's been pretty intense for us - 60-90 hour weeks every week, and plenty of really really fun stuff for us to do. We've had our share of showstopper problems, but the Rockwell DataMyte people have bent over backwards to help us do this port, something almost unheard of in the Linux world. Also, a big thank you to all the people who have contributed to the Linux on SuperH project: Once we were able to load programs onto the board, it took just two days to get the core kernel and usermode programs running. Now *that's* portable! Our board now runs X-Windows, with a touchscreen, virtual keyboard and fvwm95. It has wireless networking, and today we ran it for nearly three hours and the battery was still more than half full. It's really cool to be able to surf SlashDot and other sites using the stylus!! Pocket Penguins recently ran advertisements in selected trade papers. FYI, I have attached one of the two that ran in the Nov '00 issue of Linux Journal. If anyone is visiting Comdex Las Vegas this year, you can see our handiwork at the Rockwell DataMyte stand, S1077. Regards, Mitch and Greg. |
From: Greg B. <gb...@po...> - 2000-11-13 13:31:12
|
"Studencki (external) Pawel" wrote: > > Hello, G'day Pawel Sorry about the delay replying; I've been very very busy. > 1) I'm going to buy some non volitale memory for my EBX7709 development > board working with SH3. > The memory has to be a PC-Card, because I want to connect it via PCMCIA > interface. In future it should be possible to mount a file system on this > FLASH Card. Could somebody recommend me such a FLASH memory? I think, there > are two main possibilities: > - Compact FLASH or > - FlashDrive We're using SanDisk 20MB PCMCIA ATA cards here. They work fine. > Which is easier to use with SH3? I hope to use an existing PCMCIA patches > for SH3 without porting any other drivers. > Could you share your experience with this problem? > > 2) With the same PCMCIA interface, I'm going to connect a network card > (NE2000 compatible). Does somebody works with similar hardware > configuration? Which kernel? do I have to use moduitls? We have a Socket Low-Power Ethernet PCMCIA card, it works fine. It's basically NE2000 compatible; the existing Linux driver code (pcnet_cs.o, ne2k.o, 8390.o) work without modification on our SH4. This is using a recent sourceforge CVS kernel (actually from 26 September). You *will* need to use modutils; the Linux pcmcia code relies on it (I found I couldn't compile it except as a module, but ymmv). Ask David McKay to post his SuperH port of modutils 2.3.7 and perhaps someone can port it to a more modern modutils. Greg. -- These are my opinions not PPIs. |
From: Philipp R. <pr...@pa...> - 2000-11-11 14:50:04
|
On Sat, Nov 11, 2000 at 10:59:04AM +0900, NIIBE Yutaka wrote: > Jesper Skov wrote: > > The below patch is based on an old patch from Philipp Rumpf. It allows > > the kernel to make unaligned access if it should happen to think that > > it a good thing to do. > > Thanks, installed. I think the patch leaves a security hole: if you put_user to an unaligned invalid address, the kernel will oops. The fix is something like (optimized for code size not speed) static inline void unaligned_memcpy(void *dst, void *src, int count, struct pt_regs *regs) { int failed; while(count--) { asm volatile(" 1: mov.b @(%2),%0 bra 4f 2: mov.b %0,@(%3) 3: mov #1,%1 4: .section __ex_table,\"a\" .long 1b,2b .previous" : "=r" (tmp), "=r" (failed) : "r" (dst++), "r" (src++), "0" (0), "1" (0)); if (failed) { die_if_no_fixup("invalid unaligned access", regs, ???); return; } } } (my apologies for the ugly code). An alternative fix, and one which I think I like better, is to try the search_exception_table before doing any unaligned handling - unaligned userspace pointers aren't the kernel's job to deal with. |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 06:49:52
|
Greg Banks writes: > > With new GCC, we have the flag -m4-nofpu, I will introduce this flag > > for SH-4 kernel to avoid using FPU for division. > > Excellent! But does this mean that usermode programs will continue > to use the FPU by stealth? Good point. Yes, for usermode, division uses FPU... What we want is actually -mno-fpudiv. -- |
From: Greg B. <gb...@po...> - 2000-11-11 06:38:10
|
NIIBE Yutaka wrote: > > With new GCC, we have the flag -m4-nofpu, I will introduce this flag > for SH-4 kernel to avoid using FPU for division. Excellent! But does this mean that usermode programs will continue to use the FPU by stealth? Greg. -- These are my opinions not PPIs. |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 06:17:32
|
Philipp Rumpf writes: > On Sat, Nov 11, 2000 at 11:34:48AM +0900, NIIBE Yutaka wrote: > > With new GCC, we have the flag -m4-nofpu, I will introduce this flag > > for SH-4 kernel to avoid using FPU for division. > > That is definitely the right thing to do Currently, -m4-nofpu doesn't works well. We need following patch for GCC. --- gcc-sh-linux-20001002/gcc/config/sh/linux.h~ Tue Nov 7 18:12:20 2000 +++ gcc-sh-linux-20001002/gcc/config/sh/linux.h Sat Nov 11 14:57:43 2000 @@ -43,9 +43,9 @@ #define CPP_SPEC \ "%{mb:-D__BIG_ENDIAN__} \ %{!mb:-D__LITTLE_ENDIAN__} \ - %{m3e:-D__SH3E__} \ %{m4:-D__SH4__} \ - %{!m3e:%{!m4:-D__SH3__ -D__sh3__}} \ + %{!m4:%{m4-nofpu:-D__SH4__ -D__SH4_NOFPU__}} \ + %{!m4:%{!m4-nofpu:-D__SH3__ -D__sh3__}} \ %{fPIC:-D__PIC__ -D__pic__} \ %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE} \ @@ -59,11 +59,11 @@ #undef CC1_SPEC #define CC1_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m4:%{!m4-nofpu:-m3}}" #undef CC1PLUS_SPEC #define CC1PLUS_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m4:%{!m4-nofpu:-m3}}" #undef LINK_SPEC #define LINK_SPEC \ -- |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 06:12:09
|
SEMI (the MIME interface of Emacs)... has been split up my message. :-( Here's original message without patche. -------------------------- It's better to have I/O functions API as same as 386 versions for better use of drivers. I tried to clean up I/O functions API. Here's the patch. Since we've already abused the meaning of the PORT and some port (SolutionEngine and HP6xx) requires more spaces than 16-bit, I leave port-type as "unsigned long". Except this, we have almost same API. 2000-11-11 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/io.c, arch/sh/kernel/io_generic.c, arch/sh/kernel/io_hd64461.c, arch/sh/kernel/io_hd64465.c, arch/sh/kernel/io_se.c, arch/sh/kernel/setup_hd64461.c, arch/sh/overdrive/io.c, include/asm-sh/io.h, include/asm-sh/io_generic.h, include/asm-sh/io_hd64461.h, include/asm-sh/io_hd64465.h, include/asm-sh/io_od.h, include/asm-sh/io_se.h, include/asm-sh/io_unknown.h, include/asm-sh/machvec.h: Clean up the API. arch/sh/kernel/process.c: Follow the change of I/O func. -- |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 05:37:13
|
It's better to have I/O functions API as same as 386 versions for better use of drivers. I tried to clean up I/O functions API. Here's the patch. Since we've already abused the meaning of the PORT and some port (SolutionEngine and HP6xx) requires more spaces than 16-bit, I leave port-type as "unsigned long". Except this, we have almost same API. 2000-11-11 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/io.c, arch/sh/kernel/io_generic.c, arch/sh/kernel/io_hd64461.c, arch/sh/kernel/io_hd64465.c, arch/sh/kernel/io_se.c, arch/sh/kernel/setup_hd64461.c, arch/sh/overdrive/io.c, include/asm-sh/io.h, include/asm-sh/io_generic.h, include/asm-sh/io_hd64461.h, include/asm-sh/io_hd64465.h, include/asm-sh/io_od.h, include/asm-sh/io_se.h, include/asm-sh/io_unknown.h, include/asm-sh/machvec.h: Clean up the API. arch/sh/kernel/process.c: Follow the change of I/O func. Index: arch/sh/kernel/io.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/io.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 io.c --- arch/sh/kernel/io.c 2000/10/16 05:03:30 1.3 +++ arch/sh/kernel/io.c 2000/11/11 05:25:56 @@ -10,13 +10,13 @@ #include <asm/io.h> #include <linux/module.h> -unsigned int _inb(unsigned long port) +unsigned char _inb(unsigned long port) { return __inb(port); } EXPORT_SYMBOL(_inb); -unsigned int _inw(unsigned long port) +unsigned short _inw(unsigned long port) { return __inw(port); } @@ -48,13 +48,13 @@ void _outl(unsigned int b, unsigned long EXPORT_SYMBOL(_outl); -unsigned int _inb_p(unsigned long port) +unsigned char _inb_p(unsigned long port) { return __inb_p(port); } EXPORT_SYMBOL(_inb_p); -unsigned int _inw_p(unsigned long port) +unsigned short _inw_p(unsigned long port) { return __inw_p(port); } @@ -110,25 +110,25 @@ void _outsl(unsigned long port, const vo } EXPORT_SYMBOL(_outsl); -unsigned long ___raw_readb(unsigned long addr) +unsigned char ___raw_readb(unsigned long addr) { return __readb(addr); } EXPORT_SYMBOL(___raw_readb); -unsigned long ___raw_readw(unsigned long addr) +unsigned short ___raw_readw(unsigned long addr) { return __readw(addr); } EXPORT_SYMBOL(___raw_readw); -unsigned long ___raw_readl(unsigned long addr) +unsigned int ___raw_readl(unsigned long addr) { return __readl(addr); } EXPORT_SYMBOL(___raw_readl); -unsigned long _readb(unsigned long addr) +unsigned char _readb(unsigned long addr) { unsigned long r = __readb(addr); mb(); @@ -136,7 +136,7 @@ unsigned long _readb(unsigned long addr) } EXPORT_SYMBOL(_readb); -unsigned long _readw(unsigned long addr) +unsigned short _readw(unsigned long addr) { unsigned long r = __readw(addr); mb(); @@ -144,7 +144,7 @@ unsigned long _readw(unsigned long addr) } EXPORT_SYMBOL(_readw); -unsigned long _readl(unsigned long addr) +unsigned int _readl(unsigned long addr) { unsigned long r = __readl(addr); mb(); Index: arch/sh/kernel/io_generic.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/io_generic.c,v retrieving revision 1.10 diff -u -3 -p -r1.10 io_generic.c --- arch/sh/kernel/io_generic.c 2000/10/27 02:36:06 1.10 +++ arch/sh/kernel/io_generic.c 2000/11/11 05:25:57 @@ -32,22 +32,22 @@ static inline void delay(void) ctrl_inw(0xa0000000); } -unsigned long generic_inb(unsigned int port) +unsigned char generic_inb(unsigned long port) { return *(volatile unsigned char*)PORT2ADDR(port); } -unsigned long generic_inw(unsigned int port) +unsigned short generic_inw(unsigned long port) { return *(volatile unsigned short*)PORT2ADDR(port); } -unsigned long generic_inl(unsigned int port) +unsigned int generic_inl(unsigned long port) { return *(volatile unsigned long*)PORT2ADDR(port); } -unsigned long generic_inb_p(unsigned int port) +unsigned char generic_inb_p(unsigned long port) { unsigned long v = *(volatile unsigned char*)PORT2ADDR(port); @@ -55,7 +55,7 @@ unsigned long generic_inb_p(unsigned int return v; } -unsigned long generic_inw_p(unsigned int port) +unsigned short generic_inw_p(unsigned long port) { unsigned long v = *(volatile unsigned short*)PORT2ADDR(port); @@ -63,7 +63,7 @@ unsigned long generic_inw_p(unsigned int return v; } -unsigned long generic_inl_p(unsigned int port) +unsigned int generic_inl_p(unsigned long port) { unsigned long v = *(volatile unsigned long*)PORT2ADDR(port); @@ -71,13 +71,13 @@ unsigned long generic_inl_p(unsigned int return v; } -void generic_insb(unsigned int port, void *buffer, unsigned long count) +void generic_insb(unsigned long port, void *buffer, unsigned long count) { unsigned char *buf=buffer; while(count--) *buf++=inb(port); } -void generic_insw(unsigned int port, void *buffer, unsigned long count) +void generic_insw(unsigned long port, void *buffer, unsigned long count) { unsigned short *buf=buffer; while(count--) *buf++=inw(port); @@ -86,7 +86,7 @@ void generic_insw(unsigned int port, voi #endif } -void generic_insl(unsigned int port, void *buffer, unsigned long count) +void generic_insl(unsigned long port, void *buffer, unsigned long count) { unsigned long *buf=buffer; while(count--) *buf++=inl(port); @@ -95,46 +95,46 @@ void generic_insl(unsigned int port, voi #endif } -void generic_outb(unsigned long b, unsigned int port) +void generic_outb(unsigned char b, unsigned long port) { *(volatile unsigned char*)PORT2ADDR(port) = b; } -void generic_outw(unsigned long b, unsigned int port) +void generic_outw(unsigned short b, unsigned long port) { *(volatile unsigned short*)PORT2ADDR(port) = b; } -void generic_outl(unsigned long b, unsigned int port) +void generic_outl(unsigned int b, unsigned long port) { *(volatile unsigned long*)PORT2ADDR(port) = b; } -void generic_outb_p(unsigned long b, unsigned int port) +void generic_outb_p(unsigned char b, unsigned long port) { *(volatile unsigned char*)PORT2ADDR(port) = b; delay(); } -void generic_outw_p(unsigned long b, unsigned int port) +void generic_outw_p(unsigned short b, unsigned long port) { *(volatile unsigned short*)PORT2ADDR(port) = b; delay(); } -void generic_outl_p(unsigned long b, unsigned int port) +void generic_outl_p(unsigned int b, unsigned long port) { *(volatile unsigned long*)PORT2ADDR(port) = b; delay(); } -void generic_outsb(unsigned int port, const void *buffer, unsigned long count) +void generic_outsb(unsigned long port, const void *buffer, unsigned long count) { const unsigned char *buf=buffer; while(count--) outb(*buf++, port); } -void generic_outsw(unsigned int port, const void *buffer, unsigned long count) +void generic_outsw(unsigned long port, const void *buffer, unsigned long count) { const unsigned short *buf=buffer; while(count--) outw(*buf++, port); @@ -143,7 +143,7 @@ void generic_outsw(unsigned int port, co #endif } -void generic_outsl(unsigned int port, const void *buffer, unsigned long count) +void generic_outsl(unsigned long port, const void *buffer, unsigned long count) { const unsigned long *buf=buffer; while(count--) outl(*buf++, port); @@ -193,7 +193,7 @@ void generic_iounmap(void *addr) } EXPORT_SYMBOL(generic_iounmap); -unsigned long generic_isa_port2addr(unsigned long offset) +unsigned long generic_isa_port2addr(unsigned short offset) { return offset + generic_io_base; } Index: arch/sh/kernel/io_hd64461.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/io_hd64461.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 io_hd64461.c --- arch/sh/kernel/io_hd64461.c 2000/08/01 01:43:05 1.4 +++ arch/sh/kernel/io_hd64461.c 2000/11/11 05:25:57 @@ -50,80 +50,80 @@ static inline void delay(void) ctrl_inw(0xa0000000); } -unsigned long hd64461_inb(unsigned int port) +unsigned char hd64461_inb(unsigned long port) { return *(volatile unsigned char*)PORT2ADDR(port); } -unsigned long hd64461_inb_p(unsigned int port) +unsigned char hd64461_inb_p(unsigned long port) { unsigned long v = *(volatile unsigned char*)PORT2ADDR(port); delay(); return v; } -unsigned long hd64461_inw(unsigned int port) +unsigned short hd64461_inw(unsigned long port) { return *(volatile unsigned short*)PORT2ADDR(port); } -unsigned long hd64461_inl(unsigned int port) +unsigned int hd64461_inl(unsigned long port) { return *(volatile unsigned long*)PORT2ADDR(port); } -void hd64461_insb(unsigned int port, void *buffer, unsigned long count) +void hd64461_insb(unsigned long port, void *buffer, unsigned long count) { unsigned char *buf=buffer; while(count--) *buf++=inb(port); } -void hd64461_insw(unsigned int port, void *buffer, unsigned long count) +void hd64461_insw(unsigned long port, void *buffer, unsigned long count) { unsigned short *buf=buffer; while(count--) *buf++=inw(port); } -void hd64461_insl(unsigned int port, void *buffer, unsigned long count) +void hd64461_insl(unsigned long port, void *buffer, unsigned long count) { unsigned long *buf=buffer; while(count--) *buf++=inl(port); } -void hd64461_outb(unsigned long b, unsigned int port) +void hd64461_outb(unsigned char b, unsigned long port) { *(volatile unsigned char*)PORT2ADDR(port) = b; } -void hd64461_outb_p(unsigned long b, unsigned int port) +void hd64461_outb_p(unsigned char b, unsigned long port) { *(volatile unsigned char*)PORT2ADDR(port) = b; delay(); } -void hd64461_outw(unsigned long b, unsigned int port) +void hd64461_outw(unsigned short b, unsigned long port) { *(volatile unsigned short*)PORT2ADDR(port) = b; } -void hd64461_outl(unsigned long b, unsigned int port) +void hd64461_outl(unsigned int b, unsigned long port) { *(volatile unsigned long*)PORT2ADDR(port) = b; } -void hd64461_outsb(unsigned int port, const void *buffer, unsigned long count) +void hd64461_outsb(unsigned long port, const void *buffer, unsigned long count) { const unsigned char *buf=buffer; while(count--) outb(*buf++, port); } -void hd64461_outsw(unsigned int port, const void *buffer, unsigned long count) +void hd64461_outsw(unsigned long port, const void *buffer, unsigned long count) { const unsigned short *buf=buffer; while(count--) outw(*buf++, port); } -void hd64461_outsl(unsigned int port, const void *buffer, unsigned long count) +void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count) { const unsigned long *buf=buffer; while(count--) outl(*buf++, port); Index: arch/sh/kernel/io_hd64465.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/io_hd64465.c,v retrieving revision 1.1 diff -u -3 -p -r1.1 io_hd64465.c --- arch/sh/kernel/io_hd64465.c 2000/10/12 07:29:21 1.1 +++ arch/sh/kernel/io_hd64465.c 2000/11/11 05:25:57 @@ -133,7 +133,7 @@ static inline void delay(void) ctrl_inw(0xa0000000); } -unsigned long hd64465_inb(unsigned int port) +unsigned char hd64465_inb(unsigned long port) { unsigned long addr = PORT2ADDR(port); unsigned long b = (addr == 0 ? 0 : *(volatile unsigned char*)addr); @@ -142,7 +142,7 @@ unsigned long hd64465_inb(unsigned int p return b; } -unsigned long hd64465_inb_p(unsigned int port) +unsigned char hd64465_inb_p(unsigned long port) { unsigned long v; unsigned long addr = PORT2ADDR(port); @@ -153,7 +153,7 @@ unsigned long hd64465_inb_p(unsigned int return v; } -unsigned long hd64465_inw(unsigned int port) +unsigned short hd64465_inw(unsigned long port) { unsigned long addr = PORT2ADDR(port); unsigned long b = (addr == 0 ? 0 : *(volatile unsigned short*)addr); @@ -161,31 +161,31 @@ unsigned long hd64465_inw(unsigned int p return b; } -unsigned long hd64465_inl(unsigned int port) +unsigned int hd64465_inl(unsigned long port) { unsigned long addr = PORT2ADDR(port); return (addr == 0 ? 0 : *(volatile unsigned long*)addr); } -void hd64465_insb(unsigned int port, void *buffer, unsigned long count) +void hd64465_insb(unsigned long port, void *buffer, unsigned long count) { unsigned char *buf=buffer; while(count--) *buf++=inb(port); } -void hd64465_insw(unsigned int port, void *buffer, unsigned long count) +void hd64465_insw(unsigned long port, void *buffer, unsigned long count) { unsigned short *buf=buffer; while(count--) *buf++=inw(port); } -void hd64465_insl(unsigned int port, void *buffer, unsigned long count) +void hd64465_insl(unsigned long port, void *buffer, unsigned long count) { unsigned long *buf=buffer; while(count--) *buf++=inl(port); } -void hd64465_outb(unsigned long b, unsigned int port) +void hd64465_outb(unsigned char b, unsigned long port) { unsigned long addr = PORT2ADDR(port); @@ -194,7 +194,7 @@ void hd64465_outb(unsigned long b, unsig *(volatile unsigned char*)addr = b; } -void hd64465_outb_p(unsigned long b, unsigned int port) +void hd64465_outb_p(unsigned char b, unsigned long port) { unsigned long addr = PORT2ADDR(port); @@ -204,7 +204,7 @@ void hd64465_outb_p(unsigned long b, uns delay(); } -void hd64465_outw(unsigned long b, unsigned int port) +void hd64465_outw(unsigned short b, unsigned long port) { unsigned long addr = PORT2ADDR(port); DIPRINTK(0, "outw(%04lx, %08lx)\n", b, addr); @@ -212,26 +212,26 @@ void hd64465_outw(unsigned long b, unsig *(volatile unsigned short*)addr = b; } -void hd64465_outl(unsigned long b, unsigned int port) +void hd64465_outl(unsigned int b, unsigned long port) { unsigned long addr = PORT2ADDR(port); if (addr != 0); *(volatile unsigned long*)addr = b; } -void hd64465_outsb(unsigned int port, const void *buffer, unsigned long count) +void hd64465_outsb(unsigned long port, const void *buffer, unsigned long count) { const unsigned char *buf=buffer; while(count--) outb(*buf++, port); } -void hd64465_outsw(unsigned int port, const void *buffer, unsigned long count) +void hd64465_outsw(unsigned long port, const void *buffer, unsigned long count) { const unsigned short *buf=buffer; while(count--) outw(*buf++, port); } -void hd64465_outsl(unsigned int port, const void *buffer, unsigned long count) +void hd64465_outsl(unsigned long port, const void *buffer, unsigned long count) { const unsigned long *buf=buffer; while(count--) outl(*buf++, port); Index: arch/sh/kernel/io_se.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/io_se.c,v retrieving revision 1.7 diff -u -3 -p -r1.7 io_se.c --- arch/sh/kernel/io_se.c 2000/07/31 12:25:56 1.7 +++ arch/sh/kernel/io_se.c 2000/11/11 05:25:57 @@ -43,7 +43,7 @@ port2adr(unsigned int port) } static inline int -shifted_port(unsigned int port) +shifted_port(unsigned long port) { /* For IDE registers, value is not shifted */ if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6) @@ -53,10 +53,10 @@ shifted_port(unsigned int port) } #define maybebadio(name,port) \ - printk("bad PC-like io %s for port 0x%x at 0x%08x\n", \ + printk("bad PC-like io %s for port 0x%lx at 0x%08x\n", \ #name, (port), (__u32) __builtin_return_address(0)) -unsigned long se_inb(unsigned int port) +unsigned char se_inb(unsigned long port) { if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) return *(__u8 *) (sh_pcic_io_wbase + 0x40000 + port); @@ -66,7 +66,7 @@ unsigned long se_inb(unsigned int port) return (*port2adr(port))&0xff; } -unsigned long se_inb_p(unsigned int port) +unsigned char se_inb_p(unsigned long port) { unsigned long v; @@ -80,7 +80,7 @@ unsigned long se_inb_p(unsigned int port return v; } -unsigned long se_inw(unsigned int port) +unsigned short se_inw(unsigned long port) { if (port >= 0x2000 || (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)) @@ -90,13 +90,13 @@ unsigned long se_inw(unsigned int port) return 0; } -unsigned long se_inl(unsigned int port) +unsigned int se_inl(unsigned long port) { maybebadio(inl, port); return 0; } -void se_outb(unsigned long value, unsigned int port) +void se_outb(unsigned char value, unsigned long port) { if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) *(__u8 *)(sh_pcic_io_wbase + port) = value; @@ -106,7 +106,7 @@ void se_outb(unsigned long value, unsign *(port2adr(port)) = value; } -void se_outb_p(unsigned long value, unsigned int port) +void se_outb_p(unsigned char value, unsigned long port) { if (sh_pcic_io_start <= port && port <= sh_pcic_io_stop) *(__u8 *)(sh_pcic_io_wbase + port) = value; @@ -117,7 +117,7 @@ void se_outb_p(unsigned long value, unsi delay(); } -void se_outw(unsigned long value, unsigned int port) +void se_outw(unsigned short value, unsigned long port) { if (port >= 0x2000 || (sh_pcic_io_start <= port && port <= sh_pcic_io_stop)) @@ -126,12 +126,12 @@ void se_outw(unsigned long value, unsign maybebadio(outw, port); } -void se_outl(unsigned long value, unsigned int port) +void se_outl(unsigned int value, unsigned long port) { maybebadio(outl, port); } -void se_insb(unsigned int port, void *addr, unsigned long count) +void se_insb(unsigned long port, void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); @@ -148,19 +148,19 @@ void se_insb(unsigned int port, void *ad } } -void se_insw(unsigned int port, void *addr, unsigned long count) +void se_insw(unsigned long port, void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); while (count--) *((__u16 *) addr)++ = *p; } -void se_insl(unsigned int port, void *addr, unsigned long count) +void se_insl(unsigned long port, void *addr, unsigned long count) { maybebadio(insl, port); } -void se_outsb(unsigned int port, const void *addr, unsigned long count) +void se_outsb(unsigned long port, const void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); @@ -177,29 +177,29 @@ void se_outsb(unsigned int port, const v } } -void se_outsw(unsigned int port, const void *addr, unsigned long count) +void se_outsw(unsigned long port, const void *addr, unsigned long count) { volatile __u16 *p = port2adr(port); while (count--) *p = *((__u16 *) addr)++; } -void se_outsl(unsigned int port, const void *addr, unsigned long count) +void se_outsl(unsigned long port, const void *addr, unsigned long count) { maybebadio(outsw, port); } -unsigned long se_readb(unsigned long addr) +unsigned char se_readb(unsigned long addr) { return *(volatile unsigned char*)addr; } -unsigned long se_readw(unsigned long addr) +unsigned short se_readw(unsigned long addr) { return *(volatile unsigned short*)addr; } -unsigned long se_readl(unsigned long addr) +unsigned int se_readl(unsigned long addr) { return *(volatile unsigned long*)addr; } Index: arch/sh/kernel/process.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/process.c,v retrieving revision 1.15 diff -u -3 -p -r1.15 process.c --- arch/sh/kernel/process.c 2000/11/11 01:10:25 1.15 +++ arch/sh/kernel/process.c 2000/11/11 05:25:57 @@ -93,7 +93,7 @@ void machine_power_off(void) void show_regs(struct pt_regs * regs) { printk("\n"); - printk("PC : %08lx SP : %08lx SR : %08lx TEA : %08lx\n", + printk("PC : %08lx SP : %08lx SR : %08lx TEA : %08x\n", regs->pc, regs->regs[15], regs->sr, ctrl_inl(MMU_TEA)); printk("R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n", regs->regs[0],regs->regs[1], Index: arch/sh/kernel/setup_hd64461.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/setup_hd64461.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 setup_hd64461.c --- arch/sh/kernel/setup_hd64461.c 2000/11/03 12:30:47 1.5 +++ arch/sh/kernel/setup_hd64461.c 2000/11/11 05:25:57 @@ -88,7 +88,7 @@ static struct hw_interrupt_type hd64461_ static void hd64461_interrupt(int irq, void *dev_id, struct pt_regs *regs) { printk(KERN_INFO - "HD64461: spurious interrupt, nirr: 0x%lx nimr: 0x%lx\n", + "HD64461: spurious interrupt, nirr: 0x%x nimr: 0x%x\n", inw(HD64461_NIRR), inw(HD64461_NIMR)); } cvs server: Diffing arch/sh/lib cvs server: Diffing arch/sh/mm cvs server: Diffing arch/sh/overdrive Index: arch/sh/overdrive/io.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/overdrive/io.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 io.c --- arch/sh/overdrive/io.c 2000/08/01 03:18:38 1.2 +++ arch/sh/overdrive/io.c 2000/11/11 05:25:57 @@ -30,38 +30,38 @@ #define io_addr(x) (((unsigned)(x))|PCI_GTIO_BASE) -unsigned long od_inb(unsigned int port) +unsigned char od_inb(unsigned long port) { dprintk("od_inb(%x)\n", port); return readb(io_addr(port)) & 0xff; } -unsigned long od_inw(unsigned int port) +unsigned short od_inw(unsigned long port) { dprintk("od_inw(%x)\n", port); return readw(io_addr(port)) & 0xffff; } -unsigned long od_inl(unsigned int port) +unsigned int od_inl(unsigned long port) { dprintk("od_inl(%x)\n", port); return readl(io_addr(port)); } -void od_outb(unsigned long value, unsigned int port) +void od_outb(unsigned char value, unsigned long port) { dprintk("od_outb(%x, %x)\n", value, port); writeb(value, io_addr(port)); } -void od_outw(unsigned long value, unsigned int port) +void od_outw(unsigned short value, unsigned long port) { dprintk("od_outw(%x, %x)\n", value, port); writew(value, io_addr(port)); } -void od_outl(unsigned long value, unsigned int port) +void od_outl(unsigned int value, unsigned long port) { dprintk("od_outl(%x, %x)\n", value, port); writel(value, io_addr(port)); @@ -71,10 +71,10 @@ dprintk("od_outl(%x, %x)\n", value, port #define IO_DELAY() udelay(10) #define OUT_DELAY(x) \ -void od_out##x##_p(unsigned long value,unsigned int port){out##x(value,port);IO_DELAY();} +void od_out##x##_p(unsigned long value,unsigned long port){out##x(value,port);IO_DELAY();} #define IN_DELAY(x) \ -unsigned long od_in##x##_p(unsigned int port) {unsigned long tmp=in##x(port);IO_DELAY();return tmp;} +unsigned long od_in##x##_p(unsigned long port) {unsigned long tmp=in##x(port);IO_DELAY();return tmp;} OUT_DELAY(b) @@ -87,7 +87,7 @@ IN_DELAY(l) /* Now for the string version of these functions */ -void od_outsb(unsigned port, const void *addr, unsigned long count) +void od_outsb(unsigned long port, const void *addr, unsigned long count) { int i; unsigned char *p = (unsigned char *) addr; @@ -98,7 +98,7 @@ void od_outsb(unsigned port, const void } -void od_insb(unsigned port, void *addr, unsigned long count) +void od_insb(unsigned long port, void *addr, unsigned long count) { int i; unsigned char *p = (unsigned char *) addr; @@ -115,7 +115,7 @@ void od_insb(unsigned port, void *addr, * is aligned */ -void od_outsw(unsigned port, const void *addr, unsigned long count) +void od_outsw(unsigned long port, const void *addr, unsigned long count) { int i; unsigned short tmp; @@ -128,7 +128,7 @@ void od_outsw(unsigned port, const void } -void od_insw(unsigned port, void *addr, unsigned long count) +void od_insw(unsigned long port, void *addr, unsigned long count) { int i; unsigned short tmp; @@ -142,7 +142,7 @@ void od_insw(unsigned port, void *addr, } -void od_outsl(unsigned port, const void *addr, unsigned long count) +void od_outsl(unsigned long port, const void *addr, unsigned long count) { int i; unsigned tmp; @@ -156,7 +156,7 @@ void od_outsl(unsigned port, const void } -void od_insl(unsigned port, void *addr, unsigned long count) +void od_insl(unsigned long port, void *addr, unsigned long count) { int i; unsigned tmp; Index: include/asm-sh/io.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/io.h,v retrieving revision 1.11 diff -u -3 -p -r1.11 io.h --- include/asm-sh/io.h 2000/11/11 02:15:02 1.11 +++ include/asm-sh/io.h 2000/11/11 05:25:58 @@ -127,40 +127,38 @@ #endif /* __KERNEL__ */ /* These are always function calls, in both kernel and user space */ -extern unsigned int _inb (unsigned long port); -extern unsigned int _inw (unsigned long port); +extern unsigned char _inb (unsigned long port); +extern unsigned short _inw (unsigned long port); extern unsigned int _inl (unsigned long port); -extern void _outb (unsigned char b,unsigned long port); -extern void _outw (unsigned short w,unsigned long port); -extern void _outl (unsigned int l,unsigned long port); -extern unsigned int _inb_p (unsigned long port); -extern unsigned int _inw_p (unsigned long port); +extern void _outb (unsigned char b, unsigned long port); +extern void _outw (unsigned short w, unsigned long port); +extern void _outl (unsigned int l, unsigned long port); +extern unsigned char _inb_p (unsigned long port); +extern unsigned short _inw_p (unsigned long port); extern unsigned int _inl_p (unsigned long port); -extern void _outb_p (unsigned char b,unsigned long port); -extern void _outw_p (unsigned short w,unsigned long port); -extern void _outl_p (unsigned int l,unsigned long port); +extern void _outb_p (unsigned char b, unsigned long port); +extern void _outw_p (unsigned short w, unsigned long port); +extern void _outl_p (unsigned int l, unsigned long port); extern void _insb (unsigned long port, void *dst, unsigned long count); extern void _insw (unsigned long port, void *dst, unsigned long count); extern void _insl (unsigned long port, void *dst, unsigned long count); extern void _outsb (unsigned long port, const void *src, unsigned long count); extern void _outsw (unsigned long port, const void *src, unsigned long count); extern void _outsl (unsigned long port, const void *src, unsigned long count); -extern unsigned long _readb(unsigned long addr); -extern unsigned long _readw(unsigned long addr); -extern unsigned long _readl(unsigned long addr); +extern unsigned char _readb(unsigned long addr); +extern unsigned short _readw(unsigned long addr); +extern unsigned int _readl(unsigned long addr); extern void _writeb(unsigned char b, unsigned long addr); extern void _writew(unsigned short b, unsigned long addr); extern void _writel(unsigned int b, unsigned long addr); #ifdef __KERNEL__ -extern unsigned long ___raw_readb(unsigned long addr); -extern unsigned long ___raw_readw(unsigned long addr); -extern unsigned long ___raw_readl(unsigned long addr); -extern unsigned long ___raw_readq(unsigned long addr); +extern unsigned char ___raw_readb(unsigned long addr); +extern unsigned short ___raw_readw(unsigned long addr); +extern unsigned int ___raw_readl(unsigned long addr); extern void ___raw_writeb(unsigned char b, unsigned long addr); extern void ___raw_writew(unsigned short b, unsigned long addr); extern void ___raw_writel(unsigned int b, unsigned long addr); -extern void ___raw_writeq(unsigned long b, unsigned long addr); #endif #ifdef __KERNEL__ @@ -292,20 +290,20 @@ extern void ___raw_writeq(unsigned long /* Userspace declarations. */ -extern unsigned int inb(unsigned long port); -extern unsigned int inw(unsigned long port); +extern unsigned char inb(unsigned long port); +extern unsigned short inw(unsigned long port); extern unsigned int inl(unsigned long port); -extern void outb(unsigned char b,unsigned long port); -extern void outw(unsigned short w,unsigned long port); -extern void outl(unsigned int l,unsigned long port); -extern void insb (unsigned long port, void *dst, unsigned long count); -extern void insw (unsigned long port, void *dst, unsigned long count); -extern void insl (unsigned long port, void *dst, unsigned long count); -extern void outsb (unsigned long port, const void *src, unsigned long count); -extern void outsw (unsigned long port, const void *src, unsigned long count); -extern void outsl (unsigned long port, const void *src, unsigned long count); -extern unsigned long readb(unsigned long addr); -extern unsigned long readw(unsigned long addr); +extern void outb(unsigned char b, unsigned long port); +extern void outw(unsigned short w, unsigned long port); +extern void outl(unsigned int l, unsigned long port); +extern void insb(unsigned long port, void *dst, unsigned long count); +extern void insw(unsigned long port, void *dst, unsigned long count); +extern void insl(unsigned long port, void *dst, unsigned long count); +extern void outsb(unsigned long port, const void *src, unsigned long count); +extern void outsw(unsigned long port, const void *src, unsigned long count); +extern void outsl(unsigned long port, const void *src, unsigned long count); +extern unsigned char readb(unsigned long addr); +extern unsigned short readw(unsigned long addr); extern unsigned long readl(unsigned long addr); extern void writeb(unsigned char b, unsigned long addr); extern void writew(unsigned short b, unsigned long addr); @@ -343,17 +341,17 @@ extern void memcpy_toio(unsigned long, c extern void memset_io(unsigned long, int, unsigned long); /* SuperH on-chip I/O functions */ -extern __inline__ unsigned long ctrl_inb(unsigned long addr) +extern __inline__ unsigned char ctrl_inb(unsigned long addr) { return *(volatile unsigned char*)addr; } -extern __inline__ unsigned long ctrl_inw(unsigned long addr) +extern __inline__ unsigned short ctrl_inw(unsigned long addr) { return *(volatile unsigned short*)addr; } -extern __inline__ unsigned long ctrl_inl(unsigned long addr) +extern __inline__ unsigned int ctrl_inl(unsigned long addr) { return *(volatile unsigned long*)addr; } Index: include/asm-sh/io_generic.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/io_generic.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 io_generic.h --- include/asm-sh/io_generic.h 2000/10/27 02:36:07 1.4 +++ include/asm-sh/io_generic.h 2000/11/11 05:25:59 @@ -14,31 +14,31 @@ extern unsigned long generic_io_base; -extern unsigned long generic_inb(unsigned int port); -extern unsigned long generic_inw(unsigned int port); -extern unsigned long generic_inl(unsigned int port); +extern unsigned char generic_inb(unsigned long port); +extern unsigned short generic_inw(unsigned long port); +extern unsigned int generic_inl(unsigned long port); -extern void generic_outb(unsigned long value, unsigned int port); -extern void generic_outw(unsigned long value, unsigned int port); -extern void generic_outl(unsigned long value, unsigned int port); +extern void generic_outb(unsigned char value, unsigned long port); +extern void generic_outw(unsigned short value, unsigned long port); +extern void generic_outl(unsigned int value, unsigned long port); -extern unsigned long generic_inb_p(unsigned int port); -extern unsigned long generic_inw_p(unsigned int port); -extern unsigned long generic_inl_p(unsigned int port); -extern void generic_outb_p(unsigned long value, unsigned int port); -extern void generic_outw_p(unsigned long value, unsigned int port); -extern void generic_outl_p(unsigned long value, unsigned int port); +extern unsigned char generic_inb_p(unsigned long port); +extern unsigned short generic_inw_p(unsigned long port); +extern unsigned int generic_inl_p(unsigned long port); +extern void generic_outb_p(unsigned char value, unsigned long port); +extern void generic_outw_p(unsigned short value, unsigned long port); +extern void generic_outl_p(unsigned int value, unsigned long port); -extern void generic_insb(unsigned int port, void *addr, unsigned long count); -extern void generic_insw(unsigned int port, void *addr, unsigned long count); -extern void generic_insl(unsigned int port, void *addr, unsigned long count); -extern void generic_outsb(unsigned int port, const void *addr, unsigned long count); -extern void generic_outsw(unsigned int port, const void *addr, unsigned long count); -extern void generic_outsl(unsigned int port, const void *addr, unsigned long count); +extern void generic_insb(unsigned long port, void *addr, unsigned long count); +extern void generic_insw(unsigned long port, void *addr, unsigned long count); +extern void generic_insl(unsigned long port, void *addr, unsigned long count); +extern void generic_outsb(unsigned long port, const void *addr, unsigned long count); +extern void generic_outsw(unsigned long port, const void *addr, unsigned long count); +extern void generic_outsl(unsigned long port, const void *addr, unsigned long count); -extern unsigned long generic_readb(unsigned long addr); -extern unsigned long generic_readw(unsigned long addr); -extern unsigned long generic_readl(unsigned long addr); +extern unsigned char generic_readb(unsigned long addr); +extern unsigned short generic_readw(unsigned long addr); +extern unsigned int generic_readl(unsigned long addr); extern void generic_writeb(unsigned char b, unsigned long addr); extern void generic_writew(unsigned short b, unsigned long addr); extern void generic_writel(unsigned int b, unsigned long addr); Index: include/asm-sh/io_hd64461.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/io_hd64461.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 io_hd64461.h --- include/asm-sh/io_hd64461.h 2000/10/12 07:29:21 1.4 +++ include/asm-sh/io_hd64461.h 2000/11/11 05:25:59 @@ -14,23 +14,23 @@ #include <asm/io_generic.h> -extern unsigned long hd64461_inb(unsigned int port); -extern unsigned long hd64461_inw(unsigned int port); -extern unsigned long hd64461_inl(unsigned int port); +extern unsigned char hd64461_inb(unsigned long port); +extern unsigned short hd64461_inw(unsigned long port); +extern unsigned int hd64461_inl(unsigned long port); -extern void hd64461_outb(unsigned long value, unsigned int port); -extern void hd64461_outw(unsigned long value, unsigned int port); -extern void hd64461_outl(unsigned long value, unsigned int port); +extern void hd64461_outb(unsigned char value, unsigned long port); +extern void hd64461_outw(unsigned short value, unsigned long port); +extern void hd64461_outl(unsigned int value, unsigned long port); |
From: Philipp R. <pr...@pa...> - 2000-11-11 05:27:10
|
On Sat, Nov 11, 2000 at 11:34:48AM +0900, NIIBE Yutaka wrote: > With new GCC, we have the flag -m4-nofpu, I will introduce this flag > for SH-4 kernel to avoid using FPU for division. That is definitely the right thing to do |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 02:34:51
|
Jesper Skov wrote: > If I'm not mistaken, the SH implementation of lazy FPU switching isn't > really lazy. It always saves the FPU state on a context switch: The meaning of "lazy" is different. If the process uses FPU, the state is saved at the context switch. Saved state is not re-loaded, until FPU is used again (this part is "lazy"). Well, in other word, current implementation does lazy re-loading of FPU state, while it doesn't do lazy saving. > I think the current implementation is probably due to being based on > the i386 where (apparently) there's no gain in lazy switching. There's gain: Reducing context switch time. > Probably would make sense to clear out the FPU when not used, > allowing the FPU circuitry to be powered down [if that's possible > in the SH4 CPUs]. AFAIK, there's no such power down mode for FPU? Is there? BTW, I have another plan. With new GCC, we have the flag -m4-nofpu, I will introduce this flag for SH-4 kernel to avoid using FPU for division. -- |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 01:59:08
|
Jesper Skov wrote: > The below patch is based on an old patch from Philipp Rumpf. It allows > the kernel to make unaligned access if it should happen to think that > it a good thing to do. Thanks, installed. > +call_dae: > + STI() I removed this STI(), though. The address error might be occurred in the region of interrupt disabled. > +#ifdef __BIG_ENDIAN And I changed to use __LITTLE_ENDIAN__ for the consistency of the other parts. -- |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 01:41:14
|
Philipp Rumpf wrote: > I just submitted a patch to sourceforge that changes our clock calibration > mechanism to calibrate the timer clock rather than the CPU clock; this > means it is more portable now (no assembly, and no CPU-specific constant); > it's also much faster (1/128 - 1/64 second rather than 1 - 2 seconds), > while not losing a lot of accuracy. Thanks. Installed. -- |
From: NIIBE Y. <gn...@ch...> - 2000-11-11 01:11:15
|
Jesper Skov wrote: > The below patch removes all use of $-prefixed register names. This is > necessary for the next version of binutils (as far as I know) and > should be harmless for the older versions - at least non-prefixed > register names get used a few places as well. > > Note that I also changed the varargs-macros to comply with the cpp > documentation (the old format is obsolete). This required the > -traditional flag to be removed when assembling the files via gcc. > > Jesper Thanks, installed. -- |
From: Stuart M. <Stu...@st...> - 2000-11-08 19:41:12
|
Peter It's working fine for me, using the RPMs from SourceForge and a test8 kernel. I suspect it is a problem with the C library you are using. Assuming you are using a reasonably modern C library implementation, when output is being sent to a terminal, it will normally be line buffered, so will be output when the puts() is called. However when you are redirecting output to a file, it will be fully buffered, so is normally output when the program exits (you won't be generating enough data to fill the buffer in these examples). I'm not sure what to suggest however. You could try explicitly calling fflush(stdout) to make sure this is what's happening. Also try using exit() to see if that works. I think we'd need to know which C library you are using to make any more progress. Stuart pe...@co... writes: > Hello folks, > > I got the problem about puts() function. > > ex: test.c > > #include <stdio.h> > main(){ > puts("Hello World\n"); > } > > in x86 platform: > > debian:/tmp# gcc -o test test.c > debian:/tmp# ./test > Hello World > debian:/tmp# ./test > output > debian:/tmp# cat output > Hello World > > > in SuperH platform: > > debian:/tmp# gcc -o test test.c > debian:/tmp# ./test > Hello World > debian:/tmp# ./test > output > debian:/tmp# cat output > debian:/tmp# (No output) > > I found all the program that use the puts() will cause the some problem in > shell script. The program 'basename' uses puts() to output the basename of > input string. Below is a piece of install-sh shell script. You will find > the result in '$dstfile' is emply below: > > dst=/usr/bin/cmp > dstfile=`basename $dst` > > If you have program 'basename', please test it. Thanks. > > > - PhantomCat > > -- > Peter Hung * Email : pe...@co... > Engineer @ Coventive Technologies * Phone : 886-919-616-535 > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > http://lists.sourceforge.net/mailman/listinfo/linuxsh-dev -- Stuart Menefy st...@in... SGS Thomson Microelectronics Ltd, Bristol or st...@br... ------------------------------------------------------------------------- Now I can't not speak for Inmos, I don't speak for SGS Thomson either.... |
From: Jesper S. <js...@re...> - 2000-11-08 08:09:57
|
>>>>> "Philipp" == Philipp Rumpf <pr...@pa...> writes: Philipp> I think the only valid reason for unaligned accesses is using Philipp> weird network protocols. Unless there really are people out Philipp> there relying on it I'd advise against integrating it in the Philipp> standard kernel (there might be security issues with Philipp> put/get_user). There is another issue; according to David Miller (proxy via David Woodhouse) illegal network packets may also cause unaligned access. If that is indeed the case, your system may well crash if a black hat decides to fsck with your system... Jesper |
From: Peter H. <pe...@co...> - 2000-11-08 06:11:17
|
Hello folks, I got the problem about puts() function. ex: test.c #include <stdio.h> main(){ puts("Hello World\n"); } in x86 platform: debian:/tmp# gcc -o test test.c debian:/tmp# ./test Hello World debian:/tmp# ./test > output debian:/tmp# cat output Hello World in SuperH platform: debian:/tmp# gcc -o test test.c debian:/tmp# ./test Hello World debian:/tmp# ./test > output debian:/tmp# cat output debian:/tmp# (No output) I found all the program that use the puts() will cause the some problem in shell script. The program 'basename' uses puts() to output the basename of input string. Below is a piece of install-sh shell script. You will find the result in '$dstfile' is emply below: dst=/usr/bin/cmp dstfile=`basename $dst` If you have program 'basename', please test it. Thanks. - PhantomCat -- Peter Hung * Email : pe...@co... Engineer @ Coventive Technologies * Phone : 886-919-616-535 |
From: Jaswinder S. <jas...@ya...> - 2000-11-08 01:55:06
|
Dear James Simmons, Thanks for your help :-) Best Regards, Jaswinder. --- James Simmons <jsi...@su...> wrote: > > > > Their exist support already for this (Guze > AHL-51S > > > touchscreen). This is > > > considered a input suite driver (/dev/event). > > > > Thanks , but where can i get sources and technical > > specs for such touchscreen , please tell me such > links > > on the net , if exists . > > Source is no problem. Our code is at > http://linuxconsole.sourceforge.net. > Docs I don't have. Vojtech I believe has the docs > for this driver. > I attached the driver. > __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one Place. http://shopping.yahoo.com/ |
From: Philipp R. <pr...@pa...> - 2000-11-08 01:44:54
|
On Wed, Nov 08, 2000 at 03:17:35AM +1100, Mitch Davis wrote: > Many moons ago I used a Unix that supported unaligned accesses so that > binaries from a previous version of the operating system would run. > While the programs ran successfully, the alignment faults caused > less than stellar performance. However if all you've got is binaries, > I guess it's the only choice. We don't support unaligned userspace accesses for userspace. All we're doing is to catch unaligned accesses caused by the network code when it deals with network protocols that make ip headers (for example) unaligned. > With the general prevalence of source code for Linux programs, and > no existing body of LinuxSH programs with unaligned access problems, > I would suggest that a good reason not to include the patch would be > so that we don't ever have buggy programs running silently but slowly. Removing the "!user_mode(regs)" check would indeed cause the problems you described. The other architectures don't do that, either. Philipp Rumpf |
From: James S. <jsi...@su...> - 2000-11-07 17:56:43
|
> > Their exist support already for this (Guze AHL-51S > > touchscreen). This is > > considered a input suite driver (/dev/event). > > Thanks , but where can i get sources and technical > specs for such touchscreen , please tell me such links > on the net , if exists . Source is no problem. Our code is at http://linuxconsole.sourceforge.net. Docs I don't have. Vojtech I believe has the docs for this driver. I attached the driver. |
From: Mitch D. <md...@po...> - 2000-11-07 16:20:15
|
Philipp Rumpf wrote: > > On Tue, Nov 07, 2000 at 03:15:20PM +0100, Jesper Skov wrote: > > The below patch is based on an old patch from Philipp Rumpf. It allows > > the kernel to make unaligned access if it should happen to think that > > it a good thing to do. > > I think the only valid reason for unaligned accesses is using weird > network protocols. Unless there really are people out there relying > on it I'd advise against integrating it in the standard kernel > (there might be security issues with put/get_user). Hello Jesper and Phillip, I'd like to thank you for doing this work for unaligned accesses. Many moons ago I used a Unix that supported unaligned accesses so that binaries from a previous version of the operating system would run. While the programs ran successfully, the alignment faults caused less than stellar performance. However if all you've got is binaries, I guess it's the only choice. With the general prevalence of source code for Linux programs, and no existing body of LinuxSH programs with unaligned access problems, I would suggest that a good reason not to include the patch would be so that we don't ever have buggy programs running silently but slowly. Regards, Mitch. |
From: Philipp R. <pr...@pa...> - 2000-11-07 15:12:07
|
On Tue, Nov 07, 2000 at 03:15:20PM +0100, Jesper Skov wrote: > The below patch is based on an old patch from Philipp Rumpf. It allows > the kernel to make unaligned access if it should happen to think that > it a good thing to do. I think the only valid reason for unaligned accesses is using weird network protocols. Unless there really are people out there relying on it I'd advise against integrating it in the standard kernel (there might be security issues with put/get_user). |
From: Jesper S. <js...@re...> - 2000-11-07 14:15:27
|
The below patch is based on an old patch from Philipp Rumpf. It allows the kernel to make unaligned access if it should happen to think that it a good thing to do. handle_unaligned got a bit ugly to look at. Somebody with nothing better to do could probably have some fun rewriting it :) Below the patch is the code I used to test the patch. It needs someone to eyeball the output to make sure it's sensible - oh, and you probably need some time to look at the test code to understand it, it's not exactly beautiful. Cheers, Jesper * arch/sh/kernel/traps.c: Added bad alignment handling, based on original code by Philipp Rumpf, bug fixed, and enhanced to handle r0-indexed access as well. * arch/sh/kernel/entry.S: Same. diff -urN --exclude-from=/home/jskov/lib/diff-excludes -P /opt/RH-linuxsh/LinuxSH/kernel/arch/sh/kernel/entry.S ./entry.S --- /opt/RH-linuxsh/LinuxSH/kernel/arch/sh/kernel/entry.S Fri Oct 27 13:27:41 2000 +++ ./entry.S Mon Nov 6 17:01:13 2000 @@ -199,6 +199,28 @@ 2: .long SYMBOL_NAME(__do_page_fault) 3: .long SYMBOL_NAME(do_page_fault) + .align 2 +address_error_load: + bra call_dae + mov #0,r5 ! writeaccess = 0 + + .align 2 +address_error_store: + bra call_dae + mov #1,r5 ! writeaccess = 1 + +call_dae: + STI() + mov.l 1f, r0 + mov.l @r0, r6 ! address + mov.l 2f, r0 + jmp @r0 + mov r15, r4 ! regs + + .align 2 +1: .long MMU_TEA +2: .long SYMBOL_NAME(do_address_error) + #if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS) .align 2 /* Unwind the stack and jmp to the debug entry */ @@ -833,8 +855,8 @@ .long initial_page_write .long tlb_protection_violation_load .long tlb_protection_violation_store - .long error ! address_error_load (filled by trap_init) - .long error ! address_error_store (filled by trap_init) + .long address_error_load + .long address_error_store #if defined(__SH4__) .long SYMBOL_NAME(do_fpu_error) #else diff -urN --exclude-from=/home/jskov/lib/diff-excludes -P /opt/RH-linuxsh/LinuxSH/kernel/arch/sh/kernel/traps.c ./traps.c --- /opt/RH-linuxsh/LinuxSH/kernel/arch/sh/kernel/traps.c Fri Oct 27 13:27:41 2000 +++ ./traps.c Tue Nov 7 12:49:30 2000 @@ -2,7 +2,8 @@ * * linux/arch/sh/traps.c * - * SuperH version: Copyright (C) 1999 Niibe Yutaka + * SuperH version: Copyright (C) 1999 Niibe Yutaka + * Copyright (C) 2000 Philipp Rumpf */ /* @@ -89,8 +90,126 @@ } } -DO_ERROR( 7, SIGSEGV, "address error (load)", address_error_load, current) -DO_ERROR( 8, SIGSEGV, "address error (store)", address_error_store, current) +static void handle_unaligned(u16 instruction, struct pt_regs *regs) +{ + int index, count; + unsigned long *rm, *rn; + unsigned char *src, *dst; + + index = (instruction>>8)&15; + rn = ®s->regs[index]; + + index = (instruction>>4)&15; + rm = ®s->regs[index]; + + count = 1<<(instruction&3); + + switch(instruction>>12) { + case 0: /* mov.[bwl] to/from memory via r0+rn */ + if (instruction & 8) { + /* from memory */ + src = (unsigned char*) *rm; + src += regs->regs[0]; + dst = (unsigned char*) rn; + *(unsigned long*)dst = 0; + +#ifdef __BIG_ENDIAN + dst += 4-count; + + memcpy(dst, src, count); + + if ((count == 2) && dst[2] & 0x80) { + dst[0] = 0xff; + dst[1] = 0xff; + } +#else + memcpy(dst, src, count); + + if ((count == 2) && dst[1] & 0x80) { + dst[2] = 0xff; + dst[3] = 0xff; + } +#endif + } else { + /* to memory */ + src = (unsigned char*) rm; +#ifdef __BIG_ENDIAN + src += 4-count; +#endif + dst = (unsigned char*) *rn; + dst += regs->regs[0]; + + memcpy(dst, src, count); + } + break; + + case 2: /* mov.[bwl] to memory, possibly with pre-decrement */ + if(instruction & 4) + *rn -= count; + src = (unsigned char*) rm; + dst = (unsigned char*) *rn; +#ifdef __BIG_ENDIAN + src += 4-count; +#endif + + memcpy(dst, src, count); + + break; + case 6: + /* mov.[bwl] from memory, possibly with post-increment */ + src = (unsigned char*) *rm; + if(instruction & 4) + *rm += count; + dst = (unsigned char*) rn; + *(unsigned long*)dst = 0; + +#ifdef __BIG_ENDIAN + dst += 4-count; + + memcpy(dst, src, count); + + if ((count == 2) && dst[2] & 0x80) { + dst[0] = 0xff; + dst[1] = 0xff; + } +#else + memcpy(dst, src, count); + + if ((count == 2) && dst[1] & 0x80) { + dst[2] = 0xff; + dst[3] = 0xff; + } +#endif + } + + regs->pc += 2; +} + +asmlinkage void do_address_error(struct pt_regs *regs, + unsigned long writeaccess, + unsigned long address) +{ + unsigned long error_code; + + asm volatile("stc r2_bank,%0": "=r" (error_code)); + + if(user_mode(regs)) { + sti(); + current->thread.error_code = error_code; + current->thread.trap_no = (writeaccess) ? 8 : 7; + force_sig(SIGSEGV, current); + } else { + u16 instruction; + + if(regs->pc & 1) + die("unaligned program counter", regs, error_code); + + instruction = *(u16 *)(regs->pc); + + handle_unaligned(instruction, regs); + } +} + DO_ERROR(12, SIGILL, "reserved instruction", reserved_inst, current) DO_ERROR(13, SIGILL, "illegal slot instruction", illegal_slot_inst, current) @@ -108,8 +227,6 @@ extern void *vbr_base; extern void *exception_handling_table[14]; - exception_handling_table[7] = (void *)do_address_error_load; - exception_handling_table[8] = (void *)do_address_error_store; exception_handling_table[12] = (void *)do_reserved_inst; exception_handling_table[13] = (void *)do_illegal_slot_inst; --------------------------- testing code ---------------------------- unsigned char tst[] = {0x00, 0x01, 0x02, 0x03, 0x80, 0x81, 0x82, 0x83}; unsigned char tst2[16]; #define LOAD(p) \ asm volatile ("mov.b @%3, %0; mov.w @%3, %1; mov.l @%3, %2;" \ : "=&r" (b), "=&r" (w), "=&r" (l) : "r" (p)); \ printk("b %08x w %08x l %08x\n", b, w, l); #define STORE(v, pw, pl) \ asm volatile ("mov.w %0, @%1; mov.l %0, @%2;" \ : : "r" (v), "r" (pw), "r" (pl)); #define LOADI(p, i) \ asm volatile ("mov.b @(r0,%3), %0; mov.w @(r0,%3), %1; mov.l @(r0,%3), %2;" \ : "=&r" (b), "=&r" (w), "=&r" (l) : "r" (p), "z" (i)); \ printk("b %08x w %08x l %08x\n", b, w, l); #define STOREI(v, pw, pl, i) \ asm volatile ("mov.w %0, @(r0,%1); mov.l %0, @(r0,%2);" \ : : "r" (v), "r" (pw), "r" (pl), "z" (i)); #define DUMP() \ printk("%02x %02x %02x %02x %02x %02x %02x %02x ", \ tst2[0], tst2[1], tst2[2], tst2[3], \ tst2[4], tst2[5], tst2[6], tst2[7]); \ printk("%02x %02x %02x %02x %02x %02x %02x %02x\n", \ tst2[8], tst2[9], tst2[10], tst2[11], \ tst2[12], tst2[13], tst2[14], tst2[15]); #define LOADP(p) \ asm volatile ("mov %4, %0; mov.l @%0+, %1; mov.w @%0+, %2; mov.b @%0+, %3;" \ : "=r" (tmp), "=&r" (l), "=&r" (w), "=&r" (b) : "r" (p)); \ printk("b %08x w %08x l %08x\n", b, w, l); #define STOREP(v, p) \ asm volatile ("mov %2,%0 ; mov.b %1,@-%2; mov.w %1,@-%2 ;mov.l %1, @-%2;" \ : "=r" (tmp) : "r" (v), "0" (p)); static void crashme(void) { unsigned char* p = tst; unsigned char* p2 = tst2; unsigned int b, w, l; unsigned long tmp; printk("@rm load test\n"); LOAD(p); LOAD(p+1); LOAD(p+2); LOAD(p+5); LOAD(p+6); printk("@rm store test\n"); STORE(0x11223344, p2+1, p2+5); DUMP(); STORE(0x55667788, p2+2, p2+6); DUMP(); STORE(0xaabbccdd, p2+3, p2+7); DUMP(); printk("@-rm+ store/load test\n"); STOREP(0x01020304, p2+7); LOADP(p2+7-7); DUMP(); STOREP(0x08090a0b, p2+8); LOADP(p2+8-7); DUMP(); STOREP(0x0c0d0e0f, p2+9); LOADP(p2+9-7); DUMP(); printk("r0,rx test, load\n"); LOADI(p, 1); LOADI(p, 2); LOADI(p, 3); printk("r0,rx test, store\n"); STOREI(0x11223344, p2, p2+4, 1); DUMP(); STOREI(0x55667788, p2, p2+4, 2); DUMP(); STOREI(0x99aabbcc, p2, p2+4, 3); DUMP(); for(;;); } |