Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3514433imm; Wed, 5 Sep 2018 01:10:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZdWkuOJGzfMPN17Qvlq81T9DVQbZ+g58zMq0kIUbpcrFhy2BK98Zi/dyzu+iqWXezCZHE5 X-Received: by 2002:a62:5d89:: with SMTP id n9-v6mr39371095pfj.102.1536135003547; Wed, 05 Sep 2018 01:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536135003; cv=none; d=google.com; s=arc-20160816; b=GXOv8LtMbuCy7p2X6wkLWQxgCA9UZZpZxGH9IK7Za2EVqHGp9g89SD8zLYfjAnVurt odD2jibxWRwJSNU6L+hCWednkC4NAeubGtMHnVVKnCaiacWo2Rri2izlUue72+ZHgJsr l/lidM9UvyTylIP8FEJIXomcVm5ihdI3kEOeNU0yo2FTusIfJ1XoEHHgwqLN/idMIFzr VIqOSj5ettSsq2aVdCG8H2PuZLwrBAFvfwiNTGhnVB/t42ZupRbjeeAISNFmuSoVz6Ar Wr+di7qqxLibxOzaSqwkX6pkyW8sgkqQXHTp3eaSXUUG6gjQ3m+Ykw9IFWdB4Wl93S/m V5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=DmJgcaoY6tQvJ8q53S7UPafYwcWvRv8Io9ZcWtxZ6t0=; b=mhrtCTboHfk7vggCm5Nbfs++Jg4nti+pSsAAszgZcJKwnZRU5e4400uBoSaW2Y/9Xz 8B5gPDXNkjKu/wOk4fGBm4siGdd5/YxvqYbXt+QigkCvwUh4w+4ElcpJ6wFU9gMkqWAc sj2SdpMPWPjSCHQ4/+wJo/Jdb5yZ29E7CoypXtm+8GUwCl1G8nld2fOQEtSHkCQt3lQH dmvhlXLpv9HPuTzORjtxXmz7i659P9Nmx8HXTBhbM8laKvZ9DRgQXdu3s3n7ybQLR92G sDeKracMUQKGeOxpu7VoEgUKq4G7mFaxX47++bgyq9NhGThrtv66YbqRfZ6WL1ElCj09 A22g== 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 c2-v6si1356087pgm.236.2018.09.05.01.09.47; Wed, 05 Sep 2018 01:10:03 -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 S1727626AbeIEMhn (ORCPT + 99 others); Wed, 5 Sep 2018 08:37:43 -0400 Received: from smtp20.cstnet.cn ([159.226.251.20]:57038 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725865AbeIEMhn (ORCPT ); Wed, 5 Sep 2018 08:37:43 -0400 Received: from [172.20.20.131] (unknown [182.150.46.145]) by APP-10 (Coremail) with SMTP id tACowABna1_6jo9bwL7sBw--.19840S2; Wed, 05 Sep 2018 16:08:27 +0800 (CST) From: Pu Wen Subject: Re: [PATCH v5 08/16] x86/apic: add modern APIC support for Hygon To: Borislav Petkov 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 References: <969a367a0b2d58f3e68bc6f97b6e8238e2390991.1535459013.git.puwen@hygon.cn> <20180904183301.GN32615@zn.tnic> Message-ID: Date: Wed, 5 Sep 2018 16:08:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180904183301.GN32615@zn.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CM-TRANSID: tACowABna1_6jo9bwL7sBw--.19840S2 X-Coremail-Antispam: 1UD129KBjvdXoWruF47Wry8Gr17tr1kWryDZFb_yoW3XFc_Wr 1DAr4Dtw4DAFyFqFsxGr4YqwsrJa1Yk3yvgry8ArW7Ar43ZFyrGF97tFZrJr97ta1fAr42 kr4akrsIyws2vjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbcxYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r1j6r4UM28EF7xvwVC2z2 80aVCY1x0267AKxVW8JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IE w4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_Jw1lYx0Ex4A2jsIE14v26F4j6r4UJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF 04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r 18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vI r41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr 1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAI cVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU1CPfJUUUUU== X-Originating-IP: [182.150.46.145] X-CM-SenderInfo: psxzv046klw03qof0z/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/9/5 2:33, Borislav Petkov wrote: > On Wed, Aug 29, 2018 at 08:44:30PM +0800, Pu Wen wrote: ... >> + if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD && >> + boot_cpu_data.x86 >= 0xf) || >> + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) >> return 1; > > Those compound conditionals are not nice to read. Just add yours > underneath: > > if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && > boot_cpu_data.x86 >= 0xf) > return 1; > > if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) > return 1; > > Do that where applicable and where it makes sense, syntax-wise to have a > separate vendor == HYGON check in the other patches too. That's OK, will check other patches and split the compound conditionals where it's possible. -- Thanks, Pu Wen