Skip to content

Commit 3870561

Browse files
committed
Merge tag 'powerpc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "Highlights include: - Support for direct mapped LPC on POWER9, giving Linux direct access to devices that may be on there such as a UART. - Memory hotplug support for the Power9 Radix MMU. - Add new AUX vectors describing the processor's cache geometry, to be used by glibc. - The ability for a guest to ask the hypervisor to resize the guest's hash table, and in addition support for doing so automatically when memory is hotplugged into/out-of the guest. This allows the hash table to be sized based on the current memory usage of the guest, rather than the maximum possible memory usage. - Implementation of optprobes (kprobe optimisation) for powerpc. In addition there's the topic branch shared with the KVM tree, which includes support for guests to use the Radix MMU on Power9. Thanks to: Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju T, Anton Blanchard, Benjamin Herrenschmidt, Chris Packham, Daniel Axtens, Daniel Borkmann, David Gibson, Finn Thain, Gautham R. Shenoy, Gavin Shan, Greg Kurz, Joel Stanley, John Allen, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring, Michael Neuling, Nathan Fontenot, Naveen N. Rao, Nicholas Piggin, Paul Mackerras, Ravi Bangoria, Reza Arbab, Shailendra Singh, Vaibhav Jain, Wei Yongjun" * tag 'powerpc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (129 commits) powerpc/mm/radix: Skip ptesync in pte update helpers powerpc/mm/radix: Use ptep_get_and_clear_full when clearing pte for full mm powerpc/mm/radix: Update pte update sequence for pte clear case powerpc/mm: Update PROTFAULT handling in the page fault path powerpc/xmon: Fix data-breakpoint powerpc/mm: Fix build break with BOOK3S_64=n and MEMORY_HOTPLUG=y powerpc/mm: Fix build break when CMA=n && SPAPR_TCE_IOMMU=y powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n powerpc/pseries: Fix typo in parameter description powerpc/kprobes: Remove kprobe_exceptions_notify() kprobes: Introduce weak variant of kprobe_exceptions_notify() powerpc/ftrace: Fix confusing help text for DISABLE_MPROFILE_KERNEL powerpc/powernv: Fix opal_exit tracepoint opcode powerpc: Add a prototype for mcount() so it can be versioned powerpc: Drop GPL from of_node_to_nid() export to match other arches powerpc/kprobes: Optimize kprobe in kretprobe_trampoline() powerpc/kprobes: Implement Optprobes powerpc/kprobes: Fixes for kprobe_lookup_name() on BE powerpc: Add helper to check if offset is within relative branch range powerpc/bpf: Introduce __PPC_SH64() ...
2 parents ff47d8c + 438e69b commit 3870561

144 files changed

Lines changed: 4502 additions & 1832 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.

‎Documentation/devicetree/bindings/powerpc/fsl/l2cache.txt‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,46 @@ The cache bindings explained below are ePAPR compliant
55

66
Required Properties:
77

