From patchwork Fri Aug 31 09:10:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10583455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D16A5A4 for ; Fri, 31 Aug 2018 09:12:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C5328727 for ; Fri, 31 Aug 2018 09:12:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44BC62966F; Fri, 31 Aug 2018 09:12:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4F1D2B43A for ; Fri, 31 Aug 2018 09:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727552AbeHaNTX (ORCPT ); Fri, 31 Aug 2018 09:19:23 -0400 Received: from mga17.intel.com ([192.55.52.151]:7735 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727292AbeHaNTX (ORCPT ); Fri, 31 Aug 2018 09:19:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 02:12:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,311,1531810800"; d="scan'208";a="253428341" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 31 Aug 2018 02:10:19 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E135A173; Fri, 31 Aug 2018 12:10:18 +0300 (EEST) From: Andy Shevchenko To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Ard Biesheuvel , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 1/4] x86/cpu: Introduce INTEL_CPU_FAM*_NODATA() helper macros Date: Fri, 31 Aug 2018 12:10:15 +0300 Message-Id: <20180831091018.17543-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.18.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These macros are often used by drivers and we have already a lot of duplication as ICPU() macro across the drivers. Provide a generic x86 macro for users. This adds no driver data variants. Signed-off-by: Andy Shevchenko --- arch/x86/include/asm/intel-family.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h index 7ed08a7c3398..093014aceb65 100644 --- a/arch/x86/include/asm/intel-family.h +++ b/arch/x86/include/asm/intel-family.h @@ -83,10 +83,16 @@ .family = _family, \ .model = _model, \ .feature = X86_FEATURE_ANY, \ - .driver_data = (kernel_ulong_t)&_driver_data \ + .driver_data = (kernel_ulong_t)_driver_data \ } #define INTEL_CPU_FAM6(_model, _driver_data) \ - INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, _driver_data) + INTEL_CPU_FAM_ANY(6, INTEL_FAM6_##_model, &_driver_data) + +#define INTEL_CPU_FAM_ANY_NODATA(_family, _model) \ + INTEL_CPU_FAM_ANY(_family, _model, NULL) + +#define INTEL_CPU_FAM6_NODATA(_model) \ + INTEL_CPU_FAM_ANY_NODATA(6, INTEL_FAM6_##_model) #endif /* _ASM_X86_INTEL_FAMILY_H */