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 A9EBC2E11A6 for ; Tue, 2 Sep 2025 04:12:22 +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=1756786344; cv=none; b=nKJflneyPbr/oUazDtJrqLxBUtPLRdm5qaEBViIKc6H0pTOOCrQiqZAzw2cDCpWACtJVpb5uNOiGtQN3FEa11IWn+n/ViU050C6RcMw1unkPqm6t7wSANGpJ5tRGo2U4rSJisgMyNX2m8dH/hkLKoti4XsVtCk0Idj9M/4ScbO8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756786344; c=relaxed/simple; bh=4EBE57B2LzHtOs7P/qSgTGBF6S2QzBEwixSnUoSlCbM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=XMAB1HUiN/jEuUFhn6KwvhyYSJX89dq7Ft0AawLDRaSe+VYC5JlmJjfNMhE/4ZRNMg2RyWiN7rtuwyWp/S0lCqpgnIMjswud36SUatd8NeHIXZeJmXvE1I05rHhpV4c+qH+RW91/gr2eI6J6PJyoQrcqdk3jDQwv4Y3OiR7mjBs= 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-08.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-460-weNOMgsPOd6I2l4ci-LRBw-1; Tue, 02 Sep 2025 00:12:18 -0400 X-MC-Unique: weNOMgsPOd6I2l4ci-LRBw-1 X-Mimecast-MFC-AGG-ID: weNOMgsPOd6I2l4ci-LRBw_1756786337 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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 045FC1800342; Tue, 2 Sep 2025 04:12:17 +0000 (UTC) Received: from dreadlord.redhat.com (unknown [10.67.32.135]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 43C293000218; Tue, 2 Sep 2025 04:12:09 +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/15] memcontrol: allow objcg api when memcg is config off. Date: Tue, 2 Sep 2025 14:06:52 +1000 Message-ID: <20250902041024.2040450-14-airlied@gmail.com> In-Reply-To: <20250902041024.2040450-1-airlied@gmail.com> References: <20250902041024.2040450-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: aw4ZufVGZqVUJ2ftUEAb3nHLoQIQ9HV6JoF1nvQJI54_1756786337 X-Mimecast-Originator: gmail.com Content-Transfer-Encoding: quoted-printable content-type: text/plain; charset=WINDOWS-1252; x-default=true 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. 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 d7cfb9925db5..e5cffb0adeda 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1794,6 +1794,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.50.1