Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5516585pxb; Mon, 7 Feb 2022 03:59:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsio7uCMSDnZNCDaDCer7jLC2+StVT+TVLjF4ppGFOvkgQq2xvIxujFIsXLowQtCMnquHQ X-Received: by 2002:a63:b90f:: with SMTP id z15mr9322644pge.73.1644235170324; Mon, 07 Feb 2022 03:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644235170; cv=none; d=google.com; s=arc-20160816; b=R8Em+OfTk7Gff3qz1IrlaFvFiBn1iYFcyTdvJiuAe0W6SR5kLGkBC9izWcwzYw8tMV ohRTAdLrv0go2rI9C1y5EfjFMwhzlq8oxZ3a3WlSbb2oidJBdFDwXhTWH6e2vHQnNjAx +kv5FRXTj3VfBtTOB4VloMc8TJvslzz9lQeKL9IHCNwG+k6UkY98vHSTNWhEuy0yqchC 0bcPCAcPrRMF+0cmVDV+Sjtr/q3o8loTgc4VBjg38K+ZPu7YfNEd3qrIXZNNp8K/MiQ3 +z23r08NnH6B/b6+iQAQmxH8NoX6f7l4sMTT5Z9T0Iq0gLvX48SzxlBDiF+LHmlnsi8f MdTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9sLtnZmntxa8TOZQbHDjIf0HwB32xxn5RiLTWorE+us=; b=rdBLUKOMqU8oNqo3WCdvjbwdgaOxvm7KhAffN01X46bOGeb6p8k9bKXypOxbK+6kof 7FKEOxjJ7CIXRxhIGZoSsOEsR4R49CQS4RIRxcGaqzPCYsWa/+wpT2rw32WpK5iZkViN p6ZkobjIYD3/DZ81tVg+3OaCOjGxTBYwd+/kUcz3WizxtIPJGUCJbdyISipURMcg24cD kF+awcrLU0nPhOqvPgTSspXxKJqUBQmqynVGnVLwcy/D2lX3wLq6T4GRuEIzB54SAEmj jviEXsLbtN+hDhjdqVxQ2a1q/bWIFf+rjkVF2y7nHTmf0hpQquloO5FjuMoflzbayvWW oPow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZhvrEyrd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e123si10123700pgc.862.2022.02.07.03.58.55; Mon, 07 Feb 2022 03:59:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZhvrEyrd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232277AbiBDTSC (ORCPT + 99 others); Fri, 4 Feb 2022 14:18:02 -0500 Received: from mga11.intel.com ([192.55.52.93]:61194 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbiBDTSA (ORCPT ); Fri, 4 Feb 2022 14:18:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644002280; x=1675538280; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=n8C5babs3ZkUMBv/nFFD9Th7rXCW1erD1QQPKYBJ0M4=; b=ZhvrEyrdhxUzGgdKhWpdRWKC9Zak42FFay9JzQQ7VYhxjxLQOf+1bXRt 71qO7Us2A2SWCetd97zw/V39SrVwd3tZgIeGbnb4KvZvUuYZc3M1lkjlx qC1uiQWYiDQIjOvL9HPqwmXrGBTabUG+H4zGNaQ7ktBWs1xtqfgzS3QMQ 6mychpwHabOv92UKYCtqQ3ZbvPSn+R1kEOFwJ3flu9BzPRysK3rVeaj5w ndRXekg9RnqmhZejeU1xmdKSzB5s/kiq/B3n+6TIaRZ4rRAWgFk7uOwo6 rcItNkSKi0I9z5VjnM2029m9aYD6v1H96svHDsUjIQrKxQ1CDpVR3dylW g==; X-IronPort-AV: E=McAfee;i="6200,9189,10248"; a="246017063" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="246017063" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 11:18:00 -0800 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="524412811" Received: from rchatre-ws.ostc.intel.com ([10.54.69.144]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 11:17:59 -0800 From: Reinette Chatre To: shuah@kernel.org, linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Reinette Chatre , Dave Hansen , Ram Pai , Sandipan Das , Florian Weimer , "Desnes A. Nunes do Rosario" , Ingo Molnar , Thiago Jung Bauermann , Michael Ellerman , Michal Suchanek , linux-mm@kvack.org, "Chang S . Bae" , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andy Lutomirski Subject: [PATCH 0/3] selftests: Remove duplicate CPUID wrappers Date: Fri, 4 Feb 2022 11:17:08 -0800 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A few tests that require running CPUID do so with a private implementation of a wrapper for CPUID. This duplication of the CPUID wrapper should be avoided but having one is also unnecessary because of the existence of a macro that can be used instead. This series replaces private CPUID wrappers with calls to the __cpuid_count() macro from cpuid.h as made available by gcc and clang/llvm. Cc: Dave Hansen Cc: Ram Pai Cc: Sandipan Das Cc: Florian Weimer Cc: "Desnes A. Nunes do Rosario" Cc: Ingo Molnar Cc: Thiago Jung Bauermann Cc: Michael Ellerman Cc: Michal Suchanek Cc: linux-mm@kvack.org Cc: Chang S. Bae Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Andy Lutomirski Reinette Chatre (3): selftests/vm/pkeys: Use existing __cpuid_count() macro selftests/x86/amx: Use existing __cpuid_count() macro selftests/x86/corrupt_xstate_header: Use existing __cpuid_count() macro tools/testing/selftests/vm/pkey-x86.h | 22 +++--------------- tools/testing/selftests/x86/amx.c | 23 +++++-------------- .../selftests/x86/corrupt_xstate_header.c | 17 ++------------ 3 files changed, 11 insertions(+), 51 deletions(-) -- 2.25.1