Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2879437ybk; Tue, 12 May 2020 10:17:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykw6+XldHg8DjIHcvaMtKPZwhXpTNwWhi4aw4EGmt5ZKN5ZWuY5ZSK0KS9vqEx5iad96tA X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr6580506ejw.323.1589303833032; Tue, 12 May 2020 10:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589303833; cv=none; d=google.com; s=arc-20160816; b=DB4JOsF33yZJdJ5/tYpNCzJ9bv9UYLXgC/Nl/tt4MREq++9S73smf12rV0bYVJ5g2Y 6a3OWFRpZgHA4Vz9jo+tnLf0hze3j0YIUUVnvl8wwxEgj2R4gykyMGsE3BEbLK3yAaDQ uF858MPeehBMkyw5Od/2xbcCZCXTpWTmPZUGZRZYW0/KbiJHjuBZpO2vTvYW5fUN+9gm ObkC/HFbb/IgwoxQUtQdjqStn/heE4AWh4ENYT/bNdw8xQLFSJEXt88vgJWQl270dStU Ad0NZ2p5kbypvkbbHyRJ8iPu/7rVgbujyOx07lCs7MxQTS6hYbxhJvpMXRckjekQbZ3a P5cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mhXIarFJGq4Y7o1OACEMY+CWjpNuyCrBkx0AvhbST58=; b=EKoK3FkLB5c5khd0Uwfcp2ox7VlAzroiJYSjl3+lSLRnDhnshgE/hQYwEFNDf6wttD LXKxqFgqpblI94W56Auoh1s4YAGI17mkAtJZW/EF6pJ64jNpZByDTQJNX3nXoyjalRD/ q1grci4mDXiCprlJXh+WhaP44B5ph0hHsMHdI3cIqAGRJWdQceSVRJrz+3etkDrBb8c3 1mxf28svibOSgwT/oc5qdkqqT2Wu080t+ZuvsYq1jnzZW9R+tPsiFR8u0+wN8ZbUUTB5 DQeD7f/gP/UvLfOxglRwtNNXNaN4u0ow8Vat6r3yf+vy/7oSaBumir4dXzFVh2cmyAiH nvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Yf7kJP8T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx2si7370151edb.452.2020.05.12.10.16.49; Tue, 12 May 2020 10:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Yf7kJP8T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729377AbgELRMu (ORCPT + 99 others); Tue, 12 May 2020 13:12:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbgELRMt (ORCPT ); Tue, 12 May 2020 13:12:49 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79717C05BD09 for ; Tue, 12 May 2020 10:12:49 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id f189so8726826qkd.5 for ; Tue, 12 May 2020 10:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=mhXIarFJGq4Y7o1OACEMY+CWjpNuyCrBkx0AvhbST58=; b=Yf7kJP8TPOhuvK1QsyJFscagmDUQZK+pL/Y6v6hbW+/t58l6484/Vvudp5TmsD66Vt ZONixv6Z6GQNvj9xxmrbpKfZiHkllK9oOmUj03VSq3CnB7zHzAVUu0g4gk29zJgYIFnZ f5hjoYCB9IISk16xC5+FX5Ym/KaPYaNpy0AbL8QM25gdCBcZje70QIw0LwxqIbXeRMvH axOI0kqzxQOK6xsNSCwvEpQITI75sAyJ/ZvIz+WtxJdlU0TE/X+D1Vu5mySY0N6NauSH OyaW5sRpqz6N97CnWlBFBDTjsjG8qXyEDp73cGlwoZejHPhUyHE5YsJ4olE9CWho31jJ mLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mhXIarFJGq4Y7o1OACEMY+CWjpNuyCrBkx0AvhbST58=; b=eRs/nPGnQybWuAHAxzI8IVSVnr0FMbZy+Ss/k4GD9vpa0IIeuQ8KFOkov7ZFLu8e44 den2ik11YN84+kNFH5NIaGVHzT8sYMJA94L9LK7Ps/mwY+oHgGPPmZFff0ojZ2P1hFe8 dRx1S/DaFEjy4Nh9JWUCIa7Lrt6C2UTHsx2YJJGXRk8gsLOc/pQveQDriGdzN0pxjk1w 10ichdZbgnG65TJU8fKpWc2BTAL20uyGpWyVefkD4ddG3H9yIFFFGNKIT0Fd5LiE5ZYj 9qVhAPSaszGxQaFW0BPoPFg/Spty5FXVqSNi3Ifx9vq2ohiljIm0S4d6+KBRS/EnV5r4 BIrw== X-Gm-Message-State: AGi0PuZhjsJkhVYxA58rXjAyMya1xcAz7Mqvy+2W6SPQToB5u8Oibdty oXmuiGOS/+dSWqyZn3OFwM4PB/Oxz2PYiLR6D7YQIA== X-Received: by 2002:a37:5b47:: with SMTP id p68mr15632193qkb.120.1589303568424; Tue, 12 May 2020 10:12:48 -0700 (PDT) MIME-Version: 1.0 References: <20200430143019.1704-1-brgl@bgdev.pl> <20200430143019.1704-3-brgl@bgdev.pl> <6568919d6cc3ee8f602a58354e3aff44@kernel.org> In-Reply-To: <6568919d6cc3ee8f602a58354e3aff44@kernel.org> From: Bartosz Golaszewski Date: Tue, 12 May 2020 19:12:37 +0200 Message-ID: Subject: Re: [PATCH v4 2/2] irq/irq_sim: simplify the API To: Marc Zyngier Cc: Bartosz Golaszewski , Linus Walleij , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Thomas Gleixner , Jason Cooper , linux-gpio , LKML , linux-iio@vger.kernel.org, Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 12 maj 2020 o 17:37 Marc Zyngier napisa=C5=82(a): > > > - */ > > -int irq_sim_irqnum(struct irq_sim *sim, unsigned int offset) > > -{ > > - return sim->irqs[offset].irqnum; > > + irq_ctx =3D irq_data_get_irq_chip_data(irqd); > > + > > + if (irq_ctx->enabled) { > > + set_bit(irqd_to_hwirq(irqd), irq_ctx->work_ctx->pending); > > + irq_work_queue(&irq_ctx->work_ctx->work); > > + } > > } > > -EXPORT_SYMBOL_GPL(irq_sim_irqnum); > > +EXPORT_SYMBOL_GPL(irq_sim_fire); > > Rather than using an ad-hoc API to queue an interrupt, why don't you > actually implement the interface that already exists for this at > the irqchip level (irq_set_irqchip_state, which allows the pending > state to be set)? > Yes, this is great, thanks for bringing this to my attention. I can drop another function from the API. Bart