Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp88216ima; Thu, 31 Jan 2019 23:34:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN4RddpPK/SIyI+o0WI4KPm0Qw/1uQDqMIkpy1sapcPNNbLzvktdShOf+pkpC0rrqHrRzQcb X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr36432772plq.275.1549006480594; Thu, 31 Jan 2019 23:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549006480; cv=none; d=google.com; s=arc-20160816; b=C/MH2k1vSve5Nw8/2+o9GsprvcYpcAiY4RrlMtO7etkUlL5Uf0ivyEjj31gOh8bTq9 tjh7L4YFYy/Ckv7kfrzFqJlm1gru56HT/vVMllhfhEI+HCGmlQphH2Zu9l5o/atQgSF+ xF//MCh2ePLoGajbCcvRe3FcDjtol95qeEVzCvincMEDcEDZJze3dEwQpM8YkrgyjrQz Sjy5ZWMW4IYgm2to+mS66ap/YOPhagx0ftNZVektG0s6CMqoHRt4nWB3oVPdpXZoNxHf KdhXOt7pBCwa7dJ8COLmliH6im3VSwL8rRFbVhaF5m1jWJwqYHW1nlnYaFTIThxO7IEQ PP0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=LygI8SLBLG8jqyPbWa/Ou0SOYNIXcSkIYYweM4NlZNQ=; b=zHckRcySN/zxqYyYaBzyKo59cPiHlk8tt/xFCHsM+3klTwKPiESwLel6uImBBL3Cr+ 98+9aQcdN8IqiZQRIqNa3I9KJiXWsLmp7tlktRBaWO3yRAtXZHmS5pV7sTurcpljV5WL D2AB9OqUzskCx//qC/EQpQfbUQEpfnbR+FYThjNseIY1RyK/JiXxe4Hy5mpzEePcTr0J txJ63BkBFcgv5RQEbahu+vl8thZX4YQ5sJiI7diMpvqL90O7GiHCfnOMM97erfKQSUSU 4S58b74XSL5RouZ8srMFM+mvTkR9hQ0Of76CMdfD4zcTNX9MkkPFCEMkqNDpFUyY5GAG aVpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si6781586pgj.61.2019.01.31.23.34.25; Thu, 31 Jan 2019 23:34:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728158AbfBAHcx (ORCPT + 99 others); Fri, 1 Feb 2019 02:32:53 -0500 Received: from mga12.intel.com ([192.55.52.136]:57767 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727957AbfBAHcu (ORCPT ); Fri, 1 Feb 2019 02:32:50 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 23:32:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,547,1539673200"; d="scan'208";a="114430725" Received: from rajneesh-desk.iind.intel.com ([10.223.86.34]) by orsmga008.jf.intel.com with ESMTP; 31 Jan 2019 23:32:47 -0800 From: Rajneesh Bhardwaj To: platform-driver-x86@vger.kernel.org Cc: dvhart@infradead.org, andy@infradead.org, linux-kernel@vger.kernel.org, Rajneesh Bhardwaj Subject: [PATCH 07/10] platform/x86: intel_pmc_core: Convert to INTEL_CPU_FAM6 macro Date: Fri, 1 Feb 2019 13:02:31 +0530 Message-Id: <20190201073234.13280-8-rajneesh.bhardwaj@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190201073234.13280-1-rajneesh.bhardwaj@linux.intel.com> References: <20190201073234.13280-1-rajneesh.bhardwaj@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org INTEL_CPU_FAM6() macro provides better abstraction and reduces code size so use it instead of custom grown ICPU(). Signed-off-by: Rajneesh Bhardwaj --- 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