29 Jan, 2018

1 commit

  • Add SPDX GPL-2.0 to all PCI files that specified the GPL version 2 license.

    Remove the boilerplate GPL version 2 language, relying on the assertion in
    b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to
    files with no license") that the SPDX identifier may be used instead of the
    full boilerplate text.

    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Greg Kroah-Hartman

    Bjorn Helgaas
     

25 Apr, 2017

1 commit

  • The current ECAM kernel implementation uses ioremap() to map the ECAM
    configuration space memory region; this is not safe in that on some
    architectures the ioremap interface provides mappings that allow posted
    write transactions. This, as highlighted in the PCIe specifications (4.0 -
    Rev0.3, "Ordering Considerations for the Enhanced Configuration Address
    Mechanism"), can create ordering issues for software because posted writes
    transactions on the CPU host bus are non posted in the PCI express fabric.

    Update the ioremap() interface to use pci_remap_cfgspace() whose mapping
    attributes guarantee that non-posted writes transactions are issued for
    memory writes within the ECAM memory mapped address region.

    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    Cc: Jayachandran C

    Lorenzo Pieralisi
     

07 Dec, 2016

1 commit


04 Aug, 2016

1 commit

  • The use of config_enabled() against config options is ambiguous. In
    practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
    author might have used it for the meaning of IS_ENABLED(). Using
    IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc. makes the intention
    clearer.

    This commit replaces config_enabled() with IS_ENABLED() where possible.
    This commit is only touching bool config options.

    I noticed two cases where config_enabled() is used against a tristate
    option:

    - config_enabled(CONFIG_HWMON)
    [ drivers/net/wireless/ath/ath10k/thermal.c ]

    - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
    [ drivers/gpu/drm/gma500/opregion.c ]

    I did not touch them because they should be converted to IS_BUILTIN()
    in order to keep the logic, but I was not sure it was the authors'
    intention.

    Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook
    Cc: Stas Sergeev
    Cc: Matt Redfearn
    Cc: Joshua Kinard
    Cc: Jiri Slaby
    Cc: Bjorn Helgaas
    Cc: Borislav Petkov
    Cc: Markos Chandras
    Cc: "Dmitry V. Levin"
    Cc: yu-cheng yu
    Cc: James Hogan
    Cc: Brian Gerst
    Cc: Johannes Berg
    Cc: Peter Zijlstra
    Cc: Al Viro
    Cc: Will Drewry
    Cc: Nikolay Martynov
    Cc: Huacai Chen
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Daniel Borkmann
    Cc: Leonid Yegoshin
    Cc: Rafal Milecki
    Cc: James Cowgill
    Cc: Greg Kroah-Hartman
    Cc: Ralf Baechle
    Cc: Alex Smith
    Cc: Adam Buchbinder
    Cc: Qais Yousef
    Cc: Jiang Liu
    Cc: Mikko Rapeli
    Cc: Paul Gortmaker
    Cc: Denys Vlasenko
    Cc: Brian Norris
    Cc: Hidehiro Kawai
    Cc: "Luis R. Rodriguez"
    Cc: Andy Lutomirski
    Cc: Ingo Molnar
    Cc: Dave Hansen
    Cc: "Kirill A. Shutemov"
    Cc: Roland McGrath
    Cc: Paul Burton
    Cc: Kalle Valo
    Cc: Viresh Kumar
    Cc: Tony Wu
    Cc: Huaitong Han
    Cc: Sumit Semwal
    Cc: Alexei Starovoitov
    Cc: Juergen Gross
    Cc: Jason Cooper
    Cc: "David S. Miller"
    Cc: Oleg Nesterov
    Cc: Andrea Gelmini
    Cc: David Woodhouse
    Cc: Marc Zyngier
    Cc: Rabin Vincent
    Cc: "Maciej W. Rozycki"
    Cc: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

11 Jun, 2016

2 commits

  • Add a parent device field to struct pci_config_window. The parent is not
    saved now, but will be useful to save it in some cases. For ACPI on ARM64,
    it can be used to setup ACPI companion and domain.

    Since the parent dev is in struct pci_config_window now, we need not pass
    it to the init function as a separate argument.

    Signed-off-by: Jayachandran C
    Signed-off-by: Bjorn Helgaas
    Acked-by: Lorenzo Pieralisi

    Jayachandran C
     
  • This header will be used from arch/arm64 for ACPI PCI implementation so it
    needs to be moved out of drivers/pci.

    Update users of the header file to use the new name. No functional
    changes.

    Signed-off-by: Jayachandran C
    Signed-off-by: Bjorn Helgaas
    Acked-by: Lorenzo Pieralisi

    Jayachandran C
     

12 May, 2016

1 commit

  • Add config option PCI_ECAM and file drivers/pci/ecam.c to provide generic
    functions for accessing memory-mapped PCI config space.

    The API is defined in drivers/pci/ecam.h and is written to replace the API
    in drivers/pci/host/pci-host-common.h. The file defines a new 'struct
    pci_config_window' to hold the information related to a PCI config area and
    its mapping. This structure is expected to be used as sysdata for
    controllers that have ECAM based mapping.

    Helper functions are provided to setup the mapping, free the mapping and to
    implement the map_bus method in 'struct pci_ops'

    Signed-off-by: Jayachandran C
    Signed-off-by: Bjorn Helgaas

    Jayachandran C