Commit Graph

451 Commits

Author SHA1 Message Date
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
cd8fb15721 include files.wsfb 2007-04-10 02:29:42 +00:00
tsutsui
40b782670f Use char * where pointer arithmetics are required. 2007-03-17 11:45:21 +00:00
he
15e52c3822 Cast to char* before doing pointer arithmetic. 2007-03-06 17:32:05 +00:00
he
c574c4ccc1 Use char* with mtod() when doing pointer arithmetic on the result. 2007-03-06 17:30:34 +00:00
dogcow
f18ef70a25 semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
2007-03-05 21:05:00 +00:00
tsutsui
82d1d0d63e Add pci(4) node for pcictl(8). 2007-03-04 10:35:19 +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
thorpej
ab87c6666d TRUE -> true, FALSE -> false 2007-02-22 05:14:04 +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
tsutsui
a632ff6d41 According to info from Byron Servies on port-cobalt,
the interrupt line from the primary (and only) tulip Ethernet
on Qube2700 is connected to CPU INT2, so handle it properly
in pci_intr_map(9).
2007-02-18 12:22:16 +00:00
tsutsui
990a39ff81 Remove hacks for now removed spllowersoftclock(9). 2007-02-16 13:27:00 +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
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
yamt
8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
scw
e07faf8a74 Replace the myriad copies of bounds_check_with_label() with a single MI
version.

Add disk_blocksize(9) so that disk drivers can record the physical
block size of a disk if it is different to DEV_BSIZE. Right now this
simply initialises dk_blkshift and dk_byteshift according to the
supplied block size. This information is used in the MI version of
bounds_check_with_label().
2006-11-25 11:59:55 +00:00
wiz
6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
tsutsui
655bb5e6f1 Remove options SOSEND_NO_LOAN. Now it's handled in mips/pmap.c. 2006-11-18 14:28:55 +00:00
tsutsui
44e83481b7 Defer _spl0() or _splnone() calls (which enable hardware interrupts)
from cpu_configure(9) to cpu_initclocks(9) on mips ports which use
mips3_clockintr.c:mips3_clockintr() (i.e. CPU INT5 clock) to avoid
hardclock(9) before softclock interrupt is initialized in initclocks().
This should be harmless because initclocks() is a part of configure()
in these days and there is no MI function which expects hardware
interrupts between cpu_configure(9) and cpu_initclocks(9).

Disccussed on tech-kern and port-mips.
2006-11-17 21:01:03 +00:00
jmmv
7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
tsutsui
afb7d3cbe0 Protect from multiple inclusion. 2006-09-26 13:11:59 +00:00
tsutsui
dfef23e0d0 Tweak status value in struct clockframe before calling mips3_clockintr()
so that spllowersoftclock(9) in hardclock(9) will be handled properly.
2006-09-16 13:31:44 +00:00
tsutsui
e5dc12ca9c Change mips3_clockintr() to take (struct clockframe *) rather than
pc and status since it calls hardclock(9) anyway.
OK'ed by gdamore on port-mips.
2006-09-10 14:27:38 +00:00
tsutsui
10e0e7415c Remove or comment out now unused code after MI mips3_clockintr migration. 2006-09-10 06:41:09 +00:00
gdamore
bf6fc8ef63 Various improvements to make the common mips3 clock handling more generally
useful.  The functions delay, cpu_initclocks, and setstatclcokrate have been
renamed to mips3_delay, mips3_initclocks, and mips3_setstatclockrate.

We provide weak aliases for the original names, so machdep code doesn't have
to provide wrapper routines.  (Giving good performance.)

