20 Dec, 2014

1 commit

  • Pull x86 apic updates from Thomas Gleixner:
    "After stopping the full x86/apic branch, I took some time to go
    through the first block of patches again, which are mostly cleanups
    and preparatory work for the irqdomain conversion and ioapic hotplug
    support.

    Unfortunaly one of the real problematic commits was right at the
    beginning, so I rebased this portion of the pending patches without
    the offenders.

    It would be great to get this into 3.19. That makes reworking the
    problematic parts simpler. The usual tip testing did not unearth any
    issues and it is fully bisectible now.

    I'm pretty confident that this wont affect the calmness of the xmas
    season.

    Changes:
    - Split the convoluted io_apic.c code into domain specific parts
    (vector, ioapic, msi, htirq)
    - Introduce proper helper functions to retrieve irq specific data
    instead of open coded dereferencing of pointers
    - Preparatory work for ioapic hotplug and irqdomain conversion
    - Removal of the non functional pci-ioapic driver
    - Removal of unused irq entry stubs
    - Make native_smp_prepare_cpus() preemtible to avoid GFP_ATOMIC
    allocations for everything which is called from there.
    - Small cleanups and fixes"

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    iommu/amd: Use helpers to access irq_cfg data structure associated with IRQ
    iommu/vt-d: Use helpers to access irq_cfg data structure associated with IRQ
    x86: irq_remapping: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Make MSI and HT_IRQ indepenent of X86_IO_APIC
    x86, irq: Move IRQ initialization routines from io_apic.c into vector.c
    x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h
    x86, irq: Move HT IRQ related code from io_apic.c into htirq.c
    x86, irq: Move PCI MSI related code from io_apic.c into msi.c
    x86, irq: Replace printk(KERN_LVL) with pr_lvl() utilities
    x86, irq: Make UP version of irq_complete_move() an inline stub
    x86, irq: Move local APIC related code from io_apic.c into vector.c
    x86, irq: Introduce helpers to access struct irq_cfg
    x86, irq: Protect __clear_irq_vector() with vector_lock
    x86, irq: Rename local APIC related functions in io_apic.c as apic_xxx()
    x86, irq: Refine hw_irq.h to prepare for irqdomain support
    x86, irq: Convert irq_2_pin list to generic list
    x86, irq: Kill useless parameter 'irq_attr' of IO_APIC_get_PCI_irq_vector()
    x86, irq, acpi: Get rid of special handling of GSI for ACPI SCI
    x86, irq: Introduce helper to check whether an IOAPIC has been registered
    ...

    Linus Torvalds
     

16 Dec, 2014

3 commits

  • None of the callers requires irq_attr to be filled
    in. IO_APIC_get_PCI_irq_vector() does not do anything useful with it
    either.

    Remove the parameter and fixup the call sites.

    [ tglx: Massaged changelog ]

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Prarit Bhargava
    Cc: Grant Likely
    Cc: Ryan Desfosses
    Cc: Quentin Lambert
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1414397531-28254-4-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • To keep balance of IOAPIC pin reference count, we need to protect
    pirq_enable_irq(), acpi_pci_irq_enable() and intel_mid_pci_irq_enable()
    from reentrance. There are two cases which will cause reentrance.

    The first case is caused by suspend/hibernation. If pcibios_disable_irq
    is called during suspending/hibernating, we don't release the assigned
    IRQ number, otherwise it may break the suspend/hibernation. So late when
    pcibios_enable_irq is called during resume, we shouldn't allocate IRQ
    number again.

    The second case is that function acpi_pci_irq_enable() may be called
    twice for PCI devices present at boot time as below:
    1) pci_acpi_init()
    --> acpi_pci_irq_enable() if pci_routeirq is true
    2) pci_enable_device()
    --> pcibios_enable_device()
    --> acpi_pci_irq_enable()
    We can't kill kernel parameter pci_routeirq yet because it's still
    needed for debugging purpose.

    So flag irq_managed is introduced to track whether IRQ number is
    assigned by OS and to protect pirq_enable_irq(), acpi_pci_irq_enable()
    and intel_mid_pci_irq_enable() from reentrance.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Len Brown
    Link: http://lkml.kernel.org/r/1414387308-27148-13-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • While f3761db164 ("x86, irq: Fix build error caused by
    9eabc99a635a77cbf09") addressed the original build problem,
    declaration, inline stub, and definition still seem misplaced: It isn't
    really IO-APIC related, and it's being used solely in arch/x86/pci/.
    This also means stubbing it out when !CONFIG_X86_IO_APIC was at least
    questionable.

    Signed-off-by: Jan Beulich
    Cc: Jiang Liu
    Link: http://lkml.kernel.org/r/545747BE020000780004436E@mail.emea.novell.com
    Signed-off-by: Thomas Gleixner

    Jan Beulich
     

12 Dec, 2014

1 commit

  • Pull xen features and fixes from David Vrabel:

    - Fully support non-coherent devices on ARM by introducing the
    mechanisms to request the hypervisor to perform the required cache
    maintainance operations.

    - A number of pciback bug fixes and cleanups. Notably a deadlock fix
    if a PCI device was manually uunbound and a fix for incorrectly
    restoring state after a function reset.

    - In x86 PVHVM guests, use the APIC for interrupts if this has been
    virtualized by the hardware. This reduces the number of interrupt-
    related VM exits on such hardware.

    * tag 'stable/for-linus-3.19-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (26 commits)
    Revert "swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single"
    xen/pci: Use APIC directly when APIC virtualization hardware is available
    xen/pci: Defer initialization of MSI ops on HVM guests
    xen-pciback: drop SR-IOV VFs when PF driver unloads
    xen/pciback: Restore configuration space when detaching from a guest.
    PCI: Expose pci_load_saved_state for public consumption.
    xen/pciback: Remove tons of dereferences
    xen/pciback: Print out the domain owning the device.
    xen/pciback: Include the domain id if removing the device whilst still in use
    driver core: Provide an wrapper around the mutex to do lockdep warnings
    xen/pciback: Don't deadlock when unbinding.
    swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single
    swiotlb-xen: call xen_dma_sync_single_for_device when appropriate
    swiotlb-xen: remove BUG_ON in xen_bus_to_phys
    swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu
    xen/arm: introduce GNTTABOP_cache_flush
    xen/arm/arm64: introduce xen_arch_need_swiotlb
    xen/arm/arm64: merge xen/mm32.c into xen/mm.c
    xen/arm: use hypercall to flush caches in map_page
    xen: add a dma_addr_t dev_addr argument to xen_dma_map_page
    ...

    Linus Torvalds
     

11 Dec, 2014

2 commits

  • Pull x86 mm tree changes from Ingo Molnar:
    "The biggest change is full PAT support from Jürgen Gross:

    The x86 architecture offers via the PAT (Page Attribute Table) a
    way to specify different caching modes in page table entries. The
    PAT MSR contains 8 entries each specifying one of 6 possible cache
    modes. A pte references one of those entries via 3 bits:
    _PAGE_PAT, _PAGE_PWT and _PAGE_PCD.

    The Linux kernel currently supports only 4 different cache modes.
    The PAT MSR is set up in a way that the setting of _PAGE_PAT in a
    pte doesn't matter: the top 4 entries in the PAT MSR are the same
    as the 4 lower entries.

    This results in the kernel not supporting e.g. write-through mode.
    Especially this cache mode would speed up drivers of video cards
    which now have to use uncached accesses.

    OTOH some old processors (Pentium) don't support PAT correctly and
    the Xen hypervisor has been using a different PAT MSR configuration
    for some time now and can't change that as this setting is part of
    the ABI.

    This patch set abstracts the cache mode from the pte and introduces
    tables to translate between cache mode and pte bits (the default
    cache mode "write back" is hard-wired to PAT entry 0). The tables
    are statically initialized with values being compatible to old
    processors and current usage. As soon as the PAT MSR is changed
    (or - in case of Xen - is read at boot time) the tables are changed
    accordingly. Requests of mappings with special cache modes are
    always possible now, in case they are not supported there will be a
    fallback to a compatible but slower mode.

    Summing it up, this patch set adds the following features:

    - capability to support WT and WP cache modes on processors with
    full PAT support

    - processors with no or uncorrect PAT support are still working as
    today, even if WT or WP cache mode are selected by drivers for
    some pages

    - reduction of Xen special handling regarding cache mode

    Another change is a boot speedup on ridiculously large RAM systems,
    plus other smaller fixes"

    * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
    x86: mm: Move PAT only functions to mm/pat.c
    xen: Support Xen pv-domains using PAT
    x86: Enable PAT to use cache mode translation tables
    x86: Respect PAT bit when copying pte values between large and normal pages
    x86: Support PAT bit in pagetable dump for lower levels
    x86: Clean up pgtable_types.h
    x86: Use new cache mode type in memtype related functions
    x86: Use new cache mode type in mm/ioremap.c
    x86: Use new cache mode type in setting page attributes
    x86: Remove looking for setting of _PAGE_PAT_LARGE in pageattr.c
    x86: Use new cache mode type in track_pfn_remap() and track_pfn_insert()
    x86: Use new cache mode type in mm/iomap_32.c
    x86: Use new cache mode type in asm/pgtable.h
    x86: Use new cache mode type in arch/x86/mm/init_64.c
    x86: Use new cache mode type in arch/x86/pci
    x86: Use new cache mode type in drivers/video/fbdev/vermilion
    x86: Use new cache mode type in drivers/video/fbdev/gbefb.c
    x86: Use new cache mode type in include/asm/fb.h
    x86: Make page cache mode a real type
    x86: mm: Use 2GB memory block size on large-memory x86-64 systems
    ...

    Linus Torvalds
     
  • …el.org/pub/scm/linux/kernel/git/tip/tip

    Pull x86 platform changes from Ingo Molnar:
    "A handful of numachip APIC driver updates/fixes, and two small SGI/UV
    fixes"

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: numachip: APIC driver cleanups
    x86: numachip: Elide self-IPI ICR polling
    x86: numachip: Fix 16-bit APIC ID truncation

    * 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: UV BAU: Increase maximum CPUs per socket/hub
    x86: UV BAU: Avoid NULL pointer reference in ptc_seq_show

    Linus Torvalds
     

04 Dec, 2014

2 commits

  • When hardware supports APIC/x2APIC virtualization we don't need to use
    pirqs for MSI handling and instead use APIC since most APIC accesses
    (MMIO or MSR) will now be processed without VMEXITs.

    As an example, netperf on the original code produces this profile
    (collected wih 'xentrace -e 0x0008ffff -T 5'):

    342 cpu_change
    260 CPUID
    34638 HLT
    64067 INJ_VIRQ
    28374 INTR
    82733 INTR_WINDOW
    10 NPF
    24337 TRAP
    370610 vlapic_accept_pic_intr
    307528 VMENTRY
    307527 VMEXIT
    140998 VMMCALL
    127 wrap_buffer

    After applying this patch the same test shows

    230 cpu_change
    260 CPUID
    36542 HLT
    174 INJ_VIRQ
    27250 INTR
    222 INTR_WINDOW
    20 NPF
    24999 TRAP
    381812 vlapic_accept_pic_intr
    166480 VMENTRY
    166479 VMEXIT
    77208 VMMCALL
    81 wrap_buffer

    ApacheBench results (ab -n 10000 -c 200) improve by about 10%

    Signed-off-by: Boris Ostrovsky
    Reviewed-by: Konrad Rzeszutek Wilk
    Reviewed-by: Andrew Cooper
    Signed-off-by: David Vrabel

    Boris Ostrovsky
     
  • If the hardware supports APIC virtualization we may decide not to use
    pirqs and instead use APIC/x2APIC directly, meaning that we don't want
    to set x86_msi.setup_msi_irqs and x86_msi.teardown_msi_irq to
    Xen-specific routines. However, x2APIC is not set up by the time
    pci_xen_hvm_init() is called so we need to postpone setting these ops
    until later, when we know which APIC mode is used.

    (Note that currently x2APIC is never initialized on HVM guests. This
    may change in the future)

    Signed-off-by: Boris Ostrovsky
    Acked-by: Stefano Stabellini
    Signed-off-by: David Vrabel

    Boris Ostrovsky
     

23 Nov, 2014

2 commits


16 Nov, 2014

1 commit

  • Instead of directly using the cache mode bits in the pte switch to
    using the cache mode type.

    Based-on-patch-by: Stefan Bader
    Signed-off-by: Juergen Gross
    Reviewed-by: Thomas Gleixner
    Cc: stefan.bader@canonical.com
    Cc: xen-devel@lists.xensource.com
    Cc: konrad.wilk@oracle.com
    Cc: ville.syrjala@linux.intel.com
    Cc: david.vrabel@citrix.com
    Cc: jbeulich@suse.com
    Cc: toshi.kani@hp.com
    Cc: plagnioj@jcrosoft.com
    Cc: tomi.valkeinen@ti.com
    Cc: bhelgaas@google.com
    Link: http://lkml.kernel.org/r/1415019724-4317-6-git-send-email-jgross@suse.com
    Signed-off-by: Thomas Gleixner

    Juergen Gross
     

12 Nov, 2014

