Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp49421imj; Thu, 14 Feb 2019 15:06:55 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1pOG3hIiO/8pzWb/5R+1V0nZwR0f/fS/XlrGOJLdQwBoI2UdUjshasgkr/RCoWccaKh0o X-Received: by 2002:a17:902:e087:: with SMTP id cb7mr6807687plb.313.1550185615843; Thu, 14 Feb 2019 15:06:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550185615; cv=none; d=google.com; s=arc-20160816; b=zBBZuvHxx9y0DfUSal8+7gPT3E/0A5Dgbx3zZtRlp35jfNkvTu9EtZhaZAbc6md4Ha CF3JSrXVuE00kXnfsW94h/CwBh33d5CDo+oF8h/q1lWaa/WZ/mvqYfBUaxGP3C5DFjhJ 8YQ7PrLp0iMx3yrvwtsYFp7lFIFXh+QeGPubE5crUgz31cjqyT1HxLnsp87iCvD540lF jiCom56UTpTYnh0WuP0Di23yyDV4/yTWXDLHgaUH9OHElzQ+sBH+z3lmbGmnSeNR2upt 4JDmVIeNI5dPfbG0KFkUhB/zfk2RLcusH1ltuP1SmJX99fVqlW/7Bhn4b+8hAcqrTV1n qdCA== 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=O+n2Ragc0Ik3sydd+JOTq6zVf9jo7KCZPGCldiVtjjY=; b=wtSXBlXRVDQDT5GDjykcWGZKGeVwB0sqFdIhduUOcnnhlp0IEOJI9+4XMPpDf+30nl smKoZX9go2SRNYke+Ai+15mvMB66vPzj6b5hFXbi8BQwPRsjGfE3gUTwalKq1ZSdDL7e E7qzs6ygwy15Glh26LnftLMIwgiZkLjoyPo/cHTw3DE3CNqgJO2C2Fv80ZyLckN37AEs mzjVmoUHumNoUQm7mdedWUZ8KJ0Mz6FdjyblbDH2zA2hnPtYsRAREfDW2WginU3sye4Z pURs8n2hB8hAa9Uh8YR7qbjiXOu0biQcxtNl5CrQ8zyEj5x7DzBHDZaht6aCDJxYcmBu veiA== 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 h11si3991712plb.38.2019.02.14.15.06.38; Thu, 14 Feb 2019 15:06:55 -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 S2394056AbfBNL5B (ORCPT + 99 others); Thu, 14 Feb 2019 06:57:01 -0500 Received: from mga17.intel.com ([192.55.52.151]:51463 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391608AbfBNL5A (ORCPT ); Thu, 14 Feb 2019 06:57:00 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 03:57:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,368,1544515200"; d="scan'208";a="122400493" Received: from rajneesh-desk.iind.intel.com ([10.223.86.34]) by fmsmga007.fm.intel.com with ESMTP; 14 Feb 2019 03:56:58 -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 v3 2/5] platform/x86: intel_pmc_core: Convert to INTEL_CPU_FAM6 macro Date: Thu, 14 Feb 2019 17:27:09 +0530 Message-Id: <20190214115712.19642-3-rajneesh.bhardwaj@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214115712.19642-1-rajneesh.bhardwaj@linux.intel.com> References: <20190214115712.19642-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