Commit Graph

169734 Commits

Author SHA1 Message Date
uwe
39fcc155cc Default COPTS to "-Os -freorder-blocks" which is ~= -O2 but without
-falign-* that is too zealous for low-memory sh3 machines.  I've been
using this for my hpcsh and landisk kernels for a very long time.
(besides, it's not 2001 anymore and pkgsrc/cross/sh is long since gone).
2008-05-06 02:25:19 +00:00
uwe
d7e68261ea Avoid uninitialized variable warning at -O. 2008-05-06 02:12:19 +00:00
bjs
e28a3e014b Revert all the changes this time. 2008-05-06 01:51:00 +00:00
bjs
829081eaa7 Revert last commit -- breaks i915. 2008-05-06 01:45:47 +00:00
uwe
3b59dc3936 Enable re(4) now that bus_dma is fixed to deal with TLB-mapped data in mbufs. 2008-05-06 01:30:22 +00:00
uwe
a0a69502b3 Deal with TLB-mapped data in mbufs. Makes nfs writes work with re(4). 2008-05-06 01:29:00 +00:00
bjs
a65a4adb77 A few steps down the yellow brick road toward bus_dma-ification:
- Add drm_dmamem_alloc/drm_dmamem_free to drm_memory.c to nicely wrap up
   the bus_dma API.

 - Start using the above in drm_pci.c.

 - Add DRM_NETBSD_DMA_ADDR/DRM_NETBSD_DMA_VADDR macros.

 Locking:

 - Use IPL_NONE for all locks except the IRQ lock, which runs at IPL_VM.

 - Use IPL_VM instead of IPL_TTY with pci_intr_establish() for consistency's
   sake. These two changes seem to eliminate the presistent lockups I was
   having (NetBSD-current/amd64 r300).

 - Start getting rid of DRM_SPININIT/DRM_SPINUNINIT and DRM_SPINLOCK/
   DRM_SPINUNLOCK ... these annoy me to no end--not to mention that they
   locks may or may not be spinlocks!  It's a linux frob, really.
   We're way beyond merging any useful bsd-core code on a large scale, which
   was the only good reason to keep them around.

 Memory allocation:

  - Change drm_memory.c so that it contains generally useful, memory
    allocation functions using kmem(9) (mostly used by the drivers
    themselves).  However, I expect to use this more in the future
    in the "bsd core".  These functions always use KM_NOSLEEP.
    The new drm_dmamem_alloc function has a wait argument which
    takes DRM_DMA_WAIT/DRM_DMA_NOWAIT (defined as their bus_dma
    counterparts), and honors this hint in its calls to kmem(9)
    and bus_dma(9) functions.

  - Got rid of these functions' "area" argument--it's been deprecated for
    ages.  Provide macros in drmP.h to deal with the os-independent code.

  - Declare these functions inline -- I believe they're used enough
    by the i915 and radeon drivers to justify it.  Please let me know
    if I am mistaken.

    NOTE: With these changes, a glxgears score which was previously
    ~3900fps is now ~4400fps (same setup as mentioned above).  I realize
    that using kmem(9) could cause problems, but I can't seem to run into
    any with my test setup.  If anyone smells regression, please let me
    know.
2008-05-06 01:26:14 +00:00
lukem
c63ddfd726 Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.
Fixes PR bin/38589
2008-05-05 22:54:11 +00:00
dyoung
5e40785deb Make PCI power re-activation DTRT: pass pci_activate_null instead
of NULL to pci_activate()

Call the variable where we store the PCI Command & Status Register
'csr' instead of 'pmreg'.

In sipcom_intr(), get out if the device is inactive.  Otherwise
sip(4) may inadvertently try to handle a shared interrupt before
the driver state is completely set up.
2008-05-05 20:19:09 +00:00
dyoung
f05735da97 Restore PCI devices to a state that is closer to the state that
NetBSD finds them in: save and restore power management state
(D0..D3) and PCI Configuration Registers 0x0 through 0x40 during
device attachment and detachment, respectively.  Among other things,
this will fix sip(4) detachment and re-attachment.
2008-05-05 20:14:30 +00:00
martin
7e90218496 Stephan Meisinger kindly contributed this man pages to TNF, so use the
standard TNF 2 clause license.
2008-05-05 19:51:23 +00:00
jmmv
940585f3ea Fix MKMODULAR=yes builds by resolving installation problems of the k_helper
test module after the introduction of bsd.kmodule.mk.  The files list was
inconsistent with the new module structure and the Makefile did not use the
correct variable to specify the installation of the module.  Hi ad@!
2008-05-05 19:33:09 +00:00
ad
51e7ff401b PR port-amd64/37461 x86 cpu dmesg output is noisy
Port identifycpu() to userspace. The kernel lies and reports on cpuN while
actually using the values from cpu0, but this attempts to bind itself to the
requested CPU if running as root. That doesn't work properly yet due to
kern/38588, but will do once that's fixed.
2008-05-05 17:54:14 +00:00
ad
2f3850d422 Export tsc_freq via sysctl. 2008-05-05 17:47:06 +00:00
ad
e071d39c84 - Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
2008-05-05 17:11:16 +00:00
ad
8f4b352702 Compress the module. 2008-05-05 17:10:28 +00:00
ad
e7d7e96395 vfs_dobusy: add assertions. 2008-05-05 17:08:54 +00:00
ad
6b5cb6423a BUGS section no longer applies. 2008-05-05 14:46:40 +00:00
ad
5a2236b88e The kernel is too large. Reduce size by commenting out eye candy options:
{ACPI,MII,PCI,USB}VERBOSE

Also remove INCLUDE_CONFIG_FILE, because it doesn't make sense in GENERIC.
2008-05-05 14:44:26 +00:00
ad
a09a6bc31d The kernel is too large. Reduce size by commenting out eye candy options:
{ACPI,EISA,MII,PCI,USB,MCA}VERBOSE

Also remove INCLUDE_CONFIG_FILE, because it doesn't make sense in GENERIC.
2008-05-05 14:43:18 +00:00
jmcneill
ad9936b335 Use aprint instead of DRM_INFO macro to cleanup attachment messages. 2008-05-05 14:00:10 +00:00
xtraeme
f14b65c700 device_t/softc split and other related cosmetic changes. 2008-05-05 13:58:58 +00:00
ad
3b0a20c6a8 Fix previous. 2008-05-05 13:42:15 +00:00
ad
2bbb14eaa4 Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
xtraeme
ed38b7481e device_t/softc split and other related cosmetic changes. 2008-05-05 11:49:40 +00:00
jmcneill
1a53395e7e Change autoconf message 'direct rendering on dev unsupported' to
the more accurate 'drm at dev not configured'.
2008-05-05 11:42:45 +00:00
chris
dc970973a2 Increase banner entries from 10 to 12. This allows all 12 lines of the cd
boot.cfg banner to be displayed.
2008-05-05 08:36:55 +00:00
yamt
ad1e9536e6 document LWPCTL_FEATURE_PCTR. 2008-05-05 05:04:06 +00:00
chs
5069fb4d04 pmap_upvo_pool needs to use IPL_VM since it is used from
pmap_kenter_pa(), which can be called from interrupt context.
2008-05-05 04:40:53 +00:00
rmind
5d2295cf6d Move the values to POSIX_* and use the constants for MADV_*, since these
are inside _NETBSD_SOURCE ifdef.
2008-05-05 03:12:24 +00:00
jmcneill
473a55317b Wrap debug printfs in #ifdef DEBUG_LINUX (hi njoly!) 2008-05-05 02:29:31 +00:00
tsutsui
44b2bb4cfa Use device_private() where appropriate. 2008-05-05 01:37:56 +00:00
ad
104f8564ec Remove unneeded includes. 2008-05-05 00:33:32 +00:00
jmcneill
729313d52c Use 2-clause license. 2008-05-05 00:12:49 +00:00
ad
b68bfe3ffa A couple of dumb utilities:
array2bin: take array[] from array.h and spit it out as a binary.
bin2blob: take a binary file and output a compressed image as a C array.
2008-05-04 23:50:32 +00:00
ad
e724ef3c86 Provide zcalloc()/zcfree() so that uncompress() works. 2008-05-04 23:48:05 +00:00
ad
b407147f14 Move zlib out of net/ and into kern/. It would probably be better to use
the reachover Makefiles and libz, but this is already here and it works.
2008-05-04 23:07:09 +00:00
ad
d2c9207a91 Don't check sys/net/zlib.h. 2008-05-04 22:59:18 +00:00
ad
9f4cef7b1f Don't install sys/net/zlib.h. 2008-05-04 22:58:52 +00:00
jmcneill
76b70ae0dc Note amd64 drm support. 2008-05-04 21:55:33 +00:00
jmcneill
dc2a8d24fc Ugh, unbreak _DRM_SHM on amd64 again. 2008-05-04 21:43:01 +00:00
rumble
7846a18697 Fix an error path that previously panicked when module_fetch_info failed. 2008-05-04 21:35:12 +00:00
oster
5a9093cfac Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
2008-05-04 20:57:23 +00:00
jmcneill
63b0503310 Fix compilation on i386. 2008-05-04 20:27:50 +00:00
jmcneill
2b4fd7dc0e For _DRM_SHM allocations, do not use the VA as drm_map handle on x86_64
since udv_attach will not accept a larger offset than signed 64-bit will
provide. Not the best fix, but good enough for now -- at least an X server
will now startup and get proper mappings.
2008-05-04 20:09:32 +00:00
rumble
6d44774c77 If a device transmit timeout occurs and sc_txintrperiod is greater than
one, throttle it down before the reset. This way the user need not know
the magic `hw.ath0.txintrperiod=1' fix if the default value is too high
for their machine.
2008-05-04 20:02:06 +00:00
cegger
46512505a9 Update headers: Welcome Xen 3.2.1
Important note: This does not break backward-compatibility. It is still possible to run on Xen 3.1.4.
Hint for developers: Use the xen_version hypercall to determine at runtime if a new hypercall will work. Also check the hypercall return code.
Tested by me and bouyer. OK bouyer.
2008-05-04 19:56:28 +00:00
martin
637bc2e71d Move TNF licenses to 2 clause form 2008-05-04 19:43:05 +00:00
jmcneill
7380b7991e Returning EINVAL from drm_mmap isn't a smart thing to do. 2008-05-04 19:19:40 +00:00
tonnerre
34f7daa87e Fix a bug in the implementation of seekdir(). If the first entry in
a block has been unlinked, seekdir() may overshoot by one entry.
Thus, _readdir_unlinked() must not skip deleted entries when being
called from seekdir().
Christos agreed.
2008-05-04 18:53:26 +00:00