Commit Graph

138 Commits

Author SHA1 Message Date
Alan Cox
c640357f04 Push down the implementation of PCPU_LAZY_INC() into the machine-dependent
header file.  Reimplement PCPU_LAZY_INC() on amd64 and i386 making it
atomic with respect to interrupts.

Reviewed by: bde, jhb
2007-03-11 05:54:29 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
Brooks Davis
983f970981 Include GEOM_LABEL in GENERIC. It's very useful and not well publicized
enough.

Approved by:	pjd
2007-02-09 19:03:18 +00:00
Marcel Moolenaar
1d3aed33e8 Evolve the ctlreq interface added to geom_gpt into a generic
partitioning class that supports multiple schemes. Current
schemes supported are APM (Apple Partition Map) and GPT.
Change all GEOM_APPLE anf GEOM_GPT options into GEOM_PART_APM
and GEOM_PART_GPT (resp).

The ctlreq interface supports verbs to create and destroy
partitioning schemes on a disk; to add, delete and modify
partitions; and to commit or undo changes made.
2007-02-07 18:55:31 +00:00
Kip Macy
6d449d27d9 Add support for IPI_PREEMPT in order to enable use of the ULE scheduler 2007-02-02 05:00:21 +00:00
Kip Macy
d5ab3ef787 match against both dirty and writeable for marking page dirty 2007-02-02 04:57:11 +00:00
Ruslan Ermilov
a35dcad5cb MFsparc64: Add .cvsignore file here too. 2007-01-30 10:50:55 +00:00
Marius Strobl
0ca3609e30 Convert the remainder of the low hanging fruits regarding including
headers in .S directly rather than getting to their macros through
genassym.c/assym.s so there are less headers genassym.c has to be
kept in sync with.
While at it fix some stytle(9) bugs (indentation, prototype format,
sort headers, etc) and remove trailing whitespace.
2007-01-19 11:15:34 +00:00
Marius Strobl
23e81b7e03 - Rename UPA_BUS_SPACE to NEXUS_BUS_SPACE; besides an UPA bus, nexus(4)
may also reflect a Fireplane/Safari or JBus bus (or a virtual bus which
  in turn reflects a JBus bus or something like that...).
- In the both the sparc64 and sun4v bus_machdep.c use __FBSDID.
- Spell SBus the official way in comments.
- Replace hardcoded function names (all of which were actually outdated)
  in panic and status strings with __func__.
- Fix whitespace nits.
2007-01-18 18:32:26 +00:00
Marius Strobl
441b9412d6 Remove the compat shims for the ISA old-stlye in{b,w,l}()/out{b,w,l}()
and friends along with all hacks required to implement them. None of
the drivers currently built (as part of GENERIC, LINT or modules) on
sparc64 or sun4v and none of those we might want to use there in
future uses them, AFAICT there actually never was a driver hooked up
to the sparc64 or sun4v build that correctly used these functions
(and it looks like that due to a bug read{b,w,l}()/write{b,w,l}() and
the other functions working on a memory handle never actually worked on
sun4v). All they ever were good for on sparc64 and sun4v was erroneously
dragging in dependencies on isa(4) in drivers like f.e. dpt(4), si(4)
and syscons(4) in source files that supposedly were bus-neutral and
hiding issues with drivers like f.e. ng_bt3c(4) that used these
functions with busses other than isa(4) and therefore couldn't work on
these platforms.
2007-01-18 13:52:44 +00:00
Warner Losh
fed32d7544 Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
Christian S.J. Peron
90339ccb12 Invert the logic inside of two KASSERTS which resulted in two kernel panics
for circumstances which are quite normal.

Discussed with:	kmacy
2006-12-31 02:50:07 +00:00
Xin LI
44ecc8e382 Fix build 2006-12-25 17:03:04 +00:00
Kip Macy
35d16ac000 - add ranged shootdowns when fewer than 64 mappings are being invalidated 2006-12-25 02:05:52 +00:00
Kip Macy
4654a1f82f - remove all calls to sched_pin and sched_unpin as they are only useful to
pmap on i386
- check for change in executable status in pmap_enter
- pmap_qenter and pmap_qremove only need to invalidate the range if one
  of the pages has been referenced
