@@ -107,8 +107,12 @@ struct hwloc_linux_backend_data_s {
107
107
# define __NR_sched_setaffinity 241
108
108
# elif defined(__loongarch__ )
109
109
# define __NR_sched_setaffinity 122
110
- /*# elif defined(__mips__)
111
- # define __NR_sched_setaffinity TODO (32/64/nabi) */
110
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
111
+ # define __NR_sched_setaffinity 5195
112
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
113
+ # define __NR_sched_setaffinity 6195
114
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
115
+ # define __NR_sched_setaffinity 4239
112
116
# else
113
117
# warning "don't know the syscall number for sched_setaffinity on this architecture, will not support binding"
114
118
# define sched_setaffinity (pid , lg , mask ) (errno = ENOSYS, -1)
@@ -146,8 +150,12 @@ struct hwloc_linux_backend_data_s {
146
150
# define __NR_sched_getaffinity 242
147
151
# elif defined(__loongarch__ )
148
152
# define __NR_sched_getaffinity 123
149
- /*# elif defined(__mips__)
150
- # define __NR_sched_getaffinity TODO (32/64/nabi) */
153
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
154
+ # define __NR_sched_getaffinity 5196
155
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
156
+ # define __NR_sched_getaffinity 6196
157
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
158
+ # define __NR_sched_getaffinity 4240
151
159
# else
152
160
# warning "don't know the syscall number for sched_getaffinity on this architecture, will not support getting binding"
153
161
# define sched_getaffinity (pid , lg , mask ) (errno = ENOSYS, -1)
@@ -224,6 +232,12 @@ struct hwloc_linux_backend_data_s {
224
232
/* sys_ni_syscall when CRIS removed in 4.17 */
225
233
# elif defined(__loongarch__ )
226
234
# define __NR_mbind 235
235
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
236
+ # define __NR_mbind 5227
237
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
238
+ # define __NR_mbind 6231
239
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
240
+ # define __NR_mbind 4268
227
241
# endif
228
242
#endif
229
243
static __hwloc_inline long hwloc_mbind (void * addr __hwloc_attribute_unused ,
@@ -271,6 +285,12 @@ static __hwloc_inline long hwloc_mbind(void *addr __hwloc_attribute_unused,
271
285
/* sys_ni_syscall when CRIS removed in 4.17 */
272
286
# elif defined(__loongarch__ )
273
287
# define __NR_set_mempolicy 237
288
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
289
+ # define __NR_set_mempolicy 5229
290
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
291
+ # define __NR_set_mempolicy 6233
292
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
293
+ # define __NR_set_mempolicy 4270
274
294
# endif
275
295
#endif
276
296
static __hwloc_inline long hwloc_set_mempolicy (int mode __hwloc_attribute_unused ,
@@ -315,6 +335,12 @@ static __hwloc_inline long hwloc_set_mempolicy(int mode __hwloc_attribute_unused
315
335
/* sys_ni_syscall when CRIS removed in 4.17 */
316
336
# elif defined(__loongarch__ )
317
337
# define __NR_get_mempolicy 236
338
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
339
+ # define __NR_get_mempolicy 5228
340
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
341
+ # define __NR_get_mempolicy 6232
342
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
343
+ # define __NR_get_mempolicy 4269
318
344
# endif
319
345
#endif
320
346
static __hwloc_inline long hwloc_get_mempolicy (int * mode __hwloc_attribute_unused ,
@@ -361,6 +387,12 @@ static __hwloc_inline long hwloc_get_mempolicy(int *mode __hwloc_attribute_unuse
361
387
# define __NR_migrate_pages 294
362
388
# elif defined(__loongarch__ )
363
389
# define __NR_migrate_pages 238
390
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
391
+ # define __NR_migrate_pages 5246
392
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
393
+ # define __NR_migrate_pages 6250
394
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
395
+ # define __NR_migrate_pages 4287
364
396
# endif
365
397
#endif
366
398
static __hwloc_inline long hwloc_migrate_pages (int pid __hwloc_attribute_unused ,
@@ -406,6 +438,12 @@ static __hwloc_inline long hwloc_migrate_pages(int pid __hwloc_attribute_unused,
406
438
# define __NR_migrate_pages 317
407
439
# elif defined(__loongarch__ )
408
440
# define __NR_move_pages 239
441
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABI64
442
+ # define __NR_move_pages 5267
443
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIN32
444
+ # define __NR_move_pages 6271
445
+ # elif defined(__mips__ ) && _MIPS_SIM == _ABIO32
446
+ # define __NR_move_pages 4308
409
447
# endif
410
448
#endif
411
449
static __hwloc_inline long hwloc_move_pages (int pid __hwloc_attribute_unused ,
0 commit comments