Commit Graph

9636 Commits

Author SHA1 Message Date
Joerg Wunsch
d93dea685d Fix a long-standing bug that had been introduced in rev 1.24 with the
replacement of struct proc by struct thread.  This bug could cause a
NULL pointer dereferencation under certain circumstances (e. g. while
running /etc/rc.d/pcvt).
2004-01-07 10:12:59 +00:00
John Baldwin
c8d7ed0d05 - Use i8259A register defines from shared sys/dev/ic/i8259.h rather than
from the i386-specific icu.h.
- Replace PC98 magic numbers with equivalent register define values along
  with comments about PC-98 "quirks".
2004-01-06 19:07:08 +00:00
Jacques Vidrine
1d0342a3d5 Use ANSI C function definition for _mcount' and remove static'
prototype from header file.

Discussed with:	bde, maybe one year ago
2004-01-06 18:49:54 +00:00
Poul-Henning Kamp
883bd55abd Add struct definition of the Elan MMCR registers (from jb@)
Put a CTASSERT() on the size of the struct.

Use the struct where it is easy to do so in elan_mmcr.c

Add the Elan specific hardware reset code (also from jb@).
2004-01-05 12:00:59 +00:00
David E. O'Brien
c53cdbeb95 Attempt to make the proper changes here for the proc.h commit:
Make sigaltstack as per-threaded, because per-process sigaltstack state
  is useless for threaded programs, multiple threads can not share same
  stack.
  The alternative signal stack is private for thread, no lock is needed,
  the orignal P_ALTSTACK is now moved into td_pflags and renamed to
  TDP_ALTSTACK.
  For single thread or Linux clone() based threaded program, there is no
  semantic changed, because those programs only have one kernel thread
  in every process.

which left out SVR4 bits.
2004-01-05 00:29:00 +00:00
David Xu
9b778a1611 Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.
2004-01-03 23:31:29 +00:00
Poul-Henning Kamp
c991bedb18 Hook the CPU_GEODE option up.
This option is mandatory on platforms like the Soekris 4801 because the
i8254 hardware is buggy.
2004-01-03 18:43:37 +00:00
David Xu
a30ec4b99c Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.

Reviewed by: deischen, dfr
2004-01-03 02:02:26 +00:00
Nate Lawson
0906e0c58f Use <machine/asmacros.h> since <machine/asm.h> is a userland-only header
and gives very wrong macros for ENTRY(), etc. for kernel programs.

PR:
Suggested by:	bde
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-01-01 22:57:22 +00:00
John Baldwin
21e25fa607 Replace an outb() during the test for configuration mechanism #1 with a
DELAY(1) instead.  After wading through old commit logs, I found that the
outb() was added not as part of the test but as an intentional delay. In
fact, according to Shanley's PCI book, the configuration 1 data and address
ports should only be accessed using aligned 32-bit accesses (i.e. inl()
and outl()).  Thus, using outb() to just the last byte of the port violates
the PCI spec it would seem.  On at least one box doing so broke the probe
for PCI, whereas changing it to a DELAY(1) fixed the probe.

Reported by:	Sean Welch <welchsm@earthlink.net>
MFC after:	1 week
2003-12-31 16:56:32 +00:00
Bruce Evans
42033f49c1 Garbage-collected CLK_USE_TSC_CALIBRATION.
i386/conf/NOTES, pc98/conf/NOTES:
Fixed the descriptions of the other CLK_* options.
2003-12-30 07:28:54 +00:00
Bruce Evans
ff22c670d9 Sorted includes. Removed duplicates exposed by this. 2003-12-29 06:51:10 +00:00
Bruce Evans
6d7d464994 Sorted includes. 2003-12-29 06:47:38 +00:00
Alan Cox
a41c6c2ad6 Don't bother clearing PG_ZERO on the page table page in _pmap_allocpte();
it serves no purpose.
2003-12-28 23:57:09 +00:00
Mike Silbersack
ddeb5b242e Track three new sendfile-related statistics:
- The number of times sendfile had to do disk I/O
- The number of times sfbuf allocation failed
- The number of times sfbuf allocation had to wait
2003-12-28 08:57:09 +00:00
Alan Cox
8eaddab161 Don't bother clearing and setting PG_BUSY on page table directory pages. 2003-12-28 05:10:21 +00:00
Mike Silbersack
5caf2b00f0 Move the declaration of sfbufspeak and sfbufsused to mbuf.h,
and use imax instead of max, as sfbufspeak and sfbufsused
are signed.

