Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1205653 > unrolled thread
| Started by | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| First post | 2015-08-12 09:20 +0200 |
| Last post | 2015-08-13 02:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] m68k/coldfire: use PFN_DOWN macro Alexander Kuleshov <kuleshovmail@gmail.com> - 2015-08-12 09:20 +0200
Re: [PATCH v2] m68k/coldfire: use PFN_DOWN macro Greg Ungerer <gerg@uclinux.org> - 2015-08-13 02:30 +0200
| From | Alexander Kuleshov <kuleshovmail@gmail.com> |
|---|---|
| Date | 2015-08-12 09:20 +0200 |
| Subject | [PATCH v2] m68k/coldfire: use PFN_DOWN macro |
| Message-ID | <pWyuo-5LM-53@gated-at.bofh.it> |
Replace ((x) >> PAGE_SHIFT) with the predefined PFN_DOWN macro. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> --- arch/m68k/coldfire/m54xx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/m68k/coldfire/m54xx.c b/arch/m68k/coldfire/m54xx.c index 075aaab..f7836c6 100644 --- a/arch/m68k/coldfire/m54xx.c +++ b/arch/m68k/coldfire/m54xx.c @@ -25,6 +25,7 @@ #include <asm/m54xxgpt.h> #ifdef CONFIG_MMU #include <asm/mmu_context.h> +#include <linux/pfn.h> #endif /***************************************************************************/ @@ -91,13 +92,13 @@ static void __init mcf54xx_bootmem_alloc(void) m68k_memory[0].size = _ramend - _rambase; /* compute total pages in system */ - num_pages = (_ramend - _rambase) >> PAGE_SHIFT; + num_pages = PFN_DOWN(_ramend - _rambase); /* page numbers */ memstart = PAGE_ALIGN(_ramstart); - min_low_pfn = _rambase >> PAGE_SHIFT; - start_pfn = memstart >> PAGE_SHIFT; - max_low_pfn = _ramend >> PAGE_SHIFT; + min_low_pfn = PFN_DOWN(_rambase); + start_pfn = PFN_DOWN(memstart); + max_low_pfn = PFN_DOWN(_ramend); high_memory = (void *)_ramend; m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6; -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg Ungerer <gerg@uclinux.org> |
|---|---|
| Date | 2015-08-13 02:30 +0200 |
| Message-ID | <pWOz8-3Go-11@gated-at.bofh.it> |
| In reply to | #1205653 |
Hi Alexander, On 12/08/15 17:14, Alexander Kuleshov wrote: > Replace ((x) >> PAGE_SHIFT) with the predefined PFN_DOWN macro. > > Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> This one looks good. Applied to m68knommu git tree (for-next branch). Thanks Greg > --- > arch/m68k/coldfire/m54xx.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/arch/m68k/coldfire/m54xx.c b/arch/m68k/coldfire/m54xx.c > index 075aaab..f7836c6 100644 > --- a/arch/m68k/coldfire/m54xx.c > +++ b/arch/m68k/coldfire/m54xx.c > @@ -25,6 +25,7 @@ > #include <asm/m54xxgpt.h> > #ifdef CONFIG_MMU > #include <asm/mmu_context.h> > +#include <linux/pfn.h> > #endif > > /***************************************************************************/ > @@ -91,13 +92,13 @@ static void __init mcf54xx_bootmem_alloc(void) > m68k_memory[0].size = _ramend - _rambase; > > /* compute total pages in system */ > - num_pages = (_ramend - _rambase) >> PAGE_SHIFT; > + num_pages = PFN_DOWN(_ramend - _rambase); > > /* page numbers */ > memstart = PAGE_ALIGN(_ramstart); > - min_low_pfn = _rambase >> PAGE_SHIFT; > - start_pfn = memstart >> PAGE_SHIFT; > - max_low_pfn = _ramend >> PAGE_SHIFT; > + min_low_pfn = PFN_DOWN(_rambase); > + start_pfn = PFN_DOWN(memstart); > + max_low_pfn = PFN_DOWN(_ramend); > high_memory = (void *)_ramend; > > m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web