Commit 8d697332 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc updates from Michael Ellerman:
 "Notable changes:

   - Mitigations for Spectre v2 on some Freescale (NXP) CPUs.

   - A large series adding support for pass-through of Nvidia V100 GPUs
     to guests on Power9.

   - Another large series to enable hardware assistance for TLB table
     walk on MPC8xx CPUs.

   - Some preparatory changes to our DMA code, to make way for further
     cleanups from Christoph.

   - Several fixes for our Transactional Memory handling discovered by
     fuzzing the signal return path.

   - Support for generating our system call table(s) from a text file
     like other architectures.

   - A fix to our page fault handler so that instead of generating a
     WARN_ON_ONCE, user accesses of kernel addresses instead print a
     ratelimited and appropriately scary warning.

   - A cosmetic change to make our unhandled page fault messages more
     similar to other arches and also more compact and informative.

   - Freescale updates from Scott:
       "Highlights include elimination of legacy clock bindings use from
        dts files, an 83xx watchdog handler, fixes to old dts interrupt
        errors, and some minor cleanup."

  And many clean-ups, reworks and minor fixes etc.

  Thanks to: Alexandre Belloni, Alexey Kardashevskiy, Andrew Donnellan,
  Aneesh Kumar K.V, Arnd Bergmann, Benjamin Herrenschmidt, Breno Leitao,
  Christian Lamparter, Christophe Leroy, Christoph Hellwig, Daniel
  Axtens, Darren Stevens, David Gibson, Diana Craciun, Dmitry V. Levin,
  Firoz Khan, Geert Uytterhoeven, Greg Kurz, Gustavo Romero, Hari
  Bathini, Joel Stanley, Kees Cook, Madhavan Srinivasan, Mahesh
  Salgaonkar, Markus Elfring, Mathieu Malaterre, Michal Suchánek, Naveen
  N. Rao, Nick Desaulniers, Oliver O'Halloran, Paul Mackerras, Ram Pai,
  Ravi Bangoria, Rob Herring, Russell Currey, Sabyasachi Gupta, Sam
  Bobroff, Satheesh Rajendran, Scott Wood, Segher Boessenkool, Stephen
  Rothwell, Tang Yuantian, Thiago Jung Bauermann, Yangtao Li, Yuantian
  Tang, Yue Haibing"

* tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (201 commits)
  Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask"
  powerpc/zImage: Also check for stdout-path
  powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y
  macintosh: Use of_node_name_{eq, prefix} for node name comparisons
  ide: Use of_node_name_eq for node name comparisons
  powerpc: Use of_node_name_eq for node name comparisons
  powerpc/pseries/pmem: Convert to %pOFn instead of device_node.name
  powerpc/mm: Remove very old comment in hash-4k.h
  powerpc/pseries: Fix node leak in update_lmb_associativity_index()
  powerpc/configs/85xx: Enable CONFIG_DEBUG_KERNEL
  powerpc/dts/fsl: Fix dtc-flagged interrupt errors
  clk: qoriq: add more compatibles strings
  powerpc/fsl: Use new clockgen binding
  powerpc/83xx: handle machine check caused by watchdog timer
  powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved"
  powerpc/fsl_pci: simplify fsl_pci_dma_set_mask
  arch/powerpc/fsl_rmu: Use dma_zalloc_coherent
  vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver
  vfio_pci: Allow regions to add own capabilities
  vfio_pci: Allow mapping extra regions
  ...
parents 6d101ba6 12526b0d
...@@ -2833,7 +2833,7 @@ ...@@ -2833,7 +2833,7 @@
check bypass). With this option data leaks are possible check bypass). With this option data leaks are possible
in the system. in the system.
nospectre_v2 [X86] Disable all mitigations for the Spectre variant 2 nospectre_v2 [X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2
(indirect branch prediction) vulnerability. System may (indirect branch prediction) vulnerability. System may
allow data leaks with this option, which is equivalent allow data leaks with this option, which is equivalent
to spectre_v2=off. to spectre_v2=off.
......
...@@ -28,6 +28,12 @@ Required properties: ...@@ -28,6 +28,12 @@ Required properties:
* "fsl,p4080-clockgen" * "fsl,p4080-clockgen"
* "fsl,p5020-clockgen" * "fsl,p5020-clockgen"
* "fsl,p5040-clockgen" * "fsl,p5040-clockgen"
* "fsl,t1023-clockgen"
* "fsl,t1024-clockgen"
* "fsl,t1040-clockgen"
* "fsl,t1042-clockgen"
* "fsl,t2080-clockgen"
* "fsl,t2081-clockgen"
* "fsl,t4240-clockgen" * "fsl,t4240-clockgen"
* "fsl,b4420-clockgen" * "fsl,b4420-clockgen"
* "fsl,b4860-clockgen" * "fsl,b4860-clockgen"
......
...@@ -113,7 +113,15 @@ header, is usually reserved at an offset greater than boot memory ...@@ -113,7 +113,15 @@ header, is usually reserved at an offset greater than boot memory
size (see Fig. 1). This area is *not* released: this region will size (see Fig. 1). This area is *not* released: this region will
be kept permanently reserved, so that it can act as a receptacle be kept permanently reserved, so that it can act as a receptacle
for a copy of the boot memory content in addition to CPU state for a copy of the boot memory content in addition to CPU state
and HPTE region, in the case a crash does occur. and HPTE region, in the case a crash does occur. Since this reserved
memory area is used only after the system crash, there is no point in
blocking this significant chunk of memory from production kernel.
Hence, the implementation uses the Linux kernel's Contiguous Memory
Allocator (CMA) for memory reservation if CMA is configured for kernel.
With CMA reservation this memory will be available for applications to
use it, while kernel is prevented from using it. With this fadump will
still be able to capture all of the kernel memory and most of the user
space memory except the user pages that were present in CMA region.
o Memory Reservation during first kernel o Memory Reservation during first kernel
...@@ -162,6 +170,9 @@ How to enable firmware-assisted dump (fadump): ...@@ -162,6 +170,9 @@ How to enable firmware-assisted dump (fadump):
1. Set config option CONFIG_FA_DUMP=y and build kernel. 1. Set config option CONFIG_FA_DUMP=y and build kernel.
2. Boot into linux kernel with 'fadump=on' kernel cmdline option. 2. Boot into linux kernel with 'fadump=on' kernel cmdline option.
By default, fadump reserved memory will be initialized as CMA area.
Alternatively, user can boot linux kernel with 'fadump=nocma' to
prevent fadump to use CMA.
3. Optionally, user can also set 'crashkernel=' kernel cmdline 3. Optionally, user can also set 'crashkernel=' kernel cmdline
to specify size of the memory to reserve for boot memory dump to specify size of the memory to reserve for boot memory dump
preservation. preservation.
...@@ -172,6 +183,10 @@ NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead ...@@ -172,6 +183,10 @@ NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead
2. If firmware-assisted dump fails to reserve memory then it 2. If firmware-assisted dump fails to reserve memory then it
will fallback to existing kdump mechanism if 'crashkernel=' will fallback to existing kdump mechanism if 'crashkernel='
option is set at kernel cmdline. option is set at kernel cmdline.
3. if user wants to capture all of user space memory and ok with
reserved memory not available to production system, then
'fadump=nocma' kernel parameter can be used to fallback to
old behaviour.
Sysfs/debugfs files: Sysfs/debugfs files:
------------ ------------
......
CPU to ISA Version Mapping
==========================
Mapping of some CPU versions to relevant ISA versions.
========= ====================
CPU Architecture version
========= ====================
Power9 Power ISA v3.0B
Power8 Power ISA v2.07
Power7 Power ISA v2.06
Power6 Power ISA v2.05
PA6T Power ISA v2.04
Cell PPU - Power ISA v2.02 with some minor exceptions
- Plus Altivec/VMX ~= 2.03
Power5++ Power ISA v2.04 (no VMX)
Power5+ Power ISA v2.03
Power5 - PowerPC User Instruction Set Architecture Book I v2.02
- PowerPC Virtual Environment Architecture Book II v2.02
- PowerPC Operating Environment Architecture Book III v2.02
PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
- PowerPC Virtual Environment Architecture Book II v2.01
- PowerPC Operating Environment Architecture Book III v2.01
- Plus Altivec/VMX ~= 2.03
========= ====================
Key Features
------------
========== ==================
CPU VMX (aka. Altivec)
========== ==================
Power9 Yes
Power8 Yes
Power7 Yes
Power6 Yes
PA6T Yes
Cell PPU Yes
Power5++ No
Power5+ No
Power5 No
PPC970 Yes
========== ==================
========== ====
CPU VSX
========== ====
Power9 Yes
Power8 Yes
Power7 Yes
Power6 No
PA6T No
Cell PPU No
Power5++ No
Power5+ No
Power5 No
PPC970 No
========== ====
========== ====================
CPU Transactional Memory
========== ====================
Power9 Yes (* see transactional_memory.txt)
Power8 Yes
Power7 No
Power6 No
PA6T No
Cell PPU No
Power5++ No
Power5+ No
Power5 No
PPC970 No
========== ====================
...@@ -128,6 +128,7 @@ config PPC ...@@ -128,6 +128,7 @@ config PPC
# #
# Please keep this list sorted alphabetically. # Please keep this list sorted alphabetically.
# #
select ARCH_HAS_DEBUG_VIRTUAL
select ARCH_HAS_DEVMEM_IS_ALLOWED select ARCH_HAS_DEVMEM_IS_ALLOWED
select ARCH_HAS_DMA_SET_COHERENT_MASK select ARCH_HAS_DMA_SET_COHERENT_MASK
select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_ELF_RANDOMIZE
...@@ -374,9 +375,9 @@ config PPC_ADV_DEBUG_DAC_RANGE ...@@ -374,9 +375,9 @@ config PPC_ADV_DEBUG_DAC_RANGE
depends on PPC_ADV_DEBUG_REGS && 44x depends on PPC_ADV_DEBUG_REGS && 44x
default y default y
config ZONE_DMA32 config ZONE_DMA
bool bool
default y if PPC64 default y if PPC_BOOK3E_64
config PGTABLE_LEVELS config PGTABLE_LEVELS
int int
...@@ -556,7 +557,7 @@ config RELOCATABLE_TEST ...@@ -556,7 +557,7 @@ config RELOCATABLE_TEST
config CRASH_DUMP config CRASH_DUMP
bool "Build a dump capture kernel" bool "Build a dump capture kernel"
depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP) depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
help help
Build a kernel suitable for use as a dump capture kernel. Build a kernel suitable for use as a dump capture kernel.
...@@ -869,10 +870,6 @@ config ISA ...@@ -869,10 +870,6 @@ config ISA
have an IBM RS/6000 or pSeries machine, say Y. If you have an have an IBM RS/6000 or pSeries machine, say Y. If you have an
embedded board, consult your board documentation. embedded board, consult your board documentation.
config ZONE_DMA
bool
default y
config GENERIC_ISA_DMA config GENERIC_ISA_DMA
bool bool
depends on ISA_DMA_API depends on ISA_DMA_API
...@@ -1096,7 +1093,7 @@ config PHYSICAL_START_BOOL ...@@ -1096,7 +1093,7 @@ config PHYSICAL_START_BOOL
config PHYSICAL_START config PHYSICAL_START
hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !NONSTATIC_KERNEL default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
default "0x00000000" default "0x00000000"
config PHYSICAL_ALIGN config PHYSICAL_ALIGN
...@@ -1146,7 +1143,7 @@ config PIN_TLB_DATA ...@@ -1146,7 +1143,7 @@ config PIN_TLB_DATA
config PIN_TLB_IMMR config PIN_TLB_IMMR
bool "Pinned TLB for IMMR" bool "Pinned TLB for IMMR"
depends on PIN_TLB depends on PIN_TLB || PPC_EARLY_DEBUG_CPM
default y default y
config PIN_TLB_TEXT config PIN_TLB_TEXT
......
...@@ -30,6 +30,10 @@ endif ...@@ -30,6 +30,10 @@ endif
endif endif
endif endif
ifdef CONFIG_PPC_BOOK3S_32
KBUILD_CFLAGS += -mcpu=powerpc
endif
ifeq ($(CROSS_COMPILE),) ifeq ($(CROSS_COMPILE),)
KBUILD_DEFCONFIG := $(shell uname -m)_defconfig KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
else else
...@@ -152,7 +156,14 @@ endif ...@@ -152,7 +156,14 @@ endif
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc)) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) # Clang unconditionally reserves r2 on ppc32 and does not support the flag
# https://bugs.llvm.org/show_bug.cgi?id=39555
CFLAGS-$(CONFIG_PPC32) := $(call cc-option, -ffixed-r2)
# Clang doesn't support -mmultiple / -mno-multiple
# https://bugs.llvm.org/show_bug.cgi?id=39556
CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD))
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata) CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
ifdef CONFIG_PPC_BOOK3S_64 ifdef CONFIG_PPC_BOOK3S_64
...@@ -237,10 +248,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) ...@@ -237,10 +248,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
# often slow when they are implemented at all # often slow when they are implemented at all
KBUILD_CFLAGS += $(call cc-option,-mno-string) KBUILD_CFLAGS += $(call cc-option,-mno-string)
ifdef CONFIG_6xx
KBUILD_CFLAGS += -mcpu=powerpc
endif
cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_4xx) += -Wa,-m405
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
cpu-as-$(CONFIG_E200) += -Wa,-me200 cpu-as-$(CONFIG_E200) += -Wa,-me200
...@@ -313,6 +320,14 @@ PHONY += ppc64le_defconfig ...@@ -313,6 +320,14 @@ PHONY += ppc64le_defconfig
ppc64le_defconfig: ppc64le_defconfig:
$(call merge_into_defconfig,ppc64_defconfig,le) $(call merge_into_defconfig,ppc64_defconfig,le)
PHONY += ppc64le_guest_defconfig
ppc64le_guest_defconfig:
$(call merge_into_defconfig,ppc64_defconfig,le guest)
PHONY += ppc64_guest_defconfig
ppc64_guest_defconfig:
$(call merge_into_defconfig,ppc64_defconfig,be guest)
PHONY += powernv_be_defconfig PHONY += powernv_be_defconfig
powernv_be_defconfig: powernv_be_defconfig:
$(call merge_into_defconfig,powernv_defconfig,be) $(call merge_into_defconfig,powernv_defconfig,be)
...@@ -398,6 +413,9 @@ archclean: ...@@ -398,6 +413,9 @@ archclean:
archprepare: checkbin archprepare: checkbin
archheaders:
$(Q)$(MAKE) $(build)=arch/powerpc/kernel/syscalls all
ifdef CONFIG_STACKPROTECTOR ifdef CONFIG_STACKPROTECTOR
prepare: stack_protector_prepare prepare: stack_protector_prepare
......
...@@ -268,8 +268,10 @@ PCI0: pci@ec000000 { ...@@ -268,8 +268,10 @@ PCI0: pci@ec000000 {
/* Outbound ranges, one memory and one IO, /* Outbound ranges, one memory and one IO,
* later cannot be changed. Chip supports a second * later cannot be changed. Chip supports a second
* IO range but we don't use it for now * IO range but we don't use it for now
* The chip also supports a larger memory range but
* it's not naturally aligned, so our code will break
*/ */
ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x40000000 ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x20000000
0x02000000 0x00000000 0x00000000 0x00000000 0xe0000000 0x00000000 0x00100000 0x02000000 0x00000000 0x00000000 0x00000000 0xe0000000 0x00000000 0x00100000
0x01000000 0x00000000 0x00000000 0x00000000 0xe8000000 0x00000000 0x00010000>; 0x01000000 0x00000000 0x00000000 0x00000000 0xe8000000 0x00000000 0x00010000>;
......
...@@ -70,14 +70,14 @@ cpus { ...@@ -70,14 +70,14 @@ cpus {
cpu0: PowerPC,e6500@0 { cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
......
...@@ -75,28 +75,28 @@ cpus { ...@@ -75,28 +75,28 @@ cpus {
cpu0: PowerPC,e6500@0 { cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
......
...@@ -398,21 +398,6 @@ guts: global-utilities@e0000 { ...@@ -398,21 +398,6 @@ guts: global-utilities@e0000 {
}; };
/include/ "qoriq-clockgen2.dtsi" /include/ "qoriq-clockgen2.dtsi"
clockgen: global-utilities@e1000 {
compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0";
reg = <0xe1000 0x1000>;
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 0x4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll0-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux0";
};
};
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
compatible = "fsl,b4-rcpm", "fsl,qoriq-rcpm-2.0"; compatible = "fsl,b4-rcpm", "fsl,qoriq-rcpm-2.0";
......
...@@ -169,100 +169,100 @@ pci0: pcie@ffe08000 { ...@@ -169,100 +169,100 @@ pci0: pcie@ffe08000 {
interrupt-map-mask = <0xff00 0 0 7>; interrupt-map-mask = <0xff00 0 0 7>;
interrupt-map = < interrupt-map = <
/* IDSEL 0x11 func 0 - PCI slot 1 */ /* IDSEL 0x11 func 0 - PCI slot 1 */
0x8800 0 0 1 &mpic 2 1 0x8800 0 0 1 &mpic 2 1 0 0
0x8800 0 0 2 &mpic 3 1 0x8800 0 0 2 &mpic 3 1 0 0
0x8800 0 0 3 &mpic 4 1 0x8800 0 0 3 &mpic 4 1 0 0
0x8800 0 0 4 &mpic 1 1 0x8800 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 1 - PCI slot 1 */ /* IDSEL 0x11 func 1 - PCI slot 1 */
0x8900 0 0 1 &mpic 2 1 0x8900 0 0 1 &mpic 2 1 0 0
0x8900 0 0 2 &mpic 3 1 0x8900 0 0 2 &mpic 3 1 0 0
0x8900 0 0 3 &mpic 4 1 0x8900 0 0 3 &mpic 4 1 0 0
0x8900 0 0 4 &mpic 1 1 0x8900 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 2 - PCI slot 1 */ /* IDSEL 0x11 func 2 - PCI slot 1 */
0x8a00 0 0 1 &mpic 2 1 0x8a00 0 0 1 &mpic 2 1 0 0
0x8a00 0 0 2 &mpic 3 1 0x8a00 0 0 2 &mpic 3 1 0 0
0x8a00 0 0 3 &mpic 4 1 0x8a00 0 0 3 &mpic 4 1 0 0
0x8a00 0 0 4 &mpic 1 1 0x8a00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 3 - PCI slot 1 */ /* IDSEL 0x11 func 3 - PCI slot 1 */
0x8b00 0 0 1 &mpic 2 1 0x8b00 0 0 1 &mpic 2 1 0 0
0x8b00 0 0 2 &mpic 3 1 0x8b00 0 0 2 &mpic 3 1 0 0
0x8b00 0 0 3 &mpic 4 1 0x8b00 0 0 3 &mpic 4 1 0 0
0x8b00 0 0 4 &mpic 1 1 0x8b00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 4 - PCI slot 1 */ /* IDSEL 0x11 func 4 - PCI slot 1 */
0x8c00 0 0 1 &mpic 2 1 0x8c00 0 0 1 &mpic 2 1 0 0
0x8c00 0 0 2 &mpic 3 1 0x8c00 0 0 2 &mpic 3 1 0 0
0x8c00 0 0 3 &mpic 4 1 0x8c00 0 0 3 &mpic 4 1 0 0
0x8c00 0 0 4 &mpic 1 1 0x8c00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 5 - PCI slot 1 */ /* IDSEL 0x11 func 5 - PCI slot 1 */
0x8d00 0 0 1 &mpic 2 1 0x8d00 0 0 1 &mpic 2 1 0 0
0x8d00 0 0 2 &mpic 3 1 0x8d00 0 0 2 &mpic 3 1 0 0
0x8d00 0 0 3 &mpic 4 1 0x8d00 0 0 3 &mpic 4 1 0 0
0x8d00 0 0 4 &mpic 1 1 0x8d00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 6 - PCI slot 1 */ /* IDSEL 0x11 func 6 - PCI slot 1 */
0x8e00 0 0 1 &mpic 2 1 0x8e00 0 0 1 &mpic 2 1 0 0
0x8e00 0 0 2 &mpic 3 1 0x8e00 0 0 2 &mpic 3 1 0 0
0x8e00 0 0 3 &mpic 4 1 0x8e00 0 0 3 &mpic 4 1 0 0
0x8e00 0 0 4 &mpic 1 1 0x8e00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 7 - PCI slot 1 */ /* IDSEL 0x11 func 7 - PCI slot 1 */
0x8f00 0 0 1 &mpic 2 1 0x8f00 0 0 1 &mpic 2 1 0 0
0x8f00 0 0 2 &mpic 3 1 0x8f00 0 0 2 &mpic 3 1 0 0
0x8f00 0 0 3 &mpic 4 1 0x8f00 0 0 3 &mpic 4 1 0 0
0x8f00 0 0 4 &mpic 1 1 0x8f00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x12 func 0 - PCI slot 2 */ /* IDSEL 0x12 func 0 - PCI slot 2 */
0x9000 0 0 1 &mpic 3 1 0x9000 0 0 1 &mpic 3 1 0 0
0x9000 0 0 2 &mpic 4 1 0x9000 0 0 2 &mpic 4 1 0 0
0x9000 0 0 3 &mpic 1 1 0x9000 0 0 3 &mpic 1 1 0 0
0x9000 0 0 4 &mpic 2 1 0x9000 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 1 - PCI slot 2 */ /* IDSEL 0x12 func 1 - PCI slot 2 */
0x9100 0 0 1 &mpic 3 1 0x9100 0 0 1 &mpic 3 1 0 0
0x9100 0 0 2 &mpic 4 1 0x9100 0 0 2 &mpic 4 1 0 0
0x9100 0 0 3 &mpic 1 1 0x9100 0 0 3 &mpic 1 1 0 0
0x9100 0 0 4 &mpic 2 1 0x9100 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 2 - PCI slot 2 */ /* IDSEL 0x12 func 2 - PCI slot 2 */
0x9200 0 0 1 &mpic 3 1 0x9200 0 0 1 &mpic 3 1 0 0
0x9200 0 0 2 &mpic 4 1 0x9200 0 0 2 &mpic 4 1 0 0
0x9200 0 0 3 &mpic 1 1 0x9200 0 0 3 &mpic 1 1 0 0
0x9200 0 0 4 &mpic 2 1 0x9200 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 3 - PCI slot 2 */ /* IDSEL 0x12 func 3 - PCI slot 2 */
0x9300 0 0 1 &mpic 3 1 0x9300 0 0 1 &mpic 3 1 0 0
0x9300 0 0 2 &mpic 4 1 0x9300 0 0 2 &mpic 4 1 0 0
0x9300 0 0 3 &mpic 1 1 0x9300 0 0 3 &mpic 1 1 0 0
0x9300 0 0 4 &mpic 2 1 0x9300 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 4 - PCI slot 2 */ /* IDSEL 0x12 func 4 - PCI slot 2 */
0x9400 0 0 1 &mpic 3 1 0x9400 0 0 1 &mpic 3 1 0 0
0x9400 0 0 2 &mpic 4 1 0x9400 0 0 2 &mpic 4 1 0 0
0x9400 0 0 3 &mpic 1 1 0x9400 0 0 3 &mpic 1 1 0 0
0x9400 0 0 4 &mpic 2 1 0x9400 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 5 - PCI slot 2 */ /* IDSEL 0x12 func 5 - PCI slot 2 */
0x9500 0 0 1 &mpic 3 1 0x9500 0 0 1 &mpic 3 1 0 0
0x9500 0 0 2 &mpic 4 1 0x9500 0 0 2 &mpic 4 1 0 0
0x9500 0 0 3 &mpic 1 1 0x9500 0 0 3 &mpic 1 1 0 0
0x9500 0 0 4 &mpic 2 1 0x9500 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 6 - PCI slot 2 */ /* IDSEL 0x12 func 6 - PCI slot 2 */
0x9600 0 0 1 &mpic 3 1 0x9600 0 0 1 &mpic 3 1 0 0
0x9600 0 0 2 &mpic 4 1 0x9600 0 0 2 &mpic 4 1 0 0
0x9600 0 0 3 &mpic 1 1 0x9600 0 0 3 &mpic 1 1 0 0
0x9600 0 0 4 &mpic 2 1 0x9600 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 7 - PCI slot 2 */ /* IDSEL 0x12 func 7 - PCI slot 2 */
0x9700 0 0 1 &mpic 3 1 0x9700 0 0 1 &mpic 3 1 0 0
0x9700 0 0 2 &mpic 4 1 0x9700 0 0 2 &mpic 4 1 0 0
0x9700 0 0 3 &mpic 1 1 0x9700 0 0 3 &mpic 1 1 0 0
0x9700 0 0 4 &mpic 2 1 0x9700 0 0 4 &mpic 2 1 0 0
// IDSEL 0x1c USB // IDSEL 0x1c USB
0xe000 0 0 1 &i8259 12 2 0xe000 0 0 1 &i8259 12 2
......
...@@ -136,100 +136,100 @@ pci0: pcie@fffe08000 { ...@@ -136,100 +136,100 @@ pci0: pcie@fffe08000 {
interrupt-map-mask = <0xff00 0 0 7>; interrupt-map-mask = <0xff00 0 0 7>;
interrupt-map = < interrupt-map = <
/* IDSEL 0x11 func 0 - PCI slot 1 */ /* IDSEL 0x11 func 0 - PCI slot 1 */
0x8800 0 0 1 &mpic 2 1 0x8800 0 0 1 &mpic 2 1 0 0
0x8800 0 0 2 &mpic 3 1 0x8800 0 0 2 &mpic 3 1 0 0
0x8800 0 0 3 &mpic 4 1 0x8800 0 0 3 &mpic 4 1 0 0
0x8800 0 0 4 &mpic 1 1 0x8800 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 1 - PCI slot 1 */ /* IDSEL 0x11 func 1 - PCI slot 1 */
0x8900 0 0 1 &mpic 2 1 0x8900 0 0 1 &mpic 2 1 0 0
0x8900 0 0 2 &mpic 3 1 0x8900 0 0 2 &mpic 3 1 0 0
0x8900 0 0 3 &mpic 4 1 0x8900 0 0 3 &mpic 4 1 0 0
0x8900 0 0 4 &mpic 1 1 0x8900 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 2 - PCI slot 1 */ /* IDSEL 0x11 func 2 - PCI slot 1 */
0x8a00 0 0 1 &mpic 2 1 0x8a00 0 0 1 &mpic 2 1 0 0
0x8a00 0 0 2 &mpic 3 1 0x8a00 0 0 2 &mpic 3 1 0 0
0x8a00 0 0 3 &mpic 4 1 0x8a00 0 0 3 &mpic 4 1 0 0
0x8a00 0 0 4 &mpic 1 1 0x8a00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 3 - PCI slot 1 */ /* IDSEL 0x11 func 3 - PCI slot 1 */
0x8b00 0 0 1 &mpic 2 1 0x8b00 0 0 1 &mpic 2 1 0 0
0x8b00 0 0 2 &mpic 3 1 0x8b00 0 0 2 &mpic 3 1 0 0
0x8b00 0 0 3 &mpic 4 1 0x8b00 0 0 3 &mpic 4 1 0 0
0x8b00 0 0 4 &mpic 1 1 0x8b00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 4 - PCI slot 1 */ /* IDSEL 0x11 func 4 - PCI slot 1 */
0x8c00 0 0 1 &mpic 2 1 0x8c00 0 0 1 &mpic 2 1 0 0
0x8c00 0 0 2 &mpic 3 1 0x8c00 0 0 2 &mpic 3 1 0 0
0x8c00 0 0 3 &mpic 4 1 0x8c00 0 0 3 &mpic 4 1 0 0
0x8c00 0 0 4 &mpic 1 1 0x8c00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 5 - PCI slot 1 */ /* IDSEL 0x11 func 5 - PCI slot 1 */
0x8d00 0 0 1 &mpic 2 1 0x8d00 0 0 1 &mpic 2 1 0 0
0x8d00 0 0 2 &mpic 3 1 0x8d00 0 0 2 &mpic 3 1 0 0
0x8d00 0 0 3 &mpic 4 1 0x8d00 0 0 3 &mpic 4 1 0 0
0x8d00 0 0 4 &mpic 1 1 0x8d00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 6 - PCI slot 1 */ /* IDSEL 0x11 func 6 - PCI slot 1 */
0x8e00 0 0 1 &mpic 2 1 0x8e00 0 0 1 &mpic 2 1 0 0
0x8e00 0 0 2 &mpic 3 1 0x8e00 0 0 2 &mpic 3 1 0 0
0x8e00 0 0 3 &mpic 4 1 0x8e00 0 0 3 &mpic 4 1 0 0
0x8e00 0 0 4 &mpic 1 1 0x8e00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x11 func 7 - PCI slot 1 */ /* IDSEL 0x11 func 7 - PCI slot 1 */
0x8f00 0 0 1 &mpic 2 1 0x8f00 0 0 1 &mpic 2 1 0 0
0x8f00 0 0 2 &mpic 3 1 0x8f00 0 0 2 &mpic 3 1 0 0
0x8f00 0 0 3 &mpic 4 1 0x8f00 0 0 3 &mpic 4 1 0 0
0x8f00 0 0 4 &mpic 1 1 0x8f00 0 0 4 &mpic 1 1 0 0
/* IDSEL 0x12 func 0 - PCI slot 2 */ /* IDSEL 0x12 func 0 - PCI slot 2 */
0x9000 0 0 1 &mpic 3 1 0x9000 0 0 1 &mpic 3 1 0 0
0x9000 0 0 2 &mpic 4 1 0x9000 0 0 2 &mpic 4 1 0 0
0x9000 0 0 3 &mpic 1 1 0x9000 0 0 3 &mpic 1 1 0 0
0x9000 0 0 4 &mpic 2 1 0x9000 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 1 - PCI slot 2 */ /* IDSEL 0x12 func 1 - PCI slot 2 */
0x9100 0 0 1 &mpic 3 1 0x9100 0 0 1 &mpic 3 1 0 0
0x9100 0 0 2 &mpic 4 1 0x9100 0 0 2 &mpic 4 1 0 0
0x9100 0 0 3 &mpic 1 1 0x9100 0 0 3 &mpic 1 1 0 0
0x9100 0 0 4 &mpic 2 1 0x9100 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 2 - PCI slot 2 */ /* IDSEL 0x12 func 2 - PCI slot 2 */
0x9200 0 0 1 &mpic 3 1 0x9200 0 0 1 &mpic 3 1 0 0
0x9200 0 0 2 &mpic 4 1 0x9200 0 0 2 &mpic 4 1 0 0
0x9200 0 0 3 &mpic 1 1 0x9200 0 0 3 &mpic 1 1 0 0
0x9200 0 0 4 &mpic 2 1 0x9200 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 3 - PCI slot 2 */ /* IDSEL 0x12 func 3 - PCI slot 2 */
0x9300 0 0 1 &mpic 3 1 0x9300 0 0 1 &mpic 3 1 0 0
0x9300 0 0 2 &mpic 4 1 0x9300 0 0 2 &mpic 4 1 0 0
0x9300 0 0 3 &mpic 1 1 0x9300 0 0 3 &mpic 1 1 0 0
0x9300 0 0 4 &mpic 2 1 0x9300 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 4 - PCI slot 2 */ /* IDSEL 0x12 func 4 - PCI slot 2 */
0x9400 0 0 1 &mpic 3 1 0x9400 0 0 1 &mpic 3 1 0 0
0x9400 0 0 2 &mpic 4 1 0x9400 0 0 2 &mpic 4 1 0 0
0x9400 0 0 3 &mpic 1 1 0x9400 0 0 3 &mpic 1 1 0 0
0x9400 0 0 4 &mpic 2 1 0x9400 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 5 - PCI slot 2 */ /* IDSEL 0x12 func 5 - PCI slot 2 */
0x9500 0 0 1 &mpic 3 1 0x9500 0 0 1 &mpic 3 1 0 0
0x9500 0 0 2 &mpic 4 1 0x9500 0 0 2 &mpic 4 1 0 0
0x9500 0 0 3 &mpic 1 1 0x9500 0 0 3 &mpic 1 1 0 0
0x9500 0 0 4 &mpic 2 1 0x9500 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 6 - PCI slot 2 */ /* IDSEL 0x12 func 6 - PCI slot 2 */
0x9600 0 0 1 &mpic 3 1 0x9600 0 0 1 &mpic 3 1 0 0
0x9600 0 0 2 &mpic 4 1 0x9600 0 0 2 &mpic 4 1 0 0
0x9600 0 0 3 &mpic 1 1 0x9600 0 0 3 &mpic 1 1 0 0
0x9600 0 0 4 &mpic 2 1 0x9600 0 0 4 &mpic 2 1 0 0
/* IDSEL 0x12 func 7 - PCI slot 2 */ /* IDSEL 0x12 func 7 - PCI slot 2 */
0x9700 0 0 1 &mpic 3 1 0x9700 0 0 1 &mpic 3 1 0 0
0x9700 0 0 2 &mpic 4 1 0x9700 0 0 2 &mpic 4 1 0 0
0x9700 0 0 3 &mpic 1 1 0x9700 0 0 3 &mpic 1 1 0 0
0x9700 0 0 4 &mpic 2 1 0x9700 0 0 4 &mpic 2 1 0 0
// IDSEL 0x1c USB // IDSEL 0x1c USB
0xe000 0 0 1 &i8259 12 2 0xe000 0 0 1 &i8259 12 2
......
...@@ -97,6 +97,7 @@ global-utilities@e0000 { ...@@ -97,6 +97,7 @@ global-utilities@e0000 {
&pci0 { &pci0 {
compatible = "fsl,mpc8641-pcie"; compatible = "fsl,mpc8641-pcie";
device_type = "pci"; device_type = "pci";
#interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
#address-cells = <3>; #address-cells = <3>;
bus-range = <0x0 0xff>; bus-range = <0x0 0xff>;
...@@ -123,6 +124,7 @@ pcie@0 { ...@@ -123,6 +124,7 @@ pcie@0 {
&pci1 { &pci1 {
compatible = "fsl,mpc8641-pcie"; compatible = "fsl,mpc8641-pcie";
device_type = "pci"; device_type = "pci";
#interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
#address-cells = <3>; #address-cells = <3>;
bus-range = <0x0 0xff>; bus-range = <0x0 0xff>;
......
...@@ -205,13 +205,13 @@ usb@23000 { ...@@ -205,13 +205,13 @@ usb@23000 {
mdio@24000 { mdio@24000 {
phy0: ethernet-phy@0 { phy0: ethernet-phy@0 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <3 1>; interrupts = <3 1 0 0>;
reg = <0x0>; reg = <0x0>;
}; };
phy1: ethernet-phy@1 { phy1: ethernet-phy@1 {
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
interrupts = <2 1>; interrupts = <2 1 0 0>;
reg = <0x1>; reg = <0x1>;
}; };
......
...@@ -327,24 +327,6 @@ pins: global-utilities@e0e00 { ...@@ -327,24 +327,6 @@ pins: global-utilities@e0e00 {
/include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-clockgen1.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0"; compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0";
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux2";
};
mux3: mux3@60 {
#clock-cells = <0>;
reg = <0x60 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux3";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -89,7 +89,7 @@ cpus { ...@@ -89,7 +89,7 @@ cpus {
cpu0: PowerPC,e500mc@0 { cpu0: PowerPC,e500mc@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
...@@ -99,7 +99,7 @@ L2_0: l2-cache { ...@@ -99,7 +99,7 @@ L2_0: l2-cache {
cpu1: PowerPC,e500mc@1 { cpu1: PowerPC,e500mc@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -109,7 +109,7 @@ L2_1: l2-cache { ...@@ -109,7 +109,7 @@ L2_1: l2-cache {
cpu2: PowerPC,e500mc@2 { cpu2: PowerPC,e500mc@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
...@@ -119,7 +119,7 @@ L2_2: l2-cache { ...@@ -119,7 +119,7 @@ L2_2: l2-cache {
cpu3: PowerPC,e500mc@3 { cpu3: PowerPC,e500mc@3 {
device_type = "cpu"; device_type = "cpu";
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&clockgen 1 3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>; fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
......
...@@ -354,24 +354,6 @@ pins: global-utilities@e0e00 { ...@@ -354,24 +354,6 @@ pins: global-utilities@e0e00 {
/include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-clockgen1.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0";
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux2";
};
mux3: mux3@60 {
#clock-cells = <0>;
reg = <0x60 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux3";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -90,7 +90,7 @@ cpus { ...@@ -90,7 +90,7 @@ cpus {
cpu0: PowerPC,e500mc@0 { cpu0: PowerPC,e500mc@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
...@@ -100,7 +100,7 @@ L2_0: l2-cache { ...@@ -100,7 +100,7 @@ L2_0: l2-cache {
cpu1: PowerPC,e500mc@1 { cpu1: PowerPC,e500mc@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -110,7 +110,7 @@ L2_1: l2-cache { ...@@ -110,7 +110,7 @@ L2_1: l2-cache {
cpu2: PowerPC,e500mc@2 { cpu2: PowerPC,e500mc@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
...@@ -120,7 +120,7 @@ L2_2: l2-cache { ...@@ -120,7 +120,7 @@ L2_2: l2-cache {
cpu3: PowerPC,e500mc@3 { cpu3: PowerPC,e500mc@3 {
device_type = "cpu"; device_type = "cpu";
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&clockgen 1 3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>; fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
......
...@@ -374,76 +374,6 @@ pins: global-utilities@e0e00 { ...@@ -374,76 +374,6 @@ pins: global-utilities@e0e00 {
/include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-clockgen1.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0"; compatible = "fsl,p4080-clockgen", "fsl,qoriq-clockgen-1.0";
pll2: pll2@840 {
#clock-cells = <1>;
reg = <0x840 0x4>;
compatible = "fsl,qoriq-core-pll-1.0";
clocks = <&sysclk>;
clock-output-names = "pll2", "pll2-div2";
};
pll3: pll3@860 {
#clock-cells = <1>;
reg = <0x860 0x4>;
compatible = "fsl,qoriq-core-pll-1.0";
clocks = <&sysclk>;
clock-output-names = "pll3", "pll3-div2";
};
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux2";
};
mux3: mux3@60 {
#clock-cells = <0>;
reg = <0x60 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux3";
};
mux4: mux4@80 {
#clock-cells = <0>;
reg = <0x80 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>;
clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2";
clock-output-names = "cmux4";
};
mux5: mux5@a0 {
#clock-cells = <0>;
reg = <0xa0 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>;
clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2";
clock-output-names = "cmux5";
};
mux6: mux6@c0 {
#clock-cells = <0>;
reg = <0xc0 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>;
clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2";
clock-output-names = "cmux6";
};
mux7: mux7@e0 {
#clock-cells = <0>;
reg = <0xe0 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll2 0>, <&pll2 1>, <&pll3 0>, <&pll3 1>;
clock-names = "pll2", "pll2-div2", "pll3", "pll3-div2";
clock-output-names = "cmux7";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -94,7 +94,7 @@ cpus { ...@@ -94,7 +94,7 @@ cpus {
cpu0: PowerPC,e500mc@0 { cpu0: PowerPC,e500mc@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
...@@ -104,7 +104,7 @@ L2_0: l2-cache { ...@@ -104,7 +104,7 @@ L2_0: l2-cache {
cpu1: PowerPC,e500mc@1 { cpu1: PowerPC,e500mc@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -114,7 +114,7 @@ L2_1: l2-cache { ...@@ -114,7 +114,7 @@ L2_1: l2-cache {
cpu2: PowerPC,e500mc@2 { cpu2: PowerPC,e500mc@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
...@@ -124,7 +124,7 @@ L2_2: l2-cache { ...@@ -124,7 +124,7 @@ L2_2: l2-cache {
cpu3: PowerPC,e500mc@3 { cpu3: PowerPC,e500mc@3 {
device_type = "cpu"; device_type = "cpu";
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&clockgen 1 3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>; fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
...@@ -134,7 +134,7 @@ L2_3: l2-cache { ...@@ -134,7 +134,7 @@ L2_3: l2-cache {
cpu4: PowerPC,e500mc@4 { cpu4: PowerPC,e500mc@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4>; reg = <4>;
clocks = <&mux4>; clocks = <&clockgen 1 4>;
next-level-cache = <&L2_4>; next-level-cache = <&L2_4>;
fsl,portid-mapping = <0x08000000>; fsl,portid-mapping = <0x08000000>;
L2_4: l2-cache { L2_4: l2-cache {
...@@ -144,7 +144,7 @@ L2_4: l2-cache { ...@@ -144,7 +144,7 @@ L2_4: l2-cache {
cpu5: PowerPC,e500mc@5 { cpu5: PowerPC,e500mc@5 {
device_type = "cpu"; device_type = "cpu";
reg = <5>; reg = <5>;
clocks = <&mux5>; clocks = <&clockgen 1 5>;
next-level-cache = <&L2_5>; next-level-cache = <&L2_5>;
fsl,portid-mapping = <0x04000000>; fsl,portid-mapping = <0x04000000>;
L2_5: l2-cache { L2_5: l2-cache {
...@@ -154,7 +154,7 @@ L2_5: l2-cache { ...@@ -154,7 +154,7 @@ L2_5: l2-cache {
cpu6: PowerPC,e500mc@6 { cpu6: PowerPC,e500mc@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6>; reg = <6>;
clocks = <&mux6>; clocks = <&clockgen 1 6>;
next-level-cache = <&L2_6>; next-level-cache = <&L2_6>;
fsl,portid-mapping = <0x02000000>; fsl,portid-mapping = <0x02000000>;
L2_6: l2-cache { L2_6: l2-cache {
...@@ -164,7 +164,7 @@ L2_6: l2-cache { ...@@ -164,7 +164,7 @@ L2_6: l2-cache {
cpu7: PowerPC,e500mc@7 { cpu7: PowerPC,e500mc@7 {
device_type = "cpu"; device_type = "cpu";
reg = <7>; reg = <7>;
clocks = <&mux7>; clocks = <&clockgen 1 7>;
next-level-cache = <&L2_7>; next-level-cache = <&L2_7>;
fsl,portid-mapping = <0x01000000>; fsl,portid-mapping = <0x01000000>;
L2_7: l2-cache { L2_7: l2-cache {
......
...@@ -96,7 +96,7 @@ cpus { ...@@ -96,7 +96,7 @@ cpus {
cpu0: PowerPC,e5500@0 { cpu0: PowerPC,e5500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
...@@ -106,7 +106,7 @@ L2_0: l2-cache { ...@@ -106,7 +106,7 @@ L2_0: l2-cache {
cpu1: PowerPC,e5500@1 { cpu1: PowerPC,e5500@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
......
...@@ -319,24 +319,6 @@ pins: global-utilities@e0e00 { ...@@ -319,24 +319,6 @@ pins: global-utilities@e0e00 {
/include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-clockgen1.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0";
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux2";
};
mux3: mux3@60 {
#clock-cells = <0>;
reg = <0x60 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux3";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -102,7 +102,7 @@ cpus { ...@@ -102,7 +102,7 @@ cpus {
cpu0: PowerPC,e5500@0 { cpu0: PowerPC,e5500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
...@@ -112,7 +112,7 @@ L2_0: l2-cache { ...@@ -112,7 +112,7 @@ L2_0: l2-cache {
cpu1: PowerPC,e5500@1 { cpu1: PowerPC,e5500@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -122,7 +122,7 @@ L2_1: l2-cache { ...@@ -122,7 +122,7 @@ L2_1: l2-cache {
cpu2: PowerPC,e5500@2 { cpu2: PowerPC,e5500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
...@@ -132,7 +132,7 @@ L2_2: l2-cache { ...@@ -132,7 +132,7 @@ L2_2: l2-cache {
cpu3: PowerPC,e5500@3 { cpu3: PowerPC,e5500@3 {
device_type = "cpu"; device_type = "cpu";
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&clockgen 1 3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>; fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
......
...@@ -34,53 +34,6 @@ ...@@ -34,53 +34,6 @@
clockgen: global-utilities@e1000 { clockgen: global-utilities@e1000 {
compatible = "fsl,qoriq-clockgen-1.0"; compatible = "fsl,qoriq-clockgen-1.0";
ranges = <0x0 0xe1000 0x1000>;
reg = <0xe1000 0x1000>; reg = <0xe1000 0x1000>;
clock-frequency = <0>;
#address-cells = <1>;
#size-cells = <1>;
#clock-cells = <2>; #clock-cells = <2>;
sysclk: sysclk {
#clock-cells = <0>;
compatible = "fsl,qoriq-sysclk-1.0", "fixed-clock";
clock-output-names = "sysclk";
};
pll0: pll0@800 {
#clock-cells = <1>;
reg = <0x800 0x4>;
compatible = "fsl,qoriq-core-pll-1.0";
clocks = <&sysclk>;
clock-output-names = "pll0", "pll0-div2";
};
pll1: pll1@820 {
#clock-cells = <1>;
reg = <0x820 0x4>;
compatible = "fsl,qoriq-core-pll-1.0";
clocks = <&sysclk>;
clock-output-names = "pll1", "pll1-div2";
};
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux0";
};
mux1: mux1@20 {
#clock-cells = <0>;
reg = <0x20 0x4>;
compatible = "fsl,qoriq-core-mux-1.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>;
clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2";
clock-output-names = "cmux1";
};
platform_pll: platform-pll@c00 {
#clock-cells = <1>;
reg = <0xc00 0x4>;
compatible = "fsl,qoriq-platform-pll-1.0";
clocks = <&sysclk>;
clock-output-names = "platform-pll", "platform-pll-div2";
};
}; };
...@@ -34,36 +34,6 @@ ...@@ -34,36 +34,6 @@
clockgen: global-utilities@e1000 { clockgen: global-utilities@e1000 {
compatible = "fsl,qoriq-clockgen-2.0"; compatible = "fsl,qoriq-clockgen-2.0";
ranges = <0x0 0xe1000 0x1000>;
reg = <0xe1000 0x1000>; reg = <0xe1000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
#clock-cells = <2>; #clock-cells = <2>;
sysclk: sysclk {
#clock-cells = <0>;
compatible = "fsl,qoriq-sysclk-2.0", "fixed-clock";
clock-output-names = "sysclk";
};
pll0: pll0@800 {
#clock-cells = <1>;
reg = <0x800 0x4>;
compatible = "fsl,qoriq-core-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "pll0", "pll0-div2", "pll0-div4";
};
pll1: pll1@820 {
#clock-cells = <1>;
reg = <0x820 0x4>;
compatible = "fsl,qoriq-core-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "pll1", "pll1-div2", "pll1-div4";
};
platform_pll: platform-pll@c00 {
#clock-cells = <1>;
reg = <0xc00 0x4>;
compatible = "fsl,qoriq-platform-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "platform-pll", "platform-pll-div2";
};
}; };
...@@ -345,22 +345,6 @@ guts: global-utilities@e0000 { ...@@ -345,22 +345,6 @@ guts: global-utilities@e0000 {
/include/ "qoriq-clockgen2.dtsi" /include/ "qoriq-clockgen2.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,t1023-clockgen", "fsl,qoriq-clockgen-2.0"; compatible = "fsl,t1023-clockgen", "fsl,qoriq-clockgen-2.0";
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 4>;
compatible = "fsl,core-mux-clock";
clocks = <&pll0 0>, <&pll0 1>;
clock-names = "pll0_0", "pll0_1";
clock-output-names = "cmux0";
};
mux1: mux1@20 {
#clock-cells = <0>;
reg = <0x20 4>;
compatible = "fsl,core-mux-clock";
clocks = <&pll0 0>, <&pll0 1>;
clock-names = "pll0_0", "pll0_1";
clock-output-names = "cmux1";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -74,7 +74,7 @@ cpus { ...@@ -74,7 +74,7 @@ cpus {
cpu0: PowerPC,e5500@0 { cpu0: PowerPC,e5500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -84,7 +84,7 @@ L2_1: l2-cache { ...@@ -84,7 +84,7 @@ L2_1: l2-cache {
cpu1: PowerPC,e5500@1 { cpu1: PowerPC,e5500@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_2: l2-cache { L2_2: l2-cache {
......
...@@ -425,50 +425,6 @@ guts: global-utilities@e0000 { ...@@ -425,50 +425,6 @@ guts: global-utilities@e0000 {
/include/ "qoriq-clockgen2.dtsi" /include/ "qoriq-clockgen2.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0"; compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0";
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll1-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux0";
};
mux1: mux1@20 {
#clock-cells = <0>;
reg = <0x20 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll1-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux1";
};
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll1-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux2";
};
mux3: mux3@60 {
#clock-cells = <0>;
reg = <0x60 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0_0", "pll0_1", "pll0_2",
"pll1_0", "pll1_1", "pll1_2";
clock-output-names = "cmux3";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -74,7 +74,7 @@ cpus { ...@@ -74,7 +74,7 @@ cpus {
cpu0: PowerPC,e5500@0 { cpu0: PowerPC,e5500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_1: l2-cache { L2_1: l2-cache {
...@@ -84,7 +84,7 @@ L2_1: l2-cache { ...@@ -84,7 +84,7 @@ L2_1: l2-cache {
cpu1: PowerPC,e5500@1 { cpu1: PowerPC,e5500@1 {
device_type = "cpu"; device_type = "cpu";
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_2: l2-cache { L2_2: l2-cache {
...@@ -94,7 +94,7 @@ L2_2: l2-cache { ...@@ -94,7 +94,7 @@ L2_2: l2-cache {
cpu2: PowerPC,e5500@2 { cpu2: PowerPC,e5500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_3: l2-cache { L2_3: l2-cache {
...@@ -104,7 +104,7 @@ L2_3: l2-cache { ...@@ -104,7 +104,7 @@ L2_3: l2-cache {
cpu3: PowerPC,e5500@3 { cpu3: PowerPC,e5500@3 {
device_type = "cpu"; device_type = "cpu";
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&clockgen 1 3>;
next-level-cache = <&L2_4>; next-level-cache = <&L2_4>;
#cooling-cells = <2>; #cooling-cells = <2>;
L2_4: l2-cache { L2_4: l2-cache {
......
...@@ -535,28 +535,6 @@ guts: global-utilities@e0000 { ...@@ -535,28 +535,6 @@ guts: global-utilities@e0000 {
/include/ "qoriq-clockgen2.dtsi" /include/ "qoriq-clockgen2.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,t2080-clockgen", "fsl,qoriq-clockgen-2.0"; compatible = "fsl,t2080-clockgen", "fsl,qoriq-clockgen-2.0";
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll0-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux0";
};
mux1: mux1@20 {
#clock-cells = <0>;
reg = <0x20 4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>;
clock-names = "pll0", "pll0-div2", "pll0-div4",
"pll1", "pll1-div2", "pll1-div4";
clock-output-names = "cmux1";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -81,28 +81,28 @@ cpus { ...@@ -81,28 +81,28 @@ cpus {
cpu0: PowerPC,e6500@0 { cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
......
...@@ -950,67 +950,6 @@ guts: global-utilities@e0000 { ...@@ -950,67 +950,6 @@ guts: global-utilities@e0000 {
/include/ "qoriq-clockgen2.dtsi" /include/ "qoriq-clockgen2.dtsi"
global-utilities@e1000 { global-utilities@e1000 {
compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0"; compatible = "fsl,t4240-clockgen", "fsl,qoriq-clockgen-2.0";
pll2: pll2@840 {
#clock-cells = <1>;
reg = <0x840 0x4>;
compatible = "fsl,qoriq-core-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "pll2", "pll2-div2", "pll2-div4";
};
pll3: pll3@860 {
#clock-cells = <1>;
reg = <0x860 0x4>;
compatible = "fsl,qoriq-core-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "pll3", "pll3-div2", "pll3-div4";
};
pll4: pll4@880 {
#clock-cells = <1>;
reg = <0x880 0x4>;
compatible = "fsl,qoriq-core-pll-2.0";
clocks = <&sysclk>;
clock-output-names = "pll4", "pll4-div2", "pll4-div4";
};
mux0: mux0@0 {
#clock-cells = <0>;
reg = <0x0 0x4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>,
<&pll2 0>, <&pll2 1>, <&pll2 2>;
clock-names = "pll0", "pll0-div2", "pll0-div4",
"pll1", "pll1-div2", "pll1-div4",
"pll2", "pll2-div2", "pll2-div4";
clock-output-names = "cmux0";
};
mux1: mux1@20 {
#clock-cells = <0>;
reg = <0x20 0x4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
<&pll1 0>, <&pll1 1>, <&pll1 2>,
<&pll2 0>, <&pll2 1>, <&pll2 2>;
clock-names = "pll0", "pll0-div2", "pll0-div4",
"pll1", "pll1-div2", "pll1-div4",
"pll2", "pll2-div2", "pll2-div4";
clock-output-names = "cmux1";
};
mux2: mux2@40 {
#clock-cells = <0>;
reg = <0x40 0x4>;
compatible = "fsl,qoriq-core-mux-2.0";
clocks = <&pll3 0>, <&pll3 1>, <&pll3 2>,
<&pll4 0>, <&pll4 1>, <&pll4 2>;
clock-names = "pll3", "pll3-div2", "pll3-div4",
"pll4", "pll4-div2", "pll4-div4";
clock-output-names = "cmux2";
};
}; };
rcpm: global-utilities@e2000 { rcpm: global-utilities@e2000 {
......
...@@ -90,84 +90,84 @@ cpus { ...@@ -90,84 +90,84 @@ cpus {
cpu0: PowerPC,e6500@0 { cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
clocks = <&mux0>; clocks = <&clockgen 1 0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>; fsl,portid-mapping = <0x80000000>;
}; };
cpu4: PowerPC,e6500@8 { cpu4: PowerPC,e6500@8 {
device_type = "cpu"; device_type = "cpu";
reg = <8 9>; reg = <8 9>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
}; };
cpu5: PowerPC,e6500@10 { cpu5: PowerPC,e6500@10 {
device_type = "cpu"; device_type = "cpu";
reg = <10 11>; reg = <10 11>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
}; };
cpu6: PowerPC,e6500@12 { cpu6: PowerPC,e6500@12 {
device_type = "cpu"; device_type = "cpu";
reg = <12 13>; reg = <12 13>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
}; };
cpu7: PowerPC,e6500@14 { cpu7: PowerPC,e6500@14 {
device_type = "cpu"; device_type = "cpu";
reg = <14 15>; reg = <14 15>;
clocks = <&mux1>; clocks = <&clockgen 1 1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>; fsl,portid-mapping = <0x40000000>;
}; };
cpu8: PowerPC,e6500@16 { cpu8: PowerPC,e6500@16 {
device_type = "cpu"; device_type = "cpu";
reg = <16 17>; reg = <16 17>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
}; };
cpu9: PowerPC,e6500@18 { cpu9: PowerPC,e6500@18 {
device_type = "cpu"; device_type = "cpu";
reg = <18 19>; reg = <18 19>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
}; };
cpu10: PowerPC,e6500@20 { cpu10: PowerPC,e6500@20 {
device_type = "cpu"; device_type = "cpu";
reg = <20 21>; reg = <20 21>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
}; };
cpu11: PowerPC,e6500@22 { cpu11: PowerPC,e6500@22 {
device_type = "cpu"; device_type = "cpu";
reg = <22 23>; reg = <22 23>;
clocks = <&mux2>; clocks = <&clockgen 1 2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>; fsl,portid-mapping = <0x20000000>;
}; };
......
...@@ -311,13 +311,9 @@ mdio@3120 { ...@@ -311,13 +311,9 @@ mdio@3120 {
compatible = "fsl,ucc-mdio"; compatible = "fsl,ucc-mdio";
phy00:ethernet-phy@0 { phy00:ethernet-phy@0 {
interrupt-parent = <&ipic>;
interrupts = <0>;
reg = <0x0>; reg = <0x0>;
}; };
phy04:ethernet-phy@4 { phy04:ethernet-phy@4 {
interrupt-parent = <&ipic>;
interrupts = <0>;
reg = <0x4>; reg = <0x4>;
}; };
}; };
......
...@@ -93,7 +93,8 @@ static void *serial_get_stdout_devp(void) ...@@ -93,7 +93,8 @@ static void *serial_get_stdout_devp(void)
if (devp == NULL) if (devp == NULL)
goto err_out; goto err_out;
if (getprop(devp, "linux,stdout-path", path, MAX_PATH_LEN) > 0) { if (getprop(devp, "linux,stdout-path", path, MAX_PATH_LEN) > 0 ||
getprop(devp, "stdout-path", path, MAX_PATH_LEN) > 0) {
devp = finddevice(path); devp = finddevice(path);
if (devp == NULL) if (devp == NULL)
goto err_out; goto err_out;
......
...@@ -25,6 +25,7 @@ CONFIG_CRYPTO_SHA256=y ...@@ -25,6 +25,7 @@ CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA512=y
CONFIG_DEBUG_FS=y CONFIG_DEBUG_FS=y
CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y CONFIG_DEBUG_SHIRQ=y
CONFIG_DETECT_HUNG_TASK=y CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEVTMPFS_MOUNT=y CONFIG_DEVTMPFS_MOUNT=y
......
...@@ -246,7 +246,6 @@ CONFIG_DEBUG_KERNEL=y ...@@ -246,7 +246,6 @@ CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_MUTEXES=y
CONFIG_LATENCYTOP=y CONFIG_LATENCYTOP=y
CONFIG_BOOTX_TEXT=y CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HMAC=y
......
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_BLK_SCSI=y
CONFIG_SCSI_VIRTIO=y
CONFIG_VIRTIO_NET=y
CONFIG_NET_FAILOVER=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_KVM_GUEST=y
CONFIG_EPAPR_PARAVIRT=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VHOST_NET=y
CONFIG_VHOST=y
...@@ -108,7 +108,6 @@ CONFIG_LATENCYTOP=y ...@@ -108,7 +108,6 @@ CONFIG_LATENCYTOP=y
CONFIG_XMON=y CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y CONFIG_XMON_DEFAULT=y
CONFIG_BOOTX_TEXT=y CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_HW is not set # CONFIG_CRYPTO_HW is not set
......
...@@ -297,7 +297,6 @@ CONFIG_LATENCYTOP=y ...@@ -297,7 +297,6 @@ CONFIG_LATENCYTOP=y
CONFIG_XMON=y CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y CONFIG_XMON_DEFAULT=y
CONFIG_BOOTX_TEXT=y CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_MD4=m CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_SHA512=m CONFIG_CRYPTO_SHA512=m
......
CONFIG_PPC64=y
CONFIG_SYSVIPC=y CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y CONFIG_NO_HZ=y
...@@ -9,21 +8,22 @@ CONFIG_IKCONFIG=y ...@@ -9,21 +8,22 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18 CONFIG_LOG_BUF_SHIFT=18
CONFIG_LOG_CPU_MAX_BUF_SHIFT=13 CONFIG_LOG_CPU_MAX_BUF_SHIFT=13
CONFIG_NUMA_BALANCING=y
CONFIG_CGROUPS=y CONFIG_CGROUPS=y
CONFIG_MEMCG=y
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CPUSETS=y CONFIG_CPUSETS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y CONFIG_CGROUP_BPF=y
CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_INITRD=y
CONFIG_BPF_SYSCALL=y CONFIG_BPF_SYSCALL=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y CONFIG_PROFILING=y
CONFIG_OPROFILE=m CONFIG_PPC64=y
CONFIG_KPROBES=y CONFIG_NR_CPUS=2048
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_PPC_SPLPAR=y CONFIG_PPC_SPLPAR=y
CONFIG_DTL=y CONFIG_DTL=y
CONFIG_SCANLOG=m CONFIG_SCANLOG=m
...@@ -45,14 +45,11 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y ...@@ -45,14 +45,11 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_PMAC64=y CONFIG_CPU_FREQ_PMAC64=y
CONFIG_HZ_100=y CONFIG_HZ_100=y
CONFIG_BINFMT_MISC=m
CONFIG_PPC_TRANSACTIONAL_MEM=y CONFIG_PPC_TRANSACTIONAL_MEM=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y CONFIG_KEXEC_FILE=y
CONFIG_CRASH_DUMP=y CONFIG_CRASH_DUMP=y
CONFIG_IRQ_ALL_CPUS=y CONFIG_IRQ_ALL_CPUS=y
CONFIG_KSM=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_PPC_64K_PAGES=y CONFIG_PPC_64K_PAGES=y
CONFIG_SCHED_SMT=y CONFIG_SCHED_SMT=y
CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI=y
...@@ -60,6 +57,23 @@ CONFIG_HOTPLUG_PCI_RPA=m ...@@ -60,6 +57,23 @@ CONFIG_HOTPLUG_PCI_RPA=m
CONFIG_HOTPLUG_PCI_RPA_DLPAR=m CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
CONFIG_PCCARD=y CONFIG_PCCARD=y
CONFIG_ELECTRA_CF=y CONFIG_ELECTRA_CF=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m
CONFIG_VHOST_NET=m
CONFIG_OPROFILE=m
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_BINFMT_MISC=m
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_KSM=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y
...@@ -163,7 +177,6 @@ CONFIG_TIGON3=y ...@@ -163,7 +177,6 @@ CONFIG_TIGON3=y
CONFIG_BNX2X=m CONFIG_BNX2X=m
CONFIG_CHELSIO_T1=m CONFIG_CHELSIO_T1=m
CONFIG_BE2NET=m CONFIG_BE2NET=m
CONFIG_S2IO=m
CONFIG_IBMVETH=m CONFIG_IBMVETH=m
CONFIG_EHEA=m CONFIG_EHEA=m
CONFIG_E100=y CONFIG_E100=y
...@@ -174,6 +187,7 @@ CONFIG_IXGBE=m ...@@ -174,6 +187,7 @@ CONFIG_IXGBE=m
CONFIG_I40E=m CONFIG_I40E=m
CONFIG_MLX4_EN=m CONFIG_MLX4_EN=m
CONFIG_MYRI10GE=m CONFIG_MYRI10GE=m
CONFIG_S2IO=m
CONFIG_PASEMI_MAC=y CONFIG_PASEMI_MAC=y
CONFIG_QLGE=m CONFIG_QLGE=m
CONFIG_NETXEN_NIC=m CONFIG_NETXEN_NIC=m
...@@ -284,7 +298,7 @@ CONFIG_REISERFS_FS_SECURITY=y ...@@ -284,7 +298,7 @@ CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=m CONFIG_JFS_FS=m
CONFIG_JFS_POSIX_ACL=y CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y CONFIG_JFS_SECURITY=y
CONFIG_XFS_FS=m CONFIG_XFS_FS=y
CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_POSIX_ACL=y
CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_FS_POSIX_ACL=y
...@@ -323,25 +337,6 @@ CONFIG_NLS_CODEPAGE_437=y ...@@ -323,25 +337,6 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ASCII=y CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y CONFIG_NLS_UTF8=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_LATENCYTOP=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_CODE_PATCHING_SELFTEST=y
CONFIG_FTR_FIXUP_SELFTEST=y
CONFIG_MSI_BITMAP_SELFTEST=y
CONFIG_XMON=y
CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HMAC=y
...@@ -364,8 +359,20 @@ CONFIG_CRYPTO_LZO=m ...@@ -364,8 +359,20 @@ CONFIG_CRYPTO_LZO=m
CONFIG_CRYPTO_DEV_NX=y CONFIG_CRYPTO_DEV_NX=y
CONFIG_CRYPTO_DEV_NX_ENCRYPT=m CONFIG_CRYPTO_DEV_NX_ENCRYPT=m
CONFIG_CRYPTO_DEV_VMX=y CONFIG_CRYPTO_DEV_VMX=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m
CONFIG_VHOST_NET=m
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_LATENCYTOP=y
CONFIG_FUNCTION_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_CODE_PATCHING_SELFTEST=y
CONFIG_FTR_FIXUP_SELFTEST=y
CONFIG_MSI_BITMAP_SELFTEST=y
CONFIG_XMON=y
CONFIG_BOOTX_TEXT=y
...@@ -1155,7 +1155,6 @@ CONFIG_STACK_TRACER=y ...@@ -1155,7 +1155,6 @@ CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_XMON=y CONFIG_XMON=y
CONFIG_BOOTX_TEXT=y CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_SECURITY=y CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_NETWORK_XFRM=y
......
...@@ -290,9 +290,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y ...@@ -290,9 +290,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_SOFTLOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_LATENCYTOP=y CONFIG_LATENCYTOP=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_SCHED_TRACER=y CONFIG_SCHED_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_CODE_PATCHING_SELFTEST=y CONFIG_CODE_PATCHING_SELFTEST=y
......
generated-y += syscall_table_32.h
generated-y += syscall_table_64.h
generated-y += syscall_table_c32.h
generated-y += syscall_table_spu.h
generic-y += div64.h generic-y += div64.h
generic-y += export.h generic-y += export.h
generic-y += irq_regs.h generic-y += irq_regs.h
......
...@@ -61,7 +61,6 @@ void RunModeException(struct pt_regs *regs); ...@@ -61,7 +61,6 @@ void RunModeException(struct pt_regs *regs);
void single_step_exception(struct pt_regs *regs); void single_step_exception(struct pt_regs *regs);
void program_check_exception(struct pt_regs *regs); void program_check_exception(struct pt_regs *regs);
void alignment_exception(struct pt_regs *regs); void alignment_exception(struct pt_regs *regs);
void slb_miss_bad_addr(struct pt_regs *regs);
void StackOverflow(struct pt_regs *regs); void StackOverflow(struct pt_regs *regs);
void kernel_fp_unavailable_exception(struct pt_regs *regs); void kernel_fp_unavailable_exception(struct pt_regs *regs);
void altivec_unavailable_exception(struct pt_regs *regs); void altivec_unavailable_exception(struct pt_regs *regs);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define _PAGE_WRITETHRU 0x040 /* W: cache write-through */ #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
#define _PAGE_DIRTY 0x080 /* C: page changed */ #define _PAGE_DIRTY 0x080 /* C: page changed */
#define _PAGE_ACCESSED 0x100 /* R: page referenced */ #define _PAGE_ACCESSED 0x100 /* R: page referenced */
#define _PAGE_EXEC 0x200 /* software: exec allowed */
#define _PAGE_RW 0x400 /* software: user write access allowed */ #define _PAGE_RW 0x400 /* software: user write access allowed */
#define _PAGE_SPECIAL 0x800 /* software: Special page */ #define _PAGE_SPECIAL 0x800 /* software: Special page */
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_ #ifndef _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_
#define _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_ #define _ASM_POWERPC_BOOK3S_32_MMU_HASH_H_
/* /*
* 32-bit hash table MMU support * 32-bit hash table MMU support
*/ */
...@@ -9,6 +10,8 @@ ...@@ -9,6 +10,8 @@
* BATs * BATs
*/ */
#include <asm/page.h>
/* Block size masks */ /* Block size masks */
#define BL_128K 0x000 #define BL_128K 0x000
#define BL_256K 0x001 #define BL_256K 0x001
...@@ -34,14 +37,20 @@ ...@@ -34,14 +37,20 @@
#define BAT_PHYS_ADDR(x) ((u32)((x & 0x00000000fffe0000ULL) | \ #define BAT_PHYS_ADDR(x) ((u32)((x & 0x00000000fffe0000ULL) | \
((x & 0x0000000e00000000ULL) >> 24) | \ ((x & 0x0000000e00000000ULL) >> 24) | \
((x & 0x0000000100000000ULL) >> 30))) ((x & 0x0000000100000000ULL) >> 30)))
#define PHYS_BAT_ADDR(x) (((u64)(x) & 0x00000000fffe0000ULL) | \
(((u64)(x) << 24) & 0x0000000e00000000ULL) | \
(((u64)(x) << 30) & 0x0000000100000000ULL))
#else #else
#define BAT_PHYS_ADDR(x) (x) #define BAT_PHYS_ADDR(x) (x)
#define PHYS_BAT_ADDR(x) ((x) & 0xfffe0000)
#endif #endif
struct ppc_bat { struct ppc_bat {
u32 batu; u32 batu;
u32 batl; u32 batl;
}; };
typedef pte_t *pgtable_t;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
/* /*
...@@ -83,6 +92,12 @@ typedef struct { ...@@ -83,6 +92,12 @@ typedef struct {
unsigned long vdso_base; unsigned long vdso_base;
} mm_context_t; } mm_context_t;
/* patch sites */
extern s32 patch__hash_page_A0, patch__hash_page_A1, patch__hash_page_A2;
extern s32 patch__hash_page_B, patch__hash_page_C;
extern s32 patch__flush_hash_A0, patch__flush_hash_A1, patch__flush_hash_A2;
extern s32 patch__flush_hash_B;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
/* We happily ignore the smaller BATs on 601, we don't actually use /* We happily ignore the smaller BATs on 601, we don't actually use
......
...@@ -25,10 +25,7 @@ ...@@ -25,10 +25,7 @@
extern void __bad_pte(pmd_t *pmd); extern void __bad_pte(pmd_t *pmd);
extern struct kmem_cache *pgtable_cache[]; extern struct kmem_cache *pgtable_cache[];
#define PGT_CACHE(shift) ({ \ #define PGT_CACHE(shift) pgtable_cache[shift]
BUG_ON(!(shift)); \
pgtable_cache[(shift) - 1]; \
})
static inline pgd_t *pgd_alloc(struct mm_struct *mm) static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
...@@ -50,8 +47,6 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) ...@@ -50,8 +47,6 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
#define __pmd_free_tlb(tlb,x,a) do { } while (0) #define __pmd_free_tlb(tlb,x,a) do { } while (0)
/* #define pgd_populate(mm, pmd, pte) BUG() */ /* #define pgd_populate(mm, pmd, pte) BUG() */
#ifndef CONFIG_BOOKE
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
pte_t *pte) pte_t *pte)
{ {
...@@ -61,46 +56,31 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, ...@@ -61,46 +56,31 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page) pgtable_t pte_page)
{ {
*pmdp = __pmd((page_to_pfn(pte_page) << PAGE_SHIFT) | _PMD_PRESENT); *pmdp = __pmd(__pa(pte_page) | _PMD_PRESENT);
}
#define pmd_pgtable(pmd) pmd_page(pmd)
#else
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
pte_t *pte)
{
*pmdp = __pmd((unsigned long)pte | _PMD_PRESENT);
}
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page)
{
*pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
} }
#define pmd_pgtable(pmd) pmd_page(pmd) #define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
#endif
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr); extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr); extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
void pte_frag_destroy(void *pte_frag);
pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
void pte_fragment_free(unsigned long *table, int kernel);
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{ {
free_page((unsigned long)pte); pte_fragment_free((unsigned long *)pte, 1);
} }
static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
{ {
pgtable_page_dtor(ptepage); pte_fragment_free((unsigned long *)ptepage, 0);
__free_page(ptepage);
} }
static inline void pgtable_free(void *table, unsigned index_size) static inline void pgtable_free(void *table, unsigned index_size)
{ {
if (!index_size) { if (!index_size) {
pgtable_page_dtor(virt_to_page(table)); pte_fragment_free((unsigned long *)table, 0);
free_page((unsigned long)table);
} else { } else {
BUG_ON(index_size > MAX_PGTABLE_INDEX_SIZE); BUG_ON(index_size > MAX_PGTABLE_INDEX_SIZE);
kmem_cache_free(PGT_CACHE(index_size), table); kmem_cache_free(PGT_CACHE(index_size), table);
...@@ -138,6 +118,6 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb, ...@@ -138,6 +118,6 @@ static inline void pgtable_free_tlb(struct mmu_gather *tlb,
static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
unsigned long address) unsigned long address)
{ {
pgtable_free_tlb(tlb, page_address(table), 0); pgtable_free_tlb(tlb, table, 0);
} }
#endif /* _ASM_POWERPC_BOOK3S_32_PGALLOC_H */ #endif /* _ASM_POWERPC_BOOK3S_32_PGALLOC_H */
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
/* And here we include common definitions */ /* And here we include common definitions */
#define _PAGE_KERNEL_RO 0 #define _PAGE_KERNEL_RO 0
#define _PAGE_KERNEL_ROX 0 #define _PAGE_KERNEL_ROX (_PAGE_EXEC)
#define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW) #define _PAGE_KERNEL_RW (_PAGE_DIRTY | _PAGE_RW)
#define _PAGE_KERNEL_RWX (_PAGE_DIRTY | _PAGE_RW) #define _PAGE_KERNEL_RWX (_PAGE_DIRTY | _PAGE_RW | _PAGE_EXEC)
#define _PAGE_HPTEFLAGS _PAGE_HASHPTE #define _PAGE_HPTEFLAGS _PAGE_HASHPTE
...@@ -66,11 +66,11 @@ static inline bool pte_user(pte_t pte) ...@@ -66,11 +66,11 @@ static inline bool pte_user(pte_t pte)
*/ */
#define PAGE_NONE __pgprot(_PAGE_BASE) #define PAGE_NONE __pgprot(_PAGE_BASE)
#define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW)
#define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW) #define PAGE_SHARED_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_RW | _PAGE_EXEC)
#define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER) #define PAGE_COPY __pgprot(_PAGE_BASE | _PAGE_USER)
#define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER) #define PAGE_COPY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
#define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER) #define PAGE_READONLY __pgprot(_PAGE_BASE | _PAGE_USER)
#define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER) #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC)
/* Permission masks used for kernel mappings */ /* Permission masks used for kernel mappings */
#define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW) #define PAGE_KERNEL __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW)
...@@ -318,7 +318,7 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, ...@@ -318,7 +318,7 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma,
int psize) int psize)
{ {
unsigned long set = pte_val(entry) & unsigned long set = pte_val(entry) &
(_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW); (_PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_RW | _PAGE_EXEC);
pte_update(ptep, 0, set); pte_update(ptep, 0, set);
...@@ -328,24 +328,10 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, ...@@ -328,24 +328,10 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma,
#define __HAVE_ARCH_PTE_SAME #define __HAVE_ARCH_PTE_SAME
#define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0) #define pte_same(A,B) (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0)
/*
* Note that on Book E processors, the pmd contains the kernel virtual
* (lowmem) address of the pte page. The physical address is less useful
* because everything runs with translation enabled (even the TLB miss
* handler). On everything else the pmd contains the physical address
* of the pte page. -- paulus
*/
#ifndef CONFIG_BOOKE
#define pmd_page_vaddr(pmd) \ #define pmd_page_vaddr(pmd) \
((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) ((unsigned long)__va(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
#define pmd_page(pmd) \ #define pmd_page(pmd) \
pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
#else
#define pmd_page_vaddr(pmd) \
((unsigned long) (pmd_val(pmd) & PAGE_MASK))
#define pmd_page(pmd) \
pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT))
#endif
/* to find an entry in a kernel page-table-directory */ /* to find an entry in a kernel page-table-directory */
#define pgd_offset_k(address) pgd_offset(&init_mm, address) #define pgd_offset_k(address) pgd_offset(&init_mm, address)
...@@ -360,7 +346,8 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma, ...@@ -360,7 +346,8 @@ static inline void __ptep_set_access_flags(struct vm_area_struct *vma,
#define pte_offset_kernel(dir, addr) \ #define pte_offset_kernel(dir, addr) \
((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr))
#define pte_offset_map(dir, addr) \ #define pte_offset_map(dir, addr) \
((pte_t *) kmap_atomic(pmd_page(*(dir))) + pte_index(addr)) ((pte_t *)(kmap_atomic(pmd_page(*(dir))) + \
(pmd_page_vaddr(*(dir)) & ~PAGE_MASK)) + pte_index(addr))
#define pte_unmap(pte) kunmap_atomic(pte) #define pte_unmap(pte) kunmap_atomic(pte)
/* /*
...@@ -384,7 +371,7 @@ static inline int pte_dirty(pte_t pte) { return !!(pte_val(pte) & _PAGE_DIRTY); ...@@ -384,7 +371,7 @@ static inline int pte_dirty(pte_t pte) { return !!(pte_val(pte) & _PAGE_DIRTY);
static inline int pte_young(pte_t pte) { return !!(pte_val(pte) & _PAGE_ACCESSED); } static inline int pte_young(pte_t pte) { return !!(pte_val(pte) & _PAGE_ACCESSED); }
static inline int pte_special(pte_t pte) { return !!(pte_val(pte) & _PAGE_SPECIAL); } static inline int pte_special(pte_t pte) { return !!(pte_val(pte) & _PAGE_SPECIAL); }
static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; } static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; }
static inline bool pte_exec(pte_t pte) { return true; } static inline bool pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_EXEC; }
static inline int pte_present(pte_t pte) static inline int pte_present(pte_t pte)
{ {
...@@ -451,7 +438,7 @@ static inline pte_t pte_wrprotect(pte_t pte) ...@@ -451,7 +438,7 @@ static inline pte_t pte_wrprotect(pte_t pte)
static inline pte_t pte_exprotect(pte_t pte) static inline pte_t pte_exprotect(pte_t pte)
{ {
return pte; return __pte(pte_val(pte) & ~_PAGE_EXEC);
} }
static inline pte_t pte_mkclean(pte_t pte) static inline pte_t pte_mkclean(pte_t pte)
...@@ -466,7 +453,7 @@ static inline pte_t pte_mkold(pte_t pte) ...@@ -466,7 +453,7 @@ static inline pte_t pte_mkold(pte_t pte)
static inline pte_t pte_mkexec(pte_t pte) static inline pte_t pte_mkexec(pte_t pte)
{ {
return pte; return __pte(pte_val(pte) | _PAGE_EXEC);
} }
static inline pte_t pte_mkpte(pte_t pte) static inline pte_t pte_mkpte(pte_t pte)
...@@ -524,7 +511,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) ...@@ -524,7 +511,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte, int percpu) pte_t *ptep, pte_t pte, int percpu)
{ {
#if defined(CONFIG_PPC_STD_MMU_32) && defined(CONFIG_SMP) && !defined(CONFIG_PTE_64BIT) #if defined(CONFIG_SMP) && !defined(CONFIG_PTE_64BIT)
/* First case is 32-bit Hash MMU in SMP mode with 32-bit PTEs. We use the /* First case is 32-bit Hash MMU in SMP mode with 32-bit PTEs. We use the
* helper pte_update() which does an atomic update. We need to do that * helper pte_update() which does an atomic update. We need to do that
* because a concurrent invalidation can clear _PAGE_HASHPTE. If it's a * because a concurrent invalidation can clear _PAGE_HASHPTE. If it's a
...@@ -537,7 +524,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, ...@@ -537,7 +524,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
else else
pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte)); pte_update(ptep, ~_PAGE_HASHPTE, pte_val(pte));
#elif defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT) #elif defined(CONFIG_PTE_64BIT)
/* Second case is 32-bit with 64-bit PTE. In this case, we /* Second case is 32-bit with 64-bit PTE. In this case, we
* can just store as long as we do the two halves in the right order * can just store as long as we do the two halves in the right order
* with a barrier in between. This is possible because we take care, * with a barrier in between. This is possible because we take care,
...@@ -560,7 +547,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, ...@@ -560,7 +547,7 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
: "=m" (*ptep), "=m" (*((unsigned char *)ptep+4)) : "=m" (*ptep), "=m" (*((unsigned char *)ptep+4))
: "r" (pte) : "memory"); : "r" (pte) : "memory");
#elif defined(CONFIG_PPC_STD_MMU_32) #else
/* Third case is 32-bit hash table in UP mode, we need to preserve /* Third case is 32-bit hash table in UP mode, we need to preserve
* the _PAGE_HASHPTE bit since we may not have invalidated the previous * the _PAGE_HASHPTE bit since we may not have invalidated the previous
* translation in the hash yet (done in a subsequent flush_tlb_xxx()) * translation in the hash yet (done in a subsequent flush_tlb_xxx())
...@@ -568,9 +555,6 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, ...@@ -568,9 +555,6 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
*/ */
*ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE) *ptep = __pte((pte_val(*ptep) & _PAGE_HASHPTE)
| (pte_val(pte) & ~_PAGE_HASHPTE)); | (pte_val(pte) & ~_PAGE_HASHPTE));
#else
#error "Not supported "
#endif #endif
} }
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_BOOK3S_64_HASH_4K_H #ifndef _ASM_POWERPC_BOOK3S_64_HASH_4K_H
#define _ASM_POWERPC_BOOK3S_64_HASH_4K_H #define _ASM_POWERPC_BOOK3S_64_HASH_4K_H
/*
* Entries per page directory level. The PTE level must use a 64b record
* for each page table entry. The PMD and PGD level use a 32b record for
* each entry by assuming that each entry is page aligned.
*/
#define H_PTE_INDEX_SIZE 9 #define H_PTE_INDEX_SIZE 9
#define H_PMD_INDEX_SIZE 7 #define H_PMD_INDEX_SIZE 7
#define H_PUD_INDEX_SIZE 9 #define H_PUD_INDEX_SIZE 9
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _ASM_POWERPC_BOOK3S_64_MMU_H_ #ifndef _ASM_POWERPC_BOOK3S_64_MMU_H_
#define _ASM_POWERPC_BOOK3S_64_MMU_H_ #define _ASM_POWERPC_BOOK3S_64_MMU_H_
#include <asm/page.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
* Page size definition * Page size definition
...@@ -24,6 +26,13 @@ struct mmu_psize_def { ...@@ -24,6 +26,13 @@ struct mmu_psize_def {
}; };
extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT]; extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
/*
* For BOOK3s 64 with 4k and 64K linux page size
* we want to use pointers, because the page table
* actually store pfn
*/
typedef pte_t *pgtable_t;
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
/* 64-bit classic hash table MMU */ /* 64-bit classic hash table MMU */
......
...@@ -37,10 +37,7 @@ extern struct vmemmap_backing *vmemmap_list; ...@@ -37,10 +37,7 @@ extern struct vmemmap_backing *vmemmap_list;
#define MAX_PGTABLE_INDEX_SIZE 0xf #define MAX_PGTABLE_INDEX_SIZE 0xf
extern struct kmem_cache *pgtable_cache[]; extern struct kmem_cache *pgtable_cache[];
#define PGT_CACHE(shift) ({ \ #define PGT_CACHE(shift) pgtable_cache[shift]
BUG_ON(!(shift)); \
pgtable_cache[(shift) - 1]; \
})
extern pte_t *pte_fragment_alloc(struct mm_struct *, unsigned long, int); extern pte_t *pte_fragment_alloc(struct mm_struct *, unsigned long, int);
extern pmd_t *pmd_fragment_alloc(struct mm_struct *, unsigned long); extern pmd_t *pmd_fragment_alloc(struct mm_struct *, unsigned long);
...@@ -50,6 +47,7 @@ extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift); ...@@ -50,6 +47,7 @@ extern void pgtable_free_tlb(struct mmu_gather *tlb, void *table, int shift);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void __tlb_remove_table(void *_table); extern void __tlb_remove_table(void *_table);
#endif #endif
void pte_frag_destroy(void *pte_frag);
static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm) static inline pgd_t *radix__pgd_alloc(struct mm_struct *mm)
{ {
......
...@@ -1304,7 +1304,7 @@ static inline int pgd_devmap(pgd_t pgd) ...@@ -1304,7 +1304,7 @@ static inline int pgd_devmap(pgd_t pgd)
} }
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
static inline const int pud_pfn(pud_t pud) static inline int pud_pfn(pud_t pud)
{ {
/* /*
* Currently all calls to pud_pfn() are gated around a pud_devmap() * Currently all calls to pud_pfn() are gated around a pud_devmap()
......
...@@ -71,7 +71,7 @@ extern struct ppc64_caches ppc64_caches; ...@@ -71,7 +71,7 @@ extern struct ppc64_caches ppc64_caches;
#else #else
#define __read_mostly __attribute__((__section__(".data..read_mostly"))) #define __read_mostly __attribute__((__section__(".data..read_mostly")))
#ifdef CONFIG_6xx #ifdef CONFIG_PPC_BOOK3S_32
extern long _get_L2CR(void); extern long _get_L2CR(void);
extern long _get_L3CR(void); extern long _get_L3CR(void);
extern void _set_L2CR(unsigned long); extern void _set_L2CR(unsigned long);
......
...@@ -33,14 +33,33 @@ unsigned int create_cond_branch(const unsigned int *addr, ...@@ -33,14 +33,33 @@ unsigned int create_cond_branch(const unsigned int *addr,
int patch_branch(unsigned int *addr, unsigned long target, int flags); int patch_branch(unsigned int *addr, unsigned long target, int flags);
int patch_instruction(unsigned int *addr, unsigned int instr); int patch_instruction(unsigned int *addr, unsigned int instr);
int raw_patch_instruction(unsigned int *addr, unsigned int instr); int raw_patch_instruction(unsigned int *addr, unsigned int instr);
int patch_instruction_site(s32 *addr, unsigned int instr);
int patch_branch_site(s32 *site, unsigned long target, int flags);
static inline unsigned long patch_site_addr(s32 *site) static inline unsigned long patch_site_addr(s32 *site)
{ {
return (unsigned long)site + *site; return (unsigned long)site + *site;
} }
static inline int patch_instruction_site(s32 *site, unsigned int instr)
{
return patch_instruction((unsigned int *)patch_site_addr(site), instr);
}
static inline int patch_branch_site(s32 *site, unsigned long target, int flags)
{
return patch_branch((unsigned int *)patch_site_addr(site), target, flags);
}
static inline int modify_instruction(unsigned int *addr, unsigned int clr,
unsigned int set)
{
return patch_instruction(addr, (*addr & ~clr) | set);
}
static inline int modify_instruction_site(s32 *site, unsigned int clr, unsigned int set)
{
return modify_instruction((unsigned int *)patch_site_addr(site), clr, set);
}
int instr_is_relative_branch(unsigned int instr); int instr_is_relative_branch(unsigned int instr);
int instr_is_relative_link_branch(unsigned int instr); int instr_is_relative_link_branch(unsigned int instr);
int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr); int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr);
......
...@@ -44,6 +44,7 @@ extern int machine_check_e500(struct pt_regs *regs); ...@@ -44,6 +44,7 @@ extern int machine_check_e500(struct pt_regs *regs);
extern int machine_check_e200(struct pt_regs *regs); extern int machine_check_e200(struct pt_regs *regs);
extern int machine_check_47x(struct pt_regs *regs); extern int machine_check_47x(struct pt_regs *regs);
int machine_check_8xx(struct pt_regs *regs); int machine_check_8xx(struct pt_regs *regs);
int machine_check_83xx(struct pt_regs *regs);
extern void cpu_down_flush_e500v2(void); extern void cpu_down_flush_e500v2(void);
extern void cpu_down_flush_e500mc(void); extern void cpu_down_flush_e500mc(void);
...@@ -296,7 +297,7 @@ static inline void cpu_feature_keys_init(void) { } ...@@ -296,7 +297,7 @@ static inline void cpu_feature_keys_init(void) { }
#define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | \ #define CPU_FTRS_PPC601 (CPU_FTR_COMMON | CPU_FTR_601 | \
CPU_FTR_COHERENT_ICACHE | CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_USE_RTC) CPU_FTR_COHERENT_ICACHE | CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_USE_RTC)
#define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \ #define CPU_FTRS_603 (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE) CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_PPC_LE | CPU_FTR_NOEXECUTE)
#define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_PPC_LE) #define CPU_FTRS_604 (CPU_FTR_COMMON | CPU_FTR_PPC_LE)
#define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | \ #define CPU_FTRS_740_NOTAU (CPU_FTR_COMMON | \
CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_L2CR | \ CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_L2CR | \
...@@ -367,15 +368,15 @@ static inline void cpu_feature_keys_init(void) { } ...@@ -367,15 +368,15 @@ static inline void cpu_feature_keys_init(void) { }
CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | \
CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \ CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | \
CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX) CPU_FTR_PPC_LE | CPU_FTR_NEED_PAIRED_STWCX)
#define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE) #define CPU_FTRS_82XX (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_NOEXECUTE)
#define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \ #define CPU_FTRS_G2_LE (CPU_FTR_COMMON | CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_MAYBE_CAN_NAP) CPU_FTR_MAYBE_CAN_NAP)
#define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \ #define CPU_FTRS_E300 (CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_MAYBE_CAN_NAP | \
CPU_FTR_COMMON) CPU_FTR_COMMON | CPU_FTR_NOEXECUTE)
#define CPU_FTRS_E300C2 (CPU_FTR_MAYBE_CAN_DOZE | \ #define CPU_FTRS_E300C2 (CPU_FTR_MAYBE_CAN_DOZE | \
CPU_FTR_MAYBE_CAN_NAP | \ CPU_FTR_MAYBE_CAN_NAP | \
CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE) CPU_FTR_COMMON | CPU_FTR_FPU_UNAVAILABLE | CPU_FTR_NOEXECUTE)
#define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON) #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON)
#define CPU_FTRS_8XX (CPU_FTR_NOEXECUTE) #define CPU_FTRS_8XX (CPU_FTR_NOEXECUTE)
#define CPU_FTRS_40X (CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_40X (CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE)
......
...@@ -39,9 +39,6 @@ extern int dma_nommu_mmap_coherent(struct device *dev, ...@@ -39,9 +39,6 @@ extern int dma_nommu_mmap_coherent(struct device *dev,
* to ensure it is consistent. * to ensure it is consistent.
*/ */
struct device; struct device;
extern void *__dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *handle, gfp_t gfp);
extern void __dma_free_coherent(size_t size, void *vaddr);
extern void __dma_sync(void *vaddr, size_t size, int direction); extern void __dma_sync(void *vaddr, size_t size, int direction);
extern void __dma_sync_page(struct page *page, unsigned long offset, extern void __dma_sync_page(struct page *page, unsigned long offset,
size_t size, int direction); size_t size, int direction);
...@@ -52,8 +49,6 @@ extern unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr); ...@@ -52,8 +49,6 @@ extern unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr);
* Cache coherent cores. * Cache coherent cores.
*/ */
#define __dma_alloc_coherent(dev, gfp, size, handle) NULL
#define __dma_free_coherent(size, addr) ((void)0)
#define __dma_sync(addr, size, rw) ((void)0) #define __dma_sync(addr, size, rw) ((void)0)
#define __dma_sync_page(pg, off, sz, rw) ((void)0) #define __dma_sync_page(pg, off, sz, rw) ((void)0)
...@@ -112,7 +107,5 @@ extern int dma_set_mask(struct device *dev, u64 dma_mask); ...@@ -112,7 +107,5 @@ extern int dma_set_mask(struct device *dev, u64 dma_mask);
extern u64 __dma_get_required_mask(struct device *dev); extern u64 __dma_get_required_mask(struct device *dev);
#define ARCH_HAS_DMA_MMAP_COHERENT
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_DMA_MAPPING_H */ #endif /* _ASM_DMA_MAPPING_H */
...@@ -48,6 +48,10 @@ ...@@ -48,6 +48,10 @@
#define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt) #define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt)
/* Alignement per CMA requirement. */
#define FADUMP_CMA_ALIGNMENT (PAGE_SIZE << \
max_t(unsigned long, MAX_ORDER - 1, pageblock_order))
/* Firmware provided dump sections */ /* Firmware provided dump sections */
#define FADUMP_CPU_STATE_DATA 0x0001 #define FADUMP_CPU_STATE_DATA 0x0001
#define FADUMP_HPTE_REGION 0x0002 #define FADUMP_HPTE_REGION 0x0002
...@@ -141,6 +145,7 @@ struct fw_dump { ...@@ -141,6 +145,7 @@ struct fw_dump {
unsigned long fadump_supported:1; unsigned long fadump_supported:1;
unsigned long dump_active:1; unsigned long dump_active:1;
unsigned long dump_registered:1; unsigned long dump_registered:1;
unsigned long nocma:1;
}; };
/* /*
...@@ -200,7 +205,7 @@ struct fad_crash_memory_ranges { ...@@ -200,7 +205,7 @@ struct fad_crash_memory_ranges {
unsigned long long size; unsigned long long size;
}; };
extern int is_fadump_boot_memory_area(u64 addr, ulong size); extern int is_fadump_memory_area(u64 addr, ulong size);
extern int early_init_dt_scan_fw_dump(unsigned long node, extern int early_init_dt_scan_fw_dump(unsigned long node,
const char *uname, int depth, void *data); const char *uname, int depth, void *data);
extern int fadump_reserve_mem(void); extern int fadump_reserve_mem(void);
......
...@@ -221,6 +221,17 @@ label##3: \ ...@@ -221,6 +221,17 @@ label##3: \
FTR_ENTRY_OFFSET 953b-954b; \ FTR_ENTRY_OFFSET 953b-954b; \
.popsection; .popsection;
#define START_BTB_FLUSH_SECTION \
955: \
#define END_BTB_FLUSH_SECTION \
956: \
.pushsection __btb_flush_fixup,"a"; \
.align 2; \
957: \
FTR_ENTRY_OFFSET 955b-957b; \
FTR_ENTRY_OFFSET 956b-957b; \
.popsection;
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/types.h> #include <linux/types.h>
...@@ -230,6 +241,7 @@ extern long __start___stf_entry_barrier_fixup, __stop___stf_entry_barrier_fixup; ...@@ -230,6 +241,7 @@ extern long __start___stf_entry_barrier_fixup, __stop___stf_entry_barrier_fixup;
extern long __start___stf_exit_barrier_fixup, __stop___stf_exit_barrier_fixup; extern long __start___stf_exit_barrier_fixup, __stop___stf_exit_barrier_fixup;
extern long __start___rfi_flush_fixup, __stop___rfi_flush_fixup; extern long __start___rfi_flush_fixup, __stop___rfi_flush_fixup;
extern long __start___barrier_nospec_fixup, __stop___barrier_nospec_fixup; extern long __start___barrier_nospec_fixup, __stop___barrier_nospec_fixup;
extern long __start__btb_flush_fixup, __stop__btb_flush_fixup;
void apply_feature_fixups(void); void apply_feature_fixups(void);
void setup_feature_keys(void); void setup_feature_keys(void);
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#ifdef CONFIG_HUGETLB_PAGE #ifdef CONFIG_HUGETLB_PAGE
#include <asm/page.h> #include <asm/page.h>
extern struct kmem_cache *hugepte_cache;
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
#include <asm/book3s/64/hugetlb.h> #include <asm/book3s/64/hugetlb.h>
...@@ -76,7 +74,9 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr, ...@@ -76,7 +74,9 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr,
unsigned long idx = 0; unsigned long idx = 0;
pte_t *dir = hugepd_page(hpd); pte_t *dir = hugepd_page(hpd);
#ifndef CONFIG_PPC_FSL_BOOK3E #ifdef CONFIG_PPC_8xx
idx = (addr & ((1UL << pdshift) - 1)) >> PAGE_SHIFT;
#elif !defined(CONFIG_PPC_FSL_BOOK3E)
idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(hpd); idx = (addr & ((1UL << pdshift) - 1)) >> hugepd_shift(hpd);
#endif #endif
...@@ -129,15 +129,14 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm, ...@@ -129,15 +129,14 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma, static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep) unsigned long addr, pte_t *ptep)
{ {
pte_t pte; huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
pte = huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
flush_hugetlb_page(vma, addr); flush_hugetlb_page(vma, addr);
} }
#define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS #define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS
extern int huge_ptep_set_access_flags(struct vm_area_struct *vma, int huge_ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep, unsigned long addr, pte_t *ptep,
pte_t pte, int dirty); pte_t pte, int dirty);
static inline void arch_clear_hugepage_flags(struct page *page) static inline void arch_clear_hugepage_flags(struct page *page)
{ {
......
...@@ -29,12 +29,14 @@ extern struct pci_dev *isa_bridge_pcidev; ...@@ -29,12 +29,14 @@ extern struct pci_dev *isa_bridge_pcidev;
#include <linux/device.h> #include <linux/device.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/mm.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/synch.h> #include <asm/synch.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#include <asm/pgtable.h>
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#include <asm/paca.h> #include <asm/paca.h>
...@@ -804,6 +806,8 @@ extern void __iounmap_at(void *ea, unsigned long size); ...@@ -804,6 +806,8 @@ extern void __iounmap_at(void *ea, unsigned long size);
*/ */
static inline unsigned long virt_to_phys(volatile void * address) static inline unsigned long virt_to_phys(volatile void * address)
{ {
WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !virt_addr_valid(address));
return __pa((unsigned long)address); return __pa((unsigned long)address);
} }
...@@ -827,7 +831,14 @@ static inline void * phys_to_virt(unsigned long address) ...@@ -827,7 +831,14 @@ static inline void * phys_to_virt(unsigned long address)
/* /*
* Change "struct page" to physical address. * Change "struct page" to physical address.
*/ */
#define page_to_phys(page) ((phys_addr_t)page_to_pfn(page) << PAGE_SHIFT) static inline phys_addr_t page_to_phys(struct page *page)
{
unsigned long pfn = page_to_pfn(page);
WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !pfn_valid(pfn));
return PFN_PHYS(pfn);
}
/* /*
* 32 bits still uses virt_to_bus() for it's implementation of DMA * 32 bits still uses virt_to_bus() for it's implementation of DMA
......
...@@ -215,11 +215,12 @@ struct iommu_table_group { ...@@ -215,11 +215,12 @@ struct iommu_table_group {
extern void iommu_register_group(struct iommu_table_group *table_group, extern void iommu_register_group(struct iommu_table_group *table_group,
int pci_domain_number, unsigned long pe_num); int pci_domain_number, unsigned long pe_num);
extern int iommu_add_device(struct device *dev); extern int iommu_add_device(struct iommu_table_group *table_group,
struct device *dev);
extern void iommu_del_device(struct device *dev); extern void iommu_del_device(struct device *dev);
extern int __init tce_iommu_bus_notifier_init(void); extern long iommu_tce_xchg(struct mm_struct *mm, struct iommu_table *tbl,
extern long iommu_tce_xchg(struct iommu_table *tbl, unsigned long entry, unsigned long entry, unsigned long *hpa,
unsigned long *hpa, enum dma_data_direction *direction); enum dma_data_direction *direction);
#else #else
static inline void iommu_register_group(struct iommu_table_group *table_group, static inline void iommu_register_group(struct iommu_table_group *table_group,
int pci_domain_number, int pci_domain_number,
...@@ -227,7 +228,8 @@ static inline void iommu_register_group(struct iommu_table_group *table_group, ...@@ -227,7 +228,8 @@ static inline void iommu_register_group(struct iommu_table_group *table_group,
{ {
} }
static inline int iommu_add_device(struct device *dev) static inline int iommu_add_device(struct iommu_table_group *table_group,
struct device *dev)
{ {
return 0; return 0;
} }
...@@ -235,11 +237,6 @@ static inline int iommu_add_device(struct device *dev) ...@@ -235,11 +237,6 @@ static inline int iommu_add_device(struct device *dev)
static inline void iommu_del_device(struct device *dev) static inline void iommu_del_device(struct device *dev)
{ {
} }
static inline int __init tce_iommu_bus_notifier_init(void)
{
return 0;
}
#endif /* !CONFIG_IOMMU_API */ #endif /* !CONFIG_IOMMU_API */
int dma_iommu_mapping_error(struct device *dev, dma_addr_t dma_addr); int dma_iommu_mapping_error(struct device *dev, dma_addr_t dma_addr);
......
...@@ -69,7 +69,6 @@ enum ipic_mcp_irq { ...@@ -69,7 +69,6 @@ enum ipic_mcp_irq {
IPIC_MCP_MU = 7, IPIC_MCP_MU = 7,
}; };
extern int ipic_set_priority(unsigned int irq, unsigned int priority);
extern void ipic_set_highest_priority(unsigned int irq); extern void ipic_set_highest_priority(unsigned int irq);
extern void ipic_set_default_priority(void); extern void ipic_set_default_priority(void);
extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq); extern void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq);
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#define MMU_FTR_USE_HIGH_BATS ASM_CONST(0x00010000) #define MMU_FTR_USE_HIGH_BATS ASM_CONST(0x00010000)
/* Enable >32-bit physical addresses on 32-bit processor, only used /* Enable >32-bit physical addresses on 32-bit processor, only used
* by CONFIG_6xx currently as BookE supports that from day 1 * by CONFIG_PPC_BOOK3S_32 currently as BookE supports that from day 1
*/ */
#define MMU_FTR_BIG_PHYS ASM_CONST(0x00020000) #define MMU_FTR_BIG_PHYS ASM_CONST(0x00020000)
...@@ -131,16 +131,37 @@ DECLARE_PER_CPU(int, next_tlbcam_idx); ...@@ -131,16 +131,37 @@ DECLARE_PER_CPU(int, next_tlbcam_idx);
#endif #endif
enum { enum {
MMU_FTRS_POSSIBLE = MMU_FTR_HPTE_TABLE | MMU_FTR_TYPE_8xx | MMU_FTRS_POSSIBLE =
MMU_FTR_TYPE_40x | MMU_FTR_TYPE_44x | MMU_FTR_TYPE_FSL_E | #ifdef CONFIG_PPC_BOOK3S
MMU_FTR_TYPE_47x | MMU_FTR_USE_HIGH_BATS | MMU_FTR_BIG_PHYS | MMU_FTR_HPTE_TABLE |
MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_USE_TLBILX | #endif
MMU_FTR_LOCK_BCAST_INVAL | MMU_FTR_NEED_DTLB_SW_LRU | #ifdef CONFIG_PPC_8xx
MMU_FTR_TYPE_8xx |
#endif
#ifdef CONFIG_40x
MMU_FTR_TYPE_40x |
#endif
#ifdef CONFIG_44x
MMU_FTR_TYPE_44x |
#endif
#if defined(CONFIG_E200) || defined(CONFIG_E500)
MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | MMU_FTR_USE_TLBILX |
#endif
#ifdef CONFIG_PPC_47x
MMU_FTR_TYPE_47x | MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL |
#endif
#ifdef CONFIG_PPC_BOOK3S_32
MMU_FTR_USE_HIGH_BATS | MMU_FTR_NEED_DTLB_SW_LRU |
#endif
#ifdef CONFIG_PPC_BOOK3E_64
MMU_FTR_USE_TLBRSRV | MMU_FTR_USE_PAIRED_MAS | MMU_FTR_USE_TLBRSRV | MMU_FTR_USE_PAIRED_MAS |
#endif
#ifdef CONFIG_PPC_BOOK3S_64
MMU_FTR_NO_SLBIE_B | MMU_FTR_16M_PAGE | MMU_FTR_TLBIEL | MMU_FTR_NO_SLBIE_B | MMU_FTR_16M_PAGE | MMU_FTR_TLBIEL |
MMU_FTR_LOCKLESS_TLBIE | MMU_FTR_CI_LARGE_PAGE | MMU_FTR_LOCKLESS_TLBIE | MMU_FTR_CI_LARGE_PAGE |
MMU_FTR_1T_SEGMENT | MMU_FTR_TLBIE_CROP_VA | MMU_FTR_1T_SEGMENT | MMU_FTR_TLBIE_CROP_VA |
MMU_FTR_KERNEL_RO | MMU_FTR_68_BIT_VA | MMU_FTR_KERNEL_RO | MMU_FTR_68_BIT_VA |
#endif
#ifdef CONFIG_PPC_RADIX_MMU #ifdef CONFIG_PPC_RADIX_MMU
MMU_FTR_TYPE_RADIX | MMU_FTR_TYPE_RADIX |
#endif #endif
...@@ -338,21 +359,11 @@ static inline void mmu_early_init_devtree(void) { } ...@@ -338,21 +359,11 @@ static inline void mmu_early_init_devtree(void) { }
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif #endif
#if defined(CONFIG_PPC_STD_MMU_32) #if defined(CONFIG_PPC_BOOK3S_32)
/* 32-bit classic hash table MMU */ /* 32-bit classic hash table MMU */
#include <asm/book3s/32/mmu-hash.h> #include <asm/book3s/32/mmu-hash.h>
#elif defined(CONFIG_40x) #elif defined(CONFIG_PPC_MMU_NOHASH)
/* 40x-style software loaded TLB */ #include <asm/nohash/mmu.h>
# include <asm/mmu-40x.h>
#elif defined(CONFIG_44x)
/* 44x-style software loaded TLB */
# include <asm/mmu-44x.h>
#elif defined(CONFIG_PPC_BOOK3E_MMU)
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
# include <asm/mmu-book3e.h>
#elif defined (CONFIG_PPC_8xx)
/* Motorola/Freescale 8xx software loaded TLB */
# include <asm/mmu-8xx.h>
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -21,9 +21,12 @@ struct mm_iommu_table_group_mem_t; ...@@ -21,9 +21,12 @@ struct mm_iommu_table_group_mem_t;
extern int isolate_lru_page(struct page *page); /* from internal.h */ extern int isolate_lru_page(struct page *page); /* from internal.h */
extern bool mm_iommu_preregistered(struct mm_struct *mm); extern bool mm_iommu_preregistered(struct mm_struct *mm);
extern long mm_iommu_get(struct mm_struct *mm, extern long mm_iommu_new(struct mm_struct *mm,
unsigned long ua, unsigned long entries, unsigned long ua, unsigned long entries,
struct mm_iommu_table_group_mem_t **pmem); struct mm_iommu_table_group_mem_t **pmem);
extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua,
unsigned long entries, unsigned long dev_hpa,
struct mm_iommu_table_group_mem_t **pmem);
extern long mm_iommu_put(struct mm_struct *mm, extern long mm_iommu_put(struct mm_struct *mm,
struct mm_iommu_table_group_mem_t *mem); struct mm_iommu_table_group_mem_t *mem);
extern void mm_iommu_init(struct mm_struct *mm); extern void mm_iommu_init(struct mm_struct *mm);
...@@ -32,15 +35,23 @@ extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm, ...@@ -32,15 +35,23 @@ extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm,
unsigned long ua, unsigned long size); unsigned long ua, unsigned long size);
extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm( extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup_rm(
struct mm_struct *mm, unsigned long ua, unsigned long size); struct mm_struct *mm, unsigned long ua, unsigned long size);
extern struct mm_iommu_table_group_mem_t *mm_iommu_find(struct mm_struct *mm, extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm,
unsigned long ua, unsigned long entries); unsigned long ua, unsigned long entries);
extern long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem, extern long mm_iommu_ua_to_hpa(struct mm_iommu_table_group_mem_t *mem,
unsigned long ua, unsigned int pageshift, unsigned long *hpa); unsigned long ua, unsigned int pageshift, unsigned long *hpa);
extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem, extern long mm_iommu_ua_to_hpa_rm(struct mm_iommu_table_group_mem_t *mem,
unsigned long ua, unsigned int pageshift, unsigned long *hpa); unsigned long ua, unsigned int pageshift, unsigned long *hpa);
extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua); extern void mm_iommu_ua_mark_dirty_rm(struct mm_struct *mm, unsigned long ua);
extern bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
unsigned int pageshift, unsigned long *size);
extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem); extern long mm_iommu_mapped_inc(struct mm_iommu_table_group_mem_t *mem);
extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem); extern void mm_iommu_mapped_dec(struct mm_iommu_table_group_mem_t *mem);
#else
static inline bool mm_iommu_is_devmem(struct mm_struct *mm, unsigned long hpa,
unsigned int pageshift, unsigned long *size)
{
return false;
}
#endif #endif
extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);
extern void set_context(unsigned long id, pgd_t *pgd); extern void set_context(unsigned long id, pgd_t *pgd);
...@@ -217,13 +228,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, ...@@ -217,13 +228,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm,
#endif #endif
} }
static inline int arch_dup_mmap(struct mm_struct *oldmm, #ifdef CONFIG_PPC_BOOK3E_64
struct mm_struct *mm)
{
return 0;
}
#ifndef CONFIG_PPC_BOOK3S_64
static inline void arch_exit_mmap(struct mm_struct *mm) static inline void arch_exit_mmap(struct mm_struct *mm)
{ {
} }
...@@ -247,6 +252,7 @@ static inline void arch_bprm_mm_init(struct mm_struct *mm, ...@@ -247,6 +252,7 @@ static inline void arch_bprm_mm_init(struct mm_struct *mm,
#ifdef CONFIG_PPC_MEM_KEYS #ifdef CONFIG_PPC_MEM_KEYS
bool arch_vma_access_permitted(struct vm_area_struct *vma, bool write, bool arch_vma_access_permitted(struct vm_area_struct *vma, bool write,
bool execute, bool foreign); bool execute, bool foreign);
void arch_dup_pkeys(struct mm_struct *oldmm, struct mm_struct *mm);
#else /* CONFIG_PPC_MEM_KEYS */ #else /* CONFIG_PPC_MEM_KEYS */
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
bool write, bool execute, bool foreign) bool write, bool execute, bool foreign)
...@@ -259,6 +265,7 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, ...@@ -259,6 +265,7 @@ static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
#define thread_pkey_regs_save(thread) #define thread_pkey_regs_save(thread)
#define thread_pkey_regs_restore(new_thread, old_thread) #define thread_pkey_regs_restore(new_thread, old_thread)
#define thread_pkey_regs_init(thread) #define thread_pkey_regs_init(thread)
#define arch_dup_pkeys(oldmm, mm)
static inline u64 pte_to_hpte_pkey_bits(u64 pteflags) static inline u64 pte_to_hpte_pkey_bits(u64 pteflags)
{ {
...@@ -267,5 +274,12 @@ static inline u64 pte_to_hpte_pkey_bits(u64 pteflags) ...@@ -267,5 +274,12 @@ static inline u64 pte_to_hpte_pkey_bits(u64 pteflags)
#endif /* CONFIG_PPC_MEM_KEYS */ #endif /* CONFIG_PPC_MEM_KEYS */
static inline int arch_dup_mmap(struct mm_struct *oldmm,
struct mm_struct *mm)
{
arch_dup_pkeys(oldmm, mm);
return 0;
}
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* __ASM_POWERPC_MMU_CONTEXT_H */ #endif /* __ASM_POWERPC_MMU_CONTEXT_H */
...@@ -111,6 +111,9 @@ typedef struct { ...@@ -111,6 +111,9 @@ typedef struct {
unsigned long vdso_base; unsigned long vdso_base;
} mm_context_t; } mm_context_t;
/* patch sites */
extern s32 patch__tlb_44x_hwater_D, patch__tlb_44x_hwater_I;
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#ifndef CONFIG_PPC_EARLY_DEBUG_44x #ifndef CONFIG_PPC_EARLY_DEBUG_44x
......
...@@ -190,6 +190,7 @@ typedef struct { ...@@ -190,6 +190,7 @@ typedef struct {
struct slice_mask mask_8m; struct slice_mask mask_8m;
# endif # endif
#endif #endif
void *pte_frag;
} mm_context_t; } mm_context_t;
#define PHYS_IMMR_BASE (mfspr(SPRN_IMMR) & 0xfff80000) #define PHYS_IMMR_BASE (mfspr(SPRN_IMMR) & 0xfff80000)
...@@ -244,6 +245,9 @@ extern s32 patch__itlbmiss_perf, patch__dtlbmiss_perf; ...@@ -244,6 +245,9 @@ extern s32 patch__itlbmiss_perf, patch__dtlbmiss_perf;
#define mmu_virtual_psize MMU_PAGE_4K #define mmu_virtual_psize MMU_PAGE_4K
#elif defined(CONFIG_PPC_16K_PAGES) #elif defined(CONFIG_PPC_16K_PAGES)
#define mmu_virtual_psize MMU_PAGE_16K #define mmu_virtual_psize MMU_PAGE_16K
#define PTE_FRAG_NR 4
#define PTE_FRAG_SIZE_SHIFT 12
#define PTE_FRAG_SIZE (1UL << 12)
#else #else
#error "Unsupported PAGE_SIZE" #error "Unsupported PAGE_SIZE"
#endif #endif
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_NOHASH_32_MMU_H_
#define _ASM_POWERPC_NOHASH_32_MMU_H_
#include <asm/page.h>
#if defined(CONFIG_40x)
/* 40x-style software loaded TLB */
#include <asm/nohash/32/mmu-40x.h>
#elif defined(CONFIG_44x)
/* 44x-style software loaded TLB */
#include <asm/nohash/32/mmu-44x.h>
#elif defined(CONFIG_PPC_BOOK3E_MMU)
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
#include <asm/nohash/mmu-book3e.h>
#elif defined (CONFIG_PPC_8xx)
/* Motorola/Freescale 8xx software loaded TLB */
#include <asm/nohash/32/mmu-8xx.h>
#endif
#ifndef __ASSEMBLY__
typedef pte_t *pgtable_t;
#endif
#endif /* _ASM_POWERPC_NOHASH_32_MMU_H_ */
...@@ -25,10 +25,7 @@ ...@@ -25,10 +25,7 @@
extern void __bad_pte(pmd_t *pmd); extern void __bad_pte(pmd_t *pmd);
extern struct kmem_cache *pgtable_cache[]; extern struct kmem_cache *pgtable_cache[];
#define PGT_CACHE(shift) ({ \ #define PGT_CACHE(shift) pgtable_cache[shift]
BUG_ON(!(shift)); \
pgtable_cache[(shift) - 1]; \
})
static inline pgd_t *pgd_alloc(struct mm_struct *mm) static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
...@@ -61,11 +58,10 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, ...@@ -61,11 +58,10 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page) pgtable_t pte_page)
{ {
*pmdp = __pmd((page_to_pfn(pte_page) << PAGE_SHIFT) | _PMD_USER | *pmdp = __pmd(__pa(pte_page) | _PMD_USER | _PMD_PRESENT);
_PMD_PRESENT);
} }
#define pmd_pgtable(pmd) pmd_page(pmd) #define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
#else #else
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
...@@ -77,31 +73,32 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, ...@@ -77,31 +73,32 @@ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page) pgtable_t pte_page)
{ {
*pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT); *pmdp = __pmd((unsigned long)pte_page | _PMD_PRESENT);
} }
#define pmd_pgtable(pmd) pmd_page(pmd) #define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
#endif #endif
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr); extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr); extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
void pte_frag_destroy(void *pte_frag);
pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
void pte_fragment_free(unsigned long *table, int kernel);
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{ {
free_page((unsigned long)pte); pte_fragment_free((unsigned long *)pte, 1);
} }
static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
{ {
pgtable_page_dtor(ptepage); pte_fragment_free((unsigned long *)ptepage, 0);
__free_page(ptepage);
} }
static inline void pgtable_free(void *table, unsigned index_size) static inline void pgtable_free(void *table, unsigned index_size)
{ {
if (!index_size) { if (!index_size) {
pgtable_page_dtor(virt_to_page(table)); pte_fragment_free((unsigned long *)table, 0);
free_page((unsigned long)table);
} else { } else {
BUG_ON(index_size > MAX_PGTABLE_INDEX_SIZE); BUG_ON(index_size > MAX_PGTABLE_INDEX_SIZE);
kmem_cache_free(PGT_CACHE(index_size), table); kmem_cache_free(PGT_CACHE(index_size), table);
...@@ -140,6 +137,6 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table, ...@@ -140,6 +137,6 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t table,
unsigned long address) unsigned long address)
{ {
tlb_flush_pgtable(tlb, address); tlb_flush_pgtable(tlb, address);
pgtable_free_tlb(tlb, page_address(table), 0); pgtable_free_tlb(tlb, table, 0);
} }
#endif /* _ASM_POWERPC_PGALLOC_32_H */ #endif /* _ASM_POWERPC_PGALLOC_32_H */
...@@ -232,7 +232,13 @@ static inline unsigned long pte_update(pte_t *p, ...@@ -232,7 +232,13 @@ static inline unsigned long pte_update(pte_t *p,
: "cc" ); : "cc" );
#else /* PTE_ATOMIC_UPDATES */ #else /* PTE_ATOMIC_UPDATES */
unsigned long old = pte_val(*p); unsigned long old = pte_val(*p);
*p = __pte((old & ~clr) | set); unsigned long new = (old & ~clr) | set;
#if defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES)
p->pte = p->pte1 = p->pte2 = p->pte3 = new;
#else
*p = __pte(new);
#endif
#endif /* !PTE_ATOMIC_UPDATES */ #endif /* !PTE_ATOMIC_UPDATES */
#ifdef CONFIG_44x #ifdef CONFIG_44x
...@@ -333,12 +339,12 @@ static inline int pte_young(pte_t pte) ...@@ -333,12 +339,12 @@ static inline int pte_young(pte_t pte)
*/ */
#ifndef CONFIG_BOOKE #ifndef CONFIG_BOOKE
#define pmd_page_vaddr(pmd) \ #define pmd_page_vaddr(pmd) \
((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) ((unsigned long)__va(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
#define pmd_page(pmd) \ #define pmd_page(pmd) \
pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
#else #else
#define pmd_page_vaddr(pmd) \ #define pmd_page_vaddr(pmd) \
((unsigned long) (pmd_val(pmd) & PAGE_MASK)) ((unsigned long)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
#define pmd_page(pmd) \ #define pmd_page(pmd) \
pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT)) pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT))
#endif #endif
...@@ -357,7 +363,8 @@ static inline int pte_young(pte_t pte) ...@@ -357,7 +363,8 @@ static inline int pte_young(pte_t pte)
(pmd_bad(*(dir)) ? NULL : (pte_t *)pmd_page_vaddr(*(dir)) + \ (pmd_bad(*(dir)) ? NULL : (pte_t *)pmd_page_vaddr(*(dir)) + \
pte_index(addr)) pte_index(addr))
#define pte_offset_map(dir, addr) \ #define pte_offset_map(dir, addr) \
((pte_t *) kmap_atomic(pmd_page(*(dir))) + pte_index(addr)) ((pte_t *)(kmap_atomic(pmd_page(*(dir))) + \
(pmd_page_vaddr(*(dir)) & ~PAGE_MASK)) + pte_index(addr))
#define pte_unmap(pte) kunmap_atomic(pte) #define pte_unmap(pte) kunmap_atomic(pte)
/* /*
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* is cleared in the TLB miss handler before the TLB entry is loaded. * is cleared in the TLB miss handler before the TLB entry is loaded.
* - All other bits of the PTE are loaded into TLBLO without * - All other bits of the PTE are loaded into TLBLO without
* modification, leaving us only the bits 20, 21, 24, 25, 26, 30 for * modification, leaving us only the bits 20, 21, 24, 25, 26, 30 for
* software PTE bits. We actually use use bits 21, 24, 25, and * software PTE bits. We actually use bits 21, 24, 25, and
* 30 respectively for the software bits: ACCESSED, DIRTY, RW, and * 30 respectively for the software bits: ACCESSED, DIRTY, RW, and
* PRESENT. * PRESENT.
*/ */
......
...@@ -65,9 +65,6 @@ ...@@ -65,9 +65,6 @@
#define _PTE_NONE_MASK 0 #define _PTE_NONE_MASK 0
/* Until my rework is finished, 8xx still needs atomic PTE updates */
#define PTE_ATOMIC_UPDATES 1
#ifdef CONFIG_PPC_16K_PAGES #ifdef CONFIG_PPC_16K_PAGES
#define _PAGE_PSIZE _PAGE_SPS #define _PAGE_PSIZE _PAGE_SPS
#else #else
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_NOHASH_64_MMU_H_
#define _ASM_POWERPC_NOHASH_64_MMU_H_
/* Freescale Book-E software loaded TLB or Book-3e (ISA 2.06+) MMU */
#include <asm/nohash/mmu-book3e.h>
#ifndef __ASSEMBLY__
typedef struct page *pgtable_t;
#endif
#endif /* _ASM_POWERPC_NOHASH_64_MMU_H_ */
...@@ -36,10 +36,7 @@ extern struct vmemmap_backing *vmemmap_list; ...@@ -36,10 +36,7 @@ extern struct vmemmap_backing *vmemmap_list;
#define MAX_PGTABLE_INDEX_SIZE 0xf #define MAX_PGTABLE_INDEX_SIZE 0xf
extern struct kmem_cache *pgtable_cache[]; extern struct kmem_cache *pgtable_cache[];
#define PGT_CACHE(shift) ({ \ #define PGT_CACHE(shift) pgtable_cache[shift]
BUG_ON(!(shift)); \
pgtable_cache[(shift) - 1]; \
})
static inline pgd_t *pgd_alloc(struct mm_struct *mm) static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{ {
......
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_NOHASH_MMU_H_
#define _ASM_POWERPC_NOHASH_MMU_H_
#ifdef CONFIG_PPC64
#include <asm/nohash/64/mmu.h>
#else
#include <asm/nohash/32/mmu.h>
#endif
#endif /* _ASM_POWERPC_NOHASH_MMU_H_ */
...@@ -209,7 +209,11 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr, ...@@ -209,7 +209,11 @@ static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
/* Anything else just stores the PTE normally. That covers all 64-bit /* Anything else just stores the PTE normally. That covers all 64-bit
* cases, and 32-bit non-hash with 32-bit PTEs. * cases, and 32-bit non-hash with 32-bit PTEs.
*/ */
#if defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES)
ptep->pte = ptep->pte1 = ptep->pte2 = ptep->pte3 = pte_val(pte);
#else
*ptep = pte; *ptep = pte;
#endif
/* /*
* With hardware tablewalk, a sync is needed to ensure that * With hardware tablewalk, a sync is needed to ensure that
......
...@@ -347,6 +347,7 @@ extern int opal_async_comp_init(void); ...@@ -347,6 +347,7 @@ extern int opal_async_comp_init(void);
extern int opal_sensor_init(void); extern int opal_sensor_init(void);
extern int opal_hmi_handler_init(void); extern int opal_hmi_handler_init(void);
extern int opal_event_init(void); extern int opal_event_init(void);
int opal_power_control_init(void);
extern int opal_machine_check(struct pt_regs *regs); extern int opal_machine_check(struct pt_regs *regs);
extern bool opal_mce_check_early_recovery(struct pt_regs *regs); extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
......
...@@ -289,7 +289,7 @@ static inline bool pfn_valid(unsigned long pfn) ...@@ -289,7 +289,7 @@ static inline bool pfn_valid(unsigned long pfn)
* page tables at arbitrary addresses, this breaks and will have to change. * page tables at arbitrary addresses, this breaks and will have to change.
*/ */
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#define PD_HUGE 0x8000000000000000 #define PD_HUGE 0x8000000000000000UL
#else #else
#define PD_HUGE 0x80000000 #define PD_HUGE 0x80000000
#endif #endif
...@@ -335,23 +335,11 @@ void arch_free_page(struct page *page, int order); ...@@ -335,23 +335,11 @@ void arch_free_page(struct page *page, int order);
#endif #endif
struct vm_area_struct; struct vm_area_struct;
#ifdef CONFIG_PPC_BOOK3S_64
/*
* For BOOK3s 64 with 4k and 64K linux page size
* we want to use pointers, because the page table
* actually store pfn
*/
typedef pte_t *pgtable_t;
#else
#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC64)
typedef pte_t *pgtable_t;
#else
typedef struct page *pgtable_t;
#endif
#endif
#include <asm-generic/memory_model.h> #include <asm-generic/memory_model.h>
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#include <asm/slice.h> #include <asm/slice.h>
#define ARCH_ZONE_DMA_BITS 31
#endif /* _ASM_POWERPC_PAGE_H */ #endif /* _ASM_POWERPC_PAGE_H */
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#define PTE_FLAGS_OFFSET 0 #define PTE_FLAGS_OFFSET 0
#endif #endif
#ifdef CONFIG_PPC_256K_PAGES #if defined(CONFIG_PPC_256K_PAGES) || \
(defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES))
#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2 - 2) /* 1/4 of a page */ #define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2 - 2) /* 1/4 of a page */
#else #else
#define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */ #define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */
......
...@@ -129,6 +129,7 @@ struct pci_controller { ...@@ -129,6 +129,7 @@ struct pci_controller {
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
void *private_data; void *private_data;
struct npu *npu;
}; };
/* These are used for config access before all the PCI probing /* These are used for config access before all the PCI probing
......
...@@ -129,5 +129,9 @@ extern void pcibios_scan_phb(struct pci_controller *hose); ...@@ -129,5 +129,9 @@ extern void pcibios_scan_phb(struct pci_controller *hose);
extern struct pci_dev *pnv_pci_get_gpu_dev(struct pci_dev *npdev); extern struct pci_dev *pnv_pci_get_gpu_dev(struct pci_dev *npdev);
extern struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index); extern struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index);
extern int pnv_npu2_init(struct pci_controller *hose);
extern int pnv_npu2_map_lpar_dev(struct pci_dev *gpdev, unsigned int lparid,
unsigned long msr);
extern int pnv_npu2_unmap_lpar_dev(struct pci_dev *gpdev);
#endif /* __ASM_POWERPC_PCI_H */ #endif /* __ASM_POWERPC_PCI_H */
...@@ -39,4 +39,7 @@ ...@@ -39,4 +39,7 @@
(regs)->gpr[1] = current_stack_pointer(); \ (regs)->gpr[1] = current_stack_pointer(); \
asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \ asm volatile("mfmsr %0" : "=r" ((regs)->msr)); \
} while (0) } while (0)
/* To support perf_regs sier update */
extern bool is_sier_available(void);
#endif #endif
...@@ -41,6 +41,8 @@ struct power_pmu { ...@@ -41,6 +41,8 @@ struct power_pmu {
void (*get_mem_data_src)(union perf_mem_data_src *dsrc, void (*get_mem_data_src)(union perf_mem_data_src *dsrc,
u32 flags, struct pt_regs *regs); u32 flags, struct pt_regs *regs);
void (*get_mem_weight)(u64 *weight); void (*get_mem_weight)(u64 *weight);
unsigned long group_constraint_mask;
unsigned long group_constraint_val;
u64 (*bhrb_filter_map)(u64 branch_sample_type); u64 (*bhrb_filter_map)(u64 branch_sample_type);
void (*config_bhrb)(u64 pmu_bhrb_filter); void (*config_bhrb)(u64 pmu_bhrb_filter);
void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]); void (*disable_pmc)(unsigned int pmc, unsigned long mmcr[]);
......
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
#define _ASM_POWERPC_PGTABLE_TYPES_H #define _ASM_POWERPC_PGTABLE_TYPES_H
/* PTE level */ /* PTE level */
#if defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES)
typedef struct { pte_basic_t pte, pte1, pte2, pte3; } pte_t;
#else
typedef struct { pte_basic_t pte; } pte_t; typedef struct { pte_basic_t pte; } pte_t;
#endif
#define __pte(x) ((pte_t) { (x) }) #define __pte(x) ((pte_t) { (x) })
static inline pte_basic_t pte_val(pte_t x) static inline pte_basic_t pte_val(pte_t x)
{ {
......
...@@ -66,7 +66,6 @@ extern unsigned long empty_zero_page[]; ...@@ -66,7 +66,6 @@ extern unsigned long empty_zero_page[];
extern pgd_t swapper_pg_dir[]; extern pgd_t swapper_pg_dir[];
void limit_zone_pfn(enum zone_type zone, unsigned long max_pfn);
int dma_pfn_limit_to_zone(u64 pfn_limit); int dma_pfn_limit_to_zone(u64 pfn_limit);
extern void paging_init(void); extern void paging_init(void);
...@@ -101,7 +100,7 @@ extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr, ...@@ -101,7 +100,7 @@ extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
/* can we use this in kvm */ /* can we use this in kvm */
unsigned long vmalloc_to_phys(void *vmalloc_addr); unsigned long vmalloc_to_phys(void *vmalloc_addr);
void pgtable_cache_add(unsigned shift, void (*ctor)(void *)); void pgtable_cache_add(unsigned int shift);
void pgtable_cache_init(void); void pgtable_cache_init(void);
#if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_PPC32) #if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_PPC32)
...@@ -110,6 +109,35 @@ void mark_initmem_nx(void); ...@@ -110,6 +109,35 @@ void mark_initmem_nx(void);
static inline void mark_initmem_nx(void) { } static inline void mark_initmem_nx(void) { }
#endif #endif
/*
* When used, PTE_FRAG_NR is defined in subarch pgtable.h
* so we are sure it is included when arriving here.
*/
#ifdef PTE_FRAG_NR
static inline void *pte_frag_get(mm_context_t *ctx)
{
return ctx->pte_frag;
}
static inline void pte_frag_set(mm_context_t *ctx, void *p)
{
ctx->pte_frag = p;
}
#else
#define PTE_FRAG_NR 1
#define PTE_FRAG_SIZE_SHIFT PAGE_SHIFT
#define PTE_FRAG_SIZE (1UL << PTE_FRAG_SIZE_SHIFT)
static inline void *pte_frag_get(mm_context_t *ctx)
{
return NULL;
}
static inline void pte_frag_set(mm_context_t *ctx, void *p)
{
}
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_PGTABLE_H */ #endif /* _ASM_POWERPC_PGTABLE_H */
...@@ -257,6 +257,7 @@ ...@@ -257,6 +257,7 @@
#define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1ffffe #define PPC_INST_MTSPR_DSCR_USER_MASK 0xfc1ffffe
#define PPC_INST_MFVSRD 0x7c000066 #define PPC_INST_MFVSRD 0x7c000066
#define PPC_INST_MTVSRD 0x7c000166 #define PPC_INST_MTVSRD 0x7c000166
#define PPC_INST_SC 0x44000002
#define PPC_INST_SLBFEE 0x7c0007a7 #define PPC_INST_SLBFEE 0x7c0007a7
#define PPC_INST_SLBIA 0x7c0003e4 #define PPC_INST_SLBIA 0x7c0003e4
......
...@@ -480,26 +480,11 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) ...@@ -480,26 +480,11 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
ori rd,rd,((KERNELBASE>>48)&0xFFFF);\ ori rd,rd,((KERNELBASE>>48)&0xFFFF);\
rotldi rd,rd,48 rotldi rd,rd,48
#else #else
/*
* On APUS (Amiga PowerPC cpu upgrade board), we don't know the
* physical base address of RAM at compile time.
*/
#define toreal(rd) tophys(rd,rd) #define toreal(rd) tophys(rd,rd)
#define fromreal(rd) tovirt(rd,rd) #define fromreal(rd) tovirt(rd,rd)
#define tophys(rd,rs) \ #define tophys(rd, rs) addis rd, rs, -PAGE_OFFSET@h
0: addis rd,rs,-PAGE_OFFSET@h; \ #define tovirt(rd, rs) addis rd, rs, PAGE_OFFSET@h
.section ".vtop_fixup","aw"; \
.align 1; \
.long 0b; \
.previous
#define tovirt(rd,rs) \
0: addis rd,rs,PAGE_OFFSET@h; \
.section ".ptov_fixup","aw"; \
.align 1; \
.long 0b; \
.previous
#endif #endif
#ifdef CONFIG_PPC_BOOK3S_64 #ifdef CONFIG_PPC_BOOK3S_64
...@@ -821,4 +806,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601) ...@@ -821,4 +806,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
stringify_in_c(.long (_target) - . ;) \ stringify_in_c(.long (_target) - . ;) \
stringify_in_c(.previous) stringify_in_c(.previous)
#ifdef CONFIG_PPC_FSL_BOOK3E
#define BTB_FLUSH(reg) \
lis reg,BUCSR_INIT@h; \
ori reg,reg,BUCSR_INIT@l; \
mtspr SPRN_BUCSR,reg; \
isync;
#else
#define BTB_FLUSH(reg)
#endif /* CONFIG_PPC_FSL_BOOK3E */
#endif /* _ASM_POWERPC_PPC_ASM_H */ #endif /* _ASM_POWERPC_PPC_ASM_H */
...@@ -582,7 +582,7 @@ ...@@ -582,7 +582,7 @@
#define HID0_POWER9_RADIX __MASK(63 - 8) #define HID0_POWER9_RADIX __MASK(63 - 8)
#define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */
#ifdef CONFIG_6xx #ifdef CONFIG_PPC_BOOK3S_32
#define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */
#define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */
#define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */
...@@ -769,6 +769,8 @@ ...@@ -769,6 +769,8 @@
#define SRR1_PROGTRAP 0x00020000 /* Trap */ #define SRR1_PROGTRAP 0x00020000 /* Trap */
#define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */ #define SRR1_PROGADDR 0x00010000 /* SRR0 contains subsequent addr */
#define SRR1_MCE_MCP 0x00080000 /* Machine check signal caused interrupt */
#define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */ #define SPRN_HSRR0 0x13A /* Save/Restore Register 0 */
#define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */ #define SPRN_HSRR1 0x13B /* Save/Restore Register 1 */
#define HSRR1_DENORM 0x00100000 /* Denorm exception */ #define HSRR1_DENORM 0x00100000 /* Denorm exception */
......
...@@ -67,6 +67,13 @@ void do_barrier_nospec_fixups_range(bool enable, void *start, void *end); ...@@ -67,6 +67,13 @@ void do_barrier_nospec_fixups_range(bool enable, void *start, void *end);
static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *end) { }; static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *end) { };
#endif #endif
#ifdef CONFIG_PPC_FSL_BOOK3E
void setup_spectre_v2(void);
#else
static inline void setup_spectre_v2(void) {};
#endif
void do_btb_flush_fixups(void);
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_SETUP_H */ #endif /* _ASM_POWERPC_SETUP_H */
......
...@@ -213,30 +213,18 @@ ...@@ -213,30 +213,18 @@
* respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow * respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow
* (i.e. carry out) is not stored anywhere, and is lost. * (i.e. carry out) is not stored anywhere, and is lost.
*/ */
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \ do { \
if (__builtin_constant_p (bh) && (bh) == 0) \ if (__builtin_constant_p (bh) && (bh) == 0) \
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
: "=r" ((USItype)(sh)), \ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
"=&r" ((USItype)(sl)) \ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
: "%r" ((USItype)(ah)), \ __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
"%r" ((USItype)(al)), \ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
"rI" ((USItype)(bl))); \
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
__asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "%r" ((USItype)(ah)), \
"%r" ((USItype)(al)), \
"rI" ((USItype)(bl))); \
else \ else \
__asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
: "=r" ((USItype)(sh)), \ : "=r" (sh), "=&r" (sl) \
"=&r" ((USItype)(sl)) \ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
: "%r" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"%r" ((USItype)(al)), \
"rI" ((USItype)(bl))); \
} while (0) } while (0)
/* sub_ddmmss is used in op-2.h and udivmodti4.c and should be equivalent to /* sub_ddmmss is used in op-2.h and udivmodti4.c and should be equivalent to
...@@ -248,44 +236,24 @@ ...@@ -248,44 +236,24 @@
* and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, * and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
* and is lost. * and is lost.
*/ */
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
do { \ do { \
if (__builtin_constant_p (ah) && (ah) == 0) \ if (__builtin_constant_p (ah) && (ah) == 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
: "=r" ((USItype)(sh)), \ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
"=&r" ((USItype)(sl)) \ else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
: "r" ((USItype)(bh)), \ __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
"rI" ((USItype)(al)), \ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
"r" ((USItype)(bl))); \
else if (__builtin_constant_p (ah) && (ah) ==~(USItype) 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(bh)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
else if (__builtin_constant_p (bh) && (bh) == 0) \ else if (__builtin_constant_p (bh) && (bh) == 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
: "=r" ((USItype)(sh)), \ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
"=&r" ((USItype)(sl)) \ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
: "r" ((USItype)(ah)), \ __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
"rI" ((USItype)(al)), \ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
"r" ((USItype)(bl))); \
else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0) \
__asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
: "=r" ((USItype)(sh)), \
"=&r" ((USItype)(sl)) \
: "r" ((USItype)(ah)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
else \ else \
__asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
: "=r" ((USItype)(sh)), \ : "=r" (sh), "=&r" (sl) \
"=&r" ((USItype)(sl)) \ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
: "r" ((USItype)(ah)), \
"r" ((USItype)(bh)), \
"rI" ((USItype)(al)), \
"r" ((USItype)(bl))); \
} while (0) } while (0)
/* asm fragments for mul and div */ /* asm fragments for mul and div */
...@@ -294,13 +262,10 @@ ...@@ -294,13 +262,10 @@
* UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype * UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype
* word product in HIGH_PROD and LOW_PROD. * word product in HIGH_PROD and LOW_PROD.
*/ */
#define umul_ppmm(ph, pl, m0, m1) \ #define umul_ppmm(ph, pl, m0, m1) \
do { \ do { \
USItype __m0 = (m0), __m1 = (m1); \ USItype __m0 = (m0), __m1 = (m1); \
__asm__ ("mulhwu %0,%1,%2" \ __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
: "=r" ((USItype)(ph)) \
: "%r" (__m0), \
"r" (__m1)); \
(pl) = __m0 * __m1; \ (pl) = __m0 * __m1; \
} while (0) } while (0)
...@@ -312,9 +277,10 @@ ...@@ -312,9 +277,10 @@
* significant bit of DENOMINATOR must be 1, then the pre-processor symbol * significant bit of DENOMINATOR must be 1, then the pre-processor symbol
* UDIV_NEEDS_NORMALIZATION is defined to 1. * UDIV_NEEDS_NORMALIZATION is defined to 1.
*/ */
#define udiv_qrnnd(q, r, n1, n0, d) \ #define udiv_qrnnd(q, r, n1, n0, d) \
do { \ do { \
UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m; \ UWtype __d1, __d0, __q1, __q0; \
UWtype __r1, __r0, __m; \
__d1 = __ll_highpart (d); \ __d1 = __ll_highpart (d); \
__d0 = __ll_lowpart (d); \ __d0 = __ll_lowpart (d); \
\ \
...@@ -325,7 +291,7 @@ ...@@ -325,7 +291,7 @@
if (__r1 < __m) \ if (__r1 < __m) \
{ \ { \
__q1--, __r1 += (d); \ __q1--, __r1 += (d); \
if (__r1 >= (d)) /* we didn't get carry when adding to __r1 */ \ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
if (__r1 < __m) \ if (__r1 < __m) \
__q1--, __r1 += (d); \ __q1--, __r1 += (d); \
} \ } \
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
#include <asm/nohash/32/slice.h> #include <asm/nohash/32/slice.h>
#endif #endif
#ifndef __ASSEMBLY__
struct mm_struct;
#ifdef CONFIG_PPC_MM_SLICES #ifdef CONFIG_PPC_MM_SLICES
#ifdef CONFIG_HUGETLB_PAGE #ifdef CONFIG_HUGETLB_PAGE
...@@ -18,10 +22,6 @@ ...@@ -18,10 +22,6 @@
#define HAVE_ARCH_UNMAPPED_AREA #define HAVE_ARCH_UNMAPPED_AREA
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
#ifndef __ASSEMBLY__
struct mm_struct;
unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
unsigned long flags, unsigned int psize, unsigned long flags, unsigned int psize,
int topdown); int topdown);
...@@ -34,8 +34,12 @@ void slice_set_range_psize(struct mm_struct *mm, unsigned long start, ...@@ -34,8 +34,12 @@ void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
void slice_init_new_context_exec(struct mm_struct *mm); void slice_init_new_context_exec(struct mm_struct *mm);
void slice_setup_new_exec(void); void slice_setup_new_exec(void);
#endif /* __ASSEMBLY__ */ #else /* CONFIG_PPC_MM_SLICES */
static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
#endif /* CONFIG_PPC_MM_SLICES */ #endif /* CONFIG_PPC_MM_SLICES */
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_SLICE_H */ #endif /* _ASM_POWERPC_SLICE_H */
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
#include <linux/thread_info.h> #include <linux/thread_info.h>
/* ftrace syscalls requires exporting the sys_call_table */ /* ftrace syscalls requires exporting the sys_call_table */
#ifdef CONFIG_FTRACE_SYSCALLS
extern const unsigned long sys_call_table[]; extern const unsigned long sys_call_table[];
#endif /* CONFIG_FTRACE_SYSCALLS */ extern const unsigned long compat_sys_call_table[];
static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
{ {
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* List of powerpc syscalls. For the meaning of the _SPU suffix see
* arch/powerpc/platforms/cell/spu_callbacks.c
*/
SYSCALL(restart_syscall)
SYSCALL(exit)
PPC_SYS(fork)
SYSCALL_SPU(read)
SYSCALL_SPU(write)
COMPAT_SYS_SPU(open)
SYSCALL_SPU(close)
SYSCALL_SPU(waitpid)
SYSCALL_SPU(creat)
SYSCALL_SPU(link)
SYSCALL_SPU(unlink)
COMPAT_SYS(execve)
SYSCALL_SPU(chdir)
COMPAT_SYS_SPU(time)
SYSCALL_SPU(mknod)
SYSCALL_SPU(chmod)
SYSCALL_SPU(lchown)
SYSCALL(ni_syscall)
OLDSYS(stat)
COMPAT_SYS_SPU(lseek)
SYSCALL_SPU(getpid)
COMPAT_SYS(mount)
SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
SYSCALL_SPU(setuid)
SYSCALL_SPU(getuid)
COMPAT_SYS_SPU(stime)
COMPAT_SYS(ptrace)
SYSCALL_SPU(alarm)
OLDSYS(fstat)
SYSCALL(pause)
COMPAT_SYS(utime)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL_SPU(access)
SYSCALL_SPU(nice)
SYSCALL(ni_syscall)
SYSCALL_SPU(sync)
SYSCALL_SPU(kill)
SYSCALL_SPU(rename)
SYSCALL_SPU(mkdir)
SYSCALL_SPU(rmdir)
SYSCALL_SPU(dup)
SYSCALL_SPU(pipe)
COMPAT_SYS_SPU(times)
SYSCALL(ni_syscall)
SYSCALL_SPU(brk)
SYSCALL_SPU(setgid)
SYSCALL_SPU(getgid)
SYSCALL(signal)
SYSCALL_SPU(geteuid)
SYSCALL_SPU(getegid)
SYSCALL(acct)
SYSCALL(umount)
SYSCALL(ni_syscall)
COMPAT_SYS_SPU(ioctl)
COMPAT_SYS_SPU(fcntl)
SYSCALL(ni_syscall)
SYSCALL_SPU(setpgid)
SYSCALL(ni_syscall)
SYSX(sys_ni_syscall,sys_olduname,sys_olduname)
SYSCALL_SPU(umask)
SYSCALL_SPU(chroot)
COMPAT_SYS(ustat)
SYSCALL_SPU(dup2)
SYSCALL_SPU(getppid)
SYSCALL_SPU(getpgrp)
SYSCALL_SPU(setsid)
SYS32ONLY(sigaction)
SYSCALL_SPU(sgetmask)
SYSCALL_SPU(ssetmask)
SYSCALL_SPU(setreuid)
SYSCALL_SPU(setregid)
#define compat_sys_sigsuspend sys_sigsuspend
SYS32ONLY(sigsuspend)
SYSX(sys_ni_syscall,compat_sys_sigpending,sys_sigpending)
SYSCALL_SPU(sethostname)
COMPAT_SYS_SPU(setrlimit)
SYSX(sys_ni_syscall,compat_sys_old_getrlimit,sys_old_getrlimit)
COMPAT_SYS_SPU(getrusage)
COMPAT_SYS_SPU(gettimeofday)
COMPAT_SYS_SPU(settimeofday)
SYSCALL_SPU(getgroups)
SYSCALL_SPU(setgroups)
SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
SYSCALL_SPU(symlink)
OLDSYS(lstat)
SYSCALL_SPU(readlink)
SYSCALL(uselib)
SYSCALL(swapon)
SYSCALL(reboot)
SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir)
SYSCALL_SPU(mmap)
SYSCALL_SPU(munmap)
COMPAT_SYS_SPU(truncate)
COMPAT_SYS_SPU(ftruncate)
SYSCALL_SPU(fchmod)
SYSCALL_SPU(fchown)
SYSCALL_SPU(getpriority)
SYSCALL_SPU(setpriority)
SYSCALL(ni_syscall)
COMPAT_SYS(statfs)
COMPAT_SYS(fstatfs)
SYSCALL(ni_syscall)
COMPAT_SYS_SPU(socketcall)
SYSCALL_SPU(syslog)
COMPAT_SYS_SPU(setitimer)
COMPAT_SYS_SPU(getitimer)
COMPAT_SYS_SPU(newstat)
COMPAT_SYS_SPU(newlstat)
COMPAT_SYS_SPU(newfstat)
SYSX(sys_ni_syscall,sys_uname,sys_uname)
SYSCALL(ni_syscall)
SYSCALL_SPU(vhangup)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
COMPAT_SYS_SPU(wait4)
SYSCALL(swapoff)
COMPAT_SYS_SPU(sysinfo)
COMPAT_SYS(ipc)
SYSCALL_SPU(fsync)
SYS32ONLY(sigreturn)
PPC_SYS(clone)
SYSCALL_SPU(setdomainname)
SYSCALL_SPU(newuname)
SYSCALL(ni_syscall)
COMPAT_SYS_SPU(adjtimex)
SYSCALL_SPU(mprotect)
SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
SYSCALL(ni_syscall)
SYSCALL(init_module)
SYSCALL(delete_module)
SYSCALL(ni_syscall)
SYSCALL(quotactl)
SYSCALL_SPU(getpgid)
SYSCALL_SPU(fchdir)
SYSCALL_SPU(bdflush)
SYSCALL_SPU(sysfs)
SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
SYSCALL(ni_syscall)
SYSCALL_SPU(setfsuid)
SYSCALL_SPU(setfsgid)
SYSCALL_SPU(llseek)
COMPAT_SYS_SPU(getdents)
COMPAT_SPU_NEW(select)
SYSCALL_SPU(flock)
SYSCALL_SPU(msync)
COMPAT_SYS_SPU(readv)
COMPAT_SYS_SPU(writev)
SYSCALL_SPU(getsid)
SYSCALL_SPU(fdatasync)
COMPAT_SYS(sysctl)
SYSCALL_SPU(mlock)
SYSCALL_SPU(munlock)
SYSCALL_SPU(mlockall)
SYSCALL_SPU(munlockall)
SYSCALL_SPU(sched_setparam)
SYSCALL_SPU(sched_getparam)
SYSCALL_SPU(sched_setscheduler)
SYSCALL_SPU(sched_getscheduler)
SYSCALL_SPU(sched_yield)
SYSCALL_SPU(sched_get_priority_max)
SYSCALL_SPU(sched_get_priority_min)
COMPAT_SYS_SPU(sched_rr_get_interval)
COMPAT_SYS_SPU(nanosleep)
SYSCALL_SPU(mremap)
SYSCALL_SPU(setresuid)
SYSCALL_SPU(getresuid)
SYSCALL(ni_syscall)
SYSCALL_SPU(poll)
SYSCALL(ni_syscall)
SYSCALL_SPU(setresgid)
SYSCALL_SPU(getresgid)
SYSCALL_SPU(prctl)
COMPAT_SYS(rt_sigreturn)
COMPAT_SYS(rt_sigaction)
COMPAT_SYS(rt_sigprocmask)
COMPAT_SYS(rt_sigpending)
COMPAT_SYS(rt_sigtimedwait)
COMPAT_SYS(rt_sigqueueinfo)
COMPAT_SYS(rt_sigsuspend)
COMPAT_SYS_SPU(pread64)
COMPAT_SYS_SPU(pwrite64)
SYSCALL_SPU(chown)
SYSCALL_SPU(getcwd)
SYSCALL_SPU(capget)
SYSCALL_SPU(capset)
COMPAT_SYS(sigaltstack)
SYSX_SPU(sys_sendfile64,compat_sys_sendfile,sys_sendfile)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
PPC_SYS(vfork)
COMPAT_SYS_SPU(getrlimit)
COMPAT_SYS_SPU(readahead)
SYS32ONLY(mmap2)
SYS32ONLY(truncate64)
SYS32ONLY(ftruncate64)
SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
SYSCALL(pciconfig_read)
SYSCALL(pciconfig_write)
SYSCALL(pciconfig_iobase)
SYSCALL(ni_syscall)
SYSCALL_SPU(getdents64)
SYSCALL_SPU(pivot_root)
SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
SYSCALL_SPU(madvise)
SYSCALL_SPU(mincore)
SYSCALL_SPU(gettid)
SYSCALL_SPU(tkill)
SYSCALL_SPU(setxattr)
SYSCALL_SPU(lsetxattr)
SYSCALL_SPU(fsetxattr)
SYSCALL_SPU(getxattr)
SYSCALL_SPU(lgetxattr)
SYSCALL_SPU(fgetxattr)
SYSCALL_SPU(listxattr)
SYSCALL_SPU(llistxattr)
SYSCALL_SPU(flistxattr)
SYSCALL_SPU(removexattr)
SYSCALL_SPU(lremovexattr)
SYSCALL_SPU(fremovexattr)
COMPAT_SYS_SPU(futex)
COMPAT_SYS_SPU(sched_setaffinity)
COMPAT_SYS_SPU(sched_getaffinity)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYS32ONLY(sendfile64)
COMPAT_SYS_SPU(io_setup)
SYSCALL_SPU(io_destroy)
COMPAT_SYS_SPU(io_getevents)
COMPAT_SYS_SPU(io_submit)
SYSCALL_SPU(io_cancel)
SYSCALL(set_tid_address)
SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
SYSCALL(exit_group)
COMPAT_SYS(lookup_dcookie)
SYSCALL_SPU(epoll_create)
SYSCALL_SPU(epoll_ctl)
SYSCALL_SPU(epoll_wait)
SYSCALL_SPU(remap_file_pages)
COMPAT_SYS_SPU(timer_create)
COMPAT_SYS_SPU(timer_settime)
COMPAT_SYS_SPU(timer_gettime)
SYSCALL_SPU(timer_getoverrun)
SYSCALL_SPU(timer_delete)
COMPAT_SYS_SPU(clock_settime)
COMPAT_SYS_SPU(clock_gettime)
COMPAT_SYS_SPU(clock_getres)
COMPAT_SYS_SPU(clock_nanosleep)
SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
SYSCALL_SPU(tgkill)
COMPAT_SYS_SPU(utimes)
COMPAT_SYS_SPU(statfs64)
COMPAT_SYS_SPU(fstatfs64)
SYSX(sys_ni_syscall,ppc_fadvise64_64,ppc_fadvise64_64)
SYSCALL_SPU(rtas)
OLDSYS(debug_setcontext)
SYSCALL(ni_syscall)
COMPAT_SYS(migrate_pages)
COMPAT_SYS(mbind)
COMPAT_SYS(get_mempolicy)
COMPAT_SYS(set_mempolicy)
COMPAT_SYS(mq_open)
SYSCALL(mq_unlink)
COMPAT_SYS(mq_timedsend)
COMPAT_SYS(mq_timedreceive)
COMPAT_SYS(mq_notify)
COMPAT_SYS(mq_getsetattr)
COMPAT_SYS(kexec_load)
SYSCALL(add_key)
SYSCALL(request_key)
COMPAT_SYS(keyctl)
COMPAT_SYS(waitid)
SYSCALL(ioprio_set)
SYSCALL(ioprio_get)
SYSCALL(inotify_init)
SYSCALL(inotify_add_watch)
SYSCALL(inotify_rm_watch)
SYSCALL(spu_run)
SYSCALL(spu_create)
COMPAT_SYS(pselect6)
COMPAT_SYS(ppoll)
SYSCALL_SPU(unshare)
SYSCALL_SPU(splice)
SYSCALL_SPU(tee)
COMPAT_SYS_SPU(vmsplice)
COMPAT_SYS_SPU(openat)
SYSCALL_SPU(mkdirat)
SYSCALL_SPU(mknodat)
SYSCALL_SPU(fchownat)
COMPAT_SYS_SPU(futimesat)
SYSX_SPU(sys_newfstatat,sys_fstatat64,sys_fstatat64)
SYSCALL_SPU(unlinkat)
SYSCALL_SPU(renameat)
SYSCALL_SPU(linkat)
SYSCALL_SPU(symlinkat)
SYSCALL_SPU(readlinkat)
SYSCALL_SPU(fchmodat)
SYSCALL_SPU(faccessat)
COMPAT_SYS_SPU(get_robust_list)
COMPAT_SYS_SPU(set_robust_list)
COMPAT_SYS_SPU(move_pages)
SYSCALL_SPU(getcpu)
COMPAT_SYS(epoll_pwait)
COMPAT_SYS_SPU(utimensat)
COMPAT_SYS_SPU(signalfd)
SYSCALL_SPU(timerfd_create)
SYSCALL_SPU(eventfd)
COMPAT_SYS_SPU(sync_file_range2)
COMPAT_SYS(fallocate)
SYSCALL(subpage_prot)
COMPAT_SYS_SPU(timerfd_settime)
COMPAT_SYS_SPU(timerfd_gettime)
COMPAT_SYS_SPU(signalfd4)
SYSCALL_SPU(eventfd2)
SYSCALL_SPU(epoll_create1)
SYSCALL_SPU(dup3)
SYSCALL_SPU(pipe2)
SYSCALL(inotify_init1)
SYSCALL_SPU(perf_event_open)
COMPAT_SYS_SPU(preadv)
COMPAT_SYS_SPU(pwritev)
COMPAT_SYS(rt_tgsigqueueinfo)
SYSCALL(fanotify_init)
COMPAT_SYS(fanotify_mark)
SYSCALL_SPU(prlimit64)
SYSCALL_SPU(socket)
SYSCALL_SPU(bind)
SYSCALL_SPU(connect)
SYSCALL_SPU(listen)
SYSCALL_SPU(accept)
SYSCALL_SPU(getsockname)
SYSCALL_SPU(getpeername)
SYSCALL_SPU(socketpair)
SYSCALL_SPU(send)
SYSCALL_SPU(sendto)
COMPAT_SYS_SPU(recv)
COMPAT_SYS_SPU(recvfrom)
SYSCALL_SPU(shutdown)
COMPAT_SYS_SPU(setsockopt)
COMPAT_SYS_SPU(getsockopt)
COMPAT_SYS_SPU(sendmsg)
COMPAT_SYS_SPU(recvmsg)
COMPAT_SYS_SPU(recvmmsg)
SYSCALL_SPU(accept4)
SYSCALL_SPU(name_to_handle_at)
COMPAT_SYS_SPU(open_by_handle_at)
COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
COMPAT_SYS_SPU(sendmmsg)
SYSCALL_SPU(setns)
COMPAT_SYS(process_vm_readv)
COMPAT_SYS(process_vm_writev)
SYSCALL(finit_module)
SYSCALL(kcmp) /* sys_kcmp */
SYSCALL_SPU(sched_setattr)
SYSCALL_SPU(sched_getattr)
SYSCALL_SPU(renameat2)
SYSCALL_SPU(seccomp)
SYSCALL_SPU(getrandom)
SYSCALL_SPU(memfd_create)
SYSCALL_SPU(bpf)
COMPAT_SYS(execveat)
PPC64ONLY(switch_endian)
SYSCALL_SPU(userfaultfd)
SYSCALL_SPU(membarrier)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(ni_syscall)
SYSCALL(mlock2)
SYSCALL(copy_file_range)
COMPAT_SYS_SPU(preadv2)
COMPAT_SYS_SPU(pwritev2)
SYSCALL(kexec_file_load)
SYSCALL(statx)
SYSCALL(pkey_alloc)
SYSCALL(pkey_free)
SYSCALL(pkey_mprotect)
SYSCALL(rseq)
COMPAT_SYS(io_pgetevents)
...@@ -43,7 +43,7 @@ struct div_result { ...@@ -43,7 +43,7 @@ struct div_result {
/* Accessor functions for the timebase (RTC on 601) registers. */ /* Accessor functions for the timebase (RTC on 601) registers. */
/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
#ifdef CONFIG_6xx #ifdef CONFIG_PPC_BOOK3S_32
#define __USE_RTC() (cpu_has_feature(CPU_FTR_USE_RTC)) #define __USE_RTC() (cpu_has_feature(CPU_FTR_USE_RTC))
#else #else
#define __USE_RTC() 0 #define __USE_RTC() 0
......
...@@ -40,7 +40,7 @@ extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, ...@@ -40,7 +40,7 @@ extern void flush_hash_entry(struct mm_struct *mm, pte_t *ptep,
static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
unsigned long address) unsigned long address)
{ {
#ifdef CONFIG_PPC_STD_MMU_32 #ifdef CONFIG_PPC_BOOK3S_32
if (pte_val(*ptep) & _PAGE_HASHPTE) if (pte_val(*ptep) & _PAGE_HASHPTE)
flush_hash_entry(tlb->mm, ptep, address); flush_hash_entry(tlb->mm, ptep, address);
#endif #endif
......
...@@ -63,7 +63,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size, ...@@ -63,7 +63,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size,
#endif #endif
#define access_ok(type, addr, size) \ #define access_ok(type, addr, size) \
(__chk_user_ptr(addr), \ (__chk_user_ptr(addr), (void)(type), \
__access_ok((__force unsigned long)(addr), (size), get_fs())) __access_ok((__force unsigned long)(addr), (size), get_fs()))
/* /*
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
#include <uapi/asm/unistd.h> #include <uapi/asm/unistd.h>
#define NR_syscalls __NR_syscalls
#define NR_syscalls 389
#define __NR__exit __NR_exit #define __NR__exit __NR_exit
......
# UAPI Header export list # UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generated-y += unistd_32.h
generated-y += unistd_64.h
generic-y += param.h generic-y += param.h
generic-y += poll.h generic-y += poll.h
generic-y += resource.h generic-y += resource.h
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment