Commit Graph

47833 Commits

Author SHA1 Message Date
Poul-Henning Kamp
4fa0290fbf Fail normally rather than KASSERT if attempt to open a spoiled consumer. 2004-07-08 10:34:09 +00:00
Poul-Henning Kamp
87d72a8f27 Use a couple of regular kernel entry points, rather than COMPAT_43
entry points.
2004-07-08 10:18:07 +00:00
Alan Cox
c9e95bb1cb Add pmap locking to pmap_emulate_reference(). Remove unused and once-used
variables.

Tested by:	kensmith@
2004-07-08 07:44:55 +00:00
Peter Grehan
79c8d45fce Remove cache flush, 256Mb 1:1 BAT mapping, and BAT clearing. This doesn't
work on a G5 (no BAT registers) or on PearPC (dBAT3 used for mapping
the framebuffer and BATs not re-inited on OpenFirmware calls).

 It also hid a number of bugs.
2004-07-08 06:13:05 +00:00
Alfred Perlstein
057589c485 fixup sysctl by fsid node 2004-07-08 06:11:36 +00:00
Peter Grehan
c727d17006 All hell breaks loose if the loader image is released before
jumping to the kernel. Another bug exposed by removing the
1:1 BAT mapping. Sparc64 doesn't do this either.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
2004-07-08 06:09:22 +00:00
Peter Grehan
ff6e6584fc Correctly calculate size of memory to be mapped when copying. Removal
of the 256Mb 1:1 BAT mapping exposed this as copying into memory that
hadn't been claimed from OpenFirmware.

compiled-tested on: panther (sparc64). Code built, but not used, on sparc64
2004-07-08 06:06:56 +00:00
Peter Grehan
4bb04ec4eb Extract entry point from elf header before releasing the heap.
This caused a data-miss trap when the BAT init code was removed
on PPC.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
2004-07-08 06:04:45 +00:00
Alfred Perlstein
2260fef1f4 struct mount->mnt_data has been a qaddr_t since '94 (rev 1.1),
It should be a void *, fix it.
2004-07-08 05:47:51 +00:00
Peter Wemm
d8ad50b704 MFi386: various io apic cleanups 2004-07-08 01:42:49 +00:00
Peter Wemm
335e282d3c MFi386: use rman access methods instead of groping around inside
struct resource
2004-07-08 01:34:24 +00:00
Peter Wemm
2e37b53aba MFi386: whitespace nit fix (spare blank line) 2004-07-08 01:32:25 +00:00
Peter Wemm
f08560a569 MFi386: fix up CR0 settings 2004-07-08 01:31:13 +00:00
Peter Wemm
6ad90df2e3 MFi386: 1.57: transparently respect alignment/boundary tags 2004-07-08 01:28:33 +00:00
Maksim Yevmenkin
23d1e148af Make bluetooth compile on all platforms
Reviewed by:	imp, ru
2004-07-07 22:48:30 +00:00
Warner Losh
6d6fa4fdc9 Break out the isa and pccard front ends from fdc. This is the first
step in making this driver more attachment neutral.  Others plan on
adding acpi front ends.

Still need to cleanup the MI part of the driver because it isn't as
bus independent as it could be.
2004-07-07 22:35:27 +00:00
Warner Losh
8ade021a7c Break out the isa and pccard front ends to the fdc controller device.
This should allow us to more easily break out the acpi and 'legacy pc'
front ends as well (so only the bus front end would touch rtc, for
example).

This isn't a great separation, since isa dma routines are still called
from the MI code, but it is a start.
2004-07-07 22:29:33 +00:00
Poul-Henning Kamp
c94cd5fc8c Explicity initialize vp->v_bsize. 2004-07-07 20:04:06 +00:00
Poul-Henning Kamp
ddb81ab1c6 Fix an oversight in r1.26: remove #ifdef around necessary variable.
Spotted by:	philip
2004-07-07 20:02:30 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Bill Paul
06794990cb Fix two problems:
- In subr_ndis.c:ndis_allocate_sharemem(), create the busdma tags
  used for shared memory allocations with a lowaddr of 0x3E7FFFFF.
  This forces the buffers to be mapped to physical/bus addresses within
  the first 1GB of physical memory. It seems that at least one card
  (Linksys Instant Wireless PCI V2.7) depends on this behavior. I
  don't know if this is a hardware restriction, or if the NDIS
  driver for this card is truncating the addresses itself, but using
  physical/bus addresses beyong the 1GB limit causes initialization
  failures.

- Create am NDIS_INITIALIZED() macro in if_ndisvar.h and use it in
  if_ndis.c to test whether the device has been initialized rather
  than checking for the presence of the IFF_UP flag in if_flags.
  While debugging the previous problem, I noticed that bringing
  up the device would always produce failures from ndis_setmulti().
  It turns out that the following steps now occur during device
  initialization:

	- IFF_UP flag is set in if_flags
	- ifp->if_ioctl() called with SIOCSIFADDR (which we don't handle)
	- ifp->if_ioctl() called with SIOCADDMULTI
	- ifp->if_ioctl() called with SIOCADDMULTI (again)
	- ifp->if_ioctl() called with SIOCADDMULTI (yet again)
	- ifp->if_ioctl() called with SIOCSIFFLAGS

  Setting the receive filter and multicast filters can only be done
  when the underlying NDIS driver has been initialized, which is done
  by ifp->if_init(). However, we don't call ifp->if_init() until
  ifp->if_ioctl() is called with SIOCSIFFLAGS and IFF_UP has been
  set. It appears that now, the network stack tries to add multicast
  addresses to interface's filter before those steps occur. Normally,
  ndis_setmulti() would trap this condition by checking for the IFF_UP
  flag, but the network code has in fact set this flag already, so
  ndis_setmulti() is fooled into thinking the interface has been
  initialized when it really hasn't.

  It turns out this is usually harmless because the ifp->if_init()
  routine (in this case ndis_init()) will set up the multicast
  filter when it initializes the hardware anyway, and the underlying
  routines (ndis_get_info()/ndis_set_info()) know that the driver/NIC
  haven't been initialized yet, but you end up spurious error messages
  on the console all the time.

Something tells me this new behavior isn't really correct. I think
the intention was to fix it so that ifp->if_init() is only called
once when we ifconfig an interface up, but the end result seems a
little bogus: the change of the IFF_UP flag should be propagated
down to the driver before calling any other ioctl() that might actually
require the hardware to be up and running.
2004-07-07 17:46:30 +00:00
Alan Cox
26a965568d Simplify the control flow in pmap_extract(), enabling the elimination of a
PMAP_UNLOCK() call.
2004-07-07 16:47:58 +00:00
Alfred Perlstein
14d543ddfb style(9) 2004-07-07 07:00:02 +00:00
Alfred Perlstein
81d16e2d64 do the vfsstd thing instead of messing up our VFS_SYSCTL macro. 2004-07-07 06:58:29 +00:00
Alan Cox
d9c17edbdb Add pmap locking to pmap_protect(). 2004-07-07 04:16:22 +00:00
Alan Cox
03c0ca74ee White space and style changes only. 2004-07-07 02:23:46 +00:00
Peter Edwards
0f01586867 Fix bug introduced in rev 1.434:
When avoiding the zeroing of "bogus_page" when it appears in a buf,
be sure to advance the pointers into the data for successive pages.

The bug caused file corruption when read(2)ing from a "hole" in a
file where a previous page of the read block had already been faulted
in: fsx tripped up on this pretty quickly. The particular access
pattern is probably pretty unusual, so other applications probably
wouldn't have had problems, but you'd never know.

Reviewed By: alc@
2004-07-06 23:40:40 +00:00
Alan Cox
fd2d354908 Micro-optimize vmspace for 64-bit architectures: Colocate vm_refcnt and
vm_exitingcnt so that alignment does not result in wasted space.
2004-07-06 17:35:10 +00:00
Pawel Jakub Dawidek
01ab535e8d Add missing argument. 2004-07-06 17:06:54 +00:00
Robert Watson
cf813ab244 Acquire socket lock in nfs_connect() connection/sleep loop to protect
socket state and avoid missed wakeups.
2004-07-06 16:55:41 +00:00
Pawel Jakub Dawidek
e943975c69 Properly free resources if g_access() fails. 2004-07-06 16:29:32 +00:00
Dag-Erling Smørgrav
de47739e71 Push WARNS back up to 6, but define NO_WERROR; I want the warts out in the
open where people can see them and hopefully fix them.
2004-07-06 12:15:24 +00:00
Dag-Erling Smørgrav
9fa0fd2682 Introduce inline {ip,udp,tcp}_next() functions which take a pointer to an
{ip,udp,tcp} header and return a void * pointing to the payload (i.e. the
first byte past the end of the header and any required padding).  Use them
consistently throughout libalias to a) reduce code duplication, b) improve
code legibility, c) get rid of a bunch of alignment warnings.
2004-07-06 12:13:28 +00:00
Peter Grehan
d0540ed535 - trailing white-space cleanup
- add call to thread_user_enter for P_SA processes before
  trap processing ala all other arches
