···14141515struct s390_idle_data {1616 seqcount_t seqcount;1717- unsigned long long idle_count;1818- unsigned long long idle_time;1919- unsigned long long clock_idle_enter;2020- unsigned long long clock_idle_exit;2121- unsigned long long timer_idle_enter;2222- unsigned long long timer_idle_exit;1717+ unsigned long idle_count;1818+ unsigned long idle_time;1919+ unsigned long clock_idle_enter;2020+ unsigned long clock_idle_exit;2121+ unsigned long timer_idle_enter;2222+ unsigned long timer_idle_exit;2323 unsigned long mt_cycles_enter[8];2424};2525
+18-18
arch/s390/include/asm/timex.h
···98989999/* Query TOD offset result */100100struct ptff_qto {101101- unsigned long long physical_clock;102102- unsigned long long tod_offset;103103- unsigned long long logical_tod_offset;104104- unsigned long long tod_epoch_difference;101101+ unsigned long physical_clock;102102+ unsigned long tod_offset;103103+ unsigned long logical_tod_offset;104104+ unsigned long tod_epoch_difference;105105} __packed;106106107107static inline int ptff_query(unsigned int nr)···151151 rc; \152152})153153154154-static inline unsigned long long local_tick_disable(void)154154+static inline unsigned long local_tick_disable(void)155155{156156- unsigned long long old;156156+ unsigned long old;157157158158 old = S390_lowcore.clock_comparator;159159 S390_lowcore.clock_comparator = clock_comparator_max;···161161 return old;162162}163163164164-static inline void local_tick_enable(unsigned long long comp)164164+static inline void local_tick_enable(unsigned long comp)165165{166166 S390_lowcore.clock_comparator = comp;167167 set_clock_comparator(S390_lowcore.clock_comparator);···169169170170#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */171171172172-typedef unsigned long long cycles_t;172172+typedef unsigned long cycles_t;173173174174-static inline unsigned long long get_tod_clock(void)174174+static inline unsigned long get_tod_clock(void)175175{176176 union tod_clock clk;177177···179179 return clk.tod;180180}181181182182-static inline unsigned long long get_tod_clock_fast(void)182182+static inline unsigned long get_tod_clock_fast(void)183183{184184#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES185185- unsigned long long clk;185185+ unsigned long clk;186186187187 asm volatile("stckf %0" : "=Q" (clk) : : "cc");188188 return clk;···208208 * Therefore preemption must be disabled, otherwise the returned209209 * value is not guaranteed to be monotonic.210210 */211211-static inline unsigned long long get_tod_clock_monotonic(void)211211+static inline unsigned long get_tod_clock_monotonic(void)212212{213213- unsigned long long tod;213213+ unsigned long tod;214214215215 preempt_disable_notrace();216216 tod = get_tod_clock() - tod_clock_base.tod;···237237 * -> ns = (th * 125) + ((tl * 125) >> 9);238238 *239239 */240240-static inline unsigned long long tod_to_ns(unsigned long long todval)240240+static inline unsigned long tod_to_ns(unsigned long todval)241241{242242 return ((todval >> 9) * 125) + (((todval & 0x1ff) * 125) >> 9);243243}···249249 *250250 * Returns: true if a is later than b251251 */252252-static inline int tod_after(unsigned long long a, unsigned long long b)252252+static inline int tod_after(unsigned long a, unsigned long b)253253{254254 if (MACHINE_HAS_SCC)255255- return (long long) a > (long long) b;255255+ return (long) a > (long) b;256256 return a > b;257257}258258···263263 *264264 * Returns: true if a is later than b265265 */266266-static inline int tod_after_eq(unsigned long long a, unsigned long long b)266266+static inline int tod_after_eq(unsigned long a, unsigned long b)267267{268268 if (MACHINE_HAS_SCC)269269- return (long long) a >= (long long) b;269269+ return (long) a >= (long) b;270270 return a >= b;271271}272272
+6-6
arch/s390/kernel/idle.c
···4747void arch_cpu_idle(void)4848{4949 struct s390_idle_data *idle = this_cpu_ptr(&s390_idle);5050- unsigned long long idle_time;5050+ unsigned long idle_time;5151 unsigned long psw_mask;52525353 /* Wait for external, I/O or machine check interrupt. */···7373 struct device_attribute *attr, char *buf)7474{7575 struct s390_idle_data *idle = &per_cpu(s390_idle, dev->id);7676- unsigned long long idle_count;7676+ unsigned long idle_count;7777 unsigned int seq;78787979 do {···8282 if (READ_ONCE(idle->clock_idle_enter))8383 idle_count++;8484 } while (read_seqcount_retry(&idle->seqcount, seq));8585- return sprintf(buf, "%llu\n", idle_count);8585+ return sprintf(buf, "%lu\n", idle_count);8686}8787DEVICE_ATTR(idle_count, 0444, show_idle_count, NULL);88888989static ssize_t show_idle_time(struct device *dev,9090 struct device_attribute *attr, char *buf)9191{9292- unsigned long long now, idle_time, idle_enter, idle_exit, in_idle;9292+ unsigned long now, idle_time, idle_enter, idle_exit, in_idle;9393 struct s390_idle_data *idle = &per_cpu(s390_idle, dev->id);9494 unsigned int seq;9595···109109 }110110 }111111 idle_time += in_idle;112112- return sprintf(buf, "%llu\n", idle_time >> 12);112112+ return sprintf(buf, "%lu\n", idle_time >> 12);113113}114114DEVICE_ATTR(idle_time_us, 0444, show_idle_time, NULL);115115116116u64 arch_cpu_idle_time(int cpu)117117{118118 struct s390_idle_data *idle = &per_cpu(s390_idle, cpu);119119- unsigned long long now, idle_enter, idle_exit, in_idle;119119+ unsigned long now, idle_enter, idle_exit, in_idle;120120 unsigned int seq;121121122122 do {
+14-14
arch/s390/kernel/time.c
···68686969unsigned char ptff_function_mask[16];70707171-static unsigned long long lpar_offset;7272-static unsigned long long initial_leap_seconds;7373-static unsigned long long tod_steering_end;7474-static long long tod_steering_delta;7171+static unsigned long lpar_offset;7272+static unsigned long initial_leap_seconds;7373+static unsigned long tod_steering_end;7474+static long tod_steering_delta;75757676/*7777 * Get time offsets with PTFF···96969797 /* get initial leap seconds */9898 if (ptff_query(PTFF_QUI) && ptff(&qui, sizeof(qui), PTFF_QUI) == 0)9999- initial_leap_seconds = (unsigned long long)9999+ initial_leap_seconds = (unsigned long)100100 ((long) qui.old_leap * 4096000000L);101101}102102···222222223223static u64 read_tod_clock(struct clocksource *cs)224224{225225- unsigned long long now, adj;225225+ unsigned long now, adj;226226227227 preempt_disable(); /* protect from changes to steering parameters */228228 now = get_tod_clock();···362362 * Apply clock delta to the global data structures.363363 * This is called once on the CPU that performed the clock sync.364364 */365365-static void clock_sync_global(unsigned long long delta)365365+static void clock_sync_global(unsigned long delta)366366{367367 unsigned long now, adj;368368 struct ptff_qto qto;···378378 -(adj >> 15) : (adj >> 15);379379 tod_steering_delta += delta;380380 if ((abs(tod_steering_delta) >> 48) != 0)381381- panic("TOD clock sync offset %lli is too large to drift\n",381381+ panic("TOD clock sync offset %li is too large to drift\n",382382 tod_steering_delta);383383 tod_steering_end = now + (abs(tod_steering_delta) << 15);384384 vdso_data->arch_data.tod_steering_end = tod_steering_end;···394394 * Apply clock delta to the per-CPU data structures of this CPU.395395 * This is called for each online CPU after the call to clock_sync_global.396396 */397397-static void clock_sync_local(unsigned long long delta)397397+static void clock_sync_local(unsigned long delta)398398{399399 /* Add the delta to the clock comparator. */400400 if (S390_lowcore.clock_comparator != clock_comparator_max) {···418418struct clock_sync_data {419419 atomic_t cpus;420420 int in_sync;421421- unsigned long long clock_delta;421421+ unsigned long clock_delta;422422};423423424424/*···538538static int stp_sync_clock(void *data)539539{540540 struct clock_sync_data *sync = data;541541- unsigned long long clock_delta, flags;541541+ u64 clock_delta, flags;542542 static int first;543543 int rc;544544···720720721721 mutex_lock(&stp_mutex);722722 if (stpinfo_valid())723723- ret = sprintf(buf, "%016llx\n",724724- *(unsigned long long *) stp_info.ctnid);723723+ ret = sprintf(buf, "%016lx\n",724724+ *(unsigned long *) stp_info.ctnid);725725 mutex_unlock(&stp_mutex);726726 return ret;727727}···794794 if (!stzi.lsoib.p)795795 return sprintf(buf, "0,0\n");796796797797- return sprintf(buf, "%llu,%d\n",797797+ return sprintf(buf, "%lu,%d\n",798798 tod_to_ns(stzi.lsoib.nlsout - TOD_UNIX_EPOCH) / NSEC_PER_SEC,799799 stzi.lsoib.nlso - stzi.lsoib.also);800800}