I've moved mips3_clockintr, mips3_initclocks, and mips3_setstatclockrate to
their own mips3_clockintr file, because some ports may not be able to use
these, and its senseless to carry that baggage.
2006-09-08 23:39:27 +00:00
gdamore
5ebcd1bf4f Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee).  ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
2006-09-07 03:38:54 +00:00
tsutsui
087695a56b Switch cobalt to MI todr. 2006-09-04 20:30:40 +00:00
christos
e0df1e4c51 PR/34283: Gene ENonymous: Add IPFILTER_LOOKUP to the default kernel options
Also remove CCITT,NS,NIP
2006-08-26 20:26:43 +00:00
tsutsui
6ff205ce76 Remove obsolete #options VERIFIED_EXEC, found by grep(1). 2006-08-26 07:59:21 +00:00
riz
a9815feffa Vendor GALILEO is now MARVELL. 2006-08-22 21:42:19 +00:00
tsutsui
fea89b198e Add options SOSEND_NO_LOAN. See the following comment for details:
---
# XXX Disable zero-copy page loaning in sosend() temporarily:
#     PV mappings created by sosend_loan() in sys/kern/uipc_socket.c may
#     produce virtual cache aliases and it seems to cause TLB MISS panic
#     in cache flush code called from bus_dmamap_sync(9) PREWRITE ops
#     during heavy TX packet traffic on tlp(4).
2006-08-22 16:30:41 +00:00
christos
b300b74469 Disable SYSTRACE by default on all kernels (discussed with core) 2006-08-12 15:29:52 +00:00
uwe
a2668e7027 Link libkern last. It contains functions normally found in libgcc, so
other libraries might have references to them.

Makes this compile with gcc4 (that emits calls to __ash[rl]di3 in libsa).
2006-08-12 11:38:11 +00:00
drochner
84f50d1b92 don't install <machine/db_machdep.h>, this is kernel only 2006-07-26 19:54:56 +00:00
tsutsui
6b93d0f87d Use CPUFLAGS="-march=vr5000 -mabi=32". 2006-07-19 15:33:53 +00:00
tsutsui
fd040c4006 Add and update misc items. 2006-07-18 13:24:39 +00:00
tsutsui
e621e8f3df - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
  (XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
  clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
  by default.
2006-07-18 12:51:01 +00:00
tsutsui
fe55d37a26 Remove obsolete comment. 2006-07-18 12:21:42 +00:00
tsutsui
970c192eba - configure PCI space for viaide so that DMA will work even if the firmware
doesn't map DMA registers properly
- enable viaide secondary port explicitly which isn't enabled by some firmware

Tested on RaQ and RaQ2.
2006-07-15 08:08:23 +00:00
gdamore
34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
liamjfoy
aeee5deab9 Add CARP to GENERIC kernel configs. CARP is not enabled by default.
ok: christos
2006-06-28 15:19:27 +00:00
tsutsui
8ff2abc2ad space nits. 2006-06-10 12:35:01 +00:00
tsutsui
a46e8b9247 Remove unneeded #include headers. 2006-05-31 13:20:42 +00:00
tsutsui
d241536854 Use __predict_true() and __predict_false() in some critical handlers. 2006-05-31 13:14:13 +00:00
tsutsui
cbe0593dd5 Cleanup ICU (i8259 compatible PIC) interrupt handling code:
- move ICU interrupt stuff from pci/pcib.h to cobalt/machdep.c
  because ICU should be initialized before pcib is attached
- initialize ICU more properly
- check interrupt types and set ELCR (edge/level control registers)
  accordingly in icu_intr_establish()
- check requested IRQ line and call only a necessary hander in icu_intr()
- use specific EOI to ack interrupts rather than AEOI
- use macro defined in <dev/ic/i8259reg.h>
2006-05-31 12:59:39 +00:00
tsutsui
2dba0c5647 Initialize the GT64x11 PCI timeout and retry register with a value taken
from Linux/MIPS, which improves viaide xfer performance significantly.
2006-05-28 12:52:07 +00:00
tsutsui
a465c6b884 Tweak bus_space_barrier(9) macro to appease
"left-hand operand of comma expression has no effect"
warnings by gcc4.
2006-05-26 13:23:34 +00:00
tsutsui
21d08156dc Change range of PCI I/O space for pci_configure_bus(9)
so that viaide(4) works with PCI fixup (not enabled yet).
2006-05-20 03:38:03 +00:00