From patchwork Thu Oct 12 18:32:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 115661 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp2038564edb; Thu, 12 Oct 2017 11:33:03 -0700 (PDT) X-Received: by 10.101.72.1 with SMTP id h1mr939868pgs.249.1507833183263; Thu, 12 Oct 2017 11:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507833183; cv=none; d=google.com; s=arc-20160816; b=BBXybqW/ifO0IhNgSS9AestwYjNfhbnw1KgoNg/UL0+cVzOIwNEb/7WyPKjqFxS192 WHJM4rfof0K5/B6veKQ+nbiEeKMjJDMQVRf5CNQYAynyLcxC1//ww7yM0gtgXq32EgjA OZI46hkPkYfmV6pm4m3qMRHsFCnTi5ETVlIm8f67YcP3myglBWkGj6k0Vui4rrrQvZUC T5ehMKWDyl394KmnMOFULR9pI1xM96qzlLRNbIToEgq+qhPX0hQaeq2VRiz7yHwjyD3R bOufPfRhRr3gSZCN62QbJk0WgS+277vG4x40lbMvTcp97vjOKyxfeuQPPt+ZgtaVYB5e ALOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=CPy93DX6bKGjJa6+MRQNz2DLYgJKeQnwnLTn1qSmeb8=; b=MRPzs9+TxwxqiLfkDcrznvNPJ8hPPV9XkZMZ4dpUz5q+cGm3hmeJJV7yoVqb2KE2U5 MHWynv342bNpyXc7MPRHCbj/F9dc8IVYph8pz4jgGCyDgDJOhUwHq4g/xzn5B1zYVwP+ xUpazp0Z30ZL8CaEF1WJuVU6kmc9qPZInfnmQJgje9fX7Jed7w5CW2iYrBHCwsvWrOUE qoyY29p/AocI1MeeNZQq2wLBHQRYWRznenMZi/J9g1ku27aBe2i0SPEHCggzIGbQJrs8 MYsjv1s/Llx2NAZ9C8PP8f7HuoUzIw3bacNPio6AtUvfs81Cw7VnTQAnhiyey5A3qEvN 2IQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RLzSvZSC; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19si8807466pfj.225.2017.10.12.11.33.03; Thu, 12 Oct 2017 11:33:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RLzSvZSC; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755606AbdJLSdB (ORCPT + 6 others); Thu, 12 Oct 2017 14:33:01 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:51497 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755596AbdJLSc7 (ORCPT ); Thu, 12 Oct 2017 14:32:59 -0400 Received: by mail-wm0-f52.google.com with SMTP id f4so15777011wme.0 for ; Thu, 12 Oct 2017 11:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WcLVmRr1DEZoyASbIlPOQE1XJcj4GPTNuip+wgvnbKI=; b=RLzSvZSCLV0KC0k9WBnMr6v7nbzRUgLvQwY/PLMvP9JJ+pdJUm5T63hlbK2mSGpGY1 kQwPBUpzTxia+szVvWoIg3xZA01zxPgJ3ojdvYZZgIuCnP28UydYIPE3dXnvJPzEG4PH y4KiJJtoOLqNQAvUrtY9P0dYAPozSvy6gVA9s= 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=WcLVmRr1DEZoyASbIlPOQE1XJcj4GPTNuip+wgvnbKI=; b=l9mzJjrHkFoFXTfy3uz30D/76pA8u19+ggtI+q5rB3RoGw9tZUxuQtwumDD5cvcorY MER01CRTRaPDmMJ6fIoCnGPFRC0GED1fFlX9dS5pePje5uaDmAYmBQRiHk3K2PI4F1i+ XuYI7lufOMfe4SjQ0wSn2wr1p7xKaUAmw/LPnDHPUb0l90inC4fC4UcbvvvzDdg/PgC2 SO16DcFDEhG5gVicav7JXrSybFUsvj5czXF1xWdPOQuE9Vgar+Irg2lfJYMtCMcw66jo brqQkBdku5yRfmgchQ6Jd8lxq1hvsz5RRG967v+PxRzQ1cbNYYOJF/YMpqIAav3WrYl1 BKvg== X-Gm-Message-State: AMCzsaVZ23hk95rKWW48xm81Z8bwYYCxvymevlqNdxGLapgtDJtc7cIP dT1PzCehFAhapdyD0+9udDY9ow== X-Google-Smtp-Source: AOwi7QDiyNd3GuCsKOIB1xcVbx2s5oyVwp2gz9gNUXeJVX74iAl2T5CYiNqly6AhVMuQ74+5OrgLgw== X-Received: by 10.223.184.140 with SMTP id i12mr2621049wrf.31.1507833178390; Thu, 12 Oct 2017 11:32:58 -0700 (PDT) Received: from localhost.localdomain ([196.78.24.219]) by smtp.gmail.com with ESMTPSA id i13sm14730579wre.93.2017.10.12.11.32.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 11:32:57 -0700 (PDT) From: Ard Biesheuvel To: marc.zyngier@arm.com, robin.murphy@arm.com Cc: linux-arm-kernel@lists.infradead.org, daniel.thompson@Linaro.org, leif.lindholm@linaro.org, graeme.gregory@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, Ard Biesheuvel Subject: [PATCH v3 0/2] implement workaround for Socionext Synquacer pre-ITS Date: Thu, 12 Oct 2017 19:32:45 +0100 Message-Id: <20171012183247.23679-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org >From patch 2/2: The Socionext Synquacer SoC's implementation of GICv3 has a so-called 'pre-ITS', which maps 32-bit writes targeted at a separate window of size '4 << device_id_bits' onto writes to GITS_TRANSLATER with device ID taken from bits [device_id_bits + 1:2] of the window offset. Writes that target GITS_TRANSLATER directly are reported as originating from device ID #0. So add a workaround for this. Given that this breaks isolation, clear the IRQ_DOMAIN_FLAG_MSI_REMAP flag as well. v3: - add patch to pull device ID space discovery forward, so we can quirk it as well (as we already do for Cavium) - use existing quirks framework as much as possible - get rid of ITS_WORKAROUND_xxx flag: it is no longer needed after the refactoring v2: - use a 32-bit host address/size rather than a PCI address, to factor out the involvement of an SMMU (which the platform does have, but it is unclear atm if it can be exposed to the OS) - add msi_domain_flags member to move the quirk flag checks out of the common code path Ard Biesheuvel (2): drivers/irqchip: gicv3: probe device ID space before quirks handling drivers/irqchip: gicv3: add workaround for Synquacer pre-ITS Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt | 4 + arch/arm64/Kconfig | 8 ++ drivers/irqchip/irq-gic-v3-its.c | 81 ++++++++++++++++---- 3 files changed, 78 insertions(+), 15 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html