* [PATCH] csky: use generic free_initrd_mem()
@ 2019-08-28 13:35 Mike Rapoport
2019-08-28 14:12 ` Guo Ren
0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2019-08-28 13:35 UTC (permalink / raw)
To: Guo Ren; +Cc: linux-csky, linux-kernel, Mike Rapoport
The csky implementation of free_initrd_mem() is an open-coded version of
free_reserved_area() without poisoning.
Remove it and make csky use the generic version of free_initrd_mem().
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
arch/csky/mm/init.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
index eb0dc9e..d4c2292 100644
--- a/arch/csky/mm/init.c
+++ b/arch/csky/mm/init.c
@@ -60,22 +60,6 @@ void __init mem_init(void)
mem_init_print_info(NULL);
}
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
- if (start < end)
- pr_info("Freeing initrd memory: %ldk freed\n",
- (end - start) >> 10);
-
- for (; start < end; start += PAGE_SIZE) {
- ClearPageReserved(virt_to_page(start));
- init_page_count(virt_to_page(start));
- free_page(start);
- totalram_pages_inc();
- }
-}
-#endif
-
extern char __init_begin[], __init_end[];
void free_initmem(void)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] csky: use generic free_initrd_mem()
2019-08-28 13:35 [PATCH] csky: use generic free_initrd_mem() Mike Rapoport
@ 2019-08-28 14:12 ` Guo Ren
2019-08-28 14:39 ` Mike Rapoport
0 siblings, 1 reply; 4+ messages in thread
From: Guo Ren @ 2019-08-28 14:12 UTC (permalink / raw)
To: Mike Rapoport; +Cc: linux-csky, Linux Kernel Mailing List
Acked-by: Guo Ren <guoren@kernel.org>
On Wed, Aug 28, 2019 at 9:35 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
>
> The csky implementation of free_initrd_mem() is an open-coded version of
> free_reserved_area() without poisoning.
>
> Remove it and make csky use the generic version of free_initrd_mem().
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> arch/csky/mm/init.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
> index eb0dc9e..d4c2292 100644
> --- a/arch/csky/mm/init.c
> +++ b/arch/csky/mm/init.c
> @@ -60,22 +60,6 @@ void __init mem_init(void)
> mem_init_print_info(NULL);
> }
>
> -#ifdef CONFIG_BLK_DEV_INITRD
> -void free_initrd_mem(unsigned long start, unsigned long end)
> -{
> - if (start < end)
> - pr_info("Freeing initrd memory: %ldk freed\n",
> - (end - start) >> 10);
> -
> - for (; start < end; start += PAGE_SIZE) {
> - ClearPageReserved(virt_to_page(start));
> - init_page_count(virt_to_page(start));
> - free_page(start);
> - totalram_pages_inc();
> - }
> -}
> -#endif
> -
> extern char __init_begin[], __init_end[];
>
> void free_initmem(void)
> --
> 2.7.4
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] csky: use generic free_initrd_mem()
2019-08-28 14:12 ` Guo Ren
@ 2019-08-28 14:39 ` Mike Rapoport
2019-08-28 16:08 ` Guo Ren
0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2019-08-28 14:39 UTC (permalink / raw)
To: Guo Ren; +Cc: linux-csky, Linux Kernel Mailing List
Hi,
On Wed, Aug 28, 2019 at 10:12:52PM +0800, Guo Ren wrote:
> Acked-by: Guo Ren <guoren@kernel.org>
Do you mind taking it via csky tree?
> On Wed, Aug 28, 2019 at 9:35 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
> >
> > The csky implementation of free_initrd_mem() is an open-coded version of
> > free_reserved_area() without poisoning.
> >
> > Remove it and make csky use the generic version of free_initrd_mem().
> >
> > Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> > ---
> > arch/csky/mm/init.c | 16 ----------------
> > 1 file changed, 16 deletions(-)
> >
> > diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
> > index eb0dc9e..d4c2292 100644
> > --- a/arch/csky/mm/init.c
> > +++ b/arch/csky/mm/init.c
> > @@ -60,22 +60,6 @@ void __init mem_init(void)
> > mem_init_print_info(NULL);
> > }
> >
> > -#ifdef CONFIG_BLK_DEV_INITRD
> > -void free_initrd_mem(unsigned long start, unsigned long end)
> > -{
> > - if (start < end)
> > - pr_info("Freeing initrd memory: %ldk freed\n",
> > - (end - start) >> 10);
> > -
> > - for (; start < end; start += PAGE_SIZE) {
> > - ClearPageReserved(virt_to_page(start));
> > - init_page_count(virt_to_page(start));
> > - free_page(start);
> > - totalram_pages_inc();
> > - }
> > -}
> > -#endif
> > -
> > extern char __init_begin[], __init_end[];
> >
> > void free_initmem(void)
> > --
> > 2.7.4
> >
>
>
> --
> Best Regards
> Guo Ren
>
> ML: https://lore.kernel.org/linux-csky/
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] csky: use generic free_initrd_mem()
2019-08-28 14:39 ` Mike Rapoport
@ 2019-08-28 16:08 ` Guo Ren
0 siblings, 0 replies; 4+ messages in thread
From: Guo Ren @ 2019-08-28 16:08 UTC (permalink / raw)
To: Mike Rapoport; +Cc: linux-csky, Linux Kernel Mailing List
Sure, no problem.
On Wed, Aug 28, 2019 at 10:39 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
>
> Hi,
>
> On Wed, Aug 28, 2019 at 10:12:52PM +0800, Guo Ren wrote:
> > Acked-by: Guo Ren <guoren@kernel.org>
>
> Do you mind taking it via csky tree?
>
> > On Wed, Aug 28, 2019 at 9:35 PM Mike Rapoport <rppt@linux.ibm.com> wrote:
> > >
> > > The csky implementation of free_initrd_mem() is an open-coded version of
> > > free_reserved_area() without poisoning.
> > >
> > > Remove it and make csky use the generic version of free_initrd_mem().
> > >
> > > Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> > > ---
> > > arch/csky/mm/init.c | 16 ----------------
> > > 1 file changed, 16 deletions(-)
> > >
> > > diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c
> > > index eb0dc9e..d4c2292 100644
> > > --- a/arch/csky/mm/init.c
> > > +++ b/arch/csky/mm/init.c
> > > @@ -60,22 +60,6 @@ void __init mem_init(void)
> > > mem_init_print_info(NULL);
> > > }
> > >
> > > -#ifdef CONFIG_BLK_DEV_INITRD
> > > -void free_initrd_mem(unsigned long start, unsigned long end)
> > > -{
> > > - if (start < end)
> > > - pr_info("Freeing initrd memory: %ldk freed\n",
> > > - (end - start) >> 10);
> > > -
> > > - for (; start < end; start += PAGE_SIZE) {
> > > - ClearPageReserved(virt_to_page(start));
> > > - init_page_count(virt_to_page(start));
> > > - free_page(start);
> > > - totalram_pages_inc();
> > > - }
> > > -}
> > > -#endif
> > > -
> > > extern char __init_begin[], __init_end[];
> > >
> > > void free_initmem(void)
> > > --
> > > 2.7.4
> > >
> >
> >
> > --
> > Best Regards
> > Guo Ren
> >
> > ML: https://lore.kernel.org/linux-csky/
> >
>
> --
> Sincerely yours,
> Mike.
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-28 16:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 13:35 [PATCH] csky: use generic free_initrd_mem() Mike Rapoport
2019-08-28 14:12 ` Guo Ren
2019-08-28 14:39 ` Mike Rapoport
2019-08-28 16:08 ` Guo Ren
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).