Commit Graph

162348 Commits

Author SHA1 Message Date
hannken
c103a5683e Remove an include committed by accident.
From Chris Ross via current-users.
2007-10-07 14:48:38 +00:00
joerg
0c403c87a2 Merge intr.c (1.29.8.2) and ioapic.c (1.19.8.5) changes from jmcneill-pm:
Always write entries to all IOAPIC pins. The first 16 pins are
threated as ISA IRQs by default, the others like PCI IRQs. This avoids
inconsistencies based on incomplete BIOS setups. This resulted in early
ACPI SCI notifications to be lost, effectively breaking the Embedded
Controller on cold start on many notebooks.

Don't special case the IOAPIC setup between ioapic_attach and
ioapic_enable, always setup the correct redirections. Depend on
splhigh/disable_intr to stop interrupts and don't keep them masked in
the IOAPIC. This avoids unacknowleged edge interrupts and fixing the problem
of broken PS/2 keyboard when hitting keys during early boot.
2007-10-07 14:23:42 +00:00
xtraeme
ab21cdda12 sme_event_unregister: remove a goto that is not needed anymore. 2007-10-07 14:07:21 +00:00
xtraeme
2839febced Use two global dictionaries rather than only one:
- use one for temporary sensor dictionaries.
- use one as the dictionary that will be returned to send_dictionary().

This fixes multiple settings in multiple devices.
2007-10-07 13:48:03 +00:00
xtraeme
8259fb204b Use another main rule to avoid a conflict in the grammar.
Suggestion from martin@.
2007-10-07 13:46:22 +00:00
hannken
3856acafe2 Update the file system copy-on-write handler.
- Instead of hooking the handler on the specdev of a mounted file system
  hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'.  Use
  `mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2007-10-07 13:38:53 +00:00
joerg
18d2e98d25 Include sysctl on the amd64 boot floppy. This is useful for allowing
people to test suspend/resume and can be used to find other values as
well.
2007-10-07 13:12:15 +00:00
xtraeme
7447ac47db Xref envsys.conf(5) 2007-10-07 12:43:19 +00:00
joerg
4680156428 NetBSD doesn't have to care about missing bcmp on OpenBSD/SPARC,
just use memcmp in both kernel and userland.
2007-10-07 12:43:18 +00:00
xtraeme
bca7b7f673 Pass -I${.CURDIR} -I. like others do. 2007-10-07 12:19:37 +00:00
nisimura
1e20a40aee A typo fix in one of comments and some adjustments of register field names.
No functionality change intented.

IHAE "IP Header Alignment Enable" feature of RXC register;
- careful cross referencing at KSZ8692P/8841P/8842P PDFs indicates IHEA
  bit works as follows; When the feature is turned on, Rx DMA engine
  will populate Rx frame data in the Rx memory with +2 or +3 byte swifted
  to make its IP head field 32bit aligned.  The shift amount is recorded
  inside RDES0 to tell 0, 2 or 3.  The automatic alignment is done only
  when IHAE is enabled _and_ the Rx frame was IP frame.  In other cases,
  RDES0 swift amount field keeps 0.
- KSZ8841P document mentions the IHAE bit but its reference link is broken
  to tell the new RDES0 field.  KSZ8842P lacks both.  The bit usage of
  RDES0 23:20 seems different from KSZ8692P, which brings me a vague
  suspiction of documentation error.
2007-10-07 07:23:56 +00:00
xtraeme
21f9bf1683 Fix a typo. 2007-10-07 05:33:06 +00:00
xtraeme
2026f84dc1 Only print the message if the command ran successfully. 2007-10-07 05:30:56 +00:00
taca
a3cbbf6d39 Remove an unused variable at previous commit in listdir(). 2007-10-07 05:25:19 +00:00
xtraeme
b0a8720beb Accept '+' or '-' characters at the start of SP_STRING. 2007-10-07 05:11:08 +00:00
xtraeme
5c2d51b913 Sync with the new configuration file format and recent changes
to the envsys framework.
2007-10-07 04:19:51 +00:00
xtraeme
4b431f1771 Update for the new configuration file format for envstat(8)
and the envsys framework.

The rc.d has been simplified vastly... the configuration file now
is more powerful than ever!
2007-10-07 04:19:06 +00:00
xtraeme
73b39c8d03 Add envsys.conf(5). 2007-10-07 04:17:15 +00:00
xtraeme
f2803256d9 New configuration file format for the envsys framework:
foo0 {
	#
	# CPU Temperature
	#
	sensor0 {
		critical-max = 70C;
		critical-min = 20C;
	}
	...
}
...

Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).

To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.
2007-10-07 04:16:47 +00:00
xtraeme
6c4da82b5e New changes to support the new configuration file format for
envstat(8) and the envsys framework:

- Modify the ENVSYS_SETDICTIONARY ioctl to support the following
  plist structure:

  <dict>
	<key>foo0</key>
	<array>
		<dict>
			<key>index</key>
			<string>sensor0</string>
			<key>description</key>
			<string>cpu temp</string>
			...
			Another property for this sensor
			...
		</dict>
		...
		Another dictionary for other sensor
		...
	</array>
	...
	Another device as above
	...
  </dict>

  Multiple devices with multiple sensors can now be specified, that means
  that to set the properties only one copyin(9) is needed now.

- Added the ENVSYS_REMOVEPROPS ioctl, that accepts a boolean object
  "envsys-remove-props" and when set to true, all properties that were
  set previously by ENVSYS_SETDICTIONARY will be removed. That means that
  you can now set multiple critical limits, descriptions and all they
  will be removed or changed to its default value (for rfact and
  description objects).

- Added the 'index' and 'allow-rfact' objects into the sensor dictionaries,
  for better interactivity with userland. To know the position of the
  sensor and to know if sensor allows to change the rfact.

- Misc cosmetic changes for consistency.

- Use a two clause license for all my code.
2007-10-07 04:11:15 +00:00
christos
ab7f7a664a don't set obsolete flags in SETALL. From Anon Ymous 2007-10-07 01:23:17 +00:00
christos
fbe2281123 fix reversed comment. 2007-10-07 00:37:11 +00:00
xtraeme
cfba73e2fb Remove an extra prop_object_release(). 2007-10-06 22:12:04 +00:00
xtraeme
50509ea822 Forgot to change the kmem_zalloc(9) calls to use KM_NOSLEEP in previous,
as was suggested by rmind.
2007-10-06 22:07:42 +00:00
xtraeme
4814127d51 Fix a bug that happened when two or more events were received almost
at the same time and the code accessed to an unexistent dictionary:

- Rather than using a global dictionary, use a singly linked list to
  access to the dictionaries, one per event.
- When the dictionary has been sent to userland, destroy it and remove
  it from the list.

With that change it is possible to receive multiple events at the
same time without panics; again thanks to rmind@ for comments and help
with locking.

Reviewed and ok by rmind.
2007-10-06 21:58:40 +00:00
christos
b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +00:00
christos
9f1fcc0d86 portability fixes from joerg. 2007-10-06 20:19:52 +00:00
martin
167a3a9d68 Make it build without HAVE_WCHAR 2007-10-06 20:14:41 +00:00
martin
b3fd7f365b Make the non-WCHAR variant compilable. 2007-10-06 18:31:33 +00:00
yamt
3bae22298f kill another definition of bool. 2007-10-06 16:17:34 +00:00
bouyer
975e5c30a0 Move check for b_resid value to the right place. Should definitively fix
kern/36690.
2007-10-06 12:52:43 +00:00
reed
2d8c92dafd My last commit accidently added the links for some other manpages.
Remove those for now.
And commit them later at same time with distrib/sets/lists/base/mi.
Sorry!
2007-10-06 11:39:36 +00:00
xtraeme
8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
joerg
f4fa1c68c7 Merge from mpacpi.h 1.4.32.1, acpi_machdep.c 1.13.22.5 and
mpacpi.c 1.48.12.2 from jmcneill-pm:

Don't process the MADT and modify the interrupt config at one moment and
later trying to figure out if an entry was overriden and matches the
ACPI SCI. This is brain-dead and breaks in various situations.

Just check for each ISA override entry, if it matches the SCI. If it
does, remember it and use it for the interrupt setup. If there's no such
override assume that it is not changed, but override the polarity and
level from ISA settings to PCI settings.
2007-10-06 04:39:10 +00:00
joerg
a544202cb5 Merge from jmcneill-pm: Close a small race in the IOAPIC setup.
When changing the redirection entry for an interrupt, write the
high 32bit first. The low 32bit contain the mask bit and removing
that before setting the destionation ID can lead to lost interrupts.
2007-10-06 04:37:06 +00:00
dyoung
bae255a751 Note changes to raw sockets, gre(4). 2007-10-06 04:04:18 +00:00
dyoung
1dc4f12dca Change some ints to bools. 2007-10-06 03:35:14 +00:00
dyoung
2c54ff5913 Good-bye, kernel thread, we don't need you any longer. 2007-10-06 03:30:25 +00:00
ginsbach
8b26595b3a Changes for standards compliance:
- "If no $set directive is specified in a message text source file,
   all messages shall be located in an implementation-defined default
   message set NL_SETD."
- The n argument to $delset indicates the set number which should be
  in the range 1 to NL_SETMAX.

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition
2007-10-06 02:55:56 +00:00
xtraeme
07f9bca5af - sysmon_power_daemon_task: check if pev is valid before use.
- Add two more KASSERTS in strategic places.
2007-10-06 02:49:46 +00:00
ad
81e619b9a4 Update for jemalloc. 2007-10-06 01:09:48 +00:00
ad
9b64888c5d Use jemalloc as the default allocator unless USE_JEMALLOC=no. 2007-10-06 01:09:07 +00:00
uwe
bcb355867b Mark __COPYRIGHT strings as __used to bring them back, as gcc4
optimizes away __unused vars (but doesn't complain about them).
__used instructs it to keep them.

Per discussion with Christos.
2007-10-06 00:42:19 +00:00
uwe
6f23ef4104 Use .pushsection/.popsection instead of going "back" with .previous
(it does but has a side-effect) or .text (which is probably ok, but
still less kosher).

Make section macros work for traditional cpp (I guess we haven't used
that for a *long* time, b/c it was broken).

Use __unused instead of explicit attribute for __COPYRIGHT (to be
changed in the next commit).

Define __KERNEL_COPYRIGHT in terms of __COPYRIGHT rather than
duplicating the logic and accidentally inverting it.

Results in identical obj tree for an i386 build modulo ar archives
(with timestamps embedded) and few .o files (and programs they are
part of) that embed timestamps as strings.
2007-10-06 00:21:46 +00:00
ad
431267f955 Add USE_JEMALLOC. 2007-10-06 00:21:44 +00:00
ad
e7a9e46b7e Port to NetBSD. Note: posix_memalign() is here, but it's not exported
via the headers yet.
2007-10-05 23:42:23 +00:00
ad
8a475bcba1 Pull in jemalloc from FreeBSD:
FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp
2007-10-05 23:39:58 +00:00
ad
bf4b000d16 - Don't use the names malloc/free/etc, since we can end up pulling in libc's
malloc which is not what we want.
- Remove ancient memory compaction hack. Realloc on free memory is now an
  error again (from joerg@).

Ok christos@.
2007-10-05 22:21:07 +00:00
reed
0b6846c2d6 Add sysctl.conf man page. 2007-10-05 21:32:02 +00:00
reed
bced21f4e8 Add sysctl.conf.5 manpage.
Thank you, wiz, for the few mandoc suggestions.
I slightly reworded part of the description and removed the
advertising clause from the version I posted to tech-userlevel.
2007-10-05 18:49:43 +00:00