Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-19 Thread Gavin Shan
On Wed, Jul 18, 2012 at 10:59:52AM -0600, Bjorn Helgaas wrote: On Tue, Jul 17, 2012 at 10:25 PM, Ram Pai linux...@us.ibm.com wrote: On Tue, Jul 17, 2012 at 11:14:51AM -0600, Bjorn Helgaas wrote: On Tue, Jul 17, 2012 at 4:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue,

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-18 Thread Bjorn Helgaas
On Tue, Jul 17, 2012 at 10:25 PM, Ram Pai linux...@us.ibm.com wrote: On Tue, Jul 17, 2012 at 11:14:51AM -0600, Bjorn Helgaas wrote: On Tue, Jul 17, 2012 at 4:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2012-07-17 at 18:03 +0800, Ram Pai wrote: Lets say we

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Benjamin Herrenschmidt
On Tue, 2012-07-17 at 13:57 +0800, Ram Pai wrote: Hmm.. this code is not about determining what kind of segment the platform is returning. This code is about using the right alignment constraints for the type of segment from which resource will be allocated. right? b_res is the resource

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Ram Pai
On Tue, Jul 17, 2012 at 07:16:59PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-07-17 at 13:57 +0800, Ram Pai wrote: Hmm.. this code is not about determining what kind of segment the platform is returning. This code is about using the right alignment constraints for the type of segment

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Benjamin Herrenschmidt
On Tue, 2012-07-17 at 18:03 +0800, Ram Pai wrote: Lets say we passed that 'type' flag to size the minimum alignment constraints for that b_res. And window_alignment(bus, type) of your platform used that 'type' information to determine whether to use the

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Bjorn Helgaas
On Tue, Jul 17, 2012 at 4:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2012-07-17 at 18:03 +0800, Ram Pai wrote: Lets say we passed that 'type' flag to size the minimum alignment constraints for that b_res. And window_alignment(bus, type) of

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Ram Pai
On Tue, Jul 17, 2012 at 11:14:51AM -0600, Bjorn Helgaas wrote: On Tue, Jul 17, 2012 at 4:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2012-07-17 at 18:03 +0800, Ram Pai wrote: Lets say we passed that 'type' flag to size the minimum alignment

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Ram Pai
On Tue, Jul 17, 2012 at 08:38:18PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-07-17 at 18:03 +0800, Ram Pai wrote: Lets say we passed that 'type' flag to size the minimum alignment constraints for that b_res. And window_alignment(bus, type) of your platform

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-17 Thread Ram Pai
On Wed, Jul 18, 2012 at 09:07:46AM +0800, Gavin Shan wrote: 4. Either b_res-flags mask or type to be used for window_alignment(), I don't think it's big deal because b_res-flags mask == type for current implementation. However, I'm not sure I still need change it to type?

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-16 Thread Bjorn Helgaas
On Mon, Jul 16, 2012 at 11:30:28PM +0800, Gavin Shan wrote: The patch changes function pbus_size_io() and pbus_size_mem() to do resource (I/O, memory and prefetchable memory) reassignment based on the minimal alignments for the p2p bridge, which was retrieved by function

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-16 Thread Ram Pai
On Tue, Jul 17, 2012 at 10:23:17AM +0800, Gavin Shan wrote: The patch changes function pbus_size_io() and pbus_size_mem() to do resource (I/O, memory and prefetchable memory) reassignment based on the minimal alignments for the p2p bridge, which was retrieved by function window_alignment().

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-16 Thread Ram Pai
On Tue, Jul 17, 2012 at 01:05:47PM +0800, Ram Pai wrote: On Tue, Jul 17, 2012 at 10:23:17AM +0800, Gavin Shan wrote: The patch changes function pbus_size_io() and pbus_size_mem() to do resource (I/O, memory and prefetchable memory) reassignment based on the minimal alignments for the p2p

Re: [PATCH 05/15] pci: resource assignment based on p2p alignment

2012-07-16 Thread Ram Pai
On Tue, Jul 17, 2012 at 01:36:49PM +0800, Gavin Shan wrote: On Tue, Jul 17, 2012 at 01:23:33PM +0800, Ram Pai wrote: On Tue, Jul 17, 2012 at 01:05:47PM +0800, Ram Pai wrote: On Tue, Jul 17, 2012 at 10:23:17AM +0800, Gavin Shan wrote: The patch changes function pbus_size_io() and