summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* * support ich5cg2003-07-061-9/+14
| | | | | | | PR: kern/53242 Submitted by: Shin-ichi Yoshimoto <yosimoto@waishi.jp> (partly) Tested by: Dominic Marks <dom@cus.org.uk> (version in PR) MFC after: 1 week
* Convert the dc(4) driver to the busdma API. This is a necessary stepmux2003-07-064-234/+608
| | | | | | | | | | | | | | | to have this driver working on sparc64. It still needs to be made endian-clean before it can work there. Special thanks to dragonk@evilcode.net for sending me a dc(4) card so that I was able to do this work. Many cheers to all the people that tested this change, thanks to them, this change shouldn't break anything :-). Tested by: marcel (i386 and ia64), ru (i386), wilko (alpha), mbr (i386), wpaul (i386) and Will Saxon <WillS@housing.ufl.edu> (i386)
* MFi386alc2003-07-062-3/+3
| | | | | Updates to cnt.v_wire_count, the global count of wired pages, should be performed using atomic ops.
* Woops - don't forget to declare locals needed for that last commit.bsd2003-07-061-0/+2
|
* Don't unconditionally reset the hardware debug registers in cpu_exit(),bsd2003-07-061-4/+6
| | | | | | | | | | | reset them only if they were previously in use. Unconditionally resetting the registers wipes them out frequently, which interferes with their use for kernel debugging. While I'm here, be less verbose in the associated comment of a neighboring function. Noticed by: bde
* Fix a bug that could cause dc(4) to m_freem() an already freedmux2003-07-062-2/+4
| | | | | | mbuf or something that isn't an mbuf. MFC after: 3 days
* Various style(9) and readability fixes.mux2003-07-062-28/+44
|
* Testing VLANs with the new 8139C+ chip (which does hardware tagwpaul2003-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | insertion and extraction) has revealed two bugs: - In vlan_start(), we're supposed to check the underlying interface to see if it has the IFCAP_VLAN_HWTAGGING cabability set and, if so, set things up for the VLAN_OUTPUT_TAG() routine. However the code checks ifp->if_capabilities, which is the vlan pseudo-interface's capabilities when it should be checking p->if_capabilities, which relates to the underlying physical interface. Change ifp->if_capabilities to p->if_capabilities so this works. - In vlan_input(), we have to extract the 16-bit tag value from the received frame and use it to figure out which vlan interface gets the frame. The code that we use to track down the desired vlan pseudo-interface is: for (ifv = LIST_FIRST(&ifv_list); ifv != NULL; ifv = LIST_NEXT(ifv, ifv_list)) if (ifp == ifv->ifv_p && tag == ifv->ifv_tag) break; The problem is that 'tag' is not computed consistently. In the case where the interface supports hardware VLAN tag extraction and calls VLAN_INPUT_TAG(), we do this: tag = *(u_int*)(mtag+1); But in the software emulation case, we do this tag = EVL_VLANOFTAG(ntohs(evl->evl_tag)); The problem here is the EVL_VLANOFTAG() macro is only ever applied in this one case. It's never applied to ifv->ifv_tag or anwhere else. We must be consistent: either it's applied everywhere or nowhere. To see how this can be a problem, do something like ifconfig vlan0 vlan 12345 vlandev foo0 and observe the results. I'm not quite sure what the right thing is to do here. Neither the vlan(4) nor ifconfig(8) man pages suggest which way to go. For now, I've removed this use of EVL_VLANOFTAG() so that the tag will match correctly in all cases. I will not get upset if somebody makes a compelling argument for using EVL_VLANOFTAG() everywhere instead, as long as the use is consistent.
* * add support for amd-768 audio, as used on many dual athlon boards. onlycg2003-07-061-19/+23
| | | | | | | | | | | tested for playback. * modify device name strings for ich chips to better conform with their common names. * remove superflous 'AC97 controller' from nforce device names. MFC after: 1 week
* Don't call malloc() and free() while in the debugger and unwindingmarcel2003-07-053-57/+124
| | | | | | | | | | | | | | | | | | | | | to get a stacktrace. This does not work even with M_NOWAIT when we have WITNESS and is generally a bad idea (pointed out by bde@). We allocate an 8K heap for use by the unwinder when ddb is active. A stack trace roughly takes up half of that in any case, so we have some room for complex unwind situations. We don't want to waste too much space though. Due to the nature of unwinding, we don't worry too much about fragmentation or performance of unwinding while in the debugger. For now we have our own heap management, but we may be able to leverage from existing code at some later time. While here: o Make sure we actually free the unwind environment after unwinding. This fixes a memory leak. o Replace Doug's license with mine in unwind.c and unwind.h. Both files don't have much, if any, of Doug's code left since the EPC syscall overhaul and the import of the unwinder. o Remove dead code. o Replace M_NOWAIT with M_WAITOK for all remaining malloc() calls.
* Lock a vm object when freeing a page from it.alc2003-07-051-0/+7
|
* Make the conditional, which decides what siglist to put a signal on,mtm2003-07-051-8/+5
| | | | | | more concise and improve the comment. Submitted by: bde
* add the mbr_enc file so that we can load the module on sparc64.jmg2003-07-051-1/+1
|
* Fix a signedness problem in zstty_cncheckc(): when no character is ready,tmm2003-07-051-1/+1
| | | | | | -1 should be returned, but it was assigned to an uint8_t (which is extended to an int to form the return value), causing 255 to be returned instead.
* Remove trailing whitespace.rwatson2003-07-054-6/+6
|
* I was so happy I found the semi-colon from hell that I didn'tmtm2003-07-041-1/+1
| | | | | | notice another typo in the same line. This typo makes libthr unuseable, but it's effects where counter-balanced by the extra semicolon, which made libthr remarkably useable for the past several months.
* remove \n at end of panic strings. They are added by the call to panic.jmg2003-07-044-26/+26
| | | | | | This brings us more in line with Net/OpenBSD Obtained from: Net/OpenBSD
* Add vm object locking to pmap_prefault().alc2003-07-041-7/+10
|
* Implement the 'ipsec' option to match packets coming out of an ipsec tunnel.luigi2003-07-041-0/+16
| | | | | | | | | Should work with both regular and fast ipsec (mutually exclusive). See manpage for more details. Submitted by: Ari Suutari (ari.suutari@syncrontech.com) Revised by: sam MFC after: 1 week
* Correct some comments, add opcode O_IPSEC to match packetsluigi2003-07-041-12/+17
| | | | coming out of an ipsec tunnel.
* - Parse the cpu topology map in sched_setup().jeff2003-07-041-13/+53
| | | | | | | | - Associate logical CPUs on the same physical core with the same kseq. - Adjust code that assumed there would only be one running thread in any kseq. - Wrap the HTT code with a ULE_HTT_EXPERIMENTAL ifdef. This is a start towards HyperThreading support but it isn't quite there yet.
* Add compatibility for FreeBSD-4.simokawa2003-07-044-5/+21
|
* Delete a superfluous semi-colon.harti2003-07-041-1/+1
| | | | Pointed out by: nick@garage.freebsd.pl
* Remove unnecessary cast.phk2003-07-041-1/+1
|
* Use the f_vnode field to tell which file descriptors have a vnode.phk2003-07-043-19/+15
|
* We just cached the inode pointer, no need to call VTOI() again.phk2003-07-041-2/+2
|
* - Ensure that the busdma API won't do deferred loads by using themux2003-07-041-9/+9
| | | | | | BUS_DMA_NOWAIT flag, since the code can't handle this. - Use NULL, NULL for the lockfunc and lockfuncarg parameters of bus_dma_tag_create() since deferred loads can't happen now.
* It's unfair how one extraneous semi-colon can cause so much grief.mtm2003-07-041-1/+1
|
* The em(4) driver has been converted to busdma and doesn't usemux2003-07-041-5/+0
| | | | | vtophys() anymore, so remove the alpha hack which defines vtophys() to alpha_XXX_dmamap().
* style(9)mtm2003-07-041-8/+2
| | | | | | | o Remove double-spacing, and while I'm here add a couple of braces as well. Requested by: bde
* In setpgrp(), don't assume a pgrp won't exist if the provided pgid is the samecognet2003-07-041-12/+13
| | | | | | | as the target process' pid, it may exist if the process forked before leaving the pgrp. Thix fixes a panic that happens when calling setpgid to make a process re-enter the pgrp with the same pgid as its pid if the pgrp still exists.
* WARNING: white space diffjmg2003-07-0434-311/+309
| | | | | | This code reduces the number of trailing white space to be more in line w/ NetBSD. I don't regenerate usbdevs, saving that for when it really changes.
* kse_thr_interrupt should target the thread, specifically.mtm2003-07-042-2/+2
| | | | Requested by: davidxu
* Allow the caller to get an erro direclty if we sent the packet immediatly.julian2003-07-031-1/+1
| | | | | Submitted by: Ian Dowse <iedowse@maths.tcd.ie> MFC after: 1 day
* Due to extreme bogusness in the pci bus layer, these drivers wereimp2003-07-0314-32/+40
| | | | | | | | | forced to do slightly bogus power state manipulation. However, this is one of those features that is preventing further progress, so mark them as BURN_BIRDGES like I did for the drivers in sys/dev/... This, like the other change, are a no-op unless you have BURN_BRIDGES in your kernel.
* Background: pmap_object_init_pt() premaps the pages of a object inalc2003-07-0310-390/+131
| | | | | | | | | | | | | | | | order to avoid the overhead of later page faults. In general, it implements two cases: one for vnode-backed objects and one for device-backed objects. Only the device-backed case is really machine-dependent, belonging in the pmap. This commit moves the vnode-backed case into the (relatively) new function vm_map_pmap_enter(). On amd64 and i386, this commit only amounts to code rearrangement. On alpha and ia64, the new machine independent (MI) implementation of the vnode case is smaller and more efficient than their pmap-based implementations. (The MI implementation takes advantage of the fact that objects in -CURRENT are ordered collections of pages.) On sparc64, pmap_object_init_pt() hadn't (yet) been implemented.
* Signals sent specifically to a particular thread mustmtm2003-07-035-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | be delivered to that thread, regardless of whether it has it masked or not. Previously, if the targeted thread had the signal masked, it would be put on the processes' siglist. If another thread has the signal umasked or unmasks it before the target, then the thread it was intended for would never receive it. This patch attempts to solve the problem by requiring callers of tdsignal() to say whether the signal is for the thread or for the process. If it is for the process, then normal processing occurs and any thread that has it unmasked can receive it. But if it is destined for a specific thread, it is put on that thread's pending list regardless of whether it is currently masked or not. The new behaviour still needs more work, though. If the signal is reposted for some reason it is always posted back to the thread that handled it because the information regarding the target of the signal has been lost by then. Reviewed by: jdp, jeff, bde (style)
* If bread() returns a zero-length buffer, as can happen after atrhodes2003-07-031-0/+4
| | | | | | | failed write, return an error instead of looping forever. PR: 37035 Submitted by: das
* Silly compile fixes from resource_disabled() commit.jhb2003-07-032-2/+1
| | | | | Reported by: tinderbox Pointy hat to: jhb
* All current uses of pci_set_powerstate are bogus, at least in theory.imp2003-07-036-12/+19
| | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds.
* Revert the previous commit, it snuck in by accident.scottl2003-07-031-10/+0
| | | | Submitted by: ru
* Bump __FreeBSD_version to reflect the busdma API change.scottl2003-07-031-1/+1
|
* - Add comments about the maintenance of the per-thread list of contestedjhb2003-07-022-8/+18
| | | | | | | | | | | | | locks held by each thread. - Fix a bug in the original BSD/OS code where a contested lock was not properly handed off from the old thread to the new thread when a contested lock with more than one blocked thread was transferred from one thread to another. - Don't use an atomic operation to write the MTX_CONTESTED value to mtx_lock in the aforementioned special case. The memory barriers and exclusion provided by sched_lock are sufficient. Spotted by: alc (2)
* - Use the new resource_disabled() helper function to see if devices arejhb2003-07-0223-72/+37
| | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names.
* Add a resource_disabled() helper function that returns true (non-zero) ifjhb2003-07-022-0/+15
| | | | | a specified resource has been disabled via a non-zero 'disabled' hint and false otherwise.
* Make the bus_dma_tag_create use NULL for the lock arguments. We areharti2003-07-021-5/+6
| | | | | | | | | | | | careful to call all map_load calls with BUS_DMA_NOWAIT because we really don't want some PDUs to wait while others go out - ATM guarantees the ordering of cells and also of PDUs (within one VC, that is). With BUS_DMA_NOWAIT bus_dmamap_load should never return EINPROGRESS. Make the tag used for transmission buffers one larger than the maximum AAL5 PDU (65535). This is needed, because all PDU sizes need to be round up to multiple of four for the card and PDUs that are just below the maximum size will be rounded up to 65536
* The .s files were repo-copied to .S files.ru2003-07-028-4687/+7
| | | | | Approved by: marcel Repocopied by: joe
* Revert non-style part of the recent two deltas that dealt withru2003-07-022-10/+2
| | | | | using as(1) to compile plain assembler source files; bsd.lib.mk has been fixed (in revision 1.147).
* sys/ia64/ia64/pal.s has been repocopied to pal.S.ru2003-07-021-1/+1
| | | | | Approved by: marcel Repocopied by: joe
* Allow VPI/VCI 0/0 to be opened. This will be used by the IDT77252 driverharti2003-07-021-9/+22
| | | | | | to provide a "receive all cells" mode that can be used for monitoring. Check only the relevant MTU size when NOTX or NORX flags are set.
OpenPOWER on IntegriCloud