linux/include
Eric W. Biederman 392ee1e6dd [PATCH] msi: Safer state caching.
There are two ways pci_save_state and pci_restore_state are used.  As
helper functions during suspend/resume, and as helper functions around
a hardware reset event.  When used as helper functions around a hardware
reset event there is no reason to believe the calls will be paired, nor
is there a good reason to believe that if we restore the msi state from
before the reset that it will match the current msi state.  Since arch
code may change the msi message without going through the driver, drivers
currently do not have enough information to even know when to call
pci_save_state to ensure they will have msi state in sync with the other
kernel irq reception data structures.

It turns out the solution is straight forward, cache the state in the
existing msi data structures (not the magic pci saved things) and
have the msi code update the cached state each time we write to the hardware.
This means we never need to read the hardware to figure out what the hardware
state should be.

By modifying the caching in this manner we get to remove our save_state
routines and only need to provide restore_state routines.

The only fields that were at all tricky to regenerate were the msi and msi-x
control registers and the way we regenerate them currently is a bit dependent
upon assumptions on how we use the allow msi registers to be configured and used
making the code a little bit brittle.  If we ever change what cases we allow
or how we configure the msi bits we can address the fragility then.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12 16:31:50 -07:00
..
acpi Pull bugzilla-7887 into release branch 2007-02-16 22:11:57 -05:00
asm-alpha [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-arm [ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address 2007-03-12 16:49:38 +00:00
asm-arm26 Storage class should be before const qualifier 2007-02-17 20:11:19 +01:00
asm-avr32 avr32: dma-mapping.h 2007-03-07 10:50:30 +01:00
asm-cris [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-frv [PATCH] FRV: Add some missng lazy MMU hooks for NOMMU mode 2007-03-01 14:53:36 -08:00
asm-generic Revert "[PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant" 2007-03-06 19:38:01 -08:00
asm-h8300 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-i386 [PATCH] i386: make x86_64 tsc header require i386 rather than vice-versa 2007-03-06 09:30:24 -08:00
asm-ia64 [IA64] Remove sparse warning from unwind code 2007-03-08 10:28:48 -08:00
asm-m32r [PATCH] fix sparse warnings from {asm,net}/checksum.h 2007-02-11 10:51:31 -08:00
asm-m68k [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-m68knommu [PATCH] m68knommu: GPIO line defines for the ColdFire 5282 2007-03-06 18:08:38 -08:00
asm-mips [MIPS] Sibyte: Fix ZBbus profiler 2007-03-09 20:27:31 +00:00
asm-parisc Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-02-26 12:48:06 -08:00
asm-powerpc [PATCH] sched: remove SMT nice 2007-03-05 07:57:51 -08:00
asm-ppc [POWERPC] ppc: Add support for AMCC Taishan 440GX eval board 2007-02-13 15:35:52 +11:00
asm-s390 [S390] check_bugs() should be inline. 2007-03-05 23:35:50 +01:00
asm-sh sh: Revert lazy dcache writeback changes. 2007-03-05 19:46:47 +09:00
asm-sh64 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-sparc [SPARC]: Provide 'get_property()' alias for of_get_property(). 2007-03-02 15:22:53 -08:00
asm-sparc64 [SPARC64]: Fix PARPORT build (again). 2007-03-08 15:00:03 -08:00
asm-um [PATCH] uml: pte_mkread fix 2007-03-01 14:53:38 -08:00
asm-v850 [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
asm-x86_64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-03-06 18:05:10 -08:00
asm-xtensa [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
crypto [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
keys
linux [PATCH] msi: Safer state caching. 2007-03-12 16:31:50 -07:00
math-emu
media V4L/DVB (5271): Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls. 2007-03-01 13:09:46 -02:00
mtd [MTD] remove unused ecctype,eccsize fields from struct mtd_info 2007-02-09 15:27:12 +00:00
net [IPSEC]: xfrm_policy delete security check misplaced 2007-03-07 16:08:09 -08:00
pcmcia serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter. 2007-02-16 15:19:16 -08:00
rdma RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rxrpc
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-02-19 13:32:28 -08:00
sound [ALSA] version 1.0.14rc3 2007-03-06 14:10:08 +01:00
video [PATCH] Video: fb, add true ref_count atomicity 2007-02-12 09:48:42 -08:00
Kbuild