From: Robin Getz Date: Wed, 7 Jan 2009 15:14:39 +0000 (+0800) Subject: Blackfin arch: panic when running on a chip rev below what we are compiled for X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7419a327f6264bef869b195497aaf03b72ca17b7;p=linux-beck.git Blackfin arch: panic when running on a chip rev below what we are compiled for If we are running on a chip revision below what we are compiled for, there will be missing anomaly workarounds, and a panic is inevitable. Do is sooner, rather than later, so people don't look for bugs that already have workarounds (that they turned off). Signed-off-by: Robin Getz Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 4dffb913147e..d3d37e7f465b 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -876,9 +876,12 @@ void __init setup_arch(char **cmdline_p) if (bfin_compiled_revid() == -1) printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n", bfin_revid()); - else if (bfin_compiled_revid() != 0xffff) + else if (bfin_compiled_revid() != 0xffff) { printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", bfin_compiled_revid(), bfin_revid()); + if (bfin_compiled_revid() > bfin_revid()) + panic("Error: you are missing anomaly workarounds for this rev\n"); + } } if (bfin_revid() < CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX) printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",