suspend.c (492B)
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" 6 7static atomic_t mem_active; 8 9bool cxl_mem_active(void) 10{ 11 return atomic_read(&mem_active) != 0; 12} 13 14void cxl_mem_active_inc(void) 15{ 16 atomic_inc(&mem_active); 17} 18EXPORT_SYMBOL_NS_GPL(cxl_mem_active_inc, CXL); 19 20void cxl_mem_active_dec(void) 21{ 22 atomic_dec(&mem_active); 23} 24EXPORT_SYMBOL_NS_GPL(cxl_mem_active_dec, CXL);