android_kernel_samsung_univ.../arch/arc
Vineet Gupta 49bd6aea00 ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS
commit 1c3c909303924d30145601f47b6c058fdd2cbc2e upstream.

|  CC      mm/memory.o
| In file included from ../mm/memory.c:53:0:
| ../include/linux/pfn_t.h: In function ‘pfn_t_pte’:
| ../include/linux/pfn_t.h:78:2: error: conversion to non-scalar type requested
|  return pfn_pte(pfn_t_to_pfn(pfn), pgprot);

With STRICT_MM_TYPECHECKS pte_t is a struct and the offending code
forces a cast which ends up shifting a struct and hence the gcc warning.

Note that in recent past some of the arches (aarch64, s390) made
STRICT_MM_TYPECHECKS default, but we don't for ARC as this leads to slightly
worse generated code, given ARC ABI definition of returning structs
(which pte_t would become)

Quoting from ARC ABI...

  "Results of type struct are returned in a caller-supplied temporary
  variable whose address is passed in r0.
  For such functions, the arguments are shifted so that they are
  passed in r1 and up."

So
 - struct to be returned would be allocated on stack requiring extra
   code at call sites
 - callee updates stack memory to facilitate the return (vs. simple
   MOV into return reg r0)

Hence STRICT_MM_TYPECHECKS is not enabled by default for ARC

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-24 10:07:37 +02:00
..
boot ARC: [plat-sim] unbork non default CONFIG_LINUX_LINK_BASE 2015-12-17 11:06:43 +05:30
configs ARC: switch to arc-linux- CROSS_COMPILE prefix across all configs 2015-11-16 12:00:09 +05:30
include ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS 2016-09-24 10:07:37 +02:00
kernel arc: unwind: warn only once if DW2_UNWIND is disabled 2016-08-10 11:49:25 +02:00
lib ARCv2: lib: memcpy: use local symbols 2015-11-03 17:33:00 +05:30
mm ARC: Elide redundant setup of DMA callbacks 2016-09-07 08:32:42 +02:00
oprofile
plat-axs10x ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp() 2015-10-28 16:13:41 +05:30
plat-sim ARC: remove extraneous header include 2015-11-14 13:11:38 +05:30
plat-tb10x
Kbuild
Kconfig ARCv2: LLSC: software backoff is NOT needed starting HS2.1c 2016-07-27 09:47:31 -07:00
Kconfig.debug
Makefile ARC: build: Better way to detect ISA compatible toolchain 2016-09-07 08:32:42 +02:00