mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
96f1050d3d
Bill Gatliff & David Brownell pointed out we were missing some copyrights, and licensing terms in some of the files in ./arch/blackfin, so this fixes things, and cleans them up. It also removes: - verbose GPL text(refer to the top level ./COPYING file) - file names (you are looking at the file) - bug url (it's in the ./MAINTAINERS file) - "or later" on GPL-2, when we did not have that right It also allows some Blackfin-specific assembly files to be under a BSD like license (for people to use them outside of Linux). Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
68 lines
1.3 KiB
C
68 lines
1.3 KiB
C
/*
|
|
* Copyright 2004-2009 Analog Devices Inc.
|
|
*
|
|
* Licensed under the GPL-2 or later.
|
|
*/
|
|
|
|
#ifndef _BLACKFIN_BUG_H
|
|
#define _BLACKFIN_BUG_H
|
|
|
|
#ifdef CONFIG_BUG
|
|
|
|
#define BFIN_BUG_OPCODE 0xefcd
|
|
|
|
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
|
|
|
#define _BUG_OR_WARN(flags) \
|
|
asm volatile( \
|
|
"1: .hword %0\n" \
|
|
" .section __bug_table,\"a\",@progbits\n" \
|
|
"2: .long 1b\n" \
|
|
" .long %1\n" \
|
|
" .short %2\n" \
|
|
" .short %3\n" \
|
|
" .org 2b + %4\n" \
|
|
" .previous" \
|
|
: \
|
|
: "i"(BFIN_BUG_OPCODE), "i"(__FILE__), \
|
|
"i"(__LINE__), "i"(flags), \
|
|
"i"(sizeof(struct bug_entry)))
|
|
|
|
#else
|
|
|
|
#define _BUG_OR_WARN(flags) \
|
|
asm volatile( \
|
|
"1: .hword %0\n" \
|
|
" .section __bug_table,\"a\",@progbits\n" \
|
|
"2: .long 1b\n" \
|
|
" .short %1\n" \
|
|
" .org 2b + %2\n" \
|
|
" .previous" \
|
|
: \
|
|
: "i"(BFIN_BUG_OPCODE), "i"(flags), \
|
|
"i"(sizeof(struct bug_entry)))
|
|
|
|
#endif /* CONFIG_DEBUG_BUGVERBOSE */
|
|
|
|
#define BUG() \
|
|
do { \
|
|
_BUG_OR_WARN(0); \
|
|
for (;;); \
|
|
} while (0)
|
|
|
|
#define WARN_ON(condition) \
|
|
({ \
|
|
int __ret_warn_on = !!(condition); \
|
|
if (unlikely(__ret_warn_on)) \
|
|
_BUG_OR_WARN(BUGFLAG_WARNING); \
|
|
unlikely(__ret_warn_on); \
|
|
})
|
|
|
|
#define HAVE_ARCH_BUG
|
|
#define HAVE_ARCH_WARN_ON
|
|
|
|
#endif
|
|
|
|
#include <asm-generic/bug.h>
|
|
|
|
#endif
|