* [PATCH 10/73] powerpc: use device_initcall for registering rtc devices
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 23:48 ` Geoff Levand
2014-01-21 21:22 ` [PATCH 11/73] powerpc: book3s KVM can be modular so it should use module.h Paul Gortmaker
` (7 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Geoff Levand, Paul Gortmaker, Paul Mackerras,
linuxppc-dev
Currently these two RTC devices are in core platform code
where it is not possible for them to be modular. It will
never be modular, so using module_init as an alias for
__initcall can be somewhat misleading.
Fix this up now, so that we can relocate module_init from
init.h into module.h in the future. If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.
Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups. As __initcall gets
mapped onto device_initcall, our use of device_initcall
directly in this change means that the runtime impact is
zero -- they will remain at level 6 in initcall ordering.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Geoff Levand <geoff@infradead.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/kernel/time.c | 2 +-
arch/powerpc/platforms/ps3/time.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b3dab20..63b34fc 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1064,4 +1064,4 @@ static int __init rtc_init(void)
return PTR_ERR_OR_ZERO(pdev);
}
-module_init(rtc_init);
+device_initcall(rtc_init);
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index ce73ce8..791c614 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -92,5 +92,4 @@ static int __init ps3_rtc_init(void)
return PTR_ERR_OR_ZERO(pdev);
}
-
-module_init(ps3_rtc_init);
+device_initcall(ps3_rtc_init);
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 10/73] powerpc: use device_initcall for registering rtc devices
2014-01-21 21:22 ` [PATCH 10/73] powerpc: use device_initcall for registering rtc devices Paul Gortmaker
@ 2014-01-21 23:48 ` Geoff Levand
2014-01-22 2:26 ` Paul Gortmaker
0 siblings, 1 reply; 16+ messages in thread
From: Geoff Levand @ 2014-01-21 23:48 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-arch, linuxppc-dev, Paul Mackerras, linux-kernel
Hi Paul,
On Tue, 2014-01-21 at 16:22 -0500, Paul Gortmaker wrote:
> Currently these two RTC devices are in core platform code
> where it is not possible for them to be modular. It will
> never be modular, so using module_init as an alias for
> __initcall can be somewhat misleading.
>
> arch/powerpc/kernel/time.c | 2 +-
> arch/powerpc/platforms/ps3/time.c | 3 +--
> 2 files changed, 2 insertions(+), 3 deletions(-)
I tested the PS3 part of this patch and it seems to work OK.
Acked-by: Geoff Levand <geoff@infradead.org>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 10/73] powerpc: use device_initcall for registering rtc devices
2014-01-21 23:48 ` Geoff Levand
@ 2014-01-22 2:26 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-22 2:26 UTC (permalink / raw)
To: Geoff Levand; +Cc: linux-arch, Paul Mackerras, linuxppc-dev, LKML
On Tue, Jan 21, 2014 at 6:48 PM, Geoff Levand <geoff@infradead.org> wrote:
> Hi Paul,
>
> On Tue, 2014-01-21 at 16:22 -0500, Paul Gortmaker wrote:
>> Currently these two RTC devices are in core platform code
>> where it is not possible for them to be modular. It will
>> never be modular, so using module_init as an alias for
>> __initcall can be somewhat misleading.
>>
>> arch/powerpc/kernel/time.c | 2 +-
>> arch/powerpc/platforms/ps3/time.c | 3 +--
>> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> I tested the PS3 part of this patch and it seems to work OK.
>
> Acked-by: Geoff Levand <geoff@infradead.org>
Thanks Geoff for the review and testing; I'll add the ack.
Paul.
--
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 11/73] powerpc: book3s KVM can be modular so it should use module.h
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
2014-01-21 21:22 ` [PATCH 10/73] powerpc: use device_initcall for registering rtc devices Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init Paul Gortmaker
` (6 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, kvm, Gleb Natapov, Alexander Graf, kvm-ppc,
Paul Gortmaker, Paul Mackerras, Paolo Bonzini, linuxppc-dev
Even though KVM is bool, KVM_BOOK3S_32 and KVM_BOOK3S_64 are declared
as Kconfig tristate, so this file really should be including
module.h instead of export.h -- it only works currently because
module_init is currently (mis)placed in init.h -- but we are
intending to clean that up and relocate it to module.h
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/kvm/book3s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index 8912608..279459e 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -16,7 +16,7 @@
#include <linux/kvm_host.h>
#include <linux/err.h>
-#include <linux/export.h>
+#include <linux/module.h>
#include <linux/slab.h>
#include <asm/reg.h>
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
2014-01-21 21:22 ` [PATCH 10/73] powerpc: use device_initcall for registering rtc devices Paul Gortmaker
2014-01-21 21:22 ` [PATCH 11/73] powerpc: book3s KVM can be modular so it should use module.h Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 22:23 ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 13/73] powerpc: use subsys_initcall for Freescale Local Bus Paul Gortmaker
` (5 subsequent siblings)
8 siblings, 1 reply; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, kvm, Gleb Natapov, Alexander Graf, kvm-ppc,
Paul Gortmaker, Paul Mackerras, Paolo Bonzini, linuxppc-dev
In powerpc, CONFIG_KVM is bool, and so are these three subarch
options, for the 44x and e500 variants. This means that any
module_exit() calls and functions used by them such as the
kvmppc_booke_exit() are dead code. Here we remove them.
In addition, rather than use module_init, which is just
__initcall for non-modules, we update those as well.
Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups. As __initcall gets
mapped onto device_initcall, our use of subsys_initcall (which
seems to make sense for netfilter code) will thus change this
registration from level 6-device to level 4-subsys (i.e. slightly
earlier).
However no impact of that small difference is expected,
since the arch independent kvm code doesn't trigger any init;
it is the arch initcalls here which actually call kvm_init.
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/include/asm/kvm_ppc.h | 1 -
arch/powerpc/kvm/44x.c | 10 +---------
arch/powerpc/kvm/booke.c | 6 ------
arch/powerpc/kvm/e500.c | 10 +---------
arch/powerpc/kvm/e500mc.c | 10 +---------
5 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index c8317fb..8466df5 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -109,7 +109,6 @@ extern void kvmppc_core_flush_tlb(struct kvm_vcpu *vcpu);
extern int kvmppc_core_check_requests(struct kvm_vcpu *vcpu);
extern int kvmppc_booke_init(void);
-extern void kvmppc_booke_exit(void);
extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu);
diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c
index 93221e8..2129fc1 100644
--- a/arch/powerpc/kvm/44x.c
+++ b/arch/powerpc/kvm/44x.c
@@ -222,12 +222,4 @@ static int __init kvmppc_44x_init(void)
err_out:
return r;
}
-
-static void __exit kvmppc_44x_exit(void)
-{
- kvmppc_pr_ops = NULL;
- kvmppc_booke_exit();
-}
-
-module_init(kvmppc_44x_init);
-module_exit(kvmppc_44x_exit);
+subsys_initcall(kvmppc_44x_init);
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 0591e05..49dffa2 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1995,9 +1995,3 @@ int __init kvmppc_booke_init(void)
#endif /* !BOOKE_HV */
return 0;
}
-
-void __exit kvmppc_booke_exit(void)
-{
- free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER);
- kvm_exit();
-}
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
index 497b142..115ef12 100644
--- a/arch/powerpc/kvm/e500.c
+++ b/arch/powerpc/kvm/e500.c
@@ -564,12 +564,4 @@ static int __init kvmppc_e500_init(void)
err_out:
return r;
}
-
-static void __exit kvmppc_e500_exit(void)
-{
- kvmppc_pr_ops = NULL;
- kvmppc_booke_exit();
-}
-
-module_init(kvmppc_e500_init);
-module_exit(kvmppc_e500_exit);
+subsys_initcall(kvmppc_e500_init);
diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
index 4132cd2..612c216 100644
--- a/arch/powerpc/kvm/e500mc.c
+++ b/arch/powerpc/kvm/e500mc.c
@@ -382,12 +382,4 @@ static int __init kvmppc_e500mc_init(void)
err_out:
return r;
}
-
-static void __exit kvmppc_e500mc_exit(void)
-{
- kvmppc_pr_ops = NULL;
- kvmppc_booke_exit();
-}
-
-module_init(kvmppc_e500mc_init);
-module_exit(kvmppc_e500mc_exit);
+subsys_initcall(kvmppc_e500mc_init);
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init
2014-01-21 21:22 ` [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init Paul Gortmaker
@ 2014-01-21 22:23 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 22:23 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, kvm, Gleb Natapov, Alexander Graf, kvm-ppc,
Paul Gortmaker, Paul Mackerras, Paolo Bonzini, linuxppc-dev
On 14-01-21 04:22 PM, Paul Gortmaker wrote:
> In powerpc, CONFIG_KVM is bool, and so are these three subarch
> options, for the 44x and e500 variants. This means that any
> module_exit() calls and functions used by them such as the
> kvmppc_booke_exit() are dead code. Here we remove them.
>
> In addition, rather than use module_init, which is just
> __initcall for non-modules, we update those as well.
>
> Note that direct use of __initcall is discouraged, vs. one
> of the priority categorized subgroups. As __initcall gets
> mapped onto device_initcall, our use of subsys_initcall (which
> seems to make sense for netfilter code) will thus change this
I've fixed the above -- s/netfilter/PPC KVM/
The risks of recycling commit logs...
Paul.
--
> registration from level 6-device to level 4-subsys (i.e. slightly
> earlier).
>
> However no impact of that small difference is expected,
> since the arch independent kvm code doesn't trigger any init;
> it is the arch initcalls here which actually call kvm_init.
>
> Cc: Gleb Natapov <gleb@kernel.org>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: kvm@vger.kernel.org
> Cc: kvm-ppc@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
> arch/powerpc/include/asm/kvm_ppc.h | 1 -
> arch/powerpc/kvm/44x.c | 10 +---------
> arch/powerpc/kvm/booke.c | 6 ------
> arch/powerpc/kvm/e500.c | 10 +---------
> arch/powerpc/kvm/e500mc.c | 10 +---------
> 5 files changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
> index c8317fb..8466df5 100644
> --- a/arch/powerpc/include/asm/kvm_ppc.h
> +++ b/arch/powerpc/include/asm/kvm_ppc.h
> @@ -109,7 +109,6 @@ extern void kvmppc_core_flush_tlb(struct kvm_vcpu *vcpu);
> extern int kvmppc_core_check_requests(struct kvm_vcpu *vcpu);
>
> extern int kvmppc_booke_init(void);
> -extern void kvmppc_booke_exit(void);
>
> extern void kvmppc_core_destroy_mmu(struct kvm_vcpu *vcpu);
> extern int kvmppc_kvm_pv(struct kvm_vcpu *vcpu);
> diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c
> index 93221e8..2129fc1 100644
> --- a/arch/powerpc/kvm/44x.c
> +++ b/arch/powerpc/kvm/44x.c
> @@ -222,12 +222,4 @@ static int __init kvmppc_44x_init(void)
> err_out:
> return r;
> }
> -
> -static void __exit kvmppc_44x_exit(void)
> -{
> - kvmppc_pr_ops = NULL;
> - kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_44x_init);
> -module_exit(kvmppc_44x_exit);
> +subsys_initcall(kvmppc_44x_init);
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 0591e05..49dffa2 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1995,9 +1995,3 @@ int __init kvmppc_booke_init(void)
> #endif /* !BOOKE_HV */
> return 0;
> }
> -
> -void __exit kvmppc_booke_exit(void)
> -{
> - free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER);
> - kvm_exit();
> -}
> diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c
> index 497b142..115ef12 100644
> --- a/arch/powerpc/kvm/e500.c
> +++ b/arch/powerpc/kvm/e500.c
> @@ -564,12 +564,4 @@ static int __init kvmppc_e500_init(void)
> err_out:
> return r;
> }
> -
> -static void __exit kvmppc_e500_exit(void)
> -{
> - kvmppc_pr_ops = NULL;
> - kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_e500_init);
> -module_exit(kvmppc_e500_exit);
> +subsys_initcall(kvmppc_e500_init);
> diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
> index 4132cd2..612c216 100644
> --- a/arch/powerpc/kvm/e500mc.c
> +++ b/arch/powerpc/kvm/e500mc.c
> @@ -382,12 +382,4 @@ static int __init kvmppc_e500mc_init(void)
> err_out:
> return r;
> }
> -
> -static void __exit kvmppc_e500mc_exit(void)
> -{
> - kvmppc_pr_ops = NULL;
> - kvmppc_booke_exit();
> -}
> -
> -module_init(kvmppc_e500mc_init);
> -module_exit(kvmppc_e500mc_exit);
> +subsys_initcall(kvmppc_e500mc_init);
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 13/73] powerpc: use subsys_initcall for Freescale Local Bus
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (2 preceding siblings ...)
2014-01-21 21:22 ` [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 14/73] powerpc: don't use module_init for non-modular core hugetlb code Paul Gortmaker
` (4 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel
Cc: linux-arch, Paul Gortmaker, Paul Mackerras, Scott Wood,
linuxppc-dev
The FSL_SOC option is bool, and hence this code is either
present or absent. It will never be modular, so using
module_init as an alias for __initcall is rather misleading.
Fix this up now, so that we can relocate module_init from
init.h into module.h in the future. If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.
Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups. As __initcall gets
mapped onto device_initcall, our use of subsys_initcall (which
makes sense for bus code) will thus change this registration
from level 6-device to level 4-subsys (i.e. slightly earlier).
However no observable impact of that small difference has
been observed during testing, or is expected.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/sysdev/fsl_lbc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
index d631022..38138cf 100644
--- a/arch/powerpc/sysdev/fsl_lbc.c
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -407,4 +407,4 @@ static int __init fsl_lbc_init(void)
{
return platform_driver_register(&fsl_lbc_ctrl_driver);
}
-module_init(fsl_lbc_init);
+subsys_initcall(fsl_lbc_init);
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 14/73] powerpc: don't use module_init for non-modular core hugetlb code
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (3 preceding siblings ...)
2014-01-21 21:22 ` [PATCH 13/73] powerpc: use subsys_initcall for Freescale Local Bus Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 15/73] powerpc: don't use module_init in non-modular 83xx suspend code Paul Gortmaker
` (3 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Paul Mackerras, linuxppc-dev
The hugetlbpage.o is obj-y (always built in). It will never
be modular, so using module_init as an alias for __initcall is
somewhat misleading.
Fix this up now, so that we can relocate module_init from
init.h into module.h in the future. If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.
Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups. As __initcall gets
mapped onto device_initcall, our use of arch_initcall (which
makes sense for arch code) will thus change this registration
from level 6-device to level 3-arch (i.e. slightly earlier).
However no observable impact of that small difference has
been observed during testing, or is expected.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 90bb6d9..d25c202 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -911,7 +911,7 @@ static int __init hugetlbpage_init(void)
return 0;
}
#endif
-module_init(hugetlbpage_init);
+arch_initcall(hugetlbpage_init);
void flush_dcache_icache_hugepage(struct page *page)
{
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 15/73] powerpc: don't use module_init in non-modular 83xx suspend code
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (4 preceding siblings ...)
2014-01-21 21:22 ` [PATCH 14/73] powerpc: don't use module_init for non-modular core hugetlb code Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:22 ` [PATCH 39/73] powerpc: delete another unrequired instance of <linux/init.h> Paul Gortmaker
` (2 subsequent siblings)
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Paul Mackerras, linuxppc-dev
The suspend.o is built for SUSPEND -- which is bool, and hence
this code is either present or absent. It will never be modular,
so using module_init as an alias for __initcall can be somewhat
misleading.
Fix this up now, so that we can relocate module_init from
init.h into module.h in the future. If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.
Note that direct use of __initcall is discouraged, vs. one
of the priority categorized subgroups. As __initcall gets
mapped onto device_initcall, our use of device_initcall
directly in this change means that the runtime impact is
zero -- it will remain at level 6 in initcall ordering.
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/platforms/83xx/suspend.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 4b4c081..e9f07c6 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -446,5 +446,4 @@ static int pmc_init(void)
{
return platform_driver_register(&pmc_driver);
}
-
-module_init(pmc_init);
+device_initcall(pmc_init);
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 39/73] powerpc: delete another unrequired instance of <linux/init.h>
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (5 preceding siblings ...)
2014-01-21 21:22 ` [PATCH 15/73] powerpc: don't use module_init in non-modular 83xx suspend code Paul Gortmaker
@ 2014-01-21 21:22 ` Paul Gortmaker
2014-01-21 21:23 ` [PATCH 66/73] drivers/macintosh: delete non-required instances of include <linux/init.h> Paul Gortmaker
2014-01-22 7:00 ` [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Stephen Rothwell
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:22 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, Paul Mackerras, linuxppc-dev
Most were already deleted in the 1st pass audit; this instance
showed up more recently.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/powerpc/sysdev/indirect_pci.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index 1f6c570..66f5fd1 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -13,7 +13,6 @@
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/string.h>
-#include <linux/init.h>
#include <asm/io.h>
#include <asm/prom.h>
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 66/73] drivers/macintosh: delete non-required instances of include <linux/init.h>
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (6 preceding siblings ...)
2014-01-21 21:22 ` [PATCH 39/73] powerpc: delete another unrequired instance of <linux/init.h> Paul Gortmaker
@ 2014-01-21 21:23 ` Paul Gortmaker
2014-01-22 7:00 ` [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Stephen Rothwell
8 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-21 21:23 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-arch, Paul Gortmaker, linuxppc-dev
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/macintosh/adb-iop.c | 1 -
drivers/macintosh/ams/ams-input.c | 1 -
drivers/macintosh/macio-adb.c | 1 -
drivers/macintosh/via-macii.c | 1 -
drivers/macintosh/via-pmu68k.c | 1 -
drivers/macintosh/windfarm_ad7417_sensor.c | 1 -
drivers/macintosh/windfarm_fcu_controls.c | 1 -
drivers/macintosh/windfarm_lm75_sensor.c | 1 -
drivers/macintosh/windfarm_max6690_sensor.c | 1 -
drivers/macintosh/windfarm_smu_sat.c | 1 -
10 files changed, 10 deletions(-)
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c
index f5f4da3..2c242f7 100644
--- a/drivers/macintosh/adb-iop.c
+++ b/drivers/macintosh/adb-iop.c
@@ -16,7 +16,6 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/delay.h>
-#include <linux/init.h>
#include <linux/proc_fs.h>
#include <asm/macintosh.h>
diff --git a/drivers/macintosh/ams/ams-input.c b/drivers/macintosh/ams/ams-input.c
index 2edae7d..b1bdd48 100644
--- a/drivers/macintosh/ams/ams-input.c
+++ b/drivers/macintosh/ams/ams-input.c
@@ -14,7 +14,6 @@
#include <linux/types.h>
#include <linux/errno.h>
-#include <linux/init.h>
#include <linux/delay.h>
#include "ams.h"
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 87de8d9..c8fcac0 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -14,7 +14,6 @@
#include <asm/pgtable.h>
#include <asm/hydra.h>
#include <asm/irq.h>
-#include <linux/init.h>
#include <linux/ioport.h>
struct preg {
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c
index 3725f08..fd27da3 100644
--- a/drivers/macintosh/via-macii.c
+++ b/drivers/macintosh/via-macii.c
@@ -30,7 +30,6 @@
#include <linux/delay.h>
#include <linux/adb.h>
#include <linux/interrupt.h>
-#include <linux/init.h>
#include <asm/macintosh.h>
#include <asm/macints.h>
#include <asm/mac_via.h>
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
index a00ee41..d2e252e 100644
--- a/drivers/macintosh/via-pmu68k.c
+++ b/drivers/macintosh/via-pmu68k.c
@@ -25,7 +25,6 @@
#include <linux/miscdevice.h>
#include <linux/blkdev.h>
#include <linux/pci.h>
-#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/adb.h>
diff --git a/drivers/macintosh/windfarm_ad7417_sensor.c b/drivers/macintosh/windfarm_ad7417_sensor.c
index 7c28b71..76715a7 100644
--- a/drivers/macintosh/windfarm_ad7417_sensor.c
+++ b/drivers/macintosh/windfarm_ad7417_sensor.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
-#include <linux/init.h>
#include <linux/wait.h>
#include <linux/i2c.h>
#include <asm/prom.h>
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index 0226b79..50ba619 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -12,7 +12,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
-#include <linux/init.h>
#include <linux/wait.h>
#include <linux/i2c.h>
#include <asm/prom.h>
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c
index 590214b..704dd2e 100644
--- a/drivers/macintosh/windfarm_lm75_sensor.c
+++ b/drivers/macintosh/windfarm_lm75_sensor.c
@@ -12,7 +12,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
-#include <linux/init.h>
#include <linux/wait.h>
#include <linux/i2c.h>
#include <asm/prom.h>
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c
index 87e439b..a3504d3 100644
--- a/drivers/macintosh/windfarm_max6690_sensor.c
+++ b/drivers/macintosh/windfarm_max6690_sensor.c
@@ -8,7 +8,6 @@
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <asm/prom.h>
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index ad6223e..b6d70d2 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -10,7 +10,6 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/slab.h>
-#include <linux/init.h>
#include <linux/wait.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
--
1.8.4.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h>
2014-01-21 21:22 [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Paul Gortmaker
` (7 preceding siblings ...)
2014-01-21 21:23 ` [PATCH 66/73] drivers/macintosh: delete non-required instances of include <linux/init.h> Paul Gortmaker
@ 2014-01-22 7:00 ` Stephen Rothwell
2014-01-23 0:38 ` Paul Gortmaker
8 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2014-01-22 7:00 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm,
linux-s390, netdev, x86, linux-kernel, torvalds, gregkh,
linux-alpha, sparclinux, akpm, linuxppc-dev, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
Hi Paul,
On Tue, 21 Jan 2014 16:22:03 -0500 Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
>
> Where: This work exists as a queue of patches that I apply to
> linux-next; since the changes are fixing some things that currently
> can only be found there. The patch series can be found at:
>
> http://git.kernel.org/cgit/linux/kernel/git/paulg/init.git
> git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
>
> I've avoided annoying Stephen with another queue of patches for
> linux-next while the development content was in flux, but now that
> the merge window has opened, and new additions are fewer, perhaps he
> wouldn't mind tacking it on the end... Stephen?
OK, I have added this to the end of linux-next today - we will see how we
go. It is called "init".
Thanks for adding your subsystem tree as a participant of linux-next. As
you may know, this is not a judgment of your code. The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window.
You will need to ensure that the patches/commits in your tree/series have
been:
* submitted under GPL v2 (or later) and include the Contributor's
Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.
Basically, this should be just what you would send to Linus (or ask him
to fetch). It is allowed to be rebased if you deem it necessary.
--
Cheers,
Stephen Rothwell
sfr@canb.auug.org.au
Legal Stuff:
By participating in linux-next, your subsystem tree contributions are
public and will be included in the linux-next trees. You may be sent
e-mail messages indicating errors or other issues when the
patches/commits from your subsystem tree are merged and tested in
linux-next. These messages may also be cross-posted to the linux-next
mailing list, the linux-kernel mailing list, etc. The linux-next tree
project and IBM (my employer) make no warranties regarding the linux-next
project, the testing procedures, the results, the e-mails, etc. If you
don't agree to these ground rules, let me know and I'll remove your tree
from participation in linux-next.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h>
2014-01-22 7:00 ` [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h> Stephen Rothwell
@ 2014-01-23 0:38 ` Paul Gortmaker
2014-01-28 3:13 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-23 0:38 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm,
linux-s390, netdev, x86, linux-kernel, torvalds, gregkh,
linux-alpha, sparclinux, akpm, linuxppc-dev, linux-arm-kernel
[Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include=
<linux/init.h>] On 22/01/2014 (Wed 18:00) Stephen Rothwell wrote:
> Hi Paul,
>=20
> On Tue, 21 Jan 2014 16:22:03 -0500 Paul Gortmaker <paul.gortmaker@windriv=
er.com> wrote:
> >
> > Where: This work exists as a queue of patches that I apply to
> > linux-next; since the changes are fixing some things that currently
> > can only be found there. The patch series can be found at:
> >=20
> > http://git.kernel.org/cgit/linux/kernel/git/paulg/init.git
> > git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
> >=20
> > I've avoided annoying Stephen with another queue of patches for
> > linux-next while the development content was in flux, but now that
> > the merge window has opened, and new additions are fewer, perhaps he
> > wouldn't mind tacking it on the end... Stephen?
>=20
> OK, I have added this to the end of linux-next today - we will see how we
> go. It is called "init".
Thanks, it was a great help as it uncovered a few issues in fringe arch
that I didn't have toolchains for, and I've fixed all of those up.
I've noticed that powerpc has been un-buildable for a while now; I have
used this hack patch locally so I could run the ppc defconfigs to check
that I didn't break anything. Maybe useful for linux-next in the
interim? It is a hack patch -- Not-Signed-off-by: Paul Gortmaker. :)
Paul.
--
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/includ=
e/asm/pgtable-ppc64.h
index d27960c89a71..d0f070a2b395 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -560,9 +560,9 @@ extern void pmdp_invalidate(struct vm_area_struct *vma,=
unsigned long address,
pmd_t *pmdp);
=20
#define pmd_move_must_withdraw pmd_move_must_withdraw
-typedef struct spinlock spinlock_t;
-static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
- spinlock_t *old_pmd_ptl)
+struct spinlock;
+static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
+ struct spinlock *old_pmd_ptl)
{
/*
* Archs like ppc64 use pgtable to store per pmd
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h>
2014-01-23 0:38 ` Paul Gortmaker
@ 2014-01-28 3:13 ` Benjamin Herrenschmidt
2014-01-28 16:21 ` Paul Gortmaker
0 siblings, 1 reply; 16+ messages in thread
From: Benjamin Herrenschmidt @ 2014-01-28 3:13 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-arch, Stephen Rothwell, linux-m68k, x86, linux-ia64, kvm,
linux-mips, linux-s390, rusty, linux-kernel, linuxppc-dev,
linux-alpha, gregkh, netdev, sparclinux, akpm, torvalds,
linux-arm-kernel
On Wed, 2014-01-22 at 19:38 -0500, Paul Gortmaker wrote:
> Thanks, it was a great help as it uncovered a few issues in fringe arch
> that I didn't have toolchains for, and I've fixed all of those up.
>
> I've noticed that powerpc has been un-buildable for a while now; I have
> used this hack patch locally so I could run the ppc defconfigs to check
> that I didn't break anything. Maybe useful for linux-next in the
> interim? It is a hack patch -- Not-Signed-off-by: Paul Gortmaker. :)
Can you and/or Aneesh submit that as a proper patch (with S-O-B
etc...) ?
Thanks !
Cheers,
Ben.
> Paul.
> --
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index d27960c89a71..d0f070a2b395 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -560,9 +560,9 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
> pmd_t *pmdp);
>
> #define pmd_move_must_withdraw pmd_move_must_withdraw
> -typedef struct spinlock spinlock_t;
> -static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
> - spinlock_t *old_pmd_ptl)
> +struct spinlock;
> +static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
> + struct spinlock *old_pmd_ptl)
> {
> /*
> * Archs like ppc64 use pgtable to store per pmd
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include <linux/init.h>
2014-01-28 3:13 ` Benjamin Herrenschmidt
@ 2014-01-28 16:21 ` Paul Gortmaker
0 siblings, 0 replies; 16+ messages in thread
From: Paul Gortmaker @ 2014-01-28 16:21 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-arch, Stephen Rothwell, linux-m68k, x86, linux-ia64, kvm,
linux-mips, linux-s390, rusty, linux-kernel, linuxppc-dev,
linux-alpha, gregkh, netdev, sparclinux, akpm, torvalds,
linux-arm-kernel
On 14-01-27 10:13 PM, Benjamin Herrenschmidt wrote:
> On Wed, 2014-01-22 at 19:38 -0500, Paul Gortmaker wrote:
>
>> Thanks, it was a great help as it uncovered a few issues in fringe arch
>> that I didn't have toolchains for, and I've fixed all of those up.
>>
>> I've noticed that powerpc has been un-buildable for a while now; I have
>> used this hack patch locally so I could run the ppc defconfigs to check
>> that I didn't break anything. Maybe useful for linux-next in the
>> interim? It is a hack patch -- Not-Signed-off-by: Paul Gortmaker. :)
>
> Can you and/or Aneesh submit that as a proper patch (with S-O-B
> etc...) ?
I'd updated toolchains and didn't realize it was still broken. Patch sent.
http://patchwork.ozlabs.org/patch/314749/
Paul.
--
>
> Thanks !
>
> Cheers,
> Ben.
>
>> Paul.
>> --
>>
>> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
>> index d27960c89a71..d0f070a2b395 100644
>> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
>> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
>> @@ -560,9 +560,9 @@ extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
>> pmd_t *pmdp);
>>
>> #define pmd_move_must_withdraw pmd_move_must_withdraw
>> -typedef struct spinlock spinlock_t;
>> -static inline int pmd_move_must_withdraw(spinlock_t *new_pmd_ptl,
>> - spinlock_t *old_pmd_ptl)
>> +struct spinlock;
>> +static inline int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
>> + struct spinlock *old_pmd_ptl)
>> {
>> /*
>> * Archs like ppc64 use pgtable to store per pmd
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread