summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Remove all legacy ATA code parts, not used since options ATA_CAM enabled inmav2013-04-043-3/+0
| | | | | | | | | most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM. No objections: current@, stable@ MFC after: never
* Implement the concept of the unmapped VMIO buffers, i.e. buffers whichkib2013-03-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do not map the b_pages pages into buffer_map KVA. The use of the unmapped buffers eliminate the need to perform TLB shootdown for mapping on the buffer creation and reuse, greatly reducing the amount of IPIs for shootdown on big-SMP machines and eliminating up to 25-30% of the system time on i/o intensive workloads. The unmapped buffer should be explicitely requested by the GB_UNMAPPED flag by the consumer. For unmapped buffer, no KVA reservation is performed at all. The consumer might request unmapped buffer which does have a KVA reserve, to manually map it without recursing into buffer cache and blocking, with the GB_KVAALLOC flag. When the mapped buffer is requested and unmapped buffer already exists, the cache performs an upgrade, possibly reusing the KVA reservation. Unmapped buffer is translated into unmapped bio in g_vfs_strategy(). Unmapped bio carry a pointer to the vm_page_t array, offset and length instead of the data pointer. The provider which processes the bio should explicitely specify a readiness to accept unmapped bio, otherwise g_down geom thread performs the transient upgrade of the bio request by mapping the pages into the new bio_transient_map KVA submap. The bio_transient_map submap claims up to 10% of the buffer map, and the total buffer_map + bio_transient_map KVA usage stays the same. Still, it could be manually tuned by kern.bio_transient_maxcnt tunable, in the units of the transient mappings. Eventually, the bio_transient_map could be removed after all geom classes and drivers can accept unmapped i/o requests. Unmapped support can be turned off by the vfs.unmapped_buf_allowed tunable, disabling which makes the buffer (or cluster) creation requests to ignore GB_UNMAPPED and GB_KVAALLOC flags. Unmapped buffers are only enabled by default on the architectures where pmap_copy_page() was implemented and tested. In the rework, filesystem metadata is not the subject to maxbufspace limit anymore. Since the metadata buffers are always mapped, the buffers still have to fit into the buffer map, which provides a reasonable (but practically unreachable) upper bound on it. The non-metadata buffer allocations, both mapped and unmapped, is accounted against maxbufspace, as before. Effectively, this means that the maxbufspace is forced on mapped and unmapped buffers separately. The pre-patch bufspace limiting code did not worked, because buffer_map fragmentation does not allow the limit to be reached. By Jeff Roberson request, the getnewbuf() function was split into smaller single-purpose functions. Sponsored by: The FreeBSD Foundation Discussed with: jeff (previous version) Tested by: pho, scottl (previous version), jhb, bf MFC after: 2 weeks
* Add FBT for PowerPC DTrace. Also, clean up the DTrace assembly code,jhibbits2013-03-183-19/+14
| | | | | | | | | | | much of which is not necessary for PowerPC. The FBT module can likely be factored into 3 separate files: common, intel, and powerpc, rather than duplicating most of the code between the x86 and PowerPC flavors. All DTrace modules for PowerPC will be MFC'd together once Fasttrap is completed.
* Add pmap function pmap_copy_pages(), which copies the content of thekib2013-03-145-0/+147
| | | | | | | | | | | | | | | | | | | | | | | | pages around, taking array of vm_page_t both for source and destination. Starting offsets and total transfer size are specified. The function implements optimal algorithm for copying using the platform-specific optimizations. For instance, on the architectures were the direct map is available, no transient mappings are created, for i386 the per-cpu ephemeral page frame is used. The code was typically borrowed from the pmap_copy_page() for the same architecture. Only i386/amd64, powerpc aim and arm/arm-v6 implementations were tested at the time of commit. High-level code, not committed yet to the tree, ensures that the use of the function is only allowed after explicit enablement. For sparc64, the existing code has known issues and a stab is added instead, to allow the kernel linking. Sponsored by: The FreeBSD Foundation Tested by: pho (i386, amd64), scottl (amd64), ian (arm and arm-v6) MFC after: 2 weeks
* MFCattilio2013-03-025-47/+31
|\
| * MFcalloutng:mav2013-02-282-36/+19
| | | | | | | | | | | | | | 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.
| * MFcalloutng:davide2013-02-283-11/+12
| | | | | | | | | | | | | | | | | | | | | | When CPU becomes idle, cpu_idleclock() calculates time to the next timer event in order to reprogram hw timer. Return that time in sbintime_t to the caller and pass it to acpi_cpu_idle(), where it can be used as one more factor (quite precise) to extimate furter sleep time and choose optimal sleep state. This is a preparatory change for further callout improvements will be committed in the next days. The commmit is not targeted for MFC.
| * Merge from vmobj-rwlock:attilio2013-02-273-9/+6
| | | | | | | | | | | | | | | | | | | | | | 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 vmc-playground branch:attilio2013-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the sub-optimal uma_zone_set_obj() primitive with more modern uma_zone_reserve_kva(). The new primitive reserves before hand the necessary KVA space to cater the zone allocations and allocates pages with ALLOC_NOOBJ. More specifically: - uma_zone_reserve_kva() does not need an object to cater the backend allocator. - uma_zone_reserve_kva() can cater M_WAITOK requests, in order to serve zones which need to do uma_prealloc() too. - When possible, uma_zone_reserve_kva() uses directly the direct-mapping by uma_small_alloc() rather than relying on the KVA / offset combination. The removal of the object attribute allows 2 further changes: 1) _vm_object_allocate() becomes static within vm_object.c 2) VM_OBJECT_LOCK_INIT() is removed. This function is replaced by direct calls to mtx_init() as there is no need to export it anymore and the calls aren't either homogeneous anymore: there are now small differences between arguments passed to mtx_init(). Sponsored by: EMC / Isilon storage division Reviewed by: alc (which also offered almost all the comments) Tested by: pho, jhb, davide
| * Merge from vmobj-rwlock branch:attilio2013-02-264-4/+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
* | MFCattilio2013-02-261-2/+1
| |
* | MFCattilio2013-02-231-5/+0
|\ \ | |/
| * Eliminate an unused #define.alc2013-02-221-5/+0
| |
* | Hide the details for the assertion for VM_OBJECT_LOCK operations.attilio2013-02-213-13/+13
| | | | | | | | | | | | | | | | 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-216-4/+2
| | | | | | | | Sponsored by: EMC / Isilon storage division
* | There is no need to use VM_OBJECT_LOCKED() as the assertion won'tattilio2013-02-203-9/+6
| | | | | | | | | | 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-203-10/+10
|/ | | | | | | | * 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
* Introduce PLATFORMMETHOD_END and use it.rpaulo2013-02-135-5/+6
|
* Reform the busdma API so that new types may be added without modifyingkib2013-02-122-299/+238
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map. Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
* Use DEVMETHOD_END.rpaulo2013-02-113-3/+3
|
* Enable the UFS quotas for big-iron GENERIC kernels.kib2013-01-032-0/+2
| | | | | Discussed with: mckusick MFC after: 2 weeks
* As discussed on -current last October, remove the firewire drivers fromdes2013-01-031-6/+0
| | | | GENERIC.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-2/+2
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Setup BAT0 and BAT1 on the Wii.adrian2012-11-213-22/+171
| | | | | | | | | | | | 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
* Allow this file to be used in LOCORE sections of the kernel.rpaulo2012-11-121-1/+3
|
* Add DTrace to 32-bit PowerPC GENERIC now.jhibbits2012-11-081-0/+3
| | | | MFC after: 1 month
* 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
* Replace all uses of the page queues lock by a R/W lock that is privatealc2012-11-031-34/+40
| | | | | | | | to this pmap. Eliminate two redundant #include's. Tested by: marcel
* 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
* 1. Have the APs initialize the TLB1 entries from what has beenmarcel2012-11-034-58/+89
| | | | | | | | | | | | | | programmed on the BSP during (early) boot. This makes sure that the APs get configured the same as the BSP, irrspective of how FreeBSD was loaded. 2. Make sure to flush the dcache after writing the TLB1 entries to the boot page. The APs aren't part of the coherency domain just yet. 3. Set pmap_bootstrapped after calling pmap_bootstrap(). The FDT code now maps the devices (like OF), and this resulted in a panic. 4. Since we pre-wire the CCSR, make sure not to map chunks of it in pmap_mapdev().
* Work around broken device tree on last-generation PowerPC iMacsnwhitehorn2012-10-291-0/+4
| | | | | | | | | (PowerMac12,1), which have a mac-io MPIC cell that indifies itself as the root PIC despite the actual root PIC being on the northbridge. No CPC945 systems have a mac-io PIC that does anything so just don't attach on CPC945 (U4) systems. MFC after: 3 days
* Remove compat options.rpaulo2012-10-231-4/+0
| | | | Submitted by: netchild
* Fix the memory regions to include the 64MB DDR3 memory slot.rpaulo2012-10-221-6/+14
|
* Increase the I/O memory area to 0xc20000.rpaulo2012-10-221-1/+1
|
* Fix the top comment.rpaulo2012-10-211-1/+1
|
* Add a config file for the Wii.rpaulo2012-10-211-0/+115
|
* Add "options WII".rpaulo2012-10-211-0/+1
|
* Eliminate a stale comment. It describes another use case for the pmap inalc2012-09-282-10/+0
| | | | Mach that doesn't exist in FreeBSD.
* Move the prototype for savectx from cpu.h to pcb.h, as it is on othernwhitehorn2012-09-232-3/+1
| | | | | | platforms, as well as putting it in an #ifdef KERNEL block. MFC after: 2 weeks
* Remove leftover from r215163.andreast2012-09-211-1/+0
|
* Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-181-6/+6
| | | | | | | | | | | | | | | | | #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers. Discussed with: jhb MFC after: 1 week
* userret() already checks for td_locks when INVARIANTS is enabled, soattilio2012-09-082-2/+0
| | | | | | | there is no need to check if Giant is acquired after it. Reviewed by: kib MFC after: 1 week
* Add IRQ support to the resource list handling functions.rpaulo2012-09-081-3/+7
|
* Unbreak tinderbox.rpaulo2012-08-251-1/+4
|
* Set mdp only under #ifdef WII.rpaulo2012-08-251-0/+3
|
* phandle_t is unsigned, and OF_finddevice() returns (phandle_t)(-1) onjhibbits2012-08-212-3/+3
| | | | | | | | | failure, so check for that instead of 0. While here, provide a better description for ATI backlight driver. Reported by: jchandra@ MFC after: 3 days
* On Nintendo Wii CPUs, the mdp value will be garbage. Set it to NULLadrian2012-08-212-1/+10
| | | | | | so as to not confuse things. Submitted by: Margarida Gouveia
* Don't probe the openfirmware framebuffer if the system is a Wii or itadrian2012-08-211-0/+6
| | | | | | will crash. Submitted by: Margarida Gouveia
* Initial support for running FreeBSD on the Nintendo Wii. We're able toadrian2012-08-2112-0/+2973
| | | | | | | | | | | | | | | | | | | reach single user mode using a memory disk device as the file system. This port includes the framebuffer driver, the PIC driver, a platform driver and the GPIO driver. The IPC driver (to talk to IOS kernels) is not yet written but there's a placeholder for it. There are still some MMU problems and to get a working system you need to patch locore32.S. Since we haven't found the best way yet to address that problem, we're not committing those changes yet. The problem is related to the different BAT layout on the Wii and to the fact that the Homebrew loader doesn't clean up the special registers (including the 8 BATs) before passing control to us. You'll need a Wii with Homebrew loader and a TV that can do NTSC (for now). Submitted by: Margarida Gouveia
OpenPOWER on IntegriCloud