Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1027422rdb; Mon, 19 Feb 2024 01:36:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWn0/pmGToAAcg5COsNf9AFUXcNkuGvMNnrcmhwk89RyT86XJNjxanTpfMpzTOb5h5IIVXYqg2iP+mbeJECKiKBqt9TgeGEyO+bOnNkMw== X-Google-Smtp-Source: AGHT+IHRAOpeWet5XNp42jzm7FwZF3aQLSsBKs72+wsaUczBmX0zdQG47Gq3HfChrffGzcW4Loi3 X-Received: by 2002:a05:6a00:32ca:b0:6e1:33ca:aaa0 with SMTP id cl10-20020a056a0032ca00b006e133caaaa0mr12621158pfb.22.1708335361781; Mon, 19 Feb 2024 01:36:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708335361; cv=pass; d=google.com; s=arc-20160816; b=SSL/UqHRZmPgaIunVJM3o3mlwk06U6ywJcKuJfRwe5LnlRIf5Loza6JkvApEWr9wC9 nmXMm/A1n2FvZlIcHExdoym5EXF0H3c8p9udD3ygFL+Ebkefd4l/qaRlUlk3D1f6IlX1 RjWY7LEmx5olnnDWkUWdmJMYA/F8vi64zH+1MjNRFdq4S+HwwPjF4rzXiitKErwnQs9V m02LtLu4a2qWDirX5rMVZBSyMsDX61kv07qUgGDMgwNxZUzB2txZBQUfAggxJncpsQrV JvaVDt0DDmdy2D7u18tRJ7ggCZLaBZDFDSLHI+oilPmCLUtb7t+zsbwzGQX3hMfLioyq XouA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+YXFCVZu0xeTYReG8iTx+B6CeSN2wh50vnPVuE5JAz4=; fh=/IcKPd4NRys+GWCQE4QjLAHeZxbOriLbtoBkwiByGd8=; b=MVG56nHpBRm7TQZIIJQluGEMgVTbl06nZHEfsI8aFZW5qewElmc1op6sCCm4FJoJEZ 972ZJ66nhx8GioS2zhZkGI61vJYdAIx5SaKw43Cuvzc0tv4rdypc41eLwiIMvTZztTyX edAZmxkj3J2URz1te1W9Ct8T0onUUJzwk7lS/mE4eoIrIbxO9yNE7ScZCAxHZe23xbMt 8fXb1va+tdWgnCcRMi8ey3Nze2KpS5pm6KBUF+Nu1pYdoCoV5fG6VtWGAwVytrSpKJ2I HuGDqR5WSeyV82BaJMgFqTW9wSdiJ0/3AuCAk8Ls6G7sNb1dLhFqFr5P1NxG2h6yOODD mNiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=HVtrs0Wg; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-71036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71036-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c5-20020a056a00008500b006dfecfeab74si4243384pfj.337.2024.02.19.01.36.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 01:36:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=HVtrs0Wg; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-71036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71036-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4312EB20CF6 for ; Mon, 19 Feb 2024 09:35:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A16D92377A; Mon, 19 Feb 2024 09:35:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="HVtrs0Wg" Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20A7E23750 for ; Mon, 19 Feb 2024 09:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708335342; cv=none; b=NCrr+J3Fiys9oDneUNOsEPikSXZWCsZkPYc3T5uz9qIqUCiMZFrmsLsyx2htoxbLbT4kBGOWpbzsjL14Ggl9daqVbd6KMcn/LRpCy80bMODP+8P2YYCTmj7j0PcCNWMY3bWEdpmkN75JaXNERn6o9wd8DPq8lsUmT0YmRdIbszs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708335342; c=relaxed/simple; bh=DV1eMWrP1yHwvBkjma46GQoQqytaGvsplBfPvrYl2BU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=f6you6aCw0FGb6o7YNQxz0b62DvBxBuGD0wXTVXVRGGIDx+11wAZCVPreVmLET4u5TkAiwVVtbJWTli3ZYJ5lvMx9nZ+XSp9QFsnsBH2NzTqEEf/RdAk9O3T6iOeCY2oXmqyx0u0UbrqFyf8zEeKuWXsD0wYAnNA4BqmomTxTWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=HVtrs0Wg; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5112bd13a4fso5483108e87.0 for ; Mon, 19 Feb 2024 01:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1708335339; x=1708940139; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+YXFCVZu0xeTYReG8iTx+B6CeSN2wh50vnPVuE5JAz4=; b=HVtrs0WgnjOmb9TeV0Zb8SWODXohlylAuhVcnYv0CU5JX9w988yxn5VU/Kb/oyaoSw t8Nz2zKjMcESweRQBqHJeqhvu2RbSj81jdjSCwv8TVmJ/V6DSJIRZiI6QDHTs96QKHbd BNeDyzMN0qMzMARzNNaoYUC/FKOdKEhOr7Opr/A9InlUz6wxepa7HFMPGmFfcKrBt9IM omaKtUsPMNpu8RuxFHrHZKd1yPdIRCYIA8FR2g05UzyueZci9XGiW0EgkDY70v0lQ7kw P+29GIgaDbcmpmv2Aj2ygdkqdaeJQo6e0ucYHT87m98KTGiNcokn/kNKDk5mvNX+QeXx KmMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708335339; x=1708940139; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+YXFCVZu0xeTYReG8iTx+B6CeSN2wh50vnPVuE5JAz4=; b=IV79G1ROSbrB+irtaHTr0JRza1gDruHNhmSxT23GCTCEYDQKussORj6OUeL0JZImRj a3IDSdhMBaXT6jE53jMbRRyumc+DFZkuO+EYs7CoLkejYuIOsR2jcZ+CLgQ1JhjTJEN+ KuOulbUi6CbCsbKi54OFb9p0Hhc5j/O4k7OQIwVE4g0NSD8Ttrmiw3tW/S/XpfGSztmz 3NmeKyzM6sqjcsLJ2fPyCDuzyGf5MLHS2kCVSz13YNZBOYSB+jPTsViiME9fT1oe/bJn VvCez29KRH56yCPnpJNNW+fzh3WXL1hcgG/b5KzMygn24vwbJNHLJVyqq76TV6sThgh+ WaHQ== X-Forwarded-Encrypted: i=1; AJvYcCWW92rP4f75c1S8/uOaose5ws+W76fCoCna31VwC/ciEUNHhMA05rVycRt7NKjwDaaTyKW7P9rkzLpwJB/7l4jhUvQOX5TOIec3u5fX X-Gm-Message-State: AOJu0YwiJ2LNPKZsYa/qV1jDisrGhI8AmOvPhVvFER5IQ7YOoqXIKuJP 8embN8bwVOGWRYLAsHl0/P0/Buu4XLLa5fKEL7gwiC6KuFMkwGAE7oObIXtBWM/fohq2splqjEV LMgU35vUdkKLja++KL1CbW2WpD1EE3FT0SXvELQ== X-Received: by 2002:a05:6512:3254:b0:512:bb2c:9221 with SMTP id c20-20020a056512325400b00512bb2c9221mr306467lfr.34.1708335339012; Mon, 19 Feb 2024 01:35:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240127161753.114685-1-apatel@ventanamicro.com> <20240127161753.114685-23-apatel@ventanamicro.com> <875xyocewt.ffs@tglx> In-Reply-To: <875xyocewt.ffs@tglx> From: Anup Patel Date: Mon, 19 Feb 2024 15:05:27 +0530 Message-ID: Subject: Re: [PATCH v12 22/25] irqchip: Add RISC-V advanced PLIC driver for direct-mode To: Thomas Gleixner Cc: Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley , Marc Zyngier , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 17, 2024 at 2:20=E2=80=AFAM Thomas Gleixner wrote: > > On Sat, Jan 27 2024 at 21:47, Anup Patel wrote: > > +static int aplic_direct_irqdomain_translate(struct irq_domain *d, > > + struct irq_fwspec *fwspec, > > + unsigned long *hwirq, > > + unsigned int *type) > > Please align the arguments to the first argument of the first line and > use the 100 characters, i.e. > > static int aplic_direct_irqdomain_translate(struct irq_domain *d, struct = irq_fwspec *fwspec, > unsigned long *hwirq, unsigne= d int *type) > { > > All over the place. Okay, I will update. > > > +{ > > + struct aplic_priv *priv =3D d->host_data; > > + > > + return aplic_irqdomain_translate(fwspec, priv->gsi_base, > > + hwirq, type); > > +} > > + > > +static int aplic_direct_irqdomain_alloc(struct irq_domain *domain, > > + unsigned int virq, unsigned int nr_i= rqs, > > + void *arg) > > +{ > > + int i, ret; > > + unsigned int type; > > + irq_hw_number_t hwirq; > > + struct irq_fwspec *fwspec =3D arg; > > + struct aplic_priv *priv =3D domain->host_data; > > + struct aplic_direct *direct =3D > > + container_of(priv, struct aplic_direct, priv); > > Variable ordering. Please make this consistent according to documentation= . Okay, I will update. > > > + ret =3D aplic_irqdomain_translate(fwspec, priv->gsi_base, > > + &hwirq, &type); > > + if (ret) > > + return ret; > > + > > + for (i =3D 0; i < nr_irqs; i++) { > > + irq_domain_set_info(domain, virq + i, hwirq + i, > > + &aplic_direct_chip, priv, > > + handle_fasteoi_irq, NULL, NULL); > > + irq_set_affinity(virq + i, &direct->lmask); > > + /* See the reason described in aplic_msi_irqdomain_alloc(= ) */ > > I still have to understand that "reason". :) Like mentioned on another patch, I will drop it for now. If required then we can bring it back as a separate patch with clear reasoning. > > > + irq_set_status_flags(virq + i, IRQ_DISABLE_UNLAZY); > > + } > > Thanks, > > tglx Regards, Anup