Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / cxl / core / suspend.c
bloba5984d96ea1d06a9641ecfc9f0f465f4a74068f4
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright(c) 2022 Intel Corporation. All rights reserved. */
3 #include <linux/atomic.h>
4 #include <linux/export.h>
5 #include "cxlmem.h"
7 static atomic_t mem_active;
9 bool cxl_mem_active(void)
11 return atomic_read(&mem_active) != 0;
14 void cxl_mem_active_inc(void)
16 atomic_inc(&mem_active);
18 EXPORT_SYMBOL_NS_GPL(cxl_mem_active_inc, CXL);
20 void cxl_mem_active_dec(void)
22 atomic_dec(&mem_active);
24 EXPORT_SYMBOL_NS_GPL(cxl_mem_active_dec, CXL);