[PATCH v5 01/53] PCI: Cleanup res_to_dev_res() printout

2015-09-16 Thread Yinghai Lu
: change to %#llx according to Bjorn. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 508cc56..6d0815e 100644 --- a/drivers/pci/setup

[PATCH v5 00/53] PCI: Resource allocation cleanup for v4.4

2015-09-16 Thread Yinghai Lu
- update changelog - add one debug patch - add one patch that get resource allocation near end of avialable window Yinghai Lu (53): PCI: Cleanup res_to_dev_res() printout PCI: Reuse res_to_dev_res() in reassign_resources_sorted() PCI: Use correct align for optional only resources during sor

[PATCH v5 03/53] PCI: Use correct align for optional only resources during sorting

2015-09-16 Thread Yinghai Lu
: TJ Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 49 ++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index f816472..aea35b6 100644 --- a/drivers/pci/setup-bus.c +++ b

[PATCH v5 06/53] PCI: Don't add too much optional size for hotplug bridge MMIO

2015-09-16 Thread Yinghai Lu
, and total size should be 2M. This patch change to comparing required+optional with min_sum_size to get smaller optional size. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/pci/setup

[PATCH v5 04/53] PCI: Optimize bus min_align/size calculation during sizing

2015-09-16 Thread Yinghai Lu
ces. Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Reported-by: TJ Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 195 ++-- 1 file changed, 157 insertions(+), 38 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bu

[PATCH v5 15/53] PCI: Cache window alignment value during bus sizing

2015-09-16 Thread Yinghai Lu
There are several calling to window_alignment(), and we will have more for alt_size support, cache the value instead of keeping on getting it. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup

[PATCH v5 18/53] PCI: Move comment to pci_need_to_release()

2015-09-16 Thread Yinghai Lu
Move comment from caller to pci_need_to_release(), as we will have one new caller for alt_size support. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci

[PATCH v5 23/53] PCI: Add support for more than two alt_size entries under same bridge

2015-09-16 Thread Yinghai Lu
-by: Yinghai Lu --- drivers/pci/setup-bus.c | 56 +++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index c7e5bf3..f3077db 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup

[PATCH v5 05/53] PCI: Optimize bus align/size calculation for optional during sizing

2015-09-16 Thread Yinghai Lu
: 0x10/0x2b0, and it is much better than original required+optional align/size: 0x80/0x300 and even have smaller min_align than required. -v2: remove not used size1 in calculate_memsize Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Reported-by: TJ Signed-off-by: Yinghai Lu

[PATCH v5 11/53] PCI: Add debug printout during releasing partial assigned resources

2015-09-16 Thread Yinghai Lu
happens, we only print out "assigned" info, that is confusing as it looks like same range is assigned to two peer resources at the same time. Add printout for releasing so we have whole picture in debug messages. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 14 +++--- 1 fi

[PATCH v5 31/53] PCI: Kill macro checking for bus io port sizing

2015-09-16 Thread Yinghai Lu
We can use new generic version skip_isa_ioresource_align() instead of macro, and then kill the marco. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v5 26/53] PCI: Move ISA io port align out of calculate_iosize()

2015-09-16 Thread Yinghai Lu
< 0x400. We need to check size, and add extra size to make sure bit8/9 to be zero. Also need to apply same checking for optional size path. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) d

[PATCH v5 36/53] PCI: Check pref compatible bit for mem64 resource of PCIe device

2015-09-16 Thread Yinghai Lu
+ma5lcteee4xmtjrg0axj9k_tsu+m9...@mail.gmail.com Reported-by: David Ahern Tested-by: David Ahern Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu --- drivers/pci/pci.c | 3 ++- drivers/pci/pci.h | 2 ++ drivers/pci/probe.c | 33

[PATCH v5 22/53] PCI: Add alt_size ressource allocation support

2015-09-16 Thread Yinghai Lu
Reported-by: Yijing Wang Tested-by: Yijing Wang Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 203 +--- 1 file changed, 191 insertions(+), 12 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1af84f3..c7e5bf3

[PATCH v5 19/53] PCI: Separate required+optional assigning to another function

2015-09-16 Thread Yinghai Lu
__assign_resources_sorted() is getting too big if we put alt_size support into it. Split out required+optional assigning code to another function. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 47 +++ 1 file changed, 27 insertions(+), 20

[PATCH v5 32/53] resources: Split out __allocate_resource()

2015-09-16 Thread Yinghai Lu
y take lock" is *wrong*. Signed-off-by: Yinghai Lu Acked-by: Linus Torvalds --- kernel/resource.c | 70 +++ 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index f150dbb..07dea6f 100644 ---

[PATCH v5 33/53] resources: Make allocate_resource() return best fit resource

2015-09-16 Thread Yinghai Lu
: updated after __allocate_resource change, and add field in constraint instead of passing it directly. -v3: Use best fit instead of just fit according to Bjorn. Signed-off-by: Yinghai Lu --- kernel/resource.c | 81 ++- 1 file changed, 68

[PATCH v5 42/53] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2015-09-16 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 --- arch/sparc/kernel/of_device_32.c | 5 +++-- arch/sparc/kernel/of_device_64.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/sparc/kernel/of_dev

[PATCH v5 38/53] PCI: Add has_mem64 for struct host_bridge

2015-09-16 Thread Yinghai Lu
keep pref mmio64 and pref mmio32 under bridge pref bar. Signed-off-by: Yinghai Lu --- drivers/pci/probe.c | 9 + include/linux/pci.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9eb9e30..31998ea 100644 --- a/drivers/pci/probe.c +++ b/d

[PATCH v5 45/53] PCI: Treat optional as required in first try for bridge rescan

2015-09-16 Thread Yinghai Lu
info (include must and optonal separatedly) will be kept for next try. 2. last try: a: try to allocate required+optional to see if all get allocated. b: try to allocate required then expand to optional. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 19 ++- 1

[PATCH v5 41/53] sparc/PCI: Add mem64 resource parsing for root bus

2015-09-16 Thread Yinghai Lu
start as offset. -v3: add IORESOURCE_MEM_64 flag Fixes: commit d63e2e1f3df9 ("sparc/PCI: Clip bridge windows to fit in upstream windows") Link: http://lkml.kernel.org/r/cae9fiqu1gjy1lyrxs+ma5lcteee4xmtjrg0axj9k_tsu+m9...@mail.gmail.com Reported-by: David Ahern Tested-by: David Ahern

[PATCH v5 35/53] PCI: Add debug print out for min_align and alt_size

2015-09-16 Thread Yinghai Lu
Put all print out for all children align/size and result align/size together. We can print out device name at same time with min_align/alt_size calculation. So we can shut off debug print out from get_res_add_size() and get_res_add_align(). Signed-off-by: Yinghai Lu --- drivers/pci/setup

[PATCH v5 53/53] PCI: Don't set flags to 0 when assign resource fail

2015-09-16 Thread Yinghai Lu
We want to keep resource flags instead of clearing it after resource allocation fails. Make flags take IORESOURCE_UNSET | IORESOURCE_DISABLED instead. Suggested-by: Bjorn Helgaas Signed-off-by: Yinghai Lu --- drivers/pci/bus.c | 2 +- drivers/pci/setup-bus.c | 45

[PATCH v5 52/53] PCI: Introduce resource_disabled()

2015-09-16 Thread Yinghai Lu
nux-i...@vger.kernel.org Cc: linux-am33-l...@redhat.com Cc: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: sparcli...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-xte...@linux-xtensa.org Cc: io...@lists.linux-foundation.org Cc: linux...@vger.kernel.org Signed-off-by: Yinghai Lu ---

[PATCH v5 30/53] PCI: Unify skip_ioresource_align()

2015-09-16 Thread Yinghai Lu
-...@lists.ozlabs.org Cc: linux-a...@vger.kernel.org Signed-off-by: Yinghai Lu --- arch/microblaze/pci/pci-common.c | 8 arch/powerpc/kernel/pci-common.c | 11 +-- arch/x86/include/asm/pci_x86.h | 1 - arch/x86/pci/common.c| 4 ++-- arch/x86/pci/i386.c | 12

[PATCH v5 21/53] PCI: Move saved required resource list out of required+optional assigning

2015-09-16 Thread Yinghai Lu
We will need to share saved required list for alt_size support, so move it out from required+optional assigning. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/pci/setup-bus.c b

[PATCH v5 44/53] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2015-09-16 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 --- 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 384574c..3399602 100644 --- a

[PATCH v5 37/53] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2015-09-16 Thread Yinghai Lu
re we check them for child device resources. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index a48836b..81d551f 100644 --- a/drivers/pci/setup-bus.c

[PATCH v5 09/53] PCI: Rename pdev_sort_resources() to pdev_assign_resources_prepare()

2015-09-16 Thread Yinghai Lu
pdev_sort_resources() etc was checking devices resources and putting resources that need to assign to one list in sorted order. Now we don't do sorting in those functions anymore, so change to pdev_assign_resources_prepare() instead. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c

[PATCH v5 27/53] PCI: Don't add too much io port for hotplug bridge with old size

2015-09-16 Thread Yinghai Lu
are using size to compare with min_size at first. That is not right, we should have 0x2000. We can check size+size1 with min_size for io port, and just add size1 to size without passing extra size1 into calculate_iosize(). Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 8 1

[PATCH v5 13/53] PCI: Separate realloc list checking after allocation

2015-09-16 Thread Yinghai Lu
We check the realloc list, as list must be empty after allocation. Separate the realloc list checking to another function. Add checking that is missed in acpiphp driver. -v2: change to WARN_ON addording to Rafael. Signed-off-by: Yinghai Lu Cc: "Rafael J. Wysocki" Cc: Len Brown C

[PATCH v5 24/53] PCI: Fix size calculation with old_size on rescan path

2015-09-16 Thread Yinghai Lu
se smaller add_align as must align. After the patch, rescan works properly. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index f3077db..43b34a7 100644 --- a/d

[PATCH v5 25/53] PCI: Don't add too much optional size for hotplug bridge io

2015-09-16 Thread Yinghai Lu
Same as patch for MMIO (PCI: Don't add too much optional size for hotplug bridge MMIO), and this one is for io port. It will compare required+optional with min_sum_size to get smaller optional size. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 26 -- 1

[PATCH v5 28/53] PCI: Unify calculate_size() for io port and MMIO

2015-09-16 Thread Yinghai Lu
Now calculate_memsize() and calculate_iosize() is the same. Change them to calculate_size(). Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v5 29/53] PCI: Allow bridge optional only io port resource required size to be 0

2015-09-16 Thread Yinghai Lu
device, size will not be 0. when the bridge supports hotplug, min_size will not be 0. So they will still honor the old size as required size. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup-bus.c b

[PATCH v5 34/53] PCI, x86: Allocate from high in available window for MMIO

2015-09-16 Thread Yinghai Lu
range like 0xb000 to 0b:04.0 and 0f:00.0 Signed-off-by: Yinghai Lu --- arch/x86/pci/i386.c | 20 drivers/pci/setup-bus.c | 11 ++- include/linux/pci.h | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/x86/pci/i386.c b/arch/x86

[PATCH v5 07/53] PCI: Reorder resources list for required/optional resources

2015-09-16 Thread Yinghai Lu
, and call it two times accordingly. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 62 + 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index e4aa93e..555a7a3 100644 --- a

[PATCH v5 08/53] PCI: Remove duplicated code for resource sorting

2015-09-16 Thread Yinghai Lu
Now sort_resources() and pdev_sort_resources() all have sorting code. As we are going to call sort_resources() several places later for alt_size support, so choose to remove related code in pdev_sort_resources(). Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 22

[PATCH v5 20/53] PCI: Skip required+optional if there is no optional

2015-09-16 Thread Yinghai Lu
If the bridge does not support hotplug and has no child with sriov support, We will not have optional resources. We could get out early and don't try required+optional allocation. Also in the loop that update res with optional add info, skip resource that add_size is 0. Signed-off-by: Yingh

[PATCH v5 47/53] PCI: Don't release sibling bridge resources during hotplug

2015-09-16 Thread Yinghai Lu
. Reported-by: Andreas Noever Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 7ced411..aaf5fc5 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup

[PATCH v5 39/53] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2015-09-16 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 --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v5 46/53] PCI: Get new realloc size for bridge for last try

2015-09-16 Thread Yinghai Lu
urce. Clear the old resource size for last try or third and later try. Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v5 49/53] PCI: Claim fixed resource during remove/rescan path

2015-09-16 Thread Yinghai Lu
citly. Signed-off-by: Yinghai Lu --- drivers/pci/quirks.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 6a30252..c1d9a78 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -323,6 +323,23 @@ static void quirk_s

[PATCH v5 48/53] PCI: Don't release fixed resource for realloc

2015-09-16 Thread Yinghai Lu
We should not release bridge resource if there is fixed resources under it, otherwise the children firmware would stop working. Reported-by: Paul Johnson Suggested-by: Bjorn Helgaas Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92351 Signed-off-by: Yinghai Lu Cc: sta...@vger.kernel.org

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

2015-09-16 Thread Yinghai Lu
ll. 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 --- drivers/pci/bus.c | 4 +++- drivers/pci/setup-bus.c | 13 + drivers/pci/setup-res.c | 9 ++---

[PATCH v5 43/53] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2015-09-16 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(+), 1

[PATCH v5 50/53] PCI: Set resource to FIXED for LSI devices

2015-09-16 Thread Yinghai Lu
: Yinghai Lu Cc: sta...@vger.kernel.org --- drivers/pci/pci.h | 1 + drivers/pci/quirks.c| 20 drivers/pci/setup-bus.c | 4 3 files changed, 25 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index f0440b7..c34c2aa 100644 --- a/drivers/pci

[PATCH v5 16/53] PCI: Check if resource is allocated before trying to assign one

2015-09-16 Thread Yinghai Lu
In following alt_size support, we will call pci_assign_resource() several times on one resource list, and some resources could have been assigned already. Skip allocated resource in the list, as pci_assign_resource() only can handle not assigned resource. Signed-off-by: Yinghai Lu --- drivers

[PATCH v5 02/53] PCI: Reuse res_to_dev_res() in reassign_resources_sorted()

2015-09-16 Thread Yinghai Lu
Now res_to_dev_res() does not print out debug message anymore, so we can reuse it in reassign_resource_sorted() without confusing printout. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/pci/setup

Re: Pcie bus enumeration and 64bit issues

2015-09-16 Thread Yinghai Lu
On Wed, Sep 16, 2015 at 12:08 PM, Ruudgoogle wrote: > > For a big system i use an external pcie enclosure. Unfortunately the bios > fails to properly initialise the system. As work around i plan to start the > chassis after the linux kernel has booted. This leads to some other problems > i wou

Re: [PATCH v4 04/52] PCI: Optimize bus min_align/size calculation during sizing

2015-09-16 Thread Yinghai Lu
On Tue, Sep 15, 2015 at 7:57 AM, Bjorn Helgaas wrote: > > Any future series you post should be based on the most recent -rc1 at > the time. I apply patches to branches based on -rc1 unless they > actually depend on something merged after -rc1. ok, will post v5 based on v4.3-rc1. Thanks Yinghai

Re: [PATCH v4 04/52] PCI: Optimize bus min_align/size calculation during sizing

