mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Dobson <colpatch@us.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Cc: Martin Bligh <mjbligh@us.ibm.com>,
	Michael Hohnbaum <hohnbaum@us.ibm.com>
Subject: [patch] PCI configuration fix for NUMA-Q
Date: Thu, 08 Aug 2002 15:07:46 -0700	[thread overview]
Message-ID: <3D52EBB2.1070202@us.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

Linus,
	The PCI code for NUMA-Q machines has been broken for a while...  The kernel 
currently can't find PCI busses on quad's other than the first.  This patch 
fixes that problem.  Please apply.

Cheers!

-Matt

[-- Attachment #2: numaq_pci_fix-2530.patch --]
[-- Type: text/plain, Size: 2142 bytes --]

diff -Nur linux-2.5.15-vanilla/arch/i386/pci/direct.c linux-2.5.15-patched/arch/i386/pci/direct.c
--- linux-2.5.15-vanilla/arch/i386/pci/direct.c	Thu May  9 15:22:49 2002
+++ linux-2.5.15-patched/arch/i386/pci/direct.c	Thu Aug  8 10:27:11 2002
@@ -6,6 +6,10 @@
 #include <linux/init.h>
 #include "pci.h"
 
+/* Ensure the correct pci_conf1_{read|write} functions are compiled in */
+#ifndef CONFIG_MULTIQUAD
+
+
 /*
  * Functions for accessing PCI configuration space with type 1 accesses
  */
@@ -72,6 +76,11 @@
 
 #undef PCI_CONF1_ADDRESS
 
+#else /* CONFIG_MULTIQUAD */
+extern int pci_conf1_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value);
+extern int pci_conf1_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value);
+#endif /* !CONFIG_MULTIQUAD */
+
 static int pci_conf1_read_config_byte(struct pci_dev *dev, int where, u8 *value)
 {
 	int result; 
diff -Nur linux-2.5.15-vanilla/arch/i386/pci/numa.c linux-2.5.15-patched/arch/i386/pci/numa.c
--- linux-2.5.15-vanilla/arch/i386/pci/numa.c	Thu May  9 15:22:46 2002
+++ linux-2.5.15-patched/arch/i386/pci/numa.c	Thu Aug  8 10:52:24 2002
@@ -1,19 +1,23 @@
 /*
  * numa.c - Low-level PCI access for NUMA-Q machines
  */
+
 #include <linux/pci.h>
 #include <linux/init.h>
-
 #include "pci.h"
 
 #define BUS2QUAD(global) (mp_bus_id_to_node[global])
 #define BUS2LOCAL(global) (mp_bus_id_to_local[global])
 #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local])
 
+/*
+ * Functions for accessing PCI configuration space with type 1 accesses on NUMA-Q
+ */
+
 #define PCI_CONF1_ADDRESS(bus, dev, fn, reg) \
 	(0x80000000 | (BUS2LOCAL(bus) << 16) | (dev << 11) | (fn << 8) | (reg & ~3))
 
-static int pci_conf1_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
+int pci_conf1_read (int seg, int bus, int dev, int fn, int reg, int len, u32 *value)
 {
 	unsigned long flags;
 
@@ -41,7 +45,7 @@
 	return 0;
 }
 
-static int pci_conf1_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
+int pci_conf1_write (int seg, int bus, int dev, int fn, int reg, int len, u32 value)
 {
 	unsigned long flags;
 

             reply	other threads:[~2002-08-08 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-08 22:07 Matthew Dobson [this message]
2002-08-08 23:41 ` Alan Cox

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=3D52EBB2.1070202@us.ibm.com \
    --to=colpatch@us.ibm.com \
    --cc=hohnbaum@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjbligh@us.ibm.com \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®