Commit Graph

179029 Commits

Author SHA1 Message Date
Adrian Chadd
bab63de286 kgdb enhancements!
* document the kgdb -b flag
* better verify what's valid with -b
* add more comprehensive command line help

PR:		kern/175743
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-02-19 02:09:18 +00:00
Ganbold Tsagaankhuu
bf4e1ed0bc Define gpio constants rather than using enum.
Fix pull-up and pull-down values of gpio.
According to A10 user manual possible pull register
values are 00 Pull-up/down disable, 01 Pull-up, 10 Pull-down.

Approved by: gonzo@
2013-02-19 02:01:35 +00:00
Pawel Jakub Dawidek
e5ed213082 More white-space cleanups.
Reported by:	zont (the first one)
2013-02-18 23:58:05 +00:00
Tim Kientzle
3e256ed764 Add mem_load_raw() for loading data from another location in memory.
This will be used by some upcoming changes to loader(8) FDT
handling to allow it to use an FDT provided by an earlier
boot stage the same as an FDT loaded from disk.
2013-02-18 23:13:13 +00:00
Jilles Tjoelker
5a9ecb5bb2 setbuf(3): Restore a BUGS section about setbuf().
The brokenness of setbuf() is not specific to 4.2BSD and 4.3BSD but inherent
in the API definition.

Reported by:	bde
2013-02-18 22:47:59 +00:00
Mark Johnston
e42412a966 Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
unnecessarily by a user thread waiting to run on a specific CPU after
calling sched_bind().

Reviewed by:	rstone
Approved by:	emaste (co-mentor)
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2013-02-18 22:47:16 +00:00
Joel Dahl
fea692b5f6 mdoc: sort sections. 2013-02-18 20:21:26 +00:00
Tim Kientzle
3772ab21ab Clarify an error message. The addresses here are
really offsets within the primary mapped memory block
(which may not start at address zero).
2013-02-18 20:11:20 +00:00
Gregory Neil Shapiro
69b95e367f Merge sendmail 8.14.6 errata issue
MFC after:	3 days
2013-02-18 19:33:07 +00:00
Gregory Neil Shapiro
ccc63572ab Fix regression in sendmail 8.14.6 release based on errata published at:
http://www.sendmail.com/sm/open_source/download/8.14.6/
2013-02-18 19:23:41 +00:00
Adrian Chadd
feb043c69c Fix an incorrect sizeof()
PR:		kern/176238
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2013-02-18 18:39:15 +00:00
Hans Petter Selasky
1b9c9ab29a Fix bad EEPROM parsing code.
MFC after:	2 weeks
2013-02-18 17:55:27 +00:00
Adrian Chadd
6e1ff18743 * Add initial debugging of the interrupt status entry
* Add in the TDMA debugging entries that I added a while ago
2013-02-18 04:20:43 +00:00
Adrian Chadd
fec3d03df0 Make this output more terse. 2013-02-18 04:19:21 +00:00
Adrian Chadd
d97c06b3a4 Add a new ATH KTR debug method to log the interrupt status. 2013-02-18 04:10:38 +00:00
Luigi Rizzo
afad0b868f the NO_PAM option has been finally removed in favor of WITHOUT_PAM. 2013-02-18 02:08:41 +00:00
Tim Kientzle
341cee15f6 Add strtoul() to libstand by copying from libc and clipping out
locale code.
2013-02-18 01:55:53 +00:00
Adrian Chadd
341177e1d8 Disable this variable; the code using it is also disabled. 2013-02-18 01:37:55 +00:00
Alan Cox
837a2c513d Place a cap on the size of the kernel's heap, also known as the kmem
submap.  Otherwise, after r246204, the auto-scaling logic in kern_malloc.c
tries to create a kmem submap that consumes the entire kernel map on a
Pandaboard with 1 GB of RAM.

Tested by:	gonzo
2013-02-18 01:22:20 +00:00
Adrian Chadd
32d384a45c Disable this code and add a note as to why.
It wasn't currently being called anyway - but being explicit about it
can't hurt.
2013-02-18 01:08:59 +00:00
Alan Cox
fc23011bc3 On arm, like sparc64, the end of the kernel map varies from one type of
machine to another.  Therefore, VM_MAX_KERNEL_ADDRESS can't be a constant.
Instead, #define it to be a variable, vm_max_kernel_address, just like we
do on sparc64.

Reviewed by:	kib
Tested by:	ian
2013-02-18 01:02:48 +00:00
Pawel Jakub Dawidek
7e46ff5f4c Allow [] in remote address, which fixes IPv6 support.
Reported by:	simon
2013-02-18 00:38:40 +00:00
Pawel Jakub Dawidek
b2e054b0d4 Update the comment: we do show the backtrace of misbehaving thread. 2013-02-17 21:37:32 +00:00
Pawel Jakub Dawidek
d6e636c988 - Add support for 'memsync' mode. This is the fastest replication mode that's
why it will now be the default.
- Bump protocol version to 2 and add backward compatibility for version 1.
- Allow to specify hosts by kern.hostid as well (in addition to hostname and
  kern.hostuuid) in configuration file.

Sponsored by:	Panzura
Tested by:	trociny
2013-02-17 21:12:34 +00:00
Konstantin Belousov
bb7ca8229d Do not update the fsinfo block on each update of any fat block, this
is excessive. Postpone the flush of the fsinfo to VFS_SYNC(),
remembering the need for update with the flag MSDOSFS_FSIMOD, stored
in pm_flags.

FAT32 specification describes both FSI_Free_Count and FSI_Nxt_Free as
the advisory hints, not requiring them to be correct.

Based on the patch from bde, modified by me.

Reviewed by: bde
MFC after:   2 weeks
2013-02-17 20:35:54 +00:00
Mark Johnston
43e1adfa05 Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
valid index into the input buffer.

PR:		bin/175213
Reviewed by:	gabor
Approved by:	emaste (co-mentor)
MFC after:	1 week
2013-02-17 19:48:23 +00:00
Alexander Motin
a937c5078f MFcalloutng:
Microoptimize i8254 one-shot operation mode (disabled by default to allow
timecounter functionality) by not writing to mode and MSB registers when
it is not required.  This saves several microseconds of CPU time per call,
reducing minimal measured interrupts interval to 19.5us.
2013-02-17 18:42:30 +00:00
Andrey A. Chernov
312c5e1aeb In 'make hierarchy' don't install /sys/sys pointing to usr/src/sys
but just /sys pointing there
2013-02-17 13:06:59 +00:00
Pawel Jakub Dawidek
09abcabae6 Remove space before tab. 2013-02-17 11:58:30 +00:00
Pawel Jakub Dawidek
89adaea91f Remove redundant check. 2013-02-17 11:57:47 +00:00
Pawel Jakub Dawidek
f0ad2ecb9c Style. 2013-02-17 11:56:36 +00:00
Pawel Jakub Dawidek
8e1d51ab40 - Require CAP_FSYNC capability right when opening a file with O_SYNC or O_FSYNC
flags.
- While here simplify check for locking flags.

Sponsored by:	The FreeBSD Foundation
2013-02-17 11:53:51 +00:00
Pawel Jakub Dawidek
11b0cfe3cd Remove redundant parenthesis. 2013-02-17 11:49:21 +00:00
Pawel Jakub Dawidek
49549b1894 Remove redundant space. 2013-02-17 11:48:16 +00:00
Pawel Jakub Dawidek
6c08be2b88 Add break to the default case. 2013-02-17 11:47:58 +00:00
Pawel Jakub Dawidek
4881a5950e Don't treat pointers as booleans. 2013-02-17 11:47:30 +00:00
Pawel Jakub Dawidek
de26549841 Remove redundant parenthesis. 2013-02-17 11:47:01 +00:00
Pawel Jakub Dawidek
5d48c4778a Remove redundant space. 2013-02-17 11:36:41 +00:00
Pawel Jakub Dawidek
cbc9087cba Remove trailing spaces. 2013-02-17 11:36:13 +00:00
Luigi Rizzo
f8e4e36a0a update the netmap example programs merging some common code in nm_util.c
pkt-gen now implements several functions (unlimited transmit, receive,
ping-pong) and can operate on a 'tap' device.
2013-02-17 04:43:22 +00:00
David Xu
17001e0b94 Make more code be protected by internal mutex, and now it is fork-safe, in
error case, the file exclusive lock is now released as soon as possible,
in previous code, child process can still hold the exclusive lock.
2013-02-17 02:52:42 +00:00
Marcel Moolenaar
d7aa5f02d0 In kthr.c, obtain the address of the PCB for threads that were running
on a core, when the core was stopped, by calling kgdb_trgt_core_pcb().
This has 2 advantages:
1.  We don't need to include a machine-specific header anymore and as
    such kthr.c is truly machine independent. This allows the code to
    be used in a cross-debugger.
2.  We don't need to lookup stoppcbs in generic code when it's an
    inherently target-spicific symbol. It does not exist for ia64.

Implement kgdb_trgt_core_pcb() for all architectures, except ia64, by
calling a common function called kgdb_trgt_stop_pcb(). This function
differs from kgdb_trgt_core_pcb() in that it gets the size of the PCB
structure as an argument and as such remains machine independent.

On ia64 the PCB for stopped cores is in the PCPU structure itself.
This for better scaling. The implementation of kgdb_trgt_core_pcb()
for ia64 uses the cpuid_to_pcpu[] array to to obtain the address of
the PCB structure.
2013-02-17 02:15:19 +00:00
Oleksandr Tymoshenko
acbaa69f31 Remove accidentally committed debug panic(9) call 2013-02-17 01:34:25 +00:00
Marcel Moolenaar
51a325a7f9 Close a race relating to setting the PCPU pointer (r13). Register r13
points to the TLS in user space and points to the PCPU structure in
the kernel. The race is the result of having the exception handler on
the one hand and the RPC system call entry on the other. The EPC
syscall path is non-atomic in that interrupts are enabled while the
two stacks are switched. The register stack is switched last as that
is the stack used to determine whether we're going back to user space
by the exception handler. If we go back to user space, we restore r13,
otherwise we leave r13 alone. The EPC syscall path however set r13 to
the PCPU structure *before* switching the register stack, which means
that there was a window in which the exception handler would restore
r13 when it was already pointing to the PCPU structure. This is fatal
when the exception happened on CPU x, but left from the exception on
anotehr CPU. In that case r13 would point to the PCPU of the CPU the
thread was running on. This immediately results in getting the wrong
value for curthread.
The fix is to make sure we assign r13 *after* we set ar.bspstore to
point to the kernel register stack for the thread.
2013-02-17 00:51:34 +00:00
Oleksandr Tymoshenko
d3d7f709ce - Add hw.bcm2835.sdhci.hs tunable to enable/disable highspeed mode in
SDHCI driver
  Suggested by: Daisuke Aoyama

- Set initilization sequence frequency to 8MHz. It should fix Data CRC
    errors. Standard requires initialization sequence to be executed
    at 400KHz but on this hardware low frequncies seems to cause
    Data CRC errors.

    Value was derived from analyzing hardware signals after
    Raspberry Pi is powered up. Before any data is read though DATA line
    adapter's clock frequency is changed to 8MHz.

    Modern cards should function fine at 8MHz but for older MMC cards it
    can be overriden by setting hw.bcm2835.sdhci.min_freq tunable.
2013-02-17 00:23:42 +00:00
Oleksandr Tymoshenko
7337a22fb0 Disable debug accidentally enabled by previous commit 2013-02-16 23:52:14 +00:00
Oleksandr Tymoshenko
57677a3a4a Various timing-related fixes:
- Replace divisor numbers with more descirptive names
- Properly calculate minimum frequency for SDHCI 3.0
- Properly calculate frequency for SDHCI 3.0 in mmcbr_set_clock
- Add min_freq method to sdhci_if.m and provide default
  implementation.  By re-implementing this method hardware
  drivers can control frequency controller operates when
  executing initialization sequence
2013-02-16 23:12:06 +00:00
Pawel Jakub Dawidek
1f2ce2a086 Put one file per line so it is easier to read diffs against those files. 2013-02-16 22:21:46 +00:00
Dag-Erling Smørgrav
c81beee50e #if out unused functions which trip up gcc but not clang. 2013-02-16 22:16:14 +00:00
Marcel Moolenaar
cb35030ab3 Return EFAULT when the address is not a kernel virtual address. 2013-02-16 21:46:27 +00:00