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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 CA5C2C433E3 for ; Fri, 21 Aug 2020 20:08:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 912352076E for ; Fri, 21 Aug 2020 20:08:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XMlNAmFO"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CwpJDAyD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 912352076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k9DJq-0000oL-NL; Fri, 21 Aug 2020 20:07:22 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k9DJo-0000oG-Rw for xen-devel@lists.xenproject.org; Fri, 21 Aug 2020 20:07:20 +0000 X-Inumbo-ID: 76ea2f3f-afc5-414f-8451-25b7e255d9ba Received: from galois.linutronix.de (unknown [193.142.43.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 76ea2f3f-afc5-414f-8451-25b7e255d9ba; Fri, 21 Aug 2020 20:07:19 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598040438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAe+tKtD8q6kZ0TT9TyfkQSi0+F8aqLXObIBu28SBSM=; b=XMlNAmFOLtvwJD3paBg6nNK7V3bTink3/qTkA2vJYzHqkswjb9BT+WJpZdFAAvKwY9MFLK WSYUPB9wt4exrfD19bBNCo1UWHFVcWmquuhH5NH3qos2Wgu7BemquK8nxqWCJ8FX0eDrdl 6BMiKpsSHEKeLoH3Z9TrHOgI8G110/5XeovGvsnA/BDcDQnjEY/yDZiBGVM2IP/AW2bVAn LRVmrrtv5xEARSJZzqHE4FS+T1/1h6j0WlueTH02s33ZUUedEJtjj3tfIR1GOf0ygdkCAd KXK5M2Qrcyn3Oh4yeCklTx45/fXniknCDMa8PZ0u3iVY9Q1Haepji3AAcYbeiA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598040438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAe+tKtD8q6kZ0TT9TyfkQSi0+F8aqLXObIBu28SBSM=; b=CwpJDAyDc+BbA/isj/DsRfXK/N/xumAbM3Wb4N/Be29VIoMiEq7OLrYpQX1Nt38MRDuOqk 5uSjwpiW6/6wggAA== To: =?utf-8?B?SsO8cmdlbiBHcm/Dnw==?= , Sergei Temerkhanov Cc: xen-devel@lists.xenproject.org Subject: Re: [PATCH 0/2] Xen: Use a dedicated pointer for IRQ data In-Reply-To: References: <20200821071547.18894-1-s.temerkhanov@gmail.com> Date: Fri, 21 Aug 2020 22:07:17 +0200 Message-ID: <871rjzsqyy.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Fri, Aug 21 2020 at 14:17, J=C3=BCrgen Gro=C3=9F wrote: > On 21.08.20 13:19, Sergei Temerkhanov wrote: >>> Did you see any specific problem where handler_data is written by >> another component? >>=20 >> I've posted this series in the thread >> https://lists.xenproject.org/archives/html/xen-devel/2020-08/msg00957.ht= ml >> where the problem is caused exactly by that behavior >>=20 >>> In case this is a real problem I don't think your approach will be acce= pted >> Any comments/suggestions are welcome > > Not sure if the IRQ maintainers agree with me, but I would add > a set_handler_data and get_handler_data function pointer to > struct irq_chip. If those are set I'd call them for writing/reading > handler_data instead doing it directly. Xen could then specify those > and add a field to its own handler data struct for storing the data > of the driver coming later. > > Xen would need another accessor function for its own primary data, > of course. > > Adding the IRQ maintainer as he might have an opinion here. :-) Without seeing the patches, and no I'm not going to grab them from a web archive, I'd say they are wrong :) Fiddling in irqchip is wrong to begin with. int irq_set_handler_data(unsigned int irq, void *data); static inline void *irq_get_handler_data(unsigned int irq) static inline void *irq_data_get_irq_handler_data(struct irq_data *d) are accessors to handler_data. Am I missing something? Thanks, tglx