Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9370955ybl; Fri, 17 Jan 2020 10:48:37 -0800 (PST) X-Google-Smtp-Source: APXvYqz8rHG7gmY0siPGIO6NdPfevBg0A9h6cpauWYcQvvBdwRTd0HJNapXP9vYDmg9niPGt5u3Q X-Received: by 2002:a9d:6a47:: with SMTP id h7mr7205220otn.244.1579286916861; Fri, 17 Jan 2020 10:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579286916; cv=none; d=google.com; s=arc-20160816; b=V9LYXZL8n/neEjcxx8s5Bblg8SDQ71Pi1KMCvrK8y6u0SIIp0/FuWOc9vh31asCr6G MIkWGlwOscKQb+rAdlHWW25iiYxj9uHoeKy1dz4xAmLWUzxzNGmpRNwOq2o2e0UI0HAL RA2IfZKm2IoDTQFAkAe8vgvyEmYzBX4zPZOEIBQvw4a2yEAMLeda9uZPtRJXGFyYM89Y opDqVHntXa6VmIOr7JirZte7vtcD9+mlCaFj5c7L1NJ+dMrGJQDpZovGtzbJ8U9a527u COhK+9t16lzoW/u8MEbcoD01LMLq2F/1kRjN4tJOj2SLAmtWa+p/2VqWupM1E1rOCqms fGPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Y2ZrufAmDTgI9TXivlSlbPcvv98I5hvXGSkhEsQnmuk=; b=SZhVAsio6IAUS7QiFSTlF0Z3AUh4rLhqs1oNSxD2C/oN3rIOOKtpOzVycWGgj9PBok 1QDOQGTjIZvIWESMF/LVXu9TBiInNatX5Z24sk3+GI3jRy46bx0blHj9osAibzyRtJrG Vi4jnbHwHLIsgXCxIFcRP1mrvYpzguVZxNhqbBG3ELFWi52D5GdzlTtsg8wCN61H174r XDuyy6PNoqCALFIlDUohQKcEtKO/pNY5Ehyr+9/dyEhNsFD42jftZh0/EJ7Rt++m0g9c JBcFkl+YGs/dPhK1GpzJXqtBG8tSdRouimN3hsujF6HTuw2pa+9RCYrkwZRB11oMuNXA hXVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OnvGup5B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si14134280otn.108.2020.01.17.10.48.24; Fri, 17 Jan 2020 10:48:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OnvGup5B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729355AbgAQSr3 (ORCPT + 99 others); Fri, 17 Jan 2020 13:47:29 -0500 Received: from mail.skyhub.de ([5.9.137.197]:44288 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727573AbgAQSr3 (ORCPT ); Fri, 17 Jan 2020 13:47:29 -0500 Received: from zn.tnic (p200300EC2F08DC0098C6A8393F59F989.dip0.t-ipconnect.de [IPv6:2003:ec:2f08:dc00:98c6:a839:3f59:f989]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B9B8C1EC03F6; Fri, 17 Jan 2020 19:47:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1579286847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Y2ZrufAmDTgI9TXivlSlbPcvv98I5hvXGSkhEsQnmuk=; b=OnvGup5BQQd1djQppGREI/Xmh13GQxmcxASd90ulRJpJ4ekUQ3Uq8EUm4A9yb8Zn7BG/57 4Ggz1p7ip2pSLukVliRuFrXhHmSrDBwhREdT5DLkF3gIrRDfJOS6DJGTUJ+BqRgHCOqR6u HNyPYr6TR20k+Y/HPxAnPdXsx8lzXaQ= Date: Fri, 17 Jan 2020 19:47:20 +0100 From: Borislav Petkov To: Tony W Wang-oc Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, DavidWang@zhaoxin.com, CooperYan@zhaoxin.com, QiyuanWang@zhaoxin.com, HerryYang@zhaoxin.com Subject: Re: [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes Message-ID: <20200117184720.GB31472@zn.tnic> References: <1579075257-6985-1-git-send-email-TonyWWang-oc@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1579075257-6985-1-git-send-email-TonyWWang-oc@zhaoxin.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 04:00:57PM +0800, Tony W Wang-oc wrote: > Before call cpu_detect_cache_sizes get l2size from CPUID.80000006, > these CPUs have called init_intel_cacheinfo get l2size/l3size from > CPUID.4. Questions: * Does CPUID(4) give the same result as CPUID(80000006) on those CPUs? * cpu_detect_cache_sizes() sets c->x86_tlbsize while init_intel_cacheinfo() would set it only when it calls the former function - cpu_detect_cache_sizes() - at the end: if (!l2) cpu_detect_cache_sizes(c); Does that happen on those CPUs? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette