Need to put aligned with max align before not aligned, to get
smaller alt_size.
For example:
alt align/size: 8M/9M, 4M/8M
before this patch we have 8M/20M.
After this patch we will have 8M/17M.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 80
using size to compare with min_size at first.
That is not right, we should have 0x2000.
We should check size+size1 with min_size for io port,
just add size1 to size and and don't pass extra size1 into
calculate_iosize() directly.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 8 --
: 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 1d90f42..51b877d 100644
--- a/drivers/pci
.
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 060977c..0c85c0a 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup
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
Add new __add_to_list() to to take alt_size, alt_align for alt_size support.
and simplify add_to_list() not to take add/alt input.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 51 ++---
1 file changed, 31 insertions(+), 20 deletions
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
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
Now some BIOS tend to allocate pref MMIO under non-pref MMIO, or allocate
64bit pref MMIO under 4G.
Add pci=assign_pref_bars to clear and allocate resource to pref BARS.
So could reallocate pref mmio64 above 4G and pref under bridges pref BARs.
Signed-off-by: Yinghai Lu
---
arch/x86/include
It will not hold lock, so we could use it in other functions that
hold the resource lock already.
-v2: according to Linus, using "bool lock" as parameter
aka "conditionally take lock" is *wrong*.
Signed-off-by: Yinghai Lu
Acked-by: Linus Torvalds
---
ke
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 010d8d9..14bdbca 100644
--- a/drivers/pci/probe.c
+++ b/d
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
-...@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
+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
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
---
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
://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
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 e9fd0e9..9efa983 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -324,6 +324,23 @@ static void quirk_s
://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
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 insertions(+), 13 deletions(-)
diff --git a/kernel/resource.c
We need to save/restore resources several times for alt_size support,
separate the save_resources()/resources() to save some lines later.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 49 ++---
1 file changed, 30 insertions(+), 19 deletions
Use res instead of dev_res->res.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index a3d48ef..9d7adab 100644
--- a/drivers/pci/se
We check the realloc list, as list must be empty after allocation.
Add missing one acpiphp driver.
Signed-off-by: Yinghai Lu
Cc: "Rafael J. Wysocki"
Cc: Len Brown
Cc: linux-a...@vger.kernel.org
---
drivers/pci/hotplug/acpiphp_glue.c | 1 +
1 file changed, 1 insertion(+)
diff --git
Now res_to_dev_res() does not print out debug message anymore, so
reuse it in reassign_resource_sorted().
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index
On Mon, Aug 17, 2015 at 9:21 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:51PM -0700, Yinghai Lu wrote:
>> Find all suitable empty slots and pick one just fit, so we could save
>> the big slot for needed ones later when we have several pcie switches
>> and some
On Mon, Aug 17, 2015 at 9:14 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:50PM -0700, Yinghai Lu wrote:
>> It will not hold lock, so we could use it in other functions that
>> hold the resource lock already.
>
> What's the benefit of this patch? Does it f
On Mon, Aug 17, 2015 at 9:13 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:46PM -0700, Yinghai Lu wrote:
>> We should check size+size1 with min_size for io port.
>> For example, when hotplug bridge has two children bridges,
>> every child bridge will need 0x1
On Mon, Aug 17, 2015 at 9:11 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:45PM -0700, Yinghai Lu wrote:
>> So we could unify calculate_iosize and calculate_memsize later.
>
> Please make this a complete sentence, not just a continuation of the
> summary line.
>
&g
On Mon, Aug 17, 2015 at 9:09 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:43PM -0700, Yinghai Lu wrote:
>> On booting path, we don't pass realloc at first, and treat all optional just
>> as must, in some case we can smaller size/align with optional than must onl
On Mon, Aug 17, 2015 at 5:03 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:40PM -0700, Yinghai Lu wrote:
>> On system with several pcie switches, BIOS allocate very tight resources
>> to the bridge bar, and it is not aligned to min_align as kernel allocation
>> co
On Mon, Aug 17, 2015 at 4:56 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:38PM -0700, Yinghai Lu wrote:
>> If the bridge does not support hotplug or no child with sriov support
>> we could get out early and don't try must+optional allocation.
>
> You menti
On Mon, Aug 17, 2015 at 4:54 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:31PM -0700, Yinghai Lu wrote:
>> We check the realloc list, as list must be empty after allocation.
>>
>> Separate the realloc list checking to another function.
>>
>> Add c
On Tue, Aug 18, 2015 at 2:36 PM, Yinghai Lu wrote:
> On Mon, Aug 17, 2015 at 4:53 PM, Bjorn Helgaas wrote:
>> On Mon, Jul 27, 2015 at 04:29:27PM -0700, Yinghai Lu wrote:
>>> We don't do sorting in those functions anymore, so change "sort" to "check"
On Mon, Aug 17, 2015 at 4:53 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:27PM -0700, Yinghai Lu wrote:
>> We don't do sorting in those functions anymore, so change "sort" to "check"
>> instead.
>
> What *do* we do in those function
On Mon, Aug 17, 2015 at 3:50 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:19PM -0700, Yinghai Lu wrote:
>> 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 p
On Mon, Aug 17, 2015 at 4:52 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:25PM -0700, Yinghai Lu wrote:
>> After we update size and alignment for must+optional resource, we
>> reorder them with new alignment, but this is only for STARTALIGN.
>>
>> For SIZ
On Mon, Aug 17, 2015 at 4:49 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:22PM -0700, Yinghai Lu wrote:
>> Current code try to get align as small as possible and use that to
>> align final size. But it does not handle resource that size is bigger
>> than align i
On Mon, Aug 17, 2015 at 4:00 PM, Bjorn Helgaas wrote:
> On Mon, Jul 27, 2015 at 04:29:21PM -0700, Yinghai Lu wrote:
>> During sorting before assign, we only put resource with non-zero align
>> in the sorted list, so for optional resources that must size is 0 and only
>> have
On Mon, Aug 17, 2015 at 3:48 PM, Bjorn Helgaas wrote:
> Overall comments:
>
> Thanks for paying attention to your subject lines. They are
> capitalized and punctuated quite consistently.
>
> The one-line subject is a summary. The body of the changelog is not a
> continuation of it. The body sho
buf[]/flush() for initramfs
3. fill()/flush() for initrd.
This bug only affect kernel preboot path that use outbuf[].
Add __decompress and take real out_buf_len for gunzip instead of guessing
wrong buf size.
-v2: fix unused warning on sh/arm/m32r from Fengguang.
Signed-off-by: Yinghai Lu
Fi
buf[]/flush() for initramfs
3. fill()/flush() for initrd.
This bug only affect kernel preboot path that use outbuf[].
Add __decompress and take real out_buf_len for gunzip instead of guessing
wrong buf size.
Signed-off-by: Yinghai Lu
Fixes: 1431574a1c4 (lib/decompressors: fix "no limit
parent bus, and later during sizing and
assigning, check that bus flags and skip those resources.
[bhelgaas: reverse sense of new pci_bus_flags_t value]
[yinghai: only check root bus io port, and use flag on sizing and assigning]
Signed-off-by: Guenter Roeck
Signed-off-by: Yinghai Lu
Cc: Bjorn He
On Thu, Aug 6, 2015 at 9:18 AM, Guenter Roeck wrote:
> On 08/06/2015 08:58 AM, Yinghai Lu wrote:
> Ok, I admit that I am lost. Earlier it seemed that you were concerned about
> this case, where no io window is available or a bus doesn't support io,
> but a non-transparent ch
On Wed, Aug 5, 2015 at 9:50 PM, Guenter Roeck wrote:
> If I understand you correctly, we might need to change the code
> in pci_read_bridge_io() as follows.
>
> From
>
> if (!(child->bus_flags & PCI_BUS_FLAGS_SUPPORTS_IO))
> return;
>
> to something like
>
> if (!(c
On Wed, Aug 5, 2015 at 7:22 PM, Guenter Roeck wrote:
> On 08/05/2015 06:38 PM, Yinghai Lu wrote:
>>
>> On Wed, Aug 5, 2015 at 6:14 PM, Yinghai Lu wrote:
>>>
>>>
>>> It only can avoid warning with bridge, and still have warning on
>>> devices u
On Wed, Aug 5, 2015 at 6:14 PM, Yinghai Lu wrote:
>
> It only can avoid warning with bridge, and still have warning on
> devices under the bridge.
>
> also would have problem on transparent bridges, like
>
> BRIDGE_A B
On Thu, Jul 30, 2015 at 7:15 PM, Guenter Roeck wrote:
> The PCI subsystem always assumes that I/O is supported on PCIe bridges
> and tries to assign an I/O window to each child bus even if that is not
> the case.
>
> This may result in messages such as:
>
> pcieport :02:00.0: res[7]=[io 0x1
: "Lee, Chun-Yi"
Tested-by: "Lee, Chun-Yi"
Reported-by: "Tian, Ye"
Tested-by: "Tian, Ye"
Cc: "Lee, Chun-Yi"
Cc: Chen Yu
Signed-off-by: Yinghai Lu
Cc: Richard L Maliszewski
Cc: Gang Wei
Cc: Shane Wang
Cc: tboot-de...@lists.sourceforge.net
Cc:
On Mon, Jul 27, 2015 at 5:52 PM, Baoquan He wrote:
> On 07/22/15 at 04:47pm, Yinghai Lu wrote:
>
> Sorry for late reply. This problem is reported by customers. They usulay
> don't like to make these things public. While for those systems with
> good hard iommu support, i
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
/min_size: 0010/02b0
So align will be 1M instead of 4M.
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
Now res_to_dev_res() does not print out debug message anymore, so
reuse it in reassign_resource_sorted().
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index
resource on last try: only with bridge resources
- remove/rescan path checking with old_size.
Yinghai Lu (51):
PCI: Cleanup res_to_dev_res() printout for addon resources
PCI: Reuse res_to_dev_res in reassign_resources_sorted
PCI: Use correct align for optional only resources during sorting
We don't do sorting in those functions anymore, so change "sort" to "check"
instead.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus
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
Use res instead of dev_res->res.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 6dff258..06664db 100644
--- a/drivers/pci/se
Move comment from caller to callee, as we will have one new caller
for alt_size support later.
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/setup
Need to put aligned with max align before not aligned.
For example:
alt align/size: 8M/9M, 4M/8M
before this patch we have 8M/20M.
After this patch we will have 8M/17M.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 80 +++--
1 file changed
ned-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 8999ead..2679ccc 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1146,9 +1146,9
Use new generic version skip_isa_ioresource_align() instead.
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
index d4610a8..f8f89cd 100644
--- a/drivers
So we could unify calculate_iosize and calculate_memsize later.
when one bridge have several children devices, and every devices
have several io port resources and resource size < 0x400.
We need to check size, and add extra size to make sure bit8/9
to be zero.
Signed-off-by: Yinghai
Same as patch for mmio (PCI: Don't add too much optional size for hotplug
bridge mmio), and this one is addressing io port.
It will compare must+optional with min_sum_size to get smaller
optional size.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 26
It will not hold lock, so we could use it in other functions that
hold the resource lock already.
-v2: according to Linus, using "bool lock" as parameter
aka "conditionally take lock" is *wrong*.
Signed-off-by: Yinghai Lu
Acked-by: Linus Torvalds
---
ke
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 78b0c36..c6c9d56 100644
--- a/drivers/pci/setup-bus.c
because we are using size to compare with min_size. That is
not right, we should use 0x2000 instead.
After this change, calculate_memsize and calculate_iosize
is the same.
Change them to calculate_size.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 27 ++-
1
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
://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
.
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 83e3201..63a5d4cf 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
size should be 2M.
This patch change to comparing must+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-bus.c b/drivers
the sorting back after we restore
resource to must only when must+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
at is intentional
for us to get new resources for rescan.
We do have example to use rescan to make device get resource
allocated.
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
Find all suitable empty slots and pick one just fit, so we could save
the big slot for needed ones later when we have several pcie switches
and some bridges get assigned bios and we need to assign others in kernel.
Signed-off-by: Yinghai Lu
---
kernel/resource.c | 81
We will need to share that saved list for alt_size support.
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/drivers/pci/setup-bus.c
index 64ef516..1c0b4c5 100644
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.
Signed-off-by: Yinghai Lu
Cc: "Rafael J. Wysocki"
Cc: Len Brown
Cc: linux-a...@vger.kernel.org
---
drivers/p
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 file c
to take alt_size, alt_align.
preparation patch for alt_size support.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 51 ++---
1 file changed, 31 insertions(+), 20 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
Skip allocated resource in the list, as pci_assign_resource()
only can handle not assigned resource. And we could have
assigned resource already in the list before alt_size trying.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
If the bridge does not support hotplug or no child with sriov support
we could get out early and don't try must+optional allocation.
Also in the loop that update res with optional add info, skip resource
that add_size is 0.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c
ll.
The patch restore to old logic:
when hostbridge does not have has_mem64 so 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 ++---
.org/r/cae9fiqu1gjy1lyrxs+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
Cc: #3.19
---
drivers/pci/pci.c | 3 ++-
drivers/pci/pci.h | 2 ++
dri
So could reallocate pref mmio64 above 4G later.
Signed-off-by: Yinghai Lu
---
arch/x86/include/asm/pci_x86.h | 1 +
arch/x86/pci/common.c | 3 +++
arch/x86/pci/i386.c| 56 ++
3 files changed, 39 insertions(+), 21 deletions(-)
diff
t and optonal separatedly) will be kept
for next try.
2. last try:
a: try to allocate must+optional to see if all get allocated.
b: try to allocate must then expand to optional.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 19 ++-
1 file changed, 14 insertions(
-xtensa.org
Cc: io...@lists.linux-foundation.org
Cc: linux...@vger.kernel.org
Signed-off-by: Yinghai Lu
---
arch/alpha/kernel/pci.c | 2 +-
arch/ia64/pci/pci.c | 4 ++--
arch/microblaze/pci/pci-common.c | 15 ---
arch/mn10300/unit
: 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 1804d44..dec1c18 100644
--- a/drivers/pci
__assign_resources_sorted() is getting too big if we put alt_size support
into it. Split must_add assigning code out to another function.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 47 +++
1 file changed, 27 insertions(+), 20 deletions
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
make flags take IORESOURCE_UNSET | IORESOURCE_DISABLED instead.
Signed-off-by: Yinghai Lu
---
drivers/pci/bus.c | 2 +-
drivers/pci/setup-bus.c | 45 +++--
drivers/pci/setup-res.c | 3 ++-
3 files changed, 26 insertions(+), 24 deletions(-)
diff
ear the old resource size for last try or third and later try.
-v3: change reset_bridge_resource_size to static according to Fengguang.
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 ch
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
will reuse it in alt_size support.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 49 ++---
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1622ad2..2e3d00b 100644
--- a
===END
so must align/size: 0x40/0x240, and
new must+optional align/size: 0x10/0x2b0, and it is better
than old must+optional align/size: 0x80/0x300
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431
Reported-by: TJ
Signed-off-by: Yinghai Lu
alt_size 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
e 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 010d8d9..14bdbca 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2051,6 +2051,15
://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
...@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 ++--
drivers/pci/setup
arc/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
Signed-off-by: Yinghai Lu
Cc: #3.19
---
arch/sparc/kernel/pci.c| 7 +
://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
: Yinghai Lu
---
drivers/pci/setup-bus.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index aeed716..3a94617 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1242,8 +1242,9 @@ static void
/size: 4M/20M.
So at last, we use 8M/17M as parent bridge alt_align/alt_size.
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 | 56 +++--
1
://bugzilla.kernel.org/show_bug.cgi?id=81431
Reported-by: TJ
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 50 ++---
1 file changed, 43 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 247d8fe
701 - 800 of 4418 matches
Mail list logo