Commit Graph

151226 Commits

Author SHA1 Message Date
elad 38810515e0 Make code more readable by removing some more casts forgotten in
previous commit.
2006-09-22 15:37:57 +00:00
christos e18c6496f6 mention linux makedev 2006-09-22 15:37:20 +00:00
christos 25666bcae7 add a LINUX_MAKEDEV for ptmx 2006-09-22 15:33:08 +00:00
elad b080dda9b1 DIAGNOSTIC should not change the kernel version for LKMs.
okay chs@
2006-09-22 15:17:55 +00:00
elad 9033a1369b In struct vcons_data, don't depend on DIAGNOSTIC and always include
switch_poll_count.

okay chs@
2006-09-22 15:16:03 +00:00
christos 1edf5bf30e PR/32682: Hauke Fath: netbsd-3 ptyfs intermittent failure with Matlab
For the benefit of linux emulation create a new minor device '2'
which is a ptmx with linux semantics. Linux changes the permissions
of the slave pty upon creation, not when grantpt(3) is called. The
glibc linux grantpt(3) checks that the pty is on ptyfs, and if it is,
it does nothing. To make use of this fix:

	mknod /emul/linux/dev/ptmx c 165 2
	chmod 666 /emul/linux/dev/ptmx

This is a lot simpler than copying a bunch of code and creating a
ptmx device just for the benefit of linux emulation.
2006-09-22 15:15:56 +00:00
christos 487c57538b Pretend to implement TIOCSPTLCK. Although failing is harmless, there is no
point in doing so.
2006-09-22 15:12:02 +00:00
abs 57ee5d4340 Enable EPIA_HACK here too - http://mail-index.netbsd.org/port-i386/2006/08/18/0002.html 2006-09-22 15:05:24 +00:00
skrll 47ff53e648 Allow kernels to compile without USELEDS.
From Sergey Svishchev on port-hp700
2006-09-22 14:08:03 +00:00
kochi 57cbe57ef9 fixed typo in previous commit 2006-09-22 13:38:32 +00:00
skrll de030205fa Switch hppa to gcc4. 2006-09-22 13:14:59 +00:00
skrll 64001ed248 Our hppa userland space register convention isn't as flat as it needs to be
for MASK_NO_SPACE_REGS. The assumption is that sr4-sr7 == process space
id, but we have sr7 = kernel space id (0). This was inherited from
OpenBSD.

If sr4-sr7 == process space id, then

        ldw     %r1(,%r2),%r3
and
        ldw     %r2(,%r1),%r3

are equivlent for all values of %r1 and %r2.

If the right compat stuff is in place we can change the space register
convention and turn MASK_NO_SPACE_REGS back on.
2006-09-22 13:11:57 +00:00
christos f807e82573 regen 2006-09-22 12:44:23 +00:00
christos 33bd80c320 From: Jaime A Fournier: Patch to support SMC 2262WV1 2006-09-22 12:43:52 +00:00
cherry 768b7d52a9 add ia64 libc MI bits. 2006-09-22 12:09:24 +00:00
uwe 214b28fc6c Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h

Somehow I managed to forget to commit mmeye changes.
Pointed out by he@
2006-09-22 09:32:26 +00:00
skrll c6b33d9f1f Create real lock primatives using as little asm as possible.
It's not used anywhere, but it's better committed than on any of my HDs.
2006-09-22 08:31:34 +00:00
taca 7a5ecb8445 Make sure to the file end with EOL ("\n").
Without EOL, pkgsrc/pkgtools/pkg_comp cause mysterious error.
2006-09-22 08:00:33 +00:00
thorpej 1edb40635e - Define disk information, disk geometry, and disk partition dictionary
schemas.  Disk information and disk geometry are designed to replace
  information currently conveyed to user space using struct disklabel.
- Add a dk_info member to struct disk; a reference to a disk information
  dictionary.  This dictionary is to be allocated and the reference stored
  in struct disk by individual drivers.
- disk_detach0() will release dk_info if non-NULL.
- Convert the wd(4) driver to stash geometry and other disk properties
  as the "disk-info" property in its properties dictionary.  This needs
  some cleanup, but will serve as an example of what to do with other
  disk drivers.
2006-09-22 04:48:38 +00:00
thorpej ef731d9e00 - Add a new DRVCTLCOMMAND ioctl to /dev/drvctl. This is a generic
"execute a command" ioctl that takes a dictionary as an argument
  (specifying the command and arguments) and returns a dictionary
  with the results (error code, optional error message, optional
  result data).

- Define and implement a "get-properties" command for DRVCTLCOMMAND
  that returns the properties dictionary of the specified device.

- Add a -p flag to drvctl(8) to fetch and display the properties of
  the specified device.

This is a great example of how to use prop_dictionary_sendrecv_ioctl().
2006-09-22 04:37:36 +00:00
thorpej 6cf1ffe998 Alter the protocol impemented by prop_kern to allow for bi-directional
plist-based messages and to eliminate looping previously required to
receive a plist from the kernel:

- prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl()
  now take the cmd argument rather than the file open flag.  The
  read-ness or write-ness of an ioctl command is checked by these
  routines to ensure that information is being passed to/from the
  userland component properly.

- prop_dictionary_copyout_ioctl() now allocates the memory for the
  XML plist on behalf of the userland component by way of uvm_mmap().
  The XML plist is copied out to the newly-mapped anonymous region,
  and the pointer returned via the plistref.

- prop_dictionary_recv_ioctl() is responsible for munmap()'ing the
  region after parsing the XML plist into internal represenatation.

- A new prop_dictionary_sendrecv_ioctl() is added, allowing user space
  code to send a dictionary to the kernel and receive one back as a
  reply.


Update users of prop_kern for the API changes (Bluetooth).

This constitutes an ABI / protocol change -- but this will also be put
into NetBSD 4.0 so that the first proplib release will implement the new
scheme.
2006-09-22 04:20:23 +00:00
reinoud e2c2b53a9f Add test for in-file seeking for data; it should return the passed offset. 2006-09-21 22:09:20 +00:00
uwe 7e62a1bf65 Don't truncate TEA when we call tlb_exception from sh_vector_generic. 2006-09-21 20:40:16 +00:00
dsl edb0aa98de Rename the variable 'jobs' to 'job_list' in preparation for making it an array. 2006-09-21 19:56:05 +00:00
matt 6ec9b8bc84 Define a PHYSMAP_VSID for mapping pa==va. 2006-09-21 18:43:30 +00:00
reinoud 6d14f6770d Add lseek tests for SEEK_DATA and SEEK_HOLE for a non sparse file. 2006-09-21 18:36:03 +00:00
reinoud 0b421a6019 Fix `make clean' bug... the file might not be present 2006-09-21 17:33:08 +00:00
reinoud 95e6648004 Use multiple stat() functions since their result can also be different. 2006-09-21 17:26:24 +00:00
cherry c53d4b12a7 Fix libgcc4 build for ia64
Change #if to #ifdef
XXX: Feed upstream ?
2006-09-21 15:13:02 +00:00
yamt 614b6e5a27 yamt-splraiseipl: mac68k, x68k, hpcarm, shark, acorn32,
cats, netwinder, algor, arc, ews4800mips, hpcmips, newsmips.
2006-09-21 14:33:24 +00:00
reinoud b32f83b095 Update lseek test to make it a bit more clever in printing sizes and remove
file size test.
2006-09-21 13:12:45 +00:00
kochi 2a0acb8ed8 make bootinfo extern from static.
it's declared in arch/ia64/include/bootinfo.h as extern.
2006-09-21 10:06:36 +00:00
kochi 1d1bdfa635 use an appropriate specifier for u_long (%lx) in printf 2006-09-21 09:59:45 +00:00
kochi 6fa19ae830 fix trivial typo in previous revision 2006-09-21 09:58:27 +00:00
vanhu 542839bac0 credit 2006-09-21 09:43:47 +00:00
vanhu 3c6750b831 use sysdep_sa_len to make it compile on Linux 2006-09-21 09:42:08 +00:00
jld 754d606748 Protect spec_poll from racing against revocation and thus dereferencing a
NULL v_specinfo.  Mostly copied (with understanding) from rev 1.83's fix
to spec_ioctl, and needed for the same reason (kern/vfs_subr.c r1.231).
2006-09-21 09:28:37 +00:00
reinoud d2a1b4304c Create a file to be tested; in the current directory so thats not super but
better than relying on a file that might not exist.
2006-09-21 01:54:15 +00:00
reinoud a06f598ad6 Add simple lseek() test on a standard file. Standard it runs on the
/var/log/messages file wich is most likely not interesting but the
regression test can work on every specified filingsystem by passing a file
on that filingsystem to it as argument.

It tests:
- initial position
- seeking absolute position
- seeking end
- seeking negative relative position

more can be added later.
2006-09-21 01:27:32 +00:00
jld 1b78265f0e Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
instead of just vnode pointers.  Fixes erroneous "does not match mounted
device" errors from mount(8) in the presence of MFS /dev, init.root, &c.

No objections on tech-kern.
2006-09-21 00:11:30 +00:00
bad 4f0a5e9849 Apply changes to ffs_find_disk_blocks_ufs1() from revision 1.19
to ffs_find_disk_blocks_ufs2() too.  Except for data types the
code in the two functions is the same.

From the original commit message:
    Add support for finding files on RAID partitions.  This allows us to
    add the block list of the 2nd stage boot loader to the 1st stage boot
    loader when the partition is a RAID partition.

Briefly tested under 3.x/i386.
2006-09-20 21:49:12 +00:00
martin 8c0de790f8 Cosmetic nit - print the correct cpu number in the spin up message 2006-09-20 20:09:42 +00:00
christos 411ddc6a74 set utmp entry types to user process. 2006-09-20 19:43:33 +00:00
christos 14e0a0ccc6 unbreak the build by including the appropriate header files here. 2006-09-20 19:39:23 +00:00
kochi c811931057 add cpu_counter.h to compile a kernel 2006-09-20 13:33:04 +00:00
he 9f30ac8956 Get rid of lvalue cast by using a temporary variable of the right type. 2006-09-20 13:03:49 +00:00
yamt 7c7c48583b yamt-splraiseipl: hp700, evbppc (marvell, ibm4xx) 2006-09-20 10:31:15 +00:00
manu 876294b403 Proprely convert devices on amd64 2006-09-20 09:54:55 +00:00
tsutsui 292139732b Tweak some debug messages. 2006-09-20 09:37:28 +00:00
tsutsui c44c5152c9 - move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
2006-09-20 09:35:57 +00:00