History log of /openbmc/linux/arch/powerpc/kernel/time.c (Results 251 – 275 of 548)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v2.6.17-rc1
# 0e551954 28-Mar-2006 KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

[PATCH] for_each_possible_cpu: powerpc

for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
in the past where people were using for_each_cpu() where they should have been
i

[PATCH] for_each_possible_cpu: powerpc

for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs. This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.16
# 0a45d449 14-Mar-2006 Paul Mackerras <paulus@samba.org>

powerpc: Fix problem with time going backwards

The recent changes to keep gettimeofday in sync with xtime had the side
effect that it was occasionally possible for the time reported by
gettimeofday

powerpc: Fix problem with time going backwards

The recent changes to keep gettimeofday in sync with xtime had the side
effect that it was occasionally possible for the time reported by
gettimeofday to go back by a microsecond. There were two reasons:
(1) when we recalculated the offsets used by gettimeofday every 2^31
timebase ticks, we lost an accumulated fractional microsecond, and
(2) because the update is done some time after the notional start of
jiffy, if ntp is slowing the clock, it is possible to see time go backwards
when the timebase factor gets reduced.

This fixes it by (a) slowing the gettimeofday clock by about 1us in
2^31 timebase ticks (a factor of less than 1 in 3.7 million), and (b)
adjusting the timebase offsets in the rare case that the gettimeofday
result could possibly go backwards (i.e. when ntp is slowing the clock
and the timer interrupt is late). In this case the adjustment will
reduce to zero eventually because of (a).

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.16-rc6, v2.6.16-rc5
# 2cf82c02 26-Feb-2006 Paul Mackerras <paulus@samba.org>

powerpc: Export variables used in conversions to/from cputime_t

The inline cputime_to_foo and foo_to_cputime conversion functions in
include/asm-powerpc/cputime.h refer to 5 variables, which need to

powerpc: Export variables used in conversions to/from cputime_t

The inline cputime_to_foo and foo_to_cputime conversion functions in
include/asm-powerpc/cputime.h refer to 5 variables, which need to be
exported if those functions are to be usable from modules.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# c6622f63 23-Feb-2006 Paul Mackerras <paulus@samba.org>

powerpc: Implement accurate task and CPU time accounting

This implements accurate task and cpu time accounting for 64-bit
powerpc kernels. Instead of accounting a whole jiffy of time to a
task on a

powerpc: Implement accurate task and CPU time accounting

This implements accurate task and cpu time accounting for 64-bit
powerpc kernels. Instead of accounting a whole jiffy of time to a
task on a timer interrupt because that task happened to be running at
the time, we now account time in units of timebase ticks according to
the actual time spent by the task in user mode and kernel mode. We
also count the time spent processing hardware and software interrupts
accurately. This is conditional on CONFIG_VIRT_CPU_ACCOUNTING. If
that is not set, we do tick-based approximate accounting as before.

To get this accurate information, we read either the PURR (processor
utilization of resources register) on POWER5 machines, or the timebase
on other machines on

* each entry to the kernel from usermode
* each exit to usermode
* transitions between process context, hard irq context and soft irq
context in kernel mode
* context switches.

On POWER5 systems with shared-processor logical partitioning we also
read both the PURR and the timebase at each timer interrupt and
context switch in order to determine how much time has been taken by
the hypervisor to run other partitions ("steal" time). Unfortunately,
since we need values of the PURR on both threads at the same time to
accurately calculate the steal time, and since we can only calculate
steal time on a per-core basis, the apportioning of the steal time
between idle time (time which we ceded to the hypervisor in the idle
loop) and actual stolen time is somewhat approximate at the moment.

This is all based quite heavily on what s390 does, and it uses the
generic interfaces that were added by the s390 developers,
i.e. account_system_time(), account_user_time(), etc.

This patch doesn't add any new interfaces between the kernel and
userspace, and doesn't change the units in which time is reported to
userspace by things such as /proc/stat, /proc/<pid>/stat, getrusage(),
times(), etc. Internally the various task and cpu times are stored in
timebase units, but they are converted to USER_HZ units (1/100th of a
second) when reported to userspace. Some precision is therefore lost
but there should not be any accumulating error, since the internal
accumulation is at full precision.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 092b8f34 19-Feb-2006 Paul Mackerras <paulus@samba.org>

