Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* 2.3.99-pre1 axp misc patch
@ 2000-03-16 19:39 Richard Henderson
  2000-03-16 23:21 ` Brian Pomerantz
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2000-03-16 19:39 UTC (permalink / raw)
  To: torvalds; +Cc: axp-list, linux-alpha

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

- Fixups for the system calls recently added.
- Fix interrupt handling on es40.
- Use rpcc for delay loop.


r~

[-- Attachment #2: d-2399-misc.gz --]
[-- Type: application/octet-stream, Size: 4070 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
  2000-03-16 19:39 2.3.99-pre1 axp misc patch Richard Henderson
@ 2000-03-16 23:21 ` Brian Pomerantz
  2000-03-17  5:20   ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Pomerantz @ 2000-03-16 23:21 UTC (permalink / raw)
  To: rth; +Cc: axp-list, linux-alpha, torvalds

I was still unable to compile this.  First I was bombing with an error
in include/asm/delay.h where it was trying to dereference a pointer of
unknown type in the cpu_data array.  This turned out to be 'current'
so I included sched.h and it got passed that error.  Then I came
across the NCR driver which bombed.  The macro INB_OFF(o) is trying to
reference the member 'base_io' in variable np which is of type
'struct ncb *' and doesn't have this member in its definition.  It
looks like this is only referenced when the NCR controller is in I/O
mapped mode versus memory mapped.  The first occurrence of this
activity is on line 3311 in drivers/scsi/sym53c8xx.c.  Any help on
this is appreciated.


BAPper

