Commit Graph

91183 Commits

Author SHA1 Message Date
ad
937533671d lockmgr -> rwlock 2007-12-06 14:53:35 +00:00
ad
c519a6851b Correct argument shuffling in the string I/O functions. 2007-12-06 14:40:28 +00:00
ad
5921ed7cda Share cpu_intr_p() with xen. Why xen has its own intr.c is a mystery. 2007-12-06 13:58:38 +00:00
dyoung
9fd5916940 Fix a serious regression: insert new ifaddrs at the end of if_addrlist,
not at the front, because the first ifaddr on the list has special
significance (grrr).
2007-12-06 02:23:42 +00:00
rmind
6fcda0686a Increase the default limit of SEM_MAX, allow changing of limit
dynamically via sysctl.  Closes PR/36979.
2007-12-06 01:27:21 +00:00
ad
f2fb0b3870 mutex_init: use 'if' instead of 'switch' to avoid complaints from the
compiler.
2007-12-06 01:18:46 +00:00
dyoung
b579a81e92 Use ifa_insert(), ifa_remove(). 2007-12-06 00:28:36 +00:00
dyoung
7a3c43874a Add ifa_insert() and ifa_remove() that add/remove an ifaddr to/from
an interface and increase/decrease its reference count.
2007-12-06 00:23:09 +00:00
dyoung
b8f324fabd Extract common code, creating a subroutine if_purgeaddrs(ifp,
family, purgeaddr) which applies function `purgeaddr' to each
address on `ifp' belonging to `family'.
2007-12-05 23:47:17 +00:00
gmcgarry
11f250300f Fix locking botch. 2007-12-05 23:20:27 +00:00
dyoung
b039c2dbef Use IFADDR_FIRST(), IFADDR_NEXT(). 2007-12-05 23:00:58 +00:00
dyoung
0bf994db38 Use IFADDR_FIRST() and IFADDR_NEXT(). 2007-12-05 22:56:51 +00:00
dyoung
498e382747 Use IFADDR_FIRST(), IFADDR_NEXT(). 2007-12-05 22:56:02 +00:00
dyoung
adde197943 Use IFADDR_EMPTY(). 2007-12-05 22:51:01 +00:00
dyoung
0ecaa37d9b Use IFADDR_FIRST(), IFADDR_NEXT(), IFNET_NEXT(). 2007-12-05 22:50:00 +00:00
he
cf18b9fe3e Remove reference to now-obsolete powerpc/softintr.c. 2007-12-05 20:55:26 +00:00
xtraeme
21d75f870d Boh! I spoke too soon before, without the rwlock(9) sometimes
arc_wait() waits forever, so put it back until I figure any other way
to remove the rwlock(9).
2007-12-05 18:58:00 +00:00
xtraeme
1b48221099 Use SCSIPI_CHAN_NOSETTLE... the driver doesn't have to wait. 2007-12-05 18:25:53 +00:00
dyoung
550024b13d Use IFADDR_EMPTY().
(This driver should go away, comments indicate that it does not
even compile.)
2007-12-05 18:23:23 +00:00
xtraeme
dc5ade8ebb Make it use mutex(9) and condvar(9), bye bye spl(9) and tsleep(9).
Fully stable with all debugging options turned on, unless someday any
problem appears :-)
2007-12-05 18:07:34 +00:00
dyoung
67637efccc Add IFNET_FIRST(), IFNET_NEXT(), IFADDR_FIRST(), IFADDR_NEXT(),
IFADDR_EMPTY().

Call the IF{NET,ADDR}_FOREACH() macro arguments __ifp and __ifa
instead of ifp and ifa.
2007-12-05 18:07:21 +00:00
pooka
4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
he
70568171d3 Bump SYMTAB_SPACE so that it fits again. 2007-12-05 16:59:50 +00:00
xtraeme
220ed74e1e - arc_msgbuf: free wbuf and rbuf with the correct type (M_TEMP vs M_DEVBUF)
this fixes a panic with debugging options.
- Do not use a callout to refresh sensor data, and make it available
  every time someone requests it.
- Enable ENVSYS_FMONSTCHANGED for notifications in the volumes.
2007-12-05 16:02:25 +00:00
tsutsui
ce1de729ff Restore ipl settings for AV class Macs. 2007-12-05 12:51:49 +00:00
tsutsui
99221a563b Use TAILQ_FIRST(3) and TAILQ_NEXT(3) macro. 2007-12-05 12:31:25 +00:00
pooka
7d5d7f4ff9 Send a response message for flush operations from the kernel instead
of abusing the return value of write(2).
2007-12-05 12:11:56 +00:00
tsutsui
df1fb18927 Use queue(3) macro. 2007-12-05 12:03:08 +00:00
yamt
65e70dc43b include mutex.h. 2007-12-05 12:01:24 +00:00
yamt
bdc83d4098 g/c uvm_vnp_sync 2007-12-05 09:37:34 +00:00
yamt
83e62acd43 fix UBC_WANT_UNMAP.
- check PMAP_CACHE_VIVT after pulling pmap.h.
	- VTEXT -> VI_TEXT.
2007-12-05 09:35:46 +00:00
xtraeme
9d0a9ec5d9 Add arcmsr(4) and aps(4). 2007-12-05 09:10:25 +00:00
ad
73b6db8481 Make it compile. 2007-12-05 08:45:30 +00:00
ad
a0ca06de3d lockmgr -> mutex 2007-12-05 08:39:46 +00:00
ad
78090667c0 Kill ref to lockmgr in comments (for grep). 2007-12-05 08:34:41 +00:00
ad
a5bdf04ea6 lockmgr -> rwlock 2007-12-05 08:33:23 +00:00
ad
6874e511b7 lockmgr -> mutex 2007-12-05 07:58:29 +00:00
ad
5a24480bf8 lockmgr -> mutex 2007-12-05 07:15:53 +00:00
ad
598ab03ad0 Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.
2007-12-05 07:06:50 +00:00
ad
ba369f0439 MUTEX_SPIN -> MUTEX_DEFAULT. 2007-12-05 06:52:27 +00:00
ad
8cd835a351 pool_init, pool_cache_init: hack around IP input processing which can
not yet safely block without severely confusing soo_write() and friends.
If the pool's IPL is IPL_SOFTNET, initialize the mutex at IPL_VM so that
it's a spinlock. To be dealt with correctly in the near future.
2007-12-05 06:52:01 +00:00
ad
b21038696d mutex_init: make MUTEX_DEFAULT + IPL_SOFT* return an adaptive mutex. 2007-12-05 06:50:07 +00:00
dyoung
8abfe600f2 Avoid casts, change (struct ifaddr *)ia to &ia->ia_ifa. 2007-12-05 01:20:01 +00:00
dyoung
8e3ac3ec9f Use IFADDR_FOREACH(). 2007-12-05 01:17:16 +00:00
dyoung
399c4bed3c Bring this dead code, aa_clean(), into the 21st century, *shrug*.
Use IFADDR_FOREACH().
2007-12-05 01:16:02 +00:00
dyoung
5b90d794cb Use IFADDR_FOREACH(). 2007-12-05 01:11:24 +00:00
dyoung
5a740a2a51 Extract common code into subroutine svr4_count_ifnum().
Don't open-code queue(3) macros (x = ifnet.tqh_first; y =
x.if_list.tqe_next).  Instead, use the macros themselves.

Use IFNET_FOREACH() and IFADDR_FOREACH().
2007-12-05 01:10:47 +00:00
dyoung
cabaa89d1f Don't open-code queue(3) macros (x = ifnet.tqh_first; y =
x.if_list.tqe_next).  Instead, use the macros themselves.

