1. 24 2月, 2016 2 次提交
  2. 05 1月, 2016 1 次提交
  3. 01 1月, 2016 2 次提交
  4. 26 9月, 2015 2 次提交
  5. 27 8月, 2015 1 次提交
    • J
      ACPI, PCI: Penalize legacy IRQ used by ACPI SCI · 5d0ddfeb
      Jiang Liu 提交于
      Nick Meier reported a regression with HyperV that "
        After rebooting the VM, the following messages are logged in syslog
        when trying to load the tulip driver:
          tulip: Linux Tulip drivers version 1.1.15 (Feb 27, 2007)
          tulip: 0000:00:0a.0: PCI INT A: failed to register GSI
          tulip: Cannot enable tulip board #0, aborting
          tulip: probe of 0000:00:0a.0 failed with error -16
        Errors occur in 3.19.0 kernel
        Works in 3.17 kernel.
      "
      
      According to the ACPI dump file posted by Nick at
      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1440072
      
      The ACPI MADT table includes an interrupt source overridden entry for
      ACPI SCI:
      [236h 0566  1]                Subtable Type : 02 <Interrupt Source Override>
      [237h 0567  1]                       Length : 0A
      [238h 0568  1]                          Bus : 00
      [239h 0569  1]                       Source : 09
      [23Ah 0570  4]                    Interrupt : 00000009
      [23Eh 0574  2]        Flags (decoded below) : 000D
                                         Polarity : 1
                                     Trigger Mode : 3
      
      And in DSDT table, we have _PRT method to define PCI interrupts, which
      eventually goes to:
              Name (PRSA, ResourceTemplate ()
              {
                  IRQ (Level, ActiveLow, Shared, )
                      {3,4,5,7,9,10,11,12,14,15}
              })
              Name (PRSB, ResourceTemplate ()
              {
                  IRQ (Level, ActiveLow, Shared, )
                      {3,4,5,7,9,10,11,12,14,15}
              })
              Name (PRSC, ResourceTemplate ()
              {
                  IRQ (Level, ActiveLow, Shared, )
                      {3,4,5,7,9,10,11,12,14,15}
              })
              Name (PRSD, ResourceTemplate ()
              {
                  IRQ (Level, ActiveLow, Shared, )
                      {3,4,5,7,9,10,11,12,14,15}
              })
      
      According to the MADT and DSDT tables, IRQ 9 may be used for:
       1) ACPI SCI in level, high mode
       2) PCI legacy IRQ in level, low mode
      So there's a conflict in polarity setting for IRQ 9.
      
      Prior to commit cd68f6bd ("x86, irq, acpi: Get rid of special
      handling of GSI for ACPI SCI"), ACPI SCI is handled specially and
      there's no check for conflicts between ACPI SCI and PCI legagy IRQ.
      And it seems that the HyperV hypervisor doesn't make use of the
      polarity configuration in IOAPIC entry, so it just works.
      
      Commit cd68f6bd gets rid of the specially handling of ACPI SCI,
      and then the pin attribute checking code discloses the conflicts
      between ACPI SCI and PCI legacy IRQ on HyperV virtual machine,
      and rejects the request to assign IRQ9 to PCI devices.
      
      So penalize legacy IRQ used by ACPI SCI and mark it unusable if ACPI
      SCI attributes conflict with PCI IRQ attributes.
      
      Please refer to following links for more information:
      https://bugzilla.kernel.org/show_bug.cgi?id=101301
      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1440072
      
      Fixes: cd68f6bd ("x86, irq, acpi: Get rid of special handling of GSI for ACPI SCI")
      Reported-and-tested-by: NNick Meier <nmeier@microsoft.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: 3.19+ <stable@vger.kernel.org> # 3.19+
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5d0ddfeb
  6. 08 7月, 2015 1 次提交
  7. 19 3月, 2014 1 次提交
  8. 06 1月, 2014 1 次提交
  9. 07 12月, 2013 1 次提交
    • L
      ACPI: Clean up inclusions of ACPI header files · 8b48463f
      Lv Zheng 提交于
      Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
      <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
      inclusions and remove some inclusions of those files that aren't
      necessary.
      
      First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
      should not be included directly from any files that are built for
      CONFIG_ACPI unset, because that generally leads to build warnings about
      undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
      <linux/acpi.h> includes those files and for CONFIG_ACPI unset it
      provides stub ACPI symbols to be used in that case.
      
      Second, there are ordering dependencies between those files that always
      have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
      prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
      latter depends on are always there.  And <acpi/acpi.h> which provides
      basic ACPICA type declarations should always be included prior to any other
      ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
      <linux/acpi.h> as appropriate.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8b48463f
  10. 24 3月, 2013 1 次提交
  11. 30 1月, 2013 1 次提交
  12. 26 1月, 2013 1 次提交
  13. 08 5月, 2012 1 次提交
  14. 19 3月, 2011 1 次提交
  15. 16 10月, 2010 1 次提交
  16. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  17. 17 1月, 2010 1 次提交
    • M
      acpi: make ACPI device id constant · c97adf9e
      Márton Németh 提交于
      The ids field of the struct acpi_driver is constant in <linux/acpi/acpi_bus.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NMárton Németh <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c97adf9e
  18. 29 8月, 2009 1 次提交
  19. 17 3月, 2009 4 次提交
  20. 07 2月, 2009 1 次提交
  21. 31 12月, 2008 2 次提交
  22. 12 11月, 2008 1 次提交
    • B
      ACPI: pci_link: remove acpi_irq_balance_set() interface · 32836259
      Bjorn Helgaas 提交于
      This removes the acpi_irq_balance_set() interface from the PCI
      interrupt link driver.
      
      x86 used acpi_irq_balance_set() to tell the PCI interrupt link
      driver to configure links to minimize IRQ sharing.  But the link
      driver can easily figure out whether to turn on IRQ balancing
      based on the IRQ model (PIC/IOAPIC/etc), so we can get rid of
      that external interface.
      
      It's better for the driver to figure this out at init-time.  If
      we set it externally via the x86 code, the interface reduces
      modularity, and we depend on the fact that acpi_process_madt()
      happens before we process the kernel command line.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      32836259
  23. 23 10月, 2008 1 次提交
  24. 11 10月, 2008 1 次提交
  25. 15 8月, 2008 1 次提交
    • B
      ACPI: bounds check IRQ to prevent memory corruption · fa46d352
      Bjorn Helgaas 提交于
      acpi_penalize_isa_irq() should validate irq before using it to
      index the acpi_irq_penalty[] table.
      
      Here's the path I'm concerned about:
      
          pnpacpi_parse_allocated_irqresource()
          {
      	...
      	irq = acpi_register_gsi(gsi, triggering, polarity);
      	if (irq >= 0)
      		pcibios_penalize_isa_irq(irq, 1);
      
      There's no guarantee that acpi_register_gsi() will return an IRQ
      within the bounds of acpi_irq_penalty[].
      
      I have not seen a failure I can attribute to this.  However,
      ACPI_MAX_IRQS is only 256, and I'm pretty sure ia64 can have
      IRQs larger than that.
      
      I think this should go in 2.6.27.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      fa46d352
  26. 18 7月, 2008 1 次提交
    • B
      ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors · 4a5e3638
      Bjorn Helgaas 提交于
      Silently ignore _PRS End Tags.  We already ignore Start Dependent Functions in
      _PRS, and we already ignore End Tags in _CRS, so we might as well ignore End
      Tags in _PRS as well.
      
      Silently ignore _PRS IRQ descriptors that mention no interrupts.  The spec
      allows this (section 6.4.2.1 in ACPI 3.0b spec), and it probably means the
      interrupt link can't be configured at all.
      
      This patch doesn't change any functional behavior; it just removes confusing
      complaints like these:
      
          ACPI: Blank IRQ resource
          ACPI: Resource is not an IRQ entry
      
      when parsing _PRS data "23 00 00 18 79 00" from an IBM xSeries 335 dual
      Pentium IV Xeon 2.40 GHz machine.  For more details, see
          http://bugzilla.kernel.org/show_bug.cgi?id=11049
      
      The "23 00 00 18" part is a three-byte-long small IRQ resource with no bits set
      in the IRQ mask ("00 00"), and level-triggered, active low, shareable ("18").
      
      The "79 00" is an End Tag (type 0x7).  It is superfluous since there is no
      Start Dependent Function tag and there are no resources after it, but it is
      harmless.
      
      Thanks to Gabriele Trombetti <g.trombetti.lkrnl1213@logicschema.com>
      (aka Kurk) for reporting this and testing the patch.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      4a5e3638
  27. 07 2月, 2008 1 次提交
    • A
      ACPI: misc cleanups · e5685b9d
      Adrian Bunk 提交于
          This patch contains the following possible cleanups:
          - make the following needlessly global code static:
            - drivers/acpi/bay.c:dev_attr_eject
            - drivers/acpi/bay.c:dev_attr_present
            - drivers/acpi/dock.c:dev_attr_docked
            - drivers/acpi/dock.c:dev_attr_flags
            - drivers/acpi/dock.c:dev_attr_uid
            - drivers/acpi/dock.c:dev_attr_undock
            - drivers/acpi/pci_bind.c:acpi_pci_unbind()
            - drivers/acpi/pci_link.c:acpi_link_lock
            - drivers/acpi/sbs.c:acpi_sbs_callback()
            - drivers/acpi/sbshc.c:acpi_smbus_transaction()
            - drivers/acpi/sleep/main.c:acpi_sleep_prepare()
          - #if 0 the following unused global functions:
            - drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
          - remove the following unused EXPORT_SYMBOL's:
            - acpi_register_gsi
            - acpi_unregister_gsi
            - acpi_strict
            - acpi_bus_receive_event
            - register_acpi_bus_type
            - unregister_acpi_bus_type
            - acpi_os_printf
            - acpi_os_sleep
            - acpi_os_stall
            - acpi_os_read_pci_configuration
            - acpi_os_create_semaphore
            - acpi_os_delete_semaphore
            - acpi_os_wait_semaphore
            - acpi_os_signal_semaphore
            - acpi_os_signal
            - acpi_pci_irq_enable
            - acpi_get_pxm
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e5685b9d
  28. 25 1月, 2008 1 次提交
  29. 24 7月, 2007 1 次提交
  30. 22 7月, 2007 1 次提交
  31. 13 2月, 2007 3 次提交
    • L
      ACPI: delete extra #defines in /drivers/acpi/ drivers · 7cda93e0
      Len Brown 提交于
      Cosmetic only.
      
      Except in a single case, #define ACPI_*_DRIVER_NAME
      were invoked 0 or 1 times.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      7cda93e0
    • L
      ACPI: fix acpi_driver.name usage · c2b6705b
      Len Brown 提交于
      It was erroneously used as a description rather than a name.
      
      ie. turn this:
      
      lenb@se7525gp2:/sys> ls bus/acpi/drivers
      ACPI AC Adapter Driver  ACPI Embedded Controller Driver  ACPI Power Resource Driver
      ACPI Battery Driver     ACPI Fan Driver                  ACPI Processor Driver
      ACPI Button Driver      ACPI PCI Interrupt Link Driver   ACPI Thermal Zone Driver
      ACPI container driver   ACPI PCI Root Bridge Driver      hpet
      
      into this:
      
      lenb@se7525gp2:~> ls /sys/bus/acpi/drivers
      ac  battery  button  container  ec  fan  hpet  pci_link  pci_root  power  processor  thermal
      Signed-off-by: NLen Brown <len.brown@intel.com>
      c2b6705b
    • L
      ACPI: clean up ACPI_MODULE_NAME() use · f52fd66d
      Len Brown 提交于
      cosmetic only
      
      Make "module name" actually match the file name.
      Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care.
      Fix indentation where Lindent did get confused.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f52fd66d