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: (32 commits)
  Blackfin: ip0x: fix unused variable warning
  Blackfin: punt unused HDMA masks
  Blackfin: wire up new syscalls
  Blackfin/ipipe: restore pipeline bits in irqflags
  Blackfin/ipipe: fix deferred pipeline sync for the root stage
  Blackfin/ipipe: upgrade to I-pipe mainline
  Blackfin: cpufreq: fix typos
  Blackfin: enable GENERIC_HARDIRQS_NO_DEPRECATED
  Blackfin: SMP: convert to irq chip functions
  Blackfin: use accessor functions in show_interrupts()
  Blackfin: use proper wrapper functions for modifying irq status
  Blackfin: convert gpio irq_chip to new functions
  Blackfin: convert mac irq_chip to new functions
  Blackfin: convert error irq_chip to new functions
  Blackfin: convert internal irq_chip to new functions
  Blackfin: convert core irq_chip to new functions
  Blackfin: use proper wrappers for irq_desc
  Blackfin: optimize startup code
  Blackfin: SMP: work around anomaly 05000491
  Blackfin: SMP: implement cpu_freq support
  ...
  • Loading branch information
Linus Torvalds committed Mar 19, 2011
2 parents 9975961 + 0c082bd commit 664322a
Show file tree
Hide file tree
Showing 52 changed files with 762 additions and 519 deletions.
42 changes: 34 additions & 8 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config BLACKFIN
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_PROBE
select IRQ_PER_CPU if SMP
select GENERIC_HARDIRQS_NO_DEPRECATED

config GENERIC_CSUM
def_bool y
Expand Down Expand Up @@ -690,20 +691,21 @@ endmenu


menu "Blackfin Kernel Optimizations"
depends on !SMP

comment "Memory Optimizations"

config I_ENTRY_L1
bool "Locate interrupt entry code in L1 Memory"
default y
depends on !SMP
help
If enabled, interrupt entry code (STORE/RESTORE CONTEXT) is linked
into L1 instruction memory. (less latency)

config EXCPT_IRQ_SYSC_L1
bool "Locate entire ASM lowlevel exception / interrupt - Syscall and CPLB handler code in L1 Memory"
default y
depends on !SMP
help
If enabled, the entire ASM lowlevel exception and interrupt entry code
(STORE/RESTORE CONTEXT) is linked into L1 instruction memory.
Expand All @@ -712,97 +714,111 @@ config EXCPT_IRQ_SYSC_L1
config DO_IRQ_L1
bool "Locate frequently called do_irq dispatcher function in L1 Memory"
default y
depends on !SMP
help
If enabled, the frequently called do_irq dispatcher function is linked
into L1 instruction memory. (less latency)

config CORE_TIMER_IRQ_L1
bool "Locate frequently called timer_interrupt() function in L1 Memory"
default y
depends on !SMP
help
If enabled, the frequently called timer_interrupt() function is linked
into L1 instruction memory. (less latency)

config IDLE_L1
bool "Locate frequently idle function in L1 Memory"
default y
depends on !SMP
help
If enabled, the frequently called idle function is linked
into L1 instruction memory. (less latency)

config SCHEDULE_L1
bool "Locate kernel schedule function in L1 Memory"
default y
depends on !SMP
help
If enabled, the frequently called kernel schedule is linked
into L1 instruction memory. (less latency)

config ARITHMETIC_OPS_L1
bool "Locate kernel owned arithmetic functions in L1 Memory"
default y
depends on !SMP
help
If enabled, arithmetic functions are linked
into L1 instruction memory. (less latency)

config ACCESS_OK_L1
bool "Locate access_ok function in L1 Memory"
default y
depends on !SMP
help
If enabled, the access_ok function is linked
into L1 instruction memory. (less latency)

config MEMSET_L1
bool "Locate memset function in L1 Memory"
default y
depends on !SMP
help
If enabled, the memset function is linked
into L1 instruction memory. (less latency)

config MEMCPY_L1
bool "Locate memcpy function in L1 Memory"
default y
depends on !SMP
help
If enabled, the memcpy function is linked
into L1 instruction memory. (less latency)

config STRCMP_L1
bool "locate strcmp function in L1 Memory"
default y
depends on !SMP
help
If enabled, the strcmp function is linked
into L1 instruction memory (less latency).

config STRNCMP_L1
bool "locate strncmp function in L1 Memory"
default y
depends on !SMP
help
If enabled, the strncmp function is linked
into L1 instruction memory (less latency).

config STRCPY_L1
bool "locate strcpy function in L1 Memory"
default y
depends on !SMP
help
If enabled, the strcpy function is linked
into L1 instruction memory (less latency).

config STRNCPY_L1
bool "locate strncpy function in L1 Memory"
default y
depends on !SMP
help
If enabled, the strncpy function is linked
into L1 instruction memory (less latency).

config SYS_BFIN_SPINLOCK_L1
bool "Locate sys_bfin_spinlock function in L1 Memory"
default y
depends on !SMP
help
If enabled, sys_bfin_spinlock function is linked
into L1 instruction memory. (less latency)

config IP_CHECKSUM_L1
bool "Locate IP Checksum function in L1 Memory"
default n
depends on !SMP
help
If enabled, the IP Checksum function is linked
into L1 instruction memory. (less latency)
Expand All @@ -811,42 +827,51 @@ config CACHELINE_ALIGNED_L1
bool "Locate cacheline_aligned data to L1 Data Memory"
default y if !BF54x
default n if BF54x
depends on !BF531
depends on !SMP && !BF531
help
If enabled, cacheline_aligned data is linked
into L1 data memory. (less latency)

config SYSCALL_TAB_L1
bool "Locate Syscall Table L1 Data Memory"
default n
depends on !BF531
depends on !SMP && !BF531
help
If enabled, the Syscall LUT is linked
into L1 data memory. (less latency)

config CPLB_SWITCH_TAB_L1
bool "Locate CPLB Switch Tables L1 Data Memory"
default n
depends on !BF531
depends on !SMP && !BF531
help
If enabled, the CPLB Switch Tables are linked
into L1 data memory. (less latency)

config CACHE_FLUSH_L1
bool "Locate cache flush funcs in L1 Inst Memory"
config ICACHE_FLUSH_L1
bool "Locate icache flush funcs in L1 Inst Memory"
default y
help
If enabled, the Blackfin cache flushing functions are linked
If enabled, the Blackfin icache flushing functions are linked
into L1 instruction memory.

Note that this might be required to address anomalies, but
these functions are pretty small, so it shouldn't be too bad.
If you are using a processor affected by an anomaly, the build
system will double check for you and prevent it.

config DCACHE_FLUSH_L1
bool "Locate dcache flush funcs in L1 Inst Memory"
default y
depends on !SMP
help
If enabled, the Blackfin dcache flushing functions are linked
into L1 instruction memory.

config APP_STACK_L1
bool "Support locating application stack in L1 Scratch Memory"
default y
depends on !SMP
help
If enabled the application stack can be located in L1
scratch memory (less latency).
Expand All @@ -856,7 +881,7 @@ config APP_STACK_L1
config EXCEPTION_L1_SCRATCH
bool "Locate exception stack in L1 Scratch Memory"
default n
depends on !APP_STACK_L1
depends on !SMP && !APP_STACK_L1
help
Whenever an exception occurs, use the L1 Scratch memory for
stack storage. You cannot place the stacks of FLAT binaries
Expand All @@ -868,6 +893,7 @@ comment "Speed Optimizations"
config BFIN_INS_LOWOVERHEAD
bool "ins[bwl] low overhead, higher interrupt latency"
default y
depends on !SMP
help
Reads on the Blackfin are speculative. In Blackfin terms, this means
they can be interrupted at any time (even after they have been issued
Expand Down
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF518F-EZBRD_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_CCITT=m
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF526-EZBRD_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRC_CCITT=m
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF527-EZKIT-V2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF527-EZKIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF533-EZKIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF533-STAMP_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF537-STAMP_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF538-EZKIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF548-EZKIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF561-EZKIT-SMP_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
1 change: 1 addition & 0 deletions arch/blackfin/configs/BF561-EZKIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
CONFIG_EARLY_PRINTK=y
CONFIG_CPLB_INFO=y
CONFIG_BFIN_PSEUDODBG_INSNS=y
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
16 changes: 14 additions & 2 deletions arch/blackfin/include/asm/def_LPBlackfin.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,26 @@
({ BUG(); 0; }); \
})
#define bfin_write(addr, val) \
({ \
do { \
switch (sizeof(*(addr))) { \
case 1: bfin_write8(addr, val); break; \
case 2: bfin_write16(addr, val); break; \
case 4: bfin_write32(addr, val); break; \
default: BUG(); \
} \
})
} while (0)

#define bfin_write_or(addr, bits) \
do { \
void *__addr = (void *)(addr); \
bfin_write(__addr, bfin_read(__addr) | (bits)); \
} while (0)

#define bfin_write_and(addr, bits) \
do { \
void *__addr = (void *)(addr); \
bfin_write(__addr, bfin_read(__addr) & (bits)); \
} while (0)

#endif /* __ASSEMBLY__ */

Expand Down
3 changes: 3 additions & 0 deletions arch/blackfin/include/asm/dpmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ void unset_dram_srfs(void);

#define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))

#ifdef CONFIG_CPU_FREQ
#define CPUFREQ_CPU 0
#endif
struct bfin_dpmc_platform_data {
const unsigned int *tuple_tab;
unsigned short tabsize;
Expand Down
Loading

0 comments on commit 664322a

Please sign in to comment.