Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13e091b6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 timer updates from Thomas Gleixner:
 "Early TSC based time stamping to allow better boot time analysis.

  This comes with a general cleanup of the TSC calibration code which
  grew warts and duct taping over the years and removes 250 lines of
  code. Initiated and mostly implemented by Pavel with help from various
  folks"

* 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits)
  x86/kvmclock: Mark kvm_get_preset_lpj() as __init
  x86/tsc: Consolidate init code
  sched/clock: Disable interrupts when calling generic_sched_clock_init()
  timekeeping: Prevent false warning when persistent clock is not available
  sched/clock: Close a hole in sched_clock_init()
  x86/tsc: Make use of tsc_calibrate_cpu_early()
  x86/tsc: Split native_calibrate_cpu() into early and late parts
  sched/clock: Use static key for sched_clock_running
  sched/clock: Enable sched clock early
  sched/clock: Move sched clock initialization and merge with generic clock
  x86/tsc: Use TSC as sched clock early
  x86/tsc: Initialize cyc2ns when tsc frequency is determined
  x86/tsc: Calibrate tsc only once
  ARM/time: Remove read_boot_clock64()
  s390/time: Remove read_boot_clock64()
  timekeeping: Default boot time offset to local_clock()
  timekeeping: Replace read_boot_clock64() with read_persistent_wall_and_boot_offset()
  s390/time: Add read_persistent_wall_and_boot_offset()
  x86/xen/time: Output xen sched_clock time from 0
  x86/xen/time: Initialize pv xen time in init_hypervisor_platform()
  ...
parents eac34119 1088c6ee
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -2835,8 +2835,6 @@

	nosync		[HW,M68K] Disables sync negotiation for all devices.

	notsc		[BUGS=X86-32] Disable Time Stamp Counter

	nowatchdog	[KNL] Disable both lockup detectors, i.e.
			soft-lockup and NMI watchdog (hard-lockup).

+1 −3
Original line number Diff line number Diff line
@@ -92,9 +92,7 @@ APICs
Timing

  notsc
  Don't use the CPU time stamp counter to read the wall time.
  This can be used to work around timing problems on multiprocessor systems
  with not properly synchronized CPUs.
  Deprecated, use tsc=unstable instead.

  nohpet
  Don't use the HPET timer.
+1 −2
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
extern void timer_tick(void);

typedef void (*clock_access_fn)(struct timespec64 *);
extern int register_persistent_clock(clock_access_fn read_boot,
				     clock_access_fn read_persistent);
extern int register_persistent_clock(clock_access_fn read_persistent);

#endif
+2 −13
Original line number Diff line number Diff line
@@ -83,29 +83,18 @@ static void dummy_clock_access(struct timespec64 *ts)
}

static clock_access_fn __read_persistent_clock = dummy_clock_access;
static clock_access_fn __read_boot_clock = dummy_clock_access;

void read_persistent_clock64(struct timespec64 *ts)
{
	__read_persistent_clock(ts);
}

void read_boot_clock64(struct timespec64 *ts)
{
	__read_boot_clock(ts);
}

int __init register_persistent_clock(clock_access_fn read_boot,
				     clock_access_fn read_persistent)
int __init register_persistent_clock(clock_access_fn read_persistent)
{
	/* Only allow the clockaccess functions to be registered once */
	if (__read_persistent_clock == dummy_clock_access &&
	    __read_boot_clock == dummy_clock_access) {
		if (read_boot)
			__read_boot_clock = read_boot;
	if (__read_persistent_clock == dummy_clock_access) {
		if (read_persistent)
			__read_persistent_clock = read_persistent;

		return 0;
	}

+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
	}

	sched_clock_register(omap_32k_read_sched_clock, 32, 32768);
	register_persistent_clock(NULL, omap_read_persistent_clock64);
	register_persistent_clock(omap_read_persistent_clock64);
	pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n");

	return 0;
Loading