Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1843562rwo; Thu, 3 Aug 2023 00:01:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/Pxyw7VFMe/0nTvrJx88U5y8ZPq+Y+b9AvdltbY7wu80U/Vg4HVx2VW2eq2qRxfv5odWV X-Received: by 2002:a17:907:7801:b0:99c:55bc:3c9a with SMTP id la1-20020a170907780100b0099c55bc3c9amr1795328ejc.20.1691046117221; Thu, 03 Aug 2023 00:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691046117; cv=none; d=google.com; s=arc-20160816; b=AVmCojOlq3xhSj3TongfyQpFQcMO/6owGli4X6bNiU/mI/ZqEtVQBYWzJWN8UTGMrU AT6yVKamTduN5ZqvDzvHUG6UbFXF7D2v0oyimiWV+Gk8t74ab7HO28jT8N0WW1yEtWZe F1DUz6HAkKOxQdKUfjwSzI48Ba/9T6B1Om0sQhBsqz7WaXJtopRepGCAYj6laZpPUibl P7oiK8H5E/7qyFghaoG4i4unKXWmmIHA+2wkSHk7abMZftWNW6W61vLHEEgmLYd9yldH UPoLDLdkAvxlrQ8YSeMisZnCkdeN/2G8WEaR5Jfkjf9e2x/ZSFDn8jHZMp/DR6vZ+2il 5PKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=/up802i/43+Cj6yewPzS/L67fbfZvR94TZ454f4oB3Q=; fh=z4oOYeCZcoLPGwm9qi3VA/1xSJ1zCxLsYafzQfziqQg=; b=KyYeBLi/HQvtYlVcXiysWlW/58YEMQKO2fGbWoPdg0B7cYORtklp3qgUrRrNMJqZ+k 5bqlrOboZ+Gn2SBOjdXUgRvHXhbNPM8abOJDv1IDYC4mGKhW/Xpck8S5BSMYdBNdiN4y FpaMj7h+qtxW66O86gM9FFx3pWXAwd61mUmn4mt+jw36Kap6xVJ7/D9YC/FJqHRvLByD XW3vnH+PyIF9H3nbOY7NUauUHzheRrh15FoPEEf+qnK2QhMZKXSi9+jvQ+cNdvGAVGqY bTD0FOuW2cSglLE1X5+eZh1jTRrhg/Fyih2vdiGZq5fTGFXSuFDIx8Ax/k+DsBL5uJv3 aC5g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a1709062b4e00b00992acf1f370si12244701ejg.939.2023.08.03.00.01.22; Thu, 03 Aug 2023 00:01:57 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232773AbjHCGNh (ORCPT + 99 others); Thu, 3 Aug 2023 02:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231788AbjHCGNf (ORCPT ); Thu, 3 Aug 2023 02:13:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 177D8272C for ; Wed, 2 Aug 2023 23:13:34 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CCDF8113E; Wed, 2 Aug 2023 23:14:16 -0700 (PDT) Received: from [10.162.42.10] (unknown [10.162.42.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9CA063F6C4; Wed, 2 Aug 2023 23:13:30 -0700 (PDT) Message-ID: <89058c7c-1fed-60ea-7233-04187772a931@arm.com> Date: Thu, 3 Aug 2023 11:43:27 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH V3 1/4] arm_pmu: acpi: Refactor arm_spe_acpi_register_device() Content-Language: en-US To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Sami Mujawar , Catalin Marinas , Will Deacon , Mark Rutland , Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-kernel@vger.kernel.org References: <20230803055652.1322801-1-anshuman.khandual@arm.com> <20230803055652.1322801-2-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: <20230803055652.1322801-2-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/3/23 11:26, Anshuman Khandual wrote: > + /* > + * Sanity check all the GICC tables for the same interrupt > + * number. For now, only support homogeneous ACPI machines. > + */ > + for_each_possible_cpu(cpu) { > + struct acpi_madt_generic_interrupt *gicc; > + > + gicc = acpi_cpu_get_madt_gicc(cpu); > + if (gicc->header.length < len) > + return gsi ? -ENXIO : 0; > + > + this_gsi = parse_gsi(gicc); > + if (!this_gsi) > + return gsi ? -ENXIO : 0; Hello Will, Moved parse_gsi() return code checking to its original place just to make it similar in semantics to existing 'gicc->header.length check'. If 'gsi' is valid i.e atleast a single cpu has been probed, return -ENXIO indicating mismatch, otherwise just return 0. - Anshuman