lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 14 Dec 2011 10:47:24 -0800
From:	Andres Salomon <dilinger@...ued.net>
To:	Jens Rottmann <JRottmann@...PERTEmbedded.de>
Cc:	Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
	linux-geode@...ts.infradead.org
Subject: Re: IRQF_TIMER | IRQF_SHARED ?

On Wed, 14 Dec 2011 19:37:39 +0100
Jens Rottmann <JRottmann@...PERTEmbedded.de> wrote:

> Jens Rottmann schrieb:
> > Andres Salomon schrieb:
> >> Just loading cs5535-clockevt should start the periodic timer.
> >> On my XO-1, IRQ 7 starts firing immediately.
> > Hmm, no, doesn't work. :-|  In /proc/interrupts IRQ 0 gets
> > increased, not (in my case) IRQ 11.
> 
> Update: I found that SMP-enabled kernels (like the generic one I was
> using) do load cs5535-clockevt fine but ignore it and keep using the
> pit timer instead.

Note that there are two subsystems at work here; clockevents and
clocksource.  cs5535-clockevt uses clockevents (despite being in
drivers/clocksource/).  For you to switch away from pit (via,
/sys/devices/system/clocksource/clocksource0/current_clocksource), we'd
have to implement cs5535_clocksource.  Something that would be worth
doing, but I haven't looked into it..


> 
> Responsible seems kernel/time/tick-common.c: tick_check_new_device()
>                 /*
>                  * If the cpu affinity of the device interrupt can not
>                  * be set, ignore it.
>                  */
>                 if (!irq_can_set_affinity(newdev->irq))
>                         goto out_bc;
> 
> Looks like it has been that way for quite some time, maybe
> cs5535-clockevt hasn't ever worked on SMP kernels.

I've only ever tested it on UP kernels.  I didn't know SMP CS5536
boards existed.  Gosh, I hope all of those cs5535 drivers that hadn't
had their locking primitives tested aren't racy! ;)

> 
> If I turn off SMP, cs5535-clockevt replaces the pit timer and the
> MFGPT IRQ starts firing just as you said - at least on 3.0.9. 3.2-rc5
> prefers to hang instead, looks like no timer events get generated.
> Sigh.
> 

3.2-rc4 hung on my XO-1 due to a bug that's been fixed on rc5, but I
haven't tested rc5 yet.

> I'll try to narrow it down tomorrow, but now I'm calling it a day.
> 
> Cheers
> Jens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