From patchwork Mon Feb 20 11:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655079 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1349219wrc; Mon, 20 Feb 2023 03:52:37 -0800 (PST) X-Google-Smtp-Source: AK7set9UFppxkhGLkpR9ZWH7v7JdxbgRXHd9ip9HFSuAR2yd57IjzRAQ9CZPI8mCxZu9OXtPj+Kz X-Received: by 2002:a05:622a:389:b0:3bd:1835:b00f with SMTP id j9-20020a05622a038900b003bd1835b00fmr356423qtx.20.1676893957135; Mon, 20 Feb 2023 03:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676893957; cv=none; d=google.com; s=arc-20160816; b=E37tnqBiAITVhA+yelH2S5ZQ/e4LMHw//rKCOELBI8Q880xOm2dibxqeY7rl7u2NlW ktgefXSnCL88de7dxQ5giLlqxVhiSIMleNzkhuXg+al6U7lgEhS9DbeilC4etNp373im BKsXd+X4NaNAzFCqP08dv6FaTZoLAlCTrmcofFepWFn+UYjFvCUEi1VOS9c7z0AVr3UB zBIR/eAiLPvrAk2VW4Yjqag4/xAwtsWimNEKGYxlm9i9iT+fFMNP3t9zwhAChqKD2hCU 77CK3wZ4Oi4j38TjhQl5KfG6DCjfK4pQgyrVmI9nDlQJyI/IwB9eq/xdFG27y3/nhAJd 1zWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6NhaLGNCVQPhv/J8sWGZUAAWnfpTLonyUi96ru8QtrA=; b=Gu9I0s+9s8L2Swwl5wgIbGvq2B9pxaNmm9UH4z/yJlG1ao2wuSnvTmsBBYPQ7YV3CF Pg2kwTdQv6YSILLbBjc5TUGBDDkhF2gu71aeuJ8Lx6ak1vh4YJOBoXZ9ws4mjGk9p/GL mLl81vpt0YaWJ6ZaZAmLXsxJHa6ekgyBoNzlls79tvm7iAn7+QPEcZZz/qPNGksKbZYF XZuL9ZSJLkV0UFCqcnSpejlfUNT4uTwC99VvU7+SbFi5yeiOD1AHmp/X4+j96JyYAr8N OFP2N93DPc2ItA0HEfL9Ksz8A6b/tzdWB+B7JKpO8dgd7JIjFOmFuyo/qv+ZyjWkzbtG kqtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AVPi6Wx6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t21-20020a05622a01d500b003aff7f4f8e2si9890108qtw.235.2023.02.20.03.52.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 03:52:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AVPi6Wx6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU4hf-0001gh-SX; Mon, 20 Feb 2023 06:51:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU4hd-0001fk-SH for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:51:29 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU4hc-00055z-Aa for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:51:29 -0500 Received: by mail-wr1-x433.google.com with SMTP id 6so461987wrb.11 for ; Mon, 20 Feb 2023 03:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6NhaLGNCVQPhv/J8sWGZUAAWnfpTLonyUi96ru8QtrA=; b=AVPi6Wx60NvkshlJ17yAiwwDjq5+mjehWJFkHA+HyJ6PS9IgNocQMHNfphzPx+wA6L yT284zu9GpMltWIhe9fB3r4uD39QYXCmkNZ3EU61n3KsfxHhkuXCtaEq3VKkXWDwOEK3 b93EeLDrKLSTCKIPzm5NCy8LJMNsPWCWd6vT+hZ0Nt19xW5P4cTYUWw1DJyAhAnDyhz3 rjjDlb+7Zgqs0VAk2bom6HZv836OrxzEq0xQt8UmOr+zROPx1YhhUg9bmunSU35VMPRS G7FCOFCAXsIxbUOvN58uYqfLJYKmdBhc7RIt5jUVNQdlC3lzV10EDApXnRcsmYlOz2J1 0IEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6NhaLGNCVQPhv/J8sWGZUAAWnfpTLonyUi96ru8QtrA=; b=1S78xsBrVSG39JVDXi39pSnOitWigBjyvyxwinQ52sWiWORpRexdzMrqQwl3wDQI5U 2Yj18N/C0Abiu0Bg/IfnaEvXEIGXSuvUuRLw1YNva0STFCwktssmj/q+UNgtad1bIB3B srfJ9jVXcB2dsYhFqeTG7Dw5dptEWtLWUIDou65tMG9n5toKf1ZP1rvbmEaFDknTQ9Zk jXGCyHhXhiYHfKJLNGqbxT7agkVuk55CoTQL26UPUu9J1xuoE1n7K8PLlgbpWkBiEn+s od0kCMZeU9J/QOfOrZzwUY/jPja2cg0HxGHyLcH+p0k9oRH4z5aMqKiAXMUO282lhERk 9MJg== X-Gm-Message-State: AO0yUKVILAjw1oJb19S/8knNKQMU/Gw0eVJE0DjWact2peMkM03x2vae +3r+HG28cM0MTKaUaLIyW88g57Bc6y0BK7Bo X-Received: by 2002:a05:6000:18b:b0:2c5:4f35:1b2b with SMTP id p11-20020a056000018b00b002c54f351b2bmr639360wrx.28.1676893886786; Mon, 20 Feb 2023 03:51:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e28-20020a5d595c000000b002c54a2037d1sm2407842wri.75.2023.02.20.03.51.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 03:51:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Markus Armbruster , Paolo Bonzini , Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Edgar E. Iglesias" , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH 2/8] hw/char/pl011: Un-inline pl011_create() Date: Mon, 20 Feb 2023 12:51:08 +0100 Message-Id: <20230220115114.25237-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220115114.25237-1-philmd@linaro.org> References: <20230220115114.25237-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org pl011_create() is only used in DeviceRealize handlers, not a hot-path. Inlining is not justified. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/pl011.c | 17 +++++++++++++++++ include/hw/char/pl011.h | 19 +------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index c15cb7af20..77bbc2a982 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -19,10 +19,12 @@ */ #include "qemu/osdep.h" +#include "qapi/error.h" #include "hw/char/pl011.h" #include "hw/irq.h" #include "hw/sysbus.h" #include "hw/qdev-clock.h" +#include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" #include "migration/vmstate.h" #include "chardev/char-fe.h" @@ -31,6 +33,21 @@ #include "qemu/module.h" #include "trace.h" +DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr) +{ + DeviceState *dev; + SysBusDevice *s; + + dev = qdev_new("pl011"); + s = SYS_BUS_DEVICE(dev); + qdev_prop_set_chr(dev, "chardev", chr); + sysbus_realize_and_unref(s, &error_fatal); + sysbus_mmio_map(s, 0, addr); + sysbus_connect_irq(s, 0, irq); + + return dev; +} + #define PL011_INT_TX 0x20 #define PL011_INT_RX 0x10 diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h index 926322e242..d82870c006 100644 --- a/include/hw/char/pl011.h +++ b/include/hw/char/pl011.h @@ -15,10 +15,8 @@ #ifndef HW_PL011_H #define HW_PL011_H -#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "chardev/char-fe.h" -#include "qapi/error.h" #include "qom/object.h" #define TYPE_PL011 "pl011" @@ -57,22 +55,7 @@ struct PL011State { const unsigned char *id; }; -static inline DeviceState *pl011_create(hwaddr addr, - qemu_irq irq, - Chardev *chr) -{ - DeviceState *dev; - SysBusDevice *s; - - dev = qdev_new("pl011"); - s = SYS_BUS_DEVICE(dev); - qdev_prop_set_chr(dev, "chardev", chr); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_mmio_map(s, 0, addr); - sysbus_connect_irq(s, 0, irq); - - return dev; -} +DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr); static inline DeviceState *pl011_luminary_create(hwaddr addr, qemu_irq irq,