summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* Remove MAC kernel config files and add "options MAC" to GENERIC, with therwatson2009-06-022-28/+1
| | | | | | | | | | | | | | | goal of shipping 8.0 with MAC support in the default kernel. No policies will be compiled in or enabled by default, but it will now be possible to load them at boot or runtime without a kernel recompile. While the framework is not believed to impose measurable overhead when no policies are loaded (a result of optimization over the past few months in HEAD), we'll continue to benchmark and optimize as the release approaches. Please keep an eye out for performance or functionality regressions that could be a result of this change. Approved by: re (kensmith) Obtained from: TrustedBSD Project
* Place hostnames and similar information fully under the prison system.jamie2009-05-291-1/+0
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* Last minute TTY API change: remove mutex argument from tty_alloc().ed2009-05-291-1/+1
| | | | | | | | | | I don't want people to override the mutex when allocating a TTY. It has to be there, to keep drivers like syscons happy. So I'm creating a tty_alloc_mutex() which can be used in those cases. tty_alloc_mutex() should eventually be removed. The advantage of this approach, is that we can just remove a function, without breaking the regular API in the future.
* ia64: Move MCA information retrieval to a per-CPU kthreadrink2009-05-271-8/+26
| | | | Once AP's are launched, their MCA state information is stored and later obtainable using a sysctl. Since the size of the MCA state information is unknown, it will be malloc'ed as needed. However, when 'ia64_ap_startup' runs, it's not yet safe to call malloc and this may cause 'panic: blockable sleep lock (sleep mutex) 8192 @ /usr/src/sys/vm/uma_core.c'. This commit avoids this issue by scheduling a separate kthread to obtain this information, which immediately terminates afterwards.
* Rename ia64_invalidate_icache() to ia64_sync_icache(). We'remarcel2009-05-184-9/+12
| | | | not invalidating anything.
* Add cpu_flush_dcache() for use after non-DMA based I/O so that amarcel2009-05-181-0/+15
| | | | | | | | | | | | | | | | | | | | | possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet. Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
* - Use "device\t" and "options \t" for consistency.kuriyama2009-05-102-8/+8
|
* Remove isa_irq_pending(). It's not used.marcel2009-04-241-11/+0
|
* Don't conditionally define CACHE_LINE_SHIFT, as we anticipate sizingrwatson2009-04-201-3/+1
| | | | | | | | | | | | a fair number of static data structures, making this an unlikely option to try to change without also changing source code. [1] Change default cache line size on ia64, sparc64, and sun4v to 128 bytes, as this was what rtld-elf was already using on those platforms. [2] Suggested by: bde [1], jhb [2] MFC after: 2 weeks
* Add description and cautionary note regarding CACHE_LINE_SIZE.rwatson2009-04-191-0/+4
| | | | | MFC after: 2 weeks Suggested by: alc
* For each architecture, define CACHE_LINE_SHIFT and a derivedrwatson2009-04-191-0/+5
| | | | | | | | | | | | | CACHE_LINE_SIZE constant. These constants are intended to over-estimate the cache line size, and be used at compile-time when a run-time tuning alternative isn't appropriate or available. Defaults for all architectures are 64 bytes, except powerpc where it is 128 bytes (used on G5 systems). MFC after: 2 weeks Discussed on: arch@
* Restore bus DMA bounce pages to an offset of 0 when they are released byjhb2009-04-171-3/+10
| | | | | | | | | a tag that has BUS_DMA_KEEP_PG_OFFSET set. Otherwise the page could be reused with a non-zero offset by a tag that doesn't have BUS_DMA_KEEP_PG_OFFSET leading to data corruption. Sleuthing by: avg Reviewed by: scottl
* The bus_dmamap_load_uio(9) shall use pmap of the thread recorded in thekib2009-04-131-1/+4
| | | | | | | | | | uio_td to extract pages from, instead of unconditionally use kernel pmap. Submitted by: Jason Harmening <jason.harmening gmail com> (amd64 version) PR: amd64/133592 Reviewed by: scottl (original patch), jhb MFC after: 2 weeks
* Fix KBI breakage by r190520 which affects older linux.ko binaries:dchagin2009-04-051-2/+2
| | | | | | | | | | | | | | 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days
* Add trivial implementation for the freebsd32_sysarch on ia64.kib2009-04-011-0/+50
| | | | | | Fix comapt32 and LINT build on ia64. Discussed with: jhb
* Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointerkib2009-03-171-4/+2
| | | | | | | | | | to the full path of the image that is being executed. Increase AT_COUNT. Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries. Reviewed by: kan
* Implement new way of branding ELF binaries by looking to adchagin2009-03-131-2/+4
| | | | | | | | | | | | ".note.ABI-tag" section. The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through. Move code which fetch osreldate for ELF binary to check_note() handler. PR: 118473 Approved by: kib (mentor)
* Change over the usb kernel options to the new stack (retaining existingthompsa2009-02-231-67/+14
| | | | naming). The old usb stack can be compiled in my prefixing the name with 'o'.
* Add uslcom to the build too.thompsa2009-02-151-0/+1
| | | | Reminded by: Michael Butler
* Switch over GENERIC kernels to USB2 by default.thompsa2009-02-151-15/+66
| | | | Tested by: make universe
* Mark the BSP as being awake. This supresses the messagemarcel2009-02-101-1/+2
| | | | that not all usable CPUs could be woken up...
* When bouncing pages, allow a new option to preserve the intra-pageimp2009-02-081-0/+7
| | | | | | | | | | | | | | | | offset. This is needed for the ehci hardware buffer rings that assume this behavior. This is an interim solution, and a more general one is being worked on. This solution doesn't break anything that doesn't ask for it directly. The mbuf and uio variants with this flag likely don't work and haven't been tested. Universe builds with these changes. I don't have a huge-memory machine to test these changes with, but will be happy to work with folks that do and hps if this changes turns out not to be sufficient. Submitted by: alfred@ from Hans Peter Selasky's original
* Don't forget to create opt_agp.h on ia64, which also uses agp(4).wkoszek2009-02-071-0/+3
|
* Tweak the ia64 machine check handling code to not register new sysctl nodesjhb2009-02-042-26/+45
| | | | | | | | | while holding a spin mutex. Instead, it now shoves the machine check records onto a queue that is later drained to add sysctl nodes for each record. While a routine to drain the queue is present, it is not currently called. Reviewed by: marcel
* Correct an error in revision 1.170 of this file. When get_pv_entry() isalc2009-01-181-1/+15
| | | | | forced to reclaim pv entries, the one pv entry that it returns should not be freed.
* AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.imp2008-12-171-12/+0
| | | | Reviewed by: peter
* Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important.ed2008-12-021-1/+1
| | | | | | | Sgtty is a programming interface that has been replaced by termios over the years. In June we already removed <sgtty.h>, which exposes the ioctl()'s that are implemented by this interface. The importance of this flag is overrated right now.
* Add sv_flags field to struct sysentvec with intention to provide descriptionkib2008-11-221-1/+2
| | | | | | | | of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features. Discussed with: dchagin, imp, jhb, peter
* Define mb(), rmb() and wmb() for real.marcel2008-11-221-3/+3
|
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,kmacy2008-11-221-0/+4
| | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-1/+1
| | | | MFC after: 3 months
* Atomically increment the number of awoken APs as all APs willmarcel2008-10-191-1/+1
| | | | | | be unleashed here. Pointed out by: christian.kandeler@hob.de
* Collect N identical (or near identical) mkdumpheader() implementations intopeter2008-10-011-22/+1
| | | | one, as threatened in the comment. Textdump magic can be passed in.
* Remove ipi_all() and ipi_self() as the former hasn't been used atmarius2008-09-284-47/+5
| | | | | | | | | | | all to date and the latter also is only used in ia64 and powerpc code which no longer serves a real purpose after bring-up and just can be removed as well. Note that architectures like sun4u also provide no means of implementing IPI'ing a CPU itself natively in the first place. Suggested by: jhb Reviewed by: arch, grehan, jhb
* Replace all calls to minor() with dev2unit().ed2008-09-271-3/+3
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Change the static struct sysentvec and struct Elf_Brandinfo initializerskib2008-09-241-42/+43
| | | | | | | | | | | to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. No objection from: jhb MFC after: 1 month
* The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmpobrien2008-09-232-2/+2
| | | | | | | | | | | and bcmp are not the same thing. 'man bcmp' states that the return is "non-zero" if the two byte strings are not identical. Where as, 'man memcmp' states that the return is the "difference between the first two differing bytes (treated as unsigned char values" if the two byte strings are not identical. So provide a proper memcmp(9), but it is a C implementation not a tuned assembly implementation. Therefore bcmp(9) should be preferred over memcmp(9).
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.ed2008-08-203-101/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
* Export 'struct pcpu' to userland w/o requiring _KERNEL. A few portsjhb2008-08-191-2/+2
| | | | | | | already define _KERNEL to get to this and I'm about to add hooks to libkvm to access per-CPU data. MFC after: 1 week
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* Update bus_dmamem_alloc()'s first call to malloc() such that M_WAITOK isalc2008-07-151-3/+3
| | | | | | specified when appropriate. Reviewed by: scottl
* Add HWPMC_HOOKS to GENERIC kernels, this makes hwpmc.ko work outdelphij2008-07-071-0/+1
| | | | of the box.
* Add inline function ia64_fc_i() to abstract inline assembly.marcel2008-07-072-1/+10
| | | | | | Use the new inline function in ia64_invalidate_icache(). While there, add proper synchronization so that we know the fc.i instructions have taken effect when we return.
* Remove the unused major/minor numbers from iodev and memdev.ed2008-06-251-1/+0
| | | | | | | | | Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem. Approved by: philip (mentor)
* Work-around a compiler optimization bug, that broke libthr. Massivemarcel2008-05-281-1/+1
| | | | | | | | | | | | | | | | inlining resulted in constant propagation to the extend that cmpval was known to the compiler to be URWLOCK_WRITE_OWNER (= 0x80000000U). Unfortunately, instead of zero-extending the unsigned constant, it was sign-extended. As such, the cmpxchg instruction was comparing 0x0000000080000000LU to 0xffffffff80000000LU and obviously didn't perform the exchange. But, since the value returned by cmpxhg equalled cmpval (when zero- extended), the _thr_rtld_lock_release() function thought the exchange did happen and as such returned as if having released the lock. This was not the case. Subsequent locking requests found rw_state non-zero and the thread in question entered the kernel and block indefinitely. The work-around is to zero-extend by casting to uint64_t.
* Account for IPI_PREEMPT. We don't want to call sched_preempt() withmarcel2008-05-231-4/+10
| | | | interrupts disabled or with td_intr_nesting_level non-zero.
* The VM system no longer uses setPQL2(). Remove it and its helpers.alc2008-05-231-8/+0
|
* Create the bucket mutexes with MTX_NOWITNESS. There's now amarcel2008-05-221-1/+1
| | | | | | | hard limit of 512 pending mutexes in the witness code and we can easily have 1 million bucket mutexes initialized before witness is up and running. Bumping the limit from 512 to 1M is not really an option here...
* We can call ia64_flush_dirty() when the corresponding process ismarcel2008-05-211-3/+6
| | | | | locked or not. As such, use PROC_LOCKED() to determine which case it is and lock the process when not.
* Retire pmap_addr_hint(). It is no longer used.alc2008-05-181-7/+0
|
OpenPOWER on IntegriCloud