Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754668AbZKHSEv (ORCPT ); Sun, 8 Nov 2009 13:04:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753981AbZKHSEv (ORCPT ); Sun, 8 Nov 2009 13:04:51 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:47923 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753952AbZKHSEu convert rfc822-to-8bit (ORCPT ); Sun, 8 Nov 2009 13:04:50 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Lg0BAMOGHtE104bLqQ9ENSu3jvv26rsL4t5iH3sB3oJtRtoxfgmQkYLTI+nKhVxLMi BlnabIk4eWOvkdBKw+sd5ROaYJM7bIabdfjGGwrY7o1mby3CbBZqfw0lPGmapZLKru4J qMQ1kPrtmyyVHSIoMMuII6wqPMguTr84+fHzY= MIME-Version: 1.0 In-Reply-To: <20091108110512.3cfad100@mycelium.queued.net> References: <20091106154911.29400@gmx.net> <20091106155937.11d95279@lxorguk.ukuu.org.uk> <20091106165731.26800@gmx.net> <20091106182218.43940287@lxorguk.ukuu.org.uk> <20091106200620.179910@gmx.net> <20091107000559.166710@gmx.net> <40101cc30911070311u56035911l5eb50ac4abb73acc@mail.gmail.com> <20091108110512.3cfad100@mycelium.queued.net> From: Matteo Croce Date: Sun, 8 Nov 2009 19:04:35 +0100 Message-ID: <40101cc30911081004j47f55878h1590140da8369674@mail.gmail.com> Subject: Re: i686 quirk for AMD Geode To: Andres Salomon Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2941 Lines: 83 On Sun, Nov 8, 2009 at 5:05 PM, Andres Salomon wrote: > See comment below. ?BTW, how does this affect performance on LXs? > Do you have any hard numbers for common tasks? > > On Sat, 7 Nov 2009 12:11:55 +0100 > Matteo Croce wrote: > [...] >> >> --- a/arch/x86/kernel/Makefile ? ? ? ?2009-11-06 15:06:52.246223989 >> +0100 +++ b/arch/x86/kernel/Makefile ?2009-11-06 >> 15:07:04.294054613 +0100 @@ -89,7 +89,7 @@ >> ?obj-$(CONFIG_HPET_TIMER) ? ? += hpet.o >> >> ?obj-$(CONFIG_K8_NB) ? ? ? ? ?+= k8.o >> -obj-$(CONFIG_MGEODE_LX) ? ? ? ? ? ? ?+= geode_32.o mfgpt_32.o >> +obj-$(CONFIG_MGEODE_LX) ? ? ? ? ? ? ?+= geode_32.o mfgpt_32.o >> nopl_emu.o obj-$(CONFIG_DEBUG_RODATA_TEST) ? ?+= test_rodata.o >> ?obj-$(CONFIG_DEBUG_NX_TEST) ?+= test_nx.o >> >> --- a/arch/x86/kernel/cpu/amd.c ? ? ? 2009-11-06 15:06:52.254223805 >> +0100 +++ b/arch/x86/kernel/cpu/amd.c 2009-11-06 >> 15:07:04.294054613 +0100 @@ -138,8 +138,10 @@ >> ? ? ? } >> >> ? ? ? if (c->x86_model == 10) { >> - ? ? ? ? ? ? /* AMD Geode LX is model 10 */ >> - ? ? ? ? ? ? /* placeholder for any needed mods */ >> + ? ? ? ? ? ? /* Geode only lacks the NOPL instruction to be i686, >> + ? ? ? ? ? ? ? ?but we can emulate it in the exception handler >> + ? ? ? ? ? ? ? ?and promote it to a class 6 cpu */ >> + ? ? ? ? ? ? boot_cpu_data.x86 = 6; >> ? ? ? ? ? ? ? return; >> ? ? ? } > > If you're going to update this, you also need to make sure that you're > not breaking things that check it. ?For example, > arch/x86/include/asm/geode.h has an is_geode_lx check that expects > boot_cpu_data.x86 to be 5. ?Please be sure to update all these places > when creating a patch like this. > True, but also remove the duplicate function is_geode in the NAND driver and use the identical one defined in geode.h: --- a/drivers/mtd/nand/cs553x_nand.c 2009-11-08 18:58:14.835043214 +0100 +++ b/drivers/mtd/nand/cs553x_nand.c 2009-11-08 19:00:07.914117831 +0100 @@ -30,6 +30,7 @@ #include #include +#include #define NR_CS553X_CONTROLLERS 4 @@ -260,23 +261,6 @@ return err; } -static int is_geode(void) -{ - /* These are the CPUs which will have a CS553[56] companion chip */ - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 == 5 && - boot_cpu_data.x86_model == 10) - return 1; /* Geode LX */ - - if ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC || - boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) && - boot_cpu_data.x86 == 5 && - boot_cpu_data.x86_model == 5) - return 1; /* Geode GX (n?e GX2) */ - - return 0; -} - #ifdef CONFIG_MTD_PARTITIONS static const char *part_probes[] = { "cmdlinepart", NULL }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/