1 commit

  • The problem fixed by 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and
    msix_mask_irq()") has been fixed in a simpler way by a previous commit
    ("PCI/MSI: Add pci_msi_ignore_mask to prevent writes to MSI/MSI-X Mask
    Bits").

    The msi_mask_irq() and msix_mask_irq() x86_msi_ops added by 0e4ccb1505a9
    are no longer needed, so revert the commit.

    default_msi_mask_irq() and default_msix_mask_irq() were added by
    0e4ccb1505a9 and are still used by s390, so keep them for now.

    [bhelgaas: changelog]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    Acked-by: David Vrabel
    CC: Konrad Rzeszutek Wilk
    CC: xen-devel@lists.xenproject.org

    Yijing Wang
     

07 Nov, 2014

1 commit

  • MSI-X vector Mask Bits are in MSI-X Tables in PCI memory space. Xen PV
    guests can't write to those tables. MSI vector Mask Bits are in PCI
    configuration space. Xen PV guests can write to config space, but those
    writes are ignored.

    Commit 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and
    msix_mask_irq()") added a way to override default_mask_msi_irqs() and
    default_mask_msix_irqs() so they can be no-ops in Xen guests, but this is
    more complicated than necessary.

    Add "pci_msi_ignore_mask" in the core PCI MSI code. If set,
    default_mask_msi_irqs() and default_mask_msix_irqs() return without doing
    anything. This is less flexible, but much simpler.

    [bhelgaas: changelog]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: David Vrabel
    CC: Konrad Rzeszutek Wilk
    CC: xen-devel@lists.xenproject.org

    Yijing Wang
     

05 Nov, 2014

1 commit

  • Drop printing that serves no purpose, as it's printing fixed or known
    values, and mark constant structure appropriately.

    Signed-off-by: Daniel J Blueman
    Cc: Steffen Persvold
    Cc: Bjorn Helgaas
    Link: http://lkml.kernel.org/r/1415089784-28779-3-git-send-email-daniel@numascale.com
    Signed-off-by: Thomas Gleixner

    Daniel J Blueman
     

12 Oct, 2014

1 commit

  • Pull Xen updates from David Vrabel:
    "Features and fixes:

    - Add pvscsi frontend and backend drivers.
    - Remove _PAGE_IOMAP PTE flag, freeing it for alternate uses.
    - Try and keep memory contiguous during PV memory setup (reduces
    SWIOTLB usage).
    - Allow front/back drivers to use threaded irqs.
    - Support large initrds in PV guests.
    - Fix PVH guests in preparation for Xen 4.5"

    * tag 'stable/for-linus-3.18-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (22 commits)
    xen: remove DEFINE_XENBUS_DRIVER() macro
    xen/xenbus: Remove BUG_ON() when error string trucated
    xen/xenbus: Correct the comments for xenbus_grant_ring()
    x86/xen: Set EFER.NX and EFER.SCE in PVH guests
    xen: eliminate scalability issues from initrd handling
    xen: sync some headers with xen tree
    xen: make pvscsi frontend dependant on xenbus frontend
    arm{,64}/xen: Remove "EXPERIMENTAL" in the description of the Xen options
    xen-scsifront: don't deadlock if the ring becomes full
    x86: remove the Xen-specific _PAGE_IOMAP PTE flag
    x86/xen: do not use _PAGE_IOMAP PTE flag for I/O mappings
    x86: skip check for spurious faults for non-present faults
    xen/efi: Directly include needed headers
    xen-scsiback: clean up a type issue in scsiback_make_tpg()
    xen-scsifront: use GFP_ATOMIC under spin_lock
    MAINTAINERS: Add xen pvscsi maintainer
    xen-scsiback: Add Xen PV SCSI backend driver
    xen-scsifront: Add Xen PV SCSI frontend driver
    xen: Add Xen pvSCSI protocol description
    xen/events: support threaded irqs for interdomain event channels
    ...

    Linus Torvalds
     

10 Oct, 2014

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "The interesting things here are:

    - Turn on Config Request Retry Status Software Visibility. This
    caused hangs last time, but we included a fix this time.
    - Rework PCI device configuration to use _HPP/_HPX more aggressively
    - Allow PCI devices to be put into D3cold during system suspend
    - Add arm64 PCI support
    - Add APM X-Gene host bridge driver
    - Add TI Keystone host bridge driver
    - Add Xilinx AXI host bridge driver

    More detailed summary:

    Enumeration
    - Check Vendor ID only for Config Request Retry Status (Rajat Jain)
    - Enable Config Request Retry Status when supported (Rajat Jain)
    - Add generic domain handling (Catalin Marinas)
    - Generate uppercase hex for modalias interface class (Ricardo Ribalda Delgado)

    Resource management
    - Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources() (Yinghai Lu)
    - Increase IBM ipr SAS Crocodile BARs to at least system page size (Douglas Lehr)

    PCI device hotplug
    - Prevent NULL dereference during pciehp probe (Andreas Noever)
    - Move _HPP & _HPX handling into core (Bjorn Helgaas)
    - Apply _HPP to PCIe devices as well as PCI (Bjorn Helgaas)
    - Apply _HPP/_HPX to display devices (Bjorn Helgaas)
    - Preserve SERR & PARITY settings when applying _HPP/_HPX (Bjorn Helgaas)
    - Preserve MPS and MRRS settings when applying _HPP/_HPX (Bjorn Helgaas)
    - Apply _HPP/_HPX to all devices, not just hot-added ones (Bjorn Helgaas)
    - Fix wait time in pciehp timeout message (Yinghai Lu)
    - Add more pciehp Slot Control debug output (Yinghai Lu)
    - Stop disabling pciehp notifications during init (Yinghai Lu)

    MSI
    - Remove arch_msi_check_device() (Alexander Gordeev)
    - Rename pci_msi_check_device() to pci_msi_supported() (Alexander Gordeev)
    - Move D0 check into pci_msi_check_device() (Alexander Gordeev)
    - Remove unused kobject from struct msi_desc (Yijing Wang)
    - Remove "pos" from the struct msi_desc msi_attrib (Yijing Wang)
    - Add "msi_bus" sysfs MSI/MSI-X control for endpoints (Yijing Wang)
    - Use __get_cached_msi_msg() instead of get_cached_msi_msg() (Yijing Wang)
    - Use __read_msi_msg() instead of read_msi_msg() (Yijing Wang)
    - Use __write_msi_msg() instead of write_msi_msg() (Yijing Wang)

    Power management
    - Drop unused runtime PM support code for PCIe ports (Rafael J. Wysocki)
    - Allow PCI devices to be put into D3cold during system suspend (Rafael J. Wysocki)

    AER
    - Add additional AER error strings (Gong Chen)
    - Make standalone includable (Thierry Reding)

    Virtualization
    - Add ACS quirk for Solarflare SFC9120 & SFC9140 (Alex Williamson)
    - Add ACS quirk for Intel 10G NICs (Alex Williamson)
    - Add ACS quirk for AMD A88X southbridge (Marti Raudsepp)
    - Remove unused pci_find_upstream_pcie_bridge(), pci_get_dma_source() (Alex Williamson)
    - Add device flag helpers (Ethan Zhao)
    - Assume all Mellanox devices have broken INTx masking (Gavin Shan)

    Generic host bridge driver
    - Fix ioport_map() for !CONFIG_GENERIC_IOMAP (Liviu Dudau)
    - Add pci_register_io_range() and pci_pio_to_address() (Liviu Dudau)
    - Define PCI_IOBASE as the base of virtual PCI IO space (Liviu Dudau)
    - Fix the conversion of IO ranges into IO resources (Liviu Dudau)
    - Add pci_get_new_domain_nr() and of_get_pci_domain_nr() (Liviu Dudau)
    - Add support for parsing PCI host bridge resources from DT (Liviu Dudau)
    - Add pci_remap_iospace() to map bus I/O resources (Liviu Dudau)
    - Add arm64 architectural support for PCI (Liviu Dudau)

    APM X-Gene
    - Add APM X-Gene PCIe driver (Tanmay Inamdar)
    - Add arm64 DT APM X-Gene PCIe device tree nodes (Tanmay Inamdar)

    Freescale i.MX6
    - Probe in module_init(), not fs_initcall() (Lucas Stach)
    - Delay enabling reference clock for SS until it stabilizes (Tim Harvey)

    Marvell MVEBU
    - Fix uninitialized variable in mvebu_get_tgt_attr() (Thomas Petazzoni)

    NVIDIA Tegra
    - Make sure the PCIe PLL is really reset (Eric Yuen)
    - Add error path tegra_msi_teardown_irq() cleanup (Jisheng Zhang)
    - Fix extended configuration space mapping (Peter Daifuku)
    - Implement resource hierarchy (Thierry Reding)
    - Clear CLKREQ# enable on port disable (Thierry Reding)
    - Add Tegra124 support (Thierry Reding)

    ST Microelectronics SPEAr13xx
    - Pass config resource through reg property (Pratyush Anand)

    Synopsys DesignWare
    - Use NULL instead of false (Fabio Estevam)
    - Parse bus-range property from devicetree (Lucas Stach)
    - Use pci_create_root_bus() instead of pci_scan_root_bus() (Lucas Stach)
    - Remove pci_assign_unassigned_resources() (Lucas Stach)
    - Check private_data validity in single place (Lucas Stach)
    - Setup and clear exactly one MSI at a time (Lucas Stach)
    - Remove open-coded bitmap operations (Lucas Stach)
    - Fix configuration base address when using 'reg' (Minghuan Lian)
    - Fix IO resource end address calculation (Minghuan Lian)
    - Rename get_msi_data() to get_msi_addr() (Minghuan Lian)
    - Add get_msi_data() to pcie_host_ops (Minghuan Lian)
    - Add support for v3.65 hardware (Murali Karicheri)
    - Fold struct pcie_port_info into struct pcie_port (Pratyush Anand)

    TI Keystone
    - Add TI Keystone PCIe driver (Murali Karicheri)
    - Limit MRSS for all downstream devices (Murali Karicheri)
    - Assume controller is already in RC mode (Murali Karicheri)
    - Set device ID based on SoC to support multiple ports (Murali Karicheri)

    Xilinx AXI
    - Add Xilinx AXI PCIe driver (Srikanth Thokala)
    - Fix xilinx_pcie_assign_msi() return value test (Dan Carpenter)

    Miscellaneous
    - Clean up whitespace (Quentin Lambert)
    - Remove assignments from "if" conditions (Quentin Lambert)
    - Move PCI_VENDOR_ID_VMWARE to pci_ids.h (Francesco Ruggeri)
    - x86: Mark DMI tables as initialization data (Mathias Krause)
    - x86: Move __init annotation to the correct place (Mathias Krause)
    - x86: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst (Mathias Krause)
    - x86: Constify pci_mmcfg_probes[] array (Mathias Krause)
    - x86: Mark PCI BIOS initialization code as such (Mathias Krause)
    - Parenthesize PCI_DEVID and PCI_VPD_LRDT_ID parameters (Megan Kamiya)
    - Remove unnecessary variable in pci_add_dynid() (Tobias Klauser)"

    * tag 'pci-v3.18-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (109 commits)
    arm64: dts: Add APM X-Gene PCIe device tree nodes
    PCI: Add ACS quirk for AMD A88X southbridge devices
    PCI: xgene: Add APM X-Gene PCIe driver
    PCI: designware: Remove open-coded bitmap operations
    PCI/MSI: Remove unnecessary temporary variable
    PCI/MSI: Use __write_msi_msg() instead of write_msi_msg()
    MSI/powerpc: Use __read_msi_msg() instead of read_msi_msg()
    PCI/MSI: Use __get_cached_msi_msg() instead of get_cached_msi_msg()
    PCI/MSI: Add "msi_bus" sysfs MSI/MSI-X control for endpoints
    PCI/MSI: Remove "pos" from the struct msi_desc msi_attrib
    PCI/MSI: Remove unused kobject from struct msi_desc
    PCI/MSI: Rename pci_msi_check_device() to pci_msi_supported()
    PCI/MSI: Move D0 check into pci_msi_check_device()
    PCI/MSI: Remove arch_msi_check_device()
    irqchip: armada-370-xp: Remove arch_msi_check_device()
    PCI/MSI/PPC: Remove arch_msi_check_device()
    arm64: Add architectural support for PCI
    PCI: Add pci_remap_iospace() to map bus I/O resources
    of/pci: Add support for parsing PCI host bridge resources from DT
    of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr()
    ...

    Conflicts:
    arch/arm64/boot/dts/apm-storm.dtsi

    Linus Torvalds
     

24 Sep, 2014

4 commits


23 Sep, 2014

2 commits

  • The _PAGE_IO_MAP PTE flag was only used by Xen PV guests to mark PTEs
    that were used to map I/O regions that are 1:1 in the p2m. This
    allowed Xen to obtain the correct PFN when converting the MFNs read
    from a PTE back to their PFN.

    Xen guests no longer use _PAGE_IOMAP for this. Instead mfn_to_pfn()
    returns the correct PFN by using a combination of the m2p and p2m to
    determine if an MFN corresponds to a 1:1 mapping in the the p2m.

    Remove _PAGE_IOMAP, replacing it with _PAGE_UNUSED2 to allow for
    future uses of the PTE flag.

    Signed-off-by: David Vrabel
    Acked-by: "H. Peter Anvin"

    David Vrabel
     
  • The DMI tables are only used in __init code, thereby can be marked as
    initialization data, too. The same is true for the callback functions
    referenced from the DMI tables.

    This moves ~9.6 kB of code and r/o data to the init sections, marking the
    memory for release after initialization.

    Signed-off-by: Mathias Krause
    Signed-off-by: Bjorn Helgaas
    Acked-by: Ingo Molnar

    Mathias Krause
     

20 Sep, 2014

1 commit

  • Pull PCI fixes from Bjorn Helgaas:
    "These fix:

    - Boot video device detection on dual-GPU Apple systems
    - Hotplug fiascos on VGA switcheroo with radeon & nouveau drivers
    - Boot hang on Freescale i.MX6 systems
    - Excessive "no hotplug settings from platform" warnings

    In particular:

    Enumeration
    - Don't default exclusively to first video device (Bruno Prémont)

    PCI device hotplug
    - Remove "no hotplug settings from platform" warning (Bjorn Helgaas)
    - Add pci_ignore_hotplug() for VGA switcheroo (Bjorn Helgaas)

    Freescale i.MX6
    - Put LTSSM in "Detect" state before disabling (Lucas Stach)"

    * tag 'pci-v3.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    vgaarb: Drop obsolete #ifndef
    vgaarb: Don't default exclusively to first video device with mem+io
    ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug()
    PCI: Remove "no hotplug settings from platform" warning
    PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device
    PCI: imx6: Put LTSSM in "Detect" state before disabling it
    MAINTAINERS: Add Lucas Stach as co-maintainer for i.MX6 PCI driver

    Linus Torvalds
     

17 Sep, 2014

1 commit

  • Commit 20cde694027e ("x86, ia64: Move EFI_FB vga_default_device()
    initialization to pci_vga_fixup()") moved boot video device detection from
    efifb to x86 and ia64 pci/fixup.c.

    For dual-GPU Apple computers above change represents a regression as code
    in efifb did forcefully override vga_default_device while the merge did not
    (vgaarb happens prior to PCI fixup).

    To improve on initial device selection by vgaarb (it cannot know if PCI
    device not behind bridges see/decode legacy VGA I/O or not), move the
    screen_info based check from pci_video_fixup() to vgaarb's init function and
    use it to refine/override decision taken while adding the individual PCI
    VGA devices. This way PCI fixup has no reason to adjust vga_default_device
    anymore but can depend on its value for flagging shadowed VBIOS.

    This has the nice benefit of removing duplicated code but does introduce a
    #if defined() block in vgaarb. Not all architectures have screen_info and
    would cause compile to fail without it.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=84461
    Reported-and-Tested-By: Andreas Noever
    Signed-off-by: Bruno Prémont
    Signed-off-by: Bjorn Helgaas
    CC: Matthew Garrett
    CC: stable@vger.kernel.org # v3.5+

    Bruno Prémont
     

29 Aug, 2014

1 commit

  • Now IOAPIC driver dynamically allocates IRQ numbers for IOAPIC pins.
    We need to keep IRQ assignment for PCI devices during runtime power
    management, otherwise it may cause failure of device wakeups.

    Commit 3eec595235c17a7 "x86, irq, PCI: Keep IRQ assignment for PCI
    devices during suspend/hibernation" has fixed the issue for suspend/
    hibernation, we also need the same fix for runtime device sleep too.

    Fix: https://bugzilla.kernel.org/show_bug.cgi?id=83271
    Reported-and-Tested-by: EmanueL Czirai
    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: EmanueL Czirai
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Grant Likely
    Link: http://lkml.kernel.org/r/1409304383-18806-1-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

14 Aug, 2014

1 commit

  • Pull x86/apic updates from Thomas Gleixner:
    "This is a major overhaul to the x86 apic subsystem consisting of the
    following parts:

    - Remove obsolete APIC driver abstractions (David Rientjes)

    - Use the irqdomain facilities to dynamically allocate IRQs for
    IOAPICs. This is a prerequisite to enable IOAPIC hotplug support,
    and it also frees up wasted vectors (Jiang Liu)

    - Misc fixlets.

    Despite the hickup in Ingos previous pull request - caused by the
    missing fixup for the suspend/resume issue reported by Borislav - I
    strongly recommend that this update finds its way into 3.17. Some
    history for you:

    This is preparatory work for physical IOAPIC hotplug. The first
    attempt to support this was done by Yinghai and I shot it down because
    it just added another layer of obscurity and complexity to the already
    existing mess without tackling the underlying shortcomings of the
    current implementation.

    After quite some on- and offlist discussions, I requested that the
    design of this functionality must use generic infrastructure, i.e.
    irq domains, which provide all the mechanisms to dynamically map linux
    interrupt numbers to physical interrupts.

    Jiang picked up the idea and did a great job of consolidating the
    existing interfaces to manage the x86 (IOAPIC) interrupt system by
    utilizing irq domains.

    The testing in tip, Linux-next and inside of Intel on various machines
    did not unearth any oddities until Borislav exposed it to one of his
    oddball machines. The issue was resolved quickly, but unfortunately
    the fix fell through the cracks and did not hit the tip tree before
    Ingo sent the pull request. Not entirely Ingos fault, I also assumed
    that the fix was already merged when Ingo asked me whether he could
    send it.

    Nevertheless this work has a proper design, has undergone several
    rounds of review and the final fallout after applying it to tip and
    integrating it into Linux-next has been more than moderate. It's the
    ground work not only for IOAPIC hotplug, it will also allow us to move
    the lowlevel vector allocation into the irqdomain hierarchy, which
    will benefit other architectures as well. Patches are posted already,
    but they are on hold for two weeks, see below.

    I really appreciate the competence and responsiveness Jiang has shown
    in course of this endavour. So I'm sure that any fallout of this will
    be addressed in a timely manner.

    FYI, I'm vanishing for 2 weeks into my annual kids summer camp kitchen
    duty^Wvacation, while you folks are drooling at KS/LinuxCon :) But HPA
    will have a look at the hopefully zero fallout until I'm back"

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
    x86, irq, PCI: Keep IRQ assignment for PCI devices during suspend/hibernation
    x86/apic/vsmp: Make is_vsmp_box() static
    x86, apic: Remove enable_apic_mode callback
    x86, apic: Remove setup_portio_remap callback
    x86, apic: Remove multi_timer_check callback
    x86, apic: Replace noop_check_apicid_used
    x86, apic: Remove check_apicid_present callback
    x86, apic: Remove mps_oem_check callback
    x86, apic: Remove smp_callin_clear_local_apic callback
    x86, apic: Replace trampoline physical addresses with defaults
    x86, apic: Remove x86_32_numa_cpu_node callback
    x86: intel-mid: Use the new io_apic interfaces
    x86, vsmp: Remove is_vsmp_box() from apic_is_clustered_box()
    x86, irq: Clean up irqdomain transition code
    x86, irq, devicetree: Release IOAPIC pin when PCI device is disabled
    x86, irq, SFI: Release IOAPIC pin when PCI device is disabled
    x86, irq, mpparse: Release IOAPIC pin when PCI device is disabled
    x86, irq, ACPI: Release IOAPIC pin when PCI device is disabled
    x86, irq: Introduce helper functions to release IOAPIC pin
    x86, irq: Simplify the way to handle ISA IRQ
    ...

    Linus Torvalds
     

08 Aug, 2014

1 commit

  • Now IOAPIC driver dynamically allocates IRQ numbers for IOAPIC pins.
    We need to keep IRQ assignment for PCI devices during suspend/hibernation,
    otherwise it may cause failure of suspend/hibernation due to:
    1) Device driver calls pci_enable_device() to allocate an IRQ number
    and register interrupt handler on the returned IRQ.
    2) Device driver's suspend callback calls pci_disable_device() and
    release assigned IRQ in turn.
    3) Device driver's resume callback calls pci_enable_device() to
    allocate IRQ number again. A different IRQ number may be assigned
    by IOAPIC driver this time.
    4) Now the hardware delivers interrupt to the new IRQ but interrupt
    handler is still registered against the old IRQ, so it breaks
    suspend/hibernation.

    To fix this issue, we keep IRQ assignment during suspend/hibernation.
    Flag pci_dev.dev.power.is_prepared is used to detect that
    pci_disable_device() is called during suspend/hibernation.

    Reported-and-Tested-by: Borislav Petkov
    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Grant Likely
    Cc: Len Brown
    Link: http://lkml.kernel.org/r/1407478071-29399-1-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

