Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2493037rdd; Fri, 12 Jan 2024 11:03:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9Uj2yCqEkKhi0Aco+f4iXoIzgcOjx7pjQ7MYLnkJMmgqNEq/oUdjPA66kwtPXRPm0gOjk X-Received: by 2002:a6b:e515:0:b0:7bf:199a:bcd6 with SMTP id y21-20020a6be515000000b007bf199abcd6mr2006145ioc.41.1705086195936; Fri, 12 Jan 2024 11:03:15 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a63-20020a636642000000b005c626072edfsi3701147pgc.773.2024.01.12.11.03.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 11:03:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZpW1Fn8; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-24990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 730D9282653 for ; Fri, 12 Jan 2024 19:03:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E7CD15ADB; Fri, 12 Jan 2024 19:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EZpW1Fn8" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (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 8863614F72; Fri, 12 Jan 2024 19:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705086185; x=1736622185; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=JG02LSAWGgXJbaiCiat4WdO+NGn0CHtuxYaS3LMLOs8=; b=EZpW1Fn8YI0YaH+r33WPgQrLOKY1DjwYCwQCSBBRp0AfAwEQ0bBYXTcl p/luxOQTXdP8mLwY27zOoI23FnZ6x2cTrkxIQlUCLzdYLZc6597LGRUyl d/wha7gbkKFTg+nAFhkwkVeP16cHHbziEX0i7GNv/f1nlY5nVbHEOTkUU f+SAlCwe4qRREt5Q33PdojYRPIObweGXwNX31bMv11eduyU31IXJKZq/c WIco+LYSO5p85JlNkM/I4DY5bP50BxM7AxEkRgl+SXRcHCzQIzGKPHgmO YdwveelSrSDiQRR7k5PfcMXDAKcvBZ0PqzTKnI7p7tRz9/wHFQEoMnabm Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10951"; a="398936865" X-IronPort-AV: E=Sophos;i="6.04,190,1695711600"; d="scan'208";a="398936865" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2024 11:03:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,190,1695711600"; d="scan'208";a="25086670" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Jan 2024 11:03:03 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Jan 2024 11:03:03 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Jan 2024 11:03:03 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 12 Jan 2024 11:03:03 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 12 Jan 2024 11:03:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TOhYyZoFqYttrV5COqTAn8f3d1ScmLttIqaCKsyYRcZp53b6EyGwm6DOY2Y3eAik9oau7ecrJNFXoFURIEkd1GpwCHxwDB4bIzQjG5eKQUVtXNVR1CE+FaubMLU9bgY+xc/RyWiybPIkmFYYMOk9gmxvydCfkVM2yWvNRkpNxHjKNmaSkHB47zdwTrbUDCzuBJUTw6FqEoLuXPDHRlhRRgh/rbXFyfCujAKoxyQHGiSbe7/LJEd1TFbfRASMQ7npsPZXR73Hrg+o0MEWCe76Wes8zSXF53ay0+692cvKpPDpGITOx7BNY7I+h6p4/fkXtG6p8u7UBFwtPrN1Y3BGrA== 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=eB4dswXgTlvC8SvcWICl+Fjo0Eqt5hOCY+4ntEywYYI=; b=KO7rhHssMO4STRkz/v66ra0EcGCH0sVCEBVLImZ1PZBMR9NlVL3HU0WycDoxI2Bn4ZJF6OP/nV0jxZ1PG0cS+FVWZrV0cum/G+ZkFjFPi0z4D7C3Q0RtreRQrak9UyCE3Borxwp8ZoHCXEl8SOcIRwse7yqMiKD4GiuQHqugjinxo5d0k85FP2TVQJsfNmPg96Kz12+p773MQP514bdkr1uvCp6vPdXSYdctklgSFa/AFX5edjXZH0PzC+Av7FVaeInZGx8dQ3lRp7l5IEaUCphZhcL3zZbJlo6QbmRvrjN3PKvX6LysW+6SUr8fmS5SznPMtawiKz4fWzuouWv+Pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) by DM4PR11MB7181.namprd11.prod.outlook.com (2603:10b6:8:113::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.24; Fri, 12 Jan 2024 19:03:00 +0000 Received: from SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::c903:6ee5:ed69:f4fa]) by SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::c903:6ee5:ed69:f4fa%7]) with mapi id 15.20.7181.018; Fri, 12 Jan 2024 19:03:00 +0000 Message-ID: <4c5bb5ac-1e84-4021-845d-cafea5a1fbde@intel.com> Date: Fri, 12 Jan 2024 11:02:56 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] x86/resctrl: Read supported bandwidth sources using CPUID command Content-Language: en-US To: Babu Moger , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , References: <20231201005720.235639-1-babu.moger@amd.com> From: Reinette Chatre In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0045.namprd04.prod.outlook.com (2603:10b6:303:6a::20) To SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB7573:EE_|DM4PR11MB7181:EE_ X-MS-Office365-Filtering-Correlation-Id: fbc45abe-1196-442f-e2ba-08dc13a11845 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qB5kzEQtHePhcKuH/dq+8GT4it6rM/RakCCTTGY7KMNf7BbGm3M0220Fx+OlvLBtDpPb8VikrT5/JZzZkBJhvMO6JL21NkmMSynv0a7GbqQ92X9d8/Hk5u4B23I0oAsc+i79yL1VDmJF73ThsqRW1RmDJ19BjOaT9tMKQWT+6Ai16eX/BQqATQ//b18PrCO/5qzUwUQS2yC9ZlSvby6hjwEerswZvWOUg3XK/yEw7QJmnQWE1WbJzZS0Ab2CXWrjPLiRMTVwt/D6p9eBLXt4QR2j8+EB9aUm1C2Imw6dPedpOeIo94kZT1aNm6T08iiYmcPujhWn+A5cv730R4wRP5MI5lSejsmcv6ReZoExOSrOpa/mJWpFqAMtCrPHDtK25Q1fny2Jk5nm+tbpBMFBf5dNDj4Emi8SOrpqK1QCBwM47GFykQthQmEXYGNsrVRHN7Ih0I0NyIdpjYRO5JegGq/zwMBA/0BBNqu8xvBiS8io/MtlSYgQ6apNkW/NRw4OS+zQ/kbwyjpRRj5C59+22GNcOUI5kNgU6YK4NkGEt9aClYBR55ehOpRp8oEVwTJHFbAIRBHRJZ43MaYVLZ731daacYX8wLX6yj/TT+F+hqrdDPylPcyW0lSmBwba/RF+C122nJv406M1az1NZqhuxA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB7573.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(366004)(346002)(39860400002)(376002)(396003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(36756003)(83380400001)(6512007)(316002)(26005)(2616005)(53546011)(6486002)(38100700002)(8676002)(4326008)(8936002)(66556008)(7416002)(5660300002)(966005)(6666004)(6506007)(478600001)(66476007)(2906002)(44832011)(66946007)(41300700001)(82960400001)(86362001)(31696002)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N0JuTFpNYjd3a1VGaGtNMllqeElJRWtzVkNaaHZqWG53WUJEUlRPRklQNGI2?= =?utf-8?B?dk9RdjBjTWVFY1NtZkVjcG1LbXZLTzBDM1JieUJyYUJZeUI2Si9GRThPYkp5?= =?utf-8?B?NWJSY2dQUjRCWWhoY0RZWnd2dGEzQld2bW42bmJGZ0RpRExEaU1jK0dWRGNH?= =?utf-8?B?bWE0OTgwYVpIMXFoRnRKVklWai9LOXg0UXVGcFI1OEZjbmxnazFmMDUwdHNi?= =?utf-8?B?ZTZ0NU5RWGo3YkdGOStXUXF2Wk1MYmZ6Y3dyQW1aeGt2S05EY0ExL2tpTmxW?= =?utf-8?B?N2tzYUdDN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T3NBVjNmS2JqL1VL?= =?utf-8?B?M1JqLzNlS2tPZ3ptcEZGWmRSYUhwcGRYZEY2bmFQM1J5N042azZEbGlkbE55?= =?utf-8?B?dnc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: fbc45abe-1196-442f-e2ba-08dc13a11845 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB7573.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2024 19:02:59.9747 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hEB5LsTknklMke20lnFozvPicV8wf04cMgGGDhncQoOVZ+AMnHd1aYCPqSMajjTtiancKIYEu77uUKgFJDbN/gdeElqIqDuE4j8rdFEckzA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7181 X-OriginatorOrg: intel.com Hi Babu, On 1/11/2024 1:36 PM, Babu Moger wrote: > @@ -1686,6 +1681,13 @@ static int mon_config_write(struct rdt_resource *r, char *tok, u32 evtid) > return -EINVAL; > } > > + /* mon_config cannot be more than the supported set of events */ copy&paste error? There is no mon_config in this function. (copy&paste difficulties reminds me of [1]) > + if ((val & hw_res->mbm_cfg_mask) != val) { > + rdt_last_cmd_printf("Invalid event configuration: The maximum valid " > + "bitmask is 0x%02x\n", hw_res->mbm_cfg_mask); checkpatch.pl should have warned about this split of text across two lines. Logging functions and single strings are allowed to exceed the max line length. If you just merge the two lines then checkpatch.pl may still warn for resctrl strings but that is because it does not recognize rdt_last_cmd_printf() as a logging function. You can also just shorten the string so this patch passes the checkpatch.pl check. For example, "Invalid event configuration: maximum valid mask is 0x%02x\n" or "Invalid event configuration: maximum is 0x%02x\n" or ? Reinette [1] https://lore.kernel.org/lkml/cc273d98-d73c-49bd-8799-b119966e226c@amd.com/