Skip to content

Commit

Permalink
[PATCH] xtensa: remove extra header files
Browse files Browse the repository at this point in the history
The Xtensa port contained many header files that were never needed.  This
rather lengthy patch removes all those files.  Unfortunately, there were
many dependencies that needed to be updated, so this patch touches quite a
few source files.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Chris Zankel authored and Linus Torvalds committed Dec 10, 2006
1 parent fd43fe1 commit 173d668
Show file tree
Hide file tree
Showing 71 changed files with 1,360 additions and 7,043 deletions.
21 changes: 3 additions & 18 deletions arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,10 @@ menu "Processor type and features"

choice
prompt "Xtensa Processor Configuration"
default XTENSA_CPU_LINUX_BE
default XTENSA_VARIANT_FSF

config XTENSA_CPU_LINUX_BE
bool "linux_be"
---help---
The linux_be processor configuration is the baseline Xtensa
configurations included in this kernel and also used by
binutils, gcc, and gdb. It contains no TIE, no coprocessors,
and the following configuration options:

Code Density Option 2 Misc Special Registers
NSA/NSAU Instructions 128-bit Data Bus Width
Processor ID 8K, 2-way I and D Caches
Zero-Overhead Loops 2 Inst Address Break Registers
Big Endian 2 Data Address Break Registers
64 General-Purpose Registers JTAG Interface and Trace Port
17 Interrupts MMU w/ TLBs and Autorefill
3 Interrupt Levels 8 Autorefill Ways (I/D TLBs)
3 Timers Unaligned Exceptions
config XTENSA_VARIANT_FSF
bool "fsf"
endchoice

config MMU
Expand Down
25 changes: 11 additions & 14 deletions arch/xtensa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# this architecture

# Core configuration.
# (Use CPU=<xtensa_config> to use another default compiler.)
# (Use VAR=<xtensa_config> to use another default compiler.)

cpu-$(CONFIG_XTENSA_CPU_LINUX_BE) := linux_be
cpu-$(CONFIG_XTENSA_CPU_LINUX_CUSTOM) := linux_custom
variant-$(CONFIG_XTENSA_VARIANT_FSF) := fsf
variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom

CPU = $(cpu-y)
export CPU
VARIANT = $(variant-y)
export VARIANT

# Platform configuration

Expand All @@ -27,8 +27,6 @@ platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
PLATFORM = $(platform-y)
export PLATFORM

CPPFLAGS += $(if $(KBUILD_SRC),-I$(srctree)/include/asm-xtensa/)
CPPFLAGS += -Iinclude/asm
CFLAGS += -pipe -mlongcalls

KBUILD_DEFCONFIG := iss_defconfig
Expand All @@ -41,12 +39,12 @@ core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/

# Test for cross compiling

ifneq ($(CPU),)
ifneq ($(VARIANT),)
COMPILE_ARCH = $(shell uname -m)

ifneq ($(COMPILE_ARCH), xtensa)
ifndef CROSS_COMPILE
CROSS_COMPILE = xtensa_$(CPU)-
CROSS_COMPILE = xtensa_$(VARIANT)-
endif
endif
endif
Expand All @@ -68,14 +66,13 @@ archinc := include/asm-xtensa

archprepare: $(archinc)/.platform

# Update machine cpu and platform symlinks if something which affects
# Update processor variant and platform symlinks if something which affects
# them changed.

$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
@echo ' SYMLINK $(archinc)/xtensa/config -> $(archinc)/xtensa/config-$(CPU)'
@echo ' SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
$(Q)mkdir -p $(archinc)
$(Q)mkdir -p $(archinc)/xtensa
$(Q)ln -fsn $(srctree)/$(archinc)/xtensa/config-$(CPU) $(archinc)/xtensa/config
$(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
@echo ' SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
$(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
@touch $@
Expand All @@ -89,7 +86,7 @@ zImage zImage.initrd: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $@

CLEAN_FILES += arch/xtensa/vmlinux.lds \
$(archinc)/platform $(archinc)/xtensa/config \
$(archinc)/platform $(archinc)/variant \
$(archinc)/.platform

define archhelp
Expand Down
3 changes: 0 additions & 3 deletions arch/xtensa/boot/boot-elf/bootstrap.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

#include <xtensa/config/specreg.h>
#include <xtensa/config/core.h>

#include <asm/bootparam.h>


Expand Down
37 changes: 25 additions & 12 deletions arch/xtensa/boot/boot-redboot/bootstrap.S
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

#define _ASMLANGUAGE
#include <xtensa/config/specreg.h>
#include <xtensa/config/core.h>
#include <xtensa/cacheasm.h>

#include <asm/variant/core.h>
#include <asm/regs.h>
#include <asm/asmmacro.h>
#include <asm/cacheasm.h>
/*
* RB-Data: RedBoot data/bss
* P: Boot-Parameters
Expand Down Expand Up @@ -77,8 +75,14 @@ _start:
/* Note: The assembler cannot relax "addi a0, a0, ..." to an
l32r, so we load to a4 first. */

addi a4, a0, __start - __start_a0
mov a0, a4
# addi a4, a0, __start - __start_a0
# mov a0, a4

movi a4, __start
movi a5, __start_a0
add a4, a0, a4
sub a0, a4, a5

movi a4, __start
movi a5, __reloc_end

Expand Down Expand Up @@ -106,9 +110,13 @@ _start:
/* We have to flush and invalidate the caches here before we jump. */

#if XCHAL_DCACHE_IS_WRITEBACK
dcache_writeback_all a5, a6

___flush_dcache_all a5 a6

#endif
icache_invalidate_all a5, a6

___invalidate_icache_all a5 a6
isync

movi a11, _reloc
jx a11
Expand Down Expand Up @@ -209,9 +217,14 @@ _reloc:
/* jump to the kernel */
2:
#if XCHAL_DCACHE_IS_WRITEBACK
dcache_writeback_all a5, a6

___flush_dcache_all a5 a6

#endif
icache_invalidate_all a5, a6

___invalidate_icache_all a5 a6

isync

movi a5, __start
movi a3, boot_initrd_start
Expand Down
6 changes: 1 addition & 5 deletions arch/xtensa/configs/iss_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ CONFIG_CC_ALIGN_JUMPS=0
#
# Processor type and features
#
CONFIG_XTENSA_ARCH_LINUX_BE=y
# CONFIG_XTENSA_ARCH_LINUX_LE is not set
# CONFIG_XTENSA_ARCH_LINUX_TEST is not set
# CONFIG_XTENSA_ARCH_S5 is not set
# CONFIG_XTENSA_CUSTOM is not set
CONFIG_XTENSA_VARIANT_FSF=y
CONFIG_MMU=y
# CONFIG_XTENSA_UNALIGNED_USER is not set
# CONFIG_PREEMPT is not set
Expand Down
42 changes: 19 additions & 23 deletions arch/xtensa/kernel/align.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@
*/

#include <linux/linkage.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/current.h>
#include <asm/asm-offsets.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/thread_info.h>

#if XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION

Expand Down Expand Up @@ -216,7 +211,7 @@ ENTRY(fast_unaligned)

extui a5, a4, INSN_OP0, 4 # get insn.op0 nibble

#if XCHAL_HAVE_NARROW
#if XCHAL_HAVE_DENSITY
_beqi a5, OP0_L32I_N, .Lload # L32I.N, jump
addi a6, a5, -OP0_S32I_N
_beqz a6, .Lstore # S32I.N, do a store
Expand Down Expand Up @@ -251,7 +246,7 @@ ENTRY(fast_unaligned)
#endif
__src_b a3, a5, a6 # a3 has the data word

#if XCHAL_HAVE_NARROW
#if XCHAL_HAVE_DENSITY
addi a7, a7, 2 # increment PC (assume 16-bit insn)

extui a5, a4, INSN_OP0, 4
Expand Down Expand Up @@ -279,14 +274,14 @@ ENTRY(fast_unaligned)

1:

#if XCHAL_HAVE_LOOP
rsr a3, LEND # check if we reached LEND
bne a7, a3, 1f
rsr a3, LCOUNT # and LCOUNT != 0
beqz a3, 1f
addi a3, a3, -1 # decrement LCOUNT and set
#if XCHAL_HAVE_LOOPS
rsr a5, LEND # check if we reached LEND
bne a7, a5, 1f
rsr a5, LCOUNT # and LCOUNT != 0
beqz a5, 1f
addi a5, a5, -1 # decrement LCOUNT and set
rsr a7, LBEG # set PC to LBEGIN
wsr a3, LCOUNT
wsr a5, LCOUNT
#endif

1: wsr a7, EPC_1 # skip load instruction
Expand Down Expand Up @@ -336,7 +331,7 @@ ENTRY(fast_unaligned)

movi a6, 0 # mask: ffffffff:00000000

#if XCHAL_HAVE_NARROW
#if XCHAL_HAVE_DENSITY
addi a7, a7, 2 # incr. PC,assume 16-bit instruction

extui a5, a4, INSN_OP0, 4 # extract OP0
Expand All @@ -359,14 +354,14 @@ ENTRY(fast_unaligned)
/* Get memory address */

1:
#if XCHAL_HAVE_LOOP
rsr a3, LEND # check if we reached LEND
bne a7, a3, 1f
rsr a3, LCOUNT # and LCOUNT != 0
beqz a3, 1f
addi a3, a3, -1 # decrement LCOUNT and set
#if XCHAL_HAVE_LOOPS
rsr a4, LEND # check if we reached LEND
bne a7, a4, 1f
rsr a4, LCOUNT # and LCOUNT != 0
beqz a4, 1f
addi a4, a4, -1 # decrement LCOUNT and set
rsr a7, LBEG # set PC to LBEGIN
wsr a3, LCOUNT
wsr a4, LCOUNT
#endif

1: wsr a7, EPC_1 # skip store instruction
Expand Down Expand Up @@ -416,6 +411,7 @@ ENTRY(fast_unaligned)

/* Restore working register */

l32i a8, a2, PT_AREG8
l32i a7, a2, PT_AREG7
l32i a6, a2, PT_AREG6
l32i a5, a2, PT_AREG5
Expand Down Expand Up @@ -446,7 +442,7 @@ ENTRY(fast_unaligned)
mov a1, a2

rsr a0, PS
bbsi.l a2, PS_UM_SHIFT, 1f # jump if user mode
bbsi.l a2, PS_UM_BIT, 1f # jump if user mode

movi a0, _kernel_exception
jx a0
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/coprocessor.S
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ ENTRY(enable_coprocessor)
rsync
retw

#endif

ENTRY(save_coprocessor_extra)
entry sp, 16
Expand Down Expand Up @@ -197,4 +196,5 @@ _xtensa_reginfo_tables:
XCHAL_CP7_SA_CONTENTS_LIBDB
.word 0xFC000000 /* invalid register number,marks end of table*/
_xtensa_reginfo_table_end:
#endif

Loading

0 comments on commit 173d668

Please sign in to comment.