summaryrefslogtreecommitdiff
path: root/arch/blackfin/mm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-12-25 15:34:08 (GMT)
committerMike Frysinger <vapier@gentoo.org>2010-03-09 05:30:47 (GMT)
commitf05ede3a9416b6eff6c997c12fd749044fb4fdac (patch)
tree82f137bd2b3081f9f369f13680c030df3cec33cc /arch/blackfin/mm
parent0ea19c64e30f3688d1a890217c382db2b0ca411c (diff)
downloadlinux-f05ede3a9416b6eff6c997c12fd749044fb4fdac.tar.xz
Blackfin: isram: add unlikely to sanity checks
Don't want the compiler assuming the rare sanity checks are the norm and optimize for those paths. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mm')
-rw-r--r--arch/blackfin/mm/isram-driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index 84cdc5a..9213e23 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -62,7 +62,7 @@ static void isram_write(const void *addr, uint64_t data)
uint32_t cmd;
unsigned long flags;
- if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH))
+ if (unlikely(addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH)))
return;
cmd = IADDR2DTEST(addr) | 2; /* write */
@@ -93,7 +93,7 @@ static uint64_t isram_read(const void *addr)
unsigned long flags;
uint64_t ret;
- if (addr > (void *)(L1_CODE_START + L1_CODE_LENGTH))
+ if (unlikely(addr > (void *)(L1_CODE_START + L1_CODE_LENGTH)))
return 0;
cmd = IADDR2DTEST(addr) | 0; /* read */
@@ -120,7 +120,7 @@ static bool isram_check_addr(const void *addr, size_t n)
{
if ((addr >= (void *)L1_CODE_START) &&
(addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) {
- if ((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH)) {
+ if (unlikely((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH))) {
show_stack(NULL, NULL);
pr_err("copy involving %p length (%zu) too long\n", addr, n);
}