From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030741AbXC2VWH (ORCPT ); Thu, 29 Mar 2007 17:22:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030745AbXC2VWH (ORCPT ); Thu, 29 Mar 2007 17:22:07 -0400 Received: from smtp.osdl.org ([65.172.181.24]:39685 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030741AbXC2VWE (ORCPT ); Thu, 29 Mar 2007 17:22:04 -0400 Date: Thu, 29 Mar 2007 14:16:54 -0700 (PDT) From: Linus Torvalds To: Andi Kleen cc: Mark Langsdorf , Len Brown , "Morrow, William" , "Crouse, Jordan" , Thomas Gleixner , Pavel Machek , Ingo Molnar , "Eric W. Biederman" , Nick Piggin , Mingming Cao , Adrian Bunk , Andrew Morton , Linux Kernel Mailing List , Michal Piotrowski , Mariusz Kozlowski , Oliver Pinter , Sid Boyce , Nick Piggin , Jens Axboe , Thomas Renninger Subject: Re: [PATCH] i386: add command line option "local_apic_timer_c2_ok" In-Reply-To: <200703292249.37979.ak@suse.de> Message-ID: References: <460C1B5B.4090802@amd.com> <200703292249.37979.ak@suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Mar 2007, Andi Kleen wrote: > > Here's a patch. I don't have a system with C1E, so i only tested that > the apic timer still works on a older AMD box. I think this looks better than what we have now, but it would look even better if the core CPUID stuff was in arch/i386/kernel/cpu/amd.c, and we simply had X86_FEATURE_BROKEN_C1_LAPIC etc.. And then the apic.c code would just check if (boot_cpu_has(X86_FEATURE_BROKEN_C1_LAPIC)) return -1; or similar. Doing the same for C2 and C3 gives us a clean way to have all these per-vendor things in their relevant places, rather than having various vendor-specific checks sprinkled in random places.. That's *especially* true for something like this that can hit both on x86-64 and i386, where the cpuid logic is shared, but the APIC logic is *not* shared. If I read your patch correctly, this only fixes it on 32-bit platforms, and I don't think the problem is in any way 32-bit specific, is it? Linus