Commit Graph

1328 Commits

Author SHA1 Message Date
dyoung 24e681f5cd Implement bus_space_tag_create() and _destroy().
Factor bus_space_reserve(), bus_space_release(), et cetera out of
bus_space_alloc(), bus_space_map(), bus_space_free(), bus_space_unmap(),
et cetera.

For i386 and amd64, activate the use of <machine/bus_defs.h> and
<machine/bus_funcs.h> by #defining __HAVE_NEW_STYLE_BUS_H in
their respective types.h.  While I'm here, remove unnecessary
__HAVE_DEVICE_REGISTER #defines.
2011-07-06 18:46:04 +00:00
yamt 03e0d01e97 unrelax an assertion 2011-07-05 14:07:12 +00:00
mrg 899d666939 insert some (uintptr_t) between some casts involving pointer to int.
(they already had casts for the pointer.)
2011-07-02 13:09:31 +00:00
dyoung 391925c74f #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 18:21:31 +00:00
dyoung 59adf08e17 Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet.  Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
2011-07-01 17:09:58 +00:00
yamt 90a297503a pmap_map_ptes: fix a bug introduced by rmind-uvmplock merge 2011-06-24 01:39:41 +00:00
rmind aade7fc010 pmap_map_ptes: use cpu_load_pmap() to handle i386 PAE case.
Spotted by cherry@
2011-06-23 16:25:09 +00:00
jruoho 849fd36f5e Fix bug pointed out by njoly@. 2011-06-23 08:10:35 +00:00
jruoho 1adfb1b50e Add small comment. 2011-06-22 09:28:08 +00:00
jruoho 4fb79b4e25 Get rid of RUN_ONCE(9). Should fix PR # kern/44043. 2011-06-22 08:49:54 +00:00
pgoyette ee17befd6c Initialize sensor state before registering. 2011-06-20 17:07:21 +00:00
jruoho 0301c37913 Use acpi_match_cpu_handle() from acpi_util.c and only evaluate
the _PDC control method for CPUs that are enabled in the MADT.
2011-06-20 15:39:54 +00:00
pgoyette f9d2d0003e Inialize sensor state before registering. 2011-06-20 15:01:30 +00:00
rmind e43016c1ed pmap_page_remove: perform TLB shootdown, as it is not caller's responsibility
to perform pmap_update() according to the interface.  Might want to revisit.

