Commit a2dccdb2 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] etr: fix clock synchronization race
  [S390] Fix IRQ tracing in case of PER
parents 7d5fcdc3 33fea794
...@@ -535,8 +535,16 @@ pgm_no_vtime2: ...@@ -535,8 +535,16 @@ pgm_no_vtime2:
l %r3,__LC_PGM_ILC # load program interruption code l %r3,__LC_PGM_ILC # load program interruption code
la %r8,0x7f la %r8,0x7f
nr %r8,%r3 # clear per-event-bit and ilc nr %r8,%r3 # clear per-event-bit and ilc
be BASED(pgm_exit) # only per or per+check ? be BASED(pgm_exit2) # only per or per+check ?
b BASED(pgm_do_call) l %r7,BASED(.Ljump_table)
sll %r8,2
l %r7,0(%r8,%r7) # load address of handler routine
la %r2,SP_PTREGS(%r15) # address of register-save area
basr %r14,%r7 # branch to interrupt-handler
pgm_exit2:
TRACE_IRQS_ON
stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
b BASED(sysc_return)
# #
# it was a single stepped SVC that is causing all the trouble # it was a single stepped SVC that is causing all the trouble
......
...@@ -544,8 +544,16 @@ pgm_no_vtime2: ...@@ -544,8 +544,16 @@ pgm_no_vtime2:
lgf %r3,__LC_PGM_ILC # load program interruption code lgf %r3,__LC_PGM_ILC # load program interruption code
lghi %r8,0x7f lghi %r8,0x7f
ngr %r8,%r3 # clear per-event-bit and ilc ngr %r8,%r3 # clear per-event-bit and ilc
je pgm_exit je pgm_exit2
j pgm_do_call sll %r8,3
larl %r1,pgm_check_table
lg %r1,0(%r8,%r1) # load address of handler routine
la %r2,SP_PTREGS(%r15) # address of register-save area
basr %r14,%r1 # branch to interrupt-handler
pgm_exit2:
TRACE_IRQS_ON
stosm __SF_EMPTY(%r15),0x03 # reenable interrupts
j sysc_return
# #
# it was a single stepped SVC that is causing all the trouble # it was a single stepped SVC that is causing all the trouble
......
...@@ -524,8 +524,11 @@ void etr_switch_to_local(void) ...@@ -524,8 +524,11 @@ void etr_switch_to_local(void)
if (!etr_eacr.sl) if (!etr_eacr.sl)
return; return;
disable_sync_clock(NULL); disable_sync_clock(NULL);
set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events); if (!test_and_set_bit(ETR_EVENT_SWITCH_LOCAL, &etr_events)) {
queue_work(time_sync_wq, &etr_work); etr_eacr.es = etr_eacr.sl = 0;
etr_setr(&etr_eacr);
queue_work(time_sync_wq, &etr_work);
}
} }
/* /*
...@@ -539,8 +542,11 @@ void etr_sync_check(void) ...@@ -539,8 +542,11 @@ void etr_sync_check(void)
if (!etr_eacr.es) if (!etr_eacr.es)
return; return;
disable_sync_clock(NULL); disable_sync_clock(NULL);
set_bit(ETR_EVENT_SYNC_CHECK, &etr_events); if (!test_and_set_bit(ETR_EVENT_SYNC_CHECK, &etr_events)) {
queue_work(time_sync_wq, &etr_work); etr_eacr.es = 0;
etr_setr(&etr_eacr);
queue_work(time_sync_wq, &etr_work);
}
} }
/* /*
...@@ -902,7 +908,7 @@ static struct etr_eacr etr_handle_update(struct etr_aib *aib, ...@@ -902,7 +908,7 @@ static struct etr_eacr etr_handle_update(struct etr_aib *aib,
* Do not try to get the alternate port aib if the clock * Do not try to get the alternate port aib if the clock
* is not in sync yet. * is not in sync yet.
*/ */
if (!check_sync_clock()) if (!eacr.es || !check_sync_clock())
return eacr; return eacr;
/* /*
...@@ -1064,7 +1070,7 @@ static void etr_work_fn(struct work_struct *work) ...@@ -1064,7 +1070,7 @@ static void etr_work_fn(struct work_struct *work)
* If the clock is in sync just update the eacr and return. * If the clock is in sync just update the eacr and return.
* If there is no valid sync port wait for a port update. * If there is no valid sync port wait for a port update.
*/ */
if (check_sync_clock() || sync_port < 0) { if ((eacr.es && check_sync_clock()) || sync_port < 0) {
etr_update_eacr(eacr); etr_update_eacr(eacr);
etr_set_tolec_timeout(now); etr_set_tolec_timeout(now);
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment