	.file	"extr_rockchip-iommu.c_rk_iommu_irq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"write"
.LC1:
	.string	"read"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Page fault at %pad of type %s\n"
	.align 8
.LC3:
	.string	"Page fault while iommu not attached to domain?\n"
	.section	.rodata.str1.1
.LC4:
	.string	"BUS_ERROR occurred at %pad\n"
.LC5:
	.string	"unexpected int_status: %#08x\n"
	.text
	.p2align 4
	.type	rk_iommu_irq, @function
rk_iommu_irq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edi, DWORD PTR 4[rsi]
	mov	r12d, DWORD PTR IRQ_NONE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	pm_runtime_get_if_in_use@PLT
	xor	edi, edi
	test	eax, eax
	setle	dil
	call	WARN_ON_ONCE@PLT
	test	rax, rax
	je	.L28
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[r15]
	mov	esi, DWORD PTR 8[r15]
	call	clk_bulk_enable@PLT
	mov	edi, eax
	call	WARN_ON@PLT
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	jle	.L4
	lea	rax, 16[rsp]
	xor	r14d, r14d
	mov	QWORD PTR [rsp], rax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L6:
	test	DWORD PTR RK_MMU_IRQ_BUS_ERROR[rip], r13d
	jne	.L30
.L11:
	mov	eax, DWORD PTR RK_MMU_IRQ_MASK[rip]
	not	eax
	test	eax, r13d
	jne	.L31
.L12:
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_INT_CLEAR[rip]
	mov	edx, r13d
	mov	edi, DWORD PTR [rax+rbx]
	call	rk_iommu_write@PLT
.L5:
	add	r14, 1
	cmp	DWORD PTR [r15], r14d
	jle	.L4
.L13:
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_INT_STATUS[rip]
	mov	ebp, r14d
	lea	rbx, 0[0+r14*4]
	mov	edi, DWORD PTR [rax+r14*4]
	call	rk_iommu_read@PLT
	mov	r13, rax
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_PAGE_FAULT_ADDR[rip]
	mov	r12d, DWORD PTR IRQ_HANDLED[rip]
	mov	edi, DWORD PTR [rax+r14*4]
	call	rk_iommu_read@PLT
	mov	QWORD PTR 16[rsp], rax
	test	DWORD PTR RK_MMU_IRQ_PAGE_FAULT[rip], r13d
	je	.L6
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_STATUS[rip]
	mov	edi, DWORD PTR [rax+rbx]
	call	rk_iommu_read@PLT
	mov	r11d, DWORD PTR IOMMU_FAULT_WRITE[rip]
	lea	rcx, .LC0[rip]
	test	DWORD PTR RK_MMU_STATUS_PAGE_FAULT_IS_WRITE[rip], eax
	jne	.L8
	mov	r11d, DWORD PTR IOMMU_FAULT_READ[rip]
	lea	rcx, .LC1[rip]
	cmp	DWORD PTR IOMMU_FAULT_WRITE[rip], r11d
	lea	rax, .LC0[rip]
	cmove	rcx, rax
.L8:
	mov	edi, DWORD PTR 4[r15]
	mov	rdx, QWORD PTR [rsp]
	xor	eax, eax
	mov	DWORD PTR 12[rsp], r11d
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	rdi, r15
	mov	esi, ebp
	call	log_iova@PLT
	mov	rdi, QWORD PTR 24[r15]
	test	rdi, rdi
	je	.L9
	mov	r11d, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR 4[r15]
	mov	rdx, QWORD PTR 16[rsp]
	mov	ecx, r11d
	call	report_iommu_fault@PLT
.L10:
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_CMD_ZAP_CACHE[rip]
	mov	edi, DWORD PTR [rax+rbx]
	call	rk_iommu_base_command@PLT
	mov	rax, QWORD PTR 16[r15]
	mov	esi, DWORD PTR RK_MMU_CMD_PAGE_FAULT_DONE[rip]
	mov	edi, DWORD PTR [rax+rbx]
	call	rk_iommu_base_command@PLT
	test	DWORD PTR RK_MMU_IRQ_BUS_ERROR[rip], r13d
	je	.L11
.L30:
	mov	edi, DWORD PTR 4[r15]
	mov	rdx, QWORD PTR [rsp]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	eax, DWORD PTR RK_MMU_IRQ_MASK[rip]
	not	eax
	test	eax, r13d
	je	.L12
.L31:
	mov	edi, DWORD PTR 4[r15]
	mov	edx, r13d
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR 8[r15]
	mov	edi, DWORD PTR 12[r15]
	call	clk_bulk_disable@PLT
.L3:
	mov	edi, DWORD PTR 4[r15]
	call	pm_runtime_put@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 4[r15]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	dev_err@PLT
	jmp	.L10
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rk_iommu_irq, .-rk_iommu_irq
	.comm	RK_MMU_STATUS_PAGE_FAULT_IS_WRITE,4,4
	.comm	RK_MMU_STATUS,4,4
	.comm	RK_MMU_PAGE_FAULT_ADDR,4,4
	.comm	RK_MMU_IRQ_PAGE_FAULT,4,4
	.comm	RK_MMU_IRQ_MASK,4,4
	.comm	RK_MMU_IRQ_BUS_ERROR,4,4
	.comm	RK_MMU_INT_STATUS,4,4
	.comm	RK_MMU_INT_CLEAR,4,4
	.comm	RK_MMU_CMD_ZAP_CACHE,4,4
	.comm	RK_MMU_CMD_PAGE_FAULT_DONE,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	IOMMU_FAULT_WRITE,4,4
	.comm	IOMMU_FAULT_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_rockchip-iommu.c_rk_iommu_irq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"write\000"
	.align	2
.LC1:
	.ascii	"read\000"
	.align	2
.LC2:
	.ascii	"Page fault at %pad of type %s\012\000"
	.align	2
.LC3:
	.ascii	"Page fault while iommu not attached to domain?\012\000"
	.align	2
.LC4:
	.ascii	"BUS_ERROR occurred at %pad\012\000"
	.align	2
.LC5:
	.ascii	"unexpected int_status: %#08x\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rk_iommu_irq, %function
rk_iommu_irq:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L35
	ldr	r2, .L35+4
	sub	sp, sp, #20
	ldr	r0, [r1, #4]
	mov	r4, r1
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r8, [r3]
	bl	pm_runtime_get_if_in_use
	cmp	r0, #0
	movgt	r0, #0
	movle	r0, #1
	bl	WARN_ON_ONCE
	cmp	r0, #0
	beq	.L31
.L1:
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	mov	r0, r8
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #12]
	bl	clk_bulk_enable
	bl	WARN_ON
	subs	r6, r0, #0
	bne	.L3
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L4
	ldr	r10, .L35+8
	ldr	r9, .L35+12
	ldr	fp, .L35+16
	b	.L13
.L6:
	ldr	r3, [r9]
	tst	r5, r3
	bne	.L33
.L11:
	ldr	r3, [fp]
	bics	r3, r5, r3
	bne	.L34
.L12:
	ldr	r3, [r4, #16]
	mov	r2, r5
	ldr	r0, [r3, r7]
	ldr	r3, .L35+20
	ldr	r1, [r3]
	bl	rk_iommu_write
.L5:
	ldr	r3, [r4]
	add	r6, r6, #1
	cmp	r3, r6
	ble	.L4
.L13:
	ldr	r3, [r4, #16]
	ldr	r2, .L35+24
	ldr	r0, [r3, r6, lsl #2]
	ldr	r1, [r2]
	bl	rk_iommu_read
	subs	r5, r0, #0
	lsl	r7, r6, #2
	beq	.L5
	ldr	r3, [r4, #16]
	ldr	r2, .L35+28
	ldr	r0, [r3, r6, lsl #2]
	ldr	r3, .L35+32
	ldr	r1, [r2]
	ldr	r8, [r3]
	bl	rk_iommu_read
	ldr	r3, [r10]
	str	r0, [sp, #8]
	tst	r5, r3
	beq	.L6
	ldr	r3, [r4, #16]
	ldr	r2, .L35+36
	ldr	r0, [r3, r7]
	ldr	r1, [r2]
	bl	rk_iommu_read
	ldr	r3, .L35+40
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L7
	ldr	r3, .L35+44
	ldr	r0, [r4, #4]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	ldr	r3, .L35+48
.L8:
	ldr	r1, .L35+52
	add	r2, sp, #8
	bl	dev_err
	mov	r1, r6
	mov	r0, r4
	ldr	r2, [sp, #8]
	bl	log_iova
	ldr	r0, [r4, #20]
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp, #4]
	ldr	r2, [sp, #8]
	ldr	r1, [r4, #4]
	bl	report_iommu_fault
.L10:
	ldr	r2, .L35+56
	ldr	r3, [r4, #16]
	ldr	r1, [r2]
	ldr	r0, [r3, r7]
	bl	rk_iommu_base_command
	ldr	r3, [r4, #16]
	ldr	r2, .L35+60
	ldr	r0, [r3, r7]
	ldr	r1, [r2]
	bl	rk_iommu_base_command
	ldr	r3, [r9]
	tst	r5, r3
	beq	.L11
.L33:
	ldr	r1, .L35+64
	ldr	r0, [r4, #4]
	add	r2, sp, #8
	bl	dev_err
	ldr	r3, [fp]
	bics	r3, r5, r3
	beq	.L12
.L34:
	mov	r2, r5
	ldr	r1, .L35+68
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L12
.L4:
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #12]
	bl	clk_bulk_disable
.L3:
	ldr	r0, [r4, #4]
	bl	pm_runtime_put
	b	.L1
.L7:
	ldr	r2, .L35+72
	ldr	r3, .L35+44
	ldr	ip, [r2]
	ldr	r1, [r3]
	ldr	r2, .L35+76
	cmp	r1, ip
	ldr	r3, .L35+48
	ldr	r0, [r4, #4]
	movne	r3, r2
	str	ip, [sp, #4]
	b	.L8
.L9:
	ldr	r1, .L35+80
	ldr	r0, [r4, #4]
	bl	dev_err
	b	.L10
.L32:
	bl	__stack_chk_fail
.L36:
	.align	2
.L35:
	.word	IRQ_NONE
	.word	.LC6
	.word	RK_MMU_IRQ_PAGE_FAULT
	.word	RK_MMU_IRQ_BUS_ERROR
	.word	RK_MMU_IRQ_MASK
	.word	RK_MMU_INT_CLEAR
	.word	RK_MMU_INT_STATUS
	.word	RK_MMU_PAGE_FAULT_ADDR
	.word	IRQ_HANDLED
	.word	RK_MMU_STATUS
	.word	RK_MMU_STATUS_PAGE_FAULT_IS_WRITE
	.word	IOMMU_FAULT_WRITE
	.word	.LC0
	.word	.LC2
	.word	RK_MMU_CMD_ZAP_CACHE
	.word	RK_MMU_CMD_PAGE_FAULT_DONE
	.word	.LC4
	.word	.LC5
	.word	IOMMU_FAULT_READ
	.word	.LC1
	.word	.LC3
	.size	rk_iommu_irq, .-rk_iommu_irq
	.comm	RK_MMU_STATUS_PAGE_FAULT_IS_WRITE,4,4
	.comm	RK_MMU_STATUS,4,4
	.comm	RK_MMU_PAGE_FAULT_ADDR,4,4
	.comm	RK_MMU_IRQ_PAGE_FAULT,4,4
	.comm	RK_MMU_IRQ_MASK,4,4
	.comm	RK_MMU_IRQ_BUS_ERROR,4,4
	.comm	RK_MMU_INT_STATUS,4,4
	.comm	RK_MMU_INT_CLEAR,4,4
	.comm	RK_MMU_CMD_ZAP_CACHE,4,4
	.comm	RK_MMU_CMD_PAGE_FAULT_DONE,4,4
	.comm	IRQ_NONE,4,4
	.comm	IRQ_HANDLED,4,4
	.comm	IOMMU_FAULT_WRITE,4,4
	.comm	IOMMU_FAULT_READ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
