From patchwork Thu Apr 25 20:17:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Moger, Babu" X-Patchwork-Id: 792160 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2075.outbound.protection.outlook.com [40.107.220.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEDFF155748; Thu, 25 Apr 2024 20:17:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076255; cv=fail; b=Bipu0zhCdeWlepu6gWEVNEK+sdSz+C5HAhrZvVKM4WtaJeVeQy2osaQmWQZMGvY8EUiYgS4Fl18yhspyEbjAis7ws192P8geNu+nqzFDqCTPYdHeXlrVhWgwkRSGh4BdPzDYD6/spfRpt/g8oXDEpFZHn2r7bnUMn77W6dgb+qs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076255; c=relaxed/simple; bh=CvCaBzD2H3e7pJMwzDsMO1V8zTx8l5usKheSJfb+nHw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iHRonkPw5UYVaHPm8O3pEhVtIEccQK942tsX7FlHB397uHGF0J5bq5NR/TtnfAxMkfpPfPkiFC/EzOOCcBtQ8ujAm0EBUlTcIa7gSP8UhdfmOKptndMobkTm5iXSezhnpbc3+FjTW5Q58qLeMn0+WMc/doz3uFop/ZWlTb4ufhc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=U2LP3Rri; arc=fail smtp.client-ip=40.107.220.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="U2LP3Rri" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gfUI7Nh9ndfmUHqQSMEjrcGRNJmCPXtEAfxwHhhhr8OdT+dC2IPEF5jYcXHtM/tgf7g8wjAthgMIZo60WHmUmrw0adhuWlG4SdZtVnqVL6iIU9pddb2x70u2oFfrcsOMsU1o+HZPpiGDKriA7hevoLayGEQHVsRXgwewm19UxOOcQTRpeDydmVxQBV3/WQMC09RiYoJrHJrRg1j5hI7zcc3sfd9C41mS2RLEqEJr1WQfdB4pxI8zQBuNtpZ+ffDJ4Ci1Eo75XNJ7hpJ7aLjt905vnh3Q6p6Yt1j7RkmWZR63+gK5p+oq6P5SQanpL0/L9nU2FiGeRh849lKR9OK+Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RtOMxceJQIxZQnXwyscsv9sKZ15Jpxniu8V61HV8/hg=; b=a9wIbpCQsHvh3B0Z306kwgV7mweCi73402Iwsu9hWf4LDWWXjAgvCcJSdfBBm8NcLUBzfIwKWdUk55c4pDNfZWkGOzEhTakmhpz1BGv5a17t43MAbNwP8DK4sXZo85iIrKS4LeSFQTcub2CqX9nTTlaYlzd0v0A2BL9cC2N6qz7xyA8dDXczbp63sc5j9igRKVD8sTv3Ic+6+mGfNns/mkYPxsWWMrLUl6XfczIYd0hOYuOHRmLRlT9buAOyK6lQBDFNiQbmWFvICXMFF88jyAG1AKYdlzWNWDtnQ08a8lxiHX6+Rme/F6SgFqKcmFalyiparliWii8P/Z86miLv9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RtOMxceJQIxZQnXwyscsv9sKZ15Jpxniu8V61HV8/hg=; b=U2LP3RriPqrvS+xMrS4lF9iUkbpUXpeILuXVaIZ94tVKrVfwWESXl3DONrayrzDPIhxAbkpdMUTsOj5N/9lLCjYeru1EfV6vgylVTZPUR2WV8GlLHgPkRyuLJzmi8/n2fEwyNIkxv5wXu+WyHLI9EAXDenaSUtac+1BoH9cEr1M= Received: from BL1PR13CA0157.namprd13.prod.outlook.com (2603:10b6:208:2bd::12) by PH0PR12MB5645.namprd12.prod.outlook.com (2603:10b6:510:140::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Thu, 25 Apr 2024 20:17:31 +0000 Received: from BL02EPF0001A107.namprd05.prod.outlook.com (2603:10b6:208:2bd:cafe::17) by BL1PR13CA0157.outlook.office365.com (2603:10b6:208:2bd::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.9 via Frontend Transport; Thu, 25 Apr 2024 20:17:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0001A107.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Thu, 25 Apr 2024 20:17:30 +0000 Received: from bmoger-ubuntu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 25 Apr 2024 15:17:29 -0500 From: Babu Moger To: , , CC: , , , , , , Subject: [PATCH v2 2/4] selftests/resctrl: Pass sysfs controller name of the vendor Date: Thu, 25 Apr 2024 15:17:00 -0500 Message-ID: <406d1fbe6b480fbe13fd0b8c432cdc517a7bd8c1.1714073751.git.babu.moger@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A107:EE_|PH0PR12MB5645:EE_ X-MS-Office365-Filtering-Correlation-Id: 4542e6ab-a6a3-4536-391d-08dc6564bc15 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IaiGaSvbQFWPgG7PLKA6IQpK6FnaQWT3ILY3qzDZAv4QW6qzq8rj/7zXYhnDRcwmhQHP7MC54myjuDhjFp/mEXvMHqiOsSQlwL2J14ngXZWmt2fZYHyVqU/fhIs0uctElz/vYdF/9HYNMecaJL+dpwpkwQtlRlX3TcinOzIVw2SHee2NHnXeFt+zRst7PPNjmetzDGzkZaABGb/3LhE3QnBe4haKgJE2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CiQZ2ZRMU+C7CYlH2/OypOLSMnu2ht0UciPdoX2T8In1Ayz1XsZyaoAJRULzrqkgPYR4imGqQ6dloQI7sI+DyR5WlHlx4PlO2DV5DBqyLUT4q X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(376005)(1800799015)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 20:17:30.5941 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4542e6ab-a6a3-4536-391d-08dc6564bc15 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A107.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5645 Detect the vendor and pass the sysfs name for the vendor for searching the controller information. Signed-off-by: Babu Moger --- tools/testing/selftests/resctrl/resctrl_val.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c index a30cfcff605f..e3b09128ec3d 100644 --- a/tools/testing/selftests/resctrl/resctrl_val.c +++ b/tools/testing/selftests/resctrl/resctrl_val.c @@ -224,14 +224,24 @@ static int num_of_mem_controllers(void) { char imc_dir[512], *temp; unsigned int count = 0; + int ret, vendor, size; struct dirent *ep; - int ret; + char *sysfs_name; DIR *dp; + vendor = get_vendor(); + if (vendor == ARCH_INTEL) { + sysfs_name = UNCORE_IMC; + size = sizeof(UNCORE_IMC); + } else { + perror("Unsupported Vendor!\n"); + return -1; + } + dp = opendir(DYN_PMU_PATH); if (dp) { while ((ep = readdir(dp))) { - temp = strstr(ep->d_name, UNCORE_IMC); + temp = strstr(ep->d_name, sysfs_name); if (!temp) continue; @@ -242,7 +252,7 @@ static int num_of_mem_controllers(void) * well and hence the last underscore character in * uncore_imc'_' need not be counted. */ - temp = temp + sizeof(UNCORE_IMC); + temp = temp + size; /* * Some directories under "DYN_PMU_PATH" could have From patchwork Thu Apr 25 20:17:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Moger, Babu" X-Patchwork-Id: 792159 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96389155A5C; Thu, 25 Apr 2024 20:17:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076269; cv=fail; b=J3VjPuL2ITy0gW7IkaKGER+8LSjFkSC9l9ybT1KVy2jjSGXWFLWQNzgiZ+b80h0Q2W8qcaVf/4VuJxaHNtt0rNtklENODrP+KeXH8rYlLHj4t47dMRc6rinn0MgeJAxWtuc40EeD3vgMEXgQl7aWx8ZGtOJHeBJikyW66CBr6KE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076269; c=relaxed/simple; bh=LXoin37qgEkVJdwTQcMoYiS7oQSmQULIvjCq1shD+mg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jpuzMD0jBWDuB1CRBoVw122Xoam+tMhLVt7p3KyPeIJoBgeiS9ESEX8RSwN3FVegAl86jbNMCzri4y5WTo3fSTzLZQN6kuIYYd0zMy7tLJaN2Rc7G6dao9TEH4fZrMUL9jx2uAv0J9mX7RpDATpfV6cHi5GBC4WHrKFz3nGfM+8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=kFuuMhBy; arc=fail smtp.client-ip=40.107.93.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="kFuuMhBy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AhKqg7R650HSgggMmBbO73qwQNfNrfPV4WQn5lk7toaqV92F9m3sU9F3gRf9S8o/XH2kZ/9hIYX3Miho2INulyi0yWYDYWZ84SRP6w14PzmQpZdit1MoGOFHaON5gO9MPupaWOPGD6i83isdu0FzEGQEPxdyCk17Of7DgGhro4aN9ulFUWsEGsyFqokcvy1RcX7bUmQmH275pt48UrPaJkbxpghWucCHGbUauG6IwGImmRC4e/qF0DLdQ6k8WpocoCm/HECreXtxcnTPy0X6AHbmuItHuKarehUziGd95kz9Z3aw9JAkfgfANcTXa191SqrNNAsFbfLuYEeN/ZI/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kR6tOkEDTn+WRNMLroYN9wIXzBVLOZUT0XkQs5MhFL4=; b=ZqsilSE78zlSQLOpwOyXD7jtUbjHeUW/pvKA/mnK0sHkrBE0HTm7r6OUXfGz3OiSlet2RedZToNIYbCLMG46+NlU5bxLhgm8dXrevY6+U3MjLyNtR1X1yQK7/olamg/uyYyw36RMET6VG0RmE+y2lSUp03W7yrR2d1krGEFdXhBPYleIs/wPycm5Az49KRzASL4CVHCB13Vz8bjrnZUY6GBS5UOcmF51+3I4+OnhIihSah95QLQ3mI7x7E3GQW/iflt38QjQmoP1lL/WwhDidIuk10BJRPJMwIyPfZmbsZcPYZIVIVcRo9NjS8iKYYZBQi2Rfa1T2VQBqtEOmav+mA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kR6tOkEDTn+WRNMLroYN9wIXzBVLOZUT0XkQs5MhFL4=; b=kFuuMhByCXTlHT4VZLGtlt+zwmclqHraQviWNcy/Zhy9Vb8MlxDW40Fcw2NX+652IvELUiXhMWdvcTYwIFg8/aBuJPOdj51XgkwCZAgD2jo4lGtFdbWJuVm49/Vh0A3Bz2matkAOUsBCjohzHVswzRsBvYVVAg5pc8/tctu7+WY= Received: from MN2PR07CA0019.namprd07.prod.outlook.com (2603:10b6:208:1a0::29) by CY8PR12MB7121.namprd12.prod.outlook.com (2603:10b6:930:62::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Thu, 25 Apr 2024 20:17:45 +0000 Received: from BL02EPF0001A108.namprd05.prod.outlook.com (2603:10b6:208:1a0:cafe::5a) by MN2PR07CA0019.outlook.office365.com (2603:10b6:208:1a0::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.35 via Frontend Transport; Thu, 25 Apr 2024 20:17:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0001A108.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Thu, 25 Apr 2024 20:17:44 +0000 Received: from bmoger-ubuntu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 25 Apr 2024 15:17:43 -0500 From: Babu Moger To: , , CC: , , , , , , Subject: [PATCH v2 4/4] selftests/resctrl: Enable MBA/MBA tests on AMD Date: Thu, 25 Apr 2024 15:17:02 -0500 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A108:EE_|CY8PR12MB7121:EE_ X-MS-Office365-Filtering-Correlation-Id: 378762d9-7e9f-4607-d8f1-08dc6564c464 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X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uQumqSHeyiivi2rs6lm93YYL/NPUZTwW0Oo2gWf2bnODl1zUuV+EVFT5O6EM8M34oN3dMXyxKGf5aUU05FDyETgEVoeoYq364HcETDDUYQDsEsgF9zVw0iGiWAKLntQPvvjHqckDwlieeRrTTuOoCQ/4y6vYZwHr6D3Ff2thFH2VZwG9q4gXY3N2gGlXh0t+S5BexqkU6ZHCU3QJiJpYPui7AcedYU+NB80nXBpBiypytm2+J/C7nxfTtSe7rWRjx+8DU13DpT4aeowGopqCi3p8H6lR0IMuJ7SYwV7L3/DDHjiX5vIFeJUwpVupWqZWvXYUQhbhEh6cOo+ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(36860700004)(1800799015)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2024 20:17:44.5377 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 378762d9-7e9f-4607-d8f1-08dc6564c464 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A108.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7121 Enable MBA/MBM tests if UMC (Unified Memory Controller) support is available on the system. Tests will be skipped otherwise. Update noncont_cat_run_test to check for vendor. AMD supports non contiguous CBM masks but does not report it via CPUID. Signed-off-by: Babu Moger --- tools/testing/selftests/resctrl/cat_test.c | 2 +- tools/testing/selftests/resctrl/mba_test.c | 1 - tools/testing/selftests/resctrl/mbm_test.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 4cb991be8e31..b682eaf65bfd 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -314,7 +314,7 @@ static int noncont_cat_run_test(const struct resctrl_test *test, else return -EINVAL; - if (sparse_masks != ((ecx >> 3) & 1)) { + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) { ksft_print_msg("CPUID output doesn't match 'sparse_masks' file content!\n"); return 1; } diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c index 7946e32e85c8..353054724fa7 100644 --- a/tools/testing/selftests/resctrl/mba_test.c +++ b/tools/testing/selftests/resctrl/mba_test.c @@ -177,7 +177,6 @@ static bool mba_feature_check(const struct resctrl_test *test) struct resctrl_test mba_test = { .name = "MBA", .resource = "MB", - .vendor_specific = ARCH_INTEL, .feature_check = mba_feature_check, .run_test = mba_run_test, }; diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index d67ffa3ec63a..f2223315b5b8 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -147,7 +147,6 @@ static bool mbm_feature_check(const struct resctrl_test *test) struct resctrl_test mbm_test = { .name = "MBM", .resource = "MB", - .vendor_specific = ARCH_INTEL, .feature_check = mbm_feature_check, .run_test = mbm_run_test, };