- remove pmap_kenter/pmap_kremove as they were only used by pmap_qenter
  and pmap_qremove
- in pmap_copy don't copy wired bit to destination pmap
- mpte was unused in pmap_enter_object - remove
- pmap_enter_quick_locked is not called on the kernel_pmap, remove check
- move pmap_remove_write specific logic out of tte_clear_phys_bit
- in pmap_protect check for removal of execute bit
- panic in the presence of a wired page in pmap_remove_all
- pmap_zero_range can call hwblkclr if offset is zero and size is PAGE_SIZE
- tte_clear_virt_bit is only used by pmap_change_wiring - thus it can be
  greatly simplified
- pmap_invalidate_page need only be called in tte_clear_phys_bit if there
  is a match with flags
- lock the pmap in tte_clear_phys_bit so that clearing the page bits is
  atomic with invalidating the page

- these changes result in 100s reduction in buildworld from a malloc backed
  disk to a malloc backed disk - ~2.5%
2006-12-24 08:03:27 +00:00
Kip Macy
5e296dbf52 Don't count on the first phys_avail range being greater than zero 2006-12-24 07:47:10 +00:00
Kip Macy
83e3f6ad3e - resizing the tte_hash in pmap_copy is not likely to occur
- the implementation also made the mistake of assuming the
  dst_pmap is the current pmap
2006-12-24 01:56:35 +00:00
Kip Macy
a7a6fa29bd reduce padding to compensate for recent change to sys/pcpu.h (tinderbox fix) 2006-12-20 20:18:07 +00:00
Kip Macy
de87749b4a remove unneeded operations in tsb_set_tte_real - the function is
only used early in initialization so SMP safeness isn't really an
issue
2006-12-18 07:46:59 +00:00
Kip Macy
0ebc11deba add declaration for new helper function 2006-12-18 07:25:26 +00:00
Kip Macy
b4935cbceb add helper function for finding a virtual device node in a machine
description
2006-12-18 07:22:25 +00:00
Kip Macy
0578eca08a push trap conversion up into tl1_trap to further simplify spill / fill fault
handling
2006-12-18 02:40:23 +00:00
Kip Macy
0622a9e491 Simplify spill/fill fault handling by updating tl1_trap register
usage to conform to that of tl0_trap - the separate code path
for unaligned faults was never getting used (and evidently doesn't
work), so ifdef out for now
2006-12-18 02:04:43 +00:00
Kip Macy
9c50a94180 remove TRAP_TRACING code that wasn't getting used
pc_caller is no longer part of pcpu
2006-12-17 03:51:12 +00:00
Kip Macy
7e3cb9f8ce GC unused fields in pcpu 2006-12-17 02:04:19 +00:00
Kip Macy
8dd3d530e0 replace PCPU_GET(cpuid) with curcpu and PCPU_GET(curthread) with curthread 2006-12-17 01:31:56 +00:00
Kip Macy
9af9f82482 eliminate use of curpmap except where protected by critical_{enter, exit} 2006-12-17 01:30:53 +00:00
Kip Macy
bbca332e0c make unmap_perm_addr conform to declaration 2006-12-17 01:22:51 +00:00
Kip Macy
7abbc00f33 eliminate extra branches by making better use of branch delay
slots and annulling
2006-12-17 01:22:09 +00:00
Kip Macy
8bba8b74ae - Remove PCPU references by passing field as a reference to _tte_hash_lookup.
- The PCPU usage was to ensure that there were no faults on the stack while
  the tte_hash_bucket lock was held - but this can be avoided by making sure
  the address on the stack is already referenced.
