summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/cpufunc.h
Commit message (Collapse)AuthorAgeFilesLines
* MFC r309167:jhibbits2016-12-091-1/+1
| | | | Add an isync to after mtsrin, required by the MPC750 errata
* Correctly specify assembler constrains for synchronization instructions.nwhitehorn2012-04-221-3/+3
| | | | MFC after: 3 days
* Remove dead code. The routines in atomic.S did not work properly anyway, andnwhitehorn2012-04-221-10/+0
| | | | | | | were everywhere unused. If we turn out to need them, they should be reimplemented. MFC after: 2 weeks
* Add CPU support code for the IBM Cell Broadband Engine.nwhitehorn2010-11-121-0/+11
|
* MFppc64:nwhitehorn2010-07-131-0/+15
| | | | | | | Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture.
* Improve style(9)raj2009-05-141-6/+6
|
* PowerPC common SMP startup and time base rework.raj2009-05-141-1/+25
| | | | | | | | | | - make mftb() shared, rewrite in C, provide complementary mttb() - adjust SMP startup per the above, additional comments, minor naming changes - eliminate redundant TB defines, other minor cosmetics Reviewed by: marcel, nwhitehorn Obtained from: Freescale, Semihalf
* Fix compilation in the case when kernel doesn't have KDB ebabled.sobomax2008-10-301-0/+7
| | | | subr_kdb.c still references breakpoint() in this case.
* In powerpc_get_pcpup(), make the inline assembly statementmarcel2008-09-161-1/+1
| | | | | | | | | | | | | | volatile so that the compiler won't perform CSE. For SMP, this may result in us accessing the wrong PCPU and as such results in a bogus curthread value. Note that getting curthread is not quite MP-safe in the sense that it requires two instructions that aren't performed atomically. The first instruction gets the address of the PCPU structure and the second instruction dereferences that pointer to get curthread. If a thread is switched-out in between these instructions and switched-in on a different CPU, we still get the wrong curthread.
* Remove restore_intr(). We have intr_restore()...marcel2008-08-311-7/+0
|
* Add powerpc_sync() as an inline function.marcel2008-08-301-0/+7
|
* MFp4: SMP supportmarcel2008-04-271-9/+1
|
* Remove mfsvr():marcel2008-04-271-10/+0
| | | | | | o The function is defined unconditionally but depends on SPR_SVR, which is defined conditionally. o spr.h defines mfspr() and mtspr(), which is no worse to use.
* Improve handling of Local Access Windows on MPC85xx systems:raj2008-04-261-0/+11
| | | | | | | | - detect number of LAWs in run time and initalize accordingly - introduce decode windows target IDs used in MPC8572 - other minor updates Obtained from: Freescale, Semihalf
* Always isync after a mtmsr. While perhaps not strictly necessary for PSL_EEgrehan2004-08-071-1/+1
| | | | | bit banging according to the OEA, it's better to be conservative than having to continually audit uses of this inline.
* DDB -> KDB, and rename low-level trap handler to avoid name conflict.grehan2004-07-121-4/+4
|
* Make breakpoint() actually break into ddb.gallatin2003-12-091-5/+6
| | | | Reviewed by: grehan
* Doh. Forgot to remove _KERNEL version.grehan2003-02-231-7/+0
|
* Expose powerpc_mb() to user-space. Currently needed for atomic.h users,grehan2003-02-221-0/+10
| | | | this may go away in the future.
* Add an inline function wrapper for the mfpvf (Move From Processor Versionbenno2003-02-051-0/+10
| | | | Register) instruction.
* Fix clearing of recoverable exception MSR bit when disablinggrehan2002-09-191-1/+1
| | | | | | interrupts Approved by: benno
* Add an inline to call eieio.benno2002-06-291-0/+7
| | | | ("Enforce In-order Execution of I/O". I am not making this up.)
* Add inlines for mtsrin and mfsrin.benno2002-04-161-0/+17
|
* Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()dillon2002-04-011-6/+0
| | | | | | | | | | | | | | | | | | | | | and cpu_critical_exit() and moves associated critical prototypes into their own header file, <arch>/<arch>/critical.h, which is only included by the three MI source files that need it. Backout and re-apply improperly comitted syntactical cleanups made to files that were still under active development. Backout improperly comitted program structure changes that moved localized declarations to the top of two procedures. Partially re-apply one of the program structure changes to move 'mask' into an intermediate block rather then in three separate sub-blocks to make the code more readable. Re-integrate bug fixes that Jake made to the sparc64 code. Note: In general, developers should not gratuitously move declarations out of sub-blocks. They are where they are for reasons of structure, grouping, readability, compiler-localizability, and to avoid developer-introduced bugs similar to several found in recent years in the VFS and VM code. Reviewed by: jake
* Compromise for critical*()/cpu_critical*() recommit. Cleanup the interruptdillon2002-03-271-22/+7
| | | | | | | | | | | | | | | | | | | disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up). Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement. This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary. Reviewed by: core Approved by: core
* - Make all inlines for manipulating supervisor-level registers accept/returnbenno2002-03-211-6/+13
| | | | | register_t values. - Implement an inline for isync.
* GC some unused, bogus interrupt functions and replace them with properbenno2002-03-211-20/+6
| | | | implementations of intr_disable and intr_restore.
* - When enabling/disabling interrupts, set/clear both PSL_EE and PSL_RI, notbenno2002-02-281-5/+12
| | | | | just PSL_EE. - Make cpu_critical_enter/exit independant of save_intr/restore_intr.
* Simple fixes to get the powerpc kernel compiling again.gallatin2002-01-281-1/+1
| | | | Reviewed by: mp
* Modify the critical section API as follows:jhb2001-12-181-2/+4
| | | | | | | | | | | | | | | | | | | - The MD functions critical_enter/exit are renamed to start with a cpu_ prefix. - MI wrapper functions critical_enter/exit maintain a per-thread nesting count and a per-thread critical section saved state set when entering a critical section while at nesting level 0 and restored when exiting to nesting level 0. This moves the saved state out of spin mutexes so that interlocking spin mutexes works properly. - Most low-level MD code that used critical_enter/exit now use cpu_critical_enter/exit. MI code such as device drivers and spin mutexes use the MI wrappers. Note that since the MI wrappers store the state in the current thread, they do not have any return values or arguments. - mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is assigned to curthread->td_savecrit during fork_exit(). Tested on: i386, alpha
* Overhaul the per-CPU support a bit:jhb2001-12-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | - The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list. Tested on: alpha, i386 Reviewed by: peter, jake
* Minor style(9)'ingobrien2001-08-161-2/+9
|
* Fix the atomic_*_32 operations. These were written before I had the abilitybenno2001-06-271-30/+52
| | | | | to test them properly and before I had a working knowledge of GCC asm constraints.
* This commit (along with one pending in sys/dev/ofw and one in sys/conf) givebenno2001-06-161-0/+127
us our first minimal glimpse of PowerPC support. With this code we can get to the "mountroot>" prompt on my Apple iMac. We can't get any further due to lack of clock and interrupt handling, among other things. This does however mean that pmap and VM are initialising. We're fairly dependant on OpenFirmware at this point, but I hope to add support for other classes of firmware at a later stage. Reviewed by: obrien, dfr
OpenPOWER on IntegriCloud