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

Commit 9465d9cc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull timer updates from Thomas Gleixner:
 "The time/timekeeping/timer folks deliver with this update:

   - Fix a reintroduced signed/unsigned issue and cleanup the whole
     signed/unsigned mess in the timekeeping core so this wont happen
     accidentaly again.

   - Add a new trace clock based on boot time

   - Prevent injection of random sleep times when PM tracing abuses the
     RTC for storage

   - Make posix timers configurable for real tiny systems

   - Add tracepoints for the alarm timer subsystem so timer based
     suspend wakeups can be instrumented

   - The usual pile of fixes and updates to core and drivers"

* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
  timekeeping: Use mul_u64_u32_shr() instead of open coding it
  timekeeping: Get rid of pointless typecasts
  timekeeping: Make the conversion call chain consistently unsigned
  timekeeping_Force_unsigned_clocksource_to_nanoseconds_conversion
  alarmtimer: Add tracepoints for alarm timers
  trace: Update documentation for mono, mono_raw and boot clock
  trace: Add an option for boot clock as trace clock
  timekeeping: Add a fast and NMI safe boot clock
  timekeeping/clocksource_cyc2ns: Document intended range limitation
  timekeeping: Ignore the bogus sleep time if pm_trace is enabled
  selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous"
  clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap
  clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
  arm64: dts: rockchip: Arch counter doesn't tick in system suspend
  clocksource/drivers/arm_arch_timer: Don't assume clock runs in suspend
  posix-timers: Make them configurable
  posix_cpu_timers: Move the add_device_randomness() call to a proper place
  timer: Move sys_alarm from timer.c to itimer.c
  ptp_clock: Allow for it to be optional
  Kconfig: Regenerate *.c_shipped files after previous changes
  ...
parents e71c3978 c029a2be
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -38,6 +38,11 @@ to deliver its interrupts via SPIs.
  architecturally-defined reset values. Only supported for 32-bit
  architecturally-defined reset values. Only supported for 32-bit
  systems which follow the ARMv7 architected reset values.
  systems which follow the ARMv7 architected reset values.


- arm,no-tick-in-suspend : The main counter does not tick when the system is in
  low-power system suspend on some SoCs. This behavior does not match the
  Architecture Reference Manual's specification that the system counter "must
  be implemented in an always-on power domain."



Example:
Example:


+29 −0
Original line number Original line Diff line number Diff line
@@ -113,6 +113,34 @@ applicable everywhere (see syntax).
	That will limit the usefulness but on the other hand avoid
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.
	the illegal configurations all over.


- weak reverse dependencies: "imply" <symbol> ["if" <expr>]
  This is similar to "select" as it enforces a lower limit on another
  symbol except that the "implied" symbol's value may still be set to n
  from a direct dependency or with a visible prompt.

  Given the following example:

  config FOO
	tristate
	imply BAZ

  config BAZ
	tristate
	depends on BAR

  The following values are possible:

	FOO		BAR		BAZ's default	choice for BAZ
	---		---		-------------	--------------
	n		y		n		N/m/y
	m		y		m		M/y/n
	y		y		y		Y/n
	y		n		*		N

  This is useful e.g. with multiple drivers that want to indicate their
  ability to hook into a secondary subsystem while allowing the user to
  configure that subsystem out without also having to unset these drivers.

- limiting menu display: "visible if" <expr>
- limiting menu display: "visible if" <expr>
  This attribute is only applicable to menu blocks, if the condition is
  This attribute is only applicable to menu blocks, if the condition is
  false, the menu block is not displayed to the user (the symbols
  false, the menu block is not displayed to the user (the symbols
@@ -481,6 +509,7 @@ historical issues resolved through these different solutions.
  b) Match dependency semantics:
  b) Match dependency semantics:
	b1) Swap all "select FOO" to "depends on FOO" or,
	b1) Swap all "select FOO" to "depends on FOO" or,
	b2) Swap all "depends on FOO" to "select FOO"
	b2) Swap all "depends on FOO" to "select FOO"
  c) Consider the use of "imply" instead of "select"


The resolution to a) can be tested with the sample Kconfig file
The resolution to a) can be tested with the sample Kconfig file
Documentation/kbuild/Kconfig.recursion-issue-01 through the removal
Documentation/kbuild/Kconfig.recursion-issue-01 through the removal
+20 −0
Original line number Original line Diff line number Diff line
@@ -362,6 +362,26 @@ of ftrace. Here is a list of some of the key files:
		  to correlate events across hypervisor/guest if
		  to correlate events across hypervisor/guest if
		  tb_offset is known.
		  tb_offset is known.


	  mono: This uses the fast monotonic clock (CLOCK_MONOTONIC)
		which is monotonic and is subject to NTP rate adjustments.

	  mono_raw:
		This is the raw monotonic clock (CLOCK_MONOTONIC_RAW)
		which is montonic but is not subject to any rate adjustments
		and ticks at the same rate as the hardware clocksource.

	  boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the
		fast monotonic clock, but also accounts for time spent in
		suspend. Since the clock access is designed for use in
		tracing in the suspend path, some side effects are possible
		if clock is accessed after the suspend time is accounted before
		the fast mono clock is updated. In this case, the clock update
		appears to happen slightly sooner than it normally would have.
		Also on 32-bit systems, it's possible that the 64-bit boot offset
		sees a partial update. These effects are rare and post
		processing should be able to handle them. See comments in the
		ktime_get_boot_fast_ns() function for more information.

	To set a clock, simply echo the clock name into this file.
	To set a clock, simply echo the clock name into this file.


	  echo global > trace_clock
	  echo global > trace_clock
+8 −0
Original line number Original line Diff line number Diff line
@@ -1029,11 +1029,16 @@ SYSCALL_DEFINE2(osf_settimeofday, struct timeval32 __user *, tv,
	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
	return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
}
}


asmlinkage long sys_ni_posix_timers(void);

SYSCALL_DEFINE2(osf_getitimer, int, which, struct itimerval32 __user *, it)
SYSCALL_DEFINE2(osf_getitimer, int, which, struct itimerval32 __user *, it)
{
{
	struct itimerval kit;
	struct itimerval kit;
	int error;
	int error;


	if (!IS_ENABLED(CONFIG_POSIX_TIMERS))
		return sys_ni_posix_timers();

	error = do_getitimer(which, &kit);
	error = do_getitimer(which, &kit);
	if (!error && put_it32(it, &kit))
	if (!error && put_it32(it, &kit))
		error = -EFAULT;
		error = -EFAULT;
@@ -1047,6 +1052,9 @@ SYSCALL_DEFINE3(osf_setitimer, int, which, struct itimerval32 __user *, in,
	struct itimerval kin, kout;
	struct itimerval kin, kout;
	int error;
	int error;


	if (!IS_ENABLED(CONFIG_POSIX_TIMERS))
		return sys_ni_posix_timers();

	if (in) {
	if (in) {
		if (get_it32(&kin, in))
		if (get_it32(&kin, in))
			return -EFAULT;
			return -EFAULT;
+1 −0
Original line number Original line Diff line number Diff line
@@ -174,6 +174,7 @@
			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW 0>,
			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW 0>,
			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW 0>,
			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW 0>,
			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW 0>;
			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW 0>;
		arm,no-tick-in-suspend;
	};
	};


	xin24m: xin24m {
	xin24m: xin24m {
Loading