Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp244446imj; Wed, 13 Feb 2019 07:39:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IYDdVv/wMplRFoXyTyfiM6RZUnYPjyp4JU67SQ5XY3MDadozQCavyo6NleKMv5mq5IBq8YR X-Received: by 2002:a63:eb0e:: with SMTP id t14mr978062pgh.445.1550072357120; Wed, 13 Feb 2019 07:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550072357; cv=none; d=google.com; s=arc-20160816; b=bprNVJX2FhquxhEVnp0G7Z3GcBQ7YQ6vQsswTeXrDFbcTGj/VPCBGnJUOoS3EOKni0 6Od2GRjp3MQ4k9xQnCh0iqOPDeMMKnCI0jbwLQJ8MyUqaegI1FvZTj+e/f3jTqSFG7RQ D4FzwZjcZfvlHdUz7mFB2OEtkXz58sdauniiIF9hFg4519bwkL2QrdUrAmBqR8tetCQ6 YzHUDeGRYItIzp/LMC3gkH7dnr+KnY7AMnjOtLg2Zh+SybbTVSbzYpweocBTJ22Gs8UU 82Dpx2Vw58uZPGCj9SSmLUqKbUiao4I0T7hHXPMxaWm2oTDVQ9Gx7R+NK2Y3f7mcPyEQ YP8Q== 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=f6PO9E4kFnj6meAdPz/G2/D2zQrqK3xAxOzIddv9l+zv2+tuj80rqvzrdvAjjsUPQ0 ooxyBTvb+AA/bvrufD4rctcyohOCzsHcSnSV0z4xo6cEM33KmcvCDae5NfTrQX/lbrfl qUyCElyRDEfY11jtRg0jS8nSrdfzZoAdjdG8IGHMIDNuLro3E5BTzueqibmPAGYxaLLE ZLHVAmgQG5XsJi/2+mXi1YUo0tnWyPFM3kH97yqobXbZt0itZOCUg3ivGgxS6NWI4q/x HhM61Q7zzmvcCqYJ2JPnYS/hGVD1QTFselv22Iyc7k07a5hdFgmxo6yxJb/O0YMrVLRQ Cl/w== 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 o8si666056pgn.469.2019.02.13.07.38.57; Wed, 13 Feb 2019 07:39:17 -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 S2404240AbfBMPIP (ORCPT + 99 others); Wed, 13 Feb 2019 10:08:15 -0500 Received: from mga06.intel.com ([134.134.136.31]:11815 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404233AbfBMPIN (ORCPT ); Wed, 13 Feb 2019 10:08:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2019 07:08:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,365,1544515200"; d="scan'208";a="299437330" Received: from rajneesh-desk.iind.intel.com ([10.223.86.34]) by orsmga005.jf.intel.com with ESMTP; 13 Feb 2019 07:08:10 -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 v2 07/10] platform/x86: intel_pmc_core: Convert to INTEL_CPU_FAM6 macro Date: Wed, 13 Feb 2019 20:38:07 +0530 Message-Id: <20190213150810.32750-8-rajneesh.bhardwaj@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190213150810.32750-1-rajneesh.bhardwaj@linux.intel.com> References: <20190213150810.32750-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