/[linux-patches]/genpatches-2.6/trunk/2.6.14/1147_4_serverworks-tlb-flush.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1147_4_serverworks-tlb-flush.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1852 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Mon Dec 12 12:32:30 2005
2 Date: Mon, 7 Nov 2005 14:02:58 -0800
3 Message-Id: <200511072202.jA7M2wXl001471@hera.kernel.org>
4 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
5 To: git-commits-head@vger.kernel.org
6 Cc:
7 Subject: AGPGART: Fix serverworks TLB flush.
8
9 From: Dave Jones <davej@redhat.com>
10
11 [AGPGART] Fix serverworks TLB flush.
12 Go back to what 2.4 kernels used to do here, as if this hits,
13 the kernel just hangs indefinitly.
14
15 Actually an improvement over 2.4 - we now break; out of the loop
16 instead of just printing messages on timeouts.
17
18 Signed-off-by: Dave Jones <davej@redhat.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20
21
22 ---
23 drivers/char/agp/sworks-agp.c | 18 ++++++++++++++++--
24 1 file changed, 16 insertions(+), 2 deletions(-)
25
26 --- linux-2.6.14.3.orig/drivers/char/agp/sworks-agp.c
27 +++ linux-2.6.14.3/drivers/char/agp/sworks-agp.c
28 @@ -242,13 +242,27 @@ static int serverworks_fetch_size(void)
29 */
30 static void serverworks_tlbflush(struct agp_memory *temp)
31 {
32 + unsigned long timeout;
33 +
34 writeb(1, serverworks_private.registers+SVWRKS_POSTFLUSH);
35 - while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1)
36 + timeout = jiffies + 3*HZ;
37 + while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) {
38 cpu_relax();
39 + if (time_after(jiffies, timeout)) {
40 + printk(KERN_ERR PFX "TLB post flush took more than 3 seconds\n");
41 + break;
42 + }
43 + }
44
45 writel(1, serverworks_private.registers+SVWRKS_DIRFLUSH);
46 - while(readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1)
47 + timeout = jiffies + 3*HZ;
48 + while (readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) {
49 cpu_relax();
50 + if (time_after(jiffies, timeout)) {
51 + printk(KERN_ERR PFX "TLB Dir flush took more than 3 seconds\n");
52 + break;
53 + }
54 + }
55 }
56
57 static int serverworks_configure(void)

  ViewVC Help
Powered by ViewVC 1.1.20