Use IFNET_FOREACH() and IFADDR_FOREACH().
2007-12-05 01:06:23 +00:00
dyoung
b86d03582a Use IFADDR_FOREACH(). 2007-12-05 01:03:30 +00:00
dyoung
3f6c5b6545 Don't open-code queue(3) macros (x = ifnet.tqh_first; y =
x.if_list.tqe_next).  Instead, use the macros themselves.
2007-12-05 01:02:15 +00:00
dsl
cfc18fc34b Remove all the __P from here, including the other other mismatched one
that my sed script left behind and 'he' didn't notice.
2007-12-05 00:31:01 +00:00
xtraeme
67052f9b51 arc(4) -> arcmsr(4) 2007-12-05 00:19:40 +00:00
xtraeme
11b3a747bd Rename the Areca RAID driver (known as arc(4) to arcmsr(4) to avoid
namespace conflict with NetBSD/arc.

Found by tsutsui@.
2007-12-05 00:18:06 +00:00
xtraeme
8533522c01 Enable arc(4), reminded by riz@. 2007-12-04 23:49:46 +00:00
he
5b4fada2e1 Re-balance a parenthesis. 2007-12-04 22:43:50 +00:00
mjf
d4a648c345 Implement a new magic string for magic symlinks, @ruid, which exapnds to the
real user id of the process and use this magic string for per-user tmp.
This should fix PR/35687

Kernel parts reviewed by wrstuden@
2007-12-04 22:09:01 +00:00
xtraeme
e505e7cc51 Use a rwlock(4) for arc_lock/unlock. arc_msgbuf() is too fragile and
we want to be sure that only one consumer is using it at a time.
2007-12-04 21:09:56 +00:00
pooka
c024a3a48f Add a bit to differentiate if a message is a request or a response. 2007-12-04 19:43:42 +00:00
xtraeme
b5738c49b6 Enable arc(4). 2007-12-04 18:53:57 +00:00
xtraeme
8e6cf74867 Areca Technology Corporation SATA RAID controller driver, ported
from OpenBSD.

arc0 at pci2 dev 14 function 0: interrupting at ioapic0 pin 18 (irq 5)
arc0: Areca ARC-1210 Host Adapter RAID controller
arc0: 4 ports, 256MB SDRAM, firmware <V1.43 2007-4-17>
scsibus0 at arc0: 16 targets, 8 luns per target
[...]
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <Areca, ARC-1210-VOL#00, R001> disk fixed
sd0: 465 GB, 56514 cyl, 36 head, 480 sec, 512 bytes/sect x 976562176 sectors
sd1 at scsibus0 target 0 lun 1: <Areca, ARC-1210-VOL#01, R001> disk fixed
sd1: 465 GB, 56514 cyl, 36 head, 480 sec, 512 bytes/sect x 976562176 sectors

bioctl(4) output with two RAID0 volumes:

Volume  Status               Size Device
 arc0 0 Online               466G ARC-1210-VOL#00 RAID0
      0 Online               234G 0:0.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
      1 Online               234G 0:1.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
 arc0 1 Online               466G ARC-1210-VOL#01 RAID0
      0 Online               234G 0:2.0   noencl <WDC WD2500YS-01SHB1 20.06C06>
      1 Online               234G 0:3.0   noencl <WDC WD2500YS-01SHB1 20.06C06>

The driver still needs changes related to locking and talking to the
firmware, which sometimes is unable to answer...

Raid card donated by Areca Technology Corporation via Trent George.
Disks used for testing were contributed by TNF.

Thank you very much.
2007-12-04 18:47:50 +00:00
dsl
f2af9174b9 Remove all the __P 2007-12-04 18:40:07 +00:00
yamt
1ed3981c19 merge non-intrusive nfs changes from vmlocking. 2007-12-04 17:42:30 +00:00
ad
deb8b3146e Use atomics to maintain nprocs. 2007-12-04 16:56:16 +00:00
tsutsui
b7b9eda05d - add a missing brace in the previous
- print error message on failure to map aux register
2007-12-04 16:36:54 +00:00
ad
83caeda725 - Fix the locking around the i8254. Values for the TSC clock and lapic
delay function were wildly inaccurate due to multiple CPUs competing
  in DELAY() during calibration, confusing the clock chip.
- Use i8254_delay() explictly in a few more places.
2007-12-04 16:05:34 +00:00
xtraeme
05237843cf Newer nForce MCP SMBus devices use different PCI BARs than the old ones
(nForce 2/3/4).

nfsmb(4) is now properly working on newer MCPs, tested by wiz@ on MCP55:

nfsmbc0 at pci0 dev 1 function 1: NVIDIA nForce MCP55 SMBus Controller (rev. 0xa2)
nfsmb0 at nfsmbc0 SMBus 1
iic0 at nfsmb0: I2C bus
spdmem0 at iic0 addr 0x51
spdmem0: DDR2 SDRAM memory, data ECC, 1024MB, 667MHz, PC2-5300
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
nfsmb1 at nfsmbc0 SMBus 2
iic1 at nfsmb1: I2C bus
2007-12-04 15:58:11 +00:00
spz
3d1270e2c8 try fixing up broken revision string again 2007-12-04 15:42:05 +00:00
spz
5bfaf1ebca fix up broken revision string 2007-12-04 15:41:20 +00:00
tsutsui
704f93353b Apply missed following MI wdc changes to atari's mainbus wdc backend:
- make bus space handles an array for each command register
  http://mail-index.netbsd.org/source-changes/2003/11/27/0036.html
  (note we no longer have to specify stride for wdc after this change)
- add the notion of "shadow register"
  http://mail-index.netbsd.org/source-changes/2004/05/25/0048.html

Problem reported by Alan Hourihane in PR port-amiga/37464.
2007-12-04 15:28:58 +00:00
tsutsui
2f66d76b2f Adapt sun68k ports to recent interrupt handling changes.
XXX: sun2 (m68010) doesn't have CAS instructions.
2007-12-04 15:12:07 +00:00
bjs
72127ffc00 drm unbreaking, round 1:
Fix the bus_dma(9) use in drm_pci.c and chnage struct drm_dma_handle_t
to match it.  Remove member dmaaddr from drm_dma_handle_t as well,
as I don't see it used anywhere.  Compile-tested only for now; please
report any problems to me.  Thanks.
2007-12-04 12:51:13 +00:00
dyoung
73b0c685df Use IFADDR_FOREACH(). 2007-12-04 10:31:14 +00:00
dyoung
5bbde3d775 Use IFNET_FOREACH() and IFADDR_FOREACH(). 2007-12-04 10:27:33 +00:00
dyoung
5f717043e5 Use IFADDR_FOREACH(). 2007-12-04 10:22:34 +00:00
dyoung
2fae21685a Reprogram multicast filter after SIOCADDMULTI / SIOCDELMULTI.
Fixes IPv6 stateless address configuration problems reported on
tech-net@.  Patch tested and found to work by Martti Kuparinen.
2007-12-04 09:22:05 +00:00
ad
bb7ddbf003 rw_vector_enter: assert !cpu_intr_p(). 2007-12-04 09:13:59 +00:00
ad
3a2e0f7355 ktd_callout: ktrace_lock can be acquired now. 2007-12-04 09:08:58 +00:00
ad
72bfe5209f ttysigintr: proclist_lock can be taken now. 2007-12-04 08:57:35 +00:00
ad
7546fcf0ad softintr_ret: fix it to work properly after yesterday's change to mi_switch. 2007-12-04 08:03:46 +00:00
he
a2a6dd1963 Define the various MIPS* CPU macros also for _STANDALONE in addition
to for _LKM, so that we don't #error out in that case.

This fixes the build for sgimips boot programs, which wants to use
libkern, which now includes the atomic stuff, which for the mips ports
ends up including this file.

"simonb said OK"
2007-12-04 02:43:48 +00:00
joerg
d84e0831f3 Revert last commit which added externs that never get defined anywhere.
At least lapic_get_timecount conflicts with the newly added lapic TC.
2007-12-03 23:29:26 +00:00
elad
5187640465 Don't make root an exception when enforcing rlimits.
Suggested by yamt@ months ago; okay christos@.
2007-12-03 22:37:34 +00:00
joerg
e5784d23f1 Add a CPU local timer based on the LAPIC. This is consistently faster
than TSC, but doesn't suffer from SpeedStep as TSC does.

The default quality is higher than HPET for UP, but -100 for
MULTIPROCESSOR as it needs CPU local state which doesn't exist yet.
2007-12-03 22:17:27 +00:00
ad
27f20ecf58 Soft interrupts can now take proclist_lock, so there is no need to
double-lock alllwp or allproc.
2007-12-03 20:26:24 +00:00
ad
395a384526 Merge from vmlocking. 2007-12-03 20:21:32 +00:00
ad
7a09009b52 Merge from vmlocking. 2007-12-03 19:06:36 +00:00
ad
0cf3a46daf 4.99.40 - interrupt changes 2007-12-03 17:15:37 +00:00
ad
9027344d32 For the slow path soft interrupts, arrange to have the priority of a
borrowed user LWP raised into the 'kernel RT' range if the LWP sleeps
(which is unlikely).
2007-12-03 17:14:59 +00:00
tsutsui
bdce6fcc66 Raise hp300_ipl2psl[IPL_VM] in intr_computeipl() accordingly.
(maybe mac68k has the same problem)

XXX: maybe we could use a possible highest device ipl (5 on hp300?) for IPL_VM.
2007-12-03 16:18:47 +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
pooka
af3b65635e Allow EVFILT_WRITE kqfilters to be registered and map them to
seltrue_filtops.
2007-12-03 15:24:06 +00:00
pooka
01f5a6d143 Some boys take a beautiful seltrue_filtops and hide her away from
the rest of the world - but let's not.
2007-12-03 15:21:57 +00:00
rafal
7b4886ba60 Clear interrupts as they are established, rearrange interrupt-mapping code
to make sure PCI slot 0 interrupt doesn't accidentally match the (unused)
PCI error interrupt.

Fixes kern/25462 at least on my Netra T1 ac200.
From OpenBSD; ok martin@
2007-12-03 14:13:18 +00:00
plunky
d8436629a8 initialize loop variable as loop is not necessarily undertaken 2007-12-03 10:41:59 +00:00
isaki
48e1704028 Use standard error code (EIO) instead of standalone error code
(ESHORT).  Because loadfile_*() is used with or without
_STANDALONE, therefore, don't use error code in "saerrno.h".
Pointed out by and discussed with he@.
2007-12-03 09:51:30 +00:00
christos
9e2c6405b0 kill a diagnostic for now. 2007-12-03 02:20:24 +00:00
christos
33cb8be1db - add an elf aux vector entry for implementing $ORIGIN.
- the code to convert from a vnode to a path is commented out now until
  a better solution is implemented. Only absolute paths work for now
  (which is most of the cases).

requested by core
2007-12-03 02:06:57 +00:00
ad
685aa3baed DIAGNOSTIC is only one of many debugging options. 2007-12-02 23:51:22 +00:00
rumble
f06a64e97b Fix two minor bugs:
1) If ODCM is disabled (ODCM_ENABLE not set), clockmod_getstate() should
    return the maximum level (7), not the lowest (0), as the levels are
    defined as duty cycles where the highest implies no ODCM. Now sysctl
    machdep.clockmod.current doesn't lie upon init.

 2) Make the sysctl handler ensure that no disabled levels are permitted.
    Previously, a level disabled due to errata could be passed to
    clockmod_setstate(), which would search through the state array,
    skipping the unusable value. Consequently our index would be out of
    range and badness could ensue.

Okay'd by xtraeme@.
2007-12-02 22:44:57 +00:00
dsl
cd39f2272a Improve the likelyhood of the 'oosyscall' code (ie that for system call entry
via a call gate for i386 netbsd 1.0 and ibcs2) doing the right thing.
Untested because I've failed to get an a.out netbsd 1.0 binary to load.
2007-12-02 21:43:11 +00:00
ad
6bd016935d Use the softint API. 2007-12-02 20:46:53 +00:00
ad
6a310e099d Back out part of patch that got merged accidentally. 2007-12-02 20:34:41 +00:00
ad
8838af190c ps/w: display LWP info. 2007-12-02 19:35:33 +00:00
ad
3ce0f72397 Use atomics to adjust ci_flags. 2007-12-02 19:33:31 +00:00
ad
dc58e180fd Remove unused cpp goo 2007-12-02 19:28:32 +00:00
ad
3c392fd114 Bump SYMTAB_SPACE 2007-12-02 19:25:43 +00:00
bouyer
eae5f92d0c IOCTL_PRIVCMD_MMAP*: instead of brutally enterring the new entries in
the process page table, properly uvm_unmap1() the VA range and enter a new
uvm_map backed by an object. There is a know race between uvm_unmap1() and
uvm_map(), where another thread could get our VA range; in practice
I think none of the softwares using this interface are multithreaded (or at
last they are single-threaded when using it).
2007-12-02 18:29:54 +00:00
hannken
b1446c225c Make it compile again. 2007-12-02 18:24:34 +00:00
jmcneill
479b0a0816 CRMFB_VT_VCMAP and CRMFB_VT_HCMAP register definitions were transposed.
From jsing@openbsd in private mail.
2007-12-02 17:36:57 +00:00
ad
7960b954d7 Don't clear ci_want_resched in MD code; it's done in mi_switch(). 2007-12-02 16:37:58 +00:00
skrll
e151146b60 Provide a _C_LABEL 2007-12-02 15:55:09 +00:00
ad
208085366c sys__lwp_create: set in the correct lock when the LWP is created suspended. 2007-12-02 15:49:38 +00:00
ad
25f8c0149e mi_switch: adjust so that we don't have to hold the old LWP locked across
context switch, since cpu_switchto() can be slow under certain conditions.
From rmind@ with adjustments by me.
2007-12-02 14:55:49 +00:00
ad
e2aaefb859 - mi_switch: adjust so that we don't have to hold the old LWP locked across
context switch, since cpu_switchto() can be slow under certain conditions.
  From rmind@ with adjustments by me.
- lwpctl: allow LWPs to reregister instead of returning EINVAL. Just return
  their existing lwpctl user address.
2007-12-02 14:55:32 +00:00
hannken
d556dc98b0 Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE.  This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2007-12-02 13:56:15 +00:00
jmcneill
e501c34199 SILENCE! I kill you! 2007-12-02 06:51:52 +00:00
tsutsui
0a953ce07e - also pass correct size on dealloc() of in-memory superblock data
- also call dealloc() for group descriptor blocks
2007-12-02 06:47:43 +00:00
jmcneill
61d5fb95a4 No need to waste more than one line of output at attach time. 2007-12-02 06:26:40 +00:00
tsutsui
8d7676534f Allocate correct size for in-memory data struct m_ext2fs
(which is larger than SBSIZE).
2007-12-02 06:12:35 +00:00
tsutsui
71a975f6f6 - add ffsv2 ops
- use __arraycount()
2007-12-02 05:40:25 +00:00
tsutsui
71921eec1b Use __arraycount(). 2007-12-02 05:36:46 +00:00
tsutsui
48db0a5603 - fix description about index structure of an inode to match ext2fs_dinode
- put more byteswap ops on reading block numbers in indirect blocks
  (XXX: untested on big endian machines)
2007-12-02 05:23:40 +00:00
kiyohara
a1297d6f3f Add bcsp(4). 2007-12-02 05:19:11 +00:00
tsutsui
db898c555a unsigned -> unsigned int 2007-12-02 04:59:24 +00:00
christos
c9ef94469d busfunc needs assym.h too. 2007-12-02 04:24:44 +00:00
mhitch
9d6e1af583 Initializing the callout structure while it's in use is bad.
Only do it on the first call to iteinit().
2007-12-02 04:21:22 +00:00
kiyohara
791b5cdccd Add bcsp and btbc and btuart. 2007-12-02 03:33:09 +00:00
kiyohara
13aed8da30 Print name of firmware on fail for firmware_open(). 2007-12-02 02:06:30 +00:00
kiyohara
6119aca096 Add support bgb2xx. (not test X-)
Add configuration rate with ericsson.
Change initialization at stlc2500.
Obsolate BTUART_HCITYPE_BT2000C.
2007-12-02 00:09:49 +00:00
jmcneill
490542edae aprintify, on behalf of xtraeme 2007-12-01 23:40:28 +00:00
ad
f8e6fbe610 Xintr_lapic_tlb_bcast: saving and restoring %ds may take up to 100 cycles.
Just access the globals using %ss.
2007-12-01 22:34:28 +00:00
elad
adc8fdec92 Add PT_TRACE_ME to switch statement.
This caused trouble with ptrace, and noted just now thanks to a strict
policy design. Noted (and fix verified by) mjf@, thanks.
2007-12-01 21:59:49 +00:00
ad
0e93b3c25e The I2O LAN stuff was never tested and is just more code to maintain -
remove it.
2007-12-01 18:14:48 +00:00
ad
b46323f065 I2OVERBOSE/opt_i2o.h were removed 2007-12-01 18:13:17 +00:00
tsutsui
59777a7842 Add ext2fs support. 2007-12-01 18:13:16 +00:00
ad
8ef7991906 Noisy printfs. 2007-12-01 18:12:37 +00:00
tsutsui
d8fc666005 - build ext2fs.c
- put SRCS per each file system.
2007-12-01 18:11:02 +00:00
jmcneill
13ca221015 aprintify 2007-12-01 18:10:48 +00:00
tsutsui
28712e0756 Add ext2fs support for libsa.
Mostly based on ufs.c, and some ext2fs specific stuff is pulled from
sys/ufs/ext2fs/ext2fs_bswap.c and sys/ufs/ext2fs/ext2fs_vfsops.c.

