Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp579755rdg; Thu, 10 Aug 2023 12:05:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGobaWZluX5KXgY8siTNdRmuKRRIQbE2/axoZuVpYP1ZP083M+N+DZNwC7CQOYwRglBzBLQ X-Received: by 2002:a17:90b:378c:b0:269:2682:11fb with SMTP id mz12-20020a17090b378c00b00269268211fbmr2737930pjb.8.1691694334924; Thu, 10 Aug 2023 12:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691694334; cv=none; d=google.com; s=arc-20160816; b=sfpGRGtTcyV/XW8Ct1ah+JqI4Nur3sLUIB38qGggVJBj8Qqn130crbUVmyoqvRZe1s 8EHC6PvaS+WTrLmUTIfkCP3udMEdEKHyRKYZNHfKQSeFIW0jC86LR6Aj5+EwFonuJsZU nFjk7408vGlDBzpIwnyTwKx77+W5z+sB79NGaz/FGvAwGzMQUWKa0d6EVZNpZXqu/CFe S+M1jUqAwyaS8jP7BkMB6/N1WK0OWzt9KR0g2ZTRkObHWnsS4qezqtUyjNJoCuK4d1KI 9BlfyT4Y5fGrobWW4Kq2FUo/hIKXUQL3xbW+XvRagYGrPaFHyad0Z1dg3Ltfz6Gr2DwA YRUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=Yla6bgyMGJY6FRDLJy+QJ04amN52g+/SwC5xFVnIX7s=; fh=Vp72a/EEov1VOHpGPkCjAnDQEmhhYrQPa+PSfT8H2jQ=; b=ocJH7Dnpc+IA7/KijZG9yOkwJ3BtlgEYys6pDywhl/tyMCOCGqZayM/lEM9JB3BdTB 4GU0+id5c8YtDUcHjxqeDc8AmeoDk1XkbPZo6bf1ps0U8HOsFyoENd7FWgZ+wqpjtYnC JnwP04Z78lPYba+bTjjixte/gqcfEFKpN6b2BeuuIRhJALLjFKj5xTXhugNEEUv+in7x qZ/bFujc+N6wIXcf8t0wwsAaM5+wipwLvh67uKoZ1QIbBmGz0WboD4F7Hd5XCMK/dzEb 8kC1F/UhFuzYlbPRCQCJchfeTjNlGNoAGzJrvC9fZ3nMTEjgzviu0FgwAUra6+ky1AK0 uBiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zpyeHLs4; dkim=neutral (no key) header.i=@linutronix.de header.b=pYr3vp6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a17090a08c600b002692f3b7567si4030545pjn.150.2023.08.10.12.05.21; Thu, 10 Aug 2023 12:05:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zpyeHLs4; dkim=neutral (no key) header.i=@linutronix.de header.b=pYr3vp6R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235698AbjHJShj (ORCPT + 99 others); Thu, 10 Aug 2023 14:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235600AbjHJShe (ORCPT ); Thu, 10 Aug 2023 14:37:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4DD52713 for ; Thu, 10 Aug 2023 11:37:33 -0700 (PDT) Message-ID: <20230810160805.193094420@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691692652; 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: references:references; bh=Yla6bgyMGJY6FRDLJy+QJ04amN52g+/SwC5xFVnIX7s=; b=zpyeHLs4q1IIzG3oVdAmqZn6FBkJqTeXYW/6Rft4wXxTLj4ICM7mAf0bUZ885XO1Efbcxq 0/BK6OhoGfXt2fUqNVBhCNwWv5Q4yw5Q1H6CqxP9kz+3adr5RRLnpsGGz9IUk7E8xH2GYT tw7cEDqirwCr/1jyGvSY1QHE7vqXOc/RvjnoFNdxhrvDJbF8e2gemHK/zQrBg1UdLrNmZH Astt7SG5/WI4avhW4veqEhUl7/4ovChAIORW8ByAWAQ4kzuIAVAFxxqfzzJ7UsDEgYwTup zfh4aCxGAsitG1uN+tBNS0ZmI7HimX2C/vZKAcKmDC/oBnQpfU0n4G5lT2uFPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691692652; 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: references:references; bh=Yla6bgyMGJY6FRDLJy+QJ04amN52g+/SwC5xFVnIX7s=; b=pYr3vp6ReAHaL7w5dC/pUfJ4myEvxHIfo6R9M9FKf5GsHmHllXvjBEtQVqcydtqYdJlg8S 0pcA/FBPcDtAYZCA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Borislav Petkov , Ashok Raj , Arjan van de Ven Subject: [patch 04/30] x86/microcode: Include vendor headers into microcode.h References: <20230810153317.850017756@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Thu, 10 Aug 2023 20:37:32 +0200 (CEST) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ashok Raj Currently vendor specific headers are included explicitly when used in common code. Instead, include the vendor specific headers in microcode.h, and include that in all usages. No functional change. Suggested-by: Boris Petkov Signed-off-by: Ashok Raj Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/microcode.h | 5 ++++- arch/x86/include/asm/microcode_amd.h | 2 -- arch/x86/include/asm/microcode_intel.h | 2 -- arch/x86/kernel/cpu/common.c | 1 - arch/x86/kernel/cpu/intel.c | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 1 - arch/x86/kernel/cpu/microcode/core.c | 2 -- arch/x86/kernel/cpu/microcode/intel.c | 2 +- drivers/platform/x86/intel/ifs/load.c | 2 +- 9 files changed, 7 insertions(+), 12 deletions(-) --- diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h index 320566a0443d..2e1a9d0582e7 100644 --- a/arch/x86/include/asm/microcode.h +++ b/arch/x86/include/asm/microcode.h @@ -2,10 +2,13 @@ #ifndef _ASM_X86_MICROCODE_H #define _ASM_X86_MICROCODE_H -#include #include #include +#include +#include +#include + struct ucode_patch { struct list_head plist; void *data; /* Intel uses only this one */ diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h index a995b7685223..0531983016c9 100644 --- a/arch/x86/include/asm/microcode_amd.h +++ b/arch/x86/include/asm/microcode_amd.h @@ -2,8 +2,6 @@ #ifndef _ASM_X86_MICROCODE_AMD_H #define _ASM_X86_MICROCODE_AMD_H -#include - #define UCODE_MAGIC 0x00414d44 #define UCODE_EQUIV_CPU_TABLE_TYPE 0x00000000 #define UCODE_UCODE_TYPE 0x00000001 diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h index f1fa979e05bf..3ca740451a3d 100644 --- a/arch/x86/include/asm/microcode_intel.h +++ b/arch/x86/include/asm/microcode_intel.h @@ -2,8 +2,6 @@ #ifndef _ASM_X86_MICROCODE_INTEL_H #define _ASM_X86_MICROCODE_INTEL_H -#include - struct microcode_header_intel { unsigned int hdrver; unsigned int rev; diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 06015f304cb8..1ea5f822a7ca 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1c4639588ff9..9fd67e68179f 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index a28b103256ff..dc0a3bed5f6e 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c index c9a53e330df3..73a3c22773c2 100644 --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -31,9 +31,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 467cf37ea90a..0ae0c3fd66a1 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -30,9 +30,9 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/drivers/platform/x86/intel/ifs/load.c b/drivers/platform/x86/intel/ifs/load.c index e6ae8265f3a3..390862ab0357 100644 --- a/drivers/platform/x86/intel/ifs/load.c +++ b/drivers/platform/x86/intel/ifs/load.c @@ -3,7 +3,7 @@ #include #include -#include +#include #include "ifs.h"