8-
- compatible : Should include "fsl,chip-l2-cache-controller" and "cache"
9-
where chip is the processor (bsc9132, npc8572 etc.)
8+
- compatible : Should include one of the following:
9+
"fsl,8540-l2-cache-controller"
10+
"fsl,8541-l2-cache-controller"
11+
"fsl,8544-l2-cache-controller"
12+
"fsl,8548-l2-cache-controller"
13+
"fsl,8555-l2-cache-controller"
14+
"fsl,8568-l2-cache-controller"
15+
"fsl,b4420-l2-cache-controller"
16+
"fsl,b4860-l2-cache-controller"
17+
"fsl,bsc9131-l2-cache-controller"
18+
"fsl,bsc9132-l2-cache-controller"
19+
"fsl,c293-l2-cache-controller"
20+
"fsl,mpc8536-l2-cache-controller"
21+
"fsl,mpc8540-l2-cache-controller"
22+
"fsl,mpc8541-l2-cache-controller"
23+
"fsl,mpc8544-l2-cache-controller"
24+
"fsl,mpc8548-l2-cache-controller"
25+
"fsl,mpc8555-l2-cache-controller"
26+
"fsl,mpc8560-l2-cache-controller"
27+
"fsl,mpc8568-l2-cache-controller"
28+
"fsl,mpc8569-l2-cache-controller"
29+
"fsl,mpc8572-l2-cache-controller"
30+
"fsl,p1010-l2-cache-controller"
31+
"fsl,p1011-l2-cache-controller"
32+
"fsl,p1012-l2-cache-controller"
33+
"fsl,p1013-l2-cache-controller"
34+
"fsl,p1014-l2-cache-controller"
35+
"fsl,p1015-l2-cache-controller"
36+
"fsl,p1016-l2-cache-controller"
37+
"fsl,p1020-l2-cache-controller"
38+
"fsl,p1021-l2-cache-controller"
39+
"fsl,p1022-l2-cache-controller"
40+
"fsl,p1023-l2-cache-controller"
41+
"fsl,p1024-l2-cache-controller"
42+
"fsl,p1025-l2-cache-controller"
43+
"fsl,p2010-l2-cache-controller"
44+
"fsl,p2020-l2-cache-controller"
45+
"fsl,t2080-l2-cache-controller"
46+
"fsl,t4240-l2-cache-controller"
47+
and "cache".
1048
- reg : Address and size of L2 cache controller registers
1149
- cache-size : Size of the entire L2 cache
1250
- interrupts : Error interrupt of L2 controller
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
IBM Power-Management Bindings
2+
=============================
3+
4+
Linux running on baremetal POWER machines has access to the processor
5+
idle states. The description of these idle states is exposed via the
6+
node @power-mgt in the device-tree by the firmware.
7+
8+
Definitions:
9+
----------------
10+
Typically each idle state has the following associated properties:
11+
12+
- name: The name of the idle state as defined by the firmware.
13+
14+
- flags: indicating some aspects of this idle states such as the
15+
extent of state-loss, whether timebase is stopped on this
16+
idle states and so on. The flag bits are as follows:
17+
18+
- exit-latency: The latency involved in transitioning the state of the
19+
CPU from idle to running.
20+
21+
- target-residency: The minimum time that the CPU needs to reside in
22+
this idle state in order to accrue power-savings
23+
benefit.
24+
25+
Properties
26+
----------------
27+
The following properties provide details about the idle states. These
28+
properties are exposed as arrays. Each entry in the property array
29+
provides the value of that property for the idle state associated with
30+
the array index of that entry.
31+
32+
If idle-states are defined, then the properties
33+
"ibm,cpu-idle-state-names" and "ibm,cpu-idle-state-flags" are
34+
required. The other properties are required unless mentioned
35+
otherwise. The length of all the property arrays must be the same.
36+
37+
- ibm,cpu-idle-state-names:
38+
Array of strings containing the names of the idle states.
39+
40+
- ibm,cpu-idle-state-flags:
41+
Array of unsigned 32-bit values containing the values of the
42+
flags associated with the the aforementioned idle-states. The
43+
flag bits are as follows:
44+
0x00000001 /* Decrementer would stop */
45+
0x00000002 /* Needs timebase restore */
46+
0x00001000 /* Restore GPRs like nap */
47+
0x00002000 /* Restore hypervisor resource from PACA pointer */
48+
0x00004000 /* Program PORE to restore PACA pointer */
49+
0x00010000 /* This is a nap state (POWER7,POWER8) */
50+
0x00020000 /* This is a fast-sleep state (POWER8)*/
51+
0x00040000 /* This is a winkle state (POWER8) */
52+
0x00080000 /* This is a fast-sleep state which requires a */
53+
/* software workaround for restoring the */
54+
/* timebase (POWER8) */
55+
0x00800000 /* This state uses SPR PMICR instruction */
56+
/* (POWER8)*/
57+
0x00100000 /* This is a fast stop state (POWER9) */
58+
0x00200000 /* This is a deep-stop state (POWER9) */
59+
60+
- ibm,cpu-idle-state-latencies-ns:
61+
Array of unsigned 32-bit values containing the values of the
62+
exit-latencies (in ns) for the idle states in
63+
ibm,cpu-idle-state-names.
64+
65+
- ibm,cpu-idle-state-residency-ns:
66+
Array of unsigned 32-bit values containing the values of the
67+
target-residency (in ns) for the idle states in
68+
ibm,cpu-idle-state-names. On POWER8 this is an optional
69+
property. If the property is absent, the target residency for
70+
the "Nap", "FastSleep" are defined to 10000 and 300000000
71+
respectively by the kernel. On POWER9 this property is required.
72+
73+
- ibm,cpu-idle-state-psscr:
74+
Array of unsigned 64-bit values containing the values for the
75+
PSSCR for each of the idle states in ibm,cpu-idle-state-names.
76+
This property is required on POWER9 and absent on POWER8.
77+
78+
- ibm,cpu-idle-state-psscr-mask:
79+
Array of unsigned 64-bit values containing the masks
80+
indicating which psscr fields are set in the corresponding
81+
entries of ibm,cpu-idle-state-psscr. This property is
82+
required on POWER9 and absent on POWER8.
83+
84+
Whenever the firmware sets an entry in
85+
ibm,cpu-idle-state-psscr-mask value to 0xf, it implies that
86+
only the Requested Level (RL) field of the corresponding entry
87+
in ibm,cpu-idle-state-psscr should be considered by the
88+
kernel. For such idle states, the kernel would set the
89+
remaining fields of the psscr to the following sane-default
90+
values.
91+
92+
- ESL and EC bits are to 1. So wakeup from any stop
93+
state will be at vector 0x100.
94+
95+
- MTL and PSLL are set to the maximum allowed value as
96+
per the ISA, i.e. 15.
97+
98+
- The Transition Rate, TR is set to the Maximum value
99+
3.
100+
101+
For all the other values of the entry in
102+
ibm,cpu-idle-state-psscr-mask, the kernel expects all the
103+
psscr fields of the corresponding entry in
104+
ibm,cpu-idle-state-psscr to be correctly set by the firmware.
105+
106+
- ibm,cpu-idle-state-pmicr:
107+
Array of unsigned 64-bit values containing the pmicr values
108+
for the idle states in ibm,cpu-idle-state-names. This 64-bit
109+
register value is to be set in pmicr for the corresponding
110+
state if the flag indicates that pmicr SPR should be set. This
111+
is an optional property on POWER8 and is absent on
112+
POWER9.
113+
114+
- ibm,cpu-idle-state-pmicr-mask:
115+
Array of unsigned 64-bit values containing the mask indicating
116+
which of the fields of the PMICR are set in the corresponding
117+
entries in ibm,cpu-idle-state-pmicr. This is an optional
118+
property on POWER8 and is absent on POWER9.

