summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/cpu.h
Commit message (Collapse)AuthorAgeFilesLines
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Instead of calling ia32_pause() conditionally on __i386__ or __amd64__mux2004-08-031-0/+1
| | | | | | | | | being defined, define and use a new MD macro, cpu_spinwait(). It only expands to something on i386 and amd64, so the compiled code should be identical. Name of the macro found by: jhb Reviewed by: jhb
* DELAY must be a routine, not a macro definition.grehan2003-09-261-2/+0
|
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MImarcel2003-08-161-1/+6
| | | | | | | | | | | | | | | | | | | prototypes of cpu_halt(), cpu_reset() and swi_vm() from md_var.h to cpu.h. This affects db_command.c and kern_shutdown.c. ia64: move all MD prototypes from cpu.h to md_var.h. This affects madt.c, interrupt.c and mp_machdep.c. Remove is_physical_memory(). It's not used (vm_machdep.c). alpha: the MD prototypes have been left in cpu.h with a comment that they should be there. Moving them is left for later. It was expected that the impact would be significant enough to be done in a seperate commit. powerpc: MD prototypes left in cpu.h. Comment added. Suggested by: bde Tested with: make universe (pc98 incomplete)
* Remove unused bootpath[] variable. It conflicted with a declarationgrehan2003-06-251-2/+0
| | | | in the sunlabel utility, causing build problems.
* Prepended underscores to macro local vars, avoiding gcc "declarationgrehan2003-01-181-6/+6
| | | | | | shadows global" warning Approved by: benno
* Additional machdep sysctl constants needed for userland utilsgrehan2002-09-191-2/+6
| | | | Approved by: benno
* Move the kcopy() function from trap.c to machdep.c. Add a prototype.benno2002-05-281-0/+1
|
* GC an extraneous prototype of delay().benno2002-04-151-1/+0
|
* Remove __P.alfred2002-03-201-2/+2
| | | | Reveiwed by: benno
* Add a missing (.benno2002-02-281-1/+1
|
* Clean up the trap handling code and make it consistent with the other platforms.mp2001-11-051-3/+0
| | | | Submitted by: jhb
* - Correct the type of the argument to delay() so as to not conflict withbenno2001-10-151-1/+2
| | | | | sys/boot/common/bootstrap.h. - Add a prototype for fork_trampoline().
* Update PowerPC MD code to compile and do initial bootstrap based onmp2001-09-201-1/+1
| | | | | | recent changes (KSE and VM requiring physmem to be setup). Reviewed by: benno, jhb, julian
* - Close races with signals and other AST's being triggered while we are injhb2001-08-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | the process of exiting the kernel. The ast() function now loops as long as the PS_ASTPENDING or PS_NEEDRESCHED flags are set. It returns with preemption disabled so that any further AST's that arrive via an interrupt will be delayed until the low-level MD code returns to user mode. - Use u_int's to store the tick counts for profiling purposes so that we do not need sched_lock just to read p_sticks. This also closes a problem where the call to addupc_task() could screw up the arithmetic due to non-atomic reads of p_sticks. - Axe need_proftick(), aston(), astoff(), astpending(), need_resched(), clear_resched(), and resched_wanted() in favor of direct bit operations on p_sflag. - Fix up locking with sched_lock some. In addupc_intr(), use sched_lock to ensure pr_addr and pr_ticks are updated atomically with setting PS_OWEUPC. In ast() we clear pr_ticks atomically with clearing PS_OWEUPC. We also do not grab the lock just to test a flag. - Simplify the handling of Giant in ast() slightly. Reviewed by: bde (mostly)
* Add TRAPF_* macros required by MI-ification of ast() and userret().benno2001-07-011-0/+3
| | | | Submitted by: Mark Peek <mark@whistle.com>
* Add a new MI pointer to the process' trapframe p_frame instead of usingjhb2001-06-291-1/+1
| | | | | | various differently named pointers buried under p_md. Reviewed by: jake (in principle)
* Bring in NetBSD code used in the PowerPC port.benno2001-06-101-0/+98
Reviewed by: obrien, dfr Obtained from: NetBSD
OpenPOWER on IntegriCloud