Skip to content

Commit 66a173b

Browse files
committed
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Benjamin Herrenschmidt: "The bulk of this is LE updates. One should now be able to build an LE kernel and even run some things in it. I'm still sitting on a handful of patches to enable the new ABI that I *might* still send this merge window around, but due to the incertainty (they are pretty fresh) I want to keep them separate. Other notable changes are some infrastructure bits to better handle PCI pass-through under KVM, some bits and pieces added to the new PowerNV platform support such as access to the CPU SCOM bus via sysfs, and support for EEH error handling on PHB3 (Power8 PCIe). We also grew arch_get_random_long() for both pseries and powernv when running on P7+ and P8, exploiting the HW rng. And finally various embedded updates from freescale" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (154 commits) powerpc: Fix fatal SLB miss when restoring PPR powerpc/powernv: Reserve the correct PE number powerpc/powernv: Add PE to its own PELTV powerpc/powernv: Add support for indirect XSCOM via debugfs powerpc/scom: Improve debugfs interface powerpc/scom: Enable 64-bit addresses powerpc/boot: Properly handle the base "of" boot wrapper powerpc/bpf: Support MOD operation powerpc/bpf: Fix DIVWU instruction opcode of: Move definition of of_find_next_cache_node into common code. powerpc: Remove big endianness assumption in of_find_next_cache_node powerpc/tm: Remove interrupt disable in __switch_to() powerpc: word-at-a-time optimization for 64-bit Little Endian powerpc/bpf: BPF JIT compiler for 64-bit Little Endian powerpc: Only save/restore SDR1 if in hypervisor mode powerpc/pmu: Fix ADB_PMU_LED_IDE dependencies powerpc/nvram: Fix endian issue when using the partition length powerpc/nvram: Fix endian issue when reading the NVRAM size powerpc/nvram: Scan partitions only once powerpc/mpc512x: remove unnecessary #if ...
2 parents 11db81a + 0c4888e commit 66a173b

168 files changed

Lines changed: 4200 additions & 2125 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/powerpc/Kconfig

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ config PPC
9797
select VIRT_TO_BUS if !PPC64
9898
select HAVE_IDE
9999
select HAVE_IOREMAP_PROT
100-
select HAVE_EFFICIENT_UNALIGNED_ACCESS
100+
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_LITTLE_ENDIAN
101101
select HAVE_KPROBES
102102
select HAVE_ARCH_KGDB
103103
select HAVE_KRETPROBES
@@ -140,6 +140,9 @@ config PPC
140140
select HAVE_DEBUG_STACKOVERFLOW
141141
select HAVE_IRQ_EXIT_ON_IRQ_STACK
142142

143+
config GENERIC_CSUM
144+
def_bool CPU_LITTLE_ENDIAN
145+
143146
config EARLY_PRINTK
144147
bool
145148
default y
@@ -405,7 +408,7 @@ config CRASH_DUMP
405408

406409
config FA_DUMP
407410
bool "Firmware-assisted dump"
408-
depends on PPC64 && PPC_RTAS && CRASH_DUMP
411+
depends on PPC64 && PPC_RTAS && CRASH_DUMP && KEXEC
409412
help
410413
A robust mechanism to get reliable kernel crash dump with
411414
assistance from firmware. This approach does not use kexec,
@@ -418,7 +421,7 @@ config FA_DUMP
418421

419422
config IRQ_ALL_CPUS
420423
bool "Distribute interrupts on all CPUs by default"
421-
depends on SMP && !MV64360
424+
depends on SMP
422425
help
423426
This option gives the kernel permission to distribute IRQs across
424427
multiple CPUs. Saying N here will route all IRQs to the first
@@ -1010,6 +1013,9 @@ config PHYSICAL_START
10101013
default "0x00000000"
10111014
endif
10121015

1016+
config ARCH_RANDOM
1017+
def_bool n
1018+
10131019
source "net/Kconfig"
10141020

10151021
source "drivers/Kconfig"

arch/powerpc/Makefile

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,26 @@ KBUILD_DEFCONFIG := ppc64_defconfig
3636
endif
3737

3838
ifeq ($(CONFIG_PPC64),y)
39-
OLDARCH := ppc64
40-
4139
new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
4240

4341
ifeq ($(new_nm),y)
4442
NM := $(NM) --synthetic
4543
endif
44+
endif
4645

46+
ifeq ($(CONFIG_PPC64),y)
47+
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
48+
OLDARCH := ppc64le
49+
else
50+
OLDARCH := ppc64
51+
endif
52+
else
53+
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
54+
OLDARCH := ppcle
4755
else
4856
OLDARCH := ppc
4957
endif
58+
endif
5059

5160
# It seems there are times we use this Makefile without
5261
# including the config file, but this replicates the old behaviour
@@ -56,11 +65,29 @@ endif
5665

5766
UTS_MACHINE := $(OLDARCH)
5867