- PCPU removal obviates the need for critical_{enter, exit}
2006-12-17 01:01:52 +00:00
Kip Macy
a3fa231792 Protect consistency of all internal functions in tte_hash.c using PCPU_{GET,SET}
with critical_enter, critical_exit
revert previous change to pmap.c now that tte_hash_resize is protected internally
2006-12-16 08:38:02 +00:00
Kip Macy
f4d27eaf8f tte_hash_resize implicitly expects to be protected from preemption -
put under spinlock_enter
2006-12-16 08:23:14 +00:00
Kip Macy
e7c1a6ce81 change PTL trap type name to assist in tracking down prablems in tl1_trap 2006-12-16 08:01:13 +00:00
Kip Macy
7cfff9ae9a - KASSERT takes two arguments
- a cast is needed to quiet warnings
2006-12-16 07:51:33 +00:00
Kip Macy
8c3bc2c180 - make better use of branch delay slots in exception.S
- rename skip_utrap to tl0_skip_utrap to indicate its use by the fill trap fault handler
- handle a null kstack by switching to the idle threads stack and then going to trap
- correctly handle a unaligned or unmapped stack during a fill trap
- save off some extra data in the pcpu pad in ptl1_panic
- add an assert that PCB is valid in vm_machdep.c
2006-12-16 06:43:24 +00:00
Kip Macy
d8b5b86300 - make intent behind skip check clearer
- protect pmap_ipi with spinlock_enter when resizing tte_hash
2006-12-16 02:41:05 +00:00
Kip Macy
5bd2c4e059 don't return directly to copyin and friends when we hit certain types of faults
this fixes the unkillable syscall in stress2
2006-12-16 02:40:19 +00:00
Kip Macy
a23c97ad89 workaround kernel malloc's brittleness
- don't shuffle phys_avail following kernel to the beginning if the
  range is less than what would remain in a 256MB page (248MB)
2006-12-12 03:50:06 +00:00
Kip Macy
8401edeb32 - provide a more informative panic if mdesc_update() fails
- handle some cases where the return value of mdesc_update() is not zero
  when it should be
2006-12-12 02:50:12 +00:00
Kip Macy
9ac317cd2e - remove vestigial reference to mra[i]
- partition phys_avail along 4GB boundaries as possible workaround for hardware
  problems causing watchdog panics
2006-12-12 01:16:17 +00:00
Kip Macy
abbeb75f29 make size of pad non-zero so that trap-tracing code doesn't overwrite the
base of our stack
2006-12-11 04:50:25 +00:00
Kip Macy
2e05e7d021 KTR entry contained invalid context reference - ifdef out 2006-12-10 18:09:44 +00:00
Kip Macy
160dc4ccc8 remove more uses of trap_conversion to get more meaningful trap messages
add a printf for when we fault on the direct area (should never happen)
2006-12-10 06:00:09 +00:00
Kip Macy
504baf688e better handle the case of hw.physmemstart being hw.physmem not being set,
previously we were acting as if physmem was being set when it was not
2006-12-10 04:14:29 +00:00
Kip Macy
42b20c8aa2 Add hw.physmemstart loader variable to enable the user to specify the address
at which the kernel should start allocating physical memory. The primary
purpose of this is to test 64-bit cleanness of the data path by setting
hw.physmemstart=4G so that all physical allocations are above 4GB. AMD64
and i386/PAE could also benefit from having this option.
2006-12-10 01:52:46 +00:00
Kip Macy
90e405668e Fix handling of the hw.physmem loader variable use real_phys_avail[] which
is already bounded by hw.physmem to calculate phys_avail[] - previously only
real_phys_avail[] was being bound by hw.physmem so we were allocating memory
that wasn't mapped in the direct map
2006-12-09 23:11:30 +00:00
Kip Macy
76cb7acf30 - remove restriction on OFW kernel allocations being 4M
- shuffle memory range following kernel to the beginning of phys_avail
- have the direct area use 256MB pages where possible
- remove dead code from the end of pmap_bootstrap
- have pmap_alloc_contig_pages check all memory ranges in phys_avail before
  giving up

- informal benchmarking indicates a ~5% speedup on buildworld
2006-12-09 05:22:22 +00:00
Kip Macy
5b1bbad223 fix CID 1671 by freeing listp before exit from vnex_attach 2006-12-07 02:09:06 +00:00
Kip Macy
7e8123da0e fix CID 1670 by freeing pointer listp before returning 2006-12-07 02:05:13 +00:00
Kip Macy
1abcd84428 fix CID 1672 by initializing variable clock 2006-12-07 02:04:25 +00:00