On Thu, Mar 16, 2000 at 11:39:07AM -0800, Richard Henderson wrote:
> - Fixups for the system calls recently added.
> - Fix interrupt handling on es40.
> - Use rpcc for delay loop.
> 
> 
> r~



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
  2000-03-16 23:21 ` Brian Pomerantz
@ 2000-03-17  5:20   ` Richard Henderson
  2000-03-17  6:45     ` Brian Pomerantz
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2000-03-17  5:20 UTC (permalink / raw)
  To: axp-list, linux-alpha, torvalds

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

On Thu, Mar 16, 2000 at 03:21:12PM -0800, Brian Pomerantz wrote:
> I was still unable to compile this.  First I was bombing with an error
> in include/asm/delay.h where it was trying to dereference a pointer of
> unknown type in the cpu_data array.

Bother.  Here's a fix for it.

> Then I came across the NCR driver which bombed.  The macro INB_OFF(o)
> is trying to reference the member 'base_io' in variable np which is of type
> 'struct ncb *' and doesn't have this member in its definition.

Yes, I saw this too.  I worked around it, but it appears that
something else is wrong because it doesn't pass cache tests.

I was able to the get old 53c7,8xx driver working though...


r~

[-- Attachment #2: d-2399-delay --]
[-- Type: text/plain, Size: 907 bytes --]

diff -rup linux/include/asm-alpha/delay.h 2.3.99-2-2/include/asm-alpha/delay.h
--- linux/include/asm-alpha/delay.h	Thu Mar 16 19:31:28 2000
+++ 2.3.99-2-2/include/asm-alpha/delay.h	Thu Mar 16 19:46:47 2000
@@ -31,21 +31,16 @@ __delay(int loops)
 }
 
 extern __inline__ void
-udelay(unsigned long usecs)
+__udelay(unsigned long usecs, unsigned long lps)
 {
-	unsigned long lps;
+	usecs *= ((1UL << 32) / 1000000) * lps;
+	__delay((long)usecs >> 32);
+}
 
 #ifdef __SMP__
-	lps = cpu_data[smp_processor_id()].loops_per_sec;
+#define udelay(u)  __udelay((u), cpu_data[smp_processor_id()].loops_per_sec)
 #else
-	lps = loops_per_sec;
+#define udelay(u)  __udelay((u), loops_per_sec);
 #endif
-
-	/* Compute (usecs * 2**32 / 10**6) * loops_per_sec / 2**32.  */
-
-        usecs *= 0x10c6;                /* 2^32 / 10^6 */
-	usecs *= lps;
-	__delay((long)usecs >> 32);
-}
 
 #endif /* defined(__ALPHA_DELAY_H) */

[-- Attachment #3: d-2399-oldncr --]
[-- Type: text/plain, Size: 2246 bytes --]

--- linux/drivers/scsi/53c7,8xx.c	Tue Nov 23 10:29:15 1999
+++ 2.3.99-1/drivers/scsi/53c7,8xx.c	Thu Mar 16 14:34:14 2000
@@ -1396,7 +1396,7 @@ ncr_pci_init (Scsi_Host_Template *tpnt, 
     int i, irq;
     struct pci_dev *pdev = pci_find_slot(bus, device_fn);
 
-    printk("scsi-ncr53c7,8xx : at PCI bus %d, device %d,  function %d\n",
+    printk("scsi-ncr53c7,8xx : at PCI bus %d, device %d, function %d\n",
 	bus, (int) (device_fn & 0xf8) >> 3, 
     	(int) device_fn & 7);
 
@@ -1406,10 +1406,8 @@ ncr_pci_init (Scsi_Host_Template *tpnt, 
 	return -1;
     }
 
-    if ((error = pcibios_read_config_word (bus, device_fn, PCI_COMMAND, 
-	    &command)) ||
-	(error = pcibios_read_config_byte (bus, device_fn, PCI_CLASS_REVISION,
-	    &revision))) {
+    if ((error = pci_read_config_word (pdev, PCI_COMMAND, &command)) ||
+	(error = pci_read_config_byte (pdev, PCI_CLASS_REVISION, &revision))) {
 	printk ("scsi-ncr53c7,8xx : error %d not initializing due to error reading configuration space\n"
 		"	 perhaps you specified an incorrect PCI bus, device, or function.\n", error);
 	return -1;
@@ -1451,24 +1449,21 @@ ncr_pci_init (Scsi_Host_Template *tpnt, 
      */
 
     if (command & PCI_COMMAND_IO) { 
-	if ((io_port & 3) != 1) {
-	    printk ("scsi-ncr53c7,8xx : disabling I/O mapping since base address 0 (0x%x)\n"
-    	    	    "        bits 0..1 indicate a non-IO mapping\n",
-		(unsigned) io_port);
+	if (!(pdev->resource[0].flags & IORESOURCE_IO)) {
+	    printk ("scsi-ncr53c7,8xx : disabling I/O mapping since base "
+		    "address 0\n        contains a non-IO mapping\n");
 	    io_port = 0;
-	} else
-	    io_port &= PCI_BASE_ADDRESS_IO_MASK;
+	}
     } else {
     	io_port = 0;
     }
 
     if (command & PCI_COMMAND_MEMORY) {
-	if ((base & PCI_BASE_ADDRESS_SPACE) != PCI_BASE_ADDRESS_SPACE_MEMORY) {
-	    printk("scsi-ncr53c7,8xx : disabling memory mapping since base address 1\n"
-		   "        contains a non-memory mapping\n");
+	if (!(pdev->resource[1].flags & IORESOURCE_MEM)) {
+	    printk("scsi-ncr53c7,8xx : disabling memory mapping since base "
+		   "address 1\n        contains a non-memory mapping\n");
 	    base = 0;
-	} else 
-	    base &= PCI_BASE_ADDRESS_MEM_MASK;
+	}
     } else {
 	base = 0;
     }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
  2000-03-17  5:20   ` Richard Henderson
@ 2000-03-17  6:45     ` Brian Pomerantz
  2000-03-17  8:01       ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Pomerantz @ 2000-03-17  6:45 UTC (permalink / raw)
  To: axp-list; +Cc: linux-alpha

I ended up just using the symbios driver, I don't know the history
behind the two but the symbios looked to be almost identical (though
it had the base_io member defined :).  I think I had to change a few
other things as well, mincore was not defined anywhere and sys_madvise
was not defined either.  Both of those are in the entry.S file and
ended up as undefined references at link time.  I didn't have time to
look into what either of those are before leaving work.  I did get it
compiled and running on an ES40 before leaving, though.  This is the
first kernel I've used after the IRQ rewrite, but it seemed like
response time is a little slower when there is heavy disk activity.
Also, is there a reason that there is never an IRQ handled on CPU 3
(the last CPU)?


BAPper

On Thu, Mar 16, 2000 at 09:20:37PM -0800, Richard Henderson wrote:
> On Thu, Mar 16, 2000 at 03:21:12PM -0800, Brian Pomerantz wrote:
> > I was still unable to compile this.  First I was bombing with an error
> > in include/asm/delay.h where it was trying to dereference a pointer of
> > unknown type in the cpu_data array.
> 
> Bother.  Here's a fix for it.
> 
> > Then I came across the NCR driver which bombed.  The macro INB_OFF(o)
> > is trying to reference the member 'base_io' in variable np which is of type
> > 'struct ncb *' and doesn't have this member in its definition.
> 
> Yes, I saw this too.  I worked around it, but it appears that
> something else is wrong because it doesn't pass cache tests.
> 
> I was able to the get old 53c7,8xx driver working though...
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
  2000-03-17  6:45     ` Brian Pomerantz
