When compiling kernel with option DEBUG_INTC, we do not have
AMPINTC_IRQ_TO_REG nor AMPINTC_IRQ_TO_REGi.

In the same file, most uses of Debugger() is protected with either

#ifdef DDB

or with a

#if defined(DEBUG_SOMETHING) && defined(DDB)

as it is with sys/arch/amd64/amd64/cpu.c, sys/arch/arm/arm/pmap.c, and
many others. This is not a problem with GENERIC that has option DDB, but
it is with RAMDISK.

(...)
cc  -Werror -Wall -Wimplicit-function-declaration  -Wno-main -Wno-uninitialized 
 -Wframe-larger-than=2047 -ffreestanding -msoft-float -march=armv6 
-Wa,-march=armv7a -fno-builtin-printf -fno-builtin-snprintf  
-fno-builtin-vsnprintf -fno-builtin-log  -fno-builtin-log2 -fno-builtin-malloc  
-fno-stack-protector -O2 -pipe -nostdinc -I../../../.. -I. -I../../../../arch 
-DCPU_ARMv7 -DDEBUG -DDEBUG_INTC -DTIMEZONE="0" -DDST="0" -DSMALL_KERNEL 
-DNO_PROPOLICE -DBOOT_CONFIG -DMINIROOTSIZE="0x2800" -DRAMDISK_HOOKS -DFFS 
-DMSDOSFS -DINET6 -DEXT2FS -DUSBVERBOSE -DMAXUSERS=4 -D_KERNEL -D__armv7__ -MD 
-MP  -c ../../../../arch/arm/cortex/ampintc.c
cc1: warnings being treated as errors
../../../../arch/arm/cortex/ampintc.c: In function 'ampintc_irq_handler':
../../../../arch/arm/cortex/ampintc.c:498: warning: implicit declaration of 
function 'Debugger'
*** Error 1 in /usr/src/sys/arch/armv7/compile/RAMDISK (Makefile:536 
'ampintc.o')

ok?

Index: ampintc.c
===================================================================
RCS file: /cvs/src/sys/arch/arm/cortex/ampintc.c,v
retrieving revision 1.7
diff -u -p -r1.7 ampintc.c
--- ampintc.c   15 Jul 2015 21:09:40 -0000      1.7
+++ ampintc.c   4 Nov 2015 18:43:40 -0000
@@ -386,13 +386,6 @@ ampintc_calc_mask(void)
                if (max == IPL_NONE)
                        min = IPL_NONE;

-#ifdef DEBUG_INTC
-               if (min != IPL_NONE) {
-                       printf("irq %d to block at %d %d reg %d bit %d\n",
-                           irq, max, min, AMPINTC_IRQ_TO_REG(irq),
-                           AMPINTC_IRQ_TO_REGi(irq));
-               }
-#endif
                /* Enable interrupts at lower levels, clear -> enable */
                /* Set interrupt priority/enable */
                if (min != IPL_NONE) {
@@ -494,8 +487,7 @@ ampintc_irq_handler(void *frame)
        int                      irq, pri, s;

        iack_val = ampintc_iack();
-//#define DEBUG_INTC
-#ifdef DEBUG_INTC
+#if defined(DEBUG_INTC) && defined(DDB)
        if (iack_val != 27)
        printf("irq  %d fired\n", iack_val);
        else {

-- 
db

Reply via email to