From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/mpc85xx: Fix DDR TLB mapping leftover
Date: Tue, 25 Nov 2014 19:39:32 -0600 [thread overview]
Message-ID: <1416965972.15957.169.camel@freescale.com> (raw)
In-Reply-To: <1416935096-29641-1-git-send-email-yorksun@freescale.com>
On Tue, 2014-11-25 at 09:04 -0800, York Sun wrote:
> Commit f29f804a93e87c17670607641d120f431a3b0633 generalized the TLB
> mapping function, but made the DDR mapping leftover size to zero,
> causing the message not printed.
>
> Signed-off-by: York Sun <yorksun@freescale.com>
> CC: Alexander Graf <agraf@suse.de>
> CC: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/cpu/mpc85xx/tlb.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
> index 129ec66..4f0f7d5 100644
> --- a/arch/powerpc/cpu/mpc85xx/tlb.c
> +++ b/arch/powerpc/cpu/mpc85xx/tlb.c
> @@ -299,12 +299,15 @@ unsigned int setup_ddr_tlbs_phys(phys_addr_t p_addr,
> {
> unsigned int ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE;
> u64 memsize = (u64)memsize_in_meg << 20;
> + u64 size;
>
> - memsize = min(memsize, CONFIG_MAX_MEM_MAPPED);
> - memsize = tlb_map_range(ram_tlb_address, p_addr, memsize, TLB_MAP_RAM);
> + size = min(memsize, CONFIG_MAX_MEM_MAPPED);
> + size = tlb_map_range(ram_tlb_address, p_addr, size, TLB_MAP_RAM);
>
> - if (memsize)
> - print_size(memsize, " left unmapped\n");
> + if ((size) || (memsize > CONFIG_MAX_MEM_MAPPED)) {
Unnecessary parentheses
-Scott
prev parent reply other threads:[~2014-11-26 1:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 17:04 [U-Boot] [PATCH] powerpc/mpc85xx: Fix DDR TLB mapping leftover York Sun
2014-11-26 1:39 ` Scott Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416965972.15957.169.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox