[warnings] fix warnings post-smp
Most of the warnings are printf related due to lk_time_t now being defined as an unsigned int instead of unsigned long.
This commit is contained in:
@@ -172,10 +172,10 @@ static void bench_memcpy(void)
|
|||||||
mine = bench_memcpy_routine(&mymemcpy, srcalign, dstalign);
|
mine = bench_memcpy_routine(&mymemcpy, srcalign, dstalign);
|
||||||
|
|
||||||
printf("srcalign %zu, dstalign %zu: ", srcalign, dstalign);
|
printf("srcalign %zu, dstalign %zu: ", srcalign, dstalign);
|
||||||
printf(" null memcpy %lu msecs\n", null);
|
printf(" null memcpy %u msecs\n", null);
|
||||||
printf("c memcpy %lu msecs, %llu bytes/sec; ", c, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / c);
|
printf("c memcpy %u msecs, %llu bytes/sec; ", c, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / c);
|
||||||
printf("libc memcpy %lu msecs, %llu bytes/sec; ", libc, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / libc);
|
printf("libc memcpy %u msecs, %llu bytes/sec; ", libc, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / libc);
|
||||||
printf("my memcpy %lu msecs, %llu bytes/sec; ", mine, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / mine);
|
printf("my memcpy %u msecs, %llu bytes/sec; ", mine, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / mine);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (dstalign < 8)
|
if (dstalign < 8)
|
||||||
@@ -263,9 +263,9 @@ static void bench_memset(void)
|
|||||||
mine = bench_memset_routine(&mymemset, dstalign, BUFFER_SIZE);
|
mine = bench_memset_routine(&mymemset, dstalign, BUFFER_SIZE);
|
||||||
|
|
||||||
printf("dstalign %zu: ", dstalign);
|
printf("dstalign %zu: ", dstalign);
|
||||||
printf("c memset %lu msecs, %llu bytes/sec; ", c, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / c);
|
printf("c memset %u msecs, %llu bytes/sec; ", c, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / c);
|
||||||
printf("libc memset %lu msecs, %llu bytes/sec; ", libc, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / libc);
|
printf("libc memset %u msecs, %llu bytes/sec; ", libc, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / libc);
|
||||||
printf("my memset %lu msecs, %llu bytes/sec; ", mine, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / mine);
|
printf("my memset %u msecs, %llu bytes/sec; ", mine, (uint64_t)BUFFER_SIZE * ITERATIONS * 1000ULL / mine);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void _systick(void)
|
|||||||
|
|
||||||
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
||||||
{
|
{
|
||||||
LTRACEF("callback %p, arg %p, interval %ld\n", callback, arg, interval);
|
LTRACEF("callback %p, arg %p, interval %u\n", callback, arg, interval);
|
||||||
|
|
||||||
DEBUG_ASSERT(tick_rate != 0 && tick_rate_mhz != 0);
|
DEBUG_ASSERT(tick_rate != 0 && tick_rate_mhz != 0);
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ void arm_data_abort_handler(struct arm_fault_frame *frame)
|
|||||||
break;
|
break;
|
||||||
case 0b01001:
|
case 0b01001:
|
||||||
case 0b01011: // domain fault
|
case 0b01011: // domain fault
|
||||||
dprintf(CRITICAL, "domain fault, domain %d\n", BITS_SHIFT(fsr, 7, 4));
|
dprintf(CRITICAL, "domain fault, domain %lu\n", BITS_SHIFT(fsr, 7, 4));
|
||||||
break;
|
break;
|
||||||
case 0b01101:
|
case 0b01101:
|
||||||
case 0b01111: // permission fault
|
case 0b01111: // permission fault
|
||||||
@@ -246,7 +246,7 @@ void arm_prefetch_abort_handler(struct arm_fault_frame *frame)
|
|||||||
break;
|
break;
|
||||||
case 0b01001:
|
case 0b01001:
|
||||||
case 0b01011: // domain fault
|
case 0b01011: // domain fault
|
||||||
dprintf(CRITICAL, "domain fault, domain %d\n", BITS_SHIFT(fsr, 7, 4));
|
dprintf(CRITICAL, "domain fault, domain %lu\n", BITS_SHIFT(fsr, 7, 4));
|
||||||
break;
|
break;
|
||||||
case 0b01101:
|
case 0b01101:
|
||||||
case 0b01111: // permission fault
|
case 0b01111: // permission fault
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ lk_time_t current_time(void)
|
|||||||
|
|
||||||
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
||||||
{
|
{
|
||||||
LTRACEF("callback %p, arg %p, interval %lu\n", callback, arg, interval);
|
LTRACEF("callback %p, arg %p, interval %u\n", callback, arg, interval);
|
||||||
|
|
||||||
uint64_t ticks = u64_mul_u64_fp32_64(interval, timer_freq_msec_conversion);
|
uint64_t ticks = u64_mul_u64_fp32_64(interval, timer_freq_msec_conversion);
|
||||||
if (unlikely(ticks == 0))
|
if (unlikely(ticks == 0))
|
||||||
@@ -143,7 +143,7 @@ status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg
|
|||||||
|
|
||||||
status_t platform_set_oneshot_timer (platform_timer_callback callback, void *arg, lk_time_t interval)
|
status_t platform_set_oneshot_timer (platform_timer_callback callback, void *arg, lk_time_t interval)
|
||||||
{
|
{
|
||||||
LTRACEF("callback %p, arg %p, timeout %lu\n", callback, arg, interval);
|
LTRACEF("callback %p, arg %p, timeout %u\n", callback, arg, interval);
|
||||||
|
|
||||||
uint64_t ticks = u64_mul_u64_fp32_64(interval, timer_freq_msec_conversion);
|
uint64_t ticks = u64_mul_u64_fp32_64(interval, timer_freq_msec_conversion);
|
||||||
if (unlikely(ticks == 0))
|
if (unlikely(ticks == 0))
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ static void test_lk_time_to_cntpct(uint32_t cntfrq, lk_time_t lk_time)
|
|||||||
uint64_t expected_cntpct = ((uint64_t)cntfrq * lk_time + 500) / 1000;
|
uint64_t expected_cntpct = ((uint64_t)cntfrq * lk_time + 500) / 1000;
|
||||||
|
|
||||||
test_time_conversion_check_result(cntpct, expected_cntpct, 1, false);
|
test_time_conversion_check_result(cntpct, expected_cntpct, 1, false);
|
||||||
LTRACEF_LEVEL(2, "lk_time_to_cntpct(%lu): got %llu, expect %llu\n", lk_time, cntpct, expected_cntpct);
|
LTRACEF_LEVEL(2, "lk_time_to_cntpct(%u): got %llu, expect %llu\n", lk_time, cntpct, expected_cntpct);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_cntpct_to_lk_time(uint32_t cntfrq, lk_time_t expected_lk_time, uint32_t wrap_count)
|
static void test_cntpct_to_lk_time(uint32_t cntfrq, lk_time_t expected_lk_time, uint32_t wrap_count)
|
||||||
@@ -275,7 +275,7 @@ static void test_cntpct_to_lk_time(uint32_t cntfrq, lk_time_t expected_lk_time,
|
|||||||
lk_time = cntpct_to_lk_time(cntpct);
|
lk_time = cntpct_to_lk_time(cntpct);
|
||||||
|
|
||||||
test_time_conversion_check_result(lk_time, expected_lk_time, (1000 + cntfrq - 1) / cntfrq, true);
|
test_time_conversion_check_result(lk_time, expected_lk_time, (1000 + cntfrq - 1) / cntfrq, true);
|
||||||
LTRACEF_LEVEL(2, "cntpct_to_lk_time(%llu): got %lu, expect %lu\n", cntpct, lk_time, expected_lk_time);
|
LTRACEF_LEVEL(2, "cntpct_to_lk_time(%llu): got %u, expect %u\n", cntpct, lk_time, expected_lk_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_cntpct_to_lk_bigtime(uint32_t cntfrq, uint64_t expected_s)
|
static void test_cntpct_to_lk_bigtime(uint32_t cntfrq, uint64_t expected_s)
|
||||||
|
|||||||
@@ -212,13 +212,13 @@ static void kevdump_cb(const uintptr_t *i)
|
|||||||
printf("%lu.%lu: timer call %p, arg %p\n", i[0], i[1] >> 16, (void *)i[2], (void *)i[3]);
|
printf("%lu.%lu: timer call %p, arg %p\n", i[0], i[1] >> 16, (void *)i[2], (void *)i[3]);
|
||||||
break;
|
break;
|
||||||
case KERNEL_EVLOG_IRQ_ENTER:
|
case KERNEL_EVLOG_IRQ_ENTER:
|
||||||
printf("%lu.%lu: irq entry %u\n", i[0], i[1] >> 16, (uint)i[2]);
|
printf("%lu.%lu: irq entry %lu\n", i[0], i[1] >> 16, i[2]);
|
||||||
break;
|
break;
|
||||||
case KERNEL_EVLOG_IRQ_EXIT:
|
case KERNEL_EVLOG_IRQ_EXIT:
|
||||||
printf("%lu.%lu: irq exit %u\n", i[0], i[1] >> 16, (uint)i[2]);
|
printf("%lu.%lu: irq exit %lu\n", i[0], i[1] >> 16, i[2]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("%lu: unknown id 0x%x 0x%x 0x%x\n", i[0], i[1], (uint)i[2], (uint)i[3]);
|
printf("%lu: unknown id 0x%lx 0x%lx 0x%lx\n", i[0], i[1], i[2], i[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ static void insert_timer_in_queue(uint cpu, timer_t *timer)
|
|||||||
|
|
||||||
DEBUG_ASSERT(arch_ints_disabled());
|
DEBUG_ASSERT(arch_ints_disabled());
|
||||||
|
|
||||||
LTRACEF("timer %p, cpu %u, scheduled %lu, periodic %lu\n", timer, cpu, timer->scheduled_time, timer->periodic_time);
|
LTRACEF("timer %p, cpu %u, scheduled %u, periodic %u\n", timer, cpu, timer->scheduled_time, timer->periodic_time);
|
||||||
|
|
||||||
list_for_every_entry(&timers[cpu].timer_queue, entry, timer_t, node) {
|
list_for_every_entry(&timers[cpu].timer_queue, entry, timer_t, node) {
|
||||||
if (TIME_GT(entry->scheduled_time, timer->scheduled_time)) {
|
if (TIME_GT(entry->scheduled_time, timer->scheduled_time)) {
|
||||||
@@ -88,7 +88,7 @@ static void timer_set(timer_t *timer, lk_time_t delay, lk_time_t period, timer_c
|
|||||||
{
|
{
|
||||||
lk_time_t now;
|
lk_time_t now;
|
||||||
|
|
||||||
LTRACEF("timer %p, delay %lu, period %lu, callback %p, arg %p\n", timer, delay, period, callback, arg);
|
LTRACEF("timer %p, delay %u, period %u, callback %p, arg %p\n", timer, delay, period, callback, arg);
|
||||||
|
|
||||||
DEBUG_ASSERT(timer->magic == TIMER_MAGIC);
|
DEBUG_ASSERT(timer->magic == TIMER_MAGIC);
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ static void timer_set(timer_t *timer, lk_time_t delay, lk_time_t period, timer_c
|
|||||||
timer->callback = callback;
|
timer->callback = callback;
|
||||||
timer->arg = arg;
|
timer->arg = arg;
|
||||||
|
|
||||||
LTRACEF("scheduled time %lu\n", timer->scheduled_time);
|
LTRACEF("scheduled time %u\n", timer->scheduled_time);
|
||||||
|
|
||||||
spin_lock_saved_state_t state;
|
spin_lock_saved_state_t state;
|
||||||
spin_lock_irqsave(&timer_lock, state);
|
spin_lock_irqsave(&timer_lock, state);
|
||||||
@@ -113,7 +113,7 @@ static void timer_set(timer_t *timer, lk_time_t delay, lk_time_t period, timer_c
|
|||||||
#if PLATFORM_HAS_DYNAMIC_TIMER
|
#if PLATFORM_HAS_DYNAMIC_TIMER
|
||||||
if (list_peek_head_type(&timers[cpu].timer_queue, timer_t, node) == timer) {
|
if (list_peek_head_type(&timers[cpu].timer_queue, timer_t, node) == timer) {
|
||||||
/* we just modified the head of the timer queue */
|
/* we just modified the head of the timer queue */
|
||||||
LTRACEF("setting new timer for %u msecs\n", (uint)delay);
|
LTRACEF("setting new timer for %u msecs\n", delay);
|
||||||
platform_set_oneshot_timer(timer_tick, NULL, delay);
|
platform_set_oneshot_timer(timer_tick, NULL, delay);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -225,7 +225,7 @@ static enum handler_return timer_tick(void *arg, lk_time_t now)
|
|||||||
|
|
||||||
uint cpu = arch_curr_cpu_num();
|
uint cpu = arch_curr_cpu_num();
|
||||||
|
|
||||||
LTRACEF("cpu %u now %lu, sp %p\n", cpu, now, __GET_FRAME());
|
LTRACEF("cpu %u now %u, sp %p\n", cpu, now, __GET_FRAME());
|
||||||
|
|
||||||
spin_lock(&timer_lock);
|
spin_lock(&timer_lock);
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ static enum handler_return timer_tick(void *arg, lk_time_t now)
|
|||||||
timer = list_peek_head_type(&timers[cpu].timer_queue, timer_t, node);
|
timer = list_peek_head_type(&timers[cpu].timer_queue, timer_t, node);
|
||||||
if (likely(timer == 0))
|
if (likely(timer == 0))
|
||||||
break;
|
break;
|
||||||
LTRACEF("next item on timer queue %p at %lu now %lu (%p, arg %p)\n", timer, timer->scheduled_time, now, timer->callback, timer->arg);
|
LTRACEF("next item on timer queue %p at %u now %u (%p, arg %p)\n", timer, timer->scheduled_time, now, timer->callback, timer->arg);
|
||||||
if (likely(TIME_LT(now, timer->scheduled_time)))
|
if (likely(TIME_LT(now, timer->scheduled_time)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ static enum handler_return timer_tick(void *arg, lk_time_t now)
|
|||||||
/* we pulled it off the list, release the list lock to handle it */
|
/* we pulled it off the list, release the list lock to handle it */
|
||||||
spin_unlock(&timer_lock);
|
spin_unlock(&timer_lock);
|
||||||
|
|
||||||
LTRACEF("dequeued timer %p, scheduled %lu periodic %lu\n", timer, timer->scheduled_time, timer->periodic_time);
|
LTRACEF("dequeued timer %p, scheduled %u periodic %u\n", timer, timer->scheduled_time, timer->periodic_time);
|
||||||
|
|
||||||
THREAD_STATS_INC(timers);
|
THREAD_STATS_INC(timers);
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ static enum handler_return timer_tick(void *arg, lk_time_t now)
|
|||||||
* by the callback put it back in the list
|
* by the callback put it back in the list
|
||||||
*/
|
*/
|
||||||
if (periodic && !list_in_list(&timer->node) && timer->periodic_time > 0) {
|
if (periodic && !list_in_list(&timer->node) && timer->periodic_time > 0) {
|
||||||
LTRACEF("periodic timer, period %u\n", (uint)timer->periodic_time);
|
LTRACEF("periodic timer, period %u\n", timer->periodic_time);
|
||||||
timer->scheduled_time = now + timer->periodic_time;
|
timer->scheduled_time = now + timer->periodic_time;
|
||||||
insert_timer_in_queue(cpu, timer);
|
insert_timer_in_queue(cpu, timer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ static uint32_t ticks = 0;
|
|||||||
|
|
||||||
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, lk_time_t interval)
|
||||||
{
|
{
|
||||||
LTRACEF("cb %p, arg %p, interval %ld\n", callback, arg, interval);
|
LTRACEF("cb %p, arg %p, interval %u\n", callback, arg, interval);
|
||||||
|
|
||||||
uint32_t count = ((uint64_t)TIMER_RATE * interval / 1000);
|
uint32_t count = ((uint64_t)TIMER_RATE * interval / 1000);
|
||||||
|
|
||||||
|
|||||||
@@ -114,8 +114,6 @@ STATIC const SWM_GRP_T swmSetup[] = {
|
|||||||
/* Sets up system pin muxing */
|
/* Sets up system pin muxing */
|
||||||
void Board_SetupMuxing(void)
|
void Board_SetupMuxing(void)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Enable SWM and IOCON clocks */
|
/* Enable SWM and IOCON clocks */
|
||||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
|
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
|
||||||
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
|
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
|
||||||
@@ -125,7 +123,7 @@ void Board_SetupMuxing(void)
|
|||||||
Chip_IOCON_SetPinMuxing(LPC_IOCON, ioconSetup, sizeof(ioconSetup) / sizeof(PINMUX_GRP_T));
|
Chip_IOCON_SetPinMuxing(LPC_IOCON, ioconSetup, sizeof(ioconSetup) / sizeof(PINMUX_GRP_T));
|
||||||
|
|
||||||
/* SWM assignable pin setup */
|
/* SWM assignable pin setup */
|
||||||
for (i = 0; i < (sizeof(swmSetup) / sizeof(SWM_GRP_T)); i++) {
|
for (uint i = 0; i < (sizeof(swmSetup) / sizeof(SWM_GRP_T)); i++) {
|
||||||
Chip_SWM_MovablePortPinAssign((CHIP_SWM_PIN_MOVABLE_T) swmSetup[i].assignedpin,
|
Chip_SWM_MovablePortPinAssign((CHIP_SWM_PIN_MOVABLE_T) swmSetup[i].assignedpin,
|
||||||
swmSetup[i].port, swmSetup[i].pin);
|
swmSetup[i].port, swmSetup[i].pin);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user