@@ -696,18 +696,42 @@ int pdc_spaceid_bits(unsigned long *space_bits)
696696 */
697697int pdc_btlb_info (struct pdc_btlb_info * btlb )
698698{
699- int retval ;
699+ int retval ;
700700 unsigned long flags ;
701701
702- spin_lock_irqsave (& pdc_lock , flags );
703- retval = mem_pdc_call (PDC_BLOCK_TLB , PDC_BTLB_INFO , __pa (pdc_result ), 0 );
704- memcpy (btlb , pdc_result , sizeof (* btlb ));
705- spin_unlock_irqrestore (& pdc_lock , flags );
702+ spin_lock_irqsave (& pdc_lock , flags );
703+ retval = mem_pdc_call (PDC_BLOCK_TLB , PDC_BTLB_INFO , __pa (pdc_result ), 0 );
704+ memcpy (btlb , pdc_result , sizeof (* btlb ));
705+ spin_unlock_irqrestore (& pdc_lock , flags );
706706
707- if (retval < 0 ) {
708- btlb -> max_size = 0 ;
709- }
710- return retval ;
707+ if (retval < 0 ) {
708+ btlb -> max_size = 0 ;
709+ }
710+ return retval ;
711+ }
712+
713+ int pdc_btlb_insert (unsigned long long vpage , unsigned long physpage , unsigned long len ,
714+ unsigned long entry_info , unsigned long slot )
715+ {
716+ int retval ;
717+ unsigned long flags ;
718+
719+ spin_lock_irqsave (& pdc_lock , flags );
720+ retval = mem_pdc_call (PDC_BLOCK_TLB , PDC_BTLB_INSERT , (unsigned long ) (vpage >> 32 ),
721+ (unsigned long ) vpage , physpage , len , entry_info , slot );
722+ spin_unlock_irqrestore (& pdc_lock , flags );
723+ return retval ;
724+ }
725+
726+ int pdc_btlb_purge_all (void )
727+ {
728+ int retval ;
729+ unsigned long flags ;
730+
731+ spin_lock_irqsave (& pdc_lock , flags );
732+ retval = mem_pdc_call (PDC_BLOCK_TLB , PDC_BTLB_PURGE_ALL );
733+ spin_unlock_irqrestore (& pdc_lock , flags );
734+ return retval ;
711735}
712736
713737/**
0 commit comments