aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-02-01Merge tag 'leg-configs-20160122.0' into leg-kernelleg-20160201.0Graeme Gregory
2016-02-01Merge tag 'topic-apei-20160122.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-sbsa-watchdog-20160122.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-kvm-acpi-20160122.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-fvp-20160122.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-gtdt-wakeup-timer-20160201.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-acpi-console-20160201.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-amba-probing-20160122.0' into leg-kernelGraeme Gregory
2016-02-01Merge tag 'topic-numa-20160122.0' into leg-kernelGraeme Gregory
2016-02-01clocksource: add memory-mapped timer support in arm_arch_timer.cFu Wei
The patch add memory-mapped timer register support for arm_arch_timer driver by using the information provided by the new GTDT driver of ACPI. Signed-off-by: Fu Wei <fu.wei@linaro.org>
2016-02-01clocksource: simplify ACPI code in arm_arch_timer.cFu Wei
The patch update arm_arch_timer driver to use the function provided by the new GTDT driver of ACPI. By this way, arm_arch_timer.c can be simplified, and separate all the ACPI GTDT knowledge from this timer driver. Signed-off-by: Fu Wei <fu.wei@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
2016-02-01ACPI: add GTDT table parse driver into ACPI driverFu Wei
This driver adds support for parsing all kinds of timer in GTDT: (1)arch timer: provide a kernel API to parse all the PPIs and always-on info in GTDT and export them by arch_timer_data struct. (2)memory-mapped timer: provide several kernel APIs to parse GT Block Structure in GTDT, export those info by return value and arch_timer_mem_data struct. (3)SBSA Generic Watchdog: parse all info in SBSA Generic Watchdog Structure in GTDT, and creating a platform device with that information. This allows the operating system to obtain device data from the resource of platform device. The platform device named "sbsa-gwdt" can be used by the ARM SBSA Generic Watchdog driver. By this driver, we can simplify all the relevant drivers, and separate all the ACPI GTDT knowledge from them. Signed-off-by: Fu Wei <fu.wei@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
2016-02-01serial: pl011: add acpi_match for amba-pl011.cAleksey Makarov
Add an implementation of acpi_match() to the pl011 driver. It allows to check if the console matches one specified with ACPI SPCR table. Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
2016-02-01ACPI: parse SPCR and enable matching consoleAleksey Makarov
'ARM Server Base Boot Requiremets' [1] mention SPCR (Serial Port Console Redirection Table) [2] as a mandatory ACPI table that specifies the configuration of serial console. Parse this table and check if any registered console match the description. If it does, enable that console. To implement that, introduce a new member int (*acpi_match)(struct console *, struct acpi_table_spcr *) of struct console. It allows drivers to check if they provide a matching console device. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html [2] http://msdn.microsoft.com/en-us/library/windows/hardware/dn639131(v=vs.85).aspx Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
2016-02-01printk: make preferred_console local static boolAleksey Makarov
The variable preferred_console is used only inside register_console() and it's semantics is boolean. Make it clear. Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
2016-01-22configs: add configs for CI jobleg-configs-20160122.0Graeme Gregory
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
2016-01-22acpi, apei, hest: Move HEST table initialization where it belongs.Tomasz Nowicki
Since HEST (hardware error sources table) can describe more than PCI specific errors, it needs to be moved out of acpi_pci_root_init. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Fu Wei <fu.wei@linaro.org>
2016-01-22acpi, apei: add Boot Error Record Table (BERT) supportHuang Ying
ACPI/APEI is designed to verifiy/report H/W errors, like Corrected Error(CE) and Uncorrected Error(UC). It contains four tables: HEST, ERST, EINJ and BERT. The first three tables have been merged for a long time, but because of lacking BIOS support for BERT, the support for BERT is pending until now. Recently on ARM 64 platform it is has been supported. So here we come. Under normal circumstances, when a hardware error occurs, kernel will be notified via NMI, MCE or some other method, then kernel will process the error condition, report it, and recover it if possible. But sometime, the situation is so bad, so that firmware may choose to reset directly without notifying Linux kernel. Linux kernel can use the Boot Error Record Table (BERT) to get the un-notified hardware errors that occurred in a previous boot. In this patch, the error information is reported via printk. For more information about BERT, please refer to ACPI Specification version 6.0, section 18.3.1: http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf The following log is a BERT record after system reboot because of hitting a fatal memory error: BERT: Error records from previous boot: [Hardware Error]: It has been corrected by h/w and requires no further action [Hardware Error]: event severity: corrected [Hardware Error]: Error 0, type: recoverable [Hardware Error]: section_type: memory error [Hardware Error]: error_status: 0x0000000000000400 [Hardware Error]: physical_address: 0xffffffffffffffff [Hardware Error]: card: 1 module: 2 bank: 3 row: 1 column: 2 bit_position: 5 [Hardware Error]: error_type: 2, single-bit ECC [Tomasz Nowicki: Clear error status at the end of error handling] [Tony: Applied some cleanups suggested by Fu Wei] [Fu Wei: delete EXPORT_SYMBOL_GPL(bert_disable), improve the code] Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Chen, Gong <gong.chen@linux.intel.com> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Fu Wei <fu.wei@linaro.org> Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
2016-01-22acpi, apei, arm64: APEI initial support for aarch64.Tomasz Nowicki
This commit provides APEI arch-specific bits for aarch64 Meanwhile, add a new subfunction "hest_ia_init" for "acpi_disable_cmcff" which is used by IA-32 Architecture Corrected Machine Check (CMC), and add "HAVE_ACPI_APEI_HEST_IA32" to make sure only x86 use "hest_ia_init". Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org> Signed-off-by: Fu Wei <fu.wei@linaro.org> Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
2016-01-22Watchdog: introduce ARM SBSA watchdog driverFu Wei
This driver bases on linux kernel watchdog framework, and use "pretimeout" in the framework. It supports getting timeout and pretimeout from parameter and FDT at the driver init stage. In first timeout, the interrupt routine run panic to save system context. Signed-off-by: Fu Wei <fu.wei@linaro.org> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org> Tested-by: Pratyush Anand <panand@redhat.com>
2016-01-22Watchdog: introdouce "pretimeout" into frameworkFu Wei
Also update Documentation/watchdog/watchdog-kernel-api.txt to introduce: (1)the new elements in the watchdog_device and watchdog_ops struct; (2)the new API "watchdog_init_timeouts" Reasons: (1)kernel already has two watchdog drivers are using "pretimeout": drivers/char/ipmi/ipmi_watchdog.c drivers/watchdog/kempld_wdt.c(but the definition is different) (2)some other drivers are going to use this: ARM SBSA Generic Watchdog Signed-off-by: Fu Wei <fu.wei@linaro.org> Tested-by: Pratyush Anand <panand@redhat.com>
2016-01-22ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsiFu Wei
This can be a example of adding SBSA Generic Watchdog device node into some dts files for the Soc which contains SBSA Generic Watchdog. Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: Fu Wei <fu.wei@linaro.org>
2016-01-22ARM64: add SBSA Generic Watchdog device node in foundation-v8.dtsFu Wei
This can be a example of adding SBSA Generic Watchdog device node into some dts files for the Soc which contains SBSA Generic Watchdog. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Fu Wei <fu.wei@linaro.org>
2016-01-22Documentation: add sbsa-gwdt driver documentationFu Wei
The sbsa-gwdt.txt documentation in devicetree/bindings/watchdog is for introducing SBSA(Server Base System Architecture) Generic Watchdog device node info into FDT. Also add sbsa-gwdt introduction in watchdog-parameters.txt Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Fu Wei <fu.wei@linaro.org>
2016-01-22kvm: arm64: Implement ACPI probing code for GICv3Wei Huang
This patches enables ACPI support for KVM virtual GICv3. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Wei Huang <wei@redhat.com>
2016-01-22kvm: arm64: Implement ACPI probing code for GICv2Wei Huang
This patches enables ACPI support for KVM virtual GICv2. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Alexander Spyridaki <a.spyridakis@virtualopensystems.com> Signed-off-by: Wei Huang <wei@redhat.com>
2016-01-22kvm: arm64: Detect GIC version for proper ACPI vGIC probingWei Huang
There are two GICs (GICv2 and GICv3) supported by KVM. So it is necessary to find out GIC version before calling ACPI probing functions defined in vgic-v2.c and vgic-v3.c. This patch detects GIC version by checking gic_version field of GIC distributor, which was defined since ACPI 6.0. In case of ACPI 5.1, we use manual hardware discovery to find out GIC version. NOTE: This patch is based on a recent patch by Hanjun Guo. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
2016-01-22kvm: arm64: Dispatch virt GIC probing to device tree and ACPIWei Huang
This patch creates a dispatch function to support virt GIC probing in both device tree (DT) and ACPI environment. kvm_vgic_hyp_init() will probe DT first. If failed, it will try ACPI. Signed-off-by: Wei Huang <wei@redhat.com>
2016-01-22kvm: arm64: Enable ACPI support for virt arch timerWei Huang
This patches enables ACPI support for KVM virtual arch timer. It allows KVM to parse ACPI table for arch timer PPI when DT table is not present. Signed-off-by: Alexander Spyridaki <a.spyridakis@virtualopensystems.com> Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
2016-01-22net: smc91x: add ACPI probing support.Graeme Gregory
Add device ID LINA0003 for this device and add the match table. As its a platform device it needs no other code and will be probed in by acpi_platform once device ID is added. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
2016-01-22ACPI: amba bus probing supportGraeme Gregory
On ARM64 some devices use the AMBA device and not the platform bus for probing so add support for this. Uses a dummy clock for apb_pclk as ACPI does not have a suitable clock representation and to keep the core AMBA bus code unchanged between probing methods. Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
2016-01-22ACPI: introduce a function to find the first physical deviceAleksey Makarov
Factor out the code that finds the first physical device of a given ACPI device. It is used in several places. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
2016-01-22arm64, pci, acpi: Start using ACPI based PCI host bridge driver for ARM64.Tomasz Nowicki
Lets get rid of empty PCI init stub, related ACPI header and go with full-blown PCI host bridge driver. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Catalin Marinas <catalin.marinas@arm.com> CC: Liviu Dudau <Liviu.Dudau@arm.com> CC: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com> CC: Will Deacon <will.deacon@arm.com>
2016-01-22pci, acpi: Match PCI config space accessors against platfrom specific quirks.Tomasz Nowicki
Some platforms may not be fully compliant with generic set of PCI config accessors. For these cases we implement the way to overwrite accessors set prior to PCI buses enumeration. Algorithm traverses available quirk list, matches against <platform ID (DMI), domain, bus number> tuple and returns corresponding accessors. All quirks can be defined using: DECLARE_ACPI_MCFG_FIXUP() and keep self contained. Example, static const struct dmi_system_id foo_dmi[] = { { .ident = "<Platform ident string>", .callback = <handler>, .matches = { DMI_MATCH(DMI_SYS_VENDOR, "<system vendor>"), DMI_MATCH(DMI_PRODUCT_NAME, "<product name>"), DMI_MATCH(DMI_PRODUCT_VERSION, "product version"), }, }, { } }; static struct pci_ops foo_ecam_pci_ops = { .map_bus = pci_mcfg_dev_base, .read = foo_ecam_config_read, .write = foo_ecam_config_write, }; DECLARE_ACPI_MCFG_FIXUP(foo_dmi, NULL, &foo_ecam_pci_ops, <domain_nr>, <bus_nr>); More custom (non-DMI) matching can be done via an alternative call. Note that there is possibility to assign quirk related private data to root->sysdata which will be available along read/wriate accessor, example: static int boo_match(struct pci_mcfg_fixup *fixup, struct acpi_pci_root *root) { return [condition] ? 1 : 0; } int boo_ecam_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) { struct acpi_pci_root *root = bus->sysdata; struct boo_priv_data *boo_data = root->sysdata; [..] } static struct pci_ops boo_ecam_pci_ops = { .map_bus = pci_mcfg_dev_base, .read = boo_ecam_config_read, .write = boo_ecam_config_write, }; DECLARE_ACPI_MCFG_FIXUP(NULL, boo_match, &boo_ecam_pci_ops, <domain_nr>, <bus_nr>); Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22pci, acpi: Support for ACPI based generic PCI host controller initTomasz Nowicki
Because of two patch series: 1. Jiang Liu's common interface to support PCI host controller init 2. MMCONFIG refactoring (part of this patch set) now we can think about generic ACPI based PCI host controller init implementation out of arch/ directory. These calls use information from MCFG table (PCI config space regions) and _CRS method (IO/irq resources) to initialize PCI hostbridge. TBD: We are still not sure whether we should reassign resources after PCI bus enumeration or trust firmware to do all that work for us properly. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Catalin Marinas <catalin.marinas@arm.com> CC: Liviu Dudau <Liviu.Dudau@arm.com> CC: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com> CC: Will Deacon <will.deacon@arm.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22ACPI, PCI: Refine the way to handle translation_offset for ACPI resourcesLiu Jiang
Some architectures, such as IA64 and ARM64, have no instructions to directly access PCI IO ports, so they map PCI IO ports into PCI MMIO address space. Typically PCI host bridges on those architectures take the responsibility to map (translate) PCI IO port transactions into Memory-Mapped IO transactions. ACPI specification provides support of such a usage case by using resource translation_offset. But current ACPI resource parsing interface isn't neutral enough, it still has some special logic for IA64. So refine the ACPI resource parsing interface and IA64 code to neutrally handle translation_offset by: 1) ACPI resource parsing interface doesn't do any translation, it just save the translation_offset to be used by arch code. 2) Arch code will do the mapping(translation) based on arch specific information. Typically it does: 2.a) Translate per PCI domain IO port address space into system global IO port address space. 2.b) Setup MMIO address mapping for IO ports. void handle_io_resource(struct resource_entry *io_entry) { struct resource *mmio_res; mmio_res = kzalloc(sizeof(*mmio_res), GFP_KERNEL); mmio_res->flags = IORESOURCE_MEM; mmio_res->start = io_entry->offset + io_entry->res->start; mmio_res->end = io_entry->offset + io_entry->res->end; insert_resource(&iomem_resource, mmio_res) base = map_to_system_ioport_address(entry); io_entry->offset = base; io_entry->res->start += base; io_entry->res->end += base; } Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
2016-01-22acpi, mcfg: Add default PCI config accessors implementation and initial ↵Tomasz Nowicki
support for related quirks. We use generic accessors from access.c by default. However, we already know platforms that need special handling while accessing to PCI config space. These platforms will need different accessors set matched against platform ID, domain, bus touple. Therefore we are going to add (in future) DECLARE_ACPI_MCFG_FIXUP which will register platform specific custom accessors. For now we let pci_mcfg_get_ops takes domain and bus arguments and left some space for matching algorithm. Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22x86, acpi, pci: Use equivalent function introduced in previous patch.Tomasz Nowicki
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22acpi, mcfg: Implement two calls that might be used to inject/remove MCFG region.Tomasz Nowicki
Lets abstract two calls which allow to inject and remove MCFG regions which may come from DSDT table. These calls will be used for x86 and ARM64 PCI host bridge driver in the later patches. Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22x86, ia64: Include acpi_pci_{add|remove}_bus to the default ↵Tomasz Nowicki
pcibios_{add|remove}_bus implementation. Arches in subject are the only one who use pcibios_{add|remove}_bus hooks and implement it in the same way. Moreover ARM64 is going to do the same. So it seams that acpi_pci_{add|remove}_bus is generic enough to be default option for pcibios_{add|remove}_bus hooks. Also, it is always safe to run acpi_pci_{add|remove}_bus as they have empty stubs for !ACPI case and return if ACPI has been switched off in run time. After all we can remove x86 and ia64 pcibios_{add|remove}_bus implementation. Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22pci, acpi: Provide generic way to assign bus domain number.Tomasz Nowicki
As we now have valid PCI host bridge device reference we can introduce code that is going to find its bus domain number using ACPI _SEG method. Note that _SEG method is optional, therefore _SEG absence means that all PCI buses belong to domain 0. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22x86, ia64, pci: Remove ACPI companion device from platform specific data.Tomasz Nowicki
Since PCI core code is setting ACPI companion device for us now, platform specific ACPI companion device setting turns out to be dead now. Therefore we can get rid of it, including related companion reference from PCI sysdata structure. Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22pci, acpi: Move ACPI host bridge device companion assignment to core code.Tomasz Nowicki
Currently we have two platforms (x86 & ia64) capable of PCI ACPI host bridge initialization. They both use sysdata pill to pass down parent device reference and both relay on NULL parent in pci_create_root_bus() to validate sysdata content. It looks hacky and prevent us from getting some frimware specific info for PCI host controller e.g. bus domain number. However, it seems we can overcome that blocker by passing down parent device via pci_create_root_bus parameter (as the ACPI device type) and using ACPI_COMPANION_SET in core code for ACPI boot method. ACPI_COMPANION_SET is safe to run for all cases DT, ACPI and DT&ACPI. Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
2016-01-22x86, pci: Cleanup platform specific MCFG data using previously added ECAM ↵Tomasz Nowicki
hot_added flag. Now that we have hot_added flag and all information in struct acpi_pci_root we need, we can get rid of arch specific mcfg data from struct pci_root_info. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
2016-01-22pci, acpi, ecam: Add flag to indicate whether ECAM region was hot added or not.Tomasz Nowicki
There are two ways we can get ECAM (aka MCFG) regions using ACPI, from MCFG static table and from _CBA method. We cannot remove static regions, however regions coming from _CBA should be removed while removing bridge device. In the light of above we need flag to mark hot added ECAM entries so that user should use pci_mmconfig_inject while adding regions from _CBA method. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22arm64, acpi: Use empty PCI config space accessors from mcfg.c file.Tomasz Nowicki
We can now use previously prepared empty ACPI RAW accessors and cleanup a bit before adding full support for PCI host bridge driver. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors.Tomasz Nowicki
Lets keep RAW ACPI PCI config space accessors empty by default, since we are note sure if they are necessary accross all archs. Once we sort this out, we can provide generic version or let architectures to overwrite, like now x86. Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=yTomasz Nowicki
In drivers/xen/pci.c, there are arch x86 dependent codes when CONFIG_PCI_MMCONFIG is enabled, since CONFIG_PCI_MMCONFIG depends on ACPI, so this will prevent XEN PCI running on other architectures using ACPI with PCI_MMCONFIG enabled (such as ARM64). Fortunatly, it can be sloved in a simple way. In drivers/xen/pci.c, the only x86 dependent code is if ((pci_probe & PCI_PROBE_MMCONF) == 0), and it's defined in asm/pci_x86.h, the code means that if the PCI resource is not probed in PCI_PROBE_MMCONF way, just ingnore the xen mcfg init. Actually this is duplicate, because if PCI resource is not probed in PCI_PROBE_MMCONF way, the pci_mmconfig_list will be empty, and the if (list_empty()) after it will do the same job. So just remove the arch related code and the head file, this will be no functional change for x86, and also makes xen/pci.c usable for other architectures. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2016-01-22x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM driver.Tomasz Nowicki
Hosts with custom ECAM hooks (like 32bit x86) should select ARCH_HAS_CUSTOM_PCI_ECAM. Otherwise, host will use generic version provided by this patch (like 64bit x86 does). Note, we leaved x86-specific PCI config accessors in corresponding files. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>
2016-01-22x86, pci: mmconfig_{32,64}.c code refactoring - remove code duplication.Tomasz Nowicki
mmconfig_64.c version is going to be default implementation for low-level operation on mmconfig regions. However, now it initializes raw_pci_ext_ops pointer which is specific for x86 only. Moreover, mmconfig_32.c is doing the same thing at the same time. So lets move it to mmconfig_shared.c so it becomes common for both and mmconfig_64.c turns out to be purely arch agnostic. Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Jeremy Linton <jeremy.linton@arm.com>