* [PATCH] better bar size calculation
@ 2002-07-01 18:50 Bradley D. LaRonde
0 siblings, 0 replies; only message in thread
From: Bradley D. LaRonde @ 2002-07-01 18:50 UTC (permalink / raw)
To: ralf; +Cc: linux-mips
# 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-01 18:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-01 18:50 [PATCH] better bar size calculation Bradley D. LaRonde
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.