<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/kernel/time.c, branch linux-4.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-05T10:07:02Z</updated>
<entry>
<title>s390/stp: add locking to sysfs functions</title>
<updated>2020-11-05T10:07:02Z</updated>
<author>
<name>Sven Schnelle</name>
</author>
<published>2020-09-15T06:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0bc43e64c89e8a7dbd855438141186ee559834b8'/>
<id>urn:sha1:0bc43e64c89e8a7dbd855438141186ee559834b8</id>
<content type='text'>
commit b3bd02495cb339124f13135d51940cf48d83e5cb upstream.

The sysfs function might race with stp_work_fn. To prevent that,
add the required locking. Another issue is that the sysfs functions
are checking the stp_online flag, but this flag just holds the user
setting whether STP is enabled. Add a flag to clock_sync_flag whether
stp_info holds valid data and use that instead.

Cc: stable@vger.kernel.org
Signed-off-by: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Reviewed-by: Alexander Egorenkov &lt;egorenar@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>s390/dasd: Change unsigned long long to unsigned long</title>
<updated>2017-08-23T11:31:51Z</updated>
<author>
<name>Jan Höppner</name>
</author>
<published>2017-08-15T14:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bf76f0169538279b78536393639859eeb7d93f1'/>
<id>urn:sha1:7bf76f0169538279b78536393639859eeb7d93f1</id>
<content type='text'>
Unsigned long long and unsigned long were different in size for 31-bit.
For 64-bit the size for both datatypes is 8 Bytes and since the support
for 31-bit is long gone we can clean up a little and change everything
to unsigned long.
Change get_phys_clock() along the way to accept unsigned long as well so
that the DASD code can be consistent.

Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Jan Höppner &lt;hoeppner@linux.vnet.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/time: add support for the TOD clock epoch extension</title>
<updated>2017-07-26T06:25:14Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2016-10-27T10:41:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e2ef5e4f6cc57344762932d70d38ba4ec65fa8b'/>
<id>urn:sha1:6e2ef5e4f6cc57344762932d70d38ba4ec65fa8b</id>
<content type='text'>
The TOD epoch extension adds 8 epoch bits to the TOD clock to provide
a continuous clock after 2042/09/17. The store-clock-extended (STCKE)
instruction will store the epoch index in the first byte of the
16 bytes stored by the instruction. The read_boot_clock64 and the
read_presistent_clock64 functions need to take the additional bits
into account to give the correct result after 2042/09/17.

The clock-comparator register will stay 64 bit wide. The comparison
of the clock-comparator with the TOD clock is limited to bytes
1 to 8 of the extended TOD format. To deal with the overflow problem
due to an epoch change the clock-comparator sign control in CR0 can
be used to switch the comparison of the 64-bit TOD clock with the
clock-comparator to a signed comparison.

The decision between the signed vs. unsigned clock-comparator
comparisons is done at boot time. Only if the TOD clock is in the
second half of a 142 year epoch the signed comparison is used.
This solves the epoch overflow issue as long as the machine is
booted at least once in an epoch.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/kernel: Use stop_machine_cpuslocked()</title>
<updated>2017-05-26T08:10:41Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2017-05-24T08:15:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2337e879e8805a630b418f3e73a98084d4724b83'/>
<id>urn:sha1:2337e879e8805a630b418f3e73a98084d4724b83</id>
<content type='text'>
stp_work_fn() holds get_online_cpus() while invoking stop_machine().

stop_machine() invokes get_online_cpus() as well. This is correct, but
prevents the conversion of the hotplug locking to a percpu rwsem.

Use stop_machine_cpuslocked() to avoid the nested call. Convert
*_online_cpus() to the new interfaces while at it.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: linux-s390@vger.kernel.org
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: David Hildenbrand &lt;dahi@linux.vnet.ibm.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Link: http://lkml.kernel.org/r/20170524081548.250203087@linutronix.de

</content>
</entry>
<entry>
<title>s390/time: Set -&gt;min_delta_ticks and -&gt;max_delta_ticks</title>
<updated>2017-04-14T20:11:20Z</updated>
<author>
<name>Nicolai Stange</name>
</author>
<published>2017-03-30T19:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06c546110b0dafbc96c6eaf00aaa5835a18408c1'/>
<id>urn:sha1:06c546110b0dafbc96c6eaf00aaa5835a18408c1</id>
<content type='text'>
In preparation for making the clockevents core NTP correction aware,
all clockevent device drivers must set -&gt;min_delta_ticks and
-&gt;max_delta_ticks rather than -&gt;min_delta_ns and -&gt;max_delta_ns: a
clockevent device's rate is going to change dynamically and thus, the
ratio of ns to ticks ceases to stay invariant.

