All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 8/9] arm: Add RAMOOPS memory area
Date: Fri, 04 Dec 2015 14:30:34 +0100	[thread overview]
Message-ID: <7121603.NNX0sY4RtQ@adelgunde> (raw)
In-Reply-To: <20151204070740.GQ11966@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 2756 bytes --]

Hi,

On Friday 04 December 2015 08:07:40 Sascha Hauer wrote:
> On Wed, Dec 02, 2015 at 02:48:50PM +0100, Markus Pargmann wrote:
> > RAMOOPS is a driver that uses a reserved static memory region to store
> > the data from the last panic or boot. This helps to debug crashes at the
> > next boot while preserving the boot messages.
> > 
> > To guarantee a memory area that is not altered by barebox or the kernel,
> > this area is located at the end of the RAM right after barebox and
> > before the STACK. This ensures that changing barebox sizes do not
> > interfere with RAMOOPS.
> > 
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> >  arch/arm/cpu/start.c               |  6 ++++++
> >  arch/arm/include/asm/barebox-arm.h | 14 +++++++++++++-
> >  2 files changed, 19 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> > index 4ad64b61e86a..d03d1edfaf18 100644
> > --- a/arch/arm/cpu/start.c
> > +++ b/arch/arm/cpu/start.c
> > @@ -118,6 +118,12 @@ static inline unsigned long arm_mem_boarddata(unsigned long membase,
> >  	return mem;
> >  }
> >  
> > +unsigned long arm_mem_ramoops_get(void)
> > +{
> > +	return arm_mem_ramoops(0, arm_stack_top);
> > +}
> > +EXPORT_SYMBOL_GPL(arm_mem_ramoops_get);
> > +
> >  static int barebox_memory_areas_init(void)
> >  {
> >  	unsigned long start = arm_head_bottom;
> > diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
> > index da7717538b61..91f1747d2df4 100644
> > --- a/arch/arm/include/asm/barebox-arm.h
> > +++ b/arch/arm/include/asm/barebox-arm.h
> > @@ -122,11 +122,23 @@ static inline unsigned long arm_mem_early_malloc_end(unsigned long membase,
> >  	return arm_mem_ttb(membase, endmem);
> >  }
> >  
> > +static inline unsigned long arm_mem_ramoops(unsigned long membase,
> > +					    unsigned long endmem)
> > +{
> > +	endmem = arm_mem_ttb(membase, endmem);
> > +#ifdef CONFIG_FS_PSTORE_RAMOOPS
> > +	endmem -= CONFIG_FS_PSTORE_RAMOOPS_SIZE;
> > +	endmem &= ~(SZ_4K - 1); /* Align to 4K */
> > +#endif
> 
> if (IS_ENABLED(CONFIG_FS_PSTORE_RAMOOPS)) please

This doesn't work here. If CONFIG_FS_PSTORE_RAMOOPS is not defined,
CONFIG_FS_PSTORE_RAMOOPS_SIZE is undefined as well and compiling fails.

Is there any macro I should use for _SIZE here or any Kconfig setup that is
preferred for this situation?

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-12-04 13:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 13:48 [PATCH 0/9] RAMOOPS read support for Barebox Markus Pargmann
2015-12-02 13:48 ` [PATCH 1/9] arm: boards: karo-tx6x remove definition of DIV_ROUND_UP Markus Pargmann
2015-12-02 13:48 ` [PATCH 2/9] log2: Add missing __rounddown_pow_of_two() Markus Pargmann
2015-12-02 13:48 ` [PATCH 3/9] printk: Add missing include/declaration Markus Pargmann
2015-12-02 13:48 ` [PATCH 4/9] vsprintf: Add scnprintf from kernel Markus Pargmann
2015-12-02 13:48 ` [PATCH 5/9] lib: Import reed solomon code " Markus Pargmann
2015-12-04  7:12   ` Sascha Hauer
2015-12-04 13:22     ` Markus Pargmann
2015-12-02 13:48 ` [PATCH 6/9] arm: Clarify memory layout calculation Markus Pargmann
2015-12-04  7:09   ` Sascha Hauer
2015-12-02 13:48 ` [PATCH 7/9] arm: start: Add visible sdram region for barebox board data Markus Pargmann
2015-12-02 13:48 ` [PATCH 8/9] arm: Add RAMOOPS memory area Markus Pargmann
2015-12-04  7:07   ` Sascha Hauer
2015-12-04 13:30     ` Markus Pargmann [this message]
2015-12-07  9:15       ` Sascha Hauer
2015-12-02 13:48 ` [PATCH 9/9] fs: Add pstore filesystem Markus Pargmann
2015-12-02 18:37   ` Antony Pavlov
2015-12-04 13:10     ` Markus Pargmann

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=7121603.NNX0sY4RtQ@adelgunde \
    --to=mpa@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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 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.