OSDN Git Service

s390/MSI: Use standard mask and unmask funtions
authorYijing Wang <wangyijing@huawei.com>
Tue, 8 Jul 2014 02:08:05 +0000 (10:08 +0800)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 16 Jul 2014 08:48:10 +0000 (10:48 +0200)
commit8fb878c5f12bf7fd6099d466139bd4564418e583
treed1095b7622445f499285ab8f0c5a147584db41e8
parent7cbe4afe854a9a352d9562106449bc55d17d5e5b
s390/MSI: Use standard mask and unmask funtions

MSI irqchip in s390 has its own mask and unmask MSI irq
functions, zpci_enable_irq() and zpci_disable_irq().
They mask and unmask MSI irq in standard ways, no arch
special. MSI driver provides two global standard functions
mask_msi_irq() and unmask_msi_irq(). Local zpci_enable_irq()
and zpci_disable_irq() are almost the same as the standard
two. the difference is local mask/unmask functions
read the mask status before mask and unmask everytime.
Then change the value and rewrite to hardware. In standard
functions, save the mask status after mask and unmask msi
irq, and use the cached status to change the mask status.
When we mask or unmask a MSI irq, we always cache its
mask status except we know need not to cache it, like in
pci_msi_shutdown. So use the standard functions to replace
the local is safe.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
[sebott: fixed inverted function pointers]
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/pci/pci.c