XXX1: Should we share ufs.c with #ifdef LIBSA_EXT2FS as ffs and lfs do?
XXX2: Maybe we should share ext2fs_bswap.c with kernel.
2007-12-01 18:06:22 +00:00
jmcneill
ce3286d7bc Prefix the regulatory domain and address output with the device name. 2007-12-01 18:02:42 +00:00
jmcneill
0791e7eb6c One of these aprint_normals should have been aprint_naive 2007-12-01 17:56:59 +00:00
tsutsui
c3af9178e9 Use "uint" rather than "unsigned" without a type. 2007-12-01 17:44:16 +00:00
tsutsui
a65243be7c Include both ffsv1 and ffsv2 supports. 2007-12-01 17:05:11 +00:00
ad
976457d5d6 Back out previous. 2007-12-01 17:00:41 +00:00
jmcneill
ad3709398d aprintify 2007-12-01 16:59:13 +00:00
ad
3e9b14ec02 Noisy printfs. 2007-12-01 16:58:36 +00:00
tsutsui
581d311161 Use e2fs_first_dblock in superblock to read/write group descriptor blocks. 2007-12-01 16:57:26 +00:00
ad
0136093bcb Noisy printfs. 2007-12-01 16:54:28 +00:00
ad
3c1048714b Noisy printf. 2007-12-01 16:51:22 +00:00
ad
204846883c Noisy printf 2007-12-01 16:49:56 +00:00
ad
b4214e6788 Empty vessels make the most noise 2007-12-01 16:46:18 +00:00
ad
4e780c2f88 Shh 2007-12-01 16:45:35 +00:00
ad
2d3a70d6e4 Quiten a noisy printf. 2007-12-01 16:07:20 +00:00
jmcneill
b276edd821 aprintify 2007-12-01 14:46:04 +00:00
jmcneill
a0d3b0d7a8 aprintify 2007-12-01 14:35:51 +00:00
bouyer
e13d04bb9f Use __define__ instead of define, pointed out by christos. 2007-12-01 12:57:09 +00:00
bouyer
e1353de789 Back out previous, majors.amd64 in files.amd64 is inside ifndef xen/endif 2007-12-01 12:52:20 +00:00
tsutsui
6e5ce03f0b - update a comment
- use __func__ to print function names
- some KNF
2007-12-01 11:41:20 +00:00
tsutsui
c35536aa0c - use __arraycount()
- some KNF
- use __func__ to print function names
2007-12-01 11:25:26 +00:00
tsutsui
d58e6ad66b - some KNF
- use __func__ to print function names
2007-12-01 11:24:41 +00:00
tsutsui
c9df1c18a5 - update a comment
- use __func__ to print function names
- some KNF
2007-12-01 11:23:44 +00:00
yamt
e8abff70f2 constify pagerops. 2007-12-01 10:40:27 +00:00
yamt
7355a3c4f8 remove a duplicated decl. of aobj_pager. 2007-12-01 10:40:03 +00:00
yamt
ee39418409 getnewvnode: remove a homegrown decl. of uvm_vnodeops. 2007-12-01 10:36:47 +00:00
yamt
062f8e82a2 use designated initiaizers for uvm_pagerops. 2007-12-01 10:18:21 +00:00
yamt
4450b52eeb uvm_pager_init: use __arraycount. 2007-12-01 10:08:21 +00:00
marty
d8b9a7ea7c Increase SYMTAB_SPACE to 264000 so the release kernel will compile 2007-12-01 06:52:12 +00:00
kiyohara
f400953756 Fix lost direction for the check on status, and read/writes. 2007-12-01 06:32:54 +00:00
jmcneill
1b940a02fa aprintify 2007-12-01 06:05:18 +00:00
jmcneill
4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
jmcneill
597a6bb9ae aprint-ify isaattach, removes a hard-to-find newline on a boot -z 2007-12-01 04:50:23 +00:00
dsl
1696bf29ff Ensure the mount data is a 0-terminated string - otherwise namei() might
process garbage (or unmapped addresses).
2007-12-01 00:09:41 +00:00
ad
b470ab628d Use membar_*(). 2007-11-30 23:05:43 +00:00
dsl
2d7e52ccd2 Don't pull in majors.amd64 here, we get another copy from files.amd64
and config bleats like mad.
2007-11-30 22:56:05 +00:00
ad
e81b22bdcb Make {anon,file,exec}pages unsigned. 2007-11-30 22:43:17 +00:00
dsl
956bff160a Temporarily make 'atomic_add_int()' a non-atomic add so the build suceeds.
At some point the functions will (presumably) make their way into either
libc or libutil.
2007-11-30 21:48:40 +00:00
pooka
21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
rmind
cbb391653c aio_enqueue_job: Fix the mix of previous commits, that is, increase
aio_jobs_count only once; also, decrease it in second error case too.

