From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61F22C46477 for ; Tue, 18 Jun 2019 22:48:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4337A20873 for ; Tue, 18 Jun 2019 22:48:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730897AbfFRWsB (ORCPT ); Tue, 18 Jun 2019 18:48:01 -0400 Received: from mga07.intel.com ([134.134.136.100]:48766 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730341AbfFRWsA (ORCPT ); Tue, 18 Jun 2019 18:48:00 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2019 15:48:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,390,1557212400"; d="scan'208";a="160196152" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga008.fm.intel.com with ESMTP; 18 Jun 2019 15:47:59 -0700 Date: Tue, 18 Jun 2019 15:47:38 -0700 From: Ricardo Neri To: Thomas Gleixner Cc: Ingo Molnar , Borislav Petkov , Ashok Raj , Joerg Roedel , Andi Kleen , Peter Zijlstra , Suravee Suthikulpanit , Stephane Eranian , "Ravi V. Shankar" , Randy Dunlap , x86@kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Ricardo Neri , Tony Luck , Jacob Pan , Juergen Gross , Bjorn Helgaas , Wincy Van , Kate Stewart , Philippe Ombredanne , "Eric W. Biederman" , Baoquan He , Jan Kiszka , Lu Baolu Subject: Re: [RFC PATCH v4 18/21] x86/apic: Add a parameter for the APIC delivery mode Message-ID: <20190618224738.GC30488@ranerica-svr.sc.intel.com> References: <1558660583-28561-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1558660583-28561-19-git-send-email-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 16, 2019 at 11:55:03AM +0200, Thomas Gleixner wrote: > On Thu, 23 May 2019, Ricardo Neri wrote: > > > > struct irq_cfg { > > - unsigned int dest_apicid; > > - unsigned int vector; > > + unsigned int dest_apicid; > > + unsigned int vector; > > + enum ioapic_irq_destination_types delivery_mode; > > And how is this related to IOAPIC? In my view, IOAPICs can also be programmed with a delivery mode. Mode values are the same for MSI interrupts. > I know this enum exists already, but in > connection with MSI this does not make any sense at all. Is the issue here the name of the enumeration? > > > + > > + /* > > + * Initialize the delivery mode of this irq to match the > > + * default delivery mode of the APIC. This is useful for > > + * children irq domains which want to take the delivery > > + * mode from the individual irq configuration rather > > + * than from the APIC. > > + */ > > + apicd->hw_irq_cfg.delivery_mode = apic->irq_delivery_mode; > > And here it's initialized from apic->irq_delivery_mode, which is an > u32. Intuitive and consistent - NOT! Yes, this is wrong. Then should the member in the structure above be an u32 instead of enum ioapic_irq_destination_types? Thanks and BR, Ricardo