linux_dsm_epyc7002/arch/arm/include/asm
Victor Kamensky 139cc2ba74 ARM: 7882/1: mm: fix __phys_to_virt to work with 64 bit phys_addr_t in BE case
Make sure that inline assembler that expects 'r' operand
receives 32 bit value.

Before this fix in case of CONFIG_ARCH_PHYS_ADDR_T_64BIT and
CONFIG_ARM_PATCH_PHYS_VIRT __phys_to_virt function passed 64 bit
value to __pv_stub inline assembler where 'r' operand is
expected. Compiler behavior in such case is not well specified.
It worked in little endian case, but in big endian case
incorrect code was generated, where compiler confused which
part of 64 bit value it needed to modify. For example BE
snippet looked like this:

N:0x80904E08 : MOV      r2,#0
N:0x80904E0C : SUB      r2,r2,#0x81000000

when LE similar code looked like this

N:0x808FCE2C : MOV      r2,r0
N:0x808FCE30 : SUB      r2,r2,#0xc0, 8 ; #0xc0000000

Note 'r0' register is va that have to be translated into phys

To avoid this situation use explicit cast to 'unsigned long',
which explicitly discard upper part of phys address and convert
value to 32 bit. Also add comment so such cast will not be
removed in the future.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-11-14 11:13:08 +00:00
..
hardware Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
mach Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
xen xen/arm and xen/arm64: implement HYPERVISOR_tmem_op 2013-07-04 11:41:12 +00:00
arch_timer.h ARM: arch_timer: add support to configure and enable event stream 2013-09-26 09:47:26 +01:00
asm-offsets.h
assembler.h ARM: asm: Add ARM_BE8() assembly helper 2013-10-19 20:46:33 +01:00
atomic.h Merge branch 'devel-stable' into for-next 2013-11-12 10:58:59 +00:00
barrier.h ARM: barrier: allow options to be passed to memory barrier instructions 2013-08-12 12:25:44 +01:00
bitops.h
bL_switcher.h ARM: bL_switcher: Add query interface to discover CPU affinities 2013-09-23 18:47:31 -04:00
bug.h ARM: Correct BUG() assembly to ensure it is endian-agnostic 2013-10-19 20:46:35 +01:00
bugs.h
cache.h
cacheflush.h ARM: 7861/1: cacheflush: consolidate single-CPU ARMv7 cache disabling code 2013-10-29 11:06:23 +00:00
cachetype.h
checksum.h
clkdev.h
cmpxchg.h ARM: 7853/1: cmpxchg: implement cmpxchg64_relaxed 2013-10-29 11:06:09 +00:00
compiler.h
cp15.h Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-07-03 09:46:29 -07:00
cpu.h
cpuidle.h
cputype.h ARM: 7855/1: Add check for Cortex-A15 errata 798181 ECO 2013-10-29 11:06:13 +00:00
cti.h ARM: coresight: common definition for (OS) Lock Access Register key value 2013-01-10 21:13:05 +00:00
delay.h ARM: 7685/1: delay: use private ticks_per_jiffy field for timer-based delay ops 2013-04-03 16:45:50 +01:00
device.h ARM: dma-mapping: Add macro to_dma_iommu_mapping() 2013-02-25 15:30:41 +01:00
div64.h ARM: 7705/1: use optimized do_div only for EABI 2013-05-15 19:35:53 +01:00
dma-contiguous.h drivers: dma-contiguous: clean source code and prepare for device tree 2013-08-27 09:18:29 +02:00
dma-iommu.h ARM: dma-mapping: Add arm_iommu_detach_device() 2013-02-25 15:30:41 +01:00
dma-mapping.h ARM: 7805/1: mm: change max*pfn to include the physical offset of memory 2013-10-31 14:49:29 +00:00
dma.h ARM: disable virt_to_bus/virt_to_bus almost everywhere 2013-02-14 15:04:33 +01:00
domain.h
ecard.h
edac.h
elf.h Move the EM_ARM and EM_AARCH64 definitions to uapi/linux/elf-em.h 2013-09-02 16:35:50 +01:00
entry-macro-multi.S
exception.h
fb.h
fiq.h
firmware.h ARM: Add interface for registering and calling firmware-specific operations 2013-04-09 01:52:06 +09:00
fixmap.h
flat.h
floppy.h
fncpy.h
fpstate.h
ftrace.h
futex.h
glue-cache.h Merge branch 'for-next' of git://git.pengutronix.de/git/ukl/linux into devel-stable 2013-05-22 10:52:24 +01:00
glue-df.h ARM: Add base support for ARMv7-M 2013-04-17 21:38:10 +02:00
glue-pf.h
glue-proc.h ARM SoC specific changes 2013-07-02 13:43:38 -07:00
glue.h
gpio.h
hardirq.h Merge branch 'devel-stable' into for-next 2013-11-12 10:58:59 +00:00
highmem.h ARM: 7684/1: errata: Workaround for Cortex-A15 erratum 798181 (TLBI/DSB operations) 2013-04-03 16:45:49 +01:00
hugetlb-3level.h ARM: mm: HugeTLB support for LPAE systems. 2013-06-04 16:52:37 +01:00
hugetlb.h ARM: mm: HugeTLB support for LPAE systems. 2013-06-04 16:52:37 +01:00
hw_breakpoint.h ARM: hw_breakpoint: Check function for OS Save and Restore mechanism 2013-01-10 21:13:06 +00:00
hw_irq.h
hwcap.h
hypervisor.h
ide.h
idmap.h ARM: KVM: move to a KVM provided HYP idmap 2013-04-28 22:23:08 -07:00
io.h ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions 2013-05-23 00:09:44 +01:00
irq.h arm: Move the set_handle_irq and handle_arch_irq declarations to asm/irq.h 2013-03-26 16:11:20 +00:00
irqflags.h ARM: Add base support for ARMv7-M 2013-04-17 21:38:10 +02:00
jump_label.h compiler/gcc4: Add quirk for 'asm goto' miscompilation bug 2013-10-11 07:39:14 +02:00
Kbuild Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 08:51:29 +09:00
kexec.h
kgdb.h ARM: kdgb: use <asm/opcodes.h> for data to be assembled as intruction 2013-10-19 20:46:35 +01:00
kmap_types.h
kprobes.h
kvm_arm.h ARM: KVM: get rid of S2_PGD_SIZE 2013-06-26 10:50:04 -07:00
kvm_asm.h ARM: KVM: perform save/restore of PAR 2013-06-26 10:50:04 -07:00
kvm_coproc.h KVM: ARM: User space API for getting/setting co-proc registers 2013-01-23 13:29:14 -05:00
kvm_emulate.h ARM: KVM: don't special case PC when doing an MMIO 2013-06-26 10:50:03 -07:00
kvm_host.h arm/kvm: Cleanup KVM_ARM_MAX_VCPUS logic 2013-06-26 10:50:05 -07:00
kvm_mmio.h KVM: ARM: Handle I/O aborts 2013-01-23 13:29:17 -05:00
kvm_mmu.h ARM: KVM: Fix kvm_set_pte assignment 2013-08-30 15:47:37 -07:00
kvm_psci.h KVM: ARM: Power State Coordination Interface implementation 2013-01-23 13:29:18 -05:00
limits.h
linkage.h
mach-types.h
mc146818rtc.h
mcpm.h Merge branch 'devel-stable' into for-next 2013-11-12 10:58:59 +00:00
memblock.h ARM: constify machine_desc structure uses 2013-07-26 14:55:59 +01:00
memory.h ARM: 7882/1: mm: fix __phys_to_virt to work with 64 bit phys_addr_t in BE case 2013-11-14 11:13:08 +00:00
mmu_context.h ARM: 7790/1: Fix deferred mm switch on VIVT processors 2013-07-26 12:02:09 +01:00
mmu.h ARM: tlb: ASID macro should give 32bit result for BE correct operation 2013-10-19 20:46:36 +01:00
module.h ARM: 7829/1: Add ".text.unlikely" and ".text.hot" to arm unwind tables 2013-09-02 13:49:47 +01:00
mpu.h ARM: mpu: protect the vectors page with an MPU region 2013-06-17 15:13:18 +01:00
mtd-xip.h
mutex.h
neon.h ARM: add support for kernel mode NEON 2013-07-08 22:08:51 +01:00
nwflash.h
opcodes-sec.h ARM: opcodes: add opcodes definitions for ARM security extensions 2013-01-10 21:10:20 +00:00
opcodes-virt.h
opcodes.h ARM: opcodes: add missing include of linux/linkage.h 2013-01-10 21:10:20 +00:00
outercache.h ARM: move outer_cache declaration out of ifdef 2013-08-22 20:48:41 -05:00
page-nommu.h
page.h ARM: make vectors page inaccessible from userspace 2013-08-01 14:31:58 +01:00
pci.h
percpu.h ARM: 7747/1: pcpu: ensure __my_cpu_offset cannot be re-ordered across barrier() 2013-06-05 23:35:56 +01:00
perf_event.h
pgalloc.h
pgtable-2level-hwdef.h
pgtable-2level-types.h
pgtable-2level.h ARM: 7858/1: mm: make UACCESS_WITH_MEMCPY huge page aware 2013-10-29 11:06:15 +00:00
pgtable-3level-hwdef.h Merge branch 'for-rmk/lpae' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable 2013-06-18 20:11:32 +01:00
pgtable-3level-types.h
pgtable-3level.h ARM: 7858/1: mm: make UACCESS_WITH_MEMCPY huge page aware 2013-10-29 11:06:15 +00:00
pgtable-hwdef.h
pgtable-nommu.h consolidate io_remap_pfn_range definitions 2013-06-29 12:46:35 +04:00
pgtable.h ARM: 7808/1: KVM: mm: Get rid of L_PTE_USER ref from PAGE_S2_DEVICE 2013-08-13 20:25:06 +01:00
pmu.h
proc-fns.h Merge branch 'for-rmk/lpae' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable 2013-06-18 20:11:32 +01:00
processor.h ARM: prefetch: add support for prefetchw using pldw on SMP ARMv7+ CPUs 2013-09-30 16:42:55 +01:00
procinfo.h
prom.h of: remove HAVE_ARCH_DEVTREE_FIXUPS 2013-10-09 20:04:08 -05:00
psci.h arm: introduce psci_smp_ops 2013-05-21 14:24:11 +00:00
ptrace.h ARM: Add base support for ARMv7-M 2013-04-17 21:38:10 +02:00
scatterlist.h
seccomp.h
setup.h ARM: 7863/1: Let arm_add_memory() always use 64-bit arguments 2013-10-29 11:06:28 +00:00
shmparam.h
signal.h arm: switch to generic old sigaction() 2013-02-03 18:15:47 -05:00
smp_plat.h ARM: 7807/1: kexec: validate CPU hotplug support 2013-08-13 20:23:18 +01:00
smp_scu.h ARM: scu: provide inline dummy functions when SCU is not present 2013-07-04 05:10:51 -07:00
smp_twd.h ARM: smp_twd: convert to use CLKSRC_OF init 2013-03-11 08:42:08 -05:00
smp.h ARM: SMP: basic IPI triggered completion support 2013-09-23 18:47:26 -04:00
sparsemem.h
spinlock_types.h ARM: locks: prefetch the destination word for write prior to strex 2013-09-30 16:42:55 +01:00
spinlock.h Merge branch 'devel-stable' into for-next 2013-11-12 10:58:59 +00:00
stackprotector.h
stacktrace.h
string.h
suspend.h ARM: kernel: implement stack pointer save array through MPIDR hashing 2013-06-20 11:24:11 +01:00
swab.h
switch_to.h ARM: spinlock: use inner-shareable dsb variant prior to sev instruction 2013-08-12 12:25:45 +01:00
sync_bitops.h
syscall.h ARM: 7851/1: check for number of arguments in syscall_get/set_arguments() 2013-10-13 18:54:33 +01:00
system_info.h ARM: Add base support for ARMv7-M 2013-04-17 21:38:10 +02:00
system_misc.h reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
system.h
tcm.h
therm.h
thread_info.h Merge branch 'for-rmk/cacheflush-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable 2013-08-28 18:38:40 +01:00
thread_notify.h
timex.h
tlb.h Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
tlbflush.h ARM: 7855/1: Add check for Cortex-A15 errata 798181 ECO 2013-10-29 11:06:13 +00:00
tls.h ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork 2013-06-24 15:21:59 +01:00
topology.h
traps.h
types.h ARM: 7822/1: add workaround for ambiguous C99 stdint.h types 2013-08-25 17:09:46 +01:00
uaccess.h ARM: 7836/1: add __get_user_unaligned/__put_user_unaligned 2013-09-18 10:58:23 +01:00
ucontext.h
unified.h ARM: smp_on_up: move inline asm ALT_SMP patching macro out of spinlock.h 2013-09-30 16:42:55 +01:00
unistd.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
unwind.h
user.h
v7m.h ARM: 7828/1: ARMv7-M: implement restart routine common to all v7-M machines 2013-09-02 13:49:29 +01:00
vfp.h
vfpmacros.h
vga.h
virt.h ARM: 7787/1: virt: ensure visibility of __boot_cpu_mode 2013-07-26 12:01:17 +01:00
word-at-a-time.h
xor.h ARM: crypto: add NEON accelerated XOR implementation 2013-07-08 22:09:06 +01:00