Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1822026rwo; Wed, 2 Aug 2023 23:29:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlFINq8Ch1A6Izf96KVIYNVcwUJDKTPYSFlC4Ryli47K1GwPvfxDQjDSHUpKK1sojPIpLiLa X-Received: by 2002:a17:906:8a52:b0:99b:f4fa:805f with SMTP id gx18-20020a1709068a5200b0099bf4fa805fmr6317660ejc.28.1691044198839; Wed, 02 Aug 2023 23:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691044198; cv=none; d=google.com; s=arc-20160816; b=PYDXv+NjlPQGM3Ol8YOXdgNvSs/3U4P60/ncOKw44+tEgZLNAEzJ0pEZVZyBJDo/uz 79G+qkuhXkSVdVsCpV3VcbEeABgJbIpi9KsPxtNiHxDoUAYOKDLfzxdCJ2zJqb3gSeha CTKlZ6pQG7fPgGXiu9HLATbSMr/JN+Dq2to9P1ezRVHZThiioM9HTWvALUNIQQrB28ZH 22Dnr+CR3q7es+hSUAQkM1r8xChvWh/eGN1+i3qsE11+6h7AkTm5nS2YaKnLEmvpAdbM hsVvA7QUusD7S3Wmbn82L2WssaqAjmGzznjcFaBnd4rKzvJa3p3i5QcENyHNR9/vi+Kx DW3A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CPxcDyzK3EVL2RnU6wNBsC95Y1hcNEcXUF1QpiexEGk=; fh=PK7qZE2l3RufuWL/yvUO8bu8mrcIpscTWlY+prmDsuM=; b=x0dXldFli0A6c2yBy8HjkNEMzqpcwZEU23/YOA3JOFqpkY2D3sOUnbs1uy29JzpqSs Xg1JBvFHJMoR+uhZjb1YSiLeYxHdzAdKnmT3PSjgR0kSgpgUAkIyBdwmPZ9N1wW1bDBB OCh61AFUaucgDBoOsgMsBWOPI2D4OXI0eEeLPkwn0LEyF8Ty84TIq8D3AvMs6I+XfByl PKzLaSIwyaMqnzIrY76YIPlhVvrcV/DRJEMbK01Pi5Ed5Oz5kS6TqbuddUjNxtrXSfaE A6NW8Q8P1kFntFhb5lC8fHtyuGihx62LKLZlERp32Okazwne0VAABaEkHQuqNoh+4DaU cdPw== 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 ci18-20020a170906c35200b009893415be37si3612234ejb.501.2023.08.02.23.29.33; Wed, 02 Aug 2023 23:29:58 -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 S232803AbjHCF5f (ORCPT + 99 others); Thu, 3 Aug 2023 01:57:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232735AbjHCF50 (ORCPT ); Thu, 3 Aug 2023 01:57:26 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ACEE9359E for ; Wed, 2 Aug 2023 22:57:21 -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 40AAA113E; Wed, 2 Aug 2023 22:58:04 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.42.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1E2733F6C4; Wed, 2 Aug 2023 22:57:16 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual , Sami Mujawar , Catalin Marinas , Will Deacon , Mark Rutland , Mike Leach , Leo Yan , Alexander Shishkin , James Clark , coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 3/4] coresight: trbe: Add a representative coresight_platform_data for TRBE Date: Thu, 3 Aug 2023 11:26:51 +0530 Message-Id: <20230803055652.1322801-4-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230803055652.1322801-1-anshuman.khandual@arm.com> References: <20230803055652.1322801-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 TRBE coresight devices do not need regular connections information, as the paths get built between all percpu source and their respective percpu sink devices. Please refer 'commit 2cd87a7b293d ("coresight: core: Add support for dedicated percpu sinks")' which added support for percpu sink devices. coresight_register() expect device connections via the platform_data. TRBE devices do not have any graph connections and thus is empty. With upcoming ACPI support for TRBE, we do not get a real acpi_device and thus coresight_get_platform_dat() will end up in failures. Hence this allocates a zeroed coresight_platform_data structure and assigns that back into the device. Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- drivers/hwtracing/coresight/coresight-trbe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 7720619909d6..e1d9d06e7725 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1494,9 +1494,9 @@ static int arm_trbe_device_probe(struct platform_device *pdev) if (!drvdata) return -ENOMEM; - pdata = coresight_get_platform_data(dev); - if (IS_ERR(pdata)) - return PTR_ERR(pdata); + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); + if (!pdata) + return -ENOMEM; dev_set_drvdata(dev, drvdata); dev->platform_data = pdata; -- 2.25.1