From: "Yinghai Lu" <yinghai@kernel.org>
To: "Hiroshi Shimamoto" <h-shimamoto@ct.jp.nec.com>
Cc: "Cyrill Gorcunov" <gorcunov@gmail.com>,
mingo@elte.hu, macro@linux-mips.org,
linux-kernel@vger.kernel.org
Subject: Re: [patch 2/3] x86: apic - simplify lapic_get_maxlvt
Date: Wed, 24 Sep 2008 12:17:18 -0700 [thread overview]
Message-ID: <86802c440809241217p7a79f397v48c76c60eeb8bb16@mail.gmail.com> (raw)
In-Reply-To: <48DA8DC4.90203@ct.jp.nec.com>
On Wed, Sep 24, 2008 at 11:58 AM, Hiroshi Shimamoto
<h-shimamoto@ct.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@gmail.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
next prev parent reply other threads:[~2008-09-24 19:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080924164618.588609232@gmail.com>
2008-09-24 16:46 ` [patch 1/3] x86: apic,io-apic - generalize lapic_get_version helper Cyrill Gorcunov
2008-09-24 16:46 ` [patch 2/3] x86: apic - simplify lapic_get_maxlvt Cyrill Gorcunov
2008-09-24 18:58 ` Hiroshi Shimamoto
2008-09-24 19:17 ` Yinghai Lu [this message]
2008-09-24 19:18 ` Cyrill Gorcunov
2008-09-24 19:24 ` Cyrill Gorcunov
2008-09-24 16:46 ` [patch 3/3] x86: apic - remove dead ifdef from lapic_is_integrated Cyrill Gorcunov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86802c440809241217p7a79f397v48c76c60eeb8bb16@mail.gmail.com \
--to=yinghai@kernel.org \
--cc=gorcunov@gmail.com \
--cc=h-shimamoto@ct.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®