mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jeff@jgarrett.org (Jeff Garrett)
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Yinghai Lu <yinghai@kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Myron Stowe <myron.stowe@hp.com>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [Bug #15124] PCI host bridge windows ignored (works with pci=use_crs)
Date: Wed, 27 Jan 2010 22:02:26 -0600	[thread overview]
Message-ID: <20100128040226.GB8964@jgarrett.org> (raw)
In-Reply-To: <20100127192409.79af96db@jbarnes-piketon>

On Wed, Jan 27, 2010 at 07:24:09PM -0800, Jesse Barnes wrote:
> On Wed, 27 Jan 2010 17:50:17 -0800 (PST)
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > On Tue, 26 Jan 2010, Yinghai Lu wrote:
> > > 
> > > [PATCH] x86/pci: don't use ioh resource if only have one ioh
> > 
> > Please, no.
> > 
> > This patch is too ugly to live.
> > 
> > And it's totally unacceptable to probe every single possible PCI device 
> > for something like this.
> > 
> > If we don't know enough about the hardware workings of those Intel bridges 
> > to know when they are active and how they decode things, then please let's 
> > just disable intel_bus.c entirely.
> > 
> > There's no excuse for hacky tests like this.
> 
> Ok, we'll just kill it entirely then.  I'll send a patch tomorrow
> unless Yinghai beats me to it.

What about something like this (works for me, without pci=use_crs)?

---
    Remove intel_bus.c Intel-specific PCI/IOH logic
    
    Signed-off-by: Jeff Garrett <jeff@jgarrett.org>
---
 arch/x86/pci/Makefile    |    2 +-
 arch/x86/pci/intel_bus.c |   94 ----------------------------------------------
 2 files changed, 1 insertions(+), 95 deletions(-)

diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index 564b008..39fba37 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
 
 obj-y				+= common.o early.o
 obj-y				+= amd_bus.o
-obj-$(CONFIG_X86_64)		+= bus_numa.o intel_bus.o
+obj-$(CONFIG_X86_64)		+= bus_numa.o
 
 ifeq ($(CONFIG_PCI_DEBUG),y)
 EXTRA_CFLAGS += -DDEBUG
diff --git a/arch/x86/pci/intel_bus.c b/arch/x86/pci/intel_bus.c
deleted file mode 100644
index f81a2fa..0000000
--- a/arch/x86/pci/intel_bus.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * to read io range from IOH pci conf, need to do it after mmconfig is there
- */
-
-#include <linux/delay.h>
-#include <linux/dmi.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include <asm/pci_x86.h>
-
-#include "bus_numa.h"
-
-static inline void print_ioh_resources(struct pci_root_info *info)
-{
-	int res_num;
-	int busnum;
-	int i;
-
-	printk(KERN_DEBUG "IOH bus: [%02x, %02x]\n",
-			info->bus_min, info->bus_max);
-	res_num = info->res_num;
-	busnum = info->bus_min;
-	for (i = 0; i < res_num; i++) {
-		struct resource *res;
-
-		res = &info->res[i];
-		printk(KERN_DEBUG "IOH bus: %02x index %x %s: [%llx, %llx]\n",
-			busnum, i,
-			(res->flags & IORESOURCE_IO) ? "io port" :
-							"mmio",
-			res->start, res->end);
-	}
-}
-
-#define IOH_LIO			0x108
-#define IOH_LMMIOL		0x10c
-#define IOH_LMMIOH		0x110
-#define IOH_LMMIOH_BASEU	0x114
-#define IOH_LMMIOH_LIMITU	0x118
-#define IOH_LCFGBUS		0x11c
-
-static void __devinit pci_root_bus_res(struct pci_dev *dev)
-{
-	u16 word;
-	u32 dword;
-	struct pci_root_info *info;
-	u16 io_base, io_end;
-	u32 mmiol_base, mmiol_end;
-	u64 mmioh_base, mmioh_end;
-	int bus_base, bus_end;
-
-	/* some sys doesn't get mmconf enabled */
-	if (dev->cfg_size < 0x120)
-		return;
-
-	if (pci_root_num >= PCI_ROOT_NR) {
-		printk(KERN_DEBUG "intel_bus.c: PCI_ROOT_NR is too small\n");
-		return;
-	}
-
-	info = &pci_root_info[pci_root_num];
-	pci_root_num++;
-
-	pci_read_config_word(dev, IOH_LCFGBUS, &word);
-	bus_base = (word & 0xff);
-	bus_end = (word & 0xff00) >> 8;
-	sprintf(info->name, "PCI Bus #%02x", bus_base);
-	info->bus_min = bus_base;
-	info->bus_max = bus_end;
-
-	pci_read_config_word(dev, IOH_LIO, &word);
-	io_base = (word & 0xf0) << (12 - 4);
-	io_end = (word & 0xf000) | 0xfff;
-	update_res(info, io_base, io_end, IORESOURCE_IO, 0);
-
-	pci_read_config_dword(dev, IOH_LMMIOL, &dword);
-	mmiol_base = (dword & 0xff00) << (24 - 8);
-	mmiol_end = (dword & 0xff000000) | 0xffffff;
-	update_res(info, mmiol_base, mmiol_end, IORESOURCE_MEM, 0);
-
-	pci_read_config_dword(dev, IOH_LMMIOH, &dword);
-	mmioh_base = ((u64)(dword & 0xfc00)) << (26 - 10);
-	mmioh_end = ((u64)(dword & 0xfc000000) | 0x3ffffff);
-	pci_read_config_dword(dev, IOH_LMMIOH_BASEU, &dword);
-	mmioh_base |= ((u64)(dword & 0x7ffff)) << 32;
-	pci_read_config_dword(dev, IOH_LMMIOH_LIMITU, &dword);
-	mmioh_end |= ((u64)(dword & 0x7ffff)) << 32;
-	update_res(info, mmioh_base, mmioh_end, IORESOURCE_MEM, 0);
-
-	print_ioh_resources(info);
-}
-
-/* intel IOH */
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, pci_root_bus_res);

  reply	other threads:[~2010-01-28  4:03 UTC|newest]

