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: Greg B. <gb...@po...> - 2000-09-27 04:57:57
|
Peter Hung wrote: > > Hello folks, G'day > > I am working on PCMCIA and other drivers now. Please inform me if you > find the bugs or do the same thing, thanks. :-) I've just uploaded to the Sourceforge patch manager a patch (101674) which contains my PCMCIA support code for the HD64465. I've even added an example machine vector entry for a HD64465-based `FOOBAR' machine, which you can use to add '65 support to your machine. A few minutes ago I was reading card CIS structures using this code; but be warned it's still a work in progress (e.g. IO port remapping is not tested). Please note, you will probably need David McKay's modutils patch. I've only run these as modules. BTW, I have more 64465 support code which I can't release yet. Sorry. https://sourceforge.net/patch/?func=detailpatch&patch_id=101674&group_id=2682 Enjoy, Greg -- These are my opionions not PPIs. |
From: NIIBE Y. <gn...@ch...> - 2000-09-27 02:34:21
|
According to the manual setting of SCFCR register should be done, after the SCBRR register setting. So, I think following patch is needed. I didn't tested this well. I need your feedback. I try this as I have serial troubles in 115200 with my dreamcast. I hope this makes sence... Not committed yet. 2000-09-27 NIIBE Yutaka <gn...@m1...> * drivers/char/sh-sci.c (sci_set_termios_cflag): Call init_pins AFTER setting baud. Index: drivers/char/sh-sci.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/char/sh-sci.c,v retrieving revision 1.21 diff -u -p -r1.21 sh-sci.c --- drivers/char/sh-sci.c 2000/09/17 18:59:32 1.21 +++ drivers/char/sh-sci.c 2000/09/27 02:27:40 @@ -381,10 +381,9 @@ static void sci_set_termios_cflag(struct if (cflag & CSTOPB) smr_val |= 0x08; sci_out(port, SCSMR, smr_val); + sci_set_baud(port, baud); port->init_pins(port, cflag); - - sci_set_baud(port, baud); sci_out(port, SCSCR, SCSCR_INIT(port)); } |
From: NIIBE Y. <gn...@ch...> - 2000-09-27 00:42:10
|
Bryan Rittmeyer wrote: > Here's a proposed patch against the latest LinuxSH CVS kernel's > sh_ksyms.c: Thanks a lot. > +/* these are not provided by arch/sh/lib/*.S but are > + potentially needed by modules (af_packet.o/unix.o > + use memcmp, for instance) */ > +EXPORT_SYMBOL(memcmp); > +EXPORT_SYMBOL(memscan); > + > +/* needed by some modules */ > +EXPORT_SYMBOL(flush_dcache_page); I think that "memscan" is bogus here, as we define memscan==>memchr in asm-sh/string.h, isn't it? Except that, all is OK. -- |
From: Bryan R. <br...@ix...> - 2000-09-26 22:03:32
|
Mitch Davis wrote: [regarding unresolved symbols when loading SH modules] > I compiled his version (based on modutils 2.3.7) and had > the same problem. I fixed it quite simply by adding > these lines to arch/sh/kernel/sh_ksyms.c: > > #include <asm/pgtable.h> > > EXPORT_SYMBOL(flush_dcache_page); > > EXPORT_SYMBOL(memset); > EXPORT_SYMBOL(memcpy); > > (I don't know if this is the way to really fix it - simply > does not imply correctly!) A look in arch/arm/kernel/armksyms.c suggests that it is sh_ksyms.c responsibility to export mem routines--whether or not we have fast assembly code for them in arch/sh/lib/*.S Here's a proposed patch against the latest LinuxSH CVS kernel's sh_ksyms.c: ----- --- sh_ksyms-orig.c Tue Sep 26 13:46:27 2000 +++ sh_ksyms.c Tue Sep 26 14:35:22 2000 @@ -17,6 +17,7 @@ #include <asm/hardirq.h> #include <asm/delay.h> #include <asm/irq.h> +#include <asm/pgtable.h> extern void dump_thread(struct pt_regs *, struct user *); extern int dump_fpu(elf_fpregset_t *); @@ -36,6 +37,21 @@ EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); EXPORT_SYMBOL(strlen); + +/* mem exports */ +EXPORT_SYMBOL(memcpy); +EXPORT_SYMBOL(memset); +EXPORT_SYMBOL(memmove); + +/* these are not provided by arch/sh/lib/*.S but are + potentially needed by modules (af_packet.o/unix.o + use memcmp, for instance) */ +EXPORT_SYMBOL(memcmp); +EXPORT_SYMBOL(memscan); + +/* needed by some modules */ +EXPORT_SYMBOL(flush_dcache_page); #ifdef CONFIG_VT ----- I think this patch should go into the main CVS tree ASAP since without these symbols it is impossible to load most kernel source modules! (almost all of them use some mem* routines) With my patch, dummy.o ramfs.o unix.o and af_packet.o all load (and appear to function) correctly: /lib/modules # uname -a Linux (none) 2.4.0-test9 #6 Tue Sep 26 14:48:06 PDT 2000 sh4 unknown /lib/modules # lsmod Module Size Used by ixdma 1676 0 (unused) ramfs 2548 0 (unused) dummy 1164 0 (unused) af_packet 9596 0 (unused) unix 16260 0 (unused) Comments Niibe-san? Regards, Bryan -- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |
From: NIIBE Y. <gn...@ch...> - 2000-09-26 02:04:41
|
Back from LK2000. It was really good opportunity for me to meet people. With Takeshi's great help, I've done the demonstration of booting Linux on Dreamcast. I execed GNU Emacs on my CqREEK SH-3, while exceced your favorite "vi" on Dreamcast. NIIBE Yutaka wrote: > I've just incorporate changes of test9-pre2, and commit. And found > that it's not stable. I guess that this is because of the changes of > MM system. Please don't update if you care. With test9-pre7, it seems it's got fixed. I see no problem with SolutionEngine SH-4 with "mem=4M" setting. Please try it out. -- |
From: Mitch D. <mj...@al...> - 2000-09-23 07:25:59
|
>Mitch Davis wrote: > >> I would like to be able to use kernel modules with >> the latest 2.4.x kernel. Does anyone know how >> to do this? > >Hi Mitch, > >I wrote a insmod.c patch for the BusyBox project which enables their >insmod to load SH modules. It seems to work OK with my module code, but >it complains about some symbols not being availible if I try to load >modules built from the kernel sources (af_packet, ramfs, dummy, >etc)--usually it's memset, memcpy, etc but sometimes flush_dcache_page >is also unresolved. I'm not sure if this is a problem with my patch or >with the kernel code, but if you want to give it a shot: Thanks Bryan, I really appreciate that. Actually, David McKay also sent me his version, which was great. I compiled his version (based on modutils 2.3.7) and had the same problem. I fixed it quite simply by adding these lines to arch/sh/kernel/sh_ksyms.c: #include <asm/pgtable.h> EXPORT_SYMBOL(flush_dcache_page); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memcpy); (I don't know if this is the way to really fix it - simply does not imply correctly!) I too compiled busybox this evening. Wow, it's truly impressive! >CVS kernel code. Did the module interface change between 2.2 and 2.4, >causing modutils-2.1.121 to have trouble loading 2.4 modules? (I based >my patch on an SH patch for 2.1.121). Yes I'm fairly sure it did. Anyway, my thanks again to you and David. Regards, Mitch. http://www.alphalink.com.au/ |
From: Bryan R. <br...@ix...> - 2000-09-22 19:10:29
|
Mitch Davis wrote: > Hi folks, > > I would like to be able to use kernel modules with > the latest 2.4.x kernel. Does anyone know how > to do this? Hi Mitch, I wrote a insmod.c patch for the BusyBox project which enables their insmod to load SH modules. It seems to work OK with my module code, but it complains about some symbols not being availible if I try to load modules built from the kernel sources (af_packet, ramfs, dummy, etc)--usually it's memset, memcpy, etc but sometimes flush_dcache_page is also unresolved. I'm not sure if this is a problem with my patch or with the kernel code, but if you want to give it a shot: http://foobar.caltech.edu/linuxsh4/insmod-sh4.diff That's a patch against the latest insmod.c off of busybox.lineo.com CVS. lsmod and rmmod are not architecture dependent AFAIK. I am also interested in seeing a patch against the latest modutils, especially if it has no trouble loading modules built from the LinuxSH CVS kernel code. Did the module interface change between 2.2 and 2.4, causing modutils-2.1.121 to have trouble loading 2.4 modules? (I based my patch on an SH patch for 2.1.121). Regards, Bryan -- Bryan Rittmeyer mailto:br...@ix... Ixia Communications 26601 W. Agoura Rd. Calabasas, CA 91302 |
From: David M. <Dav...@st...> - 2000-09-22 08:54:56
|
On Sep 22, 2:17pm, mj...@al... wrote: > Subject: [linuxsh-dev] SuperH modutils for 2.4 kernels? > > Hi folks, > > Does anyone have modules working with the 2.4 kernel? Yes, I've got them working fine. Earlier kernels had problems with vmalloc which meant that the module loading didn't work very well, but everything has been ok for a while now. I'll try to dig out the patches for you, I think it was against modutils 2.3.7 Cheers! -- Dave McKay Software Engineer STMicroelectronics Email: dav...@st... |
From: Mitch D. <mj...@al...> - 2000-09-22 03:17:58
|
Hi folks, I would like to be able to use kernel modules with the latest 2.4.x kernel. Does anyone know how to do this? I understand that modutils needs to be customised for each particular architecture. I found Kojima-san's patch against modutils 2.1.121, but things have changed since then, and it doesn't work with modutils 2.3.16. Does anyone have modules working with the 2.4 kernel? Many thanks, Mitch. http://www.alphalink.com.au/ |
From: Peter H. <pe...@xl...> - 2000-09-19 13:25:01
|
Hello folks, I had uploaded some patches for one platform named CallistoPro. It was designed by Hitach Taiwan with CPU SuperH-4 and intelligent peripheral controller HD64463. The basic input (PS/2 keyboard) and output (VGA framebuffer) is working now. Please try these patches if you have the same platform. I am working on PCMCIA and other drivers now. Please inform me if you find the bugs or do the same thing, thanks. :-) - PhantomCat -- Peter Hung * Email : pe...@xl... Engineer @ XLinux Inc. * Phone : 886-919-616-535 |
From: NIIBE Y. <gn...@ch...> - 2000-09-18 07:12:27
|
I've just incorporate changes of test9-pre2, and commit. And found that it's not stable. I guess that this is because of the changes of MM system. Please don't update if you care. -- |
From: Tomoyoshi A. <as...@li...> - 2000-09-18 06:42:54
|
Hello YAEGASHI-san, I use this patch for SMSC LAN91C100FD on HSA ASPEN board. This patch is for linux-2.2.17. I think this patch has almost the same as your patch. Thanks, Tom -- On Mon, 18 Sep 2000 15:11:41 +0900 YAEGASHI Takeshi <yae...@ma...> wrote: > smc9194.c is known not to work well on SuperH because of its > unaligned memory access. This change seems to be enough for my > own SH-4 board. > > I believe here are many users of this driver. Any comments? > > -- > YAEGASHI Takeshi <yae...@ma...> > > > Index: drivers/net/smc9194.c > =================================================================== > RCS file: /cvsroot/thorondor/kernel/drivers/net/smc9194.c,v > retrieving revision 1.1.1.5 > retrieving revision 1.2 > diff -u -r1.1.1.5 -r1.2 > --- drivers/net/smc9194.c 2000/09/02 16:01:29 1.1.1.5 > +++ drivers/net/smc9194.c 2000/09/17 00:59:53 1.2 > @@ -87,7 +87,11 @@ > . Do you want to use 32 bit xfers? This should work on all chips, as > . the chipset is designed to accommodate them. > */ > +#ifdef __sh__ > +#undef USE_32_BIT > +#else > #define USE_32_BIT 1 > +#endif > > /* > .the SMC9194 can be at any of the following port addresses. To change, > @@ -1405,13 +1409,11 @@ > packet_length & 0x3 ); > #else > PRINTK3((" Reading %d words and %d byte(s) \n", > - (packet_length >> 1 ), packet_length & 1 ); > - if ( packet_length & 1 ) > - *(data++) = inb( ioaddr + DATA_1 ); > - insw(ioaddr + DATA_1 , data, (packet_length + 1 ) >> 1); > + (packet_length >> 1 ), packet_length & 1 )); > + insw(ioaddr + DATA_1 , data, packet_length >> 1); > if ( packet_length & 1 ) { > data += packet_length & ~1; > - *((data++) = inb( ioaddr + DATA_1 ); > + *(data++) = inb( ioaddr + DATA_1 ); > } > #endif > #if SMC_DEBUG > 2 > _______________________________________________ > linuxsh-dev mailing list > lin...@li... > http://lists.sourceforge.net/mailman/listinfo/linuxsh-dev |
From: YAEGASHI T. <yae...@ma...> - 2000-09-18 06:12:07
|
smc9194.c is known not to work well on SuperH because of its unaligned memory access. This change seems to be enough for my own SH-4 board. I believe here are many users of this driver. Any comments? -- YAEGASHI Takeshi <yae...@ma...> Index: drivers/net/smc9194.c =================================================================== RCS file: /cvsroot/thorondor/kernel/drivers/net/smc9194.c,v retrieving revision 1.1.1.5 retrieving revision 1.2 diff -u -r1.1.1.5 -r1.2 --- drivers/net/smc9194.c 2000/09/02 16:01:29 1.1.1.5 +++ drivers/net/smc9194.c 2000/09/17 00:59:53 1.2 @@ -87,7 +87,11 @@ . Do you want to use 32 bit xfers? This should work on all chips, as . the chipset is designed to accommodate them. */ +#ifdef __sh__ +#undef USE_32_BIT +#else #define USE_32_BIT 1 +#endif /* .the SMC9194 can be at any of the following port addresses. To change, @@ -1405,13 +1409,11 @@ packet_length & 0x3 ); #else PRINTK3((" Reading %d words and %d byte(s) \n", - (packet_length >> 1 ), packet_length & 1 ); - if ( packet_length & 1 ) - *(data++) = inb( ioaddr + DATA_1 ); - insw(ioaddr + DATA_1 , data, (packet_length + 1 ) >> 1); + (packet_length >> 1 ), packet_length & 1 )); + insw(ioaddr + DATA_1 , data, packet_length >> 1); if ( packet_length & 1 ) { data += packet_length & ~1; - *((data++) = inb( ioaddr + DATA_1 ); + *(data++) = inb( ioaddr + DATA_1 ); } #endif #if SMC_DEBUG > 2 |
From: NIIBE Y. <gn...@ch...> - 2000-09-18 05:11:56
|
I've mistakenly removed the definitionn of flush_cache_page (the function for flushing the cache for user space), which is reverted. And as Documentation/cachetlb.txt says, now is the transition time from flush_page_to_ram to copy_user_page/clear_user_page/flush_dcache_page. I've implement copy_user_page and clear_user_page. 2000-09-18 NIIBE Yutaka <gn...@m1...> Follow new cache handling scheme. Because now is the transition time (I think it's not fully changed to use "flush_dcache_page"), let's leave flush_page_to_ram. * arch/sh/mm/cache.c (clear_user_page, copy_user_page): Implemented. (__flush_page_to_ram): New function. (flush_page_to_ram): Use __flush_page_to_ram. * include/asm-sh/page.h (clear_user_page, copy_user_page): Define function for SH-4. Revert the changes of 2000-09-09. * arch/sh/mm/cache.c (flush_cache_page): Reverted. * include/asm-sh/pgtable.h (flush_cache_page): Ditto. Index: arch/sh/mm/cache.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/mm/cache.c,v retrieving revision 1.20 diff -u -r1.20 cache.c --- arch/sh/mm/cache.c 2000/09/09 01:49:39 1.20 +++ arch/sh/mm/cache.c 2000/09/18 05:04:57 @@ -354,6 +354,39 @@ } /* + * Write back and invalidate D-caches for the page. + * + * ADDR: Virtual Address (U0 address) + * + * NOTE: We need to flush the _physical_ page entry. + * Flushing the cache lines for U0 only isn't enough. + * We need to flush for P1 too, which may contain aliases. + */ +void flush_cache_page(struct vm_area_struct *vma, unsigned long addr) +{ + pgd_t *dir; + pmd_t *pmd; + pte_t *pte; + pte_t entry; + unsigned long phys; + struct page *pg; + + dir = pgd_offset(vma->vm_mm, addr); + pmd = pmd_offset(dir, addr); + if (pmd_none(*pmd)) + return; + if (pmd_bad(*pmd)) + return; + pte = pte_offset(pmd, addr); + entry = *pte; + if (pte_none(entry) || !pte_present(entry)) + return; + phys = pte_val(entry)&PAGE_MASK; + pg = virt_to_page(__va(phys)); + flush_dcache_page(pg); +} + +/* * Write-back & invalidate the cache. * * After accessing the memory from kernel space (P1-area), we need to @@ -362,12 +395,12 @@ * We search the D-cache to see if we have the entries corresponding to * the page, and if found, write back them. */ -void flush_page_to_ram(struct page *pg) +void __flush_page_to_ram(void *kaddr) { unsigned long phys, addr, data, i; /* Physical address of this page */ - phys = (pg - mem_map)*PAGE_SIZE + __MEMORY_START; + phys = PHYSADDR(kaddr); jump_to_P2(); /* Loop all the D-cache */ @@ -382,6 +415,15 @@ back_to_P1(); } +void flush_page_to_ram(struct page *pg) +{ + unsigned long phys; + + /* Physical address of this page */ + phys = (pg - mem_map)*PAGE_SIZE + __MEMORY_START; + __flush_page_to_ram(phys_to_virt(phys)); +} + /* * Check entries of the I-cache & D-cache of the page. * (To see "alias" issues) @@ -437,5 +479,22 @@ dump_stack(); printk("--------------------\n"); } +} + +/* Page is 4K, OC size is 16K, there are four lines. */ +#define CACHE_ALIAS 0x00003000 + +void clear_user_page(void *to, unsigned long address) +{ + clear_page(to); + if (((address ^ (unsigned long)to) & CACHE_ALIAS)) + __flush_page_to_ram(to); +} + +void copy_user_page(void *to, void *from, unsigned long address) +{ + copy_page(to, from); + if (((address ^ (unsigned long)to) & CACHE_ALIAS)) + __flush_page_to_ram(to); } #endif Index: include/asm-sh/page.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/page.h,v retrieving revision 1.4 diff -u -r1.4 page.h --- include/asm-sh/page.h 2000/08/16 08:34:06 1.4 +++ include/asm-sh/page.h 2000/09/18 05:04:58 @@ -26,8 +26,14 @@ #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE) + +#if defined(__sh3__) #define clear_user_page(page, vaddr) clear_page(page) #define copy_user_page(to, from, vaddr) copy_page(to, from) +#elif defined(__SH4__) +extern void clear_user_page(void *to, unsigned long address); +extern void copy_user_page(void *to, void *from, unsigned long address); +#endif /* * These are used to make use of C type-checking.. Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/pgtable.h,v retrieving revision 1.11 diff -u -r1.11 pgtable.h --- include/asm-sh/pgtable.h 2000/09/09 01:49:40 1.11 +++ include/asm-sh/pgtable.h 2000/09/18 05:04:59 @@ -47,7 +47,7 @@ extern void flush_cache_mm(struct mm_struct *mm); extern void flush_cache_range(struct mm_struct *mm, unsigned long start, unsigned long end); -#define flush_cache_page(vma, vmaddr) do { } while (0) +extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr); extern void flush_page_to_ram(struct page *page); extern void flush_dcache_page(struct page *pg); extern void flush_icache_range(unsigned long start, unsigned long end); Index: mm/vmscan.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/mm/vmscan.c,v retrieving revision 1.13 diff -u -r1.13 vmscan.c --- mm/vmscan.c 2000/09/04 06:41:54 1.13 +++ mm/vmscan.c 2000/09/18 05:05:05 @@ -138,7 +138,6 @@ * * That would get rid of a lot of problems. */ - flush_page_to_ram(page); flush_cache_page(vma, address); if (vma->vm_ops && (swapout = vma->vm_ops->swapout)) { int error; |
From: Santosh E. <sa...@so...> - 2000-09-14 10:46:14
|
Hello, I am studying the interrupt handling part of Linux on SH3 and have the foll doubts 1.In entry.S the interrupt vector table is filled with do_IRQ. How is this called and where are the arguments to do_IRQ initialized. Where is the r2_bank register initialized with IRQ no?(used in irq.c do_IRQ routine) 2.In entry.S restore_all routine g_imask (r6 ) is used to calculate IMASK. Where is this initialized? I saw that k_g_imask is initialized in arch/sh/kernel/head.S r6_bank is initialized to zero =>Global interrupt mask but could not find for g_imask 3.what is the significance of INTEVT and INTEVT2? In entry.S INTEVT is set to INTEVT2 addr! But from the IRQ table i see that for certain interrupts INTEVT has the same code but INTEVT2 has a different code? So should not both be used to get the interrupt code? 4. what is softirq,hardirq,tasklets? My understanding is that hardirq refers to peripheral IRQ softirq refers to software IRQ used for bottom half handling tasklets are used for SMP systems to run softIRQ on different CPU's simultaneously Is this correct? Thanks -- Santosh Eraniose ----------------------------------------------- Member Technical Sony Software Architecture Lab Bangalore ----------------------------------------------- |
From: NIIBE Y. <gn...@ch...> - 2000-09-13 01:02:58
|
Jesper Skov wrote: > Below some changes to a few assembly statements that do not properly > clobber the T status bit. Thanks. BTW, I've committed wrongly the change of cache implementation. We need flush_cache_page (I've wrongly removed). I'll fix that this weekend. What I'll do is adopt new API for cache subsystem described in Documentation/cachetlb.txt. That is, deprecate the use of flush_ram_to_page and implement copy_user/clear_user with cache handling. -- |
From: Jesper S. <js...@re...> - 2000-09-11 15:03:54
|
Below some changes to a few assembly statements that do not properly clobber the T status bit. Most of them are in inline functions, so there'll be little semantic difference [they were still wrong though]. A couple may actually have semantic difference under heavy optimization: __range_ok: is a macro, so will not have been fixed by the T-clobber imposed by the ABI on a function call. __copy_user+__clear_user: these did not clobber memory which I think is necessary - but I'm less certain about these. Jesper 2000-09-11 Jesper Skov <js...@re...> * include/asm-sh/unistd.h: Add T-flag to the clobber list of asm statements. * include/asm-sh/string.h: Same. * include/asm-sh/delay.h: Same. * include/asm-sh/checksum.h: Same. * include/asm-sh/bitops.h: Same. * arch/sh/kernel/time.c: Same. * arch/sh/kernel/sh_bios.c: Same. * arch/sh/kernel/irq_imask.c: Same. * arch/sh/kernel/process.c: Same. * include/asm-sh/uaccess.h: Same. Plus clobber memory in copy_to_user and clear_user. Index: arch/sh/kernel/irq_imask.c =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/arch/sh/kernel/irq_imask.c,v retrieving revision 1.2 diff -u -5 -r1.2 irq_imask.c --- arch/sh/kernel/irq_imask.c 2000/08/03 17:03:38 1.2 +++ arch/sh/kernel/irq_imask.c 2000/09/11 14:42:18 @@ -69,11 +69,12 @@ "and %1, %0\n\t" "or %2, %0\n\t" "ldc %0, $sr\n" "1:" : "=&z" (__dummy) - : "r" (~0xf0), "r" (ip << 4)); + : "r" (~0xf0), "r" ((ip & 0xf) << 4) + : "t" ); } static void disable_imask_irq(unsigned int irq) { clear_bit(irq, &imask_mask); Index: arch/sh/kernel/process.c =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/arch/sh/kernel/process.c,v retrieving revision 1.3 diff -u -5 -r1.3 process.c --- arch/sh/kernel/process.c 2000/08/15 13:15:18 1.3 +++ arch/sh/kernel/process.c 2000/09/11 14:42:19 @@ -165,11 +165,11 @@ "trapa #0x11\n" "1:" : "=z" (__sc0) : "0" (__sc0), "i" (__NR_exit), "r" (__sc4), "r" (__sc5), "r" (__sc8), "r" (__sc9) - : "memory"); + : "memory", "t"); return __sc0; } /* * Free current thread data structures etc.. Index: arch/sh/kernel/sh_bios.c =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/arch/sh/kernel/sh_bios.c,v retrieving revision 1.2 diff -u -5 -r1.2 sh_bios.c --- arch/sh/kernel/sh_bios.c 2000/08/30 12:08:13 1.2 +++ arch/sh/kernel/sh_bios.c 2000/09/11 14:42:19 @@ -26,11 +26,11 @@ register long r6 __asm__("$r6") = arg2; register long r7 __asm__("$r7") = arg3; __asm__ __volatile__("trapa #0x3f" : "=z" (r0) : "0" (r0), "r" (r4), "r" (r5), "r" (r6), "r" (r7) - : "memory"); + : "memory", "t"); return r0; } void sh_bios_console_write(const char *buf, unsigned int len) Index: arch/sh/kernel/time.c =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/arch/sh/kernel/time.c,v retrieving revision 1.2 diff -u -5 -r1.2 time.c --- arch/sh/kernel/time.c 2000/08/03 17:03:38 1.2 +++ arch/sh/kernel/time.c 2000/09/11 14:42:19 @@ -371,11 +371,12 @@ "1:\t" "tst %1,%1\n\t" "bt/s 1b\n\t" " add #1,%0" : "=r"(count), "=z" (__dummy) - : "0" (0), "1" (0)); + : "0" (0), "1" (0) + : "t" ); cli(); /* * SH-3: * CPU clock = 4 stages * loop * tst rm,rm if id ex Index: include/asm-sh/bitops.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/bitops.h,v retrieving revision 1.1.1.1 diff -u -5 -r1.1.1.1 bitops.h --- include/asm-sh/bitops.h 2000/08/03 09:39:04 1.1.1.1 +++ include/asm-sh/bitops.h 2000/09/11 14:42:19 @@ -106,11 +106,12 @@ __asm__("1:\n\t" "shlr %1\n\t" "bt/s 1b\n\t" " add #1, %0" : "=r" (result), "=r" (word) - : "0" (~0L), "1" (word)); + : "0" (~0L), "1" (word) + : "t"); return result; } extern __inline__ int find_next_zero_bit(void *addr, int size, int offset) { Index: include/asm-sh/checksum.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/checksum.h,v retrieving revision 1.2 diff -u -5 -r1.2 checksum.h --- include/asm-sh/checksum.h 2000/08/03 17:03:51 1.2 +++ include/asm-sh/checksum.h 2000/09/11 14:42:19 @@ -113,11 +113,12 @@ "addc %2, %0" /* Here %2 is 0, add carry-bit */ /* Since the input registers which are loaded with iph and ihl are modified, we must also specify them as outputs, or gcc will assume they contain their original values. */ : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) - : "1" (iph), "2" (ihl)); + : "1" (iph), "2" (ihl) + : "t" ); return csum_fold(sum); } static __inline__ unsigned long csum_tcpudp_nofold(unsigned long saddr, @@ -136,11 +137,12 @@ "addc %2, %1\n\t" "addc %3, %1\n\t" "movt %0\n\t" "add %1, %0" : "=r" (sum), "=r" (len_proto) - : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum)); + : "r" (daddr), "r" (saddr), "1" (len_proto), "0" (sum) + : "t"); return sum; } /* * computes the checksum of the TCP/UDP pseudo-header @@ -195,11 +197,12 @@ "addc %5, %0\n\t" "movt %1\n\t" "add %1, %0\n" : "=r" (sum), "=&r" (__dummy) : "r" (saddr), "r" (daddr), - "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)); + "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) + : "t"); return csum_fold(sum); } #endif Index: include/asm-sh/delay.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/delay.h,v retrieving revision 1.2 diff -u -5 -r1.2 delay.h --- include/asm-sh/delay.h 2000/08/03 17:03:51 1.2 +++ include/asm-sh/delay.h 2000/09/11 14:42:19 @@ -13,11 +13,12 @@ "tst %0, %0\n\t" "1:\t" "bf/s 1b\n\t" " dt %0" : "=r" (loops) - : "0" (loops)); + : "0" (loops) + : "t"); } extern __inline__ void __udelay(unsigned long usecs, unsigned long lps) { usecs *= 0x000010c6; /* 2**32 / 1000000 */ Index: include/asm-sh/string.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/string.h,v retrieving revision 1.2 diff -u -5 -r1.2 string.h --- include/asm-sh/string.h 2000/08/21 09:20:08 1.2 +++ include/asm-sh/string.h 2000/09/11 14:42:19 @@ -18,11 +18,11 @@ "cmp/eq #0, %2\n\t" "bf/s 1b\n\t" " add #1, %0\n\t" : "=r" (__dest), "=r" (__src), "=&z" (__dummy) : "0" (__dest), "1" (__src) - : "memory"); + : "memory", "t"); return __xdest; } #define __HAVE_ARCH_STRNCPY @@ -44,11 +44,11 @@ "bf/s 1b\n\t" " add #1, %0\n" "2:" : "=r" (__dest), "=r" (__src), "=&z" (__dummy) : "0" (__dest), "1" (__src), "r" (__src+__n) - : "memory"); + : "memory", "t"); return __xdest; } #define __HAVE_ARCH_STRCMP @@ -69,11 +69,12 @@ "add #-2, %1\n\t" "mov.b @%1, %3\n\t" "sub %3, %2\n" "2:" : "=r" (__cs), "=r" (__ct), "=&r" (__res), "=&z" (__dummy) - : "0" (__cs), "1" (__ct)); + : "0" (__cs), "1" (__ct) + : "t"); return __res; } #define __HAVE_ARCH_STRNCMP @@ -100,11 +101,12 @@ "mov.b @%1, %3\n" "2:\n\t" "sub %3, %2\n" "3:" :"=r" (__cs), "=r" (__ct), "=&r" (__res), "=&z" (__dummy) - : "0" (__cs), "1" (__ct), "r" (__cs+__n)); + : "0" (__cs), "1" (__ct), "r" (__cs+__n) + : "t"); return __res; } #define __HAVE_ARCH_MEMSET Index: include/asm-sh/uaccess.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/uaccess.h,v retrieving revision 1.1.1.1 diff -u -5 -r1.1.1.1 uaccess.h --- include/asm-sh/uaccess.h 2000/08/03 09:39:05 1.1.1.1 +++ include/asm-sh/uaccess.h 2000/09/11 14:42:19 @@ -47,11 +47,12 @@ */ #define __range_ok(addr,size) ({ \ unsigned long flag,sum; \ __asm__("clrt; addc %3, %1; movt %0; cmp/hi %4, %1; rotcl %0" \ :"=&r" (flag), "=r" (sum) \ - :"1" (addr), "r" ((int)(size)), "r" (current->addr_limit.seg)); \ + :"1" (addr), "r" ((int)(size)), "r" (current->addr_limit.seg) \ + :"t"); \ flag; }) #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) #define __access_ok(addr,size) (__range_ok(addr,size) == 0) @@ -202,11 +203,12 @@ ".previous\n" \ ".section __ex_table,\"a\"\n\t" \ ".long 1b, 3b\n\t" \ ".previous" \ :"=&r" (__pu_err) \ - :"r" (__pu_val), "m" (__m(__pu_addr)), "i" (-EFAULT)); }) + :"r" (__pu_val), "m" (__m(__pu_addr)), "i" (-EFAULT) \ + : "memory"); }) extern void __put_user_unknown(void); /* Generic arbitrary sized copy. */ /* Return the number of bytes NOT copied */ @@ -240,11 +242,11 @@ " .long 9b,2b\n" " .long 1b,3b\n" ".previous" : "=r" (res), "=&z" (__dummy), "=r" (_f), "=r" (_t) : "2" (__from), "3" (__to), "0" (res) - : "memory"); + : "memory", "t"); return res; } #define copy_to_user(to,from,n) ({ \ @@ -320,11 +322,12 @@ ".section __ex_table,\"a\"\n" " .balign 4\n" " .long 1b,3b\n" ".previous" : "=r" (size), "=r" (__a) - : "0" (size), "1" (addr), "r" (0)); + : "0" (size), "1" (addr), "r" (0) + : "memory", "t"); return size; } #define clear_user(addr,n) ({ \ @@ -366,11 +369,11 @@ " .long 9b,4b\n" ".previous" : "=r" (res), "=&z" (__dummy), "=r" (_s), "=r" (_d) : "0" (__count), "2" (__src), "3" (__dest), "r" (__count), "i" (-EFAULT) - : "memory"); + : "memory", "t"); return res; } #define strncpy_from_user(dest,src,count) ({ \ @@ -412,11 +415,12 @@ ".section __ex_table,\"a\"\n" " .balign 4\n" " .long 1b,3b\n" ".previous" : "=z" (res), "=&r" (__dummy) - : "0" (0), "r" (__s), "r" (__n), "i" (-EFAULT)); + : "0" (0), "r" (__s), "r" (__n), "i" (-EFAULT) + : "t"); return res; } extern __inline__ long strnlen_user(const char *s, long n) { Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvs/cvsfiles/devo/linux/linux-sh/include/asm-sh/unistd.h,v retrieving revision 1.2 diff -u -5 -r1.2 unistd.h --- include/asm-sh/unistd.h 2000/08/30 12:08:37 1.2 +++ include/asm-sh/unistd.h 2000/09/11 14:42:20 @@ -251,11 +251,11 @@ { \ register long __sc0 __asm__ ("$r3") = __NR_##name; \ __asm__ __volatile__ ("trapa #0x10" \ : "=z" (__sc0) \ : "0" (__sc0) \ - : "memory" ); \ + : "memory", "t" ); \ __syscall_return(type,__sc0); \ } #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1) \ @@ -263,11 +263,11 @@ register long __sc0 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ __asm__ __volatile__ ("trapa #0x11" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4) \ - : "memory"); \ + : "memory", "t"); \ __syscall_return(type,__sc0); \ } #define _syscall2(type,name,type1,arg1,type2,arg2) \ type name(type1 arg1,type2 arg2) \ @@ -276,11 +276,11 @@ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ __asm__ __volatile__ ("trapa #0x12" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5) \ - : "memory"); \ + : "memory", "t"); \ __syscall_return(type,__sc0); \ } #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ type name(type1 arg1,type2 arg2,type3 arg3) \ @@ -290,11 +290,11 @@ register long __sc5 __asm__ ("$r5") = (long) arg2; \ register long __sc6 __asm__ ("$r6") = (long) arg3; \ __asm__ __volatile__ ("trapa #0x13" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \ - : "memory"); \ + : "memory", "t"); \ __syscall_return(type,__sc0); \ } #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ @@ -306,11 +306,11 @@ register long __sc7 __asm__ ("$r7") = (long) arg4; \ __asm__ __volatile__ ("trapa #0x14" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \ "r" (__sc7) \ - : "memory" ); \ + : "memory", "t" ); \ __syscall_return(type,__sc0); \ } #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ @@ -323,11 +323,11 @@ register long __sc0 __asm__ ("$r0") = (long) arg5; \ __asm__ __volatile__ ("trapa #0x15" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ "r" (__sc3) \ - : "memory" ); \ + : "memory", "t" ); \ __syscall_return(type,__sc0); \ } #ifdef __KERNEL_SYSCALLS__ |
From: Sathish V. <sv...@so...> - 2000-09-08 04:09:09
|
> Niibe Yutaka wrote: > Sathish Vasudevaiah wrote: > > Kernel command line: mem=32M sh_mv=SolutionEngine console=ttySC1,115200 > ^^^^^^ > I guess that your serial port is not 115200 bps, isn't it? If so, please > specify the bps of your port here. > > For MS7709SE01, you need some hack when you really need 115200 bps. > If I remember correctly, you need to use external clock for SCIF or > something like that. Stock SCI/F driver works with module clock, > not with external clock. Thank You Niibe-san, that helped ! I dropped the bps to 38400 and now I get.. ---------------- Linux version 2.4.0-test5 (satish@posix) (gcc version 2.95.2 19991024 (release)) #1 Wed Sep 6 15:05:45 IST 2000 On node 0 totalpages: 8192 <...snip...> Linux NET4.0 for Linux 2.3 Based upon Swansea University Computer Society NET3.039 --------------- Still the ramdisk doesn't load, though. thanks sathish |
From: NIIBE Y. <gn...@ch...> - 2000-09-08 02:33:38
|
Takashi says there's problem with irq_imask interrupt when probe_irq is used. When shutdown of the irq is called, IMASK has been changed which raises the IMASK. Irq_imask is different beast, the default state is all enabled, so here's the patch. 2000-09-08 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/irq_imask.c (startup_imask_irq, shutdown_imask_irq): Don't do anything. When used with proble_irq, interrupt may be masked. NOTE: For IMASK, default is "all enabled". =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/irq_imask.c,v retrieving revision 1.9 diff -u -r1.9 irq_imask.c --- arch/sh/kernel/irq_imask.c 2000/07/31 12:26:21 1.9 +++ arch/sh/kernel/irq_imask.c 2000/09/07 10:33:17 @@ -41,7 +41,7 @@ static unsigned int startup_imask_irq(unsigned int irq) { - enable_imask_irq(irq); + /* Nothing to do */ return 0; /* never anything pending */ } @@ -103,12 +103,12 @@ static void shutdown_imask_irq(unsigned int irq) { - disable_imask_irq(irq); + /* Nothing to do */ } void make_imask_irq(unsigned int irq) { disable_irq_nosync(irq); irq_desc[irq].handler = &imask_irq_type; - enable_irq(irq); + disable_imask_irq(irq); } |
From: NIIBE Y. <gn...@ch...> - 2000-09-07 11:06:14
|
Sathish Vasudevaiah wrote: > Kernel command line: mem=32M sh_mv=SolutionEngine console=ttySC1,115200 ^^^^^^ I guess that your serial port is not 115200 bps, isn't it? If so, please specify the bps of your port here. For MS7709SE01, you need some hack when you really need 115200 bps. If I remember correctly, you need to use external clock for SCIF or something like that. Stock SCI/F driver works with module clock, not with external clock. -- |
From: Sathish V. <sv...@so...> - 2000-09-07 10:47:19
|
Hello, I seem to have a serious problem with the kernel I image built...This is all I get and then silence. --------------- Linux version 2.4.0-test5 (satish@posix) (gcc version 2.95.2 19991024 (release)) #1 Wed Sep 6 15:05:45 IST 2000 On node 0 totalpages: 8192 zone(0): 8192 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: mem=32M sh_mv=SolutionEngine console=ttySC1,115200 CPU clock: 80.00MHz Bus clock: 20.00MHz Module clock: 20.00MHz Interval = 50000 ------------------ It is true that my ramdisk does not include a 'linuxrc' or 'init' but atleast I expected the ramdisk to load. Is this a serial console problem ? Should I apply the sci patches mentioned in the linuxsh-dev mailing list ? Or is it due to the fact that cpu is 7709 and not 7709A ? Thank you for any pointers sathish My environment: MS7709SE01 target board (note : cpu is SH7709, not 7709A ) 2.4.0-test5 kernel + linux-sh-2000-07-31 diff GDB session: set {long}0x8c001000 = 1 set {long}0x8c001004 = 0 set {long}0x8c001008 = 0x0200 set {long}0x8c00100c = 1 set {long}0x8c001010 = 0x00360000 set {long}0x8c001014 = 0x00200000 set {long}0x8c001018 = 0 set $i = 0x8c001100 # set *$i++ = 0 set *$i++ = 'm' set *$i++ = 'e' ..... ----------------------- This is how I built the ram disk: mkdir rootfs mkdir rootfs/dev mknod rootfs/dev/ttySC0 c 204 8 mknod rootfs/dev/ttySC1 c 204 9 ln -s rootfs/dev/ttySC1 rootfs/dev/console mkdir rootfs/lib (cd $SH_INSTALL/sh-linux-gnu/lib ; tar cf - *.so*) | \ (cd rootfs/lib ; tar xf -) mkdir rootfs/{proc,sbin,bin,usr,etc} rootfs/usr/{bin,sbin} dd if=/dev/zero of=/dev/ram0 bs=1k count=4096 /sbin/mke2fs -F -vm0 /dev/ram0 4096 mkdir /tmp/fs mount /dev/ram0 /tmp/fs (cd rootfs ; tar cf - .) | (cd /tmp/fs ; tar xvf -) umount /tmp/fs dd if=/dev/ram0 of=/var/tmp/initrd.img cat /var/tmp/initrd.img | gzip -c > initrd.img sh-linux-gnu-objcopy -I binary -O elf32-shl initrd.img \ initrd.elf --adjust-vma=0x8c360000 |
From: NIIBE Y. <gn...@ch...> - 2000-09-07 00:21:34
|
Great! How fast your hack is. -- |
From: YAEGASHI T. <yae...@ma...> - 2000-09-06 10:59:05
|
Here is a modified patch. Now supports BREAK detection for SCI(w/o FIFO). Tested only on SH-4. -- YAEGASHI Takeshi <yae...@ma...> |
From: NIIBE Y. <gn...@ch...> - 2000-09-06 08:45:58
|
YAEGASHI Takeshi wrote: > Well, I'm not convinced of how it should behave itself when > multiple errors(and BREAK) occur simultaneously. I suppose they > should be discarded except the most significant one, right? > (buffer overrun > BREAK > frame, parity error?) Well, we need better error handling, definitely. > And there are no BREAK detection for SCI(w/o FIFO) port. Yes, that's my point. We need this for SCI(w/o FIFO). With some TTY discipline, BREAK is out-of-band signal (not an error). Specifically, it works like CTRL-C (INT char with "dec" setting) which causes SIGINT to the process. So, while buffer overrun, frame error, and parity error belong to the "error" handling, break handling is another issue. -- |
From: YAEGASHI T. <yae...@ma...> - 2000-09-06 08:20:28
|
In the article <E13...@pw...>, NIIBE Yutaka <gn...@ch...> wrote: > Good job. Two comments: > > (1) Why do you set TEI handler? It's not worth to add it for XXX_IRQ > macros and the interrupt vectors, as we never use TEI interrupt in > the driver. The driver is not the specification of the SCI, it's > the software which _use_ SCI. If needed, people could get > hardware manual. Just add for BRI is enough, I think. Hmm. So I would omit them. > (2) Break handling > I think that we could find break condition with SCI when some > error occurs. Then, call break handling routine. Isn't it > possible? Well, I'm not convinced of how it should behave itself when multiple errors(and BREAK) occur simultaneously. I suppose they should be discarded except the most significant one, right? (buffer overrun > BREAK > frame, parity error?) Currently it reports all the detected errors to tty driver, therefore too many errors could be generated. And there are no BREAK detection for SCI(w/o FIFO) port. For the hardware problem, some port tends to generate so many ERI or BRI, even when nothing is connected to the port(regarded the input as continuous "L"). I suppose there are no way to shut them up as long as RIE='1', so we need to introduce some state management to prevent error notification flood to tty. -- YAEGASHI Takeshi <yae...@ma...> |