Should fix recently reported tmpfs problems.  Thanks to enami@ and hannken@!
2011-06-18 21:18:20 +00:00
rmind 06b5aba5f8 Few XEN fixes:
- cpu_load_pmap: perform tlbflush() after xen_set_user_pgd().
- xen_pmap_bootstrap: perform xpq_queue_tlb_flush() in the end.
- pmap_tlb_shootdown: do not check PG_G for Xen.
2011-06-15 20:50:02 +00:00
jruoho ced73275c5 Modularize hpet(4). Works nicely with the multiple bus locations. 2011-06-15 08:19:43 +00:00
jruoho d762059910 Factor out hpet(4) from ichlpcib(4). 2011-06-15 06:43:20 +00:00
jruoho 0c1ae21bb3 Use defined constants. 2011-06-15 04:52:52 +00:00
jruoho e0d3725369 Add detach function for hpet(4) at amdpcib(4). 2011-06-15 04:20:47 +00:00
jruoho 3bd1efebe2 Small cleanup; use KM_SLEEP, wrap long lines, etc. No functional change. 2011-06-15 03:30:15 +00:00
jruoho c6e5cf85e6 Modularize amdtemp(4). 2011-06-15 03:22:39 +00:00
tls ceba797a83 Fix Xen kernel builds (pmap_is_curpmap can't be static) 2011-06-13 04:30:40 +00:00
jruoho 2ef5adcc96 Follow IA-64 with the x86-specific ACPI MD functions and move these where
they belong to. Remove an unused function. Minor KNF. No functional change.
2011-06-12 11:31:30 +00:00
jruoho 0fc4e4ab7e Move the evaluation of the _PDC control method out from the acpicpu(4)
driver to the main acpi(4) stack. Follow Linux and evaluate it early.
Should fix PR port-amd64/42895, possibly also PR kern/42583, and many
other comparable bugs.

A common sense explanation is that Intel supplies additional CPU tables to
OEMs. BIOS writers do not bother to modify their DSDTs, but instead load
these extra tables dynamically as secondary SSDT tables. The actual Load()
happens when the _PDC method is invoked, and thus namespace errors occur
when the CPU-specific ACPI methods are not yet present but referenced in the
AML by various drivers, including, but not limited to, acpitz(4).
2011-06-12 10:11:52 +00:00
rmind e225b7bd09 Welcome to 5.99.53! Merge rmind-uvmplock branch:
- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.
2011-06-12 03:35:36 +00:00
msaitoh 4ad86a183a Rename to use PCI_PRODUCT_INTEL_82801DBM_LPC 2011-06-06 14:33:31 +00:00
jruoho 33432cfc01 When getting the frequency, use APERF/MPERF as a fallback method. 2011-06-06 07:42:32 +00:00
dyoung 0840f9ccfc Don't use the C preprocessor to configure USERCONF. Instead, either do
or do not link in subr_userconf.c and x86_userconf.c.

Provide no-op stubs for userconf_bootinfo(), userconf_init(), and
userconf_prompt().

Delete all occurrences of #include "opt_userconf.h" as well as USERCONF
and __HAVE_USERCONF_BOOTINFO #ifdef'age.
2011-05-31 23:28:52 +00:00
jruoho be0f34db1d Remove the sanity check that tested the internal consistency of the "FID/VID
algorithm" used by K8. Tested by cegger@. The check is still included in the
original powernow(4) (where possible failures have probably gone unnoticed
because the driver is less noisy).
2011-05-31 14:45:36 +00:00
para 2f1f53a009 typo in comment 2011-05-26 16:38:57 +00:00
para 096446fa2f put userconf_bootinfo under option USERCONF, to allow kernels without that option 2011-05-26 16:29:13 +00:00
uebayasi dcf649145a Support userconf(4) command in boot(8)/boot.cfg(5) on i386/amd64.
From jmmv@, no objections seen in the proposed thread:

	http://mail-index.netbsd.org/tech-kern/2009/01/22/msg004081.html
2011-05-26 04:25:26 +00:00
drochner 9f36e7657e move the "context size" struct member (which is a pure software
implementation thing) from the abstract xform descriptor to
the cryptosoft implementation part -- for sanity, and now clients
of opencrypto don't depend on headers of cipher implementations anymore
2011-05-24 18:59:21 +00:00
christos 83b36637a6 remove _ 2011-05-22 16:01:43 +00:00
joerg 316b3ac0de LLVM's assembler parser doesn't support .code32 yet, so disable it as
needed.
2011-05-20 13:11:40 +00:00
drochner d999ae2d7d remove stale declarations / empty function 2011-05-18 12:53:04 +00:00
dyoung a6b2b8396b PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED changed their functional
role in NetBSD (drivers are no longer supposed to write these to
pa_flags) without changing name.  Correct that.

Rename PCI_FLAGS_IO_ENABLED to PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_ENABLED to PCI_FLAGS_MEM_OKAY, thus making their names
consistent with the other PCI flags and poisoning 3rd-party driver
sources that use the flags in the old bad way.

This patch produces no binary changes in this set of PCI kernels when
they are compiled w/o 'options DIAGNOSTIC' and w/ -V MKREPRO=yes:

algor P4032 P5064 P6032
alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE
evbarm-el GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321
evbarm-el IXDP425 IXM1200 KUROBOX_PRO
evbarm-el LUBBOCK MARVELL_NAS NAPPI NSLU2 SHEEVAPLUG SMDK2800 TEAMASA_NPWR
evbarm-el TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
evbppc OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
iyonix GENERIC
landisk GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sbmips-el GENERIC
sgimips GENERIC32_IP2x GENERIC32_IP3x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC
2011-05-17 17:34:47 +00:00
jym f0672645f9 Do as the comment says, use ilog2(). This gets optimized directly at
compile time, no call to fls() is needed.
2011-05-07 23:59:13 +00:00
jym 23cf76057e - Rather use pmap_pte_set() when modifying a PTE.
- Call pmap_pte_flush() when issuing PTE modifications. While it is a NOOP
for native x86, it is not for Xen. It will flush all operations that are
possibly waiting in the queue, like xpq_queue_pte_update(). Do it for
each level, this function is only called at boot time and is not
performance critical.

While here:
- No need to cast early_zerop to void with memset().
- Move common variables out of the #ifdef's.
- KNF
2011-05-01 18:52:29 +00:00
christos 6604c82010 add a define for pcb_sp 2011-04-30 16:58:35 +00:00
plunky 0be28cead8 drop 'inline' here, to avoid C99 vs GNU differences 2011-04-27 07:42:11 +00:00
yamt aba9023af0 comment 2011-04-25 22:24:36 +00:00
yamt 792bcb515e remove unused ptei 2011-04-25 22:24:00 +00:00
enami d944227fe6 lwpaddr is a boolean variable and thus doesn't hold an address of lwp.
Compare with correct value so that tr/t works again on current procecss.
2011-04-21 00:24:07 +00:00
yamt 35b7a20bf6 don't bother to register kernel ptp to uvm_object. from yamt-vmem branch. 2011-04-14 16:00:21 +00:00
mrg a8fdd2914b move the include sys/types.h xor stdbool.h to the top of the file,
so that "bool" will be present when used later in the file.
2011-04-13 06:29:30 +00:00
mrg 07a98cd33f obsolete DB_AOUT_SYMBOLS. however, we need to leave most of the code
in db_sym.[ch] as it is used by the elf version of crash(8).

i will be cleaning up the db_sym.c code in a follow up commit to avoid
having dead code compiled.
2011-04-11 04:22:30 +00:00
christos 7e80a5d1f8 something ate my / 2011-04-10 20:38:37 +00:00
christos a640264e31 Merge db_trace for x86. From: Vladimir Kirillov proger at wilab dot org dot ua 2011-04-10 20:36:48 +00:00
pgoyette 6f2c337e45 If an ioapic doesn't really exist, don't add it to internal tables.
This is what other xxxBSDs seem to do in similar circumstances.

Addresses my PR kern/43568

OK jruoho@ in private Email
2011-04-05 13:43:33 +00:00