Searched refs:eacr (Results 1 - 2 of 2) sorted by relevance

/linux-4.4.14/arch/s390/kernel/
H A Dtime.c450 * Valid bit combinations of the eacr register are (x = don't care):
474 static u64 etr_tolec; /* time of last eacr update */
615 static inline int etr_mode_is_pps(struct etr_eacr eacr) etr_mode_is_pps() argument
617 return eacr.es && !eacr.sl; etr_mode_is_pps()
623 static inline int etr_mode_is_etr(struct etr_eacr eacr) etr_mode_is_etr() argument
625 return eacr.es && eacr.sl; etr_mode_is_etr()
689 if (a1->esw.eacr.e0 != a2->esw.eacr.e0 || etr_aib_follows()
690 a1->esw.eacr.e1 != a2->esw.eacr.e1) etr_aib_follows()
754 * last eacr update has to be more than 1.6 seconds in the past.
850 static struct etr_eacr etr_handle_events(struct etr_eacr eacr) etr_handle_events() argument
853 eacr.es = 0; etr_handle_events()
855 eacr.es = eacr.sl = 0; etr_handle_events()
860 if (eacr.e0) etr_handle_events()
867 eacr.p0 = etr_port0_online; etr_handle_events()
868 if (!eacr.p0) etr_handle_events()
869 eacr.e0 = 0; etr_handle_events()
873 if (eacr.e1) etr_handle_events()
880 eacr.p1 = etr_port1_online; etr_handle_events()
881 if (!eacr.p1) etr_handle_events()
882 eacr.e1 = 0; etr_handle_events()
886 return eacr; etr_handle_events()
917 struct etr_eacr eacr) etr_handle_update()
920 if (!eacr.e0 && !eacr.e1) etr_handle_update()
921 return eacr; etr_handle_update()
926 if (eacr.p0 && !etr_port0_uptodate) { etr_handle_update()
933 if (eacr.p1 && !etr_port1_uptodate) { etr_handle_update()
944 if (!eacr.es || !check_sync_clock()) etr_handle_update()
945 return eacr; etr_handle_update()
953 if (eacr.p0 && !etr_port0_uptodate) { etr_handle_update()
957 if (eacr.p1 && !etr_port1_uptodate) { etr_handle_update()
966 if ((eacr.p0 && !etr_port0_uptodate) || etr_handle_update()
967 (eacr.p1 && !etr_port1_uptodate)) etr_handle_update()
968 eacr.dp ^= 1; etr_handle_update()
970 eacr.dp = 0; etr_handle_update()
972 return eacr; etr_handle_update()
979 static void etr_update_eacr(struct etr_eacr eacr) etr_update_eacr() argument
983 if (memcmp(&etr_eacr, &eacr, sizeof(eacr)) == 0) etr_update_eacr()
990 dp_changed = etr_eacr.e0 > eacr.e0 || etr_eacr.e1 > eacr.e1 || etr_update_eacr()
991 (etr_eacr.dp ^ eacr.dp) != 0; etr_update_eacr()
992 etr_eacr = eacr; etr_update_eacr()
1006 struct etr_eacr eacr; etr_work_fn() local
1014 eacr = etr_eacr; etr_work_fn()
1017 eacr = etr_handle_events(eacr); etr_work_fn()
1020 eacr.ea = eacr.p0 || eacr.p1; etr_work_fn()
1021 if (!eacr.ea) { etr_work_fn()
1023 eacr.dp = eacr.es = eacr.sl = 0; etr_work_fn()
1026 etr_update_eacr(eacr); etr_work_fn()
1040 eacr = etr_handle_update(&aib, eacr); etr_work_fn()
1053 * The eacr.sl bit is used to indicate etr mode vs. pps mode. etr_work_fn()
1055 if (eacr.p0 && aib.esw.psc0 == etr_lpsc_pps_mode) { etr_work_fn()
1056 eacr.sl = 0; etr_work_fn()
1057 eacr.e0 = 1; etr_work_fn()
1059 eacr.es = 0; etr_work_fn()
1060 if (!eacr.es || !eacr.p1 || aib.esw.psc1 != etr_lpsc_pps_mode) etr_work_fn()
1061 eacr.e1 = 0; etr_work_fn()
1064 eacr.e1 = 1; etr_work_fn()
1067 } else if (eacr.p1 && aib.esw.psc1 == etr_lpsc_pps_mode) { etr_work_fn()
1068 eacr.sl = 0; etr_work_fn()
1069 eacr.e0 = 0; etr_work_fn()
1070 eacr.e1 = 1; etr_work_fn()
1072 eacr.es = 0; etr_work_fn()
1075 } else if (eacr.p0 && aib.esw.psc0 == etr_lpsc_operational_step) { etr_work_fn()
1076 eacr.sl = 1; etr_work_fn()
1077 eacr.e0 = 1; etr_work_fn()
1079 eacr.es = 0; etr_work_fn()
1080 if (!eacr.es || !eacr.p1 || etr_work_fn()
1082 eacr.e1 = 0; etr_work_fn()
1085 eacr.e1 = 1; etr_work_fn()
1088 } else if (eacr.p1 && aib.esw.psc1 == etr_lpsc_operational_step) { etr_work_fn()
1089 eacr.sl = 1; etr_work_fn()
1090 eacr.e0 = 0; etr_work_fn()
1091 eacr.e1 = 1; etr_work_fn()
1093 eacr.es = 0; etr_work_fn()
1098 eacr.es = eacr.sl = 0; etr_work_fn()
1103 * If the clock is in sync just update the eacr and return. etr_work_fn()
1106 if ((eacr.es && check_sync_clock()) || sync_port < 0) { etr_work_fn()
1107 etr_update_eacr(eacr); etr_work_fn()
1116 eacr.dp = 0; etr_work_fn()
1117 eacr.es = 1; etr_work_fn()
1120 * Update eacr and try to synchronize the clock. If the update etr_work_fn()
1121 * of eacr caused a stepping port switch (or if we have to etr_work_fn()
1126 etr_update_eacr(eacr); etr_work_fn()
1130 eacr.es = 0; etr_work_fn()
1131 etr_update_eacr(eacr); etr_work_fn()
916 etr_handle_update(struct etr_aib *aib, struct etr_eacr eacr) etr_handle_update() argument
/linux-4.4.14/arch/s390/include/asm/
H A Detr.h45 struct etr_eacr eacr; /* attachment control register */ member in struct:etr_esw

Completed in 75 milliseconds