]> Git Repo - linux.git/commitdiff
Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
authorLinus Torvalds <[email protected]>
Thu, 7 Sep 2017 17:15:40 +0000 (10:15 -0700)
committerLinus Torvalds <[email protected]>
Thu, 7 Sep 2017 17:15:40 +0000 (10:15 -0700)
Pull powerpc updates from Michael Ellerman:
 "Nothing really major this release, despite quite a lot of activity.
  Just lots of things all over the place.

  Some things of note include:

   - Access via perf to a new type of PMU (IMC) on Power9, which can
     count both core events as well as nest unit events (Memory
     controller etc).

   - Optimisations to the radix MMU TLB flushing, mostly to avoid
     unnecessary Page Walk Cache (PWC) flushes when the structure of the
     tree is not changing.

   - Reworks/cleanups of do_page_fault() to modernise it and bring it
     closer to other architectures where possible.

   - Rework of our page table walking so that THP updates only need to
     send IPIs to CPUs where the affected mm has run, rather than all
     CPUs.

   - The size of our vmalloc area is increased to 56T on 64-bit hash MMU
     systems. This avoids problems with the percpu allocator on systems
     with very sparse NUMA layouts.

   - STRICT_KERNEL_RWX support on PPC32.

   - A new sched domain topology for Power9, to capture the fact that
     pairs of cores may share an L2 cache.

   - Power9 support for VAS, which is a new mechanism for accessing
     coprocessors, and initial support for using it with the NX
     compression accelerator.

   - Major work on the instruction emulation support, adding support for
     many new instructions, and reworking it so it can be used to
     implement the emulation needed to fixup alignment faults.

   - Support for guests under PowerVM to use the Power9 XIVE interrupt
     controller.

  And probably that many things again that are almost as interesting,
  but I had to keep the list short. Plus the usual fixes and cleanups as
  always.

  Thanks to: Alexey Kardashevskiy, Alistair Popple, Andreas Schwab,
  Aneesh Kumar K.V, Anju T Sudhakar, Arvind Yadav, Balbir Singh,
  Benjamin Herrenschmidt, Bhumika Goyal, Breno Leitao, Bryant G. Ly,
  Christophe Leroy, Cédric Le Goater, Dan Carpenter, Dou Liyang,
  Frederic Barrat, Gautham R. Shenoy, Geliang Tang, Geoff Levand, Hannes
  Reinecke, Haren Myneni, Ivan Mikhaylov, John Allen, Julia Lawall,
  LABBE Corentin, Laurentiu Tudor, Madhavan Srinivasan, Markus Elfring,
  Masahiro Yamada, Matt Brown, Michael Neuling, Murilo Opsfelder Araujo,
  Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran,
  Paul Mackerras, Rashmica Gupta, Rob Herring, Rui Teng, Sam Bobroff,
  Santosh Sivaraj, Scott Wood, Shilpasri G Bhat, Sukadev Bhattiprolu,
  Suraj Jitindar Singh, Tobin C. Harding, Victor Aoqui"

* tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (321 commits)
  powerpc/xive: Fix section __init warning
  powerpc: Fix kernel crash in emulation of vector loads and stores
  powerpc/xive: improve debugging macros
  powerpc/xive: add XIVE Exploitation Mode to CAS
  powerpc/xive: introduce H_INT_ESB hcall
  powerpc/xive: add the HW IRQ number under xive_irq_data
  powerpc/xive: introduce xive_esb_write()
  powerpc/xive: rename xive_poke_esb() in xive_esb_read()
  powerpc/xive: guest exploitation of the XIVE interrupt controller
  powerpc/xive: introduce a common routine xive_queue_page_alloc()
  powerpc/sstep: Avoid used uninitialized error
  axonram: Return directly after a failed kzalloc() in axon_ram_probe()
  axonram: Improve a size determination in axon_ram_probe()
  axonram: Delete an error message for a failed memory allocation in axon_ram_probe()
  powerpc/powernv/npu: Move tlb flush before launching ATSD
  powerpc/macintosh: constify wf_sensor_ops structures
  powerpc/iommu: Use permission-specific DEVICE_ATTR variants
  powerpc/eeh: Delete an error out of memory message at init time
  powerpc/mm: Use seq_putc() in two functions
  macintosh: Convert to using %pOF instead of full_name
  ...

1  2 
MAINTAINERS
arch/powerpc/Kconfig
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/net/bpf_jit_comp64.c
arch/powerpc/platforms/powernv/npu-dma.c
drivers/tty/hvc/hvc_vio.c
include/linux/cpuhotplug.h
mm/hugetlb.c

diff --combined MAINTAINERS
index fb63e53ea3c8af52bb8dc34aac67826143b987e3,896e0e7117e5377fca32171a3ad5bd902df5aec2..29c0c2b47da72ed47f29201b657f5f185e97ca8a
@@@ -301,7 -301,6 +301,7 @@@ S: Supporte
  F:    drivers/acpi/
  F:    drivers/pnp/pnpacpi/
  F:    include/linux/acpi.h
 +F:    include/linux/fwnode.h
  F:    include/acpi/
  F:    Documentation/acpi/
  F:    Documentation/ABI/testing/sysfs-bus-acpi
@@@ -311,14 -310,6 +311,14 @@@ F:       drivers/pci/*/*acpi
  F:    drivers/pci/*/*/*acpi*
  F:    tools/power/acpi/
  
 +ACPI APEI
 +M:    "Rafael J. Wysocki" <[email protected]>
 +M:    Len Brown <[email protected]>
 +L:    [email protected]
 +R:    Tony Luck <[email protected]>
 +R:    Borislav Petkov <[email protected]>
 +F:    drivers/acpi/apei/
 +
  ACPI COMPONENT ARCHITECTURE (ACPICA)
  M:    Robert Moore <[email protected]>
  M:    Lv Zheng <[email protected]>
@@@ -1162,7 -1153,6 +1162,7 @@@ L:      [email protected]
  F:    arch/arm/mach-artpec
  F:    arch/arm/boot/dts/artpec6*
  F:    drivers/clk/axis
 +F:    drivers/crypto/axis
  F:    drivers/pinctrl/pinctrl-artpec*
  F:    Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
  
@@@ -1171,7 -1161,7 +1171,7 @@@ M:      Brendan Higgins <brendanhiggins@goog
  R:    Benjamin Herrenschmidt <[email protected]>
  R:    Joel Stanley <[email protected]>
  L:    [email protected]
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/irqchip/irq-aspeed-i2c-ic.c
  F:    drivers/i2c/busses/i2c-aspeed.c
@@@ -1292,15 -1282,10 +1292,15 @@@ S:   Maintaine
  
  ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
  M:    Hans Ulli Kroll <[email protected]>
 +M:    Linus Walleij <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  T:    git git://github.com/ulli-kroll/linux.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/arm/gemini.txt
 +F:    Documentation/devicetree/bindings/pinctrl/cortina,gemini-pinctrl.txt
 +F:    Documentation/devicetree/bindings/rtc/faraday,ftrtc010.txt
  F:    arch/arm/mach-gemini/
 +F:    drivers/pinctrl/pinctrl-gemini.c
  F:    drivers/rtc/rtc-ftrtc010.c
  
  ARM/CSR SIRFPRIMA2 MACHINE SUPPORT
@@@ -1585,7 -1570,7 +1585,7 @@@ M:      Chunfeng Yun <chunfeng.yun@mediatek.
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/phy/phy-mt65xx-usb3.c
 +F:    drivers/phy/mediatek/phy-mtk-tphy.c
  
  ARM/MICREL KS8695 ARCHITECTURE
  M:    Greg Ungerer <[email protected]>
@@@ -2008,7 -1993,6 +2008,7 @@@ F:      arch/arm64/boot/dts/socionext
  F:    drivers/bus/uniphier-system-bus.c
  F:    drivers/clk/uniphier/
  F:    drivers/i2c/busses/i2c-uniphier*
 +F:    drivers/irqchip/irq-uniphier-aidet.c
  F:    drivers/pinctrl/uniphier/
  F:    drivers/reset/reset-uniphier.c
  F:    drivers/tty/serial/8250/8250_uniphier.c
@@@ -2493,7 -2477,7 +2493,7 @@@ Q:      https://patchwork.open-mesh.org/proj
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-net-batman-adv
  F:    Documentation/ABI/testing/sysfs-class-net-mesh
 -F:    Documentation/networking/batman-adv.txt
 +F:    Documentation/networking/batman-adv.rst
  F:    include/uapi/linux/batman_adv.h
  F:    net/batman-adv/
  
@@@ -4375,12 -4359,6 +4375,12 @@@ S:    Maintaine
  F:    drivers/gpu/drm/qxl/
  F:    include/uapi/drm/qxl_drm.h
  
 +DRM DRIVER FOR PERVASIVE DISPLAYS REPAPER PANELS
 +M:    Noralf Trønnes <[email protected]>
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/repaper.c
 +F:    Documentation/devicetree/bindings/display/repaper.txt
 +
  DRM DRIVER FOR RAGE 128 VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/r128/
@@@ -4396,12 -4374,6 +4396,12 @@@ S:    Orphan / Obsolet
  F:    drivers/gpu/drm/sis/
  F:    include/uapi/drm/sis_drm.h
  
 +DRM DRIVER FOR SITRONIX ST7586 PANELS
 +M:    David Lechner <[email protected]>
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/st7586.c
 +F:    Documentation/devicetree/bindings/display/st7586.txt
 +
  DRM DRIVER FOR TDFX VIDEO CARDS
  S:    Orphan / Obsolete
  F:    drivers/gpu/drm/tdfx/
@@@ -4650,14 -4622,6 +4650,14 @@@ F:    drivers/gpu/drm/panel
  F:    include/drm/drm_panel.h
  F:    Documentation/devicetree/bindings/display/panel/
  
 +DRM TINYDRM DRIVERS
 +M:    Noralf Trønnes <[email protected]>
 +W:    https://github.com/notro/tinydrm/wiki/Development
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +S:    Maintained
 +F:    drivers/gpu/drm/tinydrm/
 +F:    include/drm/tinydrm/
 +
  DSBR100 USB FM RADIO DRIVER
  M:    Alexey Klimov <[email protected]>
  L:    [email protected]
@@@ -5126,21 -5090,12 +5126,21 @@@ M:   Andrew Lunn <[email protected]
  M:    Florian Fainelli <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    include/linux/phy.h
 -F:    include/linux/phy_fixed.h
 -F:    drivers/net/phy/
 +F:    Documentation/ABI/testing/sysfs-bus-mdio
 +F:    Documentation/devicetree/bindings/net/mdio*
  F:    Documentation/networking/phy.txt
 +F:    drivers/net/phy/
  F:    drivers/of/of_mdio.c
  F:    drivers/of/of_net.c
 +F:    include/linux/*mdio*.h
 +F:    include/linux/of_net.h
 +F:    include/linux/phy.h
 +F:    include/linux/phy_fixed.h
 +F:    include/linux/platform_data/mdio-gpio.h
 +F:    include/linux/platform_data/mdio-bcm-unimac.h
 +F:    include/trace/events/mdio.h
 +F:    include/uapi/linux/mdio.h
 +F:    include/uapi/linux/mii.h
  
  EXT2 FILE SYSTEM
  M:    Jan Kara <[email protected]>
@@@ -5378,11 -5333,10 +5378,11 @@@ K:   fmc_d.*registe
  
  FPGA MANAGER FRAMEWORK
  M:    Alan Tull <[email protected]>
 -R:    Moritz Fischer <m[email protected]>
 +R:    Moritz Fischer <m[email protected]>
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
 +Q:    http://patchwork.kernel.org/project/linux-fpga/list/
  F:    Documentation/fpga/
  F:    Documentation/devicetree/bindings/fpga/
  F:    drivers/fpga/
@@@ -5872,7 -5826,7 +5872,7 @@@ F:      drivers/staging/greybus/spi.
  F:    drivers/staging/greybus/spilib.c
  F:    drivers/staging/greybus/spilib.h
  
 -GREYBUS LOOBACK/TIME PROTOCOLS DRIVERS
 +GREYBUS LOOPBACK/TIME PROTOCOLS DRIVERS
  M:    Bryan O'Donoghue <[email protected]>
  S:    Maintained
  F:    drivers/staging/greybus/loopback.c
@@@ -6185,14 -6139,6 +6185,14 @@@ S:    Maintaine
  F:    drivers/net/ethernet/hisilicon/
  F:    Documentation/devicetree/bindings/net/hisilicon*.txt
  
 +HISILICON NETWORK SUBSYSTEM 3 DRIVER (HNS3)
 +M:    Yisen Zhuang <[email protected]>
 +M:    Salil Mehta <[email protected]>
 +L:    [email protected]
 +W:    http://www.hisilicon.com
 +S:    Maintained
 +F:    drivers/net/ethernet/hisilicon/hns3/
 +
  HISILICON ROCE DRIVER
  M:    Lijun Ou <[email protected]>
  M:    Wei Hu(Xavier) <[email protected]>
  S:    Maintained
  F:    drivers/input/touchscreen/htcpen.c
  
 +HUAWEI ETHERNET DRIVER
 +M:    Aviad Krawczyk <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    Documentation/networking/hinic.txt
 +F:    drivers/net/ethernet/huawei/hinic/
 +
  HUGETLB FILESYSTEM
  M:    Nadia Yvette Chambers <[email protected]>
  S:    Maintained
@@@ -6310,9 -6249,7 +6310,9 @@@ M:      Haiyang Zhang <[email protected]
  M:    Stephen Hemminger <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/networking/netvsc.txt
  F:    arch/x86/include/asm/mshyperv.h
 +F:    arch/x86/include/asm/trace/hyperv.h
  F:    arch/x86/include/uapi/asm/hyperv.h
  F:    arch/x86/kernel/cpu/mshyperv.c
  F:    arch/x86/hyperv
@@@ -6324,9 -6261,7 +6324,9 @@@ F:      drivers/net/hyperv
  F:    drivers/scsi/storvsc_drv.c
  F:    drivers/uio/uio_hv_generic.c
  F:    drivers/video/fbdev/hyperv_fb.c
 +F:    net/vmw_vsock/hyperv_transport.c
  F:    include/linux/hyperv.h
 +F:    include/uapi/linux/hyperv.h
  F:    tools/hv/
  F:    Documentation/ABI/stable/sysfs-bus-vmbus
  
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmvnic.*
  
+ IBM Power Virtual Accelerator Switchboard
+ M:    Sukadev Bhattiprolu
+ L:    [email protected]
+ S:    Supported
+ F:    arch/powerpc/platforms/powernv/vas*
+ F:    arch/powerpc/platforms/powernv/copy-paste.h
+ F:    arch/powerpc/include/asm/vas.h
+ F:    arch/powerpc/include/uapi/asm/vas.h
  IBM Power Virtual Ethernet Device Driver
  M:    Thomas Falcon <[email protected]>
  L:    [email protected]
@@@ -6801,9 -6745,8 +6810,9 @@@ S:      Supporte
  F:    drivers/scsi/isci/
  
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
 -M:    Daniel Vetter <[email protected]>
  M:    Jani Nikula <[email protected]>
 +M:    Joonas Lahtinen <[email protected]>
 +M:    Rodrigo Vivi <[email protected]>
  L:    [email protected]
  W:    https://01.org/linuxgraphics/
  B:    https://01.org/linuxgraphics/documentation/how-report-bugs
@@@ -7141,7 -7084,9 +7150,7 @@@ W:      http://irda.sourceforge.net
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git
  F:    Documentation/networking/irda.txt
 -F:    drivers/net/irda/
 -F:    include/net/irda/
 -F:    net/irda/
 +F:    drivers/staging/irda/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
  M:    Marc Zyngier <[email protected]>
@@@ -7166,6 -7111,7 +7175,6 @@@ M:      Marc Zyngier <[email protected]
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
 -T:    git git://git.infradead.org/users/jcooper/linux.git irqchip/core
  F:    Documentation/devicetree/bindings/interrupt-controller/
  F:    drivers/irqchip/
  
@@@ -7695,6 -7641,17 +7704,6 @@@ T:     git git://linuxtv.org/mkrufky/tuners
  S:    Maintained
  F:    drivers/media/dvb-frontends/lgdt3305.*
  
 -LGUEST
 -M:    Rusty Russell <[email protected]>
 -L:    [email protected]
 -W:    http://lguest.ozlabs.org/
 -S:    Odd Fixes
 -F:    arch/x86/include/asm/lguest*.h
 -F:    arch/x86/lguest/
 -F:    drivers/lguest/
 -F:    include/linux/lguest*.h
 -F:    tools/lguest/
 -
  LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
  M:    Viresh Kumar <[email protected]>
  L:    [email protected]
@@@ -7830,6 -7787,7 +7839,7 @@@ F:      drivers/pci/hotplug/rpa
  F:    drivers/rtc/rtc-opal.c
  F:    drivers/scsi/ibmvscsi/
  F:    drivers/tty/hvc/hvc_opal.c
+ F:    drivers/watchdog/wdrtas.c
  F:    tools/testing/selftests/powerpc
  N:    /pmac
  N:    powermac
@@@ -8468,9 -8426,7 +8478,9 @@@ F:      include/uapi/linux/uvcvideo.
  
  MEDIATEK ETHERNET DRIVER
  M:    Felix Fietkau <[email protected]>
 -M:    John Crispin <[email protected]>
 +M:    John Crispin <[email protected]>
 +M:    Sean Wang <[email protected]>
 +M:    Nelson Chang <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/mediatek/
@@@ -8511,14 -8467,6 +8521,14 @@@ M:    Sean Wang <[email protected]
  S:    Maintained
  F:    drivers/char/hw_random/mtk-rng.c
  
 +MEDIATEK USB3 DRD IP DRIVER
 +M:    Chunfeng Yun <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +L:    [email protected] (moderated for non-subscribers)
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/usb/mtu3/
 +
  MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
  M:    Peter Senna Tschudin <[email protected]>
  M:    Martin Donnelly <[email protected]>
@@@ -8683,7 -8631,7 +8693,7 @@@ M:      Mathieu Desnoyers <mathieu.desnoyers
  M:    "Paul E. McKenney" <[email protected]>
  L:    [email protected]
  S:    Supported
 -F:    kernel/membarrier.c
 +F:    kernel/sched/membarrier.c
  F:    include/uapi/linux/membarrier.h
  
  MEMORY MANAGEMENT
@@@ -8773,12 -8721,6 +8783,12 @@@ F:    drivers/dma/at_hdmac.
  F:    drivers/dma/at_hdmac_regs.h
  F:    include/linux/platform_data/dma-atmel.h
  
 +MICROCHIP / ATMEL ECC DRIVER
 +M:    Tudor Ambarus <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/crypto/atmel-ecc.*
 +
  MICROCHIP / ATMEL ISC DRIVER
  M:    Songjun Wu <[email protected]>
  L:    [email protected]
@@@ -9526,7 -9468,6 +9536,7 @@@ M:      Srinivas Kandagatla <srinivas.kandag
  S:    Maintained
  F:    drivers/nvmem/
  F:    Documentation/devicetree/bindings/nvmem/
 +F:    Documentation/ABI/stable/sysfs-bus-nvmem
  F:    include/linux/nvmem-consumer.h
  F:    include/linux/nvmem-provider.h
  
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/
 -F:    Documentation/pinctrl.txt
 +F:    Documentation/driver-api/pinctl.rst
  F:    drivers/pinctrl/
  F:    include/linux/pinctrl/
  
@@@ -11172,7 -11113,7 +11182,7 @@@ M:   Fenghua Yu <[email protected]
  L:    [email protected]
  S:    Supported
  F:    arch/x86/kernel/cpu/intel_rdt*
 -F:    arch/x86/include/asm/intel_rdt*
 +F:    arch/x86/include/asm/intel_rdt_sched.h
  F:    Documentation/x86/intel_rdt*
  
  READ-COPY UPDATE (RCU)
@@@ -13054,11 -12995,6 +13064,11 @@@ M: Yehezkel Bernat <yehezkel.bernat@int
  S:    Maintained
  F:    drivers/thunderbolt/
  
 +THUNDERX GPIO DRIVER
 +M:    David Daney <[email protected]>
 +S:    Maintained
 +F:    drivers/gpio/gpio-thunderx.c
 +
  TI AM437X VPFE DRIVER
  M:    "Lad, Prabhakar" <[email protected]>
  L:    [email protected]
@@@ -14070,7 -14006,6 +14080,7 @@@ F:   drivers/block/virtio_blk.
  F:    include/linux/virtio*.h
  F:    include/uapi/linux/virtio_*.h
  F:    drivers/crypto/virtio/
 +F:    mm/balloon_compaction.c
  
  VIRTIO CRYPTO DRIVER
  M:    Gonglei <[email protected]>
@@@ -14285,12 -14220,6 +14295,12 @@@ F: drivers/watchdog
  F:    include/linux/watchdog.h
  F:    include/uapi/linux/watchdog.h
  
 +WHISKEYCOVE PMIC GPIO DRIVER
 +M:    Kuppuswamy Sathyanarayanan <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/gpio/gpio-wcove.c
 +
  WIIMOTE HID DRIVER
  M:    David Herrmann <[email protected]>
  L:    [email protected]
diff --combined arch/powerpc/Kconfig
index 81b0031f909f6d65855ed3051505a4baa9469a64,9fc3c0b6dce026f876bb809210142d5697511024..809c468edab13dc7f7b6a657c5b1c22546ae53ef
@@@ -85,6 -85,17 +85,17 @@@ config NMI_IP
        depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
        default y
  
+ config PPC_WATCHDOG
+       bool
+       depends on HARDLOCKUP_DETECTOR
+       depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
+       default y
+       help
+         This is a placeholder when the powerpc hardlockup detector
+         watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
+         seleted via the generic lockup detector menu which is why we
+         have no standalone config option for it here.
  config STACKTRACE_SUPPORT
        bool
        default y
@@@ -165,7 -176,7 +176,7 @@@ config PP
        select HAVE_ARCH_MMAP_RND_COMPAT_BITS   if COMPAT
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
-       select ARCH_HAS_STRICT_KERNEL_RWX       if (PPC_BOOK3S_64 && !RELOCATABLE && !HIBERNATION)
+       select ARCH_HAS_STRICT_KERNEL_RWX       if ((PPC_BOOK3S_64 || PPC32) && !RELOCATABLE && !HIBERNATION)
        select ARCH_OPTIONAL_KERNEL_RWX         if ARCH_HAS_STRICT_KERNEL_RWX
        select HAVE_CBPF_JIT                    if !PPC64
        select HAVE_CONTEXT_TRACKING            if PPC64
        select HAVE_OPTPROBES                   if PPC64
        select HAVE_PERF_EVENTS
        select HAVE_PERF_EVENTS_NMI             if PPC64
 -      select HAVE_HARDLOCKUP_DETECTOR_PERF    if HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
 +      select HAVE_HARDLOCKUP_DETECTOR_PERF    if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
        select HAVE_PERF_REGS
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_RCU_TABLE_FREE              if SMP
@@@ -356,10 -367,6 +367,6 @@@ config PPC_ADV_DEBUG_DAC_RANG
        depends on PPC_ADV_DEBUG_REGS && 44x
        default y
  
- config PPC_EMULATE_SSTEP
-       bool
-       default y if KPROBES || UPROBES || XMON || HAVE_HW_BREAKPOINT
  config ZONE_DMA32
        bool
        default y if PPC64
@@@ -394,7 -401,7 +401,7 @@@ config HUGETLB_PAGE_SIZE_VARIABL
  
  config MATH_EMULATION
        bool "Math emulation"
-       depends on 4xx || 8xx || PPC_MPC832x || BOOKE
+       depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
        ---help---
          Some PowerPC chips designed for embedded applications do not have
          a floating-point unit and therefore do not implement the
@@@ -956,9 -963,9 +963,9 @@@ config PPC_PCI_CHOIC
  
  config PCI
        bool "PCI support" if PPC_PCI_CHOICE
-       default y if !40x && !CPM2 && !8xx && !PPC_83xx \
+       default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
                && !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
-       default PCI_QSPAN if !4xx && !CPM2 && 8xx
+       default PCI_QSPAN if PPC_8xx
        select GENERIC_PCI_IOMAP
        help
          Find out whether your system includes a PCI bus. PCI is the name of
@@@ -974,7 -981,7 +981,7 @@@ config PCI_SYSCAL
  
  config PCI_QSPAN
        bool "QSpan PCI"
-       depends on !4xx && !CPM2 && 8xx
+       depends on PPC_8xx
        select PPC_I8259
        help
          Say Y here if you have a system based on a Motorola 8xx-series
@@@ -1165,12 -1172,23 +1172,23 @@@ config CONSISTENT_SIZ
  
  config PIN_TLB
        bool "Pinned Kernel TLBs (860 ONLY)"
-       depends on ADVANCED_OPTIONS && 8xx
+       depends on ADVANCED_OPTIONS && PPC_8xx && \
+                  !DEBUG_PAGEALLOC && !STRICT_KERNEL_RWX
+ config PIN_TLB_DATA
+       bool "Pinned TLB for DATA"
+       depends on PIN_TLB
+       default y
  
  config PIN_TLB_IMMR
        bool "Pinned TLB for IMMR"
        depends on PIN_TLB
        default y
+ config PIN_TLB_TEXT
+       bool "Pinned TLB for TEXT"
+       depends on PIN_TLB
+       default y
  endmenu
  
  if PPC64
index b42812e014c04b2fc96cdf5d183c23df0ee88b53,4b219db39c476db85a417f7d731d15ad4ca8b1bf..67075e065ef2d39a69763b47ce34660226be440b
@@@ -37,6 -37,7 +37,7 @@@
  #include <asm/synch.h>
  #include <asm/ppc-opcode.h>
  #include <asm/cputable.h>
+ #include <asm/pte-walk.h>
  
  #include "trace_hv.h"
  
@@@ -164,10 -165,8 +165,10 @@@ long kvmppc_alloc_reset_hpt(struct kvm 
                goto out;
        }
  
 -      if (kvm->arch.hpt.virt)
 +      if (kvm->arch.hpt.virt) {
                kvmppc_free_hpt(&kvm->arch.hpt);
 +              kvmppc_rmap_reset(kvm);
 +      }
  
        err = kvmppc_allocate_hpt(&info, order);
        if (err < 0)
@@@ -599,8 -598,8 +600,8 @@@ int kvmppc_book3s_hv_page_fault(struct 
                         * hugepage split and collapse.
                         */
                        local_irq_save(flags);
-                       ptep = find_linux_pte_or_hugepte(current->mm->pgd,
-                                                        hva, NULL, NULL);
+                       ptep = find_current_mm_pte(current->mm->pgd,
+                                                  hva, NULL, NULL);
                        if (ptep) {
                                pte = kvmppc_read_update_linux_pte(ptep, 1);
                                if (__pte_write(pte))
index 359c79cdf0cc821d87a4e4322177294648b42ee3,8bad44b46dc887bb034582b3b2df38ca498ded25..ebcf97cb5c98be3e5c2141177af7d62b3a9d216e
@@@ -2111,6 -2111,15 +2111,15 @@@ static int kvmppc_grab_hwthread(int cpu
        struct paca_struct *tpaca;
        long timeout = 10000;
  
+       /*
+        * ISA v3.0 idle routines do not set hwthread_state or test
+        * hwthread_req, so they can not grab idle threads.
+        */
+       if (cpu_has_feature(CPU_FTR_ARCH_300)) {
+               WARN(1, "KVM: can not control sibling threads\n");
+               return -EBUSY;
+       }
        tpaca = &paca[cpu];
  
        /* Ensure the thread won't go into the kernel if it wakes */
@@@ -2145,10 -2154,12 +2154,12 @@@ static void kvmppc_release_hwthread(in
        struct paca_struct *tpaca;
  
        tpaca = &paca[cpu];
-       tpaca->kvm_hstate.hwthread_req = 0;
        tpaca->kvm_hstate.kvm_vcpu = NULL;
        tpaca->kvm_hstate.kvm_vcore = NULL;
        tpaca->kvm_hstate.kvm_split_mode = NULL;
+       if (!cpu_has_feature(CPU_FTR_ARCH_300))
+               tpaca->kvm_hstate.hwthread_req = 0;
  }
  
  static void radix_flush_cpu(struct kvm *kvm, int cpu, struct kvm_vcpu *vcpu)
@@@ -3211,8 -3222,6 +3222,8 @@@ static int kvmppc_vcpu_run_hv(struct kv
                        run->fail_entry.hardware_entry_failure_reason = 0;
                        return -EINVAL;
                }
 +              /* Enable TM so we can read the TM SPRs */
 +              mtmsr(mfmsr() | MSR_TM);
                current->thread.tm_tfhar = mfspr(SPRN_TFHAR);
                current->thread.tm_tfiar = mfspr(SPRN_TFIAR);
                current->thread.tm_texasr = mfspr(SPRN_TEXASR);
index 9c9c983b864f8d64a81eac456adc405cc0252e5d,3e024fd71fe8658d78174619ae50aa97a0f93f4e..2259b6cde119da459bdf94d12ecefe94b5d91100
@@@ -149,9 -149,11 +149,11 @@@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S
        subf    r4, r4, r3
        mtspr   SPRN_DEC, r4
  
+ BEGIN_FTR_SECTION
        /* hwthread_req may have got set by cede or no vcpu, so clear it */
        li      r0, 0
        stb     r0, HSTATE_HWTHREAD_REQ(r13)
+ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
  
        /*
         * For external interrupts we need to call the Linux
@@@ -314,6 -316,7 +316,7 @@@ kvm_novcpu_exit
   * Relocation is off and most register values are lost.
   * r13 points to the PACA.
   * r3 contains the SRR1 wakeup value, SRR1 is trashed.
+  * This is not used by ISAv3.0B processors.
   */
        .globl  kvm_start_guest
  kvm_start_guest:
@@@ -432,6 -435,9 +435,9 @@@ kvm_secondary_got_guest
   * While waiting we also need to check if we get given a vcpu to run.
   */
  kvm_no_guest:
+ BEGIN_FTR_SECTION
+       twi     31,0,0
+ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
        lbz     r3, HSTATE_HWTHREAD_REQ(r13)
        cmpwi   r3, 0
        bne     53f
@@@ -1291,9 -1297,6 +1297,9 @@@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR
        /* Hypervisor doorbell - exit only if host IPI flag set */
        cmpwi   r12, BOOK3S_INTERRUPT_H_DOORBELL
        bne     3f
 +BEGIN_FTR_SECTION
 +      PPC_MSGSYNC
 +END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
        lbz     r0, HSTATE_HOST_IPI(r13)
        cmpwi   r0, 0
        beq     4f
@@@ -2512,8 -2515,10 +2518,10 @@@ kvm_do_nap
        clrrdi  r0, r0, 1
        mtspr   SPRN_CTRLT, r0
  
+ BEGIN_FTR_SECTION
        li      r0,1
        stb     r0,HSTATE_HWTHREAD_REQ(r13)
+ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
        mfspr   r5,SPRN_LPCR
        ori     r5,r5,LPCR_PECE0 | LPCR_PECE1
  BEGIN_FTR_SECTION
index faf20163bd4cd36c28d9ab60e7ca58f2b741798f,6ba5d253e8575476aadae56db0833a499898167d..a66e64b0b251f7853722333ba3559ff556ceabc4
@@@ -25,11 -25,7 +25,7 @@@ int bpf_jit_enable __read_mostly
  
  static void bpf_jit_fill_ill_insns(void *area, unsigned int size)
  {
-       int *p = area;
-       /* Fill whole space with trap instructions */
-       while (p < (int *)((char *)area + size))
-               *p++ = BREAKPOINT_INSTRUCTION;
+       memset32(area, BREAKPOINT_INSTRUCTION, size/4);
  }
  
  static inline void bpf_flush_icache(void *start, void *end)
@@@ -795,24 -791,12 +791,24 @@@ emit_clear
                case BPF_JMP | BPF_JSGT | BPF_X:
                        true_cond = COND_GT;
                        goto cond_branch;
 +              case BPF_JMP | BPF_JLT | BPF_K:
 +              case BPF_JMP | BPF_JLT | BPF_X:
 +              case BPF_JMP | BPF_JSLT | BPF_K:
 +              case BPF_JMP | BPF_JSLT | BPF_X:
 +                      true_cond = COND_LT;
 +                      goto cond_branch;
                case BPF_JMP | BPF_JGE | BPF_K:
                case BPF_JMP | BPF_JGE | BPF_X:
                case BPF_JMP | BPF_JSGE | BPF_K:
                case BPF_JMP | BPF_JSGE | BPF_X:
                        true_cond = COND_GE;
                        goto cond_branch;
 +              case BPF_JMP | BPF_JLE | BPF_K:
 +              case BPF_JMP | BPF_JLE | BPF_X:
 +              case BPF_JMP | BPF_JSLE | BPF_K:
 +              case BPF_JMP | BPF_JSLE | BPF_X:
 +                      true_cond = COND_LE;
 +                      goto cond_branch;
                case BPF_JMP | BPF_JEQ | BPF_K:
                case BPF_JMP | BPF_JEQ | BPF_X:
                        true_cond = COND_EQ;
  cond_branch:
                        switch (code) {
                        case BPF_JMP | BPF_JGT | BPF_X:
 +                      case BPF_JMP | BPF_JLT | BPF_X:
                        case BPF_JMP | BPF_JGE | BPF_X:
 +                      case BPF_JMP | BPF_JLE | BPF_X:
                        case BPF_JMP | BPF_JEQ | BPF_X:
                        case BPF_JMP | BPF_JNE | BPF_X:
                                /* unsigned comparison */
                                PPC_CMPLD(dst_reg, src_reg);
                                break;
                        case BPF_JMP | BPF_JSGT | BPF_X:
 +                      case BPF_JMP | BPF_JSLT | BPF_X:
                        case BPF_JMP | BPF_JSGE | BPF_X:
 +                      case BPF_JMP | BPF_JSLE | BPF_X:
                                /* signed comparison */
                                PPC_CMPD(dst_reg, src_reg);
                                break;
                        case BPF_JMP | BPF_JNE | BPF_K:
                        case BPF_JMP | BPF_JEQ | BPF_K:
                        case BPF_JMP | BPF_JGT | BPF_K:
 +                      case BPF_JMP | BPF_JLT | BPF_K:
                        case BPF_JMP | BPF_JGE | BPF_K:
 +                      case BPF_JMP | BPF_JLE | BPF_K:
                                /*
                                 * Need sign-extended load, so only positive
                                 * values can be used as imm in cmpldi
                                }
                                break;
                        case BPF_JMP | BPF_JSGT | BPF_K:
 +                      case BPF_JMP | BPF_JSLT | BPF_K:
                        case BPF_JMP | BPF_JSGE | BPF_K:
 +                      case BPF_JMP | BPF_JSLE | BPF_K:
                                /*
                                 * signed comparison, so any 16-bit value
                                 * can be used in cmpdi
index 4c7b8591f7379931a1d319c8edd5995610ca6d8c,3d4f879e687cae0c84ea1c9b48e2de7d9ba860c9..2cb6cbea4b3b377329803a1a825360c60df10835
@@@ -545,6 -545,12 +545,12 @@@ static void mmio_invalidate(struct npu_
        struct mmio_atsd_reg mmio_atsd_reg[NV_MAX_NPUS];
        unsigned long pid = npu_context->mm->context.id;
  
+       /*
+        * Unfortunately the nest mmu does not support flushing specific
+        * addresses so we have to flush the whole mm.
+        */
+       flush_tlb_mm(npu_context->mm);
        /*
         * Loop over all the NPUs this process is active on and launch
         * an invalidate.
                }
        }
  
-       /*
-        * Unfortunately the nest mmu does not support flushing specific
-        * addresses so we have to flush the whole mm.
-        */
-       flush_tlb_mm(npu_context->mm);
        mmio_invalidate_wait(mmio_atsd_reg, flush);
        if (flush)
                /* Wait for the flush to complete */
@@@ -614,6 -614,15 +614,6 @@@ static void pnv_npu2_mn_change_pte(stru
        mmio_invalidate(npu_context, 1, address, true);
  }
  
 -static void pnv_npu2_mn_invalidate_page(struct mmu_notifier *mn,
 -                                      struct mm_struct *mm,
 -                                      unsigned long address)
 -{
 -      struct npu_context *npu_context = mn_to_npu_context(mn);
 -
 -      mmio_invalidate(npu_context, 1, address, true);
 -}
 -
  static void pnv_npu2_mn_invalidate_range(struct mmu_notifier *mn,
                                        struct mm_struct *mm,
                                        unsigned long start, unsigned long end)
  static const struct mmu_notifier_ops nv_nmmu_notifier_ops = {
        .release = pnv_npu2_mn_release,
        .change_pte = pnv_npu2_mn_change_pte,
 -      .invalidate_page = pnv_npu2_mn_invalidate_page,
        .invalidate_range = pnv_npu2_mn_invalidate_range,
  };
  
index 653f99271865b5e920f5a350bb8cc54450ef07be,6ffbdd8d50c51f10d1d75c4177d4d9a072a890d8..a1d272ac82bb49cc761df70b38ebc119ff5359e6
@@@ -53,7 -53,7 +53,7 @@@
  
  static const char hvc_driver_name[] = "hvc_console";
  
 -static struct vio_device_id hvc_driver_table[] = {
 +static const struct vio_device_id hvc_driver_table[] = {
        {"serial", "hvterm1"},
  #ifndef HVC_OLD_HVSI
        {"serial", "hvterm-protocol"},
@@@ -312,12 -312,12 +312,12 @@@ static int hvc_vio_probe(struct vio_de
                proto = HV_PROTOCOL_HVSI;
                ops = &hvterm_hvsi_ops;
        } else {
 -              pr_err("hvc_vio: Unknown protocol for %s\n", vdev->dev.of_node->full_name);
 +              pr_err("hvc_vio: Unknown protocol for %pOF\n", vdev->dev.of_node);
                return -ENXIO;
        }
  
 -      pr_devel("hvc_vio_probe() device %s, using %s protocol\n",
 -               vdev->dev.of_node->full_name,
 +      pr_devel("hvc_vio_probe() device %pOF, using %s protocol\n",
 +               vdev->dev.of_node,
                 proto == HV_PROTOCOL_RAW ? "raw" : "hvsi");
  
        /* Is it our boot one ? */
@@@ -442,6 -442,14 +442,14 @@@ void __init hvc_vio_init_early(void
  #ifdef CONFIG_PPC_EARLY_DEBUG_LPAR
  void __init udbg_init_debug_lpar(void)
  {
+       /*
+        * If we're running as a hypervisor then we definitely can't call the
+        * hypervisor to print debug output (we *are* the hypervisor), so don't
+        * register if we detect that MSR_HV=1.
+        */
+       if (mfmsr() & MSR_HV)
+               return;
        hvterm_privs[0] = &hvterm_priv0;
        hvterm_priv0.termno = 0;
        hvterm_priv0.proto = HV_PROTOCOL_RAW;
  #ifdef CONFIG_PPC_EARLY_DEBUG_LPAR_HVSI
  void __init udbg_init_debug_lpar_hvsi(void)
  {
+       /* See comment above in udbg_init_debug_lpar() */
+       if (mfmsr() & MSR_HV)
+               return;
        hvterm_privs[0] = &hvterm_priv0;
        hvterm_priv0.termno = CONFIG_PPC_EARLY_DEBUG_HVSI_VTERMNO;
        hvterm_priv0.proto = HV_PROTOCOL_HVSI;
index 82b30e638430fa6e9b3b410feb84bc79a4bf2b13,1bc7dcfbf7b31a877924926855e84cf005b9c16f..f24bfb2b9a2dcca0ac61034e86fe3bc489da7947
@@@ -39,6 -39,8 +39,6 @@@ enum cpuhp_state 
        CPUHP_PCI_XGENE_DEAD,
        CPUHP_IOMMU_INTEL_DEAD,
        CPUHP_LUSTRE_CFS_DEAD,
 -      CPUHP_SCSI_BNX2FC_DEAD,
 -      CPUHP_SCSI_BNX2I_DEAD,
        CPUHP_WORKQUEUE_PREP,
        CPUHP_POWER_NUMA_PREPARE,
        CPUHP_HRTIMERS_PREPARE,
        CPUHP_AP_PERF_ARM_L2X0_ONLINE,
        CPUHP_AP_PERF_ARM_QCOM_L2_ONLINE,
        CPUHP_AP_PERF_ARM_QCOM_L3_ONLINE,
+       CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE,
+       CPUHP_AP_PERF_POWERPC_CORE_IMC_ONLINE,
+       CPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE,
        CPUHP_AP_WORKQUEUE_ONLINE,
        CPUHP_AP_RCUTREE_ONLINE,
        CPUHP_AP_ONLINE_DYN,
diff --combined mm/hugetlb.c
index 34625b25712849ea5dbf3d6814dac8d3430fb64e,b97e6494d74d2eefc3cfef5abf8f4f3615ffc2ca..424b0ef08a60cb616d40e9249e5447287c1705e3
@@@ -1066,11 -1066,11 +1066,11 @@@ static void free_gigantic_page(struct p
  }
  
  static int __alloc_gigantic_page(unsigned long start_pfn,
 -                              unsigned long nr_pages)
 +                              unsigned long nr_pages, gfp_t gfp_mask)
  {
        unsigned long end_pfn = start_pfn + nr_pages;
        return alloc_contig_range(start_pfn, end_pfn, MIGRATE_MOVABLE,
 -                                GFP_KERNEL);
 +                                gfp_mask);
  }
  
  static bool pfn_range_valid_gigantic(struct zone *z,
@@@ -1108,24 -1108,19 +1108,24 @@@ static bool zone_spans_last_pfn(const s
        return zone_spans_pfn(zone, last_pfn);
  }
  
 -static struct page *alloc_gigantic_page(int nid, unsigned int order)
 +static struct page *alloc_gigantic_page(int nid, struct hstate *h)
  {
 +      unsigned int order = huge_page_order(h);
        unsigned long nr_pages = 1 << order;
        unsigned long ret, pfn, flags;
 -      struct zone *z;
 +      struct zonelist *zonelist;
 +      struct zone *zone;
 +      struct zoneref *z;
 +      gfp_t gfp_mask;
  
 -      z = NODE_DATA(nid)->node_zones;
 -      for (; z - NODE_DATA(nid)->node_zones < MAX_NR_ZONES; z++) {
 -              spin_lock_irqsave(&z->lock, flags);
 +      gfp_mask = htlb_alloc_mask(h) | __GFP_THISNODE;
 +      zonelist = node_zonelist(nid, gfp_mask);
 +      for_each_zone_zonelist_nodemask(zone, z, zonelist, gfp_zone(gfp_mask), NULL) {
 +              spin_lock_irqsave(&zone->lock, flags);
  
 -              pfn = ALIGN(z->zone_start_pfn, nr_pages);
 -              while (zone_spans_last_pfn(z, pfn, nr_pages)) {
 -                      if (pfn_range_valid_gigantic(z, pfn, nr_pages)) {
 +              pfn = ALIGN(zone->zone_start_pfn, nr_pages);
 +              while (zone_spans_last_pfn(zone, pfn, nr_pages)) {
 +                      if (pfn_range_valid_gigantic(zone, pfn, nr_pages)) {
                                /*
                                 * We release the zone lock here because
                                 * alloc_contig_range() will also lock the zone
                                 * spinning on this lock, it may win the race
                                 * and cause alloc_contig_range() to fail...
                                 */
 -                              spin_unlock_irqrestore(&z->lock, flags);
 -                              ret = __alloc_gigantic_page(pfn, nr_pages);
 +                              spin_unlock_irqrestore(&zone->lock, flags);
 +                              ret = __alloc_gigantic_page(pfn, nr_pages, gfp_mask);
                                if (!ret)
                                        return pfn_to_page(pfn);
 -                              spin_lock_irqsave(&z->lock, flags);
 +                              spin_lock_irqsave(&zone->lock, flags);
                        }
                        pfn += nr_pages;
                }
  
 -              spin_unlock_irqrestore(&z->lock, flags);
 +              spin_unlock_irqrestore(&zone->lock, flags);
        }
  
        return NULL;
@@@ -1155,7 -1150,7 +1155,7 @@@ static struct page *alloc_fresh_giganti
  {
        struct page *page;
  
 -      page = alloc_gigantic_page(nid, huge_page_order(h));
 +      page = alloc_gigantic_page(nid, h);
        if (page) {
                prep_compound_gigantic_page(page, huge_page_order(h));
                prep_new_huge_page(h, page, nid);
@@@ -2088,7 -2083,9 +2088,9 @@@ struct page *alloc_huge_page_noerr(stru
        return page;
  }
  
- int __weak alloc_bootmem_huge_page(struct hstate *h)
+ int alloc_bootmem_huge_page(struct hstate *h)
+       __attribute__ ((weak, alias("__alloc_bootmem_huge_page")));
+ int __alloc_bootmem_huge_page(struct hstate *h)
  {
        struct huge_bootmem_page *m;
        int nr_nodes, node;
@@@ -2574,13 -2571,13 +2576,13 @@@ static struct attribute *hstate_attrs[
        NULL,
  };
  
 -static struct attribute_group hstate_attr_group = {
 +static const struct attribute_group hstate_attr_group = {
        .attrs = hstate_attrs,
  };
  
  static int hugetlb_sysfs_add_hstate(struct hstate *h, struct kobject *parent,
                                    struct kobject **hstate_kobjs,
 -                                  struct attribute_group *hstate_attr_group)
 +                                  const struct attribute_group *hstate_attr_group)
  {
        int retval;
        int hi = hstate_index(h);
@@@ -2638,7 -2635,7 +2640,7 @@@ static struct attribute *per_node_hstat
        NULL,
  };
  
 -static struct attribute_group per_node_hstate_attr_group = {
 +static const struct attribute_group per_node_hstate_attr_group = {
        .attrs = per_node_hstate_attrs,
  };
  
@@@ -4067,9 -4064,9 +4069,9 @@@ out
        return ret;
  out_release_unlock:
        spin_unlock(ptl);
 -out_release_nounlock:
        if (vm_shared)
                unlock_page(page);
 +out_release_nounlock:
        put_page(page);
        goto out;
  }
@@@ -4083,7 -4080,6 +4085,7 @@@ long follow_hugetlb_page(struct mm_stru
        unsigned long vaddr = *position;
        unsigned long remainder = *nr_pages;
        struct hstate *h = hstate_vma(vma);
 +      int err = -EFAULT;
  
        while (vaddr < vma->vm_end && remainder) {
                pte_t *pte;
                        }
                        ret = hugetlb_fault(mm, vma, vaddr, fault_flags);
                        if (ret & VM_FAULT_ERROR) {
 -                              int err = vm_fault_to_errno(ret, flags);
 -
 -                              if (err)
 -                                      return err;
 -
 +                              err = vm_fault_to_errno(ret, flags);
                                remainder = 0;
                                break;
                        }
@@@ -4215,7 -4215,7 +4217,7 @@@ same_page
         */
        *position = vaddr;
  
 -      return i ? i : -EFAULT;
 +      return i ? i : err;
  }
  
  #ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE
@@@ -4605,15 -4605,6 +4607,15 @@@ pte_t *huge_pte_alloc(struct mm_struct 
        return pte;
  }
  
 +/*
 + * huge_pte_offset() - Walk the page table to resolve the hugepage
 + * entry at address @addr
 + *
 + * Return: Pointer to page table or swap entry (PUD or PMD) for
 + * address @addr, or NULL if a p*d_none() entry is encountered and the
 + * size @sz doesn't match the hugepage size at this level of the page
 + * table.
 + */
  pte_t *huge_pte_offset(struct mm_struct *mm,
                       unsigned long addr, unsigned long sz)
  {
        p4d = p4d_offset(pgd, addr);
        if (!p4d_present(*p4d))
                return NULL;
 +
        pud = pud_offset(p4d, addr);
 -      if (!pud_present(*pud))
 +      if (sz != PUD_SIZE && pud_none(*pud))
                return NULL;
 -      if (pud_huge(*pud))
 +      /* hugepage or swap? */
 +      if (pud_huge(*pud) || !pud_present(*pud))
                return (pte_t *)pud;
 +
        pmd = pmd_offset(pud, addr);
 -      return (pte_t *) pmd;
 +      if (sz != PMD_SIZE && pmd_none(*pmd))
 +              return NULL;
 +      /* hugepage or swap? */
 +      if (pmd_huge(*pmd) || !pmd_present(*pmd))
 +              return (pte_t *)pmd;
 +
 +      return NULL;
  }
  
  #endif /* CONFIG_ARCH_WANT_GENERAL_HUGETLB */
This page took 0.157897 seconds and 4 git commands to generate.