Commit Graph

165294 Commits

Author SHA1 Message Date
xtraeme
481db08b0a Rewrite bioctl(8) and add support for the following features:
- Ability to add/remove hot-spare disks (previously only 'add' was accepted).
- Ability to add/remove pass-through disks.
- Ability to create/remove RAID volumes with optional size, stripe, level,
  member disks and others.
- Ability to start/stop consistency checks in a RAID volume.
- Ability to show only information about physical disks, volumes or both.

Rather than using multiple flags, the utility has been modified to use
the same mode than dkctl(8) (and maybe others), i.e:

$ ./bioctl
usage: bioctl device command [arg [...]]
Available commands:
  show [disks] | [volumes]
  alarm [enable] | [disable] | [silence] | [test]
  blink start | stop [channel:target[.lun]]
  hotspare add | remove channel:target.lun
  passthru add DISKID | remove channel:target.lun
  check start | stop VOLID
  create volume VOLID DISKIDs [SIZE] STRIPE RAID_LEVEL channel:target.lun
  remove volume VOLID channel:target.lun
$

I'll add support for other features soon.
2008-01-02 23:45:06 +00:00
xtraeme
59a09b45c9 Improve the bio(4) API for incoming changes to arcmsr(4) (and perhaps
other drivers in the future):

- Added BIOC_SVCHECKING to the BIOCVOL ioctl, to know if a volume is
  running a consistency check.
- Added three more volume levels for the BIOCVOL ioctl.
- Added BIOC_SDPASSTHRU to the BIOCDISK ioctl, to know if a disk is
  in pass-through mode.
- Added BIOCDISK_NOVOL; it's used with the same reason than BIOCDISK,
  but it's used only to get information about the physical disks connected
  in a controller (regardless if they are in a volume set or not).
- Added BIOC_SSDELHOTSPARE, BIOC_SSPASTHRU, BIOC_SSDELPASSTHRU,
  BIOC_SSCHECKSTART_VOL and BIOC_SSCHECKSTOPVOL; to remove a hot-spare,
  add and remove a pass-through disk and to start/stop a consistency
  check in a volume.
- Added the BIOC_VOLOPS ioctl; to create/remove a volume set.
- Removed the BIOCCREATERAID ioctl, it was too limited for my needs.
- Added compatibility ioctls for BIOCDISK and BIOCVOL, enabled via COMPAT_30.
2008-01-02 23:45:03 +00:00
dyoung
e9596bf19e Introduce a struct cardbus_chipset_tag, and make cardbus_chipset_tag_t
a pointer to that struct, so that we cannot assign pointers of
arbitrary type to cardbus_chipset_tag_t.  Tweak cbb(4) to accomodate
this change.

Make Cardbus_conf_read() and Carbus_conf_write() pass the right
arguments to cardbus_functions->cardbus_conf_{read,write}() for a
change.

Let's hope this stops the crash in cardbus_function_enable() that
macallan@ reported to me.
2008-01-02 23:11:34 +00:00
dyoung
4f422f7b22 Don't assign a cardbus function tag to a cardbus chipset tag.
Michael Lorenz, macallan@, actually found this bug.

(I will change cardbus_chipset_tag_t to a struct * from void *, so
that the compiler will detect similar typos in the future.)
2008-01-02 23:04:25 +00:00
pooka
4f32bae2c1 More type-punning workarounds. Curiously the kernel compilation
flags cause gcc to not complain.
2008-01-02 22:37:19 +00:00
pooka
b8121d8a80 silence gcc about break type-punning 2008-01-02 22:33:10 +00:00
dyoung
91345ba277 Do not read past the CIS region. Stops an MCHK exception on macppc
(reported by macallan@).

I originally detected this bug by activating 'PCI master target
abort' interrupts on the AMD Elan SC520 processor.  Lo and behold,
several interrupts occurred before the system had finished booting!
NetBSD should probably activate PCI exception reporting whenever
it is available.
2008-01-02 22:29:00 +00:00
yamt
5da7542a9d - elf_load_file: return ENOEXEC instead of 0 in the case of
e_phnum > MAXPHNUM.
- exec_elf_makecmds: return an interesting error rather than
 always using ENOEXEC.
- reject e_phnum==0.
2008-01-02 22:04:56 +00:00
pooka
f8ff426bbb fix build for OBJDIR case. noticed by plenty 2008-01-02 22:01:41 +00:00
ad
95ffd8cee1 Another driver that should use getiobuf(). 2008-01-02 21:59:45 +00:00
gdt
1c4e7422e0 Remove no-longer-installed xsystrace pixmaps. 2008-01-02 21:58:17 +00:00
dyoung
03f1738ff9 Use device_t, device_private(). Join some lines. 2008-01-02 21:05:51 +00:00
he
1b2f5d4f55 Remove the #endif corresponding to the #ifdef _KERNEL removed in previous. 2008-01-02 21:00:34 +00:00
dyoung
95bf02050e Use device_t, device_private(). 2008-01-02 20:47:28 +00:00
jmmv
14780346b4 Remove this; objections from joerg@ and ad@, and I agree with them that
additional kernel configs are not the way to go because they are not
flexible at all.  Plus ad@ is working on a real solution (bootprop).
2008-01-02 20:40:43 +00:00
yamt
22d570119a use kmem_alloc instead of malloc. 2008-01-02 19:44:36 +00:00
yamt
677860cb8a use kmem_alloc instead of malloc. 2008-01-02 19:26:45 +00:00
yamt
c68e4b1c69 remove PIPE_WANTW, PIPE_WANTR and PIPE_WANTCLOSE. cv_waiters is enough.
this fixes a deadlock between pipe_direct_write and pipeclose.

