All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert E. Cochran" <ppc@mindchasers.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/mm: Fix page table dump build on non-Book3S
Date: Sun, 5 Mar 2017 23:38:54 -0500	[thread overview]
Message-ID: <e0d44bac-65ff-fca4-437c-42872eff8842@mindchasers.com> (raw)
In-Reply-To: <1480582800-28597-1-git-send-email-mpe@ellerman.id.au>

On 12/01/2016 04:00 AM, Michael Ellerman wrote:
> In the recent commit 1515ab932156 ("powerpc/mm: Dump hash table") we
> added code to dump the hage page table. Currently this can be selected
> to build on any platform. However it breaks the build if we're building
> for a non-Book3S platform, because none of the hash page table related
> defines and so on exist. So restrict it to building only on Book3S.
>
> Similarly in commit 8eb07b187000 ("powerpc/mm: Dump linux pagetables")
> we added code to dump the Linux page tables, which uses some constants
> which are only defined on Book3S - so guard those with an #ifdef.


Hello,

I was just building the mainline 4.11-rc1 tonight on an NXP P1010 / 
e500v2 with CONFIG_PPC_PTDUMP set.

I received a bunch of errors from dump_linuxpagetables.c  (as you can 
see below).

I realize now that CONFIG_PPC_PTDUMP  isn't for the e500, but I thought 
someone might want to know that enabling it causes the build of an 
e500v2 to fail.

Bob

   CC      arch/powerpc/mm/dump_linuxpagetables.o
../arch/powerpc/mm/dump_linuxpagetables.c: In function 'walk_pagetables':
../arch/powerpc/mm/dump_linuxpagetables.c:369:10: error: 
'KERN_VIRT_START' undeclared (first use in this function)
    addr = KERN_VIRT_START + i * PGDIR_SIZE;
           ^~~~~~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:369:10: note: each undeclared 
identifier is reported only once for each function it appears in
../arch/powerpc/mm/dump_linuxpagetables.c: In function 'populate_markers':
../arch/powerpc/mm/dump_linuxpagetables.c:383:37: error: 'ISA_IO_BASE' 
undeclared (first use in this function)
   address_markers[3].start_address = ISA_IO_BASE;
                                      ^~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:384:37: error: 'ISA_IO_END' 
undeclared (first use in this function)
   address_markers[4].start_address = ISA_IO_END;
                                      ^~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:385:37: error: 'PHB_IO_BASE' 
undeclared (first use in this function)
   address_markers[5].start_address = PHB_IO_BASE;
                                      ^~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:386:37: error: 'PHB_IO_END' 
undeclared (first use in this function)
   address_markers[6].start_address = PHB_IO_END;
                                      ^~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:387:37: error: 'IOREMAP_BASE' 
undeclared (first use in this function)
   address_markers[7].start_address = IOREMAP_BASE;
                                      ^~~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:388:37: error: 'IOREMAP_END' 
undeclared (first use in this function)
   address_markers[8].start_address = IOREMAP_END;
                                      ^~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c:392:38: error: 'VMEMMAP_BASE' 
undeclared (first use in this function)
   address_markers[9].start_address =  VMEMMAP_BASE;
                                       ^~~~~~~~~~~~
../arch/powerpc/mm/dump_linuxpagetables.c: In function 'ptdump_show':
../arch/powerpc/mm/dump_linuxpagetables.c:400:20: error: 
'KERN_VIRT_START' undeclared (first use in this function)
    .start_address = KERN_VIRT_START,
                     ^~~~~~~~~~~~~~~
../scripts/Makefile.build:294: recipe for target 
'arch/powerpc/mm/dump_linuxpagetables.o' failed
make[2]: *** [arch/powerpc/mm/dump_linuxpagetables.o] Error 1
/build/linux/Makefile:1002: recipe for target 'arch/powerpc/mm' failed
make[1]: *** [arch/powerpc/mm] Error 2
make[1]: Leaving directory '/build/linux/build_p1010'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2




>
> Fixes: 1515ab932156 ("powerpc/mm: Dump hash table")
> Fixes: 8eb07b187000 ("powerpc/mm: Dump linux pagetables")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>   arch/powerpc/Kconfig.debug             | 4 ++++
>   arch/powerpc/mm/Makefile               | 4 ++--
>   arch/powerpc/mm/dump_linuxpagetables.c | 2 ++
>   3 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
> index 20cf770611ec..949258d412d0 100644
> --- a/arch/powerpc/Kconfig.debug
> +++ b/arch/powerpc/Kconfig.debug
> @@ -366,4 +366,8 @@ config PPC_PTDUMP
>   
>   	  If you are unsure, say N.
>   
> +config PPC_HTDUMP
> +	def_bool y
> +	depends on PPC_PTDUMP && PPC_BOOK3S
> +
>   endmenu
> diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
> index f4ffe1f68ce9..5784682d7b63 100644
> --- a/arch/powerpc/mm/Makefile
> +++ b/arch/powerpc/mm/Makefile
> @@ -42,5 +42,5 @@ obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
>   obj-$(CONFIG_HIGHMEM)		+= highmem.o
>   obj-$(CONFIG_PPC_COPRO_BASE)	+= copro_fault.o
>   obj-$(CONFIG_SPAPR_TCE_IOMMU)	+= mmu_context_iommu.o
> -obj-$(CONFIG_PPC_PTDUMP)	+= dump_linuxpagetables.o \
> -				   dump_hashpagetable.o
> +obj-$(CONFIG_PPC_PTDUMP)	+= dump_linuxpagetables.o
> +obj-$(CONFIG_PPC_HTDUMP)	+= dump_hashpagetable.o
> diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/dump_linuxpagetables.c
> index d242bc79ae64..49abaf4dc8e3 100644
> --- a/arch/powerpc/mm/dump_linuxpagetables.c
> +++ b/arch/powerpc/mm/dump_linuxpagetables.c
> @@ -159,6 +159,7 @@ static const struct flag_info flag_array[] = {
>   		.set	= "no cache",
>   		.clear	= "        ",
>   	}, {
> +#ifdef CONFIG_PPC_BOOK3S_64
>   		.mask	= H_PAGE_BUSY,
>   		.val	= H_PAGE_BUSY,
>   		.set	= "busy",
> @@ -183,6 +184,7 @@ static const struct flag_info flag_array[] = {
>   		.val	= H_PAGE_F_SECOND,
>   		.set	= "f_second",
>   	}, {
> +#endif
>   		.mask	= _PAGE_SPECIAL,
>   		.val	= _PAGE_SPECIAL,
>   		.set	= "special",

  parent reply	other threads:[~2017-03-06  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  9:00 [PATCH] powerpc/mm: Fix page table dump build on non-Book3S Michael Ellerman
2016-12-03 11:28 ` Michael Ellerman
2017-03-06  4:38 ` Robert E. Cochran [this message]
2017-03-06  9:28   ` [PATCH] " Michael Ellerman

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=e0d44bac-65ff-fca4-437c-42872eff8842@mindchasers.com \
    --to=ppc@mindchasers.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.