All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: julien.grall@linaro.org, stefano.stabellini@eu.citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] xen: arm: more flexible scheme for specifying early printk device
Date: Thu, 12 Mar 2015 16:51:57 +0000	[thread overview]
Message-ID: <1426179117.32572.61.camel@citrix.com> (raw)
In-Reply-To: <20150312110356.GB22164@deinos.phlegethon.org>

On Thu, 2015-03-12 at 12:03 +0100, Tim Deegan wrote:
> At 14:11 +0000 on 11 Mar (1426079515), Ian Campbell wrote:
> > +EARLY_PRINTK_brcm           := 8250,0xF040AB00,2
> > +EARLY_PRINTK_dra7           := 8250,0x4806A000,2
> > +EARLY_PRINTK_fastmodel      := pl011,0x1c090000,115200
> > +EARLY_PRINTK_exynos5250     := exynos4210,0x12c20000
> > +EARLY_PRINTK_hip04-d01      := 8250,0xE4007000,2
> > +EARLY_PRINTK_juno           := pl011,0x7ff80000
> > +EARLY_PRINTK_lager          := scif,0xe6e60000
> > +EARLY_PRINTK_midway         := pl011,0xfff36000
> > +EARLY_PRINTK_omap5432       := 8250,0x48020000,2
> > +EARLY_PRINTK_seattle        := pl011,0xe1010000
> > +EARLY_PRINTK_sun6i          := 8250,0x01c28000,2
> > +EARLY_PRINTK_sun7i          := 8250,0x01c28000,2
> > +EARLY_PRINTK_thunderx       := pl011,0x87e024000000
> > +EARLY_PRINTK_vexpress       := pl011,0x1c090000
> > +EARLY_PRINTK_xgene-mcdivitt := 8250,0x1c021000,2
> > +EARLY_PRINTK_xgene-storm    := 8250,0x1c020000,2
> > +EARLY_PRINTK_zynqmp         := cadence,0xff000000
> > +
> > +COMMA := ,
> > +ifneq ($(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),)
> > +EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)))
> > +else
> > +EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(CONFIG_EARLY_PRINTK))
> > +endif
> 
> If you're respinning this, it might be neater as
> 
> CONFIG_EARLY_PRINTK := $(or $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)), $(CONFIG_EARLY_PRINTK)
> EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(CONFIG_EARLY_PRINTK))

I didn't know about $(or ...) (but I suppose I could have guessed it
existed, I wonder since when though).

In my early testing I found that 
	CONFIG_EARLY_PRINTK := $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK))
didn't do as I expected with CONFIG_EARLY_PRINTK on the make command
line, but it's possible I messed up the trial.

> Or maybe not, now that I've written it out. :) Either way is probably fine.

:-)

I could do:

EARLY_PRINTK_CFG := $(subst $(COMMA), ,$(or $(EARLY_PRINTK_$(CONFIG_EARLY_PRINTK)),
                                            $(CONFIG_EARLY_PRINTK)))

Not sure that's better either.

Ian.

  reply	other threads:[~2015-03-12 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 14:11 [PATCH 2/2] xen: arm: more flexible scheme for specifying early printk device Ian Campbell
2015-03-11 14:17 ` Ian Campbell
2015-03-11 14:19 ` Andrew Cooper
2015-03-11 14:40   ` Ian Campbell
2015-03-11 14:47 ` Julien Grall
2015-03-11 14:59   ` Ian Campbell
2015-03-20 12:28   ` Ian Campbell
2015-03-12 11:03 ` Tim Deegan
2015-03-12 16:51   ` Ian Campbell [this message]
2015-03-12 17:35     ` Tim Deegan

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=1426179117.32572.61.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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.