Skip to content

powerpc: fix regression of per-CPU DSCR setting

Sam Bobroff linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3powerpc: Split __SYSFS_SPRSETUP macroarch/powerpc/kernel/sysfs.c+13 -61 reply
2/3powerpc: fix regression of per-CPU DSCR settingarch/powerpc/include/asm/paca.h arch/powerpc/kernel/asm-offsets.c arch/powerpc/kernel/entry_64.S +3 more+29 -351 reply
3/3powerpc: Document sysfs DSCR interfaceDocumentation/ABI/stable/sysfs-devices-system-cpu+25 -00 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMadhavan Srinivasan
1/3A-b
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] powerpc: fix regression of per-CPU DSCR setting

Hello,

This patch corrects a regression on PowerPC CPUs that causes their per-CPU DSCR SPR value (exposed via /sys/devices/system/cpuN/dscr) to be quickly lost during context switching, effectively meaning that the DSCR can no longer be set on a per-CPU basis.

My intent is to restore the functionality of the per-CPU value in a way that is compatible with the newer global default and task-specific DSCR setting system. Users of either the old or new systems should now get pretty much what they expect.

A couple of notes:

I've split an existing "ifdef CONFIG_PPC_STD_MMU_64" block in paca_struct into two parts because it allows dscr_default to be placed into a cache line hole. (This seems be the case even without CONFIG_PPC_STD_MMU_64 being defined.) Comments or ideas on alternative placements are welcome.

PowerPC context switching is touched but there should not be any performance cost; if anything it should get slightly faster due to the per-CPU value being easier to access than the old global default.

Sam Bobroff (3):
powerpc: Split __SYSFS_SPRSETUP macro
powerpc: fix regression of per-CPU DSCR setting
powerpc: Document sysfs DSCR interface

 Documentation/ABI/stable/sysfs-devices-system-cpu |   25 ++++++++++
 arch/powerpc/include/asm/paca.h                   |    3 ++
 arch/powerpc/kernel/asm-offsets.c                 |    1 +
 arch/powerpc/kernel/entry_64.S                    |    9 +---
 arch/powerpc/kernel/sysfs.c                       |   51 +++++++++++++--------
 arch/powerpc/kernel/tm.S                          |   16 ++-----
 arch/powerpc/kvm/book3s_hv_rmhandlers.S           |    3 +-
 7 files changed, 67 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/ABI/stable/sysfs-devices-system-cpu
Signature · 1 line
1.7.10.4