mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: fw_cfg register offsets on supported architectures only
@ 2016-02-22 21:18 Gabriel Somlo
  2016-02-23  5:08 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Somlo @ 2016-02-22 21:18 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: gregkh, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	arnd, lersek, ralf, rmk+kernel, eric, hanjun.guo, zajec5,
	sudeep.holla, agross, linux-api, linux-kernel, devicetree,
	qemu-devel, imammedo, peter.maydell, leif.lindholm,
	ard.biesheuvel, pbonzini, kraxel, ehabkost, luto, stefanha,
	revol, matt, rth

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-23  5:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 21:18 [PATCH] firmware: fw_cfg register offsets on supported architectures only Gabriel Somlo
2016-02-23  5:08 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome