lkml.org 
[lkml]   [2009]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -tip] x86,apic: Use PAGE_SIZE instead of numbers
    On 11/08/2009 07:53 AM, Cyrill Gorcunov wrote:
    > The whole page is reserved for IO-APIC fixmap
    > due to non-cacheable requirement. So lets note
    > this explicitly instead of playing with numbers.
    >
    > CC: Yinghai Lu <yinghai@kernel.org>
    > CC: "Maciej W. Rozycki" <macro@linux-mips.org>
    > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
    > ---
    >
    > Perhaps I miss something and (4 * 1024) have some special
    > meaning?
    >
    > arch/x86/kernel/apic/io_apic.c | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > Index: linux-2.6.git/arch/x86/kernel/apic/io_apic.c
    > =====================================================================
    > --- linux-2.6.git.orig/arch/x86/kernel/apic/io_apic.c
    > +++ linux-2.6.git/arch/x86/kernel/apic/io_apic.c
    > @@ -4144,7 +4144,7 @@ fake_ioapic_page:
    > idx++;
    >
    > ioapic_res->start = ioapic_phys;
    > - ioapic_res->end = ioapic_phys + (4 * 1024) - 1;
    > + ioapic_res->end = ioapic_phys + PAGE_SIZE - 1;
    > ioapic_res++;
    > }
    > }

    In theory we could have more than one ioapic packed into a single page,
    and it is also entirely plausible we'll support other page sizes in x86
    at some point. However, it's probably easier to flag something as
    PAGE_SIZE and have to fix it up later than have magic constants, so I
    think it's probably the right thing to do.

    -hpa


    \
     
     \ /
      Last update: 2009-11-10 00:11    [W:0.029 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site