17 Jul, 2014

1 commit

  • Commit 30919b0bf356 ("x86: avoid low BIOS area when allocating address
    space") moved the test for resource allocations that fall within the first
    1MB of address space from the PCI-specific path to a generic path, such
    that all resource allocations will avoid this area. However, this breaks
    ISA cards which need to allocate a memory region within the first 1MB. An
    example is the i82365 PCMCIA controller and derivatives like the Ricoh
    RF5C296/396 which map part of the PCMCIA socket memory address space into
    the first 1MB of system memory address space. They do not work anymore as
    no usable memory region exists due to this change:

    Intel ISA PCIC probe: Ricoh RF5C296/396 ISA-to-PCMCIA at port 0x3e0 ofs 0x00, 2 sockets
    host opts [0]: none
    host opts [1]: none
    ISA irqs (scanned) = 3,4,5,9,10 status change on irq 10
    pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1
    pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff
    pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean.
    pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x0d0000-0x0dffff: clean.
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x0e0000-0x0effff: clean.
    pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: clean.
    pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: clean.
    pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff
    pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean.
    pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0d0000-0x0dffff: clean.
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0e0000-0x0effff: clean.
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x60000000-0x60ffffff: clean.
    pcmcia_socket pcmcia_socket1: cs: memory probe 0xa0000000-0xa0ffffff: clean.
    pcmcia_socket pcmcia_socket1: cs: memory probe 0x0cc000-0x0effff: excluding 0xe0000-0xeffff
    pcmcia_socket pcmcia_socket1: cs: unable to map card memory!

    If filtering out the first 1MB is reverted, everything works as expected.

    Tested-by: Robert Resch
    Signed-off-by: Christoph Schulz
    Signed-off-by: Bjorn Helgaas
    CC: stable@vger.kernel.org # v2.6.37+

    Christoph Schulz
     

11 Jul, 2014

1 commit

  • Commit b4aa0163056b ("efifb: Implement vga_default_device() (v2)") added
    efifb vga_default_device() so EFI systems that do not load shadow VBIOS or
    setup VGA get proper value for boot_vga PCI sysfs attribute on the
    corresponding PCI device.

    Xorg doesn't detect devices when boot_vga=0, e.g., on some EFI systems such
    as MacBookAir2,1. Xorg detects the GPU and finds the DRI device but then
    bails out with "no devices detected".

    Note: When vga_default_device() is set boot_vga PCI sysfs attribute
    reflects its state. When unset this attribute is 1 whenever
    IORESOURCE_ROM_SHADOW flag is set.

    With introduction of sysfb/simplefb/simpledrm efifb is getting obsolete
    while having native drivers for the GPU also makes selecting sysfb/efifb
    optional.

    Remove the efifb implementation of vga_default_device() and initialize
    vgaarb's vga_default_device() with the PCI GPU that matches boot
    screen_info in pci_fixup_video().

    [bhelgaas: remove unused "dev" in efifb_setup()]
    Fixes: b4aa0163056b ("efifb: Implement vga_default_device() (v2)")
    Tested-by: Anibal Francisco Martinez Cortina
    Signed-off-by: Bruno Prémont
    Signed-off-by: Bjorn Helgaas
    Acked-by: Matthew Garrett
    CC: stable@vger.kernel.org # v3.5+

    Bruno Prémont
     

22 Jun, 2014

7 commits

  • Release IOAPIC pin associated with PCI device when the PCI device
    is disabled.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Link: http://lkml.kernel.org/r/1402302011-23642-41-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Release IOAPIC pin associated with PCI device when the PCI device
    is disabled.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Link: http://lkml.kernel.org/r/1402302011-23642-40-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • 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: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: H. Peter Anvin
    Cc: sfi-devel@simplefirmware.org
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Len Brown
    Cc: David Cohen
    Cc: Kuppuswamy Sathyanarayanan
    Link: http://lkml.kernel.org/r/1402302011-23642-33-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • 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: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Link: http://lkml.kernel.org/r/1402302011-23642-32-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • 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: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: H. Peter Anvin
    Cc: sfi-devel@simplefirmware.org
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Len Brown
    Cc: David Cohen
    Cc: Kuppuswamy Sathyanarayanan
    Link: http://lkml.kernel.org/r/1402302011-23642-28-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • 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: Jiang Liu
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: xen-devel@lists.xenproject.org
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Len Brown
    Cc: Pavel Machek
    Cc: Konrad Rzeszutek Wilk
    Cc: Rob Herring
    Cc: Michal Simek
    Cc: Tony Lindgren
    Acked-by: David Vrabel
    Link: http://lkml.kernel.org/r/1402302011-23642-20-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Use kmalloc_node() instead of kmalloc() when possible to optimize
    for performance on NUMA platforms.

    Signed-off-by: Jiang Liu
    Acked-by: Bjorn Helgaas
    Acked-by: David Rientjes
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Paul Gortmaker
    Cc: Greg Kroah-Hartman
    Cc: Benjamin Herrenschmidt
    Cc: Grant Likely
    Cc: Rafael J. Wysocki
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Link: http://lkml.kernel.org/r/1402302011-23642-6-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

05 Jun, 2014

1 commit

  • The DMA Contiguous Memory Allocator support on x86 is disabled when
    swiotlb config option is enabled. So DMA CMA is always disabled on
    x86_64 because swiotlb is always enabled. This attempts to support for
    DMA CMA with enabling swiotlb config option.

    The contiguous memory allocator on x86 is integrated in the function
    dma_generic_alloc_coherent() which is .alloc callback in nommu_dma_ops
    for dma_alloc_coherent().

    x86_swiotlb_alloc_coherent() which is .alloc callback in swiotlb_dma_ops
    tries to allocate with dma_generic_alloc_coherent() firstly and then
    swiotlb_alloc_coherent() is called as a fallback.

    The main part of supporting DMA CMA with swiotlb is that changing
    x86_swiotlb_free_coherent() which is .free callback in swiotlb_dma_ops
    for dma_free_coherent() so that it can distinguish memory allocated by
    dma_generic_alloc_coherent() from one allocated by
    swiotlb_alloc_coherent() and release it with dma_generic_free_coherent()
    which can handle contiguous memory. This change requires making
    is_swiotlb_buffer() global function.

    This also needs to change .free callback in the dma_map_ops for amd_gart
    and sta2x11, because these dma_ops are also using
    dma_generic_alloc_coherent().

    Signed-off-by: Akinobu Mita
    Acked-by: Marek Szyprowski
    Acked-by: Konrad Rzeszutek Wilk
    Cc: David Woodhouse
    Cc: Don Dutile
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Andi Kleen
    Cc: Yinghai Lu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

29 May, 2014

2 commits

  • * pci/hotplug:
    PCI: cpqphp: Fix possible null pointer dereference
    NVMe: Implement PCIe reset notification callback
    PCI: Notify driver before and after device reset

    * pci/pci_is_bridge:
    pcmcia: Use pci_is_bridge() to simplify code
    PCI: pciehp: Use pci_is_bridge() to simplify code
    PCI: acpiphp: Use pci_is_bridge() to simplify code
    PCI: cpcihp: Use pci_is_bridge() to simplify code
    PCI: shpchp: Use pci_is_bridge() to simplify code
    PCI: rpaphp: Use pci_is_bridge() to simplify code
    sparc/PCI: Use pci_is_bridge() to simplify code
    powerpc/PCI: Use pci_is_bridge() to simplify code
    ia64/PCI: Use pci_is_bridge() to simplify code
    x86/PCI: Use pci_is_bridge() to simplify code
    PCI: Use pci_is_bridge() to simplify code
    PCI: Add new pci_is_bridge() interface
    PCI: Rename pci_is_bridge() to pci_has_subordinate()

    * pci/virtualization:
    PCI: Introduce new device binding path using pci_dev.driver_override

    Conflicts:
    drivers/pci/pci-sysfs.c

    Bjorn Helgaas
     
  • * pci/host-exynos:
    PCI: exynos: Remove unnecessary OOM messages

    * pci/host-rcar:
    PCI: rcar: Add gen2 device tree support
    PCI: rcar: Add R-Car PCIe device tree bindings
    PCI: rcar: Add MSI support for PCIe
    PCI: rcar: Add Renesas R-Car PCIe driver
    PCI: rcar: Use new OF interrupt mapping when possible

    * pci/amd-numa:
    x86/PCI: Clean up and mark early_root_info_init() as deprecated
    x86/PCI: Work around AMD Fam15h BIOSes that fail to provide _PXM
    x86/PCI: Warn if we have to "guess" host bridge node information

    Bjorn Helgaas