| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timecounter struct is large and I think it may change in the
future. Changing it later will be easier if we use C99-style
initialization for all timecounter structs. It also makes reading the
code a bit easier.
For reasons I cannot explain, switching to C99-style initialization
sometimes changes the hash of the resulting object file, even though
the resulting struct should be the same. So there is a binary change
here, but only sometimes. No behavior should change in either case.
I can't compile-test this everywhere but I have been staring at the
diff for days now and I'm relatively confident this will not break
compilation. Fingers crossed.
ok gnezdo@
|
|
|
|
|
|
|
|
| |
console i/o still happens using ofw routines, which is Good Enough(tm)
for now. having a working machine means i can better test changes
now though.
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
|
|
|
|
| |
OK dlg@, bluhm@
No Opinion mpi@
Not against it claudio@
|
|
|
|
|
| |
interrupt pin as the devino. Fixes ohci(4) and ehci(4) interrupts on the
Fujitsu M10-1.
|
|
|
|
|
|
|
| |
up MSI support.
stsp@ and bluhm@ ran into this on T5220s
ok stsp@ kettenis@ patrick@
|
| |
|
|
|
|
|
| |
to scsi_copy_internal_data(). Thus getting xs->resid properly set and adding the
usual uio/size sanity checks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*'
from cmd. Take the address of cmd as required by the various casts.
No intentional functional change.
luna88k test by aoyama@, sparc64 test by jmatthew@
Identification of 2009's last *cmd use and ok jmatthew@
|
|
|
|
|
| |
responses. This is what the SCSI specifications say is the correct value and
already used in several cases.
|
| |
|
|
|
|
| |
initialize the 'version' field. Not numbers.
|
|
|
|
|
|
| |
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
|
|
| |
sparc64 compile test by jmatthew@
|
| |
|
|
|
|
| |
Encountered by deraadt@
|
|
|
|
| |
Typo broke miod's luna88k build. Would have broken next sparc64 build.
|
|
|
|
|
|
|
| |
fields to struct scsibus_attach_args. Nuke the struct scsi_link *
(saa_sc_link) in scaibus_attach_args.
Explicitly initialize each field in scsibus_attach_args variables.
|
|
|
|
|
|
|
| |
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.
Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
|
|
|
|
|
|
|
|
| |
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth'
via sb_adapter_buswidth.
Removes last post-config uses of the copies of bus related
information in scsi_link.
|
|
|
|
| |
statement. All to make upcoming diff(s) smaller and easier to read.
|
|
|
|
| |
ok dlg@ tobhe@
|
|
|
|
|
|
| |
"new" API.
ok dlg@ tobhe@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
| |
immediately before initializing the only field in the struct.
|
|
|
|
|
|
|
|
| |
gigabytes) instead of just the amount the caller asked for. This
resulted in a noticeable delay while attaching devices using multiple
msi-x vectors as we map and unmap the msi-x table for each vector.
ok kettenis@
|
|
|
|
|
|
| |
indicate the adapter is not a target on the bus.
ok dlg@ as part of a larger diff.
|
|
|
|
|
|
|
| |
set/trust the scsiconf.c probing limits. Same as was done to
vioblk(4).
ok dlg@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when sparc64 attaches cpus early during boot, it really just allocates
the software state for them (ie, the devices and the cpu_info
structs) and fills them in with information from openfirmware, but
it doesnt actually spin them up in a physical sense until just
before root is mounted. in between that, we now set up pyro with
an msi event queue per cpu, and target the interrupts for those
event queues at the different cpus. if a device generates an msi
interrupt before the cpus are spun up, pyro will fire an interrupt
at those cpus, but cos they're not running yet, they don't handle
the interrupt, and the event queue never gets processed. because
the msi interrupt state is never cleared by the pyro interrupt
handler because the cpu didn't run it, any further msi interrupts
from that pci device don't cause the eq interrupt to fire again,
so it gets stuck.
one approach to dealing with this is to target all the event queues
that pyro sets up at the boot cpu, and once the other cpus are
running we go through and retarget the event queue interrupts at
the different cpus. this means the boot cpu works on the other cpus
behalf until they're running, and it avoids the eq interrupts being
ignored before the other cpus are running.
another approach is to spin the cpus up when they're attached, so
they'll be set up to process early pyro interrupts, even if they
sit at splhigh until after autoconf has run. i had a quick go at
this and it didn't go well.
the approach we went with was to avoid having the device in question
generate interrupts early.
i left the redistributing code in the tree so people might discover
it if needed, or at least see this description of what's happening.
kettenis@ seemed ok with leaving the code in jmatthew@s
pci_intr_establish_cpu commit, but removing it after. this is that
removal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
systems. MSIs on these systems are delivered to event queues, which
trigger interrupts when non-empty. The interrupt handler dequeues the
MSIs and converts them into soft interrupts, which run on the same cpu
as the event queue interrupt.
To target pci device interrupts to different cpus, we set up an event
queue per cpu in the system, or as many as we can, if there are fewer
event queues available. For now, we don't have a way to feed this
information back to intrmap, so instead we just map interrupts for cpus
that don't have an event queue to another cpu that does have one.
Tested on V215 (pyro), T5120, T4-1, S7-2 (vpci).
dlg@ got the pyro side of it working for me.
ok dlg@ kettenis@
|
| |
|
|
|
|
|
|
| |
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.
|
|
|
|
|
|
|
|
| |
miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.
suggested and reviewed by miod@
|
|
|
|
|
|
|
|
| |
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
|
|
|
|
| |
inputs & ok kettenis@
|
|
|
|
| |
Copy a change from dev/isa/fd.c to sparc64's floppy driver.
|
|
|
|
| |
Compile testing by kurt@ and jca@.
|
|
|
|
|
|
|
| |
Do not include <sys/kthread.h> where it is not needed and stop including
<sys/proc.h> in it.
ok visa@, anton@
|
|
|
|
|
|
| |
'minphys()'. Just use & check for NULL instead, since 'minphys()' is
always called on the code path ([cd|sd|st]minphys) that calls
physio().
|
| |
|
|
|
|
|
|
|
|
| |
inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys'
to reflect what it is supposed to do. Use consistent naming convention
(<dev>_minphys) for the actual device functions.
No functional change.
|
|
|
|
| |
Tested by kn@, ok kettenis@, kn@
|
| |
|
|
|
|
|
| |
introduced iommu_dvmamap_insert() using an undefined paddr_t pa under DEBUG;
since it cannot be introduced it (easily), remove it from the printf().
|
| |
|
|
|
|
| |
Feedback guenther
|
|
|
|
|
|
|
|
|
| |
Some drivers have returned ENXIO (6) if the device is not available
which incorrectly translates into POLLPRI|POLLOUT (2|4) in userland.
Change it to POLLERR for now, but it might as well be POLLHUP.
OK mpi@
|
|
|
|
|
|
|
| |
In May 29 2008, Matthew R. Green removed it in NetBSD:
github.com/IIJ-NetBSD/netbsd-src/commit/7ea20401d535da9996394136ef
ok deraadt@
|