linux/arch/um/include/asm
Nicolai Stange 012a4163be um: asm/page.h: remove the pte_high member from struct pte_t
Commit 16da306849 ("um: kill pfn_t") introduced a compile warning for
defconfig (SUBARCH=i386):

  arch/um/kernel/skas/mmu.c:38:206:
      warning: right shift count >= width of type [-Wshift-count-overflow]

Aforementioned patch changes the definition of the phys_to_pfn() macro
from

  ((pfn_t) ((p) >> PAGE_SHIFT))

to

  ((p) >> PAGE_SHIFT)

This effectively changes the phys_to_pfn() expansion's type from
unsigned long long to unsigned long.

Through the callchain init_stub_pte() => mk_pte(), the expansion of
phys_to_pfn() is (indirectly) fed into the 'phys' argument of the
pte_set_val(pte, phys, prot) macro, eventually leading to

  (pte).pte_high = (phys) >> 32;

This results in the warning from above.

Since UML only deals with 32 bit addresses, the upper 32 bits from
'phys' used to be always zero anyway.  Also, all page protection flags
defined by UML don't use any bits beyond bit 9.  Since the contents of a
PTE are defined within architecture scope only, the ->pte_high member
can be safely removed.

Remove the ->pte_high member from struct pte_t.
Rename ->pte_low to ->pte.
Adapt the pte helper macros in arch/um/include/asm/page.h.

Noteworthy is the pte_copy() macro where a smp_wmb() gets dropped.  This
write barrier doesn't seem to be paired with any read barrier though and
thus, was useless anyway.

Fixes: 16da306849 ("um: kill pfn_t")
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-05 18:10:40 -08:00
..
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
a.out-core.h
bugs.h
cache.h
common.lds.S UML: normalize global variables exported by vmlinux.lds 2013-07-03 16:07:34 -07:00
dma.h um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
fixmap.h um: Remove broken highmem support 2015-04-13 21:01:02 +02:00
hardirq.h um: Do not change hard IRQ flags in soft IRQ processing 2016-01-10 21:49:48 +01:00
irq.h
irqflags.h um: kill system-um.h 2011-11-02 14:15:34 +01:00
kmap_types.h um: remove km_type definitions 2012-07-24 15:27:31 +08:00
kvm_para.h kvmclock: Add functions to check if the host has stopped the vm 2012-04-08 12:48:59 +03:00
mmu.h um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
mmu_context.h mm: Make arch_unmap()/bprm_mm_init() available to all architectures 2014-11-19 11:54:13 +01:00
page.h um: asm/page.h: remove the pte_high member from struct pte_t 2016-02-05 18:10:40 -08:00
pgalloc.h um: remove pointless include of asm/fixmap.h from asm/pgtable.h 2012-03-25 00:29:55 +01:00
pgtable-2level.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
pgtable-3level.h um: kill pfn_t 2016-01-15 17:56:32 -08:00
pgtable.h um: kill pfn_t 2016-01-15 17:56:32 -08:00
processor-generic.h um: Remove broken SMP support 2015-04-13 21:00:58 +02:00
ptrace-generic.h um: Define PTRACE_OLDSETOPTIONS 2015-11-06 22:49:09 +01:00
sections.h um: Use char[] for linker script address declarations 2015-05-31 13:14:06 +02:00
setup.h
smp.h um: Remove broken SMP support 2015-04-13 21:00:58 +02:00
stacktrace.h um: Add support for CONFIG_STACKTRACE 2014-10-13 21:46:25 +02:00
syscall-generic.h um: Add full asm/syscall.h support 2016-01-10 21:49:49 +01:00
sysrq.h um: move sysrq.h out of include/shared 2012-10-09 22:28:19 +02:00
thread_info.h um: Add seccomp support 2016-01-10 21:49:49 +01:00
timex.h
tlb.h mm: split 'tlb_flush_mmu()' into tlb flushing and memory freeing parts 2014-04-25 16:05:40 -07:00
tlbflush.h
uaccess.h um: Rework uaccess code 2015-05-31 17:32:36 +02:00