Commit Graph

90224 Commits

Author SHA1 Message Date
uwe 5e48e66a0e Use device_t and device_private().
While here - make ops static.
2007-11-06 00:36:30 +00:00
ad e1fb70b70d Fix decl of lbolt. 2007-11-06 00:25:48 +00:00
xtraeme f4046a2e1c Missed a struct device -> device_t, found by joerg. 2007-11-05 23:57:32 +00:00
ad bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
kiyohara c33e2714c5 + Sync to FreeBSD.
firewire.c Rev.1.101
    firewire.h Rev.1.21
    firewirereg.h Rev.1.50
    fwdev.c Rev.1.52
    fwdma.c Rev.1.9
    fwmem.c Rev.1.34
    fwohci.c Rev.1.93
    fwohcireg.h Rev.1.23
    fwohcivar.h Rev.1.16
    if_fwip.c Rev.1.16
    if_fwipvar.h Rev.1.5
    sbp.c Rev.1.92
+ Cleanup macros in fw_port.h.
+ Fix the occurrence of the error at the resume.  Don't set the buffer again.
2007-11-05 19:08:56 +00:00
macallan f59f835fa4 don't panic if we're not finding all the properties we need. Just complain
quietly and return.
2007-11-05 16:57:46 +00:00
nisimura da304b3915 EncorePP1 VIA686B southbridge fixup work; hide and disable USBx2, AC97
audio and MC97 modem, and force IDE to have native mode.
2007-11-05 15:56:37 +00:00
garbled de8e7fde3e Lots of small changes for ofppc:
Remove the ofb driver.  I'm not interested in trying to make this work.
It should be replaced with the genfb driver, which I have added,
commented out because that driver needs work before it will function on
ofppc.  (it's too panic-happy, and ofppc needs a working autoconf.c)

Change the way we do isa_inb/outb.  The new way is a slightly nastier
hack, but won't run afoul of the other isa drivers as much.

Fix ofw_consinit.c to remove the dependency on ofb.
2007-11-05 15:49:02 +00:00
nisimura 0b718fbde6 - use offset 0x4500 serial for EUMB console.
- make sure to have I-cache/D-cache enabled. Ok for DINK32 and ppcboot.
- have 32B aligned fxp txdesc.
- sip transmit now works.
2007-11-05 13:41:48 +00:00
joerg 08de5799c0 Use the fallback to ACPI SCI as PCI interrupt only as a last resort
if no other entry could be used.
2007-11-05 10:30:44 +00:00
rmind 1a3f8bd1d1 cpu_xc_offline: Do not double-lock the runqueues for SCHED_4BSD, it uses a
global sched_mutex.  Fixes a hang reported by <jmcneill>.  Tested with M2
and 4BSD - seems to be working fine.
2007-11-05 03:36:14 +00:00
martin b050fccbb2 Extend the sparc64 cpu kcore segment so that it records all kernel mappings
done via locked 4 MB pages. The old format could only record physically
continous kernel text mappings.
For compatibility reasons, just extend the structure and fill in all the
old fields as well.
2007-11-05 00:43:41 +00:00
nisimura ac767563ef - rework sip.c, with bitbang fix. still remains not serving well.
- fix for PCI-PCI bridge recursive call.
2007-11-05 00:40:39 +00:00
pooka 2525a332ae * sprinkle some locking into the vm code
* avoid extra insert+search+remove step in file systems using
  ubc_uiomove() instead of standard uiomove()
2007-11-04 19:52:14 +00:00
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
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
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
xtraeme b0ea8c709b Catch up with latest changes. 2007-11-04 02:09:01 +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 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
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
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