From patchwork Wed Jan 24 18:10:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125692 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp580971ljf; Wed, 24 Jan 2018 10:13:35 -0800 (PST) X-Google-Smtp-Source: AH8x227dzKhvmDCg37g534MujAleILHHYS3gdLAYyw1VbTkn0QPR1les82uvJ2OOKOtPVifr95DP X-Received: by 10.36.73.69 with SMTP id z66mr8990472ita.98.1516817615539; Wed, 24 Jan 2018 10:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516817615; cv=none; d=google.com; s=arc-20160816; b=VR55s7XAF8efDJH86NBOI2BZHLrWJVgcBdvfJMkIORnc2h5FARxER2Pz8H5faVtu8c PJ+Jb6ce3cP7byOrvZYdGjmHGeE4rgEekSfP83Ya1uWd11ir9Too3G8fkUsvy+QiUGOD c0wYxX/q+p6byXJSm184kT9mJJhKFlXcHIVCQcp4ywacB4G8UprLfwc8AbWO4T9QAFE5 BYlbDy83KOxRNj/GcZp9TZUL4bj80QWZbPSuYVZ8i7HpV7CSazVs0OekM0my22rnyIGP RYGFjmWryIZCXLvO/0aF8v5ljHemAyM5vaSjp/Mn/bKiIm0h9dtyuy18KWUdlZXFeDuR 7mKQ== 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=askKLSqtUU2E1tter+PbYq/WKYOeMg8KILyXAAaltQs=; b=rMdSScRi54mbonNl73nOdO/O/0Vj8irXu0cVVHg1F9A6tYtacgCLEE0e5jiJ4rKqkv X+PWNj2wDW4J+5Jm6mPGXTjk9Ud2rXsQyb4Y5gt4Rb5/Cy66SpAIYlpXd0bOhBt+xmx9 SlwXqMMeXIxL5Ni7KbGaYoNAmhY10t2L6JjWco3gL2hxMABZ/3YnUxh/ZVOD3uFF/WUE Y5EnqG8gT2ozItcBCYLXf276E5EhT0MnzsmplEUaZ1839N03eLhDkgadY6leqlQEZIQQ /Fv226vPmn2XFnoAE1C0Gczpg2nmIssOzpJZgMih1QzMbH2rUwq4FW4wrJxvQrw6DxWq O1ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RQvLQMSl; 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 g5si586313itb.149.2018.01.24.10.13.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 10:13:35 -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=RQvLQMSl; 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 1eePVi-00077Z-2A; Wed, 24 Jan 2018 18:10:58 +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 1eePVg-00077D-Qj for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 18:10:57 +0000 X-Inumbo-ID: e86b351e-0131-11e8-ba59-bc764e045a96 Received: from mail-wr0-x242.google.com (unknown [2a00:1450:400c:c0c::242]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e86b351e-0131-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 19:10:50 +0100 (CET) Received: by mail-wr0-x242.google.com with SMTP id d9so4999077wre.3 for ; Wed, 24 Jan 2018 10:10:54 -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=Dxv0JlhPgdc9AisjWJ8eU33jT53ZedTZXp6zaEoNkRA=; b=RQvLQMSlQkvmP4KRAFvGT3WsJuaZi4h7J/YmjxRrnaQmZNqcE7j2IkntOoYmTW2rIo QUnaapTVRXetYDuLGmju+IWNJxbJBb8t2sKYLrY4mv6TsPnPzbeqyKDCrHIZUYt6kVoh 9fcy0P0qJyRg2tSqlxoRN9BTfxL23UsAXiA8s= 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=Dxv0JlhPgdc9AisjWJ8eU33jT53ZedTZXp6zaEoNkRA=; b=CVIFANIGeuHaMhJl6gwUEGfB5D21p4ksbkVIqWyg63isq66PhifvPUhQj+ghmjstEe gnRBCE0YE4hNehPEbXG9t1jKdXtxNNl1il9bn4HU+Bfkh0Hd6Mv4L+IwKe2ptkUd67AS hPq4XqcZmzcrFJNF1sdXpOBBcT3bFJgCEhvGVVnJO0zeN+s4YoFhX/JZw/EKvCHuA4vB oQ768/lsvoDae0j88X4bi3Ncro1LpYWtVeSbkVoDJ3ZTICkpmXPw1NBh5M3a8Lzj1KKR 2sLqZD+ys7HxukfXMTukgfht741R3OoxixVovm0qB2szQ/o+rBdJgmSf0ypSW72cdv0j MDeA== X-Gm-Message-State: AKwxytcl9qrW2OCLGDafJeWopyFrqyZ8QO0vRUz5b/dC/wIEK67sePPR 0Vj79/WAcjUpDq2Esgz+ma8TSQinKZ4= X-Received: by 10.223.199.206 with SMTP id y14mr6771314wrg.158.1516817453281; Wed, 24 Jan 2018 10:10:53 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id r68sm899379wmd.47.2018.01.24.10.10.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 10:10:52 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Wed, 24 Jan 2018 18:10:50 +0000 Message-Id: <20180124181058.6157-1-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v3 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, minor updates to this series. Three patches have been merged already. Patch 1/8 (was v2 04/10) has been significantly reworked to address Stefano's comments, see the reply to his v2 comment. The rest has just been rebased and got tagged, if appropriate. The last patch is an improvement to the already merged 02/10, as suggested by Julien. Please test and apply. Cheers, Andre Changelog: 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. 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 | 468 ++++++++++++++++++++++++++++++++++++++++++++ xen/arch/arm/gic.c | 421 +-------------------------------------- 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 | 5 +- xen/include/asm-arm/irq.h | 5 +- xen/include/asm-arm/vgic.h | 6 + 12 files changed, 521 insertions(+), 445 deletions(-) create mode 100644 xen/arch/arm/gic-vgic.c