68+
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
69+
override CC += -mlittle-endian -mno-strict-align
70+
override AS += -mlittle-endian
71+
override LD += -EL
72+
override CROSS32CC += -mlittle-endian
73+
override CROSS32AS += -mlittle-endian
74+
LDEMULATION := lppc
75+
GNUTARGET := powerpcle
76+
MULTIPLEWORD := -mno-multiple
77+
else
78+
override CC += -mbig-endian
79+
override AS += -mbig-endian
80+
override LD += -EB
81+
LDEMULATION := ppc
82+
GNUTARGET := powerpc
83+
MULTIPLEWORD := -mmultiple
84+
endif
85+
5986
ifeq ($(HAS_BIARCH),y)
6087
override AS += -a$(CONFIG_WORD_SIZE)
61-
override LD += -m elf$(CONFIG_WORD_SIZE)ppc
88+
override LD += -m elf$(CONFIG_WORD_SIZE)$(LDEMULATION)
6289
override CC += -m$(CONFIG_WORD_SIZE)
63-
override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR)
90+
override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-$(GNUTARGET) $(AR)
6491
endif
6592

6693
LDFLAGS_vmlinux-y := -Bstatic
@@ -86,7 +113,7 @@ endif
86113
CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc
87114
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
88115
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
89-
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
116+
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
90117

91118
ifeq ($(CONFIG_PPC_BOOK3S_64),y)
92119
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)

arch/powerpc/boot/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ all: $(obj)/zImage
2222
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
2323
-fno-strict-aliasing -Os -msoft-float -pipe \
2424
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
25-
-isystem $(shell $(CROSS32CC) -print-file-name=include)
25+
-isystem $(shell $(CROSS32CC) -print-file-name=include) \
26+
-mbig-endian
2627
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
2728

2829
ifdef CONFIG_DEBUG_INFO

arch/powerpc/boot/dts/b4860emu.dts

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
/*
2+
* B4860 emulator Device Tree Source
3+
*
4+
* Copyright 2013 Freescale Semiconductor Inc.
5+
*
6+
* Redistribution and use in source and binary forms, with or without
7+
* modification, are permitted provided that the following conditions are met:
8+
* * Redistributions of source code must retain the above copyright
9+
* notice, this list of conditions and the following disclaimer.
10+
* * Redistributions in binary form must reproduce the above copyright
11+
* notice, this list of conditions and the following disclaimer in the
12+
* documentation and/or other materials provided with the distribution.
13+
* * Neither the name of Freescale Semiconductor nor the
14+
* names of its contributors may be used to endorse or promote products
15+
* derived from this software without specific prior written permission.
16+
*
17+
*
18+
* ALTERNATIVELY, this software may be distributed under the terms of the
19+
* GNU General Public License ("GPL") as published by the Free Software
20+
* Foundation, either version 2 of that License or (at your option) any
21+
* later version.
22+
*
23+
* This software is provided by Freescale Semiconductor "as is" and any
24+
* express or implied warranties, including, but not limited to, the implied
25+
* warranties of merchantability and fitness for a particular purpose are
26+
* disclaimed. In no event shall Freescale Semiconductor be liable for any
27+
* direct, indirect, incidental, special, exemplary, or consequential damages
28+
* (including, but not limited to, procurement of substitute goods or services;
29+
* loss of use, data, or profits; or business interruption) however caused and
30+
* on any theory of liability, whether in contract, strict liability, or tort
31+
* (including negligence or otherwise) arising in any way out of the use of
32+
* this software, even if advised of the possibility of such damage.
33+
*/
34+
35+
/dts-v1/;
36+
37+
/include/ "fsl/e6500_power_isa.dtsi"
38+
39+
/ {
40+
compatible = "fsl,B4860";
41+
#address-cells = <2>;
42+
#size-cells = <2>;
43+
interrupt-parent = <&mpic>;
44+
45+
aliases {
46+
ccsr = &soc;
47+
48+
serial0 = &serial0;
49+
serial1 = &serial1;
50+
serial2 = &serial2;
51+
serial3 = &serial3;
52+
dma0 = &dma0;
53+
dma1 = &dma1;
54+
};
55+
56+
cpus {
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
60+
cpu0: PowerPC,e6500@0 {
61+
device_type = "cpu";
62+
reg = <0 1>;
63+
next-level-cache = <&L2>;
64+
};
65+
cpu1: PowerPC,e6500@2 {
66+
device_type = "cpu";
67+
reg = <2 3>;
68+
next-level-cache = <&L2>;
69+
};
70+
cpu2: PowerPC,e6500@4 {
71+
device_type = "cpu";
72+
reg = <4 5>;
73+
next-level-cache = <&L2>;
74+
};
75+
cpu3: PowerPC,e6500@6 {
76+
device_type = "cpu";
77+
reg = <6 7>;
78+
next-level-cache = <&L2>;
79+
};
80+
};
81+
};
82+
83+
/ {
84+
model = "fsl,B4860QDS";
85+
compatible = "fsl,B4860EMU", "fsl,B4860QDS";
86+
#address-cells = <2>;
87+
#size-cells = <2>;
88+
interrupt-parent = <&mpic>;
89+
90+
ifc: localbus@ffe124000 {
91+
reg = <0xf 0xfe124000 0 0x2000>;
92+
ranges = <0 0 0xf 0xe8000000 0x08000000
93+
2 0 0xf 0xff800000 0x00010000
94+
3 0 0xf 0xffdf0000 0x00008000>;
95+
96+
nor@0,0 {
97+
#address-cells = <1>;
98+
#size-cells = <1>;
99+
compatible = "cfi-flash";
100+
reg = <0x0 0x0 0x8000000>;
101+
bank-width = <2>;
102+
device-width = <1>;
103+
};
104+
};
105+
106+
memory {
107+
device_type = "memory";
108+
};
109+
110+
soc: soc@ffe000000 {
111+
ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
112+
reg = <0xf 0xfe000000 0 0x00001000>;
113+
};
114+
};
115+
116+
&ifc {
117+
#address-cells = <2>;
118+
#size-cells = <1>;
119+
compatible = "fsl,ifc", "simple-bus";
120+
interrupts = <25 2 0 0>;
121+
};
122+
123+
&soc {
124+
#address-cells = <1>;
125+
#size-cells = <1>;
126+
device_type = "soc";
127+
compatible = "simple-bus";
128+
129+
soc-sram-error {
130+
compatible = "fsl,soc-sram-error";
131+
interrupts = <16 2 1 2>;
132+
};
133+
134+
corenet-law@0 {
135+
compatible = "fsl,corenet-law";
136+
reg = <0x0 0x1000>;
137+
fsl,num-laws = <32>;
138+
};
139+
140+
ddr1: memory-controller@8000 {
141+
compatible = "fsl,qoriq-memory-controller-v4.5", "fsl,qoriq-memory-controller";
142+
reg = <0x8000 0x1000>;
143+
interrupts = <16 2 1 8>;
144+
};
145+
146+
ddr2: memory-controller@9000 {
147+
compatible = "fsl,qoriq-memory-controller-v4.5","fsl,qoriq-memory-controller";
148+
reg = <0x9000 0x1000>;
149+
interrupts = <16 2 1 9>;
150+
};
151+
152+
cpc: l3-cache-controller@10000 {
153+
compatible = "fsl,b4-l3-cache-controller", "cache";
154+
reg = <0x10000 0x1000
155+
0x11000 0x1000>;
156+
interrupts = <16 2 1 4>;
157+
};
158+
159+
corenet-cf@18000 {
160+
compatible = "fsl,b4-corenet-cf";
161+
reg = <0x18000 0x1000>;
162+
interrupts = <16 2 1 0>;
163+
fsl,ccf-num-csdids = <32>;
164+
fsl,ccf-num-snoopids = <32>;
165+
};
166+
167+
iommu@20000 {
168+
compatible = "fsl,pamu-v1.0", "fsl,pamu";
169+
reg = <0x20000 0x4000>;
170+
#address-cells = <1>;
171+
#size-cells = <1>;
172+
interrupts = <
173+
24 2 0 0
174+
16 2 1 1>;
175+
pamu0: pamu@0 {
176+
reg = <0 0x1000>;
177+
fsl,primary-cache-geometry = <8 1>;
178+
fsl,secondary-cache-geometry = <32 2>;
179+
};
180+
};
181+
182+
/include/ "fsl/qoriq-mpic.dtsi"
183+
184+
guts: global-utilities@e0000 {
185+
compatible = "fsl,b4-device-config";
186+
reg = <0xe0000 0xe00>;
187+
fsl,has-rstcr;
188+
fsl,liodn-bits = <12>;
189+
};
190+
191+
clockgen: global-utilities@e1000 {
192+
compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0";
193+
reg = <0xe1000 0x1000>;
194+
};
195+
196+
/include/ "fsl/qoriq-dma-0.dtsi"
197+
dma@100300 {
198+
fsl,iommu-parent = <&pamu0>;
199+
fsl,liodn-reg = <&guts 0x580>; /* DMA1LIODNR */
200+
};
201+
202+
/include/ "fsl/qoriq-dma-1.dtsi"
203+
dma@101300 {
204+
fsl,iommu-parent = <&pamu0>;
205+
fsl,liodn-reg = <&guts 0x584>; /* DMA2LIODNR */
206+
};
207+
208+
/include/ "fsl/qoriq-i2c-0.dtsi"
209+
/include/ "fsl/qoriq-i2c-1.dtsi"
210+
/include/ "fsl/qoriq-duart-0.dtsi"
211+
/include/ "fsl/qoriq-duart-1.dtsi"
212+
213+
L2: l2-cache-controller@c20000 {
214+
compatible = "fsl,b4-l2-cache-controller";
215+
reg = <0xc20000 0x1000>;
216+
next-level-cache = <&cpc>;
217+
};
218+
};

0 commit comments

Comments
 (0)