Commit Graph

1418 Commits

Author SHA1 Message Date
David E. O'Brien
469541bfde Only print out the "SMP: AP CPU #N Launched!" message on verbose boots.
The kernel printf() isn't race-free
2002-09-30 07:03:16 +00:00
Peter Wemm
feea0ab05b There is no need for start/num to be signed in i386_ldt_args. 2002-09-28 20:42:04 +00:00
Peter Wemm
bbe04fe2ca ISMEMSDP(), IS286GDP(), IS386GDP(), ISGDP(), ISSDP() and ISSYSSDP() are
not used anywhere anymore.
2002-09-26 05:07:41 +00:00
Mark Murray
82e5cdeb6e Fix a declaration that is actually supposed to be a macro definition.
Submitted by:	marius@alchemy.franken.de
2002-09-25 13:46:23 +00:00
Alfred Perlstein
4f492bfab5 use __packed. 2002-09-23 18:54:32 +00:00
John Baldwin
58eab4797a Update the nexus driver for the addition of the legacy driver:
- nexus no longer has PCI bridges as direct children, so the PCI bus
  ivar is no longer used and is removed.
- Don't attach default EISA, ISA, or MCA busses.  Instead, if we do not
  have an acpi0 device after bus_generic_probe(), add a legacy0 child
  device.
- Remove machine/nexusvar.h.
2002-09-23 16:03:00 +00:00
John Baldwin
e8e951ce31 Add a new legacy(4) device driver for use on machines that do not have
ACPI or for when ACPI support is disabled or not present in the kernel.
Basically, the nexus device is now split into two with some parts
(such as adding default ISA, MCA, and EISA busses if they aren't found
as well as support for PCI bus device ivars) being moved to the legacy
driver.
2002-09-23 15:50:06 +00:00
Peter Wemm
1a8ec9c55a PIC_GOTOFF is OBE. 2002-09-23 07:27:45 +00:00
Peter Wemm
691cb905d6 use __packed, rather than __attribute__((packed)). 2002-09-23 06:50:07 +00:00
Peter Wemm
c692fbe091 At great personal risk, add a __packed and __aligned(x) define that
expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively.  Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).

There are over 400 __attribute__((packed)) to deal with, that can come
later.  I just want to use __packed in new code rather than add more
gcc-ism's.
2002-09-23 05:55:10 +00:00
Peter Wemm
79af999017 Delete a whole bunch of compatability defines that we dont use anymore. 2002-09-23 05:04:05 +00:00
Mike Barcroft
c0d4804d67 Be careful not to define GCC-specific optimizations in the non-GCC
case.
2002-09-23 04:32:17 +00:00
Peter Wemm
eb1443c8dd Create inlines for ltr(sel), lldt(sel), lidt(addr) rather than
functions that have one instruction.
2002-09-22 04:45:21 +00:00
Mark Murray
d7ee442578 Provide in inline function for the (GNUC) assembler "hlt" instruction. 2002-09-21 18:26:53 +00:00
Peter Wemm
ea5d4bd842 Repo copied to <sys/smbus/smb.h> 2002-09-19 04:13:43 +00:00
Peter Wemm
37e255de3f Repo copied to <sys/iicbus/iic.h> 2002-09-19 04:13:29 +00:00
Mike Barcroft
86954511d2 Implement C99's va_copy() macro. 2002-09-18 07:33:16 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Jonathan Mini
9ba1547929 Add kernel support needed for the KSE-aware libpthread:
- Maintain fpu state across signals.
	- Save and restore FPU state properly in ucontext_t's.

Reviewed by:	deischen, julian
Approved by:	-arch
2002-09-16 19:25:41 +00:00
John Baldwin
c3ba1376f5 Add a function pci_probe_route_table() that returns true if our PCI BIOS
supports interrupt routing and if the specified PCI bus is present in the
routing table.
2002-09-06 22:15:44 +00:00
John Baldwin
8ab96fd8d0 - Add a pci_cfgintr_valid() function to see if a given IRQ is a valid
IRQ for an entry in a PCIBIOS interrupt routing ($PIR) table.
- Change pci_cfgintr() to except the current IRQ of a device as a fourth
  argument and to use that IRQ for the device if it is valid.
- If an intpin entry in a $PIR entry has a link of 0, it means that that
  intpin isn't connected to anything that can trigger an interrupt.  Thus,
  test the link against 0 to find invalid entries in the table instead of
  implicitly relying on the irqs field to be zero.  In the machines I have
  looked at, intpin entries with a link of 0 often have the bits for all
  possible interrupts for PCI devices set.
2002-09-06 17:08:07 +00:00
John Baldwin
4f99a443f0 Function prototypes don't need 'extern'. 2002-09-04 19:31:09 +00:00
Mike Barcroft
dd1b6791a8 Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all
architectures, move the definition directly into <time.h> and finish
the removal of <machine/ansi.h>.
2002-09-03 00:06:58 +00:00
Matthew Dillon
ec61f55d42 Reduce the maximum KVA reserved for swap meta structures from 70 to 32 MB.
Reduce the swap meta calculation by a factor of 2, it's still massive overkill.

X-MFC after: immediately
2002-08-31 21:15:29 +00:00
Peter Wemm
447b3772dc Change hw.physmem and hw.usermem to unsigned long like they used to be
in the original hardwired sysctl implementation.

The buf size calculator still overflows an integer on machines with large
KVA (eg: ia64) where the number of pages does not fit into an int.  Use
'long' there.

Change Maxmem and physmem and related variables to 'long', mostly for
completeness.  Machines are not likely to overflow 'int' pages in the
near term, but then again, 640K ought to be enough for anybody.  This
comes for free on 32 bit machines, so why not?
2002-08-30 04:04:37 +00:00
Jake Burkholder
bafbd49201 Renamed poorly named setregs to exec_setregs. Moved its prototype to
imgact.h with the other exec support functions.
2002-08-29 06:17:48 +00:00
Peter Wemm
97e2d5fc53 OK, I have had it with losing my console because the AP's print their "I am
alive!" message right as the scsi probe messages happen.  This is a bit
nasty, but it seems to work.  At the point that we unlock the AP's, briefly
wait till they are all done while we hold the console on their behalf.
2002-08-28 23:24:05 +00:00
Mike Barcroft
bd8e0716d9 Move several MI types from <machine/_types.h> to <sys/_types.h>.
These types are unlikely to ever become very MD.  They include:
clockid_t, ct_rune_t, fflags_t, intrmask_t, mbstate_t, off_t, pid_t,
rune_t, socklen_t, timer_t, wchar_t, and wint_t.

While moving them, make a few adjustments (submitted by bde):
o __ct_rune_t needs to be precisely `int', not necessarily __int32_t,
  since the arg type of the ctype functions is int.
o __rune_t, __wchar_t and __wint_t inherit this via a typedef of
  __ct_rune_t.
o Some minor wording changes in the comment blocks for ct_rune_t and
  mbstate_t.

Submitted by:	bde (partially)
2002-08-23 16:49:06 +00:00
Mike Barcroft
fb6cc33daf Make __clock_t use `unsigned long' rather than a fixed 32-bit integer
so that it changes to the correct size in IP32L64 mode.  Other
architectures don't have this issue.
2002-08-22 00:28:24 +00:00
Mike Barcroft
abbd890233 o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
  macros, which are only MD because of gratuitous differences between
  architectures.
o Change all headers to make use of this.  This mainly involves
  changing:
    #ifdef _BSD_FOO_T_
    typedef	_BSD_FOO_T_	foo_t;
    #undef _BSD_FOO_T_
    #endif
  to:
    #ifndef _FOO_T_DECLARED
    typedef	__foo_t	foo_t;
    #define	_FOO_T_DECLARED
    #endif

Concept by:	bde
Reviewed by:	jake, obrien
2002-08-21 16:20:02 +00:00
Maxime Henrion
579bb37015 Use the __BUS_ACCESSOR macro for NEXUS_ACCESSOR
instead of rolling our own implementation.

Reviewed by:	tmm
2002-08-20 13:50:17 +00:00
Hellmuth Michaelis
866a3fa2bf add support properly displaying and logging incoming telephone numbers (MSNs)
by looking at the "type of number" field and providing configurable hooks
to correct the numbers accordingly. See keywords add-prefix, prefix-national
and prefix-international in isdnd.rc(5).
This feature was implemented by Christian Ullrich <chris@chrullrich.de>
2002-08-12 07:53:55 +00:00
Hellmuth Michaelis
9ed6ae76c7 add experimental support for Data over Voice (DoV) outgoing calls.
based on patches received from Guy Ellis (guy@traverse.com.au),
Chris Collins (xfire@xware.cx) and Phillip Musumeci (phillip@cs.jcu.edu.au).
2002-08-11 15:47:26 +00:00
Alan Cox
8365d52166 o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-05 03:40:28 +00:00
Poul-Henning Kamp
14a3a6ea0b Move a prototype to the least wrong place.
Suggested by:	bde
2002-08-02 18:45:43 +00:00
Poul-Henning Kamp
ab4db9b74f The Elan SC520 MMCR is actually 16bit wide, so u_char is inconvenient. 2002-07-31 13:45:44 +00:00
Mitsuru IWASAKI
b69ed3f4c6 Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
Mike Barcroft
49545b3891 Create a new header <machine/_stdint.h> for storing MD parts of
<stdint.h>.  Previously, parts were defined in <machine/ansi.h> and
<machine/limits.h>.  This resulted in two problems:
  (1) Defining macros in <machine/ansi.h> gets in the way of that
      header only defining types.
  (2) Defining C99 limits in <machine/limits.h> adds pollution to
      <limits.h>.
2002-07-29 17:41:23 +00:00
Peter Wemm
e344afe7c9 Move SWTCH_OPTIM_STATS related code out of cpufunc.h. (This sort of stat
gathering is not an x86 cpu feature)
2002-07-21 05:22:16 +00:00
Mark Murray
4c5aee92a7 Beautify. This has the side effect of improving portability and
making lint work cleaner.

Inspired to do this by:	jhb
2002-07-18 15:56:46 +00:00
Poul-Henning Kamp
61658cf6a1 Add initialization code for the AMD Elan sc520 which maps the MMCR
into KVM and sets the i8254 frequency to the correct value.
2002-07-18 12:56:54 +00:00
Mark Murray
8306a37bbb Clean up the syntax WRT semicolons at the end of function-like-macros, and protect GCCisms from non-GNU compilers and lint. 2002-07-17 16:19:37 +00:00
Mark Murray
80a0ead4fe Wrap GNU specific code in ifdefs, and help lint out by providing
some alternative definitions.
2002-07-15 13:29:40 +00:00
Mark Murray
7e622d3c84 Cast to prevent "signed/unsigned comparison" warnings. 2002-07-15 13:27:43 +00:00
Mark Murray
bbcfaa6aa0 Warnings and lint-assisting fixes; mark unused function parameters as
unused; wrap GNUisms (asm code) in appropriate #ifdefs.
2002-07-15 13:25:15 +00:00
Peter Wemm
f1b665c8fe Revive backed out pmap related changes from Feb 2002. The highlights are:
- It actually works this time, honest!
- Fine grained TLB shootdowns for SMP on i386.  IPI's are very expensive,
  so try and optimize things where possible.
- Introduce ranged shootdowns that can be done as a single IPI.
- PG_G support for i386
- Specific-cpu targeted shootdowns.  For example, there is no sense in
  globally purging the TLB cache for where we are stealing a page from
  the local unshared process on the local cpu.  Use pm_active to track
  this.
- Add some instrumentation for the tlb shootdown code.
- Rip out SMP code from <machine/cpufunc.h>
- Try and fix some very bogus PG_G and PG_PS interactions that were bad
  enough to cause vm86 bios calls to break.  vm86 depended on our existing
  bugs and this was the cause of the VESA panics last time.
- Fix the silly one-line error that caused the 'panic: bad pte' last time.
- Fix a couple of other silly one-line errors that should have caused more
  pain than they did.

Some more work is needed:
- pmap_{zero,copy}_page[_idle].  These can be done without IPI's if we
  have a hook in cpu_switch.
- The IPI handlers need some cleanup.  I have a bogus %ds load that can
  be avoided.
- APTD handling is rather bogus and appears to be a large source of
  global TLB IPI shootdowns for no really good reason.

I see speedups of between 1.5% and ~4% on buildworlds in a while 1 loop.
I expect to see a bigger difference when there is significant pageout
activity or the system otherwise has memory shortages.

I have backed out a few optimizations that I had been using over the last
few days in order to be a little more conservative.  I'll revisit these
again over the next few days as the dust settles.

New option:  DISABLE_PG_G - In case I missed something.
2002-07-12 07:56:11 +00:00
Peter Wemm
da035a22eb Bah, move the invltlb counter to C code and hook a debug sysctl onto it. 2002-07-11 08:31:10 +00:00
Matthew Dillon
50b6a55512 Remove the critmode sysctl - the new method for critical_enter/exit (already
the default) is now the only method for i386.

Remove the paraphanalia that supported critmode.  Remove td_critnest, clean
up the assembly, and clean up (mostly remove) the old junk from
cpu_critical_enter() and cpu_critical_exit().
2002-07-10 20:15:58 +00:00
Mike Barcroft
f889202ba4 Remove label_t and physadr, which seem to have never been used in
FreeBSD.

Submitted by:	bde
2002-07-10 15:47:59 +00:00
Mike Barcroft
a6519e64cc Move the type definition of ointhand2_t from i386/include/types.h to
i386/isa/isa_device.h.  This is a more appropriate location and
helps restrict <machine/types.h> to only types that exist on all
platforms.
2002-07-09 01:16:18 +00:00
Mike Barcroft
ba5fe51088 Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro.  It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
2002-07-08 16:43:35 +00:00
Peter Wemm
a20ae49f93 Remove #define APIC_INTR_HIGHPRI_CLOCK - this is no longer used
(see i386/isa/intr_machdep.c 1.72)
2002-07-08 09:14:01 +00:00
Peter Wemm
fcdc053233 Cosmetic. Remove #if 0 definition of vtophys() - it predates 4MB pages.
Remove avtophys(), it isn't referenced anywhere.
2002-07-08 08:14:28 +00:00
Mike Barcroft
a19d429398 Since printf(3) now supports the `j' conversion specifier, use that
when printing intmax_t and uintmax_t.

Forgotten by:	mike
Noticed by:	bde
2002-06-30 05:48:03 +00:00
Julian Elischer
44990b8cb8 Add files that are new for KSE. 2002-06-29 07:04:59 +00:00
Ian Dowse
2f384b348a Make vm_pindex_t 64-bit on all platforms. This is necessary to avoid
overflows with the large file sizes that UFS2 permits.

Reviewed by:	dillon, alc, tegge
2002-06-23 21:57:19 +00:00
Mark Peek
73cb22707a Add additional cpuid feature flags and put into a canonical format.
MFC after:	1 week
2002-06-22 23:00:33 +00:00
John Polstra
d5de6c2a5f Fix several bugs in the i386 asm statements used to speed up Internet
checksumming.  These bugs could possibly cause bad code to be
generated at elevated optimization levels.

First, eliminate the use of preprocessor magic to form the address
fields of asm instructions.  It hid the actual addresses being
referenced from the compiler.  Without knowledge of all the data
dependencies, the compiler might possibly use optimizations which
would result in incorrect code.

Use "__asm __volatile" rather than "__asm" for instruction sequences
that pass information through the condition codes (the carry bit, in
this case).  Without __volatile, the compiler might add unrelated
code between consecutive __asm instructions, modifying the condition
codes.  I have seen GCC insert stack pointer adjustments in this
way, for example.  Unfortunately, GCC doesn't provide a way to
specify dependencies on the condition codes.  You can specify that
they are clobbered, but not that you are going to use them as input.

Finally, simplify the LOAD macro.  This macro is used as a poor
man's prefetch.  The simpler version gives the compiler more leeway
about just how it performs the prefetch.

MFC after:	1 week
2002-06-22 22:35:53 +00:00
Peter Wemm
2f9267ec23 Move the "- 1" into the RQB_FFS(mask) macro itself so that
implementations can provide a base zero ffs function if they wish.
This changes
  #define RQB_FFS(mask) (ffs64(mask))
  foo = RQB_FFS(mask) - 1;
to
  #define RQB_FFS(mask) (ffs64(mask) - 1)
  foo = RQB_FFS(mask);
On some platforms we can get the "- 1" for free, eg: those that use the
C code for ffs64().

Reviewed by:	jake (in principle)
2002-06-20 06:21:20 +00:00
Jens Schweikhardt
21dc7d4f57 Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
Alfred Perlstein
50225e2f48 Silence preprocessor warning, No need to use CONCAT with "," and "word". 2002-06-01 20:22:33 +00:00
Bruce Evans
136956ed12 Fixed the return value of fpsetmask(). The API requires inversion of the
mask on both input and output to fpsetmask(), but this was only done for
input, so fpsetmask() returned the complement of the old mask (ANDed with
the mask bitfield).

PR:		38170
MFC after:	4 weeks
2002-06-01 17:39:46 +00:00
Bruce Evans
511dab6218 Fixed style bugs in rev.1.9. 2002-06-01 17:27:16 +00:00
Doug Rabson
99bd783419 Move the definition of ElfN_Hashelt to common headers. The only platform
which has a different definition for this is alpha.
2002-05-30 08:32:18 +00:00
Jake Burkholder
d2ac231616 Make the run queue parameters machine dependent. Optimize 64 bit
architectures by using a 64 bit word for the bit array which keeps
track of non-empty queues.

Reviewed by:	peter
2002-05-25 01:12:23 +00:00
John Baldwin
6b8c698908 Rename pause() to ia32_pause() so it doesn't conflict with the pause()
function defined in <unistd.h>.  I didn't #ifdef _KERNEL it because the
mutex implementation in libpthread will probably need this.
2002-05-22 20:32:39 +00:00
John Baldwin
07508f90b6 Debug registers aren't selectors, so use saner names for the variables in
the inline functions for reading and writing the debug registers.
2002-05-22 13:29:18 +00:00
John Baldwin
2be69f326a - Sort the pause() inline into the appropriate location.
- Add many missing prototypes to the non-GCC section.
2002-05-22 13:27:05 +00:00
John Baldwin
0228ea4e0b Rename cpu_pause() to pause(). Originally I was going to make this an
MI API with empty cpu_pause() functions on other arch's, but this
functionality is definitely unique to IA-32, so I decided to leave it
as i386-only and wrap it in #ifdef's.  I should have dropped the cpu_
prefix when I made that decision.

Requested by:	bde
2002-05-22 13:19:22 +00:00
John Baldwin
bb0d293f15 Add an inline function cpu_pause() for the IA32 'pause' instruction. 2002-05-21 20:21:53 +00:00
Yoshihiro Takahashi
9b96eed728 Remove unneeded ## for GCC 3.1 2002-05-21 12:50:20 +00:00
Poul-Henning Kamp
6380601f64 Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
David E. O'Brien
10cd195e63 I reorganized a little bit too much in the backwards case. 2002-05-10 03:24:06 +00:00
David E. O'Brien
fc336fdfbb Gcc 3.1 varargs support. 2002-05-10 02:02:54 +00:00
Peter Wemm
db17c6fc07 Tidy up some loose ends.
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
  (this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
Mark Murray
db8f2e326c Stylify (mainly line up macro EOL-continuation \'s), and add a dummy
alternative for lint.
2002-04-21 10:49:00 +00:00
Tor Egge
de8218bb7b Fix typo in adjusted panic message.
Submitted by:	cokane
2002-04-17 22:41:58 +00:00
Tor Egge
50c15af4da Update io_apic_ints array properly when revoking an irq mapping.
Adjust panic message.

Submitted by:	David Xu <bsddiy@yahoo.com>
2002-04-17 18:27:10 +00:00
David Malone
a983fdfe4c Move do_cpuid into the correct place in this file and make
the indentation more like the other multi-line assembley in
this file.

Someone who understands gcc constraints could update the
constraints for do_cpuid.
2002-04-10 21:18:46 +00:00
Mike Barcroft
49285705cc Remove the hack for segsz_t from <sys/types.h>; use the normal
_BSD_FOO_T_ method for defining segsz_t.
2002-04-10 15:58:13 +00:00
Mike Barcroft
7f0f1cfd57 Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, and
_BYTE_ORDER.  These are far more useful than their non-underscored
equivalents as these can be used in restricted namespace environments.
Mark the non-underscored variants as deprecated.
2002-04-10 14:39:14 +00:00
Poul-Henning Kamp
2ce7d7a033 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
Poul-Henning Kamp
1aec374128 machine/uc_device.h was only here for USERCONFIG and kget(1).
We have neither anymore.
2002-04-09 11:04:42 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Matthew Dillon
182da8209d Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()
and cpu_critical_exit() and moves associated critical prototypes into their
own header file, <arch>/<arch>/critical.h, which is only included by the
three MI source files that need it.

Backout and re-apply improperly comitted syntactical cleanups made to files
that were still under active development.  Backout improperly comitted program
structure changes that moved localized declarations to the top of two
procedures.  Partially re-apply one of the program structure changes to
move 'mask' into an intermediate block rather then in three separate
sub-blocks to make the code more readable.  Re-integrate bug fixes that Jake
made to the sparc64 code.

Note: In general, developers should not gratuitously move declarations out
of sub-blocks.  They are where they are for reasons of structure, grouping,
readability, compiler-localizability, and to avoid developer-introduced bugs
similar to several found in recent years in the VFS and VM code.

Reviewed by:	jake
2002-04-01 23:51:23 +00:00
John Baldwin
e6c838590e GC #if 0'd assembly mutex micro operations. If someone wants to bring
these back later then can get them from the attic.  Also, GC, some stale
macros to acquire and release sleep mutexes in assembly.
2002-03-28 15:14:23 +00:00
Matthew Dillon
d74ac6819b Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call,
cpu_critical_fork_exit().  Cleanup the td_savecrit field by moving it
from MI to MD.  Temporarily move cpu_critical*() from <arch>/include/cpufunc.h
to <arch>/<arch>/critical.c (stage-2 will clean this up).

Implement interrupt deferral for i386 that allows interrupts to remain
enabled inside critical sections.  This also fixes an IPI interlock bug,
and requires uses of icu_lock to be enclosed in a true interrupt disablement.

This is the stage-1 commit.  Stage-2 will occur after stage-1 has stabilized,
and will move cpu_critical*() into its own header file(s) + other things.
This commit may break non-i386 architectures in trivial ways.  This should
be temporary.

Reviewed by:	core
Approved by:	core
2002-03-27 05:39:23 +00:00
Hellmuth Michaelis
3c1d185c2a Add support for Q.931 subaddresses.
Submitted by: Steven Looman <fsteevie@wish.net>
2002-03-26 15:13:54 +00:00
David E. O'Brien
c543d983fa Guard against redefining __gnuc_va_list. 2002-03-24 11:25:46 +00:00
Bruce Evans
809dbbc99b Fixed some style bugs in the removal of __P(()). The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.
2002-03-23 15:09:35 +00:00
Bruce Evans
fa9c948c1c Fixed some style bugs in the removal of __P(()). The main ones were
not removing tabs before "__P((", and not outdenting continuation lines
to preserve non-KNF lining up of code with parentheses.  Switch to KNF
formatting and/or rewrap the whole prototype in some cases.
2002-03-23 14:27:06 +00:00
David E. O'Brien
439a4003ab ASM versions of __FBSDID. 2002-03-23 02:01:27 +00:00
Warner Losh
ba74981e71 Fix abuses of cpu_critical_{enter,exit} by converting to
intr_{disable,restore} as well as providing an implemenation of
intr_{disable,restore}.

Reviewed by: jake, rwatson, jhb
2002-03-21 06:19:08 +00:00
Warner Losh
e7b110dcf7 Fix minor style(9) violation in de__Ping 2002-03-20 19:04:56 +00:00
Alfred Perlstein
15fe306743 Remove __P. 2002-03-20 08:56:31 +00:00
Alfred Perlstein
b63dc6ad47 Remove __P. 2002-03-20 05:48:58 +00:00
Hellmuth Michaelis
e0d83003c4 Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD,
OpenBSD and BSD/OS and respective code, remove pre $FreeBSD CVS id's,
remove #if(def)s and respective code for FreeBSD versions < 5 .
2002-03-17 09:33:15 +00:00
Dag-Erling Smørgrav
a2e0658045 Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to the
MI ptrace.h, since all platforms define them.  Keep the MD ptrace.h around
for FIX_SSTEP (which is currently only needed on Alpha).
2002-03-16 00:25:53 +00:00
Mike Barcroft
d846855da8 o Don't require long long support in bswap64() functions.
o In i386's <machine/endian.h>, macros have some advantages over
  inlines, so change some inlines to macros.
o In i386's <machine/endian.h>, ungarbage collect word_swap_int()
  (previously __uint16_swap_uint32), it has some uses on i386's with
  PDP endianness.

Submitted by:	bde

o Move a comment up in <machine/endian.h> that was accidentially moved
  down a few revisions ago.
o Reenable userland's use of optimized inline-asm versions of
  byteorder(3) functions.
o Fix ordering of prototypes vs. redefinition of byteorder(3)
  functions, so that the non-GCC (libc asm) case has proper
  prototypes.
o Add proper prototypes for byteorder(3) functions in <sys/param.h>.
o Prevent redundant duplicate prototypes by making use of the
  _BYTEORDER_PROTOTYPED define.
o Move the bswap16(), bswap32(), bswap64() C functions into MD space
  for platforms in which asm versions don't exist.  This significantly
  reduces the complexity of some things at the cost of duplicate code.

Reviewed by:	bde
2002-03-09 21:02:16 +00:00
Hellmuth Michaelis
a6cd6fedf9 after joerg's recent merge of i4b's sppp with the main sppp, remove
now obsolete file.
2002-03-09 13:31:56 +00:00