Noted by <ad>.
2007-11-30 17:39:43 +00:00
ad
72ec1a5a12 Fix another proto. 2007-11-30 17:13:10 +00:00
ad
6a46d2d08c Fix atomic_inc protos again. 2007-11-30 17:12:28 +00:00
yamt
8ec86368e9 - reduce the number of VOP_ACCESS calls for O_RDWR. for nfs, it reduces
the number of rpcs.
- reduce code duplication.
2007-11-30 16:52:19 +00:00
tsutsui
06ae954501 Pass correct size to allocate struct obmem_softc.
Fix an occasional panic on my 3/80.
2007-11-30 13:22:37 +00:00
pooka
1ff78520d8 Destroy genfs_node in reclaim. And init it earlier in vget so that we
don't try to destroy an uninited lock should vget fail.
2007-11-30 11:23:10 +00:00
ad
9f7dae4cb7 atomic_add_* works on signed integers. 2007-11-30 01:32:09 +00:00
dsl
e000b4476e Change the type of the mbr bootselect menu field from uint8_t to char. 2007-11-29 23:18:17 +00:00
ad
0b8a0d143c Drop text alignment back to 16 - the usual size of blocks the instruction
decoder works with.
2007-11-29 22:03:48 +00:00
xtraeme
f59c58fb50 regen 2007-11-29 21:08:19 +00:00
xtraeme
0970ce7295 Typo in previous s/HDSPA/HSDPA/ 2007-11-29 21:07:59 +00:00
ad
045db07a6d Fix minor error in previous. 2007-11-29 19:50:28 +00:00
xtraeme
0976f2f104 regen 2007-11-29 18:38:43 +00:00
xtraeme
88696b51e4 Add support for Novatel Wireless HSDPA Modem to ugensa(4), patch
from Marcin Michal Jessa... thanks.
2007-11-29 18:38:22 +00:00
ad
4acbed1e86 Fix DIAGNOSTIC build. 2007-11-29 18:33:29 +00:00
ad
e7e13da4c3 Use atomics to adjust lim->pl_refcnt. 2007-11-29 18:21:03 +00:00
ad
1cb3506898 Use atomics to adjust filedesc::fd_refcnt. 2007-11-29 18:17:47 +00:00
rmind
0e5c3c74c5 Finish the usage of atomic operations:
- Leave non-accurate pre-checks;
- Use atomic_inc_uint_nv() with re-check;

Reviewed by <ad>.
2007-11-29 18:17:01 +00:00
ad
6182ac0595 Use atomics to adjust cwdi_refcnt. 2007-11-29 18:15:14 +00:00
ad
e9e11b98df Use atomics to maintain uvmexp.{anon,exec,file}pages. 2007-11-29 18:07:11 +00:00
ad
7d57af5baa Pull in sys/intr.h 2007-11-29 18:04:46 +00:00
ad
a45b048ec2 Use atomics to maintain aio_jobs_count. XXX There is still a race, we
should should use atomic_inc_uint_nv() before setup to ensure that we
don't exceed the max number of concurrent jobs.
2007-11-29 17:52:27 +00:00
ad
7ec1c5e617 Use atomics to adjust the credential reference count. 2007-11-29 17:48:27 +00:00
ad
890e076b1a Pending review by uwe@:
- Make _lock_cas() do "compare and swap", not "compare and set".
- Add aliases for atomic_cas_ulong() and friends.
2007-11-29 17:33:09 +00:00
ad
ad40d74014 - Change lock_cas from "compare and set" to "compare and swap".
- Add aliases for atomic_cas_ulong(), etc.

Ok skrll@
2007-11-29 16:14:28 +00:00
ad
901f9ae9f6 cv_init(&lbolt, "lbolt"); 2007-11-29 15:41:07 +00:00
ad
afb9be47ba - Change _lock_cas() to do compare-and-swap instead of compare-and-set.
- Add aliases for atomic_cas_ulong() and friends.
2007-11-29 15:17:45 +00:00
ad
ccbc7a4bd9 Add 'bool returning' argument to cpu_switchto (unused). 2007-11-29 14:30:32 +00:00
ad
86b20896d3 Use system-provided atomic ops. 2007-11-29 14:29:29 +00:00
yamt
d0f12a6ad9 instead of setting pcb_onfault on every calls of copyin and friends,
make the fault handler investigate program counter of faulting code.
inspired from linux.
2007-11-29 09:53:33 +00:00
nisimura
5155a3ee9b comment-out lpt0 since EnCorePP1 experiences occasional irq 7 flood
regardless of the special care to disable LPT function in VIA 686SB.
May not revive anytime soon as it's considered little use.
2007-11-29 06:50:37 +00:00
nisimura
e511172428 add preliminary wm.c, a lot of fixes to make other NIC more sensible. 2007-11-29 04:00:17 +00:00
jnemeth
bf33c34cf5 add dev/ofw/ofw_subr.c to VARSTACK 2007-11-29 01:39:27 +00:00
ad
92d7e73c2a Add alias for atomic_cas_64() if available. 2007-11-29 01:04:20 +00:00
ad
f5474801b3 __HAVE_ATOMIC64_OPS if 64-bit 2007-11-29 00:58:03 +00:00
ad
32c745d42e __HAVE_ATOMIC64_OPS 2007-11-29 00:56:53 +00:00
ad
962de970f5 __HAVE_ATOMIC64_OPS for SUN4U. 2007-11-29 00:56:13 +00:00
ad
c291a9d4fa RW_GIVE() needs to do a mb_memory() now. 2007-11-29 00:17:54 +00:00
ad
872af53778 - Change _lock_cas and friends to do "compare and swap" instead of "compare
and set".
- Rename them to _atomic_cas_uint, _atomic_cas_ulong etc and provide strong
  aliases for the other names CAS goes by.