powerpc: Keep xtime and gettimeofday in sync

This fixes a regression which was introduced by moving ppc32 to use
the same sort of lockless gettimeofday as ppc64 has been using for
some time. This i

powerpc: Keep xtime and gettimeofday in sync

This fixes a regression which was introduced by moving ppc32 to use
the same sort of lockless gettimeofday as ppc64 has been using for
some time. This involves getting the timebase and performing some
simple arithmetic to convert it to seconds and microseconds. However,
the factor and offset used there weren't being updated when NTP
varied the tick length using adjtimex. 64-bit didn't notice the
problem because it had a hook in the 32-bit adjtimex compat routine
that attempted to work out what the generic timekeeping code would
do and alter the factor and offset to match. However, that code
was very complex and it wasn't clear that it still matched what the
generic code would do.

Now we use the generic current_tick_length() routine that was recently
added to check that the current tick will be as long as we expect; if
not we recompute the factor and offset. This keeps gettimeofday and
xtime in sync. In addition we check that gettimeofday hasn't got ahead
of xtime on each timer interrupt; if it has, we resync.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.16-rc4, v2.6.16-rc3
# d8a8188d 04-Feb-2006 Olaf Hering <olh@suse.de>

[PATCH] powerpc: remove pointer/integer confusion in generic_calibrate_decr

remove pointer/integer confusion

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>


Revision tags: v2.6.16-rc2, v2.6.16-rc1
# 3356bb9f 12-Jan-2006 David Gibson <david@gibson.dropbear.id.au>

[PATCH] powerpc: Remove lppaca structure from the PACA

At present the lppaca - the structure shared with the iSeries
hypervisor and phyp - is contained within the PACA, our own low-level
per-cpu str

[PATCH] powerpc: Remove lppaca structure from the PACA

At present the lppaca - the structure shared with the iSeries
hypervisor and phyp - is contained within the PACA, our own low-level
per-cpu structure. This doesn't have to be so, the patch below
removes it, making a separate array of lppaca structures.

This saves approximately 500*NR_CPUS bytes of image size and kernel
memory, because we don't need aligning gap between the Linux and
hypervisor portions of every PACA. On the other hand it means an
extra level of dereference in many accesses to the lppaca.

The patch also gets rid of several places where we assign the paca
address to a local variable for no particular reason.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.15, v2.6.15-rc7, v2.6.15-rc6, v2.6.15-rc5, v2.6.15-rc4, v2.6.15-rc3
# 404849bb 23-Nov-2005 David Gibson <david@gibson.dropbear.id.au>

[PATCH] powerpc: Remove some unneeded fields from the paca

This patch removes several unnecessary fields from the paca:

- next_jiffy_update_tb was simply unused. Remove trivially.

- The exdsi exc

[PATCH] powerpc: Remove some unneeded fields from the paca

This patch removes several unnecessary fields from the paca:

- next_jiffy_update_tb was simply unused. Remove trivially.

- The exdsi exception save area was not used. There were plans to use
it, but they never seem to have gone anywhere. If they ever do, we
can put it back. Remove from the paca, and from asm-offsets.c

- The default_decr field was used from asm, but was only ever assigned
the value of tb_ticks_per_jiffy. Just access tb_ticks_per_jiffy from
asm directly instead.

Built and booted on POWER5 LPAR and iSeries RS64.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.15-rc2
# 6defa38b 17-Nov-2005 Paul Mackerras <paulus@samba.org>

powerpc: Fix delay functions for 601 processors

My earlier merge of delay.h introduced a timebase-based udelay for
32-bit machines but also broke the 601, which doesn't have the
timebase register.

powerpc: Fix delay functions for 601 processors

My earlier merge of delay.h introduced a timebase-based udelay for
32-bit machines but also broke the 601, which doesn't have the
timebase register. This fixes it by using the 601's RTC register on
the 601, and also moves __delay() and udelay() to be out-of-line in
arch/powerpc/kernel/time.c. These functions aren't really performance
critical, after all.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.15-rc1
# a7f290da 11-Nov-2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>

