Bjorn Helgaas | 1 Mar 2012 01:42
Picon
Favicon

Re: [PATCH 02/39] x86, PCI: have own version for pcibios_bus_to_resource

On Wed, Feb 29, 2012 at 4:33 PM, Yinghai Lu <yinghai <at> kernel.org> wrote:
> On Wed, Feb 29, 2012 at 3:20 PM, Bjorn Helgaas <bhelgaas <at> google.com> wrote:
>> On Wed, Feb 29, 2012 at 4:07 PM, Yinghai Lu <yinghai <at> kernel.org> wrote:
>>> x86 does not need to offset the address. So we can skip that costing offset
>>> searching.
>>
>> I tried to start a discussion about this patch (and others), but I
>> don't think you responded:
>> http://marc.info/?l=linux-pci&m=133036414506921&w=2
>
> this patch does reduce some not needed ops.
>
> and it does not affects your effects,

It does affect my efforts in that this patch adds back x86 complexity
that I don't think is necessary.

And this patch makes it so the pci_add_resource_offset() interface
exists and appears to work on x86, but if somebody tries to use it, it
*doesn't* work.  I don't like to write code like that.  I think it's
poor style.

> and it just make x86 not get punished.

What punishment are you worried about?  I really don't think you'll be
able to measure any performance impact.

I agree that the x86 code you add *is* simpler than the generic
version.  But I think the *overall* complexity is higher because now
you have to look at two versions (generic and x86) and convince
(Continue reading)

Yinghai Lu | 1 Mar 2012 03:54

Re: [PATCH 02/39] x86, PCI: have own version for pcibios_bus_to_resource

On Wed, Feb 29, 2012 at 4:42 PM, Bjorn Helgaas <bhelgaas <at> google.com> wrote:
> On Wed, Feb 29, 2012 at 4:33 PM, Yinghai Lu <yinghai <at> kernel.org> wrote:
>> On Wed, Feb 29, 2012 at 3:20 PM, Bjorn Helgaas <bhelgaas <at> google.com> wrote:
>>> On Wed, Feb 29, 2012 at 4:07 PM, Yinghai Lu <yinghai <at> kernel.org> wrote:
>>>> x86 does not need to offset the address. So we can skip that costing offset
>>>> searching.
>>>
>>> I tried to start a discussion about this patch (and others), but I
>>> don't think you responded:
>>> http://marc.info/?l=linux-pci&m=133036414506921&w=2
>>
>> this patch does reduce some not needed ops.
>>
>> and it does not affects your effects,
>
> It does affect my efforts in that this patch adds back x86 complexity
> that I don't think is necessary.
>
> And this patch makes it so the pci_add_resource_offset() interface
> exists and appears to work on x86, but if somebody tries to use it, it
> *doesn't* work.  I don't like to write code like that.  I think it's
> poor style.
>
>> and it just make x86 not get punished.
>
> What punishment are you worried about?  I really don't think you'll be
> able to measure any performance impact.
>
> I agree that the x86 code you add *is* simpler than the generic
> version.  But I think the *overall* complexity is higher because now
(Continue reading)

Yinghai Lu | 1 Mar 2012 03:57

Re: [PATCH 39/39] x86, PCI: kill busn in acpi pci_root_info

On Wed, Feb 29, 2012 at 4:27 PM, Jesse Barnes <jbarnes <at> virtuousgeek.org> wrote:
> On Wed, 29 Feb 2012 15:51:28 -0800
> Greg KH <gregkh <at> linuxfoundation.org> wrote:
>
>> On Wed, Feb 29, 2012 at 03:37:53PM -0800, Yinghai Lu wrote:
>> > On Wed, Feb 29, 2012 at 3:32 PM, Bjorn Helgaas
>
>> > > You just *added* this stuff in a prior patch that hasn't been
>> > > merged yet.  Why can't you just fix that series rather than doing
>> > > the add/remove churn?
>> >
>> > as i said before, I'm not quite sure about the life cycle about
>> > that object.
>
> I thought Bjorn figured that out for you in the last thread?
>
>> >
>> > still need to wait some months to verify that on system that does
>> > support pci root bus hot plug etc.
>> >
>> > or we can just this patch for now.
>>
>> A statement like that would cause all of these patches to be instantly
>> deleted from any queue that I had control over, and I strongly
>> recommend that Jesse just ignore them all.
>>
>> If you don't know this thing, then you have no right to change it,
>> flat out.  Why do we trust these patches from you?  I sure don't.
>
> Oh don't worry, this patch set isn't going upstream anytime soon.
(Continue reading)

