Commit Graph

584 Commits

Author SHA1 Message Date
tsutsui
3de743094e No need to terminate DMA in si_dma_poll(). 2008-06-17 18:24:21 +00:00
tsutsui
36bc2e34d4 Implement si_dma_poll() properly so that crashdump works with DMA xfer. 2008-06-17 17:31:51 +00:00
tsutsui
7ff875bed5 Unify splraiseipl(9) implementation among m68k ports as per
suggestion from isaki@ on port-m68k.

For news68k:
- export ipl2psl_table[] and make it uint16_t
- make makeiplcookie(9) inline
- put PSL_S bit into ipl2psl_table[] rather than adding it in makeiplcookie(9)
- define both IPL_SCHED and IPL_HIGH independently to avoid confusion
2008-06-15 07:20:46 +00:00
ad
fd089e08cf Remove ref to uvm.page_idle_zero 2008-06-04 11:30:25 +00:00
tsutsui
b87210fa51 Normalize my licenses. 2008-05-14 13:29:27 +00:00
tsutsui
8e98bd4e5e Tweak a structure definition for DMA registers. 2008-05-07 13:02:00 +00:00
tsutsui
9963e1d1ef Certainly this file is derived from src/sys/arch/x68k/include/intr.h,
so sync copyright notice with it.  Approved by martin@.
2008-04-30 08:13:24 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui
377c9d4dfd Remove obsolete (commented out) options SHMMAXPGS. 2008-04-27 06:26:04 +00:00
ad
284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
tsutsui
5147571380 Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes. 2008-04-04 16:00:57 +00:00
tsutsui
d9941582bf Split device_t/softc for le(4) and variants and misc cosmetic changes. 2008-04-04 12:25:06 +00:00
tsutsui
02cb47cab2 Split softc and device_t for zsc(4) and its children.
XXX we should restructure MI APIs and make it really machine independent.
2008-03-29 19:15:34 +00:00
tsutsui
d062717c3f Don't forget to set sc_dev. 2008-03-29 05:48:33 +00:00
tsutsui
4090172b20 Don't forget to initialize sc_dev. 2008-03-29 05:42:45 +00:00
tsutsui
03bb6cc822 Split device_t and softc for MI mk48txx(4) and intersil7170(4) clocks,
and other related misc cosmetics.
2008-03-28 20:26:12 +00:00
tsutsui
820a544d88 Use CFATTACH_DECL_NEW(), device_t, cfdata_t, and aprint_*(). 2008-03-28 18:19:56 +00:00
tsutsui
c93c4b87ff Use CFATTACH_DECL_NEW(), device_t, cfdata_t, and aprint_normal(9). 2008-03-28 17:51:51 +00:00
joerg
0d7b4c40bf Missing assym.h dependencies. 2008-03-01 14:00:30 +00:00
xtraeme
f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
drochner
bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
joerg
e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
tsutsui
03242949ba - account idepth in all interrupt handlers
- use idepth for CLKF_INTR()
2008-01-28 17:07:19 +00:00
joerg
3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
tsutsui
8c58569757 WARNSfy 2008-01-11 09:26:26 +00:00
tsutsui
05517e38f5 - move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
  MD attachments
2008-01-10 15:31:26 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad
2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
ad
9f6b8c4d04 Remove COMPAT_HPUX. 2007-12-31 13:38:47 +00:00
tsutsui
0cbdb8cc76 Use __arraycount(). 2007-12-23 03:04:57 +00:00
tsutsui
99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
he
842094660b Add an overlooked define of IPL_ZS, matching with splzs(). 2007-11-18 14:01:28 +00:00
ad
f2c57d8566 Call zs_lock_init() to set up the chanstate's lock. 2007-11-09 00:05:04 +00:00
ad
bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +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
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
ad
9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
mhitch
9b0f085da1 68030 and 68040 processors consider the read portion of a read-modify-write
transfer as a write to ensure the memory is writable before starting any
transfer.  The fault status information does not reflect this in the 'read'
status bit (i.e. it shows up as a read access), so faults with a RMW access
to non-writable memory was not getting the correct protection.  The page would
be read-only and the instruction would fault over and over.

A specific example is when a process forks, and the child process attempts
to execute a RMW access to a data page, which is read-only because it's CoP
Copy-On-Write.

When checking if the page needs to be writablek, also check the locked transfer
and treat any locked transfer as a write.

68060 already handled this correctly, since it has separate read and write
fault bits, and both are set on a RMW access and the trap code was checking
the write status bit.

Fixes PR#36848.
2007-09-01 21:31:55 +00:00
ad
9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad
63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
tsutsui
12f2307a5f Add options COMPAT_40. 2007-06-25 13:22:45 +00:00
mhitch
d2eac2f631 Pass a frame pointer to trap() rather than the 'entire frame' trick. Gcc4
was optimizing away modifications to the frame contents (it's not nice to
trick gcc).  Pass the pointer as the first argument to reduce the number
of places that would be changed otherwise.  Fixes the getcwd regression
test on most m68k ports.
2007-06-12 03:34:28 +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
tsutsui
32b0b73c06 Move declarations of m68k common functions
from <machine/cpu.h> to <m68k/m68k.h>.
While here, remove some obsolete function decls.
2007-05-21 16:37:03 +00:00
tsutsui
124af7e7eb Call simple_lock_init(9) with proper zs_chanstate otherwise
LOCKDEBUG kernel fails during console zstty attachment.
2007-05-20 05:50:25 +00:00
mhitch
9385473585 Add missing call to lwp_startup() in lwp_trampoline() (which was renamed
from proc_trampoline to match the other ports).

A DIAGNOSTIC kernel will now boot and run.  LOCKDEBUG still doesn't work yet.
Also, my amiga no longer loses time.
2007-05-20 04:29:47 +00:00
tsutsui
570ffc1b5b Update comments to sync yamt-km merge (Sysmap has been moved).
See also:
http://mail-index.netbsd.org/source-changes/2005/02/23/0004.html
2007-05-18 10:45:58 +00:00
tsutsui
bbf9e3d14a Adapt news68k to yamt-idlelwp. Tested on NWS-1750. 2007-05-18 10:13:25 +00:00
thorpej
32a8b62d33 - Shrink ipl_cookie_t from 32-bits to 16-bits (large enough to hold
an SR value or an IPL_* constant).
- Take advange of the smaller ipl_cookie_t to shrink kmutex_t from
  16 bytes to 8 bytes by overlapping storage where possible.
- Implement a RAS-based _lock_cas() for mc68010 systems (Sun2).  See
  sun68k/sun68k/isr.c.

Tested on various m68k platforms, but NOT Sun2.  In any case, at least
Sun2 compiles now.
2007-03-11 05:22:24 +00:00