Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: fw_cfg register offsets on supported architectures only

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>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Gabriel Somlo and committed by
Greg Kroah-Hartman
00411b7b f55532a0

+1 -3
+1 -3
drivers/firmware/qemu_fw_cfg.c
··· 109 109 # define FW_CFG_CTRL_OFF 0x00 110 110 # define FW_CFG_DATA_OFF 0x01 111 111 # else 112 - # warning "QEMU FW_CFG may not be available on this architecture!" 113 - # define FW_CFG_CTRL_OFF 0x00 114 - # define FW_CFG_DATA_OFF 0x01 112 + # error "QEMU FW_CFG not available on this architecture!" 115 113 # endif 116 114 #endif 117 115