Commit Graph

4613 Commits

Author SHA1 Message Date
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
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
macallan
9052ce1f68 include a small font 2012-01-11 17:16:35 +00:00
macallan
1fa79ac882 use rasops_init(0, 0) 2012-01-11 15:53:32 +00:00
dholland
7bbf82b772 WABPL is no longer considered experimental (has not been for some time)
so update its comment in config files.
2011-12-18 05:49:22 +00:00
mrg
9a4a666ff3 implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places.  avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.
2011-12-12 19:03:07 +00:00
jmcneill
8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
tls
8a012bd83f The rnd pseudo-device is not really optional, because it is in the same
source file as the entropy-pool code itself.  Move it to std.  This
will be cleaned up more when I split the sources up as they should be.

This fixes build breaks on several ports.  Thanks to Havard Eidnes for
pointing them out.
2011-11-22 21:25:05 +00:00
mrg
9d03b8ef4c add a comment to sp_tlb_flush() about fixing the asm() better. 2011-10-22 21:00:40 +00:00
jakllsch
1578aa6f33 Another copy/paste problem with a function name in a error printf. 2011-09-08 15:36:42 +00:00
jakllsch
d8c7d8f2e8 Correct copy/paste of function name in error printf. 2011-09-08 15:34:07 +00:00
martin
7716a7e464 In pmap_unwire() fix an obvious editor mishap - enable kernel preemption
before returning, not the other way around.
Might fix PR kern/45137.
2011-09-01 08:47:56 +00:00
martin
9a1b6b7c8b Minor nit: avoid kpreempt_disable() if cold (as we return early and do
not reenable it; actually makes no difference but looks more balanced
this way)
2011-09-01 08:43:24 +00:00
bouyer
a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
mrg
e3a2fad897 apply some always_inline attribute to setpsr and spl*. while i am
not yet sure exactly why this is necessary, but does avoid crashes
seen on sparc INSTALL with gcc 4.5.
2011-08-28 22:30:09 +00:00
mrg
a29cead266 fix sparc UP kernels with GCC 4.5, with special thanks to help from
mlelstv@ tracking down the real issue.

sp_tlb_flush() makes various assumptions about the ABI and what GCC
will do with the rest of this function.  the inputs were not referenced
by name but only as "%o0" etc inside the asm.  the result was that GCC
was not filling in the function parameters before calling it because
they were not used in the function.  so, sp_tlb_flush() was getting
random data for it's inputs.  oops.

for now, convert 2 asm() calls to pure C, and mark the inputs for
the sta calls.  this makes GCC generate the right code, but it still
isn't entirely optimal.

ideally a pure C version would exist, but that adds non-trivial
overhead (15 instructions vs 23 or so.)

one more enhancement to make here would be to assign the %o3, %o4 and
%o5 usage into explicit temp variables, instead of assuming that they
are going to be free to use.
2011-08-28 10:26:15 +00:00
mrg
02056ed4a4 emit some linker -Map files so that we can figure out what symbols
in the boot loaders are.
2011-08-28 08:03:49 +00:00
mrg
012f831146 normalise #if defined(MULTIPROCESSOR) usage. 2011-08-24 02:51:13 +00:00
mrg
a086f3a52c re-introduce the NULL savefpstate IPI checks and evcnts. something
is Wrong with GCC 4.5.3 and these trigger.  i haven't seen anything
else particularly wrong so for now this will allow sparc to switch
to GCC 4.5, which otherwise seems to be working very well for me.

sigh.  i'm going to file a PR to research what is really wrong here.
2011-08-15 02:19:44 +00:00
martin
95377927e5 Get rid of #ifdef __sparc__ in uvm code - as noted by cgd back 1996,
now that we have __HAVE_CPU_VMSPACE_EXEC/cpu_vmspace_exec().
2011-07-30 19:29:12 +00:00
jakllsch
bb558b2010 printf fixes for ifdef NETIF_DEBUG 2011-07-30 04:18:38 +00:00
dyoung
75ccda5a51 Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.
2011-07-26 22:52:47 +00:00
martin
4821d7c4b4 if _KERNEL is not defined, include <sys/stdarg.h> for va_list. For the
kernel (or modules) this is already done by systm.h.
2011-07-18 21:00:28 +00:00
mrg
142a02103b convert the remaining sparc drivers to CFATTACH_DECL_NEW/cfdata_t/device_t.
(cgsix_obio.c was only partially converted with the rest of the cgsix code
when it was changed some time ago.)
2011-07-18 00:31:13 +00:00
mrg
9c508f54bd convert to use device_t, cfdata_t and CFATTACH_DECL_NEW().
XXX: compile time tested only.
2011-07-18 00:05:35 +00:00
mrg
210f684c14 actually use CFATTACH_DECL_NEW() and device_private() for mspcic. 2011-07-17 23:34:17 +00:00
mrg
794d81a9dd convert all the "empty softc" (just "struct device") drivers to using
device_t/cfdata_t and CFATTACH_DECL_NEW().

the mspcic driver was also converted since it does not ever touch the
sc_dev it used to have in there.
2011-07-17 23:32:37 +00:00
dyoung
9c93e701a6 Switch sparc and sparc64 to new-style <sys/bus.h>. 2011-07-17 23:29:10 +00:00
mrg
ace9f0e4af convert all the sparc drivers that attach on my ss20 to use device_t,
cfdata_t and CFATTACH_DECL_NEW().

fd/fdc could use better testing, but i'm pretty sure i got it right.
2011-07-17 23:18:23 +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
nakayama
02b9edfe03 Bring some fixes and minor differences from sparc64 version. 2011-07-16 11:15:52 +00:00
riz
4cea3314df BLOCK_SIZE->SPARC64_BLOCK_SIZE
BLOCK_ALIGN->SPARC64_BLOCK_ALIGN

XXX these values are unused in sparc;  this is merely to keep the sparc
and sparc64 versions of psl.h in sync, and to allow sparc to build again.
2011-07-15 19:30:08 +00:00
matt
7555545545 Add defines for extu_frac[ln]m 2011-07-10 04:49:37 +00:00
mrg
6b8ed60e71 avoid array bounds violation and use fr_fp and fr_pc. 2011-07-09 15:02:49 +00:00
dyoung
db2ed62f16 Missed another one: #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-06 20:47:05 +00:00
mrg
9cf7f1055f don't try to print fr_arg[6] since it doesn't exist. 2011-07-02 13:10:53 +00:00
dyoung
9aff02ebc1 #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:57:45 +00:00
dyoung
cf10107d5d #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 18:51:52 +00:00
dyoung
b6584574fc #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 18:41:51 +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
wiz
4cbd24b23f dependant -> dependent 2011-06-30 20:09:15 +00:00
pgoyette
f80eb73fce Initialize sensor states before registering 2011-06-20 16:33:42 +00:00
nakayama
74bd9793c1 Add fast softint(9) support for sparc64.
Reviewed on port-sparc64.
2011-06-18 18:51:17 +00:00
mrg
2f0815a35d remove some debugging output no longer necessary. 2011-06-18 02:05:08 +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
mrg
475fbccd2d enable options MODULAR, now that it is tested to work. 2011-06-12 01:44:06 +00:00
mrg
87bf821974 sparc relative reloctions are busted here; copy the sparc64 style
which seems to make things work fine, and also seems to follow what
ld.elf_so does.

this makes modules work in my limited testing.
2011-06-12 01:29:58 +00:00
tsutsui
595cbc6ae0 Split device_t/softc of am7930. No crash on TME and GXemul. 2011-06-04 01:27:57 +00:00
rmind
3df4c27d37 Revert maxdmap/maxsmap constification, as it causes problems on some
sparc models.  Reported by tsutsui@.
2011-06-03 17:58:18 +00:00
tsutsui
c22ffc3803 Split device_t/softc of i82586. No crash on TME emulating sun2. 2011-06-03 16:28:40 +00:00