Submitted by:   bde
2003-12-28 01:43:22 +00:00
Mike Silbersack
5eda9873e9 Track current and peak sfbuf usage, export the values via sysctl. 2003-12-27 07:52:47 +00:00
Peter Wemm
c15e347e22 GC the unused <machine/kse.h> file. 2003-12-24 00:51:30 +00:00
Peter Wemm
bdbbbb1bb9 GC unused 'syshide' override to /dev/null. This was here to disable
the output of the namespc column.  Its functionality was removed some time
ago, but the overrides and the namespc column remained.
2003-12-24 00:32:07 +00:00
Peter Wemm
78cb533a0c Oops, remove references to namespc column in comment (I'm not going to
bother regenerating after this)
2003-12-24 00:17:24 +00:00
Peter Wemm
18513a2e43 Regen. (This should have been a NOP except it hasn't been regenerated
after makesyscalls.sh changes and the last few syscall.master changes, and
there have been some tree-sweeps that have touched generated files).
2003-12-24 00:15:20 +00:00
Peter Wemm
17ac3054d4 GC namespc column and unwrap long lines that now fit. 2003-12-24 00:14:08 +00:00
Peter Wemm
ff7a52b4b5 Regen (should be a NOP except for rcsid changes) 2003-12-23 03:55:06 +00:00
Peter Wemm
eca6e6472d GC unused third namespace column. 2003-12-23 03:54:40 +00:00
Peter Wemm
9b68618df0 Add an additional field to the elf brandinfo structure to support
quicker exec-time replacement of the elf interpreter on an emulation
environment where an entire /compat/* tree isn't really warranted.
2003-12-23 02:42:39 +00:00
Alan Cox
925692caa5 - Significantly reduce the number of preallocated pv entries in
pmap_init().  Such a large preallocation is unnecessary and wastes
   nearly eight megabytes of kernel virtual address space per gigabyte
   of managed physical memory.
 - Increase UMA_BOOT_PAGES by two.  This enables the removal of
   pmap_pv_allocf().  (Note: this function was only used during
   initialization, specifically, after pmap_init() but before
   pmap_init2().  During pmap_init2(), a new allocator is installed.)
2003-12-22 01:01:32 +00:00
John Baldwin
1c0e864486 MFamd64: Remove i386_protection_init() and the protection_codes[] array
and replace them with a simple if test to turn on PG_RW.  i386 != vax.
2003-12-18 21:15:18 +00:00
Brian Feldman
4d33ee7c6a Hey, how about we NOT make modules crash 486s? 2003-12-17 00:51:47 +00:00
Jeff Roberson
7085b1c597 - Call mp_topology() after all CPUs have been probed. 2003-12-11 03:49:02 +00:00
Jeff Roberson
59f3a8e626 - Add the mp_topology() function to mp_machdep.c. This function builds up
the smp_topology structure to reflect the layout of HTT enabled machines.
 - Add a prototype for mp_topology() in smp.h
2003-12-11 03:48:31 +00:00
John Baldwin
d7944232dd Delete old and unused APIC_IRQ defines. 2003-12-10 21:33:07 +00:00
John Baldwin
62d1198ba5 Use NAPICID for the maximum number of local APICs rather than MAXCPU when
doing the HTT fixup.   This is a step closer to possibly having an apic.ko
module someday.
2003-12-10 19:29:39 +00:00
John Baldwin
3f19e465b9 Correct usage of MAXCPU. The MAXCPU value itself is not a valid CPU ID
value as it is a count of maximum values.

Reported by:	bde
2003-12-10 19:28:37 +00:00
David E. O'Brien
70005bdb38 Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.h
such that 'ispcvt' can build.  Unforunately 'ispcvt' is needed in order for
/etc/rc.d/syscons to run.  This fixes the bug where I could not get my
keymap effective at boot.
2003-12-10 02:49:17 +00:00
Nate Lawson
cac6460cfe Use the ACPI-CA definitions for the various APIC tables instead of our
own.
2003-12-09 03:04:19 +00:00
David E. O'Brien
a5b5101f5e Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr
as these ioctl's aren't MD.  This also means they are installed in
/usr/include/dev/bktr now.  Also provide compatability wrappers for
where these headers lived in 4.x.
2003-12-08 07:22:42 +00:00
Alan Cox
a5819cb5b5 Don't remove the virtual-to-physical mapping when an sf_buf is freed.
Instead, allow the mapping to persist, but add the sf_buf to a free list.
If a later sendfile(2) or zero-copy send resends the same physical page,
perhaps with the same or different contents, then the mapping overhead is
avoided and the sf_buf is simply removed from the free list.

In other words, the i386 sf_buf implementation now behaves as a cache of
virtual-to-physical translations using an LRU replacement policy on
inactive sf_bufs.  This is similar in concept to a part of
http://www.cs.princeton.edu/~yruan/debox/ patch, but much simpler in
implementation.  Note: none of this is required on alpha, amd64, or ia64.
They now use their direct virtual-to-physical mapping to avoid any
emphemeral mapping overheads in their sf_buf implementations.
2003-12-07 22:49:25 +00:00
Warner Losh
05a463a03d Ooops. These are still used by the bktr driver. David O'Brien has
plans for dealing, but I'll let him deal.

Pointy hat to: imp@
2003-12-07 06:37:32 +00:00
Warner Losh
65b4a1b917 Remote meteor driver. It hasn't compiled in over 3 years. If someone
makes it compile again, and can test it, we can restore the driver to
the tree.
2003-12-07 04:41:11 +00:00
Warner Losh
6ee2f106aa The dgb driver is redundant with the digi driver in the tree. It uses
lots of old interfaces, and digi now supports all cards that dgb
supported.  The author of the driver says that this is no longer
necessary.

Approved by: babkin@
2003-12-07 04:18:52 +00:00
Warner Losh
6631471980 First part of the removal of drivers for hardware that isn't relevant
or whose drivers haven't even compiled for years.

The loran hardware was very unique, and only a few copies of it ever
existed.  It used the old COMPAT_ISA_DRIVER and when the author was
contacted, he indicated that he had no intention of ever updating this
driver and it was no longer relevant to the FreeBSD world and can be
removed without impact to anybody.

Approved by: phk
2003-12-07 03:51:19 +00:00
Warner Losh
29aad12185 File forgotten in the cx shuffle.
Pointed out by: Roman Kurakin
Approved by: re@ <scottl> (under go ahead and commit new cx approval)
2003-12-05 06:52:05 +00:00
Poul-Henning Kamp
5d341674fe Fix yet an oversight in my ELAN_* to CPU_ELAN_* debrucification commit.
Approved by:	re@
2003-12-04 19:57:56 +00:00
Warner Losh
b8b831f0ad Remove cx in its old location.
Approved by: re@ <scottl>
2003-12-03 23:07:37 +00:00
Warner Losh
ac44076d62 Connect the cx driver to its new location in the tree.
Update notes to reflect that cx is no longer a counted device
Update options for new cx option
# commented out ELAN_PPS and ELAN_XTAL since they produced errors

Submitted by: rik@cronyx.ru
Approved by: re@ <scottl>
2003-12-03 23:06:30 +00:00
John Baldwin
8eca42d505 - Reenable building of the ACPI module on i386.
- Remove 'device acpi' from i386 GENERIC and revert back to using ACPI as
  a module by default.

Approved by:	re (scottl / blanket)
2003-12-03 21:13:06 +00:00
John Baldwin
4a211a60e5 - Remove the hack to prevent the acpi module from loading.
- Add a really, really, nasty hack to provide stub versions of all of
  the 'device apic' functions used by the ACPI MADT APIC enumerator if
  'device apic' is not compiled into the kernel.  This is gross but is
  the best we can do with the current kernel linker implementation.

Approved by:	re (scottl / blanket)
2003-12-03 21:12:09 +00:00
John Baldwin
6afad3b055 - Reorder the APIC enumerator SYSINIT's to register enumeators at
SI_SUB_CPU - 1 and probe enumerators, probe CPUs, and setup the local
  APIC programming all at SI_SUB_CPU / SI_ORDER_FIRST.  This is needed to
  help get the ACPI module working again as it moves the APIC enumeration
  code after SI_SUB_KLD.
- In the MADT parser, use mp_maxid rather than MAXCPU to terminate a loop
  when assigning per-cpu ACPI IDs to avoid a dependency on 'options SMP'.
- Allow the apic device to be disabled via 'hint.apic.0.disabled' from the
  loader.  Note that since this is done in the local APIC code, it works
  for both the ACPI and non-ACPI cases.

Approved by:	re (scott / blanket)
2003-12-03 20:33:18 +00:00
John Baldwin
b6c71225a9 Fix all users of mp_maxid to use the same semantics, namely:
1) mp_maxid is a valid FreeBSD CPU ID in the range 0 .. MAXCPU - 1.
2) For all active CPUs in the system, PCPU_GET(cpuid) <= mp_maxid.

Approved by:	re (scottl)
Tested on:	i386, amd64, alpha
2003-12-03 14:57:26 +00:00