13 Jan, 2012

1 commit

  • node_to_cpumask() has been replaced by cpumask_of_node(), and wholly
    removed since commit 29c337a0 ("cpumask: remove obsolete node_to_cpumask
    now everyone uses cpumask_of_node").

    So update the comments for setup_node_to_cpumask_map().

    Signed-off-by: Wanlong Gao
    Acked-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wanlong Gao
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

08 Jan, 2012

1 commit

  • * 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
    arm: fix up some samsung merge sysdev conversion problems
    firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
    Drivers:hv: Fix a bug in vmbus_driver_unregister()
    driver core: remove __must_check from device_create_file
    debugfs: add missing #ifdef HAS_IOMEM
    arm: time.h: remove device.h #include
    driver-core: remove sysdev.h usage.
    clockevents: remove sysdev.h
    arm: convert sysdev_class to a regular subsystem
    arm: leds: convert sysdev_class to a regular subsystem
    kobject: remove kset_find_obj_hinted()
    m86k: gpio - convert sysdev_class to a regular subsystem
    mips: txx9_sram - convert sysdev_class to a regular subsystem
    mips: 7segled - convert sysdev_class to a regular subsystem
    sh: dma - convert sysdev_class to a regular subsystem
    sh: intc - convert sysdev_class to a regular subsystem
    power: suspend - convert sysdev_class to a regular subsystem
    power: qe_ic - convert sysdev_class to a regular subsystem
    power: cmm - convert sysdev_class to a regular subsystem
    s390: time - convert sysdev_class to a regular subsystem
    ...

    Fix up conflicts with 'struct sysdev' removal from various platform
    drivers that got changed:
    - arch/arm/mach-exynos/cpu.c
    - arch/arm/mach-exynos/irq-eint.c
    - arch/arm/mach-s3c64xx/common.c
    - arch/arm/mach-s3c64xx/cpu.c
    - arch/arm/mach-s5p64x0/cpu.c
    - arch/arm/mach-s5pv210/common.c
    - arch/arm/plat-samsung/include/plat/cpu.h
    - arch/powerpc/kernel/sysfs.c
    and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h

    Linus Torvalds
     

07 Jan, 2012

2 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (185 commits)
    powerpc: fix compile error with 85xx/p1010rdb.c
    powerpc: fix compile error with 85xx/p1023_rds.c
    powerpc/fsl: add MSI support for the Freescale hypervisor
    arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree
    powerpc/fsl: Add support for Integrated Flash Controller
    powerpc/fsl: update compatiable on fsl 16550 uart nodes
    powerpc/85xx: fix PCI and localbus properties in p1022ds.dts
    powerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig
    powerpc/fsl: Update defconfigs to enable some standard FSL HW features
    powerpc: Add TBI PHY node to first MDIO bus
    sbc834x: put full compat string in board match check
    powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address
    powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit
    offb: Fix setting of the pseudo-palette for >8bpp
    offb: Add palette hack for qemu "standard vga" framebuffer
    offb: Fix bug in calculating requested vram size
    powerpc/boot: Change the WARN to INFO for boot wrapper overlap message
    powerpc/44x: Fix build error on currituck platform
    powerpc/boot: Change the load address for the wrapper to fit the kernel
    powerpc/44x: Enable CRASH_DUMP for 440x
    ...

    Fix up a trivial conflict in arch/powerpc/include/asm/cputime.h due to
    the additional sparse-checking code for cputime_t.

    Linus Torvalds
     
  • This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
    and it fixes the build error in the arch/x86/kernel/microcode_core.c
    file, that the merge did not catch.

    The microcode_core.c patch was provided by Stephen Rothwell
    who was invaluable in the merge issues involved
    with the large sysdev removal process in the driver-core tree.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Dec, 2011

1 commit

  • This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
    and converts the devices to regular devices. The sysdev drivers are
    implemented as subsystem interfaces now.

    After all sysdev classes are ported to regular driver core entities, the
    sysdev implementation will be entirely removed from the kernel.

    Userspace relies on events and generic sysfs subsystem infrastructure
    from sysdev devices, which are made available with this conversion.

    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Borislav Petkov
    Cc: Tigran Aivazian
    Cc: Len Brown
    Cc: Zhang Rui
    Cc: Dave Jones
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: "Rafael J. Wysocki"
    Cc: "Srivatsa S. Bhat"
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

20 Dec, 2011

2 commits

  • We find the runtime address of _stext and relocate ourselves based
    on the following calculation.

    virtual_base = ALIGN(KERNELBASE,KERNEL_TLB_PIN_SIZE) +
    MODULO(_stext.run,KERNEL_TLB_PIN_SIZE)

    relocate() is called with the Effective Virtual Base Address (as
    shown below)

    | Phys. Addr| Virt. Addr |
    Page |------------------------|
    Boundary | | |
    | | |
    | | |
    Kernel Load |___________|_ __ _ _ _ _|
    Cc: Benjamin Herrenschmidt
    Cc: Kumar Gala
    Cc: linuxppc-dev
    Signed-off-by: Josh Boyer

    Suzuki Poulose
     
  • The current implementation of CONFIG_RELOCATABLE in BookE is based
    on mapping the page aligned kernel load address to KERNELBASE. This
    approach however is not enough for platforms, where the TLB page size
    is large (e.g, 256M on 44x). So we are renaming the RELOCATABLE used
    currently in BookE to DYNAMIC_MEMSTART to reflect the actual method.

    The CONFIG_RELOCATABLE for PPC32(BookE) based on processing of the
    dynamic relocations will be introduced in the later in the patch series.

    This change would allow the use of the old method of RELOCATABLE for
    platforms which can afford to enforce the page alignment (platforms with
    smaller TLB size).

    Changes since v3:

    * Introduced a new config, NONSTATIC_KERNEL, to denote a kernel which is
    either a RELOCATABLE or DYNAMIC_MEMSTART(Suggested by: Josh Boyer)

    Suggested-by: Scott Wood
    Tested-by: Scott Wood

    Signed-off-by: Suzuki K. Poulose
    Cc: Scott Wood
    Cc: Kumar Gala
    Cc: Josh Boyer
    Cc: Benjamin Herrenschmidt
    Cc: linux ppc dev
    Signed-off-by: Josh Boyer

    Suzuki Poulose
     

19 Dec, 2011

2 commits


16 Dec, 2011

1 commit


09 Dec, 2011

4 commits

  • CONFIG_PPC47x doesn't exist in Kconfig and no 476 processor calls this
    function ppc44x_pin_tlb() as it has it's own ppc47x_pin_tlb().

    This code is probably an artifact of the original 476 code that
    shouldn't have made it upstream.

    Signed-off-by: Christoph Egger
    Signed-off-by: Tony Breeds
    Signed-off-by: Josh Boyer

    Christoph Egger
     
  • powerpc doesn't access early_node_map[] directly and enabling
    HAVE_MEMBLOCK_NODE_MAP is trivial - replacing add_active_range() calls
    with memblock_set_node() and selecting HAVE_MEMBLOCK_NODE_MAP is
    enough.

    Signed-off-by: Tejun Heo
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu

    Tejun Heo
     
  • The only function of memblock_analyze() is now allowing resize of
    memblock region arrays. Rename it to memblock_allow_resize() and
    update its users.

    * The following users remain the same other than renaming.

    arm/mm/init.c::arm_memblock_init()
    microblaze/kernel/prom.c::early_init_devtree()
    powerpc/kernel/prom.c::early_init_devtree()
    openrisc/kernel/prom.c::early_init_devtree()
    sh/mm/init.c::paging_init()
    sparc/mm/init_64.c::paging_init()
    unicore32/mm/init.c::uc32_memblock_init()

    * In the following users, analyze was used to update total size which
    is no longer necessary.

    powerpc/kernel/machine_kexec.c::reserve_crashkernel()
    powerpc/kernel/prom.c::early_init_devtree()
    powerpc/mm/init_32.c::MMU_init()
    powerpc/mm/tlb_nohash.c::__early_init_mmu()
    powerpc/platforms/ps3/mm.c::ps3_mm_add_memory()
    powerpc/platforms/embedded6xx/wii.c::wii_memory_fixups()
    sh/kernel/machine_kexec.c::reserve_crashkernel()

    * x86/kernel/e820.c::memblock_x86_fill() was directly setting
    memblock_can_resize before populating memblock and calling analyze
    afterwards. Call memblock_allow_resize() before start populating.

    memblock_can_resize is now static inside memblock.c.

    Signed-off-by: Tejun Heo
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu
    Cc: Russell King
    Cc: Michal Simek
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Cc: "H. Peter Anvin"

    Tejun Heo
     
  • * early_init_devtree(): Total memory size is aligned to PAGE_SIZE;
    however, alignment isn't enforced if memory_limit is explicitly
    specified. Simplify the logic and always apply PAGE_SIZE alignment.

    * MMU_init(): memblock regions is truncated by directly modifying
    memblock.memory.cnt. This is incomplete (reserved array is not
    truncated) and unnecessarily low level hindering further memblock
    improvments. Use memblock_enforce_memory_limit() instead.

    * wii_memory_fixups(): Unnecessarily low level direct manipulation of
    memblock regions. The same result can be achieved using properly
    abstracted operations. Reimplement using memblock API.

    Signed-off-by: Tejun Heo
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu

    Tejun Heo
     

08 Dec, 2011

1 commit

  • With CONFIG_STRICT_DEVMEM=y, user space cannot read any part of /dev/mem.
    Since this breaks librtas, punch a hole in /dev/mem to allow access to the
    rmo_buffer that librtas needs.

    Anton Blanchard reported the problem and helped with the fix.

    A quick test for this patch:

    # cat /proc/rtas/rmo_buffer
    000000000f190000 10000

    # python -c "print 0x000000000f190000 / 0x10000"
    3865

    # dd if=/dev/mem of=/tmp/foo count=1 bs=64k skip=3865
    1+0 records in
    1+0 records out
    65536 bytes (66 kB) copied, 0.000205235 s, 319 MB/s

    # dd if=/dev/mem of=/tmp/foo
    dd: reading `/dev/mem': Operation not permitted
    0+0 records in
    0+0 records out
    0 bytes (0 B) copied, 0.00022519 s, 0.0 kB/s

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Benjamin Herrenschmidt

    sukadev@linux.vnet.ibm.com
     

07 Dec, 2011

8 commits


02 Dec, 2011

1 commit


29 Nov, 2011

1 commit

  • Conflicts & resolutions:

    * arch/x86/xen/setup.c

    dc91c728fd "xen: allow extra memory to be in multiple regions"
    24aa07882b "memblock, x86: Replace memblock_x86_reserve/free..."

    conflicted on xen_add_extra_mem() updates. The resolution is
    trivial as the latter just want to replace
    memblock_x86_reserve_range() with memblock_reserve().

    * drivers/pci/intel-iommu.c

    166e9278a3f "x86/ia64: intel-iommu: move to drivers/iommu/"
    5dfe8660a3d "bootmem: Replace work_with_active_regions() with..."

    conflicted as the former moved the file under drivers/iommu/.
    Resolved by applying the chnages from the latter on the moved
    file.

    * mm/Kconfig

    6661672053a "memblock: add NO_BOOTMEM config symbol"
    c378ddd53f9 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"

    conflicted trivially. Both added config options. Just
    letting both add their own options resolves the conflict.

    * mm/memblock.c

    d1f0ece6cdc "mm/memblock.c: small function definition fixes"
    ed7b56a799c "memblock: Remove memblock_memory_can_coalesce()"

    confliected. The former updates function removed by the
    latter. Resolution is trivial.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

28 Nov, 2011

2 commits

  • Since commit 8a0a9bd4db63bc45e301, this comment in mmap_rnd() does not
    hold true as the value returned by get_random_int() will in fact be

    different every single call. Remove the comment and simplify the code
    back to its original desired form.

    This reverts commit a5adc91a4b44b5d1 which is no longer necessary and
    also fixes the sparc code that copied this same adjustment.

    Signed-off-by: Dan McGee
    Acked-by: David S. Miller
    Signed-off-by: Benjamin Herrenschmidt

    Dan McGee
     
  • As described in the help text in the patch, this token restricts general
    access to /dev/mem as a way of increasing the security. Specifically, access
    to exclusive IOMEM and kernel RAM is denied unless CONFIG_STRICT_DEVMEM is
    set to 'n'.

    Implement the 'devmem_is_allowed()' interface for Powerpc. It will be
    called from range_is_allowed() when userpsace attempts to access /dev/mem.

    This patch is based on an earlier patch from Steve Best and with input from
    Paul Mackerras and Scott Wood.

    [BenH] Fixed a typo or two and removed the generic change which should
    be submitted as a separate patch

    Signed-off-by: Sukadev Bhattiprolu
    Signed-off-by: Benjamin Herrenschmidt

    sukadev@linux.vnet.ibm.com
     

25 Nov, 2011

3 commits

  • This patch adds a fault handler that responds to illegal Coprocessor
    types. Currently all CTs are treated and illegal. There are two ways
    to report the fault back to the application. If the application used
    the record form ("icswx.") then the architected "reject" is emulated.
    If the application did not used the record form ("icswx") then it is
    selectable by config whether the failure is silent (as architected) or
    a SIGILL is generated.

    In all cases pr_warn() is used to log the bad CT.

    Signed-off-by: Jimi Xenidis
    Signed-off-by: Benjamin Herrenschmidt

    Jimi Xenidis
     
  • Some processors, like embedded, that already have a PID register that
    is managed by the system. This patch separates the ACOP and PID
    processing into separate files so that the ACOP code can be shared.

    Signed-off-by: Jimi Xenidis
    Signed-off-by: Benjamin Herrenschmidt

    Jimi Xenidis
     
  • arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages':
    arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args'

    Signed-off-by: Kumar Gala
    Signed-off-by: Benjamin Herrenschmidt

    Kumar Gala
     

08 Nov, 2011

2 commits

  • This patch adds support for numa topology on powernv platforms running
    OPAL formware. It checks for the type of platform at run time and
    sets the affinity form correctly so that NUMA topology can be discovered
    correctly.

    Signed-off-by: Dipankar Sarma
    Signed-off-by: Benjamin Herrenschmidt

    Dipankar Sarma
     
  • We've resisted adding System RAM to /proc/iomem because it is
    the wrong place for it. Unfortunately we continue to find tools
    that rely on this behaviour so give up and add it in.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     

07 Nov, 2011

2 commits

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (106 commits)
    powerpc/p3060qds: Add support for P3060QDS board
    powerpc/83xx: Add shutdown request support to MCU handling on MPC8349 MITX
    powerpc/85xx: Make kexec to interate over online cpus
    powerpc/fsl_booke: Fix comment in head_fsl_booke.S
    powerpc/85xx: issue 15 EOI after core reset for FSL CoreNet devices
    powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO driver
    powerpc/85xx: Add 'fsl,pq3-gpio' compatiable for GPIO driver
    powerpc/86xx: Correct Gianfar support for GE boards
    powerpc/cpm: Clear muram before it is in use.
    drivers/virt: add ioctl for 32-bit compat on 64-bit to fsl-hv-manager
    powerpc/fsl_msi: add support for "msi-address-64" property
    powerpc/85xx: Setup secondary cores PIR with hard SMP id
    powerpc/fsl-booke: Fix settlbcam for 64-bit
    powerpc/85xx: Adding DCSR node to dtsi device trees
    powerpc/85xx: clean up FPGA device tree nodes for Freecsale QorIQ boards
    powerpc/85xx: fix PHYS_64BIT selection for P1022DS
    powerpc/fsl-booke: Fix setup_initial_memory_limit to not blindly map
    powerpc: respect mem= setting for early memory limit setup
    powerpc: Update corenet64_smp_defconfig
    powerpc: Update mpc85xx/corenet 32-bit defconfigs
    ...

    Fix up trivial conflicts in:
    - arch/powerpc/configs/40x/hcu4_defconfig
    removed stale file, edited elsewhere
    - arch/powerpc/include/asm/udbg.h, arch/powerpc/kernel/udbg.c:
    added opal and gelic drivers vs added ePAPR driver
    - drivers/tty/serial/8250.c
    moved UPIO_TSI to powerpc vs removed UPIO_DWAPB support

    Linus Torvalds
     

03 Nov, 2011

5 commits

  • This avoids duplicating the function in every arch gup_fast.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • powerpc didn't return 0 in that case, if it's rolling back the *nr pointer
    it should also return zero to avoid adding pages to the array at the wrong
    offset.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Acked-by: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Up to this point the code assumed old refcounting for hugepages (pre-thp).
    This updates the code directly to the thp mapcount tail page refcounting.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • We only taken "refs" pins on the head page not "*nr" pins.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Acked-by: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • "page" may have changed to point to the next hugepage after the loop
    completed, The references have been taken on the head page, so the
    put_page must happen there too.

    This is a longstanding issue pre-thp inclusion.

    It's totally unclear how these page_cache_add_speculative and
    pte_val(pte) != pte_val(*ptep) checks are necessary across all the
    powerpc gup_fast code, when x86 doesn't need any of that: there's no way
    the page can be freed with irq disabled so we're guaranteed the
    atomic_inc will happen on a page with page_count > 0 (so not needing the
    speculative check).

    The pte check is also meaningless on x86: no need to rollback on x86 if
    the pte changed, because the pte can still change a CPU tick after the
    check succeeded and it won't be rolled back in that case. The important
    thing is we got a reference on a valid page that was mapped there a CPU
    tick ago. So not knowing the soft tlb refill code of ppc64 in great
    detail I'm not removing the "speculative" page_count increase and the
    pte checks across all the code, but unless there's a strong reason for
    it they should be later cleaned up too.

    If a pte can change from huge to non-huge (like it could happen with
    THP) passing a pte_t *ptep to gup_hugepte() would also require to repeat
    the is_hugepd in gup_hugepte(), but that shouldn't happen with hugetlbfs
    only so I'm not altering that.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Acked-by: David Gibson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli