All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Pre-emption patch for IA-64
Date: Fri, 14 Mar 2003 22:41:43 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590709806122@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709806101@msgid-missing>

On Fri, Mar 14, 2003 at 02:38:55PM -0700, Bjorn Helgaas wrote:
> On Friday 14 March 2003 2:32 pm, Jesse Barnes wrote:
> > Just FYI, I tried 2.5.64 out on my Bug Sur, and it seems to work ok
> > with the following exceptions:
> >   o the AT keyboard support seems broken (characters are slow to show
> >     up on the screen and are sometimes repeated)
> >   o agp support for 460GX causes a link failure
> 
> 2.4 had a problem that seems to be a compiler issue with some AGP
> code.  I don't know whether this is the same problem, but if it is, I
> applied the following patch as a workaround:

Thanks for the pointer.  Here's a patch against 2.5.64.  It builds and
boots, but my XFree dri/glx/whatever drivers seem broken, so I'm not
sure if it's really working like it should.

Btw Peter, thanks for doing the preemption patch.  No hangs yet for
me...

Jesse


diff -Naur -X /usr/people/jbarnes/dontdiff linux-2.5.64-ia64-stock/drivers/char/agp/generic.c linux-2.5.64-ia64/drivers/char/agp/generic.c
--- linux-2.5.64-ia64-stock/drivers/char/agp/generic.c	2003-03-04 19:29:15.000000000 -0800
+++ linux-2.5.64-ia64/drivers/char/agp/generic.c	2003-03-14 14:09:03.000000000 -0800
@@ -34,6 +34,7 @@
 #include <linux/miscdevice.h>
 #include <linux/pm.h>
 #include <linux/agp_backend.h>
+#include <linux/vmalloc.h>
 #include "agp.h"
 
 __u32 *agp_gatt_table; 
@@ -169,26 +170,18 @@
 
 	temp = agp_bridge->current_size;
 
-	switch (agp_bridge->size_type) {
-	case U8_APER_SIZE:
+	if (agp_bridge->size_type = U8_APER_SIZE)
 		current_size = A_SIZE_8(temp)->size;
-		break;
-	case U16_APER_SIZE:
+	else if (agp_bridge->size_type = U16_APER_SIZE)
 		current_size = A_SIZE_16(temp)->size;
-		break;
-	case U32_APER_SIZE:
+	else if (agp_bridge->size_type = U32_APER_SIZE)
 		current_size = A_SIZE_32(temp)->size;
-		break;
-	case LVL2_APER_SIZE:
+	else if (agp_bridge->size_type = LVL2_APER_SIZE)
 		current_size = A_SIZE_LVL2(temp)->size;
-		break;
-	case FIXED_APER_SIZE:
+	else if (agp_bridge->size_type = FIXED_APER_SIZE)
 		current_size = A_SIZE_FIX(temp)->size;
-		break;
-	default:
+	else
 		current_size = 0;
-		break;
-	}
 
 	current_size -= (agp_memory_reserved / (1024*1024));
 	if (current_size <0)
@@ -203,26 +196,18 @@
 
 	temp = agp_bridge->current_size;
 
-	switch (agp_bridge->size_type) {
-	case U8_APER_SIZE:
+	if (agp_bridge->size_type = U8_APER_SIZE)
 		num_entries = A_SIZE_8(temp)->num_entries;
-		break;
-	case U16_APER_SIZE:
+	else if (agp_bridge->size_type = U16_APER_SIZE)
 		num_entries = A_SIZE_16(temp)->num_entries;
-		break;
-	case U32_APER_SIZE:
+	else if (agp_bridge->size_type = U32_APER_SIZE)
 		num_entries = A_SIZE_32(temp)->num_entries;
-		break;
-	case LVL2_APER_SIZE:
+	else if (agp_bridge->size_type = LVL2_APER_SIZE)
 		num_entries = A_SIZE_LVL2(temp)->num_entries;
-		break;
-	case FIXED_APER_SIZE:
+	else if (agp_bridge->size_type = FIXED_APER_SIZE)
 		num_entries = A_SIZE_FIX(temp)->num_entries;
-		break;
-	default:
+	else
 		num_entries = 0;
-		break;
-	}
 
 	num_entries -= agp_memory_reserved>>PAGE_SHIFT;
 	if (num_entries<0)
@@ -546,27 +531,19 @@
 
 	temp = agp_bridge->current_size;
 
-	switch (agp_bridge->size_type) {
-	case U8_APER_SIZE:
+	if (agp_bridge->size_type = U8_APER_SIZE)
 		page_order = A_SIZE_8(temp)->page_order;
-		break;
-	case U16_APER_SIZE:
+	else if (agp_bridge->size_type = U16_APER_SIZE)
 		page_order = A_SIZE_16(temp)->page_order;
-		break;
-	case U32_APER_SIZE:
+	else if (agp_bridge->size_type = U32_APER_SIZE)
 		page_order = A_SIZE_32(temp)->page_order;
-		break;
-	case FIXED_APER_SIZE:
+	else if (agp_bridge->size_type = FIXED_APER_SIZE)
 		page_order = A_SIZE_FIX(temp)->page_order;
-		break;
-	case LVL2_APER_SIZE:
+	else if (agp_bridge->size_type = LVL2_APER_SIZE)
 		/* The generic routines can't deal with 2 level gatt's */
 		return -EINVAL;
-		break;
-	default:
+	else
 		page_order = 0;
-		break;
-	}
 
 	/* Do not worry about freeing memory, because if this is
 	 * called, then all agp memory is deallocated and removed


  parent reply	other threads:[~2003-03-14 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-14 17:21 [Linux-ia64] Pre-emption patch for IA-64 Mario Smarduch
2003-03-14 21:24 ` David Mosberger
2003-03-14 21:32 ` Jesse Barnes
2003-03-14 21:38 ` Bjorn Helgaas
2003-03-14 21:57 ` Peter Chubb
2003-03-14 22:07 ` David Mosberger
2003-03-14 22:41 ` Jesse Barnes [this message]
2003-03-17 18:11 ` jim
2003-03-27 23:31 ` Mario Smarduch
2003-03-27 23:33 ` Jesse Barnes
2003-03-28  3:58 ` Peter Chubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590709806122@msgid-missing \
    --to=jbarnes@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.