aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't link drti.o with libelf_pic.a. This means that all software withRui Paulo2010-08-213-9/+2
| | | | | | | | | | userland SDT probes must be linked with libelf explicitly. Requested by: kib Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211577
* Modify clang so that when TOOLS_PREFIX is defined we register theRui Paulo2010-08-213-12/+25
| | | | | | | | | | | CLANG_PREFIX macro. This changes the default header search path when we are building clang as part of cross-tools. Submitted by: Dimitry Andric <dimitry at andric.com> Reviewed by: freebsd-current Notes: svn path=/head/; revision=211573
* Add clang to the cross-tools build stage.Rui Paulo2010-08-211-0/+7
| | | | | | | Submitted by: Dimitry Andric <dimitry at andric.com> Notes: svn path=/head/; revision=211572
* Make sure the boot2 stage is compiled with gcc, as clang has noRui Paulo2010-08-211-0/+5
| | | | | | | | | | problems compiling it, but it just gets too big at the moment, even with -Os. This is not applicable to gptboot, though. Submitted by: Dimitry Andric <dimitry at andric.com> Notes: svn path=/head/; revision=211571
* We need to pull bsd.own.mk before modifying the CC variable. OtherwiseRui Paulo2010-08-211-0/+2
| | | | | | | | | it will be overwritten when we include bsd.lib.mk. Pointed out by: Dimitry Andric <dimitry at andric.com> Notes: svn path=/head/; revision=211570
* Skip a KASSERT which isn't appropriate when not employing page coloring.Marius Strobl2010-08-211-3/+4
| | | | | | | Reported by: Michael Moll Notes: svn path=/head/; revision=211568
* Update for the new tests.Rui Paulo2010-08-211-263/+199
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211567
* Add a sysname char * to struct opensolaris_utsname.Rui Paulo2010-08-211-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211566
* Add the definition of LIBELF_PIC.Rui Paulo2010-08-211-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211565
* Use double quotes when checking the value of MACHINE_ARCH.Rui Paulo2010-08-211-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211564
* Add a Makefile for dtruss.Rui Paulo2010-08-211-0/+8
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211563
* Port plockstat to FreeBSD. This will be connected to the build later.Rui Paulo2010-08-212-11/+63
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211562
* Link drti.o with a PIC version of libelf. This is needed becauseRui Paulo2010-08-211-2/+9
| | | | | | | | | | drti.o depends on libelf and this avoids linking every other drti.o program (namely programs with USDT probes) with libelf. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211561
* Add libelf to the prebuild libs.Rui Paulo2010-08-211-1/+1
| | | | | | | | | This is needed for the DTrace instrumentation object. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211560
* Port the DTrace helper ioctls to FreeBSD and add a helper member toRui Paulo2010-08-211-2/+12
| | | | | | | | | dof_helper_t (needed by drti.o). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211555
* Add libdtrace support for tracing userland programs.Rui Paulo2010-08-2115-218/+712
| | | | | | | | | | | | | | | | | | | | | Summary of changes: * Implement a compatibility shim between Solaris libproc and our libproc and remove several ifdefs because of this. * Port the drti to FreeBSD. * Implement the missing DOODAD sections * Link with libproc and librtld_db * Support for ustack, jstack and uregs (by sson@) * Misc bugfixing When writing the SUWN_dof section, we had to resort to building the ELF file layout by "hand". This is the job of libelf, but our libelf doesn't support this yet. When libelf is fixed, we can remove the code under #ifdef BROKEN_LIBELF. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211554
* Add sysname to struct opensolaris_utsname. This is needed by one DTraceRui Paulo2010-08-211-1/+2
| | | | | | | | | test. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211553
* Use double quotes when checking the value of MACHINE_ARCH.Rui Paulo2010-08-211-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211550
* The DTrace instrumentation object is going to be i386/amd64 only.Rui Paulo2010-08-211-1/+2
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211547
* Wrap remaining ieee80211_ratectl_node_init() calls missed in r211314.Bernhard Schmidt2010-08-211-3/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=211546
* Port most of the DTrace tests to FreeBSD.Rui Paulo2010-08-2183-93/+171
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211545
* Install a PIC libelf. This will be needed by the DTrace runtimeRui Paulo2010-08-211-0/+1
| | | | | | | | | instrumentation object (dtri.o). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211540
* Revert part of r211505. Some of the removed casts are actually safe soRui Paulo2010-08-211-16/+16
| | | | | | | | | | | put them back in again. Also, clang only complained about the lvalue cast. Submitted by: Dimitry Andric <dimitry at andric.com> Pointed out: bde Notes: svn path=/head/; revision=211537
* make sure thread lock is locked.David Xu2010-08-201-0/+1
| | | | Notes: svn path=/head/; revision=211534
* Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE andJohn Baldwin2010-08-2014-19/+47
| | | | | | | | | | | | | | | LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that the associated lockmgr lock is exclusively locked by the current thread when manipulating these flags to ensure the flag updates are safe. This last change required some minor shuffling in a few filesystems to exclusively lock a brand new vnode slightly earlier. Reviewed by: kib MFC after: 3 days Notes: svn path=/head/; revision=211531
* optp may be NULL.Hajimu UMEMOTO2010-08-201-1/+2
| | | | Notes: svn path=/head/; revision=211530
* Revert r211434. Offline discussions have convinced me that this shouldMatt Jacob2010-08-201-18/+2
| | | | | | | be left alone for now. Notes: svn path=/head/; revision=211529
* Reduce redundant code.David Xu2010-08-201-76/+21
| | | | | | | Submitted by: kib Notes: svn path=/head/; revision=211526
* In current implementation, thread cancellation is done in signal handler,David Xu2010-08-206-99/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which does not know what is the state of interrupted system call, for example, open() system call opened a file and the thread is still cancelled, result is descriptor leak, there are other problems which can cause resource leak or undeterminable side effect when a thread is cancelled. However, this is no longer true in new implementation. In defering mode, a thread is canceled if cancellation request is pending and later the thread enters a cancellation point, otherwise, a later pthread_cancel() just causes SIGCANCEL to be sent to the target thread, and causes target thread to abort system call, userland code in libthr then checks cancellation state, and cancels the thread if needed. For example, the cancellation point open(), the thread may be canceled at start, but later, if it opened a file descriptor, it is not canceled, this avoids file handle leak. Another example is read(), a thread may be canceled at start of the function, but later, if it read some bytes from a socket, the thread is not canceled, the caller then can decide if it should still enable cancelling or disable it and continue reading data until it thinks it has read all bytes of a packet, and keeps a protocol stream in health state, if user ignores partly reading of a packet without disabling cancellation, then second iteration of read loop cause the thread to be cancelled. An exception is that the close() cancellation point always closes a file handle despite whether the thread is cancelled or not. The old mechanism is still kept, for a functions which is not so easily to fix a cancellation problem, the rough mechanism is used. Reviewed by: kib@ Notes: svn path=/head/; revision=211524
* If thread set a TDP_WAKEUP for itself, clears the flag and returns EINTRDavid Xu2010-08-201-0/+7
| | | | | | | immediately, this is used for implementing reliable pthread cancellation. Notes: svn path=/head/; revision=211523
* According to specification, function fcntl() is a cancellation point onlyDavid Xu2010-08-201-4/+11
| | | | | | | when cmd argument is F_SETLKW. Notes: svn path=/head/; revision=211522
* FPU EMU is 32-bit only for now, so mark it as a powerpc-only feature.Nathan Whitehorn2010-08-201-9/+9
| | | | | | | This fixes powerpc64 LINT. Notes: svn path=/head/; revision=211521
* Fix mbuf leakages and remove unneccessary duplicate mbuf frees.Ana Kukec2010-08-191-13/+7
| | | | | | | | | | Use the right copy of an mbuf for the IP6_EXTHDR_CHECK. Reported by: zec, hrs Approved by: bz (mentor) Notes: svn path=/head/; revision=211520
* Revert a minor part of revision 211364:Xin LI2010-08-191-4/+1
| | | | | | | | | | | | | - Imply -h if single file is grepped, this is the GNU behaviour This is already done by code above the change and have caused a regression since this instance of code does not check Hflag. Reported by: davidxu Pointy hat to: delphij Notes: svn path=/head/; revision=211519
* Revert part of the r211149 as I erroneously ported the logical_cpus fromAttilio Rao2010-08-192-6/+6
| | | | | | | | | | | | Yahoo! patchset as a mask (and according manipulating variables) while it is actually a CPU count. Submitted by: neel MFC after: 1 month X-MFC: 211149 Notes: svn path=/head/; revision=211518
* '\0' -> 0Edwin Groothuis2010-08-191-2/+2
| | | | | | | Fix silly mistake by being overly zeaolous[sp] of applying the style rules. Notes: svn path=/head/; revision=211517
* Eliminate the ambiguous queue setting logic forJack F Vogel2010-08-191-2/+2
| | | | | | | | the VF, it made it possible to have 2 queues which we don't want, the HOST is unable to handle it. Notes: svn path=/head/; revision=211516
* Remove unused KTRACE includes.John Baldwin2010-08-199-41/+0
| | | | Notes: svn path=/head/; revision=211515
* There isn't really a need to hold the ktrace mutex just to read the valueJohn Baldwin2010-08-191-6/+0
| | | | | | | | | of p_traceflag that is stored in the kinfo_proc structure. It is still racey even with the lock and the code will read a consistent snapshot of the flag without the lock. Notes: svn path=/head/; revision=211514
* Call dev_rel() in error paths.Jaakko Heinonen2010-08-191-0/+3
| | | | | | | | | Reported by: kib Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=211513
* Fix a whitespace nit and remove a questioning comment. STAILQ_CONCAT()John Baldwin2010-08-191-2/+2
| | | | | | | | does require the STAILQ the existing list is being added to to already be initialized (it is CONCAT() vs MOVE()). Notes: svn path=/head/; revision=211512
* Migrate if_arge to use the PLL cpuops.Adrian Chadd2010-08-192-30/+10
| | | | | | | This has been lightly tested on the AR7161 and AR9132. Notes: svn path=/head/; revision=211511
* Implement PLL generalisation in preparation for use in if_arge.Adrian Chadd2010-08-193-3/+96
| | | | | | | | | | | * Add a function to write to the relevant PLL register * Break out the PLL configuration for the AR71XX into the CPU ops, lifted from if_arge.c. * Add the AR91XX PLL configuration ops, using the AR91XX register definitions. Notes: svn path=/head/; revision=211510
* add the PLL set functions to cpuopsAdrian Chadd2010-08-191-0/+10
| | | | Notes: svn path=/head/; revision=211509
* Remove an unused macro. exit1() invokes ktrprocexit() directly.John Baldwin2010-08-191-4/+0
| | | | Notes: svn path=/head/; revision=211508
* Remove unneeded casts in inline assembly in contrib/gcc/longlong.h,Rui Paulo2010-08-191-22/+22
| | | | | | | | | | | | which are apparently "heinous" GNU extensions, so clang can compile this without using the -fheinous-gnu-extensions option. Results in *no* binary change, neither with clang, nor with gcc. Submitted by: Dimitry Andric <dimitry at andric.com> Notes: svn path=/head/; revision=211505
* Fix mistaken indenting.Adrian Chadd2010-08-191-5/+5
| | | | Notes: svn path=/head/; revision=211504
* Add some initial AR724X chipset support.Adrian Chadd2010-08-196-0/+228
| | | | | | | | | | This is untested but should at least allow an AR724X to boot. The current code is lacking the detail needed to expose the PCIe bus. It is also lacking any NIC, PLL or flush/WB code. Notes: svn path=/head/; revision=211503
* Add initial Atheros AR91XX support.Adrian Chadd2010-08-195-0/+236
| | | | | | | | | | | | | | | | | This works well enough to bring a system up to single-user mode using an MDROOT. Known Issues: * The EHCI USB doesn't currently work and will panic the kernel during attach. * The onboard ethernet won't work until the PLL routines have been fleshed out and shoe-horned into if_arge. * The WMAC device glue (and quite likely the if_ath support) hasn't yet been implemented. Notes: svn path=/head/; revision=211502
* MFp4: anchie_soc2009 branch:Ana Kukec2010-08-1910-14/+612
| | | | | | | | | | | | | | | | | | | | | | | Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971. The implementation consists of a kernel module that gets packets from the nd6 code, sends them to user space on a dedicated socket and reinjects them back for further processing. Hooks are used from nd6 code paths to divert relevant packets to the send implementation for processing in user space. The hooks are only triggered if the send module is loaded. In case no user space application is connected to the send socket, processing continues normaly as if the module would not be loaded. Unloading the module is not possible at this time due to missing nd6 locking. The native SeND socket is similar to a raw IPv6 socket but with its own, internal pseudo-protocol. Approved by: bz (mentor) Notes: svn path=/head/; revision=211501