Re: use generic DMA mapping code in powerpc V4

2019-12-19 Thread Christian Zigotzky
Hi All, We still have some issues with PCI cards in our FSL P5020 and P5040 systems since the DMA mapping updates. [1, 2] We have to limit the RAM to 3500MB for some problematic PCI cards. (kernel boot argument 'mem=3500M') The problematic DMA mapping code was added with the PowerPC

Re: use generic DMA mapping code in powerpc V4

2019-02-12 Thread Christoph Hellwig
Great! I owe you a night worth of beers at a conference or if you come anywhere near Innsbruck!

Re: use generic DMA mapping code in powerpc V4

2019-02-12 Thread Christian Zigotzky
On 12 February 2019 at 8:31PM, Christian Zigotzky wrote: On 12 February 2019 at 4:25PM, Christoph Hellwig wrote: On Tue, Feb 12, 2019 at 01:42:56PM +0100, Christian Zigotzky wrote: On 11 February 2019 at 08:38AM, Christoph Hellwig wrote: On Sun, Feb 10, 2019 at 01:00:20PM +0100, Christian

Re: use generic DMA mapping code in powerpc V4

2019-02-12 Thread Christian Zigotzky
On 12 February 2019 at 4:25PM, Christoph Hellwig wrote: On Tue, Feb 12, 2019 at 01:42:56PM +0100, Christian Zigotzky wrote: On 11 February 2019 at 08:38AM, Christoph Hellwig wrote: On Sun, Feb 10, 2019 at 01:00:20PM +0100, Christian Zigotzky wrote: I tested the whole series today. The kernels

Re: use generic DMA mapping code in powerpc V4

2019-02-12 Thread Christoph Hellwig
On Tue, Feb 12, 2019 at 01:42:56PM +0100, Christian Zigotzky wrote: > On 11 February 2019 at 08:38AM, Christoph Hellwig wrote: >> On Sun, Feb 10, 2019 at 01:00:20PM +0100, Christian Zigotzky wrote: >>> I tested the whole series today. The kernels boot and the P.A. Semi >>> Ethernet works! :-)

Re: use generic DMA mapping code in powerpc V4

2019-02-12 Thread Christian Zigotzky
On 11 February 2019 at 08:38AM, Christoph Hellwig wrote: On Sun, Feb 10, 2019 at 01:00:20PM +0100, Christian Zigotzky wrote: I tested the whole series today. The kernels boot and the P.A. Semi Ethernet works! :-) Thanks a lot! I also tested it in a virtual e5500 QEMU machine today.

Re: use generic DMA mapping code in powerpc V4

2019-02-10 Thread Christoph Hellwig
On Sat, Feb 09, 2019 at 09:10:58PM +, Darren Stevens wrote: > Hello Christoph > > On 08/02/2019, Christoph Hellwig wrote: > > On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: > >> Hi Christoph, > >> > >> Your new patch fixes the problems with the P.A. Semi Ethernet! :-) > >

Re: use generic DMA mapping code in powerpc V4

2019-02-10 Thread Christoph Hellwig
On Sun, Feb 10, 2019 at 01:00:20PM +0100, Christian Zigotzky wrote: > I tested the whole series today. The kernels boot and the P.A. Semi > Ethernet works! :-) Thanks a lot! > > I also tested it in a virtual e5500 QEMU machine today. Unfortunately the > kernel crashes. This looks like a patch I

Re: use generic DMA mapping code in powerpc V4

2019-02-10 Thread Christian Zigotzky
Hi Christoph, Mario successfully tested a kernel from your Git [1] on his T2080rdb today. Link to the log: https://gitlab.com/oshw-powerpc-notebook/T2080customizations/blob/master/kernel/dma_fix/kernel_dma_fix_log.txt He wrote: Please, note that all of the above kernel runs just fine with the

Re: use generic DMA mapping code in powerpc V4

2019-02-10 Thread Christian Zigotzky
Hi Christoph, On 08 February 2019 at 10:18AM, Christoph Hellwig wrote: On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: Hi Christoph, Your new patch fixes the problems with the P.A. Semi Ethernet! :-) Thanks a lot once again for testing! Now can you test with this patch

Re: use generic DMA mapping code in powerpc V4

2019-02-09 Thread Darren Stevens
Hello Christoph On 08/02/2019, Christoph Hellwig wrote: > On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> Your new patch fixes the problems with the P.A. Semi Ethernet! :-) > > Thanks a lot once again for testing! > > Now can you test with this patch and

Re: use generic DMA mapping code in powerpc V4

2019-02-09 Thread Darren Stevens
Hello Christoph On 08/02/2019, Christoph Hellwig wrote: > On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> Your new patch fixes the problems with the P.A. Semi Ethernet! :-) > > Thanks a lot once again for testing! > > Now can you test with this patch and

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christian Zigotzky
OK, I will test it. — Christian Sent from my iPhone > On 8. Feb 2019, at 10:18, Christoph Hellwig wrote: > >> On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> Your new patch fixes the problems with the P.A. Semi Ethernet! :-) > > Thanks a lot once

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christoph Hellwig
On Fri, Feb 08, 2019 at 10:01:46AM +0100, Christian Zigotzky wrote: > Hi Christoph, > > Your new patch fixes the problems with the P.A. Semi Ethernet! :-) Thanks a lot once again for testing! Now can you test with this patch and the whole series? I've updated the powerpc-dma.6 branch to include

Re: use generic DMA mapping code in powerpc V4

2019-02-08 Thread Christian Zigotzky
Hi Christoph, Your new patch fixes the problems with the P.A. Semi Ethernet! :-) Thanks, Christian On 07 February 2019 at 05:34AM, Christian Zigotzky wrote: Hi Christoph, I also didn’t notice the 32-bit DMA mask in your patch. I have to read your patches and descriptions carefully in the

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christian Zigotzky
Hi Christoph, I also didn’t notice the 32-bit DMA mask in your patch. I have to read your patches and descriptions carefully in the future. I will test your new patch at the weekend. Thanks, Christian Sent from my iPhone > On 6. Feb 2019, at 16:16, Christoph Hellwig wrote: > >> On Wed, Feb

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 04:15:05PM +0100, Christoph Hellwig wrote: > The last good one was 29e7e2287e196f48fe5d2a6e017617723ea979bf > ("dma-direct: we might need GFP_DMA for 32-bit dma masks"), if I > remember correctly. powerpc/dma: use the dma_direct mapping routines > was the one that you said

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christoph Hellwig
On Wed, Feb 06, 2019 at 02:45:34PM +0100, Christian Zigotzky wrote: > I patched the source code from the Git 'powerpc-dma.6' with your patch > today. Unfortunately the P.A. Semi Ethernet doesn't work with the patched > Git kernel. > > After that I tried it with the patch applied over the working

Re: use generic DMA mapping code in powerpc V4

2019-02-06 Thread Christian Zigotzky
On 04 February 2019 at 01:38PM, Christoph Hellwig wrote: It seems like the pasemi driver fails to set a DMA mask, but seems otherwise 64-bit DMA capable. The old PPC code didn't verify the dma mask during the map operations, but the x86-derived generic code does. This patch just sets the DMA

Re: use generic DMA mapping code in powerpc V4

2019-02-04 Thread Christoph Hellwig
On Mon, Feb 04, 2019 at 01:13:54PM +0100, Christian Zigotzky wrote: >>> Results: The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet >>> doesn't work. >> Are there any interesting messages in the boot log? Can you send me >> the dmesg? >> > Here you are:

Re: use generic DMA mapping code in powerpc V4

2019-02-04 Thread Christian Zigotzky
On 04 February 2019 at 08:56AM, Christoph Hellwig wrote: On Sun, Feb 03, 2019 at 05:49:02PM +0100, Christian Zigotzky wrote: OK, next step: b50f42f0fe12965ead395c76bcb6a14f00cdf65b (powerpc/dma: use the dma_direct mapping routines) git clone git://git.infradead.org/users/hch/misc.git -b

Re: use generic DMA mapping code in powerpc V4

2019-02-03 Thread Christoph Hellwig
On Sun, Feb 03, 2019 at 05:49:02PM +0100, Christian Zigotzky wrote: > OK, next step: b50f42f0fe12965ead395c76bcb6a14f00cdf65b (powerpc/dma: use > the dma_direct mapping routines) > > git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a > > git checkout

Re: use generic DMA mapping code in powerpc V4

2019-02-03 Thread Christian Zigotzky
OK, next step: b50f42f0fe12965ead395c76bcb6a14f00cdf65b (powerpc/dma: use the dma_direct mapping routines) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout b50f42f0fe12965ead395c76bcb6a14f00cdf65b Results: The X1000 and X5000 boot but unfortunately the P.A.

Re: use generic DMA mapping code in powerpc V4

2019-02-01 Thread Christian Zigotzky
Hi Christoph, I will try it at the weekend. Thanks, Christian Sent from my iPhone > On 1. Feb 2019, at 09:04, Christoph Hellwig wrote: > >> On Thu, Jan 31, 2019 at 01:48:26PM +0100, Christian Zigotzky wrote: >> Hi Christoph, >> >> I compiled kernels for the X5000 and X1000 from your branch

Re: use generic DMA mapping code in powerpc V4

2019-02-01 Thread Christoph Hellwig
On Thu, Jan 31, 2019 at 01:48:26PM +0100, Christian Zigotzky wrote: > Hi Christoph, > > I compiled kernels for the X5000 and X1000 from your branch 'powerpc-dma.6' > today. > > Gitweb: > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.6 > > git clone

Re: use generic DMA mapping code in powerpc V4

2019-01-31 Thread Christian Zigotzky
Hi Christoph, I compiled kernels for the X5000 and X1000 from your branch 'powerpc-dma.6' today. Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.6 git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a The X1000 and X5000 boot but

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christian Zigotzky
Hi Christoph, Thanks a lot for the updates. I will test the full branch tomorrow. Cheers, Christian Sent from my iPhone > On 29. Jan 2019, at 17:34, Christoph Hellwig wrote: > >> On Tue, Jan 29, 2019 at 05:14:11PM +0100, Christoph Hellwig wrote: >>> On Tue, Jan 29, 2019 at 04:03:32PM +0100,

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 05:14:11PM +0100, Christoph Hellwig wrote: > On Tue, Jan 29, 2019 at 04:03:32PM +0100, Christian Zigotzky wrote: > > Hi Christoph, > > > > I compiled kernels for the X5000 and X1000 from your new branch > > 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 04:03:32PM +0100, Christian Zigotzky wrote: > Hi Christoph, > > I compiled kernels for the X5000 and X1000 from your new branch > 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi Ethernet > works! Thanks for testing! I'll prepare a new series that adds

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christian Zigotzky
Hi Christoph, I compiled kernels for the X5000 and X1000 from your new branch 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi Ethernet works! Cheers, Christian On 28 January 2019 at 5:52PM, Christian Zigotzky wrote: Thanks a lot! I will test it tomorrow. — Christian

Re: use generic DMA mapping code in powerpc V4

2019-01-28 Thread Christian Zigotzky
Thanks a lot! I will test it tomorrow. — Christian Sent from my iPhone > On 28. Jan 2019, at 17:22, Christoph Hellwig wrote: > >> On Mon, Jan 28, 2019 at 08:04:22AM +0100, Christoph Hellwig wrote: >>> On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: >>> Christoph, >>> >>>

Re: use generic DMA mapping code in powerpc V4

2019-01-28 Thread Christoph Hellwig
On Mon, Jan 28, 2019 at 08:04:22AM +0100, Christoph Hellwig wrote: > On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: > > Christoph, > > > > What shall I do next? > > I'll need to figure out what went wrong with the new zone selection > on powerpc and give you another branch to

Re: use generic DMA mapping code in powerpc V4

2019-01-27 Thread Christoph Hellwig
On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: > Christoph, > > What shall I do next? I'll need to figure out what went wrong with the new zone selection on powerpc and give you another branch to test.

Re: use generic DMA mapping code in powerpc V4

2019-01-27 Thread Christian Zigotzky
Christoph, What shall I do next? Cheers, Christian On 25 January 2019 at 2:37PM, Christian Zigotzky wrote: Next step just with the first patch: 5c532d07c2f3c3972104de505d06b8d85f403f06 (use powerpc zone selection) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6-debug

Re: use generic DMA mapping code in powerpc V4

2019-01-25 Thread Christian Zigotzky
Next step just with the first patch: 5c532d07c2f3c3972104de505d06b8d85f403f06 (use powerpc zone selection) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6-debug a git checkout 5c532d07c2f3c3972104de505d06b8d85f403f06 Link to the Git:

Re: use generic DMA mapping code in powerpc V4

2019-01-23 Thread Christian Zigotzky
Hi Christoph, I also compiled a kernel (zImage) for the X1000  from your Git 'powerpc-dma.6-debug' (both patches) today. It boots and the P.A. Semi Ethernet works! I will test just the first patch tomorrow. Thanks, Christian On 21 January 2019 at 3:38PM, Christian Zigotzky wrote: Hello

Re: use generic DMA mapping code in powerpc V4

2019-01-21 Thread Christian Zigotzky
Hello Christoph, Thanks for your reply. I successfully compiled a kernel (uImage) for the X5000 from your Git 'powerpc-dma.6-debug' (both patches) today. It detects the SATA hard disk drive and boots without any problems. I will test the first patch in next days. Thanks for your help,

Re: use generic DMA mapping code in powerpc V4

2019-01-19 Thread Christoph Hellwig
On Sat, Jan 19, 2019 at 02:02:22PM +0100, Christoph Hellwig wrote: > Interesting. This suggest it is related to the use of ZONE_DMA by > the FSL SOCs that your board uses. Let me investigate this a bit more. As a hack to check that theory I've pushed a new commit to the powerpc-dma.6-debug

Re: use generic DMA mapping code in powerpc V4

2019-01-19 Thread Christoph Hellwig
On Sat, Jan 19, 2019 at 12:52:52PM +0100, Christian Zigotzky wrote: > Hi Christoph, > > I have found a small workaround. If I add 'mem=3500M' to the boot arguments > then it detects the SATA hard disk and boots without any problems. > > X5000> setenv bootargs root=/dev/sda2 console=ttyS0,115200

Re: use generic DMA mapping code in powerpc V4

2019-01-19 Thread Christian Zigotzky
Hi Christoph, I have found a small workaround. If I add 'mem=3500M' to the boot arguments then it detects the SATA hard disk and boots without any problems. X5000> setenv bootargs root=/dev/sda2 console=ttyS0,115200 mem=3500M Cheers, Christian On 19 January 2019 at 12:40PM, Christian

Re: use generic DMA mapping code in powerpc V4

2019-01-19 Thread Christian Zigotzky
Hi Christoph, I bought a USB null modem RS-232 serial cable today so I was able to get some SATA error messages. Error messages: [   13.468538] fsl-sata ffe22.sata: Sata FSL Platform/CSB Driver init [   13.475106] fsl-sata ffe22.sata: failed to start port 0 (errno=-12) [   13.481736]

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christian Zigotzky
Hello Christoph, I was able to compile 257002094bc5935dd63207a380d9698ab81f0775 from your Git powerpc-dma.6-debug today. Unfortunately I don't see any error messages (kernel ring buffer) and I don't have a RS232 serial null modem cable to get them. Cheers, Christian

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christoph Hellwig
On Fri, Jan 18, 2019 at 01:46:46PM +0100, Christian Zigotzky wrote: > Sorry, it's not possible to patch > '257002094bc5935dd63207a380d9698ab81f0775' with your patch. I also tried it > manually but without any success. Weird: hch@carbon:~/work/linux$ git checkout

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christian Zigotzky
Sorry, it's not possible to patch '257002094bc5935dd63207a380d9698ab81f0775' with your patch. I also tried it manually but without any success. -- Christian On 18 January 2019 at 1:18PM, Christoph Hellwig wrote: On Fri, Jan 18, 2019 at 01:07:54PM +0100, Christian Zigotzky wrote: git clone

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christoph Hellwig
On Fri, Jan 18, 2019 at 01:07:54PM +0100, Christian Zigotzky wrote: > git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a > > git checkout 257002094bc5935dd63207a380d9698ab81f0775 > > > I get the following error message with your patch: Hmm. Did I attached the wrong patch?

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christian Zigotzky
git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 257002094bc5935dd63207a380d9698ab81f0775 I get the following error message with your patch: patching file a/kernel/dma/direct.c Hunk #1 FAILED at 118. Hunk #2 FAILED at 139. 2 out of 2 hunks FAILED -- saving

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christoph Hellwig
On Fri, Jan 18, 2019 at 12:10:26PM +0100, Christian Zigotzky wrote: > For which commit? On top of 257002094bc5935dd63207a380d9698ab81f0775, that is the first one you identified as breaking the detection of the SATA disks.

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christian Zigotzky
For which commit? -- Christian On 18 January 2019 at 09:35AM, Christoph Hellwig wrote: Hi Christian, can you check if the debug printks in this patch trigger? diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 355d16acee6d..e46c9b64ec0d 100644 --- a/kernel/dma/direct.c +++

Re: use generic DMA mapping code in powerpc V4

2019-01-18 Thread Christoph Hellwig
Hi Christian, can you check if the debug printks in this patch trigger? diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 355d16acee6d..e46c9b64ec0d 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -118,8 +118,11 @@ struct page *__dma_direct_alloc_pages(struct device

Re: use generic DMA mapping code in powerpc V4

2019-01-17 Thread Christoph Hellwig
On Thu, Jan 17, 2019 at 10:21:11AM +0100, Christian Zigotzky wrote: > The X1000 boots and the PASEMI onboard ethernet works! > > Bad news for the X5000 (P5020 board). U-Boot loads the kernel and the dtb > file. Then the kernel starts but it doesn't find any hard disks > (partitions). Thanks for

Re: use generic DMA mapping code in powerpc V4

2019-01-17 Thread Christian Zigotzky
Hi All, I compiled the fixed '257002094bc5935dd63207a380d9698ab81f0775' (powerpc/dma: use the dma-direct allocator for coherent platforms) today. git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 257002094bc5935dd63207a380d9698ab81f0775 Link to the Git:

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 02:56:34PM +0100, Christian Zigotzky wrote: > On 15 January 2019 at 2:35PM, Christoph Hellwig wrote: >> On Tue, Jan 15, 2019 at 11:55:25AM +0100, Christian Zigotzky wrote: >>> Next step: 21074ef03c0816ae158721a78cabe9035938 (powerpc/dma: use the >>> generic direct

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christian Zigotzky
On 15 January 2019 at 2:35PM, Christoph Hellwig wrote: On Tue, Jan 15, 2019 at 11:55:25AM +0100, Christian Zigotzky wrote: Next step: 21074ef03c0816ae158721a78cabe9035938 (powerpc/dma: use the generic direct mapping bypass) git clone git://git.infradead.org/users/hch/misc.git -b

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 11:55:25AM +0100, Christian Zigotzky wrote: > Next step: 21074ef03c0816ae158721a78cabe9035938 (powerpc/dma: use the > generic direct mapping bypass) > > git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a > > git checkout

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christian Zigotzky
Next step: 21074ef03c0816ae158721a78cabe9035938 (powerpc/dma: use the generic direct mapping bypass) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 21074ef03c0816ae158721a78cabe9035938 I was able to compile the kernel for the AmigaOne X1000 (Nemo

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christian Zigotzky
Next step: 63a6e350e037a21e9a88c8b710129bea7049a80f (powerpc/dma: use the dma_direct mapping routines) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 63a6e350e037a21e9a88c8b710129bea7049a80f Error message: arch/powerpc/kernel/dma.o:(.data.rel.ro+0x0):

Re: use generic DMA mapping code in powerpc V4

2019-01-15 Thread Christian Zigotzky
Next step: 240d7ecd7f6fa62e074e8a835e620047954f0b28 (powerpc/dma: use the dma-direct allocator for coherent platforms) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 240d7ecd7f6fa62e074e8a835e620047954f0b28 Link to the Git:

Re: use generic DMA mapping code in powerpc V4

2019-01-12 Thread Christian Zigotzky
Next step: 4558b6e1ddf3dcf5a86d6a5d16c2ac1600c7df39 (swiotlb: remove swiotlb_dma_supported) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 4558b6e1ddf3dcf5a86d6a5d16c2ac1600c7df39 Output: You are in 'detached HEAD' state. You can look around, make

Re: use generic DMA mapping code in powerpc V4

2019-01-10 Thread Christian Zigotzky
Next step: 891dcc1072f1fa27a83da920d88daff6ca08fc02 (powerpc/dma: remove dma_nommu_dma_supported) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout 891dcc1072f1fa27a83da920d88daff6ca08fc02 Output: Note: checking out

Re: use generic DMA mapping code in powerpc V4

2019-01-09 Thread Christian Zigotzky
Next step: a64e18ba191ba9102fb174f27d707485ffd9389c (powerpc/dma: remove dma_nommu_get_required_mask) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout a64e18ba191ba9102fb174f27d707485ffd9389c Link to the Git:

Re: use generic DMA mapping code in powerpc V4

2019-01-05 Thread Christian Zigotzky
Next step: c446404b041130fbd9d1772d184f24715cf2362f (powerpc/dma: remove dma_nommu_mmap_coherent) git clone git://git.infradead.org/users/hch/misc.git -b powerpc-dma.6 a git checkout c446404b041130fbd9d1772d184f24715cf2362f Output: Note: checking out

Re: use generic DMA mapping code in powerpc V4

2019-01-03 Thread Christian Zigotzky
Hi Christoph, Happy new year for you too. Unfortunately we have some problems with the latest DRM patches. They modified a lot and some graphics cards don’t work anymore. During the holidays we tried to figure out where the problems are but without any success. I will try to test your patches

Re: use generic DMA mapping code in powerpc V4

2019-01-02 Thread Christoph Hellwig
Hi Christian, happy new year and I hope you had a few restful deays off. I've pushed a new tree to: git://git.infradead.org/users/hch/misc.git powerpc-dma.6 Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/powerpc-dma.6 Which has been rebased to the latests Linus

Re: use generic DMA mapping code in powerpc V4

2018-12-16 Thread Michael Ellerman
Christoph Hellwig writes: > FYI, given that we are one week before the expected 4.20 release > date and I haven't found the bug plaging Christians setups I think > we need to defer most of this to the next merge window. OK, sorry I couldn't help. I tried powering up my pasemi board last week

Re: use generic DMA mapping code in powerpc V4

2018-12-16 Thread Christoph Hellwig
FYI, given that we are one week before the expected 4.20 release date and I haven't found the bug plaging Christians setups I think we need to defer most of this to the next merge window. I'd still like to get a few bits in earlier, which I will send out separately now.

Re: use generic DMA mapping code in powerpc V4

2018-12-14 Thread Christoph Hellwig
On Fri, Dec 14, 2018 at 01:00:26PM +0100, Christian Zigotzky wrote: > On 12 December 2018 at 3:15PM, Christoph Hellwig wrote: > > Thanks for bisecting.  I've spent some time going over the conversion > > but can't really pinpoint it.  I have three little patches that switch > > parts of the code

Re: use generic DMA mapping code in powerpc V4

2018-12-14 Thread Christian Zigotzky
On 12 December 2018 at 3:15PM, Christoph Hellwig wrote: > Thanks for bisecting.  I've spent some time going over the conversion > but can't really pinpoint it.  I have three little patches that switch > parts of the code to the generic version.  This is on top of the > last good commmit

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 13 December 2018 at 6:48PM, Christian Zigotzky wrote: On 13 December 2018 at 2:34PM, Christian Zigotzky wrote: On 13 December 2018 at 12:25PM, Christoph Hellwig wrote: On Thu, Dec 13, 2018 at 12:19:26PM +0100, Christian Zigotzky wrote: I tried it again but I get the following error

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 13 December 2018 at 2:34PM, Christian Zigotzky wrote: On 13 December 2018 at 12:25PM, Christoph Hellwig wrote: On Thu, Dec 13, 2018 at 12:19:26PM +0100, Christian Zigotzky wrote: I tried it again but I get the following error message: MODPOST vmlinux.o arch/powerpc/kernel/dma-iommu.o: In

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 13 December 2018 at 12:25PM, Christoph Hellwig wrote: On Thu, Dec 13, 2018 at 12:19:26PM +0100, Christian Zigotzky wrote: I tried it again but I get the following error message: MODPOST vmlinux.o arch/powerpc/kernel/dma-iommu.o: In function `.dma_iommu_get_required_mask': (.text+0x274):

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christoph Hellwig
On Thu, Dec 13, 2018 at 12:19:26PM +0100, Christian Zigotzky wrote: > I tried it again but I get the following error message: > > MODPOST vmlinux.o > arch/powerpc/kernel/dma-iommu.o: In function `.dma_iommu_get_required_mask': > (.text+0x274): undefined reference to `.dma_direct_get_required_mask'

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 13 December 2018 at 10:47AM, Christian Zigotzky wrote: On 13 December 2018 at 10:10AM, Christoph Hellwig wrote: On Thu, Dec 13, 2018 at 09:41:50AM +0100, Christian Zigotzky wrote: Today I tried the first patch (0001-get_required_mask.patch) with the last good commit

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 13 December 2018 at 10:10AM, Christoph Hellwig wrote: On Thu, Dec 13, 2018 at 09:41:50AM +0100, Christian Zigotzky wrote: Today I tried the first patch (0001-get_required_mask.patch) with the last good commit (977706f9755d2d697aa6f45b4f9f0e07516efeda). Unfortunately this patch is already

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christoph Hellwig
On Thu, Dec 13, 2018 at 09:41:50AM +0100, Christian Zigotzky wrote: > Today I tried the first patch (0001-get_required_mask.patch) with the last > good commit (977706f9755d2d697aa6f45b4f9f0e07516efeda). Unfortunately this > patch is already included in the last good commit >

Re: use generic DMA mapping code in powerpc V4

2018-12-13 Thread Christian Zigotzky
On 12 December 2018 at 3:39PM, Christian Zigotzky wrote: Hi Christoph, Thanks a lot for your reply. I will test your patches tomorrow. Cheers, Christian Sent from my iPhone On 12. Dec 2018, at 15:15, Christoph Hellwig wrote: Thanks for bisecting. I've spent some time going over the

Re: use generic DMA mapping code in powerpc V4

2018-12-12 Thread Christian Zigotzky
Hi Christoph, Thanks a lot for your reply. I will test your patches tomorrow. Cheers, Christian Sent from my iPhone > On 12. Dec 2018, at 15:15, Christoph Hellwig wrote: > > Thanks for bisecting. I've spent some time going over the conversion > but can't really pinpoint it. I have three

Re: use generic DMA mapping code in powerpc V4

2018-12-12 Thread Christoph Hellwig
Thanks for bisecting. I've spent some time going over the conversion but can't really pinpoint it. I have three little patches that switch parts of the code to the generic version. This is on top of the last good commmit (977706f9755d2d697aa6f45b4f9f0e07516efeda). Can you check with whіch one

Re: use generic DMA mapping code in powerpc V4

2018-12-11 Thread Christian Zigotzky
> On 12. Dec 2018, at 01:47, Benjamin Herrenschmidt > wrote: > >> On Tue, 2018-12-11 at 19:17 +0100, Christian Zigotzky wrote: >> X5000 (P5020 board): U-Boot loads the kernel and the dtb file. Then the >> kernel starts but it doesn't find any hard disks (partitions). That >> means this is

Re: use generic DMA mapping code in powerpc V4

2018-12-11 Thread Benjamin Herrenschmidt
On Tue, 2018-12-11 at 19:17 +0100, Christian Zigotzky wrote: > X5000 (P5020 board): U-Boot loads the kernel and the dtb file. Then the > kernel starts but it doesn't find any hard disks (partitions). That > means this is also the bad commit for the P5020 board. What are the disks hanging off ?

Re: use generic DMA mapping code in powerpc V4

2018-12-11 Thread Christian Zigotzky
Next step: 7decbcfc656805603ab97206b3f816f26cd2cf7d (powerpc/dma: use generic direct and swiotlb ops) git checkout 7decbcfc656805603ab97206b3f816f26cd2cf7d We have the bad commit! :-) The PASEMI onboard ethernet doesn't work with this commit anymore. Error messages: [  367.627623] pci

Re: use generic DMA mapping code in powerpc V4

2018-12-11 Thread Christian Zigotzky
Next step: 977706f9755d2d697aa6f45b4f9f0e07516efeda (powerpc/dma: remove dma_nommu_mmap_coherent) Result: The P5020 board boots and the PASEMI onboard ethernet works. -- Christian On 10 December 2018 at 4:54PM, Christian Zigotzky wrote: Next step: 64ecd2c160bbef31465c4d34efc0f076a2aad4df

Re: use generic DMA mapping code in powerpc V4

2018-12-11 Thread Rui Salvaterra
On Mon, 10 Dec 2018 at 20:49, Benjamin Herrenschmidt wrote: > [snip] > > AGP is a gigantic nightmare :-) It's not just cache coherency issues > (some implementations are coherent, some aren't, Apple's is ... weird). > > Apple has all sort of bugs, and Darwin source code only sheds light on >

Re: use generic DMA mapping code in powerpc V4

2018-12-10 Thread Benjamin Herrenschmidt
On Mon, 2018-12-10 at 20:33 +0100, Christoph Hellwig wrote: > On Mon, Dec 10, 2018 at 05:04:46PM +, Rui Salvaterra wrote: > > Hi, Christoph and Ben, > > > > It just came to my mind (and this is most likely a stupid question, > > but still)… Is there any possibility of these changes having an

Re: use generic DMA mapping code in powerpc V4

2018-12-10 Thread Rui Salvaterra
On Mon, 10 Dec 2018 at 19:33, Christoph Hellwig wrote: > > On Mon, Dec 10, 2018 at 05:04:46PM +, Rui Salvaterra wrote: > > Hi, Christoph and Ben, > > > > It just came to my mind (and this is most likely a stupid question, > > but still)… Is there any possibility of these changes having an > >

Re: use generic DMA mapping code in powerpc V4

2018-12-10 Thread Christoph Hellwig
On Mon, Dec 10, 2018 at 05:04:46PM +, Rui Salvaterra wrote: > Hi, Christoph and Ben, > > It just came to my mind (and this is most likely a stupid question, > but still)… Is there any possibility of these changes having an > (positive) effect on the long-standing problem of Power Mac machines

Re: use generic DMA mapping code in powerpc V4

2018-12-10 Thread Rui Salvaterra
On Sat, 8 Dec 2018 at 17:17, Christoph Hellwig wrote: > > On Sun, Dec 02, 2018 at 05:11:02PM +1100, Benjamin Herrenschmidt wrote: > > Talking of which ... Christoph, not sure if we can do something about > > this at the DMA API level or keep hacks but some adapters such as the > > nVidia GPUs

Re: use generic DMA mapping code in powerpc V4

2018-12-10 Thread Christian Zigotzky
Next step: 64ecd2c160bbef31465c4d34efc0f076a2aad4df (powerpc/dma: use phys_to_dma instead of get_dma_offset) The P5020 board boots and the PASEMI onboard ethernet works. -- Christian On 09 December 2018 at 7:26PM, Christian Zigotzky wrote: Next step: c1bfcad4b0cf38ce5b00f7ad880d3a13484c123a

Re: use generic DMA mapping code in powerpc V4

2018-12-09 Thread Christian Zigotzky
Next step: c1bfcad4b0cf38ce5b00f7ad880d3a13484c123a (dma-mapping, powerpc: simplify the arch dma_set_mask override) Result: No problems with the PASEMI onboard ethernet and with booting the X5000 (P5020 board). -- Christian On 09 December 2018 at 3:20PM, Christian Zigotzky wrote: Next

Re: use generic DMA mapping code in powerpc V4

2018-12-09 Thread Christian Zigotzky
Next step: 602307b034734ce77a05da4b99333a2eaf6b6482 (powerpc/fsl_pci: simplify fsl_pci_dma_set_mask) git checkout 602307b034734ce77a05da4b99333a2eaf6b6482 The PASEMI onboard ethernet works and the X5000 boots. -- Christian On 08 December 2018 at 2:47PM, Christian Zigotzky wrote: Next step:

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Christoph Hellwig
On Sun, Dec 02, 2018 at 05:11:02PM +1100, Benjamin Herrenschmidt wrote: > Talking of which ... Christoph, not sure if we can do something about > this at the DMA API level or keep hacks but some adapters such as the > nVidia GPUs have a HW hack we can use to work around their limitations > in that

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Christoph Hellwig
Just as a warning: this series now has some conflicts with the dma mapping tree due to the ->mapping_error removal, and there might be some bigger ones if the direct calls for the direct mapping code series goes ahead. None of them affect the early part of the series that do not touch the actual

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Christian Zigotzky
Next step: e15cd8173ef85e9cc3e2a9c7cc2982f5c1355615 (powerpc/dma: fix an off-by-one in dma_capable) git checkout e15cd8173ef85e9cc3e2a9c7cc2982f5c1355615 The PASEMI onboard ethernet also works with this commit and the X5000 boots without any problems. -- Christian On 08 December 2018 at

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Christian Zigotzky
Next step: 7ebc44c535f6bd726d553756d38b137acc718443 (powerpc/dma: remove max_direct_dma_addr) git checkout 7ebc44c535f6bd726d553756d38b137acc718443 OK, the PASEMI onboard ethernet works and the P5020 board boots. -- Christian On 07 December 2018 at 7:33PM, Christian Zigotzky wrote: Next

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Benjamin Herrenschmidt
On Tue, 2018-11-27 at 08:42 +0100, Christoph Hellwig wrote: > Any comments? I'd like to at least get the ball moving on the easy > bits. I completely missed your posting of V4 ! I was wondering what was taking you so long :) I'll give it a spin & send acks over the next 2 or 3 days. Cheers,

Re: use generic DMA mapping code in powerpc V4

2018-12-07 Thread Christian Zigotzky
Next step: 13c1fdec5682b6e13257277fa16aa31f342d167d (powerpc/dma: move pci_dma_dev_setup_swiotlb to fsl_pci.c) git checkout 13c1fdec5682b6e13257277fa16aa31f342d167d Result: The PASEMI onboard ethernet works and the X5000 boots. — Christian Sent from my iPhone > On 7. Dec 2018, at 14:45,

Re: use generic DMA mapping code in powerpc V4

2018-12-07 Thread Christian Zigotzky
On 06 December 2018 at 11:55AM, Christian Zigotzky wrote: On 05 December 2018 at 3:05PM, Christoph Hellwig wrote: Thanks.  Can you try a few stepping points in the tree? First just with commit 7fd3bb05b73beea1f9840b505aa09beb9c75a8c6 (the first one) applied? Second with all commits up to

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
Good to know. Sorry because of the email. Sent from my iPhone > On 6. Dec 2018, at 20:36, Christoph Hellwig wrote: > >> On Thu, Dec 06, 2018 at 06:10:54PM +0100, Christian Zigotzky wrote: >> Please don’t merge this code. We are still testing and trying to figure out >> where the problems are

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christoph Hellwig
On Thu, Dec 06, 2018 at 06:10:54PM +0100, Christian Zigotzky wrote: > Please don’t merge this code. We are still testing and trying to figure out > where the problems are in the code. The ones I sent pings for were either tested successfully by you (the zone change) or are trivial cleanups that

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
Please don’t merge this code. We are still testing and trying to figure out where the problems are in the code. — Christian Sent from my iPhone > On 6. Dec 2018, at 11:55, Christian Zigotzky wrote: > >> On 05 December 2018 at 3:05PM, Christoph Hellwig wrote: >> >> Thanks. Can you try a few

Re: use generic DMA mapping code in powerpc V4

2018-12-06 Thread Christian Zigotzky
On 05 December 2018 at 3:05PM, Christoph Hellwig wrote: Thanks. Can you try a few stepping points in the tree? First just with commit 7fd3bb05b73beea1f9840b505aa09beb9c75a8c6 (the first one) applied? Second with all commits up to 5da11e49df21f21dac25a2491aa788307bdacb6b And if that still

  1   2   >