Commit Graph

3421 Commits

Author SHA1 Message Date
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
tsutsui 1983a26b2e Check a correct value on a sanity check in jensenio_eisa_intr_map().
Fixes yet another bug on Jensen found on tracking PR port-alpha/36628.
2007-07-27 13:37:07 +00:00
tsutsui d99606f782 More fixes for Jensen, reported and tested by Christoph Franzen
in PR port-alpha/36628:
- make jensenio_eisa_maxslots() return 8 (instead of 16) since
  EISA config for slot 8-15 on jensen could return invalid values
- pass eisa_chipset_tag_t to eisa_init() and check eisa_maxslots()
  on probing EISA config space
- pass M_ZERO to malloc(9) and make sure malloc(9) doesn't fail
- fix typo in a debug printf, add more debug printfs, and
  use #ifdef EISA_DEBUG to enable them
- cast uint8_t value to uint32_t before shift more than 8 bits
- check buffer region on reading compressed data from EISA config space
2007-07-22 02:14:39 +00:00
ad 744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
tsutsui 13084fc846 Add MI todr(9) support and timercounter(9) support with kern_cctr.c to alpha:
- use todr(9) API with MI mc146818(4) driver and remove homegrown
  todr stuff from MD alpha/clock.c and alpha/mcclock.c
- also remove obsolete cc_microtime stuff from MD code
- add ci_pcc_freq member in struct cpu_info for cpu_frequency(), and
  calibrate it with mc146818 interval clock in mcclock attachment
- call cc_init() in cpu_initclocks(9) because all alpha cpus have
  a pcc counter

Tested on DEC 3000/300 and AlphaPC 164, but not on any SMP machines yet.
2007-07-21 11:59:55 +00:00
tsutsui 0d3f4cbf60 Backout changes on lpt_jensenio.c rev 1.2.
lpt at jensenio doesn't seem to have a specific interrupt vector
but uses a normal EISA interrupt.

Fixes another part of PR port-alpha/36628 and PR port-alpha/20386.
2007-07-19 12:58:29 +00:00
tsutsui 43c2f4d087 Avoid NULL pointer dereference in MD device_register() function.
Fixes a part of PR port-alpha/36628.
2007-07-19 12:46:45 +00:00
tsutsui 9463f365d3 Fix indent in printf message. 2007-07-19 12:42:46 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
pooka 0bc323f5cd Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
2007-07-08 10:19:21 +00:00
tsutsui 3682cc2396 - make this compile again
- remove an unneeded include file

XXX: Avalon A12 devices are not in alpha/conf/GENERIC.
2007-07-07 21:04:29 +00:00
tsutsui 3a6c410df9 Don't update hz by the hardware RPB field.
Leave it default HZ since we always use 1024Hz in alpha/mcclock.c.
2007-07-07 17:08:15 +00:00
tsutsui d4f1dfc2c4 Add "options HZ=1024" by default for alpha.
All alpha machines use arch/alpha/alpha/mcclock.c for hardclock(9)
and it always sets MC_RATE_1024_Hz.
The default HZ value also affects tick and tickadj in conf/param.c.
2007-07-07 17:03:28 +00:00
tsutsui 6a8a584d1a Remove leftover netns stuff. 2007-07-07 05:13:14 +00:00
christos a65158cbe3 Add options FILEASSOC; needed for veriexec. 2007-06-24 21:17:31 +00:00
yamt 962e1166fd add a missing dependency. 2007-06-05 12:14:33 +00:00
martin c2534a819b Add pseudo-device agr to all GENERIC kernels where it might make sense
(commented out in some).
2007-06-04 08:55:18 +00:00
mhitch 108936c65e Fix comment: proc_trampoline() -> lwp_trampoline(). 2007-05-20 16:57:57 +00:00
mhitch bc467535b8 Fix multiprocessor operation: move a couple of fields in struct cpu_info
to the beginning so they can still be accessed in assymbly code using 8 bit
offsets.  The addition of a big structure in cpu_data moved these outside
the range of the addq instruction.  Gas should have complained that the
immediate value was too large, but just silently truncated it.  I can now
run multiprocessor again.
2007-05-19 17:09:35 +00:00
mhitch da59486c27 Fix alpha build after idlelwp merge. I don't know why machine/cpu.h was
added here, but it does not seem to be needed now, and was resulting in a
circular dependency when sys/sched.h was changed in the yamt-idlelpw branch.
2007-05-18 19:58:06 +00:00
mhitch 38ee607428 Fix a couple of problems when starting the idle lwp on secondary
cpus:  Set curlwp, and allow interrupts before entering idle loop
(otherwise, IPI interrupts won't be handled on an idle cpu).
2007-05-18 02:48:06 +00:00
mhitch bf0f43741a Fix alpha MP for idlelwp: ci_idle_lwp was added to cpu_info
structure, but never initialized.  There's already a cpu_idlelwp
in ci_data, which appears to be the same thing, so use that instead.
2007-05-18 02:45:18 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00
macallan d4ddadbf9d include files.wsfb 2007-04-10 02:19:03 +00:00
he d74897d542 Absent documentation as to what the newly added 'ipl' argument to
pool_init() is supposed to do, and actual usage of that argument in
pool_init()'s implementation, add use of IPL_VM to the TLB shootdown
job queue pool initialization to get this building again.
Someone suggested an IPL_XXX_ASK_ANDY constant be introduced...
2007-03-14 21:39:39 +00:00
drochner ab07e481e4 It doesn't make sense to specify "configuration" and "interface"
locators for uhub because a hub can't have sub-devices.
This might be sanity-checked eventually.
Same for ubt now after the change to device attachment.
2007-03-14 12:27:20 +00:00
mhitch 0f29ca7906 Contrary to the comment in cia_dma_get_tag(), there are machines with cia
that have over 1.0G.  Allow direct dma requests to fall back to SGMAPs.
my PWS 500au with 1.5G of memory now works with dma operations.
2007-03-14 01:40:14 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
mrg 6b1e46c136 avoid unused variable warnings in pci_up1000_pickintr(). 2007-03-04 21:58:16 +00:00
yamt 45cdcb0e37 fix fallout from caddr_t changes. 2007-03-04 15:59:31 +00:00
yamt 5b23251544 fix fallout from caddr_t changes. 2007-03-04 15:17:20 +00:00
yamt 65c9a0b32e fix fallout from caddr_t changes. 2007-03-04 14:46:45 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui d4fbe368ec Apply fix for boolean_t -> bool changes on uvm.page_idle_zero access.
Thanks Tobias Nygren for help, ok'ed by thorpej, and tested on
1000A by Aaron J. Grier and on PC164 and 3000/300 by me.
2007-03-03 02:20:44 +00:00
yamt 948e7684e3 make this compilable.
(p_flag -> p_sflag, P_WEXIT -> PS_WEXIT)
2007-03-02 17:42:00 +00:00
kiyohara 11c9c998db Add btuart(4). 2007-03-01 14:57:38 +00:00
dogcow 3f940223f3 miscellaneous fallout from the great boolean rototill. 2007-02-22 20:09:42 +00:00
thorpej b25aff5288 TRUE -> true, FALSE -> false 2007-02-22 04:47:27 +00:00
thorpej dd962f8680 Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 23:48:10 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg 4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
ad d43ea32af9 - Add /a modifier to trace that allows a specific LWP to be selected.
- When doing trace/t, always note which pid/lid combination is being traced.
2007-02-20 01:02:02 +00:00
pavel 934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad 6511d52f7d inline -> __inline 2007-02-11 15:41:31 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
ad a79c7e51e6 Define ipl_cookie_t._psl as uint8_t so that it can be packed into a
word with other seldomly written fields.
2007-01-12 00:55:40 +00:00