linux_dsm_epyc7002/arch/parisc/lib
Helge Deller 54b6680090 parisc: Add native high-resolution sched_clock() implementation
Add a native implementation for the sched_clock() function which utilizes the
processor-internal cycle counter (Control Register 16) as high-resolution time
source.

With this patch we now get much more fine-grained resolutions in various
in-kernel time measurements (e.g. when viewing the function tracing logs), and
probably a more accurate scheduling on SMP systems.

There are a few specific implementation details in this patch:

1. On a 32bit kernel we emulate the higher 32bits of the required 64-bit
resolution of sched_clock() by increasing a per-cpu counter at every
wrap-around of the 32bit cycle counter.

2. In a SMP system, the cycle counters of the various CPUs are not syncronized
(similiar to the TSC in a x86_64 system). To cope with this we define
HAVE_UNSTABLE_SCHED_CLOCK and let the upper layers do the adjustment work.

3. Since we need HAVE_UNSTABLE_SCHED_CLOCK, we need to provide a cmpxchg64()
function even on a 32-bit kernel.

4. A 64-bit SMP kernel which is started on a UP system will mark the
sched_clock() implementation as "stable", which means that we don't expect any
jumps in the returned counter. This is true because we then run only on one
CPU.

Signed-off-by: Helge Deller <deller@gmx.de>
2016-05-22 21:39:25 +02:00
..
bitops.c parisc: Add native high-resolution sched_clock() implementation 2016-05-22 21:39:25 +02:00
checksum.c parisc: remove CVS keywords 2009-07-03 03:34:06 +00:00
delay.c parisc: make udelay() SMP-safe 2013-11-07 22:28:26 +01:00
fixup.S parisc: Unbreak handling exceptions from kernel modules 2016-04-08 22:14:14 +02:00
io.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iomap.c parisc: switch to GENERIC_PCI_IOMAP 2011-11-28 21:13:15 +02:00
lusercopy.S parisc: provide macro to create exception table entries 2013-11-07 22:25:33 +01:00
Makefile parisc: make udelay() SMP-safe 2013-11-07 22:28:26 +01:00
memcpy.c parisc: Replace __get_cpu_var uses for address calculation 2014-04-03 20:50:33 +02:00
memset.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ucmpdi2.c parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. 2013-04-25 22:36:15 +02:00