@@ -1049,25 +1049,21 @@ EXPORT_SYMBOL_GPL(irq_modify_status);
1049
1049
*/
1050
1050
void irq_cpu_online (void )
1051
1051
{
1052
- struct irq_desc * desc ;
1053
- struct irq_chip * chip ;
1054
- unsigned long flags ;
1055
1052
unsigned int irq ;
1056
1053
1057
1054
for_each_active_irq (irq ) {
1058
- desc = irq_to_desc (irq );
1055
+ struct irq_desc * desc = irq_to_desc (irq );
1056
+ struct irq_chip * chip ;
1057
+
1059
1058
if (!desc )
1060
1059
continue ;
1061
1060
1062
- raw_spin_lock_irqsave (& desc -> lock , flags );
1063
-
1061
+ guard (raw_spinlock_irqsave )(& desc -> lock );
1064
1062
chip = irq_data_get_irq_chip (& desc -> irq_data );
1065
1063
if (chip && chip -> irq_cpu_online &&
1066
1064
(!(chip -> flags & IRQCHIP_ONOFFLINE_ENABLED ) ||
1067
1065
!irqd_irq_disabled (& desc -> irq_data )))
1068
1066
chip -> irq_cpu_online (& desc -> irq_data );
1069
-
1070
- raw_spin_unlock_irqrestore (& desc -> lock , flags );
1071
1067
}
1072
1068
}
1073
1069
@@ -1079,25 +1075,21 @@ void irq_cpu_online(void)
1079
1075
*/
1080
1076
void irq_cpu_offline (void )
1081
1077
{
1082
- struct irq_desc * desc ;
1083
- struct irq_chip * chip ;
1084
- unsigned long flags ;
1085
1078
unsigned int irq ;
1086
1079
1087
1080
for_each_active_irq (irq ) {
1088
- desc = irq_to_desc (irq );
1081
+ struct irq_desc * desc = irq_to_desc (irq );
1082
+ struct irq_chip * chip ;
1083
+
1089
1084
if (!desc )
1090
1085
continue ;
1091
1086
1092
- raw_spin_lock_irqsave (& desc -> lock , flags );
1093
-
1087
+ guard (raw_spinlock_irqsave )(& desc -> lock );
1094
1088
chip = irq_data_get_irq_chip (& desc -> irq_data );
1095
1089
if (chip && chip -> irq_cpu_offline &&
1096
1090
(!(chip -> flags & IRQCHIP_ONOFFLINE_ENABLED ) ||
1097
1091
!irqd_irq_disabled (& desc -> irq_data )))
1098
1092
chip -> irq_cpu_offline (& desc -> irq_data );
1099
-
1100
- raw_spin_unlock_irqrestore (& desc -> lock , flags );
1101
1093
}
1102
1094
}
1103
1095
#endif
0 commit comments