linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
To: platform-driver-x86@vger.kernel.org
Cc: dvhart@infradead.org, andy@infradead.org,
	linux-kernel@vger.kernel.org,
	Rajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
Subject: [PATCH 07/10] platform/x86: intel_pmc_core: Convert to INTEL_CPU_FAM6 macro
Date: Fri,  1 Feb 2019 13:02:31 +0530	[thread overview]
Message-ID: <20190201073234.13280-8-rajneesh.bhardwaj@linux.intel.com> (raw)
In-Reply-To: <20190201073234.13280-1-rajneesh.bhardwaj@linux.intel.com>

INTEL_CPU_FAM6() macro provides better abstraction and reduces code size so use
it instead of custom grown ICPU().

Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@linux.intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 835ed6d333bf..d3752d75075b 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -25,9 +25,6 @@
 
 #include "intel_pmc_core.h"
 
-#define ICPU(model, data) \
-	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (kernel_ulong_t)data }
-
 static struct pmc_dev pmc;
 
 static const struct pmc_bit_map spt_pll_map[] = {
@@ -738,11 +735,11 @@ static inline void pmc_core_dbgfs_unregister(struct pmc_dev *pmcdev)
 #endif /* CONFIG_DEBUG_FS */
 
 static const struct x86_cpu_id intel_pmc_core_ids[] = {
-	ICPU(INTEL_FAM6_SKYLAKE_MOBILE, &spt_reg_map),
-	ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, &spt_reg_map),
-	ICPU(INTEL_FAM6_KABYLAKE_MOBILE, &spt_reg_map),
-	ICPU(INTEL_FAM6_KABYLAKE_DESKTOP, &spt_reg_map),
-	ICPU(INTEL_FAM6_CANNONLAKE_MOBILE, &cnp_reg_map),
+	INTEL_CPU_FAM6(SKYLAKE_MOBILE, spt_reg_map),
+	INTEL_CPU_FAM6(SKYLAKE_DESKTOP, spt_reg_map),
+	INTEL_CPU_FAM6(KABYLAKE_MOBILE, spt_reg_map),
+	INTEL_CPU_FAM6(KABYLAKE_DESKTOP, spt_reg_map),
+	INTEL_CPU_FAM6(CANNONLAKE_MOBILE, cnp_reg_map),
 	{}
 };
 
-- 
2.17.1


  parent reply	other threads:[~2019-02-01  7:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  7:32 [PATCH 00/10] ICL support and other enhancements for PMC Core Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 01/10] platform/x86: intel_pmc_core: Handle CFL regmap properly Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 02/10] platform/x86: intel_pmc_core: Fix PCH IP sts reading Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 03/10] platform/x86: intel_pmc_core: Fix PCH IP name Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 04/10] platform/x86: intel_pmc_core: Fix file permissions for ltr_show Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 05/10] platform/x86: intel_pmc_core: Include Reserved IP for LTR Rajneesh Bhardwaj
2019-02-01  7:32 ` [PATCH 06/10] x86/cpu: Add Icelake to Intel family Rajneesh Bhardwaj
2019-02-04 17:34   ` Thomas Gleixner
2019-02-05  3:51     ` Bhardwaj, Rajneesh
2019-02-01  7:32 ` Rajneesh Bhardwaj [this message]
2019-02-01  7:32 ` [PATCH 08/10] platform/x86: intel_pmc_core: Add ICL platform support Rajneesh Bhardwaj
2019-02-12  9:43   ` Anshuman Gupta
2019-02-12 10:18     ` Andy Shevchenko
2019-02-13 15:17       ` Bhardwaj, Rajneesh
2019-02-01  7:32 ` [PATCH 09/10] platform/x86: intel_pmc_core: Add Package cstates residency info Rajneesh Bhardwaj
2019-02-11 16:41   ` Anshuman Gupta
2019-02-11 18:31     ` Bhardwaj, Rajneesh
2019-02-12 10:25       ` Andy Shevchenko
2019-02-12 10:34         ` Bhardwaj, Rajneesh
2019-02-12 10:38           ` Andy Shevchenko
2019-02-01  7:32 ` [PATCH 10/10] platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown Rajneesh Bhardwaj
2019-02-05 18:06 ` [PATCH 00/10] ICL support and other enhancements for PMC Core Andy Shevchenko
2019-02-05 18:13   ` Bhardwaj, Rajneesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190201073234.13280-8-rajneesh.bhardwaj@linux.intel.com \
    --to=rajneesh.bhardwaj@linux.intel.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).