aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/time.c
AgeCommit message (Collapse)AuthorFilesLines
2006-02-07[PATCH] powerpc: remove pointer/integer confusion in generic_calibrate_decrOlaf Hering1-4/+4
remove pointer/integer confusion Signed-off-by: Olaf Hering <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2006-01-13[PATCH] powerpc: Remove lppaca structure from the PACADavid Gibson1-1/+1
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2006-01-09[PATCH] powerpc: Remove some unneeded fields from the pacaDavid Gibson1-4/+0
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2005-11-18powerpc: Fix delay functions for 601 processorsPaul Mackerras1-0/+28
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 <[email protected]>
2005-11-11[PATCH] powerpc: Merge vdso's and add vdso support to 32 bits kernelBenjamin Herrenschmidt1-22/+18
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2005-11-10powerpc: Fix SMP time initialization problemPaul Mackerras1-0/+2
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 <[email protected]>
2005-11-10[PATCH] powerpc: merge code values for identifying platformsPaul Mackerras1-14/+15
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2005-11-08Merge ../linux-2.6Paul Mackerras1-0/+1
2005-11-07[PATCH] POWERPC/PPC64: Fix CONFIG_SMP=n build for ppc64Olof Johansson1-0/+1
Two CONFIG_SMP=n build fixes due to missing <asm/smp.h> includes. Signed-off-by: Olof Johansson <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-11-07powerpc: Various UP build fixesPaul Mackerras1-4/+1
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 <[email protected]>
2005-11-02merge filename and modify references to iseries/it_lp_queue.hKelly Daly1-1/+1
Signed-off-by: Kelly Daly <[email protected]>
2005-11-02merge filename and modify references to iseries/hv_call_xm.hKelly Daly1-1/+1
Signed-off-by: Kelly Daly <[email protected]>
2005-10-31powerpc: apply recent changes to merged codePaul Mackerras1-4/+0
Signed-off-by: Paul Mackerras <[email protected]>
2005-10-30powerpc: Fix time setting bug on 32-bitPaul Mackerras1-6/+8
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 <[email protected]>
2005-10-26[PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decrKumar Gala1-0/+11
We need to initialize some control SPRS for timers on Book-E before we start taking decrementer interrupts. Signed-off-by: Kumar K. Gala <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2005-10-26[PATCH] powerpc: Make sure we have an RTC before trying to adjust itKumar Gala1-1/+1
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
2005-10-23powerpc: Fix time code for 601 processorsPaul Mackerras1-23/+56
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 <[email protected]>
2005-10-22ppc64/powerpc: Fix time initialization on SMP systemsPaul Mackerras1-13/+1
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 <[email protected]>
2005-10-20powerpc: Fix some bugs in the new merged time codePaul Mackerras1-1/+1
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 <[email protected]>
2005-10-20powerpc: Move some calculations from xxx_calibrate_decr to time_initPaul Mackerras1-15/+12
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 <[email protected]>
2005-10-20powerpc: Merge time.c and asm/time.h.Paul Mackerras1-0/+978
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 <[email protected]>