1. 12 3月, 2016 5 次提交
  2. 09 3月, 2016 3 次提交
    • B
      PCI: Set ROM shadow location in arch code, not in PCI core · 0c0e0736
      Bjorn Helgaas 提交于
      IORESOURCE_ROM_SHADOW means there is a copy of a device's option ROM in
      RAM.  The existence of such a copy and its location are arch-specific.
      Previously the IORESOURCE_ROM_SHADOW flag was set in arch code, but the
      0xC0000-0xDFFFF location was hard-coded into the PCI core.
      
      If we're using a shadow copy in RAM, disable the ROM BAR and release the
      address space it was consuming.  Move the location information from the PCI
      core to the arch code that sets IORESOURCE_ROM_SHADOW.  Save the location
      of the RAM copy in the struct resource for PCI_ROM_RESOURCE.
      
      After this change, pci_map_rom() will call pci_assign_resource() and
      pci_enable_rom() for these IORESOURCE_ROM_SHADOW resources, which we did
      not do before.  This is safe because:
      
        - pci_assign_resource() will do nothing because the resource is marked
          IORESOURCE_PCI_FIXED, which means we can't move it, and
      
        - pci_enable_rom() will not turn on the ROM BAR's enable bit because the
          resource is marked IORESOURCE_ROM_SHADOW, which means it is in RAM
          rather than in PCI memory space.
      
      Storing the location in the struct resource means "lspci" will show the
      shadow location, not the value from the ROM BAR.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      0c0e0736
    • B
      PCI: Don't enable/disable ROM BAR if we're using a RAM shadow copy · 4708f9a5
      Bjorn Helgaas 提交于
      If we're using a RAM shadow copy instead of the ROM BAR, we don't need to
      touch the ROM BAR enable bit.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      4708f9a5
    • B
      PCI: Don't assign or reassign immutable resources · 2ea4adf7
      Bjorn Helgaas 提交于
      IORESOURCE_PCI_FIXED means the resource can't be moved, so if it's set,
      don't bother trying to assign or reassign the resource.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      2ea4adf7
  3. 26 2月, 2016 1 次提交
    • B
      PCI: Disable IO/MEM decoding for devices with non-compliant BARs · b84106b4
      Bjorn Helgaas 提交于
      The PCI config header (first 64 bytes of each device's config space) is
      defined by the PCI spec so generic software can identify the device and
      manage its usage of I/O, memory, and IRQ resources.
      
      Some non-spec-compliant devices put registers other than BARs where the
      BARs should be.  When the PCI core sizes these "BARs", the reads and writes
      it does may have unwanted side effects, and the "BAR" may appear to
      describe non-sensical address space.
      
      Add a flag bit to mark non-compliant devices so we don't touch their BARs.
      Turn off IO/MEM decoding to prevent the devices from consuming address
      space, since we can't read the BARs to find out what that address space
      would be.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Tested-by: NAndi Kleen <ak@linux.intel.com>
      CC: stable@vger.kernel.org
      b84106b4
  4. 25 1月, 2016 2 次提交
  5. 24 1月, 2016 3 次提交
  6. 23 1月, 2016 3 次提交
  7. 22 1月, 2016 19 次提交
  8. 21 1月, 2016 4 次提交
    • T
      pwm: Mark all devices as "might sleep" · ff01c944
      Thierry Reding 提交于
      Commit d1cd2142 ("pwm: Set enable state properly on failed call to
      enable") introduced a mutex that is needed to protect internal state of
      PWM devices. Since that mutex is acquired in pwm_set_polarity() and in
      pwm_enable() and might potentially block, all PWM devices effectively
      become "might sleep".
      
      It's rather pointless to keep the .can_sleep field around, but given
      that there are external users let's postpone the removal for the next
      release cycle.
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      ff01c944
    • M
      mmc: pwrseq_simple: Make reset-gpios optional to match doc · 64a67d47
      Martin Fuzzey 提交于
      The DT binding doc says reset-gpios is an optional property but the code
      currently bails out if it is omitted.
      
      This is a regression since it breaks previously working device trees.
      Fix it by restoring the original documented behaviour.
      
      Fixes: ce037275 ("mmc: pwrseq_simple: use GPIO descriptors array API")
      Tested-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NMartin Fuzzey <mfuzzey@parkeon.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      64a67d47
    • A
      memstick: use sector_div instead of do_div · 545b5e2a
      Arnd Bergmann 提交于
      do_div is the wrong way to divide a sector_t, as it is less efficient
      when sector_t is 32-bit wide.  With the upcoming do_div optimizations,
      the kernel starts warning about this:
      
        drivers/memstick/core/ms_block.c: In function 'msb_io_work':
        include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast
      
      This changes the code to use sector_div instead, which always produces
      optimal code.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      545b5e2a
    • C
      dma-mapping: remove <asm-generic/dma-coherent.h> · 20d666e4
      Christoph Hellwig 提交于
      This wasn't an asm-generic header to start with, and can be merged into
      dma-mapping.h trivially.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      20d666e4