linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Somlo <somlo@cmu.edu>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	arnd@arndb.de, lersek@redhat.com, ralf@linux-mips.org,
	rmk+kernel@arm.linux.org.uk, eric@anholt.net,
	hanjun.guo@linaro.org, zajec5@gmail.com, sudeep.holla@arm.com,
	agross@codeaurora.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	qemu-devel@nongnu.org, imammedo@redhat.com,
	peter.maydell@linaro.org, leif.lindholm@linaro.org,
	ard.biesheuvel@linaro.org, pbonzini@redhat.com,
	kraxel@redhat.com, ehabkost@redhat.com, luto@amacapital.net,
	stefanha@gmail.com, revol@free.fr, matt@codeblueprint.co.uk,
	rth@twiddle.net
Subject: [PATCH] firmware: fw_cfg register offsets on supported architectures only
Date: Mon, 22 Feb 2016 16:18:18 -0500	[thread overview]
Message-ID: <20160222211818.GJ16357@HEDWIG.INI.CMU.EDU> (raw)

Refrain from defining default fw_cfg register offsets on
unsupported architectures -- throw an error instead. If
QEMU were to add fw_cfg support on additional architectures,
we should add them to the FW_CFG_SYSFS depends statement in
drivers/firmware/Kconfig, and provide default values for
register offsets in drivers/firmware/qemu_fw_cfg.c at that
time.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
 drivers/firmware/qemu_fw_cfg.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index fedbff5..79f6b7b 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -109,9 +109,7 @@ static void fw_cfg_io_cleanup(void)
 #  define FW_CFG_CTRL_OFF 0x00
 #  define FW_CFG_DATA_OFF 0x01
 # else
-#  warning "QEMU FW_CFG may not be available on this architecture!"
-#  define FW_CFG_CTRL_OFF 0x00
-#  define FW_CFG_DATA_OFF 0x01
+#  error "QEMU FW_CFG not available on this architecture!"
 # endif
 #endif
 
-- 
2.4.3

             reply	other threads:[~2016-02-22 21:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 21:18 Gabriel Somlo [this message]
2016-02-23  5:08 ` [PATCH] firmware: fw_cfg register offsets on supported architectures only Michael S. Tsirkin

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=20160222211818.GJ16357@HEDWIG.INI.CMU.EDU \
    --to=somlo@cmu.edu \
    --cc=agross@codeaurora.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=ehabkost@redhat.com \
    --cc=eric@anholt.net \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanjun.guo@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=leif.lindholm@linaro.org \
    --cc=lersek@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mark.rutland@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=mst@redhat.com \
    --cc=pawel.moll@arm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ralf@linux-mips.org \
    --cc=revol@free.fr \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=robh+dt@kernel.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@gmail.com \
    --cc=sudeep.holla@arm.com \
    --cc=zajec5@gmail.com \
    /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).