Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (27 commits)
  Blackfin: hook up new rt_tgsigqueueinfo syscall
  Blackfin: improve CLKIN_HZ config default
  Blackfin: initial support for ftrace grapher
  Blackfin: initial support for ftrace
  Blackfin: enable support for LOCKDEP
  Blackfin: add preliminary support for STACKTRACE
  Blackfin: move custom sections into sections.h
  Blackfin: punt unused/wrong mutex-dec.h
  Blackfin: add support for irqflags
  Blackfin: add support for bzip2/lzma compressed kernel images
  Blackfin: convert Kconfig style to def_bool
  Blackfin: bf548-ezkit: update smsc911x resources
  Blackfin: update aedos-ipipe code to upstream 1.10-00
  Blackfin: bf537-stamp: update ADP5520 resources
  Blackfin: bf518f-ezbrd: fix SPI CS for SPI flash
  Blackfin: define SPI IRQ in board resources
  Blackfin: do not configure the UART early if on wrong processor
  Blackfin: fix deadlock in SMP IPI handler
  Blackfin: fix flag storage for irq funcs
  Blackfin: push down exception oops checking
  ...
  • Loading branch information
Linus Torvalds committed Jun 16, 2009
2 parents 6a454f7 + 61cdd7a commit 8d6cea5
Show file tree
Hide file tree
Showing 56 changed files with 809 additions and 605 deletions.
60 changes: 33 additions & 27 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,65 @@
mainmenu "Blackfin Kernel Configuration"

config MMU
bool
default n
def_bool n

config FPU
bool
default n
def_bool n

config RWSEM_GENERIC_SPINLOCK
bool
default y
def_bool y

config RWSEM_XCHGADD_ALGORITHM
bool
default n
def_bool n

config BLACKFIN
bool
default y
def_bool y
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACER
select HAVE_IDE
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_BZIP2
select HAVE_KERNEL_LZMA
select HAVE_OPROFILE
select ARCH_WANT_OPTIONAL_GPIOLIB

config GENERIC_BUG
def_bool y
depends on BUG

config ZONE_DMA
bool
default y
def_bool y

config GENERIC_FIND_NEXT_BIT
bool
default y
def_bool y

config GENERIC_HWEIGHT
bool
default y
def_bool y

config GENERIC_HARDIRQS
bool
default y
def_bool y

config GENERIC_IRQ_PROBE
bool
default y
def_bool y

config GENERIC_GPIO
bool
default y
def_bool y

config FORCE_MAX_ZONEORDER
int
default "14"

config GENERIC_CALIBRATE_DELAY
bool
default y
def_bool y

config LOCKDEP_SUPPORT
def_bool y

config STACKTRACE_SUPPORT
def_bool y

config TRACE_IRQFLAGS_SUPPORT
def_bool y

source "init/Kconfig"

Expand Down Expand Up @@ -408,12 +414,12 @@ comment "Clock/PLL Setup"

config CLKIN_HZ
int "Frequency of the crystal on the board in Hz"
default "10000000" if BFIN532_IP0X
default "11059200" if BFIN533_STAMP
default "24576000" if PNAV10
default "25000000" # most people use this
default "27000000" if BFIN533_EZKIT
default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT || H8606_HVSISTEMAS || BLACKSTAMP || BFIN526_EZBRD || BFIN538_EZKIT || BFIN518F-EZBRD)
default "30000000" if BFIN561_EZKIT
default "24576000" if PNAV10
default "10000000" if BFIN532_IP0X
help
The frequency of CLKIN crystal oscillator on the board in Hz.
Warning: This value should match the crystal on the board. Otherwise,
Expand Down
7 changes: 5 additions & 2 deletions arch/blackfin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ archclean:

INSTALL_PATH ?= /tftpboot
boot := arch/$(ARCH)/boot
BOOT_TARGETS = vmImage
BOOT_TARGETS = vmImage vmImage.bz2 vmImage.gz vmImage.lzma
PHONY += $(BOOT_TARGETS) install
KBUILD_IMAGE := $(boot)/vmImage

Expand All @@ -150,7 +150,10 @@ install:
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install

define archhelp
echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
echo '* vmImage - Alias to selected kernel format (vmImage.gz by default)'
echo ' vmImage.bz2 - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.bz2)'
echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
echo ' install - Install kernel using'
echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or'
echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or'
Expand Down
3 changes: 2 additions & 1 deletion arch/blackfin/boot/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
+vmImage
vmImage*
vmlinux*
31 changes: 24 additions & 7 deletions arch/blackfin/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,41 @@

MKIMAGE := $(srctree)/scripts/mkuboot.sh

targets := vmImage
extra-y += vmlinux.bin vmlinux.gz
targets := vmImage vmImage.bz2 vmImage.gz vmImage.lzma
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma

quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
-C gzip -n 'Linux-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
-C $(2) -n 'Linux-$(KERNELRELEASE)' -a $(CONFIG_BOOT_LOAD) \
-e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
-d $< $@

$(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy)

$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)

$(obj)/vmImage: $(obj)/vmlinux.gz
$(call if_changed,uimage)
@$(kecho) 'Kernel: $@ is ready'
$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
$(call if_changed,bzip2)

$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
$(call if_changed,lzma)

$(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
$(call if_changed,uimage,bzip2)

$(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
$(call if_changed,uimage,gzip)

$(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
$(call if_changed,uimage,lzma)

suffix-$(CONFIG_KERNEL_GZIP) := gz
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
suffix-$(CONFIG_KERNEL_LZMA) := lzma
$(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
@ln -sf $(notdir $<) $@

install:
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
16 changes: 8 additions & 8 deletions arch/blackfin/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static inline int atomic_test_mask(int mask, atomic_t *v)

static inline void atomic_add(int i, atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter += i;
Expand All @@ -99,7 +99,7 @@ static inline void atomic_add(int i, atomic_t *v)

static inline void atomic_sub(int i, atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter -= i;
Expand All @@ -110,7 +110,7 @@ static inline void atomic_sub(int i, atomic_t *v)
static inline int atomic_add_return(int i, atomic_t *v)
{
int __temp = 0;
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter += i;
Expand All @@ -124,7 +124,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
static inline int atomic_sub_return(int i, atomic_t *v)
{
int __temp = 0;
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter -= i;
Expand All @@ -136,7 +136,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)

static inline void atomic_inc(volatile atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter++;
Expand All @@ -145,7 +145,7 @@ static inline void atomic_inc(volatile atomic_t *v)

static inline void atomic_dec(volatile atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter--;
Expand All @@ -154,7 +154,7 @@ static inline void atomic_dec(volatile atomic_t *v)

static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter &= ~mask;
Expand All @@ -163,7 +163,7 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)

static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
{
long flags;
unsigned long flags;

local_irq_save_hw(flags);
v->counter |= mask;
Expand Down
11 changes: 1 addition & 10 deletions arch/blackfin/include/asm/bfin-global.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#ifndef __ASSEMBLY__

#include <asm-generic/sections.h>
#include <asm/sections.h>
#include <asm/ptrace.h>
#include <asm/user.h>
#include <linux/linkage.h>
Expand Down Expand Up @@ -99,15 +99,6 @@ extern const char bfin_board_name[];
extern unsigned long bfin_sic_iwr[];
extern unsigned vr_wakeup;
extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
extern unsigned long _ramstart, _ramend, _rambase;
extern unsigned long memory_start, memory_end, physical_mem_end;
extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[],
_ebss_l1[], _l1_lma_start[], _sdata_b_l1[], _sbss_b_l1[], _ebss_b_l1[],
_stext_l2[], _etext_l2[], _sdata_l2[], _edata_l2[], _sbss_l2[],
_ebss_l2[], _l2_lma_start[];

/* only used when MTD_UCLINUX */
extern unsigned long memory_mtd_start, memory_mtd_end, mtd_size;

#ifdef CONFIG_BFIN_ICACHE_LOCK
extern void cache_grab_lock(int way);
Expand Down
3 changes: 2 additions & 1 deletion arch/blackfin/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ static inline void clear_bit(int nr, volatile unsigned long *addr)

static inline void change_bit(int nr, volatile unsigned long *addr)
{
int mask, flags;
int mask;
unsigned long flags;
unsigned long *ADDR = (unsigned long *)addr;

ADDR += nr >> 5;
Expand Down
57 changes: 51 additions & 6 deletions arch/blackfin/include/asm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,58 @@
#define _BLACKFIN_BUG_H

#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG

#define BUG() do { \
dump_bfin_trace_buffer(); \
printk(KERN_EMERG "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
panic("BUG!"); \
} while (0)
#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

Expand Down
11 changes: 8 additions & 3 deletions arch/blackfin/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@
#define L1_CACHE_SHIFT_MAX 5

#if defined(CONFIG_SMP) && \
!defined(CONFIG_BFIN_CACHE_COHERENT) && \
defined(CONFIG_BFIN_DCACHE)
#define __ARCH_SYNC_CORE_DCACHE
!defined(CONFIG_BFIN_CACHE_COHERENT)
# if defined(CONFIG_BFIN_ICACHE)
# define __ARCH_SYNC_CORE_ICACHE
# endif
# if defined(CONFIG_BFIN_DCACHE)
# define __ARCH_SYNC_CORE_DCACHE
# endif
#ifndef __ASSEMBLY__
asmlinkage void __raw_smp_mark_barrier_asm(void);
asmlinkage void __raw_smp_check_barrier_asm(void);
Expand All @@ -51,6 +55,7 @@ static inline void smp_check_barrier(void)
}

void resync_core_dcache(void);
void resync_core_icache(void);
#endif
#endif

Expand Down
3 changes: 2 additions & 1 deletion arch/blackfin/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned lo
extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address);
extern void blackfin_dflush_page(void *page);
extern void blackfin_invalidate_entire_dcache(void);
extern void blackfin_invalidate_entire_icache(void);

#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
Expand Down Expand Up @@ -97,7 +98,7 @@ do { memcpy(dst, src, len); \
extern unsigned long reserved_mem_dcache_on;
extern unsigned long reserved_mem_icache_on;

static inline int bfin_addr_dcachable(unsigned long addr)
static inline int bfin_addr_dcacheable(unsigned long addr)
{
#ifdef CONFIG_BFIN_DCACHE
if (addr < (_ramend - DMA_UNCACHED_REGION))
Expand Down
Loading

0 comments on commit 8d6cea5

Please sign in to comment.