summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Remove ia64.marcel2014-07-07133-35389/+0
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* Introduce pmap_unwire(). It will replace pmap_change_wiring(). There arealc2014-07-061-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | several reasons for this change: pmap_change_wiring() has never (in my memory) been used to set the wired attribute on a virtual page. We have always used pmap_enter() to do that. Moreover, it is not really safe to use pmap_change_wiring() to set the wired attribute on a virtual page. The description of pmap_change_wiring() says that it assumes the existence of a mapping in the pmap. However, non-wired mappings may be reclaimed by the pmap at any time. (See pmap_collect().) Many implementations of pmap_change_wiring() will crash if the mapping does not exist. pmap_unwire() accepts a range of virtual addresses, whereas pmap_change_wiring() acts upon a single virtual page. Since we are typically unwiring a range of virtual addresses, pmap_unwire() will be more efficient. Moreover, pmap_unwire() allows us to unwire superpage mappings. Previously, we were forced to demote the superpage mapping, because pmap_change_wiring() only allowed us to express the unwiring of a single base page mapping at a time. This added to the overhead of unwiring for large ranges of addresses, including the implicit unwiring that occurs at process termination. Implementations for arm and powerpc will follow. Discussed with: jeff, marcel Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
* Improve the KTR logs by naming the values.marcel2014-07-021-53/+59
|
* Add vt(4) devices and options to NOTESemaste2014-07-011-0/+3
| | | | Reviewed by: marius (earlier version)
* Pull in r267961 and r267973 again. Fix for issues reported will follow.hselasky2014-06-282-5/+3
|
* Revert r267961, r267973:gjb2014-06-272-3/+5
| | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifhselasky2014-06-272-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies
* - Modify vm_page_unwire() and vm_page_enqueue() to directly acceptattilio2014-06-161-1/+1
| | | | | | | | | | | | | | | | | | the queue where to enqueue pages that are going to be unwired. - Add stronger checks to the enqueue/dequeue for the pagequeues when adding and removing pages to them. Of course, for unmanaged pages the queue parameter of vm_page_unwire() will be ignored, just as the active parameter today. This makes adding new pagequeues quicker. This change effectively modifies the KPI. __FreeBSD_version will be, however, bumped just when the full cache of free pages will be evicted. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
* Restore comments accidentally removed.imp2014-06-061-1/+1
| | | | MFC after: 3 days
* Bring in the mpr(4) driver for LSI's MPT3 12Gb SAS controllers.ken2014-05-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is derived from the mps(4) driver, but it supports only the 12Gb IT and IR hardware including the SAS 3004, SAS 3008 and SAS 3108. Some notes about this driver: o The 12Gb hardware can do "FastPath" I/O, and that capability is included in this driver. o WarpDrive functionality has been removed, since it isn't supported in the 12Gb driver interface. o The Scatter/Gather list handling code is significantly different between the 6Gb and 12Gb hardware. The 12Gb boards support IEEE Scatter/Gather lists. Thanks to LSI for developing and testing this driver for FreeBSD. share/man/man4/mpr.4: mpr(4) man page. sys/dev/mpr/*: mpr(4) driver files. sys/modules/Makefile, sys/modules/mpr/Makefile: Add a module Makefile for the mpr(4) driver. sys/conf/files: Add the mpr(4) driver. sys/amd64/conf/GENERIC, sys/i386/conf/GENERIC, sys/mips/conf/OCTEON1, sys/sparc64/conf/GENERIC: Add the mpr(4) driver to all config files that currently have the mps(4) driver. sys/ia64/conf/GENERIC: Add the mps(4) and mpr(4) drivers to the ia64 GENERIC config file. sys/i386/conf/XEN: Exclude the mpr module from building here. Submitted by: Steve McConnell <Stephen.McConnell@lsi.com> MFC after: 3 days Tested by: Chris Reeves <chrisr@spectralogic.com> Sponsored by: LSI, Spectra Logic Relnotes: LSI 12Gb SAS driver mpr(4) added
* Retire smp_active. It was racey and caused demonstrated problems withscottl2014-04-261-1/+1
| | | | | | | | | | the cpufreq code. Replace its use with smp_started. There's at least one userland tool that still looks at the kern.smp.active sysctl, so preserve it but point it to smp_started as well. Discussed with: peter, jhb MFC after: 3 days Obtained from: Netflix
* Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4tijl2014-04-011-1/+1
| | | | | | -fms-extensions. MFC after: 2 weeks
* Fix missed efi.h header change in r263815emaste2014-03-281-1/+1
| | | | Pointy hat to: emaste
* Move ia64 efi.h to sys in preparation for amd64 UEFI supportemaste2014-03-2711-187/+10
| | | | | | | | | | Prototypes specific to ia64 have been left in this file for now, under __ia64__, rather than moving them to a new header under sys/ia64. I anticipate that (some of) the corresponding functions will be shared by the amd64, arm64, i386, and ia64 architectures, and we can adjust this as EFI support on other than ia64 continues to develop. Sponsored by: The FreeBSD Foundation
* Rename global cnt to vm_cnt to avoid shadowing.bdrewery2014-03-222-3/+3
| | | | | | | | | | | | | | To reduce the diff struct pcu.cnt field was not renamed, so PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in kvm(3) and vmstat(8). The goal was to not affect externally used KPI. Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the the global cnt variable. Exp-run revealed no ports using it directly. No objection from: arch@ Sponsored by: EMC / Isilon Storage Division
* Add KTR events for the PMAP interface functionsmarcel2014-03-193-61/+169
| | | | | | | | | | | | | | | | | | 1. move unmapped_buf_allowed to machdep.c. 2. map both pmap_mapbios() and pmap_mapdev() to pmap_mapdev_attr() and have the actual work done by pmap_mapdev_priv() (renamed from pmap_mapdev()). Use pmap_mapdev_priv() to map the I/O port space because we can't use CTR() that early. 3. add pmap_pinit_common() that's used by both pmap_pinit0() and pmap_pinit(). Previously pmap_pinit0() would call pmap_pinit(), but that would create 2 KTR events. While here, use pmap_t instead of "struct pmap *". 4. fix pmap_kenter() to use vm_paddr_t as the type for the physical. 5. various white-space adjustments for consistency. 6. use C99 and KNF for function definitions where appropriate. 7. slightly re-order prototypes and defines in <machine/pmap.h> No functional change (other than the creation of KTR_PMAP events).
* Fix and improve exception tracing:marcel2014-03-1810-81/+436
| | | | | | | | | | | | | | | | 1. Name the kernel option XTRACE instead of EXCEPTION_TRACING 2. Put support functions in ia64/ia64/xtrace.c 3. Make it work with SMP by giving each CPU its own buffer 4. Save 16 key registers in the buffer for every exception 5. In ia64_handle_intr() and trap() transfer the trace record to the KTR trace buffer using CTRx() and with some basic information for now 6. Use a tunable to anble tracing and stop tracing as soon as we enter the debugger Room for improvements: 1. Transferring exception-relevant information to KTR 2. Add a sysctl to enable/disable tracing
* In kernel config files, it is supposed to be 'options<space><tab>' notimp2014-03-181-2/+2
| | | | | 'options<tab><tab>', per long standing (but recently not so strictly enforced) convention.
* In intr_event_handle() we already save and set td_intr_frame, somarcel2014-03-171-0/+4
| | | | | | don't do it also in ia64_handle_intr(). With ia64_handle_intr() not saving and setting td_intr_frame, make sure to do it for timer interrupts in ia64_ih_hardclock().
* Move the implementation of kdb_cpu_trap() from <machine/kdb.h> tomarcel2014-03-162-10/+15
| | | | | machdep.c. This makes it easier to add conditional code based on options.
* Don't use the ITC as the faulting address for external interrupts.marcel2014-03-162-3/+3
| | | | | We only use it for tracing and the KTR infrastructure will use ITC for the time-stamp.
* In intr_event_handle() we already save and set td_intr_frame, somarcel2014-03-162-7/+6
| | | | | | don't do it also in ia64_handle_intr(). With ia64_handle_intr() not saving and setting td_intr_frame, make sure to do it for clock interrupts in ia64_ih_clock().
* Delete stray clause 3 (Advertising clause) and renumber while i'mimp2014-03-111-1/+1
| | | | | | here. Approved by: alc@
* When reading physical memory, make sure to access it using the rightmarcel2014-03-041-51/+58
| | | | | | | | memory attributes. The same applies to the mmap(2) interface. Not doing so results in machine checks. We find the memory attributes in the EFI memory map, as queried by mem_phys2virt().
* In pmap_set_pte(), make sure to enforce ordering by inserting a memorymarcel2014-01-201-2/+4
| | | | | | | | | | | | | | | fence. Under system load, the CPU has been found to change the order by which the stores are made visible. When the tag is made visible before the other TLB values, other CPUs may use the invalid TLB values and do bad things. While here (i.e. not a fix) don't return errors from pmap_remove_vhpt() to callers of pmap_remove_pte(). Those callers don't check the return value and as such don't do what is needed to keep a consistent state. More importantly, pmap_remove_vhpt() can't really have an error without it indicating something unintended. Using KASSERT is therefore better. PR: 182999, 183227
* Enable vt. This brings VGA-based console and terminal support tomarcel2014-01-191-1/+4
| | | | | | | | | ia64 for the very first time. Only 9 years in the making... Note that the vt/vga driver does not actually make sure there's VGA hardware at the standard/legacy VGA I/O port and memory I/O addresses. This can cause machine checks if the H/W does not have a VGA controller.
* In the nested TLB fault handler, for a direct-mapped address, makemarcel2014-01-151-1/+1
| | | | | | | | | | | | | | | sure to clear the lower 12 bits. We're adding the translation attributes to the physical address and non-zero bits in the first 12 bits would give us something unexpected, including invalid bit values. Those trigger nested general protection faults. We do not have to clear the region bits, because they are ignored anyway, so we can replace an existing dep instruction with the one we need. This fixes GP faults for the swapper thread, as it's the only thread that has a direct-mapped stack. Since the bug is in the nested TLB fault handler, the frequency of hitting the GP is in the order of hours/days under load.
* Implement atomic_swap_<type>.marcel2014-01-011-0/+28
| | | | | | | The operation was documented and implemented partially (both from a type and architecture perspective) on 2013-08-21 and got used in ZFS with revision 260150 (zfeature.c) and since ZFS is supported on ia64, the lack of having atomic_swap became problem.
* Add a virt_foreach() that does the same as what phys_foreach() does andmarcel2013-12-281-8/+94
| | | | | | | | | | | change virt_size(), virt_dumphdrs() and virt_dumpdata() into its callback functions. In virt_foreach() we iterate over all the virtual memory regions that we want in the minidump. For now, just start with the PBVM (= kernel text and data plus preloaded modules). The core file this produces can already be used to work out the libkvm changes that need to be made to support it. In parallel, we can flesh out the in-kernel bits to dump more of what we need in a minidump without changing the core file structure.
* Add the scaffolding for minidumps. They're just like physical dumps,marcel2013-12-271-21/+65
| | | | | | except the chunks aren't physical memory regions but virtual memory regions. In both cases, the core file is an ELF file and flags in the header allow libkvm to distinguish one from the other.
* Allow pmap_remove_pages() to be called for physical maps notmarcel2013-12-121-6/+4
| | | | | | associated with the current thread. Obtained from: alc@
* Make process descriptors standard part of the kernel. rwhod(8) alreadypjd2013-11-301-1/+0
| | | | | | | | requires process descriptors to work and having PROCDESC in GENERIC seems not enough, especially that we hope to have more and more consumers in the base. MFC after: 3 days
* Don't enable interrupts before we call sched_throw(). Interruptsmarcel2013-11-101-2/+0
| | | | are expected to be disabled by virtue of md_spinlock_count=1.
* As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In otheralc2013-11-081-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | words, every architecture is now auto-sizing the kmem arena. This revision changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes mandatory and the definition of VM_KMEM_SIZE becomes optional. Replace or eliminate all existing definitions of VM_KMEM_SIZE. With auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling for VM_KMEM_SIZE_MIN on most architectures. Use VM_KMEM_SIZE_MIN for clarity. Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to that of setting the tunable vm.kmem_size. Whereas the macros VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size have been distinct. In particular, whereas VM_KMEM_SIZE was overridden by VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size was not. Remedy this inconsistency. Now, VM_KMEM_SIZE can be used to set the size of the kmem arena at compile-time without that value being overridden by auto-sizing. Update the nearby comments to reflect the kmem submap being replaced by the kmem arena. Stop duplicating the auto-sizing formula in every machine- dependent vmparam.h and place it in kmeminit() where auto-sizing takes place. Reviewed by: kib (an earlier version) Sponsored by: EMC / Isilon Storage Division
* Use LOG2_ID_PAGE_SIZE again for the identity mapping in regions 6 & 7.marcel2013-11-013-4/+9
| | | | | | Make the default translation size the same as the PBVM page size to avoid inserting overlapping translations in the TC. That generally is very bad.
* The PAL_PTCE_INFO function returns the counts and strides of themarcel2013-11-011-10/+10
| | | | | | | | | | | | | | outer and inner loop as 32-bit integers mux'd in 64-bit return values. Change our data types for the count and stride to match and simplify/adjust accordingly. Note that with this change the defaults of the ptc.e parameters have changed. Since all hardware is supposed to support the PAL call, there should be no impact. Even ski is unaffected, because the TC is re-initialized without considering the virtual address. So, as long as we call ptc.e at least once, we're good. That's what the new defaults do. Most processor implementations need but a single ptc.e to purge the entire TC anyway...
* Purge the translation cache of APs before we unleash them. To thatmarcel2013-10-313-18/+6
| | | | | | | | end, make pmap_invalidate_all() global and have it only handle the local CPU -- i.e. no rendezvous. We do not use pmap_invalidate_all other than during initialization. Note that the BSP already purges its TC -- it was missing for APs only. Nonetheless, this so far seems to eliminate random problems.
* Respect the kern.smp.disabled tunable. When we're scanning the MADT inmarcel2013-10-311-0/+5
| | | | | | | | ia64_probe_sapics(), we also create PCPU structures for any Local SAPICs we encounter. When SMP is disabled, this leaves us with partially setup PCPU structures, which typically results in panics when we're iterating over CPUs. When SMP is disabled, we now prevent the creation of the PCPU structures.
* Add bus_dmamap_load_ma() function to load map with the array ofkib2013-10-271-0/+11
| | | | | | | | | | vm_pages. Provide trivial implementation which forwards the load to _bus_dmamap_load_phys() page by page. Right now all architectures use bus_dmamap_load_ma_triv(). Tested by: pho (as part of the functional patch) Sponsored by: The FreeBSD Foundation MFC after: 1 month
* The pmap function pmap_clear_reference() is no longer used. Remove it.alc2013-09-201-31/+0
| | | | | | | | | pmap_clear_reference() has had exactly one caller in the kernel for several years, more precisely, since FreeBSD 8. Now, that call no longer exists. Approved by: re (kib) Sponsored by: EMC / Isilon Storage Division
* Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping usejhb2013-09-091-2/+2
| | | | | | | | | | | | | an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib)
* On those machines, where sf_bufs do not represent any real object, makeglebius2013-09-062-22/+12
| | | | | | | | | sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely empty functions. Reviewed by: alc, kib, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix
* Significantly reduce the cost, i.e., run time, of calls to madvise(...,alc2013-08-291-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MADV_DONTNEED) and madvise(..., MADV_FREE). Specifically, introduce a new pmap function, pmap_advise(), that operates on a range of virtual addresses within the specified pmap, allowing for a more efficient implementation of MADV_DONTNEED and MADV_FREE. Previously, the implementation of MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as pmap_clear_reference(). Intuitively, the problem with this implementation is that the pmap-level locks are acquired and released and the page table traversed repeatedly, once for each resident page in the range that was specified to madvise(2). A more subtle flaw with the previous implementation is that pmap_clear_reference() would clear the reference bit on all mappings to the specified page, not just the mapping in the range specified to madvise(2). Since our malloc(3) makes heavy use of madvise(2), this change can have a measureable impact. For example, the system time for completing a parallel "buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%. Note: This change only contains pmap_advise() implementations for a subset of our supported architectures. I will commit implementations for the remaining architectures after further testing. For now, a stub function is sufficient because of the advisory nature of pmap_advise(). Discussed with: jeff, jhb, kib Tested by: pho (i386), marcel (ia64) Sponsored by: EMC / Isilon Storage Division
* Revert r254501. Instead, reuse the type stability of the struct pmapkib2013-08-221-2/+2
| | | | | | | | | | | which is the part of struct vmspace, allocated from UMA_ZONE_NOFREE zone. Initialize the pmap lock in the vmspace zone init function, and remove pmap lock initialization and destruction from pmap_pinit() and pmap_release(). Suggested and reviewed by: alc (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation
* Add process descriptors support to the GENERIC kernel. It is already beingpjd2013-08-181-2/+3
| | | | | | | | | used by the tools in base systems and with sandboxing more and more tools the usage should only increase. Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org> Sponsored by: Google Summer of Code 2013 MFC after: 1 month
* Tidy up global locks for ACPICA. There is no functional change.jkim2013-08-131-3/+3
|
* The soft and hard busy mechanism rely on the vm object lock to work.attilio2013-08-091-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the 2 concept into a real, minimal, sxlock where the shared acquisition represent the soft busy and the exclusive acquisition represent the hard busy. The old VPO_WANTED mechanism becames the hard-path for this new lock and it becomes per-page rather than per-object. The vm_object lock becames an interlock for this functionality: it can be held in both read or write mode. However, if the vm_object lock is held in read mode while acquiring or releasing the busy state, the thread owner cannot make any assumption on the busy state unless it is also busying it. Also: - Add a new flag to directly shared busy pages while vm_page_alloc and vm_page_grab are being executed. This will be very helpful once these functions happen under a read object lock. - Move the swapping sleep into its own per-object flag The KPI is heavilly changed this is why the version is bumped. It is very likely that some VM ports users will need to change their own code. Sponsored by: EMC / Isilon storage division Discussed with: alc Reviewed by: jeff, kib Tested by: gavin, bapt (older version) Tested by: pho, scottl
* follow up to r254051avg2013-08-091-2/+1
| | | | | | | | - update powerpc/GENERIC64 as well, suggested by mdf - update comments so that they make sense after the change, suggested by jhb X-MFC after: never (change specific to head)
* enable KDB_TRACE in GENERICsavg2013-08-071-1/+1
| | | | | | | KDB_TRACE is not an alternative to DDB/etc, they are complementary. So I do not see any reason to not enable KDB_TRACE by default. X-MFC after: never (change specific to head)
* Replace kernel virtual address space allocation with vmem. This providesjeff2013-08-071-1/+2
| | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud