ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
Crassus has joined #armlinux
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #armlinux
TheCoffeMaker has quit [Ping timeout: 244 seconds]
TheCoffeMaker has joined #armlinux
Nact has quit [Quit: Konversation terminated!]
rbutler1728 has quit [Read error: Connection reset by peer]
Crassus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Crassus has joined #armlinux
elastic_dog has quit [Ping timeout: 245 seconds]
elastic_dog has joined #armlinux
luispm has quit [Ping timeout: 244 seconds]
luispm has joined #armlinux
tiggilyboo has joined #armlinux
tiggilyboo has quit [Ping timeout: 265 seconds]
kristo has quit [Ping timeout: 252 seconds]
kristo has joined #armlinux
shoragan has quit [Ping timeout: 272 seconds]
shoragan has joined #armlinux
Crassus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiggilyboo has joined #armlinux
tiggilyboo has quit [Ping timeout: 244 seconds]
Nact has joined #armlinux
<sven> i currently have a snps,dwc3 node on a 64bit system with RAM starting at 0x8_0000_0000. i have dma-ranges in the bus, setup the iommu to bypass and i'd expect dwc3 to be able to grab dma buffers now. it doesn't though because it seems to be stuck with a 32bit dma mask.
<sven> and, well, there's no ram at the beginning of my address space. i can manually add a dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) to dwc3_probe and it works then, but i thought that's what dma-ranges is for
<sven> I'm still new to the kernel. am I missing something here?
Turingtoast has joined #armlinux
tiggilyboo has joined #armlinux
tiggilyboo has quit [Quit: tiggilyboo]
tiggilyboo has joined #armlinux
Nact has quit [Quit: Konversation terminated!]
tiggilyboo has quit [Quit: tiggilyboo]
bps has joined #armlinux
bps has quit [Changing host]
bps has joined #armlinux
amitk has quit [Quit: leaving]
bps has quit [Ping timeout: 264 seconds]
tiggilyboo has joined #armlinux
tiggilyboo has quit [Quit: tiggilyboo]
Turingtoast has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bps has joined #armlinux
bps has joined #armlinux
nsaenz has quit [Remote host closed the connection]
headless has joined #armlinux
<headless> OK, found the new list server :-)
<Emantor> sven: reading drivers/of/device.c you might be able to find out whats happening by sprinkling in some prints and enabling debugging in the file. Looks like the bus is involved as well.
bps has quit [Ping timeout: 264 seconds]
<sven> Emantor: i found https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt now which mentions "By default, the kernel assumes that your device can address 32-bits of DMA
<sven> addressing. For a 64-bit capable device, this needs to be increased,"
<sven> so maybe the dwc3 driver is just missing that
jn has joined #armlinux
headless has quit [Quit: Konversation terminated!]
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
Nact has joined #armlinux
<arnd> sven: the dma-ranges property tells the kernel what the bus supports, but the kernel doesn't know what the driver can do, so it still has to call dma_set_mask_and_coherent()
<arnd> I don't know why the generic xhci doesn't do that, but I think there have been problems in xhci implementations in the past
<arnd> xhci-plat.c does call dma_set_mask_and_coherent()
<sven> xhci actually works fine, it's the dwc3 core that tries to allocate some event buffer (which i'm not even sure it needs in host mode) that isn't
<arnd> sven: ah, so it probably hasn't bothered anyone in the past -- if it's only a couple of allocations for the coherent API rather than a streaming mapping, then on any other machine it will just end up using ZONE_DMA32.
<arnd> in theory that's a limited resource, but in practice nobody would have noticed as long as there is some memory at all on that zone
<arnd> I suppose if you use the iommu, it works, right?
<sven> yes
<sven> and thanks, makes sense!
<arnd> patching dwc3 to add this call should be fairly low risk then, as long as you set the mask in the exact same conditions that xhci uses it
<sven> ok, i'll take a look at xhci then and prepare a patch
iivanov has quit [Remote host closed the connection]
bps has quit [Ping timeout: 252 seconds]
Crassus has joined #armlinux
Crassus has quit [Quit: Textual IRC Client: www.textualapp.com]
Crassus has joined #armlinux