From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbaI2ORe (ORCPT ); Mon, 29 Sep 2014 10:17:34 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:64876 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751967AbaI2ORc (ORCPT ); Mon, 29 Sep 2014 10:17:32 -0400 Date: Mon, 29 Sep 2014 16:17:27 +0200 From: Ingo Molnar To: "Bryan O'Donoghue" Cc: Dave Jones , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] x86: Quark: Enable correct cache size/type reporting Message-ID: <20140929141727.GA19294@gmail.com> References: <1411956372-16469-1-git-send-email-pure.logic@nexus-software.ie> <1411956372-16469-2-git-send-email-pure.logic@nexus-software.ie> <20140929134008.GA7764@redhat.com> <542968AE.3090407@nexus-software.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <542968AE.3090407@nexus-software.ie> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Bryan O'Donoghue wrote: > On 29/09/14 14:40, Dave Jones wrote: > >On Mon, Sep 29, 2014 at 03:06:12AM +0100, Bryan O'Donoghue wrote: > > > Quark X1000 lacks cpuid(4). It has cpuid(2) but returns no cache > > > descriptors we can work with i.e. cpuid(2) returns > > > eax=0x00000001 ebx=0x00000000 ecx=0x00000000 edx=0x00000000 > > > > > > Quark X1000 contains a 16k 4-way set associative unified L1 cache > > > with 256 sets > > > > > > This patch emulates cpuid(4) in a similar way to other x86 > > > processors like AMDs which don't support cpuid(4). The Quark code > > > is based on the existing AMD code. > > > >This looks like it would work, but I wonder if it would be a lot > >simpler to do something like what we do in centaur_size_cache() > >which is the other case I recall where we had to override > >the CPUs definition of cache size. > > Hi Dave. > > It's working alright :) > > My feeling is that we'll probably end up with less changes/new code taking > the approach of quirking. OTOH, if the Quark quirk is a .legacy_cache_size callback, it will be compiled out on 64-bit kernels. With your patch it's unconditional. So Dave's suggestion makes sense. Thanks, Ingo