aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-01-30 03:49:40 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-14 09:55:10 -0500
commit1aae0560d160ee6ebef927a35e4f405306a079df (patch)
tree70809629dccba1bf31e067dfcd3a20fe58b6d24e /arch/s390/kernel
parent58fece7827a7cc40e02bc68a7db8229166984893 (diff)
s390/time: rename tod clock access functions
Fix name clash with some common code device drivers and add "tod" to all tod clock access function names. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/debug.c2
-rw-r--r--arch/s390/kernel/early.c6
-rw-r--r--arch/s390/kernel/nmi.c2
-rw-r--r--arch/s390/kernel/smp.c10
-rw-r--r--arch/s390/kernel/time.c26
-rw-r--r--arch/s390/kernel/vtime.c2
6 files changed, 24 insertions, 24 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 4e8215e0d4b6..09a94cd9debc 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -867,7 +867,7 @@ static inline void
867debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, 867debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level,
868 int exception) 868 int exception)
869{ 869{
870 active->id.stck = get_clock(); 870 active->id.stck = get_tod_clock();
871 active->id.fields.cpuid = smp_processor_id(); 871 active->id.fields.cpuid = smp_processor_id();
872 active->caller = __builtin_return_address(0); 872 active->caller = __builtin_return_address(0);
873 active->id.fields.exception = exception; 873 active->id.fields.exception = exception;
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 1f0eee9e7daa..1ee98e56fc6a 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -47,10 +47,10 @@ static void __init reset_tod_clock(void)
47{ 47{
48 u64 time; 48 u64 time;
49 49
50 if (store_clock(&time) == 0) 50 if (store_tod_clock(&time) == 0)
51 return; 51 return;
52 /* TOD clock not running. Set the clock to Unix Epoch. */ 52 /* TOD clock not running. Set the clock to Unix Epoch. */
53 if (set_clock(TOD_UNIX_EPOCH) != 0 || store_clock(&time) != 0) 53 if (set_tod_clock(TOD_UNIX_EPOCH) != 0 || store_tod_clock(&time) != 0)
54 disabled_wait(0); 54 disabled_wait(0);
55 55
56 sched_clock_base_cc = TOD_UNIX_EPOCH; 56 sched_clock_base_cc = TOD_UNIX_EPOCH;
@@ -173,7 +173,7 @@ static noinline __init void create_kernel_nss(void)
173 } 173 }
174 174
175 /* re-initialize cputime accounting. */ 175 /* re-initialize cputime accounting. */
176 sched_clock_base_cc = get_clock(); 176 sched_clock_base_cc = get_tod_clock();
177 S390_lowcore.last_update_clock = sched_clock_base_cc; 177 S390_lowcore.last_update_clock = sched_clock_base_cc;
178 S390_lowcore.last_update_timer = 0x7fffffffffffffffULL; 178 S390_lowcore.last_update_timer = 0x7fffffffffffffffULL;
179 S390_lowcore.user_timer = 0; 179 S390_lowcore.user_timer = 0;
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index 7918fbea36bb..504175ebf8b0 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -293,7 +293,7 @@ void notrace s390_do_machine_check(struct pt_regs *regs)
293 * retry this instruction. 293 * retry this instruction.
294 */ 294 */
295 spin_lock(&ipd_lock); 295 spin_lock(&ipd_lock);
296 tmp = get_clock(); 296 tmp = get_tod_clock();
297 if (((tmp - last_ipd) >> 12) < MAX_IPD_TIME) 297 if (((tmp - last_ipd) >> 12) < MAX_IPD_TIME)
298 ipd_count++; 298 ipd_count++;
299 else 299 else
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 7433a2f9e5cc..549c9d173c0f 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -365,16 +365,16 @@ void smp_emergency_stop(cpumask_t *cpumask)
365 u64 end; 365 u64 end;
366 int cpu; 366 int cpu;
367 367
368 end = get_clock() + (1000000UL << 12); 368 end = get_tod_clock() + (1000000UL << 12);
369 for_each_cpu(cpu, cpumask) { 369 for_each_cpu(cpu, cpumask) {
370 struct pcpu *pcpu = pcpu_devices + cpu; 370 struct pcpu *pcpu = pcpu_devices + cpu;
371 set_bit(ec_stop_cpu, &pcpu->ec_mask); 371 set_bit(ec_stop_cpu, &pcpu->ec_mask);
372 while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL, 372 while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL,
373 0, NULL) == SIGP_CC_BUSY && 373 0, NULL) == SIGP_CC_BUSY &&
374 get_clock() < end) 374 get_tod_clock() < end)
375 cpu_relax(); 375 cpu_relax();
376 } 376 }
377 while (get_clock() < end) { 377 while (get_tod_clock() < end) {
378 for_each_cpu(cpu, cpumask) 378 for_each_cpu(cpu, cpumask)
379 if (pcpu_stopped(pcpu_devices + cpu)) 379 if (pcpu_stopped(pcpu_devices + cpu))
380 cpumask_clear_cpu(cpu, cpumask); 380 cpumask_clear_cpu(cpu, cpumask);
@@ -694,7 +694,7 @@ static void __init smp_detect_cpus(void)
694 */ 694 */
695static void __cpuinit smp_start_secondary(void *cpuvoid) 695static void __cpuinit smp_start_secondary(void *cpuvoid)
696{ 696{
697 S390_lowcore.last_update_clock = get_clock(); 697 S390_lowcore.last_update_clock = get_tod_clock();
698 S390_lowcore.restart_stack = (unsigned long) restart_stack; 698 S390_lowcore.restart_stack = (unsigned long) restart_stack;
699 S390_lowcore.restart_fn = (unsigned long) do_restart; 699 S390_lowcore.restart_fn = (unsigned long) do_restart;
700 S390_lowcore.restart_data = 0; 700 S390_lowcore.restart_data = 0;
@@ -947,7 +947,7 @@ static ssize_t show_idle_time(struct device *dev,
947 unsigned int sequence; 947 unsigned int sequence;
948 948
949 do { 949 do {
950 now = get_clock(); 950 now = get_tod_clock();
951 sequence = ACCESS_ONCE(idle->sequence); 951 sequence = ACCESS_ONCE(idle->sequence);
952 idle_time = ACCESS_ONCE(idle->idle_time); 952 idle_time = ACCESS_ONCE(idle->idle_time);
953 idle_enter = ACCESS_ONCE(idle->clock_idle_enter); 953 idle_enter = ACCESS_ONCE(idle->clock_idle_enter);
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 0aa98db8a80d..876546b9cfa1 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -63,7 +63,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);
63 */ 63 */
64unsigned long long notrace __kprobes sched_clock(void) 64unsigned long long notrace __kprobes sched_clock(void)
65{ 65{
66 return tod_to_ns(get_clock_monotonic()); 66 return tod_to_ns(get_tod_clock_monotonic());
67} 67}
68 68
69/* 69/*
@@ -194,7 +194,7 @@ static void stp_reset(void);
194 194
195void read_persistent_clock(struct timespec *ts) 195void read_persistent_clock(struct timespec *ts)
196{ 196{
197 tod_to_timeval(get_clock() - TOD_UNIX_EPOCH, ts); 197 tod_to_timeval(get_tod_clock() - TOD_UNIX_EPOCH, ts);
198} 198}
199 199
200void read_boot_clock(struct timespec *ts) 200void read_boot_clock(struct timespec *ts)
@@ -204,7 +204,7 @@ void read_boot_clock(struct timespec *ts)
204 204
205static cycle_t read_tod_clock(struct clocksource *cs) 205static cycle_t read_tod_clock(struct clocksource *cs)
206{ 206{
207 return get_clock(); 207 return get_tod_clock();
208} 208}
209 209
210static struct clocksource clocksource_tod = { 210static struct clocksource clocksource_tod = {
@@ -342,7 +342,7 @@ int get_sync_clock(unsigned long long *clock)
342 342
343 sw_ptr = &get_cpu_var(clock_sync_word); 343 sw_ptr = &get_cpu_var(clock_sync_word);
344 sw0 = atomic_read(sw_ptr); 344 sw0 = atomic_read(sw_ptr);
345 *clock = get_clock(); 345 *clock = get_tod_clock();
346 sw1 = atomic_read(sw_ptr); 346 sw1 = atomic_read(sw_ptr);
347 put_cpu_var(clock_sync_word); 347 put_cpu_var(clock_sync_word);
348 if (sw0 == sw1 && (sw0 & 0x80000000U)) 348 if (sw0 == sw1 && (sw0 & 0x80000000U))
@@ -486,7 +486,7 @@ static void etr_reset(void)
486 .p0 = 0, .p1 = 0, ._pad1 = 0, .ea = 0, 486 .p0 = 0, .p1 = 0, ._pad1 = 0, .ea = 0,
487 .es = 0, .sl = 0 }; 487 .es = 0, .sl = 0 };
488 if (etr_setr(&etr_eacr) == 0) { 488 if (etr_setr(&etr_eacr) == 0) {
489 etr_tolec = get_clock(); 489 etr_tolec = get_tod_clock();
490 set_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags); 490 set_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags);
491 if (etr_port0_online && etr_port1_online) 491 if (etr_port0_online && etr_port1_online)
492 set_bit(CLOCK_SYNC_ETR, &clock_sync_flags); 492 set_bit(CLOCK_SYNC_ETR, &clock_sync_flags);
@@ -768,8 +768,8 @@ static int etr_sync_clock(void *data)
768 __ctl_set_bit(14, 21); 768 __ctl_set_bit(14, 21);
769 __ctl_set_bit(0, 29); 769 __ctl_set_bit(0, 29);
770 clock = ((unsigned long long) (aib->edf2.etv + 1)) << 32; 770 clock = ((unsigned long long) (aib->edf2.etv + 1)) << 32;
771 old_clock = get_clock(); 771 old_clock = get_tod_clock();
772 if (set_clock(clock) == 0) { 772 if (set_tod_clock(clock) == 0) {
773 __udelay(1); /* Wait for the clock to start. */ 773 __udelay(1); /* Wait for the clock to start. */
774 __ctl_clear_bit(0, 29); 774 __ctl_clear_bit(0, 29);
775 __ctl_clear_bit(14, 21); 775 __ctl_clear_bit(14, 21);
@@ -845,7 +845,7 @@ static struct etr_eacr etr_handle_events(struct etr_eacr eacr)
845 * assume that this can have caused an stepping 845 * assume that this can have caused an stepping
846 * port switch. 846 * port switch.
847 */ 847 */
848 etr_tolec = get_clock(); 848 etr_tolec = get_tod_clock();
849 eacr.p0 = etr_port0_online; 849 eacr.p0 = etr_port0_online;
850 if (!eacr.p0) 850 if (!eacr.p0)
851 eacr.e0 = 0; 851 eacr.e0 = 0;
@@ -858,7 +858,7 @@ static struct etr_eacr etr_handle_events(struct etr_eacr eacr)
858 * assume that this can have caused an stepping 858 * assume that this can have caused an stepping
859 * port switch. 859 * port switch.
860 */ 860 */
861 etr_tolec = get_clock(); 861 etr_tolec = get_tod_clock();
862 eacr.p1 = etr_port1_online; 862 eacr.p1 = etr_port1_online;
863 if (!eacr.p1) 863 if (!eacr.p1)
864 eacr.e1 = 0; 864 eacr.e1 = 0;
@@ -974,7 +974,7 @@ static void etr_update_eacr(struct etr_eacr eacr)
974 etr_eacr = eacr; 974 etr_eacr = eacr;
975 etr_setr(&etr_eacr); 975 etr_setr(&etr_eacr);
976 if (dp_changed) 976 if (dp_changed)
977 etr_tolec = get_clock(); 977 etr_tolec = get_tod_clock();
978} 978}
979 979
980/* 980/*
@@ -1012,7 +1012,7 @@ static void etr_work_fn(struct work_struct *work)
1012 /* Store aib to get the current ETR status word. */ 1012 /* Store aib to get the current ETR status word. */
1013 BUG_ON(etr_stetr(&aib) != 0); 1013 BUG_ON(etr_stetr(&aib) != 0);
1014 etr_port0.esw = etr_port1.esw = aib.esw; /* Copy status word. */ 1014 etr_port0.esw = etr_port1.esw = aib.esw; /* Copy status word. */
1015 now = get_clock(); 1015 now = get_tod_clock();
1016 1016
1017 /* 1017 /*
1018 * Update the port information if the last stepping port change 1018 * Update the port information if the last stepping port change
@@ -1537,10 +1537,10 @@ static int stp_sync_clock(void *data)
1537 if (stp_info.todoff[0] || stp_info.todoff[1] || 1537 if (stp_info.todoff[0] || stp_info.todoff[1] ||
1538 stp_info.todoff[2] || stp_info.todoff[3] || 1538 stp_info.todoff[2] || stp_info.todoff[3] ||
1539 stp_info.tmd != 2) { 1539 stp_info.tmd != 2) {
1540 old_clock = get_clock(); 1540 old_clock = get_tod_clock();
1541 rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0); 1541 rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0);
1542 if (rc == 0) { 1542 if (rc == 0) {
1543 delta = adjust_time(old_clock, get_clock(), 0); 1543 delta = adjust_time(old_clock, get_tod_clock(), 0);
1544 fixup_clock_comparator(delta); 1544 fixup_clock_comparator(delta);
1545 rc = chsc_sstpi(stp_page, &stp_info, 1545 rc = chsc_sstpi(stp_page, &stp_info,
1546 sizeof(struct stp_sstpi)); 1546 sizeof(struct stp_sstpi));
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index e84b8b68444a..8911a169af44 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -191,7 +191,7 @@ cputime64_t s390_get_idle_time(int cpu)
191 unsigned int sequence; 191 unsigned int sequence;
192 192
193 do { 193 do {
194 now = get_clock(); 194 now = get_tod_clock();
195 sequence = ACCESS_ONCE(idle->sequence); 195 sequence = ACCESS_ONCE(idle->sequence);
196 idle_enter = ACCESS_ONCE(idle->clock_idle_enter); 196 idle_enter = ACCESS_ONCE(idle->clock_idle_enter);
197 idle_exit = ACCESS_ONCE(idle->clock_idle_exit); 197 idle_exit = ACCESS_ONCE(idle->clock_idle_exit);