* [PATCH] arm64: Remove asm/memblock.h
@ 2019-01-14 14:22 Will Deacon
2019-01-14 15:29 ` Mark Rutland
2019-01-21 17:32 ` Catalin Marinas
0 siblings, 2 replies; 3+ messages in thread
From: Will Deacon @ 2019-01-14 14:22 UTC (permalink / raw)
To: catalin.marinas; +Cc: Will Deacon, linux-arm-kernel
The arm64 asm/memblock.h header exists only to provide a function
prototype for arm64_memblock_init(), which is called only from
setup_arch().
Move the declaration into mmu.h, where it can live alongside other
init functions such as paging_init() and bootmem_init() without the
need for its own special header file.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm64/include/asm/memblock.h | 21 ---------------------
arch/arm64/include/asm/mmu.h | 1 +
arch/arm64/kernel/setup.c | 1 -
arch/arm64/mm/mmu.c | 1 -
4 files changed, 1 insertion(+), 23 deletions(-)
delete mode 100644 arch/arm64/include/asm/memblock.h
diff --git a/arch/arm64/include/asm/memblock.h b/arch/arm64/include/asm/memblock.h
deleted file mode 100644
index 6afeed2467f1..000000000000
--- a/arch/arm64/include/asm/memblock.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2012 ARM Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __ASM_MEMBLOCK_H
-#define __ASM_MEMBLOCK_H
-
-extern void arm64_memblock_init(void);
-
-#endif
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 7689c7aa1d77..43596b1a5897 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -85,6 +85,7 @@ static inline struct bp_hardening_data *arm64_get_bp_hardening_data(void)
static inline void arm64_apply_bp_hardening(void) { }
#endif /* CONFIG_HARDEN_BRANCH_PREDICTOR */
+extern void arm64_memblock_init(void);
extern void paging_init(void);
extern void bootmem_init(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 4b0e1231625c..71f5fbb12608 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -58,7 +58,6 @@
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/traps.h>
-#include <asm/memblock.h>
#include <asm/efi.h>
#include <asm/xen/hypervisor.h>
#include <asm/mmu_context.h>
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index b6f5aa52ac67..d6b6f1b169bb 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -42,7 +42,6 @@
#include <asm/setup.h>
#include <asm/sizes.h>
#include <asm/tlb.h>
-#include <asm/memblock.h>
#include <asm/mmu_context.h>
#include <asm/ptdump.h>
#include <asm/tlbflush.h>
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: Remove asm/memblock.h
2019-01-14 14:22 [PATCH] arm64: Remove asm/memblock.h Will Deacon
@ 2019-01-14 15:29 ` Mark Rutland
2019-01-21 17:32 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2019-01-14 15:29 UTC (permalink / raw)
To: Will Deacon; +Cc: catalin.marinas, linux-arm-kernel
On Mon, Jan 14, 2019 at 02:22:24PM +0000, Will Deacon wrote:
> The arm64 asm/memblock.h header exists only to provide a function
> prototype for arm64_memblock_init(), which is called only from
> setup_arch().
>
> Move the declaration into mmu.h, where it can live alongside other
> init functions such as paging_init() and bootmem_init() without the
> need for its own special header file.
>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Seems legit.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
> ---
> arch/arm64/include/asm/memblock.h | 21 ---------------------
> arch/arm64/include/asm/mmu.h | 1 +
> arch/arm64/kernel/setup.c | 1 -
> arch/arm64/mm/mmu.c | 1 -
> 4 files changed, 1 insertion(+), 23 deletions(-)
> delete mode 100644 arch/arm64/include/asm/memblock.h
>
> diff --git a/arch/arm64/include/asm/memblock.h b/arch/arm64/include/asm/memblock.h
> deleted file mode 100644
> index 6afeed2467f1..000000000000
> --- a/arch/arm64/include/asm/memblock.h
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -/*
> - * Copyright (C) 2012 ARM Ltd.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program. If not, see <http://www.gnu.org/licenses/>.
> - */
> -#ifndef __ASM_MEMBLOCK_H
> -#define __ASM_MEMBLOCK_H
> -
> -extern void arm64_memblock_init(void);
> -
> -#endif
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index 7689c7aa1d77..43596b1a5897 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -85,6 +85,7 @@ static inline struct bp_hardening_data *arm64_get_bp_hardening_data(void)
> static inline void arm64_apply_bp_hardening(void) { }
> #endif /* CONFIG_HARDEN_BRANCH_PREDICTOR */
>
> +extern void arm64_memblock_init(void);
> extern void paging_init(void);
> extern void bootmem_init(void);
> extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index 4b0e1231625c..71f5fbb12608 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -58,7 +58,6 @@
> #include <asm/cacheflush.h>
> #include <asm/tlbflush.h>
> #include <asm/traps.h>
> -#include <asm/memblock.h>
> #include <asm/efi.h>
> #include <asm/xen/hypervisor.h>
> #include <asm/mmu_context.h>
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index b6f5aa52ac67..d6b6f1b169bb 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -42,7 +42,6 @@
> #include <asm/setup.h>
> #include <asm/sizes.h>
> #include <asm/tlb.h>
> -#include <asm/memblock.h>
> #include <asm/mmu_context.h>
> #include <asm/ptdump.h>
> #include <asm/tlbflush.h>
> --
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: Remove asm/memblock.h
2019-01-14 14:22 [PATCH] arm64: Remove asm/memblock.h Will Deacon
2019-01-14 15:29 ` Mark Rutland
@ 2019-01-21 17:32 ` Catalin Marinas
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2019-01-21 17:32 UTC (permalink / raw)
To: Will Deacon; +Cc: linux-arm-kernel
On Mon, Jan 14, 2019 at 02:22:24PM +0000, Will Deacon wrote:
> The arm64 asm/memblock.h header exists only to provide a function
> prototype for arm64_memblock_init(), which is called only from
> setup_arch().
>
> Move the declaration into mmu.h, where it can live alongside other
> init functions such as paging_init() and bootmem_init() without the
> need for its own special header file.
>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Queued for 5.1. Thanks.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-21 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 14:22 [PATCH] arm64: Remove asm/memblock.h Will Deacon
2019-01-14 15:29 ` Mark Rutland
2019-01-21 17:32 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).