1. 21 Jun, 2014 40 commits
    • Jiang Liu's avatar
      x86, irq: Simplify the way to handle ISA IRQ · 16ee7b3d
      Jiang Liu authored
      On startup, setup_IO_APIC_irqs() will program all IOAPIC pins for ISA
      IRQs. Later when mp_map_pin_to_irq() is called, it just returns ISA IRQ
      number without programming corresponding IOAPIC pin.
      
      This patch consolidates the way to program IOAPIC pins for both ISA and
      non-ISA IRQs into mp_map_pin_to_irq() as below:
      1) For ISA IRQs, mp_irqs array is used to map IOAPIC pin to IRQ and
         mp_irqdomain_map() is used to actually program the pin.
      2) For non-ISA IRQs, irqdomain is used to map IOAPIC pin to IRQ, and
         mp_irqdomain_map() is also used to actually program the pin.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-36-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      16ee7b3d
    • Jiang Liu's avatar
      x86, irq: Clean up unused IOAPIC interface · 9f354b02
      Jiang Liu authored
      Now we have converted all x86 platforms to use the common irqdomain map
      interface. There's no caller of io_apic_set_pci_routing(),
      setup_IO_APIC_irq_extra() and io_apic_setup_irq_pin_once() any more,
      so kill them.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-35-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9f354b02
    • Jiang Liu's avatar
      x86, irq, devicetree: Use common irqdomain map interface to program IOAPIC pins · 795aacf6
      Jiang Liu authored
      Refine devicetree to use common irqdomain map interface to program
      IOAPIC pins, so we can unify the callsite to progam IOAPIC pins.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Tony Lindgren <tony@atomide.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-34-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      795aacf6
    • Jiang Liu's avatar
      x86, irq, SFI: Use common irqdomain map interface to program IOAPIC pins · ecc527d5
      Jiang Liu authored
      Refine SFI to use common irqdomain map interface to program IOAPIC pins,
      so we can unify the callsite to progam IOAPIC pins.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: sfi-devel@simplefirmware.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-33-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ecc527d5
    • Jiang Liu's avatar
      x86, irq, mpparse: Use common irqdomain map interface to program IOAPIC pins · 95060639
      Jiang Liu authored
      Refine mpparse to use common irqdomain map interface to program IOAPIC pins,
      so we can unify the callsite to progam IOAPIC pins.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-32-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      95060639
    • Jiang Liu's avatar
      x86, irq, ACPI: Use common irqdomain map interface to program IOAPIC pins · d7b83001
      Jiang Liu authored
      Refine ACPI to use common irqdomain map interface to program IOAPIC pins,
      so we can unify the callsite to progam IOAPIC pins.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-31-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d7b83001
    • Jiang Liu's avatar
      x86, irq: Introduce two helper functions to support irqdomain map operation · 15a3c7cc
      Jiang Liu authored
      Currently there are multiple entries to program IOAPIC pins, such as
      io_apic_setup_irq_pin_once(), io_apic_set_pci_routing() and
      setup_IO_APIC_irq_extra() etc.
      
      This patch introduces two functions to help consolidate the code to
      program IOAPIC pins. Function mp_set_pin_attr() is used to optionally
      set trigger, polarity and NUMA node property for an IOAPIC pin.
      If mp_set_pin_attr() is not invoked for a pin, the default configuration
      from BIOS will be used.
      
      Function mp_irqdomain_map() is an common implementation of irqdomain map()
      operation. It figures out attribures for pin and then actually programs
      the IOAPIC pin. We hope this will be the only entrance for programming
      IOAPIC pin.
      
      And the flow will:
      1) caller such as xxx_pci_irq_enable figures out pin attributes.
      2) Invoke mp_set_pin_attr() to set attributes for a pin. If the pin has
         already bin programmed,  mp_set_pin_attr() will aslo detects attribute
         confictions.
      3) Invoke mp_map_pin_to_irq()
      3.1) If IRQ has already been assigned, return irq_find_mapping()
      3.2) Else irq_create_mapping()
      		->irq_domain_associate()
      			->mp_irqdomain_map()
      				->io_apic_setup_irq_pin()
      
      So every pin will only programmed once by mp_irqdomain_map(), so we
      could kill io_apic_setup_irq_pin_once(), io_apic_set_pci_routing() and
      setup_IO_APIC_irq_extra() etc.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-30-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      15a3c7cc
    • Jiang Liu's avatar
      x86, devicetree, irq: Use common mechanism to support irqdomain · facd8fdb
      Jiang Liu authored
      Now the ioapic driver provides a common interface to create irqdomain,
      so replace the private implementation.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Tony Lindgren <tony@atomide.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-29-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      facd8fdb
    • Jiang Liu's avatar
      x86, SFI, irq: Provide basic irqdomain support · 1b5d3e00
      Jiang Liu authored
      Enhance SFI to provide basic support of irqdomain with identity mapping
      between GSIs and IRQs.
      
      Some Intel MID platforms assumes identity mapping between GSI and IRQ,
      so we can't dynamically allocate IRQ number on demand.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: sfi-devel@simplefirmware.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <lenb@kernel.org>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-28-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1b5d3e00
    • Jiang Liu's avatar
      x86, mpparse, irq: Provide basic irqdomain support · 74501edc
      Jiang Liu authored
      Enhance mpparse to provide basic support of irqdomain.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-27-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      74501edc
    • Jiang Liu's avatar
      x86, ACPI, irq: Provide basic irqdomain support · ca7e28aa
      Jiang Liu authored
      Enhance ACPI driver to provide basic irqdomain support for IOAPIC.
      
      We will build identity mapping for IOAPICs hosting legacy IRQs,
      otherwise dynamically allocate IRQ numbers for IOAPIC pins on demand.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-26-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ca7e28aa
    • Jiang Liu's avatar
      x86, irq: Enhance mp_register_ioapic() to support irqdomain · 44767bfa
      Jiang Liu authored
      Enhance function mp_register_ioapic() to support irqdomain.
      When registering IOAPIC, caller may provide callbacks and parameters
      for creating irqdomain. The IOAPIC core will create irqdomain later
      if caller has passed in corresponding parameters.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: sfi-devel@simplefirmware.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Tony Lindgren <tony@atomide.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-25-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      44767bfa
    • Jiang Liu's avatar
      x86, irq: Introduce mechanisms to support dynamically allocate IRQ for IOAPIC · d7f3d478
      Jiang Liu authored
      Currently x86 support identity mapping between GSI(IOAPIC pin) and IRQ
      number, so continous IRQs at low end are statically allocated to IOAPICs
      at boot time. This design causes trouble to support IOAPIC hotplug.
      
      This patch implements basic mechanism to dynamically allocate IRQ on
      demand for IOAPIC pins by using irqdomain framework.
      
      It first adds several fields into struct ioapic to support irqdomain.
      Then it implements an algorithm to dynamically allocate IRQ number
      for IOAPIC pins on demand.
      
      Currently it supports three types of irqdomain:
      1) LEGACY: used to support IOAPIC hosting legacy IRQs and building
         identity mapping for legacy IRQs. A speical case, we dynamically
         allocate IRQ number for IOAPIC pin which has GSI number below
         nr_legacy_irqs() but isn't legacy IRQ. This is for backward
         compatibility and avoid regression.
      2) STRICT: build identity mapping between GSI and IRQ nubmer.
      3) DYNAMIC: dynamically allocate IRQ number for IOAPIC pin on demand.
      
      Legacy(ISA) IRQs is not managed by irqdomain because there may be
      multiple pins sharing the same IRQ number and current irqdomain only
      supports 1:1 mapping between pins and IRQ.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-24-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d7f3d478
    • Jiang Liu's avatar
      x86, irq, ACPI: Change __acpi_register_gsi to return IRQ number instead of GSI · 84245af7
      Jiang Liu authored
      Currently __acpi_register_gsi is defined to return GSI number and
      may be set to acpi_register_gsi_pic(), acpi_register_gsi_ioapic(),
      acpi_register_gsi_xen_hvm() and acpi_register_gsi_xen().
      
      Among which, acpi_register_gsi_ioapic() returns GSI number, but
      acpi_register_gsi_xen_hvm() and acpi_register_gsi_xen() actually
      returns IRQ number instead of GSI. And for acpi_register_gsi_pic(),
      GSI number equals to IRQ number.
      
      So change acpi_register_gsi_ioapic() to return IRQ number, it also
      simplifies the code.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402380887-32512-1-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      84245af7
    • Jiang Liu's avatar
      x86, ACPI, irq: Consolidate algorithm of mapping (ioapic, pin) to IRQ number · 6b9fb708
      Jiang Liu authored
      Currently ACPI and ioapic both implement algorithms to map (ioapic, pin)
      to IRQ number. So consolidate the common part into one place, which is
      also preparing for irqdomain support.
      
      It introduces mp_map_gsi_to_irq(), which will be used to allocate IRQ
      number IOAPIC pins when irqdomain is enabled.
      
      Also rename gsi_to_irq() to map_gsi_to_irq(), later we will introduce
      unmap_gsi_to_irq() when enabling IOAPIC hotplug.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402380812-32446-1-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6b9fb708
    • Jiang Liu's avatar
      x86, irq: Simplify arch_early_irq_init() · 4b92b4f7
      Jiang Liu authored
      Simplify function arch_early_irq_init() and kill static array irq_cfgx[].
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-21-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      4b92b4f7
    • Jiang Liu's avatar
      x86, irq: Count legacy IRQs by legacy_pic->nr_legacy_irqs instead of NR_IRQS_LEGACY · 95d76acc
      Jiang Liu authored
      Some platforms, such as Intel MID and mshypv, do not support legacy
      interrupt controllers. So count legacy IRQs by legacy_pic->nr_legacy_irqs
      instead of hard-coded NR_IRQS_LEGACY.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: xen-devel@lists.xenproject.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Tony Lindgren <tony@atomide.com>
      Acked-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-20-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      95d76acc
    • Jiang Liu's avatar
      x86: ce4100, irq: Do not set legacy_pic to null_legacy_pic · 6532ce99
      Jiang Liu authored
      Intel CE4100 platforms has i8259 legacy interrupt controllers, so don't
      set legacy_pic to null_legacy_pic in late booting stage because we need
      legacy_pic to mask i8259 pins when enabling IOAPIC pins for safety.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-19-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6532ce99
    • Jiang Liu's avatar
      x86: ce4100, irq: Make CE4100 depend on CONFIG_X86_IO_APIC · 6084a6e2
      Jiang Liu authored
      Intel CE4100 platforms need IOAPIC support becasue some devices are
      always connected to the second IOAPIC, so make CONFIG_CE depends on
      CONFIG_X86_IO_APIC.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-18-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6084a6e2
    • Jiang Liu's avatar
      x86, irq: Introduce some helper utilities to improve readability · 18e48551
      Jiang Liu authored
      It also fixes an off by one bug in
      	if ((ioapic_idx > 0) && (irq > NR_IRQS_LEGACY))
      It should be
      	if ((ioapic_idx > 0) && (irq >= NR_IRQS_LEGACY))
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-17-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      18e48551
    • Jiang Liu's avatar
      x86, irq: Reorganize IO_APIC_get_PCI_irq_vector() to prepare for irqdomain · 79598505
      Jiang Liu authored
      Reorganize function IO_APIC_get_PCI_irq_vector() a bit to better support
      coming irqdomain.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-16-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      79598505
    • Jiang Liu's avatar
      x86, ioapic: Use irq_cfg() instead of irq_get_chip_data() for better readability · 32f5ef5d
      Jiang Liu authored
      Use defined helper function irq_cfg() instead of irq_get_chip_data() for
      better readability.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-15-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      32f5ef5d
    • Jiang Liu's avatar
      x86, ioapic: Introduce helper utilities to walk ioapics and pins · f44d1692
      Jiang Liu authored
      Introduce helper utilities for_each_ioapic(), for_each_ioapic_reverse(),
      for_each_pin() and for_each_ioapic_pin() to walk ioapics and pins.
      They will be rewritten e will rewrite later to support IOAPIC hotplug.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-14-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      f44d1692
    • Jiang Liu's avatar
      x86, ioapic: Kill static variable nr_irqs_gsi · 518b2c63
      Jiang Liu authored
      Static variable nr_irqs_gsi is used to maintain the lowest dynamic
      allocatable IRQ number. It may cause trouble when enabling dynamic
      IRQ allocation for IOAPIC, so use arch_dynirq_lower_bound() to
      avoid directly accessing nr_irqs_gsi and kill nr_irqs_gsi.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-13-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      518b2c63
    • Jiang Liu's avatar
      x86, ioapic: Kill unused global variable timer_through_8259 · 4035ed01
      Jiang Liu authored
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-12-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      4035ed01
    • Jiang Liu's avatar
      x86, irq, trivial: Minor improvements of IRQ related code · 3eb2be5f
      Jiang Liu authored
      1) Kill unused MAX_HARDIRQS_PER_CPU.
      2) Improve function prototype declararions.
      3) Simple typo fix, change "gsit" to "gsi".
      4) Use macro VECTOR_UNDEFINED instead of hard-coded -1.
      5) Kill redundant comments.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Jiri Kosina <trivial@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-11-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      3eb2be5f
    • Jiang Liu's avatar
      x86, ACPI, irq: Fix possible eror in GSI to IRQ mapping for legacy IRQ · 2e0ad0e2
      Jiang Liu authored
      A default identity mapping between GSI and IRQ is built for legacy IRQs.
      So when overriding the default identity mapping for legacy IRQs,
      we should also invalidate isa_irq_to_gsi[gsi] when setting
      isa_irq_to_gsi[irq] = gsi.  Otherwise there may be two entries with the
      same GSI in the isa_irq_to_gsi array, and acpi_isa_irq_to_gsi() may give
      wrong result.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-10-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2e0ad0e2
    • Jiang Liu's avatar
      x86, ACPI, irq: Enhance error handling in function acpi_register_gsi() · 2c0a6894
      Jiang Liu authored
      Function mp_register_gsi() may return error code when failed to look up
      or program corresponding IOAPIC pin for GSI, so enhance acpi_register_gsi()
      to handle possible error cases.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402380683-32345-1-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2c0a6894
    • Jiang Liu's avatar
      x86, ACPI, trivial: Minor improvements to arch/x86/kernel/acpi/boot.c · e819813f
      Jiang Liu authored
      1) Remove out-of-date comment
      2) Kill unused function acpi_set_irq_model_pic()
      3) Use NR_IRQS_LEGACY instead of hard-coded 16
      4) Trivial syntax improvements
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Jiri Kosina <trivial@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-8-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e819813f
    • Jiang Liu's avatar
      x86, acpi, irq: Kill static function irq_to_gsi() · 032329ee
      Jiang Liu authored
      Static function irq_to_gsi() is only called by acpi_isa_irq_to_gsi(),
      so kill function irq_to_gsi() and simplify acpi_isa_irq_to_gsi().
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-7-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      032329ee
    • Jiang Liu's avatar
      x86, PCI, ACPI: Use kmalloc_node() to optimize for performance · 965cd0e4
      Jiang Liu authored
      Use kmalloc_node() instead of kmalloc() when possible to optimize
      for performance on NUMA platforms.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-6-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      965cd0e4
    • Jiang Liu's avatar
      x86, acpi: Reorganize code to avoid forward declaration in boot.c · 8d7cdcb9
      Jiang Liu authored
      Reorganize code to avoid forward declaration in boot.c, no function
      changes.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Link: http://lkml.kernel.org/r/1402302011-23642-5-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      8d7cdcb9
    • Jiang Liu's avatar
      x86, mpparse: Simplify arch/x86/include/asm/mpspec.h · a491cc90
      Jiang Liu authored
      Simplify arch/x86/include/asm/mpspec.h by
      1) Change max_physical_apicid to static as it's only used in apic.c.
      2) Kill declaration of mpc_default_type, it's never defined.
      3) Delete default_acpi_madt_oem_check(), it has already been declared
         in apic.h.
      4) Make default_acpi_madt_oem_check() depends on CONFIG_X86_LOCAL_APIC
         instead of CONFIG_X86_64 to support i386.
      5) Change mp_override_legacy_irq(), mp_config_acpi_legacy_irqs() and
         mp_register_gsi() as static because they are only used in acpi/boot.c.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Andi Kleen <ak@linux.intel.com>
      Link: http://lkml.kernel.org/r/1402302011-23642-4-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      a491cc90
    • Jiang Liu's avatar
      x86, mpparse: Use pr_lvl() helper utilities to replace printk(KERN_LVL) · b1bfd5ea
      Jiang Liu authored
      Use pr_lvl() helper utilities to replace printk(KERN_LVL) for readability,
      no function changes. Also use pr_cont() to avoid multiple newlines in
      one printk().
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-3-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      b1bfd5ea
    • Jiang Liu's avatar
      genirq: Export irq_domain_disassociate() to architecture interrupt drivers · 43a77591
      Jiang Liu authored
      Export irq_domain_disassociate() to architecture interrupt drivers,
      so it could be used to handle legacy IRQ descriptors on x86.
      Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1402302011-23642-37-git-send-email-jiang.liu@linux.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      43a77591
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 401c58fc
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "This is larger than usual: the main reason are the ARM symbol lookup
        speedups that came in late and were hard to resist.
      
        There's also a kprobes fix and various tooling fixes, plus the minimal
        re-enablement of the mmap2 support interface"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
        x86/kprobes: Fix build errors and blacklist context_track_user
        perf tests: Add test for closing dso objects on EMFILE error
        perf tests: Add test for caching dso file descriptors
        perf tests: Allow reuse of test_file function
        perf tests: Spawn child for each test
        perf tools: Add dso__data_* interface descriptons
        perf tools: Allow to close dso fd in case of open failure
        perf tools: Add file size check and factor dso__data_read_offset
        perf tools: Cache dso data file descriptor
        perf tools: Add global count of opened dso objects
        perf tools: Add global list of opened dso objects
        perf tools: Add data_fd into dso object
        perf tools: Separate dso data related variables
        perf tools: Cache register accesses for unwind processing
        perf record: Fix to honor user freq/interval properly
        perf timechart: Reflow documentation
        perf probe: Improve error messages in --line option
        perf probe: Improve an error message of perf probe --vars mode
        perf probe: Show error code and description in verbose mode
        perf probe: Improve error message for unknown member of data structure
        ...
      401c58fc
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus.patch' of... · 7b08d618
      Linus Torvalds authored
      Merge branch 'locking-urgent-for-linus.patch' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
      
      Pull rtmutex fixes from Thomas Gleixner:
       "Another three patches to make the rtmutex code more robust.  That's
        the last urgent fallout from the big futex/rtmutex investigation"
      
      * 'locking-urgent-for-linus.patch' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rtmutex: Plug slow unlock race
        rtmutex: Detect changes in the pi lock chain
        rtmutex: Handle deadlock detection smarter
      7b08d618
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 7a8e9c80
      Linus Torvalds authored
      Pull s390 patches from Martin Schwidefsky:
       "A couple of bug fixes, a debug change for qdio, an update for the
        default config, and one small extension.
      
        The watchdog module based on diagnose 0x288 is converted to the
        watchdog API and it now works under LPAR as well"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/ccwgroup: use ccwgroup_ungroup wrapper
        s390/ccwgroup: fix an uninitialized return code
        s390/ccwgroup: obtain extra reference for asynchronous processing
        qdio: Keep device-specific dbf entries
        s390/compat: correct ucontext layout for high gprs
        s390/cio: set device name as early as possible
        s390: update default configuration
        s390: avoid format strings leaking into names
        s390/airq: silence lockdep warning
        s390/watchdog: add support for LPAR operation (diag288)
        s390/watchdog: use watchdog API
        s390/sclp_vt220: Enable ASCII console per default
        s390/qdio: replace shift loop by ilog2
        s390/cio: silence lockdep warning
        s390/uaccess: always load the kernel ASCE after task switch
        s390/ap_bus: Make modules parameters visible in sysfs
      7a8e9c80
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://github.com/gxt/linux · f1b35b83
      Linus Torvalds authored
      Pull UniCore32 bug fixes from Guan Xuetao:
       "This includes bugfixes to make unicore32 successfully build under
        defconfig, and some changes for allmodconfig (though not finished)"
      
      * tag 'for-linus' of git://github.com/gxt/linux:
        unicore32: Remove ARCH_HAS_CPUFREQ config option
        UniCore32: Change git tree location information in MAINTAINERS
        arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid compiling failure
        arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure.
        arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failure
        arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM
        unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.h
        arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failure
        drivers: scsi: mvsas: fix compiling issue by adding 'MVS_' for "enum pci_interrupt_cause"
        arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failure
        arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling failure
        drivers/rtc/rtc-puv3.c: remove "&dev->" for typo issue MIME-Version: 1.0
        drivers/rtc/rtc-puv3.c: use dev_dbg() instead of dev_debug() for typo issue
        arch/unicore32/include/asm/io.h: add readl_relaxed() generic definition
        arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc()
        arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error
        arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros
        arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area()
        arch/unicore32/kernel/ksyms.c: remove several undefined exported symbols
      f1b35b83
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 60761c10
      Linus Torvalds authored
      Pull char / misc driver fixes from Greg KH:
       "Here are 3 patches, one a revert of the UIO patch you objected to in
        3.16-rc1 and that no one wanted to defend, a w1 driver bugfix, and a
        MAINTAINERS update for the vmware balloon driver.
      
        All of these, except for the MAINTAINERS update which just got added,
        have been in linux-next just fine"
      
      * tag 'char-misc-3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        MAINTAINERS: add entry for VMware Balloon driver
        w1: mxc_w1: Fix incorrect "presence" status
        Revert "uio: fix vma io range check in mmap"
      60761c10