From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3273C0015E for ; Tue, 15 Aug 2023 09:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i8si1utf1ivGG1y7/AwGTbcff4hXWY2BVshqbrSAR7w=; b=T5ov0zqkZT6hPn I5c6Sy0L33+I2KktWKAPyKHP3zm7pN1BOf3jUhrH6zc1DII242/L+RjuBJ+SDAHjF0BpoIdZ/+7D5 Iofp3Bsxe+qwibns6LJF8rNXI+9tAl7+WXpmhlCty0wSZmC/aNvOWLKkGCUqap0tF7ZH322rYhZx0 7NZRaiuSbu+X2BeJCqjUCuDxy3DAT7nhy3Dlaqeo4PLE7ZvyWWjuugf8g2WWjsf8iIAxAK53pC4yY Xw5BJX5l515cmopi5VKdXzkOg8wsYtBmdkXaLHfgI1pnizxrwlMZI5svrk7OSI85lJtC7lWIxtShh rGnrgXX57eWerGUQllwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVqpK-001FfU-13; Tue, 15 Aug 2023 09:59:02 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVqpH-001Ff2-2D for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2023 09:59:00 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EEF7D64375; Tue, 15 Aug 2023 09:58:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB498C433C8; Tue, 15 Aug 2023 09:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692093538; bh=o49vHnAclvN8+OB5maqLkNps+F0O+gxHL+axhoITllw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZgASLfmCl2ShSCzf77JrZgWLA0+BTuDtPX8ufU7IcUiT4ZfXRk1yhW0YbyxgK8IVK nftz1ubTpoy0nisnhdJxmIJKifmN7poii2LRqHpps2dw1Tubf7csigpCYYBRrtNAfU B6R0xA8PTt3t70FMgWVGJnaF1xGOVGX9VyVKBFlrOHy4RFWLfW5nFcxwbPe1tsnqGH nAeRZJgPuHj2D2OYolTzyk6ElkjXEWqpzMT958/SS23zZ1GobxNQCrCXEMTgf8uZX+ IFN1yyyoI2k5VYK89uwe+Jd1YMUxTz5JHZc5tgwe36fObhjPrlheByP8af8yffSYnP eT5+lMDV/UhfA== Date: Tue, 15 Aug 2023 10:58:53 +0100 From: Will Deacon To: Gowthami Thiagarajan Cc: Mark Rutland , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , Bharat Bhushan , George Cherian , Linu Cherian Subject: Re: [PATCH 3/6] perf/marvell : Odyssey LLC-TAD performance monitor support Message-ID: <20230815095852.GB11083@willie-the-truck> References: <20230630120351.1143773-1-gthiagarajan@marvell.com> <20230630120351.1143773-4-gthiagarajan@marvell.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_025859_772919_164919D9 X-CRM114-Status: GOOD ( 16.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Aug 12, 2023 at 01:51:00PM +0000, Gowthami Thiagarajan wrote: > > > +static int tad_pmu_probe(struct platform_device *pdev) > > > +{ > > > + struct device *dev = &pdev->dev; > > > + struct tad_region *regions; > > > + struct tad_pmu *tad_pmu; > > > + struct resource *res; > > > + u32 tad_pmu_page_size; > > > + u32 tad_page_size; > > > + u32 tad_cnt; > > > + int i, ret; > > > + char *name; > > > + > > > + tad_pmu = devm_kzalloc(&pdev->dev, sizeof(*tad_pmu), GFP_KERNEL); > > > + if (!tad_pmu) > > > + return -ENOMEM; > > > + > > > + platform_set_drvdata(pdev, tad_pmu); > > > + > > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > > + if (!res) { > > > + dev_err(&pdev->dev, "Mem resource not found\n"); > > > + return -ENODEV; > > > + } > > > + > > > + ret = device_property_read_u32(dev, "marvell,tad-page-size", &tad_page_size); > > > + if (ret) { > > > + dev_err(&pdev->dev, "Can't find tad-page-size property\n"); > > > + return ret; > > > + } > > > + > > > + ret = device_property_read_u32(dev, "marvell,tad-pmu-page-size", > > > + &tad_pmu_page_size); > > > + if (ret) { > > > + dev_err(&pdev->dev, "Can't find tad-pmu-page-size property\n"); > > > + return ret; > > > + } > > > > Why do you think these properties are necessary? > > > > These should almost certainly be provided by IO resources, and shouldn't need a > > custom property. > > IO resources don't provide all the information in this case. Need to vary these values > at different boot times. So, kept these custom properties. Please can you be a bit more specific here? Which information is not provided? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel