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
Misotauros has quit [Ping timeout: 245 seconds]
scosu_ has joined #armlinux
scosu has quit [Ping timeout: 272 seconds]
apritzel has quit [Ping timeout: 268 seconds]
torez has quit [Quit: torez]
jlinton has quit [Quit: Client closed]
amitk has joined #armlinux
monstr has joined #armlinux
Nact has joined #armlinux
frieder has joined #armlinux
iivanov has joined #armlinux
apritzel has joined #armlinux
milkylainen has joined #armlinux
apritzel has quit [Ping timeout: 240 seconds]
sudeepholla has joined #armlinux
sszy has joined #armlinux
tre has joined #armlinux
alpernebbi has joined #armlinux
Misotauros has joined #armlinux
sudeepholla has quit [Ping timeout: 268 seconds]
djrscally has joined #armlinux
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
apritzel has joined #armlinux
sudeepholla has joined #armlinux
apritzel has quit [Ping timeout: 248 seconds]
sudeepholla has quit [Remote host closed the connection]
amitk_ has joined #armlinux
amitk has quit [Ping timeout: 268 seconds]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sszy has joined #armlinux
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #armlinux
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #armlinux
tre has quit [Remote host closed the connection]
sszy has joined #armlinux
jlinton has joined #armlinux
eduardas has joined #armlinux
eduardas has quit [Client Quit]
rbutler1728 has joined #armlinux
<marex> maz_: hi, do you happen to have a moment for a question about threaded IRQ handling ?
<marex> I have a xiic attached to that controller (xilinx i2c controller), it requests threaded irq with IRQF_ONESHOT, the irq is level triggered
<marex> I noticed that every now and then, I miss an interrupt, and I suspect it is because both the xiic and the xilinx intc irq handlers run in a thread, but each in a different thread, and they access action->thread_flags in __irq_wake_thread() and irq_wait_for_interrupt() in kernel/irq/{handle,manage}.c
<marex> but I might be wrong, the xiic driver is horribly buggy and racy, I started fixing those races and I think I got most of them sorted out , except for this one which I really just cannot nail down
<marex> (I had to patch the xiic considerably, currently the xiic driver uses local_irq_save()/local_irq_restore() as locking primitive, which isn't working too well on SMP ... so ... that needed fixing)
<marex> monstr: ^
headless has joined #armlinux
jlinton has quit [Quit: Client closed]
<maz_> marex: are you sure that the xilinx intc runs in a thread? or maybe you are forcing all interrupts to be threaded?
jlinton has joined #armlinux
sakman has quit [Remote host closed the connection]
<marex> maz_: ftrace says it runs either in <idle>-0 or kworker/* , so yeah, sometimes
<marex> maz_: I do have full preemption enabled, so the interrupt handler could be threaded I think ?
<marex> CONFIG_IRQ_FORCED_THREADING=y this is enabled too
<maz_> right, so that's the reason why this is threaded.
<marex> yeah ... but ... shouldn't that still work and not be racy ?
<marex> btw this is zynqmp, the the xiic-i2c is in FPGA, so is the xilinx-intc
<maz_> it *should* work.
<marex> the xiic-i2c is plugged into the intc and intc is plugged into gic
<maz_> is the intc a secondary irqchip?
<maz_> right.
<maz_> i2c->intc->gic.
<marex> yep
sakman has joined #armlinux
<marex> btw I really suspect the xiic driver, it is horribly broken, although the xilinx intc would be second on my list of possible issues
torez has joined #armlinux
<maz_> marex: the intc_enable_or_unmask() functon is super suspicious in the way it acks interrupts.
<marex> yes it is, I already dug in that one, but I don't think that is the culprit
jlinton has quit [Quit: Client closed]
jlinton has joined #armlinux
<marex> but I just had a horrid recollection of an issue where GIC got somehow stuck on the zynqmp and didn't distribute interrupts
<marex> wait a minute
<marex> if the intc somehow got gic to hang , it could also block IPIs, which would explain why wake_up_process() call doesn't wake the IRQ thread almost imediatelly on the other CPU
<marex> no ?
<maz_> everything is possible if you prevent the GIC from EOI-ing an interrupt.
<marex> maz_: can I detect such a condition ?
<marex> probably add trace_printk into the gic driver is one way to do that
prabhakarlad has quit [Quit: Client closed]
<maz_> you can check whether every read of the GIC IAR register results in a writeback to the EOI register with the same value.
<maz_> if you don't see that, you're in trouble (unless the value is 1023, of course, which indicates a spurious signal).
<marex> maz_: that would be gic_handle_irq() , do_read_iar() and do_write_eoir() ?
<maz_> yup, that'd be it.
<maz_> you probably only want to consider eoimode0.
<maz_> unless you boot at HYP/EL2?
<marex> [ 0.041173] CPU: All CPU(s) started at EL2
<marex> but I dont think it is HYP mode
<maz_> ah.
<maz_> so you need to look at eoimode1, and instrument the DIR accesses too.
<maz_> EL2=HYP.
<marex> oh
prabhakarlad has joined #armlinux
monstr has quit [Remote host closed the connection]
<marex> maz_: btw shouldnt there be some IPI watchdog in the kernel, which monitors whether the other CPU cores are still operable ?
bps has quit [Ping timeout: 268 seconds]
frieder has quit [Remote host closed the connection]
<marex> maz_: OK, we can rule out the IPI, I still have this problem even on UP
mag has quit [Remote host closed the connection]
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
headless has quit [Quit: Konversation terminated!]
prabhakarlad has quit [Quit: Client closed]
Pali has joined #armlinux
prabhakarlad has joined #armlinux
apritzel has joined #armlinux
frieder has joined #armlinux
frieder has quit [Remote host closed the connection]
jlinton has quit [Quit: Client closed]
tudorel has joined #armlinux
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #armlinux
tudorel has quit [Quit: tudorel]
sszy has quit [Ping timeout: 240 seconds]
mag has joined #armlinux
headless has joined #armlinux
mag has quit [Ping timeout: 240 seconds]
mag has joined #armlinux
mag has quit [Remote host closed the connection]
mag has joined #armlinux
shoragan has quit [*.net *.split]
Sledge has quit [*.net *.split]
shoragan has joined #armlinux
Sledge has joined #armlinux
jlinton has joined #armlinux
CrashTestDummy2 has joined #armlinux
Nact has quit [Quit: Konversation terminated!]
CrashTestDummy has quit [Ping timeout: 258 seconds]
headless has quit [Quit: Konversation terminated!]
alpernebbi has quit [Quit: alpernebbi]
prabhakarlad has quit [Quit: Client closed]
amitk_ has quit [Ping timeout: 245 seconds]
russ has joined #armlinux
jlinton has quit [Quit: Client closed]
iivanov has quit [Remote host closed the connection]
rbutler1728 has quit [Read error: Connection reset by peer]
CrashTestDummy3 has joined #armlinux
CrashTestDummy2 has quit [Ping timeout: 248 seconds]
Pali has quit [Ping timeout: 268 seconds]
russ has quit [Ping timeout: 240 seconds]
russ has joined #armlinux
torez has quit [Quit: torez]
iivanov has joined #armlinux
djrscally has quit [Ping timeout: 268 seconds]
iivanov has quit [Ping timeout: 248 seconds]