Commit Graph

2130 Commits

Author SHA1 Message Date
tnozaki
9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
martin
505728c6b8 Now that bus_handle_t is signed, avoid % operations on it. Convert all
% PAGE_SIZE to & PAGE_MASK. We don't expect to support non power of two
page sizes anytime soon ;-)
This makes PCI work again on my au1550.
2010-06-07 13:33:33 +00:00
tnozaki
dc71c99d49 fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:33:57 +00:00
tsutsui
a97c5654cb Merge .rodata.* sections (like .rodata.str1.4) into .rodata section.
Newer binutils creates such sections and old firmware might be confused.
2010-05-04 15:00:39 +00:00
rmind
84b7918250 Fix KASSERTMSG() to be consistent with KASSERT() logic, not inverted.
Hi matt@!
2010-04-25 15:39:41 +00:00
rmind
13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
tnozaki
377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
chs
04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
snj
6ea9f5a749 Spell "exception" properly. 2010-02-27 22:12:31 +00:00
snj
364e777af2 Fix a couple old typos in comments. 2010-02-27 19:10:41 +00:00
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
joerg
d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
mrg
4a128212f1 rename pridtab{}::cpu_name to cpu_displayname.
should fix a build error reported by he@.
2010-01-23 15:55:54 +00:00
martin
f9e1815aaf Unify the name of the device property to hold a MAC address - there was
no clear majority for either "mac-addr" vs. "mac-address", but a quick
gallup poll among developers selected the latter.
2010-01-22 08:56:04 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
simonb
653141906d Don't always use ".set mips3" - that explicitly uses 64-bit instructions
and we may be on a 32-bit CPU.  Instead use .set mips3/mips32/mips64
depending on current build arch.

Should fix boot problems on a Alchemy CPU reported by KIYOHARA Takashi
on port-mips.

A couple of niggles/concerns:
 * XXX Clean up with a macro?  Same code fragment is in mipsX_subr.S too.
 * XXX Key off build abi instead of processor type?
2010-01-09 11:49:16 +00:00
dyoung
3022acc4eb Expand PMF_FN_* macros. 2010-01-08 19:42:11 +00:00
rmind
c08a629cfd Slightly improve the comment. 2009-12-20 03:40:27 +00:00
matt
b4a4b118ed Fix printf format problems and latent bugs made visible by new bus_*_t types. 2009-12-16 08:26:14 +00:00
matt
f3d1f82c6e Make sure the pcb and initial frame area of lwp0 are zeroed since these will
be the basis for all future lwps.
2009-12-15 18:24:47 +00:00
rmind
5fd34da4f0 Fix MALTA32 builds, pmap_kenter_pa() needs additional argument in -current. 2009-12-15 06:07:14 +00:00
matt
6a96fd6958 Fix merge botch (we use 64bit times now). 2009-12-14 20:42:12 +00:00
skrll
f8c711439e Wrap comment. 2009-12-14 18:39:19 +00:00
uebayasi
69c8450278 We don't declare variables in for () statement. 2009-12-14 12:53:18 +00:00
matt
d97095d58e Get rid of l_addr references pulled in via merge. 2009-12-14 04:37:02 +00:00
mrg
97c80e8ff0 replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
it's based upon with a common compat_elf_check_interp().

tested on MALTA64 and sparc64.
2009-12-14 04:09:38 +00:00
mrg
a06fd79f93 forward declare struct exec_package 2009-12-14 03:20:27 +00:00
matt
290a34a065 Merge from matt-nb5-mips64
Merge mips-specific arch files.
2009-12-14 00:45:59 +00:00
tsutsui
471e528b58 Remove `volatile' qualifier from argument types of
struct timeval passed to todr_gettime(9) and todr_settime(9).
We no longer have an ancient and volatile struct timeval `time'
global since we have switched to MI timercounter(9) on all port.

XXX1: some of these RTC drivers still assume 32bit time_t
XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms()
XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
2009-12-12 14:44:08 +00:00
matt
6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
rmind
e9f7af26e6 Rename L_ADDR to L_PCB and amend some comments accordingly. 2009-12-10 05:10:00 +00:00
pooka
43b36d0f59 Don't build rump kernel with -mno-abicalls, because it's effectively
"no pic".
(should be used only for shared lib rump kernel, but this is just
bandaid for now)
2009-11-29 23:46:41 +00:00
rmind
13e391366b cpu_lwp_fork (MIPS): replace l_addr with uvm_lwp_getuarea(), clean up a little. 2009-11-29 04:11:51 +00:00
rmind
3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
rmind
3f09797207 Revert unrelated/unintended changes from previous commit.
Should fix MIPS builds (hi matt@).
2009-11-27 01:37:30 +00:00
matt
c37283eb1d Back out unintended commit. 2009-11-26 01:21:50 +00:00
matt
11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
mbalmer
0ae57f90dd more s/the the/the/ 2009-11-22 19:09:15 +00:00
rmind
891259c1af Use lwp_getpcb() on mips, powerpc and sh3, clean from struct user usage. 2009-11-21 17:40:27 +00:00
dyoung
e4fd5e4f38 Simplify activation hook. 2009-11-12 19:18:55 +00:00
cegger
9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
cegger
62cf489d8e kill extra whitespaces
reviewed by tsutsui@
2009-10-26 19:16:54 +00:00
he
c162de1c7b Fix the previous by terminating the comment. 2009-10-24 13:28:16 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
rmind
993cb03302 Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
2009-10-19 23:19:37 +00:00
snj
065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
cliff
dd11e1aa7a when USPACE <= PAGE_SIZE, we don't have md_upte[] in struct mdlwp 2009-08-20 03:33:53 +00:00
cliff
fcfabcc793 include mips/vmparam.h to get PAGE_SIZE 2009-08-20 01:33:39 +00:00
cliff
81f557cc4e if USPACE <= PAGE_SIZE then the (single) upage will be mapped in kseg0 or xphys and cpu_swapin is null func. 2009-08-20 01:33:04 +00:00