Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / drivers / cxl / core / suspend.c
blob29aa5cc5e5652a549fc9203d005ae4b6e5eb4b93
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");