[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090511110616.GI4648@elte.hu>
Date: Mon, 11 May 2009 13:06:16 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Cyrill Gorcunov <gorcunov@...il.com>
Cc: Yinghai Lu <yinghai@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ed Swierk <eswierk@...stanetworks.com>
Subject: Re: [PATCH] x86: read apic id if it is not acpi_lapic -v2
* Cyrill Gorcunov <gorcunov@...il.com> wrote:
> [Ingo Molnar - Mon, May 11, 2009 at 11:26:55AM +0200]
> |
> | * Yinghai Lu <yinghai@...nel.org> wrote:
> |
> | > @@ -1590,21 +1591,32 @@ void __init init_apic_mappings(void)
> | > } else
> | > apic_phys = mp_lapic_addr;
> | >
> | > - set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
> | > + /* lets check if we may to NOP'ify apic operations */
> | > + if (!cpu_has_apic) {
> | > + pr_info("APIC: disable apic facility\n");
> | > + apic_disable();
> | > + return;
> | > + }
> | > +
> | > + /*
> | > + * acpi lapic path already map that address in
> | > + * acpi_register_lapic_address()
> | > + */
> | > apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
> | > APIC_BASE, apic_phys);
> | > + if (acpi_lapic)
> | > + return;
> |
> | why do we return here? We should sanity-check the APIC ID even if we
> | come from ACPI.
> |
> | Ingo
> |
>
> I believe we already have it checked in
> acpi_register_lapic_address so no need to do it twice. Or I miss
> something?
It's better to have such checks applied redundantly instead of
introducing such implicit criss-cross dependencies between
functions. (which would break if acpi_register_lapic_address() ever
stopped checking the apic id - or did it differently)
Ingo
--
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