LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value
From: Balamuruhan S @ 2020-03-11  7:21 UTC (permalink / raw)
  To: Christophe Leroy, mpe
  Cc: ravi.bangoria, jniethe5, paulus, sandipan, naveen.n.rao,
	linuxppc-dev
In-Reply-To: <188eadfa-6908-196a-ed77-cec210c54c84@c-s.fr>

On Wed, 2020-03-11 at 08:01 +0100, Christophe Leroy wrote:
> 
> Le 11/03/2020 à 07:14, Balamuruhan S a écrit :
> > ld instruction should have 14 bit immediate field (DS) concatenated
> > with
> > 0b00 on the right, encode it accordingly.
> > 
> > Fixes: 4ceae137bdab ("powerpc: emulate_step() tests for load/store
> > instructions")
> > Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
> > Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
> > ---
> >   arch/powerpc/lib/test_emulate_step.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/lib/test_emulate_step.c
> > b/arch/powerpc/lib/test_emulate_step.c
> > index 42347067739c..51c254fd15b5 100644
> > --- a/arch/powerpc/lib/test_emulate_step.c
> > +++ b/arch/powerpc/lib/test_emulate_step.c
> > @@ -19,7 +19,7 @@
> >    * definitions.
> >    */
> >   #define TEST_LD(r, base, i)	(PPC_INST_LD | ___PPC_RT(r) |	
> > 	\
> > -					___PPC_RA(base) | IMM_L(i))
> > +					___PPC_RA(base) | ((i) &
> > 0xfffc))
> 
> I think you should squash patch 1 and 2 together. Or at least you
> should
> put the new IMM_DS macro in patch 1 and use it instead of open
> coding.

sure, I will make the changes as suggested.

-- Bala

> 
> >   #define TEST_LWZ(r, base, i)	(PPC_INST_LWZ | ___PPC_RT(r) |	
> > 	\
> >   					___PPC_RA(base) | IMM_L(i))
> >   #define TEST_LWZX(t, a, b)	(PPC_INST_LWZX | ___PPC_RT(t) |
> > 		\
> > 
> > base-commit: 5aa19adac1f3152a5fd3b865a1ab46bb845d3696
> > 
> 
> Christophe


^ permalink raw reply

* Re: [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value
From: Christophe Leroy @ 2020-03-11  7:01 UTC (permalink / raw)
  To: Balamuruhan S, mpe
  Cc: ravi.bangoria, jniethe5, paulus, sandipan, naveen.n.rao,
	linuxppc-dev
In-Reply-To: <20200311061417.384629-1-bala24@linux.ibm.com>



Le 11/03/2020 à 07:14, Balamuruhan S a écrit :
> ld instruction should have 14 bit immediate field (DS) concatenated with
> 0b00 on the right, encode it accordingly.
> 
> Fixes: 4ceae137bdab ("powerpc: emulate_step() tests for load/store instructions")
> Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
> Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
> ---
>   arch/powerpc/lib/test_emulate_step.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
> index 42347067739c..51c254fd15b5 100644
> --- a/arch/powerpc/lib/test_emulate_step.c
> +++ b/arch/powerpc/lib/test_emulate_step.c
> @@ -19,7 +19,7 @@
>    * definitions.
>    */
>   #define TEST_LD(r, base, i)	(PPC_INST_LD | ___PPC_RT(r) |		\
> -					___PPC_RA(base) | IMM_L(i))
> +					___PPC_RA(base) | ((i) & 0xfffc))

I think you should squash patch 1 and 2 together. Or at least you should
put the new IMM_DS macro in patch 1 and use it instead of open coding.

>   #define TEST_LWZ(r, base, i)	(PPC_INST_LWZ | ___PPC_RT(r) |		\
>   					___PPC_RA(base) | IMM_L(i))
>   #define TEST_LWZX(t, a, b)	(PPC_INST_LWZX | ___PPC_RT(t) |		\
> 
> base-commit: 5aa19adac1f3152a5fd3b865a1ab46bb845d3696
> 

Christophe

^ permalink raw reply

* Re: [PATCH] pseries/iommu: Tweak ddw behavior in presence of pmem
From: Alexey Kardashevskiy @ 2020-03-11  6:47 UTC (permalink / raw)
  To: Aneesh Kumar K.V, Vaibhav Jain, linuxppc-dev; +Cc: Michael Ellerman
In-Reply-To: <87y2s7mnhx.fsf@linux.ibm.com>



On 11/03/2020 17:09, Aneesh Kumar K.V wrote:
> Vaibhav Jain <vaibhav@linux.ibm.com> writes:
> 
>> Recently we discovered an issue on pseries guests that prevents pci
>> devices from accessing pmem memory via DMA. Performing such an
>> operation will cause PHB to freeze the corresponding partition
>> endpoint and in some scenarios will shutdown the disk that hosts the
>> rootfs.
>>
>> A fix for this is in works until then this patch proposes to disable
>> DDW if pmem nodes are present in the device-tree. This would force all
>> DMA from I/O adapters through default 2-GB window and prevent direct
>> access of pmem memory which is located beyond 4-TB guest physical
>> address.
>>
>> Since this change can have performance penalty for cases where its
>> known that i/o adapters wont be performing DMA to pmem, the patch
>> adds new args to the 'disable_ddw' kernel commanline flag with
>> following possible values:
>>
>> 'default' : Enable DDW only if no Pmem nodes present in device-tree
>> 'Yes' : Disable DDW always
>> 'No'  : Force enable DDW even if Pmem nodes present in device-tree
> 
> This is wrong, if we find pmem attached to LPAR we should not enable ddw
> at all. Enabling ddw results in us using direct dma ops and that cause
> crashes with vpmem address as you explained earlier.


I suggest using existing device::dma_mask/coherent_dma_mask and/or
device::bus_dma_limit - we could actually set these up in enable_ddw()
(where we know the window size) and then the rest of the code would use
it naturally and switch between "direct" or IOMMU DMA.

The immediate problem with this is that the generic
dma_set_mask()/dma_set_coherent_mask() do not ask the platform about the
maximum mask supported, it is either what the device requested (often it
is simply 64bit) or we fall back to 32bit, we could probably fix that.
Thanks,



> 
> 
>>
>> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
>> ---
>>  .../admin-guide/kernel-parameters.txt         | 10 ++-
>>  arch/powerpc/platforms/pseries/iommu.c        | 67 +++++++++++++++++--
>>  2 files changed, 70 insertions(+), 7 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index c07815d230bc..58e09f7a2cb9 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -901,9 +901,13 @@
>>  			The feature only exists starting from
>>  			Arch Perfmon v4 (Skylake and newer).
>>  
>> -	disable_ddw	[PPC/PSERIES]
>> -			Disable Dynamic DMA Window support. Use this if
>> -			to workaround buggy firmware.
>> +	disable_ddw=	[PPC/PSERIES]
>> +			Controls weather Dynamic DMA Window support is enabled.
>> +			Use this if to workaround buggy firmware. Following
>> +			values are supported:
>> +                on      Disable ddw always
>> +                off     Enable ddw always
>> +		default Enable ddw if no Persistent memory present (default)
>>  
>>  	disable_ipv6=	[IPV6]
>>  			See Documentation/networking/ipv6.txt.
>> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
>> index 2e0a8eab5588..97498cc25c9f 100644
>> --- a/arch/powerpc/platforms/pseries/iommu.c
>> +++ b/arch/powerpc/platforms/pseries/iommu.c
>> @@ -12,6 +12,7 @@
>>  
>>  #include <linux/init.h>
>>  #include <linux/types.h>
>> +#include <linux/string.h>
>>  #include <linux/slab.h>
>>  #include <linux/mm.h>
>>  #include <linux/memblock.h>
>> @@ -755,12 +756,39 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
>>  		       pci_name(dev));
>>  }
>>  
>> +/*
>> + * Following values for the variable are handled
>> + * '-1': Force enable ddw even if Persistent memory is present
>> + * '0' : Enable ddw if no Persistent memory present (default)
>> + * '1' : Disable ddw always
>> + */
>>  static int __read_mostly disable_ddw;
>>  
>> -static int __init disable_ddw_setup(char *str)
>> +static int __init disable_ddw_setup(char *param)
>>  {
>> -	disable_ddw = 1;
>> -	printk(KERN_INFO "ppc iommu: disabling ddw.\n");
>> +	bool val;
>> +	int res;
>> +
>> +	/* Maintain old behaviour that disables DDW when flag given */
>> +	if (!param) {
>> +		disable_ddw = 1;
>> +		return 0;
>> +	}
>> +
>> +	res = strtobool(param, &val);
>> +
>> +	if (!res) {
>> +		if (val) {
>> +			disable_ddw = 1;
>> +			pr_info("ppc iommu: disabling ddw.\n");
>> +		} else if (!val) {
>> +			/* Force enable of DDW even if pmem is available */
>> +			disable_ddw = -1;
>> +			pr_info("ppc iommu: will force enable ddw.\n");
>> +		}
>> +	} else if (strcmp(param, "default") == 0) {
>> +		disable_ddw = 0;
>> +	}
>>  
>>  	return 0;
>>  }
>> @@ -1313,6 +1341,37 @@ static struct notifier_block iommu_reconfig_nb = {
>>  	.notifier_call = iommu_reconfig_notifier,
>>  };
>>  
>> +/* Check if DDW can be supported for this lpar */
>> +int ddw_supported(void)
>> +{
>> +	struct device_node *dn;
>> +
>> +	if (disable_ddw == -1) /* force enable ddw */
>> +		goto out;
>> +
>> +	if (disable_ddw == 1)
>> +		return 0;
>> +
>> +	/*
>> +	 * Due to DMA window limitations currently DDW is not supported
>> +	 * for persistent memory. This is due 1 TiB size of direct mapped
>> +	 * DMA window size limitation enforce by phyp. Since pmem memory
>> +	 * will be mapped at phy address > 4TiB, we cannot accmodate pmem
>> +	 * in the DDW window and DMA's to/from the pmem memory will result in
>> +	 * PHBs getting frozen triggering EEH. Hence for the the time being
>> +	 * disable DDW in presence of a 'ibm,pmemory' node.
>> +	 */
> 
> 
> That comment is not complete. It is not a phyp limitations it is a linux
> kernel implementation detail where we have one offset for direct map
> dma.
> 
>> +	dn = of_find_compatible_node(NULL, NULL, "ibm,pmemory");
>> +	if (dn) {
>> +		pr_info("IOMMU: Disabling DDW as pmem memory available\n");
>> +		of_node_put(dn);
>> +		return 0;
>> +	}
>> + out:
>> +	pr_info("IOMMU: Enabling DDW support\n");
>> +	return 1;
>> +}
>> +
>>  /* These are called very early. */
>>  void iommu_init_early_pSeries(void)
>>  {
>> @@ -1322,7 +1381,7 @@ void iommu_init_early_pSeries(void)
>>  	if (firmware_has_feature(FW_FEATURE_LPAR)) {
>>  		pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
>>  		pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
>> -		if (!disable_ddw)
>> +		if (ddw_supported())
>>  			pseries_pci_controller_ops.iommu_bypass_supported =
>>  				iommu_bypass_supported_pSeriesLP;
>>  	} else {
>> -- 
>> 2.24.1
> 
> I guess a much simpler patch is below.
> 
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index 2e0a8eab5588..99f72162dd85 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -1313,6 +1313,31 @@ static struct notifier_block iommu_reconfig_nb = {
>  	.notifier_call = iommu_reconfig_notifier,
>  };
>  
> +static bool pmem_attached(void)
> +{
> +	struct device_node *dn;
> +	/*
> +	 * Depending on different partitionable endpoints, dynamic dma window
> +	 * implementation in Linux restrict the max addressable memory that
> +	 * can be DMA mapped using dynamic dma window feature. This limit
> +	 * depends on the I/O map page size and max TCE entries enabled
> +	 * by Phyp. With 64K page size with some PE this limit is 1TB.
> +	 * When persistent memory is bound above this address, we need to
> +	 * disable ddw feature for this PE.
> +	 *
> +	 * Since kernel won't know the pmem bind-address early during boot,
> +	 * force disable dynamic dma window feature for all PEs if pmem is
> +	 * attached to the LPAR.
> +	 */
> +	dn = of_find_compatible_node(NULL, NULL, "ibm,pmemory");
> +	if (dn) {
> +		pr_info("IOMMU: Disabling DDW as pmem memory available\n");
> +		of_node_put(dn);
> +		return true;
> +	}
> +	return false;
> +}
> +
>  /* These are called very early. */
>  void iommu_init_early_pSeries(void)
>  {
> @@ -1322,7 +1347,7 @@ void iommu_init_early_pSeries(void)
>  	if (firmware_has_feature(FW_FEATURE_LPAR)) {
>  		pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
>  		pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
> -		if (!disable_ddw)
> +		if (!(disable_ddw || pmem_attached()))
>  			pseries_pci_controller_ops.iommu_bypass_supported =
>  				iommu_bypass_supported_pSeriesLP;
>  	} else {
> 

-- 
Alexey

^ permalink raw reply

* [PATCH 1/2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value
From: Balamuruhan S @ 2020-03-11  6:14 UTC (permalink / raw)
  To: mpe
  Cc: ravi.bangoria, jniethe5, Balamuruhan S, paulus, sandipan,
	naveen.n.rao, linuxppc-dev

ld instruction should have 14 bit immediate field (DS) concatenated with
0b00 on the right, encode it accordingly.

Fixes: 4ceae137bdab ("powerpc: emulate_step() tests for load/store instructions")
Reviewed-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
---
 arch/powerpc/lib/test_emulate_step.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 42347067739c..51c254fd15b5 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -19,7 +19,7 @@
  * definitions.
  */
 #define TEST_LD(r, base, i)	(PPC_INST_LD | ___PPC_RT(r) |		\
-					___PPC_RA(base) | IMM_L(i))
+					___PPC_RA(base) | ((i) & 0xfffc))
 #define TEST_LWZ(r, base, i)	(PPC_INST_LWZ | ___PPC_RT(r) |		\
 					___PPC_RA(base) | IMM_L(i))
 #define TEST_LWZX(t, a, b)	(PPC_INST_LWZX | ___PPC_RT(t) |		\

base-commit: 5aa19adac1f3152a5fd3b865a1ab46bb845d3696
-- 
2.24.1


^ permalink raw reply related

* [PATCH 2/2] powerpc test_emulate_step: add macro for 14 bit immediate field
From: Balamuruhan S @ 2020-03-11  6:14 UTC (permalink / raw)
  To: mpe
  Cc: ravi.bangoria, jniethe5, Balamuruhan S, paulus, sandipan,
	naveen.n.rao, linuxppc-dev
In-Reply-To: <20200311061417.384629-1-bala24@linux.ibm.com>

introduce macro `IMM_DS()` to encode DS form instructions with
14 bit immediate field.

Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
---
 arch/powerpc/lib/test_emulate_step.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 51c254fd15b5..007292a1ad01 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -13,19 +13,20 @@
 #include <asm/code-patching.h>
 
 #define IMM_L(i)		((uintptr_t)(i) & 0xffff)
+#define IMM_DS(i)		((uintptr_t)(i) & 0xfffc)
 
 /*
  * Defined with TEST_ prefix so it does not conflict with other
  * definitions.
  */
 #define TEST_LD(r, base, i)	(PPC_INST_LD | ___PPC_RT(r) |		\
-					___PPC_RA(base) | ((i) & 0xfffc))
+					___PPC_RA(base) | IMM_DS(i))
 #define TEST_LWZ(r, base, i)	(PPC_INST_LWZ | ___PPC_RT(r) |		\
 					___PPC_RA(base) | IMM_L(i))
 #define TEST_LWZX(t, a, b)	(PPC_INST_LWZX | ___PPC_RT(t) |		\
 					___PPC_RA(a) | ___PPC_RB(b))
 #define TEST_STD(r, base, i)	(PPC_INST_STD | ___PPC_RS(r) |		\
-					___PPC_RA(base) | ((i) & 0xfffc))
+					___PPC_RA(base) | IMM_DS(i))
 #define TEST_LDARX(t, a, b, eh)	(PPC_INST_LDARX | ___PPC_RT(t) |	\
 					___PPC_RA(a) | ___PPC_RB(b) |	\
 					__PPC_EH(eh))
-- 
2.24.1


^ permalink raw reply related

* Re: [PATCH] pseries/iommu: Tweak ddw behavior in presence of pmem
From: Aneesh Kumar K.V @ 2020-03-11  6:09 UTC (permalink / raw)
  To: Vaibhav Jain, linuxppc-dev, Alexey Kardashevskiy
  Cc: Vaibhav Jain, Michael Ellerman
In-Reply-To: <20200311055050.161556-1-vaibhav@linux.ibm.com>

Vaibhav Jain <vaibhav@linux.ibm.com> writes:

> Recently we discovered an issue on pseries guests that prevents pci
> devices from accessing pmem memory via DMA. Performing such an
> operation will cause PHB to freeze the corresponding partition
> endpoint and in some scenarios will shutdown the disk that hosts the
> rootfs.
>
> A fix for this is in works until then this patch proposes to disable
> DDW if pmem nodes are present in the device-tree. This would force all
> DMA from I/O adapters through default 2-GB window and prevent direct
> access of pmem memory which is located beyond 4-TB guest physical
> address.
>
> Since this change can have performance penalty for cases where its
> known that i/o adapters wont be performing DMA to pmem, the patch
> adds new args to the 'disable_ddw' kernel commanline flag with
> following possible values:
>
> 'default' : Enable DDW only if no Pmem nodes present in device-tree
> 'Yes' : Disable DDW always
> 'No'  : Force enable DDW even if Pmem nodes present in device-tree

This is wrong, if we find pmem attached to LPAR we should not enable ddw
at all. Enabling ddw results in us using direct dma ops and that cause
crashes with vpmem address as you explained earlier.


>
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
> ---
>  .../admin-guide/kernel-parameters.txt         | 10 ++-
>  arch/powerpc/platforms/pseries/iommu.c        | 67 +++++++++++++++++--
>  2 files changed, 70 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index c07815d230bc..58e09f7a2cb9 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -901,9 +901,13 @@
>  			The feature only exists starting from
>  			Arch Perfmon v4 (Skylake and newer).
>  
> -	disable_ddw	[PPC/PSERIES]
> -			Disable Dynamic DMA Window support. Use this if
> -			to workaround buggy firmware.
> +	disable_ddw=	[PPC/PSERIES]
> +			Controls weather Dynamic DMA Window support is enabled.
> +			Use this if to workaround buggy firmware. Following
> +			values are supported:
> +                on      Disable ddw always
> +                off     Enable ddw always
> +		default Enable ddw if no Persistent memory present (default)
>  
>  	disable_ipv6=	[IPV6]
>  			See Documentation/networking/ipv6.txt.
> diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
> index 2e0a8eab5588..97498cc25c9f 100644
> --- a/arch/powerpc/platforms/pseries/iommu.c
> +++ b/arch/powerpc/platforms/pseries/iommu.c
> @@ -12,6 +12,7 @@
>  
>  #include <linux/init.h>
>  #include <linux/types.h>
> +#include <linux/string.h>
>  #include <linux/slab.h>
>  #include <linux/mm.h>
>  #include <linux/memblock.h>
> @@ -755,12 +756,39 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
>  		       pci_name(dev));
>  }
>  
> +/*
> + * Following values for the variable are handled
> + * '-1': Force enable ddw even if Persistent memory is present
> + * '0' : Enable ddw if no Persistent memory present (default)
> + * '1' : Disable ddw always
> + */
>  static int __read_mostly disable_ddw;
>  
> -static int __init disable_ddw_setup(char *str)
> +static int __init disable_ddw_setup(char *param)
>  {
> -	disable_ddw = 1;
> -	printk(KERN_INFO "ppc iommu: disabling ddw.\n");
> +	bool val;
> +	int res;
> +
> +	/* Maintain old behaviour that disables DDW when flag given */
> +	if (!param) {
> +		disable_ddw = 1;
> +		return 0;
> +	}
> +
> +	res = strtobool(param, &val);
> +
> +	if (!res) {
> +		if (val) {
> +			disable_ddw = 1;
> +			pr_info("ppc iommu: disabling ddw.\n");
> +		} else if (!val) {
> +			/* Force enable of DDW even if pmem is available */
> +			disable_ddw = -1;
> +			pr_info("ppc iommu: will force enable ddw.\n");
> +		}
> +	} else if (strcmp(param, "default") == 0) {
> +		disable_ddw = 0;
> +	}
>  
>  	return 0;
>  }
> @@ -1313,6 +1341,37 @@ static struct notifier_block iommu_reconfig_nb = {
>  	.notifier_call = iommu_reconfig_notifier,
>  };
>  
> +/* Check if DDW can be supported for this lpar */
> +int ddw_supported(void)
> +{
> +	struct device_node *dn;
> +
> +	if (disable_ddw == -1) /* force enable ddw */
> +		goto out;
> +
> +	if (disable_ddw == 1)
> +		return 0;
> +
> +	/*
> +	 * Due to DMA window limitations currently DDW is not supported
> +	 * for persistent memory. This is due 1 TiB size of direct mapped
> +	 * DMA window size limitation enforce by phyp. Since pmem memory
> +	 * will be mapped at phy address > 4TiB, we cannot accmodate pmem
> +	 * in the DDW window and DMA's to/from the pmem memory will result in
> +	 * PHBs getting frozen triggering EEH. Hence for the the time being
> +	 * disable DDW in presence of a 'ibm,pmemory' node.
> +	 */


That comment is not complete. It is not a phyp limitations it is a linux
kernel implementation detail where we have one offset for direct map
dma.

> +	dn = of_find_compatible_node(NULL, NULL, "ibm,pmemory");
> +	if (dn) {
> +		pr_info("IOMMU: Disabling DDW as pmem memory available\n");
> +		of_node_put(dn);
> +		return 0;
> +	}
> + out:
> +	pr_info("IOMMU: Enabling DDW support\n");
> +	return 1;
> +}
> +
>  /* These are called very early. */
>  void iommu_init_early_pSeries(void)
>  {
> @@ -1322,7 +1381,7 @@ void iommu_init_early_pSeries(void)
>  	if (firmware_has_feature(FW_FEATURE_LPAR)) {
>  		pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
>  		pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
> -		if (!disable_ddw)
> +		if (ddw_supported())
>  			pseries_pci_controller_ops.iommu_bypass_supported =
>  				iommu_bypass_supported_pSeriesLP;
>  	} else {
> -- 
> 2.24.1

I guess a much simpler patch is below.

diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 2e0a8eab5588..99f72162dd85 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1313,6 +1313,31 @@ static struct notifier_block iommu_reconfig_nb = {
 	.notifier_call = iommu_reconfig_notifier,
 };
 
+static bool pmem_attached(void)
+{
+	struct device_node *dn;
+	/*
+	 * Depending on different partitionable endpoints, dynamic dma window
+	 * implementation in Linux restrict the max addressable memory that
+	 * can be DMA mapped using dynamic dma window feature. This limit
+	 * depends on the I/O map page size and max TCE entries enabled
+	 * by Phyp. With 64K page size with some PE this limit is 1TB.
+	 * When persistent memory is bound above this address, we need to
+	 * disable ddw feature for this PE.
+	 *
+	 * Since kernel won't know the pmem bind-address early during boot,
+	 * force disable dynamic dma window feature for all PEs if pmem is
+	 * attached to the LPAR.
+	 */
+	dn = of_find_compatible_node(NULL, NULL, "ibm,pmemory");
+	if (dn) {
+		pr_info("IOMMU: Disabling DDW as pmem memory available\n");
+		of_node_put(dn);
+		return true;
+	}
+	return false;
+}
+
 /* These are called very early. */
 void iommu_init_early_pSeries(void)
 {
@@ -1322,7 +1347,7 @@ void iommu_init_early_pSeries(void)
 	if (firmware_has_feature(FW_FEATURE_LPAR)) {
 		pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
 		pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
-		if (!disable_ddw)
+		if (!(disable_ddw || pmem_attached()))
 			pseries_pci_controller_ops.iommu_bypass_supported =
 				iommu_bypass_supported_pSeriesLP;
 	} else {

^ permalink raw reply related

* Re: [PATCH v6 6/7] powerpc/mm: implement set_memory_attr()
From: Daniel Axtens @ 2020-03-11  6:09 UTC (permalink / raw)
  To: Russell Currey, linuxppc-dev
  Cc: ajd, kernel-hardening, npiggin, joel, kbuild test robot
In-Reply-To: <20200310010338.21205-7-ruscur@russell.cc>

Russell Currey <ruscur@russell.cc> writes:

> From: Christophe Leroy <christophe.leroy@c-s.fr>
>
> In addition to the set_memory_xx() functions which allows to change
> the memory attributes of not (yet) used memory regions, implement a
> set_memory_attr() function to:
> - set the final memory protection after init on currently used
> kernel regions.
> - enable/disable kernel memory regions in the scope of DEBUG_PAGEALLOC.
>
> Unlike the set_memory_xx() which can act in three step as the regions
> are unused, this function must modify 'on the fly' as the kernel is
> executing from them. At the moment only PPC32 will use it and changing
> page attributes on the fly is not an issue.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Reported-by: kbuild test robot <lkp@intel.com>
> [ruscur: cast "data" to unsigned long instead of int]
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> ---
>  arch/powerpc/include/asm/set_memory.h |  2 ++
>  arch/powerpc/mm/pageattr.c            | 33 +++++++++++++++++++++++++++
>  2 files changed, 35 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/set_memory.h b/arch/powerpc/include/asm/set_memory.h
> index 64011ea444b4..b040094f7920 100644
> --- a/arch/powerpc/include/asm/set_memory.h
> +++ b/arch/powerpc/include/asm/set_memory.h
> @@ -29,4 +29,6 @@ static inline int set_memory_x(unsigned long addr, int numpages)
>  	return change_memory_attr(addr, numpages, SET_MEMORY_X);
>  }
>  
> +int set_memory_attr(unsigned long addr, int numpages, pgprot_t prot);
> +
>  #endif
> diff --git a/arch/powerpc/mm/pageattr.c b/arch/powerpc/mm/pageattr.c
> index 748fa56d9db0..60139fedc6cc 100644
> --- a/arch/powerpc/mm/pageattr.c
> +++ b/arch/powerpc/mm/pageattr.c
> @@ -77,3 +77,36 @@ int change_memory_attr(unsigned long addr, int numpages, long action)
>  
>  	return apply_to_page_range(&init_mm, start, sz, change_page_attr, (void *)action);
>  }
> +
> +/*
> + * Set the attributes of a page:
> + *
> + * This function is used by PPC32 at the end of init to set final kernel memory
> + * protection. It includes changing the maping of the page it is executing from
> + * and data pages it is using.
> + */
> +static int set_page_attr(pte_t *ptep, unsigned long addr, void *data)
> +{
> +	pgprot_t prot = __pgprot((unsigned long)data);
> +
> +	spin_lock(&init_mm.page_table_lock);
> +
> +	set_pte_at(&init_mm, addr, ptep, pte_modify(*ptep, prot));
> +	flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> +
> +	spin_unlock(&init_mm.page_table_lock);
> +
> +	return 0;
> +}
> +
> +int set_memory_attr(unsigned long addr, int numpages, pgprot_t prot)
> +{
> +	unsigned long start = ALIGN_DOWN(addr, PAGE_SIZE);
> +	unsigned long sz = numpages * PAGE_SIZE;
> +
> +	if (!numpages)
> +		return 0;
> +
> +	return apply_to_page_range(&init_mm, start, sz, set_page_attr,
> +				   (void *)pgprot_val(prot));

This should probably use apply_to_existing_page_range as well. 

Regards,
Daniel

> +}
> -- 
> 2.25.1

^ permalink raw reply

* Re: [PATCH v6 1/7] powerpc/mm: Implement set_memory() routines
From: Daniel Axtens @ 2020-03-11  6:03 UTC (permalink / raw)
  To: Russell Currey, linuxppc-dev; +Cc: ajd, kernel-hardening, npiggin, joel
In-Reply-To: <20200310010338.21205-2-ruscur@russell.cc>

Russell Currey <ruscur@russell.cc> writes:

> The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX,
> and are generally useful primitives to have.  This implementation is
> designed to be completely generic across powerpc's many MMUs.
>
> It's possible that this could be optimised to be faster for specific
> MMUs, but the focus is on having a generic and safe implementation for
> now.
>
> This implementation does not handle cases where the caller is attempting
> to change the mapping of the page it is executing from, or if another
> CPU is concurrently using the page being altered.  These cases likely
> shouldn't happen, but a more complex implementation with MMU-specific code
> could safely handle them, so that is left as a TODO for now.
>
> These functions do nothing if STRICT_KERNEL_RWX is not enabled.
>
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> v6: Merge patch 8/8 from v5, handling RWX not being enabled.
>     Add note to change_page_attr() in case it's ever made non-static
> ---
>  arch/powerpc/Kconfig                  |  1 +
>  arch/powerpc/include/asm/set_memory.h | 32 +++++++++++
>  arch/powerpc/mm/Makefile              |  2 +-
>  arch/powerpc/mm/pageattr.c            | 79 +++++++++++++++++++++++++++
>  4 files changed, 113 insertions(+), 1 deletion(-)
>  create mode 100644 arch/powerpc/include/asm/set_memory.h
>  create mode 100644 arch/powerpc/mm/pageattr.c
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 497b7d0b2d7e..bd074246e34e 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -129,6 +129,7 @@ config PPC
>  	select ARCH_HAS_PTE_SPECIAL
>  	select ARCH_HAS_MEMBARRIER_CALLBACKS
>  	select ARCH_HAS_SCALED_CPUTIME		if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
> +	select ARCH_HAS_SET_MEMORY
>  	select ARCH_HAS_STRICT_KERNEL_RWX	if ((PPC_BOOK3S_64 || PPC32) && !HIBERNATION)
>  	select ARCH_HAS_TICK_BROADCAST		if GENERIC_CLOCKEVENTS_BROADCAST
>  	select ARCH_HAS_UACCESS_FLUSHCACHE
> diff --git a/arch/powerpc/include/asm/set_memory.h b/arch/powerpc/include/asm/set_memory.h
> new file mode 100644
> index 000000000000..64011ea444b4
> --- /dev/null
> +++ b/arch/powerpc/include/asm/set_memory.h
> @@ -0,0 +1,32 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _ASM_POWERPC_SET_MEMORY_H
> +#define _ASM_POWERPC_SET_MEMORY_H
> +
> +#define SET_MEMORY_RO	0
> +#define SET_MEMORY_RW	1
> +#define SET_MEMORY_NX	2
> +#define SET_MEMORY_X	3
> +
> +int change_memory_attr(unsigned long addr, int numpages, long action);
> +
> +static inline int set_memory_ro(unsigned long addr, int numpages)
> +{
> +	return change_memory_attr(addr, numpages, SET_MEMORY_RO);
> +}
> +
> +static inline int set_memory_rw(unsigned long addr, int numpages)
> +{
> +	return change_memory_attr(addr, numpages, SET_MEMORY_RW);
> +}
> +
> +static inline int set_memory_nx(unsigned long addr, int numpages)
> +{
> +	return change_memory_attr(addr, numpages, SET_MEMORY_NX);
> +}
> +
> +static inline int set_memory_x(unsigned long addr, int numpages)
> +{
> +	return change_memory_attr(addr, numpages, SET_MEMORY_X);
> +}
> +
> +#endif
> diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
> index 5e147986400d..a998fdac52f9 100644
> --- a/arch/powerpc/mm/Makefile
> +++ b/arch/powerpc/mm/Makefile
> @@ -5,7 +5,7 @@
>  
>  ccflags-$(CONFIG_PPC64)	:= $(NO_MINIMAL_TOC)
>  
> -obj-y				:= fault.o mem.o pgtable.o mmap.o \
> +obj-y				:= fault.o mem.o pgtable.o mmap.o pageattr.o \
>  				   init_$(BITS).o pgtable_$(BITS).o \
>  				   pgtable-frag.o ioremap.o ioremap_$(BITS).o \
>  				   init-common.o mmu_context.o drmem.o
> diff --git a/arch/powerpc/mm/pageattr.c b/arch/powerpc/mm/pageattr.c
> new file mode 100644
> index 000000000000..748fa56d9db0
> --- /dev/null
> +++ b/arch/powerpc/mm/pageattr.c
> @@ -0,0 +1,79 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +/*
> + * MMU-generic set_memory implementation for powerpc
> + *
> + * Copyright 2019, IBM Corporation.
> + */
> +
> +#include <linux/mm.h>
> +#include <linux/set_memory.h>
> +
> +#include <asm/mmu.h>
> +#include <asm/page.h>
> +#include <asm/pgtable.h>
> +
> +
> +/*
> + * Updates the attributes of a page in three steps:
> + *
> + * 1. invalidate the page table entry
> + * 2. flush the TLB
> + * 3. install the new entry with the updated attributes
> + *
> + * This is unsafe if the caller is attempting to change the mapping of the
> + * page it is executing from, or if another CPU is concurrently using the
> + * page being altered.
> + *
> + * TODO make the implementation resistant to this.
> + *
> + * NOTE: can be dangerous to call without STRICT_KERNEL_RWX
> + */
> +static int change_page_attr(pte_t *ptep, unsigned long addr, void *data)
> +{
> +	long action = (long)data;
> +	pte_t pte;
> +
> +	spin_lock(&init_mm.page_table_lock);
> +
> +	/* invalidate the PTE so it's safe to modify */
> +	pte = ptep_get_and_clear(&init_mm, addr, ptep);
> +	flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> +
> +	/* modify the PTE bits as desired, then apply */
> +	switch (action) {
> +	case SET_MEMORY_RO:
> +		pte = pte_wrprotect(pte);
> +		break;
> +	case SET_MEMORY_RW:
> +		pte = pte_mkwrite(pte);
> +		break;
> +	case SET_MEMORY_NX:
> +		pte = pte_exprotect(pte);
> +		break;
> +	case SET_MEMORY_X:
> +		pte = pte_mkexec(pte);
> +		break;
> +	default:
> +		break;

Should this have a WARN_ON_ONCE to let you know you're doing something
that doesn't work? I know it's only ever called by things in this file,
but still... Anyway it's very minor and I'm not fussed either way.

> +	}
> +
> +	set_pte_at(&init_mm, addr, ptep, pte);
> +	spin_unlock(&init_mm.page_table_lock);

Initially I thought: shouldn't you put the PTL lock/unlock in the outer
function? Then I remembered that apply_to_page_range can potentially
allocate new page table entries which would deadlock if you held the
lock.

Speaking of which - apply_to_page_range will create new pte entries if
you apply it over an address range that isn't filled in. That doesn't
really make sense here - should you use apply_to_existing_page_range
instead?

You _might_ be able to move the PTL lock if you use
apply_to_existing_page_range but I'm not completely sure if that's safe
or if the speed boost is worth it. You could check mm/memory.c if you
wanted.

> +
> +	return 0;
> +}
> +
> +int change_memory_attr(unsigned long addr, int numpages, long action)
> +{
> +	unsigned long start = ALIGN_DOWN(addr, PAGE_SIZE);
> +	unsigned long sz = numpages * PAGE_SIZE;
> +
> +	if (!IS_ENABLED(CONFIG_STRICT_KERNEL_RWX))
> +		return 0;
> +
> +	if (!numpages)
> +		return 0;

What happens if numpages is negative? Doesn't the guard need to check
for that rather than just for zero?

With those caveats, and noting that I've been focused only on:
 - lock/unlock paths
 - integer arithmetic
 - stuff about apply_page_range semantics
this patch is:

Reviewed-by: Daniel Axtens <dja@axtens.net>

Regards,
Daniel

> +
> +	return apply_to_page_range(&init_mm, start, sz, change_page_attr, (void *)action);
> +}
> -- 
> 2.25.1

^ permalink raw reply

* [PATCH] pseries/iommu: Tweak ddw behavior in presence of pmem
From: Vaibhav Jain @ 2020-03-11  5:50 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Vaibhav Jain, Michael Ellerman, Aneesh Kumar K . V

Recently we discovered an issue on pseries guests that prevents pci
devices from accessing pmem memory via DMA. Performing such an
operation will cause PHB to freeze the corresponding partition
endpoint and in some scenarios will shutdown the disk that hosts the
rootfs.

A fix for this is in works until then this patch proposes to disable
DDW if pmem nodes are present in the device-tree. This would force all
DMA from I/O adapters through default 2-GB window and prevent direct
access of pmem memory which is located beyond 4-TB guest physical
address.

Since this change can have performance penalty for cases where its
known that i/o adapters wont be performing DMA to pmem, the patch
adds new args to the 'disable_ddw' kernel commanline flag with
following possible values:

'default' : Enable DDW only if no Pmem nodes present in device-tree
'Yes' : Disable DDW always
'No'  : Force enable DDW even if Pmem nodes present in device-tree

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
 .../admin-guide/kernel-parameters.txt         | 10 ++-
 arch/powerpc/platforms/pseries/iommu.c        | 67 +++++++++++++++++--
 2 files changed, 70 insertions(+), 7 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index c07815d230bc..58e09f7a2cb9 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -901,9 +901,13 @@
 			The feature only exists starting from
 			Arch Perfmon v4 (Skylake and newer).
 
-	disable_ddw	[PPC/PSERIES]
-			Disable Dynamic DMA Window support. Use this if
-			to workaround buggy firmware.
+	disable_ddw=	[PPC/PSERIES]
+			Controls weather Dynamic DMA Window support is enabled.
+			Use this if to workaround buggy firmware. Following
+			values are supported:
+                on      Disable ddw always
+                off     Enable ddw always
+		default Enable ddw if no Persistent memory present (default)
 
 	disable_ipv6=	[IPV6]
 			See Documentation/networking/ipv6.txt.
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 2e0a8eab5588..97498cc25c9f 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -12,6 +12,7 @@
 
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/memblock.h>
@@ -755,12 +756,39 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
 		       pci_name(dev));
 }
 
+/*
+ * Following values for the variable are handled
+ * '-1': Force enable ddw even if Persistent memory is present
+ * '0' : Enable ddw if no Persistent memory present (default)
+ * '1' : Disable ddw always
+ */
 static int __read_mostly disable_ddw;
 
-static int __init disable_ddw_setup(char *str)
+static int __init disable_ddw_setup(char *param)
 {
-	disable_ddw = 1;
-	printk(KERN_INFO "ppc iommu: disabling ddw.\n");
+	bool val;
+	int res;
+
+	/* Maintain old behaviour that disables DDW when flag given */
+	if (!param) {
+		disable_ddw = 1;
+		return 0;
+	}
+
+	res = strtobool(param, &val);
+
+	if (!res) {
+		if (val) {
+			disable_ddw = 1;
+			pr_info("ppc iommu: disabling ddw.\n");
+		} else if (!val) {
+			/* Force enable of DDW even if pmem is available */
+			disable_ddw = -1;
+			pr_info("ppc iommu: will force enable ddw.\n");
+		}
+	} else if (strcmp(param, "default") == 0) {
+		disable_ddw = 0;
+	}
 
 	return 0;
 }
@@ -1313,6 +1341,37 @@ static struct notifier_block iommu_reconfig_nb = {
 	.notifier_call = iommu_reconfig_notifier,
 };
 
+/* Check if DDW can be supported for this lpar */
+int ddw_supported(void)
+{
+	struct device_node *dn;
+
+	if (disable_ddw == -1) /* force enable ddw */
+		goto out;
+
+	if (disable_ddw == 1)
+		return 0;
+
+	/*
+	 * Due to DMA window limitations currently DDW is not supported
+	 * for persistent memory. This is due 1 TiB size of direct mapped
+	 * DMA window size limitation enforce by phyp. Since pmem memory
+	 * will be mapped at phy address > 4TiB, we cannot accmodate pmem
+	 * in the DDW window and DMA's to/from the pmem memory will result in
+	 * PHBs getting frozen triggering EEH. Hence for the the time being
+	 * disable DDW in presence of a 'ibm,pmemory' node.
+	 */
+	dn = of_find_compatible_node(NULL, NULL, "ibm,pmemory");
+	if (dn) {
+		pr_info("IOMMU: Disabling DDW as pmem memory available\n");
+		of_node_put(dn);
+		return 0;
+	}
+ out:
+	pr_info("IOMMU: Enabling DDW support\n");
+	return 1;
+}
+
 /* These are called very early. */
 void iommu_init_early_pSeries(void)
 {
@@ -1322,7 +1381,7 @@ void iommu_init_early_pSeries(void)
 	if (firmware_has_feature(FW_FEATURE_LPAR)) {
 		pseries_pci_controller_ops.dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
 		pseries_pci_controller_ops.dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
-		if (!disable_ddw)
+		if (ddw_supported())
 			pseries_pci_controller_ops.iommu_bypass_supported =
 				iommu_bypass_supported_pSeriesLP;
 	} else {
-- 
2.24.1


^ permalink raw reply related

* [PATCH -next 000/491] treewide: use fallthrough;
From: Joe Perches @ 2020-03-11  4:51 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, linux-tegra, kvmarm, linux-csky,
	linux-m68k, linux-mips, linux-kernel, kvm, oprofile-list, kvm-ppc,
	linuxppc-dev, linux-riscv, netdev, bpf, linux-edac, linux-block,
	linux-crypto, linux-acpi, devel, linux-ide, linux-atm-general,
	drbd-dev, ceph-devel, xen-devel, linux-bluetooth,
	openipmi-developer, linux-samsung-soc, linux-pm, linux-arm-kernel,
	dmaengine, linux1394-devel, linux-gpio, linux-aspeed, linux-stm32,
	amd-gfx, dri-devel, intel-gvt-dev, intel-gfx, linux-amlogic,
	nouveau, greybus-dev, linux-input, linux-usb, linux-hyperv,
	linux-hwmon, linux-i2c, openbmc, linux-iio, linux-rdma,
	target-devel, patches, iommu, virtualization, linux-bcache,
	dm-devel, linux-raid, linux-media, linux-arm-msm,
	linux-renesas-soc, MPT-FusionLinux.pdl, linux-scsi, linux-mmc,
	linux-mtd, linux-can, linux-mediatek, linux-acenic,
	bcm-kernel-feedback-list, linux-parisc, intel-wired-lan,
	linux-hams, ath10k, ath11k, linux-wireless, wcn36xx, b43-dev,
	linux-nfc, linux-ntb, linux-nvme, linux-pci, linux-rockchip,
	platform-driver-x86, ibm-acpi-devel, linux-remoteproc, linux-rtc,
	linux-s390, esc.storagedev, open-iscsi, megaraidlinux.pdl,
	linux-spi, linux-rpi-kernel, linux-serial, linux-unisoc,
	sparclinux, accessrunner-general, usb-storage, linux-fbdev,
	linux-watchdog, v9fs-developer, linux-fsdevel, linux-afs,
	linux-aio, linux-btrfs, linux-cifs, samba-technical, linux-nvdimm,
	cluster-devel, linux-erofs, linux-ext4, linux-f2fs-devel,
	io-uring, linux-xfs, linux-nfs, linux-nilfs, linux-mm,
	linux-audit, linux-security-module, kgdb-bugreport, cgroups,
	netfilter-devel, coreteam, dccp, linux-decnet-user, mptcp,
	lvs-devel, dev, rds-devel, cake, linux-sctp, tipc-discussion,
	linux-x25, linux-integrity, keyrings, selinux, alsa-devel,
	clang-built-linux
  Cc: uclinux-h8-devel, linux-xtensa, brcm80211-dev-list.pdl, devel,
	linux-ia64, linux-c6x-dev, linux-sh, oss-drivers, linux-hexagon,
	bridge, linux-um, qat-linux, brcm80211-dev-list, linux-wpan,
	openrisc, linux-alpha, linux-i3c, linux-snps-arc, freedreno,
	linux-clk, ocfs2-devel

There is a new fallthrough pseudo-keyword macro that can be used
to replace the various /* fallthrough */ style comments that are
used to indicate a case label code block is intended to fallthrough
to the next case label block.

See commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough'
pseudo keyword for switch/case use")

These patches are intended to allow clang to detect missing
switch/case fallthrough uses.

Do a depth-first pass on the MAINTAINERS file and find the various
F: pattern files and convert the fallthrough comments to fallthrough;
for all files matched by all  F: patterns in in each section.

Done via the perl script below and the previously posted
cvt_fallthrough.pl script.

Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/

These patches are based on next-20200310 and are available in

git://repo.or.cz/linux-2.6/trivial-mods.git in branch 20200310_fallthrough_2

$ cat commit_fallthrough.pl
#!/usr/bin/env perl

use sort 'stable';

#
# Reorder a sorted array so file entries are before directory entries
# depends on a trailing / for directories
# so:
#   foo/
#   foo/bar.c
# becomes
#   foo/bar.c
#   foo/
#
sub file_before_directory {
    my ($array_ref) = (@_);

    my $count = scalar(@$array_ref);

    for (my $i = 1; $i < $count; $i++) {
	if (substr(@$array_ref[$i - 1], -1) eq '/' &&
	    substr(@$array_ref[$i], 0, length(@$array_ref[$i - 1])) eq @$array_ref[$i - 1]) {
		my $string = @$array_ref[$i - 1];
		@$array_ref[$i - 1] = @$array_ref[$i];
		@$array_ref[$i] = $string;
	    }
	}
}

sub uniq {
    my (@parms) = @_;

    my %saw;
    @parms = grep(!$saw{$_}++, @parms);

    return @parms;
}

# Get all the F: file patterns in MAINTAINERS that could be a .[ch] file
my $maintainer_patterns = `grep -P '^F:\\s+' MAINTAINERS`;
my @patterns = split('\n', $maintainer_patterns);
s/^F:\s*// for @patterns;
@patterns = grep(!/^(?:Documentation|tools|scripts)\//, @patterns);
@patterns = grep(!/\.(?:dtsi?|rst|config)$/, @patterns);
@patterns = sort @patterns;
@patterns = sort { $b =~ tr/\//\// cmp $a =~ tr/\//\// } @patterns;
file_before_directory(\@patterns);

my %sections_done;

foreach my $pattern (@patterns) {

# Find the files the pattern matches
    my $pattern_files = `git ls-files -- $pattern`;
    my @new_patterns = split('\n', $pattern_files);
    $pattern_files = join(' ', @new_patterns);
    next if ($pattern_files =~ /^\s*$/);

# Find the section the first file matches
    my $pattern_file = @new_patterns[0];
    my $section_output = `./scripts/get_maintainer.pl --nogit --nogit-fallback --sections --pattern-depth=1 $pattern_file`;
    my @section = split('\n', $section_output);
    my $section_header = @section[0];

    print("Section: <$section_header>\n");

# Skip the section if it's already done
    print("Already done '$section_header'\n") if ($sections_done{$section_header});
    next if ($sections_done{$section_header}++);

# Find all the .[ch] files in all F: lines in that section
    my @new_section;
    foreach my $line (@section) {
	last if ($line =~ /^\s*$/);
	push(@new_section, $line);
    }
    @section = grep(/^F:/, @new_section);
    s/^F:\s*// for @section;

    @section = grep(!/^(?:Documentation|tools|scripts)\//, @section);
    @section = grep(!/\.(?:dtsi?|rst|config)$/, @section);
    @section = sort @section;
    @section = uniq(@section);

    my $section_files = join(' ', @section);

    print("section_files: <$section_files>\n");

    next if ($section_files =~ /^\s*$/);

    my $cvt_files = `git ls-files -- $section_files`;
    my @files = split('\n', $cvt_files);

    @files = grep(!/^(?:Documentation|tools|scripts)\//, @files);
    @files = grep(!/\.(?:dtsi?|rst|config)$/, @files);
    @files = grep(/\.[ch]$/, @files);
    @files = sort @files;
    @files = uniq(@files);

    $cvt_files = join(' ', @files);
    print("files: <$cvt_files>\n");

    next if (scalar(@files) < 1);

# Convert fallthroughs for all [.ch] files in the section
    print("doing cvt_fallthrough.pl -- $cvt_files\n");

    `cvt_fallthrough.pl -- $cvt_files`;

# If nothing changed, nothing to commit
    `git diff-index --quiet HEAD --`;
    next if (!$?);

# Commit the changes
    my $fh;

    open($fh, "+>", "cvt_fallthrough.commit_msg") or die "$0: can't create temporary file: $!\n";
    print $fh <<EOF
$section_header: Use fallthrough;

Convert the various uses of fallthrough comments to fallthrough;

Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
EOF
;
    close $fh;

    `git commit -s -a -F cvt_fallthrough.commit_msg`;
}

Joe Perches (491):
  MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
  MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER: Use fallthrough;
  MELLANOX MLX5 core VPI driver: Use fallthrough;
  PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
  ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
  ARM/RISCPC ARCHITECTURE: Use fallthrough;
  KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64): Use
    fallthrough;
  ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: Use fallthrough;
  ARM/Amlogic Meson SoC support: Use fallthrough;
  ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: Use fallthrough;
  ARM/QUALCOMM SUPPORT: Use fallthrough;
  ARM/ZTE ARCHITECTURE: Use fallthrough;
  INGENIC JZ47xx SoCs: Use fallthrough;
  DECSTATION PLATFORM SUPPORT: Use fallthrough;
  KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): Use fallthrough;
  KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
  CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;
  KERNEL VIRTUAL MACHINE for s390 (KVM/s390): Use fallthrough;
  Hyper-V CORE AND DRIVERS: Use fallthrough;
  XEN HYPERVISOR INTERFACE: Use fallthrough;
  KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): Use fallthrough;
  X86 MCE INFRASTRUCTURE: Use fallthrough;
  AMD KFD: Use fallthrough;
  AMD DISPLAY CORE: Use fallthrough;
  AMD POWERPLAY: Use fallthrough;
  INTEL GVT-g DRIVERS (Intel GPU Virtualization): Use fallthrough;
  AMD XGBE DRIVER: Use fallthrough;
  BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER: Use fallthrough;
  BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER: Use fallthrough;
  BROADCOM GENET ETHERNET DRIVER: Use fallthrough;
  BROCADE BNA 10 GIGABIT ETHERNET DRIVER: Use fallthrough;
  CAVIUM LIQUIDIO NETWORK DRIVER: Use fallthrough;
  ARM/CAVIUM THUNDER NETWORK DRIVER: Use fallthrough;
  CXGB3 ETHERNET DRIVER (CXGB3): Use fallthrough;
  CXGB4 ETHERNET DRIVER (CXGB4): Use fallthrough;
  CXGB4VF ETHERNET DRIVER (CXGB4VF): Use fallthrough;
  CISCO VIC ETHERNET NIC DRIVER: Use fallthrough;
  TULIP NETWORK DRIVERS: Use fallthrough;
  Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net): Use
    fallthrough;
  DPAA2 ETHERNET DRIVER: Use fallthrough;
  HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3): Use fallthrough;
  EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER: Use fallthrough;
  INTEL ETHERNET DRIVERS: Use fallthrough;
  MELLANOX ETHERNET DRIVER (mlx4_en): Use fallthrough;
  MELLANOX MLX4 core VPI driver: Use fallthrough;
  MELLANOX FIRMWARE FLASH LIBRARY (mlxfw): Use fallthrough;
  MELLANOX ETHERNET SWITCH DRIVERS: Use fallthrough;
  NETXEN (1/10) GbE SUPPORT: Use fallthrough;
  QLOGIC QL4xxx ETHERNET DRIVER: Use fallthrough;
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER: Use fallthrough;
  SAMSUNG SXGBE DRIVERS: Use fallthrough;
  STMMAC ETHERNET DRIVER: Use fallthrough;
  QUALCOMM ATHEROS ATH10K WIRELESS DRIVER: Use fallthrough;
  QUALCOMM ATHEROS ATH11K WIRELESS DRIVER: Use fallthrough;
  ATHEROS ATH5K WIRELESS DRIVER: Use fallthrough;
  ATHEROS ATH6KL WIRELESS DRIVER: Use fallthrough;
  QUALCOMM ATHEROS ATH9K WIRELESS DRIVER: Use fallthrough;
  CARL9170 LINUX COMMUNITY WIRELESS DRIVER: Use fallthrough;
  QUALCOMM WCN36XX WIRELESS DRIVER: Use fallthrough;
  B43 WIRELESS DRIVER: Use fallthrough;
  B43LEGACY WIRELESS DRIVER: Use fallthrough;
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER: Use fallthrough;
  INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy): Use fallthrough;
  INTEL WIRELESS WIFI LINK (iwlwifi): Use fallthrough;
  ORINOCO DRIVER: Use fallthrough;
  PRISM54 WIRELESS DRIVER: Use fallthrough;
  MARVELL MWIFIEX WIRELESS DRIVER: Use fallthrough;
  MEDIATEK MT76 WIRELESS LAN DRIVER: Use fallthrough;
  MEDIATEK MT7601U WIRELESS LAN DRIVER: Use fallthrough;
  RALINK RT2X00 WIRELESS LAN DRIVER: Use fallthrough;
  RTL8XXXU WIRELESS DRIVER (rtl8xxxu): Use fallthrough;
  REALTEK WIRELESS DRIVER (rtlwifi family): Use fallthrough;
  REALTEK WIRELESS DRIVER (rtw88): Use fallthrough;
  TRACING: Use fallthrough;
  OPROFILE: Use fallthrough;
  PTRACE SUPPORT: Use fallthrough;
  HIBERNATION (aka Software Suspend, aka swsusp): Use fallthrough;
  ARM PMU PROFILING AND DEBUGGING: Use fallthrough;
  ARM/ARTPEC MACHINE SUPPORT: Use fallthrough;
  ARM/Marvell Dove/MV78xx0/Orion SOC support: Use fallthrough;
  MMP SUPPORT: Use fallthrough;
  PXA2xx/PXA3xx SUPPORT: Use fallthrough;
  ARM/RDA MICRO ARCHITECTURE: Use fallthrough;
  ARM/Rockchip SoC support: Use fallthrough;
  ARM/NOMADIK/U300/Ux500 ARCHITECTURES: Use fallthrough;
  PS3 PLATFORM SUPPORT: Use fallthrough;
  LINUX FOR POWER MACINTOSH: Use fallthrough;
  SCx200 CPU SUPPORT: Use fallthrough;
  CAVIUM OCTEON-TX CRYPTO DRIVER: Use fallthrough;
  ARM MALI-DP DRM DRIVER: Use fallthrough;
  DRM DRIVER FOR AST SERVER GRAPHICS CHIPS: Use fallthrough;
  DRM DRIVERS FOR BRIDGE CHIPS: Use fallthrough;
  DRM DRIVERS FOR EXYNOS: Use fallthrough;
  DRM DRIVERS FOR FREESCALE DCU: Use fallthrough;
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative
    chipsets): Use fallthrough;
  DRM DRIVERS FOR FREESCALE IMX: Use fallthrough;
  DRM DRIVERS FOR AMLOGIC SOCS: Use fallthrough;
  DRM DRIVER FOR MSM ADRENO GPU: Use fallthrough;
  DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS: Use fallthrough;
  DRM DRIVERS FOR TI OMAP: Use fallthrough;
  RADEON and AMDGPU DRM DRIVERS: Use fallthrough;
  DRM DRIVER FOR SAVAGE VIDEO CARDS: Use fallthrough;
  DRM DRIVERS FOR ALLWINNER A10: Use fallthrough;
  DRM DRIVERS FOR NVIDIA TEGRA: Use fallthrough;
  DRM DRIVERS FOR TI LCDC: Use fallthrough;
  DRM TTM SUBSYSTEM: Use fallthrough;
  DRM DRIVERS FOR XEN: Use fallthrough;
  BROADCOM NETXTREME-E ROCE DRIVER: Use fallthrough;
  CXGB4 IWARP RNIC DRIVER (IW_CXGB4): Use fallthrough;
  INTEL RDMA RNIC DRIVER: Use fallthrough;
  MELLANOX MLX4 IB driver: Use fallthrough;
  MELLANOX MLX5 IB driver: Use fallthrough;
  EMULEX ONECONNECT ROCE DRIVER: Use fallthrough;
  QLOGIC QL4xxx RDMA DRIVER: Use fallthrough;
  QIB DRIVER: Use fallthrough;
  VMWARE PVRDMA DRIVER: Use fallthrough;
  SOFT-ROCE DRIVER (rxe): Use fallthrough;
  SOFT-IWARP DRIVER (siw): Use fallthrough;
  ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR: Use fallthrough;
  SIANO DVB DRIVER: Use fallthrough;
  VIDEOBUF2 FRAMEWORK: Use fallthrough;
  SAMSUNG S5C73M3 CAMERA DRIVER: Use fallthrough;
  SMIA AND SMIA++ IMAGE SENSOR DRIVER: Use fallthrough;
  BTTV VIDEO4LINUX DRIVER: Use fallthrough;
  CX88 VIDEO4LINUX DRIVER: Use fallthrough;
  MEDIA DRIVERS FOR DIGITAL DEVICES PCIE DEVICES: Use fallthrough;
  MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER: Use fallthrough;
  SAA7134 VIDEO4LINUX DRIVER: Use fallthrough;
  SOFTLOGIC 6x10 MPEG CODEC: Use fallthrough;
  CODA V4L2 MEM2MEM DRIVER: Use fallthrough;
  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS: Use
    fallthrough;
  CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER: Use fallthrough;
  OMAP IMAGING SUBSYSTEM (OMAP3 ISP and OMAP4 ISS): Use fallthrough;
  VICODEC VIRTUAL CODEC DRIVER: Use fallthrough;
  VIVID VIRTUAL VIDEO DRIVER: Use fallthrough;
  SI4713 FM RADIO TRANSMITTER I2C DRIVER: Use fallthrough;
  CEC FRAMEWORK: Use fallthrough;
  DVB_USB_AF9015 MEDIA DRIVER: Use fallthrough;
  DVB_USB_GL861 MEDIA DRIVER: Use fallthrough;
  LME2510 MEDIA DRIVER: Use fallthrough;
  DVB_USB_MXL111SF MEDIA DRIVER: Use fallthrough;
  EM28XX VIDEO4LINUX DRIVER: Use fallthrough;
  GO7007 MPEG CODEC: Use fallthrough;
  GSPCA SN9C20X SUBDRIVER: Use fallthrough;
  GSPCA USB WEBCAM DRIVER: Use fallthrough;
  PULSE8-CEC DRIVER: Use fallthrough;
  PWC WEBCAM DRIVER: Use fallthrough;
  TM6000 VIDEO4LINUX DRIVER: Use fallthrough;
  USB VIDEO CLASS: Use fallthrough;
  ONENAND FLASH DRIVER: Use fallthrough;
  BROADCOM B53 ETHERNET SWITCH DRIVER: Use fallthrough;
  MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER: Use fallthrough;
  MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER: Use fallthrough;
  8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503,
    etc.]: Use fallthrough;
  ALACRITECH GIGABIT ETHERNET DRIVER: Use fallthrough;
  ACENIC DRIVER: Use fallthrough;
  BROADCOM BNX2 GIGABIT ETHERNET DRIVER: Use fallthrough;
  BROADCOM TG3 GIGABIT ETHERNET DRIVER: Use fallthrough;
  ATMEL MACB ETHERNET DRIVER: Use fallthrough;
  FREESCALE QORIQ DPAA ETHERNET DRIVER: Use fallthrough;
  FREESCALE QORIQ DPAA FMAN DRIVER: Use fallthrough;
  FREESCALE QUICC ENGINE UCC ETHERNET DRIVER: Use fallthrough;
  HISILICON NETWORK SUBSYSTEM DRIVER: Use fallthrough;
  LINUX FOR POWERPC (32-BIT AND 64-BIT): Use fallthrough;
  MARVELL MVNETA ETHERNET DRIVER: Use fallthrough;
  MARVELL GIGABIT ETHERNET DRIVERS (skge/sky2): Use fallthrough;
  MEDIATEK ETHERNET DRIVER: Use fallthrough;
  MICROCHIP LAN743X ETHERNET DRIVER: Use fallthrough;
  MICROSEMI ETHERNET SWITCH DRIVER: Use fallthrough;
  NATSEMI ETHERNET DRIVER (DP8381x): Use fallthrough;
  NETERION 10GbE DRIVERS (s2io/vxge): Use fallthrough;
  NETRONOME ETHERNET DRIVERS: Use fallthrough;
  QLOGIC QLA3XXX NETWORK DRIVER: Use fallthrough;
  8169 10/100/1000 GIGABIT ETHERNET DRIVER: Use fallthrough;
  ROCKER DRIVER: Use fallthrough;
  SFC NETWORK DRIVER: Use fallthrough;
  SIS 900/7016 FAST ETHERNET DRIVER: Use fallthrough;
  SOCIONEXT (SNI) NETSEC NETWORK DRIVER: Use fallthrough;
  TI ETHERNET SWITCH DRIVER (CPSW): Use fallthrough;
  TLAN NETWORK DRIVER: Use fallthrough;
  SPIDERNET NETWORK DRIVER for CELL: Use fallthrough;
  INTEL WIRELESS WIMAX CONNECTION 2400: Use fallthrough;
  ATMEL WIRELESS DRIVER: Use fallthrough;
  TI WILINK WIRELESS DRIVERS: Use fallthrough;
  USB ZD1201 DRIVER: Use fallthrough;
  PCI DRIVER FOR IMX6: Use fallthrough;
  ANALOG DEVICES INC IIO DRIVERS: Use fallthrough;
  HANTRO VPU CODEC DRIVER: Use fallthrough;
  MEDIA DRIVERS FOR FREESCALE IMX: Use fallthrough;
  SOC-CAMERA V4L2 SUBSYSTEM: Use fallthrough;
  USB VISION DRIVER: Use fallthrough;
  PARISC ARCHITECTURE: Use fallthrough;
  MICROCHIP USBA UDC DRIVER: Use fallthrough;
  FREESCALE USB PERIPHERAL DRIVERS: Use fallthrough;
  USB TYPEC PORT CONTROLLER DRIVERS: Use fallthrough;
  RADEON FRAMEBUFFER DISPLAY DRIVER: Use fallthrough;
  ARC FRAMEBUFFER DRIVER: Use fallthrough;
  NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER: Use fallthrough;
  OMAP FRAMEBUFFER SUPPORT: Use fallthrough;
  OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2): Use
    fallthrough;
  S3 SAVAGE FRAMEBUFFER DRIVER: Use fallthrough;
  SIS FRAMEBUFFER DRIVER: Use fallthrough;
  VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER: Use fallthrough;
  CAN NETWORK DRIVERS: Use fallthrough;
  WOLFSON MICROELECTRONICS DRIVERS: Use fallthrough;
  DIALOG SEMICONDUCTOR DRIVERS: Use fallthrough;
  MEDIA INPUT INFRASTRUCTURE (V4L/DVB): Use fallthrough;
  CAN NETWORK LAYER: Use fallthrough;
  HSI SUBSYSTEM: Use fallthrough;
  MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM: Use
    fallthrough;
  KERNEL NFSD, SUNRPC, AND LOCKD SERVERS: Use fallthrough;
  SOFTWARE RAID (Multiple Disks) SUPPORT: Use fallthrough;
  SPI SUBSYSTEM: Use fallthrough;
  NFS, SUNRPC, AND LOCKD CLIENTS: Use fallthrough;
  TC subsystem: Use fallthrough;
  FCOE SUBSYSTEM (libfc, libfcoe, fcoe): Use fallthrough;
  CRYPTO API: Use fallthrough;
  BPF (Safe dynamic programs and tools): Use fallthrough;
  OMAP USB SUPPORT: Use fallthrough;
  OMAP1 SUPPORT: Use fallthrough;
  OMAP2+ SUPPORT: Use fallthrough;
  ARM SUB-ARCHITECTURES: Use fallthrough;
  M68K ON APPLE MACINTOSH: Use fallthrough;
  PCI SUBSYSTEM: Use fallthrough;
  FPU EMULATOR: Use fallthrough;
  X86 MM: Use fallthrough;
  NETWORKING [IPv4/IPv6]: Use fallthrough;
  USER-MODE LINUX (UML): Use fallthrough;
  ACPI COMPONENT ARCHITECTURE (ACPICA): Use fallthrough;
  FIRMWARE LOADER (request_firmware): Use fallthrough;
  ATA OVER ETHERNET (AOE) DRIVER: Use fallthrough;
  DRBD DRIVER: Use fallthrough;
  PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES: Use fallthrough;
  FLASH ADAPTER DRIVER (IBM Flash Adapter 900GB Full Height PCI Flash
    Card): Use fallthrough;
  XEN BLOCK SUBSYSTEM: Use fallthrough;
  AGPGART DRIVER: Use fallthrough;
  IPMI SUBSYSTEM: Use fallthrough;
  TI DAVINCI SERIES CLOCK DRIVER: Use fallthrough;
  H8/300 ARCHITECTURE: Use fallthrough;
  VIRTIO CORE AND NET DRIVERS: Use fallthrough;
  DRM DRIVERS AND MISC GPU PATCHES: Use fallthrough;
  USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...): Use
    fallthrough;
  ARM/CORESIGHT FRAMEWORK AND DRIVERS: Use fallthrough;
  INTEL(R) TRACE HUB: Use fallthrough;
  I2C SUBSYSTEM HOST DRIVERS: Use fallthrough;
  ARM/ZYNQ ARCHITECTURE: Use fallthrough;
  I3C DRIVER FOR SYNOPSYS DESIGNWARE: Use fallthrough;
  SENSIRION SPS30 AIR POLLUTION SENSOR DRIVER: Use fallthrough;
  IIO DIGITAL POTENTIOMETER DAC: Use fallthrough;
  ASAHI KASEI AK8974 DRIVER: Use fallthrough;
  HFI1 DRIVER: Use fallthrough;
  RDMAVT - RDMA verbs software: Use fallthrough;
  ISCSI EXTENSIONS FOR RDMA (ISER) TARGET: Use fallthrough;
  OPA-VNIC DRIVER: Use fallthrough;
  FLYSKY FSIA6B RC RECEIVER: Use fallthrough;
  WACOM PROTOCOL 4 SERIAL TABLETS: Use fallthrough;
  ATMEL MAXTOUCH DRIVER: Use fallthrough;
  ISDN/mISDN SUBSYSTEM: Use fallthrough;
  BCACHE (BLOCK LAYER CACHE): Use fallthrough;
  DEVICE-MAPPER (LVM): Use fallthrough;
  TI FLASH MEDIA MEMORYSTICK/MMC DRIVERS: Use fallthrough;
  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI): Use fallthrough;
  INTEL MIC DRIVERS (mic): Use fallthrough;
  SGI GRU DRIVER: Use fallthrough;
  SGI XP/XPC/XPNET DRIVER: Use fallthrough;
  BLOCK2MTD DRIVER: Use fallthrough;
  PHRAM MTD DRIVER: Use fallthrough;
  NAND FLASH SUBSYSTEM: Use fallthrough;
  SPI NOR SUBSYSTEM: Use fallthrough;
  UNSORTED BLOCK IMAGES (UBI): Use fallthrough;
  APPLETALK NETWORK LAYER: Use fallthrough;
  ARCNET NETWORK LAYER: Use fallthrough;
  BONDING DRIVER: Use fallthrough;
  MEDIATEK SWITCH DRIVER: Use fallthrough;
  NETWORKING [DSA]: Use fallthrough;
  BAYCOM/HDLCDRV DRIVERS FOR AX.25: Use fallthrough;
  IEEE 802.15.4 SUBSYSTEM: Use fallthrough;
  NETDEVSIM: Use fallthrough;
  ANALOG DEVICES INC ADIN DRIVER: Use fallthrough;
  PTP HARDWARE CLOCK SUPPORT: Use fallthrough;
  SFF/SFP/SFP+ MODULE SUPPORT: Use fallthrough;
  ETHERNET PHY LIBRARY: Use fallthrough;
  USB LAN78XX ETHERNET DRIVER: Use fallthrough;
  USB PEGASUS DRIVER: Use fallthrough;
  USB RTL8150 DRIVER: Use fallthrough;
  USB "USBNET" DRIVER FRAMEWORK: Use fallthrough;
  USB NETWORKING DRIVERS: Use fallthrough;
  FRAME RELAY DLCI/FRAD (Sangoma drivers too): Use fallthrough;
  MAC80211: Use fallthrough;
  RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER: Use fallthrough;
  NETWORKING DRIVERS (WIRELESS): Use fallthrough;
  XEN NETWORK BACKEND DRIVER: Use fallthrough;
  NVM EXPRESS FC TRANSPORT DRIVERS: Use fallthrough;
  NVM EXPRESS DRIVER: Use fallthrough;
  NVM EXPRESS TARGET DRIVER: Use fallthrough;
  ACPI: Use fallthrough;
  BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE: Use fallthrough;
  PIN CONTROLLER - INTEL: Use fallthrough;
  MIPS: Use fallthrough;
  X86 PLATFORM DRIVERS: Use fallthrough;
  CHROMEOS EC SUBDRIVERS: Use fallthrough;
  POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS: Use fallthrough;
  S390 COMMON I/O LAYER: Use fallthrough;
  S390 VFIO AP DRIVER: Use fallthrough;
  S390 ZCRYPT DRIVER: Use fallthrough;
  S390 IUCV NETWORK LAYER: Use fallthrough;
  S390 NETWORK DRIVERS: Use fallthrough;
  S390 ZFCP DRIVER: Use fallthrough;
  AACRAID SCSI RAID DRIVER: Use fallthrough;
  AIC7XXX / AIC79XX SCSI DRIVER: Use fallthrough;
  NCR 5380 SCSI DRIVERS: Use fallthrough;
  Emulex 10Gbps iSCSI - OneConnect DRIVER: Use fallthrough;
  BROCADE BFA FC SCSI DRIVER: Use fallthrough;
  BROADCOM BNX2FC 10 GIGABIT FCOE DRIVER: Use fallthrough;
  CXGB3 ISCSI DRIVER (CXGB3I): Use fallthrough;
  CXGB4 ISCSI DRIVER (CXGB4I): Use fallthrough;
  CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash)
    SCSI DRIVER: Use fallthrough;
  HISILICON SAS Controller: Use fallthrough;
  IBM Power Virtual SCSI Device Target Driver: Use fallthrough;
  INTEL C600 SERIES SAS CONTROLLER DRIVER: Use fallthrough;
  EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER: Use fallthrough;
  MEGARAID SCSI/SAS DRIVERS: Use fallthrough;
  NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST
    ADAPTER DRIVER: Use fallthrough;
  QLOGIC QLA2XXX FC-SCSI DRIVER: Use fallthrough;
  QLOGIC QLA4XXX iSCSI DRIVER: Use fallthrough;
  MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi): Use fallthrough;
  LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers: Use
    fallthrough;
  UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER: Use fallthrough;
  STAGING - COMEDI: Use fallthrough;
  DPAA2 ETHERNET SWITCH DRIVER: Use fallthrough;
  QLOGIC QLGE 10Gb ETHERNET DRIVER: Use fallthrough;
  STAGING - REALTEK RTL8188EU DRIVERS: Use fallthrough;
  STAGING - REALTEK RTL8712U DRIVERS: Use fallthrough;
  STAGING - VIA VT665X DRIVERS: Use fallthrough;
  HYPERVISOR VIRTUAL CONSOLE DRIVER: Use fallthrough;
  SYNOPSYS ARC ARCHITECTURE: Use fallthrough;
  MICROCHIP AT91 SERIAL DRIVER: Use fallthrough;
  KGDB / KDB /debug_core: Use fallthrough;
  TEGRA SERIAL DRIVER: Use fallthrough;
  TTY LAYER: Use fallthrough;
  CONEXANT ACCESSRUNNER USB DRIVER: Use fallthrough;
  USB CYPRESS C67X00 DRIVER: Use fallthrough;
  DESIGNWARE USB3 DRD IP DRIVER: Use fallthrough;
  USB GADGET/PERIPHERAL SUBSYSTEM: Use fallthrough;
  USB EHCI DRIVER: Use fallthrough;
  USB ISP116X DRIVER: Use fallthrough;
  USB OHCI DRIVER: Use fallthrough;
  USB XHCI DRIVER: Use fallthrough;
  MEDIATEK USB3 DRD IP DRIVER: Use fallthrough;
  MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER: Use fallthrough;
  USB PHY LAYER: Use fallthrough;
  USB SERIAL SUBSYSTEM: Use fallthrough;
  USB ATTACHED SCSI: Use fallthrough;
  USB MASS STORAGE DRIVER: Use fallthrough;
  USB OVER IP DRIVER: Use fallthrough;
  ADP8860 BACKLIGHT DRIVER (ADP8860/ADP8861/ADP8863): Use fallthrough;
  MICROCHIP LCDFB DRIVER: Use fallthrough;
  FREESCALE DIU FRAMEBUFFER DRIVER: Use fallthrough;
  SAMSUNG FRAMEBUFFER DRIVER: Use fallthrough;
  VIRTUAL BOX GUEST DEVICE DRIVER: Use fallthrough;
  FANOTIFY: Use fallthrough;
  MULTIFUNCTION DEVICES (MFD): Use fallthrough;
  MULTIPLEXER SUBSYSTEM: Use fallthrough;
  VOLTAGE AND CURRENT REGULATOR FRAMEWORK: Use fallthrough;
  RESET CONTROLLER FRAMEWORK: Use fallthrough;
  SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC): Use
    fallthrough;
  CEPH COMMON CODE (LIBCEPH): Use fallthrough;
  GPIO SUBSYSTEM: Use fallthrough;
  GREYBUS SUBSYSTEM: Use fallthrough;
  INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS: Use
    fallthrough;
  MEMORY TECHNOLOGY DEVICES (MTD): Use fallthrough;
  ETHERNET BRIDGE: Use fallthrough;
  PIN CONTROL SUBSYSTEM: Use fallthrough;
  NFC SUBSYSTEM: Use fallthrough;
  REAL TIME CLOCK (RTC) SUBSYSTEM: Use fallthrough;
  CPU FREQUENCY SCALING FRAMEWORK: Use fallthrough;
  NOHZ, DYNTICKS SUPPORT: Use fallthrough;
  SONICS SILICON BACKPLANE DRIVER (SSB): Use fallthrough;
  USB SUBSYSTEM: Use fallthrough;
  9P FILE SYSTEM: Use fallthrough;
  BLUETOOTH SUBSYSTEM: Use fallthrough;
  NETFILTER: Use fallthrough;
  PHONET PROTOCOL: Use fallthrough;
  SCTP PROTOCOL: Use fallthrough;
  AFS FILESYSTEM: Use fallthrough;
  EROFS FILE SYSTEM: Use fallthrough;
  F2FS FILE SYSTEM: Use fallthrough;
  FILESYSTEM DIRECT ACCESS (DAX): Use fallthrough;
  HARDWARE MONITORING: Use fallthrough;
  INFINIBAND SUBSYSTEM: Use fallthrough;
  NILFS2 FILESYSTEM: Use fallthrough;
  RXRPC SOCKETS (AF_RXRPC): Use fallthrough;
  ATM: Use fallthrough;
  AUDIT SUBSYSTEM: Use fallthrough;
  BTRFS FILE SYSTEM: Use fallthrough;
  CAPABILITIES: Use fallthrough;
  HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa): Use fallthrough;
  DCCP PROTOCOL: Use fallthrough;
  DEVLINK: Use fallthrough;
  XFS FILESYSTEM: Use fallthrough;
  FRAMEBUFFER LAYER: Use fallthrough;
  FILE LOCKING (flock() and fcntl()/lockf()): Use fallthrough;
  FIREWIRE SUBSYSTEM: Use fallthrough;
  FILESYSTEMS (VFS and infrastructure): Use fallthrough;
  FUTEX SUBSYSTEM: Use fallthrough;
  HID CORE LAYER: Use fallthrough;
  I2C SUBSYSTEM: Use fallthrough;
  NETWORKING DRIVERS: Use fallthrough;
  NETWORKING [GENERAL]: Use fallthrough;
  KEYS/KEYRINGS: Use fallthrough;
  LIGHTNVM PLATFORM SUPPORT: Use fallthrough;
  PARALLEL PORT SUBSYSTEM: Use fallthrough;
  SCHEDULER: Use fallthrough;
  SELINUX SECURITY MODULE: Use fallthrough;
  THERMAL: Use fallthrough;
  TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER: Use fallthrough;
  VFIO DRIVER: Use fallthrough;
  VIRTIO BLOCK AND SCSI DRIVERS: Use fallthrough;
  WATCHDOG DEVICE DRIVERS: Use fallthrough;
  SOUND: Use fallthrough;
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA): Use fallthrough;
  ALPHA PORT: Use fallthrough;
  ARM PORT: Use fallthrough;
  ARM64 PORT (AARCH64 ARCHITECTURE): Use fallthrough;
  C6X ARCHITECTURE: Use fallthrough;
  C-SKY ARCHITECTURE: Use fallthrough;
  QUALCOMM HEXAGON ARCHITECTURE: Use fallthrough;
  IA64 (Itanium) PLATFORM: Use fallthrough;
  MICROBLAZE ARCHITECTURE: Use fallthrough;
  ANDES ARCHITECTURE: Use fallthrough;
  OPENRISC ARCHITECTURE: Use fallthrough;
  RISC-V ARCHITECTURE: Use fallthrough;
  S390: Use fallthrough;
  SUPERH: Use fallthrough;
  SPARC + UltraSPARC (sparc/sparc64): Use fallthrough;
  UNICORE32 ARCHITECTURE: Use fallthrough;
  X86 ARCHITECTURE (32-BIT AND 64-BIT): Use fallthrough;
  TENSILICA XTENSA PORT (xtensa): Use fallthrough;
  ASYNCHRONOUS TRANSFERS/TRANSFORMS (IOAT) API: Use fallthrough;
  LIBATA SATA AHCI PLATFORM devices support: Use fallthrough;
  LIBATA PATA DRIVERS: Use fallthrough;
  LIBATA SATA PROMISE TX2/TX4 CONTROLLER DRIVER: Use fallthrough;
  LIBATA SUBSYSTEM (Serial and Parallel ATA drivers): Use fallthrough;
  PARALLEL LCD/KEYPAD PANEL DRIVER: Use fallthrough;
  FLOPPY DRIVER: Use fallthrough;
  RADOS BLOCK DEVICE (RBD): Use fallthrough;
  STEC S1220 SKD DRIVER: Use fallthrough;
  BLOCK LAYER: Use fallthrough;
  BLUETOOTH DRIVERS: Use fallthrough;
  CHAR and MISC DRIVERS: Use fallthrough;
  COMMON CLK FRAMEWORK: Use fallthrough;
  EDAC-AMD64: Use fallthrough;
  EDAC-PND2: Use fallthrough;
  IDE/ATAPI DRIVERS: Use fallthrough;
  IDE SUBSYSTEM: Use fallthrough;
  IIO SUBSYSTEM AND DRIVERS: Use fallthrough;
  AMD IOMMU (AMD-VI): Use fallthrough;
  ARM SMMU DRIVERS: Use fallthrough;
  INTEL IOMMU (VT-d): Use fallthrough;
  VIRTIO IOMMU DRIVER: Use fallthrough;
  IRQCHIP DRIVERS: Use fallthrough;
  OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT: Use fallthrough;
  SONY MEMORYSTICK SUBSYSTEM: Use fallthrough;
  NTB DRIVER CORE: Use fallthrough;
  PCMCIA SUBSYSTEM: Use fallthrough;
  RAPIDIO SUBSYSTEM: Use fallthrough;
  53C700 AND 53C700-66 SCSI DRIVER: Use fallthrough;
  BUSLOGIC SCSI DRIVER: Use fallthrough;
  ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER: Use fallthrough;
  MYLEX DAC960 PCI RAID Controller: Use fallthrough;
  SCSI CDROM DRIVER: Use fallthrough;
  SCSI TAPE DRIVER: Use fallthrough;
  VMware PVSCSI driver: Use fallthrough;
  SCSI SUBSYSTEM: Use fallthrough;
  STAGING SUBSYSTEM: Use fallthrough;
  SCSI TARGET SUBSYSTEM: Use fallthrough;
  THUNDERBOLT DRIVER: Use fallthrough;
  M68K ARCHITECTURE: Use fallthrough;
  EXTRA BOOT CONFIG: Use fallthrough;
  HIGH-RESOLUTION TIMERS, CLOCKEVENTS: Use fallthrough;
  DYNAMIC INTERRUPT MODERATION: Use fallthrough;
  MEMORY MANAGEMENT: Use fallthrough;
  SIPHASH PRF ROUTINES: Use fallthrough;
  POSIX CLOCKS and TIMERS: Use fallthrough;
  GCOV BASED KERNEL PROFILING: Use fallthrough;
  IRQ SUBSYSTEM: Use fallthrough;
  APPARMOR SECURITY MODULE: Use fallthrough;
  SMACK SECURITY MODULE: Use fallthrough;
  TOMOYO SECURITY MODULE: Use fallthrough;
  VSPRINTF: Use fallthrough;
  THE REST: Use fallthrough;

 arch/alpha/kernel/module.c                    |   2 +-
 arch/alpha/kernel/signal.c                    |   2 +-
 arch/alpha/kernel/traps.c                     |   6 +-
 arch/arc/kernel/disasm.c                      |   3 +-
 arch/arc/kernel/signal.c                      |   3 +-
 arch/arc/kernel/unwind.c                      |   6 +-
 arch/arm/kernel/hw_breakpoint.c               |  10 +-
 arch/arm/kernel/signal.c                      |   2 +-
 arch/arm/mach-ep93xx/crunch.c                 |   3 +-
 arch/arm/mach-mmp/pm-mmp2.c                   |   8 +-
 arch/arm/mach-mmp/pm-pxa910.c                 |  10 +-
 arch/arm/mach-omap2/id.c                      |   8 --
 arch/arm/mach-omap2/omap_device.c             |   2 +-
 arch/arm/mach-orion5x/dns323-setup.c          |   2 +-
 arch/arm/mach-rpc/riscpc.c                    |   2 +-
 arch/arm/mach-tegra/reset.c                   |   2 +-
 arch/arm/mm/alignment.c                       |   6 +-
 arch/arm/plat-omap/dma.c                      |   6 +-
 arch/arm/probes/decode.c                      |   2 +-
 arch/arm/probes/kprobes/core.c                |   2 +-
 arch/arm64/kernel/cpufeature.c                |   2 +-
 arch/arm64/kernel/cpuinfo.c                   |   2 +-
 arch/arm64/kernel/hw_breakpoint.c             |   8 +-
 arch/arm64/kernel/module.c                    |   8 +-
 arch/arm64/kernel/smp.c                       |   2 +-
 arch/arm64/kvm/handle_exit.c                  |   2 +-
 arch/arm64/kvm/hyp/debug-sr.c                 |  60 ++++-----
 arch/arm64/mm/context.c                       |   2 +-
 arch/c6x/kernel/signal.c                      |   5 +-
 arch/csky/kernel/signal.c                     |   2 +-
 arch/h8300/kernel/signal.c                    |   2 +-
 arch/hexagon/kernel/module.c                  |   2 +-
 arch/hexagon/kernel/signal.c                  |   2 +-
 arch/ia64/kernel/crash.c                      |   2 +-
 arch/ia64/kernel/module.c                     |   2 +-
 arch/ia64/kernel/perfmon.c                    |   2 +-
 arch/ia64/kernel/signal.c                     |   2 +-
 arch/ia64/kernel/unaligned.c                  |   6 +-
 arch/ia64/kernel/unwind.c                     |   2 +-
 arch/m68k/amiga/config.c                      |   4 +-
 arch/m68k/atari/atakeyb.c                     |   3 +-
 arch/m68k/kernel/signal.c                     |   2 +-
 arch/m68k/mac/config.c                        |   2 +-
 arch/m68k/mac/via.c                           |   2 +-
 arch/m68k/mm/fault.c                          |   2 +-
 arch/microblaze/kernel/signal.c               |   2 +-
 arch/mips/alchemy/devboards/db1550.c          |   2 +-
 arch/mips/ar7/setup.c                         |   2 +-
 arch/mips/ath79/setup.c                       |   3 +-
 arch/mips/bcm63xx/cpu.c                       |   2 +-
 arch/mips/bcm63xx/dev-flash.c                 |   2 +-
 arch/mips/cavium-octeon/executive/cvmx-pko.c  |   2 +-
 arch/mips/cavium-octeon/octeon-platform.c     |   4 +-
 arch/mips/cavium-octeon/octeon-usb.c          |   2 +-
 arch/mips/dec/tc.c                            |   2 +-
 arch/mips/include/asm/fpu.h                   |   2 +-
 arch/mips/include/asm/octeon/cvmx-sli-defs.h  |   2 +-
 arch/mips/include/asm/page.h                  |   2 +-
 arch/mips/include/asm/unroll.h                |  64 +++++-----
 arch/mips/kernel/branch.c                     |  26 ++--
 arch/mips/kernel/cpu-probe.c                  |  22 ++--
 arch/mips/kernel/idle.c                       |   2 +-
 arch/mips/kernel/mips-r2-to-r6-emul.c         |   2 +-
 arch/mips/kernel/perf_event_mipsxx.c          |   6 +-
 arch/mips/kernel/signal.c                     |   2 +-
 arch/mips/kernel/traps.c                      |   3 +-
 arch/mips/kernel/watch.c                      |  26 ++--
 arch/mips/kvm/emulate.c                       |   8 +-
 arch/mips/math-emu/cp1emu.c                   |  28 ++---
 arch/mips/math-emu/dp_add.c                   |   3 +-
 arch/mips/math-emu/dp_div.c                   |   3 +-
 arch/mips/math-emu/dp_fmax.c                  |   6 +-
 arch/mips/math-emu/dp_fmin.c                  |   6 +-
 arch/mips/math-emu/dp_maddf.c                 |   3 +-
 arch/mips/math-emu/dp_mul.c                   |   3 +-
 arch/mips/math-emu/dp_sqrt.c                  |   5 +-
 arch/mips/math-emu/dp_sub.c                   |   3 +-
 arch/mips/math-emu/sp_add.c                   |   3 +-
 arch/mips/math-emu/sp_div.c                   |   3 +-
 arch/mips/math-emu/sp_fdp.c                   |   3 +-
 arch/mips/math-emu/sp_fmax.c                  |   6 +-
 arch/mips/math-emu/sp_fmin.c                  |   6 +-
 arch/mips/math-emu/sp_maddf.c                 |   3 +-
 arch/mips/math-emu/sp_mul.c                   |   3 +-
 arch/mips/math-emu/sp_sub.c                   |   3 +-
 arch/mips/mm/c-r4k.c                          |   6 +-
 arch/mips/mm/tlbex.c                          |   2 +-
 arch/mips/oprofile/op_model_mipsxx.c          |  26 ++--
 arch/mips/pci/fixup-sni.c                     |   3 +-
 arch/mips/pci/ops-bcm63xx.c                   |   2 +-
 arch/nds32/kernel/fpu.c                       |  12 +-
 arch/nds32/kernel/signal.c                    |   4 +-
 arch/openrisc/kernel/signal.c                 |   2 +-
 arch/parisc/kernel/signal.c                   |   2 +-
 arch/parisc/kernel/traps.c                    |  10 +-
 arch/parisc/mm/fault.c                        |   5 +-
 arch/powerpc/kernel/align.c                   |   8 +-
 arch/powerpc/kvm/book3s_32_mmu.c              |   2 +-
 arch/powerpc/kvm/book3s_64_mmu.c              |   2 +-
 arch/powerpc/kvm/book3s_pr.c                  |   2 +-
 arch/powerpc/kvm/booke.c                      |   6 +-
 arch/powerpc/kvm/powerpc.c                    |   1 -
 arch/powerpc/platforms/cell/spufs/switch.c    |   2 +-
 arch/powerpc/platforms/powermac/feature.c     |   2 +-
 arch/powerpc/platforms/powernv/opal-async.c   |   2 +-
 arch/powerpc/platforms/pseries/hvcserver.c    |   2 +-
 arch/powerpc/xmon/xmon.c                      |   2 +-
 arch/riscv/kernel/signal.c                    |   2 +-
 arch/riscv/net/bpf_jit_comp32.c               |   5 +-
 arch/s390/kernel/signal.c                     |   4 +-
 arch/s390/kernel/topology.c                   |   2 +-
 arch/s390/kvm/gaccess.c                       |  23 ++--
 arch/s390/kvm/interrupt.c                     |   2 +-
 arch/s390/kvm/kvm-s390.c                      |   4 +-
 arch/s390/mm/fault.c                          |  13 +-
 arch/s390/mm/gmap.c                           |   6 +-
 arch/s390/mm/pgalloc.c                        |   2 +-
 arch/sh/drivers/platform_early.c              |   2 +-
 arch/sh/kernel/disassemble.c                  |   4 +-
 arch/sh/kernel/kgdb.c                         |   2 +-
 arch/sh/kernel/signal_32.c                    |   2 +-
 arch/sh/kernel/signal_64.c                    |   2 +-
 arch/sparc/kernel/auxio_64.c                  |   1 -
 arch/sparc/kernel/central.c                   |   2 +-
 arch/sparc/kernel/kgdb_32.c                   |   3 +-
 arch/sparc/kernel/kgdb_64.c                   |   3 +-
 arch/sparc/kernel/pcr.c                       |   2 +-
 arch/sparc/kernel/prom_32.c                   |   3 +-
 arch/sparc/kernel/signal32.c                  |   4 +-
 arch/sparc/kernel/signal_32.c                 |   4 +-
 arch/sparc/kernel/signal_64.c                 |   4 +-
 arch/sparc/math-emu/math_32.c                 |   8 +-
 arch/sparc/net/bpf_jit_comp_32.c              |   2 +-
 arch/um/kernel/signal.c                       |   2 +-
 arch/unicore32/kernel/signal.c                |   2 +-
 arch/x86/boot/cmdline.c                       |   6 +-
 arch/x86/boot/compressed/kaslr.c              |   2 +-
 arch/x86/events/intel/core.c                  |   7 +-
 arch/x86/events/intel/lbr.c                   |   2 +-
 arch/x86/kernel/alternative.c                 |   4 +-
 arch/x86/kernel/apic/io_apic.c                |   4 +-
 arch/x86/kernel/apic/probe_32.c               |   2 +-
 arch/x86/kernel/cpu/cacheinfo.c               |   2 +-
 arch/x86/kernel/cpu/mce/inject.c              |   2 +-
 arch/x86/kernel/cpu/mce/intel.c               |   4 +-
 arch/x86/kernel/cpu/mtrr/cyrix.c              |   2 +-
 arch/x86/kernel/hw_breakpoint.c               |   2 +-
 arch/x86/kernel/kgdb.c                        |   4 +-
 arch/x86/kernel/mpparse.c                     |   4 +-
 arch/x86/kernel/ptrace.c                      |   3 +-
 arch/x86/kernel/reboot.c                      |   3 +-
 arch/x86/kernel/signal.c                      |   2 +-
 arch/x86/kernel/uprobes.c                     |   4 +-
 arch/x86/kvm/emulate.c                        |   2 +-
 arch/x86/kvm/hyperv.c                         |   2 +-
 arch/x86/kvm/irq_comm.c                       |   2 +-
 arch/x86/kvm/lapic.c                          |   6 +-
 arch/x86/kvm/mmu/mmu.c                        |   2 +-
 arch/x86/kvm/svm.c                            |   2 +-
 arch/x86/kvm/vmx/vmx.c                        |  15 ++-
 arch/x86/kvm/x86.c                            |  12 +-
 arch/x86/lib/cmdline.c                        |  12 +-
 arch/x86/lib/insn-eval.c                      |   8 +-
 arch/x86/math-emu/errors.c                    |   2 +-
 arch/x86/math-emu/fpu_trig.c                  |   2 +-
 arch/x86/mm/ioremap.c                         |   3 +-
 arch/xtensa/kernel/signal.c                   |   2 +-
 block/badblocks.c                             |   2 +-
 block/bfq-iosched.c                           |   4 +-
 block/blk-wbt.c                               |   2 +-
 crypto/drbg.c                                 |   3 +-
 crypto/tcrypt.c                               | 114 +++++++++---------
 .../accessibility/braille/braille_console.c   |   2 +-
 drivers/acpi/ac.c                             |   2 +-
 drivers/acpi/acpi_processor.c                 |   3 +-
 drivers/acpi/acpica/dscontrol.c               |   4 +-
 drivers/acpi/acpica/dswexec.c                 |   3 +-
 drivers/acpi/acpica/dswload.c                 |   4 +-
 drivers/acpi/acpica/dswload2.c                |   4 +-
 drivers/acpi/acpica/exfldio.c                 |   4 +-
 drivers/acpi/acpica/exresop.c                 |   7 +-
 drivers/acpi/acpica/exstore.c                 |   8 +-
 drivers/acpi/acpica/hwgpe.c                   |   4 +-
 drivers/acpi/acpica/utdelete.c                |   4 +-
 drivers/acpi/acpica/utprint.c                 |   3 +-
 drivers/acpi/button.c                         |   2 +-
 drivers/acpi/dock.c                           |   2 +-
 drivers/acpi/processor_idle.c                 |   3 +-
 drivers/acpi/resource.c                       |   2 +-
 drivers/acpi/spcr.c                           |   4 +-
 drivers/ata/ahci_brcm.c                       |   2 +-
 drivers/ata/libahci_platform.c                |   2 +-
 drivers/ata/libata-core.c                     |  16 +--
 drivers/ata/libata-eh.c                       |   6 +-
 drivers/ata/libata-scsi.c                     |   2 +-
 drivers/ata/pata_atp867x.c                    |   4 +-
 drivers/ata/pata_serverworks.c                |   2 +-
 drivers/ata/sata_mv.c                         |  12 +-
 drivers/ata/sata_promise.c                    |   8 +-
 drivers/ata/sata_sx4.c                        |   2 +-
 drivers/atm/firestream.c                      |   2 +-
 drivers/atm/fore200e.c                        |  24 ++--
 drivers/atm/he.c                              |   4 +-
 drivers/atm/idt77105.c                        |   2 +-
 drivers/atm/lanai.c                           |   2 +-
 drivers/atm/zatm.c                            |   2 +-
 drivers/auxdisplay/panel.c                    |   6 +-
 drivers/base/firmware_loader/fallback.c       |   4 +-
 drivers/block/aoe/aoecmd.c                    |   2 +-
 drivers/block/ataflop.c                       |   2 +-
 drivers/block/drbd/drbd_int.h                 |   2 +-
 drivers/block/drbd/drbd_main.c                |   2 +-
 drivers/block/drbd/drbd_nl.c                  |   2 +-
 drivers/block/drbd/drbd_receiver.c            |  13 +-
 drivers/block/drbd/drbd_req.c                 |   5 +-
 drivers/block/floppy.c                        |   4 +-
 drivers/block/loop.c                          |   4 +-
 drivers/block/paride/pd.c                     |   4 +-
 drivers/block/rbd.c                           |   8 +-
 drivers/block/rsxx/core.c                     |   2 +-
 drivers/block/skd_main.c                      |   3 +-
 drivers/block/xen-blkback/blkback.c           |   2 +-
 drivers/block/xen-blkfront.c                  |   5 +-
 drivers/bluetooth/bcm203x.c                   |   2 +-
 drivers/bluetooth/bluecard_cs.c               |   2 -
 drivers/bluetooth/hci_ll.c                    |   2 +-
 drivers/bluetooth/hci_qca.c                   |   8 +-
 drivers/bus/ti-sysc.c                         |   2 +-
 drivers/char/agp/ali-agp.c                    |   2 +-
 drivers/char/ipmi/kcs_bmc.c                   |   3 +-
 drivers/char/lp.c                             |   4 +-
 drivers/char/mem.c                            |   2 +-
 drivers/char/nvram.c                          |   2 +-
 drivers/clk/davinci/pll.c                     |   2 +-
 drivers/clk/imx/clk-pllv3.c                   |   4 +-
 drivers/clk/samsung/clk-s3c2443.c             |   2 +-
 drivers/clocksource/timer-cadence-ttc.c       |   5 +-
 drivers/cpufreq/p4-clockmod.c                 |   2 +-
 drivers/cpufreq/speedstep-lib.c               |   2 +-
 drivers/cpufreq/ti-cpufreq.c                  |   4 +-
 drivers/crypto/axis/artpec6_crypto.c          |   3 +-
 drivers/crypto/cavium/cpt/cptvf_reqmanager.c  |   4 +-
 drivers/crypto/chelsio/chcr_ktls.c            |   4 +-
 drivers/crypto/qat/qat_common/adf_pf2vf_msg.c |   2 +-
 drivers/crypto/qat/qat_common/qat_uclo.c      |   6 +-
 drivers/crypto/ux500/cryp/cryp.c              |  18 +--
 drivers/dma/amba-pl08x.c                      |  10 +-
 drivers/dma/fsldma.c                          |   2 +-
 drivers/dma/imx-dma.c                         |   2 +-
 drivers/dma/iop-adma.h                        |  12 +-
 drivers/dma/nbpfaxi.c                         |   2 +-
 drivers/dma/pl330.c                           |  13 +-
 drivers/dma/sh/shdma-base.c                   |   2 +-
 drivers/edac/amd64_edac.c                     |   2 +-
 drivers/edac/pnd2_edac.c                      |   2 +-
 drivers/firewire/core-device.c                |   2 +-
 drivers/firewire/core-iso.c                   |   3 +-
 drivers/firewire/core-topology.c              |   2 +-
 drivers/firewire/core-transaction.c           |   6 +-
 drivers/firewire/ohci.c                       |   5 +-
 drivers/gpio/gpio-aspeed-sgpio.c              |   6 +-
 drivers/gpio/gpio-aspeed.c                    |   6 +-
 drivers/gpio/gpio-ath79.c                     |   2 +-
 drivers/gpio/gpio-eic-sprd.c                  |   4 +-
 drivers/gpio/gpio-stmpe.c                     |   4 +-
 drivers/gpio/gpiolib-acpi.c                   |   2 +-
 .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c         |   3 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c         |   2 +-
 drivers/gpu/drm/amd/amdgpu/si_dpm.c           |   4 +-
 .../drm/amd/display/dc/bios/bios_parser2.c    |   4 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_aux.c  |   2 +-
 .../drm/amd/display/dc/dce/dce_mem_input.c    |   2 +-
 .../gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c  |   6 +-
 drivers/gpu/drm/arm/malidp_hw.c               |   6 +-
 drivers/gpu/drm/ast/ast_main.c                |   2 +-
 .../drm/bridge/synopsys/dw-hdmi-i2s-audio.c   |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |   6 +-
 drivers/gpu/drm/drm_bufs.c                    |   2 +-
 drivers/gpu/drm/drm_dp_helper.c               |   2 +-
 drivers/gpu/drm/drm_modes.c                   |   2 +-
 drivers/gpu/drm/drm_vm.c                      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  10 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c   |   6 +-
 drivers/gpu/drm/i915/display/icl_dsi.c        |   6 +-
 drivers/gpu/drm/i915/display/intel_bios.c     |   6 +-
 drivers/gpu/drm/i915/display/intel_cdclk.c    |  10 +-
 .../gpu/drm/i915/display/intel_combo_phy.c    |   6 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |   4 +-
 drivers/gpu/drm/i915/display/intel_display.c  |  20 +--
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c |   8 +-
 drivers/gpu/drm/i915/display/intel_sdvo.c     |  12 +-
 drivers/gpu/drm/i915/display/intel_sprite.c   |  22 ++--
 drivers/gpu/drm/i915/display/intel_tc.c       |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_pages.c     |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c    |   6 +-
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   2 +-
 drivers/gpu/drm/i915/gt/intel_ggtt.c          |   2 +-
 drivers/gpu/drm/i915/gt/intel_lrc.c           |   2 +-
 .../gpu/drm/i915/gt/intel_ring_submission.c   |   2 +-
 drivers/gpu/drm/i915/gvt/handlers.c           |   2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c         |   2 +-
 drivers/gpu/drm/i915/i915_pmu.c               |   2 +-
 drivers/gpu/drm/i915/intel_device_info.c      |   4 +-
 drivers/gpu/drm/imx/ipuv3-plane.c             |   3 +-
 drivers/gpu/drm/ingenic/ingenic-drm.c         |   2 +-
 drivers/gpu/drm/meson/meson_crtc.c            |   4 +-
 drivers/gpu/drm/meson/meson_osd_afbcd.c       |   2 +-
 drivers/gpu/drm/meson/meson_overlay.c         |   4 +-
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c         |   4 +-
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c         |   2 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c         |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |   2 +-
 drivers/gpu/drm/nouveau/nouveau_bo.c          |   2 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 .../gpu/drm/nouveau/nvkm/engine/disp/hdmi.c   |  34 +++---
 .../drm/nouveau/nvkm/engine/dma/usernv04.c    |   2 +-
 .../gpu/drm/nouveau/nvkm/engine/fifo/nv04.c   |   4 +-
 .../gpu/drm/nouveau/nvkm/engine/fifo/nv40.c   |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/dcb.c    |   3 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/bios/dp.c |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/perf.c   |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/pll.c    |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/bios/timing.c |  10 +-
 .../gpu/drm/nouveau/nvkm/subdev/clk/base.c    |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/clk/mcp77.c   |   2 +-
 .../drm/nouveau/nvkm/subdev/devinit/nv04.c    |  18 ++-
 .../gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c  |   4 +-
 .../gpu/drm/nouveau/nvkm/subdev/mxm/nv50.c    |   2 +-
 drivers/gpu/drm/omapdrm/dss/venc.c            |   2 +-
 drivers/gpu/drm/radeon/ci_dpm.c               |   4 +-
 drivers/gpu/drm/radeon/r300.c                 |   4 +-
 drivers/gpu/drm/radeon/r420.c                 |   2 +-
 drivers/gpu/drm/radeon/r600_cs.c              |   4 +-
 drivers/gpu/drm/radeon/radeon_uvd.c           |   3 +-
 drivers/gpu/drm/radeon/si_dpm.c               |   4 +-
 drivers/gpu/drm/radeon/uvd_v1_0.c             |   3 +-
 drivers/gpu/drm/savage/savage_state.c         |  10 +-
 drivers/gpu/drm/sti/sti_hdmi.c                |   6 +-
 drivers/gpu/drm/sun4i/sun4i_tcon.c            |   4 +-
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c        |   3 +-
 drivers/gpu/drm/tegra/dc.c                    |   2 +-
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c          |   2 +-
 drivers/gpu/drm/ttm/ttm_bo_vm.c               |   2 +-
 drivers/gpu/drm/via/via_dmablit.c             |   8 +-
 drivers/gpu/drm/xen/xen_drm_front.c           |   3 -
 drivers/gpu/ipu-v3/ipu-dc.c                   |   2 +-
 drivers/greybus/es2.c                         |   2 +-
 drivers/greybus/interface.c                   |   2 +-
 drivers/hid/hid-lg-g15.c                      |   2 +-
 drivers/hid/hid-logitech-dj.c                 |   2 +-
 drivers/hid/hid-microsoft.c                   |   3 -
 drivers/hid/hid-rmi.c                         |   1 -
 drivers/hid/hid-roccat-kone.c                 |   2 +-
 drivers/hid/hid-uclogic-params.c              |   2 +-
 drivers/hid/hid-wiimote-core.c                |   2 -
 drivers/hid/usbhid/hiddev.c                   |   1 -
 drivers/hid/wacom_wac.c                       |  47 +++-----
 drivers/hsi/clients/ssi_protocol.c            |   4 +-
 drivers/hsi/controllers/omap_ssi_core.c       |   2 +-
 drivers/hv/hv_kvp.c                           |   4 +-
 drivers/hv/vmbus_drv.c                        |   2 +-
 drivers/hwmon/adt7462.c                       |   8 +-
 drivers/hwmon/emc1403.c                       |   4 +-
 drivers/hwmon/f71882fg.c                      |   4 +-
 drivers/hwmon/hwmon-vid.c                     |   4 +-
 drivers/hwmon/ina3221.c                       |   3 +-
 drivers/hwmon/nct6775.c                       |   2 +-
 drivers/hwmon/occ/common.c                    |   6 +-
 drivers/hwmon/w83627hf.c                      |   2 +-
 drivers/hwmon/w83781d.c                       |   2 +-
 drivers/hwmon/w83795.c                        |   2 +-
 .../hwtracing/coresight/coresight-cpu-debug.c |   4 +-
 drivers/hwtracing/coresight/coresight-etm4x.c |   1 -
 .../hwtracing/coresight/coresight-platform.c  |   3 +-
 drivers/hwtracing/coresight/coresight-tmc.c   |   2 -
 drivers/hwtracing/intel_th/sth.c              |   6 +-
 drivers/i2c/busses/i2c-amd8111.c              |   2 +-
 drivers/i2c/busses/i2c-aspeed.c               |   4 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-digicolor.c            |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   8 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   9 +-
 drivers/i2c/busses/i2c-omap.c                 |   1 -
 drivers/i2c/busses/i2c-opal.c                 |   2 +-
 drivers/i2c/busses/i2c-s3c2410.c              |   3 +-
 drivers/i2c/busses/i2c-synquacer.c            |   4 +-
 drivers/i2c/busses/i2c-viapro.c               |   2 +-
 drivers/i2c/busses/scx200_acb.c               |   3 +-
 drivers/i2c/i2c-slave-eeprom.c                |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |   2 +-
 drivers/ide/hpt366.c                          |   6 +-
 drivers/ide/ide-cd.c                          |   4 +-
 drivers/ide/ide-floppy.c                      |   2 +-
 drivers/ide/ide-probe.c                       |   2 +-
 drivers/ide/ide-taskfile.c                    |  12 +-
 drivers/ide/sis5513.c                         |   2 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/cpcap-adc.c                   |   2 +-
 drivers/iio/chemical/sps30.c                  |   2 +-
 drivers/iio/dac/ad5592r-base.c                |   2 -
 drivers/iio/dac/dpot-dac.c                    |   2 +-
 drivers/iio/health/max30102.c                 |   4 +-
 drivers/iio/imu/adis.c                        |   6 +-
 drivers/iio/industrialio-core.c               |   2 +-
 drivers/iio/light/si1145.c                    |   2 +-
 drivers/iio/magnetometer/ak8974.c             |   2 +-
 drivers/infiniband/core/cm.c                  |  14 +--
 drivers/infiniband/core/cma.c                 |   3 +-
 drivers/infiniband/core/ucma.c                |   4 +-
 drivers/infiniband/core/uverbs_ioctl.c        |   5 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c      |   2 +-
 drivers/infiniband/hw/bnxt_re/qplib_fp.c      |   2 +-
 drivers/infiniband/hw/cxgb4/cm.c              |   4 +-
 drivers/infiniband/hw/cxgb4/qp.c              |   2 +-
 drivers/infiniband/hw/hfi1/chip.c             |   8 +-
 drivers/infiniband/hw/hfi1/firmware.c         |  16 ---
 drivers/infiniband/hw/hfi1/mad.c              |   9 +-
 drivers/infiniband/hw/hfi1/pio.c              |   2 +-
 drivers/infiniband/hw/hfi1/pio_copy.c         |  12 +-
 drivers/infiniband/hw/hfi1/platform.c         |  12 +-
 drivers/infiniband/hw/hfi1/qp.c               |   2 +-
 drivers/infiniband/hw/hfi1/qsfp.c             |   4 +-
 drivers/infiniband/hw/hfi1/rc.c               |  25 ++--
 drivers/infiniband/hw/hfi1/sdma.c             |   9 +-
 drivers/infiniband/hw/hfi1/tid_rdma.c         |   5 +-
 drivers/infiniband/hw/hfi1/uc.c               |   8 +-
 drivers/infiniband/hw/i40iw/i40iw_cm.c        |   2 +-
 drivers/infiniband/hw/i40iw/i40iw_ctrl.c      |   5 +-
 drivers/infiniband/hw/i40iw/i40iw_hw.c        |   3 +-
 drivers/infiniband/hw/i40iw/i40iw_main.c      |  21 ++--
 drivers/infiniband/hw/i40iw/i40iw_puda.c      |   4 +-
 drivers/infiniband/hw/i40iw/i40iw_utils.c     |   8 +-
 drivers/infiniband/hw/i40iw/i40iw_verbs.c     |   5 +-
 drivers/infiniband/hw/mlx4/cq.c               |   4 +-
 drivers/infiniband/hw/mlx4/mcg.c              |   2 +-
 drivers/infiniband/hw/mlx4/qp.c               |   6 +-
 drivers/infiniband/hw/mlx5/cq.c               |   4 +-
 drivers/infiniband/hw/mlx5/mad.c              |   3 +-
 drivers/infiniband/hw/mlx5/main.c             |   6 +-
 drivers/infiniband/hw/mlx5/qp.c               |  11 +-
 drivers/infiniband/hw/mthca/mthca_av.c        |   2 +-
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c   |   4 +-
 drivers/infiniband/hw/qedr/verbs.c            |   3 +-
 drivers/infiniband/hw/qib/qib_iba6120.c       |   4 +-
 drivers/infiniband/hw/qib/qib_iba7220.c       |   4 +-
 drivers/infiniband/hw/qib/qib_iba7322.c       |   6 +-
 drivers/infiniband/hw/qib/qib_mad.c           |  14 +--
 drivers/infiniband/hw/qib/qib_rc.c            |  18 +--
 drivers/infiniband/hw/qib/qib_sdma.c          |   2 +-
 drivers/infiniband/hw/qib/qib_uc.c            |   8 +-
 drivers/infiniband/hw/qib/qib_verbs.c         |   2 +-
 drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c  |   2 +-
 drivers/infiniband/sw/rdmavt/qp.c             |   2 +-
 drivers/infiniband/sw/rxe/rxe_task.c          |   2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c         |   2 +-
 drivers/infiniband/sw/siw/siw_cm.c            |   2 -
 drivers/infiniband/sw/siw/siw_qp_rx.c         |   6 +-
 drivers/infiniband/sw/siw/siw_qp_tx.c         |   6 +-
 drivers/infiniband/ulp/ipoib/ipoib_cm.c       |   4 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c     |   2 +-
 drivers/infiniband/ulp/iser/iser_verbs.c      |   2 +-
 drivers/infiniband/ulp/isert/ib_isert.c       |  10 +-
 .../infiniband/ulp/opa_vnic/opa_vnic_vema.c   |   1 -
 drivers/input/joystick/db9.c                  |  11 +-
 drivers/input/joystick/fsia6b.c               |   4 +-
 drivers/input/joystick/gamecon.c              |  10 +-
 drivers/input/joystick/sidewinder.c           |  15 ++-
 drivers/input/joystick/spaceball.c            |   8 +-
 drivers/input/keyboard/adp5589-keys.c         |   2 +-
 drivers/input/keyboard/atkbd.c                |   3 +-
 drivers/input/keyboard/gpio_keys.c            |   1 -
 drivers/input/misc/pwm-vibra.c                |   3 +-
 drivers/input/misc/xen-kbdfront.c             |   5 +-
 drivers/input/mouse/appletouch.c              |   2 +-
 drivers/input/mouse/cyapa_gen3.c              |   6 +-
 drivers/input/mouse/cyapa_gen5.c              |   3 +-
 drivers/input/mouse/cyapa_gen6.c              |   3 +-
 drivers/input/mouse/elantech.c                |   6 +-
 drivers/input/mouse/hgpk.c                    |   8 +-
 drivers/input/mouse/navpoint.c                |   2 +-
 drivers/input/mouse/sentelic.c                |   3 +-
 drivers/input/mouse/sermouse.c                |   6 +-
 drivers/input/serio/i8042.c                   |   2 +-
 drivers/input/serio/libps2.c                  |   2 +-
 drivers/input/sparse-keymap.c                 |   3 +-
 drivers/input/tablet/gtco.c                   |   9 +-
 drivers/input/tablet/pegasus_notetaker.c      |   3 +-
 drivers/input/tablet/wacom_serial4.c          |   2 +-
 drivers/input/touchscreen/atmel_mxt_ts.c      |   2 +-
 drivers/input/touchscreen/edt-ft5x06.c        |   5 +-
 drivers/input/touchscreen/elants_i2c.c        |   3 +-
 drivers/input/touchscreen/elo.c               |   3 +-
 drivers/input/touchscreen/iqs5xx.c            |   2 +-
 drivers/input/touchscreen/max11801_ts.c       |   1 -
 drivers/input/touchscreen/stmfts.c            |   3 +-
 drivers/input/touchscreen/wm831x-ts.c         |   2 +-
 drivers/iommu/amd_iommu_init.c                |   2 +-
 drivers/iommu/arm-smmu-v3.c                   |  11 +-
 drivers/iommu/intel-iommu.c                   |   1 -
 drivers/iommu/virtio-iommu.c                  |   2 +-
 drivers/irqchip/irq-gic-v3-its.c              |   4 +-
 drivers/irqchip/irq-gic-v3.c                  |   8 +-
 drivers/irqchip/irq-imx-gpcv2.c               |   2 +-
 drivers/irqchip/irq-mips-gic.c                |   2 +-
 drivers/irqchip/irq-vic.c                     |   2 +-
 drivers/isdn/hardware/mISDN/avmfritz.c        |   2 +-
 drivers/isdn/hardware/mISDN/hfcpci.c          |   2 +-
 drivers/isdn/hardware/mISDN/hfcsusb.c         |   2 +-
 drivers/isdn/hardware/mISDN/isdnhdlc.c        |   2 +-
 drivers/isdn/hardware/mISDN/mISDNinfineon.c   |   2 +-
 drivers/isdn/hardware/mISDN/mISDNisar.c       |   8 +-
 drivers/isdn/mISDN/stack.c                    |   2 +-
 drivers/lightnvm/pblk-core.c                  |   2 +-
 drivers/macintosh/adbhid.c                    |   3 +-
 drivers/macintosh/smu.c                       |   2 +-
 drivers/md/bcache/journal.c                   |   3 +-
 drivers/md/bcache/util.c                      |  14 +--
 drivers/md/dm-mpath.c                         |   2 +-
 drivers/md/dm.c                               |   2 +-
 drivers/md/md-bitmap.c                        |   2 +-
 drivers/md/raid5.c                            |   4 +-
 drivers/media/cec/cec-adap.c                  |   2 +-
 drivers/media/cec/cec-pin.c                   |   6 +-
 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c |  36 +++---
 .../media/common/videobuf2/videobuf2-v4l2.c   |   2 +-
 drivers/media/dvb-core/dvb_net.c              |   2 +-
 drivers/media/dvb-frontends/af9013.c          |   2 +-
 drivers/media/dvb-frontends/bcm3510.c         |   2 +-
 drivers/media/dvb-frontends/dib0090.c         |   3 +-
 drivers/media/dvb-frontends/dib3000mb.c       |   2 +-
 drivers/media/dvb-frontends/dib7000p.c        |   2 +-
 drivers/media/dvb-frontends/drx39xyj/drxj.c   |  99 ++++++++-------
 drivers/media/dvb-frontends/drxd_hard.c       |  12 +-
 drivers/media/dvb-frontends/drxk_hard.c       |  24 ++--
 drivers/media/dvb-frontends/lg2160.c          |   2 +-
 drivers/media/dvb-frontends/lgdt3306a.c       |   2 +-
 drivers/media/dvb-frontends/mt352.c           |   2 +-
 drivers/media/dvb-frontends/mxl5xx.c          |   2 +-
 drivers/media/dvb-frontends/or51132.c         |   2 +-
 drivers/media/dvb-frontends/s5h1411.c         |   2 +-
 drivers/media/dvb-frontends/zl10353.c         |   4 +-
 drivers/media/i2c/adv7180.c                   |   2 +-
 drivers/media/i2c/adv7511-v4l2.c              |   4 +-
 drivers/media/i2c/msp3400-kthreads.c          |   2 +-
 drivers/media/i2c/ov5640.c                    |   2 +-
 drivers/media/i2c/ov6650.c                    |   4 +-
 drivers/media/i2c/ov9640.c                    |   2 +-
 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c     |   2 +-
 drivers/media/i2c/smiapp/smiapp-core.c        |   6 +-
 drivers/media/i2c/tda1997x.c                  |  10 +-
 drivers/media/i2c/tvp5150.c                   |   2 +-
 drivers/media/pci/bt8xx/bttv-driver.c         |   2 +-
 drivers/media/pci/cx23885/cx23885-cards.c     |   4 +-
 drivers/media/pci/cx88/cx88-cards.c           |   2 +-
 drivers/media/pci/cx88/cx88-video.c           |   2 +-
 drivers/media/pci/ddbridge/ddbridge-core.c    |  23 ++--
 drivers/media/pci/meye/meye.c                 |   2 +-
 drivers/media/pci/saa7134/saa7134-cards.c     |   4 +-
 drivers/media/pci/solo6x10/solo6x10-core.c    |   2 +-
 drivers/media/pci/solo6x10/solo6x10-i2c.c     |   2 +-
 drivers/media/pci/ttpci/av7110.c              |   6 +-
 drivers/media/pci/ttpci/av7110_hw.c           |   2 +-
 drivers/media/pci/ttpci/av7110_ipack.c        |   2 +-
 drivers/media/pci/ttpci/budget-av.c           |   2 +-
 drivers/media/pci/ttpci/budget.c              |   5 +-
 drivers/media/platform/coda/coda-bit.c        |   4 +-
 drivers/media/platform/coda/coda-common.c     |  10 +-
 .../media/platform/exynos4-is/fimc-capture.c  |   6 +-
 drivers/media/platform/exynos4-is/fimc-reg.c  |   2 +-
 drivers/media/platform/exynos4-is/media-dev.c |   2 +-
 .../media/platform/marvell-ccic/mcam-core.c   |   2 +-
 drivers/media/platform/omap3isp/ispvideo.c    |   2 +-
 drivers/media/platform/pxa_camera.c           |   6 +-
 drivers/media/platform/qcom/venus/vdec.c      |   2 +-
 drivers/media/platform/renesas-ceu.c          |   4 +-
 drivers/media/platform/sh_vou.c               |   4 +-
 drivers/media/platform/vicodec/vicodec-core.c |   2 +-
 drivers/media/platform/vivid/vivid-vbi-gen.c  |   2 +-
 drivers/media/radio/radio-si476x.c            |   3 +-
 drivers/media/radio/si4713/si4713.c           |   2 +-
 drivers/media/radio/tea575x.c                 |   2 +-
 drivers/media/rc/bpf-lirc.c                   |   2 +-
 drivers/media/rc/iguanair.c                   |   2 +-
 drivers/media/rc/ir-rc6-decoder.c             |   2 +-
 drivers/media/rc/ir-sony-decoder.c            |   3 +-
 drivers/media/tuners/fc0011.c                 |   2 +-
 drivers/media/tuners/tda18271-fe.c            |   2 +-
 drivers/media/tuners/xc5000.c                 |   2 +-
 drivers/media/usb/b2c2/flexcop-usb.c          |   2 +-
 drivers/media/usb/cpia2/cpia2_core.c          |  36 +++---
 drivers/media/usb/cx231xx/cx231xx-video.c     |   2 +-
 drivers/media/usb/dvb-usb-v2/af9015.c         |   2 +-
 drivers/media/usb/dvb-usb-v2/gl861.c          |   2 +-
 drivers/media/usb/dvb-usb-v2/lmedm04.c        |   8 +-
 drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c  |   4 +-
 drivers/media/usb/dvb-usb/dib0700_devices.c   |   2 +-
 drivers/media/usb/dvb-usb/dw2102.c            |   6 +-
 drivers/media/usb/em28xx/em28xx-audio.c       |   8 +-
 drivers/media/usb/go7007/go7007-driver.c      |   2 +-
 drivers/media/usb/gspca/mr97310a.c            |  10 +-
 drivers/media/usb/gspca/nw80x.c               |   2 +-
 drivers/media/usb/gspca/ov519.c               |   6 +-
 drivers/media/usb/gspca/sn9c20x.c             |   2 +-
 drivers/media/usb/gspca/sunplus.c             |   4 +-
 drivers/media/usb/gspca/xirlink_cit.c         |   4 +-
 drivers/media/usb/gspca/zc3xx.c               |   4 +-
 drivers/media/usb/pulse8-cec/pulse8-cec.c     |   2 +-
 drivers/media/usb/pwc/pwc-v4l.c               |   2 +-
 drivers/media/usb/siano/smsusb.c              |   2 +-
 drivers/media/usb/tm6000/tm6000-alsa.c        |   8 +-
 drivers/media/usb/uvc/uvc_video.c             |   4 +-
 drivers/media/v4l2-core/v4l2-ctrls.c          |   2 +-
 drivers/media/v4l2-core/v4l2-ioctl.c          |   2 -
 drivers/media/v4l2-core/videobuf-core.c       |   2 +-
 drivers/memory/omap-gpmc.c                    |   1 -
 drivers/memstick/core/ms_block.c              |  18 +--
 drivers/memstick/host/jmb38x_ms.c             |   4 +-
 drivers/memstick/host/tifm_ms.c               |   4 +-
 drivers/message/fusion/mptbase.c              |   7 +-
 drivers/message/fusion/mptsas.c               |   3 +-
 drivers/message/fusion/mptscsih.c             |   5 +-
 drivers/mfd/db8500-prcmu.c                    |   4 +-
 drivers/mfd/iqs62x.c                          |  12 +-
 drivers/mfd/mxs-lradc.c                       |   2 +-
 drivers/mfd/omap-usb-host.c                   |   6 +-
 drivers/mfd/rave-sp.c                         |   6 +-
 drivers/mfd/syscon.c                          |   2 +-
 drivers/misc/eeprom/at25.c                    |  10 +-
 drivers/misc/mic/scif/scif_api.c              |   4 +-
 drivers/misc/mic/scif/scif_rma.c              |   2 +-
 drivers/misc/sgi-gru/grukservices.c           |   4 +-
 drivers/misc/sgi-xp/xpc_main.c                |   6 +-
 drivers/misc/sgi-xp/xpc_partition.c           |   4 +-
 drivers/misc/sgi-xp/xpc_uv.c                  |   2 +-
 drivers/mmc/core/host.c                       |   2 +-
 drivers/mmc/host/atmel-mci.c                  |   8 +-
 drivers/mmc/host/davinci_mmc.c                |   2 +-
 drivers/mmc/host/dw_mmc-k3.c                  |   2 +-
 drivers/mmc/host/dw_mmc.c                     |  11 +-
 drivers/mmc/host/jz4740_mmc.c                 |   6 +-
 drivers/mmc/host/meson-mx-sdio.c              |   2 +-
 drivers/mmc/host/renesas_sdhi_core.c          |   2 +-
 drivers/mmc/host/sdhci-esdhc-imx.c            |   3 +-
 drivers/mmc/host/sdhci-s3c.c                  |   2 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon-phy.c            |   2 +-
 drivers/mmc/host/sdhci.c                      |   3 +-
 drivers/mmc/host/tifm_sd.c                    |   2 +-
 drivers/mmc/host/usdhi6rol0.c                 |   6 +-
 drivers/mtd/chips/cfi_cmdset_0001.c           |   4 +-
 drivers/mtd/chips/cfi_cmdset_0002.c           |   5 +-
 drivers/mtd/chips/cfi_cmdset_0020.c           |  17 +--
 drivers/mtd/chips/cfi_util.c                  |  12 +-
 drivers/mtd/devices/block2mtd.c               |   4 +-
 drivers/mtd/devices/phram.c                   |   4 +-
 drivers/mtd/lpddr/lpddr_cmds.c                |   3 +-
 drivers/mtd/maps/sa1100-flash.c               |   3 +-
 drivers/mtd/nand/onenand/onenand_base.c       |   2 +-
 drivers/mtd/nand/raw/diskonchip.c             |   2 +-
 drivers/mtd/nand/raw/fsl_elbc_nand.c          |   3 +-
 .../mtd/nand/raw/ingenic/ingenic_nand_drv.c   |   2 +-
 drivers/mtd/nand/raw/ingenic/jz4725b_bch.c    |   4 +-
 drivers/mtd/nand/raw/ingenic/jz4780_bch.c     |   4 +-
 drivers/mtd/nand/raw/nand_base.c              |   9 +-
 drivers/mtd/nand/raw/nand_legacy.c            |   6 +-
 drivers/mtd/nand/raw/nandsim.c                |   4 +-
 drivers/mtd/nand/raw/omap_elm.c               |   8 +-
 drivers/mtd/spi-nor/aspeed-smc.c              |   2 +-
 drivers/mtd/spi-nor/spi-nor.c                 |   1 -
 drivers/mtd/ubi/attach.c                      |   2 +-
 drivers/mtd/ubi/build.c                       |   4 +-
 drivers/mux/adgs1408.c                        |   2 +-
 drivers/net/appletalk/cops.c                  |   2 +-
 drivers/net/arcnet/arc-rimi.c                 |   6 +-
 drivers/net/arcnet/com20020-isa.c             |  12 +-
 drivers/net/arcnet/com90io.c                  |   4 +-
 drivers/net/arcnet/com90xx.c                  |   6 +-
 drivers/net/bonding/bond_3ad.c                |   6 +-
 drivers/net/bonding/bond_main.c               |   8 +-
 drivers/net/can/at91_can.c                    |   4 +-
 drivers/net/can/peak_canfd/peak_pciefd_main.c |   3 +-
 drivers/net/can/sja1000/sja1000_platform.c    |   2 +-
 drivers/net/can/slcan.c                       |   4 +-
 drivers/net/can/spi/mcp251x.c                 |   2 +-
 drivers/net/can/usb/peak_usb/pcan_usb.c       |   3 +-
 drivers/net/can/usb/peak_usb/pcan_usb_core.c  |   2 +-
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c   |   4 +-
 drivers/net/dsa/b53/b53_common.c              |   2 +-
 drivers/net/dsa/b53/b53_serdes.c              |   2 +-
 drivers/net/dsa/bcm_sf2.c                     |   2 +-
 drivers/net/dsa/microchip/ksz9477.c           |   2 +-
 drivers/net/dsa/mt7530.c                      |   2 +-
 drivers/net/dsa/mv88e6xxx/chip.c              |   2 +-
 drivers/net/ethernet/3com/3c509.c             |   4 +-
 drivers/net/ethernet/3com/3c574_cs.c          |   2 +-
 drivers/net/ethernet/8390/axnet_cs.c          |   2 +-
 drivers/net/ethernet/8390/pcnet_cs.c          |   2 +-
 drivers/net/ethernet/alacritech/slicoss.c     |   8 +-
 drivers/net/ethernet/alteon/acenic.c          |   2 +-
 drivers/net/ethernet/amd/amd8111e.c           |   3 +-
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c      |   6 +-
 drivers/net/ethernet/broadcom/bgmac-bcma.c    |   2 +-
 .../net/ethernet/broadcom/bgmac-platform.c    |   2 +-
 drivers/net/ethernet/broadcom/bnx2.c          |  15 ++-
 .../net/ethernet/broadcom/bnx2x/bnx2x_link.c  |  14 +--
 .../net/ethernet/broadcom/bnx2x/bnx2x_main.c  |   6 +-
 .../net/ethernet/broadcom/bnx2x/bnx2x_sriov.c |   4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  17 ++-
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |   4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c |   4 +-
 drivers/net/ethernet/broadcom/cnic.c          |   4 +-
 .../net/ethernet/broadcom/genet/bcmgenet.c    |   4 +-
 drivers/net/ethernet/broadcom/genet/bcmmii.c  |   2 +-
 drivers/net/ethernet/broadcom/tg3.c           |  58 +++++----
 drivers/net/ethernet/brocade/bna/bfa_ioc.c    |   8 +-
 drivers/net/ethernet/brocade/bna/bna_enet.c   |   2 +-
 drivers/net/ethernet/brocade/bna/bna_tx_rx.c  |   3 +-
 drivers/net/ethernet/cadence/macb_ptp.c       |   2 +-
 .../net/ethernet/cavium/liquidio/lio_main.c   |  42 +++----
 .../ethernet/cavium/liquidio/lio_vf_main.c    |  37 ++----
 .../ethernet/cavium/thunder/nicvf_ethtool.c   |   2 +-
 .../net/ethernet/cavium/thunder/nicvf_main.c  |   4 +-
 .../net/ethernet/chelsio/cxgb3/cxgb3_main.c   |   2 +-
 drivers/net/ethernet/chelsio/cxgb3/l2t.c      |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/l2t.c      |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c    |   6 +-
 .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c   |   3 +-
 drivers/net/ethernet/cisco/enic/enic_main.c   |   4 +-
 drivers/net/ethernet/davicom/dm9000.c         |   2 +-
 drivers/net/ethernet/dec/tulip/de4x5.c        |   9 +-
 drivers/net/ethernet/dec/tulip/tulip_core.c   |   3 +-
 drivers/net/ethernet/dec/tulip/winbond-840.c  |   3 +-
 .../net/ethernet/emulex/benet/be_ethtool.c    |   2 +-
 .../net/ethernet/freescale/dpaa/dpaa_eth.c    |   2 +-
 .../ethernet/freescale/dpaa/dpaa_ethtool.c    |   2 +-
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  |   4 +-
 .../net/ethernet/freescale/fman/fman_memac.c  |   2 +-
 .../net/ethernet/freescale/fman/fman_port.c   |   4 +-
 drivers/net/ethernet/freescale/ucc_geth.c     |   2 +-
 .../net/ethernet/hisilicon/hns/hns_ethtool.c  |   2 +-
 .../net/ethernet/hisilicon/hns3/hns3_enet.c   |   2 +-
 .../hisilicon/hns3/hns3pf/hclge_main.c        |   4 +-
 drivers/net/ethernet/ibm/ehea/ehea_main.c     |   3 +-
 drivers/net/ethernet/ibm/emac/core.c          |   2 +-
 drivers/net/ethernet/intel/e1000/e1000_hw.c   |   4 +-
 drivers/net/ethernet/intel/e1000/e1000_main.c |   2 +-
 .../net/ethernet/intel/e1000/e1000_param.c    |   2 +-
 drivers/net/ethernet/intel/e1000e/82571.c     |   4 +-
 drivers/net/ethernet/intel/e1000e/ethtool.c   |  11 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.c   |  16 ++-
 drivers/net/ethernet/intel/e1000e/netdev.c    |  13 +-
 drivers/net/ethernet/intel/e1000e/param.c     |   2 +-
 drivers/net/ethernet/intel/e1000e/phy.c       |   2 +-
 drivers/net/ethernet/intel/e1000e/ptp.c       |   3 +-
 .../net/ethernet/intel/fm10k/fm10k_ethtool.c  |   4 +-
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |   2 +-
 drivers/net/ethernet/intel/fm10k/fm10k_mbx.c  |   8 +-
 .../net/ethernet/intel/fm10k/fm10k_netdev.c   |   2 +-
 drivers/net/ethernet/intel/fm10k/fm10k_pf.c   |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_adminq.c |   2 +-
 .../net/ethernet/intel/i40e/i40e_ethtool.c    |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c   |   5 +-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c    |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_xsk.c    |   4 +-
 drivers/net/ethernet/intel/igb/e1000_82575.c  |   4 +-
 drivers/net/ethernet/intel/igb/e1000_nvm.c    |   2 +-
 drivers/net/ethernet/intel/igb/e1000_phy.c    |   4 +-
 drivers/net/ethernet/intel/igb/igb_ethtool.c  |   8 +-
 drivers/net/ethernet/intel/igb/igb_main.c     |  25 ++--
 drivers/net/ethernet/intel/igb/igb_ptp.c      |   2 +-
 drivers/net/ethernet/intel/igbvf/netdev.c     |   4 +-
 drivers/net/ethernet/intel/igc/igc_ethtool.c  |  16 +--
 drivers/net/ethernet/intel/igc/igc_main.c     |   5 +-
 drivers/net/ethernet/intel/igc/igc_ptp.c      |   2 +-
 .../net/ethernet/intel/ixgbe/ixgbe_82598.c    |   2 +-
 .../net/ethernet/intel/ixgbe/ixgbe_82599.c    |   6 +-
 .../net/ethernet/intel/ixgbe/ixgbe_common.c   |   5 +-
 .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  10 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  30 ++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c  |   4 +-
 .../net/ethernet/intel/ixgbe/ixgbe_sriov.c    |   4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |  10 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c  |   4 +-
 .../net/ethernet/intel/ixgbevf/ixgbevf_main.c |   8 +-
 drivers/net/ethernet/intel/ixgbevf/vf.c       |   6 +-
 drivers/net/ethernet/marvell/mvneta.c         |   4 +-
 .../net/ethernet/marvell/mvpp2/mvpp2_cls.c    |   2 +-
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |   4 +-
 .../ethernet/marvell/octeontx2/af/rvu_nix.c   |   2 +-
 drivers/net/ethernet/marvell/skge.c           |   3 +-
 drivers/net/ethernet/marvell/sky2.c           |   5 +-
 drivers/net/ethernet/mediatek/mtk_eth_soc.c   |   6 +-
 drivers/net/ethernet/mellanox/mlx4/en_rx.c    |   4 +-
 drivers/net/ethernet/mellanox/mlx4/eq.c       |   2 +-
 drivers/net/ethernet/mellanox/mlx4/mcg.c      |   6 +-
 .../net/ethernet/mellanox/mlx5/core/en/txrx.h |   2 +-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.c  |   4 +-
 .../mellanox/mlx5/core/en_accel/ktls_tx.c     |   2 +-
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |   2 +-
 .../mellanox/mlx5/core/eswitch_offloads.c     |   2 +-
 .../ethernet/mellanox/mlx5/core/fpga/conn.c   |   4 +-
 .../net/ethernet/mellanox/mlx5/core/lag_mp.c  |   8 +-
 .../net/ethernet/mellanox/mlx5/core/vport.c   |   2 +-
 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c   |   4 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  18 +--
 .../net/ethernet/mellanox/mlxsw/core_env.c    |   8 +-
 .../net/ethernet/mellanox/mlxsw/core_hwmon.c  |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  10 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c |  32 ++---
 .../mellanox/mlxsw/spectrum_switchdev.c       |  12 +-
 .../net/ethernet/microchip/lan743x_ethtool.c  |   2 +-
 drivers/net/ethernet/mscc/ocelot.c            |   2 +-
 drivers/net/ethernet/mscc/ocelot_tc.c         |   2 +-
 drivers/net/ethernet/natsemi/natsemi.c        |   3 +-
 .../net/ethernet/neterion/vxge/vxge-config.c  |   6 +-
 .../net/ethernet/netronome/nfp/crypto/tls.c   |   2 +-
 .../ethernet/netronome/nfp/flower/action.c    |   2 +-
 .../net/ethernet/netronome/nfp/flower/cmsg.c  |   2 +-
 .../ethernet/netronome/nfp/flower/offload.c   |   2 +-
 drivers/net/ethernet/netronome/nfp/nfp_asm.c  |   2 +-
 .../ethernet/netronome/nfp/nfp_net_common.c   |   4 +-
 .../netronome/nfp/nfpcore/nfp6000_pcie.c      |   4 +-
 .../netronome/nfp/nfpcore/nfp_rtsym.c         |   2 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_param.c |   2 +-
 .../net/ethernet/packetengines/yellowfin.c    |   3 +-
 .../qlogic/netxen/netxen_nic_ethtool.c        |   4 +-
 drivers/net/ethernet/qlogic/qed/qed_cxt.c     |   2 +-
 drivers/net/ethernet/qlogic/qed/qed_dev.c     |   5 +-
 drivers/net/ethernet/qlogic/qed/qed_main.c    |   6 +-
 drivers/net/ethernet/qlogic/qed/qed_mcp.c     |  10 +-
 drivers/net/ethernet/qlogic/qede/qede_fp.c    |   4 +-
 drivers/net/ethernet/qlogic/qla3xxx.c         |   3 +-
 .../ethernet/qlogic/qlcnic/qlcnic_ethtool.c   |   4 +-
 drivers/net/ethernet/realtek/r8169_main.c     |   4 +-
 drivers/net/ethernet/rocker/rocker_main.c     |   8 +-
 .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    |   4 +-
 drivers/net/ethernet/sfc/falcon/ethtool.c     |   2 +-
 drivers/net/ethernet/sfc/falcon/farch.c       |  14 +--
 drivers/net/ethernet/sfc/farch.c              |  14 +--
 drivers/net/ethernet/sfc/mcdi_filters.c       |   2 +-
 drivers/net/ethernet/sfc/mcdi_port_common.c   |   2 +-
 drivers/net/ethernet/sfc/rx.c                 |   2 +-
 drivers/net/ethernet/sis/sis900.c             |   3 +-
 drivers/net/ethernet/smsc/smc911x.c           |   2 +-
 drivers/net/ethernet/socionext/netsec.c       |   4 +-
 .../ethernet/stmicro/stmmac/dwmac-anarion.c   |   5 +-
 .../ethernet/stmicro/stmmac/dwmac-meson8b.c   |   3 +-
 .../stmicro/stmmac/stmmac_selftests.c         |   4 +-
 .../net/ethernet/stmicro/stmmac/stmmac_tc.c   |   2 +-
 drivers/net/ethernet/sun/cassini.c            |   3 +-
 drivers/net/ethernet/sun/niu.c                |   6 +-
 drivers/net/ethernet/sun/sungem.c             |   3 +-
 drivers/net/ethernet/ti/cpsw-phy-sel.c        |   4 +-
 drivers/net/ethernet/ti/cpsw_priv.c           |   4 +-
 drivers/net/ethernet/ti/cpts.c                |   2 +-
 drivers/net/ethernet/ti/tlan.c                |   4 +-
 .../net/ethernet/toshiba/ps3_gelic_wireless.c |   2 +-
 drivers/net/ethernet/toshiba/spider_net.c     |  29 +++--
 drivers/net/ethernet/xircom/xirc2ps_cs.c      |   2 +-
 drivers/net/fddi/skfp/pcmplc.c                |   4 +-
 drivers/net/fjes/fjes_main.c                  |   2 +-
 drivers/net/hamradio/baycom_epp.c             |   3 +-
 drivers/net/hamradio/mkiss.c                  |   5 +-
 drivers/net/macvlan.c                         |   2 +-
 drivers/net/mii.c                             |   3 +-
 drivers/net/netdevsim/bus.c                   |   2 +-
 drivers/net/netdevsim/fib.c                   |   6 +-
 drivers/net/phy/adin.c                        |   4 +-
 drivers/net/phy/dp83640.c                     |   8 +-
 drivers/net/phy/fixed_phy.c                   |   4 +-
 drivers/net/phy/phy.c                         |   6 +-
 drivers/net/phy/phylink.c                     |   6 +-
 drivers/net/phy/sfp-bus.c                     |   4 +-
 drivers/net/phy/sfp.c                         |  12 +-
 drivers/net/plip/plip.c                       |  38 ++----
 drivers/net/tun.c                             |   6 +-
 drivers/net/usb/aqc111.c                      |   6 +-
 drivers/net/usb/catc.c                        |   2 +-
 drivers/net/usb/cdc-phonet.c                  |   2 +-
 drivers/net/usb/lan78xx.c                     |   7 +-
 drivers/net/usb/pegasus.c                     |   4 +-
 drivers/net/usb/r8152.c                       |   7 +-
 drivers/net/usb/rtl8150.c                     |   2 +-
 drivers/net/usb/usbnet.c                      |   7 +-
 drivers/net/veth.c                            |   8 +-
 drivers/net/virtio_net.c                      |   6 +-
 drivers/net/wan/lapbether.c                   |   2 +-
 drivers/net/wan/sdla.c                        |   3 +-
 drivers/net/wan/x25_asy.c                     |   2 +-
 drivers/net/wimax/i2400m/control.c            |   2 +-
 drivers/net/wimax/i2400m/usb-fw.c             |   2 +-
 drivers/net/wimax/i2400m/usb-tx.c             |   2 +-
 drivers/net/wimax/i2400m/usb.c                |   2 +-
 drivers/net/wireless/ath/ath10k/core.c        |   2 +-
 drivers/net/wireless/ath/ath10k/htt_rx.c      |   2 +-
 drivers/net/wireless/ath/ath10k/htt_tx.c      |   6 +-
 drivers/net/wireless/ath/ath10k/mac.c         |  18 +--
 drivers/net/wireless/ath/ath10k/wow.c         |   2 +-
 drivers/net/wireless/ath/ath11k/core.c        |   2 +-
 drivers/net/wireless/ath/ath11k/dp.c          |   2 +-
 drivers/net/wireless/ath/ath11k/mac.c         |  23 ++--
 drivers/net/wireless/ath/ath5k/eeprom.c       |   4 +-
 drivers/net/wireless/ath/ath5k/pcu.c          |   4 +-
 drivers/net/wireless/ath/ath5k/phy.c          |   7 +-
 drivers/net/wireless/ath/ath5k/reset.c        |   2 +-
 drivers/net/wireless/ath/ath6kl/cfg80211.c    |   6 +-
 drivers/net/wireless/ath/ath6kl/main.c        |   2 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c   |   4 +-
 drivers/net/wireless/ath/ath9k/ar9002_mac.c   |   2 +-
 drivers/net/wireless/ath/ath9k/ar9002_phy.c   |   2 +-
 drivers/net/wireless/ath/ath9k/ar9003_mac.c   |   2 +-
 drivers/net/wireless/ath/ath9k/channel.c      |   4 +-
 drivers/net/wireless/ath/ath9k/eeprom_def.c   |   2 +-
 drivers/net/wireless/ath/ath9k/hw.c           |   6 +-
 drivers/net/wireless/ath/ath9k/main.c         |   2 +-
 drivers/net/wireless/ath/carl9170/rx.c        |   3 +-
 drivers/net/wireless/ath/carl9170/tx.c        |   9 +-
 drivers/net/wireless/ath/wcn36xx/smd.c        |   2 +-
 drivers/net/wireless/atmel/at76c50x-usb.c     |   2 +-
 drivers/net/wireless/atmel/atmel.c            |   2 +-
 drivers/net/wireless/broadcom/b43/dma.c       |   2 +-
 drivers/net/wireless/broadcom/b43/main.c      |   8 +-
 drivers/net/wireless/broadcom/b43/phy_n.c     |   2 +-
 drivers/net/wireless/broadcom/b43/pio.c       |   2 +-
 .../net/wireless/broadcom/b43/tables_nphy.c   |   2 +-
 drivers/net/wireless/broadcom/b43legacy/dma.c |   2 +-
 .../net/wireless/broadcom/b43legacy/main.c    |   4 +-
 .../broadcom/brcm80211/brcmfmac/cfg80211.c    |   8 +-
 .../broadcom/brcm80211/brcmfmac/chip.c        |   2 +-
 .../broadcom/brcm80211/brcmsmac/rate.c        |   1 -
 .../net/wireless/intel/iwlegacy/3945-mac.c    |   2 +-
 .../net/wireless/intel/iwlegacy/4965-mac.c    |   4 +-
 drivers/net/wireless/intel/iwlegacy/common.c  |   5 +-
 .../net/wireless/intel/iwlwifi/dvm/mac80211.c |   2 +-
 drivers/net/wireless/intel/iwlwifi/dvm/rx.c   |   6 +-
 drivers/net/wireless/intel/iwlwifi/dvm/scan.c |   2 +-
 drivers/net/wireless/intel/iwlwifi/dvm/sta.c  |   2 +-
 drivers/net/wireless/intel/iwlwifi/dvm/tx.c   |   2 +-
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c  |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/led.c  |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/mac80211.c |   2 +-
 .../net/wireless/intel/iwlwifi/mvm/phy-ctxt.c |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rx.c   |   3 +-
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c |   8 +-
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c  |  10 +-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c   |   4 +-
 drivers/net/wireless/intersil/orinoco/main.c  |   4 +-
 .../wireless/intersil/orinoco/orinoco_usb.c   |   9 +-
 .../net/wireless/intersil/prism54/isl_38xx.c  |   3 +-
 .../net/wireless/intersil/prism54/isl_ioctl.c |   2 +-
 .../wireless/intersil/prism54/islpci_dev.c    |   2 +-
 drivers/net/wireless/mac80211_hwsim.c         |   2 +-
 .../net/wireless/marvell/mwifiex/cfg80211.c   |   8 +-
 drivers/net/wireless/marvell/mwifiex/ie.c     |   2 +-
 drivers/net/wireless/marvell/mwifiex/scan.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt7603/dma.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt7603/mac.c   |   4 +-
 .../net/wireless/mediatek/mt76/mt7615/dma.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt7615/mac.c   |   4 +-
 .../net/wireless/mediatek/mt76/mt76x0/phy.c   |   2 +-
 .../net/wireless/mediatek/mt76/mt76x02_mac.c  |   6 +-
 drivers/net/wireless/mediatek/mt76/usb.c      |   2 +-
 drivers/net/wireless/mediatek/mt7601u/dma.c   |   4 +-
 drivers/net/wireless/mediatek/mt7601u/mac.c   |   4 +-
 drivers/net/wireless/mediatek/mt7601u/phy.c   |   2 +-
 .../net/wireless/ralink/rt2x00/rt2400pci.c    |   2 +-
 .../net/wireless/ralink/rt2x00/rt2500pci.c    |   2 +-
 .../net/wireless/ralink/rt2x00/rt2800lib.c    |  42 +++----
 .../net/wireless/ralink/rt2x00/rt2800mmio.c   |   1 -
 .../net/wireless/ralink/rt2x00/rt2800usb.c    |   1 -
 drivers/net/wireless/ralink/rt2x00/rt61pci.c  |   3 +-
 drivers/net/wireless/ralink/rt2x00/rt73usb.c  |   1 -
 drivers/net/wireless/ray_cs.c                 |   6 +-
 .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c |   8 +-
 drivers/net/wireless/realtek/rtlwifi/base.c   |   2 +-
 drivers/net/wireless/realtek/rtlwifi/core.c   |   4 +-
 .../wireless/realtek/rtlwifi/rtl8821ae/phy.c  |   2 +-
 drivers/net/wireless/realtek/rtw88/main.c     |   4 +-
 drivers/net/wireless/realtek/rtw88/phy.c      |   6 +-
 drivers/net/wireless/ti/wlcore/main.c         |   4 +-
 drivers/net/wireless/zydas/zd1201.c           |   2 +-
 drivers/net/xen-netback/hash.c                |   2 +-
 drivers/net/xen-netback/xenbus.c              |   2 +-
 drivers/net/xen-netfront.c                    |   2 +-
 drivers/nfc/pn533/pn533.c                     |   4 +-
 drivers/nfc/st21nfca/dep.c                    |   2 +-
 drivers/nfc/trf7970a.c                        |   4 +-
 drivers/ntb/ntb_transport.c                   |   4 +-
 drivers/nvme/host/core.c                      |  10 +-
 drivers/nvme/host/pci.c                       |   2 +-
 drivers/nvme/host/rdma.c                      |   2 +-
 drivers/nvme/target/core.c                    |   2 +-
 drivers/nvme/target/fcloop.c                  |   3 +-
 drivers/nvme/target/io-cmd-bdev.c             |   1 -
 drivers/nvme/target/rdma.c                    |   2 +-
 drivers/parport/ieee1284.c                    |   8 +-
 drivers/parport/parport_pc.c                  |   2 +-
 drivers/pci/controller/dwc/pci-imx6.c         |   6 +-
 drivers/pci/controller/pci-rcar-gen2.c        |   2 +-
 drivers/pci/hotplug/ibmphp_res.c              |   2 +-
 drivers/pci/hotplug/pciehp_ctrl.c             |   4 +-
 drivers/pci/hotplug/shpchp_ctrl.c             |   4 +-
 drivers/pci/pci-acpi.c                        |   6 +-
 drivers/pci/pci.c                             |   4 +-
 drivers/pci/proc.c                            |   2 +-
 drivers/pci/quirks.c                          |   4 +-
 drivers/pci/setup-bus.c                       |   2 +-
 drivers/pci/xen-pcifront.c                    |   2 +-
 drivers/pcmcia/db1xxx_ss.c                    |   8 +-
 drivers/perf/arm-ccn.c                        |   2 +-
 drivers/perf/arm_spe_pmu.c                    |   4 +-
 drivers/phy/qualcomm/phy-qcom-usb-hs.c        |   2 +-
 drivers/phy/rockchip/phy-rockchip-inno-usb2.c |   8 +-
 drivers/pinctrl/intel/pinctrl-baytrail.c      |   4 +-
 drivers/pinctrl/pinctrl-lpc18xx.c             |  12 +-
 drivers/pinctrl/pinctrl-single.c              |   2 +-
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c      |   4 +-
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c      |   2 +-
 drivers/platform/olpc/olpc-xo175-ec.c         |   2 +-
 drivers/platform/x86/acer-wmi.c               |   8 +-
 drivers/platform/x86/dell-laptop.c            |   4 +-
 drivers/platform/x86/surfacepro3_button.c     |   8 +-
 drivers/platform/x86/thinkpad_acpi.c          |   8 +-
 drivers/platform/x86/toshiba_acpi.c           |   2 +-
 drivers/power/supply/ab8500_charger.c         |   4 +-
 drivers/power/supply/ab8500_fg.c              |   7 +-
 drivers/power/supply/abx500_chargalg.c        |  39 ++----
 drivers/power/supply/axp20x_usb_power.c       |   2 +-
 drivers/power/supply/cros_usbpd-charger.c     |   2 +-
 drivers/power/supply/max8925_power.c          |   2 +-
 drivers/power/supply/wm831x_power.c           |   2 +-
 drivers/power/supply/wm8350_power.c           |   2 +-
 drivers/ps3/ps3av.c                           |   2 +-
 drivers/ps3/ps3av_cmd.c                       |   4 +-
 drivers/rapidio/devices/rio_mport_cdev.c      |   2 +-
 drivers/regulator/axp20x-regulator.c          |   9 +-
 drivers/regulator/core.c                      |   3 +-
 drivers/regulator/slg51000-regulator.c        |   3 +-
 drivers/regulator/twl6030-regulator.c         |   2 +-
 drivers/reset/reset-imx7.c                    |  10 +-
 drivers/rpmsg/qcom_glink_native.c             |   4 +-
 drivers/rtc/rtc-ds1374.c                      |   2 +-
 drivers/rtc/rtc-m41t80.c                      |   2 +-
 drivers/rtc/rtc-pcf85063.c                    |   2 +-
 drivers/rtc/rtc-pcf8523.c                     |   2 +-
 drivers/rtc/rtc-stmp3xxx.c                    |   2 +-
 drivers/s390/char/con3215.c                   |   2 +-
 drivers/s390/char/hmcdrv_ftp.c                |   2 +-
 drivers/s390/char/sclp_sdias.c                |   2 +-
 drivers/s390/char/tape_core.c                 |   6 +-
 drivers/s390/cio/device.c                     |   4 +-
 drivers/s390/crypto/ap_bus.c                  |   2 +-
 drivers/s390/crypto/ap_queue.c                |   8 +-
 drivers/s390/crypto/vfio_ap_ops.c             |   2 +-
 drivers/s390/crypto/zcrypt_msgtype6.c         |   8 +-
 drivers/s390/net/ctcm_fsms.c                  |   2 +-
 drivers/s390/net/ctcm_mpc.c                   |   6 +-
 drivers/s390/net/qeth_core_main.c             |   4 +-
 drivers/s390/net/qeth_ethtool.c               |   6 +-
 drivers/s390/net/qeth_l2_main.c               |   2 +-
 drivers/s390/net/qeth_l3_main.c               |   2 +-
 drivers/s390/scsi/zfcp_erp.c                  |  10 +-
 drivers/s390/scsi/zfcp_fsf.c                  |  23 ++--
 drivers/scsi/53c700.c                         |   2 +-
 drivers/scsi/BusLogic.c                       |   2 +-
 drivers/scsi/FlashPoint.c                     |   9 +-
 drivers/scsi/NCR5380.c                        |   2 +-
 drivers/scsi/aacraid/aachba.c                 |   9 +-
 drivers/scsi/aacraid/commsup.c                |   2 +-
 drivers/scsi/aacraid/linit.c                  |   2 +-
 drivers/scsi/aic7xxx/aic79xx_core.c           |  40 +++---
 drivers/scsi/aic7xxx/aic79xx_osm.c            |   2 +-
 drivers/scsi/aic7xxx/aic7xxx_core.c           |  28 ++---
 drivers/scsi/aic94xx/aic94xx_scb.c            |  11 +-
 drivers/scsi/aic94xx/aic94xx_tmf.c            |   2 +-
 drivers/scsi/arcmsr/arcmsr_hba.c              |   2 +-
 drivers/scsi/arm/fas216.c                     |  17 +--
 drivers/scsi/be2iscsi/be_iscsi.c              |   2 +-
 drivers/scsi/be2iscsi/be_main.c               |   2 +-
 drivers/scsi/bfa/bfa_fcpim.c                  |   6 +-
 drivers/scsi/bfa/bfa_fcs_lport.c              |   6 +-
 drivers/scsi/bfa/bfa_fcs_rport.c              |  16 ++-
 drivers/scsi/bfa/bfa_ioc.c                    |   8 +-
 drivers/scsi/bfa/bfa_svc.c                    |   3 +-
 drivers/scsi/bnx2fc/bnx2fc_hwi.c              |   1 -
 drivers/scsi/csiostor/csio_hw.c               |   3 +-
 drivers/scsi/csiostor/csio_lnode.c            |   1 -
 drivers/scsi/csiostor/csio_wr.c               |   2 +-
 drivers/scsi/cxgbi/cxgb3i/cxgb3i.c            |   2 +-
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c            |   2 +-
 drivers/scsi/cxlflash/main.c                  |  29 +++--
 drivers/scsi/cxlflash/superpipe.c             |  13 +-
 drivers/scsi/device_handler/scsi_dh_hp_sw.c   |   4 +-
 drivers/scsi/esas2r/esas2r_flash.c            |   4 +-
 drivers/scsi/esas2r/esas2r_init.c             |   6 +-
 drivers/scsi/esp_scsi.c                       |   6 +-
 drivers/scsi/fcoe/fcoe_ctlr.c                 |   8 +-
 drivers/scsi/g_NCR5380.c                      |   2 +-
 drivers/scsi/hisi_sas/hisi_sas_main.c         |   2 +-
 drivers/scsi/hpsa.c                           |  10 +-
 drivers/scsi/ibmvscsi/ibmvfc.c                |   6 +-
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c      |   6 +-
 drivers/scsi/imm.c                            |  21 ++--
 drivers/scsi/isci/phy.c                       |   2 +-
 drivers/scsi/isci/remote_device.c             |   5 +-
 drivers/scsi/isci/remote_node_context.c       |   6 +-
 drivers/scsi/isci/request.c                   |   2 +-
 drivers/scsi/libfc/fc_exch.c                  |   4 +-
 drivers/scsi/libfc/fc_fcp.c                   |   9 +-
 drivers/scsi/libfc/fc_lport.c                 |   2 +-
 drivers/scsi/libfc/fc_rport.c                 |   2 +-
 drivers/scsi/libiscsi.c                       |   6 +-
 drivers/scsi/libiscsi_tcp.c                   |   2 +-
 drivers/scsi/libsas/sas_ata.c                 |   2 +-
 drivers/scsi/libsas/sas_discover.c            |   4 +-
 drivers/scsi/libsas/sas_expander.c            |   2 +-
 drivers/scsi/libsas/sas_scsi_host.c           |   2 +-
 drivers/scsi/lpfc/lpfc_ct.c                   |   4 +-
 drivers/scsi/lpfc/lpfc_els.c                  |   2 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c              |   6 +-
 drivers/scsi/lpfc/lpfc_nportdisc.c            |   2 +-
 drivers/scsi/lpfc/lpfc_nvme.c                 |   2 +-
 drivers/scsi/lpfc/lpfc_scsi.c                 |   9 +-
 drivers/scsi/lpfc/lpfc_sli.c                  |  30 +++--
 drivers/scsi/megaraid.c                       |  12 +-
 drivers/scsi/megaraid/megaraid_mbox.c         |   4 +-
 drivers/scsi/megaraid/megaraid_sas_base.c     |   3 +-
 drivers/scsi/megaraid/megaraid_sas_fusion.c   |   2 +-
 drivers/scsi/mesh.c                           |   3 +-
 drivers/scsi/mpt3sas/mpt3sas_base.c           |   2 +-
 drivers/scsi/mpt3sas/mpt3sas_ctl.c            |   2 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c          |  10 +-
 drivers/scsi/myrb.c                           |   8 +-
 drivers/scsi/ncr53c8xx.c                      |  16 ++-
 drivers/scsi/pcmcia/nsp_cs.c                  |   2 +-
 drivers/scsi/ppa.c                            |  15 +--
 drivers/scsi/qla2xxx/qla_gs.c                 |   2 +-
 drivers/scsi/qla2xxx/qla_init.c               |   2 +-
 drivers/scsi/qla2xxx/qla_iocb.c               |   2 +-
 drivers/scsi/qla2xxx/qla_isr.c                |  10 +-
 drivers/scsi/qla2xxx/qla_sup.c                |   8 +-
 drivers/scsi/qla2xxx/qla_target.c             |   6 +-
 drivers/scsi/qla4xxx/ql4_os.c                 |   2 +-
 drivers/scsi/qlogicpti.c                      |  20 +--
 drivers/scsi/scsi_error.c                     |  29 +++--
 drivers/scsi/scsi_ioctl.c                     |   4 +-
 drivers/scsi/scsi_lib.c                       |   2 +-
 drivers/scsi/smartpqi/smartpqi_init.c         |  17 ++-
 drivers/scsi/sr.c                             |   4 +-
 drivers/scsi/st.c                             |   8 +-
 drivers/scsi/sun3_scsi.c                      |   6 +-
 drivers/scsi/sym53c8xx_2/sym_fw.c             |   2 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.c           |   4 +-
 drivers/scsi/sym53c8xx_2/sym_nvram.c          |   2 +-
 drivers/scsi/ufs/ufs_bsg.c                    |   3 +-
 drivers/scsi/ufs/ufshcd.c                     |   8 +-
 drivers/scsi/virtio_scsi.c                    |   2 +-
 drivers/scsi/vmw_pvscsi.c                     |   3 +-
 drivers/scsi/wd33c93.c                        |   2 +-
 drivers/scsi/xen-scsifront.c                  |   2 +-
 drivers/soc/qcom/socinfo.c                    |  16 +--
 drivers/soc/tegra/pmc.c                       |   3 +-
 drivers/spi/spi-bcm2835aux.c                  |   4 +-
 drivers/spi/spi-fsl-cpm.c                     |   4 +-
 drivers/spi/spi-sprd-adi.c                    |   2 +-
 drivers/ssb/driver_chipcommon.c               |   2 +-
 drivers/ssb/driver_mipscore.c                 |   2 +-
 drivers/ssb/scan.c                            |   2 +-
 drivers/staging/comedi/drivers/s526.c         |   2 +-
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c       |   2 +-
 drivers/staging/gdm724x/gdm_lte.c             |   2 +-
 drivers/staging/ks7010/ks_wlan_net.c          |  18 +--
 .../media/hantro/hantro_g1_mpeg2_dec.c        |   2 +-
 .../media/hantro/rk3399_vpu_hw_mpeg2_dec.c    |   2 +-
 drivers/staging/media/imx/imx-media-csi.c     |   2 +-
 .../staging/media/soc_camera/soc_mediabus.c   |   2 +-
 .../staging/media/usbvision/usbvision-i2c.c   |   6 +-
 drivers/staging/qlge/qlge_mpi.c               |   4 +-
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |   2 +-
 drivers/staging/rtl8188eu/hal/usb_halinit.c   |   2 +-
 .../staging/rtl8188eu/os_dep/usb_ops_linux.c  |   2 +-
 drivers/staging/rtl8192e/rtllib_wx.c          |   2 +-
 drivers/staging/rtl8712/usb_ops_linux.c       |   2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c |   2 +-
 .../interface/vchiq_arm/vchiq_core.c          |   2 +-
 drivers/staging/vt6655/channel.c              |   2 +-
 drivers/staging/vt6655/key.c                  |   6 +-
 drivers/staging/vt6656/card.c                 |   4 +-
 drivers/staging/vt6656/channel.c              |   2 +-
 drivers/staging/vt6656/key.c                  |   6 +-
 drivers/target/iscsi/cxgbit/cxgbit_main.c     |   2 +-
 drivers/target/iscsi/iscsi_target.c           |   2 +-
 drivers/target/target_core_pr.c               |   4 +-
 drivers/target/target_core_sbc.c              |   2 +-
 drivers/target/target_core_transport.c        |   4 +-
 drivers/target/tcm_fc/tfc_cmd.c               |   2 +-
 drivers/thermal/clock_cooling.c               |   2 +-
 drivers/thermal/qcom/tsens-v0_1.c             |   8 +-
 drivers/thermal/qcom/tsens-v1.c               |   4 +-
 drivers/thunderbolt/ctl.c                     |   2 +-
 drivers/thunderbolt/switch.c                  |   3 +-
 drivers/thunderbolt/tunnel.c                  |   4 +-
 drivers/tty/hvc/hvc_xen.c                     |   2 +-
 drivers/tty/mips_ejtag_fdc.c                  |   2 +-
 drivers/tty/n_gsm.c                           |   4 +-
 drivers/tty/n_hdlc.c                          |   3 +-
 drivers/tty/n_r3964.c                         |   1 -
 drivers/tty/serial/8250/8250_em.c             |   2 +-
 drivers/tty/serial/8250/8250_fintek.c         |   2 +-
 drivers/tty/serial/8250/8250_pci.c            |   2 +-
 drivers/tty/serial/8250/8250_port.c           |   2 +-
 drivers/tty/serial/8250/8250_uniphier.c       |   6 +-
 drivers/tty/serial/atmel_serial.c             |   2 +-
 drivers/tty/serial/omap-serial.c              |   2 -
 drivers/tty/serial/rda-uart.c                 |   2 +-
 drivers/tty/serial/serial-tegra.c             |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/sunsu.c                    |   2 +-
 drivers/tty/serial/sunzilog.c                 |   2 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/tty/tty_ioctl.c                       |   2 +-
 drivers/tty/vt/vt.c                           |   6 +-
 drivers/usb/atm/cxacru.c                      |   4 +-
 drivers/usb/c67x00/c67x00-sched.c             |   3 +-
 drivers/usb/cdns3/gadget.c                    |   4 +-
 drivers/usb/class/usbtmc.c                    |   2 +-
 drivers/usb/core/config.c                     |   2 +-
 drivers/usb/core/hcd.c                        |   8 +-
 drivers/usb/core/hub.c                        |   2 +-
 drivers/usb/core/urb.c                        |   4 +-
 drivers/usb/dwc3/core.c                       |   5 +-
 drivers/usb/gadget/composite.c                |  16 +--
 drivers/usb/gadget/function/f_fs.c            |   2 +-
 drivers/usb/gadget/function/f_hid.c           |   2 +-
 drivers/usb/gadget/function/f_mass_storage.c  |   2 -
 drivers/usb/gadget/function/f_phonet.c        |   4 +-
 drivers/usb/gadget/function/f_printer.c       |   7 +-
 drivers/usb/gadget/function/f_rndis.c         |   2 +-
 drivers/usb/gadget/function/f_tcm.c           |   2 +-
 drivers/usb/gadget/function/u_ether.c         |   5 +-
 drivers/usb/gadget/function/u_serial.c        |   6 +-
 drivers/usb/gadget/legacy/inode.c             |   7 +-
 drivers/usb/gadget/udc/atmel_usba_udc.c       |   2 +-
 drivers/usb/gadget/udc/dummy_hcd.c            |  13 +-
 drivers/usb/gadget/udc/fsl_udc_core.c         |   2 +-
 drivers/usb/gadget/udc/goku_udc.c             |   9 +-
 drivers/usb/gadget/udc/omap_udc.c             |   4 +-
 drivers/usb/gadget/udc/pxa25x_udc.c           |   4 +-
 drivers/usb/gadget/udc/s3c2410_udc.c          |   4 +-
 drivers/usb/gadget/udc/tegra-xudc.c           |   2 +-
 drivers/usb/host/ehci-dbg.c                   |   2 +-
 drivers/usb/host/ehci-fsl.c                   |   4 +-
 drivers/usb/host/ehci-hcd.c                   |   4 +-
 drivers/usb/host/ehci-q.c                     |   3 +-
 drivers/usb/host/ehci-sched.c                 |   2 +-
 drivers/usb/host/fotg210-hcd.c                |   9 +-
 drivers/usb/host/isp116x-hcd.c                |   6 +-
 drivers/usb/host/isp1362-hcd.c                |   2 +-
 drivers/usb/host/max3421-hcd.c                |   6 +-
 drivers/usb/host/ohci-hcd.c                   |   4 +-
 drivers/usb/host/ohci-hub.c                   |   2 +-
 drivers/usb/host/ohci-q.c                     |   6 +-
 drivers/usb/host/ohci-tmio.c                  |   6 +-
 drivers/usb/host/oxu210hp-hcd.c               |   9 +-
 drivers/usb/host/pci-quirks.c                 |   3 +-
 drivers/usb/host/xhci-dbgcap.c                |   2 +-
 drivers/usb/host/xhci-hub.c                   |   2 +-
 drivers/usb/host/xhci-mem.c                   |   6 +-
 drivers/usb/host/xhci-ring.c                  |   2 +-
 drivers/usb/host/xhci.c                       |   2 +-
 drivers/usb/image/mdc800.c                    |   3 +-
 drivers/usb/isp1760/isp1760-hcd.c             |   4 +-
 drivers/usb/misc/appledisplay.c               |   2 +-
 drivers/usb/misc/usbtest.c                    |   8 +-
 drivers/usb/misc/yurex.c                      |   2 +-
 drivers/usb/mtu3/mtu3_core.c                  |   2 +-
 drivers/usb/musb/cppi_dma.c                   |   2 +-
 drivers/usb/musb/musb_core.c                  |  13 +-
 drivers/usb/musb/musb_dsps.c                  |   8 +-
 drivers/usb/musb/musb_gadget_ep0.c            |   6 +-
 drivers/usb/musb/musb_host.c                  |   7 +-
 drivers/usb/musb/musb_virthub.c               |   2 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/usb/musb/tusb6010.c                   |   2 +-
 drivers/usb/phy/phy-ab8500-usb.c              |  12 +-
 drivers/usb/phy/phy-fsl-usb.c                 |   4 +-
 drivers/usb/phy/phy-isp1301-omap.c            |  15 ++-
 drivers/usb/phy/phy-mv-usb.c                  |   2 +-
 drivers/usb/renesas_usbhs/mod_gadget.c        |   2 +-
 drivers/usb/renesas_usbhs/pipe.c              |   2 +-
 drivers/usb/serial/cypress_m8.c               |   4 +-
 drivers/usb/serial/io_edgeport.c              |   4 +-
 drivers/usb/serial/kobil_sct.c                |   2 +-
 drivers/usb/serial/upd78f0730.c               |   2 +-
 drivers/usb/storage/sddr55.c                  |   2 +-
 drivers/usb/storage/uas.c                     |   2 +-
 drivers/usb/typec/tcpm/tcpci.c                |   2 +-
 drivers/usb/usbip/stub_rx.c                   |   2 +-
 drivers/usb/usbip/vhci_hcd.c                  |   7 +-
 drivers/usb/usbip/vhci_rx.c                   |   2 +-
 drivers/usb/usbip/vudc_transfer.c             |   4 +-
 drivers/vfio/pci/vfio_pci.c                   |   2 +-
 drivers/vfio/vfio_iommu_type1.c               |   2 +-
 drivers/video/backlight/adp8860_bl.c          |   2 +-
 drivers/video/fbdev/acornfb.c                 |   2 +-
 drivers/video/fbdev/arcfb.c                   |   3 +-
 drivers/video/fbdev/atmel_lcdfb.c             |   4 +-
 drivers/video/fbdev/aty/radeon_pm.c           |   6 +-
 drivers/video/fbdev/cirrusfb.c                |   4 +-
 drivers/video/fbdev/controlfb.c               |   2 +-
 drivers/video/fbdev/core/fbmem.c              |   2 +-
 drivers/video/fbdev/fsl-diu-fb.c              |   4 +-
 drivers/video/fbdev/gxt4500.c                 |   2 +-
 drivers/video/fbdev/hyperv_fb.c               |   4 +-
 drivers/video/fbdev/i740fb.c                  |   2 +-
 drivers/video/fbdev/nvidia/nv_hw.c            |   2 +-
 drivers/video/fbdev/offb.c                    |   4 +-
 drivers/video/fbdev/omap/lcdc.c               |   4 +-
 drivers/video/fbdev/omap/omapfb_main.c        |  20 +--
 drivers/video/fbdev/omap2/omapfb/dss/dispc.c  |   4 +-
 .../video/fbdev/omap2/omapfb/omapfb-ioctl.c   |   3 +-
 .../video/fbdev/omap2/omapfb/omapfb-main.c    |   2 +-
 drivers/video/fbdev/pm2fb.c                   |   4 +-
 drivers/video/fbdev/pxafb.c                   |   3 +-
 drivers/video/fbdev/riva/fbdev.c              |   2 +-
 drivers/video/fbdev/s3c-fb.c                  |   7 +-
 drivers/video/fbdev/sa1100fb.c                |   3 +-
 drivers/video/fbdev/savage/savagefb_driver.c  |   4 +-
 drivers/video/fbdev/sh_mobile_lcdcfb.c        |   4 +-
 drivers/video/fbdev/sis/sis_main.c            |   8 +-
 drivers/video/fbdev/sm501fb.c                 |   3 +-
 drivers/video/fbdev/stifb.c                   |   4 +-
 drivers/video/fbdev/tdfxfb.c                  |   2 +-
 drivers/video/fbdev/via/lcd.c                 |   2 +-
 drivers/video/fbdev/xen-fbfront.c             |   2 +-
 drivers/virt/vboxguest/vboxguest_core.c       |   2 +-
 drivers/virt/vboxguest/vboxguest_utils.c      |   2 +-
 drivers/watchdog/advantechwdt.c               |   2 +-
 drivers/watchdog/alim1535_wdt.c               |   2 +-
 drivers/watchdog/alim7101_wdt.c               |   2 +-
 drivers/watchdog/ar7_wdt.c                    |   3 +-
 drivers/watchdog/ath79_wdt.c                  |   3 +-
 drivers/watchdog/eurotechwdt.c                |   3 +-
 drivers/watchdog/f71808e_wdt.c                |   6 +-
 drivers/watchdog/gef_wdt.c                    |   3 +-
 drivers/watchdog/geodewdt.c                   |   2 +-
 drivers/watchdog/ib700wdt.c                   |   3 +-
 drivers/watchdog/it8712f_wdt.c                |   2 +-
 drivers/watchdog/ixp4xx_wdt.c                 |   3 +-
 drivers/watchdog/m54xx_wdt.c                  |   3 +-
 drivers/watchdog/machzwd.c                    |   2 +-
 drivers/watchdog/mv64x60_wdt.c                |   3 +-
 drivers/watchdog/nv_tco.c                     |   2 +-
 drivers/watchdog/pc87413_wdt.c                |   2 +-
 drivers/watchdog/pcwd.c                       |   3 +-
 drivers/watchdog/pcwd_pci.c                   |   3 +-
 drivers/watchdog/pcwd_usb.c                   |   3 +-
 drivers/watchdog/rc32434_wdt.c                |   2 +-
 drivers/watchdog/riowd.c                      |   3 +-
 drivers/watchdog/sa1100_wdt.c                 |   3 +-
 drivers/watchdog/sb_wdog.c                    |   3 +-
 drivers/watchdog/sbc60xxwdt.c                 |   2 +-
 drivers/watchdog/sbc7240_wdt.c                |   2 +-
 drivers/watchdog/sbc_fitpc2_wdt.c             |   3 +-
 drivers/watchdog/sc1200wdt.c                  |   3 +-
 drivers/watchdog/sc520_wdt.c                  |   2 +-
 drivers/watchdog/sch311x_wdt.c                |   2 +-
 drivers/watchdog/scx200_wdt.c                 |   2 +-
 drivers/watchdog/smsc37b787_wdt.c             |   2 +-
 drivers/watchdog/w83877f_wdt.c                |   2 +-
 drivers/watchdog/w83977f_wdt.c                |   3 +-
 drivers/watchdog/wafer5823wdt.c               |   2 +-
 drivers/watchdog/watchdog_dev.c               |   2 +-
 drivers/watchdog/wdrtas.c                     |   3 +-
 drivers/watchdog/wdt.c                        |   2 +-
 drivers/watchdog/wdt285.c                     |   2 +-
 drivers/watchdog/wdt977.c                     |   3 +-
 drivers/watchdog/wdt_pci.c                    |   2 +-
 drivers/xen/pvcalls-front.c                   |   2 +-
 drivers/xen/xen-acpi-memhotplug.c             |   2 +-
 drivers/xen/xen-pciback/xenbus.c              |   2 +-
 drivers/xen/xen-scsiback.c                    |   2 +-
 drivers/xen/xenbus/xenbus_probe_frontend.c    |   6 +-
 fs/9p/vfs_file.c                              |   2 +-
 fs/adfs/dir_f.c                               |  12 +-
 fs/affs/inode.c                               |   2 +-
 fs/affs/super.c                               |   6 +-
 fs/afs/cmservice.c                            |  21 ++--
 fs/afs/file.c                                 |   3 +-
 fs/afs/flock.c                                |   3 +-
 fs/afs/fsclient.c                             |  12 +-
 fs/afs/misc.c                                 |  18 +--
 fs/afs/rotate.c                               |   2 +-
 fs/afs/rxrpc.c                                |   7 +-
 fs/afs/vlclient.c                             |  24 ++--
 fs/afs/write.c                                |   2 +-
 fs/afs/yfsclient.c                            |  24 ++--
 fs/aio.c                                      |   2 +-
 fs/btrfs/ctree.c                              |   2 +-
 fs/btrfs/ref-verify.c                         |   2 +-
 fs/btrfs/super.c                              |   6 +-
 fs/btrfs/volumes.h                            |   2 +-
 fs/buffer.c                                   |   2 +-
 fs/ceph/dir.c                                 |   2 +-
 fs/ceph/file.c                                |   2 +-
 fs/cifs/cifssmb.c                             |   2 +-
 fs/cifs/connect.c                             |  10 +-
 fs/cifs/sess.c                                |   6 +-
 fs/cifs/smb2pdu.c                             |   6 +-
 fs/configfs/dir.c                             |   4 +-
 fs/dax.c                                      |   2 +-
 fs/dlm/lock.c                                 |   2 +-
 fs/erofs/zmap.c                               |   6 +-
 fs/ext2/inode.c                               |   4 +-
 fs/ext2/super.c                               |   2 +-
 fs/ext4/hash.c                                |   4 +-
 fs/ext4/indirect.c                            |  12 +-
 fs/ext4/readpage.c                            |   4 +-
 fs/f2fs/f2fs.h                                |   2 +-
 fs/f2fs/node.c                                |   4 +-
 fs/fcntl.c                                    |   4 +-
 fs/fs_context.c                               |   2 +-
 fs/fsopen.c                                   |   2 +-
 fs/gfs2/bmap.c                                |   4 +-
 fs/gfs2/quota.c                               |   2 +-
 fs/hfsplus/wrapper.c                          |   2 +-
 fs/io_uring.c                                 |   4 +-
 fs/iomap/seek.c                               |   4 +-
 fs/jffs2/fs.c                                 |   3 +-
 fs/jffs2/readinode.c                          |   4 +-
 fs/libfs.c                                    |   4 +-
 fs/locks.c                                    |   6 +-
 fs/namei.c                                    |   2 +-
 fs/nfs/blocklayout/blocklayout.c              |   2 +-
 fs/nfs/dir.c                                  |   2 +-
 fs/nfs/filelayout/filelayout.c                |   2 +-
 fs/nfs/flexfilelayout/flexfilelayout.c        |   2 +-
 fs/nfs/fs_context.c                           |  22 ++--
 fs/nfs/nfs3acl.c                              |   4 +-
 fs/nfs/nfs4file.c                             |   2 +-
 fs/nfs/nfs4idmap.c                            |   4 +-
 fs/nfs/nfs4proc.c                             |  32 ++---
 fs/nfs/nfs4state.c                            |  14 +--
 fs/nfs/pagelist.c                             |   2 +-
 fs/nfs/pnfs.c                                 |   2 +-
 fs/nfs_common/nfsacl.c                        |   2 +-
 fs/nfsd/blocklayout.c                         |   4 +-
 fs/nfsd/nfs4callback.c                        |   2 +-
 fs/nfsd/nfs4layouts.c                         |   2 +-
 fs/nfsd/nfs4proc.c                            |   2 +-
 fs/nfsd/nfs4state.c                           |  12 +-
 fs/nfsd/nfsfh.c                               |   4 +-
 fs/nfsd/nfsproc.c                             |   3 +-
 fs/nfsd/nfssvc.c                              |   2 +-
 fs/nfsd/vfs.c                                 |   4 +-
 fs/nilfs2/bmap.c                              |   2 +-
 fs/nilfs2/recovery.c                          |   2 +-
 fs/nilfs2/segment.c                           |  19 +--
 fs/notify/fanotify/fanotify_user.c            |   2 +-
 fs/ocfs2/cluster/quorum.c                     |   2 +-
 fs/quota/quota.c                              |   2 +-
 fs/seq_file.c                                 |   2 +-
 fs/signalfd.c                                 |   2 +-
 fs/ubifs/lprops.c                             |   4 +-
 fs/udf/symlink.c                              |   2 +-
 fs/ufs/util.h                                 |  12 +-
 fs/vboxsf/utils.c                             |   2 +-
 fs/xfs/libxfs/xfs_ag_resv.c                   |   4 +-
 fs/xfs/libxfs/xfs_alloc.c                     |   2 +-
 fs/xfs/libxfs/xfs_da_btree.c                  |   2 +-
 fs/xfs/libxfs/xfs_inode_buf.c                 |   4 +-
 fs/xfs/scrub/bmap.c                           |   2 +-
 fs/xfs/scrub/btree.c                          |   2 +-
 fs/xfs/scrub/common.c                         |   6 +-
 fs/xfs/scrub/dabtree.c                        |   2 +-
 fs/xfs/scrub/repair.c                         |   2 +-
 fs/xfs/xfs_bmap_util.c                        |   3 +-
 fs/xfs/xfs_export.c                           |   4 +-
 fs/xfs/xfs_file.c                             |   2 +-
 fs/xfs/xfs_fsmap.c                            |   2 +-
 fs/xfs/xfs_inode.c                            |   2 +-
 fs/xfs/xfs_ioctl.c                            |   4 +-
 fs/xfs/xfs_iomap.c                            |   2 +-
 fs/xfs/xfs_log.c                              |   2 +-
 fs/xfs/xfs_trans_buf.c                        |   2 +-
 fs/zonefs/super.c                             |   2 +-
 include/linux/compat.h                        |   6 +-
 include/linux/filter.h                        |   2 +-
 include/linux/jhash.h                         |  39 ++++--
 include/linux/mm.h                            |   9 +-
 include/linux/signal.h                        |  12 +-
 include/linux/skbuff.h                        |  12 +-
 include/math-emu/op-common.h                  |   6 +-
 init/do_mounts_md.c                           |   4 +-
 ipc/sem.c                                     |   4 +-
 ipc/shm.c                                     |   4 +-
 kernel/auditfilter.c                          |   2 +-
 kernel/bpf/cgroup.c                           |   4 +-
 kernel/bpf/syscall.c                          |   2 +-
 kernel/bpf/verifier.c                         |   4 +-
 kernel/capability.c                           |   2 +-
 kernel/compat.c                               |   6 +-
 kernel/debug/gdbstub.c                        |   6 +-
 kernel/debug/kdb/kdb_keyboard.c               |   4 +-
 kernel/debug/kdb/kdb_support.c                |   6 +-
 kernel/events/core.c                          |   3 +-
 kernel/futex.c                                |   4 +-
 kernel/gcov/gcc_3_4.c                         |   6 +-
 kernel/irq/handle.c                           |   3 +-
 kernel/irq/manage.c                           |   5 +-
 kernel/kallsyms.c                             |   4 +-
 kernel/power/hibernate.c                      |   2 +-
 kernel/power/qos.c                            |   4 +-
 kernel/sched/core.c                           |   2 +-
 kernel/sched/topology.c                       |   6 +-
 kernel/signal.c                               |   2 +-
 kernel/sys.c                                  |   3 +-
 kernel/time/hrtimer.c                         |   2 +-
 kernel/time/posix-timers.c                    |   4 +-
 kernel/time/tick-broadcast.c                  |   2 +-
 kernel/time/timer.c                           |   2 +-
 kernel/trace/blktrace.c                       |   2 +-
 kernel/trace/trace_events_filter.c            |   4 +-
 lib/asn1_decoder.c                            |   6 +-
 lib/assoc_array.c                             |   2 +-
 lib/bootconfig.c                              |   4 +-
 lib/cmdline.c                                 |  10 +-
 lib/dim/net_dim.c                             |   2 +-
 lib/dim/rdma_dim.c                            |   4 +-
 lib/glob.c                                    |   2 +-
 lib/nlattr.c                                  |   5 +-
 lib/siphash.c                                 |  54 ++++++---
 lib/ts_fsm.c                                  |   3 +-
 lib/vsprintf.c                                |  18 ++-
 lib/xz/xz_dec_lzma2.c                         |   8 +-
 lib/xz/xz_dec_stream.c                        |  32 ++---
 lib/zlib_inflate/inflate.c                    |  24 ++--
 lib/zstd/bitstream.h                          |  10 +-
 lib/zstd/compress.c                           |   3 +-
 lib/zstd/decompress.c                         |  17 +--
 lib/zstd/huf_compress.c                       |   4 +-
 mm/gup.c                                      |   2 +-
 mm/hugetlb_cgroup.c                           |   6 +-
 mm/ksm.c                                      |   3 +-
 mm/list_lru.c                                 |   2 +-
 mm/memcontrol.c                               |   2 +-
 mm/mempolicy.c                                |   3 -
 mm/mmap.c                                     |   5 +-
 mm/shmem.c                                    |   2 +-
 mm/zsmalloc.c                                 |   2 +-
 net/8021q/vlan_dev.c                          |   2 +-
 net/9p/trans_xen.c                            |   2 +-
 net/atm/common.c                              |   4 +-
 net/atm/lec.c                                 |   2 +-
 net/atm/resources.c                           |   8 +-
 net/bluetooth/hci_event.c                     |   6 +-
 net/bluetooth/hci_sock.c                      |   4 +-
 net/bluetooth/l2cap_core.c                    |  22 ++--
 net/bluetooth/l2cap_sock.c                    |   4 +-
 net/bluetooth/mgmt.c                          |   4 +-
 net/bluetooth/rfcomm/core.c                   |   3 +-
 net/bluetooth/rfcomm/sock.c                   |   3 +-
 net/bluetooth/smp.c                           |   2 +-
 net/bpf/test_run.c                            |   2 +-
 net/bridge/netfilter/ebtables.c               |   2 +-
 net/can/j1939/socket.c                        |   2 +-
 net/can/j1939/transport.c                     |  21 ++--
 net/ceph/ceph_hash.c                          |  20 +--
 net/ceph/crush/mapper.c                       |   2 +-
 net/ceph/messenger.c                          |   4 +-
 net/ceph/mon_client.c                         |   2 +-
 net/ceph/osd_client.c                         |   6 +-
 net/core/dev.c                                |   4 +-
 net/core/dev_ioctl.c                          |   2 +-
 net/core/devlink.c                            |   2 +-
 net/core/drop_monitor.c                       |   2 +-
 net/core/filter.c                             |   2 +-
 net/core/pktgen.c                             |   2 +-
 net/core/skmsg.c                              |   3 +-
 net/core/sock.c                               |   2 +-
 net/dccp/ccids/ccid3.c                        |   2 +-
 net/dccp/feat.c                               |   3 +-
 net/dccp/input.c                              |  10 +-
 net/dccp/options.c                            |   2 +-
 net/dccp/output.c                             |   9 +-
 net/dccp/proto.c                              |   8 +-
 net/decnet/af_decnet.c                        |   6 +-
 net/decnet/dn_nsp_in.c                        |   2 +-
 net/decnet/dn_table.c                         |   2 +-
 net/decnet/sysctl_net_decnet.c                |   2 +-
 net/dsa/slave.c                               |   2 +-
 net/ieee802154/6lowpan/reassembly.c           |   3 +-
 net/ieee802154/6lowpan/rx.c                   |   6 +-
 net/ipv4/af_inet.c                            |   4 +-
 net/ipv4/ah4.c                                |   2 +-
 net/ipv4/arp.c                                |   2 +-
 net/ipv4/devinet.c                            |   6 +-
 net/ipv4/fib_semantics.c                      |   4 +-
 net/ipv4/icmp.c                               |   2 +-
 net/ipv4/ip_output.c                          |   2 +-
 net/ipv4/ipmr.c                               |   2 +-
 net/ipv4/netfilter/nf_log_ipv4.c              |   2 +-
 net/ipv4/netfilter/nf_nat_pptp.c              |   4 +-
 net/ipv4/nexthop.c                            |   2 +-
 net/ipv4/tcp.c                                |   2 +-
 net/ipv4/tcp_input.c                          |   6 +-
 net/ipv4/tcp_ipv4.c                           |   4 +-
 net/ipv4/udp.c                                |   2 +-
 net/ipv6/addrconf.c                           |   6 +-
 net/ipv6/ah6.c                                |   2 +-
 net/ipv6/exthdrs.c                            |   2 +-
 net/ipv6/icmp.c                               |   2 +-
 net/ipv6/ip6_fib.c                            |   8 +-
 net/ipv6/ip6mr.c                              |   2 +-
 net/ipv6/ndisc.c                              |   2 +-
 net/ipv6/netfilter/nf_log_ipv6.c              |   2 +-
 net/ipv6/raw.c                                |   8 +-
 net/ipv6/route.c                              |   2 +-
 net/ipv6/tcp_ipv6.c                           |   2 +-
 net/iucv/af_iucv.c                            |  13 +-
 net/l2tp/l2tp_netlink.c                       |   2 +-
 net/mac80211/cfg.c                            |   6 +-
 net/mac80211/chan.c                           |   2 +-
 net/mac80211/ht.c                             |   4 +-
 net/mac80211/ibss.c                           |   4 +-
 net/mac80211/iface.c                          |  11 +-
 net/mac80211/key.c                            |   3 +-
 net/mac80211/mesh.c                           |   4 +-
 net/mac80211/mesh_hwmp.c                      |   2 +-
 net/mac80211/mesh_plink.c                     |   2 +-
 net/mac80211/mlme.c                           |   4 +-
 net/mac80211/offchannel.c                     |   4 +-
 net/mac80211/rx.c                             |   4 +-
 net/mac80211/tdls.c                           |   8 +-
 net/mac80211/tx.c                             |  12 +-
 net/mac80211/util.c                           |  11 +-
 net/mac80211/wme.c                            |   2 +-
 net/mpls/af_mpls.c                            |   2 +-
 net/mptcp/protocol.c                          |   2 +-
 net/ncsi/ncsi-manage.c                        |   4 +-
 net/netfilter/ipset/ip_set_core.c             |   2 +-
 net/netfilter/ipvs/ip_vs_proto_tcp.c          |   2 +-
 net/netfilter/ipvs/ip_vs_proto_udp.c          |   2 +-
 net/netfilter/nf_conntrack_h323_asn1.c        |   6 +-
 net/netfilter/nf_conntrack_proto.c            |   2 +-
 net/netfilter/nf_conntrack_proto_tcp.c        |   2 +-
 net/netfilter/nf_conntrack_standalone.c       |   2 +-
 net/netfilter/nf_nat_core.c                   |  10 +-
 net/netfilter/nf_synproxy_core.c              |   6 +-
 net/netfilter/nf_tables_api.c                 |   8 +-
 net/netfilter/nf_tables_core.c                |   2 +-
 net/netfilter/nfnetlink_cttimeout.c           |   2 +-
 net/netfilter/nft_cmp.c                       |   4 +-
 net/netfilter/nft_ct.c                        |   4 +-
 net/netfilter/nft_fib.c                       |   2 +-
 net/netfilter/nft_payload.c                   |   2 +-
 net/netfilter/utils.c                         |   8 +-
 net/netfilter/x_tables.c                      |   2 +-
 net/netrom/nr_in.c                            |   2 +-
 net/netrom/nr_route.c                         |   8 +-
 net/openvswitch/conntrack.c                   |   4 +-
 net/openvswitch/flow.c                        |   2 +-
 net/packet/af_packet.c                        |   3 +-
 net/phonet/pep.c                              |  10 +-
 net/rds/send.c                                |   3 +-
 net/rose/rose_in.c                            |   2 +-
 net/rose/rose_route.c                         |   4 +-
 net/rxrpc/af_rxrpc.c                          |   7 +-
 net/rxrpc/call_accept.c                       |   2 +-
 net/rxrpc/conn_client.c                       |   2 +-
 net/rxrpc/input.c                             |   6 +-
 net/rxrpc/local_object.c                      |   2 +-
 net/rxrpc/recvmsg.c                           |   2 +-
 net/rxrpc/sendmsg.c                           |   6 +-
 net/sched/act_csum.c                          |   3 +-
 net/sched/act_ct.c                            |   2 +-
 net/sched/sch_cake.c                          |   2 +-
 net/sched/sch_cbq.c                           |   2 +-
 net/sched/sch_drr.c                           |   2 +-
 net/sched/sch_ets.c                           |   2 +-
 net/sched/sch_fq_codel.c                      |   2 +-
 net/sched/sch_fq_pie.c                        |   2 +-
 net/sched/sch_hfsc.c                          |   2 +-
 net/sched/sch_htb.c                           |   2 +-
 net/sched/sch_multiq.c                        |   2 +-
 net/sched/sch_prio.c                          |   2 +-
 net/sched/sch_qfq.c                           |   2 +-
 net/sched/sch_sfb.c                           |   2 +-
 net/sched/sch_sfq.c                           |   2 +-
 net/sctp/ipv6.c                               |   2 +-
 net/sctp/outqueue.c                           |   6 +-
 net/sctp/sm_make_chunk.c                      |   2 +-
 net/sctp/sm_sideeffect.c                      |   3 +-
 net/sctp/sm_statefuns.c                       |   2 +-
 net/socket.c                                  |   6 +-
 net/sunrpc/auth_gss/gss_krb5_wrap.c           |   2 +-
 net/sunrpc/clnt.c                             |  22 ++--
 net/sunrpc/xprt.c                             |   2 +-
 net/sunrpc/xprtsock.c                         |   8 +-
 net/tipc/bearer.c                             |   2 +-
 net/tipc/group.c                              |   2 +-
 net/tipc/link.c                               |   2 +-
 net/tipc/socket.c                             |   4 +-
 net/unix/af_unix.c                            |   2 +-
 net/wireless/chan.c                           |   4 +-
 net/wireless/mlme.c                           |   2 +-
 net/wireless/nl80211.c                        |  20 +--
 net/wireless/scan.c                           |   2 +-
 net/wireless/sme.c                            |   4 +-
 net/wireless/util.c                           |   4 +-
 net/wireless/wext-compat.c                    |   4 +-
 net/x25/x25_facilities.c                      |   2 +-
 net/x25/x25_in.c                              |   2 +-
 net/xfrm/xfrm_policy.c                        |   2 +-
 samples/bpf/hbm.c                             |   2 +-
 security/apparmor/domain.c                    |   2 +-
 security/apparmor/lib.c                       |   4 +-
 security/integrity/ima/ima_appraise.c         |   4 +-
 security/integrity/ima/ima_policy.c           |   8 +-
 security/integrity/ima/ima_template_lib.c     |   2 +-
 security/keys/process_keys.c                  |   6 +-
 security/keys/request_key.c                   |  12 +-
 security/selinux/hooks.c                      |   8 +-
 security/selinux/ss/mls.c                     |   3 +-
 security/smack/smack_lsm.c                    |   2 +-
 security/tomoyo/common.c                      |  18 +--
 security/tomoyo/file.c                        |   2 +-
 sound/atmel/ac97c.c                           |  16 +--
 sound/core/memalloc.c                         |   2 +-
 sound/core/oss/pcm_oss.c                      |   2 +-
 sound/core/oss/pcm_plugin.c                   |   2 +-
 sound/core/pcm_native.c                       |   8 +-
 sound/core/seq/oss/seq_oss_timer.c            |   2 +-
 sound/core/seq/seq_midi_emul.c                |   2 +-
 sound/drivers/opl3/opl3_midi.c                |   4 +-
 sound/isa/galaxy/galaxy.c                     |   6 +-
 sound/isa/msnd/msnd_pinnacle_mixer.c          |   3 +-
 sound/isa/opti9xx/miro.c                      |  12 +-
 sound/isa/opti9xx/opti92x-ad1848.c            |  13 +-
 sound/isa/sb/sb8_main.c                       |  10 +-
 sound/oss/dmasound/dmasound_atari.c           |   2 +-
 sound/oss/dmasound/dmasound_core.c            |   4 +-
 sound/pci/ac97/ac97_codec.c                   |   4 +-
 sound/pci/atiixp.c                            |   6 +-
 sound/pci/azt3328.c                           |   2 +-
 sound/pci/echoaudio/echoaudio.c               |   4 +-
 sound/pci/emu10k1/emupcm.c                    |   5 +-
 sound/pci/hda/hda_beep.c                      |   2 +-
 sound/pci/hda/patch_conexant.c                |   2 +-
 sound/pci/hda/patch_realtek.c                 |   4 +-
 sound/pci/ice1712/delta.c                     |   2 +-
 sound/pci/intel8x0.c                          |   8 +-
 sound/pci/mixart/mixart.c                     |   2 +-
 sound/pci/mixart/mixart_core.c                |   2 +-
 sound/pci/nm256/nm256.c                       |   6 +-
 sound/pci/oxygen/oxygen_pcm.c                 |   2 +-
 sound/pci/ymfpci/ymfpci_main.c                |   2 +-
 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c        |   4 +-
 sound/ppc/snd_ps3.c                           |   4 +-
 sound/soc/atmel/mchp-i2s-mcc.c                |   2 +-
 sound/soc/codecs/ab8500-codec.c               |   2 +-
 sound/soc/codecs/adau1761.c                   |   4 +-
 sound/soc/codecs/adau17x1.c                   |   4 +-
 sound/soc/codecs/adav80x.c                    |   2 +-
 sound/soc/codecs/ak4613.c                     |   6 +-
 sound/soc/codecs/es8328.c                     |   4 +-
 sound/soc/codecs/jz4770.c                     |   2 +-
 sound/soc/codecs/max9860.c                    |   2 +-
 sound/soc/codecs/msm8916-wcd-analog.c         |   2 +-
 sound/soc/codecs/rt274.c                      |   4 +-
 sound/soc/codecs/rt5640.c                     |   4 +-
 sound/soc/codecs/rt5677.c                     |   2 +-
 sound/soc/codecs/sta32x.c                     |   2 +-
 sound/soc/codecs/sta350.c                     |   2 +-
 sound/soc/codecs/tas2552.c                    |   2 +-
 sound/soc/codecs/tlv320aic23.c                |   2 +-
 sound/soc/codecs/tlv320aic31xx.c              |   3 +-
 sound/soc/codecs/tpa6130a2.c                  |   2 +-
 sound/soc/codecs/wm8753.c                     |   6 +-
 sound/soc/codecs/wm8903.c                     |   2 +-
 sound/soc/codecs/wm8904.c                     |   5 +-
 sound/soc/codecs/wm8955.c                     |   2 +-
 sound/soc/codecs/wm8960.c                     |   2 +-
 sound/soc/codecs/wm8961.c                     |   2 +-
 sound/soc/codecs/wm8962.c                     |   2 +-
 sound/soc/codecs/wm8993.c                     |   4 +-
 sound/soc/codecs/wm8994.c                     |   4 +-
 sound/soc/codecs/wm8995.c                     |   2 +-
 sound/soc/codecs/wm8996.c                     |   2 +-
 sound/soc/codecs/wm9081.c                     |   2 +-
 sound/soc/fsl/fsl_ssi.c                       |   2 +-
 sound/soc/hisilicon/hi6210-i2s.c              |   4 +-
 sound/soc/intel/baytrail/sst-baytrail-pcm.c   |   2 +-
 sound/soc/intel/boards/bytcht_es8316.c        |   2 +-
 sound/soc/intel/boards/bytcr_rt5651.c         |   4 +-
 sound/soc/intel/skylake/skl-pcm.c             |   3 +-
 sound/soc/meson/axg-tdm-interface.c           |   8 +-
 sound/soc/pxa/pxa-ssp.c                       |   2 +-
 sound/soc/rockchip/rockchip_pdm.c             |   6 +-
 sound/soc/samsung/i2s.c                       |   2 +-
 sound/soc/soc-core.c                          |   3 +-
 sound/soc/soc-topology.c                      |   4 +-
 sound/soc/sof/intel/hda-dai.c                 |   6 +-
 sound/soc/sof/pcm.c                           |   5 +-
 sound/soc/sof/topology.c                      |   2 +-
 sound/soc/ti/davinci-i2s.c                    |   2 +-
 sound/soc/ti/n810.c                           |   2 +-
 sound/soc/ti/omap-dmic.c                      |   4 +-
 sound/soc/ti/omap-mcpdm.c                     |   8 +-
 sound/soc/ti/rx51.c                           |   2 +-
 sound/soc/zte/zx-i2s.c                        |   4 +-
 sound/soc/zte/zx-spdif.c                      |   2 +-
 sound/sparc/dbri.c                            |   8 +-
 sound/usb/caiaq/audio.c                       |   2 +-
 sound/usb/caiaq/device.c                      |   2 +-
 sound/usb/card.c                              |   3 +-
 sound/usb/clock.c                             |   2 +-
 sound/usb/midi.c                              |   2 +-
 sound/usb/pcm.c                               |   2 +-
 sound/usb/stream.c                            |   3 +-
 sound/xen/xen_snd_front.c                     |   3 -
 sound/xen/xen_snd_front_evtchnl.c             |   4 -
 virt/kvm/arm/hyp/vgic-v3-sr.c                 |  16 +--
 1831 files changed, 4064 insertions(+), 4709 deletions(-)

-- 
2.24.0


^ permalink raw reply

* [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;
From: Joe Perches @ 2020-03-11  4:51 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: Arnd Bergmann, linux-kernel, Paul Mackerras, linuxppc-dev
In-Reply-To: <cover.1583896344.git.joe@perches.com>

Convert the various uses of fallthrough comments to fallthrough;

Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/powerpc/platforms/cell/spufs/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 5c3f5d0..d56b4e3 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -177,7 +177,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
 		POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
 				  MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
 				 MFC_CNTL_SUSPEND_COMPLETE);
-		/* fall through */
+		fallthrough;
 	case MFC_CNTL_SUSPEND_COMPLETE:
 		if (csa)
 			csa->priv2.mfc_control_RW =
-- 
2.24.0


^ permalink raw reply related

* [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
From: Joe Perches @ 2020-03-11  4:51 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel, kvm-ppc
In-Reply-To: <cover.1583896344.git.joe@perches.com>

Convert the various uses of fallthrough comments to fallthrough;

Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/powerpc/kvm/book3s_32_mmu.c | 2 +-
 arch/powerpc/kvm/book3s_64_mmu.c | 2 +-
 arch/powerpc/kvm/book3s_pr.c     | 2 +-
 arch/powerpc/kvm/booke.c         | 6 +++---
 arch/powerpc/kvm/powerpc.c       | 1 -
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_mmu.c
index f21e734..3fbd57 100644
--- a/arch/powerpc/kvm/book3s_32_mmu.c
+++ b/arch/powerpc/kvm/book3s_32_mmu.c
@@ -234,7 +234,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
 				case 2:
 				case 6:
 					pte->may_write = true;
-					/* fall through */
+					fallthrough;
 				case 3:
 				case 5:
 				case 7:
diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c
index 5991332..26b8b2 100644
--- a/arch/powerpc/kvm/book3s_64_mmu.c
+++ b/arch/powerpc/kvm/book3s_64_mmu.c
@@ -311,7 +311,7 @@ static int kvmppc_mmu_book3s_64_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
 	case 2:
 	case 6:
 		gpte->may_write = true;
-		/* fall through */
+		fallthrough;
 	case 3:
 	case 5:
 	case 7:
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
index 729a0f..7db3695 100644
--- a/arch/powerpc/kvm/book3s_pr.c
+++ b/arch/powerpc/kvm/book3s_pr.c
@@ -740,7 +740,7 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu,
 		    (vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) &&
 		    ((pte.raddr & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS))
 			pte.raddr &= ~SPLIT_HACK_MASK;
-		/* fall through */
+		fallthrough;
 	case MSR_IR:
 		vcpu->arch.mmu.esid_to_vsid(vcpu, eaddr >> SID_SHIFT, &vsid);
 
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 7b27604..be47815 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -421,11 +421,11 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
 	case BOOKE_IRQPRIO_DATA_STORAGE:
 	case BOOKE_IRQPRIO_ALIGNMENT:
 		update_dear = true;
-		/* fall through */
+		fallthrough;
 	case BOOKE_IRQPRIO_INST_STORAGE:
 	case BOOKE_IRQPRIO_PROGRAM:
 		update_esr = true;
-		/* fall through */
+		fallthrough;
 	case BOOKE_IRQPRIO_ITLB_MISS:
 	case BOOKE_IRQPRIO_SYSCALL:
 	case BOOKE_IRQPRIO_FP_UNAVAIL:
@@ -459,7 +459,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
 	case BOOKE_IRQPRIO_DECREMENTER:
 	case BOOKE_IRQPRIO_FIT:
 		keep_irq = true;
-		/* fall through */
+		fallthrough;
 	case BOOKE_IRQPRIO_EXTERNAL:
 	case BOOKE_IRQPRIO_DBELL:
 		allowed = vcpu->arch.shared->msr & MSR_EE;
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 1af96fb5..c242a79 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -525,7 +525,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		r = 1;
 		break;
 	case KVM_CAP_PPC_GUEST_DEBUG_SSTEP:
-		/* fall through */
 	case KVM_CAP_PPC_PAIRED_SINGLES:
 	case KVM_CAP_PPC_OSI:
 	case KVM_CAP_PPC_GET_PVINFO:
-- 
2.24.0


^ permalink raw reply related

* Re: [PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data
From: Alastair D'Silva @ 2020-03-11  3:38 UTC (permalink / raw)
  To: Frederic Barrat, Andrew Donnellan
  Cc: Madhavan Srinivasan, Alexey Kardashevskiy, Masahiro Yamada,
	Oliver O'Halloran, Mauro Carvalho Chehab, Ira Weiny,
	Thomas Gleixner, Rob Herring, Dave Jiang, linux-nvdimm,
	Aneesh Kumar K . V, Krzysztof Kozlowski, Anju T Sudhakar,
	Mahesh Salgaonkar, Arnd Bergmann, Greg Kurz, Nicholas Piggin,
	Cédric Le Goater, Dan Williams, Hari Bathini, linux-mm,
	Greg Kroah-Hartman, linux-kernel, Vishal Verma, Paul Mackerras,
	Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <3ecb49e3-8828-ab7b-4391-5dd6127e76e0@linux.ibm.com>

On Wed, 2020-03-04 at 12:06 +0100, Frederic Barrat wrote:
> 
> Le 28/02/2020 à 07:12, Andrew Donnellan a écrit :
> > On 21/2/20 2:27 pm, Alastair D'Silva wrote:
> > > From: Alastair D'Silva <alastair@d-silva.org>
> > > 
> > > When health & performance data is requested from the controller,
> > > it responds with an error log containing the requested
> > > information.
> > > 
> > > This patch allows the request to me issued via an IOCTL.
> > 
> > A better explanation would be good - this IOCTL triggers a request
> > to 
> > the controller to collect controller health/perf data, and the 
> > controller will later respond with an error log that can be picked
> > up 
> > via the error log IOCTL that you've defined earlier.
> 
> And even more precisely (to also check my understanding):
> 
>  > this IOCTL triggers a request to
>  > the controller to collect controller health/perf data, and the
>  > controller will later respond
> 
> by raising an interrupt to let the user app know that
> 
>  > an error log that can be picked up
>  > via the error log IOCTL that you've defined earlier.
> 
> 
> The rest of the patch looks ok to me.
> 
>    Fred

Ok

-- 
Alastair D'Silva
Open Source Developer
Linux Technology Centre, IBM Australia
mob: 0423 762 819


^ permalink raw reply

* Re: [PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace
From: Alastair D'Silva @ 2020-03-11  3:32 UTC (permalink / raw)
  To: Frederic Barrat
  Cc: Madhavan Srinivasan, Alexey Kardashevskiy, Masahiro Yamada,
	Oliver O'Halloran, Mauro Carvalho Chehab, Ira Weiny,
	Thomas Gleixner, Rob Herring, Dave Jiang, linux-nvdimm,
	Aneesh Kumar K . V, Krzysztof Kozlowski, Anju T Sudhakar,
	Mahesh Salgaonkar, Andrew Donnellan, Arnd Bergmann, Greg Kurz,
	Nicholas Piggin, Cédric Le Goater, Dan Williams,
	Hari Bathini, linux-mm, Greg Kroah-Hartman, linux-kernel,
	Vishal Verma, Paul Mackerras, Andrew Morton, linuxppc-dev,
	David S. Miller
In-Reply-To: <7ee589c0-2c02-9b8e-95a9-743ce29674ec@linux.ibm.com>

On Wed, 2020-03-04 at 12:00 +0100, Frederic Barrat wrote:
> 
> Le 21/02/2020 à 04:27, Alastair D'Silva a écrit :
> > From: Alastair D'Silva <alastair@d-silva.org>
> > 
> > Some of the interrupts that the card generates are better handled
> > by the userspace daemon, in particular:
> > Controller Hardware/Firmware Fatal
> > Controller Dump Available
> > Error Log available
> > 
> > This patch allows a userspace application to register an eventfd
> > with
> > the driver via SCM_IOCTL_EVENTFD to receive notifications of these
> > interrupts.
> > 
> > Userspace can then identify what events have occurred by calling
> > SCM_IOCTL_EVENT_CHECK and checking against the SCM_IOCTL_EVENT_FOO
> > masks.
> > 
> > Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> > ---
> >   arch/powerpc/platforms/powernv/pmem/ocxl.c    | 216
> > ++++++++++++++++++
> >   .../platforms/powernv/pmem/ocxl_internal.h    |   5 +
> >   include/uapi/nvdimm/ocxl-pmem.h               |  16 ++
> >   3 files changed, 237 insertions(+)
> > 
> > diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl.c
> > b/arch/powerpc/platforms/powernv/pmem/ocxl.c
> > index 009d4fd29e7d..e46696d3cc36 100644
> > --- a/arch/powerpc/platforms/powernv/pmem/ocxl.c
> > +++ b/arch/powerpc/platforms/powernv/pmem/ocxl.c
> > @@ -10,6 +10,7 @@
> >   #include <misc/ocxl.h>
> >   #include <linux/delay.h>
> >   #include <linux/ndctl.h>
> > +#include <linux/eventfd.h>
> >   #include <linux/fs.h>
> >   #include <linux/mm_types.h>
> >   #include <linux/memory_hotplug.h>
> > @@ -335,11 +336,22 @@ static void free_ocxlpmem(struct ocxlpmem
> > *ocxlpmem)
> >   {
> >   	int rc;
> >   
> > +	// Disable doorbells
> > +	(void)ocxl_global_mmio_set64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_CHIEC,
> > +				     OCXL_LITTLE_ENDIAN,
> > +				     GLOBAL_MMIO_CHI_ALL);
> > +
> >   	if (ocxlpmem->nvdimm_bus)
> >   		nvdimm_bus_unregister(ocxlpmem->nvdimm_bus);
> >   
> >   	free_minor(ocxlpmem);
> >   
> > +	if (ocxlpmem->irq_addr[1])
> > +		iounmap(ocxlpmem->irq_addr[1]);
> > +
> > +	if (ocxlpmem->irq_addr[0])
> > +		iounmap(ocxlpmem->irq_addr[0]);
> > +
> >   	if (ocxlpmem->cdev.owner)
> >   		cdev_del(&ocxlpmem->cdev);
> >   
> > @@ -443,6 +455,11 @@ static int file_release(struct inode *inode,
> > struct file *file)
> >   {
> >   	struct ocxlpmem *ocxlpmem = file->private_data;
> >   
> > +	if (ocxlpmem->ev_ctx) {
> > +		eventfd_ctx_put(ocxlpmem->ev_ctx);
> > +		ocxlpmem->ev_ctx = NULL;
> > +	}
> > +
> >   	ocxlpmem_put(ocxlpmem);
> >   	return 0;
> >   }
> > @@ -938,6 +955,51 @@ static int ioctl_controller_stats(struct
> > ocxlpmem *ocxlpmem,
> >   	return rc;
> >   }
> >   
> > +static int ioctl_eventfd(struct ocxlpmem *ocxlpmem,
> > +		 struct ioctl_ocxl_pmem_eventfd __user *uarg)
> > +{
> > +	struct ioctl_ocxl_pmem_eventfd args;
> > +
> > +	if (copy_from_user(&args, uarg, sizeof(args)))
> > +		return -EFAULT;
> > +
> > +	if (ocxlpmem->ev_ctx)
> > +		return -EINVAL;
> 
> EBUSY?
> 
Ok

> 
> > +
> > +	ocxlpmem->ev_ctx = eventfd_ctx_fdget(args.eventfd);
> > +	if (!ocxlpmem->ev_ctx)
> > +		return -EFAULT;
> 
> Why not use what eventfd_ctx_fdget() returned? (through some
> IS_ERR() 
> and PTR_ERR() convolution)
> 

Ok
> 
> > +
> > +	return 0;
> > +}
> > +
> > +static int ioctl_event_check(struct ocxlpmem *ocxlpmem, u64 __user
> > *uarg)
> > +{
> > +	u64 val = 0;
> > +	int rc;
> > +	u64 chi = 0;
> > +
> > +	rc = ocxlpmem_chi(ocxlpmem, &chi);
> > +	if (rc < 0)
> > +		return rc;
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_ELA)
> > +		val |= IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE;
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_CDA)
> > +		val |= IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE;
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_CFFS)
> > +		val |= IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL;
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_CHFS)
> > +		val |= IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL;
> > +
> > +	rc = copy_to_user((u64 __user *) uarg, &val, sizeof(val));
> > +
> 
> copy_to_user doesn't return an errno. Should be:
> 
> if (copy_to_user((u64 __user *) uarg, &val, sizeof(val)))
> 	return -EFAULT;
> 
Ok

