public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* AGP bogosities
@ 2005-03-11  1:24 Paul Mackerras
  2005-03-11  2:04 ` Jesse Barnes
                   ` (3 more replies)
  0 siblings, 4 replies; 81+ messages in thread
From: Paul Mackerras @ 2005-03-11  1:24 UTC (permalink / raw)
  To: torvalds, davej; +Cc: benh, linux-kernel

Linus,

I see that you did a cset -x on a changeset from Dave Jones that added
a bogus test for which AGP bridge a device is under.  That has left us
with code in agp_collect_device_status that will never find any device
(just take a look and you'll see).

In fact there are other bogosities in drivers/char/agp/generic.c.  I
can't believe Dave ever tested that code with an AGP 3.0 device.  If
you pass in a mode that has the AGP 3.0 bit set, agp_v3_parse_one()
will first clear that bit (and print a message), and then complain
because you haven't got that bit set in the mode, with a message that
the caller is broken.  Furthermore, if the mode passed in has both the
4x and 8x bits set, the new code will give you 4x where the old code
would give you 8x (which is what the caller wanted).

The patch below fixes these problems.  It will work in the 99.99% of
cases where we have one AGP bridge and one AGP video card.  We should
eventually cope with multiple AGP bridges, but doing the matching of
bridges to video cards is a hard problem because the video card is not
necessarily a child or sibling of the PCI device that we use for
controlling the AGP bridge.  I think we need to see an actual example
of a system with multiple AGP bridges first.

Oh, and by the way, I have 3D working relatively well on my G5 with a
64-bit kernel (and 32-bit X server and clients), which is why I care
about AGP 3.0 support. :)

Paul.

diff -urN linux-2.5/drivers/char/agp/agp.h g5-bad/drivers/char/agp/agp.h
--- linux-2.5/drivers/char/agp/agp.h	2005-03-07 14:01:44.000000000 +1100
+++ g5/drivers/char/agp/agp.h	2005-03-11 11:54:54.000000000 +1100
@@ -322,7 +322,7 @@
 #define AGPCTRL_GTLBEN		(1<<7)
 
 #define AGP2_RESERVED_MASK 0x00fffcc8
-#define AGP3_RESERVED_MASK 0x00ff00cc
+#define AGP3_RESERVED_MASK 0x00ff00c4
 
 #define AGP_ERRATA_FASTWRITES 1<<0
 #define AGP_ERRATA_SBA	 1<<1
diff -urN linux-2.5/drivers/char/agp/generic.c g5-bad/drivers/char/agp/generic.c
--- linux-2.5/drivers/char/agp/generic.c	2005-03-11 11:47:37.000000000 +1100
+++ g5/drivers/char/agp/generic.c	2005-03-11 12:08:29.000000000 +1100
@@ -515,13 +515,9 @@
 		printk (KERN_INFO PFX "%s tried to set rate=x0. Setting to AGP3 x4 mode.\n", current->comm);
 		*requested_mode |= AGPSTAT3_4X;
 	}
-	if (tmp == 3) {
-		printk (KERN_INFO PFX "%s tried to set rate=x3. Setting to AGP3 x4 mode.\n", current->comm);
-		*requested_mode |= AGPSTAT3_4X;
-	}
-	if (tmp >3) {
-		printk (KERN_INFO PFX "%s tried to set rate=x%d. Setting to AGP3 x8 mode.\n", current->comm, tmp);
-		*requested_mode |= AGPSTAT3_8X;
+	if (tmp >= 3) {
+		printk (KERN_INFO PFX "%s tried to set rate=x%d. Setting to AGP3 x8 mode.\n", current->comm, tmp * 4);
+		*requested_mode = (*requested_mode & ~7) | AGPSTAT3_8X;
 	}
 
 	/* ARQSZ - Set the value to the maximum one.
@@ -642,11 +638,6 @@
 			return 0;
 		}
 		cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
-		if (!cap_ptr) {
-			pci_dev_put(device);
-			continue;
-		}
-			cap_ptr = 0;
 	}
 
 	/*

^ permalink raw reply	[flat|nested] 81+ messages in thread
* Re: dmesg verbosity [was Re: AGP bogosities]
@ 2005-03-30 10:19 tvrtko.ursulin
  0 siblings, 0 replies; 81+ messages in thread
From: tvrtko.ursulin @ 2005-03-30 10:19 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Diego Calleja, linux-kernel, Lee Revell

On 30/03/2005 10:45:55 linux-kernel-owner wrote:

>> The solution is fairly well known.  Rather than treating the zillions 
of
>> disk seeks during the boot process as random unconnected events, you
>
>Heh, we actually tried that at SuSE and yes, eliminating seeks helps a
>bit, but no, it is not magicall cure you'd want it to be.
>
>Only solution seems to be "do less during boot".

What about the init scripts? They are all spawned from the master one, 
they all spawn zillions of simple utilities. And udev startup time under 
SuSE 9.2 is just awful. It might be the Unix way but it is killing the 
boot process.

What I tried to do once, and I even contacted somebody from SuSE with a 
working proof of concept code is the following:

Master init script written in Perl. All the service init scripts rewritten 
in Perl which can be invoked independently, but they all follow the 
convention and implement functions such as start() stop() reload() etc.. 
Then the master init script includes one at a time and "evals" them (well 
just the function which it is interested in). Since everything is written 
in Perl there is no need to invoke external greps, seds, cuts etc.. And 
rc.status was also only processed once (by the master init script).

It was fast but I don't have any exact numbers because I only implemented 
rc, rc.boot, rc.status and sshd (AFAIR) before giving up. I think I should 
be able to dig that code from somewhere if someone is interested...


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

end of thread, other threads:[~2005-03-30 10:19 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-11  1:24 AGP bogosities Paul Mackerras
2005-03-11  2:04 ` Jesse Barnes
2005-03-11  2:11   ` Paul Mackerras
2005-03-11  2:18     ` Jesse Barnes
2005-03-11  2:38       ` Benjamin Herrenschmidt
2005-03-11  4:02         ` Jesse Barnes
2005-03-11  4:30           ` Benjamin Herrenschmidt
2005-03-11 16:39             ` Jesse Barnes
2005-03-11 17:59               ` Bjorn Helgaas
2005-03-11 18:04                 ` Jesse Barnes
2005-03-12  3:27                   ` Mike Werner
2005-03-12  3:58                     ` Dave Jones
2005-03-13  3:13                       ` Jesse Barnes
2005-03-13  4:08                         ` Dave Jones
2005-03-13  4:28                           ` Dave Jones
2005-03-11 22:43                 ` Paul Mackerras
2005-03-11 23:22                   ` Bjorn Helgaas
2005-03-12  0:12                     ` Benjamin Herrenschmidt
2005-03-12  1:34                     ` Paul Mackerras
2005-03-11 18:04   ` James Simmons
2005-03-11 18:08     ` Jesse Barnes
2005-03-11  2:04 ` Linus Torvalds
2005-03-11  2:12 ` Dave Jones
2005-03-11  2:18   ` Paul Mackerras
2005-03-11  2:23     ` Dave Jones
2005-03-11  2:40       ` Benjamin Herrenschmidt
2005-03-11  2:49         ` Dave Jones
2005-03-12 20:49           ` Greg KH
2005-03-11  2:42     ` Linus Torvalds
2005-03-11 22:18       ` OGAWA Hirofumi
2005-03-11 22:26         ` Dave Jones
2005-03-11 22:33           ` Chris Wedgwood
2005-03-11 23:52             ` Gene Heskett
2005-03-11 22:44           ` Linus Torvalds
2005-03-11 23:09           ` Paul Mackerras
2005-03-12  0:06             ` Gene Heskett
2005-03-14  8:17           ` Pavel Machek
2005-03-14  8:27             ` David Lang
2005-03-14  8:37               ` dmesg verbosity [was Re: AGP bogosities] Pavel Machek
2005-03-14 16:55                 ` Jesse Barnes
2005-03-14 17:03                   ` Pavel Machek
2005-03-14 17:17                   ` Dave Jones
2005-03-14 17:18                   ` Linus Torvalds
2005-03-14 17:27                     ` Jesse Barnes
2005-03-14 17:27                     ` Pavel Machek
2005-03-15 20:18                     ` Greg Stark
2005-03-14 18:12                   ` Diego Calleja
2005-03-14 19:07                     ` Lee Revell
2005-03-20  6:44                       ` David Lang
2005-03-23  0:37                       ` Diego Calleja
2005-03-23  0:53                         ` Lee Revell
2005-03-23  1:13                           ` Dave Jones
2005-03-23  1:29                             ` Andrew Morton
2005-03-23  8:21                             ` Giuseppe Bilotta
2005-03-23 16:14                               ` Dave Jones
2005-03-23 16:49                                 ` Giuseppe Bilotta
2005-03-23 17:17                                   ` Dave Jones
2005-03-23 14:10                             ` Diego Calleja
2005-03-23  8:19                           ` Giuseppe Bilotta
2005-03-30  9:45                           ` Pavel Machek
2005-03-23  0:53                         ` Zan Lynx
2005-03-23  0:55                         ` Grant Coady
2005-03-14 21:55                   ` Benjamin Herrenschmidt
2005-03-14 22:08                     ` David Lang
2005-03-15  0:02                     ` Pavel Machek
2005-03-11 22:42         ` AGP bogosities Dmitry Torokhov
2005-03-11 22:47           ` Dmitry Torokhov
2005-03-12 17:09         ` Linus Torvalds
2005-03-12 22:26           ` OGAWA Hirofumi
2005-03-12 22:34             ` Linus Torvalds
2005-03-11  2:35   ` Benjamin Herrenschmidt
2005-03-11  2:43     ` Dave Jones
2005-03-11  2:37   ` Linus Torvalds
2005-03-11 22:11 ` J.A. Magallon
2005-03-11 22:18   ` Dave Jones
2005-03-11 22:46     ` J.A. Magallon
2005-03-11 23:16       ` Martin Schlemmer
2005-03-11 23:17         ` J.A. Magallon
2005-03-11 23:23           ` Martin Schlemmer
2005-03-11 23:24             ` J.A. Magallon
  -- strict thread matches above, loose matches on Subject: below --
2005-03-30 10:19 dmesg verbosity [was Re: AGP bogosities] tvrtko.ursulin

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