Commit Graph

169156 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
370df5bc87 Add list of Octeon's PMC counters obtained from cvmx-core.h 2012-03-23 00:04:09 +00:00
Oleksandr Tymoshenko
d8a2d243bf Add Octeon class and CPU type 2012-03-23 00:03:26 +00:00
Oleksandr Tymoshenko
ae849c7c42 Setup fake MODINFO variables for octeon kernel 2012-03-23 00:01:09 +00:00
Adrian Chadd
12be5b9c59 Add some further debugging to try and aid tracking down what the state of
things were just before a full software queue is drained.
2012-03-22 21:48:36 +00:00
Adrian Chadd
d780702e8b Sprinkle some style(9) things around. 2012-03-22 21:47:14 +00:00
Adrian Chadd
bde65615f6 Fix an incorrect parameter usage here.
Submitted by:	monthadar@gmail.com
2012-03-22 21:22:58 +00:00
Rafal Jaworowski
4350d77706 Improve FDT handling in loader(8) and make it more robust.
o Fix buffer overflows when using a long property body in node paths.
o Fix loop end condition when iterating through the symbol table.
o Better error handling during node modification, better problem reporting.
o Eliminate build time warnings.

Submitted by:	Lukasz Wojcik
Obtained from:	Semihalf
MFC after:	1 week
2012-03-22 20:34:26 +00:00
Joseph Koshy
53bad46ed0 Correct a function prototype.
Submitted by:	"Anders Magnusson" <ragge at ludd.ltu.se>, via joel
2012-03-22 19:04:22 +00:00
Oleksandr Tymoshenko
2827d3e138 Make reusable part of code have mips prefix, not mips24 2012-03-22 18:07:44 +00:00
Oleksandr Tymoshenko
1b930fb786 Rework MIPS PMC code:
- Replace MIPS24K-specific code with more generic framework that will
    make adding new CPU support easier
- Add MIPS24K support for new framework
- Limit backtrace depth to 1 for stability reasons and add option
    HWPMC_MIPS_BACKTRACE to override this limitation
2012-03-22 18:01:23 +00:00
Oleksandr Tymoshenko
a5fbfee1d0 Move PMC hook invocation to cpu_intr. The idea is the same as with ast()
call but there is no reason to implement it in assembler.
2012-03-22 17:47:52 +00:00
Oleksandr Tymoshenko
a4b7818ee6 Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
mandatory for ELF binaries so we'll use the segment with offset less then
alignment and align it appropriately (which covers pt_offset == 0 case)
2012-03-22 17:44:36 +00:00
Oleksandr Tymoshenko
2d57314a1b Fix PMC syscall on 64-bit big endian systems.
Sycall argument is pointer to array of register_t values. Casting it to
pointer to structure with fields of size smaller then register_t we rely
on compiler-dependent memory layout of structure.

Tested on: mips64 and amd64 systems
2012-03-22 17:36:53 +00:00
Jung-uk Kim
cc6455afff Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214 (r200553).
MFC after:	3 days
2012-03-22 17:01:25 +00:00
Joel Dahl
09835a9a0e Update snd_cmi, snd_csa and snd_emu10kx status. 2012-03-22 16:24:50 +00:00
Michael Tuexen
b5b6e5c237 Small cleanup of the code. No functional change (in FreeBSD kernel).
MFC after: 1 week.
2012-03-22 16:22:16 +00:00
Joel Dahl
f38f12f287 Add snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64.
The GPL infected parts which were blocking the inclusion of snd_csa
and snd_emu10kx in GENERIC have recently been removed from the tree.
I'm also adding snd_cmi to GENERIC, which I originally intended to
add when we enabled sound support by default.

Discussed with:	jhb, pfg, Yuriy Tsibizov <yuriy.tsibizov@gfk.ru>
Approved by:	jhb
2012-03-22 16:19:04 +00:00
Jayachandran C.
0e37e252d2 Fix return type of mips pmap_kextract()
The return type should be vm_paddr_t, not vm_offset_t.
2012-03-22 15:14:10 +00:00
Konstantin Belousov
758ffbfa3b Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail.

Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().

Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.