2004-07-06 11:46:56 +00:00
Alfred Perlstein
14af415c34 use vfs_suser() to restrict access to the nfs mount's timeout. 2004-07-06 09:40:44 +00:00
Alfred Perlstein
1ea6061793 Use vfs_suser() where appropriate. 2004-07-06 09:39:32 +00:00
Alfred Perlstein
ea0104b032 Introduce vfs_suser(), used to test if a user should have special privs
for a mount.
2004-07-06 09:37:43 +00:00
Alfred Perlstein
67ac03405a NFS mobility Phase VI:
Export NFS mount state via sysctl.
Export timeout via sysctl.
2004-07-06 09:23:17 +00:00
Dag-Erling Smørgrav
e3e2c21639 Rewrite twowords() to access its argument through a char pointer and not
a short pointer.  The previous implementation seems to be in a gray zone
of the C standard, and GCC generates incorrect code for it at -O2 or
higher on some platforms.
2004-07-06 09:22:18 +00:00
Alfred Perlstein
c713aaaeca NFS mobility PHASE I, II & III (phase VI, and V pending):
Rebind the client socket when we experience a timeout.  This fixes
the case where our IP changes for some reason.

Signal a VFS event when NFS transitions from up to down and vice
versa.

Add a placeholder vfs_sysctl where we will put status reporting
shortly.

Also:
Make down NFS mounts return EIO instead of EINTR when there is a
soft timeout or force unmount in progress.
2004-07-06 09:12:03 +00:00
Dag-Erling Smørgrav
95347a8ee0 Temporarily lower WARNS to 3 while I figure out the alignment issues on
alpha.
2004-07-06 08:44:41 +00:00
David E. O'Brien
42f74b8ddf In the spirit of amd64/include/stdarg.h rev 1.6; add __va_copy
(but keep it conditional on __ISO_C_VISIBLE >= 1999.

Why?  Our out /usr/src/contrib assumes it, and more than a few ports have
an autoconf that looks for __va_copy because it is available on glibc.
It is critical that we use it on PowerPC.  It generally isn't a problem
for i386 and its ilk because those platforms can get away with cheating
the C standard, using a plain assignment.
2004-07-06 07:47:09 +00:00
Ruslan Ermilov
f29897b67d Catch up with the new world order of Netgraph metas.
(This one was the last, according to grep(1).)

Submitted by:	Gleb Smirnoff
2004-07-06 06:43:45 +00:00
Robert Watson
df623e3c2f Temporarily disable preemption in SCHED_ULE due to reported panics and
hangs due to recent preemption changes.  This change appears to remove
the panic that I was running into, but at the cost of increasing
ithread scheduling latency, and as such is a temporary band-aid until
jhb has a chance to resolve the ule<->preemption interaction that is
the source of the problem.  If it doesn't fix the problem for others--
sorry!
2004-07-06 05:57:29 +00:00
Nate Lawson
52702e98d2 Use the proper type and then cast on assignment. This fixes warning when
building with -O2.
2004-07-06 04:56:31 +00:00
Bruce M Simpson
ca28620f0d Use M_ZERO instead of bzero(). 2004-07-06 03:34:16 +00:00
Bruce M Simpson
9b3d77e7c9 Be consistent and use bzero() instead of memset(). 2004-07-06 03:29:41 +00:00
Bruce M Simpson
b3c9a01e5e Use M_ZERO instead of memset() (!). 2004-07-06 03:28:24 +00:00
Bruce M Simpson
e1a8c3dc33 Use M_ZERO instead of bzero(). 2004-07-06 03:26:26 +00:00
Peter Grehan
45329b8ee6 Add 32-bit framebuffer support. Tested on PearPC at lo-res, too painful
to watch at hi-res.
2004-07-06 03:22:05 +00:00