All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [announce] procps 2.0.11
From: Robert Love @ 2002-12-18  2:36 UTC (permalink / raw)
  To: Andreas Steinmetz; +Cc: Andrei Ivanov, procps-list, linux-kernel, riel
In-Reply-To: <3DFFCF12.6050902@domdv.de>

On Tue, 2002-12-17 at 20:27, Andreas Steinmetz wrote:

> The attached patch does fix this.

Indeed, this is correct - thanks.

I committed the patch to CVS.

	Robert Love


^ permalink raw reply

* problems with raidhotgenerateerror
From: Claudio Fleiner @ 2002-12-18  2:22 UTC (permalink / raw)
  To: linux-raid

I was playing around with raid1 using two loopback devices of 4M each.
The config file I'm using looks like this:

raiddev /dev/md0
          raid-level      1
          nr-raid-disks   2
          nr-spare-disks  0
          chunk-size     4
          persistent-superblock 1
          device          /dev/loop0
          raid-disk       0
          device          /dev/loop1
          raid-disk       1


Everything works as expected, except that I cannot simulate an error using
raidhotgenerateerror. The command runs just fine (as confirmed by the following strace,
(all unnecessary stuff removed):

execve("/home/cfl/prog/raidtools-20010914/raidhotgenerateerror", ["/home/cfl/prog/raidtools-20010914/raidhotgenerateerror", "-c", "c", "/dev/md0", "/dev/loop0"], [/* 58 vars */]) = 0
open("/dev/md0", O_RDONLY)              = 4
ioctl(4, 0x800c0910, 0x804f948)         = 0
open("/dev/md0", O_RDWR)                = 5
fstat64(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(9, 0), ...}) = 0
stat64("/dev/loop0", {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
ioctl(5, 0x92a, 0x700)                  = 0
_exit(0)                                = ?

but /proc/mdstat shows that loop0 is still OK (writing to the md0 device
does not make a difference) and removing the drive using raidhotremove
fails):

Personalities : [raid0] [raid1] [raid5] 
read_ahead 1024 sectors
md0 : active raid1 [dev 07:01][1] [dev 07:00][0]
      4032 blocks [2/2] [UU]
      

I'm using Redhat 7.2 with a 2.4.19 kernel.

Any idea why this is not working?

Thanks, Claudio




^ permalink raw reply

* Re: [PATCH] : More module parameter compatibility for 2.5.52
From: Jean Tourrilhes @ 2002-12-18  2:29 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Linux kernel mailing list, Jeff Garzik
In-Reply-To: <20021218022816.E2EC52C2CE@lists.samba.org>

On Wed, Dec 18, 2002 at 01:24:57PM +1100, Rusty Russell wrote:
>
> I think you're confusing "param_array() doesn't handle 2d arrays" with
> "infrastructure not powerful enough".  Since __module_param_call() is
> functionally equivalent to __setup(), the second one seems unlikely.
> 
> Writing such an extension is a job for the next mail...
> 
> Does that clarify?

	Perfect.

> Rusty.

	Good luck...

	Jean

^ permalink raw reply

* Re: [BUG] module-init-tools 0.9.3, rmmod modules with '-'
From: Rusty Russell @ 2002-12-18  0:23 UTC (permalink / raw)
  To: vamsi; +Cc: Zwane Mwaikambo, lkml
In-Reply-To: <20021217114846.A30837@in.ibm.com>

In message <20021217114846.A30837@in.ibm.com> you write:
> On Tue, Dec 17, 2002 at 11:17:05AM +1100, Rusty Russell wrote:
> > 
> > BTW, this was done for (1) simplicity, (2) so KBUILD_MODNAME can be
> > used to construct identifiers, and (3) so parameters when the module
> > is built-in have a consistent name.
> > 
> Ok, I see it now, this magic happens in scripts/Makefile.lib. 
> My module has been built outside the kernel build system, that's
> why I saw this problem.
> 
> I guess avoiding '-' should do it, but is there a simple way to 
> correctly build (simple, test) modules outside the kernel tree now?

Has there ever been a simple way?  You can either use _ in the name,
or use tr on the -DKBUILD_MODNAME line, I guess.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply

* Re: [PATCH] : More module parameter compatibility for 2.5.52
From: Rusty Russell @ 2002-12-18  2:24 UTC (permalink / raw)
  To: jt; +Cc: Linux kernel mailing list, Jeff Garzik
In-Reply-To: <20021217173346.GA22924@bougret.hpl.hp.com>

In message <20021217173346.GA22924@bougret.hpl.hp.com> you write:
> On Tue, Dec 17, 2002 at 03:20:10PM +1100, Rusty Russell wrote:
> > I prefer the fix below.  Does it work for you?
> > 
> > Rusty.
> 
> 	With all due respect, your fix is quite ugly.

Yes.

> 	And think about it this way : your new param architecture is
> supposed to be flexible and supposed to allow modules to get
> parameters in any shape or form. But, on the other hand, it's
> impossible to implement something as simple as 'c' without ugly hacks.

'c' is trivial.  1-20c50, which is a the two dimensional array of
variable bounds, which is outside the scope of current param_array
implementation (which was designed to handle 1d arrays).

> 	Maybe we can deduct from this that the new param API is not
> flexible enough and that the simple addition of an opaque type (priv)
> can have some value.

They *do* have a mechanism to pass extra parameters (kp->arg), it's
just that the standard "param_array" code already uses it to hand the
address of the variable.  Your patch added a second one.

The new param code was not meant to do *everything*, it was meant to
add type safety and unification of boot and module parameters, and
allow extensibility.

I think you're confusing "param_array() doesn't handle 2d arrays" with
"infrastructure not powerful enough".  Since __module_param_call() is
functionally equivalent to __setup(), the second one seems unlikely.

Writing such an extension is a job for the next mail...

Does that clarify?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply

* Serial ATA: SiI3112 numbers, Linux-Raid 1
From: Andre Hedrick @ 2002-12-18  2:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-ide


Just for kicks!

[root@athy tiobench-0.3.2]# ./tiobench.pl
No size specified, using 512 MB
Size is MB, BlkSz is Bytes, Read, Write, and Seeks are MB/sec

         File   Block  Num  Seq Read    Rand Read   Seq Write  Rand Write
  Dir    Size   Size   Thr Rate (CPU%) Rate (CPU%) Rate (CPU%) Rate (CPU%)
------- ------ ------- --- ----------- ----------- ----------- -----------
   .     512    4096    1  38.60 20.2% 0.844 0.97% 32.85 34.4% 1.090 0.90%
   .     512    4096    2  26.20 16.6% 0.973 1.05% 28.52 47.5% 1.099 0.98%
   .     512    4096    4  22.98 15.6% 1.070 1.07% 24.53 45.0% 1.098 1.26%
   .     512    4096    8  21.52 15.9% 1.168 1.06% 20.27 39.1% 1.097 1.52%

[root@athy /]# bonnie -s 512
File './Bonnie.19851', size: 536870912, volumes: 1
Writing with putc()...  done:  13038 kB/s  99.8 %CPU
Rewriting...            done:  15274 kB/s  12.9 %CPU
Writing intelligently...done:  44931 kB/s  43.8 %CPU
Reading with getc()...  done:  12038 kB/s  95.0 %CPU
Reading intelligently...done:  66362 kB/s  32.5 %CPU
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
            ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd Seek-
            -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --04k (03)-
Machine  MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU   /sec %CPU
     1* 512 13038 99.8 44931 43.8 15274 12.9 12038 95.0 66362 32.5  305.7  4.1

[root@athy /]# bonnie -s 1024
File './Bonnie.19858', size: 1073741824, volumes: 1
Writing with putc()...  done:  13023 kB/s 100.0 %CPU
Rewriting...            done:  15114 kB/s  13.9 %CPU
Writing intelligently...done:  39051 kB/s  40.2 %CPU
Reading with getc()...  done:  12158 kB/s  96.3 %CPU
Reading intelligently...done:  53235 kB/s  28.3 %CPU
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
            ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd Seek-
            -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --04k (03)-
Machine  MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU   /sec %CPU
     1*1024 13023 100.0 39051 40.2 15114 13.9 12158 96.3 53235 28.3  210.7  2.1

Cheers,

Andre Hedrick
LAD Storage Consulting Group

^ permalink raw reply

* Re: netstat and 2.5.5[12]
From: Arnaldo Carvalho de Melo @ 2002-12-18  2:21 UTC (permalink / raw)
  To: joe user; +Cc: andersg, linux-kernel
In-Reply-To: <F155vsq9IcVux1Zcn8T000004c6@hotmail.com>

Em Wed, Dec 18, 2002 at 02:27:46AM +0100, joe user escreveu:
> 
> >Em Mon, Dec 16, 2002 at 01:45:53PM +0100, Anders Gustafsson escreveu:
> >> On Mon, Dec 16, 2002 at 01:06:32PM +0100, joe user wrote:
> >> > Is required a new net-tools package required to run 2.5.5[12]? If you 
> >run
> >> > netstat -t the process just hang forever, and is unkillable.
> >>
> >> Happens here too.
> >> http://marc.theaimsgroup.com/?l=linux-kernel&m=103974450111945&w=2
> >>
> >> A cat /proc/net/tcp causes the same problem, so not tools problem.
> >
> >I'm looking into this, do you have ipv6 connections?
> 
> I have ipv6 support compiled in but no ipv6 connections at all that I'm 
> aware of. This is a fresh install of redhat8 running X and several rpc 
> daemons: rstatd, rusersd, rwalld. I'm running sshd and rwhod too. Not sure 
> if any of these daemons are compiled with ipv6 support.

Probably yes, listening seems to be enough, thanks for the report.

- Arnaldo

^ permalink raw reply

* Announce: XFS split patches for 2.4.20 - respin
From: Keith Owens @ 2002-12-18  2:16 UTC (permalink / raw)
  To: linux-xfs; +Cc: linux-kernel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

ftp://oss.sgi.com/projects/xfs/download/patches/2.4.20.  

The xfs patches for 2.4.20 have been respun as of 2002-12-18 02:00 UTC.

For some time the XFS group have been producing split patches for XFS,
separating the core XFS changes from additional patches such as kdb,
xattr, acl, dmapi.  The split patches are released to the world with
the hope that developers and distributors will find them useful.

Read the README in each directory very carefully, the split patch
format has changed over a few kernel releases.  Any questions that are
covered by the README will be ignored.  There is even a 2.4.21/README
for the terminally impatient :).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999

