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, 24 Sep 2008 12:17:18 -0700
From:	"Yinghai Lu" <yinghai@...nel.org>
To:	"Hiroshi Shimamoto" <h-shimamoto@...jp.nec.com>
Cc:	"Cyrill Gorcunov" <gorcunov@...il.com>, mingo@...e.hu,
	macro@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] x86: apic - simplify lapic_get_maxlvt

On Wed, Sep 24, 2008 at 11:58 AM, Hiroshi Shimamoto
<h-shimamoto@...jp.nec.com> wrote:
> Cyrill Gorcunov wrote:
>> Lets use lapic_get_version helper and hide
>> register being read. Also it allow us to
>> make code a bit tighter.
>>
>> Signed-off-by: Cyrill Gorcunov <gorcunov@...il.com>
>> ---
>>
>> Index: linux-2.6.git/arch/x86/kernel/apic.c
>> ===================================================================
>> --- linux-2.6.git.orig/arch/x86/kernel/apic.c 2008-09-24 19:17:20.000000000 +0400
>> +++ linux-2.6.git/arch/x86/kernel/apic.c      2008-09-24 19:33:31.000000000 +0400
>> @@ -309,14 +309,14 @@ int get_physical_broadcast(void)
>>   */
>>  int lapic_get_maxlvt(void)
>>  {
>> -     unsigned int v;
>> +     unsigned int ver;
>>
>> -     v = apic_read(APIC_LVR);
>> +     ver = lapic_get_version();
>>       /*
>>        * - we always have APIC integrated on 64bit mode
>>        * - 82489DXs do not report # of LVT entries
>>        */
>> -     return APIC_INTEGRATED(GET_APIC_VERSION(v)) ? GET_APIC_MAXLVT(v) : 2;
>> +     return APIC_INTEGRATED(ver) ? GET_APIC_MAXLVT(ver) : 2;
>                                                      ^^^
> Hi, is this correct?
> Does ver have the full content of apic_read(APIC_LVR)?


good catch..

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