Commit Graph

100358 Commits

Author SHA1 Message Date
skrll
9e95fb4dde Use the right interrupt number for com @ dino.
Tested as working by Jonathan Kollasch. Thanks.
2009-05-18 04:58:23 +00:00
mrg
281af2fcaa fix a LOCKDEBUG problem from the previous: need to call pmap_kremove()
on a pre-existing mapping, before installing a new one.
2009-05-18 02:28:35 +00:00
mrg
8d972bdec3 - retire union cpu_info_pg
- allocate space for each cpu_info{} in pmap_bootstrap
- remap cpu0's space into the PA currently in CPUINFO_VA
- cpus[] becomes an array of pointers to cpu_info{}, easy to traverse
- only call kernel lock for IPL_VM interrupts (?  as implemented on
  x86 and sparc64)
- revert a minor part of locore.s:1.241
- in cpu_hatch(), set %sp to near the middle of the interrupt stack.
  we only need a %sp until we get to run an MI thread (own idlelwp or
  real code)

we still waste one page of space, but this gets SMP much closer to
actually working again.
2009-05-18 01:36:11 +00:00
mrg
07f49ab104 also print the cpu_number() when we get a strayintr(). 2009-05-18 00:25:15 +00:00
he
df7cd4eea6 Complete the device_t / softc split by changing the sc_dev member
from "struct device" to "device_t".  Commit overlooked when tga.c was
changed?
2009-05-18 00:14:27 +00:00
bouyer
cc56ebe228 on Xen the GDT has to be updated though HYPERVISOR_update_descriptor().
Export i386/i386/gdt.c:update_descriptor() and use it in x86_set_sdbase(),
as a direct write to the GDT will cause a kernel trap.
Fix PR port-xen/41401.
2009-05-17 18:24:23 +00:00
mjf
bcf861f849 u_intNN_t -> uintNN_t 2009-05-17 18:21:29 +00:00
dyoung
776b6e11bf Reverse the sense of the DETACH_FORCE check so that we return EBUSY in
the correct circumstances.
2009-05-17 18:11:34 +00:00
cegger
82fdd59cb5 fix crash with LOCKDEBUG+DIAGNOSTIC kernels:
sdhc_bus_clock() calls mutex_enter().
then in DIAGNOSTIC section, sdhc_bus_clock() calls sdhc_card_detect().
sdhc_card_detect() calls mutex_enter() on the same mutex again.
when LOCKDEBUG is enabled, you get

Mutex error: lockdebug_wantlock: locking against myself
2009-05-17 14:36:46 +00:00
cegger
9c2bd94081 fix crash in bridge_ioctl():
BRDGGFLT and BRDGSFILT bridge controls are only available with BRIDGE_IPF and PFIL_HOOKS defined.
In amd64 GENERIC and XEN kernel configs PFIL_HOOKS is defined but BRIDGE_IPF is not.

When a BRDGGFLT or BRDGSFILT command comes in, then ifd->ifd_cmd is not in range
of bridge_control_table_size. Then bc is not set and is dereferenced
later => BOOM.
2009-05-17 11:34:21 +00:00
ad
92ee1731b0 Updates to f_flag need to be made with atomics. 2009-05-17 10:08:38 +00:00
pooka
bb7d994504 pad -> PAD. Fixes build problem reported by Paul Goyette in private email. 2009-05-17 05:57:01 +00:00
pooka
ed09069bac regen: pad -> PAD 2009-05-17 05:55:42 +00:00
yamt
7e13bf31c7 remove FILE_LOCK and FILE_UNLOCK. 2009-05-17 05:54:42 +00:00
pooka
5b4deca5cb pad -> PAD 2009-05-17 05:54:22 +00:00
tsutsui
cb5bffc5fa Split device_t/softc. Tested on D-Link DL-4000. 2009-05-17 02:08:35 +00:00
tsutsui
f84df6daef u_intNN_t -> uintNN_t 2009-05-17 01:33:24 +00:00
tsutsui
3447a7cdd6 Split device_t/softc. Compile test only, but mostly similar changes
with sparc/dev/sbus.c rev 1.69.

XXX: it looks some functions should be merged between sparc and sparc64.
2009-05-17 01:28:27 +00:00
tsutsui
e298c1144d Split device_t/softc.
Tested PCI HME on i386.  Sbus HME is compile test only.
2009-05-17 00:40:43 +00:00
tsutsui
420c7350fb Use device_private() to get struct sbus_softc from device_t parent.
XXX: sbus_softc has been split from device_t on sparc, but not on sparc64!?
2009-05-17 00:28:35 +00:00
rmind
ba3fa2c82f sys_mq_open: remove broken access flag check.
Noted by Stathis Kamperis.
2009-05-16 23:58:09 +00:00
ad
74b6a42ba2 Fix suspend/resume problem with some configurations. From drochner@. 2009-05-16 23:48:00 +00:00
dyoung
0f04ad55b3 Do not detach a sd(4) instance if it is open, but return EBUSY,
instead.  If the detach is forced, do what sdclose() does on the
last close: flush the cache, delete our reference to the SCSI bus
device, et cetera.
2009-05-16 20:10:52 +00:00
nakayama
ed5e46c9f6 Remove clear %tick in locore.s since it is cleared at cpu_initclocks() in
clock.c.
2009-05-16 19:19:04 +00:00
nakayama
44daeab399 - move definition of tick() from ctlreg.h to psl.h and rename to gettick()
for consistency with other functions for reading/writing ASRs.
- move definition of tl() from trap.c to psl.h as same as above.
- define settick() in psl.h and use it in clock.c.
- cosmetic chages in psl.h.
2009-05-16 19:15:34 +00:00
martin
a6eabcae57 we can not free() a dmamap! 2009-05-16 18:24:44 +00:00
nakayama
a7ae1082e0 Follow pad to PAD change. 2009-05-16 17:45:23 +00:00
martin
53a2c28e97 Implement dmamap_unload - I might be missing something, or is it realy
this easy?
2009-05-16 17:42:35 +00:00
martin
f4b7e59662 Add memory clobbers to the inline assembler modifying/testing the %psr
register, to avoid the compiler reordering instructions out of critical
sections. Should fix PR port-sparc/41372.
2009-05-16 17:16:12 +00:00
cegger
f26d5a00cc KNF, same object code generated. 2009-05-16 17:01:15 +00:00
cegger
d70ad70603 KNF, same object code generated 2009-05-16 16:55:24 +00:00
cegger
53537c2dae KNF, same object code generated. 2009-05-16 16:52:03 +00:00
cegger
574b3223da KNF, same object code generated.
(checked with evbarm CP3100 kernel)
2009-05-16 16:49:19 +00:00
cegger
834f1d8f70 KNF, same object code generated 2009-05-16 16:40:58 +00:00
mjf
9c6bc36bdd Add PA-RISC 2.0 PIM support.
Fix the HPMC exception handler so that, if we're running on a PA-RISC
2.0 machine, we use the 64-bit PIM data structures.

There was also a bug in the HPMC exception handler that stopped output
being written to the console after we'd taken the exception. We need
to make a PDC_IO pdc call to reset I/O.
2009-05-16 16:06:06 +00:00
tsutsui
87e79748d0 KNF and misc cosmetics. 2009-05-16 14:27:30 +00:00
pgoyette
2b244d4b8c Correctly identify flag bit for SSSE3 (one of the 'S' was missing). Also
rename AMD bit from SCALL/RET to SYSCALL/SYSRET to match Intel bit name.
2009-05-16 13:36:44 +00:00
tsutsui
844c127c73 Split device_t/softc. Tested on arc:
tga0 at pci0 dev 3 function 0: DC21030 step C, board type T8-02
2009-05-16 13:04:26 +00:00
skrll
d6428aac82 Note that CR27 is used for thread local storage (TLS) 2009-05-16 12:57:05 +00:00
yamt
5368015c69 sysctl_doeproc:
- simplify.
	- KERN_PROC: fix possible stale proc pointer dereference.
	- KERN_PROC: don't do copyout with proc_lock held.
2009-05-16 12:02:00 +00:00
nonaka
c69752781d Added SH7706, SH7750R, SH7751 and SH7751R support. 2009-05-16 10:17:38 +00:00
nonaka
3340f93870 Added SH7706 cache flush op. 2009-05-16 10:13:13 +00:00
nonaka
2ed632c011 Add SH4 INTEVT codes for GPIO. 2009-05-16 10:11:50 +00:00
yamt
805df27570 rw_vector_exit: remove a redundant condition. 2009-05-16 08:36:32 +00:00
yamt
513f4955a7 put a flag bit into v_usecount to prevent vtryget during getcleanvnode.
this fixes the following deadlock.

	a thread doing getcleanvnode:
	pick a vnode
	acqure v_interlock
	v_usecount++
	call vclean

		now, another thread doing cache_lookup:
		picks the vnode
		vtryget succeed
		vn_lock succeed

	now in vclean:
	set VI_XLOCK (too late to be noticed by the competing thread)
	wait on the vnode lock (this might violate locking order)

the use of a flag bit was suggested by Andrew Doran.  PR/41374.
2009-05-16 08:29:53 +00:00
cegger
d5ffe84070 KNF, same object code generated 2009-05-16 07:46:45 +00:00
tsutsui
d8c545cc8c Split device_t/softc split, tested on VT6212L. 2009-05-16 07:34:05 +00:00
tsutsui
d2452bef38 Make ahc_detach() take struct ahc_softc * as well as ahc_attach()
and remove bogus casts around ahc_detach().

XXX: There is a pmf_device_deregister(9) call in ahc_detach()
XXX: while there is no pmf_device_register(9) in ahc_attach().
XXX: It looks more pmf(9) stuff is required for cardbus detach.
2009-05-16 06:44:05 +00:00
tsutsui
7882b9d224 - fix one more device_t/softc split botch in debug code
- use sc->sc_dev to get device_t
- fix inconsistent aprint_error_dev(9) usage
- some KNF and wrap long lines
2009-05-16 05:51:58 +00:00
tsutsui
db656c02e4 Fix botch on device_t/softc split.
XXX: still doesn't work (command timeout on data xfer).
2009-05-16 05:26:31 +00:00