Heartbeat LED during init script

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Feb 18 04:01:04 EST 2021


Helo,

On 18.02.21 09:34, Sascha Hauer wrote:
> On Thu, Feb 18, 2021 at 09:00:42AM +0100, Marcel Hellwig wrote:
>> Hey Sasha,
>>
>> I have a slight problem here:
>> This is what I think:
>>
>> Because the memtest gets called in the init routine, the `ctrl` is
>> completly ignored, at least I can't interrupt it nor the LED blinks.
> 
> Yes, ctrlc() is allowed only after startup. We could move calling
> poller_call() up, before we test if ctrlc is allowed.

I believe that's the correct thing to do.
See my "[PATCH 2/3] console: unconditionally run poller_call in ctrlc()"
from a few days ago. You can cherry pick that now if you like.

> 
>> But if I insert `poller_call`, the led blinks, but the memtest is
>> painfully slow (like 10x slower at least).
> 
> poller_call() takes some time. A solution might be to call poller_call()
> just every thousand times or so in memtest loop.
> 
> Sascha
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list