From patchwork Thu Nov 17 09:19:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suleiman Souhlal X-Patchwork-Id: 13046363 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 216FCC4332F for ; Thu, 17 Nov 2022 09:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239859AbiKQJUc (ORCPT ); Thu, 17 Nov 2022 04:20:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239848AbiKQJUW (ORCPT ); Thu, 17 Nov 2022 04:20:22 -0500 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD4D697CF for ; Thu, 17 Nov 2022 01:20:21 -0800 (PST) Received: by mail-pf1-x44a.google.com with SMTP id c207-20020a624ed8000000b0056e3714b62cso862864pfb.23 for ; Thu, 17 Nov 2022 01:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=i9ZosGBX4Bq8wQCRpvB185DV6OPq8cyeohibbBGrcrE=; b=ToMHYFkPuOYNXp9IQAewYgR+fgFvLYE4KAwDJiDAyN2Z2yytZa5DQq7/Xuo1r+zSh9 j5YtQjoC49nwEBl23zIO8okYpLi17MFd0FLqbAYV+4aksn7z38cb/0BXdssvVynkqK8U g7wUGqG2A/eqNPjjqRWFOCc7vu63vnkisbhzr1S3khr8gR7WkHxktmIbTe+uiNHlx0tZ WN+y9iPrH3SNm7e2BMNLSoPytHLTVho3b4lceWakJ2rJcuP5R9KGUN/AHaLZroCE36di zt1l3erCRw7392gVOJnwhUglECZbLizcI/IopV668ImmodOXE1Pk8eR6l/Qu2QPj3zkj G+MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i9ZosGBX4Bq8wQCRpvB185DV6OPq8cyeohibbBGrcrE=; b=c/f6xa8vq53XCmVvmVgMqegN/m1bHmVv/A0zSCXvzP1rT4xNiUHcepiSdLOYT0VVb/ kPRXBu41oEKorx+Xoy2Qv1XLiPRuSV45iwbaoQJy9nIzAixCAyeAhWSgXdo3w3pVloXC 0Aep4qCJq57+1f+k6+QgDOX/7rca2qK9oig8VBhsWwCUwBAHdb95VC8Dfgb80gfqjbx2 vPtlP/8sIL2sf7Kxvn4D1Dg6L6YOVk+lSb6sFVIPdr41du6CvxpK5ZuSrupCXG9eZvSe wqxzOK0WsMs1GkX3pIjNiyLAxM4kuqMHqO9m5mk6/H8I3MvowUfb0uQT8V6N9brQSaVj 0XvQ== X-Gm-Message-State: ANoB5plnE+obf/6yYw6/jmnfYxZ4wQiNHW/ovx26GQTvqJiWRJxUeSDa 74wCrUqOFxQ/y8Wter69PwaHDksZkdKKvA== X-Google-Smtp-Source: AA0mqf4YbSx4bAbBEyvSzygJfHvBIQnKGb20BztsV0Djbrhspk7H3djXZTm399Z7C7RyNhM7+i/wg/1E0Mk2ag== X-Received: from suleiman1.tok.corp.google.com ([2401:fa00:8f:203:416e:f3c7:7f1d:6e]) (user=suleiman job=sendgmr) by 2002:a63:4c63:0:b0:477:103:d1c4 with SMTP id m35-20020a634c63000000b004770103d1c4mr1240692pgl.369.1668676821007; Thu, 17 Nov 2022 01:20:21 -0800 (PST) Date: Thu, 17 Nov 2022 18:19:23 +0900 In-Reply-To: <20221117091952.1940850-1-suleiman@google.com> Message-Id: <20221117091952.1940850-6-suleiman@google.com> Mime-Version: 1.0 References: <20221117091952.1940850-1-suleiman@google.com> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Subject: [PATCH 4.19 05/34] x86/devicetable: Move x86 specific macro out of generic code From: Suleiman Souhlal To: stable@vger.kernel.org Cc: x86@kernel.org, kvm@vger.kernel.org, bp@alien8.de, pbonzini@redhat.com, peterz@infradead.org, jpoimboe@kernel.org, cascardo@canonical.com, surajjs@amazon.com, ssouhlal@FreeBSD.org, suleiman@google.com Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Gleixner commit ba5bade4cc0d2013cdf5634dae554693c968a090 upstream. There is no reason that this gunk is in a generic header file. The wildcard defines need to stay as they are required by file2alias. Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Greg Kroah-Hartman Link: https://lkml.kernel.org/r/20200320131508.736205164@linutronix.de Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Greg Kroah-Hartman [suleiman: vmx.c moved] Signed-off-by: Suleiman Souhlal --- arch/x86/include/asm/cpu_device_id.h | 13 ++++++++++++- arch/x86/kvm/svm.c | 1 + arch/x86/kvm/vmx.c | 1 + drivers/cpufreq/acpi-cpufreq.c | 1 + drivers/cpufreq/amd_freq_sensitivity.c | 1 + include/linux/mod_devicetable.h | 4 +--- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/arch/x86/include/asm/cpu_device_id.h b/arch/x86/include/asm/cpu_device_id.h index 31c379c1da41..a28dc6ba5be1 100644 --- a/arch/x86/include/asm/cpu_device_id.h +++ b/arch/x86/include/asm/cpu_device_id.h @@ -6,9 +6,20 @@ * Declare drivers belonging to specific x86 CPUs * Similar in spirit to pci_device_id and related PCI functions */ - #include +/* + * The wildcard initializers are in mod_devicetable.h because + * file2alias needs them. Sigh. + */ + +#define X86_FEATURE_MATCH(x) { \ + .vendor = X86_VENDOR_ANY, \ + .family = X86_FAMILY_ANY, \ + .model = X86_MODEL_ANY, \ + .feature = x, \ +} + /* * Match specific microcode revisions. * diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e1492a67e988..5b68ec68fc13 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include "trace.h" diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c0ea3b82ff00..88c2027d9305 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 9e86404a361f..40c969432f45 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -47,6 +47,7 @@ #include #include #include +#include MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); MODULE_DESCRIPTION("ACPI Processor P-States Driver"); diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c index be926d9a66e5..4b4f128c3488 100644 --- a/drivers/cpufreq/amd_freq_sensitivity.c +++ b/drivers/cpufreq/amd_freq_sensitivity.c @@ -21,6 +21,7 @@ #include #include +#include #include "cpufreq_ondemand.h" diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index c30839a15f50..c3c4037f001f 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -631,9 +631,7 @@ struct x86_cpu_id { kernel_ulong_t driver_data; }; -#define X86_FEATURE_MATCH(x) \ - { X86_VENDOR_ANY, X86_FAMILY_ANY, X86_MODEL_ANY, x } - +/* Wild cards for x86_cpu_id::vendor, family, model and feature */ #define X86_VENDOR_ANY 0xffff #define X86_FAMILY_ANY 0 #define X86_MODEL_ANY 0