public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc+uboot@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] sunxi: Enable CONFIG_SPL_STACK_R
Date: Sun, 13 Sep 2015 19:50:00 +0100	[thread overview]
Message-ID: <1442170200.24382.126.camel@hellion.org.uk> (raw)
In-Reply-To: <55F5A683.5000505@redhat.com>

On Sun, 2015-09-13 at 18:38 +0200, Hans de Goede wrote:
> Hi,
> 
> On 13-09-15 18:33, Ian Campbell wrote:
> > On Sun, 2015-09-13 at 17:42 +0200, Hans de Goede wrote:
> >> index 7c1507b..6aa1bf2 100644
> >> --- a/include/configs/sunxi-common.h
> >> +++ b/include/configs/sunxi-common.h
> >> @@ -73,6 +73,9 @@
> >>   #define CONFIG_SYS_LOAD_ADDR		0x22000000 /*
> default
> >> load address */
> >>   #define CONFIG_SYS_TEXT_BASE		0x2a000000
> >>   #define CONFIG_PRE_CON_BUF_ADDR		0x2f000000
> >> +/* Note this is primarily set through Kconfig, we redefine it
> here so that
> >> + * we get warnings if the Kconfig value mismatches. */
> >
> > Mismatches with what? Why can't we just use the Kconfig supplied
> value
> > throughout?
> 
> Mismatches with the value defined here in sunxi-common.h, sunxi
> -common.h
> lists all other spl memory addresses right in this block, making it
> possible to quickly see what goes there. If someone ever decides to
> tweak
> the layout, then they will likely forget the single value which is
> set
> in the defconfig-s, but they will (presumably) update the copy in
> sunxi-common.h, as that is sitting there right next to the others.
> 
> If this happens then the compiler will give a warning (for each C
> -file)
> that CONFIG_SPL_STACK_R_ADDR is being redefined.
> 
> So functionality wise this does nothing, leaving it out will result
> in an identical build. It is just there to help us poor humans to
> not forger to update the value in the defconfig files if we ever
> decide to tweak the SPL memory layout.

Got it, in which case I would drop the "primarily" from the comment,
since that suggests it is defined "secondarily" here, when really it is
just for documentation (with a clever trick to stop the docs getting
out of date).

Maybe even:

/* Note SPL_STACK_R_ADDR is set through Kconfig, we include it here 
 * since it needs to fit in with the other values. By also #defining it
 * we get warnings if the Kconfig value mismatches. */

???

(And presumably this all gets less mad as more and more stuff moves to
Kconfig...)

Ian.

  reply	other threads:[~2015-09-13 18:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 15:42 [U-Boot] [PATCH 0/7] malloc_simple: Add support for switching to DRAM heap Hans de Goede
2015-09-13 15:42 ` [U-Boot] [PATCH 1/7] spl: spl_relocate_stack_gd: Do not unnecessarily clear bss Hans de Goede
2015-09-22  4:00   ` Simon Glass
2015-09-13 15:42 ` [U-Boot] [PATCH 2/7] malloc_simple: Fix malloc_ptr calculation Hans de Goede
2015-09-22  4:00   ` Simon Glass
2015-09-13 15:42 ` [U-Boot] [PATCH 3/7] malloc_simple: Add Kconfig option for using only malloc_simple in the SPL Hans de Goede
2015-09-22  4:00   ` Simon Glass
2015-09-22  9:38     ` Hans de Goede
2015-09-13 15:42 ` [U-Boot] [PATCH 4/7] malloc_simple: Add support for switching to DRAM heap Hans de Goede
2015-09-22  4:00   ` Simon Glass
2015-09-22  9:52     ` Hans de Goede
2015-09-13 15:42 ` [U-Boot] [PATCH 5/7] sunxi: Simplify spl board_init_f function Hans de Goede
2015-09-13 16:27   ` Ian Campbell
2015-09-13 15:42 ` [U-Boot] [PATCH 6/7] sunxi: Enable CONFIG_SPL_STACK_R Hans de Goede
2015-09-13 16:33   ` Ian Campbell
2015-09-13 16:38     ` Hans de Goede
2015-09-13 18:50       ` Ian Campbell [this message]
2015-09-13 18:51         ` Hans de Goede
2015-09-14  6:00           ` Ian Campbell
2015-09-13 15:42 ` [U-Boot] [PATCH 7/7] sunxi: Switch to using malloc_simple for the spl Hans de Goede
2015-09-13 16:33   ` Ian Campbell

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=1442170200.24382.126.camel@hellion.org.uk \
    --to=ijc+uboot@hellion.org.uk \
    --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