From patchwork Mon Nov 9 17:39:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 11892087 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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 55F9DC2D0A3 for ; Mon, 9 Nov 2020 17:41:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1CB120639 for ; Mon, 9 Nov 2020 17:41:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QHKUkvy2"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=voleatech.de header.i=@voleatech.de header.b="b/CyjaST" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1CB120639 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=voleatech.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=gxYO2PXmAijP+/AYmfPExHV8jw4fzFnmCeUzQdFHZeM=; b=QHKUkvy22vD1qtocWQjgLkiIzC 1gJUi/1N65gj77htH0HjAfHqHw1/3FcgL6cvstNa7gCmhkmeeehNDGneuyZwg4ei0JKEcAmic1SJR O0BZCstwbCwOG7dUY5J+DAyyMMElT67DQS6BqDKI4JUSOpQHqJo5LAtLUGsviXAtQNSUOgPjNJPxD 097M+W/qOzgQw8XzY428LK97/Qnh0yOGAGsQPyrwDA6pJ5UCE1d8dV+MRaABf+RVVGcV3ZeB6rWid aoatznxUDm/jmwqn18rAM+3Z1n1hUtrfegLuL9oZOzwMul1a/5xDnX+tUGVz6SM865z0KU948G0do dbeZiduA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcB9A-00075K-Tb; Mon, 09 Nov 2020 17:40:04 +0000 Received: from mail-db8eur05on2108.outbound.protection.outlook.com ([40.107.20.108] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcB8z-00071i-Rv for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2020 17:39:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AG4TnV/Sonnbmunww/G57lWsunZ3Gd/9NVj50fUyAx+mzl/9EBeHjRUTS3rP7U88k2B8XGYaQK5PsfgZTZWhY4w44mu8zA+j4Pwsdt/2FHwk4Xu6Lp3zNA3Eber5om6tPjg5x4vww19611z7vgm9Qipoa6ewg02L3byfqpR/YCPAs738Rgsx9IRMRWzVZkxqXDFCkhtFTZ29RVOxs6+E+Ks2eNhNo5UpabdUa/PmXYn3mAN6+aIDnX++iWgFovSHU50z8cxZahCaCQQUvN3ufVP3WSGdUv3n47JpFDah0e8mtZNHoILyZ7XL1o60p+uUefe9Ku5B4KDrGvGq/YcRvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7VoXS8Ae5uMaF7YdmY4F9ejMbHg0XaCmFz1xRyYDknI=; b=YNZyxAEzWrTRGKaCmNnZZof9r2wphPDsddIkPPdgQhN26FVG1FswmvqcSIvY5C1XszAx9rJolWEq87jWcWj5mrO8t+JA5vsP9rTvK+5/XpkPw2JjlmQDMCgyObV86zz1QtUpxPnaRGJDZG6NA3nFdeI/LoAF5G1PXrr4puklq0UwwUCPImMoLOOnTQQwUua5yPghmTB7XDfRuKT0Rr0152FUlxBPL2AxaWNBLONFLzOM0f71G+zwe/e1k7Dzkc2ZhvkeItTfZLAGcCBSfbbtyseb9Zhy89nAHiysYkcD4cEuxvFZCTr1JZ4VH0KPlvRMGUardTH79OoP6Z0QI2Qbig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7VoXS8Ae5uMaF7YdmY4F9ejMbHg0XaCmFz1xRyYDknI=; b=b/CyjaST/q0CJybrRbedOd+u7kKU535NpNpX2IbNtgIJi4/4DDmfAeRSb0MMSi5w8RBvLbcu0ntGiakHpdi7VigC+cxIPZFB/kGN0le6h9bRG5Qy/oRp5RvAEAdI45Rvkq2Xqllm52cRvB/RmZWlkzzslPCh06fPQ67FoB3ajEk= Authentication-Results: kernel.dk; dkim=none (message not signed) header.d=none;kernel.dk; dmarc=none action=none header.from=voleatech.de; Received: from AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) by AM0PR05MB5362.eurprd05.prod.outlook.com (2603:10a6:208:ea::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Mon, 9 Nov 2020 17:39:51 +0000 Received: from AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4]) by AM8PR05MB7251.eurprd05.prod.outlook.com ([fe80::f132:2cc:34f2:5e4%7]) with mapi id 15.20.3541.025; Mon, 9 Nov 2020 17:39:51 +0000 From: sven.auhagen@voleatech.de To: axboe@kernel.dk, hdegoede@redhat.com, robh+dt@kernel.org, tglx@linutronix.de, maz@kernel.org, gregory.clement@bootlin.com Subject: [PATCH v3 0/9] Armada8k enable per-port SATA interrupts and drop a hack in the IRQ subsystem Date: Mon, 9 Nov 2020 18:39:39 +0100 Message-Id: <20201109173948.96663-1-sven.auhagen@voleatech.de> X-Mailer: git-send-email 2.24.3 (Apple Git-128) X-Originating-IP: [109.193.235.168] X-ClientProxiedBy: AM0PR04CA0135.eurprd04.prod.outlook.com (2603:10a6:208:55::40) To AM8PR05MB7251.eurprd05.prod.outlook.com (2603:10a6:20b:1d4::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (109.193.235.168) by AM0PR04CA0135.eurprd04.prod.outlook.com (2603:10a6:208:55::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Mon, 9 Nov 2020 17:39:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d357c0a-6302-4ff0-aedc-08d884d675f5 X-MS-TrafficTypeDiagnostic: AM0PR05MB5362: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tEdYQdODy/fuWUNo7Sxn35mBYgkhObeVqZJgr0He+8S7YQV7LzC5JiqjLF0b27EQ886Sg0mrpudbUug8FI8XevjVx4zA9K0aUabgsqP3sF7MQxngwJ4RxOFiK+22a3G7SZkw8D/IxQHHCcHHMIHoenhFOxNeY3hmqLFjjqjCT2MfhAj5WclK7xVcnhLh9AFf61ipP4Mj7JhrGlkSupyJCv8SGOhrWUJVH9k36E/oZKRQMPPwT68EO/PnvlXA3//zMe6fy+h6QY6sjbodlzmYHL2eeKb5yKXe6W7etS7fEeIzHFKmfgjsdMHIRhI2gCLUxCmrvi5ty7qL+cCxqWhRJB94PasbINT/tbdp0CArekoKSUvPW9NA38+oblIped/T X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR05MB7251.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(396003)(136003)(366004)(39830400003)(52116002)(66946007)(5660300002)(1076003)(66476007)(66556008)(26005)(2906002)(478600001)(316002)(9686003)(6506007)(66574015)(6512007)(86362001)(6666004)(16526019)(8936002)(956004)(4326008)(36756003)(7416002)(186003)(83380400001)(2616005)(8676002)(6486002)(32563001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 0DRvAu29Rkqm7FL62I5hF1PUlotTY9HUb1HvYTeSmOkx0+Zxb8xCAfElsCBV5tiNS42Gn6iYB8wHKotW/+iBEl8Xy56ygCj+EhokFx6wajmVSMHHasOlsWbietN9nT39bjgO3h53Vx14gmOGb9YxXfEMip/olHCid2l4A7Ul5LV1yvmg4kOD7ndL5Zcd9+owNsFWGjoEmO2iCCRnGidIUOgnFVx9BW+Mf+9WLTTIiFBeEBzx2UXmuTeDABMWXiuFeAa+Irla4xMr7JEf3BNRAtenZOnxSqJ9ecF848f6O8SNbkso4olWHV4yKU/iezLHrxSHZ44JFQqqnE5ljVA46/2NNZDrRNDmf80yTinqK4IsYh7eG71hFMhOohwLyqBmHO68xffQDNgS1TJ0Se9tKHghHX6g8UvY26BuAG9160vrLrwcp3lj8UC4aMwOeLZwBb1CnR2bCeCZ719gDjv1ZYjJP2dOsge3OZ06I2bUsJwdcIdDAl2CItHDxgUujfdsjlk89YfmXzVYwf7QPfNOjLHDN5ez2K0EfW41AbHzJINlxy36bachUVT41r0uR+cc6r1Yv6XwoF6R6VWbyn/15Chirh+7Kk8OQHw8iwcoK6vegVITayZBWo+4UY/VDoVkrU2IU1HFknumnaFxw6YbaQ== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 8d357c0a-6302-4ff0-aedc-08d884d675f5 X-MS-Exchange-CrossTenant-AuthSource: AM8PR05MB7251.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2020 17:39:51.0823 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rqL/A1WpMyQBtZlZjUKDtAkRmCVcHjMFcd6512B4VUTzdJUJZGLEF8l/UOkq1Y9sglOds+we6W1c2914ewa7Hw62LMn4OENYMJ6AafWV1sU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5362 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_123954_044410_3429652E X-CRM114-Status: GOOD ( 17.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: andrew@lunn.ch, jason@lakedaemon.net, devicetree@vger.kernel.org, antoine.tenart@bootlin.com, viresh.kumar@linaro.org, rjw@rjwysocki.net, maxime.chevallier@bootlin.com, linux-ide@vger.kernel.org, thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Sven Auhagen Hello, There were already 4 versions of this series from Miquèl. I talked to Miquèl and I fixed up the last comments from v4. I am looking for feedback if this patch series is now ready to be merged and what should be further changed. Here is the original cover letter: Some time ago, when the initial support for Armada CP110 was contributed, the SATA core was not able to handle per-port interrupts. Despite the hardware reality, the device tree only represents one main interrupt for the two ports. Having both SATA ports enabled at the same time has been achieved by a hack in the ICU driver(1) that faked the use of the two interrupts, no matter which SATA port was in use. Now that the SATA core is ready to handle more than one interrupt, this series adds support for it in the libahci_platform code. The CP110 device tree must be updated to reflect the two SATA ports available and their respective interrupts. To do not break DT backward compatibility, the ahci_platform driver now embeds a special quirk which checks if the DT is valid (only for A8k compatible) and, if needed, creates the two missing sub-nodes, and assign them the relevant "reg" and "interrupts" properties, before removing the main SATA node "interrupts" one. (1) The ICU is an irqchip aggregating the CP110 (south-bridge) interrupts into MSIs for the AP806 (north-bridge). Best Sven Change from v2: * Fix commit message of custom irq init for host init Change from v1: * Add a patch to enable custom irq initialization in plattform init host * Add multi_irq_host_ack callback for the msi irq handler * Rework the ahci mvebu patch to initiate the irq and use the new multi_irq_host_ack to handle the custom irq code. Remove the custom irq handler and duplicate code. * Fix the armada8k backwards compatibility code * Rename AHCI_PLATFORM_A8K_QUIRK to AHCI_PLATFORM_ARMADA8K_QUIRK Miquel Raynal (5): ata: ahci: mvebu: Rename a platform data flag ata: ahci: mvebu: Support A8k compatible irqchip/irq-mvebu-icu: Remove the double SATA ports interrupt hack dt-bindings: ata: Update ahci bindings with possible per-port interrupts dt-bindings: ata: Update ahci_mvebu bindings Sven Auhagen (4): ata: libahci_platform: Do not try to get an IRQ when AHCI_HFLAG_MULTI_MSI is set ata: ahci: add ack callback to multi irq handler ata: ahci: mvebu: Add support for A8k legacy DT bindings arm64: dts: marvell: armada-cp110: Switch to per-port SATA interrupts .../devicetree/bindings/ata/ahci-platform.txt | 7 + arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 6 +- drivers/ata/ahci.h | 2 + drivers/ata/ahci_mvebu.c | 143 ++++++++++++++++-- drivers/ata/libahci.c | 4 + drivers/ata/libahci_platform.c | 19 ++- drivers/irqchip/irq-mvebu-icu.c | 18 --- include/linux/ahci_platform.h | 1 + 8 files changed, 160 insertions(+), 40 deletions(-)