Re: x86/kdump: crashkernel=X try to reserve below 896M first then below 4G and MAXMEM

2017-10-21 Thread Yinghai Lu
On Thu, Oct 19, 2017 at 10:52 PM, Dave Young wrote: > Now crashkernel=X will fail if there's not enough memory at low region > (below 896M) when trying to reserve large memory size. One can use > crashkernel=xM,high to reserve it at high region (>4G) but it is more >

Re: x86/kdump: crashkernel=X try to reserve below 896M first then below 4G and MAXMEM

2017-10-21 Thread Yinghai Lu
On Thu, Oct 19, 2017 at 10:52 PM, Dave Young wrote: > Now crashkernel=X will fail if there's not enough memory at low region > (below 896M) when trying to reserve large memory size. One can use > crashkernel=xM,high to reserve it at high region (>4G) but it is more > convinient to improve

Re: [PATCH V13 1/4] PCI: Don't ignore valid response before CRS timeout

2017-09-03 Thread Yinghai Lu
On Tue, Aug 29, 2017 at 12:53 PM, Bjorn Helgaas wrote: > > Applied this series to pci/enumeration for v4.14. You didn't include a > cover letter, but the series includes: > > [V13 1/4] PCI: Don't ignore valid response before CRS timeout > [V13 2/4] PCI: Factor out

Re: [PATCH V13 1/4] PCI: Don't ignore valid response before CRS timeout

2017-09-03 Thread Yinghai Lu
On Tue, Aug 29, 2017 at 12:53 PM, Bjorn Helgaas wrote: > > Applied this series to pci/enumeration for v4.14. You didn't include a > cover letter, but the series includes: > > [V13 1/4] PCI: Don't ignore valid response before CRS timeout > [V13 2/4] PCI: Factor out pci_bus_wait_crs() >

[PATCH 03/10] PCI: export symbol for PCI_TEST module

2017-08-05 Thread Yinghai Lu
We need to use them from pci_test module, so expose them. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- arch/x86/pci/i386.c | 1 + drivers/pci/setup-bus.c | 1 + kernel/resource.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/

[PATCH 03/10] PCI: export symbol for PCI_TEST module

2017-08-05 Thread Yinghai Lu
We need to use them from pci_test module, so expose them. Signed-off-by: Yinghai Lu --- arch/x86/pci/i386.c | 1 + drivers/pci/setup-bus.c | 1 + kernel/resource.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 7b43071..9065c58

[PATCH 00/10] PCI: pci resource allocation test module

2017-08-05 Thread Yinghai Lu
://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for_pci_v4.14_pci_next Thanks Yinghai Yinghai Lu (10): PCI: avoid arch_remove_reservations() for PCI_TEST PCI: introduce ioport_res/iomem_res for PCI_TEST PCI: export symbol for PCI_TEST module PCI: extend pci device

[PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST

2017-08-05 Thread Yinghai Lu
-by: Yinghai Lu <ying...@kernel.org> --- arch/x86/kernel/resource.c | 15 +-- include/linux/ioport.h | 3 ++- kernel/resource.c | 5 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index 5

[PATCH 00/10] PCI: pci resource allocation test module

2017-08-05 Thread Yinghai Lu
://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for_pci_v4.14_pci_next Thanks Yinghai Yinghai Lu (10): PCI: avoid arch_remove_reservations() for PCI_TEST PCI: introduce ioport_res/iomem_res for PCI_TEST PCI: export symbol for PCI_TEST module PCI: extend pci device

[PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST

2017-08-05 Thread Yinghai Lu
-by: Yinghai Lu --- arch/x86/kernel/resource.c | 15 +-- include/linux/ioport.h | 3 ++- kernel/resource.c | 5 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index 5ab3895..f19b0f6 100644

[PATCH 04/10] PCI: extend pci device match_driver state

2017-08-05 Thread Yinghai Lu
Change it from false/true to -1/0/1. If it is set from -1, then it will never get change to 1 later. For PCI_TEST, the simulated device does not have realy function support except bus number and BAR setting. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/iommu/amd_iommu_init

[PATCH 04/10] PCI: extend pci device match_driver state

2017-08-05 Thread Yinghai Lu
Change it from false/true to -1/0/1. If it is set from -1, then it will never get change to 1 later. For PCI_TEST, the simulated device does not have realy function support except bus number and BAR setting. Signed-off-by: Yinghai Lu --- drivers/iommu/amd_iommu_init.c | 2 +- drivers/pci

[PATCH 06/10] PCI: PCI_TEST simple data

2017-08-05 Thread Yinghai Lu
Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/pci_test_data.txt | 24 drivers/pci/pci_test_mask.txt | 5 + 2 files changed, 29 insertions(+) create mode 100644 drivers/pci/pci_test_data.txt create mode 100644 drivers/pci/pci_test_mask.txt

[PATCH 06/10] PCI: PCI_TEST simple data

2017-08-05 Thread Yinghai Lu
Signed-off-by: Yinghai Lu --- drivers/pci/pci_test_data.txt | 24 drivers/pci/pci_test_mask.txt | 5 + 2 files changed, 29 insertions(+) create mode 100644 drivers/pci/pci_test_data.txt create mode 100644 drivers/pci/pci_test_mask.txt diff --git a/drivers/pci

[PATCH 02/10] PCI: introduce ioport_res/iomem_res for PCI_TEST

2017-08-05 Thread Yinghai Lu
Make every bus to take the pointer to correct iomem_res instead of using iomem_resource directly. So PCI_TEST could use different iomem_res later. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/probe.c | 2 ++ drivers/pci/quirks.c| 2 +- drivers/pci/setup-bus.

[PATCH 05/10] PCI: Add PCI_TEST module for resource allocation

2017-08-05 Thread Yinghai Lu
registers, so we can make pci BAR sizing working. It also support bus number assign-all. Only tested on x86 64bit arch. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/Kconfig|6 + drivers/pci/Makefile |2 + drivers/pci/pci_test.c

[PATCH 02/10] PCI: introduce ioport_res/iomem_res for PCI_TEST

2017-08-05 Thread Yinghai Lu
Make every bus to take the pointer to correct iomem_res instead of using iomem_resource directly. So PCI_TEST could use different iomem_res later. Signed-off-by: Yinghai Lu --- drivers/pci/probe.c | 2 ++ drivers/pci/quirks.c| 2 +- drivers/pci/setup-bus.c | 2 +- drivers/pci/setup

[PATCH 05/10] PCI: Add PCI_TEST module for resource allocation

2017-08-05 Thread Yinghai Lu
registers, so we can make pci BAR sizing working. It also support bus number assign-all. Only tested on x86 64bit arch. Signed-off-by: Yinghai Lu --- drivers/pci/Kconfig|6 + drivers/pci/Makefile |2 + drivers/pci/pci_test.c | 1281 3

Re: [tip:x86/platform] x86/PCI/mmcfg: Switch to ECAM config mode if possible

2017-06-29 Thread Yinghai Lu
On Wed, Jun 28, 2017 at 11:45 PM, tip-bot for Thomas Gleixner wrote: > Commit-ID: b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Gitweb: http://git.kernel.org/tip/b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Author: Thomas Gleixner > AuthorDate: Thu, 16

Re: [tip:x86/platform] x86/PCI/mmcfg: Switch to ECAM config mode if possible

2017-06-29 Thread Yinghai Lu
On Wed, Jun 28, 2017 at 11:45 PM, tip-bot for Thomas Gleixner wrote: > Commit-ID: b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Gitweb: http://git.kernel.org/tip/b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Author: Thomas Gleixner > AuthorDate: Thu, 16 Mar 2017 22:50:09 +0100 > Committer:

Re: [PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-13 Thread Yinghai Lu
On Mon, Jun 12, 2017 at 2:48 PM, Bjorn Helgaas <helg...@kernel.org> wrote: > On Fri, Jun 09, 2017 at 04:16:17PM -0700, Yinghai Lu wrote: >> From: James Puthukattukaran <james.puthukattuka...@oracle.com> >> >> The IDT switch incorrectly flags an ACS source viol

Re: [PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-13 Thread Yinghai Lu
On Mon, Jun 12, 2017 at 2:48 PM, Bjorn Helgaas wrote: > On Fri, Jun 09, 2017 at 04:16:17PM -0700, Yinghai Lu wrote: >> From: James Puthukattukaran >> >> The IDT switch incorrectly flags an ACS source violation on a read config >> request to an end point device on the c

[PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-09 Thread Yinghai Lu
around to pci_bus_read_dev_vendor_id() from pci_bus_check_dev() and move enable_acs_sv to drivers/pci/pci.c -- by Yinghai -v3: add bus->self check for root bus and virtual bus for sriov vfs. Signed-off-by: James Puthukattukaran <james.puthukattuka...@oracle.com> Signed-off-by: Yinghai Lu <

[PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-09 Thread Yinghai Lu
pci_bus_check_dev() and move enable_acs_sv to drivers/pci/pci.c -- by Yinghai -v3: add bus->self check for root bus and virtual bus for sriov vfs. Signed-off-by: James Puthukattukaran Signed-off-by: Yinghai Lu -- drivers/pci/pci.c | 33 + drivers/pci/pc

Re: [PATCH] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
He <b...@redhat.com> > Cc: Thomas Gleixner <t...@linutronix.de> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: "H. Peter Anvin" <h...@zytor.com> > Cc: x...@kernel.org > Cc: Kees Cook <keesc...@chromium.org> > Cc: Thomas Garnier <thgar...@google.com&

Re: [PATCH] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
998690] Kernel panic - not syncing: Fatal exception > [ 10.004708] Kernel Offset: 0x1100 from 0x8100 (relocation > range: 0x8000-0xbfff) > > Reported-by: Jeff Moyer > Signed-off-by: Baoquan He > Cc: Thomas Gleixner > Cc: Ingo Molnar >

Re: [PATCH v2] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
On Mon, May 1, 2017 at 12:32 PM, Ingo Molnar wrote: > > * Baoquan He wrote: > >> arch/x86/mm/init_64.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c >> index 15173d3..dfa9edb 100644

Re: [PATCH v2] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
On Mon, May 1, 2017 at 12:32 PM, Ingo Molnar wrote: > > * Baoquan He wrote: > >> arch/x86/mm/init_64.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c >> index 15173d3..dfa9edb 100644 >> --- a/arch/x86/mm/init_64.c >>

Re: [tip:x86/boot] x86/boot/e820: Basic cleanup of e820.c

2017-04-25 Thread Yinghai Lu
On Tue, Apr 11, 2017 at 12:37 AM, tip-bot for Ingo Molnar wrote: > Commit-ID: 640e1b38b00550990cecd809021cd37716e45922 > Gitweb: http://git.kernel.org/tip/640e1b38b00550990cecd809021cd37716e45922 > Author: Ingo Molnar > AuthorDate: Sat, 28 Jan 2017

Re: [tip:x86/boot] x86/boot/e820: Basic cleanup of e820.c

2017-04-25 Thread Yinghai Lu
On Tue, Apr 11, 2017 at 12:37 AM, tip-bot for Ingo Molnar wrote: > Commit-ID: 640e1b38b00550990cecd809021cd37716e45922 > Gitweb: http://git.kernel.org/tip/640e1b38b00550990cecd809021cd37716e45922 > Author: Ingo Molnar > AuthorDate: Sat, 28 Jan 2017 11:13:08 +0100 > Committer: Ingo

Re: [PATCH 1/2] x86/mm/ident_map: Add PUD level 1GB page support

2017-04-25 Thread Yinghai Lu
On Tue, Apr 25, 2017 at 2:13 AM, Xunlei Pang wrote: > The current kernel_ident_mapping_init() creates the identity > mapping using 2MB page(PMD level), this patch adds the 1GB > page(PUD level) support. > > This is useful on large machines to save some reserved memory > (as

Re: [PATCH 1/2] x86/mm/ident_map: Add PUD level 1GB page support

2017-04-25 Thread Yinghai Lu
On Tue, Apr 25, 2017 at 2:13 AM, Xunlei Pang wrote: > The current kernel_ident_mapping_init() creates the identity > mapping using 2MB page(PMD level), this patch adds the 1GB > page(PUD level) support. > > This is useful on large machines to save some reserved memory > (as paging structures) in

[PATCH 05/13] sparc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
idge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> Cc: sparcli...@vger.kernel.org --- arch/

[PATCH 05/13] sparc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
idge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c | 8 +++- 1 file changed, 7 insert

[PATCH 00/13] PCI: sparc related 64bit resource fixup

2017-04-20 Thread Yinghai Lu
to root all pcie. patch 13: restore old pref allocation logic if hostbridge does not support mmio64. Those patches could be applied on top of today's pci/next. Thanks Yinghai Yinghai Lu (13): sparc/PCI: Use correct offset for bus address to resource PCI: Add pci_find_bus_resource

[PATCH 00/13] PCI: sparc related 64bit resource fixup

2017-04-20 Thread Yinghai Lu
to root all pcie. patch 13: restore old pref allocation logic if hostbridge does not support mmio64. Those patches could be applied on top of today's pci/next. Thanks Yinghai Yinghai Lu (13): sparc/PCI: Use correct offset for bus address to resource PCI: Add pci_find_bus_resource

[PATCH 07/13] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu <ying...@kernel.org> Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> Cc: Paul Mackerras <pau...@samba.org> Cc: Michael Ellerman <m...@ellerman.id.au> Cc: Gavin Shan <gws...@linux.vnet.ibm.com> Cc: Yiji

[PATCH 07/13] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Gavin Shan Cc: Yijing Wang Cc: Anton Blanchard Cc: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci_of_scan.c | 4 +++- 1 file changed, 3 insertions

[PATCH 01/13] sparc/PCI: Use correct offset for bus address to resource

2017-04-20 Thread Yinghai Lu
ove change in pci_resource_to_user() Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 6 +++--- arch/sparc/kernel/pci_common.c | 32 arch/sparc/kernel/pci_impl.

[PATCH 01/13] sparc/PCI: Use correct offset for bus address to resource

2017-04-20 Thread Yinghai Lu
ove change in pci_resource_to_user() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 6 +++--- arch/sparc/kernel/pci_common.c | 32 arch/sparc/kernel/pci_impl.h | 4 3 files changed, 31 insertions(+), 11

[PATCH 12/13] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2017-04-20 Thread Yinghai Lu
If host bridge does not have mmio64 above 4G, We don't need to treat device non-pref mmio64 as as pref mmio64. Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 02/13] PCI: Add pci_find_bus_resource()

2017-04-20 Thread Yinghai Lu
Add pci_find_bus_resource() to return bus resource for input resource. In some case, we may only have bus instead of dev. It is same as pci_find_parent_resource, but take bus as input. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/pci.c

[PATCH 12/13] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2017-04-20 Thread Yinghai Lu
If host bridge does not have mmio64 above 4G, We don't need to treat device non-pref mmio64 as as pref mmio64. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci

[PATCH 02/13] PCI: Add pci_find_bus_resource()

2017-04-20 Thread Yinghai Lu
Add pci_find_bus_resource() to return bus resource for input resource. In some case, we may only have bus instead of dev. It is same as pci_find_parent_resource, but take bus as input. Signed-off-by: Yinghai Lu --- drivers/pci/pci.c | 27 --- include/linux/pci.h | 2

[PATCH 09/13] PCI: Check pref compatible bit for mem64 resource of PCIe device

2017-04-20 Thread Yinghai Lu
<david.ah...@oracle.com> Tested-by: David Ahern <david.ah...@oracle.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ <li...@iam.tj> Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> Cc: sparcli..

[PATCH 09/13] PCI: Check pref compatible bit for mem64 resource of PCIe device

2017-04-20 Thread Yinghai Lu
rn Tested-by: David Ahern Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci_common.c | 2 +- drivers/pci/pci.c | 8 +--- drivers/pci/pci.h

[PATCH 10/13] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2017-04-20 Thread Yinghai Lu
check them for child device resources. -v2: check all bus resources instead of just res[15]. Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- drivers/pci/setup-bus.c | 31 +-- 1 file changed, 29 insertions(+),

[PATCH 10/13] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2017-04-20 Thread Yinghai Lu
check them for child device resources. -v2: check all bus resources instead of just res[15]. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b

[PATCH 06/13] powerpc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
Same as sparc version. Make resource with consistent sequence like other arch or directly from pci_read_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu <y

[PATCH 04/13] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu <ying...@kernel.org> Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- arch/sparc/kernel/of_device_32.c | 5 +++-- arch/spa

[PATCH 08/13] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu <ying...@kernel.org> Cc: Grant Likely <grant.lik...@linaro.org> Cc: Rob Herring <robh...@kernel.org> Cc: devicet...@vger.kernel.org Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- drivers/of/address.c | 4

[PATCH 06/13] powerpc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
Same as sparc version. Make resource with consistent sequence like other arch or directly from pci_read_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Cc

[PATCH 04/13] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Tested-by: Khalid Aziz --- arch/sparc/kernel/of_device_32.c | 5 +++-- arch/sparc/kernel/of_device_64.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletion

[PATCH 08/13] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Grant Likely Cc: Rob Herring Cc: devicet...@vger.kernel.org Tested-by: Khalid Aziz --- drivers/of/address.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index

[PATCH 13/13] PCI: Restore pref MMIO allocation logic for host bridge without mmio64

2017-04-20 Thread Yinghai Lu
all. The patch restore to old logic: when host bridge does not have has_mem64, put children pref mmio64 and pref mmio32 all under bridges pref bars. Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- drivers/pci/bus.c | 4 +++- dr

[PATCH 13/13] PCI: Restore pref MMIO allocation logic for host bridge without mmio64

2017-04-20 Thread Yinghai Lu
all. The patch restore to old logic: when host bridge does not have has_mem64, put children pref mmio64 and pref mmio32 all under bridges pref bars. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/bus.c | 4 +++- drivers/pci/setup-bus.c | 13 + drivers/pci/se

[PATCH 11/13] PCI: Add has_mem64 for struct host_bridge

2017-04-20 Thread Yinghai Lu
mmio64 and pref mmio32 under bridge pref bar. Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> --- drivers/pci/probe.c | 7 +++ include/linux/pci.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/p

[PATCH 11/13] PCI: Add has_mem64 for struct host_bridge

2017-04-20 Thread Yinghai Lu
mmio64 and pref mmio32 under bridge pref bar. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/probe.c | 7 +++ include/linux/pci.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 676b55f..8f439e0 100644 --- a/drivers/pci

[PATCH 03/13] sparc/PCI: Reserve legacy mmio after PCI mmio

2017-04-20 Thread Yinghai Lu
pcibios_bus_to_resource() -v6: use pci_find_bus_resource() Signed-off-by: Yinghai Lu <ying...@kernel.org> Tested-by: Khalid Aziz <khalid.a...@oracle.com> Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 1 + arch/sparc/kernel/pci_c

[PATCH 03/13] sparc/PCI: Reserve legacy mmio after PCI mmio

2017-04-20 Thread Yinghai Lu
pcibios_bus_to_resource() -v6: use pci_find_bus_resource() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 1 + arch/sparc/kernel/pci_common.c | 59 ++ arch/sparc/kernel/pci_impl.h | 1

Re: [PATCH v2] PCI: disable SERR for kdump kernel

2017-04-20 Thread Yinghai Lu
On Thu, Apr 20, 2017 at 10:14 AM, Sinan Kaya <ok...@codeaurora.org> wrote: > On 4/18/2017 8:31 PM, Yinghai Lu wrote: >> * pci_setup_device - fill in class and map information of a device >> * @dev: the device structure to fill >> @@ -1572,6 +1592,9 @@ int pci_setup

Re: [PATCH v2] PCI: disable SERR for kdump kernel

2017-04-20 Thread Yinghai Lu
On Thu, Apr 20, 2017 at 10:14 AM, Sinan Kaya wrote: > On 4/18/2017 8:31 PM, Yinghai Lu wrote: >> * pci_setup_device - fill in class and map information of a device >> * @dev: the device structure to fill >> @@ -1572,6 +1592,9 @@ int pci_setup_device(struct pci_dev *dev >

[PATCH v2] PCI: disable SERR for kdump kernel

2017-04-18 Thread Yinghai Lu
Found one system with infiniband with SRIOV enabled, kdump kernel SRIOV BAR probing trigger one pci fatal error. That assert error pin, and host get reset by BMC. We can just ignore that error to let kernel go on and kdump to create vmcore. -v2: add debug print out Signed-off-by: Yinghai Lu

[PATCH v2] PCI: disable SERR for kdump kernel

2017-04-18 Thread Yinghai Lu
Found one system with infiniband with SRIOV enabled, kdump kernel SRIOV BAR probing trigger one pci fatal error. That assert error pin, and host get reset by BMC. We can just ignore that error to let kernel go on and kdump to create vmcore. -v2: add debug print out Signed-off-by: Yinghai Lu

Re: [PATCH] x86/boot: Support uncompressed kernel

2017-03-23 Thread Yinghai Lu
On Thu, Mar 23, 2017 at 5:51 AM, Chao Peng wrote: > Compressed kernel has its own drawback: uncompressing takes time. Even > though the time is short enough to ignore for most cases but for cases that > time is critical this is still a big number. In our on-going

Re: [PATCH] x86/boot: Support uncompressed kernel

2017-03-23 Thread Yinghai Lu
On Thu, Mar 23, 2017 at 5:51 AM, Chao Peng wrote: > Compressed kernel has its own drawback: uncompressing takes time. Even > though the time is short enough to ignore for most cases but for cases that > time is critical this is still a big number. In our on-going optimization > for kernel boot

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-07 Thread Yinghai Lu
On Mon, Mar 6, 2017 at 11:30 PM, Ingo Molnar <mi...@kernel.org> wrote: > > * Yinghai Lu <ying...@kernel.org> wrote: > >> On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov >> <tip...@zytor.com> wrote: >> > Commit-ID: 49ca7bb328c630dd43be

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-07 Thread Yinghai Lu
On Mon, Mar 6, 2017 at 11:30 PM, Ingo Molnar wrote: > > * Yinghai Lu wrote: > >> On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov >> wrote: >> > Commit-ID: 49ca7bb328c630dd43be626534b49e19513296fd >> > Gitw

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-06 Thread Yinghai Lu
On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov wrote: > Commit-ID: 49ca7bb328c630dd43be626534b49e19513296fd > Gitweb: http://git.kernel.org/tip/49ca7bb328c630dd43be626534b49e19513296fd > Author: Borislav Petkov > AuthorDate: Thu, 9 Feb 2017

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-06 Thread Yinghai Lu
On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov wrote: > Commit-ID: 49ca7bb328c630dd43be626534b49e19513296fd > Gitweb: http://git.kernel.org/tip/49ca7bb328c630dd43be626534b49e19513296fd > Author: Borislav Petkov > AuthorDate: Thu, 9 Feb 2017 01:34:49 +0100 > Committer: Ingo

[PATCH] PCI/aspm: Fix link->downstream setting

2017-03-01 Thread Yinghai Lu
xc4/0x180 SyS_write+0x49/0xa0 do_syscall_64+0xa6/0x1c0 entry_SYSCALL64_slow_path+0x25/0x25 ---[ end trace bd187ee0267df5d9 ]--- set downstream even with blacklist path. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/pcie/aspm.c |5 ++--- 1 file changed, 2 inserti

[PATCH] PCI/aspm: Fix link->downstream setting

2017-03-01 Thread Yinghai Lu
xc4/0x180 SyS_write+0x49/0xa0 do_syscall_64+0xa6/0x1c0 entry_SYSCALL64_slow_path+0x25/0x25 ---[ end trace bd187ee0267df5d9 ]--- set downstream even with blacklist path. Signed-off-by: Yinghai Lu --- drivers/pci/pcie/aspm.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) In

Re: [PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-24 Thread Yinghai Lu
On Fri, Feb 24, 2017 at 9:17 AM, Raj, Ashok <ashok@intel.com> wrote: > On Thu, Feb 23, 2017 at 10:54:35PM -0800, Yinghai Lu wrote: >> +++ linux-2.6/drivers/pci/hotplug/pciehp_ctrl.c >> @@ -71,9 +71,6 @@ static void set_slot_off(struct controll >>*/ &

Re: [PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-24 Thread Yinghai Lu
On Fri, Feb 24, 2017 at 9:17 AM, Raj, Ashok wrote: > On Thu, Feb 23, 2017 at 10:54:35PM -0800, Yinghai Lu wrote: >> +++ linux-2.6/drivers/pci/hotplug/pciehp_ctrl.c >> @@ -71,9 +71,6 @@ static void set_slot_off(struct controll >>*/ >>

[PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-23 Thread Yinghai Lu
Now set_slot_off() is used in board_added() err path. We could reuse in remove_board. Also need to move green_led and attention_status out it. and make code more readable. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/hotplug/pciehp_ctrl.c | 16 +++-

[PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-23 Thread Yinghai Lu
Now set_slot_off() is used in board_added() err path. We could reuse in remove_board. Also need to move green_led and attention_status out it. and make code more readable. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_ctrl.c | 16 +++- 1 file changed, 3 insertions

[PATCH] PCI,pciehp: Skip not changed command write

2017-02-23 Thread Yinghai Lu
skip writing. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/hotplug/pciehp_hpc.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/pci/hotplug/pciehp_hpc.c === --- linux-2.

[PATCH] PCI,pciehp: Skip not changed command write

2017-02-23 Thread Yinghai Lu
skip writing. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/pci/hotplug/pciehp_hpc.c === --- linux-2.6.orig/drivers/pci/hotplug

Re: [PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread yinghai . lu
message? On 02/23/2017 03:28 PM, Yinghai Lu wrote: Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu <ying...@kernel.org>

Re: [PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread yinghai . lu
message? On 02/23/2017 03:28 PM, Yinghai Lu wrote: Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu diff --git a/drivers/pci

[PATCH -v2] PCI,pciehp: Not write linkctrl register if val is not changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. -v2: inline __pciehp_link_set into pciehp_link_enable Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/h

[PATCH -v2] PCI,pciehp: Not write linkctrl register if val is not changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. -v2: inline __pciehp_link_set into pciehp_link_enable Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c | 19

[PATCH] PCI,pciehp: Not write linkctrl register if val is changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/hotplug/pciehp_hpc.c |8 ++-- 1 file changed, 6 inse

[PATCH] PCI,pciehp: Not write linkctrl register if val is changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread Yinghai Lu
Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu <ying...@kernel.org> diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/d

[PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread Yinghai Lu
Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug

Re: [PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-17 Thread Yinghai Lu
On Fri, Feb 17, 2017 at 2:39 PM, Bjorn Helgaas <helg...@kernel.org> wrote: > On Thu, Feb 16, 2017 at 10:12:47PM -0800, Yinghai Lu wrote: > > I don't think it really makes sense to tie PDC handling with the > attention button. It might happen to avoid the problem on your > sy

Re: [PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-17 Thread Yinghai Lu
On Fri, Feb 17, 2017 at 2:39 PM, Bjorn Helgaas wrote: > On Thu, Feb 16, 2017 at 10:12:47PM -0800, Yinghai Lu wrote: > > I don't think it really makes sense to tie PDC handling with the > attention button. It might happen to avoid the problem on your > system, but I don't

[PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-16 Thread Yinghai Lu
button is not there. So we can safely add checking in pciehp_isr() to skip that PDC handling. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/hotplug/pciehp_hpc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/pci/hotplug/

[PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-16 Thread Yinghai Lu
button is not there. So we can safely add checking in pciehp_isr() to skip that PDC handling. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/pci/hotplug/pciehp

[PATCH] PCI/PME: Restore pcie_pme_driver.remove

2017-02-14 Thread Yinghai Lu
hat commit did extra thing like remove the .remove for pcie_pme_driver. Put back pcie_pme_remove and restore to pcie_pme_driver fix the problem. Fixes: d7def2040077 ("PCI/PME: Make explicitly non-modular") Cc: <sta...@vger.kernel.org> Signed-off-by: Yinghai Lu <ying...@kernel.o

[PATCH] PCI/PME: Restore pcie_pme_driver.remove

2017-02-14 Thread Yinghai Lu
hat commit did extra thing like remove the .remove for pcie_pme_driver. Put back pcie_pme_remove and restore to pcie_pme_driver fix the problem. Fixes: d7def2040077 ("PCI/PME: Make explicitly non-modular") Cc: Signed-off-by: Yinghai Lu diff --git a/drivers/pci/pcie/pme.c b/drivers/

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
On Fri, Feb 10, 2017 at 6:39 PM, Yinghai Lu <ying...@kernel.org> wrote: > Ashok, > > Can ask your QA guys check only attached patch and commit 68db9bc ? more clean patches: split that into two small patches. Thanks Yinghai From 68db9bc814362e7f24371c27d12a4f34477d9356 Mon Sep 1

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
On Fri, Feb 10, 2017 at 6:39 PM, Yinghai Lu wrote: > Ashok, > > Can ask your QA guys check only attached patch and commit 68db9bc ? more clean patches: split that into two small patches. Thanks Yinghai From 68db9bc814362e7f24371c27d12a4f34477d9356 Mon Sep 17 00:00:00 2001 From: Luk

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
n slot power doesn't seem to require the port to be in D0, at least the PCIe spec doesn't say so and I confirmed that by testing with a Thunderbolt controller. This patch put back D0 when trying to power on/off the slots. Signed-off-by: Yinghai Lu <ying...@kernel.org> --- drivers/pci/hot

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
hat mean commit 68db9bc assumpation about power on/off on D3 is not right. - The configuration space of the port remains accessible in D3hot, so all the functions to read or modify the Slot Status and Slot Control registers need not be modified. Even turning on slot power doesn't

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 8:22 PM, Yinghai Lu <ying...@kernel.org> wrote: > On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner <lu...@wunner.de> wrote: >> On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >>> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner <lu...@wu

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 8:22 PM, Yinghai Lu wrote: > On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner wrote: >> On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >>> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner wrote: >>> > On Sat, Feb 04, 2017 at 09:12:

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner <lu...@wunner.de> wrote: > On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner <lu...@wunner.de> wrote: >> > On Sat, Feb 04, 2017 at 09:12:54AM +0100, Lukas Wunn

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner wrote: > On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner wrote: >> > On Sat, Feb 04, 2017 at 09:12:54AM +0100, Lukas Wunner wrote: >> > Section 6.7.3.4 of the PCIe

  1   2   3   4   5   6   7   8   9   10   >