From patchwork Tue Feb 6 17:08:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 127059 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3107679ljc; Tue, 6 Feb 2018 09:11:23 -0800 (PST) X-Google-Smtp-Source: AH8x224avcu/XtfbLjdGyecmhajBLWazz6xQphi3zPg8QGBkNag2g5N11CorpgbE8ML3436Vw4bW X-Received: by 10.36.93.68 with SMTP id w65mr3941993ita.28.1517937083668; Tue, 06 Feb 2018 09:11:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517937083; cv=none; d=google.com; s=arc-20160816; b=CfEmEILW2NOUf/rGguKaTX94o9IwpEv9kiplFsuZZ3HVZOpZmcTmGHkiwn8YBpvcc4 +eiM0+G3KvEyr0eGIeHxld89aOFlZ1fJfcb32brrLn9KoSatww++dvTVOnGcjTm2WcjS MEMzk/971UD29x4X8Ysd3v7Cj+he4MAadFXqtwoWClOV97Tc+96Yl79avbVlAD4MjpEh wL9z6Cn+1jQewGTrJflA5kzXPL/O2D8ak0fW+23fMNQ+5QUarY7/pFWsdmqRiXcEn95M TqrFlMv4SSFMBzxI6W/XQLdPi+8Mmk/36pX7zhkwa45xg7EqsSyAKCrvowU0QrQac+qw /Yjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:message-id:date:to:from:dkim-signature :arc-authentication-results; bh=9YpRAfjLsWTqy0ldxx/Yss8p9olnQ4LGJwqRqPQDR70=; b=AycV72uZjE6t/8d6JzR+9rQAaZG68t7tHvx0WVr6dl2i8ks41e8bC5TUFz0czfw1pJ BtBs9ZzBVIKPNnMtsoSp+Qh31+rztn8goHn8TOP0wBHWqu2FMk2e1+CNQUd83UobSQ8+ bgQLeu4ovPuD15/o1cag/hXoHWOR+HeP8ylZqY4mTA8SfVqEyceyfVjeYMBSRhDhGh/I M5IzYERWbN1ViTkEUdWX8OWuDburzCHzolsVwZZy37j5bqFrZWLGlF5wfuq+qnRSwzbx x0FrP3ilawV9t4cAKwEtTybmQmzKnmbJZlRo8zrilgIo3wxHYQ8eOoqwKPy5y8z86FLR wMkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DTqNIEQq; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id s15si1963721ith.152.2018.02.06.09.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 09:11:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DTqNIEQq; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej6k5-0003lc-B5; Tue, 06 Feb 2018 17:09:13 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ej6k4-0003lC-Je for xen-devel@lists.xenproject.org; Tue, 06 Feb 2018 17:09:12 +0000 X-Inumbo-ID: 6460116b-0b60-11e8-ba59-bc764e045a96 Received: from mail-wm0-x244.google.com (unknown [2a00:1450:400c:c09::244]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 6460116b-0b60-11e8-ba59-bc764e045a96; Tue, 06 Feb 2018 18:08:47 +0100 (CET) Received: by mail-wm0-x244.google.com with SMTP id f71so5151306wmf.0 for ; Tue, 06 Feb 2018 09:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=twSWFcHrp9vuYMfF22zQTfFVwMUaZ/AJ9pDZtEw38bU=; b=DTqNIEQqTWOjYKjd0AtlBgrn6IWZSIHuOHVTEGaewDwHVyir0Uc/CpjH9lc65Gw3Nk FKQo5wZJ28WFNYkRmZBAtXBvBWQISmbryLVcd3sbO9E2C9WT4mz7RBFFVmjM2o/AtDBp ierBO0v1UjjSNWXqllvq/ChgYIbdVidS2uSzc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=twSWFcHrp9vuYMfF22zQTfFVwMUaZ/AJ9pDZtEw38bU=; b=hL1+RCHVstNNWo7bHq8SsWmPCiJ7Acgh8sFl94qA64mYegGEyhqBfzS4tTqskTTPmz Z9COehAWPboKUH213hAH/BSmtA7uAYg8Hvk9brZroXnDJfeyF/dJdyau19z0UyB5dl1X UZUyWIHmYQkaDOFSj3LAMjTG1YctMD96CYRQkQ//zjyu1sEiG2PjhchbyFd5FhnIWtr0 Fov5UphEFxZGczOjHkJ2UNP5hWNhffznvQMocnQiTKXWrcOPL9c7xoerz1MQKJrgbIPA GFI6Np3tj0MEQ7QMr/bF1LMbKvhCaq84jCqT8iO49EWrqOfgaaSTkh8Hiwz4oWMqrOx5 0i7A== X-Gm-Message-State: APf1xPCYSCiETEqEg8xmeSB/gLR0hk5ZjTzmBEGdt7Ic+ypdxh7UW7+V Sk2+3gUzqzczMcVpJf7Ib0McVQ== X-Received: by 10.28.198.12 with SMTP id w12mr2370653wmf.75.1517936949627; Tue, 06 Feb 2018 09:09:09 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id n2sm7885819wra.41.2018.02.06.09.09.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Feb 2018 09:09:09 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Tue, 6 Feb 2018 17:08:55 +0000 Message-Id: <20180206170903.30637-1-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v5 0/8] ARM: VGIC/GIC separation cleanups X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi, a minor update over the last post. Added tags, extended one commit message and added an error return in patch 5/8. Please test and apply. Cheers, Andre Changelog v4->v5 01: unchanged 02: reordered headers, added tag 03, 04: unchanged 05: return an error if irq_desc does not match, extended commit message 06: added tag 07, 08: unchanged Changelog v3->v4 01: added tags 02: remove extra header files, move per-CPU variable into gic.h 03, 04: unchanged 05: rework locking, rework dropping hardware IRQ connection 06: add ASSERT 07: unchanged 08: removed read_mostly attribute Changelog v2->v3: 01: reworked 02: rebased to match staging, added tag 03, 07: added tag 08: new, as suggested by Julien ================ By the original VGIC design, Xen differentiates between the actual VGIC emulation on one hand and the GIC hardware accesses on the other. It seems there were some deviations from that scheme (over time?), so at the moment we end up happily accessing VGIC specific data structures like struct pending_irq and struct vgic_irq_rank from pure GIC files like gic.c or even irq.c (try: git grep -l struct\ pending_irq xen/arch/arm). But any future VGIC rework will depend on a clean separation, so this series tries to clean this up. After this series there are no more references to VGIC structures from GIC files, at least for non-ITS code. The ITS is a beast own its own (blame the author) and will be addressed later. *** BLURB HERE *** Andre Przywara (8): ARM: VGIC: drop unneeded gic_restore_pending_irqs() ARM: VGIC: split gic.c to observe hardware/virtual GIC separation ARM: VGIC: split up gic_dump_info() to cover virtual part separately ARM: VGIC: rework events_need_delivery() ARM: VGIC: factor out vgic_connect_hw_irq() ARM: VGIC: factor out vgic_get_hw_irq_desc() ARM: VGIC: rework gicv[23]_update_lr to not use pending_irq ARM: make nr_irqs a constant xen/arch/arm/Makefile | 1 + xen/arch/arm/domain.c | 1 + xen/arch/arm/gic-v2.c | 14 +- xen/arch/arm/gic-v3.c | 12 +- xen/arch/arm/gic-vgic.c | 466 ++++++++++++++++++++++++++++++++++++++++++++ xen/arch/arm/gic.c | 423 ++-------------------------------------- xen/arch/arm/irq.c | 9 +- xen/arch/arm/vgic.c | 11 ++ xen/include/asm-arm/event.h | 13 +- xen/include/asm-arm/gic.h | 8 +- xen/include/asm-arm/irq.h | 5 +- xen/include/asm-arm/vgic.h | 6 + 12 files changed, 526 insertions(+), 443 deletions(-) create mode 100644 xen/arch/arm/gic-vgic.c