Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp895589pxu; Wed, 2 Dec 2020 06:14:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEWmeDX3gRcSJ6CxC9I2RiPfgqK32B5/eUH4Ryp0P7L3U72mz4292ao0yXTd+4hC4A/8au X-Received: by 2002:aa7:d846:: with SMTP id f6mr75547eds.55.1606918462050; Wed, 02 Dec 2020 06:14:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606918462; cv=none; d=google.com; s=arc-20160816; b=ntL19DCSD4PopL3OWUYqYqpqKM/2jqv7G9+qSbx7r9ic/UXMJqOq7XviXwU2vrg+65 locbWjg5hEaHDd7m/3FR5dpeKDDrW4lUUkSgj1ODH8rt4MG2OHO2q1XqA4mV23d5TZEI 6SIxD75tlNAty8JLa2U5byKFTZ/iJtnwr8GUmYtdAivy4tlV/Blb8RjaUzcyZ8qxFNY6 z1ANtSrR4QRUmaWBgo/EZF/TR3GJLzdsP3/ubRaLM30J4/CwE497I0Nl9pVNX3wkDo0v 1RMi+k4WSqRkcytqqvPnAbGf3xU+VJMBeatG0z/hn4lNsY2t0IsAlAyXzKEdtU5lU7wU VT5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VFmvo9qAPDBPuqmhfbmjzQYI5Z9eFTcq3dsoBi3Wl9w=; b=wcFnak4r1cgNGqwDmLAUT8g9RERUSwBq2gKhUUWA1FjoA1HBMDuZSuZGbRzt09apOS oZ7YIkd58tVo1FmVt98OqkhuolGhluQCZWgRoHuy9DV8rNaZvTMtw5g6PEVXj6v+AIbv eQ7F/Bw/Yc2K9Hk+goxO8I+mfmDx5+SBYR2uXiMHQBKIMb03VQKqdmen0zeNMErMac6D tQ2iApscYphf1ofQYLRMFX7zFJpe3wS57qYU6PHftQoXmK38pQhpqpOor7PbTV9ziiMR Zcw3OwghX0nNzPXmB6YnYxAmu2XyYnBFtsjpSJWL+rslF6hENdEneG4o5rVYlV8Bpjuy DKhA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 93si36113edm.94.2020.12.02.06.13.58; Wed, 02 Dec 2020 06:14:22 -0800 (PST) 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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730197AbgLBOLw (ORCPT + 99 others); Wed, 2 Dec 2020 09:11:52 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34811 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728194AbgLBOLv (ORCPT ); Wed, 2 Dec 2020 09:11:51 -0500 Received: by mail-wr1-f68.google.com with SMTP id k14so4142842wrn.1; Wed, 02 Dec 2020 06:11:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=VFmvo9qAPDBPuqmhfbmjzQYI5Z9eFTcq3dsoBi3Wl9w=; b=QCOmxSWOTiFtxi3oURXsJazbEgKZ6uL+LCQOY3XTsCmJOONtUSVxa39+uWo5Oi82pz ZhfdNl3+XubxZGAXnzkmUkng34O1O3KkLOybvxr/BQo/5TcqlpWO59I2FI82RqveNoDZ geNUDn0tn5S2VrYqYGMrvc7qgtcbVHMzzHEO/mjkh06AHfgEEFu8RHV2pDtgDZRItqkG 276qT5BmxhrrpmJ/H0XibbPWcZALV0WpUqLIxRD4tV6ei8bsRWy6ihWuLZ8sHwSgDHsJ hfDylvt1yesGJ5uGT53RE3rM2XUz9SQfLNg8liLdxvBaq9fhuphXYtbUws4V+pG7tpyB Re+Q== X-Gm-Message-State: AOAM531Chkm/PyeXT9QMR9WgS0Bsl3W15EKJuuGk87GAkG7Q+Kr6ehBF fnCQiMKYk+LR4cQKcvCRWOU= X-Received: by 2002:a5d:6783:: with SMTP id v3mr3689699wru.45.1606918269807; Wed, 02 Dec 2020 06:11:09 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id q17sm2565999wro.36.2020.12.02.06.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 06:11:09 -0800 (PST) Date: Wed, 2 Dec 2020 14:11:07 +0000 From: Wei Liu To: Andy Shevchenko Cc: Wei Liu , Linux on Hyper-V List , virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Joerg Roedel , Bjorn Helgaas , Andy Shevchenko , Jon Derrick , YueHaibing , "Gustavo A. R. Silva" Subject: Re: [PATCH v3 16/17] x86/ioapic: export a few functions and data structures via io_apic.h Message-ID: <20201202141107.covsx4ugipuyl6he@liuwe-devbox-debian-v2> References: <20201124170744.112180-1-wei.liu@kernel.org> <20201124170744.112180-17-wei.liu@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 25, 2020 at 12:26:12PM +0200, Andy Shevchenko wrote: > On Wed, Nov 25, 2020 at 1:46 AM Wei Liu wrote: > > > > We are about to implement an irqchip for IO-APIC when Linux runs as root > > on Microsoft Hypervisor. At the same time we would like to reuse > > existing code as much as possible. > > > > Move mp_chip_data to io_apic.h and make a few helper functions > > non-static. > > > +struct mp_chip_data { > > + struct list_head irq_2_pin; > > + struct IO_APIC_route_entry entry; > > + int trigger; > > + int polarity; > > + u32 count; > > + bool isa_irq; > > +}; > > Since I see only this patch I am puzzled why you need to have this in > the header? > Maybe a couple of words in the commit message to elaborate? Andy, does the following answer your question? "The chip_data stashed in IO-APIC's irq chip is mp_chip_data. The implementation of Microsoft Hypevisor's IO-APIC irqdomain would like to manipulate that data structure, so move it to io_apic.h as well." If that's good enough, I can add it to the commit message. Wei.