Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-18 Thread Valentine Barshak
Vitaly Bordug wrote: Hello Valentine, On Tue, 18 Sep 2007 16:03:50 +0400 Valentine Barshak wrote: Vitaly Bordug wrote: + + hose-io_base_phys = cpu_phys_addr - pci_addr; This is not gonna work on 32-bit platform (unless pci_addr == 0). Should be hose-io_base_phys =

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-18 Thread Benjamin Herrenschmidt
On Wed, 2007-09-12 at 02:49 +0400, Vitaly Bordug wrote: We are having 2 different instances of pci_process_bridge_OF_ranges(), which makes describing 64-bit physical addresses in non PPC64 case impossible. This approach inherits pci space parsing, but has a new way to behave equally good in

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-18 Thread Benjamin Herrenschmidt
Oh and... PowerMac -needs- the coalescing of ranges. Apple tends to split their ranges in bits in the device-tree and ends up with more than you have struct resource in the pci_bus. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-18 Thread Benjamin Herrenschmidt
On Tue, 2007-09-18 at 16:03 +0400, Valentine Barshak wrote: Do we need to ioremap on 64-bit? I think 64-bit uses different approach in handling io space. Yup, we changed that recently and I haven't yet modified ppc32 to catch up (and may never do so, they have different constraints). Ben.

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-18 Thread Vitaly Bordug
Hello Valentine, On Tue, 18 Sep 2007 18:38:56 +0400 Valentine Barshak wrote: Well, thanks for the invitation :) I've been trying to work on the pci support here too. But I've used a bit different approach. I tried to add 64-bit phys addr support to pci_32.c. The patch seems to work on

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-12 Thread Arnd Bergmann
On Wednesday 12 September 2007, Vitaly Bordug wrote: Well, it's more a rewrite than a move, based on 64-bit implementation. ok. Could you perhaps split the patch into two separate changesets, one that makes both functions identical in place, and one that merges them to live in a common

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-12 Thread Vitaly Bordug
On Wed, 12 Sep 2007 10:13:50 +0200 Arnd Bergmann wrote: On Wednesday 12 September 2007, Vitaly Bordug wrote: Well, it's more a rewrite than a move, based on 64-bit implementation. ok. Could you perhaps split the patch into two separate changesets, one that makes both

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-12 Thread Segher Boessenkool
+struct ranges_pci { + unsigned int pci_space; + u64 pci_addr; + phys_addr_t phys_addr; + u64 size; +} __attribute__((packed)); + This structure definition uses unaligned members because of the 'packed' attribute. Is that really what you intended? yes, exactly, because I'm mapping

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-12 Thread David Gibson
On Wed, Sep 12, 2007 at 08:07:06PM +0400, Vitaly Bordug wrote: On Wed, 12 Sep 2007 10:13:50 +0200 Arnd Bergmann wrote: On Wednesday 12 September 2007, Vitaly Bordug wrote: Well, it's more a rewrite than a move, based on 64-bit implementation. ok. Could you perhaps

[PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-11 Thread Vitaly Bordug
We are having 2 different instances of pci_process_bridge_OF_ranges(), which makes describing 64-bit physical addresses in non PPC64 case impossible. This approach inherits pci space parsing, but has a new way to behave equally good in both 32bit and 64bit environments. This approach uses

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-11 Thread Arnd Bergmann
On Wednesday 12 September 2007, Vitaly Bordug wrote: We are having 2 different instances of pci_process_bridge_OF_ranges(), which makes describing 64-bit physical addresses in non PPC64 case impossible. This approach inherits pci space parsing, but has a new way to behave equally good in

Re: [PATCH] [RFC][POWERPC] Merge 32 and 64 bit pci_process_bridge_OF_ranges() instances

2007-09-11 Thread Vitaly Bordug
On Wed, 12 Sep 2007 00:57:17 +0200 Arnd Bergmann wrote: On Wednesday 12 September 2007, Vitaly Bordug wrote: We are having 2 different instances of pci_process_bridge_OF_ranges(), which makes describing 64-bit physical addresses in non PPC64 case impossible. This approach inherits