Commit Graph

1099 Commits

Author SHA1 Message Date
dsl
be74e0a9c9 Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
2014-01-01 18:57:15 +00:00
skrll
9460c4a119 Really remove unused variable. 2013-11-18 15:34:06 +00:00
skrll
3715f6edd9 Removed unused variable 2013-11-14 13:54:08 +00:00
christos
acda221c21 fixed unused variable warning 2013-11-09 21:31:45 +00:00
christos
bf437e30a3 remove unused code 2013-11-09 02:23:57 +00:00
christos
f148a5082f fix unused variables 2013-11-07 21:45:04 +00:00
christos
86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00
joerg
4d12bfcd15 Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
uwe
543668cba8 db_stack_trace_print: support trace/[at], starting trace from switchframe. 2013-08-06 21:41:01 +00:00
matt
d67f4a234d Collapse syscall_fancy/syscall_plain to syscall and p_trace_enabled.
Use sy_invoke
2013-06-26 16:28:51 +00:00
christos
5021bb4477 Complete the dosparts -> mbrparts conversion. Only x86k new uses dosparts
because it also uses struct dos_partition.
2013-05-16 19:06:44 +00:00
christos
787cd6d568 name it like other ports do 2013-05-16 18:47:38 +00:00
tsutsui
d4d20b3fd3 Don't call sh4_icache_sync_all() before sh_cache_ops is initialized.
Instead, use SH4_EMODE_CACHE_FLUSH() or SH4_CACHE_FLUSH() macro to
invalidate cache before initializing CCR.
This seems to suppress random file system corruption on wd(4) at acardide(4)
(which uses bus-master DMA and calls many cache flush ops) during pkgsrc
packages builds on landisk.
2013-05-14 14:11:43 +00:00
tsutsui
b5342d4988 Add a definition of SCSCMR1, smart card mode register available on 7750 etc. 2013-05-14 13:53:47 +00:00
christos
caafbf4e1b add missing SSIZE_MIN 2013-04-11 00:57:34 +00:00
christos
3f9b5ba889 Explicitly set KERN_AS (this could be done in /usr/src/sys/conf/Makefile.*)
so that modules work, on config files that did not set it explicitly. All
the files now use the standard logic, except the ones that set KERN_AS=obj
and Makefile.usermode which sets KERN_AS=library.
2013-03-10 07:18:19 +00:00
tsutsui
3a2ce178a4 Sprinkle redundant comments about PAD_P1_SWITCH to avoid stupid confusion. 2012-12-12 16:24:49 +00:00
tsutsui
d5805a0a1a Revert part of the previous (reverting RUN_P1 -> PAD_P1_SWITCH again).
We can assume all icache ops are called from (and will return to) P1
so no need to bother to jump to P1 at end of functions.
Pointed out by uwe@.
2012-12-12 15:43:44 +00:00
tsutsui
4d096c7fdd Fix fallouts in rev 1.19:
http://www.nerv.org/~ryo/netbsd/netbsd/?q=id:20080316T191753Z.1654448ada03ce3c4668f3fe472796d0b771e147
 - revert RUN_P1 -> PAD_P1_SWITCH changes where RUN_P1 is
   actually required  (all icache CCIA ops still need RUN_P2)
 - sh4_dcache_wbinv_all() and sh4_dcache_wbinv_range_index()
   (which manipulate CCDA arrays) are no longer have RUN_P2 so
   we can't call them directly from sh4_icache_sync_all() and
   sh4_icache_sync_range_index() funcitons;  use function pointers
   (which have appropriate addresses) instead for 7750 and 7750S
2012-12-12 13:34:49 +00:00
tsutsui
3ce0b43194 Fix one more device/softc split error:
- set sc->sc_dev properly
2012-12-12 13:32:37 +00:00
chs
b8c34ff8df fix device/softc split errors. 2012-10-29 12:51:38 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
ryo
4829c4fc5e adapt for _UC_TLSBASE.
Approved by manu@ and msaitoh@
2012-09-21 09:05:08 +00:00
manu
bba80928a8 setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
  (powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
  setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
  (hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
  powerpc, sh3, sparc and sparc64 is left to portmasters
  sparc64

Approved by core@
2012-09-12 02:00:51 +00:00
dsl
d222864098 The MDP_USEDFPU (amd64 and sh3) and MDP_SSTEP (sh3) are lwp flags not
process ones, rename to MDL_xxx.
2012-07-08 20:14:11 +00:00
martin
6c3cc552c2 Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.
2012-05-21 14:15:16 +00:00
christos
7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
rmind
ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
martin
c75ce34822 add missing MD code for posix_spawn 2012-02-13 01:04:26 +00:00
matt
1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
para
4c23b30cff proper sizing of kmem_arena on different ports
PR port-i386/45946: Kernel locks up in VMEM system
2012-02-10 17:35:47 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
para
89c9828deb converting extent(9) from malloc(9) to kmem(9)
preceding kmem-vmem-pool-uvm patch

releng@ acknowledged
2012-01-27 18:52:47 +00:00
christos
dd23e71080 Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
2012-01-24 20:03:36 +00:00
nonaka
2388feef61 fix my license notice. 2012-01-21 19:44:28 +00:00
joerg
e8bec33be1 Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
2012-01-20 14:08:04 +00:00
uwe
ebd5e6fb4e #if-0'ed defines for PT_GETFPREGS and PT_SETFPREGS. Not used yet, but
reserve the numbers as they are "leaked" to readelf(1), that has to know
them as NT_NETBSDCORE_FIRSTMACH + x (see get_netbsd_elfcore_note_type).
2011-10-31 19:08:45 +00:00
christos
b96df713de move the size marker back to where it was, but fix the name. 2011-09-27 00:35:38 +00:00
christos
e5b54c1cb6 compute the entry size correctly. 2011-09-26 22:43:07 +00:00
dyoung
bbc5c60aea Build sh3/sh3/sh3_bus_space.c only for mmeye. 2011-07-26 16:24:43 +00:00
dyoung
feec59aa09 Move some macros back to sh3/include/bus_funcs.h from
sh3/sh3/sh3_machdep.c, where I moved them by mistake.

Pull the bus_space(9) routines into a new module,
sh3/sh3/sh3_bus_space.c, that is built only on !landisk.

Fixes the mmeye and landisk builds.  Should fix other sh3 ports.
2011-07-25 21:12:23 +00:00
dyoung
bfbc9dbea7 Move the sh_memio_*() declarations back to sh3/include/bus_funcs.h.
Should fix the mmeye build.
2011-07-25 16:06:58 +00:00
dyoung
4035346af3 #include <sys/bus.h>. Should fix most of the SH3 ports. 2011-07-25 16:02:25 +00:00
dyoung
2c48f7f4ce Remove redundant, static inline bus_space(9) declarations
from sh3/bus_funcs.h and move the non-inline definitions to
sh3/sh3_machdep.c.
2011-07-20 21:30:13 +00:00
dyoung
106ff60f41 Do not install bus.h. 2011-07-17 23:52:12 +00:00
dyoung
8a61060442 Switch to new-style <sys/bus.h>. 2011-07-17 23:48:35 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
mrg
cc129228dd add GCC 4.5 support. 2011-07-03 06:45:50 +00:00
dyoung
cf10107d5d #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 18:51:52 +00:00
dyoung
59adf08e17 Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet.  Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
2011-07-01 17:09:58 +00:00