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 v3 2/5] platform/x86: intel_pmc_core: Convert to INTEL_CPU_FAM6 macro
Date: Thu, 14 Feb 2019 17:27:09 +0530 [thread overview]
Message-ID: <20190214115712.19642-3-rajneesh.bhardwaj@linux.intel.com> (raw)
In-Reply-To: <20190214115712.19642-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
next prev parent reply other threads:[~2019-02-14 11:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 11:57 [PATCH v3 0/5] ICL support and other enhancements for PMC Core Rajneesh Bhardwaj
2019-02-14 11:57 ` [PATCH v3 1/5] x86/cpu: Add Icelake to Intel family Rajneesh Bhardwaj
2019-02-14 12:25 ` [tip:x86/urgent] x86/CPU: Add Icelake model number tip-bot for Rajneesh Bhardwaj
2019-02-14 11:57 ` Rajneesh Bhardwaj [this message]
2019-02-14 11:57 ` [PATCH v3 3/5] platform/x86: intel_pmc_core: Add ICL platform support Rajneesh Bhardwaj
2019-02-14 11:57 ` [PATCH v3 4/5] platform/x86: intel_pmc_core: Add Package cstates residency info Rajneesh Bhardwaj
2019-02-14 11:57 ` [PATCH v3 5/5] platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown Rajneesh Bhardwaj
2019-02-21 14:25 ` [PATCH v3 0/5] ICL support and other enhancements for PMC Core Andy Shevchenko
2019-02-22 3:43 ` 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=20190214115712.19642-3-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
all inboxes | Powered by JetHome®