Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp517493ybb; Fri, 20 Mar 2020 03:24:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs+ysgbwB7WvRfewih6yl61gEdnWdnBMiAU9cicY7ptw5CcqrIB2p5gk1+XyMaDYPhMABZM X-Received: by 2002:a9d:19ca:: with SMTP id k68mr6133818otk.232.1584699891188; Fri, 20 Mar 2020 03:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584699891; cv=none; d=google.com; s=arc-20160816; b=0+MMPLzTSIeP7km6hBzKG/pU5SA8s5nh2ApykAqL1qJDeY+mI0XIXO6H778vH1ufx7 WznCpjfRCgH089dqrnu28ZqlJo/rYYBxycxGCVU4Q1uS8q5HylG9Im+G2uA15hk5w3L3 O4hCpIkn3oMdS1XD+p21lHq5r7YVixShVECkDsZRRlebmLiheeWPal7nBoZAMP0a5tom Sq2A4c5xbMsp2FKJJWRJUd/SPNdVZW7GShZmRmS5XE4yQX5c0PLlZi2+OOUckbhTjCA7 TCP6LHM2aeqEH5VL+DtfhvdhabfHwUrqeOFZh2PR9wvFOoZhZe7fA+EPh2ebwslmVBBV IhHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vyhhz6FghQteSEhtJJWfsCZUYf+aRlWo3VlqFypg7N8=; b=w2hLXKZ2alJlir2B5JEFuuCY63CILnTkdV3uKn3LgjpsZLARlCGuDVAmPEfqAlcrqN avAFcFR1/wmDXd5XbC30xJ4u/LqWmSRMcxrbx2b9YHy4Wu5T0FFTXDBDeM7JTyYSbfWq L7ZaI9U2IgQ17HvkS09+tfYVWjy7uo/HizSYh4J5P5xE+nqgA5Hj5oqSBocHQq/Nsavw FIN9oOGEWfRs+AJS1iGG9LUALsAEqPpQRuXBbShwBY+pF2L2NvpvJAh7pq40T+gNMb3I YmHeslCwQxj+ScTJi+ysWzrvQwbPBD9x6fMdFsRxlQqS/MFwqaNyEXIME/z3EBiW7Hyu o4dQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si2903293otq.226.2020.03.20.03.24.38; Fri, 20 Mar 2020 03:24:51 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727122AbgCTKXK (ORCPT + 99 others); Fri, 20 Mar 2020 06:23:10 -0400 Received: from foss.arm.com ([217.140.110.172]:47072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbgCTKXK (ORCPT ); Fri, 20 Mar 2020 06:23:10 -0400 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 BF43131B; Fri, 20 Mar 2020 03:23:09 -0700 (PDT) Received: from [10.37.12.158] (unknown [10.37.12.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0B3393F305; Fri, 20 Mar 2020 03:23:07 -0700 (PDT) Subject: Re: [PATCH 2/2] perf: arm_dsu: Support DSU ACPI devices. To: tuanphan@amperemail.onmicrosoft.com Cc: mark.rutland@arm.com, tuanphan@os.amperecomputing.com, linux-kernel@vger.kernel.org, sudeep.holla@arm.com, patches@amperecomputing.com, will@kernel.org, linux-arm-kernel@lists.infradead.org References: <1584491323-31436-1-git-send-email-tuanphan@os.amperecomputing.com> <64AE7BB3-F2A9-4A62-82FD-FFF2D6B7101C@amperemail.onmicrosoft.com> From: Suzuki K Poulose Message-ID: Date: Fri, 20 Mar 2020 10:27:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <64AE7BB3-F2A9-4A62-82FD-FFF2D6B7101C@amperemail.onmicrosoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tuan On 03/19/2020 10:49 PM, Tuan Phan wrote: > Hi Suzuki, > >> On Mar 18, 2020, at 5:45 PM, Suzuki K Poulose wrote: >> >> Hello, >> >> >> Please find my comments below. >> >> On 03/18/2020 12:28 AM, Tuan Phan wrote: >>> Add support for probing device from ACPI node. >>> Each DSU ACPI node defines "cpus" package which >>> each element is the MPIDR of associated cpu. >>> Signed-off-by: Tuan Phan ... >>> +#else /* CONFIG_ACPI */ >>> + int i, cpu, ret; >>> + const union acpi_object *obj; >>> + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); >>> + struct dsu_pmu *dsu_pmu = >>> + (struct dsu_pmu *) platform_get_drvdata(pdev); >>> + >> >>> + ret = acpi_dev_get_property(adev, "cpus", ACPI_TYPE_ANY, &obj); >> >> Is the binding documented somewhere ? >> >> >> nit: Also, why not : >> ret = acpi_dev_get_propert(adev, "cpus", ACPI_TYPE_PACKAGE, &obj); >> if (ret < 0) >> return ret; >> ? > => I couldn’t find the device tree binding document of DSU anywhere. Is It enough The DT bindings are here : Documentation/devicetree/bindings/arm/arm-dsu-pmu.txt > to put a comment describing the acpi binding in the code or need somewhere else? The concern here is that we are simply trying to replicate the DT binding here, especially replacing the CPU phandles with MPIDRs. I am not an expert in the ACPI bindings, but I prefer ACPI phandle reference to the CPUs (which is much simpler) to MPIDRs (which is not that intuitive). And this is the same message that I got from our ACPI folks. Irrespective of what we end up with, this must be part of the "ACPI bindings" document here : DEN0093 - Generic ACPI for Arm Components x.y Platform Design Document So that everybody uses the same bindings irrespective of the OS. You don't need to document the bindings here with the Linux kernel code. Kind regards Suzuki