Skip to content

Commit f151670

Browse files
committed
Merge tag 'powerpc-6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan: - Fix htmldocs errors in sysfs-bus-event_source-devices-vpa-pmu - Fix warning due to missing #size-cells on powermac Thanks to Michael Ellerman, Yang Li, Rob Herring, and Stephen Rothwell. * tag 'powerpc-6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/prom_init: Fixup missing powermac #size-cells docs: ABI: sysfs-bus-event_source-devices-vpa-pmu: Fix htmldocs errors powerpc/machdep: Remove duplicated include in svm.c
2 parents 7af08b5 + cf89c94 commit f151670

File tree

3 files changed

+35
-10
lines changed

3 files changed

+35
-10
lines changed

Documentation/ABI/testing/sysfs-bus-event_source-devices-vpa-pmu

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ Description: Read-only. Attribute group to describe the magic bits
88
Each attribute under this group defines a bit range of the
99
perf_event_attr.config. Supported attribute are listed
1010
below::
11-
event = "config:0-31" - event ID
1211

13-
For example::
12+
event = "config:0-31" - event ID
1413

15-
l1_to_l2_lat = "event=0x1"
14+
For example::
15+
16+
l1_to_l2_lat = "event=0x1"
1617

1718
What: /sys/bus/event_source/devices/vpa_pmu/events
1819
Date: November 2024
1920
Contact: Linux on PowerPC Developer List <[email protected]>
20-
Description: Read-only. Attribute group to describe performance monitoring
21+
Description: Read-only. Attribute group to describe performance monitoring
2122
events for the Virtual Processor Area events. Each attribute
22-
in this group describes a single performance monitoring event
23-
supported by vpa_pmu. The name of the file is the name of
24-
the event (See ABI/testing/sysfs-bus-event_source-devices-events).
23+
in this group describes a single performance monitoring event
24+
supported by vpa_pmu. The name of the file is the name of
25+
the event (See ABI/testing/sysfs-bus-event_source-devices-events).

arch/powerpc/kernel/prom_init.c

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@ static void __init fixup_device_tree_chrp(void)
28482848
#endif
28492849

28502850
#if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC)
2851-
static void __init fixup_device_tree_pmac(void)
2851+
static void __init fixup_device_tree_pmac64(void)
28522852
{
28532853
phandle u3, i2c, mpic;
28542854
u32 u3_rev;
@@ -2888,7 +2888,31 @@ static void __init fixup_device_tree_pmac(void)
28882888
&parent, sizeof(parent));
28892889
}
28902890
#else
2891-
#define fixup_device_tree_pmac()
2891+
#define fixup_device_tree_pmac64()
2892+
#endif
2893+
2894+
#ifdef CONFIG_PPC_PMAC
2895+
static void __init fixup_device_tree_pmac(void)
2896+
{
2897+
__be32 val = 1;
2898+
char type[8];
2899+
phandle node;
2900+
2901+
// Some pmacs are missing #size-cells on escc nodes
2902+
for (node = 0; prom_next_node(&node); ) {
2903+
type[0] = '\0';
2904+
prom_getprop(node, "device_type", type, sizeof(type));
2905+
if (prom_strcmp(type, "escc"))
2906+
continue;
2907+
2908+
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
2909+
continue;
2910+
2911+
prom_setprop(node, NULL, "#size-cells", &val, sizeof(val));
2912+
}
2913+
}
2914+
#else
2915+
static inline void fixup_device_tree_pmac(void) { }
28922916
#endif
28932917

28942918
#ifdef CONFIG_PPC_EFIKA
@@ -3111,6 +3135,7 @@ static void __init fixup_device_tree(void)
31113135
{
31123136
fixup_device_tree_chrp();
31133137
fixup_device_tree_pmac();
3138+
fixup_device_tree_pmac64();
31143139
fixup_device_tree_efika();
31153140
fixup_device_tree_pasemi();
31163141
}

arch/powerpc/platforms/pseries/svm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/memblock.h>
1111
#include <linux/mem_encrypt.h>
1212
#include <linux/cc_platform.h>
13-
#include <linux/mem_encrypt.h>
1413
#include <asm/machdep.h>
1514
#include <asm/svm.h>
1615
#include <asm/swiotlb.h>

0 commit comments

Comments
 (0)