Yinghai Lu | 1 Mar 2012 04:00

[PATCH 08/36] x86, PCI: embed name acpi version pci_root_info struct

Now We allocate info, and keep that in during whole life of hostbridge.

So don't allocate info->name seperately, just put name into struct.

Signed-off-by: Yinghai Lu <yinghai <at> kernel.org>
---
 arch/x86/pci/acpi.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index c7a230f..11c3ae7 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
 <at>  <at>  -9,7 +9,7  <at>  <at> 

 struct pci_root_info {
 	struct acpi_device *bridge;
-	char *name;
+	char name[16];
 	unsigned int res_num;
 	struct resource *res;
 	int busnum;
 <at>  <at>  -307,7 +307,6  <at>  <at>  static void add_resources(struct pci_root_info *info,

 static void free_pci_root_info_res(struct pci_root_info *info)
 {
-	kfree(info->name);
 	kfree(info->res);
 	info->res = NULL;
 	info->res_num = 0;
(Continue reading)

Yinghai Lu | 1 Mar 2012 04:00

[PATCH 14/36] x86, PCI: Merge pcibios_scan_root and pci_scan_bus_on_node

Those two almost the same.
Let pcibios_scan_root call pci_scan_bus_on_node instead.

Signed-off-by: Yinghai Lu <yinghai <at> kernel.org>
---
 arch/x86/pci/common.c |   27 ++++-----------------------
 1 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 323481e..8e04ec5 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
 <at>  <at>  -430,9 +430,7  <at>  <at>  void __init dmi_check_pciprobe(void)

 struct pci_bus * __devinit pcibios_scan_root(int busnum)
 {
-	LIST_HEAD(resources);
 	struct pci_bus *bus = NULL;
-	struct pci_sysdata *sd;

 	while ((bus = pci_find_next_bus(bus)) != NULL) {
 		if (bus->number == busnum) {
 <at>  <at>  -441,28 +439,10  <at>  <at>  struct pci_bus * __devinit pcibios_scan_root(int busnum)
 		}
 	}

-	/* Allocate per-root-bus (not per bus) arch-specific data.
-	 * TODO: leak; this memory is never freed.
-	 * It's arguable whether it's worth the trouble to care.
-	 */
(Continue reading)

Yinghai Lu | 1 Mar 2012 04:00

[PATCH 26/36] PCI, powerpc: Register busn_res for root buses

Signed-off-by: Yinghai Lu <yinghai <at> kernel.org>
Cc: Benjamin Herrenschmidt <benh <at> kernel.crashing.org>
Cc: Paul Mackerras <paulus <at> samba.org>
Cc: linuxppc-dev <at> lists.ozlabs.org
---
 arch/powerpc/include/asm/pci-bridge.h |    1 +
 arch/powerpc/kernel/pci-common.c      |   10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 5d48765..11cebf0 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
 <at>  <at>  -30,6 +30,7  <at>  <at>  struct pci_controller {
 	int first_busno;
 	int last_busno;
 	int self_busno;
+	struct resource busn;

 	void __iomem *io_base_virt;
 #ifdef CONFIG_PPC64
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 910b9de..ee8c0c9 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
 <at>  <at>  -1648,6 +1648,11  <at>  <at>  void __devinit pcibios_scan_phb(struct pci_controller *hose)
 	/* Wire up PHB bus resources */
 	pcibios_setup_phb_resources(hose, &resources);

+	hose->busn.start = hose->first_busno;
(Continue reading)

Yinghai Lu | 1 Mar 2012 04:00

[PATCH 19/36] PCI: checking busn_res in pci_scan_root_bus

some calling may not have end decided yet, and may not pass busn_res in
resources list.

try to do insert big one and shrink.

Signed-off-by: Yinghai Lu <yinghai <at> kernel.org>
---
 drivers/pci/probe.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 25a7ef8..6f3bdbc 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
 <at>  <at>  -1735,12 +1735,34  <at>  <at>  struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
 		struct pci_ops *ops, void *sysdata, struct list_head *resources)
 {
 	struct pci_bus *b;
+	struct pci_host_bridge_window *window, *n;
+	struct resource *res;
+	bool found;
+
+	list_for_each_entry_safe(window, n, resources, list) {
+		res = window->res;
+		if (res->flags & IORESOURCE_BUS) {
+			found = true;
+			break;
+		}
+	}

(Continue reading)

Yinghai Lu | 1 Mar 2012 04:00

[PATCH 16/36] PCI: Add busn_res operation functions

will use them insert/update busn res in pci_bus

Signed-off-by: Yinghai Lu <yinghai <at> kernel.org>
---
 drivers/pci/probe.c |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/pci.h |    3 +++
 2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 675d7ed..ed82369 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
 <at>  <at>  -1678,6 +1678,56  <at>  <at>  err_out:
 	return NULL;
 }

+void pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max)
+{
+	struct resource *res = &b->busn_res;
+	struct resource *parent_res;
+	int ret;
+
+	res->start = bus;
+	res->end = bus_max;
+	res->flags = IORESOURCE_BUS;
+
+	/* no parent for root bus' busn_res */
+	if (!pci_is_root_bus(b)) {
+		parent_res = &b->parent->busn_res;
+
(Continue reading)

Hao, Xudong | 1 Mar 2012 05:30
Picon
Favicon

[PATCH V3] Quirk for IVB graphics FLR errata

For IvyBridge Mobile platform, a system hang may occur if a FLR(Function Level Reset) is asserted to
internal graphics.

This quirk patch is workaround for the IVB FLR errata issue.
We are disabling the FLR reset handshake between the PCH and CPU display, then manually powering down the
panel power sequencing and resetting the PCH display.

Signed-off-by: Xudong Hao <xudong.hao <at> intel.com>
Signed-off-by: Kay, Allen M <allen.m.kay <at> intel.com>
Reviewed-by: Xiantao Zhang <xiantao.zhang <at> intel.com>
---
 drivers/pci/quirks.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6476547..c687218 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
 <at>  <at>  -27,6 +27,7  <at>  <at> 
 #include <linux/pci-aspm.h>
 #include <linux/ioport.h>
 #include <asm/dma.h>	/* isa_dma_bridge_buggy */
+#include <asm/tsc.h>
 #include "pci.h"

 /*
 <at>  <at>  -3069,11 +3070,63  <at>  <at>  static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe)
 	return 0;
 }

+#include "../gpu/drm/i915/i915_reg.h"
(Continue reading)

Hao, Xudong | 1 Mar 2012 10:37
Picon
Favicon

[PATCH V4] Quirk for IVB graphics FLR errata

For IvyBridge Mobile platform, a system hang may occur if a FLR(Function Level
 Reset) is asserted to internal graphics.

This quirk patch is workaround for the IVB FLR errata issue.
We are disabling the FLR reset handshake between the PCH and CPU display, then manually powering down the
panel power sequencing and resetting the PCH display.

Changes from v3:
- add X86 configuration to avoid compile problem in other architecture.

Signed-off-by: Xudong Hao <xudong.hao <at> intel.com>
Signed-off-by: Kay, Allen M <allen.m.kay <at> intel.com>
Reviewed-by: Xiantao Zhang <xiantao.zhang <at> intel.com>
---
 drivers/pci/quirks.c |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6476547..63e8b70 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
 <at>  <at>  -3069,11 +3069,70  <at>  <at>  static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe)
 	return 0;
 }

+#ifdef CONFIG_X86
+
+#include "../gpu/drm/i915/i915_reg.h"
+#define MSG_CTL	0x45010
+
+static const int op_timeout = 10;	/* set timeout 10 seconds */
(Continue reading)


Gmane