From patchwork Wed Jun 9 18:38:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Elisei X-Patchwork-Id: 12311025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 154E5C48BCF for ; Wed, 9 Jun 2021 18:37:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F128F613DC for ; Wed, 9 Jun 2021 18:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbhFISjb (ORCPT ); Wed, 9 Jun 2021 14:39:31 -0400 Received: from foss.arm.com ([217.140.110.172]:39786 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbhFISjb (ORCPT ); Wed, 9 Jun 2021 14:39:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B925D6E; Wed, 9 Jun 2021 11:37:36 -0700 (PDT) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C6BEA3F719; Wed, 9 Jun 2021 11:37:34 -0700 (PDT) From: Alexandru Elisei To: will@kernel.org, julien.thierry.kdev@gmail.com, kvm@vger.kernel.org Cc: andre.przywara@arm.com, sami.mujawar@arm.com, lorenzo.pieralisi@arm.com, maz@kernel.org Subject: [PATCH kvmtool 1/4] Move fdt_irq_fn typedef to fdt.h Date: Wed, 9 Jun 2021 19:38:09 +0100 Message-Id: <20210609183812.29596-2-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210609183812.29596-1-alexandru.elisei@arm.com> References: <20210609183812.29596-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The device tree code passes the function generate_irq_prop() to MMIO devices to create the "interrupts" property. The typedef fdt_irq_fn is the type used to pass the function to the device. It makes more sense for the typedef to be in fdt.h with the rest of the device tree functions, so move it there. Signed-off-by: Alexandru Elisei Reviewed-by: Andre Przywara --- hw/rtc.c | 1 + include/kvm/fdt.h | 2 ++ include/kvm/kvm.h | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/rtc.c b/hw/rtc.c index aec31c52a85a..9b8785a869dd 100644 --- a/hw/rtc.c +++ b/hw/rtc.c @@ -1,5 +1,6 @@ #include "kvm/rtc.h" +#include "kvm/fdt.h" #include "kvm/ioport.h" #include "kvm/kvm.h" diff --git a/include/kvm/fdt.h b/include/kvm/fdt.h index 4e6157256482..060c37b947cc 100644 --- a/include/kvm/fdt.h +++ b/include/kvm/fdt.h @@ -25,6 +25,8 @@ enum irq_type { IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), }; +typedef void (*fdt_irq_fn)(void *fdt, u8 irq, enum irq_type irq_type); + extern char *fdt_stdout_path; /* Helper for the various bits of code that generate FDT nodes */ diff --git a/include/kvm/kvm.h b/include/kvm/kvm.h index 6c28afa3f0bb..56e9c8e347a0 100644 --- a/include/kvm/kvm.h +++ b/include/kvm/kvm.h @@ -44,7 +44,6 @@ struct kvm_cpu; typedef void (*mmio_handler_fn)(struct kvm_cpu *vcpu, u64 addr, u8 *data, u32 len, u8 is_write, void *ptr); -typedef void (*fdt_irq_fn)(void *fdt, u8 irq, enum irq_type irq_type); enum { KVM_VMSTATE_RUNNING,