Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2708929pxb; Fri, 8 Oct 2021 13:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUVtwO4wgBqNqvHwm3nowxE2KmV2DeYtQs+T+icz88k2NOjH3KPtfwAo0zCevqFfAR9+TT X-Received: by 2002:a50:bf0f:: with SMTP id f15mr17717039edk.43.1633725029655; Fri, 08 Oct 2021 13:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633725029; cv=none; d=google.com; s=arc-20160816; b=kiWynMTkyiJM8nLiBtHaZUvGMPUGhFv79KcyuP1xVGNduskNIwHyYyzq+sYcVlNFhc iI40nOwH2o6uKNp3kmdohQGkQMZtGQeRDcFc5IOC9nZP+awX4oyuCBSTLk2EAmHotokX GtXBQWAc/Cgo0u2NsvgR85EnkOYYfVYzJVO6scu9Yx5QJrZgogkzb328d17PumIagk2y 9RBez2qVFCEroradsYSjIKaNPTPgTtS/RtgAGy+KtuTsF/bGCUjlyVRcRK+WRAwJtzen EZYrj2HlO70tV+c7KpMLuVQwBKUdp2jECsaHujeTuZbh6wnoU7lb0q45ajkAamdoQuw1 37xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3JRsd2+QOd6FjI2etkPN+8NW1rvg7nW8l/Yu1fBl2JQ=; b=MkLTkMfEQIkx6q6/vVx/GgOLgG2SgyzhSJYzC9PssmTo7Bi25Lj0RrQLPV3Div6LAc SnTDXryNzD+7D4MsMjyxl+W0oSeby0NzyNkhy8+LJbD/OYYBK+rZuLc6QbIzx0/p5jFl obmxv3JrFTTowXnSSzoC8L0Wkqu9qrXbnuYPK46Yi2157/dck26/n9DbJcp8p+NsrZf+ bZdRctpOxdpVdX7OWWMAP4dndArQvbentre4CdRLj1b/AL3laIe4aIbXD9EfwR5hX/zk ZFZNiQP6uLv3PVCGutg1iWXtsRBEWhaVjzpEe3TM1JTSqMuyYN8JoIsH9di2oJEGod6O bHPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bM9y67om; 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 r14si514153ejc.394.2021.10.08.13.30.06; Fri, 08 Oct 2021 13:30:29 -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=@linux-foundation.org header.s=google header.b=bM9y67om; 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 S242687AbhJHU2I (ORCPT + 99 others); Fri, 8 Oct 2021 16:28:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242366AbhJHU2G (ORCPT ); Fri, 8 Oct 2021 16:28:06 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5556C061570 for ; Fri, 8 Oct 2021 13:26:10 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id t9so42691903lfd.1 for ; Fri, 08 Oct 2021 13:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3JRsd2+QOd6FjI2etkPN+8NW1rvg7nW8l/Yu1fBl2JQ=; b=bM9y67omMTUVGhAfDEpfUJJGhYF2MTS/5j06GPIUsOH0tcb2Pf2hwW/tvUyZns3e7T 6AEGHP7kudrikucEkq+2tefCcZd/2ed8wfPX3xXR6DhdugS17wCFchk+S9JI1bIufiG1 wfeewC+giLpyUkFDRxDBy9HwOwGvTI5K0I27M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3JRsd2+QOd6FjI2etkPN+8NW1rvg7nW8l/Yu1fBl2JQ=; b=5nW/6lvkr6L3gKDXYHwCKYjfwVtxsn4eL134PGAH1uUIPMgibls8up8ddX4S1jhElZ iHi0CT4n1PLmKgvdatDsShvcOXplmbtMKrPYV6XOUHFExtZkONUCwBCjo3cCyLKSVNZ0 ULJRVK5+ox0fRxoi70kKiAhxzmEOs4alyw1FWVCxiWGK2QNKM2W/K6SgTshJDkGc2nAC eX1oOnVZeb4ta0ijf0C79iRbG6I+att3LwIIA14QbZvv5E7dsfY7DPiYDTFwDfWwDxFx SWuXT5EC/mnY0wycpxjsCZjMpreo+Li6AOcdNN0n5ng515Yzw2839sdi0W0Wa9rBZmJR AbeA== X-Gm-Message-State: AOAM533JulTbI5tYHXVvBBxGbaQeT4Y0dEhELxZp1xdFFO+kTCQimfp8 kQXG+OoT9VqJiTRBmFgvB+RhtkblSNnOC51m X-Received: by 2002:a2e:6f12:: with SMTP id k18mr5584097ljc.378.1633724768760; Fri, 08 Oct 2021 13:26:08 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id t192sm26282lff.174.2021.10.08.13.26.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Oct 2021 13:26:07 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id z11so35279101lfj.4 for ; Fri, 08 Oct 2021 13:26:07 -0700 (PDT) X-Received: by 2002:a05:6512:3d26:: with SMTP id d38mr11933742lfv.474.1633724767417; Fri, 08 Oct 2021 13:26:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Fri, 8 Oct 2021 13:25:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] arm64 fixes for 5.15-rc5 To: Catalin Marinas , Thomas Gleixner Cc: Will Deacon , Marc Zyngier , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 8, 2021 at 11:37 AM Catalin Marinas wrote: > > Pingfan Liu (2): > kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch optional > arm64: entry: avoid double-accounting IRQ RCU entry Ugh. This is *really* ugly. And it seems to be going exactly the wrong way. I read the commit descriptions, and it still doesn't answer the fundamental question of why arm64 needs to do the accounting in arch-specific code, and disable the generic code. It says To fix this, we must perform all the accounting from the architecture code. We prevent the IRQ domain code from performing any accounting by selecting HAVE_ARCH_IRQENTRY, and must call irq_enter_rcu() and irq_exit_rcu() around invoking the root IRQ handler. but at no point does it actually explain *why* all the accounting needs to be done by the architecture code. Yes, yes, I read the previous paragraph. But why isn't the fix to just stop doing the double accounting in the arm64 specific code? Instead it doubles down on that "let's do this non-arch-specific accounting in arch-specific code", making the common code uglier and weaker. I initially pulled this, and then I just unpulled in disgust. Please explain why arm64 does this bad thing, and why the fix isn't "fix arm64", but instead "make the generic code uglier and harder to maintain and follow". Really, from all the explanations those commits give, the natural thing to do would be "just fix arm64". So if that really isn't the answer, then the explanations are clearly lacking. Linus