diff options
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/core/numa.h | 25 | ||||
| -rw-r--r-- | components/drivers/include/rtdevice.h | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/core/numa.h b/components/drivers/include/drivers/core/numa.h new file mode 100644 index 0000000000..e4d35981fb --- /dev/null +++ b/components/drivers/include/drivers/core/numa.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2006-2023, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2023-09-24 GuEe-GUI the first version + */ + +#ifndef __RT_DM_NUMA_H__ +#define __RT_DM_NUMA_H__ + +#include <rthw.h> +#include <rtthread.h> + +#include <bitmap.h> + +/* NUMA: Non-Uniform Memory Access */ + +int rt_numa_cpu_id(int cpuid); +int rt_numa_device_id(struct rt_device *dev); +rt_err_t rt_numa_memory_affinity(rt_uint64_t phy_addr, rt_bitmap_t *out_affinity); + +#endif /* __RT_DM_NUMA_H__ */ diff --git a/components/drivers/include/rtdevice.h b/components/drivers/include/rtdevice.h index afb5bb2533..863e9d8503 100644 --- a/components/drivers/include/rtdevice.h +++ b/components/drivers/include/rtdevice.h @@ -41,6 +41,7 @@ extern "C" { #ifdef RT_USING_DM #include "drivers/core/dm.h" +#include "drivers/core/numa.h" #include "drivers/platform.h" #ifdef RT_USING_OFW |
