From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A469514AD0D; Wed, 27 Aug 2025 16:16:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756311394; cv=none; b=LYmzcUp+5gfj84v/ly3RYnRJoJ6y8EsByg6N8UoP8nGMItlp+Zg/neiQ964m9WFlFSUile+IBvhbyrJrsIdIGvrre8T+jpNMx5AgTt8nYD2ZnaDUfJYF8WDQKNbyWvWvi1XwmTvqPGHhCLuBni7jcs7lX2AaXQ6FNrNxfBehwFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756311394; c=relaxed/simple; bh=zLiz6AkzyNnkBrQOVwv/VSA4M3l/zNcKpbwLcjJ+448=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Tqi7xQV7uhVf3fux4D6dsbhfYIJRLMU/tyS6mA3UuC0i3fV0g/qSeSrOBw6Ig9VoazB/ARl8+sTmCSch4uwp3ELARaTgAoPTy14h6BexMbhv7g6ZCX+dsqmBnCGBUK+jUS0Ij5z3nXdbHGqYLun6YBTxfv+7eneaFHZC508PInQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jTHWpxXA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jTHWpxXA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22068C4CEFF; Wed, 27 Aug 2025 16:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756311394; bh=zLiz6AkzyNnkBrQOVwv/VSA4M3l/zNcKpbwLcjJ+448=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jTHWpxXATY3CaEyQH+uS+P/ItI4kZnjwMDeObQFlhuk73fHfZTwT5HARLnzBL+vtI 14H2ZGWhQSzPX8gniBqdW7PB4a2cGecZ+Ch6rMI3pRrc7JFC0/jGo7fXOHrM7pX30H FMRy/4NAQpvIXDVRRiED6LBV0F02Y0GYFctpZyDTC50whJ2Fyn3EJkzrYwSg8Rh5de evn/2WyDsBmSszSpOpSN7OrQ0AsnbF4Yo0ZSB7jp9CzUU3QOXPD5GyO0BsRM/+Ni0D Z/QFAZhmheC9D1Vu01RV1jNK8pbNjM/V3eD8A30Kud9jT2R3iyNybFIG2/FJ3p0LEn SFS4Klj8qA6hw== Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-afe84202bb6so437228566b.2; Wed, 27 Aug 2025 09:16:34 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUsfVK2aI0J0uuDxwjeAzHubIW4MCQbB6Oog2au31hBNsV7mZQELGaVHf3SJsiAhVCLKvQMpU7t9WUf@vger.kernel.org, AJvYcCVEQ9RBHvb6RqXH4WF9LwEIKQk2JEt6nNklHbkIn3F8OXa9GCIDx3JdZwigJDN2IiZbPkXLx3/HB8nm0w==@vger.kernel.org X-Gm-Message-State: AOJu0Yxd8pl9/qbb6MgRlx/xFf77331aeTAteMWBh4g6kQGVh7waZRra RL4BXp06e5HzR9QY5HJEXJxHuCkpR54G+JDfuoF0f633pUKsgPjZ57qWLZd2MxLTurqOK6zhlP2 D4iUBPy9S+O3SGlxTo50IBlzjB3DzSw== X-Google-Smtp-Source: AGHT+IEXg6+7BprsV5EoZDhEEr6bgsBWXcf6QxNl0BWK2TTd4f7AIeyL6z6NHk7g97eiKGWG44PeeKjxlyiXe/1zEDQ= X-Received: by 2002:a17:907:934d:b0:afe:ceee:87ef with SMTP id a640c23a62f3a-afeceee8bd7mr157915066b.46.1756311392573; Wed, 27 Aug 2025 09:16:32 -0700 (PDT) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20250822153048.2287-1-james.morse@arm.com> <20250822153048.2287-11-james.morse@arm.com> In-Reply-To: From: Rob Herring Date: Wed, 27 Aug 2025 11:16:20 -0500 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzE3A9FSJi0MT3IqGBLAftR8IWne7jiyyfQlU3jf16oWdruRH4E1uAnKzM Message-ID: Subject: Re: [PATCH 10/33] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate To: James Morse Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie , Dave Martin , Koba Ko , Shanker Donthineni , fenghuay@nvidia.com, baisheng.gao@unisoc.com, Jonathan Cameron , Rohit Mathew , Rafael Wysocki , Len Brown , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , Danilo Krummrich Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 27, 2025 at 10:39=E2=80=AFAM Rob Herring wrot= e: > > On Fri, Aug 22, 2025 at 10:32=E2=80=AFAM James Morse wrote: > > > > Probing MPAM is convoluted. MSCs that are integrated with a CPU may > > only be accessible from those CPUs, and they may not be online. > > Touching the hardware early is pointless as MPAM can't be used until > > the system-wide common values for num_partid and num_pmg have been > > discovered. [...] > > +static int mpam_dt_parse_resources(struct mpam_msc *msc, void *ignored= ) > > +{ > > + int err, num_ris =3D 0; > > + const u32 *ris_idx_p; > > + struct device_node *iter, *np; > > + > > + np =3D msc->pdev->dev.of_node; > > + for_each_child_of_node(np, iter) { > > Use for_each_available_child_of_node_scoped() > > > + ris_idx_p =3D of_get_property(iter, "reg", NULL); > > This is broken on big endian and new users of of_get_property() are > discouraged. Use of_property_read_reg(). Err, this is broken on little endian as the DT is big endian. So this was obviously not tested as I'm confident you didn't test on BE. Rob