提交 2446333c 编写于 作者: B Blue Swirl

Rearrange block headers

Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 e945fb76
......@@ -16,15 +16,9 @@
void blockdev_mark_auto_del(BlockDriverState *bs);
void blockdev_auto_del(BlockDriverState *bs);
typedef enum {
IF_NONE,
IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
IF_COUNT
} BlockInterfaceType;
#define BLOCK_SERIAL_STRLEN 20
typedef struct DriveInfo {
struct DriveInfo {
BlockDriverState *bdrv;
char *id;
const char *devaddr;
......@@ -35,7 +29,7 @@ typedef struct DriveInfo {
QemuOpts *opts;
char serial[BLOCK_SERIAL_STRLEN + 1];
QTAILQ_ENTRY(DriveInfo) next;
} DriveInfo;
};
#define MAX_IDE_DEVS 2
#define MAX_SCSI_DEVS 7
......
......@@ -25,6 +25,7 @@
#include "hw.h"
#include "boards.h"
#include "net.h"
#include "blockdev.h"
DriveInfo *add_init_drive(const char *optstr)
{
......
......@@ -31,6 +31,7 @@
#include "loader.h"
#include "elf.h"
#include "cris-boot.h"
#include "blockdev.h"
#define FLASH_SIZE 0x2000000
#define INTMEM_SIZE (128 * 1024)
......
......@@ -34,6 +34,7 @@
#include "isa.h"
#include "sysbus.h"
#include "qdev-addr.h"
#include "blockdev.h"
/********************************************************/
/* debug Floppy devices */
......
......@@ -2,7 +2,6 @@
#define HW_FDC_H
/* fdc.c */
#include "blockdev.h"
#define MAX_FD 2
typedef struct FDCtrl FDCtrl;
......
......@@ -38,6 +38,7 @@
#include "sysemu.h"
#include "devices.h"
#include "boards.h"
#include "blockdev.h"
static const int sector_len = 128 * 1024;
......
......@@ -30,6 +30,7 @@
#include "qemu-timer.h"
#include "sysemu.h"
#include "dma.h"
#include "blockdev.h"
#include <hw/ide/internal.h>
......
......@@ -20,6 +20,7 @@
#include "dma.h"
#include "qemu-error.h"
#include <hw/ide/internal.h>
#include "blockdev.h"
/* --------------------------------- */
......
......@@ -17,6 +17,7 @@
#include "mainstone.h"
#include "sysemu.h"
#include "flash.h"
#include "blockdev.h"
static struct keymap map[0xE0] = {
[0 ... 0xDF] = { -1, -1 },
......
......@@ -37,6 +37,7 @@
#include "elf.h"
#include "vt82c686.h"
#include "mc146818rtc.h"
#include "blockdev.h"
#define DEBUG_FULONG2E_INIT
......
......@@ -36,6 +36,7 @@
#include "mips-bios.h"
#include "loader.h"
#include "mc146818rtc.h"
#include "blockdev.h"
enum jazz_model_e
{
......
......@@ -45,6 +45,7 @@
#include "loader.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "blockdev.h"
//#define DEBUG_BOARD_INIT
......
......@@ -22,6 +22,7 @@
#include "loader.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2
......
......@@ -18,6 +18,7 @@
#include "flash.h"
#include "console.h"
#include "i2c.h"
#include "blockdev.h"
#define MP_MISC_BASE 0x80002000
#define MP_MISC_SIZE 0x00001000
......
......@@ -25,6 +25,7 @@
#include "soc_dma.h"
/* We use pc-style serial ports. */
#include "pc.h"
#include "blockdev.h"
/* Should signal the TCMI/GPMC */
uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr)
......
......@@ -32,6 +32,7 @@
#include "boards.h"
#include "arm-misc.h"
#include "flash.h"
#include "blockdev.h"
/*****************************************************************************/
/* Siemens SX1 Cellphone V1 */
......
......@@ -39,6 +39,7 @@
#include "msix.h"
#include "sysbus.h"
#include "sysemu.h"
#include "blockdev.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
......
......@@ -34,6 +34,7 @@
#include "kvm.h"
#include "sysemu.h"
#include "sysbus.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2
......
......@@ -31,6 +31,7 @@
#include "scsi.h"
#include "virtio-blk.h"
#include "qemu-config.h"
#include "blockdev.h"
#if defined(TARGET_I386)
static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon,
......
/* PCMCIA/Cardbus */
#include "qemu-common.h"
#include "blockdev.h"
typedef struct {
qemu_irq irq;
......
......@@ -34,6 +34,7 @@
#include "xilinx.h"
#include "loader.h"
#include "elf.h"
#include "blockdev.h"
#define LMB_BRAM_SIZE (128 * 1024)
#define FLASH_SIZE (16 * 1024 * 1024)
......
......@@ -31,6 +31,7 @@
#include "boards.h"
#include "qemu-log.h"
#include "loader.h"
#include "blockdev.h"
#define BIOS_FILENAME "ppc405_rom.bin"
#define BIOS_SIZE (2048 * 1024)
......
......@@ -66,6 +66,7 @@
#include "kvm.h"
#include "kvm_ppc.h"
#include "hw/usb.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
......
......@@ -41,6 +41,7 @@
#include "elf.h"
#include "kvm.h"
#include "kvm_ppc.h"
#include "blockdev.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
......
......@@ -37,6 +37,7 @@
#include "ide.h"
#include "loader.h"
#include "mc146818rtc.h"
#include "blockdev.h"
//#define HARD_DEBUG_PPC_IO
//#define DEBUG_PPC_IO
......
......@@ -15,6 +15,7 @@
#include "ssi.h"
#include "qemu-timer.h"
#include "qemu-char.h"
#include "blockdev.h"
static struct {
target_phys_addr_t io_base;
......
#include "net.h"
#include "qdev.h"
#include "qerror.h"
#include "blockdev.h"
void *qdev_get_prop_ptr(DeviceState *dev, Property *prop)
{
......
......@@ -29,6 +29,7 @@
#include "qdev.h"
#include "sysemu.h"
#include "monitor.h"
#include "blockdev.h"
static int qdev_hotplug = 0;
......
......@@ -2,7 +2,6 @@
#define QDEV_H
#include "hw.h"
#include "blockdev.h"
#include "qemu-queue.h"
#include "qemu-char.h"
#include "qemu-option.h"
......
......@@ -36,6 +36,7 @@
#include "loader.h"
#include "usb.h"
#include "flash.h"
#include "blockdev.h"
#define FLASH_BASE 0x00000000
#define FLASH_SIZE 0x02000000
......
......@@ -18,6 +18,7 @@
#include "boards.h"
#include "bitbang_i2c.h"
#include "sysbus.h"
#include "blockdev.h"
#define SMP_BOOT_ADDR 0xe0000000
......
......@@ -3,6 +3,7 @@
#include "scsi.h"
#include "scsi-defs.h"
#include "qdev.h"
#include "blockdev.h"
static struct BusInfo scsi_bus_info = {
.name = "SCSI",
......
......@@ -36,6 +36,7 @@ do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#include "scsi.h"
#include "scsi-defs.h"
#include "sysemu.h"
#include "blockdev.h"
#define SCSI_DMA_BUF_SIZE 131072
#define SCSI_MAX_INQUIRY_LEN 256
......
......@@ -14,6 +14,7 @@
#include "qemu-common.h"
#include "qemu-error.h"
#include "scsi.h"
#include "blockdev.h"
#ifdef __linux__
......
......@@ -22,6 +22,7 @@
#include "block.h"
#include "audio/audio.h"
#include "boards.h"
#include "blockdev.h"
#undef REG_FMT
#define REG_FMT "0x%02lx"
......
......@@ -40,6 +40,7 @@
#include "qdev-addr.h"
#include "loader.h"
#include "elf.h"
#include "blockdev.h"
//#define DEBUG_IRQ
......
......@@ -37,6 +37,7 @@
#include "ide.h"
#include "loader.h"
#include "elf.h"
#include "blockdev.h"
//#define DEBUG_IRQ
//#define DEBUG_EBUS
......
......@@ -19,6 +19,7 @@
#include "boards.h"
#include "i2c.h"
#include "ssi.h"
#include "blockdev.h"
#define TOSA_RAM 0x04000000
#define TOSA_ROM 0x00800000
......
......@@ -15,6 +15,7 @@
#include "console.h"
#include "monitor.h"
#include "sysemu.h"
#include "blockdev.h"
//#define DEBUG_MSD
......
......@@ -16,6 +16,7 @@
#include "pci.h"
#include "usb-ohci.h"
#include "boards.h"
#include "blockdev.h"
/* Primary interrupt controller. */
......
......@@ -13,6 +13,7 @@
#include <qemu-common.h>
#include "qemu-error.h"
#include "blockdev.h"
#include "virtio-blk.h"
#ifdef __linux__
# include <scsi/sg.h>
......
......@@ -24,6 +24,7 @@
#include "net.h"
#include "loader.h"
#include "kvm.h"
#include "blockdev.h"
/* from Linux's linux/virtio_pci.h */
......
......@@ -4,8 +4,6 @@
#include "xen_common.h"
#include "sysemu.h"
#include "net.h"
#include "block_int.h"
#include "blockdev.h"
/* ------------------------------------------------------------- */
......
#include "xen_backend.h"
#include "blockdev.h"
#include "block_int.h" /* XXX */
/* ------------------------------------------------------------- */
......
......@@ -41,6 +41,7 @@
#include "qemu-char.h"
#include "xen_blkif.h"
#include "xen_backend.h"
#include "blockdev.h"
/* ------------------------------------------------------------- */
......
......@@ -28,6 +28,7 @@
#include "boards.h"
#include "xen_backend.h"
#include "xen_domainbuild.h"
#include "blockdev.h"
static void xen_init_pv(ram_addr_t ram_size,
const char *boot_device,
......
......@@ -201,6 +201,7 @@ typedef struct NICInfo NICInfo;
typedef struct HCIInfo HCIInfo;
typedef struct AudioState AudioState;
typedef struct BlockDriverState BlockDriverState;
typedef struct DriveInfo DriveInfo;
typedef struct DisplayState DisplayState;
typedef struct DisplayChangeListener DisplayChangeListener;
typedef struct DisplaySurface DisplaySurface;
......@@ -231,6 +232,12 @@ typedef struct VirtIODevice VirtIODevice;
typedef uint64_t pcibus_t;
typedef enum {
IF_NONE,
IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
IF_COUNT
} BlockInterfaceType;
void cpu_exec_init_all(unsigned long tb_size);
/* CPU save/load. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册