summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
Commit message (Collapse)AuthorAgeFilesLines
* MFCattilio2013-03-021-17/+9
|\
| * MFcalloutng:mav2013-02-281-17/+9
| | | | | | | | | | | | | | Switch eventtimers(9) from using struct bintime to sbintime_t. Even before this not a single driver really supported full dynamic range of struct bintime even in theory, not speaking about practical inexpediency. This change legitimates the status quo and cleans up the code.
| * Merge from vmobj-rwlock:attilio2013-02-272-6/+4
| | | | | | | | | | | | | | | | | | | | | | VM_OBJECT_LOCKED() macro is only used to implement a custom version of lock assertions right now (which likely spread out thanks to copy and paste). Remove it and implement actual assertions. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
| * Merge from vmobj-rwlock branch:attilio2013-02-263-3/+0
| | | | | | | | | | | | | | | | Remove unused inclusion of vm/vm_pager.h and vm/vnode_pager.h. Sponsored by: EMC / Isilon storage division Tested by: pho Reviewed by: alc
* | Hide the details for the assertion for VM_OBJECT_LOCK operations.attilio2013-02-212-8/+8
| | | | | | | | | | | | | | | | Rename current VM_OBJECT_LOCK_ASSERT(foo, RA_WLOCKED) into VM_OBJECT_ASSERT_WLOCKED(foo) Sponsored by: EMC / Isilon storage division Requested by: alc
* | Fix other architectures and ZFS.attilio2013-02-214-3/+1
| | | | | | | | Sponsored by: EMC / Isilon storage division
* | There is no need to use VM_OBJECT_LOCKED() as the assertion won'tattilio2013-02-202-6/+4
| | | | | | | | | | make the check available in any case if INVARIANTS is switched off. Remove VM_OBJECT_LOCKED().
* | Switch vm_object lock to be a rwlock.attilio2013-02-202-6/+6
|/ | | | | | | | * VM_OBJECT_LOCK and VM_OBJECT_UNLOCK are mapped to write operations * VM_OBJECT_SLEEP() is introduced as a general purpose primitve to get a sleep operation using a VM_OBJECT_LOCK() as protection * The approach must bear with vm_pager.h namespace pollution so many files require including directly rwlock.h
* Setup BAT0 and BAT1 on the Wii.adrian2012-11-212-22/+40
| | | | | | | | | | | | This is the missing piece for FreeBSD/Wii, but there's still a lot of work ahead. We have to reset the MMU in locore before continuing the boot process because we don't know how the boot loaders might have setup the BATs. We also disable the PCI BAT because there's no PCI bus on the Wii. Thanks to Nathan Whitehorn and Peter Grenhan for their help. Submitted by: Margarida Gouveia
* Flip the semantic of M_NOWAIT to only require the allocation to notkib2012-11-143-19/+6
| | | | | | | | | | | | | | | | | | | | sleep, and perform the page allocations with VM_ALLOC_SYSTEM class. Previously, the allocation was also allowed to completely drain the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT request class for vm_page_alloc() and similar functions. Allow the caller of malloc* to request the 'deep drain' semantic by providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM allocation class. Centralize the translation of the M_* malloc(9) flags in the single inline function malloc2vm_flags(). Discussion started by: "Sears, Steven" <Steven.Sears@netapp.com> Reviewed by: alc, mdf (previous version) Tested by: pho (previous version) MFC after: 2 weeks
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-075-0/+97
| | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* Rework the known rwlock to benefit about staying on their ownattilio2012-11-031-10/+1
| | | | | | | cache line in order to avoid manual frobbing but using struct rwlock_padalign. Reviewed by: alc, jimharris
* Eliminate a stale comment. It describes another use case for the pmap inalc2012-09-282-10/+0
| | | | Mach that doesn't exist in FreeBSD.
* userret() already checks for td_locks when INVARIANTS is enabled, soattilio2012-09-081-1/+0
| | | | | | | there is no need to check if Giant is acquired after it. Reviewed by: kib MFC after: 1 week
* Unbreak tinderbox.rpaulo2012-08-251-1/+4
|
* Set mdp only under #ifdef WII.rpaulo2012-08-251-0/+3
|
* On Nintendo Wii CPUs, the mdp value will be garbage. Set it to NULLadrian2012-08-211-1/+9
| | | | | | so as to not confuse things. Submitted by: Margarida Gouveia
* Avoid recursion on the pvh global lock in the aim oea pmap.alc2012-07-102-14/+26
| | | | | | | Correct the return type of the pmap_ts_referenced() implementations. Reported by: jhibbits [1] Tested by: andreast
* Replace all uses of the vm page queues lock by a r/w lock that is privatealc2012-07-061-29/+46
| | | | | | to this pmap. Tested by: andreast, jhibbits
* The `end' symbol doesn't match the end of the kernel image because it'srpaulo2012-06-292-6/+8
| | | | | | | | | | | | | relative to the start address (unless the start address is 0, which is not the case). This is currently not a problem because all powerpc architectures are using loader(8) which passes metadata to the kernel including the correct `endkernel' address. If we don't use loader(8), register 4 and 5 will have the size of the kernel ELF file, not its end address. We fix that simply by adding `kernel_text' to `end' to compute `endkernel'. Discussed with: nathanw
* Fix physical address type to vm_paddr_t also for powerpc64.raj2012-05-251-11/+11
|
* Fix physical address type to vm_paddr_t.raj2012-05-241-11/+11
|
* Replace the list of PVOs owned by each PMAP with an RB tree. This simplifiesnwhitehorn2012-05-202-176/+57
| | | | | | | range operations like pmap_remove() and pmap_protect() as well as allowing simple operations like pmap_extract() not to involve any global state. This substantially reduces lock coverages for the global table lock and improves concurrency.
* Fix final bugs in memory barriers on PowerPC:nwhitehorn2012-05-042-2/+4
| | | | | | | | | | | | - Use isync/lwsync unconditionally for acquire/release. Use of isync guarantees a complete memory barrier, which is important for serialization of bus space accesses with mutexes on multi-processor systems. - Go back to using sync as the I/O memory barrier, which solves the same problem as above with respect to mutex release using lwsync, while not penalizing non-I/O operations like a return to sync on the atomic release operations would. - Place an acquisition barrier around thread lock acquisition in cpu_switchin().
* Fix build on 32-bit systems.nwhitehorn2012-04-281-1/+1
|
* After switching mutexes to use lwsync, they no longer provide sufficientnwhitehorn2012-04-282-30/+19
| | | | | | | | guarantees on acquire for the tlbie mutex. Conversely, the TLB invalidation sequence provides guarantees that do not need to be redundantly applied on release. Roll a small custom lock that is just right. Simultaneously, convert the SLB tree changes back to lwsync, as changing them to sync was a misdiagnosis of the tlbie barrier problem this commit actually fixes.
* Revert r234581 for this file. The lockless SLB tree code does in fact neednwhitehorn2012-04-241-2/+2
| | | | | a heavyweight sync instead of a lightweight sync to function properly. Thanks to mdf for the clarification.
* Use lwsync to provide memory barriers on systems that support it insteadnwhitehorn2012-04-221-2/+2
| | | | | | | | of sync (lwsync is an alternate encoding of sync on systems that do not support it, providing graceful fallback). This provides more than an order of magnitude reduction in the time required to acquire or release a mutex. MFC after: 2 months
* Avoid a lock order reversal in pmap_extract_and_hold() from relockingnwhitehorn2012-04-221-1/+32
| | | | | | | | the page. This PMAP requires an additional lock besides the PMAP lock in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release. Suggested by: kib MFC after: 4 days
* Make sure all pending operations have completed on the existing threadnwhitehorn2012-04-202-0/+2
| | | | | | before (potentially) migrating it to a different CPU. MFC after: 5 days
* We don't need kcopy() in any of the remaining places it is used, sonwhitehorn2012-04-113-33/+3
| | | | | | remove it. MFC after: 2 weeks
* Only manipulate the PGA_EXECUTABLE flag on managed pages. This is a proxynwhitehorn2012-04-111-14/+10
| | | | | | | | for whether the page is physical. On dense phys mem systems (32-bit), VM_PHYS_TO_PAGE will not return NULL for device memory pages if device memory is above physical memory even if there is no allocated vm_page. Attempting to use the returned page could then cause either memory corruption or a page fault.
* Fix error in r233949. Synchronizing icaches on uncacheable pages turns outnwhitehorn2012-04-111-2/+4
| | | | | not to be a good idea, and of course the PV entry list for a page is never empty after the page has been mapped.
* Execute an initial ptesync if and only if the PTE is actually beingnwhitehorn2012-04-061-14/+7
| | | | invalidated, as opposed to a ref/changed bit update.
* Substantially reduce the scope of the locks held in pmap_enter(), whichnwhitehorn2012-04-061-34/+8
| | | | improves concurrency slightly.
* Reduce the frequency that the PowerPC/AIM pmaps invalidate instructionnwhitehorn2012-04-063-57/+29
| | | | | | | | caches, by invalidating kernel icaches only when needed and not flushing user caches for shared pages. Suggested by: kib MFC after: 2 weeks
* More PMAP performance improvements: skip 256 MB segments entirely if theynwhitehorn2012-03-282-11/+26
| | | | | | are are not mapped during ranged operations and reduce the scope of the tlbie lock only to the actual tlbie instruction instead of the entire sequence. There are a few more optimization possibilities here as well.
* Make sure to call vm_page_dirty() before the pmap lock is released tonwhitehorn2012-03-271-2/+2
| | | | | | prevent a race where another process could conclude the page was clean. Submitted by: alc
* More PMAP concurrency improvements: replace the table lock and (almost) allnwhitehorn2012-03-271-86/+100
| | | | | | | | uses of the page queues mutex with a new rwlock that protects the page table and the PV lists. This reduces system time during a parallel buildworld by 35%. Reviewed by: alc
* More PMAP performance improvements: on powerpc64, when TLBIE can be runnwhitehorn2012-03-251-4/+11
| | | | | with exceptions enabled, leave them enabled and use a regular mutex to guard TLB invalidations instead of a spinlock.
* Only call vm_page_dirty() on pages that are writable in order not tonwhitehorn2012-03-241-4/+12
| | | | confuse the VM.
* Following suggestions from alc, skip wired mappings in pmap_remove_pages()nwhitehorn2012-03-241-51/+29
| | | | | and remove moea64_attr_*() in favor of direct calls to vm_page_dirty() and friends.
* Remove acquisition of VM page queues lock from pmap_protect(). Any actualnwhitehorn2012-03-181-2/+0
| | | | | | | | | manipulation of the pvo_vlink and pvo_olink entries is already protected by the table lock, so most remaining instances of the acquisition of the page queues lock can likely be replaced with the table lock, or removed if the table lock is already held. Reviewed by: alc
* Implement pmap_remove_pages(). This will be added later to the 32-bit MMUnwhitehorn2012-03-151-0/+18
| | | | | | module. Suggested by: alc
* Improve algorithm for deciding whether to loop through all process pagesnwhitehorn2012-03-151-40/+58
| | | | | | | | or look them up individually in pmap_remove() and apply the same logic in the other ranged operation (pmap_protect). This speeds up make installworld by a factor of 2 on powerpc64. MFC after: 1 week
* Use LIST_FOREACH_SAFE() instead of LIST_FOREACH() in pmap_remove(), sincenwhitehorn2012-03-142-4/+4
| | | | | | the point of this loop is to remove elements. This worked by accident before. MFC after: 2 days
* Revert the _NOPROF entries on cpu_throw, cpu_switch and savectx. They can beandreast2012-02-051-3/+3
| | | | | | profiled too now. MFC after: 2 weeks
* Fix build for the case of powerpc64 kernel without COMPAT_FREEBSD32.kib2012-01-301-0/+3
| | | | MFC after: 2 months
* Finally, try to enable the nxstacks on amd64 and powerpc64 for both 64bitkib2012-01-301-0/+4
| | | | | | | and 32bit ABIs. Also try to enable nxstacks for PAE/i386 when supported, and some variants of powerpc32. MFC after: 2 months (if ever)
* This commit adds profiling support for powerpc64. Now we can do applicationandreast2012-01-203-7/+8
| | | | | | | | | | | | | profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. MFC after: 3 weeks, together with r230291
OpenPOWER on IntegriCloud