XXX this code should be simplified.
it's mostly pointless to have two struct pipes linked together,
esp. when we don't support bi-directional pipes.
2008-01-02 19:16:00 +00:00
pooka
4f69d01d2f Add the ability to run puffs in userspace. This means that puffs
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).

To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:

    golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs

This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:

    ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
2008-01-02 18:15:12 +00:00
pooka
cf16702d95 fix pasto 2008-01-02 18:11:01 +00:00
pooka
b181a1a237 Also pass fromname in the "distributed" case. 2008-01-02 17:57:51 +00:00
ad
77ab895b0c LKMs don't care about the MULTIPROCESSOR option any more. 2008-01-02 17:52:02 +00:00
yamt
03539d901d pmap_extract_ma:
- TRUE/FALSE -> true/false
	- (P == FALSE) -> (!P)
2008-01-02 17:33:08 +00:00
yamt
7afae692b2 remove no longer necessary lockdebug hacks. 2008-01-02 17:23:31 +00:00
pooka
b5071eca2f mtx is not an interlock here, merely convenience. 2008-01-02 16:51:32 +00:00
christos
ad809afe5c PR/37663: Guy Harris: bpf_validate rejects valid programs that use the multiply instruction 2008-01-02 15:58:01 +00:00
pooka
3c068d8021 fix vmlocking2 fallout:
* I heard a wild rumor that vp_interlock is a mutex these days (hi ad!)
* init new locks (hi ad)
* observe that with simple_locks only deadlocks would be caught while
  releasing unlocked locks would go unnoticed.  make locking work (hi pooka)
2008-01-02 15:44:03 +00:00
pooka
636e495315 Provide some transparent "support" for "distributed" file systems.
If the env variable PUFFS_COMFD is set, the descriptor value
contained in it is used for communication instead of opening
/dev/puffs and doing mount(2).

This feature is obviously very undocumented and should not be used
without adult supervision.
2008-01-02 14:27:42 +00:00
ad
ae47be00a8 Provide valloc(), fix vfree(). 2008-01-02 13:42:47 +00:00
ad
896ac1329e Build intr.c. 2008-01-02 12:49:53 +00:00
joerg
9f9b7d3adb Better description, this is not GENERIC after all. 2008-01-02 12:49:30 +00:00
joerg
956f82654b Add some missing dependencies on assym.h. 2008-01-02 12:46:23 +00:00
ad
888ef28a4d Fix merge error. 2008-01-02 12:46:07 +00:00
yamt
41f847fb03 make pmap_pv_cache static. 2008-01-02 12:31:32 +00:00
yamt
d450c78d16 g/c pv_page stuffs. 2008-01-02 12:30:30 +00:00
xtraeme
b88ea32e70 - Initialize the callout with CALLOUT_MPSAFE, like it was done before
in sysmon_envsys_events.c.
- Separate sme_event_check_low_power() into sme_battery_check(),
  sme_acadapter_check() and sme_battery_critical() (no functional changes).
2008-01-02 12:20:26 +00:00
ad
a108410386 Regen. 2008-01-02 11:57:29 +00:00
ad
b4284a686b Merge vmlocking2 to head. 2008-01-02 11:57:13 +00:00
ad
b2f788f2ae 4.99.48 - vmlocking2 merged 2008-01-02 11:51:59 +00:00
ad
e871738d3d Regen. 2008-01-02 11:51:15 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
mrg
a41df38359 - put netbsd.ofppc and ofwboot.ofppc in the root of ofppciso.cd.
- create a mostly working sysinst/ramdisk environment.  i was
able to successfully run sysinst, but the screen displays many
"bad format `p'" errors i am yet to track down entirely that
make it somewhat difficult to see.
2008-01-02 11:39:01 +00:00
mrg
a386f0e8b3 build an INSTALL kernel. it's just GENERIC with md(4) root space. 2008-01-02 11:32:15 +00:00
mrg
0738c9d4c5 port the prep parts to ofppc. this is tested on a pegasosII box and
with a suitable ramdisk etc, you can actually install successfully.

mostly the changes from port-prep are to switch the prep mkbootimage
to an msdos boot partition with a copy of ofwboot in it.
2008-01-02 11:30:30 +00:00
mrg
8403b85c70 add support for PART_BOOT_PI_FLAGS and PART_BOOT_PI_MOUNT defines that
allow PART_BOOT support to set flags / mountpoint for the boot partition.

will be used for ofppc port to create an msdos /boot.
2008-01-02 11:23:22 +00:00
sborrill
37c7a4d0f3 Configuration file is boot.cfg, not boot.cnf, so fix comments 2008-01-02 10:39:39 +00:00
dyoung
80c0fcd21b Improve device detach routine. Now I can detach nsclpcsio0 and
its children.

Fix an off-by-one bug in the sensor initialization which stopped
it from completing.

Extract sensor initialization into a new subroutine.  If there is
an error while initializing sensors, do not let sc_sme dangle.
2008-01-02 10:21:08 +00:00
dyoung
09767a906c In sysmon_envsys_create(), initialize the callout structure. Stops
panics with a DIAGNOSTIC kernel.

In sysmon_envsys_find_40(), wait until an envsys is not busy before
settings its busy flag, in the pattern of sysmon_envsys_find().
2008-01-02 10:15:53 +00:00
sketch
9e7635573e Seasonal addition, HNY: Happy New Year! 2008-01-02 09:14:17 +00:00
dogcow
fad5ee1397 const char casting, to make gcc happy. (not that sun2 compiles these days
without other patches.)
2008-01-02 06:53:09 +00:00