Commit Graph

98216 Commits

Author SHA1 Message Date
cegger
d597d7c58e backout previous. makes i386 ALL kernel build again 2008-12-19 12:58:43 +00:00
hannken
e1e7ee242d Restore a line removed by mistake with the last commit.
Should fix PR 40225 panic: indiracct: missing indir.
2008-12-19 11:36:10 +00:00
ad
44d265693d Bah, re-apply. I still see errors without it. 2008-12-19 11:21:52 +00:00
ad
30fd42e845 PR kern/40213 my i386 machine can't boot because of tsc
- Patch in atomic_cas_64() twice. The first patch is early and makes it
  the MP-atomic version available if we have cmpxchg8b. The second patch
  strips the lock prefix if ncpu==1.

- Fix the i486 atomic_cas_64() to not unconditionally enable interrupts.
2008-12-19 11:21:24 +00:00
ad
f9040e4646 Back out previous. atomic_cas_64() doesn't work during early boot. I'll
fix that instead.
2008-12-19 11:11:55 +00:00
pooka
e222420f88 CTASSERT kcondvar size 2008-12-19 09:50:04 +00:00
pooka
cf6dee5091 fix build
(hi thorpej!  the first one is always free ;)
2008-12-19 09:33:40 +00:00
thorpej
4730b27d42 Make condvars really opaque -- hide the wait message member from consumers
of the API.
2008-12-19 07:57:28 +00:00
kenh
abc88641ad Switch back original ARM assembler code used to calculate the number of ticks
needed to wait in delay().  New code overflowed for large delay values.  Broke,
among other things, the RTC probe for the TS-7200.
2008-12-19 04:26:35 +00:00
kenh
3230ffc8a5 Trim back kernel configuration to fit within TS7200's memory limitations. 2008-12-19 04:23:52 +00:00
pooka
7b7b68ba71 include vfs_xattr.c 2008-12-19 00:57:24 +00:00
pgoyette
3ed3895de3 Add i2c bus address checking for these chips. All supported chips live
at predefined addresses 0x2c, 0x2d, or 0x2e.
2008-12-18 20:41:35 +00:00
cegger
29ab14fbb0 malloc -> kmem 2008-12-18 15:42:33 +00:00
reinoud
f4d0142196 Implement auto-track repair on tracks marked damaged when searching for
writable tracks on session opening. Note that this an optionally implemented
feature and thus no error will be generated if it fails; the drive will most
likely autorepair it.
2008-12-18 15:41:44 +00:00
reinoud
e2d4b2a7ea Fix critital panic when mounting a CD-R/DVD*R disc. The check for VV_ROOT was
not done correctly and could panic when requested to load a VAT descriptor
since the fileset was not yet fetched.
2008-12-18 13:03:49 +00:00
cegger
3449eda978 remove unused malloc.h 2008-12-18 12:18:20 +00:00
cegger
f3cd5e707d remove unused malloc.h 2008-12-18 11:45:40 +00:00
pooka
52d070140e include snprintb 2008-12-18 11:16:36 +00:00
pooka
74bf412512 .PATH maintenance 2008-12-18 11:09:34 +00:00
he
1c6fe739fe Correct two typos and remove a now-unused variable to make this
build again.
2008-12-18 10:58:17 +00:00
isaki
3b878f898f Sync with other m68k ports.
- Remove PHYS_IODEV, PHYS_INTIODEV. These are real copy of INTIOBASE.
- Define IIOV() (and IIOP()) and use it, rather than INTIO_ADDR().
2008-12-18 05:56:42 +00:00
isaki
ae6ae44eaf Move external decl. of intiobase: dev/intiovar.h -> include/cpu.h
Move definition of intiobase: x68k/pmap_bootstrap.c -> x68k/locore.s
These synchronize code with other m68k ports.
2008-12-18 05:24:03 +00:00
isaki
e6d9927220 There's no need to use initial value to intiobase and IODEVbase.
They are not refered to before it's initialized in pmap_bootstrap().
2008-12-18 05:19:52 +00:00
mhitch
bf3440b26a Don't expose kernel functions when including these in the Xamiga server
build.  Should fix the amiga build failures.
2008-12-18 05:04:22 +00:00
isaki
dc21f7bf9b Make it compilable again. 2008-12-18 03:18:27 +00:00
isaki
396b643faa Swap initialization of intiobase and IODEVbase.
It synchronizes other m68k ports (news68k, mvme68k, ...).
2008-12-18 02:43:45 +00:00
isaki
b3f443b573 Remove intr_reset(), which has disabled device interrupt just
after start in locore.s.  Initializing interrupt should be done
by each device driver.
2008-12-18 02:27:41 +00:00
isaki
41d10f80a2 unsigned -> unsigned int 2008-12-18 02:09:20 +00:00
pooka
a768afd60b __KERNEL_RCSID 2008-12-18 00:24:12 +00:00
pooka
08c8c2d4d4 __RCSID 2008-12-18 00:21:52 +00:00
pooka
df8e80be1a Separate the timer thread and soft interrut workers. Use a dynamic
size pool of workers to make sure there are enough for processing
the scheduled soft interrupts.
2008-12-18 00:12:00 +00:00
cegger
af524dbaf3 make this compile 2008-12-17 22:49:13 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
pooka
c60be09da1 If available (__NetBSD__), use pthread_setname_np() to set the
thread name for kthread_create().
2008-12-17 20:16:28 +00:00
cegger
6b7c41cff5 make this compile 2008-12-17 19:51:06 +00:00
cegger
77c3411230 make this compile 2008-12-17 19:35:09 +00:00
cegger
f51c42b9f0 make this compile 2008-12-17 19:09:56 +00:00
cegger
adf840b3cd make the compile again 2008-12-17 17:12:52 +00:00
cegger
c04f959ef5 make this compile with AUDIO_DEBUG 2008-12-17 15:47:35 +00:00
cegger
ad15153381 make this compile with IYDEBUG 2008-12-17 15:41:24 +00:00
cegger
8d3de7484b make this build with AZALIA_DEBUG 2008-12-17 15:35:17 +00:00
pooka
b1e593bee5 Pick PPC_OEA over PPC_IBM4XX. I've decided I like it more.
(plus it hopefully builds without source changes)
2008-12-16 23:49:48 +00:00
pooka
49751f013b remove some completed TODO items and add new ones 2008-12-16 23:34:28 +00:00
pooka
abe4c2aeb6 liberate trailing whitespace 2008-12-16 23:17:17 +00:00
pooka
994144641d -Isys/arch is used in kernel builds 2008-12-16 23:16:46 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
christos
761540f260 regen 2008-12-16 19:55:22 +00:00
christos
85947fef5e add more intel iwn devices 2008-12-16 19:54:52 +00:00
reinoud
62c3c2d194 Check for a node being root on node creation so when the root node is disposed
of when working deep into the directory tree it can reliably be reget and
marked correctly as the FS root.