2015-09-14 Thread Yinghai Lu
On Mon, Sep 14, 2015 at 1:21 PM, Bjorn Helgaas wrote: > I spent a couple hours trying to understand the v3 version of this > patch, and I gave you some detailed examples and questions. If you > want me to look at v4, I expect you to try to clarify the changelog to > help answer those questions.

Re: [PATCH 2/2] PCI: Add support for Enhanced Allocation devices

2015-09-01 Thread Yinghai Lu
On Thu, Aug 20, 2015 at 9:59 AM, Sean O. Stalley wrote: > Add support for devices using Enhanced Allocation entries instead of BARs. > This patch allows the kernel to parse the EA Extended Capability structure > in PCI configspace and claim the BAR-equivalent resources. > > Signed-off-by: Sean O.

Re: CONFIG_HOLES_IN_ZONE and memory hot plug code on x86_64

2015-08-28 Thread Yinghai Lu
On Thu, Aug 27, 2015 at 11:42 PM, Steffen Persvold wrote: >>Can you post whole log with SRAT related info? > > I can probably reproduce again and get full logs when I get run time on the > system again, but here’s some output that we saved in our internal Jira case : > > [0.00] NUMA: Init

Re: CONFIG_HOLES_IN_ZONE and memory hot plug code on x86_64

2015-08-27 Thread Yinghai Lu
On Fri, Jun 26, 2015 at 4:31 PM, Steffen Persvold wrote: > We’ve encountered an issue in a special case where we have a sparse E820 map > [1]. > > Basically the memory hotplug code is causing a “kernel paging request” BUG > [2]. the trace does not look like hotplug path. > > By instrumenting t

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-26 Thread Yinghai Lu
On Wed, Aug 26, 2015 at 1:49 PM, Andrew Morton wrote: > On Tue, 25 Aug 2015 22:42:05 -0700 Yinghai Lu wrote: > I don't know what that means. We have multiple patches under at least > two different Subject:s. Please be very careful and very specific when > identifying pa

[PATCH v3] mm: Check if section present during memory block registering

2015-08-26 Thread Yinghai Lu
memory x86-64 systems") Fixes: 982792c782ef ("x86, mm: probe memory block size for generic x86 64bit") Signed-off-by: Yinghai Lu Cc: sta...@vger.kernel.org #v3.15 --- -v2: add fixes and comment. -v3: we don't need to worry about unregiser path, as unregister_memory_section(

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-25 Thread Yinghai Lu
On Tue, Aug 25, 2015 at 9:17 PM, Ingo Molnar wrote: > NAK due to lack of cleanliness: the two loops look almost identical - this > sure > can be factored out... Please check complete version at https://patchwork.kernel.org/patch/7074341/ Andrew, Ingo NAKed raw version of this patch, so you may

[PATCH v2] mm: Check if section present during memory block (un)registering

2015-08-25 Thread Yinghai Lu
ed-by: Tony Luck Fixes: bdee237c0343 ("x86: mm: Use 2GB memory block size on large memory x86-64 systems") Fixes: 982792c782ef ("x86, mm: probe memory block size for generic x86 64bit") Signed-off-by: Yinghai Lu Cc: sta...@vger.kernel.org #v3.15 --- -v2: add fixes and comment.

Re: [PATCH] mm: Check if section present during memory block (un)registering

2015-08-25 Thread Yinghai Lu
On Tue, Aug 25, 2015 at 4:08 PM, Andrew Morton wrote: > On Tue, 25 Aug 2015 15:41:16 -0700 Yinghai Lu wrote: > >> Tony found on his setup, if memory block size 512M will cause crash >> during booting. >> >> BUG: unable to handle kernel paging requ

[PATCH] mm: Check if section present during memory block (un)registering

