| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Email: opensource_embedded@phytium.com.cn
- *
- * Change Logs:
- * Date Author Notes
- * 2022-10-26 huanghe first commit
- *
- */
- #include "rtconfig.h"
- #include <rtthread.h>
- #include "fcpu_info.h"
- #include "fparameters.h"
- u32 GetCpuMaskToAffval(u32 *cpu_mask, u32 *cluster_id, u32 *target_list)
- {
- if (*cpu_mask == 0)
- {
- return 0;
- }
- *target_list = 0;
- *cluster_id = 0;
- if (*cpu_mask & 0x1)
- {
- *target_list = 1;
- *cluster_id = 0x200;
- *cpu_mask &= ~0x1;
- }
- else
- {
- *cpu_mask = 0;
- return 0;
- }
- return 1;
- }
|