[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel

This patch moves the vdso's to arch/powerpc, adds support for the 32
bits vdso to the 32 bits kernel, rename systemcfg (finally !

[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernel

This patch moves the vdso's to arch/powerpc, adds support for the 32
bits vdso to the 32 bits kernel, rename systemcfg (finally !), and adds
some new (still untested) routines to both vdso's: clock_gettime() with
support for CLOCK_REALTIME and CLOCK_MONOTONIC, clock_getres() (same
clocks) and get_tbfreq() for glibc to retreive the timebase frequency.

Tom,Steve: The implementation of get_tbfreq() I've done for 32 bits
returns a long long (r3, r4) not a long. This is such that if we ever
add support for >4Ghz timebases on ppc32, the userland interface won't
have to change.

I have tested gettimeofday() using some glibc patches in both ppc32 and
ppc64 kernels using 32 bits userland (I haven't had a chance to test a
64 bits userland yet, but the implementation didn't change and was
tested earlier). I haven't tested yet the new functions.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# cbe62e2b 09-Nov-2005 Paul Mackerras <paulus@samba.org>

powerpc: Fix SMP time initialization problem

We were getting the last_jiffy per-cpu variable set ahead of the current
timebase in smp_space_timers on SMP machines. This caused the loop in
timer_int

powerpc: Fix SMP time initialization problem

We were getting the last_jiffy per-cpu variable set ahead of the current
timebase in smp_space_timers on SMP machines. This caused the loop in
timer_interrupt to loop virtually forever, since tb_ticks_since assumes
that it will never be called with the timebase behind the last_jiffy
value.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 799d6046 09-Nov-2005 Paul Mackerras <paulus@samba.org>

[PATCH] powerpc: merge code values for identifying platforms

This patch merges platform codes. systemcfg->platform is no longer used,
systemcfg use in general is deprecated as much as possible (and

[PATCH] powerpc: merge code values for identifying platforms

This patch merges platform codes. systemcfg->platform is no longer used,
systemcfg use in general is deprecated as much as possible (and renamed
_systemcfg before it gets completely moved elsewhere in a future patch),
_machine is now used on ppc64 along as ppc32. Platform codes aren't gone
yet but we are getting a step closer. A bunch of asm code in head[_64].S
is also turned into C code.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 732ee21f 07-Nov-2005 Olof Johansson <olof@lixom.net>

[PATCH] POWERPC/PPC64: Fix CONFIG_SMP=n build for ppc64

Two CONFIG_SMP=n build fixes due to missing <asm/smp.h> includes.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Benjamin Herrenschmidt <

[PATCH] POWERPC/PPC64: Fix CONFIG_SMP=n build for ppc64

Two CONFIG_SMP=n build fixes due to missing <asm/smp.h> includes.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

show more ...


# 2249ca9d 06-Nov-2005 Paul Mackerras <paulus@samba.org>

powerpc: Various UP build fixes

Mostly this involves adding #include <asm/smp.h>, since that defines
things like boot_cpuid[_phys] and [gs]et_hard_smp_processor_id, which
are SMP-related but still n

powerpc: Various UP build fixes

Mostly this involves adding #include <asm/smp.h>, since that defines
things like boot_cpuid[_phys] and [gs]et_hard_smp_processor_id, which
are SMP-related but still needed on UP. This incorporates fixes
posted by Olof Johansson and Heikki Lindholm.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 8875ccfb 01-Nov-2005 Kelly Daly <kelly@au.ibm.com>

merge filename and modify references to iseries/it_lp_queue.h

Signed-off-by: Kelly Daly <kelly@au.ibm.com>


# 8021b8a7 01-Nov-2005 Kelly Daly <kelly@au.ibm.com>

merge filename and modify references to iseries/hv_call_xm.h

Signed-off-by: Kelly Daly <kelly@au.ibm.com>


# 734d6524 30-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: apply recent changes to merged code

Signed-off-by: Paul Mackerras <paulus@samba.org>


# 5f6b5b97 30-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: Fix time setting bug on 32-bit

This fixes a bug where settimeofday would set the wrong parameters
in do_gtod, resulting in gettimeofday returning a value about 4
hours after the correct tim

powerpc: Fix time setting bug on 32-bit

This fixes a bug where settimeofday would set the wrong parameters
in do_gtod, resulting in gettimeofday returning a value about 4
hours after the correct time. The bug was that we divided a
negative 64-bit value with do_div, which treated it as unsigned
and gave us a result that was approximately 1.8e10 too large
(since the divisor was 1e9).

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.14
# 0fd6f717 25-Oct-2005 Kumar Gala <galak@freescale.com>

[PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decr

We need to initialize some control SPRS for timers on Book-E before
we start taking decrementer interrupts.

Signed-off

[PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decr

We need to initialize some control SPRS for timers on Book-E before
we start taking decrementer interrupts.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# d2e61512 20-Oct-2005 Kumar Gala <galak@freescale.com>

[PATCH] powerpc: Make sure we have an RTC before trying to adjust it

Its valid for ppc_md.set_rtc_time to be NULL. We need to check
that its non-NULL before trying to update the RTC.

Signed-off-by

[PATCH] powerpc: Make sure we have an RTC before trying to adjust it

Its valid for ppc_md.set_rtc_time to be NULL. We need to check
that its non-NULL before trying to update the RTC.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 96c44507 23-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: Fix time code for 601 processors

The 601 doesn't have the timebase register; instead it has an RTCL
register that counts nanoseconds and wraps at 1000000000, and an
RTCU register that count

powerpc: Fix time code for 601 processors

The 601 doesn't have the timebase register; instead it has an RTCL
register that counts nanoseconds and wraps at 1000000000, and an
RTCU register that counts seconds. This makes the necessary changes
for the merged time code to use the RTCL/U registers when the kernel
is running on a 601.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# a5b518ed 21-Oct-2005 Paul Mackerras <paulus@samba.org>

ppc64/powerpc: Fix time initialization on SMP systems

This moves smp_space_timers from arch/ppc64/kernel/smp.c to
arch/powerpc/kernel/time.c and makes it initialize last_jiffy[]
instead of paca[].ne

ppc64/powerpc: Fix time initialization on SMP systems

This moves smp_space_timers from arch/ppc64/kernel/smp.c to
arch/powerpc/kernel/time.c and makes it initialize last_jiffy[]
instead of paca[].next_jiffy_update_tb, since last_jiffy[] is
now what the time code uses. It also declares smp_space_timers
in include/asm-powerpc/time.h and gets rid of an ifdef in
div128_by_32.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 5d14a18d 20-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: Fix some bugs in the new merged time code

I had the sense of the test for when to use the old 601-style RTC
registers inverted. pmac_calibrate_decr and via_calibrate_decr
weren't setting p

powerpc: Fix some bugs in the new merged time code

I had the sense of the test for when to use the old 601-style RTC
registers inverted. pmac_calibrate_decr and via_calibrate_decr
weren't setting ppc_tb_freq, on which all the further calculations
depended. Lastly, update_gtod was losing the top 32 bits of
the new tb_to_xs value.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


# 374e99d4 20-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: Move some calculations from xxx_calibrate_decr to time_init

Previously the individual xxx_calibrate_decr functions would each
print the timebase and cpu frequency and calculate several valu

powerpc: Move some calculations from xxx_calibrate_decr to time_init

Previously the individual xxx_calibrate_decr functions would each
print the timebase and cpu frequency and calculate several values
such as tb_to_us and tb_to_xs. This moves those printks and
calculations into time_init just after the call to the platform's
calibrate_decr function.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


Revision tags: v2.6.14-rc5
# f2783c15 19-Oct-2005 Paul Mackerras <paulus@samba.org>

powerpc: Merge time.c and asm/time.h.

We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_de

powerpc: Merge time.c and asm/time.h.

We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c. This also makes an
asm-powerpc/rtc.h.

Signed-off-by: Paul Mackerras <paulus@samba.org>

show more ...


1...<<11121314151617181920>>...22