Path: blob/master/arch/arm/mach-iop13xx/include/mach/entry-macro.S
17745 views
/*1* iop13xx low level irq macros2* Copyright (c) 2005-2006, Intel Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms and conditions of the GNU General Public License,6* version 2, as published by the Free Software Foundation.7*8* This program is distributed in the hope it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13* You should have received a copy of the GNU General Public License along with14* this program; if not, write to the Free Software Foundation, Inc., 59 Temple15* Place - Suite 330, Boston, MA 02111-1307 USA.16*17*/18.macro disable_fiq19.endm2021.macro get_irqnr_preamble, base, tmp22mrc p15, 0, \tmp, c15, c1, 023orr \tmp, \tmp, #(1 << 6)24mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access25.endm2627/*28* Note: a 1-cycle window exists where iintvec will return the value29* of iintbase, so we explicitly check for "bad zeros"30*/31.macro get_irqnr_and_base, irqnr, irqstat, base, tmp32mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC33cmp \irqnr, #034mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero35adds \irqstat, \irqnr, #1 @ Check for 0xffffffff36movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr37.endm3839.macro arch_ret_to_user, tmp1, tmp240mrc p15, 0, \tmp1, c15, c1, 041ands \tmp2, \tmp1, #(1 << 6)42bicne \tmp1, \tmp1, #(1 << 6)43mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access44.endm454647