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-next>] [day] [month] [year] [list]
Message-ID: <20080702184024.GC7003@cvg>
Date:	Wed, 2 Jul 2008 22:40:24 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	"Maciej W. Rozycki" <macro@...ux-mips.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [Q] Is 64bit LVTT screwed

Hi Maciej,

while I'm in path of unification apic code I found a bit
strange code snippet

apic_32.c
---------
#define APIC_DIVISOR 16
static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
{
	...
	if (!oneshot)
		apic_write_around(APIC_TMICT, clocks / APIC_DIVISOR);

}

apic_64.c
---------
static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)
{
        ...
	if (!oneshot)
		apic_write_around(APIC_TMICT, clocks);
}

but in both cases we use "divide by 16" in divide register. The only
explanation I imagine - for 64bit mode we are required to 'stuck'
for a bit longer (by 16 times longer to be precise). Am I right?
Or there is another reason why we dont use APIC_DIVISOR here. Actually,
as I see it not fair to a caller. For 64bit mode APIC timer is requested
to count 250000000 ticks but in real it will count 250000000 * 16.
Not sure who is right there. I think the better would be to
use 4000000000 and APIC_DIVISOR in 64bit mode. How do you think?

		- Cyrill -
--
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