> 
> > +	return rc;
> > +}
> > +
> >   static long file_ioctl(struct file *file, unsigned int cmd,
> > unsigned long args)
> >   {
> >   	struct ocxlpmem *ocxlpmem = file->private_data;
> > @@ -966,6 +1028,15 @@ static long file_ioctl(struct file *file,
> > unsigned int cmd, unsigned long args)
> >   		rc = ioctl_controller_stats(ocxlpmem,
> >   					    (struct
> > ioctl_ocxl_pmem_controller_stats __user *)args);
> >   		break;
> > +
> > +	case IOCTL_OCXL_PMEM_EVENTFD:
> > +		rc = ioctl_eventfd(ocxlpmem,
> > +				   (struct ioctl_ocxl_pmem_eventfd
> > __user *)args);
> > +		break;
> > +
> > +	case IOCTL_OCXL_PMEM_EVENT_CHECK:
> > +		rc = ioctl_event_check(ocxlpmem, (u64 __user *)args);
> > +		break;
> >   	}
> >   
> >   	return rc;
> > @@ -1107,6 +1178,146 @@ static void dump_error_log(struct ocxlpmem
> > *ocxlpmem)
> >   	kfree(buf);
> >   }
> >   
> > +static irqreturn_t imn0_handler(void *private)
> > +{
> > +	struct ocxlpmem *ocxlpmem = private;
> > +	u64 chi = 0;
> > +
> > +	(void)ocxlpmem_chi(ocxlpmem, &chi);
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_ELA) {
> > +		dev_warn(&ocxlpmem->dev, "Error log is available\n");
> > +
> > +		if (ocxlpmem->ev_ctx)
> > +			eventfd_signal(ocxlpmem->ev_ctx, 1);
> > +	}
> > +
> > +	if (chi & GLOBAL_MMIO_CHI_CDA) {
> > +		dev_warn(&ocxlpmem->dev, "Controller dump is
> > available\n");
> > +
> > +		if (ocxlpmem->ev_ctx)
> > +			eventfd_signal(ocxlpmem->ev_ctx, 1);
> > +	}
> > +
> > +
> 
> (at least) one empty line too many.
> 

Ok

> 
> > +	return IRQ_HANDLED;
> > +}
> > +
> > +static irqreturn_t imn1_handler(void *private)
> > +{
> > +	struct ocxlpmem *ocxlpmem = private;
> > +	u64 chi = 0;
> > +
> > +	(void)ocxlpmem_chi(ocxlpmem, &chi);
> > +
> > +	if (chi & (GLOBAL_MMIO_CHI_CFFS | GLOBAL_MMIO_CHI_CHFS)) {
> > +		dev_err(&ocxlpmem->dev,
> > +			"Controller status is fatal, chi=0x%llx, going
> > offline\n", chi);
> > +
> > +		if (ocxlpmem->nvdimm_bus) {
> > +			nvdimm_bus_unregister(ocxlpmem->nvdimm_bus);
> > +			ocxlpmem->nvdimm_bus = NULL;
> > +		}
> > +
> > +		if (ocxlpmem->ev_ctx)
> > +			eventfd_signal(ocxlpmem->ev_ctx, 1);
> > +	}
> > +
> > +	return IRQ_HANDLED;
> > +}
> > +
> > +
> > +/**
> > + * ocxlpmem_setup_irq() - Set up the IRQs for the OpenCAPI
> > Persistent Memory device
> > + * @ocxlpmem: the device metadata
> > + * Return: 0 on success, negative on failure
> > + */
> > +static int ocxlpmem_setup_irq(struct ocxlpmem *ocxlpmem)
> > +{
> > +	int rc;
> > +	u64 irq_addr;
> > +
> > +	rc = ocxl_afu_irq_alloc(ocxlpmem->ocxl_context, &ocxlpmem-
> > >irq_id[0]);
> > +	if (rc)
> > +		return rc;
> > +
> > +	rc = ocxl_irq_set_handler(ocxlpmem->ocxl_context, ocxlpmem-
> > >irq_id[0],
> > +				  imn0_handler, NULL, ocxlpmem);
> > +
> > +	irq_addr = ocxl_afu_irq_get_addr(ocxlpmem->ocxl_context,
> > ocxlpmem->irq_id[0]);
> > +	if (!irq_addr)
> > +		return -EINVAL;
> > +
> > +	ocxlpmem->irq_addr[0] = ioremap(irq_addr, PAGE_SIZE);
> > +	if (!ocxlpmem->irq_addr[0])
> > +		return -EINVAL;
> > +
> > +	rc = ocxl_global_mmio_write64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_IMA0_OHP,
> > +				      OCXL_LITTLE_ENDIAN,
> > +				      (u64)ocxlpmem->irq_addr[0]);
> > +	if (rc)
> > +		goto out_irq0;
> > +
> > +	rc = ocxl_global_mmio_write64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_IMA0_CFP,
> > +				      OCXL_LITTLE_ENDIAN, 0);
> > +	if (rc)
> > +		goto out_irq0;
> 
> That's a few lines of duplicate code. On the other hand, there's
> enough 
> varying parameters between the 2 interrupts that factorizing in a 
> subfunction would be slightly less readable. So duplicating is
> probably ok.
> 
> 
> 
> > +	rc = ocxl_afu_irq_alloc(ocxlpmem->ocxl_context, &ocxlpmem-
> > >irq_id[1]);
> > +	if (rc)
> > +		goto out_irq0;
> > +
> > +
> > +	rc = ocxl_irq_set_handler(ocxlpmem->ocxl_context, ocxlpmem-
> > >irq_id[1],
> > +				  imn1_handler, NULL, ocxlpmem);
> > +	if (rc)
> > +		goto out_irq0;
> > +
> > +	irq_addr = ocxl_afu_irq_get_addr(ocxlpmem->ocxl_context,
> > ocxlpmem->irq_id[1]);
> > +	if (!irq_addr) {
> > +		rc = -EFAULT;
> > +		goto out_irq0;
> > +	}
> > +
> > +	ocxlpmem->irq_addr[1] = ioremap(irq_addr, PAGE_SIZE);
> > +	if (!ocxlpmem->irq_addr[1]) {
> > +		rc = -EINVAL;
> > +		goto out_irq0;
> > +	}
> > +
> > +	rc = ocxl_global_mmio_write64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_IMA1_OHP,
> > +				      OCXL_LITTLE_ENDIAN,
> > +				      (u64)ocxlpmem->irq_addr[1]);
> > +	if (rc)
> > +		goto out_irq1;
> > +
> > +	rc = ocxl_global_mmio_write64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_IMA1_CFP,
> > +				      OCXL_LITTLE_ENDIAN, 0);
> > +	if (rc)
> > +		goto out_irq1;
> > +
> > +	// Enable doorbells
> > +	rc = ocxl_global_mmio_set64(ocxlpmem->ocxl_afu,
> > GLOBAL_MMIO_CHIE,
> > +				    OCXL_LITTLE_ENDIAN,
> > +				    GLOBAL_MMIO_CHI_ELA |
> > GLOBAL_MMIO_CHI_CDA |
> > +				    GLOBAL_MMIO_CHI_CFFS |
> > GLOBAL_MMIO_CHI_CHFS |
> > +				    GLOBAL_MMIO_CHI_NSCRA);
> 
> GLOBAL_MMIO_CHI_NSCRA doesn't seem to be handled in the handlers.
> 

This will be moved to the overwrite patch.

> 
> 
> > +	if (rc)
> > +		goto out_irq1;
> > +
> > +	return 0;
> > +
> > +out_irq1:
> > +	iounmap(ocxlpmem->irq_addr[1]);
> > +	ocxlpmem->irq_addr[1] = NULL;
> > +
> > +out_irq0:
> > +	iounmap(ocxlpmem->irq_addr[0]);
> > +	ocxlpmem->irq_addr[0] = NULL;
> > +
> > +	return rc;
> > +}
> > +
> >   /**
> >    * probe_function0() - Set up function 0 for an OpenCAPI
> > persistent memory device
> >    * This is important as it enables templates higher than 0 across
> > all other functions,
> > @@ -1216,6 +1427,11 @@ static int probe(struct pci_dev *pdev, const
> > struct pci_device_id *ent)
> >   		goto err;
> >   	}
> >   
> > +	if (ocxlpmem_setup_irq(ocxlpmem)) {
> > +		dev_err(&pdev->dev, "Could not set up OCXL IRQs\n");
> 
> Like with other patches, rc needs to be set.
> 
ok

> 
> > +		goto err;
> > +	}
> > +
> >   	if (setup_command_metadata(ocxlpmem)) {
> >   		dev_err(&pdev->dev, "Could not read OCXL command
> > matada\n");
> >   		goto err;
> > diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h
> > b/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h
> > index b953ee522ed4..927690f4888f 100644
> > --- a/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h
> > +++ b/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h
> > @@ -103,6 +103,10 @@ struct ocxlpmem {
> >   	struct pci_dev *pdev;
> >   	struct cdev cdev;
> >   	struct ocxl_fn *ocxl_fn;
> > +#define SCM_IRQ_COUNT 2
> > +	int irq_id[SCM_IRQ_COUNT];
> > +	struct dev_pagemap irq_pgmap[SCM_IRQ_COUNT];
> 
> irq_pgmap is not used.

Ok
> 
> 
> > +	void *irq_addr[SCM_IRQ_COUNT];
> >   	struct nd_interleave_set nd_set;
> >   	struct nvdimm_bus_descriptor bus_desc;
> >   	struct nvdimm_bus *nvdimm_bus;
> > @@ -113,6 +117,7 @@ struct ocxlpmem {
> >   	struct command_metadata ns_command;
> >   	struct resource pmem_res;
> >   	struct nd_region *nd_region;
> > +	struct eventfd_ctx *ev_ctx;
> >   	char fw_version[8+1];
> >   	u32 timeouts[ADMIN_COMMAND_MAX+1];
> >   
> > diff --git a/include/uapi/nvdimm/ocxl-pmem.h
> > b/include/uapi/nvdimm/ocxl-pmem.h
> > index add223aa2fdb..988eb0bc413d 100644
> > --- a/include/uapi/nvdimm/ocxl-pmem.h
> > +++ b/include/uapi/nvdimm/ocxl-pmem.h
> > @@ -66,6 +66,20 @@ struct ioctl_ocxl_pmem_controller_stats {
> >   	__u64 cache_write_latency; /* nanoseconds */
> >   };
> >   
> > +struct ioctl_ocxl_pmem_eventfd {
> > +	__s32 eventfd;
> > +	__u32 reserved;
> > +};
> > +
> > +#ifndef BIT_ULL
> > +#define BIT_ULL(nr)	(1ULL << (nr))
> > +#endif
> > +
> > +#define IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE	BIT_ULL
> > (0)
> > +#define IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE	BIT_ULL(1)
> > +#define IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL		BIT_ULL
> > (2)
> > +#define IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL		BIT_ULL
> > (3)
> > +
> 
> I'm not fond of adding a macro with such a generic name as BIT_ULL()
> in 
> a user header file. What's wrong with:
> 
> #define IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE	0x1
> #define IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE	0x2
> #define IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL		0x4
> #define IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL		0x8
> 
> 

Nothing, I'll change it.

>    Fred
> 
> 
> >   /* ioctl numbers */
> >   #define OCXL_PMEM_MAGIC 0x5C
> >   /* SCM devices */
> > @@ -74,5 +88,7 @@ struct ioctl_ocxl_pmem_controller_stats {
> >   #define IOCTL_OCXL_PMEM_CONTROLLER_DUMP_DATA		_IOWR(O
> > CXL_PMEM_MAGIC, 0x03, struct ioctl_ocxl_pmem_controller_dump_data)
> >   #define IOCTL_OCXL_PMEM_CONTROLLER_DUMP_COMPLETE	_IO(OCXL_PMEM_M
> > AGIC, 0x04)
> >   #define IOCTL_OCXL_PMEM_CONTROLLER_STATS		_IO(OCXL_PMEM_M
> > AGIC, 0x05)
> > +#define IOCTL_OCXL_PMEM_EVENTFD				_IOW(OC
> > XL_PMEM_MAGIC, 0x06, struct ioctl_ocxl_pmem_eventfd)
> > +#define IOCTL_OCXL_PMEM_EVENT_CHECK			_IOR(OC
> > XL_PMEM_MAGIC, 0x07, __u64)
> >   
> >   #endif /* _UAPI_OCXL_SCM_H */
> > 
-- 
Alastair D'Silva
Open Source Developer
Linux Technology Centre, IBM Australia
mob: 0423 762 819


^ permalink raw reply

* Re: [PATCH] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests
From: David Gibson @ 2020-03-10 23:05 UTC (permalink / raw)
  To: Michael Roth; +Cc: linuxppc-dev, kvm-ppc
In-Reply-To: <20200310211128.17672-1-mdroth@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]

On Tue, Mar 10, 2020 at 04:11:28PM -0500, Michael Roth wrote:
> The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest
> via the guest/nested hypervisor.
> 
>   ./run-tests.sh -v
>   ...
>   TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp 2,threads=2 -machine cap-htm=on -append "h_cede_tm"
>   FAIL h_cede_tm (2 tests, 1 unexpected failures)
> 
> While the test relates to transactional memory instructions, the actual
> failure is due to the return code of the H_CEDE hypercall, which is
> reported as 224 instead of 0. This happens even when no TM instructions
> are issued.
> 
> 224 is the value placed in r3 to execute a hypercall for H_CEDE, and r3
> is where the caller expects the return code to be placed upon return.
> 
> In the case of guest running under a nested hypervisor, issuing H_CEDE
> causes a return from H_ENTER_NESTED. In this case H_CEDE is
> specially-handled immediately rather than later in
> kvmppc_pseries_do_hcall() as with most other hcalls, but we forget to
> set the return code for the caller, hence why kvm-unit-test sees the
> 224 return code and reports an error.
> 
> Guest kernels generally don't check the return value of H_CEDE, so
> that likely explains why this hasn't caused issues outside of
> kvm-unit-tests so far.
> 
> Fix this by setting r3 to 0 after we finish processing the H_CEDE.
> 
> RHBZ: 1778556
> 
> Fixes: 4bad77799fed ("KVM: PPC: Book3S HV: Handle hypercalls correctly when nested")
> Cc: linuxppc-dev@ozlabs.org
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Paul Mackerras <paulus@ozlabs.org>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  arch/powerpc/kvm/book3s_hv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 2cefd071b848..c0c43a733830 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -3616,6 +3616,7 @@ int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit,
>  		if (trap == BOOK3S_INTERRUPT_SYSCALL && !vcpu->arch.nested &&
>  		    kvmppc_get_gpr(vcpu, 3) == H_CEDE) {
>  			kvmppc_nested_cede(vcpu);
> +			kvmppc_set_gpr(vcpu, 3, 0);
>  			trap = 0;
>  		}
>  	} else {

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH v3] powerpc: setup_64: set up PACA earlier to avoid kcov problems
From: Daniel Axtens @ 2020-03-10 23:03 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, linuxppc-dev; +Cc: ajd
In-Reply-To: <87tv2wigj7.fsf@mpe.ellerman.id.au>

>>> So:
>>>  - change the test when setting up a PACA to consider the actual value of
>>>    the MSR rather than the CPU feature.
>>> 
>>>  - move the PACA setup to before the cpu feature parsing.
>>
>> Hmm. Problem is that equally we want PACA to be sane before we call too
>> far into the rest of the kernel ("generic dt parsing code").
>
> But currently we call into that code with no paca at all. Or rather,
> with r13 pointing somewhere random that will be interpreted as being a
> paca.
>
> This took a while for Daniel to debug because depending on how you boot
> r13 contains a different junk value. That junk value may not point to
> memory at all, or if it does the memory it points to may or may not send
> you down the wrong path, depending on which exact bit you're looking at
> in some random location.
>
> So this is really not about kcov from my POV, that's just how we
> discovered it.

Ah, yes. I agree with mpe, and reading back over my commit message I
think I did a pretty poor job of explaining it. How about this for a
commit message:

---

powerpc: setup_64: set up PACA before parsing device tree

Currently, we set up the PACA after parsing the device tree for CPU
features. Before that, r13 contains random data, which means there is
random data in r13 while we're running the generic dt parsing code.

This random data varies depending on whether we boot through a vmlinux or a
zImage: for the vmlinux case it's usually around zero, but for zImages we
see random values like 912a72603d420015.

This is poor practice, and can also lead to difficult-to-debug crashes. For
example, when kcov is enabled, the kcov instrumentation attempts to read
preempt_count out of the current task, which goes via the PACA. This then
crashes in the zImage case.

To resolve this:

 - move the PACA setup to before the cpu feature parsing.

 - because we no longer have access to cpu feature flags in PACA setup,
   change the HV feature test in the PACA setup path to consider the actual
   value of the MSR rather than the CPU feature.

Translations get switched on once we leave early_setup, so I think we'd
already catch any other cases where the PACA or task aren't set up.

Boot tested on a P9 guest and host.

Fixes: fb0b0a73b223 ("powerpc: Enable kcov")
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: stable@vger.kernel.org
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Daniel Axtens <dja@axtens.net>

---

Regards,
Daniel

>
> cheers

^ permalink raw reply

* Re: [PATCH net v2] ibmvnic: Do not process device remove during device reset
From: David Miller @ 2020-03-10 22:58 UTC (permalink / raw)
  To: julietk; +Cc: netdev, linuxppc-dev, tlfalcon
In-Reply-To: <20200310142358.61392-1-julietk@linux.vnet.ibm.com>

From: Juliet Kim <julietk@linux.vnet.ibm.com>
Date: Tue, 10 Mar 2020 09:23:58 -0500

> The ibmvnic driver does not check the device state when the device
> is removed. If the device is removed while a device reset is being
> processed, the remove may free structures needed by the reset,
> causing an oops.
> 
> Fix this by checking the device state before processing device remove.
> 
> Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>

Applied, thank you.

^ permalink raw reply

* [PATCH] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests
From: Michael Roth @ 2020-03-10 21:11 UTC (permalink / raw)
  To: kvm-ppc; +Cc: linuxppc-dev, David Gibson

The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest
via the guest/nested hypervisor.

  ./run-tests.sh -v
  ...
  TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp 2,threads=2 -machine cap-htm=on -append "h_cede_tm"
  FAIL h_cede_tm (2 tests, 1 unexpected failures)

While the test relates to transactional memory instructions, the actual
failure is due to the return code of the H_CEDE hypercall, which is
reported as 224 instead of 0. This happens even when no TM instructions
are issued.

224 is the value placed in r3 to execute a hypercall for H_CEDE, and r3
is where the caller expects the return code to be placed upon return.

In the case of guest running under a nested hypervisor, issuing H_CEDE
causes a return from H_ENTER_NESTED. In this case H_CEDE is
specially-handled immediately rather than later in
kvmppc_pseries_do_hcall() as with most other hcalls, but we forget to
set the return code for the caller, hence why kvm-unit-test sees the
224 return code and reports an error.

Guest kernels generally don't check the return value of H_CEDE, so
that likely explains why this hasn't caused issues outside of
kvm-unit-tests so far.

Fix this by setting r3 to 0 after we finish processing the H_CEDE.

RHBZ: 1778556

