/* SMP IPI low-level handler1*2* Copyright (C) 2006-2007 Matsushita Electric Industrial Co., Ltd.3* All Rights Reserved.4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public License7* as published by the Free Software Foundation; either version8* 2 of the License, or (at your option) any later version.9*10*/1112#include <linux/sys.h>13#include <linux/linkage.h>14#include <asm/smp.h>15#include <asm/system.h>16#include <asm/thread_info.h>17#include <asm/cpu-regs.h>18#include <proc/smp-regs.h>19#include <asm/asm-offsets.h>20#include <asm/frame.inc>2122.am33_22324###############################################################################25#26# IPI interrupt handler27#28###############################################################################29.globl mn10300_low_ipi_handler30mn10300_low_ipi_handler:31add -4,sp32mov d0,(sp)33movhu (IAGR),d034and IAGR_GN,d035lsr 0x2,d036#ifdef CONFIG_MN10300_CACHE_ENABLED37cmp FLUSH_CACHE_IPI,d038beq mn10300_flush_cache_ipi39#endif40cmp SMP_BOOT_IRQ,d041beq mn10300_smp_boot_ipi42/* OTHERS */43mov (sp),d044add 4,sp45#ifdef CONFIG_GDBSTUB46jmp gdbstub_io_rx_handler47#else48jmp end49#endif5051###############################################################################52#53# Cache flush IPI interrupt handler54#55###############################################################################56#ifdef CONFIG_MN10300_CACHE_ENABLED57mn10300_flush_cache_ipi:58mov (sp),d059add 4,sp6061/* FLUSH_CACHE_IPI */62add -4,sp63SAVE_ALL64mov GxICR_DETECT,d265movbu d2,(GxICR(FLUSH_CACHE_IPI)) # ACK the interrupt66movhu (GxICR(FLUSH_CACHE_IPI)),d267call smp_cache_interrupt[],068RESTORE_ALL69jmp end70#endif7172###############################################################################73#74# SMP boot CPU IPI interrupt handler75#76###############################################################################77mn10300_smp_boot_ipi:78/* clear interrupt */79movhu (GxICR(SMP_BOOT_IRQ)),d080and ~GxICR_REQUEST,d081movhu d0,(GxICR(SMP_BOOT_IRQ))82mov (sp),d083add 4,sp8485# get stack86mov (CPUID),a087add -1,a088add a0,a089add a0,a090mov (start_stack,a0),a091mov a0,sp92jmp initialize_secondary939495# Jump here after RTI to suppress the icache lookahead96end:979899