FWTS 18.09.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V18.09.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/18.09.00
= New Features =
* dmicheck: checks (Extended) Maximum Capacity for type 16
* snapcraft: add libbsd-dev to build-packages
* efi_runtime: re-enable the resetsystem runtime interface
= Fixed Bugs =
* dmicheck: fix incorrect boundary checks for various types
* DMI: Fix the way to load SMBIOS 3.x tables via sysfs
* acpi: acpiinfo: use stdint print format specifiers for uint8_t values
* acpi: nfit: minor code cleanup changes
* acpi: acpitables: use PRIu32 format specifier for a uint32_t type
* acpi: apicinstance: use correct format specifiers
* acpi: checksum: print size_t values using %zd specifier
* acpi: cstates: add whitespacing, use %d for int format specifiers
* acpi: fadt: use inttype.h print format size specifiers
* acpi/dmar: use PRIu8 specifier for uint8_t type
* acpi/madt: use inttype.h print format size specifiers
* acpi/method: use inttype.h print format size specifiers
* sbbr/fadt: use inttype.h print format size specifiers
* fwts-test: apicinstance: fix up incorrect hex values
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_18.09.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 18.08.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V18.08.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/18.08.00
= New Features =
* ACPICA: Update to version 20180810
* uefi: uefivarinfo: add to UNSAFE category
* acpi: gtdt: add checking the valid base physical address
= Fixed Bugs =
* lib: dmicheck: replace defines by enum type
* acpitables: remove redundant "OEM" from Creator ID field
* acpitables: remove unnecessary new line character
* src: remove unnecessary new line characters and trailing spaces
* fwts-test: sync up with new line char and trailing space changes
* acpi: wakealarm: remove failure messages for non-x86 arch
* acpiinfo: update acpi version supported by kernel
* ac_adapter: skip tests when no power supply exists
* lib: fwts: Add abstracted pragma macros to push/pop state and
disable warnings
* fwts_uefi.h: replace _Pragmas with abstracted pragma macros
* Wrap ACPI_ROOT_OBJECT with PRAGMA_NULL_PTR_MATH for clang builds
* lib/src/fwts_acpi_tables: disable clang warning
* lib: fwts_coreboot_cbmem.c: initialize all fields in array of structs
* uefi: uefirtauthvar: don't logically or a constant operand.
* dmi: dmicheck: remove redundant array fwts_dmi_chassis_type
* Add MIN, MAX and ARRAY_SIZE macros to fwts.h
* fwts_coreboot_cbmem: fwts coding style changes, use off_t for addresses
* lib: fwts_cpu: make found a boolean
* lib: fwts_cpu: minor fwts coding style changes
* lib: fwts_deviceytree: make a function argument const and a style change
* lib: fwts_firmware: remove some empty lines
* lib: fwts_iasl: remove a whitespace
* lib: fwts_interactive: add sanity check on fileno, fix typo, tidy code
* lib: fwts_ipmi: make fwts_ipmi_msg_id static, make some code style changes
* lib: fwts_keymap: some minor fwts coding style changes
* lib: fwts_list: some minor fwts coding style changes
* lib: fwts_multiproc: remove whitespace
* lib: fwts_olog: minor code style change on FILE pointers
* lib: fwts_release: make some helper functions static
* lib: fwts_scan_efi_systab: add empty line to match fwts coding style
* fwts_coreboot_cbmem: fix off-by-one error on last char of buffer
* lib: fwts_coreboot_cbmem: fix cbmem_console_addr check
* lib: fwts_clog.c: replace space indentations with tab
* lib/src/fwts_acpi_tables: remove shadowed pointer ptr
* lib: fwts_framework: ensure src pointer is const
* fwts_framework: no need to pass tests_to_skip as it is locally scoped
* lib: fwts_framework: argument 'arg' should not be const
* lib: fwts_log: remove const arg in fwts_log_set_field_filter
* lib: fwts_summary: remove redundant redefinition of fwts_summary_deinit
* lib: fwts_safe_mem: add in missing constifications
* lib: fwts_log_scan: rename function argument to avoid name shadowing
* lib: fwts_stringextras: fix some missing constifictions
* lib: fwts_text_list: fix up some const casting issues
* lib: fwts_json.h: fix casting warning, add missing const
* lib: fwts_coreboot_cbmen: fix missing const in cast
* sbbr: acpitables: make function sbbr_search_acpi_tables static
* acpi: crsdump: add in missing pointer constifications
* acpi: ecdt: fix some missing pointer constifications
* acpi: fadt: add in missing const to fix build warnings
* sbbr: fadt: add in missing const to fix build warnings
* acpi: method: make function method_test_CRS_return static
* acpi: nfit: rename table to nfit_table to avoid name shadowing
* acpi: wmi: add in missing const to fix build warnings
* acpi: stao: add in missing const to fix build warnings
* bios: mtrr make function multi_types_check static
* opal: reserv_mem: add in missing const to fix build warnings
* hotkey: rename list 'hotkeys' to avoid name shadowing
* uefi: uefirtauthvar: rename argument attibutes to var_attributes
* uefi: uefirtvariable: rename argument attibutes to var_attributes
* coreboot: clog: rename list 'clog' to avoid name shadowing
* lib: fwts_acpi_tables: unconstify data and don't strcpy ACPI table ids
* snapcraft: remove libjson-c3 stage package, it is not required
* Fix some strncpy/strcat gcc 8.2 warnings by using libbsd strlcpy/strlcat
* uefi: clean and check status with magic value ~0ULL (LP: #1784365)
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_18.08.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 18.05.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V18.05.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/18.05.00
= New Features =
* fan: add cooling_device# to error messages
* doc: adding acpitests, uefitests and sbbr options to man page
* acpi: syntaxcheck: change it from batch to batch-experimental
* fwts_framework: add an "ifv" option for Independent Firmware Vendor
* dmicheck: skip checks of DMI default values for IFV
* acpi: method: add test for _CLS control method
* lib: create helper functions for device identification objects
* acpi: devices: add common objects
* fwts-frontend-text: add a recommended option for IFV (IBV)
* fwts-frontend-text: add an option for ARM SBBR
* auto-packager: mkpackage.sh: add cosmic
* ACPICA: Update to version 20180427
* ACPICA: Update to version 20180508
* README: Add libpci-dev dependency ppc64el
* cpufreq: Add support to read boost frequencies
= Fixed Bugs =
* fan: cur_state == -1 is valid for intel_powerclamp
* cpu: msr: do not check SYSENTER_* MSRs
* cpu: msr: do not check SYSCALL MSRs
* dmi: dmicheck: fix missing spaces in failures of type 9
* acpi: method: fix a copy-n-paste error in _SUB test
* acpi: fan: fix potential null pointer dereference issue
* efi_runtime: fix gcc warning for efi_runtime_reset_system
* lib: fwts_pipeio: fix regression from memory leak fix
* devicetree: dt_base: Make dtc warnings not failures
* facs: Add a check for empty BIOS memory map info list
* opal: power_mgt: Fixes related to pstate parsing
* cpufreq: Do not free a NULL pointer
* opal: cpu_info: Designate property optional
* opal: mem_info: Designate property optional
* opal: prd_info: Add resilience to service check
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_18.05.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 17.11.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.11.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.11.00
= New Features =
* acpi: devices: add a new test for acpi ec device
* acpi: devices: add a new test for ACPI AC adapter device
* acpi: devices: add a new test for ACPI battery device
* acpi: devices: add a new test for smart battery device
* acpi: devices: add new tests for power and sleep button devices
* acpi: madt: check GICD's system vector according to mantis 1819 (ACPI 6.2a)
* acp: nfit: add platform capability according to manit 1831 (ACPI 6.2a)
* lib: add new large resource data type for _CRS methods
* acpi: sdev: add ACPI SDEV test (mantis 1632)
* acpi: dppt: add ACPI PDTT test (mantis 1576)
* acpi: devices: add new tests for lid device
* acpi: devices: add new tests for ambient light sensor device
* acpi: devices: add new tests for time and alarm device
* acpi: devices: add new tests for wireless power calibration device
* acpi: add tests for _SRT control method
* auto-packager: mkpackage.sh: add bionic
* fwts: add bash command-line completion
* Add ACPI 1.0 RSDP test to make sure RSDT field isn't null
* ACPICA: Update to version 20171110
* uefi: uefidump: add dumping for BluetoothLE device path
* uefi: uefidump: add dumping for DNS device path
* uefi: uefibootpath: add test for BluetoothLE device path
* uefi: uefibootpath: add test for DNS device path
= Fixed Bugs =
* lib: move and rename helper functions from method.c
* lib: move _CRS helper functions from method.c
* acpi: devices: print device name in acpi_ac test
* acpi: devices: deiniit acpica when tests are skipped
* acpi: sync up _BIX test in method to acpi_battery tests
* acpi: fadt: ACPI 6.2 explicitly states 64-bit supersedes 32-bit
* lib: print reference names in fwts_acpi_object_dump
* lib: raise severity of acpi method failures
* lib: fix offset error for GPIO connection descriptor
* acpi: method: add a missing space in _TSS tests
* dmi: dmicheck: fix incorrect use of lock bit in chassis type
* acpi: update checks of _BIX return package
* Remove length test for ACPI 1.0 RSDPs, fix checks against revision field
* lib: fwts_safe_mem: fix buffer end calculation
* lib: fwts_acpi_object_eval: fix build issues with older toolchains
* lib: fwts_battery: fix build issues with older toolchains
* lib: fwts_args: ensure a null short_option is never passed to getopt_long
* uefi: uefidump: add some guarding on allocation size
* uefi: uefidump: add some guarding on loop iteration
* dmi: dmicheck: zero buffer buf, cleans up a static analysis warning
* hpet: fix the false alarm of hpet configuration test
* uefi: uefirttime: fix the time zone to exact value
* uefi: uefirtauthvar: update the test auth data (LP: #1724455)
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.11.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 17.09.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.09.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.09.00
= New Features =
* ACPICA: Update to version 20170831
* dmi: dmicheck: Add BMC Interface Type definitions from IPMI spec
* lib: fwts_acpi_tables: add a new function to check Reserved field
* lib: fwts_acpi_tables: add a new function to check reserved bits
* efi_runtime: add resetsystem runtime service
= Fixed Bugs =
* acpi: replace checks for Reserved by fwts_acpi_reserved_zero_check
* lib: replace spaces by tabs
* acpi: replace checks for Flags by fwts_acpi_reserved_bits_check
* fwts-test: sync up with new fwts_acpi_reserved_bits_check
* acpi: replace checks for reserved bits by fwts_acpi_reserved_bits_check
* acpi: spcr: check reserved values for parity and stop fields
* debian: copyright: fix spelling mistake: acpcia -> acpica
* acpica: fix spelling mistake: acpcia -> acpica
* iASL: Fix incorrect memory allocation
* lib: constify a couple of arrays
* src/acpi/brightness: constify sys_path and return of
brightness_get_path
* acpi: method: constify arrays
* acpica: constify array fwts_default_space_id_list
* cmos: cmosdump: constify several char * arrays
* bios: bios_info: constify array bios_info
* bios: multiproc: constify array bus_types
* dmi: dmicheck: constify array dmi_used_by_kernel_table
* uefi: securebootcert: make array securebootcert_info_table const
* uefi: uefidump: make array uefidump_info_table const
* uefi: uefirtmisc: make arrays flag static const
* uefi: uefirttime: constify static array dayofmonth
* lib: fwts_firmware: make enums into a defined type
* lib: fwts_framework: make several int fields into uint32_t
* lib: fwts_framework: re-order and clean up fwts_framework fields
* lib: fwts_log: make magic uint64_t to improve corruption checking
* fwts_log: make line_number to a uint32_t type
* acpica: constify bool parameter val in
fwts_acpi_region_handler_called_set
* lib: fwts_acpi_table: make indexes which and index uint32_t
* lib: fwts-battery: make battery type a typedef'd enum
* lib: fwts_battery: clean up battery interfaces
* lib: fwts_button: make button counts and button number uint32_t
* lib: fwts_checksum: object sizes should be size_t rather than int
* lib: fwts_devicetree: constify a few function arguments
* lib: fwts_formatting: make width parameter size_t
* lib: fwts_wakealarm: make wakealarm times uint32_t
* lib: fwts_battery: include inttypes.h for PRIu32 definition
* lib: fwts_log_plaintext: include inttypes.h for PRIu32 definition
* lib: fwts_log_xml: include inttypes.h for PRIu32 definition
* acpi: battery: include stdint.h and inttypes.h
* acpi: wakealarm: include stdint.h and inttypes.h
* securebootcert: remove the SignatureOwner on signature presence check
* dmi: dmicheck: Fix Base Address Modifier checking
* acpi: method: sbbr: set some methods as optional
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.09.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
+ MdeModulePkg maintainers (GOP), linaro-acpi, Graeme, Ard.
On Wed, Sep 13, 2017 at 12:23:01PM +0000, Evan Lloyd wrote:
> We have a minor conundrum, and would like an element of consensus
> before we make a commit.
> We want to (re-)submit patches adding HDLCD/GOP for some ARM
> platforms.
> We have previously been asked to make this optional, as some people
> do not want the overhead of GOP (and the frame buffer) in their
> image/RAM. This is fine, and a build flag called HEADLESS would
> seem to fit the bill.
>
> The query arises from the ACPI spec which has (in FADT): "
> HEADLESS 1 12 System Type Attribute. If set indicates the system
> cannot detect the monitor or keyboard / mouse devices."
>
> And what we need to confirm is that there is no case of a system
> with no display still wanting to have keyboard and/or mouse. I
> can't imagine there is, but thought it best to check.
>
> Any thoughts?
I can't think of any.
Even if your video is only accessible via BMC, that's still video.
/
Leif
FWTS 17.07.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.07.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.07.00
= New Features =
* acpi: bgrt: update according to acpi 6.1 errata (mantis 1577)
* acpi: method: update _PSD and _TSD tests according to ACPI 6.1 errata
* acpi: rsdp: revision 1 must have length 20 according to ACPI 6.1 errata
* acpi: method: Add _CPC revision 3 according to ACPI 6.2 (mantis 1611)
* acpi: hest: add new type 11 introduced in ACPI 6.2 (mantis 1649)
* acpi: srat: add new type 4 according to ACPI 6.2 (mantis 1656)
* acpi: method: update _GCP according to ACPI 6.2 (mantis 1703)
* acpi: hest: add notification type 11 according to ACPI 6.2 (mantis 1731)
* acpi: fadt: update minor version to 2 for ACPI 6.2 (mantis 1769)
* acpi: hest: add checks for GHES_ASSIST flag value in ACPI 6.2 (mantis 1674)
* acpi: wsmt: add wsmt test according to ACPI 6.2 (mantis 1585)
* ACPICA: Update to version 20170629
* acpi: tpm2: Add additional start method values
* acpi: iort: Add PMCG support
= Fixed Bugs =
* acpi: hest: change type from hex to dec as in ACPI spec
* acpi: hest: change a function name to meet the patterns of others
* acpi: hest: fix typo for type 7
* dmi: dmicheck: ensure mmap'd SMBIOS data is readable before accessing it
* bios32: ensure mmap'd memory is readable before accessing it
* bios: ebdadump: ensure mmap'd memory is readable before accessing it
* bios: romdump: ensure mmap'd memory is readable before accessing it
* lib: fwts_smbios: ensure mmap'd memory is readable before accessing it
* efi_runtime: Use memdup_user helper
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.07.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 17.06.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.06.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.06.00
= New Features =
* ACPICA: Update to version 20170531
* olog: olog.json: Update OPAL skiboot errors to check on olog scan
* bios: mtrr: print out actual default type of MTRR
= Fixed Bugs =
* lib: fwts_alloc: only parse mem info once we have a valid line read in
* lib: fwts_safe_mem: add SIGBUS handling
* lib: fwts_alloc: re-work the memory parsing again
* acpi: method use correct format specifier for uint32_t type
* bios: mtrr: fix compile error in ubuntu trusty
* opal: fix tests dependency on libfdt
* bios: mtrr: fix overlaped MTRR (LP: #1694710)
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.06.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 17.05.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.05.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.05.00
= New Features =
* Support SMBIOS 3.1.1 tests
* dmi: dmicheck: check new offset in spec 3.11
* dmi: dmicheck: check reserved bits of Type 7 offset 0x5
* dmi: dmicheck: check reserved bits of Type 7 offset 0xd
* dmi: dmicheck: add a function to verify reserved bits
* dmi: dmicheck: add a helper function to check word min/max value
* dmi: dmicheck: check pci(e) slot and segment, bus and dev/func
* dmi: dmicheck: check reserved bits of offset 0x5 in type 13
* dmi: dmicheck: add a helper function to check a reserved offset
* dmi: dmicheck: check reserved bits in type 15 & type 17
* dmi: dmicheck: check reserved fields in type 22, 23, 30, 32, 38 and 39
* dmi: dmicheck: add 64-bit integer to dmi_reserved_bits_check
* dmi: dmicheck: add checks for new type 43
* dmi: dmicheck: check reserved bits in Type 0
* fwts/opal: Power management DT Validation tests.
* fwts/opal: Reserved memory DT validation tests.
* Add snapcraft rules to build a fwts snap
= Fixed Bugs =
* acpi: method: make _PTS & _WAK optional
* dmi: dmicheck: add type 9 to dmi_used_by_kernel_table
* dmi: dmicheck: fix a typo in a type 15's error message
* klog.json: remove unnecessary comma and trailing spaces
* klog.json: add an ACPI warning message "SysmtemMemory conflicts
* acpi: method: check _WAK & _PTS for supported sleep states only
* dmi: dmicheck: type 22 offset 9 is an enum from 1 to 8
* lib: fwts_pm_method: clean up formatting and remove extraneous log
message
* acpi: gpedump: fix spelling mistake
* acpica: add some extra run time verification to FACP (FADT)
* lib: fwts_acpi_tables: Add extra fix-up for FACS and DSDT table
addresses
* acpi: wmi: add and re-order WMI GUIDs
* lib: fwts_pipeio: fix incorrect size of command being passed
* lib: fwts_summary: move statement into previous if block
* lib: fwts_stringextras: free original string on failed realloc
* compiler: fwts_iasl_interface: free original string on failed realloc
* uefi: uefidump: free original string on failed realloc
* kernelscan: ensure parse_kernel_message returns PARSER_OK
* lib: fwts_gpe: free original gpe buffer on failed realloc
* lib: fwts_cpu: The string "flags" is 5 chars, fix incorrect strncmp
size
* dmi: dmicheck: remove redundant check on boolean advice_given
* acpi: einj: fix incorrect addition on cast
* lib: fwts_log: fix spelling mistake on LOG_UNKOWN_FIELD
* lib: fwts_log: add LOG_NO_FIELD and use this to indicate an unfound
field
* debian/control: Update description, fwts no longer is just for x86
systems
* lib: fwts_gpe: fix double free on gpe buffer
* opal: prd_info: NULLify output after free
* debian/control: update standards version to 3.9.8
* debian/control: remove ${shlibs:Depends} for fwts-frontend and
fwts-efi-runtime-dkms
* acpi: method: work around some gcc madness (LP: #1687056)
* Reduce the sysfs path to 2K to work around a gcc warning
* data: klog.json: make missing EINJ table message an INFO message
* cpu: cpufreq: make small one-line helper functions inline
* Snapcraft: fix typo in path
* debian: fwts.install: add missing olog.json file
* debian: changelog: fix some debian warnings
* New script to generate a Debian orig tarball from source
* data: klog.json: Fix spelling mistake "cound" -> "could"
* opal: reserve_mem: fix 32 bit build issues
* lib: fwts_acpi_tables: remove dead assignment of facs
* acpica/fwts_acpica: remove debug message on FADT/FACS
* acpica/fwts_acpica: cast to uintptr_t before casting to
ACPI_PHYSICAL_ADDRESS
* uefi: securebootcert: warnings for secure boot variables not exist
instead of failures
* uefi: securebootcert: specify the failure reason for the variable
not found
* README: Fix missing libfdt-dev dependency in README
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.05.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
This implements a quirk for the Marvell Armada80x0 running in ACPI mode,
in which case the config space configuration is not 100% ECAM compatible.
The issue with this SoC is that it only consists of a host bridge, and
all type 0 configuration cycles are forwarded to the peer (i.e., the
device in the slot), which will therefore appear at all device slots
on bus 0. This can be fixed by reducing the IATU window size for bus 0,
but due to CX_ATU_MIN_REGION_SIZE == 64KB (which is a synthesis-time
configuration parameter of the IP block) the window producing type 0
config cycles will always produce two copies of the peer device.
So add a quirk that specifies a config space accessor override, and
override config space accesses to devices on bus 0 other than device 0.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
drivers/acpi/pci_mcfg.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
index 2944353253ed..7d68b3208043 100644
--- a/drivers/acpi/pci_mcfg.c
+++ b/drivers/acpi/pci_mcfg.c
@@ -49,6 +49,40 @@ struct mcfg_fixup {
NULL, IORESOURCE_BUS)
#define MCFG_BUS_ANY MCFG_BUS_RANGE(0x0, 0xff)
+/*
+ * The Armada 8k uses Synopsys PCIe IP, which /can/ be configured at
+ * synthesis time to be ECAM compatible, by reducing the IATU minimum
+ * window size to 32 KB. This way, we can reduce the window that produces
+ * type 0 config cycles to only cover b/d 0/0, which will make the peer
+ * only appear once on bus 0. The rest of the ECAM region can be enabled
+ * to generate type 1 config cycles in an ECAM compliant manner, which
+ * makes the rest of the hierarchy accessible if the peer is a true
+ * bridge.
+ *
+ * Note that in this configuration, there is only a host bridge that
+ * translates memory accesses to PCI bus cycles, and given that there
+ * is only a single peer, there is no reason to model a pseudobridge
+ * on bus 0 and make the peer appear on bus 1. (This is how the various
+ * DT drivers for snps,dw-pcie compatible controllers are implemented.)
+ */
+static void __iomem *armada8k_pcie_ecam_map_bus(struct pci_bus *bus,
+ unsigned int devfn,
+ int where)
+{
+ if (bus->number == 0 && PCI_SLOT(devfn) > 0)
+ return NULL;
+ return pci_ecam_map_bus(bus, devfn, where);
+}
+
+static struct pci_ecam_ops armada8k_pcie_ecam_ops = {
+ .bus_shift = 20,
+ .pci_ops = {
+ .map_bus = armada8k_pcie_ecam_map_bus,
+ .read = pci_generic_config_read,
+ .write = pci_generic_config_write,
+ }
+};
+
static struct mcfg_fixup mcfg_quirks[] = {
/* { OEM_ID, OEM_TABLE_ID, REV, SEGMENT, BUS_RANGE, ops, cfgres }, */
@@ -133,6 +167,8 @@ static struct mcfg_fixup mcfg_quirks[] = {
XGENE_V2_ECAM_MCFG(4, 0),
XGENE_V2_ECAM_MCFG(4, 1),
XGENE_V2_ECAM_MCFG(4, 2),
+
+ { "MVEBU ", "ARMADA8K", 0, 0, MCFG_BUS_ANY, &armada8k_pcie_ecam_ops },
};
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Introduce a MMIO CNTFRQ helper.
2. separate out device-tree code from arch_timer_detect_rate
3. replace arch_timer_detect_rate with arch_timer_of_configure_rate
4. Refactor arch_timer_needs_probing, and move it into DT init call
5. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v24: https://lkml.org/lkml/2017/4/14/
Mark Rutland:
Rework comments
Refactor the probing split
Verify CNTFRQ:arch_timer_mem_verify_cntfrq
Only register the first frame:arch_timer_mem_find_best_frame
Fu Wei:
Fetches from git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/gtdt
Introduces acpi_unregister_irq function, and use it in drivers/acpi/arm64/gtdt.c
v23: https://lkml.org/lkml/2017/3/31/629
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
Improve the data struct of arch_timer_mem and arch_timer_mem_frame to
improve the parser of GT blocks and arch_timer_mem initualization.
Improve arch_timer_rate detection: sysreg frequency is primary in DT boot
Improve some comments in GTDT parser driver.
Improve acpi_gtdt_init function, and make a comment for the multiple calls.
Improve the unwinding for the irq of timers, when an error occurs.
Handle the case of virtual timer GSIV is 0.
v22: https://lkml.org/lkml/2017/3/21/523
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
Merged patch 2,3(about arch_timer_detect_rate).
Keep arch_timer_rate, do NOT split it for different types of timer.
Improve memory-mapped timer support by comments and variable name:
data-->timer_mem
frame-->gtdt_frame
Delete zero check for SBSA watchdog irq.
Skip secure SBSA watchdog in GTDT driver.
Delete Kconfig modification for SBSA watchdog driver.
Delete no_irq, using nr_res instead.
v21: https://lkml.org/lkml/2017/2/6/734
Introduce two functions to get the frequency from mmio and sysreg.
Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
Split arch_timer_rate for different types of timer.
Skip secure timer frame in GTDT driver.
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
(The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
v20: https://lkml.org/lkml/2017/1/18/534
Reorder the first 4 patches and split the 4th patches.
Leave CNTHCTL_* as they originally were.
Fix the bug in arch_timer_select_ppi.
Split "Rework counter frequency detection" patch.
Rework the arch_timer_detect_rate function.
Improve the commit message of "Refactor MMIO timer probing".
Rebase to 4.10.0-rc4
v19: https://lkml.org/lkml/2016/12/21/25
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (11):
clocksource: arm_arch_timer: split dt-only rate handling
clocksource: arm_arch_timer: refactor arch_timer_needs_probing
clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
init call
clocksource: arm_arch_timer: add structs to describe MMIO timer
clocksource: arm_arch_timer: split MMIO timer probing.
acpi/arm64: Add GTDT table parse driver
clocksource: arm_arch_timer: simplify ACPI support code.
acpi: Add acpi_unregister_irq function
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 404 +++++++++++++++++++++++++++++++++++
drivers/acpi/irq.c | 10 +
drivers/clocksource/arm_arch_timer.c | 393 ++++++++++++++++++++++++----------
include/clocksource/arm_arch_timer.h | 16 ++
include/linux/acpi.h | 14 ++
8 files changed, 724 insertions(+), 118 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Introduce a MMIO CNTFRQ helper.
2. separate out device-tree code from arch_timer_detect_rate
3. remove arch_timer_detect_rate use arch_timer_*get_cntfrq directly
4. Refactor arch_timer_needs_probing, and move it into DT init call
5. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v23: https://lkml.org/lkml/2017/3/31/
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
Improve the data struct of arch_timer_mem and arch_timer_mem_frame to
improve the parser of GT blocks and arch_timer_mem initualization.
Improve arch_timer_rate detection: sysreg frequency is primary in DT boot
Improve some comments in GTDT parser driver.
Improve acpi_gtdt_init function, and make a comment for the multiple calls.
Improve the unwinding for the irq of timers, when an error occurs.
Handle the case of virtual timer GSIV is 0.
v22: https://lkml.org/lkml/2017/3/21/523
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
Merged patch 2,3(about arch_timer_detect_rate).
Keep arch_timer_rate, do NOT split it for different types of timer.
Improve memory-mapped timer support by comments and variable name:
data-->timer_mem
frame-->gtdt_frame
Delete zero check for SBSA watchdog irq.
Skip secure SBSA watchdog in GTDT driver.
Delete Kconfig modification for SBSA watchdog driver.
Delete no_irq, using nr_res instead.
v21: https://lkml.org/lkml/2017/2/6/734
Introduce two functions to get the frequency from mmio and sysreg.
Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
Split arch_timer_rate for different types of timer.
Skip secure timer frame in GTDT driver.
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
(The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
v20: https://lkml.org/lkml/2017/1/18/534
Reorder the first 4 patches and split the 4th patches.
Leave CNTHCTL_* as they originally were.
Fix the bug in arch_timer_select_ppi.
Split "Rework counter frequency detection" patch.
Rework the arch_timer_detect_rate function.
Improve the commit message of "Refactor MMIO timer probing".
Rebase to 4.10.0-rc4
v19: https://lkml.org/lkml/2016/12/21/25
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (11):
clocksource: arm_arch_timer: add MMIO CNTFRQ helper
clocksource: arm_arch_timer: split dt-only rate handling
clocksource: arm_arch_timer: refactor arch_timer_needs_probing
clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
init call
clocksource: arm_arch_timer: add structs to describe MMIO timer
clocksource: arm_arch_timer: refactor MMIO timer probing.
acpi/arm64: Add GTDT table parse driver
clocksource: arm_arch_timer: simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 406 +++++++++++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 338 ++++++++++++++++++-----------
include/clocksource/arm_arch_timer.h | 16 ++
include/linux/acpi.h | 7 +
7 files changed, 648 insertions(+), 124 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Introduce a wrapper function to get the frequency from mmio.
2. separate out device-tree code from arch_timer_detect_rate
3. remove arch_timer_detect_rate use arch_timer_*get_cntfrq directly
4. Refactor arch_timer_needs_probing, and move it into DT init call
5. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v22: https://lkml.org/lkml/2017/3/21/
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
Only Introduce arch_timer_mem_get_cntfrq to get the frequency from mmio.
Merged patch 2,3(about arch_timer_detect_rate).
Keep arch_timer_rate, do NOT split it for different types of timer.
Improve memory-mapped timer support by comments and variable name:
data-->timer_mem
frame-->gtdt_frame
Delete zero check for SBSA watchdog irq.
Skip secure SBSA watchdog in GTDT driver.
Delete Kconfig modification for SBSA watchdog driver.
Delete no_irq, using nr_res instead.
v21: https://lkml.org/lkml/2017/2/6/734
Introduce two functions to get the frequency from mmio and sysreg.
Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
Split arch_timer_rate for different types of timer.
Skip secure timer frame in GTDT driver.
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
(The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
v20: https://lkml.org/lkml/2017/1/18/534
Reorder the first 4 patches and split the 4th patches.
Leave CNTHCTL_* as they originally were.
Fix the bug in arch_timer_select_ppi.
Split "Rework counter frequency detection" patch.
Rework the arch_timer_detect_rate function.
Improve the commit message of "Refactor MMIO timer probing".
Rebase to 4.10.0-rc4
v19: https://lkml.org/lkml/2016/12/21/25
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (11):
clocksource: arm_arch_timer: introduce a wrapper function to get the
frequency from mmio.
clocksource: arm_arch_timer: separate out device-tree code and remove
arch_timer_detect_rate
clocksource: arm_arch_timer: refactor arch_timer_needs_probing
clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
init call
clocksource: arm_arch_timer: introduce some new structs to prepare for
GTDT
clocksource: arm_arch_timer: refactor MMIO timer probing.
acpi/arm64: Add GTDT table parse driver
clocksource: arm_arch_timer: simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 381 +++++++++++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 326 +++++++++++++++++++-----------
include/clocksource/arm_arch_timer.h | 17 ++
include/linux/acpi.h | 7 +
7 files changed, 614 insertions(+), 122 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Introduce two functions to get the frequency from mmio and sysreg.
2. separate out device-tree code from arch_timer_detect_rate
3. remove arch_timer_detect_rate use arch_timer_get_*_freq directly
4. split arch_timer_rate for different types of timer
5. Refactor arch_timer_needs_probing, and move it into DT init call
6. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v21: https://lkml.org/lkml/2017/2/6/
Introduce two functions to get the frequency from mmio and sysreg.
Remove arch_timer_detect_rate use arch_timer_get_*_freq directly
Split arch_timer_rate for different types of timer.
Skip secure timer frame in GTDT driver.
Rebase to git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arch-timer/cleanup
(The first 6 patches in v20 have been merged into arch-timer/cleanup branch)
v20: https://lkml.org/lkml/2017/1/18/534
Reorder the first 4 patches and split the 4th patches.
Leave CNTHCTL_* as they originally were.
Fix the bug in arch_timer_select_ppi.
Split "Rework counter frequency detection" patch.
Rework the arch_timer_detect_rate function.
Improve the commit message of "Refactor MMIO timer probing".
Rebase to 4.10.0-rc4
v19: https://lkml.org/lkml/2016/12/21/25
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (13):
clocksource: arm_arch_timer: introduce two functions to get the
frequency from mmio and sysreg.
clocksource: arm_arch_timer: separate out device-tree code from
arch_timer_detect_rate
clocksource: arm_arch_timer: remove arch_timer_detect_rate
clocksource: arm_arch_timer: split arch_timer_rate for different types
of timer
clocksource: arm_arch_timer: refactor arch_timer_needs_probing
clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT
init call
clocksource: arm_arch_timer: introduce some new structs to prepare for
GTDT
clocksource: arm_arch_timer: refactor MMIO timer probing.
acpi/arm64: Add GTDT table parse driver
clocksource: arm_arch_timer: simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 378 +++++++++++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 354 ++++++++++++++++++++------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 17 ++
include/linux/acpi.h | 7 +
8 files changed, 635 insertions(+), 127 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
FWTS 17.03.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.03.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.03.00
= New Features =
* ACPICA: Update to version 20170224
* sbbr: Add "--sbbr" flag to support running SBBR Tests.
* acpi: iort: Add support for SMMUv3
= Fixed Bugs =
* dmicheck: update chassis type limit according to SMBIOS 3.0
* dmicheck: update type 3, 4, 9 limits according to SMBIOS spec 3.11
* lib: fwts_alloc: move all memory tracking to hash records
* klog.json: Add some missing ACPI Power Management kernel messages
to klog database
* opal: reduce scope of variable 'prop_buf'
* lib: fwts_alloc: clear hash table at end of garbage collection
* lib: fwts_alloc: fix incorrect accounting on hash entry count
* acpi: mpst: remove redundant assigments to passed on errors
* acpi: drtm: remove redundant assigments to passed on errors
* opal: pci_info: remove redundant assignment to bytes
* lib: fwts_devicetree.h: minor code formatting cleanups
* opal: make found_dimm static as it is local to just this source
* opal: minor code style changes
* opal: mem_info check for dimm presence in property
* acpi: acpiinfo: Print minor version where applicable
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.03.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
FWTS 17.02.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V17.02.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/17.02.00
= New Features =
* ACPICA: Update to version 20170119
* acpi: s3: Add new --s3-resume-hook option
* Add README_JSON.txt for FWTS
* klog.json: Add some more kernel messages to klog data base
* klog.json: Add some EFI driver kernel messages to klog database
* klog.json: Add some EFI quirk driver kernel messages to klog database
* klog.json: Add some more EFI driver kernel messages to klog database
* klog.json: Add some miscellaneous messages to klog database
* Integrate PPC for FWTS-LIVE Frontend
* fedora: Add fedora internal versioning number in fwts.spec
* fedora: Add fwts.spec.in
* fedora: Update buildsrpm.sh for dynamic versioning
* fwts_framework: handle -? option differently from -h
= Fixed Bugs =
* dmicheck: fix mistakes in error messages for SMBIOS type 9
* README: update git URL to http://kernel.ubuntu.com/git/hwe/fwts.git/
* lib: fwts_args: fix arg parameter sanity range checking
* uefi/uefirtvariable: fix options check error messages
* clean up missing whitespaces
* acpi: acpitables: fix indentation, no functional change
* devicetree: dt_sysinfo: reduce scope of version_buf
* lib: fwts_acpid: remove re-assignment of ptr to NULL
* lib: fwts_cpu: force compiler to increment i rather than optimize it out
* opal: mem_info: remove redundant initialization of prop_string to NULL
* opal: mem_info: reduce scope of some variables
* opal: cpu_info: remove redundant initialization of prop_string to NULL
* opal: cpu_info: reduce scope of some variables
* opal: pci_info: reduce scope of some variables
* doc: remove trailing white spaces
* opal/mtd_info.c: make a couple of functions static to reduce global scope
* uefi: uefirtmisc: make gEfiCapsuleHeaderGuid static
* opal: prd_info: make a couple of functions static to reduce global scope
* ipmi: bmc: make fwts_bmc_info_check static
* acpi: msdm: make variable table static
* acpi: slit: make variable table static
* acpi: fpdt: make variable table static
* acpi: slic: make variable table static
* misc: fix various spelling mistakes
* data: fix some spelling mistakes in klog and olog databases
* lib: fwts_olog: ensure buffer is null terminated
* lib: fwts_pipeio: fix memory leak on zero sized text allocation
* fwts-alloc: track memory allocations, cleans up 6 coverity scan warnings
* fwts-alloc: garbage collect hash records
* klog.json: fix a couple of klog patterns
* fedora: Fix location of klog.json file in fwts.spec
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_17.02.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
--
Cheers,
Alex Hung
If you're on the To: line, you have a kernel tree currently being
build/boot tested by kernelCI.org that will be disabled (hopefully,
temporarily.)
Our infrastructure (graciously hosted by Linaro) is having several
problems, and is not currently scaling well as we've been adding
trees. These issues have been causing a variety of problems, but
mainly resulting lots of false failures and generally low quality and
usefulness of the reporting.
Until we have the time and resources to address these growing pains
(kernel CI is currently all-volunteer, spare-time only), we've decided
to reduce the number of trees we build to: mainline, linux-next,
arm-soc, and stable.
This will reduce load and (hopefully) increase the quality of the
remaining upstream-focused build/boot results until we have the
resources (both time and humans) to address the current problems and
make things scalable to a large number of trees.
Sorry for the inconvenience,
Kevin
(on behalf of the core kernel CI team of myself and the Linaro crew:
Tyler Baker, Milo Casagrande, Mark Brown and Matt Hart.)
Here's another stab at this writeup. I'd appreciate any comments!
Changes from v1 to v2:
- Consumer/Producer is defined for Extended Address Space descriptors;
should be ignored for QWord/DWord/Word Address Space descriptors
- New arches may use Extended Address Space descriptors in PNP0A03 for
bridge registers, including ECAM (if the arch adds support for this)
- Add more details about MCFG and _CBA (Lv's suggestion)
- Incorporate Rafael's suggestions
---
Bjorn Helgaas (1):
PCI: Add information about describing PCI in ACPI
Documentation/PCI/00-INDEX | 2
Documentation/PCI/acpi-info.txt | 180 +++++++++++++++++++++++++++++++++++++++
2 files changed, 182 insertions(+)
create mode 100644 Documentation/PCI/acpi-info.txt
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Clean up printk() usage
2. Rename the type macros
3. Rename the PPI enum & enum values
4. Move the type macro and PPI enum into the header file
5. Add new enum for SPIs
6. Rework PPI determination;
7. Rework counter frequency detection;
8. Refactor arch_timer_needs_probing, move it into DT init call
9. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v20: https://lkml.org/lkml/2017/1/18/
Reorder the first 4 patches and split the 4th patches.
Leave CNTHCTL_* as they originally were.
Fix the bug in arch_timer_select_ppi.
Split "Rework counter frequency detection" patch.
Rework the arch_timer_detect_rate function.
Improve the commit message of "Refactor MMIO timer probing".
Rebase to 4.10.0-rc4
v19: https://lkml.org/lkml/2016/12/21/25
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (17):
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: Rename the timer type macros.
clocksource/drivers/arm_arch_timer: Rename the PPI enum and its
values.
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file.
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: rework PPI determination
clocksource/drivers/arm_arch_timer: Separate out device-tree code from
arch_timer_detect_rate
clocksource/drivers/arm_arch_timer: Rework counter frequency
detection.
clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing
clocksource/drivers/arm_arch_timer: Move arch_timer_needs_of_probing
into DT init call
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor MMIO timer probing.
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 374 ++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 497 +++++++++++++++++++++--------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 35 +++
include/linux/acpi.h | 7 +
8 files changed, 717 insertions(+), 202 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code;
4. Rename some enums and defines;
5. Rework PPI determination;
6. Rework counter frequency detection;
7. Refactor arch_timer_needs_probing, move it into DT init call
8. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v19: https://lkml.org/lkml/2016/12/21/
Fix a '\n' missing in a error message in arch_timer_mem_init.
Add "request_mem_region" for ioremapping cntbase, according to
f947ee1 clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map()
Rebase to 4.9.0-gfb779ff
v18: https://lkml.org/lkml/2016/12/8/446
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init.
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (15):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: rename some enums and defines.
clocksource/drivers/arm_arch_timer: rework PPI determination
clocksource/drivers/arm_arch_timer: Rework counter frequency
detection.
clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing
clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing
into DT init call
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 374 +++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 483 ++++++++++++++++++++---------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 45 +++-
include/linux/acpi.h | 7 +
virt/kvm/arm/hyp/timer-sr.c | 6 +-
9 files changed, 712 insertions(+), 209 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code;
4. Rename some enums and defines;
5. Rework PPI determination;
6. Rework counter frequency detection;
7. Refactor arch_timer_needs_probing, move it into DT init call
8. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v18: https://lkml.org/lkml/2016/12/8/
Fix 8/15 patch problem of "int ret;" in arch_timer_acpi_init
Rebase to 4.9.0-rc8-g9269898
v17: https://lkml.org/lkml/2016/11/25/140
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (15):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: rename some enums and defines.
clocksource/drivers/arm_arch_timer: rework PPI determination
clocksource/drivers/arm_arch_timer: Rework counter frequency
detection.
clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing
clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing
into DT init call
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 374 +++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 478 ++++++++++++++++++++---------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 45 +++-
include/linux/acpi.h | 7 +
virt/kvm/arm/hyp/timer-sr.c | 6 +-
9 files changed, 708 insertions(+), 208 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
FWTS 16.12.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.12.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.12.00
= New Features =
* ACPICA: Update to version 20161117
* klog.json: Add a few more kernel errors to the database
* opal: pci_info: Add OPAL PCI Info validation
* opal: mem_info: Add OPAL MEM Info validation
* opal: cpu_info: Add OPAL CPU Info validation
* securebootcert: add variable AuditMode checking
* securebootcert: add variable DeployedMode checking
= Fixed Bugs =
* acpica: s390x needs to be built as a 64 bit architecture
* klog.json: Update the klog database with more kernel patterns
* devicetree: dt_sysinfo: Add OPAL firmware version checks
* olog: olog.json: Update OPAL skiboot errors to check on olog scan
* fwts:dmicheck: replace memcpy with fwts_memcpy_unaligned
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.12.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
These patches were part of https://lkml.org/lkml/2016/9/9/666 series,
however, only core part (first two patches) was approved. ThunderX quirk
example had some comments which are address in this series (resetting version
numbering).
Add ACPI PCI host controler support for ThunderX SoCs pass1.x & pass2.x using
ACPI quirk mechanism [1]. Patches rework ThunderX ECAM and PEM driver to work
with ACPI & DT boot method.
Patch set can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-quirks-thunderx-v1)
It is based on branch pci/ecam-v6 which can be found here:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git (pci/ecam-v6)
Tomasz Nowicki (2):
PCI: thunder: Enable ACPI PCI controller for ThunderX pass2.x silicon
version
PCI: thunder: Enable ACPI PCI controller for ThunderX pass1.x silicon
version
drivers/acpi/pci_mcfg.c | 35 ++++++++++++
drivers/pci/host/pci-thunder-ecam.c | 2 +-
drivers/pci/host/pci-thunder-pem.c | 107 +++++++++++++++++++++++++++++++-----
include/linux/pci-ecam.h | 7 +++
4 files changed, 136 insertions(+), 15 deletions(-)
--
2.7.4
Hi ,
On 25 November 2016 at 22:32, kbuild test robot <lkp(a)intel.com> wrote:
> Hi Fu,
>
> [auto build test ERROR on pm/linux-next]
> [also build test ERROR on v4.9-rc6]
> [cannot apply to tip/timers/core next-20161125]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-clocksource…
> base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: arm64-defconfig (attached as .config)
> compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/m… -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=arm64
>
> Note: the linux-review/fu-wei-linaro-org/acpi-clocksource-add-GTDT-driver-and-GTDT-support-in-arm_arch_timer/20161125-171111 HEAD 498f1f2503da21841b0e7679ddbdb86a40451bdb builds fine.
> It only hurts bisectibility.
>
> All errors (new ones prefixed by >>):
>
> drivers/clocksource/arm_arch_timer.c: In function 'arch_timer_acpi_init':
Sorry, again,
a "+ int ret;" should be move from [12/15] to here, I have fix the
problem in my repo, it would happen in next patchset
https://git.linaro.org/people/fu.wei/linux.git/log/?h=topic-gtdt-wakeup-tim…
>>> drivers/clocksource/arm_arch_timer.c:1071:2: error: 'ret' undeclared (first use in this function)
> ret = arch_timer_register();
> ^~~
> drivers/clocksource/arm_arch_timer.c:1071:2: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +/ret +1071 drivers/clocksource/arm_arch_timer.c
>
> 1065 return -EINVAL;
> 1066 }
> 1067
> 1068 /* Always-on capability */
> 1069 arch_timer_c3stop = !(gtdt->non_secure_el1_flags & ACPI_GTDT_ALWAYS_ON);
> 1070
>> 1071 ret = arch_timer_register();
> 1072 if (ret)
> 1073 return ret;
> 1074
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
--
Best regards,
Fu Wei
Software Engineer
Red Hat
Hi all,
We've been working through the details of getting ACPI to work on
arm64, and there have been lots of questions about what this means for
PCI. I've outlined this for several people individually, but I'm
going to send this separately, apart from a specific patch series, to
make sure we're all on the same page. Please correct my errors and
misunderstandings.
Bjorn
The basic requirement is that the ACPI namespace should describe
*everything* that consumes address space unless there's another
standard way for the OS to find it [1, 2]. For example, windows that
are forwarded to PCI by a PCI host bridge should be described via ACPI
devices, since the OS can't locate the host bridge by itself. PCI
devices *below* the host bridge do not need to be described via ACPI,
because the resources they consume are inside the host bridge windows,
and the OS can discover them via the standard PCI enumeration
mechanism (using config accesses to read and size the BARs).
This ACPI resource description is done via _CRS methods of devices in
the ACPI namespace [2]. _CRS methods are like generalized PCI BARs:
the OS can read _CRS and figure out what resource is being consumed
even if it doesn't have a driver for the device [3]. That's important
because it means an old OS can work correctly even on a system with
new devices unknown to the OS. The new devices won't do anything, but
the OS can at least make sure no resources conflict with them.
Static tables like MCFG, HPET, ECDT, etc., are *not* mechanisms for
reserving address space! The static tables are for things the OS
needs to know early in boot, before it can parse the ACPI namespace.
If a new table is defined, an old OS needs to operate correctly even
though it ignores the table. _CRS allows that because it is generic
and understood by the old OS; a static table does not.
If the OS is expected to manage an ACPI device, that device will have
a specific _HID/_CID that tells the OS what driver to bind to it, and
the _CRS tells the OS and the driver where the device's registers are.
PNP0C02 "motherboard" devices are basically a catch-all. There's no
programming model for them other than "don't use these resources for
anything else." So any address space that is (1) not claimed by some
other ACPI device and (2) should not be assigned by the OS to
something else, should be claimed by a PNP0C02 _CRS method.
PCI host bridges are PNP0A03 or PNP0A08 devices. Their _CRS should
describe all the address space they consume. In principle, this would
be all the windows they forward down to the PCI bus, as well as the
bridge registers themselves. The bridge registers include things like
secondary/subordinate bus registers that determine the bus range below
the bridge, window registers that describe the apertures, etc. These
are all device-specific, non-architected things, so the only way a
PNP0A03/PNP0A08 driver can manage them is via _PRS/_CRS/_SRS, which
contain the device-specific details. These bridge registers also
include ECAM space, since it is consumed by the bridge.
ACPI defined a Producer/Consumer bit that was intended to distinguish
the bridge apertures from the bridge registers [4, 5]. However,
BIOSes didn't use that bit correctly, and the result is that OSes have
to assume that everything in a PCI host bridge _CRS is a window. That
leaves no way to describe the bridge registers in the PNP0A03/PNP0A08
device itself.
The workaround is to describe the bridge registers (including ECAM
space) in PNP0C02 catch-all devices [6]. With the exception of ECAM,
the bridge register space is device-specific anyway, so the generic
PNP0A03/PNP0A08 driver (pci_root.c) has no need to know about it. For
ECAM, pci_root.c learns about the space from either MCFG or the _CBA
method.
Note that the PCIe spec actually does require ECAM unless there's a
standard firmware interface for config access, e.g., the ia64 SAL
interface [7]. One reason is that we want a generic host bridge
driver (pci_root.c), and a generic driver requires a generic way to
access config space.
[1] ACPI 6.0, sec 6.1:
For any device that is on a non-enumerable type of bus (for
example, an ISA bus), OSPM enumerates the devices' identifier(s)
and the ACPI system firmware must supply an _HID object ... for
each device to enable OSPM to do that.
[2] ACPI 6.0, sec 3.7:
The OS enumerates motherboard devices simply by reading through
the ACPI Namespace looking for devices with hardware IDs.
Each device enumerated by ACPI includes ACPI-defined objects in
the ACPI Namespace that report the hardware resources the device
could occupy [_PRS], an object that reports the resources that are
currently used by the device [_CRS], and objects for configuring
those resources [_SRS]. The information is used by the Plug and
Play OS (OSPM) to configure the devices.
[3] ACPI 6.0, sec 6.2:
OSPM uses device configuration objects to configure hardware
resources for devices enumerated via ACPI. Device configuration
objects provide information about current and possible resource
requirements, the relationship between shared resources, and
methods for configuring hardware resources.
When OSPM enumerates a device, it calls _PRS to determine the
resource requirements of the device. It may also call _CRS to
find the current resource settings for the device. Using this
information, the Plug and Play system determines what resources
the device should consume and sets those resources by calling the
device’s _SRS control method.
In ACPI, devices can consume resources (for example, legacy
keyboards), provide resources (for example, a proprietary PCI
bridge), or do both. Unless otherwise specified, resources for a
device are assumed to be taken from the nearest matching resource
above the device in the device hierarchy.
[4] ACPI 6.0, sec 6.4.3.5.4:
Extended Address Space Descriptor
General Flags: Bit [0] Consumer/Producer:
1–This device consumes this resource
0–This device produces and consumes this resource
[5] ACPI 6.0, sec 19.6.43:
ResourceUsage specifies whether the Memory range is consumed by
this device (ResourceConsumer) or passed on to child devices
(ResourceProducer). If nothing is specified, then
ResourceConsumer is assumed.
[6] PCI Firmware 3.0, sec 4.1.2:
If the operating system does not natively comprehend reserving the
MMCFG region, the MMCFG region must be reserved by firmware. The
address range reported in the MCFG table or by _CBA method (see
Section 4.1.3) must be reserved by declaring a motherboard
resource. For most systems, the motherboard resource would appear
at the root of the ACPI namespace (under \_SB) in a node with a
_HID of EISAID (PNP0C02), and the resources in this case should
not be claimed in the root PCI bus’s _CRS. The resources can
optionally be returned in Int15 E820 or EFIGetMemoryMap as
reserved memory but must always be reported through ACPI as a
motherboard resource.
[7] PCI Express 3.0, sec 7.2.2:
For systems that are PC-compatible, or that do not implement a
processor-architecture-specific firmware interface standard that
allows access to the Configuration Space, the ECAM is required as
defined in this section.
Quirk handling relies on an idea of simple static array which contains
quirk enties. Each entry consists of identification information (IDs from
standard header of MCFG table) along with custom pci_ecam_ops structure and
configuration space resource structure. This way it is possible find
corresponding quirk entries and override pci_ecam_ops and PCI configuration
space regions.
As an example, the last 3 patches present quirk handling mechanism usage for
ThunderX.
v5 -> v6
- rebase against v4.8-rc5
- drop patch 1 form previous series
- keep pci_acpi_setup_ecam_mapping() in ARM64 arch directory
- move quirk code to pci_mcfg.c
- restrict quirk to override pci_ecam_ops and CFG resource structure
only, no init call any more
- split ThunderX quirks into the smaller chunks
- add ThunderX pass1.x silicon revision support
v4 -> v5
- rebase against v4.8-rc1
- rework to exact MCFG OEM ID, TABLE ID, rev match
- use memcmp instead of strncmp
- no substring match
- fix typos and dmesg message
Tomasz Nowicki (5):
PCI/ACPI: Extend pci_mcfg_lookup() responsibilities
PCI/ACPI: Check platform specific ECAM quirks
PCI: thunder-pem: Allow to probe PEM-specific register range for ACPI
case
PCI: thunder: Enable ACPI PCI controller for ThunderX pass2.x silicon
version
PCI: thunder: Enable ACPI PCI controller for ThunderX pass1.x silicon
version
arch/arm64/kernel/pci.c | 17 ++--
drivers/acpi/pci_mcfg.c | 168 +++++++++++++++++++++++++++++++++++-
drivers/pci/host/pci-thunder-ecam.c | 2 +-
drivers/pci/host/pci-thunder-pem.c | 63 +++++++++++---
include/linux/pci-acpi.h | 4 +-
include/linux/pci-ecam.h | 7 ++
6 files changed, 230 insertions(+), 31 deletions(-)
--
1.9.1
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This patch provides APEI arch-specific bits for aarch64
Meanwhile,
(1)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(2)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
Reviewed-by: Borislav Petkov <bp(a)suse.de>
---
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v15:https://lkml.org/lkml/2016/12/1/
Improve the comment of acpi_disable_cmcff.
Rebase to 4.9.0-rc7-gd7c7bc3
v14:https://lkml.org/lkml/2016/8/10/231
Delete hest_ia32_init().
Fix a comment typo for acpi_disable_cmcff.
Rebase to 4.8.0-rc1-ge6c4d92
v13:https://lkml.org/lkml/2016/8/10/499
Fix a comment problem(add a "end").
Add a comment for the definition of acpi_disable_cmcff.
Rebase to 4.8.0-rc1-g372734a
v12:https://lkml.org/lkml/2016/7/29/97
Fix a comment problem(redundant "with").
Rebase to 4.7.0-g680eee2.
v11:https://lkml.org/lkml/2016/7/27/427
Rebase to v4.7-0e06f5c0.
v10:https://lkml.org/lkml/2016/4/14
Fix the Alphabetical order problem in arch/arm64/Kconfig.
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h.
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 23 ++++++++++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 13 ++++++++++---
4 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 969ef88..657be7f 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -52,6 +52,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index e517088..d0de0e0 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -114,8 +115,28 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+/*
+ * acpi_disable_cmcff is used in drivers/acpi/apei/hest.c for disabling
+ * IA-32 Architecture Corrected Machine Check (CMC) Firmware-First mode
+ * with a kernel command line parameter "acpi=nocmcoff". But we don't
+ * have this IA-32 specific feature on ARM64, this definition is only
+ * for compatibility.
+ */
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't end up with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#ifdef CONFIG_ACPI_NUMA
int arm64_acpi_numa_init(void);
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..8f2a98e 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,13 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
}
struct ghes_arr {
@@ -232,8 +238,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = apei_hest_parse(hest_parse_cmc, NULL);
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.9.3
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This patch provides APEI arch-specific bits for aarch64
Meanwhile,
(1)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(2)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v14:https://lkml.org/lkml/2016/8/10/
Delete hest_ia32_init().
Fix a comment typo for acpi_disable_cmcff.
Rebase to 4.8.0-rc1-ge6c4d92
v13:https://lkml.org/lkml/2016/8/10/
Fix a comment problem(add a "end").
Add a comment for the definition of acpi_disable_cmcff.
Rebase to 4.8.0-rc1-g372734a
v12:https://lkml.org/lkml/2016/7/29/97
Fix a comment problem(redundant "with").
Rebase to 4.7.0-g680eee2.
v11:https://lkml.org/lkml/2016/7/27/427
Rebase to v4.7-0e06f5c0.
v10:https://lkml.org/lkml/2016/4/14
Fix the Alphabetical order problem in arch/arm64/Kconfig.
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h.
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 22 +++++++++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 13 ++++++++++---
4 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index bc3f00f..385cf13 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -51,6 +51,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 5420cb0..f435967 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,8 +111,27 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+/*
+ * acpi_disable_cmcff is used in drivers/acpi/apei/hest.c for disabling
+ * IA-32 Architecture Corrected Machine Check (CMC) Firmware-First mode by
+ * boot parameter(acpi=nocmcff). But we don't have this IA-32 specific
+ * feature on ARM64, this definition is only for compatibility.
+ */
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't end up with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#ifdef CONFIG_ACPI_NUMA
int arm64_acpi_numa_init(void);
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..8f2a98e 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,13 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
}
struct ghes_arr {
@@ -232,8 +238,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = apei_hest_parse(hest_parse_cmc, NULL);
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
Per spec, the Consumer/Producer bit is defined only for Extended
Address Space descriptors and should be ignored for QWord/DWord/Word
Address Space descriptors. My understanding is that this is because
x86 BIOSes didn't use the bit consistently, so it couldn't be relied
upon. The Extended descriptors were added later and are presumably
more reliable.
Linux currently looks at Consumer/Producer for all Address Space
descriptors, although we don't use the result very much. The x86 and
ia64 host bridge driver code doesn't use Consumer/Producer to identify
windows; it assumes all descriptors are windows.
We do currently use Consumer/Producer to decide whether to apply _TRA.
The change in these patches is to ignore Consumer/Producer for
QWord/DWord/Word, so we'll apply _TRA from Consumer descriptors where
we didn't before. Per spec, that should be safe because _TRA is
required to be zero for Consumer resources.
If we want to describe host bridge register space and ECAM space
directly in the PNP0A03 device on ARM64 (and I guess potentially even
on x86 & ia64), I think we need changes like this so the arch code can
use IORESOURCE_WINDOW to tell which descriptors are windows and which
are registers.
This is a subtle area, so please take a look and let me know what you
think.
These patches are based on v4.9-rc1. It's getting pretty late in the
cycle, but I think we'd really like to get the ARM64 ACPI PCI story
sorted out for the v4.10 merge window.
---
Bjorn Helgaas (2):
ACPI: Combine acpi_dev_resource_address_space() and acpi_dev_resource_ext_address_space()
ACPI: Ignore Consumer/Producer for QWord/DWord/Word Address Space
drivers/acpi/ioapic.c | 3 -
drivers/acpi/resource.c | 130 ++++++++++++++++++----------------------
drivers/pnp/pnpacpi/rsparser.c | 3 -
include/linux/acpi.h | 2 -
4 files changed, 59 insertions(+), 79 deletions(-)
Add a writeup about how PCI host bridges should be described in ACPI
using PNP0A03/PNP0A08 devices, PNP0C02 devices, and the MCFG table.
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
---
Documentation/PCI/00-INDEX | 2 +
Documentation/PCI/acpi-info.txt | 136 +++++++++++++++++++++++++++++++++++++++
2 files changed, 138 insertions(+)
create mode 100644 Documentation/PCI/acpi-info.txt
diff --git a/Documentation/PCI/00-INDEX b/Documentation/PCI/00-INDEX
index 147231f..0780280 100644
--- a/Documentation/PCI/00-INDEX
+++ b/Documentation/PCI/00-INDEX
@@ -1,5 +1,7 @@
00-INDEX
- this file
+acpi-info.txt
+ - info on how PCI host bridges are represented in ACPI
MSI-HOWTO.txt
- the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ.
PCIEBUS-HOWTO.txt
diff --git a/Documentation/PCI/acpi-info.txt b/Documentation/PCI/acpi-info.txt
new file mode 100644
index 0000000..ccbcfda
--- /dev/null
+++ b/Documentation/PCI/acpi-info.txt
@@ -0,0 +1,136 @@
+ ACPI considerations for PCI host bridges
+
+The basic requirement is that the ACPI namespace should describe
+*everything* that consumes address space unless there's another
+standard way for the OS to find it [1, 2]. For example, windows that
+are forwarded to PCI by a PCI host bridge should be described via ACPI
+devices, since the OS can't locate the host bridge by itself. PCI
+devices *below* the host bridge do not need to be described via ACPI,
+because the resources they consume are inside the host bridge windows,
+and the OS can discover them via the standard PCI enumeration
+mechanism (using config accesses to read and size the BARs).
+
+This ACPI resource description is done via _CRS methods of devices in
+the ACPI namespace [2]. _CRS methods are like generalized PCI BARs:
+the OS can read _CRS and figure out what resource is being consumed
+even if it doesn't have a driver for the device [3]. That's important
+because it means an old OS can work correctly even on a system with
+new devices unknown to the OS. The new devices won't do anything, but
+the OS can at least make sure no resources conflict with them.
+
+Static tables like MCFG, HPET, ECDT, etc., are *not* mechanisms for
+reserving address space! The static tables are for things the OS
+needs to know early in boot, before it can parse the ACPI namespace.
+If a new table is defined, an old OS needs to operate correctly even
+though it ignores the table. _CRS allows that because it is generic
+and understood by the old OS; a static table does not.
+
+If the OS is expected to manage an ACPI device, that device will have
+a specific _HID/_CID that tells the OS what driver to bind to it, and
+the _CRS tells the OS and the driver where the device's registers are.
+
+PNP0C02 "motherboard" devices are basically a catch-all. There's no
+programming model for them other than "don't use these resources for
+anything else." So any address space that is (1) not claimed by some
+other ACPI device and (2) should not be assigned by the OS to
+something else, should be claimed by a PNP0C02 _CRS method.
+
+PCI host bridges are PNP0A03 or PNP0A08 devices. Their _CRS should
+describe all the address space they consume. In principle, this would
+be all the windows they forward down to the PCI bus, as well as the
+bridge registers themselves. The bridge registers include things like
+secondary/subordinate bus registers that determine the bus range below
+the bridge, window registers that describe the apertures, etc. These
+are all device-specific, non-architected things, so the only way a
+PNP0A03/PNP0A08 driver can manage them is via _PRS/_CRS/_SRS, which
+contain the device-specific details. These bridge registers also
+include ECAM space, since it is consumed by the bridge.
+
+ACPI defined a Producer/Consumer bit that was intended to distinguish
+the bridge apertures from the bridge registers [4, 5]. However,
+BIOSes didn't use that bit correctly, and the result is that OSes have
+to assume that everything in a PCI host bridge _CRS is a window. That
+leaves no way to describe the bridge registers in the PNP0A03/PNP0A08
+device itself.
+
+The workaround is to describe the bridge registers (including ECAM
+space) in PNP0C02 catch-all devices [6]. With the exception of ECAM,
+the bridge register space is device-specific anyway, so the generic
+PNP0A03/PNP0A08 driver (pci_root.c) has no need to know about it. For
+ECAM, pci_root.c learns about the space from either MCFG or the _CBA
+method.
+
+Note that the PCIe spec actually does require ECAM unless there's a
+standard firmware interface for config access, e.g., the ia64 SAL
+interface [7]. One reason is that we want a generic host bridge
+driver (pci_root.c), and a generic driver requires a generic way to
+access config space.
+
+
+[1] ACPI 6.0, sec 6.1:
+ For any device that is on a non-enumerable type of bus (for
+ example, an ISA bus), OSPM enumerates the devices' identifier(s)
+ and the ACPI system firmware must supply an _HID object ... for
+ each device to enable OSPM to do that.
+
+[2] ACPI 6.0, sec 3.7:
+ The OS enumerates motherboard devices simply by reading through
+ the ACPI Namespace looking for devices with hardware IDs.
+
+ Each device enumerated by ACPI includes ACPI-defined objects in
+ the ACPI Namespace that report the hardware resources the device
+ could occupy [_PRS], an object that reports the resources that are
+ currently used by the device [_CRS], and objects for configuring
+ those resources [_SRS]. The information is used by the Plug and
+ Play OS (OSPM) to configure the devices.
+
+[3] ACPI 6.0, sec 6.2:
+ OSPM uses device configuration objects to configure hardware
+ resources for devices enumerated via ACPI. Device configuration
+ objects provide information about current and possible resource
+ requirements, the relationship between shared resources, and
+ methods for configuring hardware resources.
+
+ When OSPM enumerates a device, it calls _PRS to determine the
+ resource requirements of the device. It may also call _CRS to
+ find the current resource settings for the device. Using this
+ information, the Plug and Play system determines what resources
+ the device should consume and sets those resources by calling the
+ device’s _SRS control method.
+
+ In ACPI, devices can consume resources (for example, legacy
+ keyboards), provide resources (for example, a proprietary PCI
+ bridge), or do both. Unless otherwise specified, resources for a
+ device are assumed to be taken from the nearest matching resource
+ above the device in the device hierarchy.
+
+[4] ACPI 6.0, sec 6.4.3.5.4:
+ Extended Address Space Descriptor
+ General Flags: Bit [0] Consumer/Producer:
+ 1–This device consumes this resource
+ 0–This device produces and consumes this resource
+
+[5] ACPI 6.0, sec 19.6.43:
+ ResourceUsage specifies whether the Memory range is consumed by
+ this device (ResourceConsumer) or passed on to child devices
+ (ResourceProducer). If nothing is specified, then
+ ResourceConsumer is assumed.
+
+[6] PCI Firmware 3.0, sec 4.1.2:
+ If the operating system does not natively comprehend reserving the
+ MMCFG region, the MMCFG region must be reserved by firmware. The
+ address range reported in the MCFG table or by _CBA method (see
+ Section 4.1.3) must be reserved by declaring a motherboard
+ resource. For most systems, the motherboard resource would appear
+ at the root of the ACPI namespace (under \_SB) in a node with a
+ _HID of EISAID (PNP0C02), and the resources in this case should
+ not be claimed in the root PCI bus’s _CRS. The resources can
+ optionally be returned in Int15 E820 or EFIGetMemoryMap as
+ reserved memory but must always be reported through ACPI as a
+ motherboard resource.
+
+[7] PCI Express 3.0, sec 7.2.2:
+ For systems that are PC-compatible, or that do not implement a
+ processor-architecture-specific firmware interface standard that
+ allows access to the Configuration Space, the ECAM is required as
+ defined in this section.
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code;
4. Rename some enums and defines;
5. Rework PPI determination;
6. Rework counter frequency detection;
7. Refactor arch_timer_needs_probing, move it into DT init call
8. Introduce some new structs and refactor the MMIO timer init code
for reusing some common code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v17: https://lkml.org/lkml/2016/11/25/
Take out some cleanups from 4/15.
Merge 5/15 and 6/15, improve PPI determination code,
improve commit message.
Rework counter frequency detection.
Move arch_timer_needs_of_probing into DT init call.
Move Platform Timer scan loop back to timer init call to avoid allocating
and free memory.
Improve all the exported functions' comment.
v16: https://lkml.org/lkml/2016/11/16/268
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (15):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: rename some enums and defines.
clocksource/drivers/arm_arch_timer: rework PPI determination
clocksource/drivers/arm_arch_timer: Rework counter frequency
detection.
clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing
clocksource/drivers/arm_arch_timer: move arch_timer_needs_of_probing
into DT init call
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 374 +++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 478 ++++++++++++++++++++---------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 45 +++-
include/linux/acpi.h | 7 +
virt/kvm/arm/hyp/timer-sr.c | 6 +-
9 files changed, 708 insertions(+), 208 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.9.3
>From the functionality point of view this series may be split into the
following logic parts:
1. Export ECAM API and add parent device to pci_config_window
2. Add IO resources handling to PCI core code
3. New MCFG driver
4. Cleanups and support for generic domain assignment based on ACPI
5. Implement ARM64 ACPI based PCI host controller driver under arch/arm64/
Patches has been built on top of 4.7-rc2 and can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v9)
This has been tested on Cavium ThunderX server. Any help in reviewing and
testing is very appreciated.
v8 -> v9
- additional cleanups around generic assignment
- added back MCFG entries cache
- simplified config start address lookup
- fixed leak in pci_acpi_scan_root()
- isolated patch with ACPI RAW accessors implementation
- rebase against 4.7-rc2
v7 -> v8
- move code from drivers/acpi/pci_root_generic.c to arch/arm64/kernel/pci.c
- minor changes around domain assignment
- pci_mcfg.c improvements for parsing MCFG tables and lookup its entries
- rebase against 4.7-rc1
v6 -> v7
- drop quirks handling
- changes for ACPI companion and domain number assignment approach
- implement arch pcibios_{add|remove}_bus and call acpi_pci_{add|remove}_bus from there
- cleanups around nomenclature
- use resources oriented API for ECAM
- fix for based address calculation before mapping ECAM region
- remove useless lock for MCFG lookup
- move MCFG stuff to separated file pci_mcfg.c
- drop MCFG entries caching
- rebase against 4.6-rc7
v5 -> v6
- drop idea of x86 MMCONFIG code refactoring
- integrate JC's patches which introduce new ECAM API:
https://lkml.org/lkml/2016/4/11/907
git: https://github.com/jchandra-brcm/linux/ (arm64-acpi-pci-v3)
- integrate Sinan's fix for releasing IO resources, see patch [06/13]
- added ACPI support for ThunderX ECAM and PEM drivers
- rebase against 4.6-rc2
v4 -> v5
- drop MCFG refactoring group patches 1-6 from series v4 and integrate Jayachandran's patch
https://patchwork.ozlabs.org/patch/575525/
- rewrite PCI legacy IRQs allocation
- squash two patches 11 and 12 from series v4, fixed bisection issue
- changelog improvements
- rebase against 4.5-rc3
v3 -> v4
- drop Jiang's fix http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04318.html
- add Lorenzo's fix patch 19/24
- ACPI PCI bus domain number assigning cleanup
- change resource management, we now claim and reassign resources
- improvements for applying quirks
- drop Matthew's http://www.spinics.net/lists/linux-pci/msg45950.html dependency
- rebase against 4.5-rc1
v2 -> v3
- fix legacy IRQ assigning and IO ports registration
- remove reference to arch specific companion device for ia64
- move ACPI PCI host controller driver to pci_root.c
- drop generic domain assignment for x86 and ia64 as I am not
able to run all necessary test variants
- drop patch which cleaned legacy IRQ assignment since it belongs to
Mathew's series:
https://patchwork.ozlabs.org/patch/557504/
- extend MCFG quirk code
- rebase against 4.4
v1 -> v2
- move non-arch specific piece of code to dirver/acpi/ directory
- fix IO resource handling
- introduce PCI config accessors quirks matching
- moved ACPI_COMPANION_SET to generic code
v1 - https://lkml.org/lkml/2015/10/27/504
v2 - https://lkml.org/lkml/2015/12/16/246
v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.html
v4 - https://lkml.org/lkml/2016/2/4/646
v5 - https://lkml.org/lkml/2016/2/16/426
v6 - https://lkml.org/lkml/2016/4/15/594
v7 - https://lkml.org/lkml/2016/5/10/568
v8 - https://lkml.org/lkml/2016/5/30/468
Jayachandran C (3):
PCI/ECAM: Move ecam.h to linux/include/pci-ecam.h
PCI/ECAM: Add parent device field to pci_config_window
ACPI/PCI: Support IO resources when parsing PCI host bridge resources
Sinan Kaya (1):
PCI: Add new function to unmap IO resources
Tomasz Nowicki (7):
ACPI/PCI: Add generic MCFG table handling
PCI: Refactor generic bus domain assignment
PCI: Factor DT specific pci_bus_find_domain_nr() code out
ARM64/PCI: Add ACPI hook to assign domain number
ARM64/PCI: ACPI support for legacy IRQs parsing and consolidation with
DT code
ARM64/PCI: Implement ACPI low-level calls to access PCI_Config region
from AML
ARM64/PCI: Support for ACPI based PCI host controller
arch/arm64/Kconfig | 2 +
arch/arm64/kernel/pci.c | 146 ++++++++++++++++++++++++++++++++++--
drivers/acpi/Kconfig | 3 +
drivers/acpi/Makefile | 1 +
drivers/acpi/pci_mcfg.c | 92 +++++++++++++++++++++++
drivers/acpi/pci_root.c | 39 ++++++++++
drivers/pci/ecam.c | 6 +-
drivers/pci/ecam.h | 67 -----------------
drivers/pci/host/pci-host-common.c | 3 +-
drivers/pci/host/pci-host-generic.c | 3 +-
drivers/pci/host/pci-thunder-ecam.c | 3 +-
drivers/pci/host/pci-thunder-pem.c | 6 +-
drivers/pci/pci.c | 29 ++++++-
drivers/pci/probe.c | 4 +-
include/linux/pci-acpi.h | 2 +
include/linux/pci-ecam.h | 67 +++++++++++++++++
include/linux/pci.h | 15 ++--
17 files changed, 392 insertions(+), 96 deletions(-)
create mode 100644 drivers/acpi/pci_mcfg.c
delete mode 100644 drivers/pci/ecam.h
create mode 100644 include/linux/pci-ecam.h
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
4. rename some enums and defines, and some cleanups.
5. separate out arch_timer_uses_ppi init code and fix a potential bug
6. Refactor arch_timer_detect_rate to keep dt code only in *_of_init
7. Refactor arch_timer_needs_probing, and call it only if acpi disabled.
8. Introduce some new structs and refactor the timer init code
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer, also refactor
original memory-mapped timer dt support for reusing some common
code.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v16: https://lkml.org/lkml/2016/
Fix patchset problem about static enum ppi_nr of 01/13 in v15.
Refactor arch_timer_detect_rate.
Refactor arch_timer_needs_probing.
v15: https://lkml.org/lkml/2016/11/15/366
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (15):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: rename some enums and defines, and
some cleanups.
clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register
about arch_timer_uses_ppi
clocksource/drivers/arm_arch_timer: separate out arch_timer_uses_ppi
init code to prepare for GTDT.
clocksource/drivers/arm_arch_timer: Refactor arch_timer_detect_rate to
keep dt code in *_of_init
clocksource/drivers/arm_arch_timer: Refactor arch_timer_needs_probing,
and call it only if acpi disabled.
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 411 +++++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 484 ++++++++++++++++++++---------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 61 ++++-
include/linux/acpi.h | 8 +
virt/kvm/arm/hyp/timer-sr.c | 6 +-
9 files changed, 759 insertions(+), 217 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
4. rename some enums and defines, and some cleanups.
5. separate out arch_timer_uses_ppi init code and fix a potential bug
6. Introduce some new structs and refactor the timer init code
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer, also refactor
original memory-mapped timer dt support for reusing some common
code.
This patchset has been tested on the following platforms with ACPI enabled:
(1)ARM Foundation v8 model
Changelog:
v15: https://lkml.org/lkml/2016/11/15/
Re-order patches
Add arm_arch_timer refactoring patches to prepare for GTDT:
1. rename some enums and defines, and some cleanups
2. separate out arch_timer_uses_ppi init code and fix a potential bug
3. Improve some new structs, refactor the timer init code.
Since the some structs have been changed, GTDT parser for memory-mapped
timer and SBSA Generic Watchdog timer have been update.
v14: https://lkml.org/lkml/2016/9/28/573
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (13):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: rename some enums and defines, and
some cleanups.
clocksource/drivers/arm_arch_timer: fix a bug in arch_timer_register
about arch_timer_uses_ppi
clocksource/drivers/arm_arch_timer: separate out arch_timer_uses_ppi
init code to prepare for GTDT.
clocksource/drivers/arm_arch_timer: Introduce some new structs to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 411 ++++++++++++++++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 420 ++++++++++++++++++++---------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 61 +++--
include/linux/acpi.h | 8 +
virt/kvm/arm/hyp/timer-sr.c | 6 +-
9 files changed, 720 insertions(+), 192 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer, also refactor
original memory-mapped timer dt support for reusing some common
code.
This patchset depends on the following patchset:
[UPDATE PATCH V11 1/8] ACPI: I/O Remapping Table (IORT) initial support
https://lkml.org/lkml/2016/9/12/949
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v14: https://lkml.org/lkml/2016/9/28/
Separate memory-mapped timer GTDT support into two patches
1. Refactor the timer init code to prepare for GTDT
2. Add GTDT support for memory-mapped timer
v13: http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1231717.html
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (9):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Refactor the timer init code to
prepare for GTDT
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 309 ++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 331 +++++++++++++++++++++--------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
9 files changed, 558 insertions(+), 129 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
FWTS 16.11.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.11.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.11.00
= New Features =
* ACPICA: Update to version 20160930
* uefibootpath: add test for eMMC device path
* uefidump: add dumping for the eMMC device path
= Fixed Bugs =
* acpica: remove aslcompiler.y as it is generated from aslparser.y
* debian/control: fwts-efi-runtime-dkms should not depend on kernel
headers (LP: #1629826)
* Build using dpkg-dev's hardening support.
* acpcia: Makefile.am: include exconcat.c into libfwtsiasl build (LP:
#1631354)
* lib: fwts_ac_adapter: add in some constifications
* lib: fwts_args: move #defines to start of source
* lib: fwts_firmware: constify feature_names
* lib: fwts_framework: constify categories[] and log_levels[]
* lib: fwts_log_html: constify fwts_log_html_ascii_table[]
* acpi: s3power: remove redundant intialization of fwts_settings
* acpi: s4: remove redundant intialization of fwts_settings
* acpi: s3: remove redundant intialization of fwts_settings
* lib: fwts_pipeio: remove redundant initializations of file to NULL
* opal: remove redundant initializations of command to NULL
* lib: fwts_framework: initialize msg to literal string
* dmi: dmicheck: fix a couple of cppcheck style warnings
* Manual: keep contributors list up to date
* fwts_devicetree: Add defines for common usage
* fwts_devicetree: Add function for common usage
* devicetree: dt_sysinfo: Reference compatible whitespace
* fwts_acpi_tables: remove fwts_acpi_checksum declaration
* acpi: dbg2: fix segfault and refactor dbg2_obj_find
* fwts_framework.h: fix redefinition typedef warning
* fwts_hwinfo.c: fix strict-aliasing error with old gcc
* esrt.c: fix uninitialized use of 'fwversion' warning
* efi_runtime: use memdup_user() as a cleanup
* efi_runtime: fix the uninintialized value datasize
* efi_runtime: fix the uninitialized value rv
* uefibootpath: fix the URI length check
* fwts_acpica: fix segmentation fault by unlock mutex twice (LP:
#1635502)
* debian/control: clean up uploaders list
* auto-packager: mkpackage.sh: add zesty
* acpi: hest: Add new error notification types
* acpi: madt: Fix processor UID check
* acpi: gtdt: Account for added virtual timer flags
* lib: acpi: Remove gsiv field of fwts_acpi_table_gtdt_block_timer
* acpi: mpst: Show test as skipped if table does not exist
* lib: olog: Show test as skipped if nothing to do
* acpi: pmtt: Show test as skipped if table does not exist
* acpi: tcpa: Show test as skipped if table does not exist
* acpi: tpm2: Show test as skipped if table does not exist
* acpi: xenv: Show test as skipped if table does not exist
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.11.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
Cheers,
Ivan
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset depends on the following patchset:
[UPDATE PATCH V11 1/8] ACPI: I/O Remapping Table (IORT) initial support
https://lkml.org/lkml/2016/9/12/949
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v12: https://lkml.org/lkml/2016/9/13/
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (8):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 309 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 225 +++++++++++++++++--------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
9 files changed, 510 insertions(+), 71 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
This patch series adds support to the EMAC driver for extracting addresses,
interrupts, and some _DSDs (properties) from ACPI. The first two patches
clean up the code, and the third patch adds ACPI-specific functionality.
The first patch fixes a bug with handling the platform_device for the
internal PHY. This phy is treated as a separate device in both DT and
ACPI, but since the platform is not released automatically when the
driver unloads, managed functions like devm_ioremap_resource cannot be
used.
The second patch replaces of_get_mac_address with its platform-independent
equivalent device_get_mac_address.
The third patch parses the ACPI tables to obtain the platform_device for
the primary EMAC node ("QCOM8070") and the internal phy node ("QCOM8071").
Timur Tabi (3):
[v2] net: qcom/emac: do not use devm on internal phy pdev
[v2] net: qcom/emac: use device_get_mac_address
[v2] net: qcom/emac: initial ACPI support
drivers/net/ethernet/qualcomm/emac/emac-phy.c | 37 ++++++--
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 110 ++++++++++++++++++------
drivers/net/ethernet/qualcomm/emac/emac.c | 26 ++++--
3 files changed, 134 insertions(+), 39 deletions(-)
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
The platform_device returned by of_find_device_by_node() is not
automatically released when the driver unprobes. Therefore,
managed calls like devm_ioremap_resource() should not be used.
Instead, we manually allocate the resources and then free them
on driver release.
Signed-off-by: Timur Tabi <timur(a)codeaurora.org>
---
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 42 +++++++++++++++++++------
drivers/net/ethernet/qualcomm/emac/emac.c | 4 +++
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
index 9a9a963..2a095fb 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
@@ -681,6 +681,7 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
struct resource *res;
const struct of_device_id *match;
struct device_node *np;
+ int ret;
np = of_parse_phandle(pdev->dev.of_node, "internal-phy", 0);
if (!np) {
@@ -697,26 +698,49 @@ int emac_sgmii_config(struct platform_device *pdev, struct emac_adapter *adpt)
match = of_match_device(emac_sgmii_dt_match, &sgmii_pdev->dev);
if (!match) {
dev_err(&pdev->dev, "unrecognized internal phy node\n");
- return -ENODEV;
+ ret = -ENODEV;
+ goto error_put_device;
}
phy->initialize = (emac_sgmii_initialize)match->data;
/* Base address is the first address */
res = platform_get_resource(sgmii_pdev, IORESOURCE_MEM, 0);
- phy->base = devm_ioremap_resource(&sgmii_pdev->dev, res);
- if (IS_ERR(phy->base))
- return PTR_ERR(phy->base);
+ phy->base = ioremap(res->start, resource_size(res));
+ if (IS_ERR(phy->base)) {
+ ret = PTR_ERR(phy->base);
+ goto error_put_device;
+ }
/* v2 SGMII has a per-lane digital digital, so parse it if it exists */
res = platform_get_resource(sgmii_pdev, IORESOURCE_MEM, 1);
if (res) {
- phy->digital = devm_ioremap_resource(&sgmii_pdev->dev, res);
- if (IS_ERR(phy->base))
- return PTR_ERR(phy->base);
-
+ phy->digital = ioremap(res->start, resource_size(res));
+ if (IS_ERR(phy->digital)) {
+ ret = PTR_ERR(phy->digital);
+ goto error_unmap_base;
+ }
}
- return phy->initialize(adpt);
+ ret = phy->initialize(adpt);
+ if (ret)
+ goto error;
+
+ /* We've remapped the addresses, so we don't need the device any
+ * more. of_find_device_by_node() says we should release it.
+ */
+ put_device(&sgmii_pdev->dev);
+
+ return 0;
+
+error:
+ if (phy->digital)
+ iounmap(phy->digital);
+error_unmap_base:
+ iounmap(phy->base);
+error_put_device:
+ put_device(&sgmii_pdev->dev);
+
+ return ret;
}
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index e47d387..429b4cb 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -723,6 +723,10 @@ static int emac_remove(struct platform_device *pdev)
mdiobus_unregister(adpt->mii_bus);
free_netdev(netdev);
+ if (adpt->phy.digital)
+ iounmap(adpt->phy.digital);
+ iounmap(adpt->phy.base);
+
return 0;
}
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
The series builds the PCI/MSI domain stack based on initial IORT driver
which is added in first place. As a reference please see IORT spec:
http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remap…
Tested on Cavium ThunderX server and Qualcomm Technologies server platform QDF2XXX.
The patches can be found here:
https://github.com/semihalf-nowicki-tomasz/linux.git (its-acpi-v11)
v10 -> v11
- rebased against v4.8-rc6
- bug fix for iort_match_node_callback() error handling
- patch 1-2 changelog updates
v9 -> v10
- error handling improvements for iort_match_node_callback() but no functional changes
- iort.h -> acpi_iort.h header name change
- style improvements
v8 -> v9
- rebased against v4.8-rc4
- move root IORT pointer validation to one place iort_scan_node()
- function names & Kconfig option name improvements
- remove annoying dev_err() appearances for non-IORT users
- for debug purpose print full ITS resource range
v7 -> v8
- rebased against v4.8-rc1
- move IORT support under new drivers/acpi/arm64 directory
- memory leak fix for iort_match_node_callback()
- iort_node_map_rid() algorithm improvements
- fix RID match check in iort_id_map()
- fix typos and white spaces
v6 -> v7
- rebased against irq/irqchip-4.8
- improvements for IORT ID mapping
- call IORT init call from acpi_init() instead of arch_initcall()
- split IORT driver in to two parts: core and ITS/MSI
v5 -> v6
- added locking mechanism for IORT list with domain token
- IORT function name improvements
- extended IORT RID mapping helper
- reworked IORT to be more SMMU friendly
- IORT functions which map RID and find corresponding domain are not
PCI specific any more (struct pci_dev -> struct device)
- bug fixes
v4 -> v5
- rebased against v4.7-rc1
- drop generic layer and call IORT functions directly
- improve resource abstraction and string formatting
v3 -> v4
- rebased against v4.5
- add ACPI support for IRQ domain handling on a per-device basis
- reorder domain setup step
- improve error handling
- code style improvements
v2 -> v3
- rebased on top of 4.4
- fixes and improvements for redistributor init via GICC structures
- fixes as per kbuild reports
v1 -> v2
- rebased on top of 4.4-rc4
- use pci_msi_domain_get_msi_rid for requester ID to device ID translation
Tomasz Nowicki (8):
ACPI: I/O Remapping Table (IORT) initial support
ACPI: Add new IORT functions to support MSI domain handling
PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table
irqchip/gicv3-its: Cleanup for ITS domain initialization
irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI
irqchip/gicv3-its: Probe ITS in the ACPI way
irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for
ACPI
irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain
initialization
drivers/acpi/Kconfig | 4 +
drivers/acpi/Makefile | 2 +
drivers/acpi/arm64/Kconfig | 6 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/iort.c | 366 +++++++++++++++++++++++++++++++
drivers/acpi/bus.c | 2 +
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3-its-pci-msi.c | 88 ++++++--
drivers/irqchip/irq-gic-v3-its.c | 171 +++++++++++----
drivers/irqchip/irq-gic-v3.c | 7 +-
drivers/pci/msi.c | 11 +-
include/linux/acpi_iort.h | 42 ++++
include/linux/irqchip/arm-gic-v3.h | 4 +-
13 files changed, 635 insertions(+), 70 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/iort.c
create mode 100644 include/linux/acpi_iort.h
--
1.9.1
I need help getting my ACPI table parsing code to work correctly. My
driver fails to find the child device in a node when the driver is
unloaded and reloaded. I suspect that I'm not freeing a resource correctly.
Here is my ACPI table (trimmed):
Device (MAC0) {
Name (_HID, "QCOM8070")
Name (_UID, 0)
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate() {
...
Return (RBUF)
}
}
Device (IPHY) {
Name (_HID, "QCOM8071")
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate () {
...
Return (RBUF)
}
}
So QCOM8071 is a child device for QCOM8070. The driver probes on
QCOM8070 and then manually instantiates QCOM8071.
static const struct acpi_device_id emac_acpi_match[] = {
{
.id = "QCOM8070",
},
{}
};
MODULE_DEVICE_TABLE(acpi, emac_acpi_match);
static struct platform_driver emac_platform_driver = {
.probe = emac_probe,
.remove = emac_remove,
.driver = {
.name = "qcom-emac",
.acpi_match_table = ACPI_PTR(emac_acpi_match),
},
};
In emac_probe, I do this:
struct device *dev;
dev = device_find_child(&pdev->dev, NULL, emac_sgmii_acpi_match);
adpt->sgmii_pdev = to_platform_device(dev);
And here's emac_sgmii_acpi_match:
> static int emac_sgmii_acpi_match(struct device *dev, void *data)
> {
> static const struct acpi_device_id match_table[] = {
> {
> .id = "QCOM8071",
> },
> {}
> };
> const struct acpi_device_id *id = acpi_match_device(match_table, dev);
>
> return !!id;
> }
When my driver exits, I call
platform_device_unregister(adpt->sgmii_pdev);
So here's the problem: the second time my driver is loaded,
emac_sgmii_acpi_match() always returns false. The QCOM8071 child node
no longer exists. It's apparently hidden in some way.
I've been trying for several days to debug this, and I'm at my wits'
end. I'm assuming that I'm not freeing the resource properly, but other
than calling platform_device_unregister(), what else should I do?
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer, also refactor
original memory-mapped timer dt support for reusing some common
code.
This patchset depends on the following patchset:
[UPDATE PATCH V11 1/8] ACPI: I/O Remapping Table (IORT) initial support
https://lkml.org/lkml/2016/9/12/949
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v13: https://lkml.org/lkml/2016/9/15/
Improve arm_arch_timer code for memory-mapped
timer GTDT support, refactor original memory-mapped timer
dt support for reusing some common code.
v12: https://lkml.org/lkml/2016/9/13/250
Rebase to latest Linux 4.8-rc6
Delete the confusing "skipping" in the error message.
V11: https://lkml.org/lkml/2016/9/6/354
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (8):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 309 +++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 324 +++++++++++++++++++++--------------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
9 files changed, 552 insertions(+), 128 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset depends on the following patchset:
[PATCH V9 0/8] Introduce ACPI world to ITS irqchip
https://lkml.org/lkml/2016/9/5/847
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
V11: https://lkml.org/lkml/2016/9/6/
Rebase to latest Linux 4.8-rc5
Delete typedef (suggested by checkpatch.pl)
V10: https://lkml.org/lkml/2016/7/26/215
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (8):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/arm64/Kconfig | 3 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/gtdt.c | 309 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 225 +++++++++++++++++--------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
9 files changed, 510 insertions(+), 71 deletions(-)
create mode 100644 drivers/acpi/arm64/gtdt.c
--
2.7.4
The series builds the PCI/MSI domain stack based on initial IORT driver
which is added in first place. As a reference please see IORT spec:
http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remap…
Tested on Cavium ThunderX server and Qualcomm Technologies server platform QDF2XXX.
The patches can be found here:
https://github.com/semihalf-nowicki-tomasz/linux.git (its-acpi-v10)
v9 -> v10
- error handling improvements for iort_match_node_callback() but no functional changes
- iort.h -> acpi_iort.h header name change
- style improvements
v8 -> v9
- rebased against v4.8-rc4
- move root IORT pointer validation to one place iort_scan_node()
- function names & Kconfig option name improvements
- remove annoying dev_err() appearances for non-IORT users
- for debug purpose print full ITS resource range
v7 -> v8
- rebased against v4.8-rc1
- move IORT support under new drivers/acpi/arm64 directory
- memory leak fix for iort_match_node_callback()
- iort_node_map_rid() algorithm improvements
- fix RID match check in iort_id_map()
- fix typos and white spaces
v6 -> v7
- rebased against irq/irqchip-4.8
- improvements for IORT ID mapping
- call IORT init call from acpi_init() instead of arch_initcall()
- split IORT driver in to two parts: core and ITS/MSI
v5 -> v6
- added locking mechanism for IORT list with domain token
- IORT function name improvements
- extended IORT RID mapping helper
- reworked IORT to be more SMMU friendly
- IORT functions which map RID and find corresponding domain are not
PCI specific any more (struct pci_dev -> struct device)
- bug fixes
v4 -> v5
- rebased against v4.7-rc1
- drop generic layer and call IORT functions directly
- improve resource abstraction and string formatting
v3 -> v4
- rebased against v4.5
- add ACPI support for IRQ domain handling on a per-device basis
- reorder domain setup step
- improve error handling
- code style improvements
v2 -> v3
- rebased on top of 4.4
- fixes and improvements for redistributor init via GICC structures
- fixes as per kbuild reports
v1 -> v2
- rebased on top of 4.4-rc4
- use pci_msi_domain_get_msi_rid for requester ID to device ID translation
Tomasz Nowicki (8):
ACPI: I/O Remapping Table (IORT) initial support
ACPI: Add new IORT functions to support MSI domain handling
PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table
irqchip/gicv3-its: Cleanup for ITS domain initialization
irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI
irqchip/gicv3-its: Probe ITS in the ACPI way
irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for
ACPI
irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain
initialization
drivers/acpi/Kconfig | 4 +
drivers/acpi/Makefile | 2 +
drivers/acpi/arm64/Kconfig | 6 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/iort.c | 371 +++++++++++++++++++++++++++++++
drivers/acpi/bus.c | 2 +
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3-its-pci-msi.c | 88 ++++++--
drivers/irqchip/irq-gic-v3-its.c | 171 ++++++++++----
drivers/irqchip/irq-gic-v3.c | 7 +-
drivers/pci/msi.c | 11 +-
include/linux/acpi_iort.h | 42 ++++
include/linux/irqchip/arm-gic-v3.h | 4 +-
13 files changed, 640 insertions(+), 70 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/iort.c
create mode 100644 include/linux/acpi_iort.h
--
1.9.1
FWTS 16.09.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.09.00.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts
-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.09.
00
= New Features =
* lib: acpi: add supports for WPBT
* acpi: wpbt: add ACPI WPBT test
* lib: acpi: add supports for DRTM
* acpi: drtm: add ACPI DRTM test
* lib: fwts_guid: add a compare function
* acpi: nfit: check fields equals 0 for Virtual CD and Disk
* opal: mtd: Add OPAL MTD Validation
* acpi: ACPI Platform check updates
* acpi: fadt: Remove HEADLESS check on reduced hardware
* pci: aspm: Add segment support
* ACPICA: Update to version 20160831
= Fixed Bugs =
* acpi: nfit: skip SPA Range Structure Index for four GUIDs
* acpi: remove "Linux-ready Firmware Developer Kit" from license header
* cpu: msr: change SMRR_PHYSBASE from 8MB boundary to 4KB boundary
* acpica: remove utprint.c, it is not required
* ACPICA: Remove utfileio.c, it is deprecated and not used
* opal: ensure fdt_node_path buffer is null terminated
* fwts: treewide: voidify return from close(), closedir() and fclose()
* lib: fwts_ipmi: fix incorrect memset size
* opal: mtd: Add error exit when no MTD's
* opal: prd: Improve message when no PRD detected
* devicetree: dt_sysinfo: Improve message for non-reference model
* efi_runtime: change __usc2_strsize name to distinguish from ucs2_strsize
* efi_runtime: redefine all uint*_t types by following the header efi.h
* efi_runtime: exchange the user and local name define
* efi_runtime: refactor the success and error path
* efi_runtime: add label to reduce the number of kfree
* efi_runtime: expand to a full if-conditional instead of using terneary
operator
* efi_runtime: add VariableNameSize return when getting the
EFI_BUFFER_TOO_SMALL
* efi_runtime: fix memory leak of getvariable funtion
* efi_runtime: move the checking status forward
* efi_runtime: clean up some return and alignment code
* uefirttime: specify enable to true for setwakeuptime wiht null time test
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.09.00-0ubuntu1.debian.tar.gz from https://launchpad.net/ubuntu/+
source/fwts
Quirk handling relies on an idea of matching MCFG OEM ID, TABLE ID and
revision (the ones from standard header of MCFG table).
Static array is used to keep quirk entries. Each entry consists of
mentioned MCFG IDs along with custom pci_ops structure and initialization call.
As an example, the last patch presents quirk handling mechanism usage for
ThunderX PEM driver.
v4 -> v5
- rebase against v4.8-rc1
- rework to exact MCFG OEM ID, TABLE ID, rev match
- use memcmp instead of strncmp
- no substring match
- fix typos and dmesg message
Tomasz Nowicki (5):
PCI: Embed pci_ecam_ops in pci_config_window structure
PCI/ACPI: Move ACPI ECAM mapping to generic MCFG driver
PCI: Check platform specific ECAM quirks
ARM64/PCI: Start using quirks handling for ACPI based PCI host
controller
PCI: thunder-pem: Support quirky configuration space access for ACPI
based PCI host controller
arch/arm64/kernel/pci.c | 42 +----------------
drivers/acpi/pci_mcfg.c | 40 ++++++++++++++++
drivers/pci/ecam.c | 6 +--
drivers/pci/host/Makefile | 1 +
drivers/pci/host/mcfg-quirks.c | 93 ++++++++++++++++++++++++++++++++++++
drivers/pci/host/mcfg-quirks.h | 24 ++++++++++
drivers/pci/host/pci-thunder-pem.c | 96 ++++++++++++++++++++++++++++++++------
include/linux/pci-acpi.h | 5 ++
include/linux/pci-ecam.h | 2 +-
9 files changed, 252 insertions(+), 57 deletions(-)
create mode 100644 drivers/pci/host/mcfg-quirks.c
create mode 100644 drivers/pci/host/mcfg-quirks.h
--
1.9.1
The series builds the PCI/MSI domain stack based on initial IORT driver
which is added in first place. As a reference please see IORT spec:
http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remap…
Tested on Cavium ThunderX server and Qualcomm Technologies server platform QDF2XXX.
The patches can be found here:
https://github.com/semihalf-nowicki-tomasz/linux.git (its-acpi-v9)
v8 -> v9
- rebased against v4.8-rc4
- move root IORT pointer validation to one place iort_scan_node()
- function names & Kconfig option name improvements
- remove annoying dev_err() appearances for non-IORT users
- for debug purpose print full ITS resource range
v7 -> v8
- rebased against v4.8-rc1
- move IORT support under new drivers/acpi/arm64 directory
- memory leak fix for iort_match_node_callback()
- iort_node_map_rid() algorithm improvements
- fix RID match check in iort_id_map()
- fix typos and white spaces
v6 -> v7
- rebased against irq/irqchip-4.8
- improvements for IORT ID mapping
- call IORT init call from acpi_init() instead of arch_initcall()
- split IORT driver in to two parts: core and ITS/MSI
v5 -> v6
- added locking mechanism for IORT list with domain token
- IORT function name improvements
- extended IORT RID mapping helper
- reworked IORT to be more SMMU friendly
- IORT functions which map RID and find corresponding domain are not
PCI specific any more (struct pci_dev -> struct device)
- bug fixes
v4 -> v5
- rebased against v4.7-rc1
- drop generic layer and call IORT functions directly
- improve resource abstraction and string formatting
v3 -> v4
- rebased against v4.5
- add ACPI support for IRQ domain handling on a per-device basis
- reorder domain setup step
- improve error handling
- code style improvements
v2 -> v3
- rebased on top of 4.4
- fixes and improvements for redistributor init via GICC structures
- fixes as per kbuild reports
v1 -> v2
- rebased on top of 4.4-rc4
- use pci_msi_domain_get_msi_rid for requester ID to device ID translation
Tomasz Nowicki (8):
ACPI: I/O Remapping Table (IORT) initial support
ACPI: Add new IORT functions to support MSI domain handling
PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table
irqchip/gicv3-its: Cleanup for ITS domain initialization
irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI
irqchip/gicv3-its: Probe ITS in the ACPI way
irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for
ACPI
irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain
initialization
drivers/acpi/Kconfig | 4 +
drivers/acpi/Makefile | 2 +
drivers/acpi/arm64/Kconfig | 6 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/iort.c | 378 +++++++++++++++++++++++++++++++
drivers/acpi/bus.c | 2 +
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3-its-pci-msi.c | 88 +++++--
drivers/irqchip/irq-gic-v3-its.c | 171 ++++++++++----
drivers/irqchip/irq-gic-v3.c | 7 +-
drivers/pci/msi.c | 11 +-
include/linux/iort.h | 41 ++++
include/linux/irqchip/arm-gic-v3.h | 4 +-
13 files changed, 646 insertions(+), 70 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/iort.c
create mode 100644 include/linux/iort.h
--
1.9.1
The series builds the PCI/MSI domain stack based on initial IORT driver
which is added in first place. As a reference please see IORT spec:
http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remap…
Tested on Cavium ThunderX server and Qualcomm Technologies server platform QDF2XXX.
The patches can be found here:
https://github.com/semihalf-nowicki-tomasz/linux.git (its-acpi-v8)
v7 -> v8
- rebased against v4.8-rc1
- move IORT support under new drivers/acpi/arm64 directory
- memory leak fix for iort_match_node_callback()
- iort_node_map_rid() algorithm improvements
- fix RID match check in iort_id_map()
- fix typos and white spaces
v6 -> v7
- rebased against irq/irqchip-4.8
- improvements for IORT ID mapping
- call IORT init call from acpi_init() instead of arch_initcall()
- split IORT driver in to two parts: core and ITS/MSI
v5 -> v6
- added locking mechanism for IORT list with domain token
- IORT function name improvements
- extended IORT RID mapping helper
- reworked IORT to be more SMMU friendly
- IORT functions which map RID and find corresponding domain are not
PCI specific any more (struct pci_dev -> struct device)
- bug fixes
v4 -> v5
- rebased against v4.7-rc1
- drop generic layer and call IORT functions directly
- improve resource abstraction and string formatting
v3 -> v4
- rebased against v4.5
- add ACPI support for IRQ domain handling on a per-device basis
- reorder domain setup step
- improve error handling
- code style improvements
v2 -> v3
- rebased on top of 4.4
- fixes and improvements for redistributor init via GICC structures
- fixes as per kbuild reports
v1 -> v2
- rebased on top of 4.4-rc4
- use pci_msi_domain_get_msi_rid for requester ID to device ID translation
Tomasz Nowicki (8):
ACPI: I/O Remapping Table (IORT) initial support
ACPI: Add new IORT functions to support MSI domain handling
PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table
irqchip/gicv3-its: Cleanup for ITS domain initialization
irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI
irqchip/gicv3-its: Probe ITS in the ACPI way
irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for
ACPI
irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain
initialization
drivers/acpi/Kconfig | 5 +
drivers/acpi/Makefile | 2 +
drivers/acpi/arm64/Kconfig | 6 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/iort.c | 387 +++++++++++++++++++++++++++++++
drivers/acpi/bus.c | 2 +
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-gic-v3-its-pci-msi.c | 88 +++++--
drivers/irqchip/irq-gic-v3-its.c | 169 ++++++++++----
drivers/irqchip/irq-gic-v3.c | 7 +-
drivers/pci/msi.c | 11 +-
include/linux/iort.h | 41 ++++
include/linux/irqchip/arm-gic-v3.h | 4 +-
13 files changed, 654 insertions(+), 70 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/iort.c
create mode 100644 include/linux/iort.h
--
1.9.1
Quirk handling relies on an idea of matching MCFG OEM ID, TABLE ID and
revision (the ones from standard header of MCFG table).
Static array is used to keep quirk entries. Each entry consists of
mentioned MCFG IDs along with custom pci_ops structure and initialization call.
As an example, the last patch presents quirk handling mechanism usage for
ThunderX PEM driver.
v4 -> v5
- rebase against v4.8-rc1
- rework to exact MCFG OEM ID, TABLE ID, rev match
- use memcmp instead of strncmp
- no substring match
- fix typos and dmesg message
Tomasz Nowicki (5):
PCI: Embed pci_ecam_ops in pci_config_window structure
PCI/ACPI: Move ACPI ECAM mapping to generic MCFG driver
PCI: Check platform specific ECAM quirks
ARM64/PCI: Start using quirks handling for ACPI based PCI host
controller
PCI: thunder-pem: Support quirky configuration space access for ACPI
based PCI host controller
arch/arm64/kernel/pci.c | 42 +----------------
drivers/acpi/pci_mcfg.c | 40 ++++++++++++++++
drivers/pci/ecam.c | 6 +--
drivers/pci/host/Makefile | 1 +
drivers/pci/host/mcfg-quirks.c | 93 ++++++++++++++++++++++++++++++++++++
drivers/pci/host/mcfg-quirks.h | 24 ++++++++++
drivers/pci/host/pci-thunder-pem.c | 96 ++++++++++++++++++++++++++++++++------
include/linux/pci-acpi.h | 5 ++
include/linux/pci-ecam.h | 2 +-
9 files changed, 252 insertions(+), 57 deletions(-)
create mode 100644 drivers/pci/host/mcfg-quirks.c
create mode 100644 drivers/pci/host/mcfg-quirks.h
--
1.9.1
FWTS 16.08.01 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.08.01.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts
-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.08.
01
= New Features =
* acpi: nfit: add ACPI NFIT test
* lib: acpi: add support for MPST
* acpi: mpst: add ACPI MPST test
* lib: acpi: add support for PMTT
* acpi: pmtt: add ACPI PMTT test
* ACPICA: Update to version 20160729
= Fixed Bugs =
* fwts: update .gitignore for files generated by "make check"
* acpi: madt: fix memory leak on return paths
* acpi: pmtt: fix incorrect assignment on passed
* acpi: dmar: fix portability warning from cppcheck on void * cast
* acpi: dbg2: remove alloca(), replace with variable length array
* acpi: madt: reduce scope of variable 'listint'
* acpica: fwts_iasl_interface: reduce scope of variable 'i'
* lib: fwts_smbios: reduce scope of variable 'mapped_entry'
* lib: fwts_klog: reduce scope of variable 'old'
* lib: fwts_iasl: reduce scope of variable 'ret'
* lib: fwts_cpu: fix missing { } on an if statement
* devicetree: dt_sysinfo: reduce scope of variables 'model_buf' and
'compat_buf'
* cpu: cpufreq: reduce scope of variable 'i'
* lib: fwts_smbios: fix portability warning from cppcheck on void * cast
* lib: fwts_alloc: fix portability warnings from cppcheck on void *
arithmetic
* efi_runtime: call kfree directly instead of inline wrapper
* efi_runtime: add datasize return when getting the EFI_BUFFER_TOO_SMALL
* efi_runtime: fix memory leak of capsulecaps function
* efi_runtime: clean up some comments and unused code
* efi_runtime: add chceking the len for reading userspace memory
* efi_runtime: add checking variable_name input
* acpi/nfit: Fix endless loop on broken NFIT tables
* acpi: bert: do not fail if BERT error region raw_data_length is zero
* acpi: nfit: change %x to marco PRIx32 for portability
* auto-packager: mkpackage.sh: remove wily
* acpi: pcct: fix incorrect printing length for PRIx64
* acpica: rename vsnprintf and sprintf in utprint.c to avoid name clash
conflicts
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.08.01-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
V10: https://lkml.org/lkml/2016/7/26/
Drop the "readq" patch.
Rebase to latest Linux 4.7.
V9: https://lkml.org/lkml/2016/7/25/345
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (8):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/Kconfig | 5 +
drivers/acpi/Makefile | 1 +
drivers/acpi/arm64/Kconfig | 5 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/acpi_gtdt.c | 309 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 225 +++++++++++++++++--------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
11 files changed, 518 insertions(+), 71 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/acpi_gtdt.c
--
2.5.5
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This commit provides APEI arch-specific bits for aarch64
Meanwhile,
(1)add a new subfunction "hest_ia32_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
(2)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(3)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
Changelog:
v12:https://lkml.org/lkml/2016/7/29/
Fix a comment problem(redundant "with")
Rebase to 4.7.0-g680eee2
v11:https://lkml.org/lkml/2016/7/27/427
Rebase to v4.7-0e06f5c0
v10:https://lkml.org/lkml/2016/4/14
Fix the Alphabetical order problem in arch/arm64/Kconfig
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 16 +++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 18 +++++++++++++++---
4 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 9f8b99e..3268299 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -50,6 +50,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 5420cb0..7cdf681 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,8 +111,21 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't up with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#ifdef CONFIG_ACPI_NUMA
int arm64_acpi_numa_init(void);
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..792a0d9 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
+}
+
+static inline int __init hest_ia32_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
}
struct ghes_arr {
@@ -232,8 +243,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia32_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This patch provides APEI arch-specific bits for aarch64
Meanwhile,
(1)add a new subfunction "hest_ia32_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
(2)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(3)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
Changelog:
v13:https://lkml.org/lkml/2016/8/10/
Fix a comment problem(add a "end").
Add a comment for the definition of acpi_disable_cmcff.
Rebase to 4.8.0-rc1-g372734a
v12:https://lkml.org/lkml/2016/7/29/97
Fix a comment problem(redundant "with").
Rebase to 4.7.0-g680eee2.
v11:https://lkml.org/lkml/2016/7/27/427
Rebase to v4.7-0e06f5c0.
v10:https://lkml.org/lkml/2016/4/14
Fix the Alphabetical order problem in arch/arm64/Kconfig.
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h.
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 22 +++++++++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 18 +++++++++++++++---
4 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index bc3f00f..385cf13 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -51,6 +51,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 5420cb0..f435967 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,8 +111,27 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+/*
+ * acpi_disable_cmcff is used in drivers/acpi/apei/hest.c for disabling
+ * IA-32 Architecture Corrected Machine Checkx(cmc) FIRMWARE_FIRST mode by
+ * boot parameter(acpi=nocmcff). But we don't have this IA-32 specific
+ * feature on ARM64, this definition is only for compatibility.
+ */
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't end up with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#ifdef CONFIG_ACPI_NUMA
int arm64_acpi_numa_init(void);
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..792a0d9 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
+}
+
+static inline int __init hest_ia32_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
}
struct ghes_arr {
@@ -232,8 +243,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia32_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code;
4. use readq to get 64-bit CNTVCT.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
V9: https://lkml.org/lkml/2016/7/25/
Improve pr_err message in acpi gtdt driver.
Update Commit message for 7/9
shorten the irq mapping function name
Improve GTDT driver for memory-mapped timer
v8: https://lkml.org/lkml/2016/7/19/660
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (9):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: use readq to get 64-bit CNTVCT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/Kconfig | 5 +
drivers/acpi/Makefile | 1 +
drivers/acpi/arm64/Kconfig | 5 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/acpi_gtdt.c | 309 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 233 +++++++++++++++++---------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
11 files changed, 519 insertions(+), 78 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/acpi_gtdt.c
--
2.5.5
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This commit provides APEI arch-specific bits for aarch64
Meanwhile,
(1)add a new subfunction "hest_ia32_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
(2)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(3)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
Changelog:
v11:https://lkml.org/lkml/2016/7
Rebase to v4.7-0e06f5c0
v10:https://lkml.org/lkml/2016/4/14
Fix the Alphabetical order problem in arch/arm64/Kconfig
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 16 +++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 18 +++++++++++++++---
4 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 20d5a60..a301765 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -49,6 +49,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 5420cb0..d3d02dc 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,8 +111,21 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't up with with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#ifdef CONFIG_ACPI_NUMA
int arm64_acpi_numa_init(void);
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..792a0d9 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
+}
+
+static inline int __init hest_ia32_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
}
struct ghes_arr {
@@ -232,8 +243,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia32_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
FWTS 16.07.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.07.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.07.00
= New Features =
* acpi: method: add _FIT test
* acpi: pcct: add ACPI PCCT test
* opal/prd_info: Add OPAL Processor Recovery Diagnostics
* olog: olog.json: Add OPAL skiboot errors for olog scan
* Add klog checking for errors from drivers/acpi/tables.c
* klog: data.json: Add klog checking for kernel NUMA errors from
drivers/acpi/numa.c
* klog: data.json: Add klog checking for kernel EC errors from
drivers/acpi/ec.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/acpi_cmos_rtc.c
* klog: data.json: Add klog checking for errors from drivers/acpi/nfit.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/pci_root.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/pci_mcfg.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/cppc_acpi.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/battery.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/processor_idle.c
* klog: data.json: Add klog checking for errors from drivers/acpi/sleep.c
* klog: data.json: Add klog checking for errors from
drivers/acpi/acpica/rsmisc.c
* klog: data.json: Add klog checking for errors from drivers/acpi/evged.c
* efi: enable module loading to load legacy or new efi driver
* acpi: madt: Add support for ACPI 6.0a
* acpi: madt: Add support for ACPI 6.1
* uefi: update reset type to uefi 2.6
* acpi: dbg2: Add missing debug port types
= Fixed Bugs =
* bios: mtrr: check MTRR default memory type
* lib: acpi: fix a typo in fwts_acpi.h
* utilities: kernelscan: Add in missing [ ] brackets tokenisation
* acpi: rsdp: don't fail if RSDT and XSDT are both defined and different
* lib: fwts_alloc: make allocator more robust
* lib: fwts_pipeio: don't report failure on freopen failure
* doc: update contributors and date to the manual
* lib: olog: Improve message when sudo usage may help
* opal/prd_info: Improve message when libfdt not installed
* lib: framework: Improve message for results log file handling
* uefi: add the header for using efi runtime service
* efi_runtime: reuse the in-kernel guid structure
* efi_runtime: reuse the in-kernel time structure
* efi_runtime: reuse the in-kernel capsule header structure
* uefi: remove the enum of reset type
* efi_runtime: naming convention modification
* efi_runtime: fix the style problems
* debian/control: Fix incomplete dependencies for Linux headers (LP:
#1606480)
* acpi: madt: fix build fail for i386
* acpi: madt: Use 20 as the GIC ITS node length
* devicetree/dt_sysinfo: clean up logic in stringlist_contains_last
* devicetree/dt_sysinfo: fix reference platform compatible vs. model
check
* devicetree/dt_sysinfo: Add firestone model
* fwts: Fix madt testing with broken MADT entries
* fwts: Update .gitignore files
* fwts/madt: Add address of subtable to messages
* fwts/madt: Implement I/O APIC and I/O SAPIC value comparison test
* fwts/madt: Remove TODO for x2apic > 255 check
* fwts/madt: Add processor UID checking to madt tests
* fwts_cpuinfo_x86: check for null pointers when using
* lib: fwts_cpu: return info struct only when requested CPU is found
* lib: fwts_cpu: query info from the first online CPU
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.07.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
Cheers,
Ivan
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer:
1. Move some enums and marcos to header file;
2. Add a new enum for spi type;
3. Improve printk relevant code;
4. use readq to get 64-bit CNTVCT.
(2)Introduce ACPI GTDT parser: drivers/acpi/arm64/acpi_gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v8: https://lkml.org/lkml/2016/7/
Improve "pr_fmt(fmt)" definition: add "ACPI" in front of "GTDT",
and also improve printk message.
Simplify is_timer_block and is_watchdog.
Merge acpi_gtdt_desc_init and gtdt_arch_timer_init into acpi_gtdt_init();
Delete __init in include/linux/acpi.h for GTDT API
Make ARM64 select GTDT.
Delete "#include <linux/module.h>" from acpi_gtdt.c
Simplify GT block parse code.
v7: https://lkml.org/lkml/2016/7/13/769
Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (9):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
clocksource/drivers/arm_arch_timer: use readq to get 64-bit CNTVCT
acpi/arm64: Add GTDT table parse driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
arch/arm64/Kconfig | 1 +
drivers/acpi/Kconfig | 5 +
drivers/acpi/Makefile | 1 +
drivers/acpi/arm64/Kconfig | 5 +
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/acpi_gtdt.c | 312 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 2 +-
drivers/clocksource/arm_arch_timer.c | 233 +++++++++++++++++---------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
11 files changed, 522 insertions(+), 78 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/acpi_gtdt.c
--
2.5.5
Quirk handling relies on an idea of matching MCFG OEM ID, TABLE ID and
revision (the ones from standard header of MCFG table).
Static array is used to keep quirk entries. Each entry consist of
metioned MCFG IDs along with custom pci_ops structure and initialization call.
As an example, last patch presents quirk handling mechanism usage for
ThunderX PEM driver.
Tomasz Nowicki (5):
PCI: Embed pci_ecam_ops in pci_config_window structure
PCI/ACPI: Move ACPI ECAM mapping to generic MCFG driver
PCI: Check platform specific ECAM quirks
ARM64/PCI: Start using quirks handling for ACPI based PCI host
controller
PCI: thunder: Add ThunderX PEM MCFG quirk to the list
arch/arm64/kernel/pci.c | 42 +----------------
drivers/acpi/pci_mcfg.c | 40 ++++++++++++++++
drivers/pci/ecam.c | 6 +--
drivers/pci/host/Makefile | 1 +
drivers/pci/host/mcfg-quirks.c | 95 +++++++++++++++++++++++++++++++++++++
drivers/pci/host/mcfg-quirks.h | 24 ++++++++++
drivers/pci/host/pci-thunder-pem.c | 96 ++++++++++++++++++++++++++++++++------
include/linux/pci-acpi.h | 5 ++
include/linux/pci-ecam.h | 2 +-
9 files changed, 254 insertions(+), 57 deletions(-)
create mode 100644 drivers/pci/host/mcfg-quirks.c
create mode 100644 drivers/pci/host/mcfg-quirks.h
--
1.9.1
This series bases on pending ACPI PCI support for ARM64:
https://lkml.org/lkml/2016/5/30/468
Quirk handling relies on an idea of matching MCFG OEM ID and OEM revision
(the ones from standard header of MCFG table). Linker section is used
so that quirks can be registered using special macro (see patches) and
kept self contained.
As an example, last patch presents above mechanism usage for ThunderX PEM driver.
Tomasz Nowicki (3):
pci, acpi: Match PCI config space accessors against platfrom specific
ECAM quirks.
arm64, pci: Start using quirks handling for ACPI based PCI host
controller.
pci, pci-thunder-pem: Add ACPI support for ThunderX PEM.
arch/arm64/kernel/pci.c | 7 +-
drivers/acpi/pci_mcfg.c | 32 +++++++++
drivers/pci/host/pci-thunder-pem.c | 132 +++++++++++++++++++++++++++++++++----
include/asm-generic/vmlinux.lds.h | 7 ++
include/linux/pci-acpi.h | 19 ++++++
5 files changed, 181 insertions(+), 16 deletions(-)
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer
1. Move some enums and marcos to header file
2. Add a new enum for spi type.
3. Improve printk relevant code
(2)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
Also add add the ARM64-specific ACPI Support maintainers in MAINTAINERS.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v7: Move the GTDT driver to drivers/acpi/arm64
Add add the ARM64-specific ACPI Support maintainers in MAINTAINERS
Merge 3 patches of GTDT parser driver.
Fix the for_each_platform_timer bug.
v6: https://lkml.org/lkml/2016/6/29/580
split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (9):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi/arm64: Add GTDT table parse driver
MAINTAINERS / ACPI: add the ARM64-specific ACPI Support maintainers
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi/arm64: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
MAINTAINERS | 8 +
drivers/acpi/Kconfig | 5 +
drivers/acpi/Makefile | 1 +
drivers/acpi/arm64/Kconfig | 15 ++
drivers/acpi/arm64/Makefile | 1 +
drivers/acpi/arm64/acpi_gtdt.c | 343 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 1 +
drivers/clocksource/arm_arch_timer.c | 228 ++++++++++++++++-------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
11 files changed, 575 insertions(+), 67 deletions(-)
create mode 100644 drivers/acpi/arm64/Kconfig
create mode 100644 drivers/acpi/arm64/Makefile
create mode 100644 drivers/acpi/arm64/acpi_gtdt.c
--
2.5.5
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Try to fix an issue about min and max timeout validity check:
when max_hw_heartbeat_ms is defined, this check should be skipped.
(2)Use max_hw_heartbeat_ms instead of max_timeout in SBSA watchdog.
(3)Set WDOG_HW_RUNNING, when SBSA watchdog is already running before
it's initialized.
Changelog:
v1: The first formal upstreaming version
RFC: https://lkml.org/lkml/2016/5/3/145
Pratyush Anand (3):
watchdog: skip min and max timeout validity check when
max_hw_heartbeat_ms is defined
sbsa_gwdt: Use max_hw_heartbeat_ms instead of max_timeout
sbsa_gwdt: Set WDOG_HW_RUNNING, when watchdog is already running.
drivers/watchdog/sbsa_gwdt.c | 6 ++++--
drivers/watchdog/watchdog_core.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
--
2.5.5
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer
1. Move some enums and marcos to header file
2. Add a new enum for spi type.
3. Improve printk relevant code
(2)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
Changelog:
v6: split the GTDT driver to 4 parts: basic, arch_timer, memory-mapped timer,
and SBSA Generic Watchdog timer
Improve driver by suggestions and example code from Daniel Lezcano
v5: https://lkml.org/lkml/2016/5/24/356
Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (10):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi: Add some basic struct and functions in GTDT driver
acpi: Add arch_timer support in GTDT table parse driver
acpi: Add GTDT driver to kernel build system
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
acpi: Add memory-mapped timer support in GTDT driver
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
acpi: Add SBSA Generic Watchdog support in GTDT driver
drivers/acpi/Kconfig | 9 +
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_gtdt.c | 326 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 1 +
drivers/clocksource/arm_arch_timer.c | 227 +++++++++++++++++-------
drivers/watchdog/Kconfig | 1 +
include/clocksource/arm_arch_timer.h | 32 ++++
include/linux/acpi.h | 7 +
8 files changed, 538 insertions(+), 66 deletions(-)
create mode 100644 drivers/acpi/acpi_gtdt.c
--
2.5.5
FWTS 16.06.00 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.06.00.tar.gz
PPA:
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes:
https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.06.00
= New Features =
* acpi: method: acpi 6.0 adds USB-C Connection to _UPC
* acpi: method: add _WPP method test (introduced in ACPI 6.1)
* acpi: method: add _WPC method test (introduced in ACPI 6.1)
* ACPICA: Update to version 20160527
* acpi: hest: Add GHESv2 checking (LP: #1587624)
* lib: acpi: Add support for HEST GHESv2
= Fixed Bugs =
* lib: replace hardcoded size=1 in calloc by sizeof(char)
* dmi: dmicheck: remove chassis check with acpi pm_profile
* acpi: method: update _GCP test according to ACPI 6.1
* acpi: einj: erst: update serialization action for ACPI 6.1
* dmi: dmicheck: fix typo: SBMBIOS should be SMBIOS
* Rename fwts_log_*_verbatum to fwts_log_*_verbatim
* lib: fwts_ipmi: don't close a -ve fd on error exit return path
* lib: fwts_ipmi: remove redundant for loop
* lib: fwts_devicetree: fix memory leak on data
* devicetree: dt_base: fix resource leak on error exit paths
* lib: fwts_arch: set len to 1 to ensure space for '\0'
* lib: fwts_args: clean up some scan-build warnings
* devicetree/dt_sysinfo: report FWTS_ERROR on non-null termimated
property
* src/utilities/kernelscan: fix parsing of escaped C strings
* lib: fwts_olog.h: fix include guard
* devicetree/dt_sysinfo: Add OPAL reference compatible checks
* efi_runtime: changing naming convention without p for pointer
* lib: fwts_uefi: update uefi status codes to UEFI 2.6
* uefirtvariable: modify getnextvariablename test for
!VariableNameSize smaller than 2 (LP: #1593597)
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.06.00-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
Cheers,
Ivan
This series bases on pending ACPI PCI support for ARM64:
https://lkml.org/lkml/2016/6/10/706
Quirk handling relies on an idea of matching MCFG OEM ID and OEM TABLE ID
(the ones from standard header of MCFG table). Linker section is used
so that quirks can be registered using special macro (see patches) and
kept self contained.
v1 -> v2
- use oem_id and oem_table_id to replace oem_id and oem_revision to make
a difference between different platforms.
- change pci_cfg_fixup __mcfg_fixup_##system##dom##bus to
__mcfg_fixup_##oem_id##oem_table_id##dom##bus. With oem_id and oem_table_id
is to ensure that the object is unique.
Tomasz Nowicki (2):
ACPI/PCI: Match PCI config space accessors against platfrom specific
ECAM quirks
ARM64/PCI: Start using quirks handling for ACPI based PCI host
controller
arch/arm64/kernel/pci.c | 7 ++++---
drivers/acpi/pci_mcfg.c | 41 ++++++++++++++++++++++++++++++++++++---
include/asm-generic/vmlinux.lds.h | 7 +++++++
include/linux/pci-acpi.h | 20 +++++++++++++++++++
4 files changed, 69 insertions(+), 6 deletions(-)
--
1.9.1
This is a resend only: Ping? Last ping was 26 May; there has been zero
response since then. Already have one ACK from Lorenzo; another from an
arm64 maintainer would be really helpful.
The ACPI 6.1 specification was recently released at the end of January
2016, but the arm64 kernel documentation for the use of ACPI was written
for the 5.1 version of the spec. There were significant additions to the
spec that had not yet been mentioned -- for example, the 6.0 mechanisms
added to make it easier to define processors and low power idle states,
as well as the 6.1 addition allowing regular interrupts (not just from
GPIO) be used to signal ACPI general purpose events.
This patch reflects going back through and examining the specs in detail
and updating content appropriately. Whilst there, a few odds and ends of
typos were caught as well. This brings the documentation up to date with
ACPI 6.1 for arm64.
Changes for v5:
-- Miscellaneous typos and corrections (Lorenzo Pieralisi)
-- Add linux-acpi@ ML to the distribution list (Alexey Klimov)
-- Corrections to CPPC information (Alexey Klimov)
-- ACK from Lorenzo Pieralisi
-- Updated bibliographic info (Al Stone)
Changes for v4:
-- Clarify that IORT can sometimes be optional (Jon Masters).
-- Remove "Use as needed" descriptions of ACPI objects; they provide
no substantive information and doing so simplifies maintenance of
this document over time. These have been replaced with a simpler
notice that states that unless otherwise noted, do what the ACPI
specification says is needed.
-- Corrected the _OSI object usage recommendation; it described kernel
behavior that does not exist (Al Stone).
Changes for v3:
-- Clarify use of _LPI/_RDI (Vikas Sajjan)
-- Whitespace cleanup as pointed out by checkpatch
Changes for v2:
-- Clean up white space (Harb Abdulhahmid)
-- Clarification on _CCA usage (Harb Abdulhamid)
-- IORT moved to required from recommended (Hanjun Guo)
-- Clarify IORT description (Hanjun Guo)
Al Stone (1):
ARM64: ACPI: Update documentation for latest specification version
Documentation/arm64/acpi_object_usage.txt | 343 ++++++++++++++++--------------
Documentation/arm64/arm-acpi.txt | 40 ++--
2 files changed, 213 insertions(+), 170 deletions(-)
--
2.5.5
This is a resend only: Ping? Last ping was 26 May; there has been zero
response since then. Already have one ACK from Lorenzo; another from an
arm64 maintainer would be really helpful.
The ACPI 6.1 specification was recently released at the end of January
2016, but the arm64 kernel documentation for the use of ACPI was written
for the 5.1 version of the spec. There were significant additions to the
spec that had not yet been mentioned -- for example, the 6.0 mechanisms
added to make it easier to define processors and low power idle states,
as well as the 6.1 addition allowing regular interrupts (not just from
GPIO) be used to signal ACPI general purpose events.
This patch reflects going back through and examining the specs in detail
and updating content appropriately. Whilst there, a few odds and ends of
typos were caught as well. This brings the documentation up to date with
ACPI 6.1 for arm64.
Changes for v5:
-- Miscellaneous typos and corrections (Lorenzo Pieralisi)
-- Add linux-acpi@ ML to the distribution list (Alexey Klimov)
-- Corrections to CPPC information (Alexey Klimov)
-- ACK from Lorenzo Pieralisi
-- Updated bibliographic info (Al Stone)
Changes for v4:
-- Clarify that IORT can sometimes be optional (Jon Masters).
-- Remove "Use as needed" descriptions of ACPI objects; they provide
no substantive information and doing so simplifies maintenance of
this document over time. These have been replaced with a simpler
notice that states that unless otherwise noted, do what the ACPI
specification says is needed.
-- Corrected the _OSI object usage recommendation; it described kernel
behavior that does not exist (Al Stone).
Changes for v3:
-- Clarify use of _LPI/_RDI (Vikas Sajjan)
-- Whitespace cleanup as pointed out by checkpatch
Changes for v2:
-- Clean up white space (Harb Abdulhahmid)
-- Clarification on _CCA usage (Harb Abdulhamid)
-- IORT moved to required from recommended (Hanjun Guo)
-- Clarify IORT description (Hanjun Guo)
Al Stone (1):
ARM64: ACPI: Update documentation for latest specification version
Documentation/arm64/acpi_object_usage.txt | 343 ++++++++++++++++--------------
Documentation/arm64/arm-acpi.txt | 40 ++--
2 files changed, 213 insertions(+), 170 deletions(-)
--
2.5.5
>From the functionality point of view this series may be split into the
following logic parts:
1. Export ECAM API and add parent device to pci_config_window
2. Add IO resources handling to PCI core code
3. Support for generic domain assignment based on ACPI
4. New MCFG driver
5. Implement ARM64 ACPI based PCI host controller driver under arch/arm64/
Patches has been built on top of 4.7-rc1 and can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v8)
This has been tested on Cavium ThunderX server. Any help in reviewing and
testing is very appreciated.
v7 -> v8
- move code from drivers/acpi/pci_root_generic.c to arch/arm64/kernel/pci.c
- minor changes around domain assignment
- pci_mcfg.c improvements for parsing MCFG tables and lookup its entries
v6 -> v7
- drop quirks handling
- changes for ACPI companion and domain number assignment approach
- implement arch pcibios_{add|remove}_bus and call acpi_pci_{add|remove}_bus from there
- cleanups around nomenclature
- use resources oriented API for ECAM
- fix for based address calculation before mapping ECAM region
- remove useless lock for MCFG lookup
- move MCFG stuff to separated file pci_mcfg.c
- drop MCFG entries caching
- rebase against 4.6-rc7
v5 -> v6
- drop idea of x86 MMCONFIG code refactoring
- integrate JC's patches which introduce new ECAM API:
https://lkml.org/lkml/2016/4/11/907
git: https://github.com/jchandra-brcm/linux/ (arm64-acpi-pci-v3)
- integrate Sinan's fix for releasing IO resources, see patch [06/13]
- added ACPI support for ThunderX ECAM and PEM drivers
- rebase against 4.6-rc2
v4 -> v5
- drop MCFG refactoring group patches 1-6 from series v4 and integrate Jayachandran's patch
https://patchwork.ozlabs.org/patch/575525/
- rewrite PCI legacy IRQs allocation
- squash two patches 11 and 12 from series v4, fixed bisection issue
- changelog improvements
- rebase against 4.5-rc3
v3 -> v4
- drop Jiang's fix http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04318.html
- add Lorenzo's fix patch 19/24
- ACPI PCI bus domain number assigning cleanup
- change resource management, we now claim and reassign resources
- improvements for applying quirks
- drop Matthew's http://www.spinics.net/lists/linux-pci/msg45950.html dependency
- rebase against 4.5-rc1
v2 -> v3
- fix legacy IRQ assigning and IO ports registration
- remove reference to arch specific companion device for ia64
- move ACPI PCI host controller driver to pci_root.c
- drop generic domain assignment for x86 and ia64 as I am not
able to run all necessary test variants
- drop patch which cleaned legacy IRQ assignment since it belongs to
Mathew's series:
https://patchwork.ozlabs.org/patch/557504/
- extend MCFG quirk code
- rebase against 4.4
v1 -> v2
- move non-arch specific piece of code to dirver/acpi/ directory
- fix IO resource handling
- introduce PCI config accessors quirks matching
- moved ACPI_COMPANION_SET to generic code
v1 - https://lkml.org/lkml/2015/10/27/504
v2 - https://lkml.org/lkml/2015/12/16/246
v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.html
v4 - https://lkml.org/lkml/2016/2/4/646
v5 - https://lkml.org/lkml/2016/2/16/426
v6 - https://lkml.org/lkml/2016/4/15/594
Jayachandran C (2):
PCI: ecam: move ecam.h to linux/include/pci-ecam.h
PCI: ecam: Add parent device field to pci_config_window
Tomasz Nowicki (7):
pci: Add new function to unmap IO resources.
acpi, pci: Support IO resources when parsing PCI host bridge
resources.
pci, acpi: add acpi hook to assign domain number.
arm64, pci, acpi: ACPI support for legacy IRQs parsing and
consolidation with DT code.
acpi: Add generic MCFG table handling
arm64, pci, acpi: Provide ACPI-specific prerequisites for PCI bus
enumeration.
pci, acpi: ARM64 support for ACPI based generic PCI host controller
arch/arm64/Kconfig | 2 +
arch/arm64/kernel/pci.c | 143 ++++++++++++++++++++++++++++++++++--
drivers/acpi/Kconfig | 3 +
drivers/acpi/Makefile | 1 +
drivers/acpi/pci_mcfg.c | 94 ++++++++++++++++++++++++
drivers/acpi/pci_root.c | 39 ++++++++++
drivers/pci/ecam.c | 6 +-
drivers/pci/ecam.h | 67 -----------------
drivers/pci/host/pci-host-common.c | 3 +-
drivers/pci/host/pci-host-generic.c | 3 +-
drivers/pci/host/pci-thunder-ecam.c | 3 +-
drivers/pci/host/pci-thunder-pem.c | 6 +-
drivers/pci/pci.c | 29 +++++++-
include/linux/pci-acpi.h | 2 +
include/linux/pci-ecam.h | 67 +++++++++++++++++
include/linux/pci.h | 9 ++-
16 files changed, 387 insertions(+), 90 deletions(-)
create mode 100644 drivers/acpi/pci_mcfg.c
delete mode 100644 drivers/pci/ecam.h
create mode 100644 include/linux/pci-ecam.h
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Preparation for adding GTDT support in arm_arch_timer
1. Move some enums and marcos to header file
2. Add a new enum for spi type.
3. Improve printk relevant code
(2)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arm_arch_timer
(4)Add GTDT support for ARM memory-mapped timer
This patchset has been tested on the following platforms:
(1)ARM Foundation v8 model
Changelog:
v5: Sorting out all patches, simplify the API of GTDT driver:
GTDT driver just fills the data struct for arm_arch_timer driver.
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (6):
clocksource/drivers/arm_arch_timer: Move enums and defines to header
file
clocksource/drivers/arm_arch_timer: Add a new enum for spi type
clocksource/drivers/arm_arch_timer: Improve printk relevant code
acpi: Add GTDT table parse driver into ACPI driver
clocksource/drivers/arm_arch_timer: Simplify ACPI support code.
clocksource/drivers/arm_arch_timer: Add GTDT support for memory-mapped
timer
drivers/acpi/Kconfig | 9 +
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_gtdt.c | 309 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 1 +
drivers/clocksource/arm_arch_timer.c | 233 ++++++++++++++++++--------
include/clocksource/arm_arch_timer.h | 33 ++++
include/linux/acpi.h | 6 +
7 files changed, 522 insertions(+), 70 deletions(-)
create mode 100644 drivers/acpi/acpi_gtdt.c
--
2.5.5
The ACPI 6.1 specification was recently released at the end of January
2016, but the arm64 kernel documentation for the use of ACPI was written
for the 5.1 version of the spec. There were significant additions to the
spec that had not yet been mentioned -- for example, the 6.0 mechanisms
added to make it easier to define processors and low power idle states,
as well as the 6.1 addition allowing regular interrupts (not just from
GPIO) be used to signal ACPI general purpose events.
This patch reflects going back through and examining the specs in detail
and updating content appropriately. Whilst there, a few odds and ends of
typos were caught as well. This brings the documentation up to date with
ACPI 6.1 for arm64.
Changes for v5:
-- Miscellaneous typos and corrections (Lorenzo Pieralisi)
-- Add linux-acpi@ ML to the distribution list (Alexey Klimov)
-- Corrections to CPPC information (Alexey Klimov)
-- ACK from Lorenzo Pieralisi
-- Updated bibliographic info (Al Stone)
Changes for v4:
-- Clarify that IORT can sometimes be optional (Jon Masters).
-- Remove "Use as needed" descriptions of ACPI objects; they provide
no substantive information and doing so simplifies maintenance of
this document over time. These have been replaced with a simpler
notice that states that unless otherwise noted, do what the ACPI
specification says is needed.
-- Corrected the _OSI object usage recommendation; it described kernel
behavior that does not exist (Al Stone).
Changes for v3:
-- Clarify use of _LPI/_RDI (Vikas Sajjan)
-- Whitespace cleanup as pointed out by checkpatch
Changes for v2:
-- Clean up white space (Harb Abdulhahmid)
-- Clarification on _CCA usage (Harb Abdulhamid)
-- IORT moved to required from recommended (Hanjun Guo)
-- Clarify IORT description (Hanjun Guo)
Al Stone (1):
ARM64: ACPI: Update documentation for latest specification version
Documentation/arm64/acpi_object_usage.txt | 343 ++++++++++++++++--------------
Documentation/arm64/arm-acpi.txt | 40 ++--
2 files changed, 213 insertions(+), 170 deletions(-)
--
2.5.5
>From the functionality point of view this series may be split into the
following logic parts:
1. New ECAM API and update for users of the pci-host-common API
2. Necessary fixes as the preparation for using driver on ARM64.
3. Use new MCFG interface and implement generic ACPI based PCI host controller driver.
4. Enable above driver on ARM64
Patches has been built on top of 4.6-rc7 and can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v7)
This has been tested on Cavium ThunderX server. Any help in reviewing and
testing is very appreciated.
v6 -> v7
- drop quirks handling
- changes for ACPI companion and domain number assignment approach
- implement arch pcibios_{add|remove}_bus and call acpi_pci_{add|remove}_bus from there
- cleanups around nomenclature
- use resources oriented API for ECAM
- fix for based address calculation before mapping ECAM region
- remove useless lock for MCFG lookup
- move MCFG stuff to separated file pci_mcfg.c
- drop MCFG entries caching
- rebase against 4.6-rc7
v5 -> v6
- drop idea of x86 MMCONFIG code refactoring
- integrate JC's patches which introduce new ECAM API:
https://lkml.org/lkml/2016/4/11/907
git: https://github.com/jchandra-brcm/linux/ (arm64-acpi-pci-v3)
- integrate Sinan's fix for releasing IO resources, see patch [06/13]
- added ACPI support for ThunderX ECAM and PEM drivers
- rebase against 4.6-rc2
v4 -> v5
- drop MCFG refactoring group patches 1-6 from series v4 and integrate Jayachandran's patch
https://patchwork.ozlabs.org/patch/575525/
- rewrite PCI legacy IRQs allocation
- squash two patches 11 and 12 from series v4, fixed bisection issue
- changelog improvements
- rebase against 4.5-rc3
v3 -> v4
- drop Jiang's fix http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04318.html
- add Lorenzo's fix patch 19/24
- ACPI PCI bus domain number assigning cleanup
- change resource management, we now claim and reassign resources
- improvements for applying quirks
- drop Matthew's http://www.spinics.net/lists/linux-pci/msg45950.html dependency
- rebase against 4.5-rc1
v2 -> v3
- fix legacy IRQ assigning and IO ports registration
- remove reference to arch specific companion device for ia64
- move ACPI PCI host controller driver to pci_root.c
- drop generic domain assignment for x86 and ia64 as I am not
able to run all necessary test variants
- drop patch which cleaned legacy IRQ assignment since it belongs to
Mathew's series:
https://patchwork.ozlabs.org/patch/557504/
- extend MCFG quirk code
- rebase against 4.4
v1 -> v2
- move non-arch specific piece of code to dirver/acpi/ directory
- fix IO resource handling
- introduce PCI config accessors quirks matching
- moved ACPI_COMPANION_SET to generic code
v1 - https://lkml.org/lkml/2015/10/27/504
v2 - https://lkml.org/lkml/2015/12/16/246
v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.html
v4 - https://lkml.org/lkml/2016/2/4/646
v5 - https://lkml.org/lkml/2016/2/16/426
v6 - https://lkml.org/lkml/2016/4/15/594
Jayachandran C (2):
PCI: Provide common functions for ECAM mapping
PCI: generic, thunder: update to use generic ECAM API
Tomasz Nowicki (9):
pci, of: Move the PCI I/O space management to PCI core code.
pci: Add new function to unmap IO resources.
acpi, pci: Support IO resources when parsing PCI host bridge
resources.
pci, acpi: Provide a way to assign bus domain number.
pci, acpi: Handle ACPI companion assignment.
pci, acpi: Support for ACPI based generic PCI host controller
arm64, pci, acpi: ACPI support for legacy IRQs parsing and
consolidation with DT code.
arm64, pci, acpi: Provide ACPI-specific prerequisites for PCI bus
enumeration.
arm64, pci, acpi: Start using ACPI based PCI host controller driver
for ARM64.
arch/arm64/Kconfig | 1 +
arch/arm64/kernel/pci.c | 34 +++-----
drivers/acpi/Kconfig | 8 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/pci_mcfg.c | 97 ++++++++++++++++++++++
drivers/acpi/pci_root.c | 33 ++++++++
drivers/acpi/pci_root_generic.c | 149 +++++++++++++++++++++++++++++++++
drivers/of/address.c | 116 +-------------------------
drivers/pci/Kconfig | 3 +
drivers/pci/Makefile | 2 +
drivers/pci/ecam.c | 161 ++++++++++++++++++++++++++++++++++++
drivers/pci/ecam.h | 72 ++++++++++++++++
drivers/pci/host/Kconfig | 1 +
drivers/pci/host/pci-host-common.c | 114 +++++++++++--------------
drivers/pci/host/pci-host-common.h | 47 -----------
drivers/pci/host/pci-host-generic.c | 52 +++---------
drivers/pci/host/pci-thunder-ecam.c | 39 ++-------
drivers/pci/host/pci-thunder-pem.c | 92 ++++++++++-----------
drivers/pci/pci.c | 150 ++++++++++++++++++++++++++++++++-
drivers/pci/probe.c | 2 +
include/linux/of_address.h | 9 --
include/linux/pci-acpi.h | 14 ++++
include/linux/pci.h | 11 ++-
23 files changed, 823 insertions(+), 385 deletions(-)
create mode 100644 drivers/acpi/pci_mcfg.c
create mode 100644 drivers/acpi/pci_root_generic.c
create mode 100644 drivers/pci/ecam.c
create mode 100644 drivers/pci/ecam.h
delete mode 100644 drivers/pci/host/pci-host-common.h
--
1.9.1
FWTS 16.05.01 is released.
It is available from:
Tar: http://fwts.ubuntu.com/release/fwts-V16.05.01.tar.gz
PPA: https://launchpad.net/~firmware-testing-team/+archive/ubuntu/ppa-fwts-stable
Release notes: https://wiki.ubuntu.com/FirmwareTestSuite/ReleaseNotes/16.05.01
= New Features =
* acpi: add MSCT table sanity check
* acpi: add EINJ table sanity check
* ACPICA: Update to version 20160318 (LP: #1559312)
* Introduce olog scan, to check OPAL msglog.
* Introduce IPMI BMC Info
* devicetree: add infrastructure for device-tree tests
* devicetree/dt_sysinfo: Add device tree system information tests
* devicetree/dt_base: Add base device-tree validity checks
* debian/control: change depends on libjson0-dev to libjson-c-dev
* auto-packager: mkpackage.sh: add yakkety and remove vivid
* debian/control: add back libjson0-dev for precise
= Fixed Bugs =
* cpufreq: skip frequency performance test if cpufreq_settable is false
* cpufreq: skip frequency claimed maximum test with intel_pstate
* Add .gitignore
* Add cppcheck static analysis checking script
* uefi: uefirtauthvar: capitalize macro getvar_buf_size
* cpufreq: make stat failure message a little more human friendly
* acpi: einj, msct: only build in these tests on ACPI enabled systems
* hpet: warn if HPET Device address not found in DSDT/SSDT
* kernelscan: speed up parser using hash lookup, add more print funcs
* kernelscan: remove need to pre-process with a CPP phase
* kernelscan.sh: remove -E and -P phases to parsing
* uefidump: dump the optional data for load option on boot device
* uefidump: dump the optional data for load option on driver device
* uefidump: add checking the resonable path list length for load option
* pipeio: Add fwts_pipe_open_rw
* pipeio: Add fwts_pipe_readwrite
* pipeio: Add fwts_pipe_close2 to cleanup from fwts_open_pipe_rw.
* acpi: spcr: add missing debug port types (LP: #1578433)
* debian/control: add libfdt-dev and device-tree-compiler
* configure.ac: update email address, use fwts-devel instead
* fwts: manual: update date, add new contributor, add dtc to SEE ALSO
* fwts: manual: ommitted Paul Menzel from the contributions list
* lib: fwts_args: handle cases to set optarg_handler for long options.
* acpi: dbg2: fix incorrect address size check with GAS struct
* data: klog.json: Fix typo in docking label text
* acpi: gtdt: fix buffer overrun comparison
* acpi: gtdt: fix buffer overrun comparison (for SBSA)
* acpi: bert: fix format specifiers for boot error region
* lib: fwts_olog: minor fwts coding style reformatting
* lib: fwts_olog: fix fclose on already closed files.
* lib: fwts_olog: fix memory leak on buffer on error exit path
* lib: fwts_olog: ensure buffer is '\0' terminated per read, minor cleanups
* lib: fwts_olog: avoid TOCTOU race on stat and fopen
* Revert "acpi: tpm2: add check for zero control area address (LP: #1506442)"
* apic: apicedge: fix parsing of /proc/interrupts (LP: #1575783)
* lib: fwts_pipeio: set *list to NULL on fwts_pipe_read error
* cpu: msr: do not check SYSENTER_* MSRs (LP: #1582005)
* fwts: lib: clean up static analysis warnings
* uefidump: clean up the unnecessary period
* pipeio: fix fwts_pipe_read return value when child produces no output
* pipeio: Fix error handling in fwts_pipe_exec
* pipeio: Rename fwts_pipe_open to fwts_pipe_open_ro, add fd as
output argument
* pci/aspm: Fix grammar in ASPM advice (LP: #1581988)
* bios: mtrr: fix cache type corner case at start of mtrr range
* bios: mtrr: fix cache type corner case at end of mtrr range
* bios: mtrr: redefine the end point of memory ranges
= Detail Changelog =
To check /usr/share/doc/fwts/changelog.Debian.gz or
fwts_16.05.01-0ubuntu1.debian.tar.gz from
https://launchpad.net/ubuntu/+source/fwts
--
Cheers,
Alex Hung
The PCI Routing Table (_PRT) for Juno does not specify the Interrupt
trigger type and polarity. In the absence of this information, the
kernel uses PCI default interrupt type (level triggered, active low)
which is incompatible with GICv2 compliant interrupt controller such
as on Juno.
Absence of interrupt type leads to errors such as following in kernel
boot log -
[ 1.353696] genirq: Setting trigger mode 8 for irq 9 failed (gic_set_type+0x0/0x5c)
[ 1.478286] genirq: Setting trigger mode 8 for irq 17 failed (gic_set_type+0x0/0x5c)
[ 1.563723] genirq: Setting trigger mode 8 for irq 18 failed (gic_set_type+0x0/0x5c)
Fix this issue by providing the correct information (level triggered,
active high) to the kernel by using the PCI Link device.
Signed-off-by: Punit Agrawal <punit.agrawal(a)arm.com>
---
Hi,
This patch to the OpenPlatformPkg for Juno ACPI tables fixes an issue
I reported earlier[0].
All feedback welcome.
Thanks,
Punit
[0] https://lists.linaro.org/pipermail/linaro-uefi/2016-April/001776.html
Platforms/ARM/Juno/AcpiTables/AcpiSsdtRootPci.asl | 60 +++++++++++++++++------
1 file changed, 44 insertions(+), 16 deletions(-)
diff --git a/Platforms/ARM/Juno/AcpiTables/AcpiSsdtRootPci.asl b/Platforms/ARM/Juno/AcpiTables/AcpiSsdtRootPci.asl
index 800d2cb..55b76d6 100644
--- a/Platforms/ARM/Juno/AcpiTables/AcpiSsdtRootPci.asl
+++ b/Platforms/ARM/Juno/AcpiTables/AcpiSsdtRootPci.asl
@@ -15,20 +15,43 @@
#include "ArmPlatform.h"
/*
- See Reference [1] 6.2.12
- "There are two ways that _PRT can be used. ...
- In the second model, the PCI interrupts are hardwired to specific interrupt
- inputs on the interrupt controller and are not configurable. In this case,
- the Source field in _PRT does not reference a device, but instead contains
- the value zero, and the Source Index field contains the global system
- interrupt to which the PCI interrupt is hardwired."
+ See ACPI 6.1 Section 6.2.13
+
+ There are two ways that _PRT can be used. ...
+
+ In the first model, a PCI Link device is used to provide additional
+ configuration information such as whether the interrupt is Level or
+ Edge triggered, it is active High or Low, Shared or Exclusive, etc.
+
+ In the second model, the PCI interrupts are hardwired to specific
+ interrupt inputs on the interrupt controller and are not
+ configurable. In this case, the Source field in _PRT does not
+ reference a device, but instead contains the value zero, and the
+ Source Index field contains the global system interrupt to which the
+ PCI interrupt is hardwired.
+
+ We use the first model with link indirection to set the correct
+ interrupt type as PCI defaults (Level Triggered, Active Low) are not
+ compatible with GICv2.
*/
-#define PRT_ENTRY(Address, Pin, Interrupt) \
- Package (4) { \
+#define LNK_DEVICE(Unique_Id, Link_Name, irq) \
+ Device(Link_Name) { \
+ Name(_HID, EISAID("PNP0C0F")) \
+ Name(_UID, Unique_Id) \
+ Name(_PRS, ResourceTemplate() { \
+ Interrupt(ResourceProducer, Level, ActiveHigh, Exclusive) { irq } \
+ }) \
+ Method (_CRS, 0) { Return (_PRS) } \
+ Method (_SRS, 1) { } \
+ Method (_DIS) { } \
+ }
+
+#define PRT_ENTRY(Address, Pin, Link) \
+ Package (4) { \
Address, /* uses the same format as _ADR */ \
Pin, /* The PCI pin number of the device (0-INTA, 1-INTB, 2-INTC, 3-INTD). */ \
- Zero, /* allocated from the global interrupt pool. */ \
- Interrupt /* global system interrupt number */ \
+ Link, /* Interrupt allocated via Link device. */ \
+ Zero /* global system interrupt number (no used) */ \
}
/*
@@ -36,7 +59,7 @@
"High word–Device #, Low word–Function #. (for example, device 3, function 2 is
0x00030002). To refer to all the functions on a device #, use a function number of FFFF)."
*/
-#define ROOT_PRT_ENTRY(Pin, Interrupt) PRT_ENTRY(0x0000FFFF, Pin, Interrupt)
+#define ROOT_PRT_ENTRY(Pin, Link) PRT_ENTRY(0x0000FFFF, Pin, Link)
// Device 0 for Bridge.
@@ -45,6 +68,11 @@ DefinitionBlock("SsdtPci.aml", "SSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_OEM
//
// PCI Root Complex
//
+ LNK_DEVICE(1, LNKA, 168)
+ LNK_DEVICE(2, LNKB, 169)
+ LNK_DEVICE(3, LNKC, 170)
+ LNK_DEVICE(4, LNKD, 171)
+
Device(PCI0)
{
Name(_HID, EISAID("PNP0A08")) // PCI Express Root Bridge
@@ -60,10 +88,10 @@ DefinitionBlock("SsdtPci.aml", "SSDT", 1, "ARMLTD", "ARM-JUNO", EFI_ACPI_ARM_OEM
// PCI Routing Table
Name(_PRT, Package() {
- ROOT_PRT_ENTRY(0, 168), // INTA
- ROOT_PRT_ENTRY(1, 169), // INTB
- ROOT_PRT_ENTRY(2, 170), // INTC
- ROOT_PRT_ENTRY(3, 171), // INTD
+ ROOT_PRT_ENTRY(0, LNKA), // INTA
+ ROOT_PRT_ENTRY(1, LNKB), // INTB
+ ROOT_PRT_ENTRY(2, LNKC), // INTC
+ ROOT_PRT_ENTRY(3, LNKD), // INTD
})
// Root complex resources
Method (_CRS, 0, Serialized) {
--
2.8.0.rc3
>From the functionality point of view this series might be split into the
following logic parts:
1. Necessary fixes as the preparation for using driver on ARM64.
2. New ECAM API and update for users of the pci-host-common API
3. Use new MCFG interface and implement generic ACPI based PCI host controller driver.
4. Enable above driver on ARM64
Patches has been built on top of 4.6-rc2 and can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v6)
This has been tested on Cavium ThunderX server. Any help in reviewing and
testing is very appreciated.
v5 -> v6
- dropped idea of x86 MMCONFIG code refactoring
- integrated JC's patches which introduce new ECAM API:
https://lkml.org/lkml/2016/4/11/907
git: https://github.com/jchandra-brcm/linux/ (arm64-acpi-pci-v3)
- integrated Sinan's fix for releasing IO resources, see patch [06/13]
- added ACPI support for ThunderX ECAM and PEM drivers
- rebased to 4.6-rc2
v4 -> v5
- dropped MCFG refactoring group patches 1-6 from series v4 and integrated Jayachandran's patch
https://patchwork.ozlabs.org/patch/575525/
- rewrite PCI legacy IRQs allocation
- squashed two patches 11 and 12 from series v4, fixed bisection issue
- changelog improvements
- rebased to 4.5-rc3
v3 -> v4
- dropped Jiang's fix http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04318.html
- added Lorenzo's fix patch 19/24
- ACPI PCI bus domain number assigning cleanup
- changed resource management, we now claim and reassign resources
- improvements for applying quirks
- dropped Matthew's http://www.spinics.net/lists/linux-pci/msg45950.html dependency
- rebased to 4.5-rc1
v2 -> v3
- fix legacy IRQ assigning and IO ports registration
- remove reference to arch specific companion device for ia64
- move ACPI PCI host controller driver to pci_root.c
- drop generic domain assignment for x86 and ia64 as I am not
able to run all necessary test variants
- drop patch which cleaned legacy IRQ assignment since it belongs to
Mathew's series:
https://patchwork.ozlabs.org/patch/557504/
- extend MCFG quirk code
- rebased to 4.4
v1 -> v2
- moved non-arch specific piece of code to dirver/acpi/ directory
- fixed IO resource handling
- introduced PCI config accessors quirks matching
- moved ACPI_COMPANION_SET to generic code
v1 - https://lkml.org/lkml/2015/10/27/504
v2 - https://lkml.org/lkml/2015/12/16/246
v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.html
v4 - https://lkml.org/lkml/2016/2/4/646
v5 - https://lkml.org/lkml/2016/2/16/426
Jayachandran C (2):
PCI: Provide common functions for ECAM mapping
PCI: generic, thunder: update to use generic ECAM API
Tomasz Nowicki (11):
pci, acpi, x86, ia64: Move ACPI host bridge device companion
assignment to core code.
pci, acpi: Provide generic way to assign bus domain number.
x86, ia64: Include acpi_pci_{add|remove}_bus to the default
pcibios_{add|remove}_bus implementation.
pci, of: Move the PCI I/O space management to PCI core code.
acpi, pci: Support IO resources when parsing PCI host bridge
resources.
arm64, pci, acpi: ACPI support for legacy IRQs parsing and
consolidation with DT code.
pci, acpi: Support for ACPI based generic PCI host controller
arm64, pci, acpi: Start using ACPI based PCI host controller driver
for ARM64.
pci, acpi: Match PCI config space accessors against platfrom specific
quirks.
pci, pci-thunder-ecam: Add ACPI support for ThunderX ECAM.
pci, pci-thunder-pem: Add ACPI support for ThunderX PEM.
arch/arm64/Kconfig | 15 +++
arch/arm64/include/asm/cpufeature.h | 3 +-
arch/arm64/kernel/cpu_errata.c | 8 ++
arch/arm64/kernel/pci.c | 35 ++---
arch/ia64/hp/common/sba_iommu.c | 2 +-
arch/ia64/include/asm/pci.h | 1 -
arch/ia64/pci/pci.c | 26 ----
arch/ia64/sn/kernel/io_acpi_init.c | 4 +-
arch/x86/include/asm/pci.h | 3 -
arch/x86/pci/acpi.c | 17 ---
arch/x86/pci/common.c | 10 --
drivers/acpi/Kconfig | 8 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/bus.c | 1 +
drivers/acpi/pci_gen_host.c | 259 ++++++++++++++++++++++++++++++++++++
drivers/acpi/pci_root.c | 58 +++++++-
drivers/of/address.c | 116 +---------------
drivers/pci/Kconfig | 3 +
drivers/pci/Makefile | 2 +
drivers/pci/ecam.c | 137 +++++++++++++++++++
drivers/pci/ecam.h | 66 +++++++++
drivers/pci/host/Kconfig | 1 +
drivers/pci/host/pci-host-common.c | 119 ++++++++---------
drivers/pci/host/pci-host-common.h | 47 -------
drivers/pci/host/pci-host-generic.c | 52 ++------
drivers/pci/host/pci-thunder-ecam.c | 70 ++++++----
drivers/pci/host/pci-thunder-pem.c | 215 ++++++++++++++++++++++--------
drivers/pci/pci.c | 150 ++++++++++++++++++++-
drivers/pci/probe.c | 5 +
include/asm-generic/vmlinux.lds.h | 7 +
include/linux/of_address.h | 9 --
include/linux/pci-acpi.h | 20 +++
include/linux/pci.h | 12 ++
33 files changed, 1029 insertions(+), 453 deletions(-)
create mode 100644 drivers/acpi/pci_gen_host.c
create mode 100644 drivers/pci/ecam.c
create mode 100644 drivers/pci/ecam.h
delete mode 100644 drivers/pci/host/pci-host-common.h
--
1.9.1
Hi Folks,
There are a few requirements that I would like to ensure are documented
in various revised documentation. I'm curious to know whether you'd like
the current in-kernel documentation to include things at the level of
"GICv3 use requires that every processor have a Processor Device in the
DSDT". Is that too much detail for the kernel documentation?
Jon.
--
Computer Architect | Sent from my Fedora powered laptop
The ACPI 6.1 specification was recently released at the end of January
2016, but the arm64 kernel documentation for the use of ACPI was written
for the 5.1 version of the spec. There were significant additions to the
spec that had not yet been mentioned -- for example, the 6.0 mechanisms
added to make it easier to define processors and low power idle states,
as well as the 6.1 addition allowing regular interrupts (not just from
GPIO) be used to signal ACPI general purpose events.
This patch reflects going back through and examining the specs in detail
and updating content appropriately. Whilst there, a few odds and ends of
typos were caught as well. This brings the documentation up to date with
ACPI 6.1 for arm64.
Changes for v4:
-- Clarify that IORT can sometimes be optional (Jon Masters).
-- Remove "Use as needed" descriptions of ACPI objects; they provide
no substantive information and doing so simplifies maintenance of
this document over time. These have been replaced with a simpler
notice that states that unless otherwise noted, do what the APCI
specification says is needed.
-- Corrected the _OSI object usage recommendation; it described kernel
behavior that does not exist (Al Stone).
Changes for v3:
-- Clarify use of _LPI/_RDI (Vikas Sajjan)
-- Whitespace cleanup as pointed out by checkpatch
Changes for v2:
-- Clean up white space (Harb Abdulhahmid)
-- Clarification on _CCA usage (Harb Abdulhamid)
-- IORT moved to required from recommended (Hanjun Guo)
-- Clarify IORT description (Hanjun Guo)
Signed-off-by: Al Stone <al.stone(a)linaro.org>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: Jonathan Corbet <corbet(a)lwn.net>
---
Documentation/arm64/acpi_object_usage.txt | 347 ++++++++++++++++--------------
Documentation/arm64/arm-acpi.txt | 28 ++-
2 files changed, 212 insertions(+), 163 deletions(-)
diff --git a/Documentation/arm64/acpi_object_usage.txt b/Documentation/arm64/acpi_object_usage.txt
index a6e1a18..3891750 100644
--- a/Documentation/arm64/acpi_object_usage.txt
+++ b/Documentation/arm64/acpi_object_usage.txt
@@ -13,14 +13,18 @@ For ACPI on arm64, tables also fall into the following categories:
-- Required: DSDT, FADT, GTDT, MADT, MCFG, RSDP, SPCR, XSDT
- -- Recommended: BERT, EINJ, ERST, HEST, SSDT
+ -- Recommended: BERT, EINJ, ERST, HEST, PCCT, SSDT
- -- Optional: BGRT, CPEP, CSRT, DRTM, ECDT, FACS, FPDT, MCHI, MPST,
- MSCT, RASF, SBST, SLIT, SPMI, SRAT, TCPA, TPM2, UEFI
+ -- Optional: BGRT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT, MCHI,
+ MPST, MSCT, NFIT, PMTT, RASF, SBST, SLIT, SPMI, SRAT, STAO, TCPA,
+ TPM2, UEFI, XENV
- -- Not supported: BOOT, DBG2, DBGP, DMAR, ETDT, HPET, IBFT, IVRS,
- LPIT, MSDM, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
+ -- Not supported: BOOT, DBGP, DMAR, ETDT, HPET, IBFT, IVRS, LPIT,
+ MSDM, OEMx, PSDT, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
+ -- NB: the IORT is required on certain SBSA platforms (e.g., when
+ using GICv3-ITS and an SMMU); it is optional on SBSA Level 0
+ platforms.
Table Usage for ARMv8 Linux
----- ----------------------------------------------------------------
@@ -50,7 +54,8 @@ CSRT Signature Reserved (signature == "CSRT")
DBG2 Signature Reserved (signature == "DBG2")
== DeBuG port table 2 ==
- Microsoft only table, will not be supported.
+ License has changed and should be usable. Optional if used instead
+ of earlycon=<device> on the command line.
DBGP Signature Reserved (signature == "DBGP")
== DeBuG Port table ==
@@ -133,10 +138,11 @@ GTDT Section 5.2.24 (signature == "GTDT")
HEST Section 18.3.2 (signature == "HEST")
== Hardware Error Source Table ==
- Until further error source types are defined, use only types 6 (AER
- Root Port), 7 (AER Endpoint), 8 (AER Bridge), or 9 (Generic Hardware
- Error Source). Firmware first error handling is possible if and only
- if Trusted Firmware is being used on arm64.
+ ARM-specific error sources have been defined; please use those or the
+ PCI types such as type 6 (AER Root Port), 7 (AER Endpoint), or 8 (AER
+ Bridge), or use type 9 (Generic Hardware Error Source). Firmware first
+ error handling is possible if and only if Trusted Firmware is being
+ used on arm64.
Must be supplied if RAS support is provided by the platform. It
is recommended this table be supplied.
@@ -149,20 +155,30 @@ IBFT Signature Reserved (signature == "IBFT")
== iSCSI Boot Firmware Table ==
Microsoft defined table, support TBD.
+IORT Signature Reserved (signature == "IORT")
+ == Input Output Remapping Table ==
+ arm64 only table, required in order to describe IO topology, SMMUs,
+ and GIC ITSs, and how those various components are connected together,
+ such as identifying which components are behind which SMMUs/ITSs.
+ This table will only be required on certain SBSA platforms (e.g.,
+ when using GICv3-ITS and an SMMU); on SBSA Level 0 platforms, it
+ remains optional.
+
IVRS Signature Reserved (signature == "IVRS")
== I/O Virtualization Reporting Structure ==
x86_64 (AMD) only table, will not be supported.
LPIT Signature Reserved (signature == "LPIT")
== Low Power Idle Table ==
- x86 only table as of ACPI 5.1; future versions have been adapted for
- use with ARM and will be recommended in order to support ACPI power
- management.
+ x86 only table as of ACPI 5.1; starting with ACPI 6.0, processor
+ descriptions and power states on ARM platforms should use the DSDT
+ and define processor container devices (_HID ACPI0010, Section 8.4,
+ and more specifically 8.4.3 and and 8.4.4).
MADT Section 5.2.12 (signature == "APIC")
== Multiple APIC Description Table ==
Required for arm64. Only the GIC interrupt controller structures
- should be used (types 0xA - 0xE).
+ should be used (types 0xA - 0xF).
MCFG Signature Reserved (signature == "MCFG")
== Memory-mapped ConFiGuration space ==
@@ -176,14 +192,38 @@ MPST Section 5.2.21 (signature == "MPST")
== Memory Power State Table ==
Optional, not currently supported.
+MSCT Section 5.2.19 (signature == "MSCT")
+ == Maximum System Characteristic Table ==
+ Optional, not currently supported.
+
MSDM Signature Reserved (signature == "MSDM")
== Microsoft Data Management table ==
Microsoft only table, will not be supported.
-MSCT Section 5.2.19 (signature == "MSCT")
- == Maximum System Characteristic Table ==
+NFIT Section 5.2.25 (signature == "NFIT")
+ == NVDIMM Firmware Interface Table ==
Optional, not currently supported.
+OEMx Signature of "OEMx" only
+ == OEM Specific Tables ==
+ All tables starting with a signature of "OEM" are reserved for OEM
+ use. Since these are not meant to be of general use but are limited
+ to very specific end users, they are not recommended for use and are
+ not supported by the kernel for arm64.
+
+PCCT Section 14.1 (signature == "PCCT)
+ == Platform Communications Channel Table ==
+ Recommend for use on arm64, and required when using CPPC to control
+ power on the platform.
+
+PMTT Section 5.2.21.12 (signature == "PMTT")
+ == Platform Memory Topology Table ==
+ Optional, but useful, but not currently supported.
+
+PSDT Section 5.2.11.3 (signature == "PSDT")
+ == Persistent System Description Table ==
+ Obsolete table, will not be supported.
+
RASF Section 5.2.20 (signature == "RASF")
== RAS Feature table ==
Optional, not currently supported.
@@ -195,7 +235,7 @@ RSDP Section 5.2.5 (signature == "RSD PTR")
RSDT Section 5.2.7 (signature == "RSDT")
== Root System Description Table ==
Since this table can only provide 32-bit addresses, it is deprecated
- on arm64, and will not be used.
+ on arm64, and will not be used. If provided, it will be ignored.
SBST Section 5.2.14 (signature == "SBST")
== Smart Battery Subsystem Table ==
@@ -207,7 +247,7 @@ SLIC Signature Reserved (signature == "SLIC")
SLIT Section 5.2.17 (signature == "SLIT")
== System Locality distance Information Table ==
- Optional in general, but required for NUMA systems.
+ Optional in general, but required for arm64 NUMA systems.
SPCR Signature Reserved (signature == "SPCR")
== Serial Port Console Redirection table ==
@@ -220,7 +260,7 @@ SPMI Signature Reserved (signature == "SPMI")
SRAT Section 5.2.16 (signature == "SRAT")
== System Resource Affinity Table ==
Optional, but if used, only the GICC Affinity structures are read.
- To support NUMA, this table is required.
+ To support arm64 NUMA, this table is required.
SSDT Section 5.2.11.2 (signature == "SSDT")
== Secondary System Description Table ==
@@ -235,6 +275,11 @@ SSDT Section 5.2.11.2 (signature == "SSDT")
These tables are optional, however. ACPI tables should contain only
one DSDT but can contain many SSDTs.
+STAO Signature Reserved (signature == "STAO")
+ == _STA Override table ==
+ Optional, but only necessary in virtualized environments in order to
+ hide devices from guest OSs.
+
TCPA Signature Reserved (signature == "TCPA")
== Trusted Computing Platform Alliance table ==
Optional, not currently supported, and may need changes to fully
@@ -266,6 +311,10 @@ WPBT Signature Reserved (signature == "WPBT")
== Windows Platform Binary Table ==
Microsoft only table, will not be supported.
+XENV Signature Reserved (signature == "XENV")
+ == Xen project table ==
+ Optional, used only by Xen at present.
+
XSDT Section 5.2.8 (signature == "XSDT")
== eXtended System Description Table ==
Required for arm64.
@@ -273,44 +322,46 @@ XSDT Section 5.2.8 (signature == "XSDT")
ACPI Objects
------------
-The expectations on individual ACPI objects are discussed in the list that
-follows:
+The expectations on individual ACPI objects that are likely to be used are
+shown in the list that follows; any object not explicitly mentioned below
+should be used as needed for a particular platform or particular subsystem,
+such as power management or PCI.
Name Section Usage for ARMv8 Linux
---- ------------ -------------------------------------------------
-_ADR 6.1.1 Use as needed.
+_CCA 6.2.17 This method must be defined for all bus masters
+ on arm64 -- there are no assumptions made about
+ whether such devices are cache coherent or not.
+ The _CCA value is inherited by all descendants of
+ these devices so it does not need to be repeated.
+ Without _CCA on arm64, the kernel does not know what
+ to do about setting up DMA for the device.
-_BBN 6.5.5 Use as needed; PCI-specific.
+ NB: this method provides default cache coherency
+ attributes; the presence of an SMMU can be used to
+ modify that, however. For example, a master could
+ default to non-coherent, but be made coherent with
+ the appropriate SMMU configuration (see Table 17 of
+ the IORT specification, ARM Document DEN 0049B).
-_BDN 6.5.3 Optional; not likely to be used on arm64.
+_CID 6.1.2 Use as needed, see also _HID.
-_CCA 6.2.17 This method should be defined for all bus masters
- on arm64. While cache coherency is assumed, making
- it explicit ensures the kernel will set up DMA as
- it should.
+_CLS 6.1.3 Use as needed, see also _HID.
-_CDM 6.2.1 Optional, to be used only for processor devices.
-
-_CID 6.1.2 Use as needed.
-
-_CLS 6.1.3 Use as needed.
+_CPC 8.4.7.1 Use as needed, power management specific. CPPC is
+ recommended on arm64.
_CRS 6.2.2 Required on arm64.
-_DCK 6.5.2 Optional; not likely to be used on arm64.
+_CSD 8.4.2.2 Use as needed, used only in conjunction with _CST.
+
+_CST 8.4.2.1 Low power idle states (8.4.4) are recommended instead
+ of C-states.
_DDN 6.1.4 This field can be used for a device name. However,
it is meant for DOS device names (e.g., COM1), so be
careful of its use across OSes.
-_DEP 6.5.8 Use as needed.
-
-_DIS 6.2.3 Optional, for power management use.
-
-_DLM 5.7.5 Optional.
-
-_DMA 6.2.4 Optional.
-
_DSD 6.2.5 To be used with caution. If this object is used, try
to use it within the constraints already defined by the
Device Properties UUID. Only in rare circumstances
@@ -325,20 +376,10 @@ _DSD 6.2.5 To be used with caution. If this object is used, try
with the UEFI Forum; this may cause some iteration as
more than one OS will be registering entries.
-_DSM Do not use this method. It is not standardized, the
+_DSM 9.1.1 Do not use this method. It is not standardized, the
return values are not well documented, and it is
currently a frequent source of error.
-_DSW 7.2.1 Use as needed; power management specific.
-
-_EDL 6.3.1 Optional.
-
-_EJD 6.3.2 Optional.
-
-_EJx 6.3.3 Optional.
-
-_FIX 6.2.7 x86 specific, not used on arm64.
-
\_GL 5.7.1 This object is not to be used in hardware reduced
mode, and therefore should not be used on arm64.
@@ -349,35 +390,25 @@ _GLK 6.5.7 This object requires a global lock be defined; there
\_GPE 5.3.1 This namespace is for x86 use only. Do not use it
on arm64.
-_GSB 6.2.7 Optional.
-
-_HID 6.1.5 Use as needed. This is the primary object to use in
- device probing, though _CID and _CLS may also be used.
-
-_HPP 6.2.8 Optional, PCI specific.
+_HID 6.1.5 This is the primary object to use in device probing,
+ though _CID and _CLS may also be used.
-_HPX 6.2.9 Optional, PCI specific.
-
-_HRV 6.1.6 Optional, use as needed to clarify device behavior; in
- some cases, this may be easier to use than _DSD.
+_HRV 6.1.6 Use to clarify device behavior; in some cases, this
+ may be easier to use than _DSD.
_INI 6.5.1 Not required, but can be useful in setting up devices
when UEFI leaves them in a state that may not be what
the driver expects before it starts probing.
-_IRC 7.2.15 Use as needed; power management specific.
-
-_LCK 6.3.4 Optional.
+_LPI 8.4.4.3 Recommended for use with processor definitions (_HID
+ ACPI0010) on arm64. See also _RDI.
-_MAT 6.2.10 Optional; see also the MADT.
+_MLS 6.1.7 Highly recommended for use in internationalization.
-_MLS 6.1.7 Optional, but highly recommended for use in
- internationalization.
-
-_OFF 7.1.2 It is recommended to define this method for any device
+_OFF 7.2.2 It is recommended to define this method for any device
that can be turned on or off.
-_ON 7.1.3 It is recommended to define this method for any device
+_ON 7.2.3 It is recommended to define this method for any device
that can be turned on or off.
\_OS 5.7.3 This method will return "Linux" by default (this is
@@ -398,122 +429,106 @@ _OSC 6.2.11 This method can be a global method in ACPI (i.e.,
by the kernel community, then register it with the
UEFI Forum.
-\_OSI 5.7.2 Deprecated on ARM64. Any invocation of this method
- will print a warning on the console and return false.
- That is, as far as ACPI firmware is concerned, _OSI
- cannot be used to determine what sort of system is
- being used or what functionality is provided. The
- _OSC method is to be used instead.
-
-_OST 6.3.5 Optional.
+\_OSI 5.7.2 Deprecated on ARM64. As far as ACPI firmware is
+ concerned, _OSI is not to be used to determine what
+ sort of system is being used or what functionality
+ is provided. The _OSC method is to be used instead.
_PDC 8.4.1 Deprecated, do not use on arm64.
\_PIC 5.8.1 The method should not be used. On arm64, the only
interrupt model available is GIC.
-_PLD 6.1.8 Optional.
-
\_PR 5.3.1 This namespace is for x86 use only on legacy systems.
Do not use it on arm64.
-_PRS 6.2.12 Optional.
-
_PRT 6.2.13 Required as part of the definition of all PCI root
devices.
-_PRW 7.2.13 Use as needed; power management specific.
-
-_PRx 7.2.8-11 Use as needed; power management specific. If _PR0 is
+_PRx 7.3.8-11 Use as needed; power management specific. If _PR0 is
defined, _PR3 must also be defined.
-_PSC 7.2.6 Use as needed; power management specific.
-
-_PSE 7.2.7 Use as needed; power management specific.
-
-_PSW 7.2.14 Use as needed; power management specific.
-
-_PSx 7.2.2-5 Use as needed; power management specific. If _PS0 is
+_PSx 7.3.2-5 Use as needed; power management specific. If _PS0 is
defined, _PS3 must also be defined. If clocks or
regulators need adjusting to be consistent with power
usage, change them in these methods.
-\_PTS 7.3.1 Use as needed; power management specific.
-
-_PXM 6.2.14 Optional.
-
-_REG 6.5.4 Use as needed.
+_RDI 8.4.4.4 Recommended for use with processor definitions (_HID
+ ACPI0010) on arm64. This should only be used in
+ conjunction with _LPI.
\_REV 5.7.4 Always returns the latest version of ACPI supported.
-_RMV 6.3.6 Optional.
-
\_SB 5.3.1 Required on arm64; all devices must be defined in this
namespace.
-_SEG 6.5.6 Use as needed; PCI-specific.
-
-\_SI 5.3.1, Optional.
- 9.1
-
-_SLI 6.2.15 Optional; recommended when SLIT table is in use.
+_SLI 6.2.15 Use is recommended when SLIT table is in use.
_STA 6.3.7, It is recommended to define this method for any device
- 7.1.4 that can be turned on or off.
+ 7.2.4 that can be turned on or off. See also the STAO table
+ that provides overrides to hide devices in virtualized
+ environments.
-_SRS 6.2.16 Optional; see also _PRS.
+_SRS 6.2.16 Use as needed; see also _PRS.
_STR 6.1.10 Recommended for conveying device names to end users;
this is preferred over using _DDN.
_SUB 6.1.9 Use as needed; _HID or _CID are preferred.
-_SUN 6.1.11 Optional.
+_SUN 6.1.11 Use as needed, but recommended.
-\_Sx 7.3.2 Use as needed; power management specific.
-
-_SxD 7.2.16-19 Use as needed; power management specific.
-
-_SxW 7.2.20-24 Use as needed; power management specific.
-
-_SWS 7.3.3 Use as needed; power management specific; this may
+_SWS 7.4.3 Use as needed; power management specific; this may
require specification changes for use on arm64.
-\_TTS 7.3.4 Use as needed; power management specific.
-
-\_TZ 5.3.1 Optional.
-
_UID 6.1.12 Recommended for distinguishing devices of the same
class; define it if at all possible.
-\_WAK 7.3.5 Use as needed; power management specific.
+
ACPI Event Model
----------------
Do not use GPE block devices; these are not supported in the hardware reduced
profile used by arm64. Since there are no GPE blocks defined for use on ARM
-platforms, GPIO-signaled interrupts should be used for creating system events.
+platforms, ACPI events must be signaled differently.
+
+There are two options: GPIO-signaled interrupts (Section 5.6.5), and
+interrupt-signaled events (Section 5.6.9). Interrupt-signaled events are a
+new feature in the ACPI 6.1 specification. Either -- or both -- can be used
+on a given platform, and which to use may be dependent of limitations in any
+given SoC. If possible, interrupt-signaled events are recommended.
ACPI Processor Control
----------------------
-Section 8 of the ACPI specification is currently undergoing change that
-should be completed in the 6.0 version of the specification. Processor
-performance control will be handled differently for arm64 at that point
-in time. Processor aggregator devices (section 8.5) will not be used,
-for example, but another similar mechanism instead.
-
-While UEFI constrains what we can say until the release of 6.0, it is
-recommended that CPPC (8.4.5) be used as the primary model. This will
-still be useful into the future. C-states and P-states will still be
-provided, but most of the current design work appears to favor CPPC.
+Section 8 of the ACPI specification changed significantly in version 6.0.
+Processors should now be defined as Device objects with _HID ACPI0007; do
+not use the deprecated Processor statement in ASL. All multiprocessor systems
+should also define a hierarchy of processors, done with Processor Container
+Devices (see Section 8.4.3.1, _HID ACPI0010); do not use processor aggregator
+devices (Section 8.5) to describe processor topology. Section 8.4 of the
+specification describes the semantics of these object definitions and how
+they interrelate.
+
+Most importantly, the processor hierarchy defined also defines the low power
+idle states that are available to the platform, along with the rules for
+determining which processors can be turned on or off and the circumstances
+that control that. Without this information, the processors will run in
+whatever power state they were left in by UEFI.
+
+Note too, that the processor Device objects defined and the entries in the
+MADT for GICs are expected to be in sychronization. The _UID of the Device
+object must correspond to processor IDs used in the MADT.
+
+It is recommended that CPPC (8.4.5) be used as the primary model for processor
+performance control on arm64. C-states and P-states may become available at
+some point in the future, but most current design work appears to favor CPPC.
Further, it is essential that the ARMv8 SoC provide a fully functional
implementation of PSCI; this will be the only mechanism supported by ACPI
-to control CPU power state (including secondary CPU booting).
-
-More details will be provided on the release of the ACPI 6.0 specification.
+to control CPU power state. Booting of secondary CPUs may be possible using
+parking protocol, but only PSCI is to be used for ARM servers.
ACPI System Address Map Interfaces
@@ -535,21 +550,25 @@ used to indicate fatal errors that cannot be corrected, and require immediate
attention.
Since there is no direct equivalent of the x86 SCI or NMI, arm64 handles
-these slightly differently. The SCI is handled as a normal GPIO-signaled
-interrupt; given that these are corrected (or correctable) errors being
-reported, this is sufficient. The NMI is emulated as the highest priority
-GPIO-signaled interrupt possible. This implies some caution must be used
-since there could be interrupts at higher privilege levels or even interrupts
-at the same priority as the emulated NMI. In Linux, this should not be the
-case but one should be aware it could happen.
+these slightly differently. The SCI is handled as a high priority interrupt;
+given that these are corrected (or correctable) errors being reported, this
+is sufficient. The NMI is emulated as the highest priority interrupt
+possible. This implies some caution must be used since there could be
+interrupts at higher privilege levels or even interrupts at the same priority
+as the emulated NMI. In Linux, this should not be the case but one should
+be aware it could happen.
ACPI Objects Not Supported on ARM64
-----------------------------------
While this may change in the future, there are several classes of objects
that can be defined, but are not currently of general interest to ARM servers.
+Some of these objects have x86 equivalents, and may actually make sense in ARM
+servers. However, there is either no hardware available at present, or there
+may not even be a non-ARM implementation yet. Hence, they are not currently
+supported.
-These are not supported:
+The following classes of objects are not supported:
-- Section 9.2: ambient light sensor devices
@@ -571,16 +590,6 @@ These are not supported:
-- Section 9.18: time and alarm devices (see 9.15)
-
-ACPI Objects Not Yet Implemented
---------------------------------
-While these objects have x86 equivalents, and they do make some sense in ARM
-servers, there is either no hardware available at present, or in some cases
-there may not yet be a non-ARM implementation. Hence, they are currently not
-implemented though that may change in the future.
-
-Not yet implemented are:
-
-- Section 10: power source and power meter devices
-- Section 11: thermal management
@@ -589,5 +598,31 @@ Not yet implemented are:
-- Section 13: SMBus interfaces
- -- Section 17: NUMA support (prototypes have been submitted for
- review)
+
+This also mean that there is no support for the following objects:
+
+Name Section Name Section
+---- ------------ ---- ------------
+_ALC 9.3.4 _FDM 9.10.3
+_ALI 9.3.2 _FIX 6.2.7
+_ALP 9.3.6 _GAI 10.4.5
+_ALR 9.3.5 _GHL 10.4.7
+_ALT 9.3.3 _GTM 9.9.2.1.1
+_BCT 10.2.2.10 _LID 9.5.1
+_BDN 6.5.3 _PAI 10.4.4
+_BIF 10.2.2.1 _PCL 10.3.2
+_BIX 10.2.2.1 _PIF 10.3.3
+_BLT 9.2.3 _PMC 10.4.1
+_BMA 10.2.2.4 _PMD 10.4.8
+_BMC 10.2.2.12 _PMM 10.4.3
+_BMD 10.2.2.11 _PRL 10.3.4
+_BMS 10.2.2.5 _PSR 10.3.1
+_BST 10.2.2.6 _PTP 10.4.2
+_BTH 10.2.2.7 _SBS 10.1.3
+_BTM 10.2.2.9 _SHL 10.4.6
+_BTP 10.2.2.8 _STM 9.9.2.1.1
+_DCK 6.5.2 _UPD 9.16.1
+_EC 12.12 _UPP 9.16.2
+_FDE 9.10.1 _WPC 10.5.2
+_FDI 9.10.2 _WPP 10.5.3
+
diff --git a/Documentation/arm64/arm-acpi.txt b/Documentation/arm64/arm-acpi.txt
index 570a4f8..12381c1 100644
--- a/Documentation/arm64/arm-acpi.txt
+++ b/Documentation/arm64/arm-acpi.txt
@@ -57,11 +57,11 @@ The short form of the rationale for ACPI on ARM is:
-- The new ACPI governance process works well and Linux is now at the same
table as hardware vendors and other OS vendors. In fact, there is no
- longer any reason to feel that ACPI is only belongs to Windows or that
+ longer any reason to feel that ACPI only belongs to Windows or that
Linux is in any way secondary to Microsoft in this arena. The move of
ACPI governance into the UEFI forum has significantly opened up the
specification development process, and currently, a large portion of the
- changes being made to ACPI is being driven by Linux.
+ changes being made to ACPI are being driven by Linux.
Key to the use of ACPI is the support model. For servers in general, the
responsibility for hardware behaviour cannot solely be the domain of the
@@ -159,7 +159,7 @@ Further, the ACPI core will only use the 64-bit address fields in the FADT
(Fixed ACPI Description Table). Any 32-bit address fields in the FADT will
be ignored on arm64.
-Hardware reduced mode (see Section 4.1 of the ACPI 5.1 specification) will
+Hardware reduced mode (see Section 4.1 of the ACPI 6.1 specification) will
be enforced by the ACPI core on arm64. Doing so allows the ACPI core to
run less complex code since it no longer has to provide support for legacy
hardware from other architectures. Any fields that are not to be used for
@@ -167,7 +167,7 @@ hardware reduced mode must be set to zero.
For the ACPI core to operate properly, and in turn provide the information
the kernel needs to configure devices, it expects to find the following
-tables (all section numbers refer to the ACPI 5.1 specfication):
+tables (all section numbers refer to the ACPI 6.1 specfication):
-- RSDP (Root System Description Pointer), section 5.2.5
@@ -185,9 +185,22 @@ tables (all section numbers refer to the ACPI 5.1 specfication):
-- If PCI is supported, the MCFG (Memory mapped ConFiGuration
Table), section 5.2.6, specifically Table 5-31.
+ -- If booting without a console=<device> kernel parameter is
+ supported, the SPCR (Serial Port Console Redirection table),
+ section 5.2.6, specifically Table 5-31.
+
+ -- If virtualization is supported, the IORT (Input Output Remapping
+ Table, section 5.2.6, specifically Table 5-31.
+
+ -- If NUMA is supported, the SRAT (System Resource Affinity Table)
+ and SLIT (System Locality distance Information Table), sections
+ 5.2.16 and 5.2.17, respectively.
+
If the above tables are not all present, the kernel may or may not be
able to boot properly since it may not be able to configure all of the
-devices available.
+devices available. This list of tables is not meant to be all inclusive;
+in some environments other tables may be needed (e.g., any of the APEI
+tables from section 18) to support specific functionality.
ACPI Detection
@@ -233,7 +246,7 @@ that looks like this: Name(KEY0, "value0"). An ACPI device driver would
then retrieve the value of the property by evaluating the KEY0 object.
However, using Name() this way has multiple problems: (1) ACPI limits
names ("KEY0") to four characters unlike DT; (2) there is no industry
-wide registry that maintains a list of names, minimzing re-use; (3)
+wide registry that maintains a list of names, minimizing re-use; (3)
there is also no registry for the definition of property values ("value0"),
again making re-use difficult; and (4) how does one maintain backward
compatibility as new hardware comes out? The _DSD method was created
@@ -434,7 +447,8 @@ The ACPI specification changes regularly. During the year 2014, for instance,
version 5.1 was released and version 6.0 substantially completed, with most of
the changes being driven by ARM-specific requirements. Proposed changes are
presented and discussed in the ASWG (ACPI Specification Working Group) which
-is a part of the UEFI Forum.
+is a part of the UEFI Forum. The current version of the ACPI specification
+is 6.1 release in January 2016.
Participation in this group is open to all UEFI members. Please see
http://www.uefi.org/workinggroup for details on group membership.
--
2.5.5
The ACPI 6.1 specification was recently released at the end of January
2016, but the arm64 kernel documentation for the use of ACPI was written
for the 5.1 version of the spec. There were significant additions to the
spec that had not yet been mentioned -- for example, the 6.0 mechanisms
added to make it easier to define processors and low power idle states,
as well as the 6.1 addition allowing regular interrupts (not just from
GPIO) be used to signal ACPI general purpose events.
This patch reflects going back through and examining the specs in detail
and updating content appropriately. Whilst there, a few odds and ends of
typos were caught as well. This brings the documentation up to date with
ACPI 6.1 for arm64.
Changes for v3:
-- Clarify use of _LPI/_RDI (Vikas Sajjan)
-- Whitespace cleanup as pointed out by checkpatch
Changes for v2:
-- Clean up white space (Harb Abdulhahmid)
-- Clarification on _CCA usage (Harb Abdulhamid)
-- IORT moved to required from recommended (Hanjun Guo)
-- Clarify IORT description (Hanjun Guo)
Signed-off-by: Al Stone <al.stone(a)linaro.org>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Will Deacon <will.deacon(a)arm.com>
Cc: Jonathan Corbet <corbet(a)lwn.net>
---
Documentation/arm64/acpi_object_usage.txt | 446 ++++++++++++++++++++++--------
Documentation/arm64/arm-acpi.txt | 28 +-
2 files changed, 357 insertions(+), 117 deletions(-)
diff --git a/Documentation/arm64/acpi_object_usage.txt b/Documentation/arm64/acpi_object_usage.txt
index a6e1a18..756d2f8 100644
--- a/Documentation/arm64/acpi_object_usage.txt
+++ b/Documentation/arm64/acpi_object_usage.txt
@@ -11,15 +11,16 @@ outside of the UEFI Forum (see Section 5.2.6 of the specification).
For ACPI on arm64, tables also fall into the following categories:
- -- Required: DSDT, FADT, GTDT, MADT, MCFG, RSDP, SPCR, XSDT
+ -- Required: DSDT, FADT, GTDT, IORT, MADT, MCFG, RSDP, SPCR, XSDT
- -- Recommended: BERT, EINJ, ERST, HEST, SSDT
+ -- Recommended: BERT, EINJ, ERST, HEST, PCCT, SSDT
- -- Optional: BGRT, CPEP, CSRT, DRTM, ECDT, FACS, FPDT, MCHI, MPST,
- MSCT, RASF, SBST, SLIT, SPMI, SRAT, TCPA, TPM2, UEFI
+ -- Optional: BGRT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT, MCHI,
+ MPST, MSCT, NFIT, PMTT, RASF, SBST, SLIT, SPMI, SRAT, STAO, TCPA,
+ TPM2, UEFI, XENV
- -- Not supported: BOOT, DBG2, DBGP, DMAR, ETDT, HPET, IBFT, IVRS,
- LPIT, MSDM, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
+ -- Not supported: BOOT, DBGP, DMAR, ETDT, HPET, IBFT, IVRS, LPIT,
+ MSDM, OEMx, PSDT, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
Table Usage for ARMv8 Linux
@@ -50,7 +51,8 @@ CSRT Signature Reserved (signature == "CSRT")
DBG2 Signature Reserved (signature == "DBG2")
== DeBuG port table 2 ==
- Microsoft only table, will not be supported.
+ License has changed and should be usable. Optional if used instead
+ of earlycon=<device> on the command line.
DBGP Signature Reserved (signature == "DBGP")
== DeBuG Port table ==
@@ -133,10 +135,11 @@ GTDT Section 5.2.24 (signature == "GTDT")
HEST Section 18.3.2 (signature == "HEST")
== Hardware Error Source Table ==
- Until further error source types are defined, use only types 6 (AER
- Root Port), 7 (AER Endpoint), 8 (AER Bridge), or 9 (Generic Hardware
- Error Source). Firmware first error handling is possible if and only
- if Trusted Firmware is being used on arm64.
+ ARM-specific error sources have been defined; please use those or the
+ PCI types such as type 6 (AER Root Port), 7 (AER Endpoint), or 8 (AER
+ Bridge), or use type 9 (Generic Hardware Error Source). Firmware first
+ error handling is possible if and only if Trusted Firmware is being
+ used on arm64.
Must be supplied if RAS support is provided by the platform. It
is recommended this table be supplied.
@@ -149,20 +152,27 @@ IBFT Signature Reserved (signature == "IBFT")
== iSCSI Boot Firmware Table ==
Microsoft defined table, support TBD.
+IORT Signature Reserved (signature == "IORT")
+ == Input Output Remapping Table ==
+ arm64 only table, required in order to describe IO topology, SMMUs,
+ and GIC ITSs, and how those various components are connected together,
+ such as identifying which components are behind which SMMUs/ITSs.
+
IVRS Signature Reserved (signature == "IVRS")
== I/O Virtualization Reporting Structure ==
x86_64 (AMD) only table, will not be supported.
LPIT Signature Reserved (signature == "LPIT")
== Low Power Idle Table ==
- x86 only table as of ACPI 5.1; future versions have been adapted for
- use with ARM and will be recommended in order to support ACPI power
- management.
+ x86 only table as of ACPI 5.1; starting with ACPI 6.0, processor
+ descriptions and power states on ARM platforms should use the DSDT
+ and define processor container devices (_HID ACPI0010, Section 8.4,
+ and more specifically 8.4.3 and and 8.4.4).
MADT Section 5.2.12 (signature == "APIC")
== Multiple APIC Description Table ==
Required for arm64. Only the GIC interrupt controller structures
- should be used (types 0xA - 0xE).
+ should be used (types 0xA - 0xF).
MCFG Signature Reserved (signature == "MCFG")
== Memory-mapped ConFiGuration space ==
@@ -176,14 +186,38 @@ MPST Section 5.2.21 (signature == "MPST")
== Memory Power State Table ==
Optional, not currently supported.
+MSCT Section 5.2.19 (signature == "MSCT")
+ == Maximum System Characteristic Table ==
+ Optional, not currently supported.
+
MSDM Signature Reserved (signature == "MSDM")
== Microsoft Data Management table ==
Microsoft only table, will not be supported.
-MSCT Section 5.2.19 (signature == "MSCT")
- == Maximum System Characteristic Table ==
+NFIT Section 5.2.25 (signature == "NFIT")
+ == NVDIMM Firmware Interface Table ==
Optional, not currently supported.
+OEMx Signature of "OEMx" only
+ == OEM Specific Tables ==
+ All tables starting with a signature of "OEM" are reserved for OEM
+ use. Since these are not meant to be of general use but are limited
+ to very specific end users, they are not recommended for use and are
+ not supported by the kernel for arm64.
+
+PCCT Section 14.1 (signature == "PCCT)
+ == Platform Communications Channel Table ==
+ Recommend for use on arm64, and required when using CPPC to control
+ power on the platform.
+
+PMTT Section 5.2.21.12 (signature == "PMTT")
+ == Platform Memory Topology Table ==
+ Optional, but useful, but not currently supported.
+
+PSDT Section 5.2.11.3 (signature == "PSDT")
+ == Persistent System Description Table ==
+ Obsolete table, will not be supported.
+
RASF Section 5.2.20 (signature == "RASF")
== RAS Feature table ==
Optional, not currently supported.
@@ -195,7 +229,7 @@ RSDP Section 5.2.5 (signature == "RSD PTR")
RSDT Section 5.2.7 (signature == "RSDT")
== Root System Description Table ==
Since this table can only provide 32-bit addresses, it is deprecated
- on arm64, and will not be used.
+ on arm64, and will not be used. If provided, it will be ignored.
SBST Section 5.2.14 (signature == "SBST")
== Smart Battery Subsystem Table ==
@@ -207,7 +241,7 @@ SLIC Signature Reserved (signature == "SLIC")
SLIT Section 5.2.17 (signature == "SLIT")
== System Locality distance Information Table ==
- Optional in general, but required for NUMA systems.
+ Optional in general, but required for arm64 NUMA systems.
SPCR Signature Reserved (signature == "SPCR")
== Serial Port Console Redirection table ==
@@ -220,7 +254,7 @@ SPMI Signature Reserved (signature == "SPMI")
SRAT Section 5.2.16 (signature == "SRAT")
== System Resource Affinity Table ==
Optional, but if used, only the GICC Affinity structures are read.
- To support NUMA, this table is required.
+ To support arm64 NUMA, this table is required.
SSDT Section 5.2.11.2 (signature == "SSDT")
== Secondary System Description Table ==
@@ -235,6 +269,11 @@ SSDT Section 5.2.11.2 (signature == "SSDT")
These tables are optional, however. ACPI tables should contain only
one DSDT but can contain many SSDTs.
+STAO Signature Reserved (signature == "STAO")
+ == _STA Override table ==
+ Optional, but only necessary in virtualized environments in order to
+ hide devices from guest OSs.
+
TCPA Signature Reserved (signature == "TCPA")
== Trusted Computing Platform Alliance table ==
Optional, not currently supported, and may need changes to fully
@@ -266,6 +305,10 @@ WPBT Signature Reserved (signature == "WPBT")
== Windows Platform Binary Table ==
Microsoft only table, will not be supported.
+XENV Signature Reserved (signature == "XENV")
+ == Xen project table ==
+ Optional, used only by Xen at present.
+
XSDT Section 5.2.8 (signature == "XSDT")
== eXtended System Description Table ==
Required for arm64.
@@ -273,31 +316,57 @@ XSDT Section 5.2.8 (signature == "XSDT")
ACPI Objects
------------
-The expectations on individual ACPI objects are discussed in the list that
-follows:
+The expectations on individual ACPI objects that are likely to be used are
+shown in the list that follows:
Name Section Usage for ARMv8 Linux
---- ------------ -------------------------------------------------
+_ACx 11.4.1 Use as needed.
+
_ADR 6.1.1 Use as needed.
+_ALx 11.4.2 Use as needed.
+
+_ART 11.4.3 Use as needed.
+
_BBN 6.5.5 Use as needed; PCI-specific.
-_BDN 6.5.3 Optional; not likely to be used on arm64.
+_CCA 6.2.17 This method must be defined for all bus masters
+ on arm64 -- there are no assumptions made about
+ whether such devices are cache coherent or not.
+ The _CCA value is inherited by all descendants of
+ these devices so it does not need to be repeated.
+ Without _CCA on arm64, the kernel does not know what
+ to do about setting up DMA for the device.
-_CCA 6.2.17 This method should be defined for all bus masters
- on arm64. While cache coherency is assumed, making
- it explicit ensures the kernel will set up DMA as
- it should.
+ NB: this method provides default cache coherency
+ attributes; the presence of an SMMU can be used to
+ modify that, however. For example, a master could
+ default to non-coherent, but be made coherent with
+ the appropriate SMMU configuration (see Table 17 of
+ the IORT specification, ARM Document DEN 0049B).
-_CDM 6.2.1 Optional, to be used only for processor devices.
+_CDM 6.2.1 Use as needed, to be used only for processor devices.
-_CID 6.1.2 Use as needed.
+_CID 6.1.2 Use as needed, see also _HID.
-_CLS 6.1.3 Use as needed.
+_CLS 6.1.3 Use as needed, see also _HID.
+
+_CPC 8.4.7.1 Use as needed; power management specific. CPPC is
+ recommended on arm64.
+
+_CR3 11.4.5 Use as needed.
_CRS 6.2.2 Required on arm64.
-_DCK 6.5.2 Optional; not likely to be used on arm64.
+_CRT 11.4.4 Use as needed.
+
+_CSD 8.4.2.2 Use as needed, used only in conjunction with _CST.
+
+_CST 8.4.2.1 Low power idle states (8.4.4) are recommended instead
+ of C-states.
+
+_CWS 9.18.6 Use as needed.
_DDN 6.1.4 This field can be used for a device name. However,
it is meant for DOS device names (e.g., COM1), so be
@@ -305,11 +374,11 @@ _DDN 6.1.4 This field can be used for a device name. However,
_DEP 6.5.8 Use as needed.
-_DIS 6.2.3 Optional, for power management use.
+_DIS 6.2.3 Use as needed, for power management use.
-_DLM 5.7.5 Optional.
+_DLM 5.7.5 Use as needed.
-_DMA 6.2.4 Optional.
+_DMA 6.2.4 Use as needed.
_DSD 6.2.5 To be used with caution. If this object is used, try
to use it within the constraints already defined by the
@@ -325,19 +394,29 @@ _DSD 6.2.5 To be used with caution. If this object is used, try
with the UEFI Forum; this may cause some iteration as
more than one OS will be registering entries.
-_DSM Do not use this method. It is not standardized, the
+_DSM 9.1.1 Do not use this method. It is not standardized, the
return values are not well documented, and it is
currently a frequent source of error.
-_DSW 7.2.1 Use as needed; power management specific.
+_DSW 7.3.1 Use as needed; power management specific.
-_EDL 6.3.1 Optional.
+_DTI 11.4.6 Use as needed.
-_EJD 6.3.2 Optional.
+_EDL 6.3.1 Use as needed.
-_EJx 6.3.3 Optional.
+_EJD 6.3.2 Use as needed.
-_FIX 6.2.7 x86 specific, not used on arm64.
+_EJx 6.3.3 Use as needed.
+
+_FIF 11.3.1.1 Use as needed.
+
+_FPS 11.3.1.2 Use as needed.
+
+_FSL 11.3.1.3 Use as needed.
+
+_FST 11.3.1.4 Use as needed.
+
+_GCP 9.18.2 Use as needed.
\_GL 5.7.1 This object is not to be used in hardware reduced
mode, and therefore should not be used on arm64.
@@ -349,35 +428,57 @@ _GLK 6.5.7 This object requires a global lock be defined; there
\_GPE 5.3.1 This namespace is for x86 use only. Do not use it
on arm64.
-_GSB 6.2.7 Optional.
+_GRT 9.18.3 Use as needed.
+
+_GSB 6.2.7 Use as needed.
+
+_GTF 9.9.1.1 Use as needed.
+
+_GWS 9.18.5 Use as needed.
_HID 6.1.5 Use as needed. This is the primary object to use in
device probing, though _CID and _CLS may also be used.
-_HPP 6.2.8 Optional, PCI specific.
+_HOT 11.4.7 Use as needed.
+
+_HPP 6.2.8 Use as needed, PCI specific.
-_HPX 6.2.9 Optional, PCI specific.
+_HPX 6.2.9 Use as needed, PCI specific.
-_HRV 6.1.6 Optional, use as needed to clarify device behavior; in
- some cases, this may be easier to use than _DSD.
+_HRV 6.1.6 Use as needed, use as needed to clarify device
+ behavior; in some cases, this may be easier to use
+ than _DSD.
_INI 6.5.1 Not required, but can be useful in setting up devices
when UEFI leaves them in a state that may not be what
the driver expects before it starts probing.
-_IRC 7.2.15 Use as needed; power management specific.
+_IRC 7.3.15 Use as needed; power management specific.
+
+_LCK 6.3.4 Use as needed.
+
+_LPI 8.4.4.3 Use as needed, but recommended for use with processor
+ definitions (_HID ACPI0010) on arm64. See also _RDI.
-_LCK 6.3.4 Optional.
+_MAT 6.2.10 Use as needed; see also the MADT.
-_MAT 6.2.10 Optional; see also the MADT.
+_MBM 9.13.2.1 Use as needed.
-_MLS 6.1.7 Optional, but highly recommended for use in
+_MLS 6.1.7 Use as needed, but highly recommended for use in
internationalization.
-_OFF 7.1.2 It is recommended to define this method for any device
+_MSG 9.2.2 Use as needed.
+
+_MSM 9.13.2.2 Use as needed.
+
+_MTL 11.4.8 Use as needed.
+
+_NTT 11.4.9 Use as needed.
+
+_OFF 7.2.2 It is recommended to define this method for any device
that can be turned on or off.
-_ON 7.1.3 It is recommended to define this method for any device
+_ON 7.2.3 It is recommended to define this method for any device
that can be turned on or off.
\_OS 5.7.3 This method will return "Linux" by default (this is
@@ -405,115 +506,220 @@ _OSC 6.2.11 This method can be a global method in ACPI (i.e.,
being used or what functionality is provided. The
_OSC method is to be used instead.
-_OST 6.3.5 Optional.
+_OST 6.3.5 Use as needed.
+
+_PCT 8.4.6.1 Use as needed; power management specific.
_PDC 8.4.1 Deprecated, do not use on arm64.
+_PDL 8.4.6.2 Use as needed; power management specific.
+
\_PIC 5.8.1 The method should not be used. On arm64, the only
interrupt model available is GIC.
-_PLD 6.1.8 Optional.
+_PLD 6.1.8 Use as needed.
+
+_PPC 8.4.6.3 Use as needed; power management specific.
+
+_PPE 8.4.8 Use as needed.
\_PR 5.3.1 This namespace is for x86 use only on legacy systems.
Do not use it on arm64.
-_PRS 6.2.12 Optional.
+_PRE 7.3.12 Use as needed; power management specific.
+
+_PRR 7.3.26 Use as needed; power management specific.
+
+_PRS 6.2.12 Use as needed.
_PRT 6.2.13 Required as part of the definition of all PCI root
devices.
-_PRW 7.2.13 Use as needed; power management specific.
+_PRW 7.3.13 Use as needed; power management specific.
-_PRx 7.2.8-11 Use as needed; power management specific. If _PR0 is
+_PRx 7.3.8-11 Use as needed; power management specific. If _PR0 is
defined, _PR3 must also be defined.
-_PSC 7.2.6 Use as needed; power management specific.
+_PSC 7.3.6 Use as needed; power management specific.
+
+_PSD 8.4.6.5 Use as needed; power management specific.
-_PSE 7.2.7 Use as needed; power management specific.
+_PSE 7.3.7 Use as needed; power management specific.
-_PSW 7.2.14 Use as needed; power management specific.
+_PSL 11.4.10 Use as needed.
-_PSx 7.2.2-5 Use as needed; power management specific. If _PS0 is
+_PSS 8.4.6.2 Use as needed; power management specific.
+
+_PSV 11.4.11 Use as needed.
+
+_PSW 7.3.14 Use as needed; power management specific.
+
+_PSx 7.3.2-5 Use as needed; power management specific. If _PS0 is
defined, _PS3 must also be defined. If clocks or
regulators need adjusting to be consistent with power
usage, change them in these methods.
-\_PTS 7.3.1 Use as needed; power management specific.
+_PTC 8.4.5.1 Use as needed; power management specific.
+
+\_PTS 7.4.1 Use as needed; power management specific.
+
+_PUR 8.5.1.1 Use as needed.
+
+_PXM 6.2.14 Use as needed.
-_PXM 6.2.14 Optional.
+_RDI 8.4.4.4 Use as needed, but recommended for use with processor
+ definitions (_HID ACPI0010) on arm64. This should only
+ be used in conjunction with _LPI.
_REG 6.5.4 Use as needed.
\_REV 5.7.4 Always returns the latest version of ACPI supported.
-_RMV 6.3.6 Optional.
+_RMV 6.3.6 Use as needed.
+
+_RST 7.3.25 Use as needed; power management specific.
+
+_RTV 11.4.12 Use as needed.
\_SB 5.3.1 Required on arm64; all devices must be defined in this
namespace.
+_SCP 11.4.13 Use as needed.
+
+_SDD 9.9.3.3.1 Use as needed.
+
_SEG 6.5.6 Use as needed; PCI-specific.
-\_SI 5.3.1, Optional.
- 9.1
+\_SI 5.3.1, Use as needed.
+ 9.2
+
+_SLI 6.2.15 Use as needed; recommended when SLIT table is in use.
-_SLI 6.2.15 Optional; recommended when SLIT table is in use.
+_SRT 9.18.4 Use as needed.
_STA 6.3.7, It is recommended to define this method for any device
- 7.1.4 that can be turned on or off.
+ 7.2.4 that can be turned on or off. See also the STAO table
+ that provides overrides to hide devices in virtualized
+ environments.
-_SRS 6.2.16 Optional; see also _PRS.
+_SRS 6.2.16 Use as needed; see also _PRS.
+
+_SST 9.2.1 Use as needed.
_STR 6.1.10 Recommended for conveying device names to end users;
this is preferred over using _DDN.
+_SST 9.2.1 Use as needed.
+
+_STP 9.18.7 Use as needed.
+
+_STV 9.18.8 Use as needed.
+
_SUB 6.1.9 Use as needed; _HID or _CID are preferred.
-_SUN 6.1.11 Optional.
+_SUN 6.1.11 Use as needed, but recommended.
-\_Sx 7.3.2 Use as needed; power management specific.
+\_Sx 7.4.2 Use as needed; power management specific.
-_SxD 7.2.16-19 Use as needed; power management specific.
+_SxD 7.3.16-19 Use as needed; power management specific.
-_SxW 7.2.20-24 Use as needed; power management specific.
+_SxW 7.3.20-24 Use as needed; power management specific.
-_SWS 7.3.3 Use as needed; power management specific; this may
+_SWS 7.4.3 Use as needed; power management specific; this may
require specification changes for use on arm64.
-\_TTS 7.3.4 Use as needed; power management specific.
+_TC1 11.4.14 Use as needed.
+
+_TC2 11.4.15 Use as needed.
+
+_TDL 8.4.5.5 Use as needed; power management specific.
+
+_TFP 11.4.16 Use as needed.
+
+_TIP 9.18.9 Use as needed.
+
+_TIV 9.18.10 Use as needed.
+
+_TMP 11.4.17 Use as needed.
+
+_TPC 8.4.5.3 Use as needed; power management specific.
-\_TZ 5.3.1 Optional.
+_TPT 11.4.18 Use as needed.
+
+_TRT 11.4.19 Use as needed.
+
+_TSD 8.4.5.4 Use as needed; power management specific.
+
+_TSN 11.4.20 Use as needed.
+
+_TSP 11.4.21 Use as needed.
+
+_TSS 8.4.5.2 Use as needed; power management specific.
+
+_TST 11.4.22 Use as needed.
+
+\_TTS 7.4.4 Use as needed; power management specific.
+
+\_TZ 5.3.1 Use as needed.
+
+_TZD 11.4.23 Use as needed.
+
+_TZM 11.4.24 Use as needed.
+
+_TZP 11.4.25 Use as needed.
_UID 6.1.12 Recommended for distinguishing devices of the same
class; define it if at all possible.
-\_WAK 7.3.5 Use as needed; power management specific.
+_UPC 9.14 Use as needed.
+
+\_WAK 7.4.5 Use as needed; power management specific.
+
+
ACPI Event Model
----------------
Do not use GPE block devices; these are not supported in the hardware reduced
profile used by arm64. Since there are no GPE blocks defined for use on ARM
-platforms, GPIO-signaled interrupts should be used for creating system events.
+platforms, ACPI events must be signaled differently.
+
+There are two options: GPIO-signaled interrupts (Section 5.6.5), and
+interrupt-signaled events (Section 5.6.9). Interrupt-signaled events are a
+new feature in the ACPI 6.1 specification. Either -- or both -- can be used
+on a given platform, and which to use may be dependent of limitations in any
+given SoC. If possible, interrupt-signaled events are recommended.
ACPI Processor Control
----------------------
-Section 8 of the ACPI specification is currently undergoing change that
-should be completed in the 6.0 version of the specification. Processor
-performance control will be handled differently for arm64 at that point
-in time. Processor aggregator devices (section 8.5) will not be used,
-for example, but another similar mechanism instead.
-
-While UEFI constrains what we can say until the release of 6.0, it is
-recommended that CPPC (8.4.5) be used as the primary model. This will
-still be useful into the future. C-states and P-states will still be
-provided, but most of the current design work appears to favor CPPC.
+Section 8 of the ACPI specification changed significantly in version 6.0.
+Processors should now be defined as Device objects with _HID ACPI0007; do
+not use the deprecated Processor statement in ASL. All multiprocessor systems
+should also define a hierarchy of processors, done with Processor Container
+Devices (see Section 8.4.3.1, _HID ACPI0010); do not use processor aggregator
+devices (Section 8.5) to describe processor topology. Section 8.4 of the
+specification describes the semantics of these object definitions and how
+they interrelate.
+
+Most importantly, the processor hierarchy defined also defines the low power
+idle states that are available to the platform, along with the rules for
+determining which processors can be turned on or off and the circumstances
+that control that. Without this information, the processors will run in
+whatever power state they were left in by UEFI.
+
+Note too, that the processor Device objects defined and the entries in the
+MADT for GICs are expected to be in sychronization. The _UID of the Device
+object must correspond to processor IDs used in the MADT.
+
+It is recommended that CPPC (8.4.5) be used as the primary model for processor
+performance control on arm64. C-states and P-states may become available at
+some point in the future, but most current design work appears to favor CPPC.
Further, it is essential that the ARMv8 SoC provide a fully functional
implementation of PSCI; this will be the only mechanism supported by ACPI
-to control CPU power state (including secondary CPU booting).
-
-More details will be provided on the release of the ACPI 6.0 specification.
+to control CPU power state. Booting of secondary CPUs may be possible using
+parking protocol, but only PSCI is to be used for ARM servers.
ACPI System Address Map Interfaces
@@ -535,21 +741,25 @@ used to indicate fatal errors that cannot be corrected, and require immediate
attention.
Since there is no direct equivalent of the x86 SCI or NMI, arm64 handles
-these slightly differently. The SCI is handled as a normal GPIO-signaled
-interrupt; given that these are corrected (or correctable) errors being
-reported, this is sufficient. The NMI is emulated as the highest priority
-GPIO-signaled interrupt possible. This implies some caution must be used
-since there could be interrupts at higher privilege levels or even interrupts
-at the same priority as the emulated NMI. In Linux, this should not be the
-case but one should be aware it could happen.
+these slightly differently. The SCI is handled as a high priority interrupt;
+given that these are corrected (or correctable) errors being reported, this
+is sufficient. The NMI is emulated as the highest priority interrupt
+possible. This implies some caution must be used since there could be
+interrupts at higher privilege levels or even interrupts at the same priority
+as the emulated NMI. In Linux, this should not be the case but one should
+be aware it could happen.
ACPI Objects Not Supported on ARM64
-----------------------------------
While this may change in the future, there are several classes of objects
that can be defined, but are not currently of general interest to ARM servers.
+Some of these objects have x86 equivalents, and may actually make sense in ARM
+servers. However, there is either no hardware available at present, or there
+may not even be a non-ARM implementation yet. Hence, they are not currently
+supported.
-These are not supported:
+The following classes of objects are not supported:
-- Section 9.2: ambient light sensor devices
@@ -571,16 +781,6 @@ These are not supported:
-- Section 9.18: time and alarm devices (see 9.15)
-
-ACPI Objects Not Yet Implemented
---------------------------------
-While these objects have x86 equivalents, and they do make some sense in ARM
-servers, there is either no hardware available at present, or in some cases
-there may not yet be a non-ARM implementation. Hence, they are currently not
-implemented though that may change in the future.
-
-Not yet implemented are:
-
-- Section 10: power source and power meter devices
-- Section 11: thermal management
@@ -589,5 +789,31 @@ Not yet implemented are:
-- Section 13: SMBus interfaces
- -- Section 17: NUMA support (prototypes have been submitted for
- review)
+
+This also mean that there is no support for the following objects:
+
+Name Section Name Section
+---- ------------ ---- ------------
+_ALC 9.3.4 _FDM 9.10.3
+_ALI 9.3.2 _FIX 6.2.7
+_ALP 9.3.6 _GAI 10.4.5
+_ALR 9.3.5 _GHL 10.4.7
+_ALT 9.3.3 _GTM 9.9.2.1.1
+_BCT 10.2.2.10 _LID 9.5.1
+_BDN 6.5.3 _PAI 10.4.4
+_BIF 10.2.2.1 _PCL 10.3.2
+_BIX 10.2.2.1 _PIF 10.3.3
+_BLT 9.2.3 _PMC 10.4.1
+_BMA 10.2.2.4 _PMD 10.4.8
+_BMC 10.2.2.12 _PMM 10.4.3
+_BMD 10.2.2.11 _PRL 10.3.4
+_BMS 10.2.2.5 _PSR 10.3.1
+_BST 10.2.2.6 _PTP 10.4.2
+_BTH 10.2.2.7 _SBS 10.1.3
+_BTM 10.2.2.9 _SHL 10.4.6
+_BTP 10.2.2.8 _STM 9.9.2.1.1
+_DCK 6.5.2 _UPD 9.16.1
+_EC 12.12 _UPP 9.16.2
+_FDE 9.10.1 _WPC 10.5.2
+_FDI 9.10.2 _WPP 10.5.3
+
diff --git a/Documentation/arm64/arm-acpi.txt b/Documentation/arm64/arm-acpi.txt
index 570a4f8..12381c1 100644
--- a/Documentation/arm64/arm-acpi.txt
+++ b/Documentation/arm64/arm-acpi.txt
@@ -57,11 +57,11 @@ The short form of the rationale for ACPI on ARM is:
-- The new ACPI governance process works well and Linux is now at the same
table as hardware vendors and other OS vendors. In fact, there is no
- longer any reason to feel that ACPI is only belongs to Windows or that
+ longer any reason to feel that ACPI only belongs to Windows or that
Linux is in any way secondary to Microsoft in this arena. The move of
ACPI governance into the UEFI forum has significantly opened up the
specification development process, and currently, a large portion of the
- changes being made to ACPI is being driven by Linux.
+ changes being made to ACPI are being driven by Linux.
Key to the use of ACPI is the support model. For servers in general, the
responsibility for hardware behaviour cannot solely be the domain of the
@@ -159,7 +159,7 @@ Further, the ACPI core will only use the 64-bit address fields in the FADT
(Fixed ACPI Description Table). Any 32-bit address fields in the FADT will
be ignored on arm64.
-Hardware reduced mode (see Section 4.1 of the ACPI 5.1 specification) will
+Hardware reduced mode (see Section 4.1 of the ACPI 6.1 specification) will
be enforced by the ACPI core on arm64. Doing so allows the ACPI core to
run less complex code since it no longer has to provide support for legacy
hardware from other architectures. Any fields that are not to be used for
@@ -167,7 +167,7 @@ hardware reduced mode must be set to zero.
For the ACPI core to operate properly, and in turn provide the information
the kernel needs to configure devices, it expects to find the following
-tables (all section numbers refer to the ACPI 5.1 specfication):
+tables (all section numbers refer to the ACPI 6.1 specfication):
-- RSDP (Root System Description Pointer), section 5.2.5
@@ -185,9 +185,22 @@ tables (all section numbers refer to the ACPI 5.1 specfication):
-- If PCI is supported, the MCFG (Memory mapped ConFiGuration
Table), section 5.2.6, specifically Table 5-31.
+ -- If booting without a console=<device> kernel parameter is
+ supported, the SPCR (Serial Port Console Redirection table),
+ section 5.2.6, specifically Table 5-31.
+
+ -- If virtualization is supported, the IORT (Input Output Remapping
+ Table, section 5.2.6, specifically Table 5-31.
+
+ -- If NUMA is supported, the SRAT (System Resource Affinity Table)
+ and SLIT (System Locality distance Information Table), sections
+ 5.2.16 and 5.2.17, respectively.
+
If the above tables are not all present, the kernel may or may not be
able to boot properly since it may not be able to configure all of the
-devices available.
+devices available. This list of tables is not meant to be all inclusive;
+in some environments other tables may be needed (e.g., any of the APEI
+tables from section 18) to support specific functionality.
ACPI Detection
@@ -233,7 +246,7 @@ that looks like this: Name(KEY0, "value0"). An ACPI device driver would
then retrieve the value of the property by evaluating the KEY0 object.
However, using Name() this way has multiple problems: (1) ACPI limits
names ("KEY0") to four characters unlike DT; (2) there is no industry
-wide registry that maintains a list of names, minimzing re-use; (3)
+wide registry that maintains a list of names, minimizing re-use; (3)
there is also no registry for the definition of property values ("value0"),
again making re-use difficult; and (4) how does one maintain backward
compatibility as new hardware comes out? The _DSD method was created
@@ -434,7 +447,8 @@ The ACPI specification changes regularly. During the year 2014, for instance,
version 5.1 was released and version 6.0 substantially completed, with most of
the changes being driven by ARM-specific requirements. Proposed changes are
presented and discussed in the ASWG (ACPI Specification Working Group) which
-is a part of the UEFI Forum.
+is a part of the UEFI Forum. The current version of the ACPI specification
+is 6.1 release in January 2016.
Participation in this group is open to all UEFI members. Please see
http://www.uefi.org/workinggroup for details on group membership.
--
2.5.5
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This commit provides APEI arch-specific bits for aarch64
Meanwhile,
(1)add a new subfunction "hest_ia32_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
(2)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(3)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
Changelog:
v10:https://lkml.org/lkml/2016/4/
Fix the Alphabetical order problem in arch/arm64/Kconfig
v9: https://lkml.org/lkml/2016/4/5/522
Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 15 ++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 18 +++++++++++++++---
4 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4f43622..da16716 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -47,6 +47,7 @@ config ARM64
select GENERIC_TIME_VSYSCALL
select HANDLE_DOMAIN_IRQ
select HARDIRQS_SW_RESEND
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_BITREVERSE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index aee323b..8db8379 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,7 +111,19 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't up with with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#endif /*_ASM_ACPI_H*/
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..792a0d9 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
+}
+
+static inline int __init hest_ia32_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
}
struct ghes_arr {
@@ -232,8 +243,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia32_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
Here is v2 of the patchset for the ACPI PCI controller driver based on
the earlier discussion[1].
This patchset unifies the pci-host-generic ECAM code and the ACPI PCI
ECAM code much further so that both the implementations can use the
same structure (struct pci_config_window) as ->sysdata.
The patchset should also make it easier to share platform quirks between
DT and ACPI PCI controller drivers using struct pci_generic_ecam_ops.
Short description of the patches in the patchset:
- fixup arm64 PCI code so that it can use the generic ACPI PCI driver.
- implement pci/drivers/ecam.[ch] which will replace
drivers/pci/host/pci-host-common.h API for ECAM access and will be
shared by ACPI and DT.
- Update users of the pci-host-common API to the ecam API
- implement a simple PCI ACPI host. I have not used the pci_mmcfg_list
or the region definitions from x86, but have used a much simpler
approach here.
This should apply cleanly on top of the current 4.6 tree or the pci
next tree, and can be reviewed as a patchset. The full set of changes
for arm64 includes other fixes, that series is available at
https://github.com/jchandra-brcm/linux branch arm64-acpi-pci-v2
This has been tested on qemu with OVMF for the ACPI part and with
device tree for pci-host-generic code. Further testing and reviews
are welcome.
Thanks,
JC.
[1] https://lkml.org/lkml/2016/3/3/921
Jayachandran C (4):
arm64: Prepare to use generic ACPI PCI implementation
PCI: Provide common functions for ECAM mapping
PCI: generic, thunder: update to use generic ECAM API
ACPI: PCI: Add generic PCI host controller
arch/arm64/Kconfig | 3 +
arch/arm64/kernel/pci.c | 7 +-
drivers/acpi/Kconfig | 9 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/pci_gen_host.c | 258 ++++++++++++++++++++++++++++++++++++
drivers/pci/Kconfig | 3 +
drivers/pci/Makefile | 2 +
drivers/pci/ecam.c | 130 ++++++++++++++++++
drivers/pci/ecam.h | 63 +++++++++
drivers/pci/host/Kconfig | 1 +
drivers/pci/host/pci-host-common.c | 121 ++++++++---------
drivers/pci/host/pci-host-common.h | 47 -------
drivers/pci/host/pci-host-generic.c | 50 ++-----
drivers/pci/host/pci-thunder-ecam.c | 37 +-----
drivers/pci/host/pci-thunder-pem.c | 53 +++-----
15 files changed, 560 insertions(+), 225 deletions(-)
create mode 100644 drivers/acpi/pci_gen_host.c
create mode 100644 drivers/pci/ecam.c
create mode 100644 drivers/pci/ecam.h
delete mode 100644 drivers/pci/host/pci-host-common.h
--
1.9.1
From: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
This commit provides APEI arch-specific bits for aarch64
Meanwhile,
(1)add a new subfunction "hest_ia32_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
(2)move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
(3)select HAVE_ACPI_APEI when EFI and ACPI is set on ARM64,
because arch_apei_get_mem_attribute is using efi_mem_attributes on ARM64.
[Fu Wei: improve && upstream]
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang(a)codeaurora.org>
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Acked-by: Hanjun Guo <hanjun.guo(a)linaro.org>
Tested-by: Tyler Baicar <tbaicar(a)codeaurora.org>
Acked-by: Will Deacon <will.deacon(a)arm.com>
---
Changelog:
v9: Improve the comment for arch_apei_flush_tlb_one.
Using select "HAVE_ACPI_APEI if (ACPI && EFI)" to fix the EFI dependence
problem.
v8: https://lkml.org/lkml/2016/3/29/132
Fix a "undefined reference" bug by selecting EFI when ACPI_APEI is set
on ARM64.
v7: https://lkml.org/lkml/2016/3/17/183
Add comment for arch_apei_flush_tlb_one in arch/arm64/include/asm/acpi.h
v6: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006644.html
Move HEST type (ACPI_HEST_TYPE_IA32_CORRECTED_CHECK) checking to
a generic place.
Delete HAVE_ACPI_APEI_HEST_IA32.
v5: https://lkml.org/lkml/2015/12/10/131
Add "HAVE_ACPI_APEI_HEST_IA32" instead of
"#if defined(__i386__) || defined(__x86_64__)".
v4: https://lkml.org/lkml/2015/12/8/188
Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 15 ++++++++++++++-
arch/x86/kernel/acpi/apei.c | 3 ---
drivers/acpi/apei/hest.c | 18 +++++++++++++++---
4 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4f43622..308fdb1 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -3,6 +3,7 @@ config ARM64
select ACPI_CCA_REQUIRED if ACPI
select ACPI_GENERIC_GSI if ACPI
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
+ select HAVE_ACPI_APEI if (ACPI && EFI)
select ARCH_HAS_DEVMEM_IS_ALLOWED
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_ELF_RANDOMIZE
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index aee323b..8db8379 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -110,7 +111,19 @@ static inline const char *acpi_get_enable_method(int cpu)
}
#ifdef CONFIG_ACPI_APEI
+#define acpi_disable_cmcff 1
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
-#endif
+/*
+ * Despite its name, this function must still broadcast the TLB
+ * invalidation in order to ensure other CPUs don't up with with junk
+ * entries as a result of speculation. Unusually, its also called in
+ * IRQ context (ghes_iounmap_irq) so if we ever need to use IPIs for
+ * TLB broadcasting, then we're in trouble here.
+ */
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
+#endif /* CONFIG_ACPI_APEI */
#endif /*_ASM_ACPI_H*/
diff --git a/arch/x86/kernel/acpi/apei.c b/arch/x86/kernel/acpi/apei.c
index c280df6..ea3046e 100644
--- a/arch/x86/kernel/acpi/apei.c
+++ b/arch/x86/kernel/acpi/apei.c
@@ -24,9 +24,6 @@ int arch_apei_enable_cmcff(struct acpi_hest_header *hest_hdr, void *data)
struct acpi_hest_ia_corrected *cmc;
struct acpi_hest_ia_error_bank *mc_bank;
- if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
- return 0;
-
cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
if (!cmc->enabled)
return 0;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..792a0d9 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -123,7 +123,18 @@ EXPORT_SYMBOL_GPL(apei_hest_parse);
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
+ return 0;
+
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
+}
+
+static inline int __init hest_ia32_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
}
struct ghes_arr {
@@ -232,8 +243,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia32_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.5
The acpi_pcc_probe() could end up accessing memory outside of the
PCCT table space which might cause the kernel panic(). Increment the
pcct_entry pointer after parsing 'HW-reduced Communications Subspace'
to fix the problem. This change also enables the parsing of subtable
at index 0.
Signed-off-by: Shanker Donthineni <shankerd(a)codeaurora.org>
Acked-by: Ashwin Chaugule <ashwin.chaugule(a)linaro.org>
---
Changes since v1:
Edit commit message.
drivers/mailbox/pcc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 0ddf638..043828d 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -361,8 +361,6 @@ static int __init acpi_pcc_probe(void)
struct acpi_generic_address *db_reg;
struct acpi_pcct_hw_reduced *pcct_ss;
pcc_mbox_channels[i].con_priv = pcct_entry;
- pcct_entry = (struct acpi_subtable_header *)
- ((unsigned long) pcct_entry + pcct_entry->length);
/* If doorbell is in system memory cache the virt address */
pcct_ss = (struct acpi_pcct_hw_reduced *)pcct_entry;
@@ -370,6 +368,8 @@ static int __init acpi_pcc_probe(void)
if (db_reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
pcc_doorbell_vaddr[i] = acpi_os_ioremap(db_reg->address,
db_reg->bit_width/8);
+ pcct_entry = (struct acpi_subtable_header *)
+ ((unsigned long) pcct_entry + pcct_entry->length);
}
pcc_mbox_ctrl.num_chans = count;
--
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
The acpi_pcc_probe() is accessing memory outside of the PCCT table
space causing the kernel panic(). Increment the pcct_entry pointer
after parsing 'HW-reduced Communications Subspace' to fix the
problem. This change also enables the parsing of subtable at index 0.
Signed-off-by: Shanker Donthineni <shankerd(a)codeaurora.org>
---
drivers/mailbox/pcc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 0ddf638..043828d 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -361,8 +361,6 @@ static int __init acpi_pcc_probe(void)
struct acpi_generic_address *db_reg;
struct acpi_pcct_hw_reduced *pcct_ss;
pcc_mbox_channels[i].con_priv = pcct_entry;
- pcct_entry = (struct acpi_subtable_header *)
- ((unsigned long) pcct_entry + pcct_entry->length);
/* If doorbell is in system memory cache the virt address */
pcct_ss = (struct acpi_pcct_hw_reduced *)pcct_entry;
@@ -370,6 +368,8 @@ static int __init acpi_pcc_probe(void)
if (db_reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
pcc_doorbell_vaddr[i] = acpi_os_ioremap(db_reg->address,
db_reg->bit_width/8);
+ pcct_entry = (struct acpi_subtable_header *)
+ ((unsigned long) pcct_entry + pcct_entry->length);
}
pcc_mbox_ctrl.num_chans = count;
--
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
>From the functionality point of view this series might be split into the
following logic parts:
1. Make MMCONFIG code arch-agnostic which allows all architectures to collect
PCI config regions and used when necessary.
2. Move non-arch specific bits to the core code.
3. Use MMCONFIG code and implement generic ACPI based PCI host controller driver.
4. Enable above driver on ARM64
Patches has been built on top of 4.5-rc3 and can be found here:
git@github.com:semihalf-nowicki-tomasz/linux.git (pci-acpi-v5)
NOTE, this patch set depends on Lorenzo's fixes:
https://patchwork.ozlabs.org/patch/576450/
which can be found in pci-acpi-v5 branch.
This has been tested on Cavium ThunderX server, JunoR2, HP RX2660 IA64, x86,
Hip05, X-Gene and QEMU-aarch64. Any help in reviewing and testing is very appreciated.
v4 -> v5
- dropped MCFG refactoring group patches 1-6 from series v4 and integrated Jayachandran's patch
https://patchwork.ozlabs.org/patch/575525/
- rewrite PCI legacy IRQs allocation
- squashed two patches 11 and 12 from series v4, fixed bisection issue
- changelog improvements
- rebased to 4.5-rc3
v3 -> v4
- dropped Jiang's fix http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04318.html
- added Lorenzo's fix patch 19/24
- ACPI PCI bus domain number assigning cleanup
- changed resource management, we now claim and reassign resources
- improvements for applying quirks
- dropped Matthew's http://www.spinics.net/lists/linux-pci/msg45950.html dependency
- rebased to 4.5-rc1
v2 -> v3
- fix legacy IRQ assigning and IO ports registration
- remove reference to arch specific companion device for ia64
- move ACPI PCI host controller driver to pci_root.c
- drop generic domain assignment for x86 and ia64 as I am not
able to run all necessary test variants
- drop patch which cleaned legacy IRQ assignment since it belongs to
Mathew's series:
https://patchwork.ozlabs.org/patch/557504/
- extend MCFG quirk code
- rebased to 4.4
v1 -> v2
- moved non-arch specific piece of code to dirver/acpi/ directory
- fixed IO resource handling
- introduced PCI config accessors quirks matching
- moved ACPI_COMPANION_SET to generic code
v1 - https://lkml.org/lkml/2015/10/27/504
v2 - https://lkml.org/lkml/2015/12/16/246
v3 - http://lkml.iu.edu/hypermail/linux/kernel/1601.1/04308.html
v4 - https://lkml.org/lkml/2016/2/4/646
Jayachandran C (1):
ACPI: MCFG: Move mmcfg_list management to drivers/acpi
Lorenzo Pieralisi (1):
drivers: pci: add generic code to claim bus resources
Tomasz Nowicki (13):
acpi, pci, mcfg: Provide default RAW ACPI PCI config space accessors.
arm64, acpi: Use MCFG library and empty PCI config space accessors
from pci_mcfg.c file.
pci, acpi, ecam: Add flag to indicate whether ECAM region was hot
added or not.
x86, pci: Cleanup platform specific MCFG data by using ECAM hot_added
flag.
pci, acpi, x86, ia64: Move ACPI host bridge device companion
assignment to core code.
pci, acpi: Provide generic way to assign bus domain number.
x86, ia64: Include acpi_pci_{add|remove}_bus to the default
pcibios_{add|remove}_bus implementation.
acpi, mcfg: Add default PCI config accessors implementation and
initial support for related quirks.
pci, of: Move the PCI I/O space management to PCI core code.
pci, acpi: Support for ACPI based generic PCI host controller
initialization
pci, acpi: Match PCI config space accessors against platfrom specific
quirks.
arm64, pci, acpi: Assign legacy IRQs once device is enable.
arm64, pci, acpi: Start using ACPI based PCI host bridge driver for
ARM64.
arch/arm64/Kconfig | 5 +
arch/arm64/kernel/pci.c | 35 +---
arch/ia64/hp/common/sba_iommu.c | 2 +-
arch/ia64/include/asm/pci.h | 1 -
arch/ia64/pci/pci.c | 26 ---
arch/ia64/sn/kernel/io_acpi_init.c | 4 +-
arch/x86/include/asm/pci.h | 3 -
arch/x86/include/asm/pci_x86.h | 24 +--
arch/x86/pci/acpi.c | 47 +----
arch/x86/pci/common.c | 10 -
arch/x86/pci/mmconfig-shared.c | 269 ++++---------------------
arch/x86/pci/mmconfig_32.c | 1 +
arch/x86/pci/mmconfig_64.c | 1 +
arch/x86/pci/numachip.c | 1 +
drivers/acpi/Kconfig | 7 +
drivers/acpi/Makefile | 1 +
drivers/acpi/pci_mcfg.c | 392 +++++++++++++++++++++++++++++++++++++
drivers/acpi/pci_root.c | 154 ++++++++++++++-
drivers/of/address.c | 116 +----------
drivers/pci/pci.c | 126 +++++++++++-
drivers/pci/probe.c | 5 +
drivers/pci/setup-bus.c | 63 ++++++
drivers/xen/pci.c | 5 +-
include/acpi/acpi_bus.h | 1 +
include/asm-generic/vmlinux.lds.h | 7 +
include/linux/of_address.h | 9 -
include/linux/pci-acpi.h | 68 +++++++
include/linux/pci.h | 6 +
28 files changed, 892 insertions(+), 497 deletions(-)
create mode 100644 drivers/acpi/pci_mcfg.c
--
1.9.1
when "fwts gtdt" is executed, fwts throws below error even when the
GTDT table looks fine in the "fwts acpidump".
gtdt: GTDT Generic Timer Description Table test
-------------------------------
Test 1 of 1: GTDT Generic Timer Description Table test.
FAILED [HIGH] GTDTShortBlock: Test 1, GTDT block is too short
-------------------------------
This patch removes the error checking,
since (ptr + 20) is always less than end_ptr even for the valid
GTDT block.
Signed-off-by: Vikas C Sajjan <vikas.cha.sajjan(a)hpe.com>
Signed-off-by: Sunil V L <sunil.vl(a)hpe.com>
---
src/acpi/gtdt/gtdt.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/acpi/gtdt/gtdt.c b/src/acpi/gtdt/gtdt.c
index 421f17f..05ccea1 100644
--- a/src/acpi/gtdt/gtdt.c
+++ b/src/acpi/gtdt/gtdt.c
@@ -75,13 +75,6 @@ static int gtdt_test1(fwts_framework *fw)
case 0x00:
/* GT Block Structure */
block = (fwts_acpi_table_gtdt_block *)ptr;
- if (ptr + 20 < end_ptr) {
- passed = false;
- fwts_failed(fw, LOG_LEVEL_HIGH,
- "GTDTShortBlock",
- "GTDT block is too short");
- goto done;
- }
if (block->length < 20) {
passed = false;
fwts_failed(fw, LOG_LEVEL_HIGH,
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Move some enums and marcos to header file for arm_arch_timer,
improve the pr_* code by defining "pr_fmt(fmt)" in arm_arch_timer.c
(2)Introduce ACPI GTDT parser: drivers/acpi/gtdt.c
Parse all kinds of timer in GTDT table of ACPI:arch timer,
memory-mapped timer and SBSA Generic Watchdog timer.
This driver can help to simplify all the relevant timer drivers,
and separate all the ACPI GTDT knowledge from them.
(3)Simplify ACPI code for arch timer in arm_arch_timer.c
(4)Add memory-mapped timer support in arm_arch_timer.c
RESEND:
-- Corrected Cc list: added missing mailing lists
Changelog:
v4: https://lists.linaro.org/pipermail/linaro-acpi/2016-March/006667.html
Delete the kvm relevant patches
Separate two patches for sorting out the code for arm_arch_timer.
Improve irq info export code to allow missing irq info in GTDT table.
v3: https://lkml.org/lkml/2016/2/1/658
Improve GTDT driver code:
(1)improve pr_* by defining pr_fmt(fmt)
(2)simplify gtdt_sbsa_gwdt_init
(3)improve gtdt_arch_timer_data_init, if table is NULL, it will try
to get GTDT table.
Move enum ppi_nr to arm_arch_timer.h, and add enum spi_nr.
Add arm_arch_timer get ppi from DT and GTDT support for kvm.
v2: https://lkml.org/lkml/2015/12/2/10
Rebase to latest kernel version(4.4-rc3).
Fix the bug about the config problem,
use CONFIG_ACPI_GTDT instead of CONFIG_ACPI in arm_arch_timer.c
v1: The first upstreaming version: https://lkml.org/lkml/2015/10/28/553
Fu Wei (5):
clocksource: move some enums and marcos to header file for
arm_arch_timer
ACPI: add GTDT table parse driver into ACPI driver
clocksource: simplify ACPI code in arm_arch_timer.c
clocksource: a little improvment for printk in arm_arch_timer.c
clocksource: add memory-mapped timer support in arm_arch_timer.c
drivers/acpi/Kconfig | 9 +
drivers/acpi/Makefile | 1 +
drivers/acpi/gtdt.c | 376 +++++++++++++++++++++++++++++++++++
drivers/clocksource/Kconfig | 1 +
drivers/clocksource/arm_arch_timer.c | 217 ++++++++++++++------
include/clocksource/arm_arch_timer.h | 33 +++
include/linux/acpi.h | 17 ++
7 files changed, 595 insertions(+), 59 deletions(-)
create mode 100644 drivers/acpi/gtdt.c
--
2.5.0
Hi Graeme,
The topic-kvm-acpi branch kernel boots fine on the Server Colo Mustang
with latest F/W.
No modification was needed, but I used my .config for the record.
Itaru