linux-stable/arch/sh/include/asm
Geert Uytterhoeven e8e9f1e632 sh: pgtable-3level: fix cast to pointer from integer of different size
If X2TLB=y (CPU_SHX2=y or CPU_SHX3=y, e.g. migor_defconfig), pgd_t.pgd
is "unsigned long long", causing:

    In file included from arch/sh/include/asm/pgtable.h:13,
		     from include/linux/pgtable.h:6,
		     from include/linux/mm.h:33,
		     from arch/sh/kernel/asm-offsets.c:14:
    arch/sh/include/asm/pgtable-3level.h: In function `pud_pgtable':
    arch/sh/include/asm/pgtable-3level.h:37:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       37 |  return (pmd_t *)pud_val(pud);
	  |         ^

Fix this by adding an intermediate cast to "unsigned long", which is
basically what the old code did before.

Link: https://lkml.kernel.org/r/2c2eef3c9a2f57e5609100a4864715ccf253d30f.1631713483.git.geert+renesas@glider.be
Fixes: 9cf6fa2458 ("mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Daniel Palmer <daniel@thingy.jp>
Acked-by: Rob Landley <rob@landley.net>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Cc: Rich Felker <dalias@libc.org>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-24 16:13:35 -07:00
..
adc.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
addrspace.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
alignment.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
asm-offsets.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
atomic-grb.h locking/atomic: sh: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
atomic-irq.h locking/atomic: sh: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
atomic-llsc.h locking/atomic: sh: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
atomic.h locking/atomic: sh: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
barrier.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bitops-cas.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bitops-grb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bitops-llsc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bitops-op32.h sh: use __builtin_constant_p() directly instead of IS_IMMEDIATE() 2020-04-09 00:01:58 +09:00
bitops.h arch: rearrange headers inclusion order in asm/bitops for m68k, sh and h8300 2021-05-06 19:24:11 -07:00
bl_bit.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
bl_bit_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bugs.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
cache.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cache_insns.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
cache_insns_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cacheflush.h mm: remove flush_kernel_dcache_page 2021-09-03 09:58:13 -07:00
checksum.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
checksum_32.h sh: propage the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:18 -04:00
clock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg-cas.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg-grb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg-irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg-llsc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg-xchg.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cmpxchg.h locking/atomic: sh: move to ARCH_ATOMIC 2021-05-26 13:20:52 +02:00
device.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
dma-register.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
dma.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
dmabrg.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dwarf.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
elf.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
entry-macros.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extable.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
fb.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
fixmap.h sh/highmem: Remove all traces of unused cruft 2020-11-06 23:14:54 +01:00
flat.h binfmt_flat: remove the persistent argument from flat_get_addr_from_rp 2019-06-24 09:16:47 +10:00
fpu.h kill unused dump_fpu() instances 2020-07-27 14:33:10 -04:00
freq.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
ftrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
futex-cas.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
futex-irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
futex-llsc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
futex.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
gpio.h sh: Drop ARCH_NR_GPIOS definition 2021-01-06 19:55:27 -05:00
hardirq.h sh: irqstat: Use the generic irq_cpustat_t 2020-11-23 10:31:06 +01:00
hd64461.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
heartbeat.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hugetlb.h mm/hugetlb: define a generic fallback for arch_clear_hugepage_flags() 2020-06-03 20:09:46 -07:00
hw_breakpoint.h perf/hw_breakpoint: Remove default hw_breakpoint_arch_parse() 2018-06-26 09:07:58 +02:00
hw_irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i2c-sh7760.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.h mm: remove xlate_dev_kmem_ptr() 2021-05-07 00:26:34 -07:00
io_generic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io_noioport.h sh: Convert ins[bwl]/outs[bwl] macros to inline functions 2020-06-01 14:48:50 -04:00
io_trapped.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.h softirq: Move __ARCH_HAS_DO_SOFTIRQ to Kconfig 2021-02-10 23:34:16 +01:00
irqflags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
kdebug.h Revert "sh: add loglvl to printk_address()" 2020-08-14 22:05:07 -04:00
kexec.h sh: prefer _THIS_IP_ to current_text_addr 2018-08-17 16:20:27 -07:00
kgdb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kprobes.h sh/kprobes: Remove jprobe implementation 2018-06-21 12:33:11 +02:00
linkage.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
machvec.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
mmiowb.h sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() 2019-04-08 12:00:21 +01:00
mmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu_context.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmu_context_32.h sh: use asm-generic/mmu_context.h for no-op implementations 2020-10-27 16:02:38 +01:00
mmzone.h mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
page.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
pci.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
perf_event.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pgalloc.h mm/thp: define default pmd_pgtable() 2021-07-01 11:06:03 -07:00
pgtable-2level.h sh: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
pgtable-3level.h sh: pgtable-3level: fix cast to pointer from integer of different size 2021-09-24 16:13:35 -07:00
pgtable.h mm: define default value for FIRST_USER_ADDRESS 2021-07-01 11:06:02 -07:00
pgtable_32.h mm: consolidate pte_index() and pte_offset_*() definitions 2020-06-09 09:39:14 -07:00
platform_early.h sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
posix_types.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
processor.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
processor_32.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
ptrace.h sh: don't use asm-generic/ptrace.h 2019-07-01 17:51:40 +02:00
ptrace_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
push-switch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reboot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
romimage-macros.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rtc.h sh: remove board_time_init() callback 2018-12-18 16:13:04 +01:00
seccomp.h sh: Enable seccomp architecture tracking 2020-11-20 11:16:35 -08:00
sections.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
segment.h uaccess: remove segment_eq 2020-08-12 10:57:58 -07:00
setup.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sfp-machine.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sh7760fb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sh_bios.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
shmparam.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
siu.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
smc37c93x.h arch: sh: smc37c93x: fix spelling mistake 2020-08-14 22:05:05 -04:00
smp-ops.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparsemem.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
spi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock-cas.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
spinlock-llsc.h sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock() 2019-04-08 12:00:21 +01:00
spinlock.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
spinlock_types.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sram.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stackprotector.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stacktrace.h sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
string.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
string_32.h Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
suspend.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
switch_to.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
switch_to_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
syscall_32.h sh: bring syscall_set_return_value in line with other architectures 2020-08-14 22:05:20 -04:00
syscalls.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
syscalls_32.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
thread_info.h sh: add support for TIF_NOTIFY_SIGNAL 2020-11-09 08:16:55 -07:00
timex.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tlb.h arch/sh/include/asm/tlb.h: remove duplicate include 2021-04-30 11:20:35 -07:00
tlbflush.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
topology.h arch/sh/include/asm/topology.h: remove unused parent_node() macro 2017-11-17 16:10:04 -08:00
traps.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
traps_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
uaccess.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
uaccess_32.h sh: Implement __get_user_u64() required for 64-bit get_user() 2020-08-14 22:05:04 -04:00
uncached.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
unistd.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
unwinder.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
user.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
vermagic.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
vga.h sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vmlinux.lds.h sh: remove sh5 support 2020-06-01 14:48:52 -04:00
watchdog.h sh: remove __KERNEL__ ifdefs from non-UAPI headers 2020-08-14 22:05:14 -04:00
word-at-a-time.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00