From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) (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 4DFD986329 for ; Thu, 16 Oct 2025 02:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.139.111.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760582041; cv=none; b=coxamyuJkJ3bHa8KgQ+dh+WBx+4XL4KWk0SX3Lyuugy8WZVVI1W0ATpPfeZZ6MuTN0eK/IwURD1t4mSb69aqPJgyckmgHMmxkIesc08bpBmhGJxRgRKzOUgGYgijyrUdot4TkQPEIzZiyJQg8FOnbzFbMyc+wedrKyzos2n6jLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760582041; c=relaxed/simple; bh=PGxsbWjiMryP2IW+SQbKu/rdjbdntQ2WuG3gFpn3Xlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ItBSo7ozCOWRv72mgE8AbIKEoT3lvgghXyzCXbOMiE0S6e4yb6jzT9JK5nv9FRnY6FgdmuPB4ufiwzvjhII/ym10G3g2LuNon5F9tDjfocrz4/iMJY+GDLd0l33i5r5iPx4uggaPW2s5oYmty6qtnhQuLdRYg1invpIsX0WfqWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=205.139.111.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-jjQa8WwgMZy9ZJxTZ7WX_A-1; Wed, 15 Oct 2025 22:33:54 -0400 X-MC-Unique: jjQa8WwgMZy9ZJxTZ7WX_A-1 X-Mimecast-MFC-AGG-ID: jjQa8WwgMZy9ZJxTZ7WX_A_1760582032 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A9A861954200; Thu, 16 Oct 2025 02:33:52 +0000 (UTC) Received: from dreadlord.taild9177d.ts.net (unknown [10.67.32.64]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2FFD81800353; Thu, 16 Oct 2025 02:33:45 +0000 (UTC) From: Dave Airlie To: dri-devel@lists.freedesktop.org, tj@kernel.org, christian.koenig@amd.com, Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song Cc: cgroups@vger.kernel.org, Dave Chinner , Waiman Long , simona@ffwll.ch Subject: [PATCH 13/16] memcontrol: allow objcg api when memcg is config off. Date: Thu, 16 Oct 2025 12:31:41 +1000 Message-ID: <20251016023205.2303108-14-airlied@gmail.com> In-Reply-To: <20251016023205.2303108-1-airlied@gmail.com> References: <20251016023205.2303108-1-airlied@gmail.com> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: MnZUEqbQ7CHbd2Fvl431UwoX_exMKYzWd2dEbrDqw4o_1760582032 X-Mimecast-Originator: gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Dave Airlie amdgpu wants to use the objcg api and not have to enable ifdef around it, so just add a dummy function for the config off path. Acked-by: Christian K=C3=B6nig Signed-off-by: Dave Airlie --- include/linux/memcontrol.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 62c46c33f84f..8401b272495e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1828,6 +1828,11 @@ static inline void __memcg_kmem_uncharge_page(struct= page *page, int order) { } =20 +static inline struct obj_cgroup *get_obj_cgroup_from_current(void) +{ +=09return NULL; +} + static inline struct obj_cgroup *get_obj_cgroup_from_folio(struct folio *f= olio) { =09return NULL; --=20 2.51.0