@@ -601,33 +601,27 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
601
601
source_id = (fault_status >> 16 );
602
602
603
603
/* Page fault only */
604
- if ((status & mask ) == BIT (i )) {
605
- WARN_ON (exception_type < 0xC1 || exception_type > 0xC4 );
606
-
604
+ ret = -1 ;
605
+ if ((status & mask ) == BIT (i ) && (exception_type & 0xF8 ) == 0xC0 )
607
606
ret = panfrost_mmu_map_fault_addr (pfdev , i , addr );
608
- if (!ret ) {
609
- mmu_write (pfdev , MMU_INT_CLEAR , BIT (i ));
610
- status &= ~mask ;
611
- continue ;
612
- }
613
- }
614
607
615
- /* terminal fault, print info about the fault */
616
- dev_err (pfdev -> dev ,
617
- "Unhandled Page fault in AS%d at VA 0x%016llX\n"
618
- "Reason: %s\n"
619
- "raw fault status: 0x%X\n"
620
- "decoded fault status: %s\n"
621
- "exception type 0x%X: %s\n"
622
- "access type 0x%X: %s\n"
623
- "source id 0x%X\n" ,
624
- i , addr ,
625
- "TODO" ,
626
- fault_status ,
627
- (fault_status & (1 << 10 ) ? "DECODER FAULT" : "SLAVE FAULT" ),
628
- exception_type , panfrost_exception_name (pfdev , exception_type ),
629
- access_type , access_type_name (pfdev , fault_status ),
630
- source_id );
608
+ if (ret )
609
+ /* terminal fault, print info about the fault */
610
+ dev_err (pfdev -> dev ,
611
+ "Unhandled Page fault in AS%d at VA 0x%016llX\n"
612
+ "Reason: %s\n"
613
+ "raw fault status: 0x%X\n"
614
+ "decoded fault status: %s\n"
615
+ "exception type 0x%X: %s\n"
616
+ "access type 0x%X: %s\n"
617
+ "source id 0x%X\n" ,
618
+ i , addr ,
619
+ "TODO" ,
620
+ fault_status ,
621
+ (fault_status & (1 << 10 ) ? "DECODER FAULT" : "SLAVE FAULT" ),
622
+ exception_type , panfrost_exception_name (pfdev , exception_type ),
623
+ access_type , access_type_name (pfdev , fault_status ),
624
+ source_id );
631
625
632
626
mmu_write (pfdev , MMU_INT_CLEAR , mask );
633
627
0 commit comments