@ 2000-03-17  8:01       ` Richard Henderson
  2000-03-17 15:21         ` Brian Pomerantz
       [not found]         ` <Pine.LNX.4.21.0003191855400.270-100000@vaio.random>
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Henderson @ 2000-03-17  8:01 UTC (permalink / raw)
  To: axp-list, linux-alpha

On Thu, Mar 16, 2000 at 10:45:40PM -0800, Brian Pomerantz wrote:
> I ended up just using the symbios driver...

The symbios driver is intended for the newer cards.

> I think I had to change a few
> other things as well, mincore was not defined anywhere and sys_madvise
> was not defined either.

I have no idea what sources you're using then.  They're there
in the snap I pulled off ftp.kernel.org.

> This is the first kernel I've used after the IRQ rewrite, but it seemed like
> response time is a little slower when there is heavy disk activity.
> Also, is there a reason that there is never an IRQ handled on CPU 3
> (the last CPU)?

I figured that might be the case.  Andrea's last set of irq patches
delivered an interrupt to all cpus, only one of which would eventually
handle it.  The rest of them wasted time.

I just wrote a little widget to statically distribute the PCI interrupts
across the active processors.  That should help a bit.


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
  2000-03-17  8:01       ` Richard Henderson
@ 2000-03-17 15:21         ` Brian Pomerantz
       [not found]         ` <Pine.LNX.4.21.0003191855400.270-100000@vaio.random>
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Pomerantz @ 2000-03-17 15:21 UTC (permalink / raw)
  To: axp-list, linux-alpha

On Fri, Mar 17, 2000 at 12:01:36AM -0800, Richard Henderson wrote:
> 
> > I think I had to change a few
> > other things as well, mincore was not defined anywhere and sys_madvise
> > was not defined either.
> 
> I have no idea what sources you're using then.  They're there
> in the snap I pulled off ftp.kernel.org.
>

Hmmm...I patched up from 2.3.51, I'll have to look again to see where
they went.

> 
> > This is the first kernel I've used after the IRQ rewrite, but it seemed like
> > response time is a little slower when there is heavy disk activity.
> > Also, is there a reason that there is never an IRQ handled on CPU 3
> > (the last CPU)?
> 
> I figured that might be the case.  Andrea's last set of irq patches
> delivered an interrupt to all cpus, only one of which would eventually
> handle it.  The rest of them wasted time.
> 

I guess that would explain why in the 'try' columns all the CPUs tried
to service the interrupts. :)


BAPper


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.3.99-pre1 axp misc patch
       [not found]         ` <Pine.LNX.4.21.0003191855400.270-100000@vaio.random>
@ 2000-03-28  0:48           ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2000-03-28  0:48 UTC (permalink / raw)
  To: andrea; +Cc: axp-list, linux-alpha

On Tue, Mar 28, 2000 at 01:07:04AM +0200, andrea@suse.de wrote:
> The wasted time is not wasted since it's killing the irq latency...

No, it is true that the cpus that did not handle the interrupt did
waste time.  There's no denying that.  Whether or not the waste results
in a more responsive system is another question.

> Good, I think it's fine to have the per-cpu irq distribution script in
> userspace. However I would prefer to have a kind of distribution also in
> kernel.

I didn't do anything in userspace.  It's all in the kernel.  
It's overridable from userspace though through /proc/irq.


r~


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-03-28  0:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-16 19:39 2.3.99-pre1 axp misc patch Richard Henderson
2000-03-16 23:21 ` Brian Pomerantz
2000-03-17  5:20   ` Richard Henderson
2000-03-17  6:45     ` Brian Pomerantz
2000-03-17  8:01       ` Richard Henderson
2000-03-17 15:21         ` Brian Pomerantz
     [not found]         ` <Pine.LNX.4.21.0003191855400.270-100000@vaio.random>
2000-03-28  0:48           ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox