From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] firmware: fw_cfg register offsets on supported architectures only Date: Tue, 23 Feb 2016 07:08:07 +0200 Message-ID: <20160223070757-mutt-send-email-mst@redhat.com> References: <20160222211818.GJ16357@HEDWIG.INI.CMU.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160222211818.GJ16357-h65ZQ0r4j6KKUezXOiBB2eW1CriLhL8O@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Gabriel Somlo Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, lersek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org, hanjun.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, sudeep.holla-5wv7dgnIgG8@public.gmane.org, agross-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, imammedo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, ehabkost-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org, stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, revol-GANU6spQydw@public.gmane.org, matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org, rth-hL46jP5Bxq7R7s880joybQ@public.gmane.org List-Id: devicetree@vger.kernel.org On Mon, Feb 22, 2016 at 04:18:18PM -0500, Gabriel Somlo wrote: > 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 > Signed-off-by: Gabriel Somlo Acked-by: Michael S. Tsirkin > --- > 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