Commit Graph

224 Commits

Author SHA1 Message Date
peter
4694b279a2 Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this
stuff.
2001-08-21 02:32:59 +00:00
obrien
7797d96f52 Minor style(9)'ing 2001-08-16 10:13:34 +00:00
obrien
358f773cec style(9) and make consistent across platforms 2001-08-16 09:29:35 +00:00
ache
2675b7e4e4 OFF_T -> OFF (more standard style) 2001-08-15 19:50:59 +00:00
jhb
e9e129df6a The 'astpending' variable is already declared in trap.c (and unused in
FreeBSD besides).
2001-08-15 19:39:54 +00:00
jhb
a0d55b836f FreeBSD doesn't use a want_resched variable. Instead, the PS_NEEDRESCHED
p_sflag is managed in a MI fashion.
2001-08-15 19:39:09 +00:00
ache
77b2a90ced Add OFF_T_MAX/OFF_T_MIN 2001-08-15 19:25:08 +00:00
obrien
09d3a96a2f Style changes to commonize the various platforms. 2001-08-15 04:02:41 +00:00
jhb
4a89454dcd - Close races with signals and other AST's being triggered while we are in
the process of exiting the kernel.  The ast() function now loops as long
  as the PS_ASTPENDING or PS_NEEDRESCHED flags are set.  It returns with
  preemption disabled so that any further AST's that arrive via an
  interrupt will be delayed until the low-level MD code returns to user
  mode.
- Use u_int's to store the tick counts for profiling purposes so that we
  do not need sched_lock just to read p_sticks.  This also closes a
  problem where the call to addupc_task() could screw up the arithmetic
  due to non-atomic reads of p_sticks.
- Axe need_proftick(), aston(), astoff(), astpending(), need_resched(),
  clear_resched(), and resched_wanted() in favor of direct bit operations
  on p_sflag.
- Fix up locking with sched_lock some.  In addupc_intr(), use sched_lock
  to ensure pr_addr and pr_ticks are updated atomically with setting
  PS_OWEUPC.  In ast() we clear pr_ticks atomically with clearing
  PS_OWEUPC.  We also do not grab the lock just to test a flag.
- Simplify the handling of Giant in ast() slightly.

Reviewed by:	bde (mostly)
2001-08-10 22:53:32 +00:00
peter
bb5c43c4b8 Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since they
are a really nasty interface that should have been killed long ago
when 'ptrace(PT_[SG]ETREGS' etc came along.  The entity that they
operate on (struct user) will not be around much longer since it
is part-per-process and part-per-thread in a post-KSE world.

gdb does not actually use this except for the obscure 'info udot'
command which does a hexdump of as much of the child's 'struct user'
as it can get.  It carries its own #defines so it doesn't break
compiles.
2001-08-08 05:25:15 +00:00
jhb
77e6dbf699 Axe unused and invalid astpending globaldata member. 2001-08-04 20:47:54 +00:00
jhb
f7ff4f9c87 Axe unused and invalid GD_ASTPENDING symbol. 2001-08-04 20:46:46 +00:00
jake
21b80f4133 Use a machine dependent type, Elf_Hashelt, for the elements of the elf
dynamic symbol table buckets and chains.  The sparc64 toolchain uses 32
bit .hash entries, unlike other 64 bits architectures (alpha), which use
64 bit entries.

Discussed with: dfr, jdp
2001-07-31 03:46:39 +00:00
peter
036aced92f Make PMAP_SHPGPERPROC tunable. One shouldn't need to recompile a kernel
for this, since it is easy to run into with large systems with lots of
shared mmap space.

Obtained from:	yahoo
2001-07-27 01:08:59 +00:00
bmilekic
0caeab3ccd - Do not handle the per-CPU containers in mbuf code as though the cpuids
were indices in a dense array. The cpuids are a sparse set and treat
  them as such, setting up containers only for CPUs activated during
  mb_init().

- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse
  map, in accordance with the above.

This allows us to properly boot with certain CPUs disactivated. However, if
we later decide to re-activate said CPUs, we will barf until we decide to
implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU
containers to get configured on their activation.

Reported by: mjacob
Partially (sys/ diffs) Submitted by: mjacob
2001-07-26 18:47:46 +00:00
dillon
1cf218e40f Move vm_page_zero_idle() from machine-dependant sections to a
machine-independant source file, vm/vm_zeroidle.c.  It was exactly the
same for all platforms and updating them all was getting annoying.
2001-07-05 01:32:42 +00:00
dillon
93369f554a Reorg vm_page.c into vm_page.c, vm_pageq.c, and vm_contig.c (for contigmalloc).
Also removed some spl's and added some VM mutexes, but they are not actually
used yet, so this commit does not really make any operational changes
to the system.

vm_page.c relates to vm_page_t manipulation, including high level deactivation,
activation, etc...  vm_pageq.c relates to finding free pages and aquiring
exclusive access to a page queue (exclusivity part not yet implemented).
And the world still builds... :-)
2001-07-04 23:27:09 +00:00
dillon
e028603b7e With Alfred's permission, remove vm_mtx in favor of a fine-grained approach
(this commit is just the first stage).  Also add various GIANT_ macros to
formalize the removal of Giant, making it easy to test in a more piecemeal
fashion. These macros will allow us to test fine-grained locks to a degree
before removing Giant, and also after, and to remove Giant in a piecemeal
fashion via sysctl's on those subsystems which the authors believe can
operate without Giant.
2001-07-04 16:20:28 +00:00
jhb
f43dc7e223 Allow Giant to be recursed when a process terminates. 2001-07-03 05:09:48 +00:00
imp
8555c6bb29 Don't need the .keep_me files. Obrien and I committed past each other.
Add 0-9 to the list of possible kernel names at matsushita-san's
suggestion.

Submitted by: Makoto MATSUSHITA-san <matusita@jp.FreeBSD.org>
2001-07-01 23:35:44 +00:00
benno
d5219f43a7 Don't include machine/autoconf.h for now. It's not used and is breaking the
build.
2001-07-01 02:45:15 +00:00
benno
36e4d57292 Register definitions for the OpenPIC used in various models of
iMac/PowerMac/iBook/PowerBook.

Obtained from:	NetBSD
2001-07-01 02:43:38 +00:00
benno
47eaf0390a Add TRAPF_* macros required by MI-ification of ast() and userret().
Submitted by:	Mark Peek <mark@whistle.com>
2001-07-01 02:38:38 +00:00
obrien
401c637a19 Ensure sys/${MACHINE}/compile/FOO exists
Reviewed by: arch, imp, peter, and the USENIX terminal room secret kernel cabal
2001-06-30 15:16:29 +00:00
imp
79f0cebcfb Really do proper keepme files in the compile directories. Use
.cvsignore file for [A-Za-z]* to keep these directories around rather
than waste a file on .keepme.  This should also make people's built
trees place nice with CVS.

Idea for .cvsignore: peter (although I suggested the regexp)
Pointed out by: Makoto MATSUSHITA-san <matusita@jp.FreeBSD.org>
Llama's costuming by: Fernamdo Llamas
2001-06-30 14:38:32 +00:00
obrien
9758e66106 Ensure sys/${MACHINE}/compile/FOO exists
Reviewed by: arch, imp, peter and
  the USENIX terminal room secret kernel cabal
2001-06-30 07:12:34 +00:00
jhb
cbc88996c6 Move ast() and userret() to sys/kern/subr_trap.c now that they are MI. 2001-06-29 19:51:37 +00:00
jhb
d82893e676 Add a new MI pointer to the process' trapframe p_frame instead of using
various differently named pointers buried under p_md.

Reviewed by:	jake (in principle)
2001-06-29 11:10:41 +00:00
benno
c88bce56d6 Put back the two semicolons I accidentally lost while reformatting this to
bring it closer to style(9).

Spotted by:	Mark Peek <mark@whistle.com>
2001-06-28 09:56:59 +00:00
benno
a9c335b97c Code for dealing with external interrupts.
Obtained from:	NetBSD
2001-06-27 12:33:51 +00:00
benno
87e9f9315f Fix comment breakage. 2001-06-27 12:20:48 +00:00
benno
a304a71cd2 Fix the atomic_*_32 operations. These were written before I had the ability
to test them properly and before I had a working knowledge of GCC asm
constraints.
2001-06-27 12:17:23 +00:00
benno
cbd5efc8f5 Don't initialise ret in atomic_cmpset_32.
Add more synchronisation.
2001-06-26 13:54:17 +00:00
benno
b55c34215e Fix asm constraints for atomic_cmpset_32. This fix may also be needed
elsewhere.
2001-06-24 06:36:28 +00:00
benno
e3a9691522 More verbose version of identifycpu() which also contains many more CPU
versions/revisions.

Modified from the original patch to mark G3 and G4 processors as such.

Submitted by:	Jeff Schottmiller <jeff@neoscale.com>
2001-06-19 13:27:33 +00:00
benno
b8d88b43ff The final commit for the first phase of PowerPC support.
This adds the config stuff needed to build kernels.

Reviewed by:	obrien
2001-06-17 09:39:44 +00:00
benno
f371c393d1 This commit (along with one pending in sys/dev/ofw and one in sys/conf) give
us our first minimal glimpse of PowerPC support.

With this code we can get to the "mountroot>" prompt on my Apple iMac.  We
can't get any further due to lack of clock and interrupt handling, among other
things.  This does however mean that pmap and VM are initialising.

We're fairly dependant on OpenFirmware at this point, but I hope to add
support for other classes of firmware at a later stage.

Reviewed by:	obrien, dfr
2001-06-16 07:14:07 +00:00
obrien
1eb2fa3348 Add CVS id. 2001-06-15 22:54:33 +00:00
benno
dced41b010 Bring in NetBSD code used in the PowerPC port.
Reviewed by:	obrien, dfr
Obtained from:	NetBSD
2001-06-10 02:39:37 +00:00
obrien
b87b49d4db fix RCS ID style nit 2001-06-09 16:54:11 +00:00
obrien
5645a0aeb1 ID style nit. 2001-06-09 05:24:14 +00:00
obrien
35e12ff56e Style fix FreeBSD ID, and change continuation style slightly. 2001-06-09 05:01:24 +00:00
phk
b2f9beade9 Properly wrap mtx_intr_enable() macro in "do $bla while (0)" 2001-06-02 08:17:42 +00:00
jhb
9a95925dcf GC #if 0'd calls to releasing and acquiring the old style giant kernel
lock.
2001-05-29 23:35:48 +00:00
ru
35437d86aa - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION file
systems were repo-copied from sys/miscfs to sys/fs.

- Renamed the following file systems and their modules:
  fdesc -> fdescfs, portal -> portalfs, union -> unionfs.

- Renamed corresponding kernel options:
  FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS.

- Install header files for the above file systems.

- Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland
  Makefiles.
2001-05-23 09:42:29 +00:00
gallatin
1c57c3b027 catch these files up to their i386 neighbors to make alpha boot
prior to the vm_mtx
2001-05-21 16:04:24 +00:00
obrien
b8425680b5 Make _BSD_TIME_T_ (time_t) an int' rather than long'. This will help
flag errors where programmers assume time_t is a long, which it is not on
64-bit platforms.

Submitted by:	bde
2001-05-18 01:43:25 +00:00
obrien
f536c9bfce Style changes -- revert ordering to mostly two revs ago.
Embellish some comments, fix tab'ing.

Requested by:	bde
2001-05-18 01:40:40 +00:00
obrien
89ba5881e5 Consistently define the rune types.
Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
2001-05-16 22:32:44 +00:00
obrien
9e804492ab Move the int typedefs to the top so they can be used in defining other types.
Ensure every platform has __offsetof.
Make multiple inclusion detection consistent with other
  <platform>/include/*.h files.
2001-05-16 22:21:43 +00:00