Fixed pwd(1) lock panic and possible endless loop in other tools.
2008-12-16 16:27:05 +00:00
pooka
81723cc93e The great QUOTA purge of '08: get rid of those #ifdef QUOTA and
#include "opt_quota.h" which do exactly nothing.  Speeds up kernel
compilation by 1.375*10^-20001 seconds.  But leave the most moxious
comment in msdosfs_vfsops untouched.
2008-12-16 16:18:25 +00:00
pooka
f5ffdf8399 Mark pages busy during VOP_PUTPAGES(). Deals with KASSERT in nfs write. 2008-12-16 14:48:31 +00:00
reinoud
0be5b3fe22 Fix endless loop occuring on empty directories listing on 512 bytes/sector
media like harddiscs. Also provide provide a `safety net' on readdir so it
will signal EOF when its requested an entry outside the directory.
2008-12-16 14:28:34 +00:00
pooka
1355265509 Make rumpflushva flush only the atop info for a certain uvm object.
Better, but still not completely race-free (if two threads call
RUMP_VOP_PUTPAGES() directly for the same vm object).
2008-12-16 14:07:25 +00:00
reinoud
42dbf4bb33 Elaborate SYNC debug messages and rename some debug messages to a more
proper category.
2008-12-16 10:30:19 +00:00
jakllsch
26f9d336c3 In case the PCI command bits aren't already set, do so before performing
an access that requires them to be.  From KIYOHARA Takashi.
2008-12-16 02:46:47 +00:00
jakllsch
9ff34ac12b Add siisata(4) to the lists. From KIYOHARA Takashi. 2008-12-16 02:14:24 +00:00
cegger
67adcc40e5 cleanup BIOS memmap code:
- get rid of some nested externs
- reduce dependency on global variables
- some preparations for upcoming pmem(9)
2008-12-15 22:20:52 +00:00
mhitch
2c6d71a592 More device_t/softc split fallout, this time in iop(4). Fix from
Juan Romero Pardines.  Tested on alpha by me.
2008-12-15 18:35:48 +00:00
ad
503e396041 More paranoia. 2008-12-15 12:46:28 +00:00
tron
9eff96d745 Keep trying to attach ipmi(4) in the background for five seconds.
NetBSD now detects the IPMI support in a HP Proliant ML110 G4 again.
This fixes PR kern/40065 by myself.
2008-12-15 12:13:46 +00:00
ad
7c89190b50 Start percpu allocation at (ALIGNBYTES + 1) to avoid problem with importing
offset zero to vmem.
2008-12-15 11:59:22 +00:00
ad
c1ef49a66f Back VMEM_ADDR_NULL change. It's too invasive. 2008-12-15 11:42:34 +00:00
ad
b8c27c5dfc Check for VMEM_ADDR_NULL, not NULL. 2008-12-15 11:33:13 +00:00
ad
f9b17a5200 Define VMEM_ADDR_NULL as UINTPTR_MAX, otherwise a vmem that can allocate
a block starting at zero will not work.

XXX pool_cache uses NULL to signify failed allocation.
XXX how did the percpu allocator work before?
2008-12-15 11:29:49 +00:00
ad
50f32f7a93 Put vm_lock into its own cache line. 2008-12-15 10:26:10 +00:00
he
9a3d86109e _DEV_ZERO_oARM is now only defined under COMPAT_16; make this build
after that change.
2008-12-15 09:43:27 +00:00
mrg
b441ddb4e0 restore some old "intrdebug" code, but leave it under NOT_DEBUG. most
of it works, but one that prints func/arg for each handler is not very
stable...

for now, while schizo bus space pointer accesses aren't working, add
a SCHIZO_BUS_SPACE_BROKEN option so you can build a kernel with schizo.

with this, and the prior schizo interrupt fix, you can now fail to run
/sbin/init!
2008-12-15 06:44:56 +00:00
mrg
d991cc1d1e properly calculate the addresses of the interrupt map & clr registers.
now interrupts are working.  but /sbin/init is failing to work over nfs.
2008-12-15 06:30:59 +00:00
mrg
d098511db4 some minor KNF and also DPRINTF pm_flags in sparc_bus_map(). 2008-12-15 06:30:00 +00:00
matt
313f8b7991 Get the gmac driver close to working. 2008-12-15 04:44:27 +00:00
mrg
92a6d92cc8 merge these two files, makes sparc64 sparc/libc work again.
only provide __HAVE_LONG_DOUBLE if _LP64.
2008-12-15 00:25:05 +00:00
pooka
af473973e4 Also assign a value to pmap_extract_p.
(3rd time's the charm, maybe i finally got it right?)
2008-12-15 00:12:54 +00:00
pooka
864681f9a5 Fix another error in sparc pmap_extract_p, as prompted by mrg 2008-12-15 00:10:48 +00:00
elad
f4f1989ae8 PR/39559: Juan RP: veriexec(4): too easy to cause a NULL dereference
through it in kernel

Patch from PR applied with tiny modifications, thanks!

Discussed with blymn@ a while ago.
2008-12-14 23:20:23 +00:00
mrg
15e9690d92 no need for this to use BUS_SPACE_MAP_LINEAR - it uses bus_space properly 2008-12-14 23:13:18 +00:00
elad
48949a2a2a Fix length passed to strlcpy(): we used to get names one character shorter
than reality.

Should be pulled up to netbsd-5.
2008-12-14 23:12:58 +00:00
he
cc040f5992 Bump SYMTAB_SPACE so that it fits again. 2008-12-14 23:07:22 +00:00
pooka
649c12eb68 If the arch uses __BSWAP_RENAME, provide non-namespaced kernel
symbols which just call the libc symbols.  Allows to get rid of
rump machine/bswap.h.

XXX:
1) this is unlikely to work on non-NetBSD
==>
2) should look into including libkern in librump
2008-12-14 19:58:29 +00:00
christos
49e9ba9a6b more KNF and ANSI from Anon-ymous 2008-12-14 18:46:33 +00:00
christos
334f5e8f00 ANSI and KNF from Anon Ymous 2008-12-14 17:03:43 +00:00
ad
024c36f64b vclean: be paranoid and set v_tag, v_op while holding v_interlock.
FS code could check their values while scrolling through mnt_vnodelist.
2008-12-14 11:15:59 +00:00
ad
31420e7959 - vrelel: fix broken "dead but not clean" assertion. The vnode can be
dead and dirty if cleaning is in progress.
- Add an assertion, fix some text.
2008-12-14 11:13:36 +00:00
macallan
b71621c812 wscons here we come!
(finally)
2008-12-14 03:28:51 +00:00
kenh
1d3c0b7c9e Revert changes from revisions 1.3 and 1.4; they make the tsarm platform
fail to boot.
2008-12-14 03:00:59 +00:00
isaki
f9b58c234c Simplify #ifdefs. 2008-12-14 02:21:34 +00:00
isaki
a4144ad62e Remove unused macros. 2008-12-14 02:19:58 +00:00
isaki
5b2d4637e6 Use intio_set_*() macros to purge macros by the name of sysport, ioctlr. 2008-12-14 02:16:51 +00:00
isaki
1c83a96ebb Use mfp_{set,clear}_*() macros to purge macros by the name of 'mfp'. 2008-12-14 02:05:54 +00:00
matt
145d27560e Add the beginning of a driver which supports the on-chip gmac (gigabit)
ethernet port.  It's still being debugged but it attaches and does some
things right.  And a lot wrong.  That's what debugging is for.
2008-12-14 01:57:02 +00:00
matt
d2dce27b37 Rename gpio.h to gpiovar.h. Make the pin routines usable by others
than the gpio code.  (gmac driver needs access to gpio to do mii ops).
2008-12-14 01:55:15 +00:00
jmcneill
0af0b213b5 Remove debug printfs 2008-12-14 00:53:52 +00:00
jmcneill
c2854ab43d add options PMS_ELANTECH_TOUCHPAD 2008-12-14 00:44:29 +00:00
jmcneill
3e8db25945 Add Elantech multi-touch driver. 2008-12-14 00:42:33 +00:00
christos
f0468ba656 add a boot.cfg option to clear the screen; default off. From Anon Ymous 2008-12-13 23:30:54 +00:00
ad
70a01ab869 softint_disestablish: the soft interrupt could still be running on a CPU
somewhere in the system. If it is, wait for it to complete before tearing
it down. The caller commits to not trigger the interrupt again once
disestablish is set in motion.
2008-12-13 21:13:30 +00:00
mrg
5adba7ec2c - read AgentID out of the schizo CSR and use that, rather than the
passed in portid, to calculate the IGN.
- don't logical-or in the IGN always, possible twice
2008-12-13 21:00:09 +00:00
ad
7a3593355a Fix a comment. 2008-12-13 20:49:49 +00:00
mrg
983a8c07d8 look for "portid" as well as "upa-portid". 2008-12-13 20:48:10 +00:00
ad
24da1f6ca4 PR kern/36183 problem with ptrace and multithreaded processes
Fix the famous "gdb + threads = panic" problem.
Also, fix another revivesa merge botch.
2008-12-13 20:43:38 +00:00
sketch
8be734c633 Fix PGTBL sizes. 2008-12-13 20:12:13 +00:00
christos
64193bedec more debugging in the dump path. 2008-12-13 19:38:20 +00:00
ad
2e606b7b1b sigchecktrace: process SIGKILL before everything else. 2008-12-13 18:55:01 +00:00
tsutsui
3eda3c7d85 Revert part of previous that reverted part of rev 1.14
which didn't affect the bug. (use __func__ to print function names)
2008-12-13 17:32:53 +00:00
pooka
5ca3e3371e * fix pmap_extract() prototype
* sparc64 also defines __sparc__.  deal with it
2008-12-13 17:11:34 +00:00
pooka
1bc395ab02 Get rid of local machine/{mutex,rwlock}.h files by treating the
object storage as a single pointer (all archs have at least one
uintptr_t in the objects).

(forgot to commmit with others)
2008-12-13 15:37:13 +00:00
pooka
22c85f18af Get rid of local machine/{mutex,rwlock}.h files by treating the
object storage as a single pointer (all archs have at least one
uintptr_t in the objects).
2008-12-13 15:34:48 +00:00
pooka
29f99fff05 _VMPARAM_H_ -> _$MACHINE_VMPARAM_H_ 2008-12-13 14:07:10 +00:00
pooka
5e4ac10274 wrap in #ifdef __x86_64__ 2008-12-13 13:36:04 +00:00
ad
b5413f0358 It's easier for kernel reserve pages to be consumed because the pagedaemon
serves as less of a barrier these days. Restrict provision of kernel reserve
pages to kmem and one of these cases:

- doing a NOWAIT allocation
- caller is a realtime thread
- caller is a kernel thread
- explicitly requested, for example by the pmap
2008-12-13 11:34:43 +00:00
ad
9d315c5bc9 PR 40027/pagedaemon loops on memory shortage
uvmpd_scan_queue:

- Fix a bug that prevented the pagedaemon from making forward progress
  if (a) swap was full (b) the first 16 pages on the inactive list were
  unbusy anons not already backed by swap.

- Remove redundant uvm_swapisfull() check and just try to allocate a slot.
  If it fails we know swap is full.
2008-12-13 11:26:57 +00:00
ad
f9a4aaf41f PR kern/40027 pagedaemon loops on memory shortage
uvm_swapisfull: don't count some small portion as it may be inaccessible to
us at any given moment, for example if there is lock contention or if pages
are busy.
2008-12-13 11:22:09 +00:00
mrg
a375e7c55a fix much of the interrupt mapping/establishment code. still does
not yet work, but we are now seeing spurious interrupts (that should
be mapped to some handler..)
2008-12-13 08:07:23 +00:00
mrg
f4cdd8a3bc remove unused variable. 2008-12-13 05:54:57 +00:00
alc
0a5dd2a285 Restore a valid call to ath_hal_wait() and wrap the if() statement with curly bracket.
Fix build wrt the original HAL, prevent the next call to OS_REG_WRITE() to be skipped
if HALDEBUG() is not defined.

pointed out by <sam>
2008-12-13 05:16:28 +00:00
mrg
6a475604d6 - enable schizo_dmamap_create() after fixing it
- clean up some debug code
- remove unused schizo_intr_map()
- setup our iommu state properly
- for now, implement a 'struct schizo_iommureg' and use it in schizo.
  XXX this should be merged with iommu*

interrupts are still not working but we get to scsi probe now.
2008-12-13 04:56:32 +00:00
mrg
5fe53803ec DPRINTF() the new protection in sparc_bus_map() 2008-12-13 04:53:09 +00:00
dholland
2adcd1a3c2 Don't deadlock on rename("foo/foo", "foo") in the case where foo/foo is a
directory. This doesn't affect non-wapbl renames; it affects wapbl because
one of the lock acquisitions was moved up past where this case otherwise
fails.

PR 40163 from Lloyd Parkes.
2008-12-13 04:45:28 +00:00
mrg
223aed87aa if the "interrupt-map-mask" property is larger than the static 100 int
array, dynamically allocate the desired size and try again.

fixes crashes in OF_mapintr() when there are 102 entries.
2008-12-13 04:44:38 +00:00
isaki
b3a08741f8 Fix a broken 'Front power switch' signal.
Use softint(9), instead of using psignal(9) in
hardware interrupt.  Thanks to soda-san.
2008-12-13 02:49:10 +00:00
njoly
6b9fe0233d Regen for clock_nanosleep. 2008-12-12 23:38:13 +00:00
njoly
99688b74d2 Add clock_nanosleep syscall. 2008-12-12 23:36:18 +00:00
christos
c8164f5d15 RTAX_GENMASK and RTAX_AUTHOR could cause kernel memory corruption because
info struct members could be pointing to free'd memory. Fix from dyoung.
XXX: Pullup to 5.0
2008-12-12 22:34:58 +00:00
alc
c3d9f7dbb1 Don't display the global kernel symbol `version' but the *eeprom* version, as done in the original code. 2008-12-12 21:31:49 +00:00
cegger
9d34af294b make i386 ALL kernel compile 2008-12-12 21:01:59 +00:00
macallan
25f1a62f67 some cleanup, add shadowfb support 2008-12-12 18:52:40 +00:00
macallan
2a1ee97a2a device_t-ify 2008-12-12 18:50:13 +00:00
macallan
fc934dfa9a fix stride value returned by /dev/fb 2008-12-12 18:48:25 +00:00
pooka
0d12ba9def Add a few MD ifdefs into the rump pmap stubs to enable us to get
rid of the local pmap.h and unify the pmap ABI with the kernel.
(XXX: compiles but doesn't work on vax)

Thanks once again to Greg Oster for helping with testbuilds.
2008-12-12 18:46:43 +00:00
macallan
20dab5963b device_t-ify 2008-12-12 18:46:41 +00:00
macallan
39ebde40e1 device_t-ification 2008-12-12 18:39:55 +00:00
macallan
302ae8fed9 add display type for Fujitsu AG-10e (oops) 2008-12-12 18:35:12 +00:00
pooka
e27fd72e89 this header needs machine/cpuset.h 2008-12-12 18:16:58 +00:00
matt
1cb076635d Fix merge botch from april... 2008-12-12 18:13:55 +00:00
matt
ce637ca878 CFATTACH_DECL -> CFATTACH_DECL_NEW 2008-12-12 17:36:14 +00:00
tonnerre
3fd167219b Remove { 0, 0 } from the list of u3g devices. This entry is no longer
required in modern device lists due to sizeof() tricks. However, keeping
it makes u3g attach to HP ServerWorks mice and keyboards.
2008-12-12 07:49:46 +00:00
jmorse
beb501f394 PR#39651
Fix two problems in umass:
 * usb xfers being freed before being removed from pipe, leading to null deref
 * config_activate requests not supported, which leads to config_deactivate requests not being passed through. Spotted by jmcneill@

Added mechanism to usbdi allowing the default pipe to be aborted
2008-12-12 05:35:11 +00:00
alc
0107bf153f include standard HAL option.
Fix build breaks reported by Paul Goyette on current-users@
2008-12-12 03:28:57 +00:00
pooka
58742275be rcs id police 2008-12-11 19:33:12 +00:00
pooka
ea4b11acd2 Since oea pmap.c is #included many times, put kernel_pmap_ptr into
its own source module to avoid multiple initialized data definitions.
2008-12-11 19:30:14 +00:00
hauke
b44c2acbc7 I tested spif(4) in an Ultra 1 - enable it. 2008-12-11 17:18:03 +00:00
pooka
0e6117b96f Apparently some ports rely on cpu.h including machine/pcb.h. 2008-12-11 16:25:23 +00:00
hauke
b8c03f733b Fix warning about missing initializer that showed up in sparc64
builds, but, strangely enough, not in sparc builds.

Relevant for netbsd-{4,5} release branches.
2008-12-11 15:50:35 +00:00
nakayama
383cacb3c5 Revert previous.
This file is included after std.sparc64, so no need to include Atheros HAL
options in this file.
2008-12-11 15:11:57 +00:00
alc
26688c3395 Add HAL standard option and file list.
I forgot to `cvs add' them :).
2008-12-11 14:11:43 +00:00
mrg
2c4ff71b65 also attach if the "compatible" property matches, as seen on sb2000. 2008-12-11 07:09:00 +00:00
alc
a4c7f1185e Doh! What should have happened happens ...
Restore the check to see if the chip does MIC correctly when
WME is turned on. Btw, define IEEE80211_C_WME_TKIPMIC and fix build :/
2008-12-11 06:04:01 +00:00
alc
5d561f943e Sync ath(4) with the new HAL, mostly based on <jmcneill>'s patches.
Everything should be fine again !
2008-12-11 05:45:29 +00:00
alc
1c52cf4c6b Import config(9) file and register HAL's files in the build machinery. 2008-12-11 05:42:18 +00:00
alc
b297f5e6b5 Import HAL's OS dependent code and config(9)'s interface header. 2008-12-11 05:37:40 +00:00
alc
a9d4fb0bb4 Fix the build of the new HAL:
- constify link-set iterator
 - do RF lookup only if any RF has been built
 - fix global symbols shadowing
 - const static -> static const
 - don't redefine `uintptr_t'
 - use `unsigned long' in __DECONST()
 - fix AH_RF() macros
 - __va_list -> va_list
 - add missing struct trailing element
 - add a few #ifdef AH_DEBUG block to avoid empty if() statement
 - some other nits...
2008-12-11 05:30:29 +00:00
alc
31f44cb2ed Clean-up makefile stub used to include in the build the binary HAL object 2008-12-11 05:27:42 +00:00
alc
2a56be2e0d Delete the old binary Atheros HAL
Expect the tree to be broken in the next few minutes.
2008-12-11 05:24:49 +00:00
alc
1e10b93de9 Import Atheros HAL, from FreeBSD (revision 185521) 2008-12-11 04:46:22 +00:00
kenh
95793981bc The wrong sense of the UIP register is used to test for a pending clock
update; this test is now correct.

mc146818_settime_ymdhms has been refactored to simply stop clock updates
while the time is being set.  Based on FreeBSD code and macros in
mc146868reg.h.
2008-12-11 00:17:21 +00:00
alc
146b5c4e87 Add the __printflike(), __scanflike() and __format_arg() macros, from FreeBSD
They will be used soon by the Atheros HAL code, many other places can use them
to avoid GCC dependency.
2008-12-10 22:10:47 +00:00
pooka
7243af74cb Make non-mpsafe threads KERNEL_LOCK() before starting execution. 2008-12-10 18:47:01 +00:00
christos
15e362cca8 fix endif comment 2008-12-10 18:07:30 +00:00
christos
0bff293dd2 disable VMEM_DEBUG by default. 2008-12-10 17:32:32 +00:00
tsutsui
f1f16fdb45 Prepare kernel_pmap_ptr as well as other m68k ports which have own pmap.c. 2008-12-10 17:13:53 +00:00
tsutsui
cf4bdf5d25 Restore kernel_pmap_store declaration since it's still used by
most m68k ports in pmap_bootstrap.c.
2008-12-10 17:12:07 +00:00
christos
10fdeaec16 vmem_check_sanity is just too expensive for DEBUG. Enable it only for
VMEM_DEBUG.
2008-12-10 16:59:12 +00:00
christos
453b04f5be fix PGTBL size detection on the intel 965GM. From Anon Ymous. 2008-12-10 15:48:49 +00:00
pooka
37e12a5643 Make kernel biglock recursecount volatile. 2008-12-10 14:55:25 +00:00
tsutsui
7ceeb68913 Account idepth in functions in locore.s that are registered in the
interrupt vector table so that we don't have to track all interrupt paths.
2008-12-10 14:19:02 +00:00
nakayama
2b44f16453 pci_make_tag:
- add assertion for checking spc_busnode initialization.
2008-12-10 12:53:49 +00:00
nakayama
d0b5890006 Add initialization of spc_busmax and spc_busnode in sparc_pci_chipset. 2008-12-10 12:17:02 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
martin
6a9af1aef4 Backout previous - Matt, you probably did a partial update and didn't
pick up the sys/uvm changes.
2008-12-10 09:35:02 +00:00
mrg
595a2e556e revert part of the previous. 2008-12-10 07:12:09 +00:00
mrg
99caaf2dd2 checkpoint my work-in-progress port of this driver.
it boots some way but will crash attaching rtc0.

known TODO items:
- figure out why BUS_SPACE_MAP_LINEAR mappings generate data errors
  (cause of the rtc issue)
- several interrupt issues
2008-12-10 05:56:22 +00:00
mrg
e8f7f45249 import the original openbsd "schizo" PCI driver as found on US-III systems. 2008-12-10 05:26:27 +00:00
mrg
6f91da5c30 fix sparc64 build: provide pmap_kernel(), re-provide pmap_t.
fixes builds for my U60.
2008-12-10 04:23:11 +00:00
mrg
938a858117 clean up and use __func__ in sparc_bus_map() debug messages. 2008-12-10 03:36:22 +00:00
mrg
1d6b36aa0d ofpci_make_tag():
don't write PCI_COMMAND_STATUS_REG with
	PCI_COMMAND_(MEM|MASTER|IO)_ENABLE, or it in.
sparc_pci_childspace():
	move psycho.c:get_childspace() into pci_machdep.c but rename it
psycho_alloc_bus_tag():
	use M_ZERO
2008-12-10 03:31:51 +00:00
pooka
223c62813a In case of no _KERNEL_OPT, always define _PMAP_MAY_USE_PROM_CONSOLE 2008-12-09 23:05:25 +00:00
martin
f915c7039b Get rid of get_maxctx() - it doesn't work on newer cpus and we will have
to find a better way for (some) sun4v machines - all sun4u use 13 bit
contexts anyway.
2008-12-09 21:01:02 +00:00
pooka
72b415fb6e 5.99.5: pmap_kernel() unified 2008-12-09 20:48:52 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
reinoud
cadb068686 Fix two buf_init()'s that are not needed since they were already initialised
by getiobuf().

Also remove ancient IPL_BIO reference from the time it was called from
interrupt context instead of the current soft interrupt.
2008-12-09 17:17:02 +00:00
christos
6d2637b2f4 Allow parsing more than one command line switch. From anon ymous. 2008-12-09 15:38:52 +00:00
tsutsui
5352126149 Sync with src/sys/arch/amiga/dev/siop.c rev 1.59:
> Deal with unrecognized SCSI message byte - restart script to clear the
> ACK.  No longer hangs the driver when an unhandled message byte is seen.
2008-12-09 14:11:11 +00:00
nakayama
b1a235dedb Sync PCMCIA and CardBus devices with i386/conf/GENERIC. 2008-12-09 13:16:22 +00:00
nakayama
e4c05fb61e Fix CardBus, PCI-PCI bridge support borked in previous commit. 2008-12-09 13:14:38 +00:00
njoly
26a5edd122 Add some padding members to linux_msqid64_ds for 32-bit archs. This
fix msgctl(2) IPC_STAT|IPC_64 calls, at least, on i386.
2008-12-09 11:09:11 +00:00
cegger
33d827105a vmem_check_sanity: refactor overlapping check for better readability.
Move use of vmem_check_sanity into locked sections. Pointed out by ad@
2008-12-09 07:54:59 +00:00
mhitch
58d3184539 Deal with unrecognized SCSI message byte - restart script to clear the
ACK.  No longer hangs the driver when an unhandled message byte is seen.
2008-12-08 22:05:13 +00:00
dyoung
ce732c2d14 Distinguish the NetMos NM9845 Quad UART chip from the NetMos NM9845
Quad UART + One Parallel chip.
2008-12-08 19:32:39 +00:00
dyoung
466fdf18f2 Add elanpex(4) and elanpar(4), commented out. Add some useful
CardBus / PCI / PCMCIA NICs, hifn, and the OpenCrypto framework.
2008-12-08 19:27:50 +00:00
tron
e123b7f433 Force the nVidia nForce 630i MCP73 to attach to ahcisata(4) as well.
It would otherwise attach to pciide(4) and use PIO mode.

Patch submitted by Bernhard Moellemann in PR kern/40134.
2008-12-08 15:35:23 +00:00
pooka
6a5161dfcb Remove rump cpu_counter.h in favour of the arch native one. I'm
sure there was a reason why I originally added this, but I can't
find what would break without it now.  If something does pop up,
I'll fix it properly this time instead of adding silly headers.
2008-12-08 13:31:58 +00:00
pooka
316be31a2e Instead of punishing all archs for a fake vmparam.h, punish only
evbppc for its insolence and pick a ppc cpu family at random in
Makefile.rump.
2008-12-08 12:57:33 +00:00
njoly
84ab0cee9a s/SYSVIPC/SYSVMSG/, for message queues support. 2008-12-08 12:56:00 +00:00
njoly
bd398db254 Remove unused timeval_to_clock_t function, superseeded by CONVTCK
macro.
2008-12-08 11:52:35 +00:00
pooka
d34f27b620 Decode write access advice and pass to uvm (not that it's handled
there, but ...).
2008-12-08 11:48:03 +00:00
pooka
5297d2febf Don't even try to pretend WAPBL_DEBUG_INODES works here, just #error. 2008-12-08 11:37:37 +00:00
pooka
836c2144d0 Remove no longer valid comment (which probably didn't even say what
it wanted to say in the first place).
2008-12-08 11:34:30 +00:00
pooka
37e35e961c Warn about large struct on stack in comment. 2008-12-08 11:23:39 +00:00
njoly
218ea1fa05 Add R_X86_64_32 relocation support, which enable loading modules with
debugging information. And ensure that addr is not null before using
it.

From ad@, thanks.
2008-12-08 08:41:36 +00:00
alc
8c6c22b7f1 Add support for a 8168C/8111C revision
- also disable jumbo frame on this adapter following the FreeBSD driver
 - merge redundant call to aprint_error_dev
2008-12-08 03:24:08 +00:00
cegger
4dfe7b7870 ddb: make show vmem print exact span type
vmem_check_sanity: print exact span type
vmem_add1: KASSERT span types
2008-12-07 22:39:01 +00:00
mrg
f757554046 a few clean up/rearrange changes, somewhat inspired from openbsd's
schizo.c:

- rename pp_busnode{} -> spc_busnode{}, and move it to
  sparc_pci_chipset{}

- move public pci functions pci_conf_read(), pci_conf_write() and
  pci_intr_establish() into psycho.c, renaming them in the process,
  and add pointers through sparc_pci_chipset{} to access them.
  as part of this, add PDB_INTMAP and PDB_CONF debug options to
  psycho.c

- move and rename sparc64 private pci_find_ino() into
  sparc_pci_chipset{}, like the above

- update psycho_alloc_chipset() to set the new 4 function members


no functional change intended.  XXX: not tested on cardbus.
2008-12-07 21:03:57 +00:00
pooka
54b9426187 Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.
2008-12-07 20:58:46 +00:00
hannken
59f928fb25 ffs_copyonwrite(): Only use si_snapblklist if it is already allocated.
ffs_snapshot_read(): Use IO_ALTSEMANTICS to allow reading a snapshot vnode
                     beyond file system size.  Needed to read the snapblklist
                     on mount.

Persistent snapshots work again.

Should fix PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 19:51:07 +00:00
hannken
8e313cc27b Revert previous -- ALL reads are from kernel space.
Still open: PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 18:55:58 +00:00
cegger
f001f650d6 make this compile with MALLOC_DEBUG but w/o DEBUG 2008-12-07 14:24:28 +00:00
cegger
f132fda3fe vmem_check_sanity: fix check to correctly detect even exactly duplicate spans. 2008-12-07 11:49:51 +00:00
ad
7ab182873b Add cpu_softintr_p() for assertions 2008-12-07 11:40:53 +00:00
mlelstv
1f5b658b8a Handle printing of _STR attribute with non-string data type gracefully. 2008-12-07 10:53:57 +00:00
hannken
7dbaf06e71 ffs_copyonwrite(): Only use si_snapblklist if it is already allocated.
ffs_snapshot_read(): Allow the kernel to read beyond file system size.

Persistent snapshots work again.

Should fix PR kern/37425: fss_snapshot_mount panic during fsck.
2008-12-07 10:01:09 +00:00
cegger
bb1d17f443 build fix: make i386 build again 2008-12-07 09:40:42 +00:00
mrg
a736f00a1c look for "portid" as well as "upa-portid", as seen on schizo. 2008-12-07 08:59:31 +00:00
mrg
4df93f9197 add INTMAP_IGN_SHIFT and INTIGN() macros for schizo support (from openbsd) 2008-12-07 08:56:10 +00:00
tsutsui
c6acb16540 Remove duplicated options FONT_GALLANT12x22. 2008-12-07 08:26:02 +00:00
tsutsui
6bebd690e9 Fix attach messages. (extra colons, misplaced newline etc.) 2008-12-07 08:24:26 +00:00
matt
5ef4b69613 Roundup to next megabyte and subtract 0xc0000000 2008-12-07 07:27:27 +00:00
matt
a7b983bf92 Map all of the kernel. 2008-12-07 07:15:03 +00:00
mhitch
b11961451a Fix timecounters using interval timers: amiga counters are not 32 bits,
so the tc_counter_mask needs to be set based on the interval timer.
Process cpu usage was returning negative or very large values.
2008-12-07 03:48:43 +00:00
cegger
2aa8aa0f8f Spans may never overlap. Overlapping spans mean memory corruption
when used by kmem(9), for example.
Do sanity checks to detect such spans on DEBUG kernels.
2008-12-07 02:21:04 +00:00
cegger
10de0e2b14 ddb: new 'show vmem' and 'show all vmems' commands.
Useful to inspect vmem(9) structures.
2008-12-07 00:51:15 +00:00
njoly
adf5b0a542 Regen for netbsd32_caddr_t removal. 2008-12-06 23:15:09 +00:00
njoly
e7377ec502 Cleanup; kill netbsd32_caddr_t use. 2008-12-06 23:14:03 +00:00
njoly
9321a67e19 Small setres{uid,gid} cleanup; there is no need to use a specific
handling for -1 uid values.
2008-12-06 23:01:32 +00:00
ober
dd55503e8f Initial APM support for Zaurus. Ported from OpenBSD by mjf@. 2008-12-06 22:12:36 +00:00
ober
23b6d86d41 Initial APM support for Zaurus. Ported from OpenBSD by mjf@ 2008-12-06 22:11:19 +00:00
ober
bcc03ff7a7 Initial apm support for Zaurus. Ported from OpenBSD by mjf@. 2008-12-06 22:10:41 +00:00
joerg
9a364d2ed3 Split ffs_freefile into a frontend for normal cylinder group and for
snapshot use. Adjust ffs_blkfree_common to get the fs instance passed
in, the original commit didn't account blocks in the snapshots
correctly. Assert that ffs_blkfree is used with the primary fs instance
and that ffs_checkfreefile is only used for snapshots. Move the bdwrite
from ffs_blkfree_common into the caller for symmetry. This creates a
redundant write of unmodified data for ffs_blkfree_snap if a double free
of a block happens.

Reviewed and tested by hannken@.
2008-12-06 20:05:55 +00:00
reinoud
ab146a4768 UDF_SHED_FREE state is now also handled by the state machine, so DO signal it.
Free'd up ecclines can now far more quicker be recycled.
2008-12-06 14:02:08 +00:00
cliff
41bfa2c41d add gemini pseudo-nic and support code. 2008-12-06 05:22:39 +00:00
njoly
14e966b9e0 Regen for getres{uid,gid} syscalls. 2008-12-05 23:31:54 +00:00
njoly
533a52241a Add getres{uid,gid} syscalls. 2008-12-05 23:30:19 +00:00
ad
e91b9bcc27 Make the fake ELF object work with gdb.
- Output a .bss section and make all the symbols relative to it, instead
  of making them absolute.
- Output a single load section, no need for two.

'gdb /dev/ksyms' still doesn't work because ksyms doesn't do mmap yet.
2008-12-05 21:38:10 +00:00
dyoung
20baa33fe2 In wddetach(), avoid a crash by destroying the callout sc_restart_ch. 2008-12-05 18:20:19 +00:00
reinoud
9b08c3c516 Two fold commit:
1) Enhance write speed significantly on RMW media like CD-RW, DVD-RW but also
on the DVD+RW and all other ECC blocked media. Significant speedups of access
to the device for say compilation on the DVD. Streaming copy is also still at
maximum speed though vast amounts of directory copy work can show side effects
that appear it to slow down but are actually logical when you consider that
most small files are embedded into the descriptors itself.

2) explicit wait for the created RMW thread to spinup
2008-12-05 13:19:42 +00:00
isaki
3cffa23a3e Use TAILQ_* macros. 2008-12-05 13:14:42 +00:00
ad
0ff35ddc5a - Fix a bug in amd64 rw_tryenter() where it could return failure even after
acquiring a lock, if aligned on a 4GB boundary.

- Microoptimize more.
2008-12-05 13:08:11 +00:00
ad
3c9eb3fb0f zfs needs block devices too, for zvol. 2008-12-05 13:06:50 +00:00
ad
49e50a21d6 PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)
Add a layerfs module.
2008-12-05 13:05:37 +00:00
ad
8ff4eb83a8 Back out revision 1.35 which is no longer necessary and causes the system
to try autounloading modules perpetually.
2008-12-05 12:55:09 +00:00
ad
6efc20038a PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there) 2008-12-05 12:51:17 +00:00
jdc
5c7dd34e28 Add wscons/vcons support for bw2 (sbus and P4). 2008-12-05 11:52:42 +00:00
tsutsui
48640c6ca2 Wrap long lines. 2008-12-05 11:17:38 +00:00
he
3e2feea4e5 Ksyms are optional, so make the call to ksyms_init() dependent
on the same conditionals which are defined in sys/conf/files.
2008-12-04 23:18:13 +00:00
macallan
68e46d4066 actually call cpu_model_init()
This might be enough to get 601-based boxes going
2008-12-04 23:17:47 +00:00
jym
bf8f00a835 Clean up code. No functional changes intended.
Reviewed by bouyer@.
2008-12-04 20:56:57 +00:00
alc
0976fc9588 Fix regression introducted by the previous commit.
i915 and G33 Intel chipset family need special handling when writing an entry
to the GTT.

reported by: <tnn> [0]
tested by: <tnn>

[0]: http://mail-index.netbsd.org/tech-x11/2008/12/03/msg000276.html
2008-12-04 19:07:35 +00:00
cegger
9db965667a Fix the fix: Only AMD K8 Rev-G on AM2 sockets are impacted. 2008-12-04 18:54:24 +00:00
cegger
72f1a5aa7a On AMD K8 CPUs with Socket AM2, sensor normalization is off by 21C degree.
Adjust temperature calculation. This should fix strange temperatures on AMD K8
CPUs reported by many people.
2008-12-04 18:45:04 +00:00
tsutsui
f345c7c20a Don't pass uint8_t values to le16toh() in fxp_rx_hwcksum().
fxp(4)'s RX hwcksum results weren't used at all on big endian machines.

Checked by i82550 and vmstat -ev on macppc GENERIC kernel with
options INET_CSUM_COUNTERS,TCP_CSUM_COUNTERS,UDP_CSUM_COUNTERS.
2008-12-04 16:40:47 +00:00
tsutsui
0ef29d0844 Add a missed htole32() on the previous ip4csum-tx bug workaround. 2008-12-04 16:32:34 +00:00
tsutsui
2377d7c38d Sort Tx/Rx macro in previous. 2008-12-04 15:22:01 +00:00