| History log of /src/sys/arch/powerpc/pic/pic_openpic.c |
| Revision | | Date | Author | Comments |
| 1.20 |
| 23-Feb-2022 |
andvar | fix various typos in comments, mainly immediatly/immediately/, as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
|
| 1.19 |
| 13-Jul-2020 |
rin | Drop unused opt_interrupt.h include.
|
| 1.18 |
| 12-Jul-2020 |
rin | No need to test _KERNEL_OPT twice. No binary changes.
|
| 1.17 |
| 06-Jul-2020 |
rin | Include missing opt_multiprocessor.h.
|
| 1.16 |
| 06-Jul-2020 |
rin | Style and cosmetic changes. No binary changes intended.
|
| 1.15 |
| 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.14 |
| 16-May-2018 |
macallan | branches: 1.14.2; special case IPIs so we don't mess with hardware IRQ sources now SMP works on my PCI-X G5
|
| 1.13 |
| 22-Mar-2018 |
macallan | don't call mapiodev() - the caller should hand us a usable address
|
| 1.12 |
| 02-Mar-2018 |
macallan | branches: 1.12.2; IRQ0 is perfectly legal to use on at least some macppc, so don't treat it as an error or something special with this svwsata works on my PCI-X G5
|
| 1.11 |
| 01-Mar-2018 |
macallan | use mapiodev() so this can work on G5s
|
| 1.10 |
| 01-Jun-2017 |
chs | 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.9 |
| 26-May-2016 |
macallan | treat IPIs like regular interrupts at IPL_HIGH should fix port-powerpc/44387 tested by chuq
|
| 1.8 |
| 01-Feb-2012 |
matt | branches: 1.8.6; 1.8.24; Use kmem instead of malloc. Remove unneeded <sys/malloc.h> includes.
|
| 1.7 |
| 14-Jan-2012 |
phx | Some PICs have the capability to define the interrupt's polarity (OpenPIC for example). So the accepted interrupt types have been extended to: - IST_EDGE_FALLING (which is the same as IST_EDGE) - IST_EDGE_RISING (new) - IST_LEVEL_LOW (is the same as IST_LEVEL) - IST_LEVEL_HIGH (new) Old code will continue to work without modification.
|
| 1.6 |
| 20-Jun-2011 |
matt | branches: 1.6.2; 1.6.6; <arch/powerpc/... -> <powerpc/...
|
| 1.5 |
| 29-Apr-2008 |
martin | branches: 1.5.32; Convert to new 2 clause license
|
| 1.4 |
| 17-Jan-2008 |
garbled | branches: 1.4.6; 1.4.8; 1.4.10; Add support to ofppc for the IBM 7044-270 machine. This is a POWER3-II based machine. Currently the kernel to run on this machine is incompatible with the standard GENERIC kernel, so for now, we have a separate GENERIC_B64. Eventually, I hope to combine the two.
Please note, this is a port of 32bit ofppc, not a powerpc64 port.
Thanks to Matt Thomas and Kevin Bowling for helping to make this port possible.
Summary of changes:
Change ofwpci to use the ofmethod config for configuring the PCI bus, rather than indirect configuration. Move the wiring of the interrupt controllers from at the start of the boot, into the configuration of the first PCI bus. Rewrite the map_isa_ioregs() hack to work on a machine without BATs Fix a ton of bugs in the genofw_find_pics routine, and in the map_space code. Split the pic_openpic into openpic_common and pic_openpic. Create a new pic_distopenpic driver, for the distributed openpic found on some newer IBM machines. Fix a bad panic in pmap_extract on 64bit bridge mode
|
| 1.3 |
| 11-Dec-2007 |
garbled | Fix the endless stream of 7's problem on i8259-like interrupt controllers once and for all. The i8259 does not like to be read in a loop, when an interrupt comes in, it will return a valid value, however, if you keep reading it until there are no outstanding interrupts, it will return 7 (which is the lpt interrupt). Change the pic handler to give an argument to the get_irq functions of mode, which indicates if this is the first time we are asking, or if we are just rechecking in a loop. Non-i8259 handlers can safely ignore this argument.
Tested to fix the stream of 7's problem on prep and ofppc. Got rid of the nasty hack in ofppc with this too, and the prep machine seems to take less interrupts now, which is a good thing.
|
| 1.2 |
| 17-Oct-2007 |
garbled | branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8; 1.2.10; 1.2.12; 1.2.14; Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA cpu based PPC ports that focused on sharing as much code as possible between the various ports to eliminate near-identical copies of files in every tree. Additionally there is a new PIC system that unifies the interface to interrupt code for all different OEA ppc arches. The work for this branch was done by a variety of people, too long to list here.
TODO: bebox still needs work to complete the transition to -renovation. ofppc still needs a bunch of work, which I will be looking at. ev64260 still needs to be renovated amigappc was not attempted.
NOTES: pmppc was removed as an arch, and moved to a evbppc target.
|
| 1.1 |
| 02-May-2007 |
macallan | branches: 1.1.2; 1.1.6; 1.1.8; file pic_openpic.c was initially added on branch ppcoea-renovation.
|
| 1.1.8.1 |
| 18-Oct-2007 |
yamt | sync with head.
|
| 1.1.6.1 |
| 02-Nov-2007 |
joerg | More diff reduce to HEAD due to botched up merging.
|
| 1.1.2.12 |
| 16-Oct-2007 |
macallan | make interrupt distribution via OpenPIC optional with options OPENPIC_DISTRIBUTE all CPUs will receive hardware interrupts, otherwise only cpu0
|
| 1.1.2.11 |
| 11-Oct-2007 |
macallan | implement pic_finish_setup() to send interrupts to all attached CPUs
|
| 1.1.2.10 |
| 10-Oct-2007 |
macallan | - move IPI setup to ipi_openpic - some cleanup
|
| 1.1.2.9 |
| 04-Oct-2007 |
macallan | make openpic_set_priority non-static for now since cpu.c calls it on SMP kernels. This should go away when the hatch code is rewritten.
|
| 1.1.2.8 |
| 03-Jun-2007 |
nisimura | - make setup_openpic() to have every SRC_VECTOR(irq) register a value 0x8000'0000 during initialization. opic_establish_irq() will assign acutual usage values later on. - note a comment describing that writing S1C bit for OPENPIC_CONFIG register should bring the sane initial operation state. #if-0'ed out this time since it remains unknown wether every OpenPIC compliant controller behave in the same way. - nuke struct openpic_ops which contains enable_mask for no use.
|
| 1.1.2.7 |
| 04-May-2007 |
macallan | nuke unused pic_ops methods, honour priority in pic_establish_irq()
|
| 1.1.2.6 |
| 03-May-2007 |
garbled | Move the functions down from openpic.c into pic_openpic.c, as there really is no need to have them over there when all the interrupt routines will be using pic_openpic.c Change the openpic setup to set all the irqs except 0 to negative polarity. Set the spurious vector reg to 0xff. Emit a nice printf showing the version of the openpic, and getrid of the maxint thing. Add a global, primary_pic, so machines can elect any registered pic as the primary interrupt controller. Clean up a few nits in pic_prepivr to make it more similar to the openpic one, add a prototype for the setup_prepivr function, etc etc.
|
| 1.1.2.5 |
| 03-May-2007 |
nisimura | These two have no <machine/autoconf.h> dependency.
|
| 1.1.2.4 |
| 03-May-2007 |
nisimura | - files.pic allow to choose files as designated for Makefile. - pic_openpic.c, pic_prepivr.c remove #ifdef PIC_xxx constructs. - pic_openpic.c honour OPENPIC feature register NIRQ field for max. number of available irqs. Valid for MPC107/MPC824x EPIC.
|
| 1.1.2.3 |
| 03-May-2007 |
macallan | fix typo
|
| 1.1.2.2 |
| 03-May-2007 |
macallan | adapt to changes picvar.h
|
| 1.1.2.1 |
| 02-May-2007 |
macallan | OpenPIC support
|
| 1.2.14.2 |
| 19-Jan-2008 |
bouyer | Sync with HEAD
|
| 1.2.14.1 |
| 13-Dec-2007 |
bouyer | Sync with HEAD
|
| 1.2.12.1 |
| 13-Dec-2007 |
yamt | sync with head.
|
| 1.2.10.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
| 1.2.8.4 |
| 23-Mar-2008 |
matt | sync with HEAD
|
| 1.2.8.3 |
| 09-Jan-2008 |
matt | sync with HEAD
|
| 1.2.8.2 |
| 06-Nov-2007 |
matt | sync with HEAD
|
| 1.2.8.1 |
| 17-Oct-2007 |
matt | file pic_openpic.c was added on branch matt-armv6 on 2007-11-06 23:20:56 +0000
|
| 1.2.6.1 |
| 18-Feb-2008 |
mjf | Sync with HEAD.
|
| 1.2.4.3 |
| 21-Jan-2008 |
yamt | sync with head
|
| 1.2.4.2 |
| 27-Oct-2007 |
yamt | sync with head.
|
| 1.2.4.1 |
| 17-Oct-2007 |
yamt | file pic_openpic.c was added on branch yamt-lazymbuf on 2007-10-27 11:28:01 +0000
|
| 1.2.2.2 |
| 23-Oct-2007 |
ad | Sync with head.
|
| 1.2.2.1 |
| 17-Oct-2007 |
ad | file pic_openpic.c was added on branch vmlocking on 2007-10-23 20:36:21 +0000
|
| 1.4.10.1 |
| 16-May-2008 |
yamt | sync with head.
|
| 1.4.8.1 |
| 18-May-2008 |
yamt | sync with head.
|
| 1.4.6.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
| 1.5.32.1 |
| 23-Jun-2011 |
cherry | Catchup with rmind-uvmplock merge.
|
| 1.6.6.1 |
| 18-Feb-2012 |
mrg | merge to -current.
|
| 1.6.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
| 1.8.24.2 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
| 1.8.24.1 |
| 29-May-2016 |
skrll | Sync with HEAD
|
| 1.8.6.1 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
| 1.12.2.3 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
| 1.12.2.2 |
| 21-May-2018 |
pgoyette | Sync with HEAD
|
| 1.12.2.1 |
| 30-Mar-2018 |
pgoyette | Resolve conflicts between branch and HEAD
|
| 1.14.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|