Commit Graph

104438 Commits

Author SHA1 Message Date
joerg
7780b0a4a4 Add functions for replacing runtime invariant 32bit unsigned divisions
with simpler full width multiplications and shifts + adds. The main
operations are generally at least 50% faster when serialised and often
better for parallelism as well.
2010-03-19 16:48:55 +00:00
tsutsui
8058413106 Replace some magic numbers with macro. Tested on SMC_TT on atari. 2010-03-19 15:59:22 +00:00
tsutsui
3b71237085 Misc KNF. 2010-03-19 14:57:52 +00:00
tsutsui
e875fdc857 No need to override mem_ring value in ne2000_ipkdb_attach()
since a wrong calculation in dp8390_ipkdb_attach() was fixed.
2010-03-19 14:26:37 +00:00
tsutsui
829582d74c ANSI'fy, misc KNF. 2010-03-19 14:20:56 +00:00
tsutsui
65fc75c7f3 u_intN_t -> uintN_t 2010-03-19 10:54:00 +00:00
tsutsui
60ea12aae5 bus_space_write_region_N() should also take a const buffer. 2010-03-19 10:45:09 +00:00
he
b7401550b9 Constify the buffer pointer argument of the _bus_space_write_multi_<n>
inline functions, so that this builds again.  (Otherwise, ne2000.c driver
would now fail to build.)
2010-03-19 08:28:44 +00:00
skrll
6fdbb020e1 Fix PMAPDEBUG build for previous. 2010-03-19 07:35:29 +00:00
skrll
dfb62ec228 Not all PA CPUs have the U-bit (uncacheable) for non-IO memory. In fact
most don't.  Deal with non-equivalent aliases by removing and flushing the
managed mappings, and flushing the unmanaged mappings.

When flushing caches/TLB flush the cache before purging the TLB just in
case the flush enters the mapping into the TLB.
2010-03-19 07:29:44 +00:00
cnst
deaf16ef51 Remove aiboost(4) as obsolete and redundant since the introduction of aibs(4).
http://mail-index.netbsd.org/tech-kern/2010/03/06/msg007458.html

Reviewed by <pgoyette>, <cegger>, <jruoho>, <tech-kern>.
2010-03-19 04:04:27 +00:00
pgoyette
3a92a7609d Modify previous commit. The routine to deliver events is intended to be
exported to device drivers, so rename it and move the declaration to
<dev/sysmon/sysmonvar.h>
2010-03-19 02:19:13 +00:00
cnst
291f4cc576 support W83667HG (0xa5) in wbsio(4); its hw mon is already supported by lm(4) as W83627DHG (0xc1) 2010-03-19 02:17:41 +00:00
dyoung
d2f2daad71 Remove superfluous cast (device_t to device_t). 2010-03-19 01:44:05 +00:00
dyoung
f4de9422d8 Use Cardbus_intr_disestablish() instead of cardbus_intr_disestablish().
Get rid of a (short) staircase in ex_cardbus_detach().
2010-03-19 01:34:46 +00:00
dyoung
cc222cba88 Don't pick up the network-interface, ethernet, and 802.11-related
definitions by chance (or by the bus-specific front-end #including them!).
#include them here, instead.
2010-03-19 01:32:30 +00:00
dyoung
1d4183c115 Don't pick up the <sys/sysctl.h> definitions by chance,
but #include here.
2010-03-19 01:31:11 +00:00
pgoyette
4e3cadf247 Separate event delivery from polling and limit evaluation in
sme_events_worker().

Provide a wrapper that can be called from sensor drivers' interrupt
routines to find and deliver a specific event.

XXX Actually updating sensor drivers (and their parent devices) to
XXX have interrupts is a future enhancement.  This is simply an
XXX enabler.
2010-03-19 01:16:44 +00:00
dholland
e41c20ba61 grammar patrol 2010-03-18 22:25:51 +00:00
dyoung
d75450ce8b This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:54:56 +00:00
dyoung
8b504d80a5 Simplify interrupt (dis)establishment by two source transformations:
-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:52:43 +00:00
dyoung
3caa8a5650 This is *always* compiled with #define rbus 1, so get rid of the
conditional compilation.

Simplify interrupt (dis)establishment by two source transformations:

-       cardbus_intr_disestablish(cc, cf, ih);
+       Cardbus_intr_disestablish(ct, ih);

-       ih = cardbus_intr_establish(cc, cf, ...);
+       ih = Cardbus_intr_establish(ct, ...);

The identical change to a few other CardBus NICs has not caused any
problems, as expected, so I'm going to commit this rather safe change
and get on with the work.

Testers have been enlisted.  I will revisit this change if I get any
negative responses.
2010-03-18 20:51:42 +00:00
pooka
1c55854229 Print builtin "use -f" message only if not autoloading. Otherwise
it'll get spammy.

XXX: this should probably be printed iff the toplevel module is
not being autoloaded (i.e. there is a human to interpret the error).
Otherwise disabled dependencies give a misleading EPERM.
2010-03-18 18:25:45 +00:00
pooka
d76b630321 Never autounload builtin modules (they will never be autoloaded if disabled). 2010-03-18 17:33:18 +00:00
kiyohara
325b8e821a Support Plathome's OpenBlockS600. 2010-03-18 14:15:38 +00:00
kiyohara
b105a1867e Support PowerPC 405EX/EXr.
1. Add some new source and header files.
     (MAL(split) and RGMII(new) relations for EMAC)
  2. Create dcr4xx.h.  Its moved from dcr405gp.h.  Also remove dcr405xx.h.
  3. intr.c supports MULTIUIC with virtual-irq.  likes to oea.
     support 32-virq/128-hwirq.
  4. multiple emac support.
  5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
  6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
2010-03-18 13:58:38 +00:00
kiyohara
2692e2e238 Support PowerPC 405EX/EXr.
1. Add some new source and header files.
     (MAL(split) and RGMII(new) relations for EMAC)
  2. Create dcr4xx.h.  Its moved from dcr405gp.h.  Also remove dcr405xx.h.
  3. intr.c supports MULTIUIC with virtual-irq.  likes to oea.
     support 32-virq/128-hwirq.
  4. multiple emac support.
  5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx.
  6. WALNUT pci uses arch/powerpc/ibm4xx/pci/.
2010-03-18 13:47:04 +00:00
cegger
d03d022556 buildfix: invert comparison to get the 64bit defines by default.
Fixes 'i386/elf_machdep.h: No such file or directory error' when compiling
amd64 toolchain on OSX.
2010-03-18 08:28:33 +00:00
jruoho
2786f7261b Silence errors from the integer evaluations in case the objects are not found.
(This was too verbose even for ACPI_DEBUG.) Also fit the status messages to
one line during boot by using aprint_verbose() for extra information.
2010-03-17 20:29:32 +00:00
jruoho
ef2b6dd20b Print also the so-called "granularity" values when the _BIF is evaluated.
These refer to the smallest increment in capacity that the battery is
capable of measuring.
2010-03-17 11:07:59 +00:00
jruoho
dce0020d0c Remove the technology "sensor" (a fixed constant). Report this information
in an improved output when the battery information changes (i.e. device
attachment or battery removal/insertion).
2010-03-17 09:21:50 +00:00
jruoho
febc76c6be Remove the timer-based check in the sensor refresh routine. We henceforth
trust that the sysmon_envsys(9)'s polling is functioning properly. Discussed
with drochner@, jmcneill@, and pgoyette@.
2010-03-17 08:07:27 +00:00
jruoho
88e4bfe590 Fix the testing of temporarily unknown values. 2010-03-17 07:48:18 +00:00
jruoho
73b3b3d393 Move the low and warning capacity sensors to the limits framework provided
by sysmon_envsys(9).
2010-03-17 07:40:34 +00:00
macallan
28b428e5dc Implement character drawing by hardware so we don't need to map the framebuffer
anymore. Also do some cleanup, remove no longer relevant debugging code etc.
2010-03-16 21:27:02 +00:00
tsutsui
436303df95 Check if mapped bus_space regions are actually valid
before trying to access them.

Fixes trap panic when SMC_TT board is not installed. (oops)
2010-03-16 18:50:14 +00:00
tsutsui
84ebe66073 Renumber board type for LE_PAM.
We can't use 0x00 if we also use the value as bitmap.
2010-03-16 17:58:57 +00:00
tsutsui
a44528e3c5 Fix register and memory addresses for PAM, per MintNet driver.
XXX: In le_vme_match(), probably we should not return even if
XXX: bus_space_map(9) fails unless all le_addresses have been checked.
2010-03-16 17:56:41 +00:00
skrll
afd97f3579 The FP regs are accessed in both physical and virtual modes. Make sure
they're allocated in directly mapped memory to avoid aliasing problems
and unnecessary cache flushing.

Fix various names and references. If we ever directly map the uarea and
pcb we can change things at that point.

Significantly helps my J210 (PA7200).

Mostly from OpenBSD.
2010-03-16 16:20:19 +00:00
martin
238cb98a56 Do not overwrite a ISO9660 partition (which the sunlabel can not properly
represent, but the cd driver carefully crafted including session data).
This makes it possible to just mount cd0a as cd9660fs on a sparc* install
CD. Solution suggested by <mlelstv>.
2010-03-16 14:53:08 +00:00
he
921b8ba089 Allow this driver to build for ofppc as well. 2010-03-16 12:53:17 +00:00
jruoho
b32f00af46 Remove the call to AcpiGetType() in acpi_make_devnode(). This is the same
information as ACPI_DEVICE_INFO::Type, obtained later by AcpiGetObjectInfo().
2010-03-16 08:02:01 +00:00
jruoho
dd980e2a52 Remove unused headers. 2010-03-16 07:18:55 +00:00
jruoho
881fa5618a With the intent of making 'struct acpi_devnode' as the central place for
information related to ACPI device nodes: (a) introduce a generic scan
function for ACPI device driver "capabilities", and (b) eliminate local data
structures from ACPI wake-devices. Discussed with jmcneill@.
2010-03-16 05:48:42 +00:00
mrg
5845ae3973 include strncpy.c, like mvme68k libsa/Makefile rev 1.32. 2010-03-16 01:46:38 +00:00
dyoung
14d897a9e1 Make this compile on sparc64:
1 s/next_tick/next_tint/ because next_tick shadows a global on sparc64.

2 Fix the bus-barrier helper routines, which had the tag & handle
  swapped (!!).  Move the helpers from rtwreg.h to rtwvar.h, and
  change RTW_BARRIER() into an inline subroutine called rtw_barrier().
2010-03-15 23:21:08 +00:00
christos
724aa20200 rename DEBUG_ASLR -> PAX_ASLR_DEBUG 2010-03-15 20:35:19 +00:00
dyoung
9109db5aef rbus is always #defined as 1, so unifdef -D rbus=1. 2010-03-15 20:02:55 +00:00
dyoung
47f456a03f Delete unused member ct_bar[] from struct cardbus_devfunc. 2010-03-15 19:50:50 +00:00
dyoung
3fa968935a Delete unused functions cardbus_save_bar() and cardbus_restore_bar(). 2010-03-15 19:48:31 +00:00