* [PATCH] arm64/mm: use phys_addr_t @ 2017-01-13 5:59 miles.chen 2017-01-13 11:18 ` Catalin Marinas 2017-01-13 11:22 ` Mark Rutland 0 siblings, 2 replies; 6+ messages in thread From: miles.chen @ 2017-01-13 5:59 UTC (permalink / raw) To: catalin.marinas, will.deacon Cc: linux-arm-kernel, linux-kernel, wsd_upstream, Miles Chen From: Miles Chen <miles.chen@mediatek.com> Use phys_addr_t instead of unsigned long for the return value of __pa(), make code easy to understand. Signed-off-by: Miles Chen <miles.chen@mediatek.com> --- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 17243e4..7eb7c21 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) { - unsigned long kernel_start = __pa(_text); - unsigned long kernel_end = __pa(__init_begin); + phys_addr_t kernel_start = __pa(_text); + phys_addr_t kernel_end = __pa(__init_begin); /* * Take care not to create a writable alias for the -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/mm: use phys_addr_t 2017-01-13 5:59 [PATCH] arm64/mm: use phys_addr_t miles.chen @ 2017-01-13 11:18 ` Catalin Marinas 2017-01-13 11:22 ` Mark Rutland 1 sibling, 0 replies; 6+ messages in thread From: Catalin Marinas @ 2017-01-13 11:18 UTC (permalink / raw) To: miles.chen; +Cc: will.deacon, linux-kernel, linux-arm-kernel, wsd_upstream On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: > From: Miles Chen <miles.chen@mediatek.com> > > Use phys_addr_t instead of unsigned long for the > return value of __pa(), make code easy to understand. > > Signed-off-by: Miles Chen <miles.chen@mediatek.com> > --- > arch/arm64/mm/mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 17243e4..7eb7c21 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, > > static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) > { > - unsigned long kernel_start = __pa(_text); > - unsigned long kernel_end = __pa(__init_begin); > + phys_addr_t kernel_start = __pa(_text); > + phys_addr_t kernel_end = __pa(__init_begin); Looks fine. Acked-by: Catalin Marinas <catalin.marinas@arm.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64/mm: use phys_addr_t 2017-01-13 5:59 [PATCH] arm64/mm: use phys_addr_t miles.chen 2017-01-13 11:18 ` Catalin Marinas @ 2017-01-13 11:22 ` Mark Rutland 2017-01-13 11:27 ` Ard Biesheuvel 1 sibling, 1 reply; 6+ messages in thread From: Mark Rutland @ 2017-01-13 11:22 UTC (permalink / raw) To: miles.chen Cc: catalin.marinas, will.deacon, linux-kernel, linux-arm-kernel, wsd_upstream On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: > From: Miles Chen <miles.chen@mediatek.com> > > Use phys_addr_t instead of unsigned long for the > return value of __pa(), make code easy to understand. > > Signed-off-by: Miles Chen <miles.chen@mediatek.com> This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as. Acked-by: Mark Rutland <mark.rutland@arm.com> Thanks, Mark. > --- > arch/arm64/mm/mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 17243e4..7eb7c21 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, > > static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) > { > - unsigned long kernel_start = __pa(_text); > - unsigned long kernel_end = __pa(__init_begin); > + phys_addr_t kernel_start = __pa(_text); > + phys_addr_t kernel_end = __pa(__init_begin); > > /* > * Take care not to create a writable alias for the > -- > 1.9.1 > > > _______________________________________________ > 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] 6+ messages in thread
* Re: [PATCH] arm64/mm: use phys_addr_t 2017-01-13 11:22 ` Mark Rutland @ 2017-01-13 11:27 ` Ard Biesheuvel 2017-01-13 11:45 ` Mark Rutland 0 siblings, 1 reply; 6+ messages in thread From: Ard Biesheuvel @ 2017-01-13 11:27 UTC (permalink / raw) To: Mark Rutland Cc: miles.chen, Catalin Marinas, Will Deacon, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream On 13 January 2017 at 11:22, Mark Rutland <mark.rutland@arm.com> wrote: > On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: >> From: Miles Chen <miles.chen@mediatek.com> >> >> Use phys_addr_t instead of unsigned long for the >> return value of __pa(), make code easy to understand. >> >> Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > This looks sensible to me. It's consistent with the types these > variables are compared against, and with the types of function > parameters these are passed as. > Indeed. But doesn't it clash with Laura's series? > Acked-by: Mark Rutland <mark.rutland@arm.com> > > Thanks, > Mark. > >> --- >> arch/arm64/mm/mmu.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c >> index 17243e4..7eb7c21 100644 >> --- a/arch/arm64/mm/mmu.c >> +++ b/arch/arm64/mm/mmu.c >> @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, >> >> static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) >> { >> - unsigned long kernel_start = __pa(_text); >> - unsigned long kernel_end = __pa(__init_begin); >> + phys_addr_t kernel_start = __pa(_text); >> + phys_addr_t kernel_end = __pa(__init_begin); >> >> /* >> * Take care not to create a writable alias for the >> -- >> 1.9.1 >> >> >> _______________________________________________ >> 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] 6+ messages in thread
* Re: [PATCH] arm64/mm: use phys_addr_t 2017-01-13 11:27 ` Ard Biesheuvel @ 2017-01-13 11:45 ` Mark Rutland 2017-01-13 12:06 ` Will Deacon 0 siblings, 1 reply; 6+ messages in thread From: Mark Rutland @ 2017-01-13 11:45 UTC (permalink / raw) To: Ard Biesheuvel Cc: miles.chen, Catalin Marinas, Will Deacon, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream On Fri, Jan 13, 2017 at 11:27:48AM +0000, Ard Biesheuvel wrote: > On 13 January 2017 at 11:22, Mark Rutland <mark.rutland@arm.com> wrote: > > On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: > >> From: Miles Chen <miles.chen@mediatek.com> > >> > >> Use phys_addr_t instead of unsigned long for the > >> return value of __pa(), make code easy to understand. > >> > >> Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > > > This looks sensible to me. It's consistent with the types these > > variables are compared against, and with the types of function > > parameters these are passed as. > > > > Indeed. But doesn't it clash with Laura's series? Good point. Yes, but only for the RHS of the assignment changing. This'll need to be rebased atop of the arm64 for-next/core branch, or Catalin/Will might fix it up when applying, perhaps? Thanks, Mark. > > Acked-by: Mark Rutland <mark.rutland@arm.com> > > > > Thanks, > > Mark. > > > >> --- > >> arch/arm64/mm/mmu.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > >> index 17243e4..7eb7c21 100644 > >> --- a/arch/arm64/mm/mmu.c > >> +++ b/arch/arm64/mm/mmu.c > >> @@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, > >> > >> static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end) > >> { > >> - unsigned long kernel_start = __pa(_text); > >> - unsigned long kernel_end = __pa(__init_begin); > >> + phys_addr_t kernel_start = __pa(_text); > >> + phys_addr_t kernel_end = __pa(__init_begin); > >> > >> /* > >> * Take care not to create a writable alias for the > >> -- > >> 1.9.1 > >> > >> > >> _______________________________________________ > >> 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] 6+ messages in thread
* Re: [PATCH] arm64/mm: use phys_addr_t 2017-01-13 11:45 ` Mark Rutland @ 2017-01-13 12:06 ` Will Deacon 0 siblings, 0 replies; 6+ messages in thread From: Will Deacon @ 2017-01-13 12:06 UTC (permalink / raw) To: Mark Rutland Cc: Ard Biesheuvel, miles.chen, Catalin Marinas, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream On Fri, Jan 13, 2017 at 11:45:54AM +0000, Mark Rutland wrote: > On Fri, Jan 13, 2017 at 11:27:48AM +0000, Ard Biesheuvel wrote: > > On 13 January 2017 at 11:22, Mark Rutland <mark.rutland@arm.com> wrote: > > > On Fri, Jan 13, 2017 at 01:59:35PM +0800, miles.chen@mediatek.com wrote: > > >> From: Miles Chen <miles.chen@mediatek.com> > > >> > > >> Use phys_addr_t instead of unsigned long for the > > >> return value of __pa(), make code easy to understand. > > >> > > >> Signed-off-by: Miles Chen <miles.chen@mediatek.com> > > > > > > This looks sensible to me. It's consistent with the types these > > > variables are compared against, and with the types of function > > > parameters these are passed as. > > > > > > > Indeed. But doesn't it clash with Laura's series? > > Good point. > > Yes, but only for the RHS of the assignment changing. This'll need to be > rebased atop of the arm64 for-next/core branch, or Catalin/Will might > fix it up when applying, perhaps? Yeah, it's dead easy for me to fix up. Will ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-13 12:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-13 5:59 [PATCH] arm64/mm: use phys_addr_t miles.chen 2017-01-13 11:18 ` Catalin Marinas 2017-01-13 11:22 ` Mark Rutland 2017-01-13 11:27 ` Ard Biesheuvel 2017-01-13 11:45 ` Mark Rutland 2017-01-13 12:06 ` Will Deacon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox