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
System_Error has quit [Ping timeout: 260 seconds]
System_Error has joined #armlinux
heat has joined #armlinux
jclsn has quit [Ping timeout: 256 seconds]
jclsn has joined #armlinux
System_Error has quit [Remote host closed the connection]
System_Error has joined #armlinux
System_Error has quit [Quit: Leaving]
System_Error has joined #armlinux
heat has quit [Ping timeout: 256 seconds]
famine has quit [Remote host closed the connection]
famine has joined #armlinux
monstr has joined #armlinux
monstr has quit [Ping timeout: 252 seconds]
monstr has joined #armlinux
amitk has joined #armlinux
gclement has joined #armlinux
mvaittin has joined #armlinux
monstr has quit [Remote host closed the connection]
mvaittin has quit [Ping timeout: 268 seconds]
lain6141 has quit [Read error: Connection reset by peer]
lain6141 has joined #armlinux
iivanov has joined #armlinux
<ukleinek> pinchartl: don't know if you're missing something (else), but AFAIK there is no generic DT property to set the voltage of a regulator.
xvmt has quit [Remote host closed the connection]
xvmt has joined #armlinux
sszy has joined #armlinux
headless has joined #armlinux
monstr has joined #armlinux
* ukleinek tries to implement regmap_bulk_update_bits()
monstr has quit [Remote host closed the connection]
nsaenz has joined #armlinux
nsaenz has quit [Remote host closed the connection]
nsaenz has joined #armlinux
vingu has quit [Ping timeout: 260 seconds]
markussp has quit [Quit: The Lounge - https://thelounge.chat]
markussp has joined #armlinux
vingu has joined #armlinux
headless has quit [Quit: Konversation terminated!]
<ukleinek> bah, _regmap_raw_read isn't just regmap_raw_read without locking :-\
socksinspace has quit [Quit: WeeChat 3.8]
socksinspace has joined #armlinux
oldgalileo has joined #armlinux
monstr has joined #armlinux
altf2o has quit [Remote host closed the connection]
altf2o has joined #armlinux
vingu1 has joined #armlinux
vingu1 has left #armlinux [#armlinux]
<javierm> pinchartl: maybe I'm misremembering but I think that asked the same before and the answer was that only the consumer knows that voltage could be safe and that doing an assigned-clock like could be harmful
<javierm> broonie: ^
<broonie> pinchartl: set a constraint with the same min/max voltage - we will apply the constraint when registering the regulator
Guest2367 is now known as mrutland
amitk_ has joined #armlinux
nsaenz has quit [Remote host closed the connection]
amitk has quit [Ping timeout: 256 seconds]
<broonie> ukleinek: there's bulk_read()
<pinchartl> broonie: thanks
<pinchartl> it's a gpio regulator
<pinchartl> so I didn't think about using the min/max constraints to select the voltage, but that makes sense
<pinchartl> should have thought about it :-)
monstr has quit [Remote host closed the connection]
System_Error has quit [Quit: Leaving]
System_Error has joined #armlinux
rvalue- has joined #armlinux
rvalue has quit [Ping timeout: 240 seconds]
rvalue- is now known as rvalue
Lucanis has quit [Ping timeout: 240 seconds]
Lucanis has joined #armlinux
zkrx has quit [Ping timeout: 252 seconds]
markussp has quit [Quit: The Lounge - https://thelounge.chat]
markussp has joined #armlinux
zkrx has joined #armlinux
amitk_ has quit [Ping timeout: 264 seconds]
psydroid2 has joined #armlinux
<ukleinek> broonie: yup, but no variant that doesn't take a lock, and to implement that I need a variant of regmap_raw_read that doesn't take a lock.
<oldgalileo> I'm having a hard time understanding the Kernel / OP-TEE calling conventions, specifically for RPC requests.
<oldgalileo> Looking at the documentation here https://github.com/OP-TEE/optee_os/blob/9b1d1cf0d63381c6d6a4d95ca2ac040834ad39e5/core/arch/arm/include/sm/optee_smc.h#L682 it looks like the SMC return args are not intended to be used (specifically `a1-2`)
<oldgalileo> And that instead the `optee_msg_arg` should be at the location represented by the "shared memory cookie"
<oldgalileo> In `drivers/tee/optee/rpc.c#L532` (https://elixir.bootlin.com/linux/v5.10.104/source/drivers/tee/optee/rpc.c#L532), it uses the `a1-2` registers to build the address to the shared memory. Is that risky behavior that's not guaranteed to be correct?
<oldgalileo> And a follow-up: If you follow the linked code above and go through to the subsequent `handle_rpc_func_cmd` call, it sets up the `optee_msg_arg` through the virtual address instead of the physical address. Why is there a switch if you call and provide the physical address? (Apologies if this is a very basic memory question)
<broonie> ukleinek: Why do you need something lockless here? In general regmap is going to do some locking.
<ukleinek> broonie: I implemented a regmap_bulk_update_bits_base() to be used in pca953x_gpio_set_multiple()
<ukleinek> broonie: to implement that I need to do: lock(); _regmap_bulk_read(); update(the bitmask); _regmap_bulk_write(); unlock()
<ukleinek> So _regmap_bulk_read() and _regmap_bulk_write() must not take the lock
monstr has joined #armlinux
<broonie> So you need to push the lock down and make the existing functions wrappers.
monstr has quit [Ping timeout: 252 seconds]
<ukleinek> broonie: not sure I understand your statement. Here is my WIP: https://paste.debian.net/hidden/2326f6b3/
<broonie> ukleinek: look at how the other paths do internal/external use paths.
<ukleinek> broonie: ??
monstr has joined #armlinux
System_Error has quit [Read error: Connection reset by peer]
<broonie> ukleinek: Copy what's done so we can implement regmap_update_bits() and other things that do mutliple ops.
<ukleinek> I took a mixture of regmap_update_bits and regmap_bulk_read/write as a template
misanthropos has quit [Remote host closed the connection]
Forty-Bot has joined #armlinux
altf2o has quit [Quit: Leaving]
altf2o has joined #armlinux
monstr has quit [Remote host closed the connection]
heat has joined #armlinux
headless has joined #armlinux
<oldgalileo> After reading more about the OP-TEE SMC call I'm still lost as to how this works in the Kernel. It seems like this line: https://elixir.bootlin.com/linux/v5.10.104/source/drivers/tee/optee/rpc.c#L532 shouldn't work?
<oldgalileo> Sorry, to be more specific: with my current understanding it seems like it shouldn't work consistently? I'm making an RPC call to OP-TEE. I have registered my SHM, and I have the virtual address of my message arguments in the shared memory.
<oldgalileo> I get the physical address of the message arguments and I make an SMC call, providing the physical address. OP-TEE does some work on a thread, then returns, then I resume and now the SMC return registers are populated with values from OP-TEE.
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<oldgalileo> At this point, I get lost. It looks like we're getting back the same physical address to the message args inside the shared memory that we provided at the SMC call time? And then we're blindly using that returned physical address to get back to the shared memory?
<broonie> oldgalileo: It would probably better to post to the list CC the OP-TEE maintainers.
<oldgalileo> broonie: Fair. I think heat told me to as well. I just feel bad wasting people's time. I'm sure that the Linux kernel implementation **isn't** the issue here, but I think this detail is crucial to understanding an issue an EDK2 implementation
<broonie> oldgalileo: You're more likely to get someone who knows the OP-TEE code there.
gclement has quit [Ping timeout: 264 seconds]
<oldgalileo> Just found out that there's an official TrustedFirmware Discord server (:sob:) so I may try my luck there before hitting the mailing list. Thanks for the recommendation
<Xogium> trusted firmware... On discord. What has the world come to ?
tlwoerner has quit [Ping timeout: 240 seconds]
tlwoerner has joined #armlinux
tlwoerner has quit [Ping timeout: 268 seconds]
tlwoerner has joined #armlinux
<broonie> Everything is on discord these days. One of the reasons I never look at discord is the amount of things that get you signed up for some entire server.
<conchuod> Without a proper account switcher it is also a pain in the arse.
<conchuod> I don't want my profile on <insert random programming discord> showing what my steam is or that I am listen to taylor switft, yaknow?
<ukleinek> broonie: my modification works now. I still fail to understand however what you want to tell me about my wip change.
<broonie> ukleinek: That was a general comment about how things should look rather than specifically about your change.
<ukleinek> broonie: ok, then I think I'm on the right track. Will cleanup and put into nice patches next week then.
oldgalileo has quit [Ping timeout: 272 seconds]
Livio has joined #armlinux
amitk has joined #armlinux
misanthropos has joined #armlinux
iivanov has quit []
heat has quit [Remote host closed the connection]
Livio has quit [Ping timeout: 260 seconds]
amitk has quit [Ping timeout: 255 seconds]
zkrx has quit []
oldgalileo has joined #armlinux
zkrx has joined #armlinux
oldgalileo has quit [Ping timeout: 260 seconds]
headless has quit [Quit: Konversation terminated!]
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
vingu1 has joined #armlinux
oldgalileo has joined #armlinux
oldgalileo has quit [Ping timeout: 268 seconds]
gclement has joined #armlinux
gclement has quit [Quit: Leaving.]
altf2o has quit [Quit: Leaving]
oldgalileo has joined #armlinux
oldgalileo has quit [Ping timeout: 256 seconds]
vingu1 has quit [Quit: Leaving.]
oldgalileo has joined #armlinux