2007-11-29 00:14:27 +00:00
degroote
9a2478a81d Fix compilation in case of COMPAT_FREEBSD_NET80211.
Any reason that we use by default the old api ioctl instead of the 'new' api ioctl ?
(Time is a good reason :)).
2007-11-28 23:23:11 +00:00
he
ddc4103ec7 Allow this to build both for sparc64 and for the GENERIC_SUN4U sparc kernel. 2007-11-28 22:54:46 +00:00
degroote
db9d3119cf In wpi_init, check for the status of radio switch and print a useful message
in this case.
2007-11-28 22:51:49 +00:00
plunky
87914664c7 [experimentally] report failing commands
this does happen sometimes and I would like to see if it happens
more often than I know of.
2007-11-28 21:46:52 +00:00
ad
57ab3d5998 Grab tty_lock in more places. Noted and tested by degroote@. 2007-11-28 21:44:11 +00:00
ad
a906840a60 There is no mvme88k! 2007-11-28 20:50:10 +00:00
jnemeth
f3ce6c9275 don't include sys/intr.h twice, why aren't the includes sorted? 2007-11-28 20:41:35 +00:00
plunky
736a9db087 Clean up the way that bluetooth drivers attach to the bluetooth stack,
to remove the frobbing that drivers must do in the hci_unit structure.

- driver provides a static const interface descriptor
- hci_unit is allocated by hci_attach() rather than part of softc
- statistics are compiled by driver and provided on request
- driver provides output methods and is responsible for output queue
- stack provides input methods and is responsible for input queue
- mutex is used to arbitrate device queue access
2007-11-28 20:16:11 +00:00
rmind
c75dc3277a Unify the license: All rights reserved.
No functional change.
2007-11-28 19:30:55 +00:00
ad
b8f8bca01a Use the softint API. 2007-11-28 18:55:30 +00:00
pooka
e49789dd46 more l removal 2007-11-28 18:50:10 +00:00
ad
16b547ec7f Please can we nuke this code? 2007-11-28 18:45:03 +00:00
ad
4517da3861 x86_mb_nop is now unused. 2007-11-28 18:19:20 +00:00
ad
1a82318781 Use the softint API. 2007-11-28 18:03:56 +00:00
ad
77724e6afd Hook in the atomic ops on alpha. 2007-11-28 17:40:02 +00:00
pooka
bce4ea0296 one more lock to destroy 2007-11-28 17:01:59 +00:00
pooka
efe797dc32 * version the registration interface
* destroy all created locks
2007-11-28 16:59:02 +00:00
ad
a0b58b4601 Remove remaining CPUCLASS_386 tests. 2007-11-28 16:44:46 +00:00
ad
157ae0ddef Use the new atomic ops. 2007-11-28 16:40:40 +00:00
ad
6def667f04 Use the new atomic ops. 2007-11-28 16:28:43 +00:00
ad
0cddf536c0 Hook in the atomic ops from libkern. 2007-11-28 15:26:00 +00:00
yamt
82d61b9ade - merge {i386,xen}/i386/trap.c.
- add a comment about a hack for xen2.
2007-11-28 14:02:30 +00:00
jnemeth
fd5cef8508 Sync with src/sys/sparc/dev/fd.c change to use softint(9) API.
XXX Please keep these two in sync as this one is a drop-in replacement
for the sparc version and the idea is to have both sparc and sparc64
use the same file one day.
2007-11-28 12:44:13 +00:00
simonb
f717d58276 Use lswi/syswi instead of lwz/stw when doing loads/stores since we don't
know the alignment of data being copied.  403 cores have alignment
restrictions on lwz/stw that 405 cores don't have.  lswi/syswi benchmark
at the same speed as lwz/stw on a 405 Walnut.

Fixes problems reported by Juergen Hannken-Illjes on the Explora.
2007-11-28 12:22:28 +00:00
he
756f91194a Follow up the removal of the lwp argument to VOP_ functions.
In some cases, use curlwp instead of the now missing argument.
2007-11-28 10:34:37 +00:00
dyoung
b6995d1653 Bug fix: make pf_route() set M_CSUM_IPV4 before calling ip_fragment().
If you use a route-to rule such as 'pass out quick on ath0 route-to
gre2 all', and the MTU on gre2 is smaller than the MTU on ath0,
then pf_route() will fragment your packet by calling ip_fragment().
Because pf_route() did not set M_CSUM_IPv4, ip_fragment() would
not compute the checksum on the fragments, and PF would send IP
fragments with bad checksums out of gre2.
2007-11-28 04:23:33 +00:00
dyoung
79d53b3100 Move IN_NEED_CHECKSUM() to in_offload.h for re-use. 2007-11-28 04:14:11 +00:00
briggs
75b18122f2 Correct a typo. To create the command/status word, shift the components
left, not right.
2007-11-28 04:03:16 +00:00
dyoung
453e5e8a7d Cosmetic: join two lines. 2007-11-28 02:40:21 +00:00
kiyohara
b8e760f970 + Use device_t.
+ Increment rptr if send the ESCAPE char.
+ Use m_pkthdr.len for pktlen.
2007-11-28 01:31:55 +00:00
ad
15619e77dc Remove the sub-word atomic ops because they can not be implemented correctly
on some architectures and so are misleading. The same effect can be had by
building on top of the 32-bit CAS. As a side effect this makes it somewhat
easier to complete and document the operations across all platforms.
2007-11-28 01:30:06 +00:00
dogcow
3c143b9440 more lwp cacking fallout 2007-11-27 23:30:56 +00:00
christos
a9c710744b require that the options argument is the right size, not that it is greater
or equal to the requested size. Suggested by Matt Thomas.
2007-11-27 22:45:29 +00:00
ad
23589af2fb lwp arg to VOPs is gone. 2007-11-27 22:12:24 +00:00