summaryrefslogtreecommitdiffstats
path: root/sys/ia64
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add a stub for pmap_align_superpage() on machines that don't (yet)alc2008-05-091-0/+10
| | | | implement pmap-level support for superpages.
* Unbreak previous commit. While here, refactor the code a bit.marcel2008-04-251-13/+10
|
* - Add an integer argument to idle to indicate how likely we are to wakejeff2008-04-251-1/+8
| | | | | | | | | | | | | | | from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted. Sponsored by: Nokia
* Now that all platforms use genclock, shuffle things around slightlyphk2008-04-222-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for better structure. Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait. In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only. Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h> <sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof. Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references. Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere. Remove a lot of unnecessary <sys/clock.h> includes. Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
* Make genclock standard on all platforms.phk2008-04-211-1/+0
| | | | Thanks to: grehan & marcel for platform support on ia64 and ppc.
* Sanitize the malloc types: M_PMAP is not used in pmap.c, so don'tmarcel2008-04-192-5/+3
| | | | | define it there. Don't use M_PMAP in mp_machdep.c; define M_SMP instead.
* Remove cruft we got from Alpha, which was probably inheritedmarcel2008-04-181-31/+6
| | | | from NetBSD. I.e. make it more like a FreeBSD header.
* Use genclock for RTC handling. This eliminates the MD versions formarcel2008-04-153-135/+51
| | | | | | | | | inittodr() and resettodr(). Have nexus double as the clock device, because it's the firmware that provides RTC services. We could create a special (pseudo-) device for it, but that wasn't superior enough to actually do it. Maybe later... Requested by: phk
* Support and switch to the ULE scheduler:marcel2008-04-154-3/+18
| | | | | | | | o Implement IPI_PREEMPT, o Set td_lock for the thread being switched out, o For ULE & SMP, loop while td_lock points to blocked_lock for the thread being switched in, o Enable ULE by default in GENERIC and SKI,
* Revision 1.9 changes the delivery mode from the magic constant 0marcel2008-04-141-1/+1
| | | | | | | | | | | | (i.e. fixed delivery) to SAPIC_DELMODE_LOWPRI. While the commit log doesn't mention the change in behaviour, it is believed to be deliberate. In the last 5.5 years this hasn't been a problem. Nor do I think did it make any difference, but who knows. However, I do know that it break SMP support for Montecito-based machines. Switch back to fixed-CPU delivery so that SMP works again. This gives me some time to look more closely at the problem, as well as make sure the I-cache validation as it's implemented currently is sufficient in SMP configurations...
* - Pass the irq and not the vector to intr_event_create().jeff2008-04-111-1/+1
| | | | Reviewed by: marcel
* - Add the interrupt vector number to intr_event_create so MI code canjeff2008-04-111-1/+1
| | | | | | | | | | | | lookup hard interrupt events by number. Ignore the irq# for soft intrs. - Add support to cpuset for binding hardware interrupts. This has the side effect of binding any ithread associated with the hard interrupt. As per restrictions imposed by MD code we can only bind interrupts to a single cpu presently. Interrupts can be 'unbound' by binding them to all cpus. Reviewed by: jhb Sponsored by: Nokia
* Unbreak after removal of SI_SUB_MOUNT_ROOT.marcel2008-04-091-12/+1
|
* Add a MI intr_event_handle() routine for the non-INTR_FILTER case. Thisjhb2008-04-051-46/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | allows all the INTR_FILTER #ifdef's to be removed from the MD interrupt code. - Rename the intr_event 'eoi', 'disable', and 'enable' hooks to 'post_filter', 'pre_ithread', and 'post_ithread' to be less x86-centric. Also, add a comment describe what the MI code expects them to do. - On amd64, i386, and powerpc this is effectively a NOP. - On arm, don't bother masking the interrupt unless the ithread is scheduled in the non-INTR_FILTER case to match what INTR_FILTER did. Also, don't bother unmasking the interrupt in the post_filter case if we never masked it. The INTR_FILTER case had been doing this by having arm_unmask_irq for the post_filter (formerly 'eoi') hook. - On ia64, stray interrupts are now masked for the non-INTR_FILTER case. They were already masked in the INTR_FILTER case. - On sparc64, use the a NULL pre_ithread hook and use intr_enable_eoi() for both the 'post_filter' and 'post_ithread' hooks to match what the non-INTR_FILTER code did. - On sun4v, retire the ithread wrapper hack by using an appropriate 'post_ithread' hook instead (it's what 'post_ithread'/'enable' was designed to do even in 5.x). Glanced at by: piso Reviewed by: marius Requested by: marius [1], [5] Tested on: amd64, i386, arm, sparc64
* Better implement I-cache invalidation. The previous implementationmarcel2008-03-304-89/+60
| | | | | | | | | was a kluge. This implementation matches the behaviour on powerpc and sparc64. While on the subject, make sure to invalidate the I-cache after loading a kernel module. MFC after: 2 weeks
OpenPOWER on IntegriCloud