Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp116057rdb; Wed, 20 Dec 2023 07:40:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/9CxCQc92CTg7Ilk3H5HNrY1vNccWJLcetDDPLRvKlgyXJCrPxu7Fh8xTOXLaucq75Ao8 X-Received: by 2002:a17:902:db10:b0:1d3:efc4:8f2c with SMTP id m16-20020a170902db1000b001d3efc48f2cmr858999plx.27.1703086845407; Wed, 20 Dec 2023 07:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703086845; cv=none; d=google.com; s=arc-20160816; b=E8LRmFPyCU4bR13FsEpfoKkESbmi0eHbMf0RIkpi7cyISBH+lCa0DdKpUBxhnsRvmj g/Ly6VRxwbExYWrYp9qTe5hQ3Mfr8ZNEIVvflllaQvfp4sQ41NxJACq0jMynaKDQNI0P j/JJJlsUHToTCbSdWgb6PScXexq9w9scQu4BcUDYtQwZl27IdJHkW0pwpMGZ7y5xMXOt AbLrUDI36NMEP61AxPKAxSQBIeI5g9Yma/e+RLtWKwUpx5JsoXk1YMv15ABGhVTiKs/7 3DTiHg5IltkSMsHdwYYHUp170d4BVZOxrfJYOPGEHzOl+7Lfo3/JeHWvoLARtspoZJ1F Ed7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Y9iFr028EREK1oaBQImA/7q99uMdsBIIPfU7RbvNNbE=; fh=Y//JQkxsNuyJTOz/ZwNw1AOVWLGSQdWV+ZG0vA2iofo=; b=c4WuJr2+oUKT/XFio/k/KYjzs9otah34/JyHSaif+a9JtePt6H/thVEkwKwyLiZB52 /OoVwwCpEDK8JjLJ9w46ke1E/7d/pLljS/caskkFhbXyQYXThKhGJCtlbrqu/W4BgTFR naBTvHr+fEjQo1DyJ1UfyVPuHl+qcwrcSnODZdTQlqLfVtf/H0JIOFYred2k6a0kbK0K lPODL6YNvPL92GK+aOOC8gWN9pCECKT3ZwtCx9gB96EVsC+RpuvzRT41HVW6tN0PIHEL +etsywPPmJVZp3uLqUiBYWrOItzbh+94CMrdVDLA1iVJCeSUNmBlonV3BPbN3BzGVg8Y aYXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rrK7lUB6; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-7179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x15-20020a170902ec8f00b001d332818f37si15402180plg.188.2023.12.20.07.40.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:40:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rrK7lUB6; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel+bounces-7179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7179-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D8EEA283FF4 for ; Wed, 20 Dec 2023 15:39:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EEB1405CA; Wed, 20 Dec 2023 15:39:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rrK7lUB6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mNDnwMaH" X-Original-To: linux-kernel@vger.kernel.org Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F4C841209; Wed, 20 Dec 2023 15:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1703086248; 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=Y9iFr028EREK1oaBQImA/7q99uMdsBIIPfU7RbvNNbE=; b=rrK7lUB6LfzX/nEgjwgcK2JdTZ32TGxNl2drPcA9iydRGnQv3PDhTYD98rNyOgv7Jn+zE8 ChdR4MB4G01OyRzty+EYtxMJi1c4kaVZ7lCgneGBxtklbBb4MSyO671M4QRImsIs//jICL ERy71snMyJYfFw4kV3X/C7fZatz4sshVLNy9lRVPM2stENbgN62/PywOTAgPN8vl86eIzx gIxk02cLEFR4zIDROQe9nPX4sZw13XUWYba2o/PzOByEkbdIHAWRtNUOTSwmpyGXkrfib7 +m3xy+Tl2GQef32dGnl1P1kxG6nvdtP9Kz4EtA3KxN+qSLVo+K/KDu68x59j1w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1703086248; 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=Y9iFr028EREK1oaBQImA/7q99uMdsBIIPfU7RbvNNbE=; b=mNDnwMaH4Ca+ysH52LHOg7vmMV5zixgWy1X+kbodEWC0i11zR6uGmMobQG0PqynxQLxXtc fDgBEBOiAMsVJrDQ== To: =?utf-8?B?SmFtZXMgVGFpIFvmiLTlv5fls7Bd?= , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , kernel test robot , Dan Carpenter Subject: RE: [PATCH v3 2/6] irqchip: Add interrupt controller support for Realtek DHC SoCs In-Reply-To: References: <20231129054339.3054202-1-james.tai@realtek.com> <20231129054339.3054202-3-james.tai@realtek.com> <87cyvgsocp.ffs@tglx> Date: Wed, 20 Dec 2023 16:30:48 +0100 Message-ID: <87sf3wlwlz.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Dec 19 2023 at 03:15, James Tai [=E6=88=B4=E5=BF=97=E5=B3=B0] wrote: >>On Wed, Nov 29 2023 at 13:43, James Tai wrote: >>> +static inline void realtek_intc_clear_ints_bit(struct >>> +realtek_intc_data *data, int bit) { >>> + writel(BIT(bit) & ~1, data->base + data->info->isr_offset); >> >>That '& ~1' solves what aside of preventing bit 0 from being written? >> > The ISR register uses bit 0 to clear or set ISR status. > Write 0 to clear bits and write 1 to set bits. > Therefore, to clear the interrupt status, bit 0 should consistently be > set to '0'. And how does BIT(bit) with 1 <=3D bit <=3D 31 end up having bit 0 set? Also a comment explaining the reasoning here would be helpful.