Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3856419imm; Tue, 11 Sep 2018 03:15:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbXQHQCIGMocM9Vs+G4uQCppiC/DTqtxS9Hj2OOG5kdytOlnnP3nek0X9PwbNGlxNz3eBqi X-Received: by 2002:a17:902:558f:: with SMTP id g15-v6mr26490353pli.38.1536660918047; Tue, 11 Sep 2018 03:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536660918; cv=none; d=google.com; s=arc-20160816; b=fJpkl8tOoBK1cyMb16ewFwAAcEnAeqw14KpOuOXL27Vg3Joqot3w0nMGvof205TlVB 7KM9+4vaVyB9C8U04EA8GrP97/ZKNTm9B3TIrtUyCpPm4zlXZX5i+ZaijUR0Z1Tv5mXj qV+2ouAH3Rb1HJB0usoQfalME1Rsm4n73VI3krVg5v8K6kRsHnEZoCitNScp5Q3dqrKn JdwR+j3I7p7Ve5I1E0trjo2F4fxwH0z5IEVO1DusVMRGZyfVW1jBEgI3vMg/1Xk/BX83 TMdmqN7K+jqVzAFCXh/ZUAonbNTOJLU0575fnUJFzTs+5mR+taxeokZfiLQCZZFQXvyt B0tg== 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; bh=gMEN0posgicW8FumjDD/3SOSrW5jXqHJTGlvB32sE4c=; b=ha+Zka3Utq+uoI3Ss/9qHNDvOnPbCO/MPjyHVowdIM7uh7j3Aln5BkmXL8oTY46YS0 RYBKlaQgSOQqHTfrreJl1sXbWUUXlL6QO51yF5DXvd9deu5TKSM1jfyq4boPr56aq6nK dnlyp00+l20A+W5cTs0sb6br8ErvAJJSOgqwf/x5lbA0X795wA5JHHNhYMyQdVZLNCVE ox0KSFz1xEymstVS0oIuLB2IAAfsNCuxWP1OEo8X5PdIJaLUDigum/k6LmzQ+cHiIABD 4mmTJCzxyW/OsZ+X30bEcPXpRRHtHgDLKS+7BEZAmlX799TSOEVL2FH4CjdF+W4zMgnV KaVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14-v6si20587342pgl.490.2018.09.11.03.15.02; Tue, 11 Sep 2018 03:15:18 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727246AbeIKPNf (ORCPT + 99 others); Tue, 11 Sep 2018 11:13:35 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35896 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbeIKPNf (ORCPT ); Tue, 11 Sep 2018 11:13:35 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id n_swhVtXMV34; Tue, 11 Sep 2018 12:14:56 +0200 (CEST) Received: from zn.tnic (p200300EC2BC6F600329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bc6:f600:329c:23ff:fea6:a903]) (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 2B8421EC0645; Tue, 11 Sep 2018 12:14:56 +0200 (CEST) Date: Tue, 11 Sep 2018 12:14:54 +0200 From: Borislav Petkov To: Pu Wen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, pbonzini@redhat.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v6 08/16] x86/apic: Add Hygon Dhyana support to APIC Message-ID: <20180911101454.GE12094@zn.tnic> References: <4f03e734faa5b2b69b0947a156bea29cddcc95ce.1536550550.git.puwen@hygon.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4f03e734faa5b2b69b0947a156bea29cddcc95ce.1536550550.git.puwen@hygon.cn> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 09:17:27PM +0800, Pu Wen wrote: > Add Hygon Dhyana support to the APIC subsystem as it use modern APIC. > When running on 32 bit mode, bigsmp should be enabled if there are > more than 8 cores online. > > Signed-off-by: Pu Wen > --- > arch/x86/kernel/apic/apic.c | 13 +++++++++++-- > arch/x86/kernel/apic/probe_32.c | 1 + > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c > index 84132ed..709daf2 100644 > --- a/arch/x86/kernel/apic/apic.c > +++ b/arch/x86/kernel/apic/apic.c > @@ -224,6 +224,11 @@ static int modern_apic(void) > if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && > boot_cpu_data.x86 >= 0xf) > return 1; > + > + /* Hygon systems use modern APIC */ > + if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) > + return 1; > + > return lapic_get_version() >= 0x14; > } > > @@ -1211,9 +1216,11 @@ void __init sync_Arb_IDs(void) > { > /* > * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not > - * needed on AMD. > + * needed on AMD or Hygon. > */ > - if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD) > + if (modern_apic() || > + boot_cpu_data.x86_vendor == X86_VENDOR_AMD || > + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) This change is not needed, after the above hunk in modern_apic(), right? With it removed: Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.