Skip to content
Snippets Groups Projects
Select Git revision
  • 4d1ee80f3a7df7fe9cdec26e651e6201c45b10d4
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

idr.c

Blame
  • assembler.h 17.23 KiB
    /*
     * Based on arch/arm/include/asm/assembler.h, arch/arm/mm/proc-macros.S
     *
     * Copyright (C) 1996-2000 Russell King
     * Copyright (C) 2012 ARM Ltd.
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */
    #ifndef __ASSEMBLY__
    #error "Only include this from assembly code"
    #endif
    
    #ifndef __ASM_ASSEMBLER_H
    #define __ASM_ASSEMBLER_H
    
    #include <asm/asm-offsets.h>
    #include <asm/cpufeature.h>
    #include <asm/debug-monitors.h>
    #include <asm/page.h>
    #include <asm/pgtable-hwdef.h>
    #include <asm/ptrace.h>
    #include <asm/thread_info.h>
    
    	.macro save_and_disable_daif, flags
    	mrs	\flags, daif
    	msr	daifset, #0xf
    	.endm
    
    	.macro disable_daif
    	msr	daifset, #0xf
    	.endm
    
    	.macro enable_daif
    	msr	daifclr, #0xf
    	.endm
    
    	.macro	restore_daif, flags:req
    	msr	daif, \flags
    	.endm
    
    	/* Only on aarch64 pstate, PSR_D_BIT is different for aarch32 */
    	.macro	inherit_daif, pstate:req, tmp:req
    	and	\tmp, \pstate, #(PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
    	msr	daif, \tmp
    	.endm
    
    	/* IRQ is the lowest priority flag, unconditionally unmask the rest. */
    	.macro enable_da_f
    	msr	daifclr, #(8 | 4 | 1)
    	.endm
    
    /*
     * Save/restore interrupts.
     */
    	.macro	save_and_disable_irq, flags
    	mrs	\flags, daif
    	msr	daifset, #2
    	.endm
    
    	.macro	restore_irq, flags