Skip to content

Commit

Permalink
Automatic merge of 'next-test' into merge-test (2023-08-15 14:01)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Aug 15, 2023
2 parents 0e1f4ed + d366361 commit 1d51af2
Show file tree
Hide file tree
Showing 102 changed files with 1,728 additions and 1,397 deletions.
160 changes: 160 additions & 0 deletions Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,163 @@ Contact: Linux on PowerPC Developer List <[email protected]>
Description: read only
This sysfs file exposes the cpumask which is designated to make
HCALLs to retrieve hv-gpci pmu event counter data.

What: /sys/devices/hv_gpci/interface/processor_bus_topology
Date: July 2023
Contact: Linux on PowerPC Developer List <[email protected]>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
PROCESSOR_BUS_TOPOLOGY(0xD0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/processor_config
Date: July 2023
Contact: Linux on PowerPC Developer List <[email protected]>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
PROCESSOR_CONFIG(0x90).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_virtual_processor
Date: July 2023
Contact: Linux on PowerPC Developer List <[email protected]>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_VIRTUAL_PROCESSOR(0xA0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_domain
Date: July 2023
Contact: Linux on PowerPC Developer List <[email protected]>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_DOMAIN(0xB0).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.

What: /sys/devices/hv_gpci/interface/affinity_domain_via_partition
Date: July 2023
Contact: Linux on PowerPC Developer List <[email protected]>
Description: admin read only
This sysfs file exposes the system topology information by making HCALL
H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request value
AFFINITY_DOMAIN_INFORMATION_BY_PARTITION(0xB1).

* This sysfs file will be created only for power10 and above platforms.

* User needs root privileges to read data from this sysfs file.

* This sysfs file will be created, only when the HCALL returns "H_SUCCESS",
"H_AUTHORITY" or "H_PARAMETER" as the return type.

HCALL with return error type "H_AUTHORITY" can be resolved during
runtime by setting "Enable Performance Information Collection" option.

* The end user reading this sysfs file must decode the content as per
underlying platform/firmware.

Possible error codes while reading this sysfs file:

* "-EPERM" : Partition is not permitted to retrieve performance information,
required to set "Enable Performance Information Collection" option.

* "-EIO" : Can't retrieve system information because of invalid buffer length/invalid address
or because of some hardware error. Refer to getPerfCountInfo documentation for
more information.

* "-EFBIG" : System information exceeds PAGE_SIZE.
1 change: 1 addition & 0 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ Description: Control Symmetric Multi Threading (SMT)
================ =========================================
"on" SMT is enabled
"off" SMT is disabled
"<N>" SMT is enabled with N threads per core.
"forceoff" SMT is force disabled. Cannot be changed.
"notsupported" SMT is not supported by the CPU
"notimplemented" SMT runtime toggling is not
Expand Down
4 changes: 2 additions & 2 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3874,10 +3874,10 @@
nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
and disable the IO APIC. legacy for "maxcpus=0".

nosmt [KNL,MIPS,S390] Disable symmetric multithreading (SMT).
nosmt [KNL,MIPS,PPC,S390] Disable symmetric multithreading (SMT).
Equivalent to smt=1.

[KNL,X86] Disable symmetric multithreading (SMT).
[KNL,X86,PPC] Disable symmetric multithreading (SMT).
nosmt=force: Force disable SMT, cannot be undone
via the sysfs control file.

Expand Down
8 changes: 4 additions & 4 deletions Documentation/powerpc/ptrace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ that's extendable and that covers both BookE and server processors, so
that GDB doesn't need to special-case each of them. We added the
following 3 new ptrace requests.

1. PTRACE_PPC_GETHWDEBUGINFO
1. PPC_PTRACE_GETHWDBGINFO
============================

Query for GDB to discover the hardware debug features. The main info to
Expand Down Expand Up @@ -48,7 +48,7 @@ features will have bits indicating whether there is support for::
#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10
#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x20

2. PTRACE_SETHWDEBUG
2. PPC_PTRACE_SETHWDEBUG

Sets a hardware breakpoint or watchpoint, according to the provided structure::

Expand Down Expand Up @@ -88,7 +88,7 @@ that the BookE supports. COMEFROM breakpoints available in server processors
are not contemplated, but that is out of the scope of this work.

ptrace will return an integer (handle) uniquely identifying the breakpoint or
watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG
watchpoint just created. This integer will be used in the PPC_PTRACE_DELHWDEBUG
request to ask for its removal. Return -ENOSPC if the requested breakpoint
can't be allocated on the registers.

Expand Down Expand Up @@ -150,7 +150,7 @@ Some examples of using the structure to:
p.addr2 = (uint64_t) end_range;
p.condition_value = 0;

3. PTRACE_DELHWDEBUG
3. PPC_PTRACE_DELHWDEBUG

Takes an integer which identifies an existing breakpoint or watchpoint
(i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the
Expand Down
3 changes: 3 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ config ARCH_HAS_SUBPAGE_FAULTS
config HOTPLUG_SMT
bool

config SMT_NUM_THREADS_DYNAMIC
bool

# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL
config HOTPLUG_CORE_SYNC
bool
Expand Down
8 changes: 2 additions & 6 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ config PPC
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_VIRT_CPU_ACCOUNTING
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select HOTPLUG_SMT if HOTPLUG_CPU
select SMT_NUM_THREADS_DYNAMIC
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
select IOMMU_HELPER if PPC64
select IRQ_DOMAIN
Expand Down Expand Up @@ -1144,12 +1146,6 @@ config FSL_GTM
help
Freescale General-purpose Timers support

config PCI_8260
bool
depends on PCI && 8260
select PPC_INDIRECT_PCI
default y

config FSL_RIO
bool "Freescale Embedded SRIO Controller support"
depends on RAPIDIO = y && HAVE_RAPIDIO
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/configs/pmac32_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ CONFIG_MOUSE_APPLETOUCH=y
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
CONFIG_SERIAL_8250=m
CONFIG_SERIAL_PMACZILOG=m
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
CONFIG_NVRAM=y
CONFIG_I2C_CHARDEV=m
CONFIG_APM_POWER=y
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/8xx_immap.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,7 @@ typedef struct immap {
cpm8xx_t im_cpm; /* Communication processor */
} immap_t;

extern immap_t __iomem *mpc8xx_immr;

#endif /* __IMMAP_8XX__ */
#endif /* __KERNEL__ */
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ generated-y += syscall_table_32.h
generated-y += syscall_table_64.h
generated-y += syscall_table_spu.h
generic-y += agp.h
generic-y += export.h
generic-y += kvm_types.h
generic-y += mcs_spinlock.h
generic-y += qrwlock.h
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/cpm2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,9 @@ typedef struct im_idma {
#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1)
#define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2)

/* Pipeline Maximum Depth */
#define MPC82XX_BCR_PLDP 0x00800000

/* Clocks and GRG's */

enum cpm_clk_dir {
Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/include/asm/fs_pd.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@
#include <sysdev/fsl_soc.h>
#include <asm/time.h>

#ifdef CONFIG_CPM2
#include <asm/cpm2.h>

#if defined(CONFIG_8260)
#include <asm/mpc8260.h>
#endif

#define cpm2_map(member) (&cpm2_immr->member)
#define cpm2_map_size(member, size) (&cpm2_immr->member)
#define cpm2_unmap(addr) do {} while(0)
#endif

#ifdef CONFIG_PPC_8xx
#include <asm/8xx_immap.h>

extern immap_t __iomem *mpc8xx_immr;

#define immr_map(member) (&mpc8xx_immr->member)
#define immr_map_size(member, size) (&mpc8xx_immr->member)
#define immr_unmap(addr) do {} while (0)
#endif

static inline int uart_baudrate(void)
{
return get_baudrate();
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/hw_breakpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct arch_hw_breakpoint {
u16 len; /* length of the target data symbol */
u16 hw_len; /* length programmed in hw */
u8 flags;
bool perf_single_step; /* temporarily uninstalled for a perf single step */
};

/* Note: Don't change the first 6 bits below as they are in the same order
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/kfence.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static inline bool arch_kfence_init_pool(void)
#ifdef CONFIG_PPC64
static inline bool kfence_protect_page(unsigned long addr, bool protect)
{
struct page *page = virt_to_page(addr);
struct page *page = virt_to_page((void *)addr);

__kernel_map_pages(page, 1, !protect);

Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/include/asm/mpc8260.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/nohash/32/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static inline int pte_young(pte_t pte)
#define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
#else
#define pmd_page_vaddr(pmd) \
((unsigned long)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
((const void *)(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1)))
#define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT)
#endif

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/nohash/64/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static inline pte_t pmd_pte(pmd_t pmd)
#define pmd_bad(pmd) (!is_kernel_addr(pmd_val(pmd)) \
|| (pmd_val(pmd) & PMD_BAD_BITS))
#define pmd_present(pmd) (!pmd_none(pmd))
#define pmd_page_vaddr(pmd) (pmd_val(pmd) & ~PMD_MASKED_BITS)
#define pmd_page_vaddr(pmd) ((const void *)(pmd_val(pmd) & ~PMD_MASKED_BITS))
extern struct page *pmd_page(pmd_t pmd);
#define pmd_pfn(pmd) (page_to_pfn(pmd_page(pmd)))

Expand Down
Loading

0 comments on commit 1d51af2

Please sign in to comment.