#
90f98977 |
| 06-Sep-2023 |
macallan <macallan@NetBSD.org> |
yet another tsleep/wakeup -> cv_*
|
#
c7fb772b |
| 07-Aug-2021 |
thorpej <thorpej@NetBSD.org> |
Merge thorpej-cfargs2.
|
#
2685996b |
| 24-Apr-2021 |
thorpej <thorpej@NetBSD.org> |
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass a
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments.
Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.)
Remove unnecessary or redundant interface attributes where they're not needed.
There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
show more ...
|
#
cfe2093d |
| 05-Mar-2021 |
rin <rin@NetBSD.org> |
Convert to intr_establish_xname().
|
#
2b787682 |
| 14-Jul-2020 |
martin <martin@NetBSD.org> |
Adapt to new proplib API
|
#
5d94472e |
| 14-Jul-2020 |
martin <martin@NetBSD.org> |
Adapt to new proplib API
|
#
601e1783 |
| 22-Dec-2019 |
thorpej <thorpej@NetBSD.org> |
Cleanup i2c bus acquire / release, centralizing all of the logic into iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks no longer need to be provided by back-end controller driver
Cleanup i2c bus acquire / release, centralizing all of the logic into iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks no longer need to be provided by back-end controller drivers (only if they need special handling, e.g. powering on the i2c controller). This results in the removal of a bunch of rendundant code from each back-end controller driver.
Assert that we are not in hard interrupt context in iic_acquire_bus(), iic_exec(), and iic_release_bus().
show more ...
|
#
d1579b2d |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
6ea5686d |
| 22-Sep-2017 |
macallan <macallan@NetBSD.org> |
direct configure i2c devices
|
#
2f02870f |
| 14-Feb-2016 |
chs <chs@NetBSD.org> |
zero the i2c_attach_args structure before filling it in. fixes occasional crashes in iic_attach().
|
#
99d63521 |
| 13-Aug-2014 |
macallan <macallan@NetBSD.org> |
if we get garbage from the RTC try again a couple times this seems to happen more frequently when the PRAM battery goes bad
|
#
f6e33f02 |
| 14-Mar-2014 |
mrg <mrg@NetBSD.org> |
remove various set-but-unused variables.
|
#
55f32eaf |
| 30-Jul-2013 |
joerg <joerg@NetBSD.org> |
Strip redundant parenthesis.
|
#
b6584574 |
| 01-Jul-2011 |
dyoung <dyoung@NetBSD.org> |
#include <sys/bus.h> instead of <machine/bus.h>.
|
#
05b09539 |
| 18-Jun-2011 |
matt <matt@NetBSD.org> |
struct device * -> device_t struct cfdata * -> cfdata_t use device accessors, use device_private. some softc/device_t splits (macppc needs a bunch more) aprint*_dev used considerably more
|
#
471e528b |
| 12-Dec-2009 |
tsutsui <tsutsui@NetBSD.org> |
Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have s
Remove `volatile' qualifier from argument types of struct timeval passed to todr_gettime(9) and todr_settime(9). We no longer have an ancient and volatile struct timeval `time' global since we have switched to MI timercounter(9) on all port.
XXX1: some of these RTC drivers still assume 32bit time_t XXX2: some of these should be rewritten to use todr_[gs]ettime_ymdhms() XXX3: todr(9) man page doesn't mention todr_[gs]ettime_ymdhms()
show more ...
|
#
df7f595e |
| 18-Mar-2009 |
cegger <cegger@NetBSD.org> |
Ansify function definitions w/o arguments. Generated with sed.
|
#
397929c0 |
| 04-Feb-2009 |
pgoyette <pgoyette@NetBSD.org> |
Return error status if an attempt is made to use the quick_{read,write} i2c protocols, since we don't (yet) know how to make the controller do it.
|
#
345fb25d |
| 11-Jan-2009 |
macallan <macallan@NetBSD.org> |
fix format instead of casting wildly
|
#
d2f56df7 |
| 11-Jan-2009 |
christos <christos@NetBSD.org> |
don't truncate the print.
|
#
d785e78b |
| 11-Jan-2009 |
macallan <macallan@NetBSD.org> |
deal with 64bit time_t Noticed by Wojciech Galazka
|
#
6bebd690 |
| 07-Dec-2008 |
tsutsui <tsutsui@NetBSD.org> |
Fix attach messages. (extra colons, misplaced newline etc.)
|
#
b6c6870c |
| 16-May-2008 |
macallan <macallan@NetBSD.org> |
struct device * -> device_t
|
#
3028e483 |
| 29-Apr-2008 |
martin <martin@NetBSD.org> |
Convert to new 2 clause license
|
#
065b6ba2 |
| 06-Dec-2007 |
ad <ad@NetBSD.org> |
lockmgr -> mutex
|