Commit Graph

163052 Commits

Author SHA1 Message Date
pooka 85efd8ec20 set mask and dirmask to 0777 by default 2007-11-04 19:42:56 +00:00
pooka 0be31eefc7 Allocate buf using getiobuf() instead of abusing the stack. 2007-11-04 19:37:29 +00:00
pooka 08ac8063af Fix some comments: thinking of it more closely, it is actually safe
to release the sleep interlock before calling cv_wait() because we
are protected by the list mutex which prevents a wakeup race.
2007-11-04 18:46:29 +00:00
pooka 18ae49a27c Make the strategy routine get the results through biowait() and
the "disk driver" (rumpuser) call biodone() to indicate the completion
of I/O.  Support for B_ASYNC is coming at some point, but I need
more locking support in the emulated vm for that.
2007-11-04 18:43:55 +00:00
macallan 1f070ed9c2 add a mixer control for the loopthrough channel that some awacs have - it
controls the volume of input data looped through to the output ( for
listening to what you record, it has no influence on recording level )
 - defaults to zero.
2007-11-04 18:00:55 +00:00
pooka 67eb7aa96c Make some comments match current reality. No functional change. 2007-11-04 17:32:34 +00:00
pooka 8e1de16f54 fix comment: suspendsched() removes user process*es* from the runqueue 2007-11-04 17:31:16 +00:00
pooka c71057099f fix typo in comment (greetings to ad, someone read your longwinded
prattling dissertation)
2007-11-04 17:26:02 +00:00
pooka 2567179467 Remember to save errno before restoring it.
noticed by Lukasz on current-users
2007-11-04 17:21:08 +00:00
garbled 1a42c9ee88 Reorder the includes in bus.h to be correct, and add the missing defines for
PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS.  Noticed by Frank Wille.
2007-11-04 17:15:43 +00:00
garbled fbd1da06d8 Apply a patch from Frank Wille that fixes a stupid in the ofw interrupt map
discovery where the pin value was off by one.
2007-11-04 17:11:05 +00:00
garbled bc44c54090 Apply patch from Frank Wille to make the pegasos2 pci scan work
properly.  Modified slightly by me to add the pegasosreg.h file.

With this change, the pegasos correctly scans both primary and secondary
PCI busses.
2007-11-04 17:07:10 +00:00
garbled 51861415b8 Get rid of the ofppc use of the ofbus completely, for the last time.
Write a complete OF boot console into ofw_consinit.c and rewire a bunch
of the ifdef logic in that file to use it when appropriate on both macppc
and ofppc.  Get rid of the attempt to wire up the serial console early,
as that is extremely difficult on ofppc.  Yank all the console code out
of ofppc/machdep.c.  (This is a boot console only, not a full blown
console like ofcons.c)

Delete all the ofbus references out of the config files, and pull in
dev/ofw/openfirmio.c and dev/ofw/ofw_subr.c directly rather than pulling
in files.ofw.  It might be worth going back and adding a files.ofw-nobus
to that directory to allow pulling in the openfirmware driver without
pulling in the whole ofbus mess.

Change rtas driver to connect directly to mainbus, like the PCI bus nodes do.
2007-11-04 16:28:27 +00:00
rtr 3aa5278c3a - remove const from h_header, this pointer is occasionally free'd
- remove unused write_str var
+ move header parsing to new function separation of parsing vs processing
+ alter some variable names to avoid confusion between header value and
  header name (caused breakage with previous rev)
2007-11-04 15:20:11 +00:00
xtraeme 4ba09b41c3 Remove System V semaphores and share memory options to set the limits:
SEMMNI, SEMMNS, SEMUME and SHMMAXPGS.

They can be tweaked via sysctl now. Ports that were setting values on
them weren't touched, I only removed the ones that were commented out.
2007-11-04 14:34:19 +00:00
martin 68aa3a64f4 cosmetics: use the "extern char ..[]" idiom for linker supplied addresses. 2007-11-04 14:32:42 +00:00
rmind 823cbaa23b Fix sysctl_createv "pasto" in previous. 2007-11-04 14:15:34 +00:00
xtraeme 7cd6e1759b - Allocate the envsys_data_t structures dynamically, removing the
max limit.
- Use kmem(9) to allocate the memory.
2007-11-04 13:59:49 +00:00
yamt b53fa282d6 fix deadlocks. 2007-11-04 13:09:32 +00:00
ghen 90fa0ca959 Restore spelling. 2007-11-04 12:54:59 +00:00
rmind fc4b6513fa - sched_setup: use ilog2() for min_catch, which fixes the case when count
of CPU is non-power of 2.  Fixes PR/37244.
- sched_enqueue: initialize sl_lrtime, when it is zero (new thread).
  Part of PR/37245.
- Fix the mints/maxts sysctl helpers, use mstohz() for the checks.  Also,
  I meant miliseconds, not microseconds.  Found by <bjs>.
2007-11-04 12:36:01 +00:00
rmind 7c0340a739 - Migrate all threads when the state of CPU is changed to offline;
- Fix inverted logic with r_mcount in M2;
- setrunnable: perform sched_takecpu() when making the LWP runnable;
- setrunnable: l_mutex cannot be spc_mutex here;

This makes cpuctl(8) work with SCHED_M2.

OK by <ad>.
2007-11-04 11:43:07 +00:00
rmind defb3f5b28 Support for dynamic changing of SysV message queues and semaphores limits.
Also fixes the alignment problem, which was here forever.  Thanks for <uwe>
for discussion and <martin> for testing.

Reviewed by: <tech-kern>, <gdt>
2007-11-04 11:20:34 +00:00
rmind 6364fdeba5 - Replace lockmgr with mutex;
- Use condvars instead of tsleep/wakeup;
- Replace malloc with kmem;
- Use itimespecfix/tstohz;

Reviewed by <ad>.
2007-11-04 11:10:34 +00:00
dsl 97d76a5de4 Kill netbsd32_syscall_fancy and optimise other code paths.
Current gcc manages to compile this without spilling any locals onto the
stack.
2007-11-04 11:08:54 +00:00
rmind d63e75f696 Pick the smallest possible TCP window scaling factor that will still allow
us to scale up to sb_max.  This might fix the problems with some firewalls.

Taken from FreeBSD (silby).
OK by <dyoung>.
2007-11-04 11:04:26 +00:00
plunky 89eb056b33 remove the lower bound limitation on UUID, it is not necessary or mandated 2007-11-04 09:02:47 +00:00
xtraeme d3f615b78d - Remove the code for softraid, it's unlikely that NetBSD will support
this because we do have a working raidframe(4).
- Miscellaneous cleanups and make the code WARNS=4 compliant.
- Removed all stuff that doesn't apply to NetBSD.
2007-11-04 08:25:04 +00:00
rtr 6dc1829962 + don't free strdup()'d ptr that was manipulated.
(i.e. free(): warning: modified (chunk-) pointer))
+ don't leak memory for ptr actually returned from strdup()
+ don't strdup() if we don't have to
+ don't break without free() if we did strdup()
+ as well as freeing h_value also free the header.
2007-11-04 06:07:52 +00:00
xtraeme 51f434b0bb Fix typo in SATA features: Perservation -> Preservation. 2007-11-04 02:34:27 +00:00
xtraeme b0ea8c709b Catch up with latest changes. 2007-11-04 02:09:01 +00:00
xtraeme 10a0351b4a Move entry for ticket #954 to CHANGES.prev, because this has been
pulled up into the netbsd-4 branch.
2007-11-04 01:15:26 +00:00
xtraeme 64a549146f Follow plunky's changes:
- Use CFATTACH_DECL_NEW and remove struct device from the softc.
- Use aprint_*_dev().
- Use aiboost_refresh_sensors() for sme_gtredata.
2007-11-03 23:33:50 +00:00
xtraeme 4fbcc4c832 Remove sysmon_envsys_find() proto, it's defined on sysmon_envsysvar.h. 2007-11-03 23:25:20 +00:00
xtraeme b3893f8d6a Sync with latest round of changes and improve vastly sysmon_envsys(9). 2007-11-03 23:05:56 +00:00
xtraeme 4e10a84855 - Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
  it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
  condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
  sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
  If the acadapter is not ready, trust the state returned by the battery
  device.

Based on suggestion from joerg@.
2007-11-03 23:05:21 +00:00
xtraeme ad0f60a40b Check ci_cpuid_level before calling coretemp_register().
Fixes a panic reported (and tested) by hankenn@.
2007-11-03 21:55:23 +00:00
markd 7893af1639 Add support for Analog Devices AD1983 codec as found in Dell Optiplex 745. 2007-11-03 20:55:58 +00:00
gdt 0930138fa6 Make cfs (for coda) as part of all, conforming to the documentation
which says that "all" means "all known devices".
2007-11-03 19:33:36 +00:00
plunky faccfc336c 'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
2007-11-03 18:24:00 +00:00
plunky edb74239aa switch devices to using CFATTACH_DECL_NEW()
softc no longer contains 'struct device' by default
use 'device_t' instead of 'struct device *'
use device_xxx() accessor functions
remove casting of 'xxx_softc *' & 'struct device *'
use aprint_xxx_dev() routines
2007-11-03 17:41:03 +00:00
plunky d43f6db858 struct callout => callout_t 2007-11-03 17:39:14 +00:00
plunky 644e69cd47 "struct callout" -> callout_t
don't use callout_reset()
do use callout_destroy()
2007-11-03 17:20:17 +00:00
joerg 57eb1519a2 pkg_install update. 2007-11-03 14:26:56 +00:00
joerg 9db95c28e5 Import of pkg_install-20071103.
- reject absolute names in +CONTENT
- fix size issues with pkg_add -u and buffer handling
- print file name of failed renames in pkgdb during pkg_add -u
- remove warning when running pkg_add as non-root
- remove more traces of master/slave mode
- update URLs for new ftp.netbsd.org layout
- make warning of broken symlinks separate from warning for non-existant
  files
- FETCH_PRE_ARGS option for download-vulnerability-list
- print only base package name in FILE_NAME for pkg_info -X
- don't leak memory in Dewey, it is called a lot more often now and
  makes a difference
- just allocate in vfcexec and free, don't bother caching the exec
  buffer
- remove some FTP debugging code
- make more allocation errors in the pkgdb iteration code fatal
- glob patterns and simple patterns are checked for being version-free
  as well
- try harder to get setgid permissions correctly when extracting as
  non-root
- fix waitpid to correctly handle EINTR
2007-11-03 14:14:12 +00:00
dsl d1041e432f Linux doesn't have a SYS_syscall system call (it is all done in libc), and
definitely doesn't have SYS___syscall.
Kill all the code - now matching i386/i386/linux_syscall.c
There is also no point using a switch statement (and it's unpredictable
jump indirect) to save a few memory copies.
2007-11-03 12:58:04 +00:00
dsl 979f6f87e5 Merge linux_syscall_fancy and linux_syscall_plain. 2007-11-03 12:21:20 +00:00
dsl b4acb99fdd Remove now-redundant #if 2007-11-03 12:20:44 +00:00
agc 2f510db93e Recognise the word "lun" as a synonym for "target" in the configuration
file - allows us to export luns as well as targets, which should reduce
some confusion when presenting storage to external entities.
2007-11-03 09:44:06 +00:00
xtraeme b804404ef4 bsd-family-tree 1.116. I'll be handling the updates. 2007-11-03 05:24:51 +00:00