iD8DBQE9/9pdi4UHNye0ZOoRAjd7AKCUGoWqZ3SJGRj2d7ssCEsiZb03vwCdFm4J
5ymEscu9jY2EEZuwz2NwPK0=
=0KMC
-----END PGP SIGNATURE-----


^ permalink raw reply

* Re: slave_destroy called in scsi_scan.c:scsi_probe_and_add_lun()
From: Justin T. Gibbs @ 2002-12-18  2:07 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-scsi
In-Reply-To: <20021217222459.GD28100@redhat.com>

> Now, that being said, I agree that the above is utter crap.

Thank you. 8-)

>>  The concern is that
>> the API should only be called when the system is saying "physical device
>> gone", not due to some quirk in how the mid-layer manages its data
>> objects.
> 
> Well, whatever other meaning you want to attach to it, it *is* about data 
> objects.  That's why it's called slave_alloc()/slave_destroy() which are 
> standard object manipulation terms.  One of the reasons I did this was so 
> that in my driver I could yank out a bunch of host structs of the form
> 
> 	unsigned char	queue_depth[MAX_TARGETS][MAX_LUNS};
> 
> and instead add a new struct aic_dev_data that I attach directly to 
> device->hostdata during slave_alloc(), and in that struct aic_dev_data 
> goes *all* the state data needed for that device. It resulted in a not 
> insignificant reduction in memory foot print for the driver.

Well, by dynamically allocating these types of things, and aggregating
them into a single structure instead of a bunch of arrays, I would
expect such a reduction.  The only difference between what your driver
is doing and what mine does is that there is a single static array for
indexing targets.  The rest of the data structures are dynamically allocated
and only live for "real" devices.  The lookup array is a requirement for
supporting 2.4.X.

...

> The secondary use that a  slave_destroy() event can trigger a device
> shutdown sequence in your  driver was a bonus, but because of hokey crap
> in the scsi scan code it's a  bonus that requires you refcount things
> instead of just assuming that a  slave_destroy() is permanent.

I decided to instrument what the SCSI layer does with these calls before
looking at refcounting.  Here's the output of the scan of a bus with
two drives on it: id 0 and id 1.

scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.23
        <Adaptec aic7899 Ultra160 SCSI adapter>
        aic7899: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs

scsi0: Slave Alloc 0
scsi0: Slave Destroy 0
scsi0: Slave Alloc 0
scsi0: Slave Alloc 0
  Vendor: SEAGATE   Model: ST39236LWV        Rev: 0010
  Type:   Direct-Access                      ANSI SCSI revision: 03
scsi0: Slave Destroy 0
scsi0: Slave Alloc 0
scsi0: Slave Destroy 1
scsi0: Slave Alloc 1
scsi0: Slave Alloc 1
  Vendor: SEAGATE   Model: ST39236LW         Rev: 0010
  Type:   Direct-Access                      ANSI SCSI revision: 03
scsi0: Slave Destroy 1
scsi0: Slave Alloc 1
scsi0: Slave Destroy 2
scsi0: Slave Alloc 2
(scsi0:A:1): 160.000MB/s transfers (80.000MHz DT, offset 31, 16bit)
scsi0: Slave Destroy 3
scsi0: Slave Alloc 3
scsi0: Slave Destroy 4
scsi0: Slave Alloc 4
scsi0: Slave Destroy 5
scsi0: Slave Alloc 5
scsi0: Slave Destroy 6
scsi0: Slave Alloc 6
scsi0: Slave Destroy 8
scsi0: Slave Alloc 8
scsi0: Slave Destroy 9
scsi0: Slave Alloc 9
scsi0: Slave Destroy 10
scsi0: Slave Alloc 10
scsi0: Slave Destroy 11
scsi0: Slave Alloc 11
scsi0: Slave Destroy 12
scsi0: Slave Alloc 12
scsi0: Slave Destroy 13
scsi0: Slave Alloc 13
scsi0: Slave Destroy 14
scsi0: Slave Alloc 14
scsi0: Slave Destroy 15
scsi0: Slave Alloc 15
scsi0: Slave Destroy 15

