All of lore.kernel.org
 help / color / mirror / Atom feed
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: Build breakage from 'ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions'
Date: Mon, 25 Nov 2013 15:36:36 -0700	[thread overview]
Message-ID: <20131125223636.GA20822@obsidianresearch.com> (raw)

Hello Santosh,

Testing v3.13-rc1 I see build breakage from this patch:

commit ca5a45c06cd4764fb8510740f7fc550d9a0208d4
Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date:   Wed Jul 31 12:44:41 2013 -0400

    ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions
    
    Fix remainder types used when converting back and forth between
    physical and virtual addresses.
    
    Cc: Russell King <linux@arm.linux.org.uk>
    
    Acked-by: Nicolas Pitre <nico@linaro.org>
    Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>


In file included from /scratchl/jgg/3.13/linux/arch/arm/include/asm/page.h:163:0,
                 from /scratchl/jgg/3.13/linux/include/linux/mm_types.h:16,
                 from /scratchl/jgg/3.13/linux/include/linux/sched.h:24,
                 from /scratchl/jgg/3.13/linux/arch/arm/kernel/asm-offsets.c:13:
/scratchl/jgg/3.13/linux/arch/arm/include/asm/memory.h: In function '__virt_to_phys':
/scratchl/jgg/3.13/linux/arch/arm/include/asm/memory.h:244:40: error: 'PHYS_OFFSET' undeclared (first use in this function)
/scratchl/jgg/3.13/linux/arch/arm/include/asm/memory.h:244:40: note: each undeclared identifier is reported only once for each function it appears in
/scratchl/jgg/3.13/linux/arch/arm/include/asm/memory.h: In function '__phys_to_virt':
/scratchl/jgg/3.13/linux/arch/arm/include/asm/memory.h:249:13: error: 'PHYS_OFFSET' undeclared (first use in this function)

My config doesn't set CONFIG_ARM_PATCH_PHYS_VIRT, which means
PHYS_OFFSET is not defined at this point:

static inline phys_addr_t __virt_to_phys(unsigned long x)
{
        return (phys_addr_t)x - PAGE_OFFSET + PHYS_OFFSET;
}

The definition my config uses follows this path:

#ifndef PHYS_OFFSET
#ifdef PLAT_PHYS_OFFSET
#define PHYS_OFFSET     PLAT_PHYS_OFFSET
#else
#define PHYS_OFFSET     UL(CONFIG_PHYS_OFFSET)
#endif
#endif

Which is after your new inlines..

An elegant fix wasn't obvious to me :)

Regards,
Jason

             reply	other threads:[~2013-11-25 22:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 22:36 Jason Gunthorpe [this message]
2013-11-25 23:20 ` Build breakage from 'ARM: mm: use phys_addr_t appropriately in p2v and v2p conversions' Russell King - ARM Linux
2013-11-25 23:34   ` Jason Gunthorpe
2013-11-25 23:39     ` Russell King - ARM Linux
2013-11-25 23:48       ` Santosh Shilimkar
2013-11-25 23:36   ` Russell King - ARM Linux
2013-11-26  3:56     ` Nicolas Pitre
2013-11-26  9:54       ` Russell King - ARM Linux
2013-11-26 13:35         ` Nicolas Pitre
2013-11-26 13:41           ` Russell King - ARM Linux
2013-11-26 17:26             ` Nicolas Pitre
2013-11-26 17:36               ` Russell King - ARM Linux
2013-11-26 18:41                 ` Nicolas Pitre
2013-11-26 19:25                   ` Russell King - ARM Linux
2013-11-26 20:08                     ` Nicolas Pitre
2013-12-10 19:17     ` Jason Gunthorpe
2013-12-10 19:43       ` Russell King - ARM Linux

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=20131125223636.GA20822@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.