Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4701724iob; Sun, 8 May 2022 22:32:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPgmkTYsKRVDGOWpWzk96RZQdWLCEx21eNqi5sp2pwquAsTZWV7QqrpEh8cevEHObU3MNm X-Received: by 2002:a17:902:ca92:b0:15d:2b3d:641a with SMTP id v18-20020a170902ca9200b0015d2b3d641amr14449953pld.168.1652074376582; Sun, 08 May 2022 22:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652074376; cv=none; d=google.com; s=arc-20160816; b=DgHHYRTHzgaNWPw8Qi+B6uMqtoiq3vQ1hfvEQSzhVvI0AeoU8fE1Mq8/cK7casyTKg nJBAt5SVkXQZ8GOanT12AzX0c32MyxGoeLSsq6n80JsNpleiuV+FZBa9f9ylsJEH6Q+3 k+/ZOJa0Unjw4c175ZVmtkBxfdDHERTTtsWPwPXIh+NewkFzR7ZRu+DnEi0cXBg6q5eG x02IVkqtPp1UZwY5sVh3+r0KcGnn86fqy8afg//wZbUy6FSRtBncHeEzSTdITTekaqem Z+Gxkf2Kd8SYV030mOYbQCEED5KNkXbFvB/daEFWhN/2T2o3mVaTRz9i2CgFDJt1yR2N GLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=hPigNHr8wXW4Jsp9L+zcdiLLC2xp5wKYQoiAjHdLkb0=; b=hdkwMRWKddCOppgiADzcxnraculhM/e1KoeAjvb3hHfY0REPDOyGDTkWPjfv9ACtzx 09becKMyjZZT3FnCSR8N1h2w080pVeOTrli67Zkfc5pfrTcgyHggyj1dNoKOa7eb/NSP IATm5GIRmF2P9PHUVcO0QBLyStzsj2QRoBM2cLCBD8hwxnqxGKfpPT7iZr6KSfk9f9+V VpzEXYe5o5yZQRDNRGAwhPFiocaiSwbuNRAtSQorXWq2Q8FCtW2J74Yy052wPldj4IFv YEKBla+6TTkSEhikUz7CWItbqB7K1jnPVIFrdqiXbEF4rQ2nFOyNHrX/Ipf/29JaQMks ayzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Xc8Vtd93; dkim=neutral (no key) header.i=@linutronix.de header.b="/4l7akva"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n17-20020a170902d2d100b00153b2d1649asi11727647plc.162.2022.05.08.22.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 22:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Xc8Vtd93; dkim=neutral (no key) header.i=@linutronix.de header.b="/4l7akva"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 230E7149169; Sun, 8 May 2022 22:32:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354233AbiEFT5m (ORCPT + 99 others); Fri, 6 May 2022 15:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352249AbiEFT5k (ORCPT ); Fri, 6 May 2022 15:57:40 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB481E3C0 for ; Fri, 6 May 2022 12:53:56 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1651866834; 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: in-reply-to:in-reply-to:references:references; bh=hPigNHr8wXW4Jsp9L+zcdiLLC2xp5wKYQoiAjHdLkb0=; b=Xc8Vtd935tKSHJ4TItbPhom70GX4iR+XaOHyoZEbq2TCP4h9WjKpN0MVzmsUbMnujiBgnV WXGzehvrucSX1BoXOdNpoMb3s0YNBoPdGbKtAB3wDRyptT25vNwG7QcC7LwRl3B15XR6VM FhGG5jK12XCNGha0igmSaWXXc2p4A3H1NRfSABcL1Z3IwAXCO4O3qpx16YQ/THdTjg92ya In409B3HY2BR55Mv7J/T3Np4Rdy7VMWpG58IDPN5+hY6NlLD7uyzePgQU6EvXGIFGFCODZ 3pB/pK2v3RdJoDZ1aaYSIcYs0qALgfVW7BGlvJCXH5N/7ExJVtGCxVmBC9jnxw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1651866834; 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: in-reply-to:in-reply-to:references:references; bh=hPigNHr8wXW4Jsp9L+zcdiLLC2xp5wKYQoiAjHdLkb0=; b=/4l7akvaVCpYSimscxE6emXgo2DDhYqJsbAjKJILCBQFs5NLOHNmvvAauEvq153gAwkORH f5cYHMQqOtGE5zCA== To: Ricardo Neri , x86@kernel.org Cc: Tony Luck , Andi Kleen , Stephane Eranian , Andrew Morton , Joerg Roedel , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Nicholas Piggin , "Ravi V. Shankar" , Ricardo Neri , iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: Re: [PATCH v6 02/29] x86/apic: Add irq_cfg::delivery_mode In-Reply-To: <20220506000008.30892-3-ricardo.neri-calderon@linux.intel.com> References: <20220506000008.30892-1-ricardo.neri-calderon@linux.intel.com> <20220506000008.30892-3-ricardo.neri-calderon@linux.intel.com> Date: Fri, 06 May 2022 21:53:54 +0200 Message-ID: <875ymih1yl.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > Currently, the delivery mode of all interrupts is set to the mode of the > APIC driver in use. There are no restrictions in hardware to configure the > delivery mode of each interrupt individually. Also, certain IRQs need > to be s/IRQ/interrupt/ Changelogs can do without acronyms. > configured with a specific delivery mode (e.g., NMI). > > Add a new member, delivery_mode, to struct irq_cfg. Subsequent changesets > will update every irq_domain to set the delivery mode of each IRQ to that > specified in its irq_cfg data. > > To keep the current behavior, when allocating an IRQ in the root > domain The root domain does not allocate an interrupt. The root domain allocates a vector for an interrupt. There is a very clear and technical destinction. Can you please be more careful about the wording? > --- a/arch/x86/kernel/apic/vector.c > +++ b/arch/x86/kernel/apic/vector.c > @@ -567,6 +567,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, > irqd->chip_data = apicd; > irqd->hwirq = virq + i; > irqd_set_single_target(irqd); > + Stray newline. > /* > * Prevent that any of these interrupts is invoked in > * non interrupt context via e.g. generic_handle_irq() > @@ -577,6 +578,14 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, > /* Don't invoke affinity setter on deactivated interrupts */ > irqd_set_affinity_on_activate(irqd); > > + /* > + * Initialize the delivery mode of this irq to match the s/irq/interrupt/ > + * default delivery mode of the APIC. Children irq domains > + * may take the delivery mode from the individual irq > + * configuration rather than from the APIC driver. > + */ > + apicd->hw_irq_cfg.delivery_mode = apic->delivery_mode; > + > /* > * Legacy vectors are already assigned when the IOAPIC > * takes them over. They stay on the same vector. This is