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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 30 --
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/d
For alt_size support, we will add more entries to realloc list.
Add new __add_to_list() to take alt_size, alt_align.
And simplify add_to_list() not to take add/alt input.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/setup-bus.
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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 27 +++
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/drivers/pci
, 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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff
0x10-0x2f, according to lspci.
So those BAR do not work as regular BAR, just clean flags, and ignore them all
the way include claim and sizing and alloc etc.
Reported-by: Meelis Roos <mr...@linux.ee>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/quirks.c | 15 +++
://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: Yijing Wang <
-by: TJ <li...@iam.tj>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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 6f6cf25..31
://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 +++-
1 fi
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
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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff
(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 <ying...@kernel.org>
---
drivers/pci/setup-bus.
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 <ying...@kernel.org>
---
drivers/pci/setup-bus.
ed-off-by: Yinghai Lu <ying...@kernel.org>
drivers/pci/setup-bus.c | 82 +---
1 file changed, 51 insertions(+), 31 deletions(-)
---
drivers/pci/setup-bus.c | 82 ++---
1 file changed, 51 insertions(+),
Reported-by: Yijing Wang <wangyij...@huawei.com>
Tested-by: Yijing Wang <wangyij...@huawei.com>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 203 +---
1 file changed, 191 insertions(+), 12 deletions(-)
di
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 <ying...@kernel.org>
---
d
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 according to Rafael.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
Cc: "Rafael J.
-by: Meelis Roos <mr...@linux.ee>
Cc: Meelis Roos <mr...@linux.ee>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
Tested-by: Khalid Aziz <khalid.a...@oracle.com>
---
drivers/pci/quirks.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/pci/quirks.c b/dr
es(),
even non-pref mmio is missing, or out of ordering in firmware reporting.
So 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>
---
arch/sparc/kernel/pci.c | 8 +++-
1 file chang
ces.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431
Reported-by: TJ <li...@iam.tj>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 195 ++--
1 file changed, 157 insertions(+), 38 deletions(-)
diff --gi
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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff
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 <ying...@kernel.
: 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 <ying...@kernel.org>
---
kernel/resource.c | 81 ++--
...@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 <y
add_align as must align.
After the patch, rescan works properly.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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 9c9d9de..c8b3ea6
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 +++-
drivers/
: change to %#llx according to Bjorn.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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 7f7f46c..598254a
range like 0xb000 to
0b:04.0 and 0f:00.0
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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/ar
< 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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 39 +++
1 file changed, 27 i
supports I/O, and later during sizing and
assigning, check that flags and skip those resources.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/probe.c | 6 ++
drivers/pci/setup-bus.c | 9 +
include/linux/pci.h | 1 +
3 files changed, 16 insertions(+)
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 <ying...@kernel.org>
---
drivers/pci
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: Yinghai Lu
or not.
Convert old pci_find_parent_resource() to pci_find_bus_resource(),
and reuse it in pci_find_root_bus_resource().
So we avoid changing pcibios_bus_to_resource().
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/pci.c | 36 +---
include
in expand path.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 194d5da..e9e67bc 100644
--- a/drive
.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/quirks.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 3618c06..d45455f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -323,6 +323,23 @@
,
and call it two times accordingly.
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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 5
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
__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 <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 47 +++
1 file chang
flags handling after pci_find_root_bus_resource().
- add patch for quirk that ignore BAR for M1533 PCI-ISA bridge.
v9: rebased for v4.5
Yinghai Lu (60):
PCI: Add pci_find_root_bus_resource()
sparc/PCI: Use correct bus address to resource offset
sparc/PCI: Reserve legacy mmio after PCI mmio
Same as sparc version.
Make resource with consistent sequence
like other arch or directly from pci_read_bridge_bases(),
even non-pref mmio is missing, or out of ordering in firmware reporting.
So hold i = 1 for non pref mmio, and i = 2 for pref mmio.
Signed-off-by: Yinghai Lu <y
.
Reported-by: Andreas Noever <andreas.noe...@gmail.com>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
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 c2e3999..7f
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 <li...@iam.tj>
Signed-off-by: Yinghai Lu <ying...@kernel.org>
---
drivers/pci/setup-bus.c | 23 +--
1 file changed, 21 insertion
that 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 <ying...@kernel.org>
---
drivers/pci/
On Tue, Dec 1, 2015 at 1:23 PM, Khalid Aziz wrote:
> The device does work with this patch.
Good.
> Doesn't this warning mean BAR6
> resources could not be reserved which means the device driver may not be
> able to get the BAR6 resource at some point if another device grabs the
> unreserved
On Tue, Dec 1, 2015 at 1:23 PM, Khalid Aziz wrote:
> The device does work with this patch.
Good.
> Doesn't this warning mean BAR6
> resources could not be reserved which means the device driver may not be
> able to get the BAR6 resource at some point if another device
On Mon, Nov 23, 2015 at 1:31 PM, Khalid Aziz wrote:
>> Looks like only the device BAR6 is not assigned form OF?
>
> Any progress on this? Do you need any more information from me?
Should be one warning about this device in that system.
We don't need to do anything about it if the device is
On Mon, Nov 23, 2015 at 1:31 PM, Khalid Aziz wrote:
>> Looks like only the device BAR6 is not assigned form OF?
>
> Any progress on this? Do you need any more information from me?
Should be one warning about this device in that system.
We don't need to do anything about
On Wed, Nov 11, 2015 at 5:09 PM, Martin K. Petersen
wrote:
>> "Sreekanth" == Sreekanth Reddy writes:
>
> The patches in the single-module portion of the series did not compile
> individually and I gave up untangling them. They were fundamentally too
> intertwined and I squashed them into one
On Wed, Nov 11, 2015 at 5:09 PM, Martin K. Petersen
wrote:
>> "Sreekanth" == Sreekanth Reddy writes:
>
> The patches in the single-module portion of the series did not compile
> individually and I gave up untangling them. They were
On Mon, Nov 9, 2015 at 1:09 AM, Zhenzhong Duan
wrote:
> I know that, what confused me is uek2(2.6.39-400.249.4.el6uek.x86_64) works
> with maxcpus=,
> but uek3(3.8.13-44.1.1.el6uek.x86_64) not when I don't comment out the
> script.
> I have ever suspected uek2 send CPU ADD event for only 4 cpus.
On Mon, Nov 9, 2015 at 1:09 AM, Zhenzhong Duan
wrote:
> I know that, what confused me is uek2(2.6.39-400.249.4.el6uek.x86_64) works
> with maxcpus=,
> but uek3(3.8.13-44.1.1.el6uek.x86_64) not when I don't comment out the
> script.
> I have ever suspected uek2 send CPU
On Sun, Nov 8, 2015 at 9:47 PM, Zhenzhong Duan
wrote:
> Tried nr_cpus=4, works.
>
nr_cpus and maxcpus are different.
maxcpus=4 means kernel will only bring up 4 cpus, but other cpus still
can be brought up online.
if there are more cpu are there according acpi MADT.
nr_cpus=4 that means 4 is
On Sun, Nov 8, 2015 at 9:47 PM, Zhenzhong Duan
wrote:
> Tried nr_cpus=4, works.
>
nr_cpus and maxcpus are different.
maxcpus=4 means kernel will only bring up 4 cpus, but other cpus still
can be brought up online.
if there are more cpu are there according acpi MADT.
On Mon, Sep 14, 2015 at 7:46 AM, Stuart Hayes wrote:
>
> Booting with 'disable_mtrr_cleanup' works, but the system I am working with
> isn't actually failing--it just gets ugly error messages. And the BIOS on the
> system I am working with had set up the MTRRs correctly.
Please post boot log
On Mon, Sep 14, 2015 at 7:46 AM, Stuart Hayes wrote:
>
> Booting with 'disable_mtrr_cleanup' works, but the system I am working with
> isn't actually failing--it just gets ugly error messages. And the BIOS on the
> system I am working with had set up the MTRRs
On Fri, Oct 30, 2015 at 2:47 PM, Khalid Aziz wrote:
>
> I applied patches 1-8 and 11-16 to 4.3.0-rc7 to test on sparc platforms. I
> am seeing a "can't claim BAR" message on a T4:
>
> pci :04:00.0: can't claim BAR 6 [mem 0x840-0x840]:
> address conflict with :04:00.0 [mem
On Fri, Oct 30, 2015 at 2:47 PM, Khalid Aziz wrote:
>
> I applied patches 1-8 and 11-16 to 4.3.0-rc7 to test on sparc platforms. I
> am seeing a "can't claim BAR" message on a T4:
>
> pci :04:00.0: can't claim BAR 6 [mem 0x840-0x840]:
> address conflict
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
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
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 | 12
m9...@mail.gmail.com
Reported-by: David Ahern
Tested-by: David Ahern
Signed-off-by: Yinghai Lu
Tested-by: Khalid Aziz
arch/sparc/kernel/pci.c|7 ++-
arch/sparc/kernel/pci_common.c | 17 +++--
arch/sparc/kernel/pci_impl.h |1 +
3 files changed, 22 insert
: put back mem64_offset, as we found T4 has mem_offset != mem64_offset
check overlapping between mem64_space and mem_space.
-v5: use pcibios_bus_to_region() requested by Bjorn.
use pci_find_root_bus_resource().
Signed-off-by: Yinghai Lu
Tested-by: Khalid Aziz
---
arch/sparc/kernel/pci.c
0x10-0x2f, according to lspci.
So those BAR do not work as regular BAR, just clean flags, and ignore them all
the way include claim and sizing and alloc etc.
Reported-by: Meelis Roos
Signed-off-by: Yinghai Lu
---
drivers/pci/quirks.c | 15 +++
1 file changed, 15 insertions(+)
diff
es(),
even non-pref mmio is missing, or out of ordering in firmware reporting.
So hold i = 1 for non pref mmio, and i = 2 for pref mmio.
Signed-off-by: Yinghai Lu
Tested-by: Khalid Aziz
---
arch/sparc/kernel/pci.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/sp
pcibios_bus_to_resource()
and pci_find_root_bus_resource()
Signed-off-by: Yinghai Lu
Tested-by: Khalid Aziz
---
arch/sparc/kernel/pci.c| 1 +
arch/sparc/kernel/pci_common.c | 59 ++
arch/sparc/kernel/pci_impl.h | 1 +
3 files changed, 33 insertions(+), 28
://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 384574c
://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 deletions(-)
diff --git a/
(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 file
-by: Meelis Roos
Cc: Meelis Roos
Signed-off-by: Yinghai Lu
Tested-by: Khalid Aziz
---
drivers/pci/quirks.c | 18 --
1 file changed, 18 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b03373f..55bb661 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
flags handling after pci_find_root_bus_resource().
- add patch for quirk that ignore BAR for M1533 PCI-ISA bridge.
Yinghai Lu (61):
sparc/PCI: Add mem64 resource parsing for root bus
PCI: Add pci_find_root_bus_resource()
sparc/PCI: Use correct bus address to resource offset
sparc/PCI
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
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
.
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 af75580..1d85f37 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -323,6 +323,23 @@ static void quirk_s3_64M
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
,
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 5e1cc7e..5ea06c6 100644
-by: 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 e075495..ab67cdb 100644
--- a/drivers/pci/setup-bus.c
+++ b
, 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
.
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 278cb6d..10270e4 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup
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
in expand path.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 74ad4ce..d2d38bc 100644
--- a/drivers/pci/setup-bus.c
+++ b
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
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
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 according to Rafael.
Signed-off-by: Yinghai Lu
Cc: "Rafael J. Wysocki"
Cc: Len Brown
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
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 ede619c..dea0344
that 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
: 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 10270e4..f905c81 100644
--- a/drivers/pci/setup
There are couples of dev_res->res reference, to make code more readable
use res instead of dev_res->res directly.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/pci/setup
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: 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
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
: 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
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 file
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
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
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 7e7663a..00a39be 100644
--- a/drivers/pci
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
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
For alt_size support, we will add more entries to realloc list.
Add new __add_to_list() to take alt_size, alt_align.
And simplify add_to_list() not to take add/alt input.
Signed-off-by: Yinghai Lu
---
drivers/pci/setup-bus.c | 51 ++---
1 file
-by: 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 6ad0f05..39d2c50 100644
--- a/drivers/pci
-...@lists.ozlabs.org
Cc: linux-a...@vger.kernel.org
Signed-off-by: Yinghai Lu
Reviewed-by: Thomas Gleixner
Acked-by: Michael Ellerman
---
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
701 - 800 of 8821 matches
Mail list logo