Commit Graph

184 Commits

Author SHA1 Message Date
matt 90ee15e239 Fix FLT_* and DBL_* redefinition problem. 2011-07-11 02:54:04 +00:00
matt 7555545545 Add defines for extu_frac[ln]m 2011-07-10 04:49:37 +00:00
mrg 8f21de0400 port to GCC 4.5. 2011-07-07 01:27:13 +00:00
rmind e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
joerg a2bf8e5d19 Introduce DDB_EXPR_FMT and replace the logic around DB_EXPR_T_IS_QUAD. 2011-05-26 15:34:12 +00:00
skrll 5dea138bb6 HPPA TLS support. 2011-03-17 22:14:43 +00:00
skrll 3c6d72d744 __HAVE___LWP_GETPRIVATE_FAST works now. 2011-02-28 21:23:33 +00:00
joerg 13b2e74237 Be nicer to software that insists on -ansi and use __inline. 2011-02-25 14:07:12 +00:00
joerg 1631a78097 Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.
2011-02-24 04:28:41 +00:00
matt a5e30bea72 Put RCSIDs in section .ident. (use .pushsection/.popsection) 2011-02-12 16:31:32 +00:00
skrll 5a4e5babba Save CR24 and CR27 and report in ddb. 2011-01-22 19:35:47 +00:00
rmind 7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
skrll 4e5433fc00 __HAVE_SIGINFO has not been required/used for a long time now.
Prompted by uwe@
2011-01-02 18:07:02 +00:00
joerg 3e11e26976 Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.
2010-12-20 21:11:24 +00:00
uebayasi 9228941ac1 sys/mutex.h includes machine/intr.h via sys/intr.h, so no need here. 2010-11-16 09:35:14 +00:00
uebayasi 25c2ed11f4 MD interrupt implementation is not VM parameter. 2010-11-16 09:34:24 +00:00
uebayasi 5d7952a5d1 Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap.  vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
2010-11-14 13:33:20 +00:00
uebayasi 1be6f4ae31 Don't rely on global APIs from internal. 2010-11-14 03:16:03 +00:00
uebayasi 41e5df6d3e Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)).  This functionality will be re-added later.
2010-11-06 15:42:43 +00:00
christos 1a7202d2d0 cargo cult the x86 changes. 2010-09-20 16:13:35 +00:00
cegger a63798ea7c Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.
2010-07-06 20:50:33 +00:00
skrll d2db4f3b98 Allow PVF_UNCACHEABLE in set/clear of pmap_changebit call (for now). 2010-06-21 14:43:34 +00:00
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
skrll 4d532c945b MULTIPROCESSOR fixes
- provide curcpu in a control register instead of curlwp
- define {GET,SET}_CURLWP and GET_CURCPU and use whereever possible.
- define a cpu count and use it in CPU_INFO_FOREACH

XXX hppa_ncpus isn't valid yet.
2010-06-06 12:13:35 +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
skrll 0be33f66cf Add md_astpending to struct mdlwp and use it. 2010-04-03 07:46:01 +00:00
skrll 061c4b41cb Whitespace. 2010-03-31 06:40:30 +00:00
skrll 1a1da55a23 Whitespace. 2010-03-30 19:27:54 +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
skrll dfb62ec228 Not all PA CPUs have the U-bit (uncacheable) for non-IO memory. In fact
most don't.  Deal with non-equivalent aliases by removing and flushing the
managed mappings, and flushing the unmanaged mappings.

When flushing caches/TLB flush the cache before purging the TLB just in
case the flush enters the mapping into the TLB.
2010-03-19 07:29:44 +00:00
skrll afd97f3579 The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
2010-03-16 16:20:19 +00:00
skrll e15992e310 Fix and use the BSS macro. 2010-03-08 07:42:46 +00:00
skrll ea38704829 Add #include "opt_cputype.h" where necessary. 2010-03-06 21:22:42 +00:00
skrll 995e7575f1 Add a "mach frame" command to hppa ddb. 2010-03-02 20:40:15 +00:00
skrll 9882ad0204 Deal with PA2.0 cache move-in rules by purging the TLB as well as
flushing/purging the cache.
2010-02-22 21:32:55 +00:00
skrll bce51a654b Remove the dma24_ex method of dealing with BUS_DMA_24BIT and replace
with a uvm managed freelist of pages in the right range.
2010-02-16 16:56:29 +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
skrll 2c3b4d7619 Simplify. 2010-01-17 08:24:06 +00:00
skrll 15b38a3879 Add a couple of comments and some whitespace. 2010-01-16 13:59:42 +00:00
skrll a6de3e0058 Use the description in the ACD for T_DBREAK. 2010-01-16 10:06:31 +00:00
matt 0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
skrll 3e3c89b2ca Add lci to get coherence index for an address. 2009-11-29 10:09:54 +00:00
skrll c1821630bd KNF 2009-11-29 10:08:10 +00:00
rmind 23d62c72ca Include sys/user.h for MD proc.h (hppa and m68k ports). 2009-11-21 15:13:14 +00:00
skrll dcfde2a0ef Put PMAP_NOCACHE in the MD space. 2009-11-15 12:26:02 +00:00
skrll 1070b74721 Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE. 2009-11-11 16:08:31 +00:00
snj 32381fa0dd Follow upstream license changes for files with Michael Shalayeff's
copyright.  In most cases, this means dropping the 3rd and 4th clauses.
2009-11-03 05:07:25 +00:00
skrll e03976623a Add TLS relocation definitions. 2009-05-30 05:56:52 +00:00
skrll f06013108d u_intNN_t -> uintNN_t
"same" code before and after.
2009-05-24 06:53:34 +00:00
skrll 72c9ff9f0c Whitespace. 2009-05-19 05:50:58 +00:00