...

scsi0: Slave Configure 0
scsi0: Slave Configure 1

Notice that for all IDs but 0, a slave destroy call is performed
prior to any slave allocations.  Very nice.  Note that I wasn't
complaining that I couldn't work around this kind of crap, just
that this crap is unsettling. 8-)

> In my driver I don't attempt to do anything like send cache flush
> commands  or the like, so I don't have the shutdown difficulties you do
> and things  work quite nicely.

It's not about cache flushing or anything else.  It's about knowing if
you need to retest the connection to a device, whether or not you should
force a renegotiation the next time a command is attempted to a device,
etc. etc.  So, when linux tells the driver that the device is gone,
we setup our state so that we will not trust the old negotiated values
and will perform Domain Validation again should the device return.

--
Justin

^ permalink raw reply

* RE: serial.c fix: ELAN fix breaks others
From: Ed Vance @ 2002-12-18  1:56 UTC (permalink / raw)
  To: 'Matthew Locke'
  Cc: 'Rusty Russell', Russell King, 'linux-serial'

On Mon, December 16, 2002 at 6:18 PM, Matthew Locke wrote:
> 
> Ed Vance wrote:
> 
> >>From: Matthew Locke [mailto:mlocke@mvista.com]
> >>
> >On Mon, December 16, 2002 at 4:29 PM, Matthew Locke wrote:
> >
> >>Ed Vance wrote:
> >>
> >>>[ snip ]
> >>>
> >>>I avoided the #ifdef by applying the workaround only to 
> >>>UARTs detected as the "simple" types. The AMD Elan's UARTs 
> >>>detect as type 16550A. I don't know (yet) of any "simple" 
> >>>UARTs that misbehave when exposed to the Elan work-around. 
> >>>See the comments above the patch.
> >>>
> >>Ed,
> >>
> >>I think I have one.  In general I would prefer not to include 
> >>workarounds for unaffected platforms.  In the embedded world, 
> >>I always seem to run into the platform on which these 
> >>workarounds cause problems:(  Can we add:
> >>
> >>#ifndef CONFIG_MELAN
> >>define uart_transmit_ready 0
> >>#endif
> >>
> >>to your patch?
> >>
> >
> >Hi Matthew,
> >
> >Of course, I would prefer not to introduce an #ifdef that is 
> >not necessary. However, running properly on the Elan platform 
> >already requires rebuilding the kernel with CONFIG_MELAN 
> >defined to express Elan specific kernel code. So, use of the 
> >define in the serial driver would not cause anybody an extra 
> >build step ... 
> >
> >If we have to introduce an #ifdef to get correct function on 
> >unbroken hardware, then we should. Of course, we would want 
> >to follow the coding guidelines about where to hide the #ifdef. 
> >
> >Please tell me:
> >
> >What UART flavor are you jousting with?
> >
> The TI OMAP on-chip 16650.
> 
> >
> >
> >Which UART type does the serial driver detect?
> >
> Typically the serial driver doesn't "detect" the type for 
> these on-chip devices.  Instead we pass in the type with 
> the STD_SERIAL_PORT_DEFN defined in the arch code.  This 
> one is a 16650 with a few special tweaks for OMAP.  So we 
> setup a PORT_OMAP port type and guarantee the new type is 
> greater than PORT_16550A.  However, I'm still concerned 
> about chips that will report < 16550A port types and may 
> have problems with the work around.
> 
> >
> >
> >What is the specific errant behavior?
> >
> The same as described in your comments-  dropped xmit data.
> 

Hi Matthew,

I read the TI OMAP UART doc. It says the UART type emulated by the 
OMAP is 16750 (type 8), instead of 16650. Even 16650 (type 6) is 
out of the range exposed to the work-around. It does not yet sound 
like this is a type 1 - 4 UART that the work-around breaks. The 
issue seems to pivot on the default types defined in 
STD_SERIAL_PORT_DEFN. 

I would at least like to preserve the work-around code on the x86 
architecture so a vanilla x86 distro or rescue disk would boot and 
be at least minimally usable on the Elan with a serial console.

Which kernel source should I download and look at so I would see the 
same defs that you are working with? 

(I'm not saying no to an #ifdef. I just don't think I have completed 
the due diligence yet.)

Best regards,
Ed

---------------------------------------------------------------- 
Ed Vance              edv (at) macrolink (dot) com
Macrolink, Inc.       1500 N. Kellogg Dr  Anaheim, CA  92807
----------------------------------------------------------------

^ permalink raw reply

* Re: buggy scsi_register behaviour in 2.5.51
From: Willem Riede @ 2002-12-18  1:52 UTC (permalink / raw)
  To: dgilbert; +Cc: linux-scsi
In-Reply-To: <3DFE998E.1080103@interlog.com>

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

On 2002.12.16 22:27 Douglas Gilbert wrote:
> Willem,
> Can't fix all those problems but I did notice that
> idescsi_release() was missing a call to scsi_unregister().
> With this patch the ide-scsi entry remains dangling in
> sysfs (ide problem??) 

Indeed. There is a call to driver_register in ide_register_driver
but no call to driver_unregister in ide_unregister_driver.

I put one in, and that takes care of it. PATCH to ide.c attached.

Regards, Willem Riede.


[-- Attachment #2: ide.patch --]
[-- Type: text/plain, Size: 279 bytes --]

--- ide.c-l2552	2002-12-09 21:45:52.000000000 -0500
+++ ide.c	2002-12-17 20:43:29.000000000 -0500
@@ -2314,6 +2314,8 @@
 {
 	ide_drive_t *drive;
 
+	driver_unregister(&driver->gen_driver);
+
 	spin_lock(&drivers_lock);
 	list_del(&driver->drivers);
 	spin_unlock(&drivers_lock);

^ permalink raw reply

* Re: Intel P6 vs P7 system call performance
From: Ulrich Drepper @ 2002-12-18  1:54 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: Linus Torvalds, Matti Aarnio, Hugh Dickins, Dave Jones,
	Ingo Molnar, linux-kernel, hpa
In-Reply-To: <3014AAAC8E0930438FD38EBF6DCEB564419C95@fmsmsx407.fm.intel.com>

Nakajima, Jun wrote:
> AMD (at least Athlon, as far as I know) supports sysenter/sysexit. We tested it on an Athlon box as well, and it worked fine. And sysenter/sysexit was better than int/iret too (about 40% faster) there. 

That's good to know but not what I meant.

I referred to syscall/sysret opcodes.  They are broken in their own way
(destroying ecx on kernel entry) but at least they preserve eip.

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------


^ permalink raw reply

* [PATCH]: remove warnings on promlib
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle


Hi

       remove compile warnings about undefined symbols.

Later, Juan.

Index: arch/mips/lib/promlib.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/lib/promlib.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 promlib.c
--- arch/mips/lib/promlib.c	28 Sep 2002 22:28:38 -0000	1.1.2.1
+++ arch/mips/lib/promlib.c	18 Dec 2002 00:49:18 -0000
@@ -1,3 +1,7 @@
+
+#include <asm/sgialib.h>
+#include <linux/kernel.h>
+
 #include <stdarg.h>
 
 void prom_printf(char *fmt, ...)


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: correct format string in dump_tlb
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        if we cast to unsigned it, print it as a long is a no-no :(

Later, Juan.

Index: arch/mips/lib/dump_tlb.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/lib/dump_tlb.c,v
retrieving revision 1.8.2.5
diff -u -r1.8.2.5 dump_tlb.c
--- arch/mips/lib/dump_tlb.c	2 Dec 2002 00:24:48 -0000	1.8.2.5
+++ arch/mips/lib/dump_tlb.c	18 Dec 2002 00:49:18 -0000
@@ -179,7 +180,7 @@
 #ifdef CONFIG_64BIT_PHYS_ADDR
 	printk("page == %08Lx\n", (unsigned long long) pte_val(page));
 #else
-	printk("page == %08lx\n", (unsigned int) pte_val(page));
+	printk("page == %08x\n", (unsigned int) pte_val(page));
 #endif
 
 	val = pte_val(page);


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: fix compiler warnings in the math-emulator
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        this patch does:

* redefine SETCX to only set cx
* define a new macre SETANDTESTCX for the few cases when we also want to
  test the value set.

Later, Juan.

Index: arch/mips/math-emu/dp_cmp.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/dp_cmp.c,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 dp_cmp.c
--- arch/mips/math-emu/dp_cmp.c	5 Aug 2002 14:18:22 -0000	1.4.2.1
+++ arch/mips/math-emu/dp_cmp.c	18 Dec 2002 00:49:18 -0000
@@ -44,7 +44,7 @@
 		if (cmp & IEEE754_CUN)
 			return 1;
 		if (cmp & (IEEE754_CLT | IEEE754_CGT)) {
-			if (sig && SETCX(IEEE754_INVALID_OPERATION))
+			if (sig && SETANDTESTCX(IEEE754_INVALID_OPERATION))
 				return ieee754si_xcpt(0, "fcmpf", x);
 		}
 		return 0;
Index: arch/mips/math-emu/ieee754dp.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/ieee754dp.c,v
retrieving revision 1.5.2.3
diff -u -r1.5.2.3 ieee754dp.c
--- arch/mips/math-emu/ieee754dp.c	5 Aug 2002 23:53:34 -0000	1.5.2.3
+++ arch/mips/math-emu/ieee754dp.c	18 Dec 2002 00:49:18 -0000
@@ -69,7 +69,7 @@
 	if (!ieee754dp_issnan(r))	/* QNAN does not cause invalid op !! */
 		return r;
 
-	if (!SETCX(IEEE754_INVALID_OPERATION)) {
+	if (!SETANDTESTCX(IEEE754_INVALID_OPERATION)) {
 		/* not enabled convert to a quiet NaN */
 		DPMANT(r) &= (~DP_MBIT(DP_MBITS-1));
 		if (ieee754dp_isnan(r))
Index: arch/mips/math-emu/ieee754int.h
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/ieee754int.h,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 ieee754int.h
--- arch/mips/math-emu/ieee754int.h	5 Aug 2002 23:53:34 -0000	1.3.2.2
+++ arch/mips/math-emu/ieee754int.h	18 Dec 2002 00:49:18 -0000
@@ -61,7 +61,10 @@
   (ieee754_csr.cx = 0)
 
 #define SETCX(x) \
-  (ieee754_csr.cx |= (x),ieee754_csr.sx |= (x),ieee754_csr.mx & (x))
+  (ieee754_csr.cx |= (x),ieee754_csr.sx |= (x))
+
+#define SETANDTESTCX(x) \
+  (SETCX(x),ieee754_csr.mx & (x))
 
 #define TSTX()	\
 	(ieee754_csr.cx & ieee754_csr.mx)
Index: arch/mips/math-emu/ieee754sp.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/ieee754sp.c,v
retrieving revision 1.6.2.2
diff -u -r1.6.2.2 ieee754sp.c
--- arch/mips/math-emu/ieee754sp.c	5 Aug 2002 23:53:34 -0000	1.6.2.2
+++ arch/mips/math-emu/ieee754sp.c	18 Dec 2002 00:49:18 -0000
@@ -70,7 +70,7 @@
 	if (!ieee754sp_issnan(r))	/* QNAN does not cause invalid op !! */
 		return r;
 
-	if (!SETCX(IEEE754_INVALID_OPERATION)) {
+	if (!SETANDTESTCX(IEEE754_INVALID_OPERATION)) {
 		/* not enabled convert to a quiet NaN */
 		SPMANT(r) &= (~SP_MBIT(SP_MBITS-1));
 		if (ieee754sp_isnan(r))
Index: arch/mips/math-emu/sp_cmp.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/sp_cmp.c,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 sp_cmp.c
--- arch/mips/math-emu/sp_cmp.c	5 Aug 2002 14:18:23 -0000	1.4.2.1
+++ arch/mips/math-emu/sp_cmp.c	18 Dec 2002 00:49:18 -0000
@@ -44,7 +44,7 @@
 		if (cmp & IEEE754_CUN)
 			return 1;
 		if (cmp & (IEEE754_CLT | IEEE754_CGT)) {
-			if (sig && SETCX(IEEE754_INVALID_OPERATION))
+			if (sig && SETANDTESTCX(IEEE754_INVALID_OPERATION))
 				return ieee754si_xcpt(0, "fcmpf", x);
 		}
 		return 0;
-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: make prototype of printk available
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        this complained about printk being undefined.
        Once there, put a tag to the printk.

Later, Juan.

Index: arch/mips/math-emu/ieee754xcpt.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/ieee754xcpt.c,v
retrieving revision 1.3.2.1
diff -u -r1.3.2.1 ieee754xcpt.c
--- arch/mips/math-emu/ieee754xcpt.c	5 Aug 2002 23:53:34 -0000	1.3.2.1
+++ arch/mips/math-emu/ieee754xcpt.c	18 Dec 2002 00:49:18 -0000
@@ -29,6 +29,7 @@
  *  Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
  *************************************************************************/
 
+#include <linux/kernel.h>
 #include "ieee754.h"
 
 /*
@@ -42,7 +43,7 @@
 
 void ieee754_xcpt(struct ieee754xctx *xcp)
 {
-	printk("floating point exception in \"%s\", type=%s\n",
+	printk(KERN_INFO "floating point exception in \"%s\", type=%s\n",
 		xcp->op, rtnames[xcp->rt]);
 }
 


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: math-emu ambigous else
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        compiler complained that this else was ambiguous.

Later, Juan.

PD. Once there, change the code to:

    return ieee754sp_zero(ieee754_csr.rm ==IEEE754_RD);

shouldn't be better and indeed clearer?



Index: arch/mips/math-emu/sp_sub.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/sp_sub.c,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 sp_sub.c
--- arch/mips/math-emu/sp_sub.c	5 Aug 2002 23:53:34 -0000	1.4.2.1
+++ arch/mips/math-emu/sp_sub.c	18 Dec 2002 00:49:18 -0000
@@ -167,12 +167,12 @@
 			xe = xe;
 			xs = ys;
 		}
-		if (xm == 0)
+		if (xm == 0) {
 			if (ieee754_csr.rm == IEEE754_RD)
 				return ieee754sp_zero(1);	/* round negative inf. => sign = -1 */
 			else
 				return ieee754sp_zero(0);	/* other round modes   => sign = 1 */
-
+		}
 		/* normalize to rounding precision
 		 */
 		while ((xm >> (SP_MBITS + 3)) == 0) {




-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: mathemu remove unused variable
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        sign is never used in that function.

Later, Juan.

Index: arch/mips/math-emu/sp_sqrt.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/math-emu/sp_sqrt.c,v
retrieving revision 1.4
diff -u -r1.4 sp_sqrt.c
--- arch/mips/math-emu/sp_sqrt.c	4 Oct 2001 13:19:44 -0000	1.4
+++ arch/mips/math-emu/sp_sqrt.c	18 Dec 2002 00:49:18 -0000
@@ -29,7 +29,6 @@
 
 ieee754sp ieee754sp_sqrt(ieee754sp x)
 {
-	int sign = (int) 0x80000000;
 	int ix, s, q, m, t, i;
 	unsigned int r;
 	COMPXSP;


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: c-r4k.c, new gcc's don't like empty labels
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        patch is trivial to eliminate warnings from the compiler

Later, Juan.

Index: arch/mips/mm/c-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/c-r4k.c,v
retrieving revision 1.3.2.13
diff -u -r1.3.2.13 c-r4k.c
--- arch/mips/mm/c-r4k.c	11 Dec 2002 14:23:12 -0000	1.3.2.13
+++ arch/mips/mm/c-r4k.c	18 Dec 2002 00:49:18 -0000
@@ -465,7 +465,7 @@
 		blast_scache16_page_indexed(page);
 	} else
 		blast_scache16_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s32d16i16(struct vm_area_struct *vma,
@@ -511,7 +511,7 @@
 		blast_scache32_page_indexed(page);
 	} else
 		blast_scache32_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s64d16i16(struct vm_area_struct *vma,
@@ -557,7 +557,7 @@
 		blast_scache64_page_indexed(page);
 	} else
 		blast_scache64_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s128d16i16(struct vm_area_struct *vma,
@@ -604,7 +604,7 @@
 		blast_scache128_page_indexed(page);
 	} else
 		blast_scache128_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s32d32i32(struct vm_area_struct *vma,
@@ -651,7 +651,7 @@
 		blast_scache32_page_indexed(page);
 	} else
 		blast_scache32_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s64d32i32(struct vm_area_struct *vma,
@@ -698,7 +698,7 @@
 		blast_scache64_page_indexed(page);
 	} else
 		blast_scache64_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_s128d32i32(struct vm_area_struct *vma,
@@ -744,7 +744,7 @@
 		blast_scache128_page_indexed(page);
 	} else
 		blast_scache128_page(page);
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_d16i16(struct vm_area_struct *vma,
@@ -789,7 +789,7 @@
 		page = (KSEG0 + (page & (dcache_size - 1)));
 		blast_dcache16_page_indexed(page);
 	}
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_d32i32(struct vm_area_struct *vma,
@@ -835,7 +835,7 @@
 		page = (KSEG0 + (page & (dcache_size - 1)));
 		blast_dcache32_page_indexed(page);
 	}
-out:
+out:;
 }
 
 static void r4k_flush_cache_page_d32i32_r4600(struct vm_area_struct *vma,
@@ -881,7 +881,7 @@
 		blast_dcache32_page_indexed(page);
 		blast_dcache32_page_indexed(page ^ dcache_waybit);
 	}
-out:
+out:;
 }
 
 static void r4k_flush_page_to_ram_s16(struct page *page)


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: c-r4k.c, printing longs as longs
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        printing a long as a int is a bad idea :(

Later, Juan.

Index: arch/mips/mm/c-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/c-r4k.c,v
retrieving revision 1.3.2.13
diff -u -r1.3.2.13 c-r4k.c
--- arch/mips/mm/c-r4k.c	11 Dec 2002 14:23:12 -0000	1.3.2.13
+++ arch/mips/mm/c-r4k.c	18 Dec 2002 00:49:18 -0000
@@ -1107,7 +1107,7 @@
 	}
 	ic_lsize = 16 << ((config >> 5) & 1);
 
-	printk("Primary instruction cache %dkb, linesize %ld bytes.\n",
+	printk("Primary instruction cache %ldkb, linesize %ld bytes.\n",
 	       icache_size >> 10, ic_lsize);
 }
 
@@ -1129,7 +1129,7 @@
 	}
 	dc_lsize = 16 << ((config >> 4) & 1);
 
-	printk("Primary data cache %dkb, linesize %ld bytes.\n",
+	printk("Primary data cache %ldkb, linesize %ld bytes.\n",
 	       dcache_size >> 10, dc_lsize);
 }
 


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: remove unused label
From: Juan Quintela @ 2002-12-18  1:43 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        this label is not used in the code

Later, Juan.

Index: arch/mips/mm/fault.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/fault.c,v
retrieving revision 1.25.2.9
diff -u -r1.25.2.9 fault.c
--- arch/mips/mm/fault.c	14 Sep 2002 23:12:50 -0000	1.25.2.9
+++ arch/mips/mm/fault.c	18 Dec 2002 00:49:18 -0000
@@ -159,7 +159,6 @@
 bad_area:
 	up_read(&mm->mmap_sem);
 
-bad_area_nosemaphore:
 	/* User mode accesses just cause a SIGSEGV */
 	if (user_mode(regs)) {
 		tsk->thread.cp0_badvaddr = address;


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: make highmem only things enclosed in the right #ifdef
From: Juan Quintela @ 2002-12-18  1:42 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        a couple of variable declarations and a function declaration
        wasn't properly protected by #ifdefs.

Later, Juan.

Index: arch/mips/mm/init.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/init.c,v
retrieving revision 1.38.2.7
diff -u -r1.38.2.7 init.c
--- arch/mips/mm/init.c	5 Aug 2002 23:53:35 -0000	1.38.2.7
+++ arch/mips/mm/init.c	18 Dec 2002 00:49:19 -0000
@@ -161,6 +161,7 @@
 extern char _ftext, _etext, _fdata, _edata;
 extern char __init_begin, __init_end;
 
+#ifdef CONFIG_HIGHMEM
 static void __init fixrange_init (unsigned long start, unsigned long end,
 	pgd_t *pgd_base)
 {
@@ -189,22 +190,25 @@
 		j = 0;
 	}
 }
+#endif /* CONFIG_HIGHMEM */
 
 void __init pagetable_init(void)
 {
+#ifdef CONFIG_HIGHMEM
 	unsigned long vaddr;
-	pgd_t *pgd, *pgd_base;
 	pmd_t *pmd;
 	pte_t *pte;
-
+	pgd_t *pgd, pgd_base;
+#endif
 	/* Initialize the entire pgd.  */
 	pgd_init((unsigned long)swapper_pg_dir);
 	pgd_init((unsigned long)swapper_pg_dir +
 	         sizeof(pgd_t ) * USER_PTRS_PER_PGD);
 
-	pgd_base = swapper_pg_dir;
 
 #ifdef CONFIG_HIGHMEM
+	pgd_base = swapper_pg_dir;
+
 	/*
 	 * Fixed mappings:
 	 */


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: config1 is only used by MIPS32 and MIPS64
From: Juan Quintela @ 2002-12-18  1:42 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        subject told everything

Later, Juan.

Index: arch/mips/mm/tlb-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/tlb-r4k.c,v
retrieving revision 1.6.2.9
diff -u -r1.6.2.9 tlb-r4k.c
--- arch/mips/mm/tlb-r4k.c	4 Dec 2002 23:50:23 -0000	1.6.2.9
+++ arch/mips/mm/tlb-r4k.c	18 Dec 2002 00:49:19 -0000
@@ -334,8 +334,10 @@
 
 static void __init probe_tlb(unsigned long config)
 {
-	unsigned int prid, config1;
-
+	unsigned int prid;
+#if defined(CONFIG_CPU_MIPS32) || defined (CONFIG_CPU_MIPS64)
+	unsigned int config1;
+#endif
 	prid = read_c0_prid() & 0xff00;
 	if (prid == PRID_IMP_RM7000 || !(config & (1 << 31)))
 		/*


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]: Use C99 struct initializers in ip22 code
From: Juan Quintela @ 2002-12-18  1:42 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        switch to C99 declarations in ip22 code. note that some of the
        structs was already initialized that way.

        There are also two printk labels in the middle.

Later, Juan.

Index: arch/mips/sgi-ip22/ip22-eisa.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-eisa.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 ip22-eisa.c
--- arch/mips/sgi-ip22/ip22-eisa.c	23 Jul 2002 16:39:10 -0000	1.1.2.1
+++ arch/mips/sgi-ip22/ip22-eisa.c	18 Dec 2002 00:49:19 -0000
@@ -153,14 +153,13 @@
 }
 
 static struct hw_interrupt_type ip22_eisa1_irq_type = {
-	"IP22 EISA",
-	startup_eisa1_irq,
-	shutdown_eisa1_irq,
-	enable_eisa1_irq,
-	disable_eisa1_irq,
-	mask_and_ack_eisa1_irq,
-	end_eisa1_irq,
-	NULL
+	.typename	= "IP22 EISA",
+	.startup	= startup_eisa1_irq,
+	.shutdown	= shutdown_eisa1_irq,
+	.enable		= enable_eisa1_irq,
+	.disable	= disable_eisa1_irq,
+	.ack		= mask_and_ack_eisa1_irq,
+	.end		= end_eisa1_irq,
 };
 
 static void enable_eisa2_irq(unsigned int irq)
@@ -217,22 +216,23 @@
 }
 
 static struct hw_interrupt_type ip22_eisa2_irq_type = {
-	"IP22 EISA",
-	startup_eisa2_irq,
-	shutdown_eisa2_irq,
-	enable_eisa2_irq,
-	disable_eisa2_irq,
-	mask_and_ack_eisa2_irq,
-	end_eisa2_irq,
-	NULL
+	.typename	= "IP22 EISA",
+	.startup	= startup_eisa2_irq,
+	.shutdown	= shutdown_eisa2_irq,
+	.enable		= enable_eisa2_irq,
+	.disable	= disable_eisa2_irq,
+	.ack		= mask_and_ack_eisa2_irq,
+	.end		= end_eisa2_irq,
 };
 
 static struct irqaction eisa_action = {
-	ip22_eisa_intr, 0, 0, "EISA", NULL, NULL
+	.handler	= ip22_eisa_intr,
+	.name		= "EISA",
 };
 
 static struct irqaction cascade_action = {
-	no_action, 0, 0, "EISA cascade", NULL, NULL
+	.handler	= no_action,
+	.name		= "EISA cascade",
 };
 
 int __init ip22_eisa_init(void)
Index: arch/mips/sgi-ip22/ip22-gio.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-gio.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 ip22-gio.c
--- arch/mips/sgi-ip22/ip22-gio.c	5 Aug 2002 23:53:35 -0000	1.1.2.3
+++ arch/mips/sgi-ip22/ip22-gio.c	18 Dec 2002 00:49:19 -0000
@@ -27,41 +27,25 @@
 
 #define GIO_NO_DEVICE		0x80
 
-static struct gio_dev gio_slot[GIO_NUM_SLOTS] = {
-	{
-		0,
-		0,
-		0,
-		GIO_NO_DEVICE,
-		GIO_SLOT_GFX,
-		GIO_ADDR_GFX,
-		GIO_GFX_MAP_SIZE,
-		NULL,
-		"GFX"
-	},
-	{
-		0,
-		0,
-		0,
-		GIO_NO_DEVICE,
-		GIO_SLOT_GIO1,
-		GIO_ADDR_GIO1,
-		GIO_GIO1_MAP_SIZE,
-		NULL,
-		"EXP0"
-	},
-	{
-		0,
-		0,
-		0,
-		GIO_NO_DEVICE,
-		GIO_SLOT_GIO2,
-		GIO_ADDR_GIO2,
-		GIO_GIO2_MAP_SIZE,
-		NULL,
-		"EXP1"
-	}
-};
+static struct gio_dev gio_slot[GIO_NUM_SLOTS] = {{
+	.flags		= GIO_NO_DEVICE,
+	.slot_number	= GIO_SLOT_GFX,
+	.base_addr	= GIO_ADDR_GFX,
+	.map_size	= GIO_GFX_MAP_SIZE,
+	.slot_name	= "GFX",
+}, {
+	.flags		= GIO_NO_DEVICE,
+	.slot_number	= GIO_SLOT_GIO1,
+	.base_addr	= GIO_ADDR_GIO1,
+	.map_size	= GIO_GIO1_MAP_SIZE,
+	.slot_name	= "EXP0",
+}, {
+	.flags		= GIO_NO_DEVICE,
+	.slot_number	= GIO_SLOT_GIO2,
+	.base_addr	= GIO_ADDR_GIO2,
+	.map_size	= GIO_GIO2_MAP_SIZE,
+	.slot_name	= "EXP1"
+}};
 
 static int gio_read_proc(char *buf, char **start, off_t off,
 			 int count, int *eof, void *data)
Index: arch/mips/sgi-ip22/ip22-int.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-int.c,v
retrieving revision 1.2.2.6
diff -u -r1.2.2.6 ip22-int.c
--- arch/mips/sgi-ip22/ip22-int.c	5 Aug 2002 23:53:35 -0000	1.2.2.6
+++ arch/mips/sgi-ip22/ip22-int.c	18 Dec 2002 00:49:19 -0000
@@ -79,14 +79,13 @@
 }
 
 static struct hw_interrupt_type ip22_local0_irq_type = {
-	"IP22 local 0",
-	startup_local0_irq,
-	shutdown_local0_irq,
-	enable_local0_irq,
-	disable_local0_irq,
-	mask_and_ack_local0_irq,
-	end_local0_irq,
-	NULL
+	.typename	= "IP22 local 0",
+	.startup	= startup_local0_irq,
+	.shutdown	= shutdown_local0_irq,
+	.enable		= enable_local0_irq,
+	.disable	= disable_local0_irq,
+	.ack		= mask_and_ack_local0_irq,
+	.end		= end_local0_irq,
 };
 
 static void enable_local1_irq(unsigned int irq)
@@ -126,14 +125,13 @@
 }
 
 static struct hw_interrupt_type ip22_local1_irq_type = {
-	"IP22 local 1",
-	startup_local1_irq,
-	shutdown_local1_irq,
-	enable_local1_irq,
-	disable_local1_irq,
-	mask_and_ack_local1_irq,
-	end_local1_irq,
-	NULL
+	.typename	= "IP22 local 1",
+	.startup	= startup_local1_irq,
+	.shutdown	= shutdown_local1_irq,
+	.enable		= enable_local1_irq,
+	.disable	= disable_local1_irq,
+	.ack		= mask_and_ack_local1_irq,
+	.end		= end_local1_irq,
 };
 
 static void enable_local2_irq(unsigned int irq)
@@ -173,14 +171,13 @@
 }
 
 static struct hw_interrupt_type ip22_local2_irq_type = {
-	"IP22 local 2",
-	startup_local2_irq,
-	shutdown_local2_irq,
-	enable_local2_irq,
-	disable_local2_irq,
-	mask_and_ack_local2_irq,
-	end_local2_irq,
-	NULL
+	.typename	= "IP22 local 2",
+	.startup	= startup_local2_irq,
+	.shutdown	= shutdown_local2_irq,
+	.enable		= enable_local2_irq,
+	.disable	= disable_local2_irq,
+	.ack		= mask_and_ack_local2_irq,
+	.end		= end_local2_irq,
 };
 
 static void enable_local3_irq(unsigned int irq)
@@ -224,14 +221,13 @@
 }
 
 static struct hw_interrupt_type ip22_local3_irq_type = {
-	"IP22 local 3",
-	startup_local3_irq,
-	shutdown_local3_irq,
-	enable_local3_irq,
-	disable_local3_irq,
-	mask_and_ack_local3_irq,
-	end_local3_irq,
-	NULL
+	.typename	= "IP22 local 3",
+	.startup	= startup_local3_irq,
+	.shutdown	= shutdown_local3_irq,
+	.enable		= enable_local3_irq,
+	.disable	= disable_local3_irq,
+	.ack		= mask_and_ack_local3_irq,
+	.end		= end_local3_irq,
 };
 
 void indy_local0_irqdispatch(struct pt_regs *regs)
@@ -292,17 +288,36 @@
 	irq_exit(cpu, irq);
 }
 
-static struct irqaction local0_cascade =
-	{ no_action, SA_INTERRUPT, 0, "local0 cascade", NULL, NULL };
-static struct irqaction local1_cascade =
-	{ no_action, SA_INTERRUPT, 0, "local1 cascade", NULL, NULL };
-static struct irqaction buserr =
-	{ no_action, SA_INTERRUPT, 0, "Bus Error", NULL, NULL };
-static struct irqaction map0_cascade =
-	{ no_action, SA_INTERRUPT, 0, "mappable0 cascade", NULL, NULL };
+static struct irqaction local0_cascade = { 
+	.handler	= no_action,
+	.flags		= SA_INTERRUPT,
+	.name		= "local0 cascade",
+};
+
+static struct irqaction local1_cascade = { 
+	.handler	= no_action,
+	.flags		= SA_INTERRUPT,
+	.name		= "local1 cascade",
+};
+
+static struct irqaction buserr = { 
+	.handler	= no_action,
+	.flags		= SA_INTERRUPT,
+	.name		= "Bus Error",
+};
+
+static struct irqaction map0_cascade = { 
+	.handler	= no_action,
+	.flags		= SA_INTERRUPT,
+	.name		= "mapable0 cascade",
+};
+
 #ifdef I_REALLY_NEED_THIS_IRQ
-static struct irqaction map1_cascade =
-	{ no_action, SA_INTERRUPT, 0, "mappable1 cascade", NULL, NULL };
+static struct irqaction map1_cascade = { 
+	.handler	= no_action,
+	.flags		= SA_INTERRUPT,
+	.name		= "mapable1 cascade",
+};
 #endif
 
 extern void mips_cpu_irq_init(unsigned int irq_base);
Index: arch/mips/sgi-ip22/ip22-reset.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-reset.c,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 ip22-reset.c
--- arch/mips/sgi-ip22/ip22-reset.c	5 Aug 2002 23:53:35 -0000	1.1.2.4
+++ arch/mips/sgi-ip22/ip22-reset.c	18 Dec 2002 00:49:19 -0000
@@ -220,9 +220,7 @@
 }
 
 static struct notifier_block panic_block = {
-	panic_event,
-	NULL,
-	0
+	.notifier_call	= panic_event,
 };
 
 void indy_reboot_setup(void)
Index: arch/mips/sgi-ip22/ip22-system.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-system.c,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 ip22-system.c
--- arch/mips/sgi-ip22/ip22-system.c	5 Aug 2002 14:02:43 -0000	1.1.2.7
+++ arch/mips/sgi-ip22/ip22-system.c	18 Dec 2002 00:49:19 -0000
@@ -19,18 +19,37 @@
 	int type;
 };
 
-static struct smatch sgi_cputable[] = {
-	{ "MIPS-R2000", CPU_R2000 },
-	{ "MIPS-R3000", CPU_R3000 },
-	{ "MIPS-R3000A", CPU_R3000A },
-	{ "MIPS-R4000", CPU_R4000SC },
-	{ "MIPS-R4400", CPU_R4400SC },
-	{ "MIPS-R4600", CPU_R4600 },
-	{ "MIPS-R8000", CPU_R8000 },
-	{ "MIPS-R5000", CPU_R5000 },
-	{ "MIPS-R5000A", CPU_R5000A },
-	{ "MIPS-R10000", CPU_R10000 }
-};
+static struct smatch sgi_cputable[] = {{ 
+	.name	= "MIPS-R2000",
+	.type	= CPU_R2000,
+},{
+	.name	= "MIPS-R3000",
+	.type	= CPU_R3000,
+},{
+	.name	= "MIPS-R3000A",
+	.type	= CPU_R3000A,
+},{
+	.name	= "MIPS-4000",
+	.type	= CPU_R4000SC,
+},{
+	.name	= "MIPS-R4400",
+	.type	= CPU_R4400SC,
+},{
+	.name	= "MIPS-R4600",
+	.type	= CPU_R4600,
+},{
+	.name	= "MIPS-R8000",
+	.type	= CPU_R8000,
+},{
+	.name	= "MIPS-R5000",
+	.type	= CPU_R5000,
+},{
+	.name	= "MIPS-R5000A",
+	.type	= CPU_R5000A,
+},{
+	.name	= "MIPS-R10000",
+	.type	= CPU_R10000,
+}};
 
 static int __init string_to_cpu(char *s)
 {
Index: drivers/sgi/char/ds1286.c
===================================================================
RCS file: /home/cvs/linux/drivers/sgi/char/ds1286.c,v
retrieving revision 1.14.2.2
diff -u -r1.14.2.2 ds1286.c
--- drivers/sgi/char/ds1286.c	7 Nov 2002 01:47:46 -0000	1.14.2.2
+++ drivers/sgi/char/ds1286.c	18 Dec 2002 00:49:22 -0000
@@ -290,9 +290,9 @@
 
 static struct miscdevice ds1286_dev=
 {
-	RTC_MINOR,
-	"rtc",
-	&ds1286_fops
+	.minor	= RTC_MINOR,
+	.name	= "rtc",
+	.fops	= &ds1286_fops,
 };
 
 int __init ds1286_init(void)
Index: drivers/sgi/char/graphics.c
===================================================================
RCS file: /home/cvs/linux/drivers/sgi/char/graphics.c,v
retrieving revision 1.30.2.2
diff -u -r1.30.2.2 graphics.c
--- drivers/sgi/char/graphics.c	7 Nov 2002 01:47:46 -0000	1.30.2.2
+++ drivers/sgi/char/graphics.c	18 Dec 2002 00:49:23 -0000
@@ -299,12 +293,16 @@
 
 /* /dev/graphics */
 static struct miscdevice dev_graphics = {
-	SGI_GRAPHICS_MINOR, "sgi-graphics", &sgi_graphics_fops
+	.minor	= SGI_GRAPHICS_MINOR,
+	.name	= "sgi-graphics",
+	.fops	= &sgi_graphics_fops,
 };
 
 /* /dev/opengl */
 static struct miscdevice dev_opengl = {
-	SGI_OPENGL_MINOR, "sgi-opengl", &sgi_graphics_fops
+	.minor	= SGI_OPENGL_MINOR,
+	.name	= "sgi-opengl",
+	.fops	= &sgi_graphics_fops,
 };
 
 /* This is called later from the misc-init routine */
Index: drivers/sgi/char/streamable.c
===================================================================
RCS file: /home/cvs/linux/drivers/sgi/char/streamable.c,v
retrieving revision 1.13.4.2
diff -u -r1.13.4.2 streamable.c
--- drivers/sgi/char/streamable.c	7 Nov 2002 01:47:46 -0000	1.13.4.2
+++ drivers/sgi/char/streamable.c	18 Dec 2002 00:49:24 -0000
@@ -53,7 +53,7 @@
 static int
 sgi_gfx_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
-	printk ("GFX: ioctl 0x%x %ld called\n", cmd, arg);
+	printk (KERN_BEBUG "GFX: ioctl 0x%x %ld called\n", cmd, arg);
 	return 0;
 	return -EINVAL;
 }
@@ -63,7 +63,9 @@
 };
 
 static struct miscdevice dev_gfx = {
-	SGI_GFX_MINOR, "sgi-gfx", &sgi_gfx_fops
+	.minor	= SGI_GFX_MINOR,
+	.name	= "sgi-gfx",
+	.fops	= &sgi_gfx_fops,
 };
 
 /* /dev/input/keyboard streams device */
@@ -172,7 +174,9 @@
 };
 
 static struct miscdevice dev_input_keyboard = {
-	SGI_STREAMS_KEYBOARD, "streams-keyboard", &sgi_keyb_fops
+	.minor	= SGI_STREAMS_KEYBOARD,
+	.name	= "streams-keyboard",
+	.fops	= &sgi_keyb_fops,
 };
 
 /* /dev/input/mouse streams device */
@@ -305,13 +309,15 @@
 
 /* /dev/input/mouse */
 static struct miscdevice dev_input_mouse = {
-	SGI_STREAMS_KEYBOARD, "streams-mouse", &sgi_mouse_fops
+	.minor	= SGI_STREAMS_KEYBOARD,
+	.name	= "streams-mouse",
+	.fops	= &sgi_mouse_fops,
 };
 
 void
 streamable_init (void)
 {
-	printk ("streamable misc devices registered (keyb:%d, gfx:%d)\n",
+	printk (KERN_INFO "streamable misc devices registered (keyb:%d, gfx:%d)\n",
 		SGI_STREAMS_KEYBOARD, SGI_GFX_MINOR);
 
 	misc_register (&dev_gfx);
Index: drivers/sgi/char/usema.c
===================================================================
RCS file: /home/cvs/linux/drivers/sgi/char/usema.c,v
retrieving revision 1.22.2.2
diff -u -r1.22.2.2 usema.c
--- drivers/sgi/char/usema.c	7 Nov 2002 01:47:46 -0000	1.22.2.2
+++ drivers/sgi/char/usema.c	18 Dec 2002 00:49:24 -0000
@@ -170,13 +170,15 @@
 };
 
 static struct miscdevice dev_usemaclone = {
-	SGI_USEMACLONE, "usemaclone", &sgi_usemaclone_fops
+	.minor	= SGI_USEMACLONE,
+	.name	= "usemaclone",
+	.fops	= &sgi_usemaclone_fops,
 };
 
 void
 usema_init(void)
 {
-	printk("usemaclone misc device registered (minor: %d)\n",
+	printk(KERN_INFO "usemaclone misc device registered (minor: %d)\n",
 	       SGI_USEMACLONE);
 	misc_register(&dev_usemaclone);
 }


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply

* [PATCH]:
From: Juan Quintela @ 2002-12-18  1:42 UTC (permalink / raw)
  To: linux mips mailing list, Ralf Baechle


Hi
        ArcRead() usses funny types :(

Later, Juan.a

PD. Someone can explain me what mean:
    __attribute__ ((__mode__ (__SI__)));

    The SI part don't appear in the gcc info pages :(

Index: arch/mips/sgi-ip22/ip22-time.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/sgi-ip22/ip22-time.c,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 ip22-time.c
--- arch/mips/sgi-ip22/ip22-time.c	2 Dec 2002 00:24:50 -0000	1.1.2.10
+++ arch/mips/sgi-ip22/ip22-time.c	18 Dec 2002 00:49:20 -0000
@@ -195,7 +195,7 @@
 {
 	int cpu = smp_processor_id();
 	int irq = SGI_8254_0_IRQ;
-	long cnt;
+	ULONG cnt;
 	char c;
 
 	irq_enter(cpu, irq);


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.