Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339933 > unrolled thread

[PATCH] firmware: fw_cfg register offsets on supported architectures only

Started byGabriel Somlo <somlo@cmu.edu>
First post2016-02-22 22:20 +0100
Last post2016-02-23 06:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] firmware: fw_cfg register offsets on supported architectures  only Gabriel Somlo <somlo@cmu.edu> - 2016-02-22 22:20 +0100
    Re: [PATCH] firmware: fw_cfg register offsets on supported  architectures only "Michael S. Tsirkin" <mst@redhat.com> - 2016-02-23 06:10 +0100

#1339933 — [PATCH] firmware: fw_cfg register offsets on supported architectures only

FromGabriel Somlo <somlo@cmu.edu>
Date2016-02-22 22:20 +0100
Subject[PATCH] firmware: fw_cfg register offsets on supported architectures only
Message-ID<r563E-3jn-33@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1340303 — Re: [PATCH] firmware: fw_cfg register offsets on supported architectures only

From"Michael S. Tsirkin" <mst@redhat.com>
Date2016-02-23 06:10 +0100
SubjectRe: [PATCH] firmware: fw_cfg register offsets on supported architectures only
Message-ID<r5dou-s7-7@gated-at.bofh.it>
In reply to#1339933
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 <mst@redhat.com>
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> ---
>  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web