2015-08-25 Thread Yinghai Lu
present section. For arch that support vmemmap, we don't setup memmap for struct page area within not present sections area. So skip the pfn range that belong to not present section. Als fixes unregister_mem_sect_under_nodes(). Reported-by: Tony Luck Tested-by: Tony Luck Signed-off-by: Yingh

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-25 Thread Yinghai Lu
On Tue, Aug 25, 2015 at 10:03 AM, Tony Luck wrote: > On Mon, Aug 24, 2015 at 4:59 PM, Yinghai Lu wrote: >> attached should fix the problem: > > It does ... but this (attached) is simpler. Your patch and mine both > allow the system to boot ... The version that fix with

Re: [PATCH v4 13/52] PCI, acpiphp: Add missing realloc list checking after resource allocation

2015-08-24 Thread Yinghai Lu
On Mon, Aug 24, 2015 at 5:37 PM, Rafael J. Wysocki wrote: > On Monday, August 24, 2015 03:14:26 PM Yinghai Lu wrote: > > I like this patch better, but the question really is how bad things can get > if we continue. And if they can get critically bad, whether or not we still > ar

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-24 Thread Yinghai Lu
On Mon, Aug 24, 2015 at 4:41 PM, Yinghai Lu wrote: > On Mon, Aug 24, 2015 at 3:39 PM, Tony Luck wrote: >> On Mon, Aug 24, 2015 at 2:25 PM, Yinghai Lu wrote: >> >>> Can you boot with "debug ignore_loglevel" so we can see following print out >>> for v

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-24 Thread Yinghai Lu
On Mon, Aug 24, 2015 at 3:39 PM, Tony Luck wrote: > On Mon, Aug 24, 2015 at 2:25 PM, Yinghai Lu wrote: > >> Can you boot with "debug ignore_loglevel" so we can see following print out >> for vmemmap? > > See attached. There are a few extra messages from my ow

Re: [PATCH v4 13/52] PCI, acpiphp: Add missing realloc list checking after resource allocation

2015-08-24 Thread Yinghai Lu
On Mon, Aug 24, 2015 at 3:09 PM, Rafael J. Wysocki wrote: > On Thursday, August 20, 2015 11:20:28 PM Yinghai Lu wrote: >> We check the realloc list, as list must be empty after allocation. >> >> Add missing one acpiphp driver. >> >> Signed-off-by: Yinghai Lu

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-24 Thread Yinghai Lu
On Mon, Aug 24, 2015 at 1:41 PM, Tony Luck wrote: > On Mon, Aug 24, 2015 at 10:46 AM, Yinghai Lu wrote: >> Then, what does the E820 look like? > > See attached serial console log of the latest crash Can you boot with "debug ignore_loglevel" so we can see follow

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-24 Thread Yinghai Lu
On Fri, Aug 21, 2015 at 4:54 PM, Tony Luck wrote: > On Fri, Aug 21, 2015 at 1:50 PM, Yinghai Lu wrote: > > Still stuff going on that I don't understand here. I increased the amount of > mirrored memory in this machine which moved max_pfn to 0x756 > and probe_memory_block

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-21 Thread Yinghai Lu
On Fri, Aug 21, 2015 at 1:27 PM, Luck, Tony wrote: > On Fri, Aug 21, 2015 at 11:38:13AM -0700, Yinghai Lu wrote: >> That commit could be reverted. >> According to >> https://lkml.org/lkml/2014/11/10/123 > > Do we really need to force the MIN_MEMORY_BLOCK_SIZE o

Re: [PATCH v4 4/4] Use 2GB memory block size on large-memory x86-64 systems

2015-08-21 Thread Yinghai Lu
memory block size without probing. found one system: has memory map like: [0x-0x6000) [0x1-0x20a000) We should use 0x2000 in this case. So can not assume system with big memory have 2g tail anymore. So revert it to put probing back. Fixes: bdee237c0343 ("x86: mm:

Re: [PATCH v4 43/52] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2015-08-21 Thread Yinghai Lu
On Fri, Aug 21, 2015 at 11:18 AM, Rob Herring wrote: > On Fri, Aug 21, 2015 at 1:20 AM, Yinghai Lu wrote: >> For device resource PREF bit setting under bridge 64-bit pref resource, >> we need to make sure only set PREF for 64bit resource, so set >> IORESOUCE_MEM_64 for 64b

[PATCH v4 44/52] PCI: Treat optional as required in first try for bridge rescan

2015-08-21 Thread Yinghai Lu
info (include must and optonal separatedly) will be kept for next try. 2. last try: a: try to allocate required+optional to see if all get allocated. b: try to allocate required then expand to optional. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 19 ++- 1

[PATCH v4 22/52] PCI: Add alt_size ressource allocation support

2015-08-21 Thread Yinghai Lu
works. Later 62:00.0 get correct resource allocated too. Link: https://bugzilla.kernel.org/show_bug.cgi?id=100451 Reported-by: Yijing Wang Tested-by: Yijing Wang Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 203 +--- 1 file changed, 191

[PATCH v4 29/52] PCI: Unify calculate_size() for io port and MMIO

2015-08-21 Thread Yinghai Lu
Now calculate_memsize() and calculate_iosize() is the same. Change them to calculate_size(). Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v4 43/52] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2015-08-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 --- 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 8bfda6a..073125f 100644 --- a

[PATCH v4 38/52] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2015-08-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 --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v4 27/52] PCI: Move ISA io port align out of calculate_iosize()

2015-08-20 Thread Yinghai Lu
< 0x400. We need to check size, and add extra size to make sure bit8/9 to be zero. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bu

[PATCH v4 04/52] PCI: Optimize bus min_align/size calculation during sizing

2015-08-20 Thread Yinghai Lu
-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 195 ++-- 1 file changed, 157 insertions(+), 38 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index aea35b6..861fe68 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci

[PATCH v4 01/52] PCI: Cleanup res_to_dev_res() printout

2015-08-20 Thread Yinghai Lu
Now get_res_add_size and get_res_add_align all have same printout from res_to_dev_res(), and it is confusing. Move out debug messages printout from res_to_dev_res(), and later we will reuse res_to_dev_res() in other functions. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 34

[PATCH v4 08/52] PCI: Remove duplicated code for resource sorting

2015-08-20 Thread Yinghai Lu
Now sort_resources() and pdev_sort_resources() all have sorting code. As we are going to call sort_resources() several places later, so choose to keep sort_resources(), and remove related code in pdev_sort_resources(). Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 22

[PATCH v4 05/52] PCI: Optimize bus align/size calculation for optional during sizing

2015-08-20 Thread Yinghai Lu
: remove not used size1 in calculate_memsize Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Reported-by: TJ Signed-off-by: Yinghai Lu drivers/pci/setup-bus.c | 82 +--- 1 file changed, 51 insertions(+), 31 deletions(-) --- drivers/pci

[PATCH v4 09/52] PCI: Rename pdev_sort_resources() to pdev_assign_resources_prepare()

2015-08-20 Thread Yinghai Lu
pdev_sort_resources() etc was used to check devices resources and put resources that need to assign to one list in sorted order. We don't do sorting in those functions anymore, so change to __assign_resources_prepare() instead. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c

[PATCH v4 20/52] PCI: Skip required+optional if there is no optional

2015-08-20 Thread Yinghai Lu
If the bridge does not support hotplug and no child with sriov support, We will not have optional resources. We could get out early and don't try required+optional allocation. Also in the loop that update res with optional add info, skip resource that add_size is 0. Signed-off-by: Yingh

[PATCH v4 23/52] PCI: Add support for more than two alt_size under same bridge

2015-08-20 Thread Yinghai Lu
Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 56 +++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8be5544..baf9900 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci

[PATCH v4 00/52] PCI: Resource allocation cleanup for v4.3

2015-08-20 Thread Yinghai Lu
resource on last try: only with bridge resources - remove/rescan path checking with old_size. v4: - Update changelog according to Bjorn. - split calculate_size patch to two. - use required instead of must. Yinghai Lu (52): PCI: Cleanup res_to_dev_res() printout PCI: Reuse

[PATCH v4 19/52] PCI: Separate required+optional assigning to another function

2015-08-20 Thread Yinghai Lu
__assign_resources_sorted() is getting too big if we put alt_size support into it. Split required+optional assigning code out to another function. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 47 +++ 1 file changed, 27 insertions(+), 20

[PATCH v4 16/52] PCI: Check if resource is allocated before trying to assign one

2015-08-20 Thread Yinghai Lu
In following alt_size support, we will call pci_assign_resource() on one resource list several times, and some resources could have been assigned already. Skip allocated resource in the list, as pci_assign_resource() only can handle not assigned resource. Signed-off-by: Yinghai Lu --- drivers

[PATCH v4 32/52] PCI: Kill macro checking for bus io port sizing

2015-08-20 Thread Yinghai Lu
We can use new generic version skip_isa_ioresource_align() instead the old marcro, so kill the marco. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c

[PATCH v4 36/52] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2015-08-20 Thread Yinghai Lu
re we check them for child device resources. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 4772a09..9667cbf5 100644 --- a/drivers/pci/setup-bus.c

[PATCH v4 15/52] PCI: Cache window alignment value during bus sizing

2015-08-20 Thread Yinghai Lu
There are several calling to window_alignment(), and we will have more for alt_size support, cache the value instead of keeping on getting it. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup

[PATCH v4 21/52] PCI: Move saved required resource list out of required+optional assigning

2015-08-20 Thread Yinghai Lu
We will need to share saved required list for alt_size support, so move it out of required+optional assigning. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/pci/setup-bus.c b

[PATCH v4 18/52] PCI: Move comment to pci_need_to_release()

2015-08-20 Thread Yinghai Lu
Move comment from caller to pci_need_to_release(), as we will have one new caller for alt_size support. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci

[PATCH v4 25/52] PCI: Fix size calculation with old_size on rescan path

2015-08-20 Thread Yinghai Lu
. Also use smaller add_align as must align. After the patch, rescan works properly. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 42552b2..de47692 10

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

2015-08-20 Thread Yinghai Lu
ll. 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 --- drivers/pci/bus.c | 4 +++- drivers/pci/setup-bus.c | 13 + drivers/pci/setup-res.c | 9 ++---

[PATCH v4 10/52] PCI: Treat ROM resource as optional during realloc

2015-08-20 Thread Yinghai Lu
Treat ROM resources as optional resources. will try to allocate them together with required ones, if can not assign them, could go with other required resources only, and just skip ROM resources. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 37 - 1

[PATCH v4 47/52] PCI: Don't release fixed resource for realloc

2015-08-20 Thread Yinghai Lu
We should not release bridge resource if there is fixed resources under it, otherwise the children firmware would stop working. Reported-by: Paul Johnson Suggested-by: Bjorn Helgaas Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92351 Signed-off-by: Yinghai Lu Cc: sta...@vger.kernel.org

[PATCH v4 03/52] PCI: Use correct align for optional only resources during sorting

2015-08-20 Thread Yinghai Lu
-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 49 ++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index f816472..aea35b6 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup

[PATCH v4 07/52] PCI: Reorder resources list for required/optional resources

2015-08-20 Thread Yinghai Lu
the sorting back after we restore resource to required only when required+optional fail to allocate for all. So move out the reordering code from the loop to separated function, and call it two times accordingly. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 62

[PATCH v4 06/52] PCI: Don't add too much optional size for hotplug bridge MMIO

2015-08-20 Thread Yinghai Lu
, and total size should be 2M. This patch change to comparing required+optional with min_sum_size to get smaller optional size. Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/pci/setup

[PATCH v4 45/52] PCI: Get new realloc size for bridge for last try

2015-08-20 Thread Yinghai Lu
urce. Clear the old resource size for last try or third and later try. Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu --- drivers/pci/setup-bus.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drive

<    2   3   4   5   6   7   8   9   10   11   >