@@ -641,16 +641,30 @@ static int tpmi_pm_qos_config(struct isst_id *id, int enable_clos,
641641 int priority_type )
642642{
643643 struct isst_core_power info ;
644- int ret ;
644+ int i , ret , saved_punit ;
645645
646646 info .get_set = 1 ;
647647 info .socket_id = id -> pkg ;
648648 info .power_domain_id = id -> punit ;
649649 info .enable = enable_clos ;
650650 info .priority_type = priority_type ;
651- ret = tpmi_process_ioctl (ISST_IF_CORE_POWER_STATE , & info );
652- if (ret == -1 )
653- return ret ;
651+
652+ saved_punit = id -> punit ;
653+
654+ /* Set for all other dies also. This is per package setting */
655+ for (i = 0 ; i < MAX_PUNIT_PER_DIE ; i ++ ) {
656+ id -> punit = i ;
657+ if (isst_is_punit_valid (id )) {
658+ info .power_domain_id = i ;
659+ ret = tpmi_process_ioctl (ISST_IF_CORE_POWER_STATE , & info );
660+ if (ret == -1 ) {
661+ id -> punit = saved_punit ;
662+ return ret ;
663+ }
664+ }
665+ }
666+
667+ id -> punit = saved_punit ;
654668
655669 return 0 ;
656670}
@@ -686,7 +700,7 @@ int tpmi_set_clos(struct isst_id *id, int clos,
686700 struct isst_clos_config * clos_config )
687701{
688702 struct isst_clos_param info ;
689- int ret ;
703+ int i , ret , saved_punit ;
690704
691705 info .get_set = 1 ;
692706 info .socket_id = id -> pkg ;
@@ -702,9 +716,22 @@ int tpmi_set_clos(struct isst_id *id, int clos,
702716 if (info .max_freq_mhz <= 0xff )
703717 info .max_freq_mhz *= 100 ;
704718
705- ret = tpmi_process_ioctl (ISST_IF_CLOS_PARAM , & info );
706- if (ret == -1 )
707- return ret ;
719+ saved_punit = id -> punit ;
720+
721+ /* Set for all other dies also. This is per package setting */
722+ for (i = 0 ; i < MAX_PUNIT_PER_DIE ; i ++ ) {
723+ id -> punit = i ;
724+ if (isst_is_punit_valid (id )) {
725+ info .power_domain_id = i ;
726+ ret = tpmi_process_ioctl (ISST_IF_CLOS_PARAM , & info );
727+ if (ret == -1 ) {
728+ id -> punit = saved_punit ;
729+ return ret ;
730+ }
731+ }
732+ }
733+
734+ id -> punit = saved_punit ;
708735
709736 debug_printf ("set cpu:%d clos:%d min:%d max:%d\n" , id -> cpu , clos ,
710737 clos_config -> clos_min , clos_config -> clos_max );
0 commit comments