Fixes: 4bad77799fed ("KVM: PPC: Book3S HV: Handle hypercalls correctly when nested")
Cc: linuxppc-dev@ozlabs.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 2cefd071b848..c0c43a733830 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -3616,6 +3616,7 @@ int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit,
 		if (trap == BOOK3S_INTERRUPT_SYSCALL && !vcpu->arch.nested &&
 		    kvmppc_get_gpr(vcpu, 3) == H_CEDE) {
 			kvmppc_nested_cede(vcpu);
+			kvmppc_set_gpr(vcpu, 3, 0);
 			trap = 0;
 		}
 	} else {
-- 
2.17.1


^ permalink raw reply related

* [PATCH 2/2] powerpc/fadump: consider reserved ranges while reserving memory
From: Hari Bathini @ 2020-03-10 20:27 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev
  Cc: Vasant Hegde, stable, Sourabh Jain, Mahesh J Salgaonkar
In-Reply-To: <158387202020.17176.15258122288090851051.stgit@hbathini.in.ibm.com>

Commit 0962e8004e97 ("powerpc/prom: Scan reserved-ranges node for
memory reservations") enabled support to parse reserved-ranges DT
node and reserve kernel memory falling in these ranges for F/W
purposes. Memory reserved for FADump should not overlap with these
ranges as it could corrupt memory meant for F/W or crash'ed kernel
memory to be exported as vmcore.

But since commit 579ca1a27675 ("powerpc/fadump: make use of memblock's
bottom up allocation mode"), memblock_find_in_range() is being used to
find the appropriate area to reserve memory for FADump, which can't
account for reserved-ranges as these ranges are reserved only after
FADump memory reservation.

With reserved-ranges now being populated during early boot, look out
for these memory ranges while reserving memory for FADump. Without
this change, MPIPL on PowerNV systems aborts with hostboot failure,
when memory reserved for FADump is less than 4096MB.

Fixes: 579ca1a27675 ("powerpc/fadump: make use of memblock's bottom up allocation mode")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 arch/powerpc/kernel/fadump.c |   76 ++++++++++++++++++++++++++++++++++++------
 1 file changed, 66 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 7fcf4a8f..ab83be9 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -443,10 +443,70 @@ static int __init fadump_get_boot_mem_regions(void)
 	return ret;
 }
 
+/*
+ * Returns true, if the given range overlaps with reserved memory ranges
+ * starting at idx. Also, updates idx to index of overlapping memory range
+ * with the given memory range.
+ * False, otherwise.
+ */
+static bool overlaps_reserved_ranges(u64 base, u64 end, int *idx)
+{
+	bool ret = false;
+	int i;
+
+	for (i = *idx; i < reserved_mrange_info.mem_range_cnt; i++) {
+		u64 rbase = reserved_mrange_info.mem_ranges[i].base;
+		u64 rend = rbase + reserved_mrange_info.mem_ranges[i].size;
+
+		if (end <= rbase)
+			break;
+
+		if ((end > rbase) &&  (base < rend)) {
+			*idx = i;
+			ret = true;
+			break;
+		}
+	}
+
+	return ret;
+}
+
+/*
+ * Locate a suitable memory area to reserve memory for FADump. While at it,
+ * lookup reserved-ranges & avoid overlap with them, as they are used by F/W.
+ */
+static u64 __init fadump_locate_reserve_mem(u64 base, u64 size)
+{
+	struct fadump_memory_range *mrngs;
+	phys_addr_t mstart, mend;
+	int idx = 0;
+	u64 i;
+
+	mrngs = reserved_mrange_info.mem_ranges;
+	for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE,
+				&mstart, &mend, NULL) {
+		pr_debug("%llu) mstart: %llx, mend: %llx, base: %llx\n",
+			 i, mstart, mend, base);
+
+		if (mstart > base)
+			base = PAGE_ALIGN(mstart);
+
+		while ((mend > base) && ((mend - base) >= size)) {
+			if (!overlaps_reserved_ranges(base, base + size, &idx))
+				goto out;
+
+			base = mrngs[idx].base + mrngs[idx].size;
+			base = PAGE_ALIGN(base);
+		}
+	}
+
+out:
+	return base;
+}
+
 int __init fadump_reserve_mem(void)
 {
-	u64 base, size, mem_boundary, bootmem_min, align = PAGE_SIZE;
-	bool is_memblock_bottom_up = memblock_bottom_up();
+	u64 base, size, mem_boundary, bootmem_min;
 	int ret = 1;
 
 	if (!fw_dump.fadump_enabled)
@@ -467,9 +527,9 @@ int __init fadump_reserve_mem(void)
 			PAGE_ALIGN(fadump_calculate_reserve_size());
 #ifdef CONFIG_CMA
 		if (!fw_dump.nocma) {
-			align = FADUMP_CMA_ALIGNMENT;
 			fw_dump.boot_memory_size =
-				ALIGN(fw_dump.boot_memory_size, align);
+				ALIGN(fw_dump.boot_memory_size,
+				      FADUMP_CMA_ALIGNMENT);
 		}
 #endif
 
@@ -537,13 +597,9 @@ int __init fadump_reserve_mem(void)
 		 * Reserve memory at an offset closer to bottom of the RAM to
 		 * minimize the impact of memory hot-remove operation.
 		 */
-		memblock_set_bottom_up(true);
-		base = memblock_find_in_range(base, mem_boundary, size, align);
-
-		/* Restore the previous allocation mode */
-		memblock_set_bottom_up(is_memblock_bottom_up);
+		base = fadump_locate_reserve_mem(base, size);
 
-		if (!base) {
+		if (base > (mem_boundary - size)) {
 			pr_err("Failed to find memory chunk for reservation!\n");
 			goto error_out;
 		}


^ permalink raw reply related

* [PATCH 1/2] powerpc/fadump: use static allocation for reserved memory ranges
From: Hari Bathini @ 2020-03-10 20:27 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev
  Cc: Vasant Hegde, stable, Sourabh Jain, Mahesh J Salgaonkar

At times, memory ranges have to be looked up during early boot, when
kernel couldn't be initialized for dynamic memory allocation. In fact,
reserved-ranges look up is needed during FADump memory reservation.
Without accounting for reserved-ranges in reserving memory for FADump,
MPIPL boot fails with memory corruption issues. So, extend memory
ranges handling to support static allocation and populate reserved
memory ranges during early boot.

Fixes: dda9dbfeeb7a ("powerpc/fadump: consider reserved ranges while releasing memory")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
---
 arch/powerpc/include/asm/fadump-internal.h |    4 +
 arch/powerpc/kernel/fadump.c               |   77 ++++++++++++++++------------
 2 files changed, 48 insertions(+), 33 deletions(-)

diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc/include/asm/fadump-internal.h
index c814a2b..8d61c8f 100644
--- a/arch/powerpc/include/asm/fadump-internal.h
+++ b/arch/powerpc/include/asm/fadump-internal.h
@@ -64,12 +64,14 @@ struct fadump_memory_range {
 };
 
 /* fadump memory ranges info */
+#define RNG_NAME_SZ			16
 struct fadump_mrange_info {
-	char				name[16];
+	char				name[RNG_NAME_SZ];
 	struct fadump_memory_range	*mem_ranges;
 	u32				mem_ranges_sz;
 	u32				mem_range_cnt;
 	u32				max_mem_ranges;
+	bool				is_static;
 };
 
 /* Platform specific callback functions */
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index ff0114a..7fcf4a8f 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -38,8 +38,17 @@ static void __init fadump_reserve_crash_area(u64 base);
 
 #ifndef CONFIG_PRESERVE_FA_DUMP
 static DEFINE_MUTEX(fadump_mutex);
-struct fadump_mrange_info crash_mrange_info = { "crash", NULL, 0, 0, 0 };
-struct fadump_mrange_info reserved_mrange_info = { "reserved", NULL, 0, 0, 0 };
+struct fadump_mrange_info crash_mrange_info = { "crash", NULL, 0, 0, 0, false };
+
+#define RESERVED_RNGS_SZ	16384 /* 16K - 128 entries */
+#define RESERVED_RNGS_CNT	(RESERVED_RNGS_SZ / \
+				 sizeof(struct fadump_memory_range))
+static struct fadump_memory_range rngs[RESERVED_RNGS_CNT];
+struct fadump_mrange_info reserved_mrange_info = { "reserved", rngs,
+						   RESERVED_RNGS_SZ, 0,
+						   RESERVED_RNGS_CNT, true };
+
+static void __init early_init_dt_scan_reserved_ranges(unsigned long node);
 
 #ifdef CONFIG_CMA
 static struct cma *fadump_cma;
@@ -108,6 +117,11 @@ static int __init fadump_cma_init(void) { return 1; }
 int __init early_init_dt_scan_fw_dump(unsigned long node, const char *uname,
 				      int depth, void *data)
 {
+	if (depth == 0) {
+		early_init_dt_scan_reserved_ranges(node);
+		return 0;
+	}
+
 	if (depth != 1)
 		return 0;
 
@@ -726,10 +740,14 @@ void fadump_free_cpu_notes_buf(void)
 
 static void fadump_free_mem_ranges(struct fadump_mrange_info *mrange_info)
 {
+	if (mrange_info->is_static) {
+		mrange_info->mem_range_cnt = 0;
+		return;
+	}
+
 	kfree(mrange_info->mem_ranges);
-	mrange_info->mem_ranges = NULL;
-	mrange_info->mem_ranges_sz = 0;
-	mrange_info->max_mem_ranges = 0;
+	memset((void *)((u64)mrange_info + RNG_NAME_SZ), 0,
+	       (sizeof(struct fadump_mrange_info) - RNG_NAME_SZ));
 }
 
 /*
@@ -786,6 +804,12 @@ static inline int fadump_add_mem_range(struct fadump_mrange_info *mrange_info,
 		if (mrange_info->mem_range_cnt == mrange_info->max_mem_ranges) {
 			int ret;
 
+			if (mrange_info->is_static) {
+				pr_err("Reached array size limit for %s memory ranges\n",
+				       mrange_info->name);
+				return -ENOSPC;
+			}
+
 			ret = fadump_alloc_mem_ranges(mrange_info);
 			if (ret)
 				return ret;
@@ -1202,20 +1226,19 @@ static void sort_and_merge_mem_ranges(struct fadump_mrange_info *mrange_info)
  * Scan reserved-ranges to consider them while reserving/releasing
  * memory for FADump.
  */
-static inline int fadump_scan_reserved_mem_ranges(void)
+static void __init early_init_dt_scan_reserved_ranges(unsigned long node)
 {
-	struct device_node *root;
 	const __be32 *prop;
 	int len, ret = -1;
 	unsigned long i;
 
-	root = of_find_node_by_path("/");
-	if (!root)
-		return ret;
+	/* reserved-ranges already scanned */
+	if (reserved_mrange_info.mem_range_cnt != 0)
+		return;
 
-	prop = of_get_property(root, "reserved-ranges", &len);
+	prop = of_get_flat_dt_prop(node, "reserved-ranges", &len);
 	if (!prop)
-		return ret;
+		return;
 
 	/*
 	 * Each reserved range is an (address,size) pair, 2 cells each,
@@ -1237,7 +1260,8 @@ static inline int fadump_scan_reserved_mem_ranges(void)
 		}
 	}
 
-	return ret;
+	/* Compact reserved ranges */
+	sort_and_merge_mem_ranges(&reserved_mrange_info);
 }
 
 /*
@@ -1251,32 +1275,21 @@ static void fadump_release_memory(u64 begin, u64 end)
 	u64 ra_start, ra_end, tstart;
 	int i, ret;
 
-	fadump_scan_reserved_mem_ranges();
-
 	ra_start = fw_dump.reserve_dump_area_start;
 	ra_end = ra_start + fw_dump.reserve_dump_area_size;
 
 	/*
-	 * Add reserved dump area to reserved ranges list
-	 * and exclude all these ranges while releasing memory.
+	 * If reserved ranges array limit is hit, overwrite the last reserved
+	 * memory range with reserved dump area to ensure it is excluded from
+	 * the memory being released (reused for next FADump registration).
 	 */
-	ret = fadump_add_mem_range(&reserved_mrange_info, ra_start, ra_end);
-	if (ret != 0) {
-		/*
-		 * Not enough memory to setup reserved ranges but the system is
-		 * running shortage of memory. So, release all the memory except
-		 * Reserved dump area (reused for next fadump registration).
-		 */
-		if (begin < ra_end && end > ra_start) {
-			if (begin < ra_start)
-				fadump_release_reserved_area(begin, ra_start);
-			if (end > ra_end)
-				fadump_release_reserved_area(ra_end, end);
-		} else
-			fadump_release_reserved_area(begin, end);
+	if (reserved_mrange_info.mem_range_cnt ==
+	    reserved_mrange_info.max_mem_ranges)
+		reserved_mrange_info.mem_range_cnt--;
 
+	ret = fadump_add_mem_range(&reserved_mrange_info, ra_start, ra_end);
+	if (ret != 0)
 		return;
-	}
 
 	/* Get the reserved ranges list in order first. */
 	sort_and_merge_mem_ranges(&reserved_mrange_info);


^ permalink raw reply related

* Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"
From: Arnaldo Carvalho de Melo @ 2020-03-10 18:34 UTC (permalink / raw)
  To: Kajol Jain
  Cc: mark.rutland, maddy, peterz, yao.jin, mingo, kan.liang, ak,
	alexander.shishkin, anju, mamatha4, sukadev, ravi.bangoria,
	jmario, namhyung, tglx, mpetlan, gregkh, linux-kernel,
	linux-perf-users, jolsa, linuxppc-dev
In-Reply-To: <20200309062552.29911-7-kjain@linux.ibm.com>

Em Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain escreveu:
> Patch enhances current metric infrastructure to handle "?" in the metric
> expression. The "?" can be use for parameters whose value not known while
> creating metric events and which can be replace later at runtime to
> the proper value. It also add flexibility to create multiple events out
> of single metric event added in json file.
> 
> Patch adds function 'arch_get_runtimeparam' which is a arch specific
> function, returns the count of metric events need to be created.
> By default it return 1.
> 
> One loop is added in function 'metricgroup__add_metric', which create
> multiple events at run time depend on return value of
> 'arch_get_runtimeparam' and merge that event in 'group_list'.
> 
> This infrastructure needed for hv_24x7 socket/chip level events.
> "hv_24x7" chip level events needs specific chip-id to which the
> data is requested. Function 'arch_get_runtimeparam' implemented
> in header.c which extract number of sockets from sysfs file
> "sockets" under "/sys/devices/hv_24x7/interface/".
> 
> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> ---
>  tools/perf/arch/powerpc/util/header.c |  22 +++++
>  tools/perf/util/expr.h                |   1 +
>  tools/perf/util/expr.l                |  19 +++-
>  tools/perf/util/metricgroup.c         | 124 ++++++++++++++++++++------
>  tools/perf/util/metricgroup.h         |   1 +
>  tools/perf/util/stat-shadow.c         |   8 ++
>  6 files changed, 148 insertions(+), 27 deletions(-)
> 
> diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> index 3b4cdfc5efd6..036f6b2ce202 100644
> --- a/tools/perf/arch/powerpc/util/header.c
> +++ b/tools/perf/arch/powerpc/util/header.c
> @@ -7,6 +7,11 @@
>  #include <string.h>
>  #include <linux/stringify.h>
>  #include "header.h"
> +#include "metricgroup.h"
> +#include "evlist.h"
> +#include <dirent.h>
> +#include "pmu.h"
> +#include <api/fs/fs.h>
>  
>  #define mfspr(rn)       ({unsigned long rval; \
>  			 asm volatile("mfspr %0," __stringify(rn) \
> @@ -16,6 +21,8 @@
>  #define PVR_VER(pvr)    (((pvr) >>  16) & 0xFFFF) /* Version field */
>  #define PVR_REV(pvr)    (((pvr) >>   0) & 0xFFFF) /* Revison field */
>  
> +#define SOCKETS_INFO_FILE_PATH "/devices/hv_24x7/interface/"
> +
>  int
>  get_cpuid(char *buffer, size_t sz)
>  {
> @@ -44,3 +51,18 @@ get_cpuid_str(struct perf_pmu *pmu __maybe_unused)
>  
>  	return bufp;
>  }
> +
> +int arch_get_runtimeparam(void)
> +{
> +	int count;
> +	char path[PATH_MAX];
> +	char filename[] = "sockets";
> +
> +	snprintf(path, PATH_MAX,
> +		 SOCKETS_INFO_FILE_PATH "%s", filename);
> +
> +	if (sysfs__read_ull(path, (unsigned long long *)&count) < 0)
> +		return 1;
> +	else
> +		return count;

Why this cast dance? We have sysfs__read_int(path, &count).

Also this is more compact:

	return sysfs__read_int(path, &count) < 0 ? 1 : count;

> +}
> diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h
> index 9377538f4097..d17664e628db 100644
> --- a/tools/perf/util/expr.h
> +++ b/tools/perf/util/expr.h
> @@ -15,6 +15,7 @@ struct parse_ctx {
>  	struct parse_id ids[MAX_PARSE_ID];
>  };
>  
> +int expr__runtimeparam;
>  void expr__ctx_init(struct parse_ctx *ctx);
>  void expr__add_id(struct parse_ctx *ctx, const char *id, double val);
>  int expr__parse(double *final_val, struct parse_ctx *ctx, const char *expr);
> diff --git a/tools/perf/util/expr.l b/tools/perf/util/expr.l
> index 1928f2a3dddc..ec4b00671f67 100644
> --- a/tools/perf/util/expr.l
> +++ b/tools/perf/util/expr.l
> @@ -45,6 +45,21 @@ static char *normalize(char *str)
>  			*dst++ = '/';
>  		else if (*str == '\\')
>  			*dst++ = *++str;
> +        else if (*str == '?') {
> +
> +			int size = snprintf(NULL, 0, "%d", expr__runtimeparam);

TIL that C99 allows for a NULL str to format and return the number of
bytes it would write if the string was large enough... wonders never
cease :-)

> +			char * paramval = (char *)malloc(size);

No need for the cast, malloc returns void *, or has that changed? 8-)
and please no space before the variable name.

Humm this is all complicated, why not use asprintf and have something
like:

> +			int i = 0;
> +
> +			if(!paramval)
> +				*dst++ = '0';
> +			else {
> +				sprintf(paramval, "%d", expr__runtimeparam);
> +				while(i < size)
> +					*dst++ = paramval[i++];
> +				free(paramval);
> +			}

			char *paramval;
			int size = asprintf(&paramval, "%d", expr__runtimeparam);

			if (size < 0)
				*dst++ = '0';
			else {
				while (i < size)
					*dst++ = paramval[i++];
				free(paramval);
			}


> +		}
>  		else
>  			*dst++ = *str;
>  		str++;
> @@ -72,8 +87,8 @@ number		[0-9]+
>  
>  sch		[-,=]
>  spec		\\{sch}
> -sym		[0-9a-zA-Z_\.:@]+
> -symbol		{spec}*{sym}*{spec}*{sym}*
> +sym		[0-9a-zA-Z_\.:@?]+
> +symbol		{spec}*{sym}*{spec}*{sym}*{spec}*{sym}
>  
>  %%
>  	{
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index c3a8c701609a..11eeeb929b91 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -474,6 +474,98 @@ static bool metricgroup__has_constraint(struct pmu_event *pe)
>  	return false;
>  }
>  
> +int __weak arch_get_runtimeparam(void)
> +{
> +	return 1;
> +}
> +
> +static int metricgroup__add_metric_runtime_param(struct strbuf *events,
> +			struct list_head *group_list, struct pmu_event *pe)
> +{
> +	int i, count;
> +	int ret = -EINVAL;
> +
> +	count = arch_get_runtimeparam();
> +
> +	/* This loop is added to create multiple
> +	 * events depend on count value and add
> +	 * those events to group_list.
> +	 */
> +
> +	for (i = 0; i < count; i++) {
> +		const char **ids;
> +		int idnum;
> +		struct egroup *eg;
> +		char value[PATH_MAX];
> +
> +		expr__runtimeparam = i;
> +
> +		if (expr__find_other(pe->metric_expr,
> +					NULL, &ids, &idnum) < 0)
> +			return ret;
> +
> +		if (events->len > 0)
> +			strbuf_addf(events, ",");
> +
> +		if (metricgroup__has_constraint(pe))
> +			metricgroup__add_metric_non_group(events, ids, idnum);
> +		else
> +			metricgroup__add_metric_weak_group(events, ids, idnum);
> +
> +		eg = malloc(sizeof(struct egroup));

Shorter form that works even if you change that type:

+		eg = malloc(sizeof(*eg));

> +		if (!eg) {
> +			ret = -ENOMEM;
> +			return ret;
> +		}
> +		sprintf(value, "%s%c%d", pe->metric_name, '_', i);
> +		eg->ids = ids;
> +		eg->idnum = idnum;
> +		eg->metric_name = strdup(value);

Please check strdup() return just like you checked the malloc(sizeof(struct egroup)).

> +		eg->metric_expr = pe->metric_expr;
> +		eg->metric_unit = pe->unit;
> +		list_add_tail(&eg->nd, group_list);
> +		ret = 0;
> +
> +		if (ret != 0)
> +			break;
> +	}
> +	return ret;
> +}
> +static int metricgroup__add_metric_param(struct strbuf *events,
> +			struct list_head *group_list, struct pmu_event *pe)
> +{
> +
> +	const char **ids;
> +	int idnum;
> +	struct egroup *eg;
> +	int ret = -EINVAL;
> +
> +	if (expr__find_other(pe->metric_expr,
> +					     NULL, &ids, &idnum) < 0)

Why break the above in two lines?

> +		return ret;
> +	if (events->len > 0)
> +		strbuf_addf(events, ",");
> +
> +	if (metricgroup__has_constraint(pe))
> +		metricgroup__add_metric_non_group(events, ids, idnum);
> +	else
> +		metricgroup__add_metric_weak_group(events, ids, idnum);
> +
> +	eg = malloc(sizeof(struct egroup));

Ditto

> +	if (!eg)
> +		ret = -ENOMEM;
> +
> +	eg->ids = ids;
> +	eg->idnum = idnum;
> +	eg->metric_name = pe->metric_name;
> +	eg->metric_expr = pe->metric_expr;
> +	eg->metric_unit = pe->unit;
> +	list_add_tail(&eg->nd, group_list);
> +	ret = 0;
> +
> +	return ret;
> +}
> +
>  static int metricgroup__add_metric(const char *metric, struct strbuf *events,
>  				   struct list_head *group_list)
>  {
> @@ -493,35 +585,17 @@ static int metricgroup__add_metric(const char *metric, struct strbuf *events,
>  			continue;
>  		if (match_metric(pe->metric_group, metric) ||
>  		    match_metric(pe->metric_name, metric)) {
> -			const char **ids;
> -			int idnum;
> -			struct egroup *eg;
>  
>  			pr_debug("metric expr %s for %s\n", pe->metric_expr, pe->metric_name);
>  
> -			if (expr__find_other(pe->metric_expr,
> -					     NULL, &ids, &idnum) < 0)
> -				continue;
> -			if (events->len > 0)
> -				strbuf_addf(events, ",");
> -
> -			if (metricgroup__has_constraint(pe))
> -				metricgroup__add_metric_non_group(events, ids, idnum);
> +			if (strstr(pe->metric_expr, "?"))
> +				ret = metricgroup__add_metric_runtime_param(events,
> +							group_list, pe);
>  			else
> -				metricgroup__add_metric_weak_group(events, ids, idnum);
> -
> -			eg = malloc(sizeof(struct egroup));

                                             *eg
> -			if (!eg) {
> -				ret = -ENOMEM;
> -				break;
> -			}
> -			eg->ids = ids;
> -			eg->idnum = idnum;
> -			eg->metric_name = pe->metric_name;
> -			eg->metric_expr = pe->metric_expr;
> -			eg->metric_unit = pe->unit;
> -			list_add_tail(&eg->nd, group_list);
> -			ret = 0;
> +				ret = metricgroup__add_metric_param(events,
> +							group_list, pe);
> +			if (ret == -EINVAL)
> +				continue;
>  		}
>  	}
>  	return ret;
> diff --git a/tools/perf/util/metricgroup.h b/tools/perf/util/metricgroup.h
> index 475c7f912864..81224ba1270d 100644
> --- a/tools/perf/util/metricgroup.h
> +++ b/tools/perf/util/metricgroup.h
> @@ -34,4 +34,5 @@ int metricgroup__parse_groups(const struct option *opt,
>  void metricgroup__print(bool metrics, bool groups, char *filter,
>  			bool raw, bool details);
>  bool metricgroup__has_metric(const char *metric);
> +int arch_get_runtimeparam(void);
>  #endif
> diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
> index 0fd713d3674f..92c4c9abbaa0 100644
> --- a/tools/perf/util/stat-shadow.c
> +++ b/tools/perf/util/stat-shadow.c
> @@ -777,6 +777,14 @@ static void generic_metric(struct perf_stat_config *config,
>  	}
>  
>  	if (!metric_events[i]) {
> +
> +		if (strstr(metric_expr, "?")) {
> +			char *tmp = strrchr(metric_name, '_');
> +

So at this point a metric name is guaranteed to have a _?

> +			tmp++;
> +			expr__runtimeparam = strtol(tmp, &tmp, 10);
> +		}
> +
>  		if (expr__parse(&ratio, &pctx, metric_expr) == 0) {
>  			char *unit;
>  			char metric_bf[64];
> -- 
> 2.18.1
> 

-- 

- Arnaldo

^ permalink raw reply

* Re: [PATCH v4 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events
From: Jiri Olsa @ 2020-03-10 18:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: mark.rutland, maddy, peterz, yao.jin, mingo, kan.liang, ak,
	alexander.shishkin, anju, mamatha4, sukadev, ravi.bangoria,
	Kajol Jain, jmario, namhyung, tglx, mpetlan, gregkh, linux-kernel,
	linux-perf-users, jolsa, linuxppc-dev
In-Reply-To: <20200310181836.GA12036@kernel.org>

On Tue, Mar 10, 2020 at 03:18:36PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Mar 09, 2020 at 10:35:06AM +0100, Jiri Olsa escreveu:
> > On Mon, Mar 09, 2020 at 11:55:44AM +0530, Kajol Jain wrote:
> > > First patch of the patchset fix inconsistent results we are getting when
> > > we run multiple 24x7 events.
> > > 
> > > Patchset adds json file metric support for the hv_24x7 socket/chip level
> > > events. "hv_24x7" pmu interface events needs system dependent parameter
> > > like socket/chip/core. For example, hv_24x7 chip level events needs
> > > specific chip-id to which the data is requested should be added as part
> > > of pmu events.
> > > 
> > > So to enable JSON file support to "hv_24x7" interface, patchset expose
> > > total number of sockets and chips per-socket details in sysfs
> > > files (sockets, chips) under "/sys/devices/hv_24x7/interface/".
> > > 
> > > To get sockets and number of chips per sockets, patchset adds a rtas call
> > > with token "PROCESSOR_MODULE_INFO" to get these details. Patchset also
> > > handles partition migration case to re-init these system depended
> > > parameters by adding proper calls in post_mobility_fixup() (mobility.c).
> > > 
> > > Patch 6 & 8 of the patchset handles perf tool plumbing needed to replace
> > > the "?" character in the metric expression to proper value and hv_24x7
> > > json metric file for different Socket/chip resources.
> > > 
> > > Patch set also enable Hz/hz prinitg for --metric-only option to print
> > > metric data for bus frequency.
> > > 
> > > Applied and tested all these patches cleanly on top of jiri's flex changes
> > > with the changes done by Kan Liang for "Support metric group constraint"
> > > patchset and made required changes.
> > > 
> > > Changelog:
> > > v3 -> v4
> > > - Made changes suggested by jiri.
> > 
> > could you please mention them next time? ;-)
> > 
> > > - Apply these patch on top of Kan liang changes.
> > 
> > Arnaldo, could you please pull the expr flex changes and Kan's
> > metric group constraint changes? it's both prereq of this patchset
> 
> Both are now in my perf/core branch, will go upstream soon, should I go
> and pickup the perf tooling bits in this patchkit?

Kajol mentioned there are still some issues with the
global variable, I plan to check on it this week

thanks,
jirka


^ permalink raw reply

* Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record
From: Tyrel Datwyler @ 2020-03-10 18:18 UTC (permalink / raw)
  To: Nathan Lynch; +Cc: mwb, msuchanek, linuxppc-dev
In-Reply-To: <87tv2w2kc2.fsf@linux.ibm.com>

On 3/10/20 10:25 AM, Nathan Lynch wrote:
> Tyrel Datwyler <tyreld@linux.ibm.com> writes:
>> The expectation is that when calling of_read_drc_info_cell()
>> repeatedly to parse multiple drc-info records that the in/out curval
>> parameter points at the start of the next record on return. However,
>> the current behavior has curval still pointing at the final value of
>> the record just parsed. The result of which is that if the
>> ibm,drc-info property contains multiple properties the parsed value
>> of the drc_type for any record after the first has the power_domain
>> value of the previous record appended to the type string.
>>
>> Ex: observed the following 0xffffffff prepended to PHB
>>
>> [   69.485037] drc-info: type: \xff\xff\xff\xffPHB, prefix: PHB , index_start: 0x20000001
>> [   69.485038] drc-info: suffix_start: 1, sequential_elems: 3072, sequential_inc: 1
>> [   69.485038] drc-info: power-domain: 0xffffffff, last_index: 0x20000c00
>>
>> Fix by incrementing curval past the power_domain value to point at
>> drc_type string of next record.
>>
>> Fixes: a29396653b8bf ("pseries/drc-info: Search DRC properties for CPU indexes")
> 
> I have a different commit hash for that:
> e83636ac3334 pseries/drc-info: Search DRC properties for CPU indexes

Oof, looks like I grabbed the commit hash from the SLES 15 SP1 branch. You have
the correct upstream commit.

Fixes: e83636ac3334 ("pseries/drc-info: Search DRC properties for CPU indexes")

Michael, let me know if you want me to resubmit, or if you will fixup the Fixes
tag on your end?

-Tyrel

> 
>> Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
> 
> Otherwise:
> Acked-by: Nathan Lynch <nathanl@linux.ibm.com>
> 


^ permalink raw reply

* Re: [PATCH v4 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events
From: Arnaldo Carvalho de Melo @ 2020-03-10 18:18 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: mark.rutland, maddy, peterz, yao.jin, mingo, kan.liang, ak,
	alexander.shishkin, anju, mamatha4, sukadev, ravi.bangoria,
	Kajol Jain, jmario, namhyung, tglx, mpetlan, gregkh, linux-kernel,
	linux-perf-users, jolsa, linuxppc-dev
In-Reply-To: <20200309093506.GB67774@krava>

Em Mon, Mar 09, 2020 at 10:35:06AM +0100, Jiri Olsa escreveu:
> On Mon, Mar 09, 2020 at 11:55:44AM +0530, Kajol Jain wrote:
> > First patch of the patchset fix inconsistent results we are getting when
> > we run multiple 24x7 events.
> > 
> > Patchset adds json file metric support for the hv_24x7 socket/chip level
> > events. "hv_24x7" pmu interface events needs system dependent parameter
> > like socket/chip/core. For example, hv_24x7 chip level events needs
> > specific chip-id to which the data is requested should be added as part
> > of pmu events.
> > 
> > So to enable JSON file support to "hv_24x7" interface, patchset expose
> > total number of sockets and chips per-socket details in sysfs
> > files (sockets, chips) under "/sys/devices/hv_24x7/interface/".
> > 
> > To get sockets and number of chips per sockets, patchset adds a rtas call
> > with token "PROCESSOR_MODULE_INFO" to get these details. Patchset also
> > handles partition migration case to re-init these system depended
> > parameters by adding proper calls in post_mobility_fixup() (mobility.c).
> > 
> > Patch 6 & 8 of the patchset handles perf tool plumbing needed to replace
> > the "?" character in the metric expression to proper value and hv_24x7
> > json metric file for different Socket/chip resources.
> > 
> > Patch set also enable Hz/hz prinitg for --metric-only option to print
> > metric data for bus frequency.
> > 
> > Applied and tested all these patches cleanly on top of jiri's flex changes
> > with the changes done by Kan Liang for "Support metric group constraint"
> > patchset and made required changes.
> > 
> > Changelog:
> > v3 -> v4
> > - Made changes suggested by jiri.
> 
> could you please mention them next time? ;-)
> 
> > - Apply these patch on top of Kan liang changes.
> 
> Arnaldo, could you please pull the expr flex changes and Kan's
> metric group constraint changes? it's both prereq of this patchset

Both are now in my perf/core branch, will go upstream soon, should I go
and pickup the perf tooling bits in this patchkit?

- Arnaldo

^ permalink raw reply

* Re: [PATCH 1/4] powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs
From: Cédric Le Goater @ 2020-03-10 16:07 UTC (permalink / raw)
  To: Greg Kurz; +Cc: linuxppc-dev, stable, David Gibson
In-Reply-To: <20200310160916.37de59c2@bahia.home>

On 3/10/20 4:09 PM, Greg Kurz wrote:
> On Fri,  6 Mar 2020 16:01:40 +0100
> Cédric Le Goater <clg@kaod.org> wrote:
> 
>> When a CPU is brought up, an IPI number is allocated and recorded
>> under the XIVE CPU structure. Invalid IPI numbers are tracked with
>> interrupt number 0x0.
>>
>> On the PowerNV platform, the interrupt number space starts at 0x10 and
>> this works fine. However, on the sPAPR platform, it is possible to
>> allocate the interrupt number 0x0 and this raises an issue when CPU 0
>> is unplugged. The XIVE spapr driver tracks allocated interrupt numbers
>> in a bitmask and it is not correctly updated when interrupt number 0x0
>> is freed. It stays allocated and it is then impossible to reallocate.
>>
>> Fix by using the XIVE_BAD_IRQ value instead of zero on both platforms.
>>
>> Reported-by: David Gibson <david@gibson.dropbear.id.au>
>> Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
>> Cc: stable@vger.kernel.org # v4.14+
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
> 
> This looks mostly good. I'm juste wondering about potential overlooks:

Yes. Thanks for doing so. There are some non-obvious use of interrupt
numbers under the hood. 

One thing we should be adding is a comment on the different interrupt 
number spaces. The HW interrupt numbers, the EISN numbers found on the 
XIVE even queue and the Linux interrupt numbers are different spaces 
and have different limits. XIVE_BAD_IRQ was introduced for the EISN 
numbers and the patch is using this value for HW numbers. This is ok 
because it's more a tag than a limit.

> $ git grep 'if.*hw_i' arch/powerpc/ | egrep -v 'xics|XIVE_BAD_IRQ'
>
>
> arch/powerpc/kvm/book3s_xive.h:         if (out_hw_irq)
> arch/powerpc/kvm/book3s_xive.h:         if (out_hw_irq)
> arch/powerpc/kvm/book3s_xive_template.c:        else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW)
> arch/powerpc/sysdev/xive/common.c:      else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) {
>
> This hw_irq check in xive_do_source_eoi() for example is related to:
> 
> 	/*
> 	 * Note: We pass "0" to the hw_irq argument in order to
> 	 * avoid calling into the backend EOI code which we don't
> 	 * want to do in the case of a re-trigger. Backends typically
> 	 * only do EOI for LSIs anyway.
> 	 */
> 	xive_do_source_eoi(0, xd);

that's a hack to skip the following part of the code in case of EOI 
being done through FW:

	else if (hw_irq && xd->flags & XIVE_IRQ_FLAG_EOI_FW) {
		/*
		 * The FW told us to call it. This happens for some
		 * interrupt sources that need additional HW whacking
		 * beyond the ESB manipulation. For example LPC interrupts
		 * on P9 DD1.0 needed a latch to be clared in the LPC bridge
		 * itself. The Firmware will take care of it.
		 */
		if (WARN_ON_ONCE(!xive_ops->eoi))
			return;
		xive_ops->eoi(hw_irq);

That was the case for PHB4 LSIs on P9 DD1 only. We could probably drop
the code in Linux unless similar bugs show up on new platforms.

> but it can get hw_irq from:
> 
> 	xive_do_source_eoi(xc->hw_ipi, &xc->ipi_data);

That part is fine. It's an IPI EOI.

> 
> It seems that these should use XIVE_BAD_IRQ as well or I'm missing
> something ?
> 
> arch/powerpc/sysdev/xive/common.c:      if (hw_irq)

This tests the XIVE IPI number which is mapped to 0 for all CPUs.
See xive_request_ipi() and xive_irq_domain_map()

C.

> arch/powerpc/sysdev/xive/common.c:              if (d->domain != xive_irq_domain || hw_irq == 0)
> 
> 
> 
>>  arch/powerpc/sysdev/xive/xive-internal.h |  7 +++++++
>>  arch/powerpc/sysdev/xive/common.c        | 12 +++---------
>>  arch/powerpc/sysdev/xive/native.c        |  4 ++--
>>  arch/powerpc/sysdev/xive/spapr.c         |  4 ++--
>>  4 files changed, 14 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/powerpc/sysdev/xive/xive-internal.h b/arch/powerpc/sysdev/xive/xive-internal.h
>> index 59cd366e7933..382980f4de2d 100644
>> --- a/arch/powerpc/sysdev/xive/xive-internal.h
>> +++ b/arch/powerpc/sysdev/xive/xive-internal.h
>> @@ -5,6 +5,13 @@
>>  #ifndef __XIVE_INTERNAL_H
>>  #define __XIVE_INTERNAL_H
>>  
>> +/*
>> + * A "disabled" interrupt should never fire, to catch problems
>> + * we set its logical number to this
>> + */
>> +#define XIVE_BAD_IRQ		0x7fffffff
>> +#define XIVE_MAX_IRQ		(XIVE_BAD_IRQ - 1)
>> +
>>  /* Each CPU carry one of these with various per-CPU state */
>>  struct xive_cpu {
>>  #ifdef CONFIG_SMP
>> diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
>> index fa49193206b6..550baba98ec9 100644
>> --- a/arch/powerpc/sysdev/xive/common.c
>> +++ b/arch/powerpc/sysdev/xive/common.c
>> @@ -68,13 +68,6 @@ static u32 xive_ipi_irq;
>>  /* Xive state for each CPU */
>>  static DEFINE_PER_CPU(struct xive_cpu *, xive_cpu);
>>  
>> -/*
>> - * A "disabled" interrupt should never fire, to catch problems
>> - * we set its logical number to this
>> - */
>> -#define XIVE_BAD_IRQ		0x7fffffff
>> -#define XIVE_MAX_IRQ		(XIVE_BAD_IRQ - 1)
>> -
>>  /* An invalid CPU target */
>>  #define XIVE_INVALID_TARGET	(-1)
>>  
>> @@ -1153,7 +1146,7 @@ static int xive_setup_cpu_ipi(unsigned int cpu)
>>  	xc = per_cpu(xive_cpu, cpu);
>>  
>>  	/* Check if we are already setup */
>> -	if (xc->hw_ipi != 0)
>> +	if (xc->hw_ipi != XIVE_BAD_IRQ)
>>  		return 0;
>>  
>>  	/* Grab an IPI from the backend, this will populate xc->hw_ipi */
>> @@ -1190,7 +1183,7 @@ static void xive_cleanup_cpu_ipi(unsigned int cpu, struct xive_cpu *xc)
>>  	/* Disable the IPI and free the IRQ data */
>>  
>>  	/* Already cleaned up ? */
>> -	if (xc->hw_ipi == 0)
>> +	if (xc->hw_ipi == XIVE_BAD_IRQ)
>>  		return;
>>  
>>  	/* Mask the IPI */
>> @@ -1346,6 +1339,7 @@ static int xive_prepare_cpu(unsigned int cpu)
>>  		if (np)
>>  			xc->chip_id = of_get_ibm_chip_id(np);
>>  		of_node_put(np);
>> +		xc->hw_ipi = XIVE_BAD_IRQ;
>>  
>>  		per_cpu(xive_cpu, cpu) = xc;
>>  	}
>> diff --git a/arch/powerpc/sysdev/xive/native.c b/arch/powerpc/sysdev/xive/native.c
>> index 0ff6b739052c..50e1a8e02497 100644
>> --- a/arch/powerpc/sysdev/xive/native.c
>> +++ b/arch/powerpc/sysdev/xive/native.c
>> @@ -312,7 +312,7 @@ static void xive_native_put_ipi(unsigned int cpu, struct xive_cpu *xc)
>>  	s64 rc;
>>  
>>  	/* Free the IPI */
>> -	if (!xc->hw_ipi)
>> +	if (xc->hw_ipi == XIVE_BAD_IRQ)
>>  		return;
>>  	for (;;) {
>>  		rc = opal_xive_free_irq(xc->hw_ipi);
>> @@ -320,7 +320,7 @@ static void xive_native_put_ipi(unsigned int cpu, struct xive_cpu *xc)
>>  			msleep(OPAL_BUSY_DELAY_MS);
>>  			continue;
>>  		}
>> -		xc->hw_ipi = 0;
>> +		xc->hw_ipi = XIVE_BAD_IRQ;
>>  		break;
>>  	}
>>  }
>> diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerpc/sysdev/xive/spapr.c
>> index 55dc61cb4867..3f15615712b5 100644
>> --- a/arch/powerpc/sysdev/xive/spapr.c
>> +++ b/arch/powerpc/sysdev/xive/spapr.c
>> @@ -560,11 +560,11 @@ static int xive_spapr_get_ipi(unsigned int cpu, struct xive_cpu *xc)
>>  
>>  static void xive_spapr_put_ipi(unsigned int cpu, struct xive_cpu *xc)
>>  {
>> -	if (!xc->hw_ipi)
>> +	if (xc->hw_ipi == XIVE_BAD_IRQ)
>>  		return;
>>  
>>  	xive_irq_bitmap_free(xc->hw_ipi);
>> -	xc->hw_ipi = 0;
>> +	xc->hw_ipi = XIVE_BAD_IRQ;
>>  }
>>  #endif /* CONFIG_SMP */
>>  
> 


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox