From: YAEGASHI T. <t...@ke...> - 2001-12-12 05:39:21
|
Hi, In the article <200...@mu...>, NIIBE Yutaka <gn...@m1...> wrote: > * 8139too driver > > > Documentation/Configure.help | 6 > > drivers/net/8139too.c | 25 + > > This is changes for 8139too, I and Takeshi sent them to 8139too > maintainer two or three times, but it has not yet included. > I don't know the status of this change. Takeshi? I don't know anything about that patch status... For 8139too.c, I found current binutils fails when ld linking vmlinux, reporting undefined reference to symbols in discarded section (.text.exit). I think it's kernel's fault and we should correct them. See follwoing discussion recorded in the Debian bug database: http://bugs.debian.org/122179 My patch for 8139too.c is here. I suspect there're similar bugs in other drivers. Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.3 diff -u -r1.3 8139too.c --- drivers/net/8139too.c 2001/12/03 22:15:34 1.3 +++ drivers/net/8139too.c 2001/12/12 05:25:45 @@ -2515,7 +2515,9 @@ name: DRV_NAME, id_table: rtl8139_pci_tbl, probe: rtl8139_init_one, +#if defined(CONFIG_HOTPLUG) || defined(MODULE) /* if "__devexit" == "" */ remove: rtl8139_remove_one, +#endif #ifdef CONFIG_PM suspend: rtl8139_suspend, resume: rtl8139_resume, > > include/asm-sh/mmzone.h > > This version is known not to work. I think that Takeshi has newer > version. Unfortunately it seems that the correct version of mmzone.h had been lost in a recent HDD arrangemnet... I remember it's small change, so it wouldn't take much time for me to rewrite. I'd submit it with other patches together when testing newer kernels on hp690 later. Please wait if you could be patient. -- YAEGASHI Takeshi <t...@ke...> <ta...@ya...> |
From: M. R. B. <mr...@0x...> - 2001-12-12 05:55:56
|
* YAEGASHI Takeshi <t...@ke...> on Wed, Dec 12, 2001: >=20 > > * 8139too driver > >=20 > > > Documentation/Configure.help | 6=20 > > > drivers/net/8139too.c | 25 + > >=20 > > This is changes for 8139too, I and Takeshi sent them to 8139too > > maintainer two or three times, but it has not yet included. > > I don't know the status of this change. Takeshi? >=20 > I don't know anything about that patch status... >=20 I'm cleaning this up to remove the spurious "Dreamcast Support" configure option. If we're going to #ifdef, we should use CONFIG_SH_DREAMCAST, since it will exist when we build 8139too.c anyway. No need to create a new CONFIG_ macro when we already have the constraint available. I'll send this off to Jeff Garzik and lkml when it's ready. > http://bugs.debian.org/122179 >=20 > My patch for 8139too.c is here. I suspect there're similar bugs in > other drivers. >=20 Looks sane based on what's been stated on lkml this past weekend. Thanks! M. R. |
From: Tom R. <tr...@ke...> - 2001-12-12 15:50:07
|
On Tue, Dec 11, 2001 at 11:55:49PM -0600, M. R. Brown wrote: > * YAEGASHI Takeshi <t...@ke...> on Wed, Dec 12, 2001: > > > My patch for 8139too.c is here. I suspect there're similar bugs in > > other drivers. > > Looks sane based on what's been stated on lkml this past weekend. Thanks! There's actually a lot of similar bugs. 2.4.17-pre7 or so fixed this (There's now a __devexit_p(X) macro I think it's called that's either NULL or X, depending on which is correct). -- Tom Rini (TR1265) http://gate.crashing.org/~trini/ |
From: David W. <dw...@in...> - 2001-12-05 23:20:08
|
rm...@te... said: > I _want_ per-arch definitions that optimize away the flushes that > aren't needed! Code should be written for the common denominator, and > if arch X doesn't need Y, then it defines to nothing. > I think that is what you want, too? Absolutely. I just want them to have sensible names, that don't imply that they're actually going to flush the cache when they're not. I'd rather have ifdefs than a flush_cache_page() which doesn't. But like you and any other non-crack-smoking person, I'd rather have a sensibly named routine which does the appropriate thing in each situation depending on the caches of the CPU in question. > I just talked to Marcelo about merging into 2.4 ... I saw. -- dwmw2 |
From: M. R. B. <mr...@0x...> - 2001-12-11 06:03:49
|
* NIIBE Yutaka <gn...@m1...> on Tue, Dec 11, 2001: >=20 > Following files: > drivers/cdrom/gdrom.c > drivers/char/dc_keyb.c > drivers/char/joystick/maplecontrol.c > drivers/char/maple_keyb.c > drivers/char/maplemouse.c > drivers/maple/Config.in > drivers/maple/Makefile > drivers/maple/maple.c > include/linux/maple.h >=20 > Without maple implementation, maplecontrol.c, maple_keyb.c and > maplemouse.c have nonsence. So, we leave the files above in our tree,=20 > not sending to mainline, OK? > =20 Sounds good. Marcelo's tree isn't very useful for the Dreamcast without the patches against drivers/net/8139too.c anyhow, so we may as well hold on to these files for now, especially until they get cleaned/rewritten (all of the files you list above are scheduled for rewrites). > Here is diffstats output for the divergence between 2.4.16 and our > 2.4 based tree (with no files above). >=20 > -------------------------- > arch/sh/kernel/sys_sh.c-1.7 | 236 ++++++++++ I wanted to ask about this file earlier. What is it here for? It looks like it's begging to be removed :). > arch/sh/kernel/entry.S | 2=20 > arch/sh/kernel/cf-enabler.c | 2=20 > arch/sh/config.in | 2=20 > arch/sh/Makefile | 2=20 > Documentation/cachetlb.txt | 2=20 > kernel/ptrace.c | 1=20 > include/linux/highmem.h | 1=20 > drivers/cdrom/Makefile | 1=20 > drivers/cdrom/Config.in | 1=20 > drivers/block/rd.c | 1=20 > arch/sh/kernel/pci-7751se.c | 1=20 I assume all the 2's and 1's are CVS Id tags? M. R. |
From: Robert L. <rm...@te...> - 2001-12-11 08:28:17
|
On Tue, 2001-12-11 at 01:03, M. R. Brown wrote: > Sounds good. Marcelo's tree isn't very useful for the Dreamcast without > the patches against drivers/net/8139too.c anyhow, so we may as well hold > on to these files for now, especially until they get cleaned/rewritten (all > of the files you list above are scheduled for rewrites). Maybe whoever did the 8139too work could send their code upstream to the 8139too maintainer? It just had a driver updated in 2.4.17-pre so a resync is probably needed ... but we should look into merging at least those oddball diffs so we don't have to worry about them. Robert Love |
From: Robert L. <rm...@te...> - 2001-12-11 08:20:45
|
On Tue, 2001-12-11 at 01:27, NIIBE Yutaka wrote: > For the addition of include/asm-sh/segment.h, IIRC, our conclusion > was: have it in our tree for convenience, but not send it to mainline > because the it has been obsolete for seven years or so. No, it is needed to compile because some files include "asm/segment.h" and we need it. We _don't_ need what in it but its needed to compile ... see arch-ia64, for example. Non-arch stuff includes it. Please send it. Robert Love |
From: David W. <dw...@in...> - 2001-12-11 13:40:01
|
gn...@m1... said: > For the addition of include/asm-sh/segment.h, IIRC, our conclusion > was: have it in our tree for convenience, but not send it to mainline > because the it has been obsolete for seven years or so. I sent Linus and Marcelo the patch to remove #include <asm/segment.h> from all offending drivers. I'll resend it soon. -- dwmw2 |
From: NIIBE Y. <gn...@m1...> - 2001-12-11 23:54:10
|
David Woodhouse wrote: > I sent Linus and Marcelo the patch to remove #include <asm/segment.h> from > all offending drivers. I'll resend it soon. Thanks. FYI, I've been sending the patch removing to relevant maintainers when I found the error against <asm/segment.h> for SuperH. For CD-ROM driver and Joystick drivers, I didn't success. -- |
From: NIIBE Y. <gn...@m1...> - 2001-12-11 06:52:11
|
Well, here is a patch to 2.4 which I'm going to submit. Please check this. I think that all is safe to submit and included. To be sure, I'll re-diff against 2.4.17-pre8, if it will be applied cleanly. -------------------------- arch/sh/config.in | 2 arch/sh/kernel/io_7751se.c | 8 +-- arch/sh/kernel/pci-7751se.c | 1 arch/sh/kernel/traps.c | 5 ++ drivers/char/shwdt.c | 7 +-- include/asm-sh/hitachi_se.h | 2 include/asm-sh/pci.h | 5 ++ include/asm-sh/stat.h | 25 +++++++++- include/asm-sh/uaccess.h | 1 Documentation/sh/new-machine.txt | 77 +++++++++++++++++++++++++++++++++ 10 files changed, 119 insertions(+), 14 deletions(-) -------------------------- Stuart Menefy Documentation/sh/new-machine.txt Jeremy Siegel arch/sh/config.in arch/sh/kernel/io_7751se.c arch/sh/kernel/pci-7751se.c include/asm-sh/pci.h Jeremy Siegel Big endian support include/asm-sh/stat.h Tomoyoshi ASANO Big endian fix include/asm-sh/uaccess.h Someone did that: drivers/char/shwdt.c arch/sh/kernel/traps.c include/asm-sh/hitachi_se.h --- /dev/null Tue Dec 4 19:42:15 2001 +++ linux/Documentation/sh/new-machine.txt Tue Oct 16 05:44:46 2001 @@ -0,0 +1,77 @@ +The multiple machine support relies on redirecting all functions which will +need to be machine specific through a table of function pointers, the +machvec. These functions fall into a number of categories: + + - I/O functions to IO memory (inb etc) and PCI/main memory (readb etc). + - I/O remapping functions (ioremap etc) + - some initialisation functions + - a 'heartbeat' function + - some miscellaneous flags + +The tree can be built in two ways: + - as a fully generic build. All drivers are linked in, and all functions + go through the machvec + - as a machine specific build. In this case only the required drivers + will be linked in, and some macros may be redefined to not go through + the machvec where performance is important (in particular IO functions). + +There are three ways in which IO can be performed: + - none at all. This is really only useful for the 'unknown' machine type, + which us designed to run on a machine about which we know nothing, and + so all all IO instructions do nothing. + - fully custom. In this case all IO functions go to a machine specific + set of functions which can do what they like + - a generic set of functions. These will cope with most situations, + and rely on a single function, mv_port2addr, which is called through the + machine vector, and converts an IO address into a memory address, which + can be read from/written to directly. + +Thus adding a new machine involves the following steps (I will assume I am +adding a machine called fred): + + - add a new file include/asm-sh/io_fred.h which contains prototypes for + any machine specific IO functions prefixed with the machine name, for + example fred_inb. These will be needed when filling out the machine + vector. In addition, a section is required which defines what to do when + building a machine specific version. For example: + + #ifdef __WANT_IO_DEF + #define inb fred_inb + ... + #endif + + This is the minimum that is required, however there are ample + opportunities to optimise this. In particular, by making the prototypes + inline function definitions, it is possible to inline the function when + building machine specific versions. Note that the machine vector + functions will still be needed, so that a module built for a generic + setup can be loaded. + + - add a new file arch/sh/kernel/mach_fred.c. This contains the definition + of the machine vector. When building the machine specific version, this + will be the real machine vector (via an alias), while in the generic + version is used to initialise the machine vector, and then freed, by + making it initdata. This should be defined as: + + struct sh_machine_vector mv_fred __initmv = { + mv_name: "Fred" + } + ALIAS_MV(se) + + - finally add a file arch/sh/kernel/io_fred.c, which contains + definitions of the machine specific io functions. + +A note about initialisation functions. Three initialisation functions are +provided in the machine vector: + - mv_arch_init - called very early on from setup_arch + - mv_init_irq - called from init_IRQ, after the generic SH interrupt + initialisation + - mv_init_pci - currently not used + +Any other remaining functions which need to be called at start up can be +added to the list using the __initcalls macro (or module_init if the code +can be built as a module). Many generic drivers probe to see if the device +they are targeting is present, however this may not always be appropriate, +so a flag can be added to the machine vector which will be set on those +machines which have the hardware in question, reducing the probe to a +single conditional. --- linux-2.4.16/arch/sh/config.in Tue Oct 16 05:36:48 2001 +++ linux/arch/sh/config.in Sat Nov 3 09:52:47 2001 @@ -189,7 +189,7 @@ if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then define_bool CONFIG_PCI_DIRECT y fi - define_bool CONFIG_SH_PCIDMA_NONCOHERENT n + bool 'Cache and PCI noncoherent' CONFIG_SH_PCIDMA_NONCOHERENT n fi source drivers/pci/Config.in --- linux-2.4.16/arch/sh/kernel/io_7751se.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/io_7751se.c Sat Nov 3 09:52:47 2001 @@ -17,7 +17,7 @@ #include <asm/hitachi_7751se.h> #include <asm/addrspace.h> -#include <asm/pci.h> +#include <linux/pci.h> #include <asm/pci-sh7751.h> #if 0 @@ -70,7 +70,7 @@ port2adr(unsigned int port) else return (volatile __u16 *) (PA_SUPERIO + (port << 1)); #endif - maybebadio(name,port); + maybebadio(name,(unsigned long)port); return (volatile __u16*)port; } @@ -276,6 +276,7 @@ void sh7751se_writel(unsigned int b, uns /* ISA page descriptor. */ static __u32 sh_isa_memmap[256]; +#if 0 static int sh_isa_mmap(__u32 start, __u32 length, __u32 offset) { @@ -286,12 +287,11 @@ sh_isa_mmap(__u32 start, __u32 length, _ idx = start >> 12; sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff); -#if 0 printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n", start, length, offset, idx, sh_isa_memmap[idx]); -#endif return 0; } +#endif unsigned long sh7751se_isa_port2addr(unsigned long offset) --- linux-2.4.16/arch/sh/kernel/pci-7751se.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/pci-7751se.c Sat Nov 3 09:52:47 2001 @@ -37,7 +37,6 @@ */ int __init pcibios_init_platform(void) { - unsigned long data; unsigned long bcr1, wcr1, wcr2, wcr3, mcr; unsigned short bcr2; --- linux-2.4.16/arch/sh/kernel/traps.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/traps.c Sat Dec 1 08:03:38 2001 @@ -559,4 +559,9 @@ void dump_stack(void) printk("%08lx\n", v); } } +} + +void show_trace_task(struct task_struct *tsk) +{ + printk("Backtrace not yet implemented for SH.\n"); } --- linux-2.4.16/drivers/char/shwdt.c Tue Oct 16 05:36:48 2001 +++ linux/drivers/char/shwdt.c Fri Nov 30 09:27:08 2001 @@ -10,7 +10,6 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ - #include <linux/config.h> #include <linux/module.h> #include <linux/init.h> @@ -177,7 +176,7 @@ static int sh_wdt_close(struct inode *in * sh_wdt_read - Read from Device * * @file: file handle of device - * @char: buffer to write to + * @buf: buffer to write to * @count: length of buffer * @ppos: offset * @@ -193,7 +192,7 @@ static ssize_t sh_wdt_read(struct file * * sh_wdt_write - Write to Device * * @file: file handle of device - * @char: buffer to write + * @buf: buffer to write * @count: length of buffer * @ppos: offset * @@ -269,7 +268,7 @@ static int sh_wdt_ioctl(struct inode *in static int sh_wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { - if (code == SYS_DOWN || SYS_HALT) { + if (code == SYS_DOWN || code == SYS_HALT) { sh_wdt_stop(); } --- linux-2.4.16/include/asm-sh/hitachi_se.h Tue Jul 3 05:56:40 2001 +++ linux/include/asm-sh/hitachi_se.h Wed Oct 17 04:39:50 2001 @@ -36,7 +36,7 @@ #define PA_DIPSW0 0xb0800000 /* Dip switch 5,6 */ #define PA_DIPSW1 0xb0800002 /* Dip switch 7,8 */ #define PA_LED 0xb0c00000 /* LED */ -#define PA_BCR 0xb1400000 /* FPGA */ +#define PA_BCR 0xb1400000 /* FPGA on the MS7750SE01 */ #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ --- linux-2.4.16/include/asm-sh/pci.h Sat Oct 13 07:35:54 2001 +++ linux/include/asm-sh/pci.h Wed Oct 31 08:22:18 2001 @@ -196,6 +196,11 @@ static inline int pci_dma_supported(stru return 1; } +/* Not supporting more than 32-bit PCI bus addresses now, but + * must satisfy references to this function. Change if needed. + */ +#define pci_dac_dma_supported(pci_dev, mask) (0) + /* Return the index of the PCI controller for device PDEV. */ #define pci_controller_num(PDEV) (0) --- linux-2.4.16/include/asm-sh/stat.h Tue Aug 1 09:38:07 2000 +++ linux/include/asm-sh/stat.h Sat Nov 3 09:52:47 2001 @@ -42,8 +42,16 @@ struct stat { * insane amounts of padding around dev_t's. */ struct stat64 { +#if defined(__BIG_ENDIAN__) + unsigned char __pad0b[6]; unsigned short st_dev; - unsigned char __pad0[10]; +#elif defined(__LITTLE_ENDIAN__) + unsigned short st_dev; + unsigned char __pad0b[6]; +#else +#error Must know endian to build stat64 structure! +#endif + unsigned char __pad0[4]; unsigned long st_ino; unsigned int st_mode; @@ -52,14 +60,25 @@ struct stat64 { unsigned long st_uid; unsigned long st_gid; +#if defined(__BIG_ENDIAN__) + unsigned char __pad3b[6]; + unsigned short st_rdev; +#else /* Must be little */ unsigned short st_rdev; - unsigned char __pad3[10]; + unsigned char __pad3b[6]; +#endif + unsigned char __pad3[4]; long long st_size; unsigned long st_blksize; +#if defined(__BIG_ENDIAN__) + unsigned long __pad4; /* Future possible st_blocks hi bits */ + unsigned long st_blocks; /* Number 512-byte blocks allocated. */ +#else /* Must be little */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __pad4; /* future possible st_blocks high bits */ + unsigned long __pad4; /* Future possible st_blocks hi bits */ +#endif unsigned long st_atime; unsigned long __pad5; --- linux-2.4.16/include/asm-sh/uaccess.h Tue Oct 16 05:36:48 2001 +++ linux/include/asm-sh/uaccess.h Sat Nov 3 09:52:47 2001 @@ -216,6 +216,7 @@ __asm__ __volatile__( \ : "r" (val), "m" (__m(addr)), "i" (-EFAULT) \ : "memory"); }) #else +#define __put_user_u64(val,addr,retval) \ ({ \ __asm__ __volatile__( \ "1:\n\t" \ -- |
From: Paul M. <pm...@mv...> - 2001-12-11 06:58:34
|
On Tue, Dec 11, 2001 at 03:52:04PM +0900, NIIBE Yutaka wrote: > Someone did that:=20 > drivers/char/shwdt.c This was just a typo fix on my part .. it prevented the driver in mainline from functioning properly and probably should've gone in sooner, so there shouldn't be any problems there. Regards, --=20 Paul Mundt <pm...@mv...> MontaVista Software, Inc. |
From: NIIBE Y. <gn...@m1...> - 2001-12-11 07:44:47
|
NIIBE Yutaka wrote: > Well, here is a patch to 2.4 which I'm going to submit. > > Please check this. I think that all is safe to submit and included. > > To be sure, I'll re-diff against 2.4.17-pre8, if it will be applied > cleanly. I checked our tree of HEAD. I believe it's applied cleanly. I think I'll re-diff against 2.5.1-pre8 and send it to 2.5 upstream. After that, let's think about kbuild. -- |
From: NIIBE Y. <gn...@m1...> - 2001-12-11 08:13:51
|
NIIBE Yutaka wrote: > include/asm-sh/hitachi_se.h | 2 [...] > --- linux-2.4.16/include/asm-sh/hitachi_se.h Tue Jul 3 05:56:40 2001 > +++ linux/include/asm-sh/hitachi_se.h Wed Oct 17 04:39:50 2001 > @@ -36,7 +36,7 @@ > #define PA_DIPSW0 0xb0800000 /* Dip switch 5,6 */ > #define PA_DIPSW1 0xb0800002 /* Dip switch 7,8 */ > #define PA_LED 0xb0c00000 /* LED */ > -#define PA_BCR 0xb1400000 /* FPGA */ > +#define PA_BCR 0xb1400000 /* FPGA on the MS7750SE01 */ > > #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ > #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ I won't send this to mainline, because it is wrong. It used to be shared among 7751se and se, but now we have the separate file hitach_7751se.h. -- |
From: NIIBE Y. <gn...@m1...> - 2001-12-11 08:40:11
|
Ooops, 2.4 tree is now about to be released for 2.4.17, and it's not time to send update... Well, I'll send following update for 2.5 soon. If it's true that people test 2.5 more, it will result good effect, 2.5 at first and 2.4 later, possibly include feedback from testing. -------------------------- * Documentation for adding new machine (Stuart Menefy) Documentation/sh/new-machine.txt * Follows PCI interface update (Jeremy Siegel) include/asm-sh/pci.h * Configuration fix (Jeremy Siegel) arch/sh/config.in * Solution Engine 7751 update (Jeremy Siegel) arch/sh/kernel/io_7751se.c arch/sh/kernel/pci-7751se.c * Big endian support fixes (Jeremy Siegel, Tomoyoshi ASANO) include/asm-sh/stat.h include/asm-sh/uaccess.h * SuperH watch dog timer fix (Paul Mundt) drivers/char/shwdt.c * Follow new interface of sched.c (will implement later) arch/sh/kernel/traps.c diff -ruN3p v2.5.1-pre9/Documentation/sh/new-machine.txt linux/Documentation/sh/new-machine.txt --- v2.5.1-pre9/Documentation/sh/new-machine.txt Thu Jan 1 09:00:00 1970 +++ linux/Documentation/sh/new-machine.txt Tue Dec 11 16:37:15 2001 @@ -0,0 +1,77 @@ +The multiple machine support relies on redirecting all functions which will +need to be machine specific through a table of function pointers, the +machvec. These functions fall into a number of categories: + + - I/O functions to IO memory (inb etc) and PCI/main memory (readb etc). + - I/O remapping functions (ioremap etc) + - some initialisation functions + - a 'heartbeat' function + - some miscellaneous flags + +The tree can be built in two ways: + - as a fully generic build. All drivers are linked in, and all functions + go through the machvec + - as a machine specific build. In this case only the required drivers + will be linked in, and some macros may be redefined to not go through + the machvec where performance is important (in particular IO functions). + +There are three ways in which IO can be performed: + - none at all. This is really only useful for the 'unknown' machine type, + which us designed to run on a machine about which we know nothing, and + so all all IO instructions do nothing. + - fully custom. In this case all IO functions go to a machine specific + set of functions which can do what they like + - a generic set of functions. These will cope with most situations, + and rely on a single function, mv_port2addr, which is called through the + machine vector, and converts an IO address into a memory address, which + can be read from/written to directly. + +Thus adding a new machine involves the following steps (I will assume I am +adding a machine called fred): + + - add a new file include/asm-sh/io_fred.h which contains prototypes for + any machine specific IO functions prefixed with the machine name, for + example fred_inb. These will be needed when filling out the machine + vector. In addition, a section is required which defines what to do when + building a machine specific version. For example: + + #ifdef __WANT_IO_DEF + #define inb fred_inb + ... + #endif + + This is the minimum that is required, however there are ample + opportunities to optimise this. In particular, by making the prototypes + inline function definitions, it is possible to inline the function when + building machine specific versions. Note that the machine vector + functions will still be needed, so that a module built for a generic + setup can be loaded. + + - add a new file arch/sh/kernel/mach_fred.c. This contains the definition + of the machine vector. When building the machine specific version, this + will be the real machine vector (via an alias), while in the generic + version is used to initialise the machine vector, and then freed, by + making it initdata. This should be defined as: + + struct sh_machine_vector mv_fred __initmv = { + mv_name: "Fred" + } + ALIAS_MV(se) + + - finally add a file arch/sh/kernel/io_fred.c, which contains + definitions of the machine specific io functions. + +A note about initialisation functions. Three initialisation functions are +provided in the machine vector: + - mv_arch_init - called very early on from setup_arch + - mv_init_irq - called from init_IRQ, after the generic SH interrupt + initialisation + - mv_init_pci - currently not used + +Any other remaining functions which need to be called at start up can be +added to the list using the __initcalls macro (or module_init if the code +can be built as a module). Many generic drivers probe to see if the device +they are targeting is present, however this may not always be appropriate, +so a flag can be added to the machine vector which will be set on those +machines which have the hardware in question, reducing the probe to a +single conditional. diff -ruN3p v2.5.1-pre9/arch/sh/config.in linux/arch/sh/config.in --- v2.5.1-pre9/arch/sh/config.in Tue Oct 16 05:36:48 2001 +++ linux/arch/sh/config.in Tue Dec 11 16:37:15 2001 @@ -189,7 +189,7 @@ if [ "$CONFIG_PCI" = "y" ]; then if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then define_bool CONFIG_PCI_DIRECT y fi - define_bool CONFIG_SH_PCIDMA_NONCOHERENT n + bool 'Cache and PCI noncoherent' CONFIG_SH_PCIDMA_NONCOHERENT n fi source drivers/pci/Config.in diff -ruN3p v2.5.1-pre9/arch/sh/kernel/io_7751se.c linux/arch/sh/kernel/io_7751se.c --- v2.5.1-pre9/arch/sh/kernel/io_7751se.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/io_7751se.c Tue Dec 11 16:37:15 2001 @@ -17,7 +17,7 @@ #include <asm/hitachi_7751se.h> #include <asm/addrspace.h> -#include <asm/pci.h> +#include <linux/pci.h> #include <asm/pci-sh7751.h> #if 0 @@ -70,7 +70,7 @@ port2adr(unsigned int port) else return (volatile __u16 *) (PA_SUPERIO + (port << 1)); #endif - maybebadio(name,port); + maybebadio(name,(unsigned long)port); return (volatile __u16*)port; } @@ -276,6 +276,7 @@ void sh7751se_writel(unsigned int b, uns /* ISA page descriptor. */ static __u32 sh_isa_memmap[256]; +#if 0 static int sh_isa_mmap(__u32 start, __u32 length, __u32 offset) { @@ -286,12 +287,11 @@ sh_isa_mmap(__u32 start, __u32 length, _ idx = start >> 12; sh_isa_memmap[idx] = 0xb8000000 + (offset &~ 0xfff); -#if 0 printk("sh_isa_mmap: start %x len %x offset %x (idx %x paddr %x)\n", start, length, offset, idx, sh_isa_memmap[idx]); -#endif return 0; } +#endif unsigned long sh7751se_isa_port2addr(unsigned long offset) diff -ruN3p v2.5.1-pre9/arch/sh/kernel/pci-7751se.c linux/arch/sh/kernel/pci-7751se.c --- v2.5.1-pre9/arch/sh/kernel/pci-7751se.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/pci-7751se.c Tue Dec 11 16:37:15 2001 @@ -37,7 +37,6 @@ */ int __init pcibios_init_platform(void) { - unsigned long data; unsigned long bcr1, wcr1, wcr2, wcr3, mcr; unsigned short bcr2; diff -ruN3p v2.5.1-pre9/arch/sh/kernel/traps.c linux/arch/sh/kernel/traps.c --- v2.5.1-pre9/arch/sh/kernel/traps.c Sun Sep 9 04:29:09 2001 +++ linux/arch/sh/kernel/traps.c Tue Dec 11 16:37:15 2001 @@ -560,3 +560,8 @@ void dump_stack(void) } } } + +void show_trace_task(struct task_struct *tsk) +{ + printk("Backtrace not yet implemented for SH.\n"); +} diff -ruN3p v2.5.1-pre9/drivers/char/shwdt.c linux/drivers/char/shwdt.c --- v2.5.1-pre9/drivers/char/shwdt.c Tue Oct 16 05:36:48 2001 +++ linux/drivers/char/shwdt.c Tue Dec 11 16:37:15 2001 @@ -10,7 +10,6 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ - #include <linux/config.h> #include <linux/module.h> #include <linux/init.h> @@ -177,7 +176,7 @@ static int sh_wdt_close(struct inode *in * sh_wdt_read - Read from Device * * @file: file handle of device - * @char: buffer to write to + * @buf: buffer to write to * @count: length of buffer * @ppos: offset * @@ -193,7 +192,7 @@ static ssize_t sh_wdt_read(struct file * * sh_wdt_write - Write to Device * * @file: file handle of device - * @char: buffer to write + * @buf: buffer to write * @count: length of buffer * @ppos: offset * @@ -269,7 +268,7 @@ static int sh_wdt_ioctl(struct inode *in static int sh_wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { - if (code == SYS_DOWN || SYS_HALT) { + if (code == SYS_DOWN || code == SYS_HALT) { sh_wdt_stop(); } diff -ruN3p v2.5.1-pre9/include/asm-sh/pci.h linux/include/asm-sh/pci.h --- v2.5.1-pre9/include/asm-sh/pci.h Sat Oct 13 07:35:54 2001 +++ linux/include/asm-sh/pci.h Tue Dec 11 16:37:15 2001 @@ -196,6 +196,11 @@ static inline int pci_dma_supported(stru return 1; } +/* Not supporting more than 32-bit PCI bus addresses now, but + * must satisfy references to this function. Change if needed. + */ +#define pci_dac_dma_supported(pci_dev, mask) (0) + /* Return the index of the PCI controller for device PDEV. */ #define pci_controller_num(PDEV) (0) diff -ruN3p v2.5.1-pre9/include/asm-sh/stat.h linux/include/asm-sh/stat.h --- v2.5.1-pre9/include/asm-sh/stat.h Tue Aug 1 09:38:07 2000 +++ linux/include/asm-sh/stat.h Tue Dec 11 16:37:15 2001 @@ -42,8 +42,16 @@ struct stat { * insane amounts of padding around dev_t's. */ struct stat64 { +#if defined(__BIG_ENDIAN__) + unsigned char __pad0b[6]; unsigned short st_dev; - unsigned char __pad0[10]; +#elif defined(__LITTLE_ENDIAN__) + unsigned short st_dev; + unsigned char __pad0b[6]; +#else +#error Must know endian to build stat64 structure! +#endif + unsigned char __pad0[4]; unsigned long st_ino; unsigned int st_mode; @@ -52,14 +60,25 @@ struct stat64 { unsigned long st_uid; unsigned long st_gid; +#if defined(__BIG_ENDIAN__) + unsigned char __pad3b[6]; + unsigned short st_rdev; +#else /* Must be little */ unsigned short st_rdev; - unsigned char __pad3[10]; + unsigned char __pad3b[6]; +#endif + unsigned char __pad3[4]; long long st_size; unsigned long st_blksize; +#if defined(__BIG_ENDIAN__) + unsigned long __pad4; /* Future possible st_blocks hi bits */ + unsigned long st_blocks; /* Number 512-byte blocks allocated. */ +#else /* Must be little */ unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __pad4; /* future possible st_blocks high bits */ + unsigned long __pad4; /* Future possible st_blocks hi bits */ +#endif unsigned long st_atime; unsigned long __pad5; diff -ruN3p v2.5.1-pre9/include/asm-sh/uaccess.h linux/include/asm-sh/uaccess.h --- v2.5.1-pre9/include/asm-sh/uaccess.h Tue Oct 16 05:36:48 2001 +++ linux/include/asm-sh/uaccess.h Tue Dec 11 16:37:15 2001 @@ -216,6 +216,7 @@ __asm__ __volatile__( \ : "r" (val), "m" (__m(addr)), "i" (-EFAULT) \ : "memory"); }) #else +#define __put_user_u64(val,addr,retval) \ ({ \ __asm__ __volatile__( \ "1:\n\t" \ -- |
From: Robert L. <rm...@te...> - 2001-12-11 08:43:25
|
On Tue, 2001-12-11 at 03:40, NIIBE Yutaka wrote: > Ooops, 2.4 tree is now about to be released for 2.4.17, and it's not > time to send update... Send it against 2.4.17, for inclusion in 2.4.18-pre1. Marcelo should take it. It might be wise to separate or at least point out where we touch non-SH things. Everything that is SH only is considered safe, since you are maintainer and it won't hurt anything else. Robert Love |
From: Stuart M. <Stu...@st...> - 2001-12-11 13:07:54
|
Folks > STMicro people please confirm the pci.ids change is valid (or not). > At http://www.yourvote.com/pci/pciread.asp?sort=venid > The entry is: > ST Microelectronics > (with space between ST and Microelectronics). I'll try submitting a change. There shouldn't be a space in the name. > And for GT-64111, I've read a manual for GT-64111: > http://cobalt22.cobalt.com/docs/gt64111_rev11.pdf > > It says, the initial value is 0x4146 but ID number is 0x146. I'm > confused. Is that really valid entry? The 1.0 rev of the document has the same typo (which we used when writing the 7750 Overdrive software). I'll try and remember to see what the hardware says next time I fire it up. However the earlier chip, the 64010 appears to have ID 0146. So maybe it makes sense for the later one to be 4146? We'll see. > I won't send the patch of pci.ids to maintainer, please do that by yourself. OK Thanks Stuart |