2011-06-15 03:54:19 Core dump on WARN_ON()
Dimitar Penev (BULGARIA)
Message: 101277
Hi Guys,
I am trying to use mmc_spi driver from the release 2010R1-RC5
I am compiling with 2010R1-RC4 toolchain.
As a result I got a core dump on the SD card detection, which after some investigation
appear to happen at the following line in ./drivers/mmc/core/core.c
void mmc_set_clock(struct mmc_host *host, unsigned int hz)
{
WARN_ON(hz < host->f_min); //<---- problematic line
if (hz > host->f_max)
hz = host->f_max;
host->ios.clock = hz;
printk(KERN_INFO "In set_clock");
mmc_set_ios(host);
}
I haven't investigated further if the warning condition is true but getting core dump is already strange to me.
WARN_ON seems to be defined in ./arch/blackfin/include/asm/bug.h using inline assembly code.
Is there some special care have to be taken so WARN_ON behaves better?
My compilation line is:
bfin-uclinux-gcc -Wp,-MD,drivers/mmc/core/.core.o.d -nostdinc -isystem /root/switchfin/toolchain/opt/uClinux/bfin-uclinux/bin/../lib/gcc/bfin-uclinux/4.3.5/include -I/root/switchfin/build_pr1/blackfin-linux-dist/linux-2.6.x/arch/blackfin/include
-Iinclude -include include/generated/autoconf.h -D__KERNEL__ -I/root/switchfin/build_pr1/blackfin-linux-dist/linux-2.6.x/arch/blackfin/mach-bf537/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
-fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -mno-fdpic -mcpu=bf537-0.3 -Iarch/blackfin/include/ -Iarch/blackfin/mach-bf537/include -fno-stack-protector -fomit-frame-pointer
-fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -DMODULE -mlong-calls -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(core)" -D"KBUILD_MODNAME=KBUILD_STR(mmc_core)"
-c -o drivers/mmc/core/core.o drivers/mmc/core/core.c
Best Regards
Dimitar
QuoteReplyEditDelete
2011-06-17 01:12:57 Re: Core dump on WARN_ON()
Mike Frysinger (UNITED STATES)
Message: 101330
kernel WARN_ON()'s do not cause core dumps, nor does Blackfin even support core dumps, so there's no way you could have dumped core
please post the exact platform resources you're using as well as the full boot output you're seeing
QuoteReplyEditDelete
2011-06-17 06:20:33 Re: Core dump on WARN_ON()
Dimitar Penev (BULGARIA)
Message: 101381
Hi Mike,
Thank you for the response!
Oh its probably not the core dump what I am observing , please see below
I've already sloved my other issue so the WARN_ON() is getting input 'false' as input argument
and things are going well.
Can you please point me to some information about the normal behaviour of WARN_ON(1) on blakfin platforms.
Lets assume standard uClinux on the BF537 Stamp board.
Stack info:
SP: [0x013dfc00]
Memory from 0x013dfc00 to 013e0000
013dfc00:[00000000] 0133fb44 001c2c60 001d22b4 01490000 013de000 001cbf10 013de000
013dfc20: 00000000 00000202 00000000 00044b83 0000000a 013dfc8c 00000100 013de000
013dfc40: 0000ffff 0000ffff 00000000 00000006 00000024 0002eb0c 001ce654 01490000
...
Thanks
Dimitar
QuoteReplyEditDelete
2011-06-17 18:02:22 Re: Core dump on WARN_ON()
Mike Frysinger (UNITED STATES)
Message: 101396
WARN_ON() behaves the same way as all architectures. if the arg returns true, then dump stack/state information into the kernel log. i'm not sure what you're looking for.
QuoteReplyEditDelete
2011-06-19 09:04:33 Re: Core dump on WARN_ON()
Dimitar Penev (BULGARIA)
Message: 101456
Hi Mike,
Thanks, this info is enought to me now.
Best Regards
Dimitar