From c6261f97870562d4c797cfb1ff1ba0affb85a916 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 11 Apr 2019 09:33:39 +0200 Subject: Update due to API changes --- rtemsbsd/include/machine/counter.h | 4 ++-- rtemsbsd/powerpc/include/linux/cpumask.h | 6 +++--- rtemsbsd/powerpc/include/linux/device.h | 2 +- rtemsbsd/rtems/rtems-kernel-epoch.c | 4 ++-- rtemsbsd/rtems/rtems-kernel-init.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'rtemsbsd') diff --git a/rtemsbsd/include/machine/counter.h b/rtemsbsd/include/machine/counter.h index 4afc9ee9..4c25d610 100644 --- a/rtemsbsd/include/machine/counter.h +++ b/rtemsbsd/include/machine/counter.h @@ -52,7 +52,7 @@ counter_u64_fetch_inline(uint64_t *p) uint32_t cpu; r = 0; - for (cpu = 0; cpu < _SMP_Get_processor_count(); ++cpu) { + for (cpu = 0; cpu < _SMP_Get_processor_maximum(); ++cpu) { r += counter_u64_read_one((uint64_t *)p, cpu); } @@ -64,7 +64,7 @@ counter_u64_zero_inline(counter_u64_t c) { uint32_t cpu; - for (cpu = 0; cpu < _SMP_Get_processor_count(); ++cpu) { + for (cpu = 0; cpu < _SMP_Get_processor_maximum(); ++cpu) { *((uint64_t *)((char *)c + UMA_PCPU_ALLOC_SIZE * cpu)) = 0; } } diff --git a/rtemsbsd/powerpc/include/linux/cpumask.h b/rtemsbsd/powerpc/include/linux/cpumask.h index b6bf679b..f748a656 100644 --- a/rtemsbsd/powerpc/include/linux/cpumask.h +++ b/rtemsbsd/powerpc/include/linux/cpumask.h @@ -35,15 +35,15 @@ extern "C" { /* FIXME */ #define for_each_cpu(cpu, mask) \ - for ((cpu) = 0; (cpu) < rtems_get_processor_count(); ++(cpu)) + for ((cpu) = 0; (cpu) < rtems_scheduler_get_processor_maximum(); ++(cpu)) /* FIXME */ #define for_each_cpu_not(cpu, mask) \ - for ((cpu) = 0; (cpu) < rtems_get_processor_count(); ++(cpu)) + for ((cpu) = 0; (cpu) < rtems_scheduler_get_processor_maximum(); ++(cpu)) /* FIXME */ #define for_each_cpu_and(cpu, mask, and) \ - for ((cpu) = 0; (cpu) < rtems_get_processor_count(); ++(cpu)) + for ((cpu) = 0; (cpu) < rtems_scheduler_get_processor_maximum(); ++(cpu)) /* FIXME */ #define for_each_possible_cpu(cpu) \ diff --git a/rtemsbsd/powerpc/include/linux/device.h b/rtemsbsd/powerpc/include/linux/device.h index f4c344a1..f574990a 100644 --- a/rtemsbsd/powerpc/include/linux/device.h +++ b/rtemsbsd/powerpc/include/linux/device.h @@ -83,7 +83,7 @@ devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size) } #define devm_alloc_percpu(dev, type) \ - devm_kzalloc(dev, sizeof(type) * rtems_get_processor_count(), GFP_KERNEL) + devm_kzalloc(dev, sizeof(type) * rtems_scheduler_get_processor_maximum(), GFP_KERNEL) #define dev_crit(dev, fmt, ...) \ do { (void)dev; printf(fmt, ##__VA_ARGS__); } while (0) diff --git a/rtemsbsd/rtems/rtems-kernel-epoch.c b/rtemsbsd/rtems/rtems-kernel-epoch.c index e8e24060..00bca75a 100644 --- a/rtemsbsd/rtems/rtems-kernel-epoch.c +++ b/rtemsbsd/rtems/rtems-kernel-epoch.c @@ -72,7 +72,7 @@ _bsd_epoch_init(epoch_t epoch, uintptr_t pcpu_record_offset, int flags) epoch->e_flags = flags; epoch->e_pcpu_record_offset = pcpu_record_offset; - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) { Per_CPU_Control *cpu; @@ -153,7 +153,7 @@ epoch_sysinit(void) uint32_t cpu_count; uint32_t cpu_index; - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) { Per_CPU_Control *cpu; diff --git a/rtemsbsd/rtems/rtems-kernel-init.c b/rtemsbsd/rtems/rtems-kernel-init.c index 8432d5db..4d9851ea 100644 --- a/rtemsbsd/rtems/rtems-kernel-init.c +++ b/rtemsbsd/rtems/rtems-kernel-init.c @@ -145,7 +145,7 @@ rtems_bsd_initialize(void) sbt_timethreshold = bttosbt(bt_timethreshold); sbt_tickthreshold = bttosbt(bt_tickthreshold); maxusers = 1; - maxid_maxcpus = (int) rtems_get_processor_count(); + maxid_maxcpus = (int) rtems_scheduler_get_processor_maximum(); mkdir("/etc", S_IRWXU | S_IRWXG | S_IRWXO); -- cgit v1.2.3