From: "Bradley D. LaRonde" <brad@ltc.com>
To: ralf@oss.sgi.com
Cc: linux-mips@oss.sgi.com
Subject: [PATCH] better bar size calculation
Date: Mon, 1 Jul 2002 14:50:13 -0400 [thread overview]
Message-ID: <20020701145012.A19315@dev1.ltc.com> (raw)
# 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;
reply other threads:[~2002-07-01 18:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020701145012.A19315@dev1.ltc.com \
--to=brad@ltc.com \
--cc=linux-mips@oss.sgi.com \
--cc=ralf@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox