Message ID | 1549390526-24246-17-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YIeGA7wJ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43vCyT12Y0z9s7h for <incoming@patchwork.ozlabs.org>; Wed, 6 Feb 2019 05:38:40 +1100 (AEDT) Received: from localhost ([127.0.0.1]:37663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1gr5cE-0003OI-SF for incoming@patchwork.ozlabs.org; Tue, 05 Feb 2019 13:38:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gr5GL-0002O6-SM for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gr5GI-0003oo-GP for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:01 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:42399) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gr5GH-0003av-SP for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:15:58 -0500 Received: by mail-wr1-x433.google.com with SMTP id q18so4689334wrx.9 for <qemu-devel@nongnu.org>; Tue, 05 Feb 2019 10:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=0yrVirtf2XYWtid3rKgKyPY4/E20xtlKXHv18PjOeFM=; b=YIeGA7wJi0PGqPml7sBpA3YzSRRH4ClTZWU7FGayVFguLmMyeRwMFk2AY2FlGhAKEd iEcF9DpqFdEHK6epuWGy4x9ocXYQ92Xzia6v/GIhq4nKfmEoE0414W62UU2D0n8DAXdH 8oFa8rx8+MQWyM3v3Ha/Aj/tR9vcQs+aDvFZGr/CZOFF/UU5LmEKgQdvFFmlvbbkA95f 7On/mA/4NcTMbXugE2v7IOUEClABtYormpg48thsgk/eTDopLnUsoM36KcVRCSe+WjDE Z6vCjmd/a2zQxrhGjcMKcjkBBxtS0Wd3OdkXlFXrRhp/AsV3PkbxdKAv5re8eHZ/Ubon gf7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=0yrVirtf2XYWtid3rKgKyPY4/E20xtlKXHv18PjOeFM=; b=QAtZ561vgvnoOtWJUZNZzwBJA7fu/Dq3pBkKB42Mmnx7/aq14n1zswctOTY3iXdOFC Og2DLU3qdGTI5Tl2mrPM9NlDyBEL6813pZHdKvS3p8rLHNiD6eS7+XQhPpbChXiWEJ05 7PESHyUHQTVZd/qidJnX8/was69PK9ocNJ6PfsA3Dc0ov9GZBnCcJwkzvrSLP8z+t812 BBuKQi+pxwBpLQZP9ZvRxAPRT+wPTDD35DpNzWEV52zrw0Vs3Ii9jkG3CYS1ObyeipOB XZfXKWrQHdAfQg4SxpIpHPjl44f7MWjOC5D+AHyEl5oI2iWEYEqZB44Bq4zvv2FrEsdT yhyg== X-Gm-Message-State: AHQUAuY0Rau9SlXU1IBtR5W0NljPFzBMHGz0b6laIkoy2Sy3fnyBP1Wl T0+BMDoPVglhtOsXdCVA5n810ar2 X-Google-Smtp-Source: AHgI3Ia1th0cBOsi4v7Vkw584p7sLyqEY1aweA6+YJzdtYCNlxfYQMFMgpDiJWUSrb/M31VlKPrJqw== X-Received: by 2002:a05:6000:12ce:: with SMTP id l14mr2349207wrx.269.1549390544439; Tue, 05 Feb 2019 10:15:44 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id p5sm8931665wmh.16.2019.02.05.10.15.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 10:15:43 -0800 (PST) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 19:14:26 +0100 Message-Id: <1549390526-24246-17-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> References: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::433 Subject: [Qemu-devel] [PULL 16/76] linuxboot_dma: remove duplicate definitions of FW_CFG X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Stefano Garzarella <sgarzare@redhat.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/76] vhost-user-test: use g_cond_broadcast
|
expand
|
diff --git a/pc-bios/optionrom/linuxboot_dma.c b/pc-bios/optionrom/linuxboot_dma.c index d856d41..f728dc8 100644 --- a/pc-bios/optionrom/linuxboot_dma.c +++ b/pc-bios/optionrom/linuxboot_dma.c @@ -58,12 +58,6 @@ asm( " jmp load_kernel\n" ); -/* QEMU_CFG_DMA_CONTROL bits */ -#define BIOS_CFG_DMA_CTL_ERROR 0x01 -#define BIOS_CFG_DMA_CTL_READ 0x02 -#define BIOS_CFG_DMA_CTL_SKIP 0x04 -#define BIOS_CFG_DMA_CTL_SELECT 0x08 - #define BIOS_CFG_DMA_ADDR_HIGH 0x514 #define BIOS_CFG_DMA_ADDR_LOW 0x518 @@ -75,12 +69,6 @@ asm( #define barrier() asm("" : : : "memory") -typedef struct FWCfgDmaAccess { - uint32_t control; - uint32_t length; - uint64_t address; -} __attribute__((packed)) FWCfgDmaAccess; - static inline void outl(uint32_t value, uint16_t port) { asm("outl %0, %w1" : : "a"(value), "Nd"(port)); @@ -153,9 +141,9 @@ static inline uint32_t be32_to_cpu(uint32_t x) static __attribute__((__noinline__)) void bios_cfg_read_entry(void *buf, uint16_t entry, uint32_t len) { - FWCfgDmaAccess access; - uint32_t control = (entry << 16) | BIOS_CFG_DMA_CTL_SELECT - | BIOS_CFG_DMA_CTL_READ; + struct fw_cfg_dma_access access; + uint32_t control = (entry << 16) | FW_CFG_DMA_CTL_SELECT + | FW_CFG_DMA_CTL_READ; access.address = cpu_to_be64((uint64_t)(uint32_t)buf); access.length = cpu_to_be32(len); @@ -165,7 +153,7 @@ void bios_cfg_read_entry(void *buf, uint16_t entry, uint32_t len) outl(cpu_to_be32((uint32_t)&access), BIOS_CFG_DMA_ADDR_LOW); - while (be32_to_cpu(access.control) & ~BIOS_CFG_DMA_CTL_ERROR) { + while (be32_to_cpu(access.control) & ~FW_CFG_DMA_CTL_ERROR) { barrier(); } }