From: Bjorn Helgaas <bhelgaas@google.com>
To: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Randy Dunlap <rdunlap@infradead.org>,
Yinghai Lu <yinghai@kernel.org>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, Joerg Roedel <joro@8bytes.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Tony Luck <tony.luck@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [Patch Part3 v4 18/38] x86: irq_remapping: Clean up unsued code
Date: Mon, 1 Dec 2014 17:21:46 -0700 [thread overview]
Message-ID: <20141202002146.GA5825@google.com> (raw)
In-Reply-To: <1416901802-24211-19-git-send-email-jiang.liu@linux.intel.com>
s/unsued/unused/ in subject (here and other patches).
"Clean up" is slightly ambiguous; it could mean either "make better" or
"remove." "Remove unused code" would be less ambiguous.
On Tue, Nov 25, 2014 at 03:49:42PM +0800, Jiang Liu wrote:
> Now we have converted to hierarchy irqdomain, so clean up unused code.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> Tested-by: Joerg Roedel <jroedel@suse.de>
> ---
> arch/x86/include/asm/irq_remapping.h | 23 ----------------------
> arch/x86/kernel/apic/vector.c | 1 -
> drivers/iommu/irq_remapping.c | 36 ----------------------------------
> 3 files changed, 60 deletions(-)
>
> diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
> index de8470b6f36a..6ba243126b3b 100644
> --- a/arch/x86/include/asm/irq_remapping.h
> +++ b/arch/x86/include/asm/irq_remapping.h
> @@ -26,12 +26,7 @@
> #include <asm/hw_irq.h>
> #include <asm/io_apic.h>
>
> -struct IO_APIC_route_entry;
> -struct io_apic_irq_attr;
> -struct irq_chip;
> struct msi_msg;
> -struct pci_dev;
> -struct irq_cfg;
> struct irq_alloc_info;
>
> #ifdef CONFIG_IRQ_REMAP
> @@ -44,13 +39,7 @@ extern int irq_remapping_enable(void);
> extern void irq_remapping_disable(void);
> extern int irq_remapping_reenable(int);
> extern int irq_remap_enable_fault_handling(void);
> -extern void free_remapped_irq(int irq);
> extern void panic_if_irq_remap(const char *msg);
> -extern bool setup_remapped_irq(int irq,
> - struct irq_cfg *cfg,
> - struct irq_chip *chip);
> -
> -void irq_remap_modify_chip_defaults(struct irq_chip *chip);
>
> extern struct irq_domain *
> irq_remapping_get_ir_irq_domain( struct irq_alloc_info *info);
> @@ -77,23 +66,11 @@ static inline int irq_remapping_enable(void) { return -ENODEV; }
> static inline void irq_remapping_disable(void) { }
> static inline int irq_remapping_reenable(int eim) { return -ENODEV; }
> static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; }
> -static inline void free_remapped_irq(int irq) { }
>
> static inline void panic_if_irq_remap(const char *msg)
> {
> }
>
> -static inline void irq_remap_modify_chip_defaults(struct irq_chip *chip)
> -{
> -}
> -
> -static inline bool setup_remapped_irq(int irq,
> - struct irq_cfg *cfg,
> - struct irq_chip *chip)
> -{
> - return false;
> -}
> -
> static inline struct irq_domain *
> irq_remapping_get_ir_irq_domain(struct irq_alloc_info *info)
> {
> diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
> index 31dc4a871673..ca30365507a0 100644
> --- a/arch/x86/kernel/apic/vector.c
> +++ b/arch/x86/kernel/apic/vector.c
> @@ -283,7 +283,6 @@ static void x86_vector_free_irqs(struct irq_domain *domain,
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(x86_vector_domain, virq + i);
> if (irq_data && irq_data->chip_data) {
> - free_remapped_irq(virq);
> clear_irq_vector(virq + i, irq_data->chip_data);
> free_irq_cfg(irq_data->chip_data);
> #ifdef CONFIG_X86_IO_APIC
> diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
> index d175d6911821..3c3da04da8c5 100644
> --- a/drivers/iommu/irq_remapping.c
> +++ b/drivers/iommu/irq_remapping.c
> @@ -26,11 +26,6 @@ int no_x2apic_optout;
>
> static struct irq_remap_ops *remap_ops;
>
> -static bool irq_remapped(struct irq_cfg *cfg)
> -{
> - return (cfg->remapped == 1);
> -}
> -
> static void irq_remapping_disable_io_apic(void)
> {
> /*
> @@ -160,17 +155,6 @@ int __init irq_remap_enable_fault_handling(void)
> return remap_ops->enable_faulting();
> }
>
> -void free_remapped_irq(int irq)
> -{
> - struct irq_cfg *cfg = irq_cfg(irq);
> -
> - if (!remap_ops || !remap_ops->free_irq)
> - return;
> -
> - if (irq_remapped(cfg))
> - remap_ops->free_irq(irq);
> -}
> -
> void panic_if_irq_remap(const char *msg)
> {
> if (irq_remapping_enabled)
> @@ -195,26 +179,6 @@ void irq_remapping_print_chip(struct irq_data *data, struct seq_file *p)
> seq_printf(p, " %s", data->chip->name);
> }
>
> -static void ir_print_prefix(struct irq_data *data, struct seq_file *p)
> -{
> - seq_printf(p, " IR-%s", data->chip->name);
> -}
> -
> -void irq_remap_modify_chip_defaults(struct irq_chip *chip)
> -{
> - chip->irq_print_chip = ir_print_prefix;
> - chip->irq_ack = ir_ack_apic_edge;
> -}
> -
> -bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip)
> -{
> - if (!irq_remapped(cfg))
> - return false;
> - irq_set_status_flags(irq, IRQ_MOVE_PCNTXT);
> - irq_remap_modify_chip_defaults(chip);
> - return true;
> -}
> -
> /**
> * irq_remapping_get_ir_irq_domain - Get the irqdomain associated with the IOMMU
> * device serving request @info
> --
> 1.7.10.4
>
next prev parent reply other threads:[~2014-12-02 0:21 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 7:49 [Patch Part3 v4 00/38] Enable hierarchy irqdomian on x86 platforms Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 01/38] x86, intel-mid: Delay initialization of APB timer Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 02/38] x86, intel-mid, trivial: Refine code syntax for sfi_parse_mtmr() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 03/38] x86, irq: Kill unused pre_init_apic_IRQ0() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 04/38] x86, irq: Prepare IOAPIC interfaces to support hierarchy irqdomain Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 05/38] x86, irq: Implement callbacks to enable hierarchy irqdomain on IOAPICs Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 06/38] x86, irq: Refine the way to allocate irq_cfg for legacy IRQs Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 07/38] x86, irq: Simplify the way to print IOAPIC entry Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 08/38] x86, irq: Introduce helper functions to support hierarchy irqdomain for IOAPIC Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 09/38] x86, irq: Convert IOAPIC to use hierarchy irqdomain interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 10/38] x86, irq: Kill unused old IOAPIC " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 11/38] x86, irq: Kill unused struct mp_pin_info Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 12/38] x86, irq: Kill x86_io_apic_ops.print_entries and related interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 13/38] x86, irq: Kill x86_io_apic_ops.setup_entry " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 14/38] x86, irq: Kill x86_io_apic_ops.set_affinity " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 15/38] x86, irq: Kill x86_io_apic_ops.eoi_ioapic_pin " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 16/38] x86, irq: Kill GENERIC_IRQ_LEGACY_ALLOC_HWIRQ Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 17/38] x86: Clean up unused forward declarations in x86_init.h Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 18/38] x86: irq_remapping: Clean up unsued code Jiang Liu
2014-12-02 0:21 ` Bjorn Helgaas [this message]
2014-11-25 7:49 ` [Patch Part3 v4 19/38] iommu/vt-d: " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 20/38] iommu/amd: " Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 21/38] x86: irq_remapping: Clean up unused interfaces Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 22/38] x86, irq: Kill irq_cfg.irq_remapped Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 23/38] iommu/vt-d: Move struct irq_2_iommu into intel_irq_remapping.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 24/38] iommu/amd: Move struct irq_2_irte into amd_iommu.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 25/38] x86, irq: Move irq_cfg.irq_2_pin into io_apic.c Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 26/38] x86, irq: Kill struct io_apic_irq_attr Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 27/38] x86, irq: Kill x86_io_apic_ops.write and x86_io_apic_ops.modify Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 28/38] x86, irq: Clean up io_apic.h Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 29/38] x86, irq: Use cached IOAPIC entry instead of reading from hardware Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 30/38] x86, irq: Kill unused alloc_irq_and_cfg_at() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 31/38] x86, irq: Change functions only used in vector.c as static Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 32/38] x86, irq: Kill function apic_set_affinity() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 33/38] x86, irq: Move check of cfg->move_in_progress into send_cleanup_vector() Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 34/38] x86, irq: Move private data in struct irq_cfg into dedicated data structure Jiang Liu
2014-11-25 7:49 ` [Patch Part3 v4 35/38] x86, irq: Refine the way to calculate NR_IRQS Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 36/38] ACPI, irq, x86: Kill private function mp_register_gsi()/ mp_unregister_gsi() Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 37/38] x86, irq: Introduce mechanism to support different vector allocation policies Jiang Liu
2014-11-27 10:44 ` Thomas Gleixner
2014-11-27 16:22 ` Jiang Liu
2014-11-25 7:50 ` [Patch Part3 v4 38/38] x86, irq: Add kernel parameter vector_alloc to set CPU vector allocation policy Jiang Liu
2014-12-01 18:49 ` Bjorn Helgaas
2014-12-01 19:15 ` Daniel J Blueman
2014-12-01 23:45 ` Jiang Liu
2014-12-01 23:47 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141202002146.GA5825@google.com \
--to=bhelgaas@google.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jiang.liu@linux.intel.com \
--cc=joro@8bytes.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).