Thread overview: 123+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-24 21:54 2.6.33-rc5: Reported regressions from 2.6.32 Rafael J. Wysocki
2010-01-24 21:54 ` [Bug #14791] Something has been broken in the network stack this week Rafael J. Wysocki
2010-01-24 22:18   ` Ben Hutchings
2010-01-24 22:30     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14949] drm_vm.c:drm_mmap: possible circular locking dependency detected Rafael J. Wysocki
2010-01-25  8:28   ` Borislav Petkov
2010-01-24 22:04 ` [Bug #14937] WARNING: at kernel/lockdep.c:2830 Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14792] Misdetection of the TV output Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14859] System timer firing too much without cause Rafael J. Wysocki
2010-01-24 22:34   ` Shawn Starr
2010-01-24 23:07     ` Rafael J. Wysocki
2010-01-25 10:35     ` Thomas Gleixner
2010-01-25 16:53       ` Shawn Starr
2010-01-25 17:20         ` Thomas Gleixner
2010-01-25 17:30           ` Shawn Starr
2010-01-25 20:59             ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14924] Weird hard hangs when rendering 'some' web-sites in Firefox Rafael J. Wysocki
2010-01-25 13:55   ` Américo Wang
2010-01-25 19:26     ` David
2010-01-25 21:02       ` Rafael J. Wysocki
2010-01-26  3:06       ` Américo Wang
2010-01-24 22:04 ` [Bug #14946] All kernels after 2.6.32-git10 show only 1 CPU Rafael J. Wysocki
2010-01-25  1:41   ` Sid Boyce
2010-01-25 21:04     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15000] Thinkpad dock button no longer works Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14999] possible circular locking dependency detected in rfkill at suspend Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #14950] tbench regression with 2.6.33-rc1 Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15025] Oops in ext4 driver Rafael J. Wysocki
2010-01-24 22:43   ` Steinar H. Gunderson
2010-01-24 23:09     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15032] Oops in uart_resume_port() on resume Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15017] kexec regression, radeon/kms irq related (bisected) Rafael J. Wysocki
2010-01-25  3:26   ` Alex Deucher
2010-01-25  6:28     ` Dave Airlie
2010-01-24 22:04 ` [Bug #15038] drm/ksm: fbdev blanking regression Rafael J. Wysocki
2010-01-24 22:45   ` Johan Hovold
2010-01-24 23:13     ` Rafael J. Wysocki
2010-01-25  6:28       ` Dave Airlie
2010-01-25 21:07         ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15039] leds_alix2: can't allocate I/O for GPIO Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15036] soft lockup in dmesg after suspend/resume Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15043] Display goes off with i915.powersave=1 Rafael J. Wysocki
2010-01-27 17:57   ` Jesse Barnes
2010-01-28  5:05     ` Soeren Sonnenburg
2010-02-04 20:09     ` Soeren Sonnenburg
2010-01-24 22:04 ` [Bug #15076] System panic under load with clockevents_program_event Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15125] hung task - jbd2/dm-1-8 (during raid rebuild) Rafael J. Wysocki
2010-01-24 22:49   ` Michael Breuer
2010-01-24 23:14     ` Rafael J. Wysocki
2010-01-30 19:21       ` Michael Breuer
2010-01-24 22:04 ` [Bug #15124] PCI host bridge windows ignored (works with pci=use_crs) Rafael J. Wysocki
2010-01-26  7:19   ` Jeff Garrett
2010-01-26 12:48     ` Rafael J. Wysocki
2010-01-26 17:32       ` Bjorn Helgaas
2010-01-26 18:02         ` Rafael J. Wysocki
2010-01-26 18:17           ` Jesse Barnes
2010-01-26 18:22             ` Yinghai Lu
2010-01-26 22:57             ` Yinghai Lu
2010-01-27 16:45               ` Bjorn Helgaas
2010-01-27 16:53                 ` Jesse Barnes
2010-01-27 20:45                   ` Bjorn Helgaas
2010-01-27 20:50                     ` Linus Torvalds
2010-01-27 20:59                       ` Jesse Barnes
2010-01-27 21:02                         ` Jesse Barnes
2010-01-28  1:32                           ` Yinghai Lu
2010-01-27 21:03                       ` Bjorn Helgaas
2010-01-27 23:34                         ` Yinghai Lu
2010-01-28  4:26                           ` Bjorn Helgaas
2010-01-28  5:53                             ` Yinghai Lu
2010-01-28 10:45                               ` Rafael J. Wysocki
2010-01-28 16:09                               ` Bjorn Helgaas
2010-01-28 18:20                                 ` Yinghai Lu
2010-01-28 19:03                                   ` Jesse Barnes
2010-01-28 20:28                                     ` Rafael J. Wysocki
2010-01-28 20:35                                       ` Jesse Barnes
2010-01-29  2:44                                       ` Zhang Rui
2010-01-28 20:20                                   ` Bjorn Helgaas
2010-01-28 20:31                                   ` Bjorn Helgaas
2010-01-28 21:14                                     ` Yinghai Lu
2010-01-31  2:45                             ` Matthew Garrett
2010-01-28  1:35               ` Jesse Barnes
2010-01-28  4:01                 ` Jeff Garrett
2010-01-28  1:50               ` Linus Torvalds
2010-01-28  3:24                 ` Jesse Barnes
2010-01-28  4:02                   ` Jeff Garrett [this message]
2010-01-28 16:24                     ` Jesse Barnes
2010-01-28 18:13                       ` Yinghai Lu
2010-01-28 20:12                         ` Jesse Barnes
2010-01-28 18:30                       ` [PATCH] x86/pci: print ioh resources only Yinghai Lu
2010-01-28 18:54                         ` Linus Torvalds
2010-01-28 19:10                           ` [PATCH -v2] " Yinghai Lu
2010-01-28 19:30                             ` Olivier Galibert
2010-01-28 21:06                               ` Yinghai Lu
2010-01-26 18:21           ` [Bug #15124] PCI host bridge windows ignored (works with pci=use_crs) Linus Torvalds
2010-01-26 18:16         ` Linus Torvalds
2010-01-26 18:21           ` Yinghai Lu
2010-01-26 18:35             ` Jesse Barnes
2010-01-24 22:04 ` [Bug #15129] [drm:i915_gem_execbuffer] *ERROR* i915_gem_do_execbuffer returns -512 Rafael J. Wysocki
2010-01-27 17:58   ` Jesse Barnes
2010-01-27 21:03     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15128] Boot regression on AMD Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15131] [OOPS] radeon kms Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15126] REGRESSION for RT2561/RT61 in 2.6.33 Rafael J. Wysocki
2010-01-24 22:32   ` Alan Stern
2010-01-24 22:34     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15132] OOPS's with large initramfs Rafael J. Wysocki
2010-01-24 22:55   ` Nigel Kukard
2010-01-24 23:15     ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15137] NULL pointer dereference in vlan_skb_recv Rafael J. Wysocki
2010-01-25 13:43   ` Américo Wang
2010-01-25 21:07     ` Rafael J. Wysocki
2010-01-25 21:30       ` David Miller
2010-01-25 21:58         ` Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15138] evdev regression on macbook Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15139] e1000: transmit queue 0 timed out Rafael J. Wysocki
2010-01-24 22:04 ` [Bug #15133] Wake on LAN doesn't work in sky2 Rafael J. Wysocki
2010-02-01  0:18 2.6.33-rc6: Reported regressions from 2.6.32 Rafael J. Wysocki
2010-02-01  0:22 ` [Bug #15124] PCI host bridge windows ignored (works with pci=use_crs) Rafael J. Wysocki
2010-02-01  5:40   ` Yinghai Lu
2010-02-02 20:42     ` Rafael J. Wysocki
2010-02-02 20:50       ` Jeff Garrett
2010-02-02 21:13         ` Rafael J. Wysocki
2010-02-02 20:55       ` Bjorn Helgaas
2010-02-02 21:15         ` Rafael J. Wysocki

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=20100128040226.GB8964@jgarrett.org \
    --to=jeff@jgarrett.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mjg59@srcf.ucam.org \
    --cc=myron.stowe@hp.com \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    --cc=yinghai@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 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®