| To: | ralf@oss.sgi.com |
|---|---|
| Subject: | [PATCH] better bar size calculation |
| From: | "Bradley D. LaRonde" <brad@ltc.com> |
| Date: | Mon, 1 Jul 2002 14:50:13 -0400 |
| Cc: | linux-mips@oss.sgi.com |
| Sender: | owner-linux-mips@oss.sgi.com |
| User-agent: | Mutt/1.3.20i |
# 02/07/01 brad@dev1.(none) 1.72
# better bar size calculation
diff -Nru a/arch/mips/kernel/pci_auto.c b/arch/mips/kernel/pci_auto.c
--- a/arch/mips/kernel/pci_auto.c Mon Jul 1 14:48:47 2002
+++ b/arch/mips/kernel/pci_auto.c Mon Jul 1 14:48:47 2002
@@ -35,6 +35,7 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/pci.h>
+#include <linux/bitops.h>
#include <asm/pci_channel.h>
@@ -152,7 +153,7 @@
/* Calculate requested size */
- bar_size = ~(bar_response & addr_mask) + 1;
+ bar_size = 1 << (ffs(bar_response & addr_mask) - 1);
/* Allocate a base address */
bar_value = ((*lower_limit - 1) & ~(bar_size - 1)) + bar_size;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Oops] Indy R4600 Oops(es) w/ 2.4.19-rc1, Maciej W. Rozycki |
|---|---|
| Next by Date: | Re: CVS Update@oss.sgi.com: linux, Guido Guenther |
| Previous by Thread: | [PATCH 2.4.19-rc1] Make sure drivers/input/Config.in goes before drivers/char/Config.in, Tom Rini |
| Next by Thread: | Re: CVS Update@oss.sgi.com: linux, Guido Guenther |
| Indexes: | [Date] [Thread] [Top] [All Lists] |