Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/atppc.c
RevisionDateAuthorComments
 1.42  29-Jul-2025  andvar Fix few typos in comments.
 1.41  01-Nov-2022  andvar branches: 1.41.8;
s/varaible/variable/ and s/varible/variable/ in comments.
 1.40  03-Dec-2021  andvar fix various typos in comments, log messages and documentation.
 1.39  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.38  24-Apr-2021  thorpej branches: 1.38.8;
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?).
 1.37  16-Nov-2020  msaitoh branches: 1.37.2;
s/reseting/resetting/
 1.36  22-Jul-2020  msaitoh branches: 1.36.2;
s/reseting/resetting/
 1.35  27-Dec-2019  msaitoh s/transfered/transferred/
 1.34  03-Sep-2018  riastradh 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!)
 1.33  01-Jun-2017  chs branches: 1.33.8; 1.33.10;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.32  13-Jul-2014  dholland branches: 1.32.4;
"peripheral", not "peripherial".
 1.31  04-Jun-2014  wiz Remove set-but-unused variable.
From John D. Baker on current-users.
 1.30  26-May-2011  jakllsch branches: 1.30.14; 1.30.28;
Convert malloc(9) to kmem(9) in atppc(4).
(Intended to have been part of previous commit.)
 1.29  26-May-2011  jakllsch Convert ltsleep() in atppc(4) to modern interfaces.

Reviewed by rmind@.
 1.28  16-Dec-2008  christos branches: 1.28.6; 1.28.8;
replace bitmask_snprintf(9) with snprintb(3)
 1.27  18-Apr-2008  cegger branches: 1.27.4; 1.27.12;
Fix panics at boot and some other misc bugs. From Hans Rosenfeld.
 1.26  15-Apr-2008  cegger device_t / softc split. From Hans Rosenfeld
 1.25  08-Apr-2008  cegger use aprint_*_dev and device_xname
 1.24  19-Oct-2007  ad branches: 1.24.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.23  04-Mar-2007  christos branches: 1.23.2; 1.23.14; 1.23.16; 1.23.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.22  25-Dec-2006  wiz branches: 1.22.2;
Spell "separate" correctly. From Zafer Aydogan.
 1.21  29-May-2006  drochner branches: 1.21.6;
Remove passing of an uninitialized variable found by gcc4.
(The variable was not used by the called function, so remove the
argument completely.)
 1.20  10-May-2006  drochner branches: 1.20.2;
remove spl and locking stuff from interrupt handler
 1.19  11-Dec-2005  christos branches: 1.19.4; 1.19.6; 1.19.8; 1.19.10; 1.19.12;
merge ktrace-lwp.
 1.18  13-Sep-2004  drochner branches: 1.18.12;
a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
on "locators.h"
 1.17  24-Aug-2004  thorpej Use ANSI function decls and more use of static.
 1.16  21-Apr-2004  drochner branches: 1.16.2;
initialize the lock
 1.15  24-Feb-2004  drochner The interrupt claim stuff is broken -- data buffers
and external interrupt handlers should be completely
unrelated.
For now, just remove the obvious culprit in the nibble/ps2
case to make NTP pps signal capturing work again.
External handlers should be passed to the lower level,
and they should have full power and responsibility if
they are installed, and their lavel should be selected
by the frontend.
Being here, comment out <machine/intr.h> - it is not
used yet, and do some more conmetic cleanup.
 1.14  24-Feb-2004  wiz occured -> occurred. From Peter Postma.
 1.13  10-Feb-2004  jdolecek add Gary Thorpe copyright notice
 1.12  10-Feb-2004  jdolecek fix atppcintr() to support shared interrupts properly
problem found and fix provided by Paul Shupak
 1.11  03-Feb-2004  jdolecek some style changes - g/c redundant cast, simplify code in atppc_read_ivar()
 1.10  28-Jan-2004  jdolecek don't limit size of DMA transfer by size of FIFO
problem reported and fix provided in PR kern/24200 by Paul Shupak
 1.9  28-Jan-2004  drochner -make it compile with ATPPC_DEBUG
-minor cleanup (whitespace, avoid a typecast)
 1.8  25-Jan-2004  jdolecek print the parallel port capabilities and FIFO attributes always,
not just with ATPPC_DEBUG/ATPPC_VERBOSE
remove the printf("\n") on start of atppc_sc_attach()
 1.7  25-Jan-2004  bjh21 Remove dollar signs from foreign RCSIDs per doc/3RDPARTY.
Add __KERNEL_RCSID() to .c files.
 1.6  22-Jan-2004  jdolecek Resurrect "dev" variable from atppc_sc_attach() removed in rev 1.4
(#ifdef ATPPC_DEBUG), so that this compiles with the option set

Fixes PR kern/24193 by Paul Shupak
 1.5  22-Jan-2004  jdolecek Reset the service bit of ECP register, so that write threshold would
be identified correctly
Problem reported and fix provided in PR kern/24185 by Paul Shupak
 1.4  22-Jan-2004  bjh21 Remove unused "dev" variable from atppc_sc_attach().
Remove unused include of <dev/isa/isavar.h>, which fails on non-ISA platforms.
 1.3  21-Jan-2004  bjh21 Add RCSID comments.
 1.2  20-Jan-2004  jdolecek make compile - fix print formats
 1.1  19-Jan-2004  jdolecek branches: 1.1.1;
Initial revision
 1.1.1.1  19-Jan-2004  jdolecek Import Gary Thorpe's netbsd-ppbus 1.3. This is NetBSD port
of FreeBSD Parallel Port Bus framework. Work in progress.
 1.16.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.16.2.3  25-Aug-2004  skrll Sync with HEAD.
 1.16.2.2  03-Aug-2004  skrll Sync with HEAD
 1.16.2.1  21-Apr-2004  skrll file atppc.c was added on branch ktrace-lwp on 2004-08-03 10:46:10 +0000
 1.18.12.4  27-Oct-2007  yamt sync with head.
 1.18.12.3  03-Sep-2007  yamt sync with head.
 1.18.12.2  30-Dec-2006  yamt sync with head.
 1.18.12.1  21-Jun-2006  yamt sync with head.
 1.19.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.19.10.1  11-May-2006  elad sync with head
 1.19.8.2  26-Jun-2006  yamt sync with head.
 1.19.8.1  24-May-2006  yamt sync with head.
 1.19.6.1  01-Jun-2006  kardel Sync with head.
 1.19.4.1  09-Sep-2006  rpaulo sync with head
 1.20.2.1  19-Jun-2006  chap Sync with head.
 1.21.6.1  12-Jan-2007  ad Sync with head.
 1.22.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.23.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.23.16.1  06-Nov-2007  matt sync with HEAD
 1.23.14.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.23.2.1  23-Oct-2007  ad Sync with head.
 1.24.16.2  17-Jan-2009  mjf Sync with HEAD.
 1.24.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.27.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.27.4.1  04-May-2009  yamt sync with head.
 1.28.8.1  06-Jun-2011  jruoho Sync with HEAD.
 1.28.6.1  31-May-2011  rmind sync with head
 1.30.28.1  10-Aug-2014  tls Rebase.
 1.30.14.2  03-Dec-2017  jdolecek update from HEAD
 1.30.14.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.4.1  28-Aug-2017  skrll Sync with HEAD
 1.33.10.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.33.10.1  10-Jun-2019  christos Sync with HEAD
 1.33.8.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.36.2.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.37.2.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.38.8.1  04-Aug-2021  thorpej Adapt to CFARGS().
 1.41.8.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed