arm/mm: Backport of 3159f372354e8e1f5dee714663d70

ARM: 7840/1: LPAE: don't reject mapping /dev/mem above 4GB

With LPAE enabled, physical address space is larger than 4GB. Allow mapping any
part of it via /dev/mem by using PHYS_MASK to determine valid range.

PHYS_MASK covers 40 bits with LPAE enabled and 32 bits otherwise.

Signed-off-by: Jonas Svennebring <jonas.svennebring@lsi.com>
Basic perf support for axxia plaform block provided by LSI.

Signed-off-by: Jonas Svennebring <jonas.svennebring@lsi.com>
Merge branch 'standard/lsi/base' into standard/preempt-rt/lsi/base
arch/arm/mach-axxia: Name Cleanup

Change emulation to emu to match the other targets (sim for
simulation, etc.).

Signed-off-by: John Jacques <john.jacques@lsi.com>
arch/arm/mach-axxia: Work-Around for Event Problems in v1.0 Silicon

SEV/WFE are unusable in v1.0 silicon.  The boot loader now sets bit 7
in the ACLTR register of each core, making wfe a nop.  At present,
bit 7 of the ACTLR does not work in simulation and emulaton.  Until
that is corrected, this work-around is necessary.

Signed-off-by: John Jacques <john.jacques@lsi.com>
Removing the power of 2 size restriction for PCIe inbound mapping in LSI PCIe
driver

Signed-off-by: SangeethaRao <sangeetha.rao@lsi.com>
Merge branch 'standard/lsi/base' into standard/preempt-rt/lsi/base
LSI AXM55xx: Add memory barrier to processing of inbound messages.

Use memory barrier between control/status bits and access to data content.
Also remove unnecessary export of some datastreaming functions,
and modify exported header file to allow use in userspace applications.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Correct some coding style problems.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Fix pointer porting issue for platforms with 64-bit ptrs.

Also cleanup some code, and reorganize debugging flag presentation.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Adapt software initialization based on chip versions.

A number of SRIO device changes or bug fixes are described by the
generic device version code (RIO_DEV_INFO_CAR).  The software needs
to pay direct attention to some of these changes, either during
initialization of the endpoint or during execution.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Remove some unnecessary code for performance optimization.

Remove some duplicate code from outbound message IRQ handler.
Remove unneeded code from miscellaneous IRQ handler.
Update some documentation for clarity, and later use.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Improve concurrency protection and some register programming.

Replace mutex operations by spinlocks for better multithreaded protection.
Expand range of spinlock coverage in outbound messaging functions.
Add more constants & macros to replace hard-coded bitfield manipulations.
Revise allocation of inbound messaging DMEs to allow more effective use
of mailboxes Ids.
Modify functions to read/write the local controller registers to use
non-paged controller memory as often as possible.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Add more error checking for outbound mailboxes.

Destination mailbox Ids in the range 0..3 may only be transmitted via
multi-segment OB DMEs, and Ids in the range 4..63 may only be sent via
single-sengment OB DMEs.  If no DMEs of the appropriate type are found,
then return an appropriate error code.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Code cleanup per updated checkpatch.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Correct a number of style issues.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Implement a series of performance improvements for rapidio.

Within the AXXIA mport code use fewer spin locks to control access to
registers.  Make more effective use of the SRIO memory paging mechanism
to reduce the number of writes to memory.  Reorder some locks to allow
earlier access to outbound data structures in multi-threaded operation.
Reset TID MASK and DME TIMEOUT to improve throughput and reduce errors.
Use 'hook_fault_code' mechanism in ARM builds to eliminate crashes due
to references to undefined register locations.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
LSI AXM55xx: Fix spinlock issue and remove extraneous debug message.

Signed-off-by: Michael Bringmann <michael.bringmann@lsi.com>
Merge branch 'standard/lsi/base' into standard/preempt-rt/lsi/base
arch/powerpc: Axxia 3500 Bringup -- Temporary!

For now, hard code the UART divisors for 9600.

Signed-off-by: John Jacques <john.jacques@lsi.com>