‎Documentation/virtual/kvm/api.txt‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,6 +3201,71 @@ struct kvm_reinject_control {
32013201
pit_reinject = 0 (!reinject mode) is recommended, unless running an old
32023202
operating system that uses the PIT for timing (e.g. Linux 2.4.x).
32033203

3204+
4.99 KVM_PPC_CONFIGURE_V3_MMU
3205+
3206+
Capability: KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_HASH_MMU_V3
3207+
Architectures: ppc
3208+
Type: vm ioctl
3209+
Parameters: struct kvm_ppc_mmuv3_cfg (in)
3210+
Returns: 0 on success,
3211+
-EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read,
3212+
-EINVAL if the configuration is invalid
3213+
3214+
This ioctl controls whether the guest will use radix or HPT (hashed
3215+
page table) translation, and sets the pointer to the process table for
3216+
the guest.
3217+
3218+
struct kvm_ppc_mmuv3_cfg {
3219+
__u64 flags;
3220+
__u64 process_table;
3221+
};
3222+
3223+
There are two bits that can be set in flags; KVM_PPC_MMUV3_RADIX and
3224+
KVM_PPC_MMUV3_GTSE. KVM_PPC_MMUV3_RADIX, if set, configures the guest
3225+
to use radix tree translation, and if clear, to use HPT translation.
3226+
KVM_PPC_MMUV3_GTSE, if set and if KVM permits it, configures the guest
3227+
to be able to use the global TLB and SLB invalidation instructions;
3228+
if clear, the guest may not use these instructions.
3229+
3230+
The process_table field specifies the address and size of the guest
3231+
process table, which is in the guest's space. This field is formatted
3232+
as the second doubleword of the partition table entry, as defined in
3233+
the Power ISA V3.00, Book III section 5.7.6.1.
3234+
3235+
4.100 KVM_PPC_GET_RMMU_INFO
3236+
3237+
Capability: KVM_CAP_PPC_RADIX_MMU
3238+
Architectures: ppc
3239+
Type: vm ioctl
3240+
Parameters: struct kvm_ppc_rmmu_info (out)
3241+
Returns: 0 on success,
3242+
-EFAULT if struct kvm_ppc_rmmu_info cannot be written,
3243+
-EINVAL if no useful information can be returned
3244+
3245+
This ioctl returns a structure containing two things: (a) a list
3246+
containing supported radix tree geometries, and (b) a list that maps
3247+
page sizes to put in the "AP" (actual page size) field for the tlbie
3248+
(TLB invalidate entry) instruction.
3249+
3250+
struct kvm_ppc_rmmu_info {
3251+
struct kvm_ppc_radix_geom {
3252+
__u8 page_shift;
3253+
__u8 level_bits[4];
3254+
__u8 pad[3];
3255+
} geometries[8];
3256+
__u32 ap_encodings[8];
3257+
};
3258+
3259+
The geometries[] field gives up to 8 supported geometries for the
3260+
radix page table, in terms of the log base 2 of the smallest page
3261+
size, and the number of bits indexed at each level of the tree, from
3262+
the PTE level up to the PGD level in that order. Any unused entries
3263+
will have 0 in the page_shift field.
3264+
3265+
The ap_encodings gives the supported page sizes and their AP field
3266+
encodings, encoded with the AP value in the top 3 bits and the log
3267+
base 2 of the page size in the bottom 6 bits.
3268+
32043269
5. The kvm_run structure
32053270
------------------------
32063271

@@ -3942,3 +4007,21 @@ In order to use SynIC, it has to be activated by setting this
39424007
capability via KVM_ENABLE_CAP ioctl on the vcpu fd. Note that this
39434008
will disable the use of APIC hardware virtualization even if supported
39444009
by the CPU, as it's incompatible with SynIC auto-EOI behavior.
4010+
4011+
8.3 KVM_CAP_PPC_RADIX_MMU
4012+
4013+
Architectures: ppc
4014+
4015+
This capability, if KVM_CHECK_EXTENSION indicates that it is
4016+
available, means that that the kernel can support guests using the
4017+
radix MMU defined in Power ISA V3.00 (as implemented in the POWER9
4018+
processor).
4019+
4020+
8.4 KVM_CAP_PPC_HASH_MMU_V3
4021+
4022+
Architectures: ppc
4023+
4024+
This capability, if KVM_CHECK_EXTENSION indicates that it is
4025+
available, means that that the kernel can support guests using the
4026+
hashed page table MMU defined in Power ISA V3.00 (as implemented in
4027+
the POWER9 processor), including in-memory segment tables.

‎arch/m68k/include/asm/macintosh.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct mac_model
3838

3939
#define MAC_ADB_NONE 0
4040
#define MAC_ADB_II 1
41-
#define MAC_ADB_IISI 2
41+
#define MAC_ADB_EGRET 2
4242
#define MAC_ADB_CUDA 3
4343
#define MAC_ADB_PB1 4
4444
#define MAC_ADB_PB2 5

‎arch/m68k/mac/config.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static struct mac_model mac_data_table[] = {
286286
}, {
287287
.ident = MAC_MODEL_IISI,
288288
.name = "IIsi",
289-
.adb_type = MAC_ADB_IISI,
289+
.adb_type = MAC_ADB_EGRET,
290290
.via_type = MAC_VIA_IICI,
291291
.scsi_type = MAC_SCSI_OLD,
292292
.scc_type = MAC_SCC_II,
@@ -295,7 +295,7 @@ static struct mac_model mac_data_table[] = {
295295
}, {
296296
.ident = MAC_MODEL_IIVI,
297297
.name = "IIvi",
298-
.adb_type = MAC_ADB_IISI,
298+
.adb_type = MAC_ADB_EGRET,
299299
.via_type = MAC_VIA_IICI,
300300
.scsi_type = MAC_SCSI_LC,
301301
.scc_type = MAC_SCC_II,
@@ -304,7 +304,7 @@ static struct mac_model mac_data_table[] = {
304304
}, {
305305
.ident = MAC_MODEL_IIVX,
306306
.name = "IIvx",
307-
.adb_type = MAC_ADB_IISI,
307+
.adb_type = MAC_ADB_EGRET,
308308
.via_type = MAC_VIA_IICI,
309309
.scsi_type = MAC_SCSI_LC,
310310
.scc_type = MAC_SCC_II,
@@ -319,7 +319,7 @@ static struct mac_model mac_data_table[] = {
319319
{
320320
.ident = MAC_MODEL_CLII,
321321
.name = "Classic II",
322-
.adb_type = MAC_ADB_IISI,
322+
.adb_type = MAC_ADB_EGRET,
323323
.via_type = MAC_VIA_IICI,
324324
.scsi_type = MAC_SCSI_LC,
325325
.scc_type = MAC_SCC_II,
@@ -352,7 +352,7 @@ static struct mac_model mac_data_table[] = {
352352
{
353353
.ident = MAC_MODEL_LC,
354354
.name = "LC",
355-
.adb_type = MAC_ADB_IISI,
355+
.adb_type = MAC_ADB_EGRET,
356356
.via_type = MAC_VIA_IICI,
357357
.scsi_type = MAC_SCSI_LC,
358358
.scc_type = MAC_SCC_II,
@@ -361,7 +361,7 @@ static struct mac_model mac_data_table[] = {
361361
}, {
362362
.ident = MAC_MODEL_LCII,
363363
.name = "LC II",
364-
.adb_type = MAC_ADB_IISI,
364+
.adb_type = MAC_ADB_EGRET,
365365
.via_type = MAC_VIA_IICI,
366366
.scsi_type = MAC_SCSI_LC,
367367
.scc_type = MAC_SCC_II,
@@ -370,7 +370,7 @@ static struct mac_model mac_data_table[] = {
370370
}, {
371371
.ident = MAC_MODEL_LCIII,
372372
.name = "LC III",
373-
.adb_type = MAC_ADB_IISI,
373+
.adb_type = MAC_ADB_EGRET,
374374
.via_type = MAC_VIA_IICI,
375375
.scsi_type = MAC_SCSI_LC,
376376
.scc_type = MAC_SCC_II,
@@ -498,7 +498,7 @@ static struct mac_model mac_data_table[] = {
498498
{
499499
.ident = MAC_MODEL_P460,
500500
.name = "Performa 460",
501-
.adb_type = MAC_ADB_IISI,
501+
.adb_type = MAC_ADB_EGRET,
502502
.via_type = MAC_VIA_IICI,
503503
.scsi_type = MAC_SCSI_LC,
504504
.scc_type = MAC_SCC_II,
@@ -575,7 +575,7 @@ static struct mac_model mac_data_table[] = {
575575
}, {
576576
.ident = MAC_MODEL_P600,
577577
.name = "Performa 600",
578-
.adb_type = MAC_ADB_IISI,
578+
.adb_type = MAC_ADB_EGRET,
579579
.via_type = MAC_VIA_IICI,
580580
.scsi_type = MAC_SCSI_LC,
581581
.scc_type = MAC_SCC_II,

0 commit comments

Comments
 (0)