aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Change memguard_fudge() so that it can handle km_max being zero. NotAlan Cox2010-12-141-2/+3
| | | | | | | | | | | every platform defines VM_KMEM_SIZE_MAX, and on those platforms km_max will be zero. Reviewed by: mdf Tested by: marius Notes: svn path=/head/; revision=216425
* Tighten up some of the comments describing turnstiles and sleepqueues.Kirk McKusick2010-12-132-9/+10
| | | | | | | | | No code changes. Reviewed by: John Baldwin Notes: svn path=/head/; revision=216421
* Adapt filesystem-independent NFSv4 ACL code (used by UFS, but not by ZFS)Edward Tomasz Napierala2010-12-131-63/+258
| | | | | | | | | | | | | | | to PSARC/2010/029. In short, the semantics is simplified - "weird stuff" no longer happens after chmod, entries don't get duplicated during inheritance, and trivial ACLs no longer contain three "DENY" entries, which is also more friendly to MS Windows. By default, UFS keeps using old semantics. To change it, set sysctl vfs.acl_nfs4_old_semantics to 0. I'll flip the switch when ZFSv28 hits the tree, to keep these two in sync - ZFS v28 uses PSARC semantics, and ZFS v15 uses the old one. Notes: svn path=/head/; revision=216413
* Updates for I2C devices on XLR engg boards.Jayachandran C.2010-12-133-34/+10
| | | | | | | | | | - ds1374u : use multi-byte write. - at24co2n, max6657: remove mutex, iicbus has the necessary locking. Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com) Notes: svn path=/head/; revision=216410
* fix mips build breakage introduced in r216375: atomic_store_int doesn't existsAndriy Gapon2010-12-131-3/+1
| | | | | | | | | | | | | | | | 1) 32-bit assignment are expected to always be atomic. 2) Release/acquire memory barrier semantics doesn't seem to be needed here. So a simple assignment can be used. Remove unused port_set_counter() while here, it also used to mis-use atomic_set_int(). Reported by: jhb Pointyhat to: avg MFC after: 3 weeks Notes: svn path=/head/; revision=216408
* Add options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matchingRobert Watson2010-12-131-0/+1
| | | | | | | | | | | its similar disabling of adaptive mutexes and rwlocks. The existing comment on why this is the case also applies to sx locks. MFC after: 3 days Discussed with: attilio Notes: svn path=/head/; revision=216405
* Bugfix: Do correct accounting using the MIB counters when anMichael Tuexen2010-12-121-0/+5
| | | | | | | | | association is aborted via sctp_abort_association(). MFC after: 3 days. Notes: svn path=/head/; revision=216397
* In fpudna()/npxdna(), mark FPU context initialized and optionallyKonstantin Belousov2010-12-122-2/+6
| | | | | | | | | | | | | | | mark user FPU context initialized, if current context is user context. It was reversed in r215865, by inadequate change of this code fragment to a call to fpuuserinited()/npxuserinited(). The issue is only relevant for in-kernel users of FPU. Reported by: Jan Henrik Sylvester <me janh de>, Mike Tancsa <mike sentex net> Tested by: Mike Tancsa MFC after: 3 days Notes: svn path=/head/; revision=216394
* Handle the special ruleset 0 in devfs_ruleset_use(). An attempt set theJaakko Heinonen2010-12-121-0/+5
| | | | | | | | | | | current ruleset to 0 with command "devfs ruleset 0" triggered a KASSERT in devfs_ruleset_create(). PR: kern/125030 Submitted by: Mateusz Guzik Notes: svn path=/head/; revision=216391
* I2C drivers for XLR/XLS processors.Jayachandran C.2010-12-129-263/+711
| | | | | | | | | | | | - Major update to xlr_i2c.c: do multi-byte ops correctly, remove unnecessary code, add mutex to protect bus operations, style(9) fixes. - Drivers for I2C devices on XLR/XLS engineering boards, ds1374u RTC, max6657 temparature sensor and at24co2n EEPROM. Submitted by: Sreekanth M. S. (kanthms at netlogicmicro com) Notes: svn path=/head/; revision=216390
* Reduce the Xen timecounter from 1GHz to 2^-9 GHz, thereby increasing theColin Percival2010-12-111-2/+3
| | | | | | | | | | | | | | | timecounter period from 2^32 ns (~4.3s) to 2^41 ns (~36m39s). Some time sharing systems can skip clock interrupts for a few seconds when under load (e.g., if we've recently used more than our fair share of CPU and someone else wants a burst of CPU) and we were losing time in quanta of 2^32 ns due to timecounter wrapping. Increasing the timecounter period up to 2^41 ns is definitely overkill, but we still have microsecond timecounter precision, and anyone using paravirtualized hardware when they need submicrosecond timing is crazy. Notes: svn path=/head/; revision=216385
* Add some isync()s related to the 64-bit MMU scratch page to avoid raceNathan Whitehorn2010-12-112-0/+4
| | | | | | | conditions on its invalidation. Notes: svn path=/head/; revision=216383
* Make the machdep.independent_wallclock sysctl do what it says on the box.Colin Percival2010-12-111-1/+2
| | | | Notes: svn path=/head/; revision=216382
* Remove redundant semicolon and empty like.Pawel Jakub Dawidek2010-12-111-2/+1
| | | | Notes: svn path=/head/; revision=216378
* acpi_fujitsu: update for P8010Andriy Gapon2010-12-111-1/+54
| | | | | | | | | PR: kern/121102 Submitted by: Anish Mistry <amistry@am-productions.biz> MFC after: 3 weeks Notes: svn path=/head/; revision=216376
* fix atomic_set_xxx misuse in rgeAndriy Gapon2010-12-111-2/+2
| | | | | | | | | | It seems that atomic_set_xxx and atomic_store_xxx were confused. Reviewed by: jhb (general issue) MFC after: 3 weeks Notes: svn path=/head/; revision=216375
* fix atomic_set_xxx misuse in drmAndriy Gapon2010-12-111-1/+1
| | | | | | | | | | It seems that atomic_set_xxx and atomic_store_xxx were confused. Reviewed by: jhb MFC after: 3 weeks Notes: svn path=/head/; revision=216374
* fix incorrect use of atomic_set_xxx in cxgbAndriy Gapon2010-12-111-1/+1
| | | | | | | | | | | | | There is no need to use an atomic operation at structure initialization time. Note that the file changed is not connected to the build at this time. Reviewed by: jhb (general issue) Approved by: np MFC after: 2 weeks Notes: svn path=/head/; revision=216373
* Fix race in devfs by using LIST_FIRST() instead ofHans Petter Selasky2010-12-111-2/+2
| | | | | | | | | | | | LIST_FOREACH_SAFE() when freeing the devfs private data entries. Reviewed by: kib MFC after: 3 days Approved by: thompsa (mentor) Notes: svn path=/head/; revision=216371
* Fix setting LUN numbers in the mps(4) driver.Kenneth D. Merry2010-12-111-3/+39
| | | | | | | | | | | | | Prior to this change, the addressing method wasn't getting set, and so the LUN field could be set incorrectly in some instances. This fix should allow for LUN numbers up to 16777215 (and return an error for anything larger, which wouldn't fit into the flat addressing model). Submitted by: scottl (in part) Notes: svn path=/head/; revision=216368
* Derive the XENHVM kernel from GENERIC, adding only the options requiredRobert Watson2010-12-101-138/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | to support PV drivers (such as xenpci), and non-adptive locking (along with a comment about why). This change eliminates the synchronisation problem between GENERIC and XENHVM, which had become severely rotted in HEAD, and in 8-STABLE included non-production kernel debugging features such as WITNESS. However, it comes at the cost of enabling devices and options that may not be present under Xen (such as random ethernet cards). For now, opt for a simpler kernel configuration file rather than using nooptions/ nodevice to enumerate and eliminate them. This leads to a somewhat larger XENHVM kernel. This is an MFC candidate for 8-STABLE before 8.2, in order to provide a production-worthy XENHVM kernel configuration for amd64. Discussed with: gibbs, cperciva Reported by: Piete Brooks <Piete.Brooks at cl.cam.ac.uk> Sponsored by: DARPA, AFRL MFC after: 3 days Notes: svn path=/head/; revision=216365
* Implement more of __ibsta: END and SRQI status bits (taken out of theJoerg Wunsch2010-12-101-0/+8
| | | | | | | | | uPD7210 IRQ status). MFC after: 1 week Notes: svn path=/head/; revision=216364
* Fix an event handling bug with the mps(4) driver.Kenneth D. Merry2010-12-102-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug manifested itself after repeated device arrivals and departures. The root of the problem was that the last entry in the reply array wasn't initialized/allocated. So every time we got around to that event, we had a bogus address. There were a couple more problems with the code that are also fixed: - The reply mechanism was being treated as sequential (indexed by sc->replycurindex) even though the spec says that the driver should use the ReplyFrameAddress field of the post queue descriptor to figure out where the reply is. There is no guarantee that the reply descriptors will be used in sequential order. - The second word of the reply post queue descriptor wasn't being checked in mps_intr_locked() to make sure that it wasn't 0xffffffff. So the driver could potentially come across a partially DMAed descriptor. - The number of replies allocated was one less than the actual size of the queue. Instead, it was the size of the number of replies that can be used at one time. (Which is one less than the size of the queue.) mps.c: When initializing the entries in the reply free queue, make sure we initialize the full number that we tell the chip we have (sc->fqdepth), not the number that can be used at any one time (sc->num_replies). When allocating replies, make sure we allocate the number of replies that we've told the chip exist, not just the number that can be used simultaneously. Use the ReplyFrameAddress field of the post queue descriptor to figure out which reply is being referenced. This is what the spec says to do, and the spec doesn't guarantee that the replies will be used in order. Put a check in to verify that the reply address passed back from the card is valid. (Panic if it isn't, we'll panic when we try to deference the reply pointer in any case.) In mps_intr_locked(), verify that the second word of the post queue descriptor is not 0xffffffff in addition to verifying that the unused flag is not set, so we can make sure we didn't get a partially DMAed descriptor. Remove references to sc->replycurindex, it isn't needed now. mpsvar.h: Remove replycurindex from the softc, it isn't needed now. Reviewed by: scottl Notes: svn path=/head/; revision=216363
* Remove unecessary and clearly wrong usage of atomic(9).Pyun YongHyeon2010-12-102-11/+9
| | | | | | | Reported by: avg, jhb, attilio Notes: svn path=/head/; revision=216362
* Fix a few issues related to the XPT_GDEV_ADVINFO CCB.Kenneth D. Merry2010-12-102-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | camcontrol.c: In buildbusdevlist(), don't attempt to get call getdevid() for an unconfigured device, even when the verbose flag is set. The cam_open_btl() call will almost certainly fail. Probe for the buffer size when issuing the XPT_GDEV_ADVINFO CCB. Probing for the buffer size first helps us avoid allocating the maximum buffer size when it really may not be necessary. This also helps avoid errors from cam_periph_mapmem() if we attempt to map more than MAXPHYS. cam_periph.c: In cam_periph_mapmem(), if the XPT_GDEV_ADVINFO CCB shows a bufsiz of 0, we don't have anything to map, so just return. Also, set the maximum mapping size to MAXPHYS instead of DFLTPHYS for XPT_GDEV_ADVINFO CCBs, since they don't actually go down to the hardware. scsi_pass.c: Don't bother mapping the buffer in XPT_GDEV_ADVINFO CCBs if bufsiz is 0. Notes: svn path=/head/; revision=216361
* On the Xserve G5 we find the LM75 instead of the DS1775. The coreAndreas Tobler2010-12-101-2/+3
| | | | | | | | | | | | | | | functionality is the same, a difference is that the DS1775 has a better precision than the LM75. But we do not use it in our setup. Make the LM75 work the same as the DS1775. Fix a typo in device_set_desc. Tested by: Paul Mather <paul at gromit dlib vt edu> Approved by: nwhitehorn (mentor) Notes: svn path=/head/; revision=216360
* Use SYS_RES_IOPORT instead of PCIM_CMD_PORTEN when calling pci_enable_io.Tijl Coosemans2010-12-101-1/+1
| | | | | | | Approved by: kib (mentor) Notes: svn path=/head/; revision=216358
* Fix __retval vs. retval confusion: retval is meant to store the (userland)Joerg Wunsch2010-12-101-1/+1
| | | | | | | | | | | | | | pointer where data is to be returned by ibask() (currently unimplemented), while __retval holds the value returned by the libgpib ibfoo() functions. The confusion resulted in the ibfoo() functions returning an uninitialized value except in situations where the GPIB activity has been terminated abnormally. MFC after: 3 days Notes: svn path=/head/; revision=216355
* Refactor fork1() to make it easier to follow. No functional changes.Edward Tomasz Napierala2010-12-101-191/+220
| | | | | | | | Reviewed by: kib (earlier version) Tested by: pho Notes: svn path=/head/; revision=216350
* Don't tie ct_debug to bootverbose. Provide a sysctl to turn it on or off.Bjoern A. Zeeb2010-12-091-1/+3
| | | | | | | | | Switch the default to always off. Reviewed by: kib Notes: svn path=/head/; revision=216340
* Remove AMD Family 0Fh, Model 6Bh, Stepping 2 from the list of P-stateJung-uk Kim2010-12-091-1/+1
| | | | | | | | invariant CPUs. I do not believe this model is P-state invariant any more. Maybe cpufreq(4) was broken at the time of commit. :-( Notes: svn path=/head/; revision=216337
* Fix a long standing (from the original 4.4BSD lite sources) race betweenMax Laier2010-12-092-1/+46
| | | | | | | | | | | | | | vmspace_fork and vm_map_wire that would lead to "vm_fault_copy_wired: page missing" panics. While faulting in pages for a map entry that is being wired down, mark the containing map as busy. In vmspace_fork wait until the map is unbusy, before we try to copy the entries. Reviewed by: kib MFC after: 5 days Sponsored by: Isilon Systems, Inc. Notes: svn path=/head/; revision=216335
* When r207410 eliminated the acquisition and release of the page queuesAlan Cox2010-12-091-61/+40
| | | | | | | | | | | | | | | | | | | lock from pmap_extract_and_hold(), it didn't take into account that pmap_pte_quick() sometimes requires the page queues lock to be held. This change reimplements pmap_extract_and_hold() such that it no longer uses pmap_pte_quick(), and thus never requires the page queues lock. For consistency, adopt the same idiom as used by the new implementation of pmap_extract_and_hold() in pmap_extract() and pmap_mincore(). It also happens to make these functions shorter. Fix a style error in pmap_pte(). Reviewed by: kib@ Notes: svn path=/head/; revision=216333
* Disable attempts to establish a callback connection from theRick Macklem2010-12-091-5/+13
| | | | | | | | | | | | | | | | | | | | | experimental NFSv4 server to a NFSv4 client when delegations are not being issued, even if the client advertises a callback path. This avoids a problem where a Linux client advertises a callback path that doesn't work, due to a firewall, and then times out an Open attempt before the FreeBSD server gives up its callback connection attempt. (Suggested by drb at karlov.mff.cuni.cz to fix the Linux client problem that he reported on the fs-stable mailing list.) The server should probably have a 1sec timeout on callback connection attempts when there are no delegations issued to the client, but that patch will require changes to the krpc and this serves as a work around until then. Tested by: drb at karlov.mff.cuni.cz MFC after: 5 days Notes: svn path=/head/; revision=216330
* Fix compilation when DEBUG option is enabled.Jayachandran C.2010-12-093-9/+1
| | | | | | | | | | | - remove unused code in mips/rmi/xlr_pci.c - remove unused variable in mips/rmi/dev/nlge/if_nlge.c - fix reference to old function in mips/mips/pmap.c Reported by: Prabhath Raman (prabhath at netlogicmicro com) Notes: svn path=/head/; revision=216324
* - dump_avail layout should be sequence of [start, end)Oleksandr Tymoshenko2010-12-098-18/+12
| | | | | | | | | pairs, not <start, size>. Spotted by: alc@ Notes: svn path=/head/; revision=216320
* Revert the vm/vm_page.c change in r216317.Jayachandran C.2010-12-091-1/+1
| | | | | | | | This adds back changes in r216141, which was reverted by the above check in. Notes: svn path=/head/; revision=216319
* - Populate dump_avail with proper values from phys_availOleksandr Tymoshenko2010-12-099-3/+43
| | | | Notes: svn path=/head/; revision=216318
* swi_vm() for mips.Jayachandran C.2010-12-092-1/+4
| | | | Notes: svn path=/head/; revision=216317
* Replace i386/i386/busdma_machdep.c and amd64/amd64/busdma_machdep.cColin Percival2010-12-095-1225/+3
| | | | | | | (which are identical) with a single x86/x86/busdma_machdep.c. Notes: svn path=/head/; revision=216316
* UMA_MD_SMALL_ALLOC for mips.Jayachandran C.2010-12-095-12/+103
| | | | | | | | | | | | Implement uma_small_alloc() and uma_small_free() for mips that allocates pages from direct mapped memory. Uses the same mechanism as the page table page allocator, so that we allocate from KSEG0 in 32 bit, and from XKPHYS on 64 bit. Reviewed by: alc, jmallett Notes: svn path=/head/; revision=216315
* MFp4:David Xu2010-12-091-3/+42
| | | | | | | | The unit number allocator reuses ID too fast, this may hide bugs in other code, add a ring buffer to delay freeing a thread ID. Notes: svn path=/head/; revision=216314
* MFp4:David Xu2010-12-097-31/+35
| | | | | | | | | | | | It is possible a lower priority thread lending priority to higher priority thread, in old code, it is ignored, however the lending should always be recorded, add field td_lend_user_pri to fix the problem, if a thread does not have borrowed priority, its value is PRI_MAX. MFC after: 1 week Notes: svn path=/head/; revision=216313
* Do not subtract 0.5% from estimated frequency if DELAY(9) is driven by TSC.Jung-uk Kim2010-12-083-13/+15
| | | | | | | Remove a confusing comment about converting to MHz as we never did. Notes: svn path=/head/; revision=216312
* Add IDs of HighPoint RocketRAID 62x cards (Marvell 88SE9128 chips).Alexander Motin2010-12-081-0/+4
| | | | | | | | | PR: kern/152926 Submitted by: Mike Tancsa <mike@sentex.net> MFC after: 1 week Notes: svn path=/head/; revision=216309
* On amd64, we have (since r1.72, in December 2005) MAX_BPAGES=8192,Colin Percival2010-12-082-0/+8
| | | | | | | | | | | while on i386 we have MAX_BPAGES=512. Implement this difference via '#ifdef __i386__'. With this commit, the i386 and amd64 busdma_machdep.c files become identical; they will soon be replaced by a single file under sys/x86. Notes: svn path=/head/; revision=216308
* MFi386 r1.94: If XEN, make pmap_kextract = pmap_kextract_ma. This is aColin Percival2010-12-081-0/+5
| | | | | | | | | no-op currently, since FreeBSD/amd64 doesn't have (paravirtualized) Xen support, but if/when that support is ever added we'll want this, and until then it's harmless. Notes: svn path=/head/; revision=216306
* MFi386 r1.81, r1.82, r1.84: Reorganize code to reduce cache pressure andColin Percival2010-12-081-72/+80
| | | | | | | | | branch mispredictions. No objections from: scottl Notes: svn path=/head/; revision=216304
* Use convenience macro for minimum and maximum value capping whenAttilio Rao2010-12-082-15/+19
| | | | | | | | | | | | re-arming the watchdog timeout. Sponsored by: Sandvine Incorporated Submitted by: Mark Johnston <mjohnston at sandvine dot com> Reviewed by: des MFC after: 10 days Notes: svn path=/head/; revision=216298
* r184610 changed the way how TX frames are handled on AX88178 andPyun YongHyeon2010-12-081-42/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AX88772 controllers. ASIX added a new feature for AX88178/AX88772 controllers which allows combining multiple TX frames into a single big frame. This was to overcome one of USB limitation where it can't generate more than 8k interrupts/sec which in turn means USB ethernet controllers can not send more than 8k packets per second. Using ASIX's feature greatly enhanced TX performance(more than 3~4 times) compared to 7.x driver. However it seems r184610 removed boundary checking for buffered frames which in turn caused instability issues under certain conditions. In addition, using ASIX's feature triggered another issue which made USB controller hang under certain conditions. Restarting ethernet controller didn't help under this hang condition and unplugging and replugging the controller was the only solution. I believe there is a silicon bug in TX frame combining feature on AX88178/AX88772 controllers. To address these issues, reintroduce the boundary checking for both AX88178 and AX88772 after copying a frame to USB buffer and do not use ASIX's multiple frame combining feature. Instead, use USB controller's multi-frame transmit capability to enhance TX performance as suggested by Hans[1]. This should fix a long standing axe(4) instability issues reported on AX88772 and AX88178 controllers. While I'm here remove unnecessary TX frame length check since upper stack always guarantee the size of a frame to be less than MCLBYTES. Special thanks to Derrick Brashear who tried numerous patches during last 4 months and waited real fix with patience. Without this enthusiastic support, patience and H/W donation I couldn't fix it since I was not able to trigger the issue on my box. Suggested by: hselasky [1] Tested by: Derrick Brashear (shadow <> gmail dot com> H/W donated by: Derrick Brashear (shadow <> gmail dot com> PR: usb/140883 Notes: svn path=/head/; revision=216284