Currently, the s390's CPU timer clockevent device is initialized as
follows:

  cd-&gt;min_delta_ns    = 1;
  cd-&gt;max_delta_ns    = LONG_MAX;

Note that the device's time to cycle conversion factor, i.e.
cd-&gt;mult / (2^cd-&gt;shift), is approx. equal to 4.

Hence, this would translate to

  cd-&gt;min_delta_ticks = 4;
  cd-&gt;max_delta_ticks = 4 * LONG_MAX;

However, a minimum value of 1ns is in the range of noise anyway and the
clockevent core will take care of this by increasing it to 1us or so.
Furthermore, 4*LONG_MAX would overflow the unsigned long argument the
clockevent devices gets programmed with.

Thus, initialize -&gt;min_delta_ticks with 1 and -&gt;max_delta_ticks with
ULONG_MAX.

This patch alone doesn't introduce any change in functionality as the
clockevents core still looks exclusively at the (untouched) -&gt;min_delta_ns
and -&gt;max_delta_ns. As soon as this has changed, a followup patch will
purge the initialization of -&gt;min_delta_ns and -&gt;max_delta_ns from this
driver.

Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: David Hildenbrand &lt;dahi@linux.vnet.ibm.com&gt;
Cc: linux-s390@vger.kernel.org
Signed-off-by: Nicolai Stange &lt;nicstange@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>sched/headers: Prepare for new header dependencies before moving code to &lt;linux/sched/clock.h&gt;</title>
<updated>2017-03-02T07:42:27Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-01T15:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e601757102cfd3eeae068f53b3bc1234f3a2b2e9'/>
<id>urn:sha1:e601757102cfd3eeae068f53b3bc1234f3a2b2e9</id>
<content type='text'>
We are going to split &lt;linux/sched/clock.h&gt; out of &lt;linux/sched.h&gt;, which
will have to be picked up from other headers and .c files.

Create a trivial placeholder &lt;linux/sched/clock.h&gt; file that just
maps to &lt;linux/sched.h&gt; to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390: kernel: Audit and remove any unnecessary uses of module.h</title>
<updated>2017-02-17T06:40:31Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2017-02-09T20:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3994a52b54569c4d71d43e3e00464eb9127f86a5'/>
<id>urn:sha1:3994a52b54569c4d71d43e3e00464eb9127f86a5</id>
<content type='text'>
Historically a lot of these existed because we did not have
a distinction between what was modular code and what was providing
support to modules via EXPORT_SYMBOL and friends.  That changed
when we forked out support for the latter into the export.h file.

This means we should be able to reduce the usage of module.h
in code that is obj-y Makefile or bool Kconfig.  The advantage
in doing so is that module.h itself sources about 15 other headers;
adding significantly to what we feed cpp, and it can obscure what
headers we are effectively using.

Since module.h was the source for init.h (for __init) and for
export.h (for EXPORT_SYMBOL) we consider each change instance
for the presence of either and replace as needed.  Build testing
revealed some implicit header usage that was fixed up accordingly.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/debug: make debug event time stamps relative to the boot TOD clock</title>
<updated>2017-02-07T06:27:13Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2016-11-16T08:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea417aa8a38bc7db929281d6dc4b671e75f51844'/>
<id>urn:sha1:ea417aa8a38bc7db929281d6dc4b671e75f51844</id>
<content type='text'>
The debug features currently uses absolute TOD time stamps for the
debug events. Given that the TOD clock can jump forward and backward
due to STP sync checks the order of debug events can get obfuscated.

Replace the absolute TOD time stamps with a delta to the IPL time
stamp. On a STP sync check the TOD clock correction is added to
the IPL time stamp as well to make the deltas unaffected by STP
sync check.

The readout of the debug feature entries will convert the deltas
back to absolute time stamps based on the Unix epoch.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: use false/true when using bool</title>
<updated>2017-01-16T06:27:54Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2017-01-02T08:59:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=970ba6ac6a59ff1f1579e472a97765adc50186f9'/>
<id>urn:sha1:970ba6ac6a59ff1f1579e472a97765adc50186f9</id>
<content type='text'>
Yet another trivial patch to reduce the noise that coccinelle
generates.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>clocksource: Use a plain u64 instead of cycle_t</title>
<updated>2016-12-25T10:04:12Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2016-12-21T19:32:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5a1d1c2914b5316924c7893eb683a5420ebd3be'/>
<id>urn:sha1:a5a1d1c2914b5316924c7893eb683a5420ebd3be</id>
<content type='text'>
There is no point in having an extra type for extra confusion. u64 is
unambiguous.

Conversion was done with the following coccinelle script:

@rem@
@@
-typedef u64 cycle_t;

@fix@
typedef cycle_t;
@@
-cycle_t
+u64

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
