linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-arch@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	x86@kernel.org, Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	"H . Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Thierry Reding <treding@nvidia.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH -tip 2/4] arm: Cleanup in_exception_text() and move it in asm/sections.h
Date: Sun, 3 Sep 2017 23:21:52 +0100	[thread overview]
Message-ID: <20170903222152.GA25743@n2100.armlinux.org.uk> (raw)
In-Reply-To: <150295409062.14424.11976553130089631456.stgit@devbox>

On Thu, Aug 17, 2017 at 04:15:00PM +0900, Masami Hiramatsu wrote:
> Cleanup in_exception_text() using memory_contains() and
> move it in asm/sections.h from asm/trap.h because
> section symbols and memory_contains() are defined in
> asm/sections.h.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> ---
>  arch/arm/include/asm/sections.h |   17 +++++++++++++++++
>  arch/arm/include/asm/traps.h    |   22 +---------------------
>  2 files changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h
> index 803bbf2b20b8..76791cfc7619 100644
> --- a/arch/arm/include/asm/sections.h
> +++ b/arch/arm/include/asm/sections.h
> @@ -4,5 +4,22 @@
>  #include <asm-generic/sections.h>
>  
>  extern char _exiprom[];
> +extern char __exception_text_start[], __exception_text_end[];
> +
> +/**
> + * in_exception_text - check if an address is in exception_text or
> + *			irqentry_text
> + * @addr: virtual address to be checked
> + *
> + * Returns: true if the address specified by @addr is in the exception_text or
> + * irqentry_text, false otherwise.
> + */
> +static inline bool in_exception_text(unsigned long addr)
> +{
> +	return memory_contains(__exception_text_start, __exception_text_end,
> +			       (void *)addr, 0) ||
> +		memory_contains(__irqentry_text_start, __irqentry_text_end,
> +				(void *)addr, 0);

Patch looks buggy - where is __irqentry_text_start and __irqentry_text_end
declared?

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Thierry Reding <treding@nvidia.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	x86@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH -tip 2/4] arm: Cleanup in_exception_text() and move it in asm/sections.h
Date: Sun, 3 Sep 2017 23:21:52 +0100	[thread overview]
Message-ID: <20170903222152.GA25743@n2100.armlinux.org.uk> (raw)
Message-ID: <20170903222152.kquvTUkkoGipIEsuKTWJMGwWXBcMkiOeK7Orho61T4w@z> (raw)
In-Reply-To: <150295409062.14424.11976553130089631456.stgit@devbox>

On Thu, Aug 17, 2017 at 04:15:00PM +0900, Masami Hiramatsu wrote:
> Cleanup in_exception_text() using memory_contains() and
> move it in asm/sections.h from asm/trap.h because
> section symbols and memory_contains() are defined in
> asm/sections.h.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> ---
>  arch/arm/include/asm/sections.h |   17 +++++++++++++++++
>  arch/arm/include/asm/traps.h    |   22 +---------------------
>  2 files changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h
> index 803bbf2b20b8..76791cfc7619 100644
> --- a/arch/arm/include/asm/sections.h
> +++ b/arch/arm/include/asm/sections.h
> @@ -4,5 +4,22 @@
>  #include <asm-generic/sections.h>
>  
>  extern char _exiprom[];
> +extern char __exception_text_start[], __exception_text_end[];
> +
> +/**
> + * in_exception_text - check if an address is in exception_text or
> + *			irqentry_text
> + * @addr: virtual address to be checked
> + *
> + * Returns: true if the address specified by @addr is in the exception_text or
> + * irqentry_text, false otherwise.
> + */
> +static inline bool in_exception_text(unsigned long addr)
> +{
> +	return memory_contains(__exception_text_start, __exception_text_end,
> +			       (void *)addr, 0) ||
> +		memory_contains(__irqentry_text_start, __irqentry_text_end,
> +				(void *)addr, 0);

Patch looks buggy - where is __irqentry_text_start and __irqentry_text_end
declared?

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

  reply	other threads:[~2017-09-03 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  7:12 [PATCH -tip 0/4] Add section address checking helper Masami Hiramatsu
2017-08-17  7:12 ` Masami Hiramatsu
2017-08-17  7:13 ` [PATCH -tip 1/4] x86: Add in_entry_text() helper function Masami Hiramatsu
2017-08-17  7:15 ` [PATCH -tip 2/4] arm: Cleanup in_exception_text() and move it in asm/sections.h Masami Hiramatsu
2017-09-03 22:21   ` Russell King - ARM Linux [this message]
2017-09-03 22:21     ` Russell King - ARM Linux
2017-09-04 15:22     ` Masami Hiramatsu
2017-08-17  7:16 ` [PATCH -tip 3/4] arm64: " Masami Hiramatsu
2017-08-17  7:17 ` [PATCH -tip 4/4] extable: kallsyms: Add in_init_text() and in_core_text() helper Masami Hiramatsu
2017-08-17  7:17   ` Masami Hiramatsu

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=20170903222152.GA25743@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=treding@nvidia.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).