Commit Graph

97905 Commits

Author SHA1 Message Date
christos
453b04f5be fix PGTBL size detection on the intel 965GM. From Anon Ymous. 2008-12-10 15:48:49 +00:00
pooka
37e12a5643 Make kernel biglock recursecount volatile. 2008-12-10 14:55:25 +00:00
tsutsui
7ceeb68913 Account idepth in functions in locore.s that are registered in the
interrupt vector table so that we don't have to track all interrupt paths.
2008-12-10 14:19:02 +00:00
nakayama
2b44f16453 pci_make_tag:
- add assertion for checking spc_busnode initialization.
2008-12-10 12:53:49 +00:00
nakayama
d0b5890006 Add initialization of spc_busmax and spc_busnode in sparc_pci_chipset. 2008-12-10 12:17:02 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
martin
6a9af1aef4 Backout previous - Matt, you probably did a partial update and didn't
pick up the sys/uvm changes.
2008-12-10 09:35:02 +00:00
mrg
595a2e556e revert part of the previous. 2008-12-10 07:12:09 +00:00
mrg
99caaf2dd2 checkpoint my work-in-progress port of this driver.
it boots some way but will crash attaching rtc0.

known TODO items:
- figure out why BUS_SPACE_MAP_LINEAR mappings generate data errors
  (cause of the rtc issue)
- several interrupt issues
2008-12-10 05:56:22 +00:00
mrg
e8f7f45249 import the original openbsd "schizo" PCI driver as found on US-III systems. 2008-12-10 05:26:27 +00:00
mrg
6f91da5c30 fix sparc64 build: provide pmap_kernel(), re-provide pmap_t.
fixes builds for my U60.
2008-12-10 04:23:11 +00:00
mrg
938a858117 clean up and use __func__ in sparc_bus_map() debug messages. 2008-12-10 03:36:22 +00:00
mrg
1d6b36aa0d ofpci_make_tag():
don't write PCI_COMMAND_STATUS_REG with
	PCI_COMMAND_(MEM|MASTER|IO)_ENABLE, or it in.
sparc_pci_childspace():
	move psycho.c:get_childspace() into pci_machdep.c but rename it
psycho_alloc_bus_tag():
	use M_ZERO
2008-12-10 03:31:51 +00:00
pooka
223c62813a In case of no _KERNEL_OPT, always define _PMAP_MAY_USE_PROM_CONSOLE 2008-12-09 23:05:25 +00:00
martin
f915c7039b Get rid of get_maxctx() - it doesn't work on newer cpus and we will have
to find a better way for (some) sun4v machines - all sun4u use 13 bit
contexts anyway.
2008-12-09 21:01:02 +00:00
pooka
72b415fb6e 5.99.5: pmap_kernel() unified 2008-12-09 20:48:52 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
reinoud
cadb068686 Fix two buf_init()'s that are not needed since they were already initialised
by getiobuf().

Also remove ancient IPL_BIO reference from the time it was called from
interrupt context instead of the current soft interrupt.
2008-12-09 17:17:02 +00:00
christos
6d2637b2f4 Allow parsing more than one command line switch. From anon ymous. 2008-12-09 15:38:52 +00:00
tsutsui
5352126149 Sync with src/sys/arch/amiga/dev/siop.c rev 1.59:
> Deal with unrecognized SCSI message byte - restart script to clear the
> ACK.  No longer hangs the driver when an unhandled message byte is seen.
2008-12-09 14:11:11 +00:00
nakayama
b1a235dedb Sync PCMCIA and CardBus devices with i386/conf/GENERIC. 2008-12-09 13:16:22 +00:00
nakayama
e4c05fb61e Fix CardBus, PCI-PCI bridge support borked in previous commit. 2008-12-09 13:14:38 +00:00
njoly
26a5edd122 Add some padding members to linux_msqid64_ds for 32-bit archs. This
fix msgctl(2) IPC_STAT|IPC_64 calls, at least, on i386.
2008-12-09 11:09:11 +00:00
cegger
33d827105a vmem_check_sanity: refactor overlapping check for better readability.
Move use of vmem_check_sanity into locked sections. Pointed out by ad@
2008-12-09 07:54:59 +00:00
mhitch
58d3184539 Deal with unrecognized SCSI message byte - restart script to clear the
ACK.  No longer hangs the driver when an unhandled message byte is seen.
2008-12-08 22:05:13 +00:00
dyoung
ce732c2d14 Distinguish the NetMos NM9845 Quad UART chip from the NetMos NM9845
Quad UART + One Parallel chip.
2008-12-08 19:32:39 +00:00
dyoung
466fdf18f2 Add elanpex(4) and elanpar(4), commented out. Add some useful
CardBus / PCI / PCMCIA NICs, hifn, and the OpenCrypto framework.
2008-12-08 19:27:50 +00:00
tron
e123b7f433 Force the nVidia nForce 630i MCP73 to attach to ahcisata(4) as well.
It would otherwise attach to pciide(4) and use PIO mode.

Patch submitted by Bernhard Moellemann in PR kern/40134.
2008-12-08 15:35:23 +00:00
pooka
6a5161dfcb Remove rump cpu_counter.h in favour of the arch native one. I'm
sure there was a reason why I originally added this, but I can't
find what would break without it now.  If something does pop up,
I'll fix it properly this time instead of adding silly headers.
2008-12-08 13:31:58 +00:00
pooka
316be31a2e Instead of punishing all archs for a fake vmparam.h, punish only
evbppc for its insolence and pick a ppc cpu family at random in
Makefile.rump.
2008-12-08 12:57:33 +00:00
njoly
84ab0cee9a s/SYSVIPC/SYSVMSG/, for message queues support. 2008-12-08 12:56:00 +00:00
njoly
bd398db254 Remove unused timeval_to_clock_t function, superseeded by CONVTCK
macro.
2008-12-08 11:52:35 +00:00
pooka
d34f27b620 Decode write access advice and pass to uvm (not that it's handled
there, but ...).
2008-12-08 11:48:03 +00:00
pooka
5297d2febf Don't even try to pretend WAPBL_DEBUG_INODES works here, just #error. 2008-12-08 11:37:37 +00:00
pooka
836c2144d0 Remove no longer valid comment (which probably didn't even say what
it wanted to say in the first place).
2008-12-08 11:34:30 +00:00
pooka
37e35e961c Warn about large struct on stack in comment. 2008-12-08 11:23:39 +00:00
njoly
218ea1fa05 Add R_X86_64_32 relocation support, which enable loading modules with
debugging information. And ensure that addr is not null before using
it.

From ad@, thanks.
2008-12-08 08:41:36 +00:00
alc
8c6c22b7f1 Add support for a 8168C/8111C revision
- also disable jumbo frame on this adapter following the FreeBSD driver
 - merge redundant call to aprint_error_dev
2008-12-08 03:24:08 +00:00
cegger
4dfe7b7870 ddb: make show vmem print exact span type
vmem_check_sanity: print exact span type
vmem_add1: KASSERT span types
2008-12-07 22:39:01 +00:00
mrg
f757554046 a few clean up/rearrange changes, somewhat inspired from openbsd's
schizo.c:

- rename pp_busnode{} -> spc_busnode{}, and move it to
  sparc_pci_chipset{}

- move public pci functions pci_conf_read(), pci_conf_write() and
  pci_intr_establish() into psycho.c, renaming them in the process,
  and add pointers through sparc_pci_chipset{} to access them.
  as part of this, add PDB_INTMAP and PDB_CONF debug options to
  psycho.c

- move and rename sparc64 private pci_find_ino() into
  sparc_pci_chipset{}, like the above

- update psycho_alloc_chipset() to set the new 4 function members


no functional change intended.  XXX: not tested on cardbus.
2008-12-07 21:03:57 +00:00
pooka
54b9426187 Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.
2008-12-07 20:58:46 +00:00
hannken
59f928fb25 ffs_copyonwrite(): Only use si_snapblklist if it is already allocated.
ffs_snapshot_read(): Use IO_ALTSEMANTICS to allow reading a snapshot vnode
                     beyond file system size.  Needed to read the snapblklist
                     on mount.

Persistent snapshots work again.

Should fix PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 19:51:07 +00:00
hannken
8e313cc27b Revert previous -- ALL reads are from kernel space.
Still open: PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 18:55:58 +00:00
cegger
f001f650d6 make this compile with MALLOC_DEBUG but w/o DEBUG 2008-12-07 14:24:28 +00:00
cegger
f132fda3fe vmem_check_sanity: fix check to correctly detect even exactly duplicate spans. 2008-12-07 11:49:51 +00:00
ad
7ab182873b Add cpu_softintr_p() for assertions 2008-12-07 11:40:53 +00:00
mlelstv
1f5b658b8a Handle printing of _STR attribute with non-string data type gracefully. 2008-12-07 10:53:57 +00:00
hannken
7dbaf06e71 ffs_copyonwrite(): Only use si_snapblklist if it is already allocated.
ffs_snapshot_read(): Allow the kernel to read beyond file system size.

Persistent snapshots work again.

Should fix PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 10:01:09 +00:00
cegger
bb1d17f443 build fix: make i386 build again 2008-12-07 09:40:42 +00:00
mrg
a736f00a1c look for "portid" as well as "upa-portid", as seen on schizo. 2008-12-07 08:59:31 +00:00
mrg
4df93f9197 add INTMAP_IGN_SHIFT and INTIGN() macros for schizo support (from openbsd) 2008-12-07 08:56:10 +00:00
tsutsui
c6acb16540 Remove duplicated options FONT_GALLANT12x22. 2008-12-07 08:26:02 +00:00
tsutsui
6bebd690e9 Fix attach messages. (extra colons, misplaced newline etc.) 2008-12-07 08:24:26 +00:00
matt
5ef4b69613 Roundup to next megabyte and subtract 0xc0000000 2008-12-07 07:27:27 +00:00
matt
a7b983bf92 Map all of the kernel. 2008-12-07 07:15:03 +00:00
mhitch
b11961451a Fix timecounters using interval timers: amiga counters are not 32 bits,
so the tc_counter_mask needs to be set based on the interval timer.
Process cpu usage was returning negative or very large values.
2008-12-07 03:48:43 +00:00
cegger
2aa8aa0f8f Spans may never overlap. Overlapping spans mean memory corruption
when used by kmem(9), for example.
Do sanity checks to detect such spans on DEBUG kernels.
2008-12-07 02:21:04 +00:00
cegger
10de0e2b14 ddb: new 'show vmem' and 'show all vmems' commands.
Useful to inspect vmem(9) structures.
2008-12-07 00:51:15 +00:00
njoly
adf5b0a542 Regen for netbsd32_caddr_t removal. 2008-12-06 23:15:09 +00:00
njoly
e7377ec502 Cleanup; kill netbsd32_caddr_t use. 2008-12-06 23:14:03 +00:00
njoly
9321a67e19 Small setres{uid,gid} cleanup; there is no need to use a specific
handling for -1 uid values.
2008-12-06 23:01:32 +00:00
ober
dd55503e8f Initial APM support for Zaurus. Ported from OpenBSD by mjf@. 2008-12-06 22:12:36 +00:00
ober
23b6d86d41 Initial APM support for Zaurus. Ported from OpenBSD by mjf@ 2008-12-06 22:11:19 +00:00
ober
bcc03ff7a7 Initial apm support for Zaurus. Ported from OpenBSD by mjf@. 2008-12-06 22:10:41 +00:00
joerg
9a364d2ed3 Split ffs_freefile into a frontend for normal cylinder group and for
snapshot use. Adjust ffs_blkfree_common to get the fs instance passed
in, the original commit didn't account blocks in the snapshots
correctly. Assert that ffs_blkfree is used with the primary fs instance
and that ffs_checkfreefile is only used for snapshots. Move the bdwrite
from ffs_blkfree_common into the caller for symmetry. This creates a
redundant write of unmodified data for ffs_blkfree_snap if a double free
of a block happens.

Reviewed and tested by hannken@.
2008-12-06 20:05:55 +00:00
reinoud
ab146a4768 UDF_SHED_FREE state is now also handled by the state machine, so DO signal it.
Free'd up ecclines can now far more quicker be recycled.
2008-12-06 14:02:08 +00:00
cliff
41bfa2c41d add gemini pseudo-nic and support code. 2008-12-06 05:22:39 +00:00
njoly
14e966b9e0 Regen for getres{uid,gid} syscalls. 2008-12-05 23:31:54 +00:00
njoly
533a52241a Add getres{uid,gid} syscalls. 2008-12-05 23:30:19 +00:00
ad
e91b9bcc27 Make the fake ELF object work with gdb.
- Output a .bss section and make all the symbols relative to it, instead
  of making them absolute.
- Output a single load section, no need for two.

'gdb /dev/ksyms' still doesn't work because ksyms doesn't do mmap yet.
2008-12-05 21:38:10 +00:00
dyoung
20baa33fe2 In wddetach(), avoid a crash by destroying the callout sc_restart_ch. 2008-12-05 18:20:19 +00:00
reinoud
9b08c3c516 Two fold commit:
1) Enhance write speed significantly on RMW media like CD-RW, DVD-RW but also
on the DVD+RW and all other ECC blocked media. Significant speedups of access
to the device for say compilation on the DVD. Streaming copy is also still at
maximum speed though vast amounts of directory copy work can show side effects
that appear it to slow down but are actually logical when you consider that
most small files are embedded into the descriptors itself.

2) explicit wait for the created RMW thread to spinup
2008-12-05 13:19:42 +00:00
isaki
3cffa23a3e Use TAILQ_* macros. 2008-12-05 13:14:42 +00:00
ad
0ff35ddc5a - Fix a bug in amd64 rw_tryenter() where it could return failure even after
acquiring a lock, if aligned on a 4GB boundary.

- Microoptimize more.
2008-12-05 13:08:11 +00:00
ad
3c9eb3fb0f zfs needs block devices too, for zvol. 2008-12-05 13:06:50 +00:00
ad
49e50a21d6 PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)
Add a layerfs module.
2008-12-05 13:05:37 +00:00
ad
8ff4eb83a8 Back out revision 1.35 which is no longer necessary and causes the system
to try autounloading modules perpetually.
2008-12-05 12:55:09 +00:00
ad
6efc20038a PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there) 2008-12-05 12:51:17 +00:00
jdc
5c7dd34e28 Add wscons/vcons support for bw2 (sbus and P4). 2008-12-05 11:52:42 +00:00
tsutsui
48640c6ca2 Wrap long lines. 2008-12-05 11:17:38 +00:00
he
3e2feea4e5 Ksyms are optional, so make the call to ksyms_init() dependent
on the same conditionals which are defined in sys/conf/files.
2008-12-04 23:18:13 +00:00
macallan
68e46d4066 actually call cpu_model_init()
This might be enough to get 601-based boxes going
2008-12-04 23:17:47 +00:00
jym
bf8f00a835 Clean up code. No functional changes intended.
Reviewed by bouyer@.
2008-12-04 20:56:57 +00:00
alc
0976fc9588 Fix regression introducted by the previous commit.
i915 and G33 Intel chipset family need special handling when writing an entry
to the GTT.

reported by: <tnn> [0]
tested by: <tnn>

[0]: http://mail-index.netbsd.org/tech-x11/2008/12/03/msg000276.html
2008-12-04 19:07:35 +00:00
cegger
9db965667a Fix the fix: Only AMD K8 Rev-G on AM2 sockets are impacted. 2008-12-04 18:54:24 +00:00
cegger
72f1a5aa7a On AMD K8 CPUs with Socket AM2, sensor normalization is off by 21C degree.
Adjust temperature calculation. This should fix strange temperatures on AMD K8
CPUs reported by many people.
2008-12-04 18:45:04 +00:00
tsutsui
f345c7c20a Don't pass uint8_t values to le16toh() in fxp_rx_hwcksum().
fxp(4)'s RX hwcksum results weren't used at all on big endian machines.

Checked by i82550 and vmstat -ev on macppc GENERIC kernel with
options INET_CSUM_COUNTERS,TCP_CSUM_COUNTERS,UDP_CSUM_COUNTERS.
2008-12-04 16:40:47 +00:00
tsutsui
0ef29d0844 Add a missed htole32() on the previous ip4csum-tx bug workaround. 2008-12-04 16:32:34 +00:00
tsutsui
2377d7c38d Sort Tx/Rx macro in previous. 2008-12-04 15:22:01 +00:00
ad
20d9c21a59 PR kern/40099 device_t/softc split broke cac(4)/ld(4): panic: iostat_unbusy 2008-12-04 11:48:14 +00:00
cliff
54c2458e25 avoid initializing controller stuff twice by supressing SLAVE from doing so 2008-12-04 00:38:07 +00:00
cliff
9974ce742c remove old debug stuff, including Debugger() call that was not #ifdef DDB 2008-12-04 00:36:33 +00:00
tsutsui
69a8a901bb Fix typo in comment. 2008-12-03 15:36:11 +00:00
tsutsui
540babdae2 Add a workaround for hardware ip4csum-tx bug and enable it.
Confirmed on i82550 rev 12 and UDP fragment packets by ttcp(1).
2008-12-03 15:34:38 +00:00
christos
579a92f63b PR/40097: bouyer@antioche.lip6.fr: MODULAR tries to unload non-module subsystems
Don't try to unload built-in modules, and if a module is busy don't retry
immediately.
2008-12-03 15:15:01 +00:00
pooka
4b18ba9da3 nfsd_use_loan: int -> bool 2008-12-03 14:56:05 +00:00
pooka
807cdbb61f uvm_loanuobjpages(): "nfsread" -> "loanuopg" in tsleep wmesg 2008-12-03 14:46:24 +00:00
tsutsui
e6ada93fc6 Call BUS_DMASYNC_PREREAD more strictly on polling DMA descriptors. 2008-12-03 14:21:15 +00:00
tsutsui
e4ff32d44c Add RCS Id. 2008-12-03 13:55:20 +00:00
ad
dc5f414733 PR port-amd64/40091 compat_linux32 module loading = panic due to missing syms 2008-12-03 12:51:11 +00:00