Reviewed by:	kan
Discussed with:	bde
MFC after:	2 weeks
2012-03-22 14:20:51 +00:00
Konstantin Belousov
ff6cd33319 Remove the fragments which are not needed on FreeBSD. The caltech
malloc hardly would ever be updated.

Reviewed by:  bde, kan
MFC after:    2 weeks
2012-03-22 14:11:10 +00:00
John Baldwin
d8c827012c Mark the 'lapics' and 'ioapics' arrays here static since they are
private to this file.  The 'lapics' array was actually shadowing a
completely different 'lapics' array that is private to local_apic.c.

Reported by:	bde
MFC after:	2 weeks
2012-03-22 12:23:32 +00:00
Stanislav Sedov
bbbc13f8cf - Avoid use of deprecated KRB5 functions. 2012-03-22 11:18:14 +00:00
Sergey Kandaurov
3daaaabdb8 Fix style. Somehow I managed to lost a space when copy&paste.
Pointed out by:	stefanf
2012-03-22 09:51:31 +00:00
Sergey Kandaurov
2d780dbb4b Garbage collect defunct nlist(3) symbols.
MFC after:	1 week
2012-03-22 09:47:14 +00:00
Sergey Kandaurov
130b343048 Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
when passing damaged user-supplied fstab file data.

MFC after:	1 week
2012-03-22 09:42:27 +00:00
Andrey V. Elsukov
5b0da85a41 Correct debug message. 2012-03-22 09:29:07 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Alan Cox
5730afc9b6 Handle spurious page faults that may occur in no-fault sections of the
kernel.

When access restrictions are added to a page table entry, we flush the
corresponding virtual address mapping from the TLB.  In contrast, when
access restrictions are removed from a page table entry, we do not
flush the virtual address mapping from the TLB.  This is exactly as
recommended in AMD's documentation.  In effect, when access
restrictions are removed from a page table entry, AMD's MMUs will
transparently refresh a stale TLB entry.  In short, this saves us from
having to perform potentially costly TLB flushes.  In contrast,
Intel's MMUs are allowed to generate a spurious page fault based upon
the stale TLB entry.  Usually, such spurious page faults are handled
by vm_fault() without incident.  However, when we are executing
no-fault sections of the kernel, we are not allowed to execute
vm_fault().  This change introduces special-case handling for spurious
page faults that occur in no-fault sections of the kernel.

In collaboration with:	kib
Tested by:		gibbs (an earlier version)

I would also like to acknowledge Hiroki Sato's assistance in
diagnosing this problem.

MFC after:	1 week
2012-03-22 04:52:51 +00:00
Alan Cox
bfb2fa9f00 Change pv_entry_count to a long. During the lifetime of FreeBSD 10.x,
physical memory sizes at the high-end will likely reach a point that
the number of pv entries could overflow an int.

Submitted by:	kib
2012-03-22 04:40:22 +00:00
Marius Strobl
cc0c154ffb Declare the CRC lookup-tables const as they hardly should change at
run-time.
2012-03-21 20:55:21 +00:00
Marius Strobl
3e18d022e4 Use the common/shared CRC-32 implementation instead of duplicating it.
MFC after:	1 week
2012-03-21 20:53:47 +00:00
Bernhard Schmidt
74ebfba7ca Update the firmware to version 0.236
Submitted by:	PseudoCylon
MFC after:	2 weeks
2012-03-21 19:09:52 +00:00
Bernhard Schmidt
f9d032660b Load the firmware during init not attach, as a root filesystem might
not yet be available. While here, also print the firmware version.

Submitted by:	PseudoCylon
MFC after:	3 days
2012-03-21 19:08:44 +00:00
Marius Strobl
5187458fcd - First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers

MFC after:	1 week
2012-03-21 16:59:39 +00:00
Juli Mallett
ce30db0b31 o) Don't keep drive parameters in a global, put them in the softc.
o) Don't report a bogus stripesize.
o) Eliminate a nearby gratuitous "proxy" indirection.
2012-03-21 10:27:12 +00:00
Andrey V. Elsukov
c5e7f0649a Acquire modules lock before call module_getname() in the KLD_DEBUG case.
MFC after:	1 week
2012-03-21 09:48:32 +00:00
Marius Strobl
812e6f1cf5 Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
along with functions, SYSCTLs and tunables that are not used with
ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
code for the other way around. This makes it easier to understand
which parts of ata(4) actually are used in the new world order and
to later on remove the !ATA_CAM bits. It also makes it obvious that
there is something fishy with the C-bus front-end as well as in the
ATP850 support, as these used ATA_LOCKING which is defunct in the
ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
be brought back in some form or other.

Reviewed by:	mav
MFC after:	1 week
2012-03-21 08:57:15 +00:00
Marius Strobl
02c2b7d963 Exclude devices which are mutually exclusive with ATA_CAM. For better
or worse, the former are still built as modules as part of the LINT
builds

Reviewed by:	mav
MFC after:	1 week
2012-03-21 08:50:47 +00:00
Gleb Smirnoff
d0e6c546a2 in6_pcblookup_local() still can return a pcb with NULL
inp_socket. To avoid panic, do not dereference inp_socket,
but obtain reuse port option from inp_flags2, like this
is done after next call to in_pcblookup_local() a few lines
down below.

Submitted by:	rwatson
2012-03-21 08:43:38 +00:00
Ed Schouten
92396a3174 Remove pty(4) from our kernel configurations.
As of FreeBSD 8, this driver should not be used. Applications that use
posix_openpt(2) and openpty(3) use the pts(4) that is built into the
kernel unconditionally. If it turns out high profile depend on the
pty(4) module anyway, I'd rather get those fixed. So please report any
issues to me.

The pty(4) module is still available as a kernel module of course, so a
simple `kldload pty' can be used to run old-style pseudo-terminals.
2012-03-21 08:38:42 +00:00
Gleb Smirnoff
586fbee643 Add multibyte char support.
PR:		165429
Submitted by:	amdmi3
2012-03-21 08:03:07 +00:00
David Xu
4e2158bf53 Revert previous change. It is an incomplete change from old branch. :-( 2012-03-21 07:16:58 +00:00
David Xu
cc583082f4 Use version 2 of semaphore provided by kernel umtx code, now if there is
no waiters, we still increase and decrease count in user mode without
entering kernel, once there is a waiter, sem_post will enter kernel to
increase count and wake thread up, this is atomicy and allow us to
gracefully destroy semaphore after sem_wait returned.
2012-03-21 07:12:52 +00:00
Gleb Smirnoff
7f06c60810 Fix a sentence in a paragraph that describes time and interval based
trimming. This sentence vaguely can be interpreted as if it was speaking
about time and size interaction, while it wasn't about it.
2012-03-21 07:02:17 +00:00
Gleb Smirnoff
7be124b0a8 Don't run through time checks when entry is definitely oversized. This
leads to newsyslog rotating on (size OR time) if both are specified.

PR:		100018, 160432
2012-03-21 06:51:45 +00:00
Alan Cox
d43d9d104d Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
longer serve any purpose.  Prior to r157446, they served a purpose
because there was a fixed amount of kernel virtual address space
reserved for pv entries at boot time.  However, since that change pv
entries are accessed through the direct map, and so there is no limit
imposed by a fixed amount of kernel virtual address space.

Fix a couple of nearby style issues.

Reviewed by:	jhb, kib
MFC after:	1 week
2012-03-21 04:00:58 +00:00
Adrian Chadd
dc1f12bf69 Re-commit this - store the alq payload in network order. 2012-03-21 03:19:50 +00:00
Jung-uk Kim
4c52cad2f9 Merge ACPICA 20120320. 2012-03-20 21:37:52 +00:00
Jung-uk Kim
038de96387 Fix another witness panic. We cannot enter critical section at all because
AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215
(r231844).  To evaluate the method, we need malloc(9), which may sleep.

Reported by:	bschmidt
MFC after:	3 days
2012-03-20 20:37:23 +00:00
Jung-uk Kim
b81dc021b3 Import ACPICA 20120320. 2012-03-20 18:17:33 +00:00