Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/eeh: Move PE state constants around

There are two equivalent sets of PE state constants, defined in
arch/powerpc/include/asm/eeh.h and include/uapi/linux/vfio.h.
Though the names are different, their corresponding values are
exactly same. The former is used by EEH core and the latter is
used by userspace.

The patch moves those constants from arch/powerpc/include/asm/eeh.h
to arch/powerpc/include/uapi/asm/eeh.h, which are expected to be
used by userspace from now on. We can't delete those constants in
vfio.h as it's uncertain that those constants have been or will be
used by userspace.

Suggested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Gavin Shan and committed by
Michael Ellerman
ed3e81ff 38c04887

+32 -5
+2 -5
arch/powerpc/include/asm/eeh.h
··· 27 27 #include <linux/time.h> 28 28 #include <linux/atomic.h> 29 29 30 + #include <uapi/asm/eeh.h> 31 + 30 32 struct pci_dev; 31 33 struct pci_bus; 32 34 struct pci_dn; ··· 187 185 #define EEH_STATE_DMA_ACTIVE (1 << 4) /* Active DMA */ 188 186 #define EEH_STATE_MMIO_ENABLED (1 << 5) /* MMIO enabled */ 189 187 #define EEH_STATE_DMA_ENABLED (1 << 6) /* DMA enabled */ 190 - #define EEH_PE_STATE_NORMAL 0 /* Normal state */ 191 - #define EEH_PE_STATE_RESET 1 /* PE reset asserted */ 192 - #define EEH_PE_STATE_STOPPED_IO_DMA 2 /* Frozen PE */ 193 - #define EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA, Enabled IO */ 194 - #define EEH_PE_STATE_UNAVAIL 5 /* Unavailable */ 195 188 #define EEH_RESET_DEACTIVATE 0 /* Deactivate the PE reset */ 196 189 #define EEH_RESET_HOT 1 /* Hot reset */ 197 190 #define EEH_RESET_FUNDAMENTAL 3 /* Fundamental reset */
+30
arch/powerpc/include/uapi/asm/eeh.h
··· 1 + /* 2 + * This program is free software; you can redistribute it and/or modify 3 + * it under the terms of the GNU General Public License, version 2, as 4 + * published by the Free Software Foundation. 5 + * 6 + * This program is distributed in the hope that it will be useful, 7 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 + * GNU General Public License for more details. 10 + * 11 + * You should have received a copy of the GNU General Public License 12 + * along with this program; if not, write to the Free Software 13 + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 14 + * 15 + * Copyright IBM Corp. 2015 16 + * 17 + * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> 18 + */ 19 + 20 + #ifndef _ASM_POWERPC_EEH_H 21 + #define _ASM_POWERPC_EEH_H 22 + 23 + /* PE states */ 24 + #define EEH_PE_STATE_NORMAL 0 /* Normal state */ 25 + #define EEH_PE_STATE_RESET 1 /* PE reset asserted */ 26 + #define EEH_PE_STATE_STOPPED_IO_DMA 2 /* Frozen PE */ 27 + #define EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */ 28 + #define EEH_PE_STATE_UNAVAIL 5 /* Unavailable */ 29 + 30 + #endif /* _ASM_POWERPC_EEH_H */