From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.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 D5687244687 for ; Tue, 24 Feb 2026 02:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=207.211.30.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771899048; cv=none; b=a32HGKjf5Y1xvGa76kS8U9zBBhOmm7JACRObka9kKJxnu8IlOALoGYHn7iOJVT1byTwuL1maFTPB98+eR6UjSSSuzYL+T491EksaEwQ/z+6c0TfPGQI7qnSf5ecQPK+e/VgORB4PRkOtEG31vlSJrWhK0Bf+UxG6hBW6ezK2Lpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771899048; c=relaxed/simple; bh=pjBpKR4v3WMEXY6AqqKjPLCDQaYywRx0PIuOPbXFKmw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D4vyAyGeN2N/aK4f4szxGhy11d9qLW5tffWE+Aa+4v9Xgw81R41tT5h3EFvUaZMM0KP5Z9et0WAfPdaEWqWSkdCijiQwe5k792HtJDMFlj4TQlr9JF1mpOsRhb+zrUPmXsf98nJ4Uw0HD2pJq2z5MjLuQzHA/d1DLVQnf1OrqVI= 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=207.211.30.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-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-fVM17GOOM--E3FfPfWsD-w-1; Mon, 23 Feb 2026 21:10:42 -0500 X-MC-Unique: fVM17GOOM--E3FfPfWsD-w-1 X-Mimecast-MFC-AGG-ID: fVM17GOOM--E3FfPfWsD-w_1771899041 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4304A180025B; Tue, 24 Feb 2026 02:10:41 +0000 (UTC) Received: from dreadlord.taild9177d.ts.net (unknown [10.67.32.38]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0810730001BB; Tue, 24 Feb 2026 02:10:34 +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: Tue, 24 Feb 2026 12:06:30 +1000 Message-ID: <20260224020854.791201-14-airlied@gmail.com> In-Reply-To: <20260224020854.791201-1-airlied@gmail.com> References: <20260224020854.791201-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.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: o9mcrBuJAN2pTg2K-bez92_1anpcvbxGdy9wPom0tSQ_1771899041 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 4f75d64f5fca..fcc6b79d9560 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1804,6 +1804,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.52.0