diff options
author | Tom Rini | 2017-04-06 20:42:18 -0400 |
---|---|---|
committer | Tom Rini | 2017-04-06 20:42:18 -0400 |
commit | 01abae4d04868dede60947867699bf096a1831ff (patch) | |
tree | 36cf207784fb6d9b61b533bf6df7d1281a34745e /arch | |
parent | d53ecad92f06d2e38a5cbc13af7473867c7fa277 (diff) |
Remove various unused interrupt related code
With d53ecad92f06 some unused interrupt related code was removed.
However all of these options are currently unused. Rather than migrate
some of these options to Kconfig we just remove the code in question.
The only related code changes here are that in some cases we use
CONFIG_STACKSIZE in non-IRQ related context. In these cases we rename
and move the value local to the code in question.
Fixes: d53ecad92f06 ("Merge branch 'master' of git://git.denx.de/u-boot-sunxi")
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/arm720t/interrupts.c | 6 | ||||
-rw-r--r-- | arch/arm/cpu/arm920t/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/arm920t/s3c24x0/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/sa1100/cpu.c | 4 | ||||
-rw-r--r-- | arch/arm/lib/interrupts.c | 73 | ||||
-rw-r--r-- | arch/arm/lib/stack.c | 8 | ||||
-rw-r--r-- | arch/arm/lib/vectors.S | 33 | ||||
-rw-r--r-- | arch/arm/mach-davinci/misc.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-keystone/cmd_ddr3.c | 3 | ||||
-rw-r--r-- | arch/avr32/cpu/exception.c | 4 | ||||
-rw-r--r-- | arch/nds32/cpu/n1213/start.S | 18 |
11 files changed, 5 insertions, 148 deletions
diff --git a/arch/arm/cpu/arm720t/interrupts.c b/arch/arm/cpu/arm720t/interrupts.c index e8ba1ae09ef..1edb1a439a1 100644 --- a/arch/arm/cpu/arm720t/interrupts.c +++ b/arch/arm/cpu/arm720t/interrupts.c @@ -12,12 +12,6 @@ #include <common.h> -#ifdef CONFIG_USE_IRQ -void do_irq (struct pt_regs *pt_regs) -{ -} -#endif - #if defined(CONFIG_TEGRA) static ulong timestamp; static ulong lastdec; diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile index 7aa432a6fc3..8faf34b87ec 100644 --- a/arch/arm/cpu/arm920t/Makefile +++ b/arch/arm/cpu/arm920t/Makefile @@ -8,7 +8,6 @@ extra-y = start.o obj-y += cpu.o -obj-$(CONFIG_USE_IRQ) += interrupts.o obj-$(CONFIG_EP93XX) += ep93xx/ obj-$(CONFIG_IMX) += imx/ diff --git a/arch/arm/cpu/arm920t/s3c24x0/Makefile b/arch/arm/cpu/arm920t/s3c24x0/Makefile index e44c549ba03..e78f8a017c5 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/Makefile +++ b/arch/arm/cpu/arm920t/s3c24x0/Makefile @@ -5,7 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_USE_IRQ) += interrupts.o obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o obj-y += speed.o obj-y += timer.o diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index 4c9752a1c82..59585af83a6 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -19,10 +19,6 @@ #include <asm/system.h> #include <asm/io.h> -#ifdef CONFIG_USE_IRQ -DECLARE_GLOBAL_DATA_PTR; -#endif - static void cache_flush(void); int cleanup_before_linux (void) diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index ed83043abb4..066c172bb32 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -26,75 +26,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_USE_IRQ -int interrupt_init (void) -{ - unsigned long cpsr; - - /* - * setup up stacks if necessary - */ - IRQ_STACK_START = gd->irq_sp - 4; - IRQ_STACK_START_IN = gd->irq_sp + 8; - FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ; - - - __asm__ __volatile__("mrs %0, cpsr\n" - : "=r" (cpsr) - : - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0\n" - "mov sp, %1\n" - : - : "r" (IRQ_MODE | I_BIT | F_BIT | (cpsr & ~FIQ_MODE)), - "r" (IRQ_STACK_START) - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0\n" - "mov sp, %1\n" - : - : "r" (FIQ_MODE | I_BIT | F_BIT | (cpsr & ~IRQ_MODE)), - "r" (FIQ_STACK_START) - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0" - : - : "r" (cpsr) - : "memory"); - - return arch_interrupt_init(); -} - -/* enable IRQ interrupts */ -void enable_interrupts (void) -{ - unsigned long temp; - __asm__ __volatile__("mrs %0, cpsr\n" - "bic %0, %0, #0x80\n" - "msr cpsr_c, %0" - : "=r" (temp) - : - : "memory"); -} - - -/* - * disable IRQ/FIQ interrupts - * returns true if interrupts had been enabled before we disabled them - */ -int disable_interrupts (void) -{ - unsigned long old,temp; - __asm__ __volatile__("mrs %0, cpsr\n" - "orr %1, %0, #0xc0\n" - "msr cpsr_c, %1" - : "=r" (old), "=r" (temp) - : - : "memory"); - return (old & 0x80) == 0; -} -#else int interrupt_init (void) { /* @@ -113,8 +44,6 @@ int disable_interrupts (void) { return 0; } -#endif - void bad_mode (void) { @@ -212,7 +141,6 @@ void do_fiq (struct pt_regs *pt_regs) bad_mode (); } -#ifndef CONFIG_USE_IRQ void do_irq (struct pt_regs *pt_regs) { efi_restore_gd(); @@ -220,4 +148,3 @@ void do_irq (struct pt_regs *pt_regs) show_regs (pt_regs); bad_mode (); } -#endif diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c index 4614d2657cd..737622d26f0 100644 --- a/arch/arm/lib/stack.c +++ b/arch/arm/lib/stack.c @@ -25,14 +25,6 @@ int arch_reserve_stacks(void) gd->irq_sp = gd->start_addr_sp; # if !defined(CONFIG_ARM64) -# ifdef CONFIG_USE_IRQ - gd->start_addr_sp -= (CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ); - debug("Reserving %zu Bytes for IRQ stack at: %08lx\n", - CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ, gd->start_addr_sp); - - /* 8-byte alignment for ARM ABI compliance */ - gd->start_addr_sp &= ~0x07; -# endif /* leave 3 words for abort-stack, plus 1 for alignment */ gd->start_addr_sp -= 16; # endif diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 9fe7415b66c..f53b1e9a2bc 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -128,19 +128,6 @@ fiq: IRQ_STACK_START_IN: .word 0x0badc0de -#ifdef CONFIG_USE_IRQ -/* IRQ stack memory (calculated at run-time) */ -.globl IRQ_STACK_START -IRQ_STACK_START: - .word 0x0badc0de - -/* IRQ stack memory (calculated at run-time) */ -.globl FIQ_STACK_START -FIQ_STACK_START: - .word 0x0badc0de - -#endif /* CONFIG_USE_IRQ */ - @ @ IRQ stack frame. @ @@ -264,24 +251,6 @@ not_used: bad_save_user_regs bl do_not_used -#ifdef CONFIG_USE_IRQ - - .align 5 -irq: - get_irq_stack - irq_save_user_regs - bl do_irq - irq_restore_user_regs - - .align 5 -fiq: - get_fiq_stack - /* someone ought to write a more effiction fiq_save_user_regs */ - irq_save_user_regs - bl do_fiq - irq_restore_user_regs - -#else .align 5 irq: @@ -295,6 +264,4 @@ fiq: bad_save_user_regs bl do_fiq -#endif /* CONFIG_USE_IRQ */ - #endif /* CONFIG_SPL_BUILD */ diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index e1064e0a2f4..ec331ba6bb8 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -107,7 +107,6 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) #endif /* CONFIG_DRIVER_TI_EMAC */ #if defined(CONFIG_SOC_DA8XX) -#ifndef CONFIG_USE_IRQ void irq_init(void) { /* @@ -122,7 +121,6 @@ void irq_init(void) writel(0xffffffff, &davinci_aintc_regs->ecr2); writel(0xffffffff, &davinci_aintc_regs->ecr3); } -#endif /* * Enable PSC for various peripherals. diff --git a/arch/arm/mach-keystone/cmd_ddr3.c b/arch/arm/mach-keystone/cmd_ddr3.c index ea78ad8fd53..d3eab0711c3 100644 --- a/arch/arm/mach-keystone/cmd_ddr3.c +++ b/arch/arm/mach-keystone/cmd_ddr3.c @@ -15,12 +15,13 @@ DECLARE_GLOBAL_DATA_PTR; #define DDR_MIN_ADDR CONFIG_SYS_SDRAM_BASE +#define STACKSIZE (512 << 10) /* 512 KiB */ #define DDR_REMAP_ADDR 0x80000000 #define ECC_START_ADDR1 ((DDR_MIN_ADDR - DDR_REMAP_ADDR) >> 17) #define ECC_END_ADDR1 (((gd->start_addr_sp - DDR_REMAP_ADDR - \ - CONFIG_STACKSIZE) >> 17) - 2) + STACKSIZE) >> 17) - 2) #define DDR_TEST_BURST_SIZE 1024 diff --git a/arch/avr32/cpu/exception.c b/arch/avr32/cpu/exception.c index d6991f6668d..22eab03b12c 100644 --- a/arch/avr32/cpu/exception.c +++ b/arch/avr32/cpu/exception.c @@ -10,6 +10,8 @@ DECLARE_GLOBAL_DATA_PTR; +#define STACKSIZE 2048 + static const char * const cpu_modes[8] = { "Application", "Supervisor", "Interrupt level 0", "Interrupt level 1", "Interrupt level 2", "Interrupt level 3", "Exception", "NMI" @@ -96,7 +98,7 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs) printf("CPU Mode: %s\n", cpu_modes[mode]); /* Avoid exception loops */ - if (regs->sp < (gd->start_addr_sp - CONFIG_STACKSIZE) || + if (regs->sp < (gd->start_addr_sp - STACKSIZE) || regs->sp >= gd->start_addr_sp) printf("\nStack pointer seems bogus, won't do stack dump\n"); else diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S index 7b2b637af33..99971fdbdba 100644 --- a/arch/nds32/cpu/n1213/start.S +++ b/arch/nds32/cpu/n1213/start.S @@ -90,24 +90,6 @@ _start: j reset _TEXT_BASE: .word CONFIG_SYS_TEXT_BASE -/* - * These are defined in the board-specific linker script. - * Subtracting _start from them lets the linker put their - * relative position in the executable instead of leaving - * them null. - */ -#ifdef CONFIG_USE_IRQ -/* IRQ stack memory (calculated at run-time) */ -.globl IRQ_STACK_START -IRQ_STACK_START: - .word 0x0badc0de - -/* IRQ stack memory (calculated at run-time) */ -.globl FIQ_STACK_START -FIQ_STACK_START: - .word 0x0badc0de -#endif - /* IRQ stack memory (calculated at run-time) + 8 bytes */ .globl IRQ_STACK_START_IN IRQ_STACK_START_IN: |