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 --- freebsd/sys/vm/uma_core.c | 4 ++-- linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 ++-- linux/drivers/soc/fsl/qbman/bman_ccsr.c | 2 +- linux/drivers/soc/fsl/qbman/qman_portal.c | 2 +- linux/drivers/soc/fsl/qbman/qman_test_stash.c | 2 +- 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 +- testsuite/media01/test_main.c | 2 +- testsuite/smp01/test_main.c | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/freebsd/sys/vm/uma_core.c b/freebsd/sys/vm/uma_core.c index be6f37bc..e4161510 100644 --- a/freebsd/sys/vm/uma_core.c +++ b/freebsd/sys/vm/uma_core.c @@ -115,9 +115,9 @@ __FBSDID("$FreeBSD$"); #undef curcpu #define curcpu _SMP_Get_current_processor() #undef mp_maxid -#define mp_maxid (rtems_get_processor_count() - 1) +#define mp_maxid (_SMP_Get_processor_maximum() - 1) #undef mp_ncpus -#define mp_ncpus rtems_get_processor_count() +#define mp_ncpus _SMP_Get_processor_maximum() #define SMP #endif /* RTEMS_SMP */ #endif /* __rtems__ */ diff --git a/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 9fc5da0c..4f8d24ed 100644 --- a/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -995,7 +995,7 @@ static void dpaa_fq_setup(struct dpaa_priv *priv, dpaa_setup_ingress(priv, fq, &fq_cbs->rx_defq); p = qman_get_affine_portal(cpu); fq->channel = qman_portal_get_channel(p); - cpu = (cpu + 1) % (int)rtems_get_processor_count(); + cpu = (cpu + 1) % (int)rtems_scheduler_get_processor_maximum(); break; #endif /* __rtems__ */ case FQ_TYPE_TX: @@ -3217,7 +3217,7 @@ dpaa_eth_priv_probe(struct platform_device *pdev, struct mac_device *mac_dev) #ifndef __rtems__ for_each_possible_cpu(i) { #else /* __rtems__ */ - for (i = 0; i < (int)rtems_get_processor_count(); ++i) { + for (i = 0; i < (int)rtems_scheduler_get_processor_maximum(); ++i) { #endif /* __rtems__ */ percpu_priv = per_cpu_ptr(priv->percpu_priv, i); memset(percpu_priv, 0, sizeof(*percpu_priv)); diff --git a/linux/drivers/soc/fsl/qbman/bman_ccsr.c b/linux/drivers/soc/fsl/qbman/bman_ccsr.c index 0c3726e1..f15e521a 100644 --- a/linux/drivers/soc/fsl/qbman/bman_ccsr.c +++ b/linux/drivers/soc/fsl/qbman/bman_ccsr.c @@ -308,7 +308,7 @@ bman_sysinit(void) } }; const char *name; - int cpu_count = (int)rtems_get_processor_count(); + int cpu_count = (int)rtems_scheduler_get_processor_maximum(); int cpu; int ret; int node; diff --git a/linux/drivers/soc/fsl/qbman/qman_portal.c b/linux/drivers/soc/fsl/qbman/qman_portal.c index 1fbcb5ff..c0248e52 100644 --- a/linux/drivers/soc/fsl/qbman/qman_portal.c +++ b/linux/drivers/soc/fsl/qbman/qman_portal.c @@ -486,7 +486,7 @@ qman_sysinit_portals(void) const char *fdt = bsp_fdt_get(); struct device_node dn; const char *name; - int cpu_count = (int)rtems_get_processor_count(); + int cpu_count = (int)rtems_scheduler_get_processor_maximum(); int i; int node; diff --git a/linux/drivers/soc/fsl/qbman/qman_test_stash.c b/linux/drivers/soc/fsl/qbman/qman_test_stash.c index 9c3a135f..f6558e25 100644 --- a/linux/drivers/soc/fsl/qbman/qman_test_stash.c +++ b/linux/drivers/soc/fsl/qbman/qman_test_stash.c @@ -115,7 +115,7 @@ static int on_all_cpus(int (*fn)(void)) #ifndef __rtems__ for_each_cpu(cpu, cpu_online_mask) { #else /* __rtems__ */ - for (cpu = 0; cpu < (int)rtems_get_processor_count(); ++cpu) { + for (cpu = 0; cpu < (int)rtems_scheduler_get_processor_maximum(); ++cpu) { #endif /* __rtems__ */ struct bstrap bstrap = { .fn = fn, 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); diff --git a/testsuite/media01/test_main.c b/testsuite/media01/test_main.c index 958f7c2e..69177e8c 100644 --- a/testsuite/media01/test_main.c +++ b/testsuite/media01/test_main.c @@ -138,7 +138,7 @@ test_main(void) rtems_status_code sc; rtems_ftpd_configuration.tasks_count = MAX(4, - rtems_get_processor_count()); + rtems_scheduler_get_processor_maximum()); rv = rtems_initialize_ftpd(); assert(rv == 0); diff --git a/testsuite/smp01/test_main.c b/testsuite/smp01/test_main.c index a20d17c4..583fe906 100644 --- a/testsuite/smp01/test_main.c +++ b/testsuite/smp01/test_main.c @@ -115,7 +115,7 @@ busy(void) static uint32_t get_obj_count(void) { - return ((rtems_get_processor_count() + 1) / 2); + return ((rtems_scheduler_get_processor_maximum() + 1) / 2); } static void -- cgit v1.2.3