No description
Find a file
Michael Ellerman fe3d6fa00f powerpc/64s: Save FSCR to init_task.thread.fscr after feature init
commit 912c0a7f2b upstream.

At boot the FSCR is initialised via one of two paths. On most systems
it's set to a hard coded value in __init_FSCR().

On newer skiboot systems we use the device tree CPU features binding,
where firmware can tell Linux what bits to set in FSCR (and HFSCR).

In both cases the value that's configured at boot is not propagated
into the init_task.thread.fscr value prior to the initial fork of init
(pid 1), which means the value is not used by any processes other than
swapper (the idle task).

For the __init_FSCR() case this is OK, because the value in
init_task.thread.fscr is initialised to something sensible. However it
does mean that the value set in __init_FSCR() is not used other than
for swapper, which is odd and confusing.

The bigger problem is for the device tree CPU features case it
prevents firmware from setting (or clearing) FSCR bits for use by user
space. This means all existing kernels can not have features
enabled/disabled by firmware if those features require
setting/clearing FSCR bits.

We can handle both cases by saving the FSCR value into
init_task.thread.fscr after we have initialised it at boot. This fixes
the bug for device tree CPU features, and will allow us to simplify
the initialisation for the __init_FSCR() case in a future patch.

Fixes: 5a61ef74f2 ("powerpc/64s: Support new device tree binding for discovering CPU features")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200527145843.2761782-3-mpe@ellerman.id.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-20 10:25:20 +02:00
arch powerpc/64s: Save FSCR to init_task.thread.fscr after feature init 2020-06-20 10:25:20 +02:00
block blk-mq: move _blk_mq_update_nr_hw_queues synchronize_rcu call 2020-06-20 10:25:17 +02:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto gcc-10: avoid shadowing standard library 'free()' in crypto 2020-05-20 08:17:11 +02:00
Documentation dt-bindings: display: mediatek: control dpi pins mode to avoid leakage 2020-06-20 10:25:09 +02:00
drivers drivers/macintosh: Fix memleak in windfarm_pm112 driver 2020-06-20 10:25:19 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:20:30 +01:00
fs btrfs: fix wrong file range cleanup after an error filling dealloc range 2020-06-20 10:25:17 +02:00
include vga_switcheroo: Use device link for HDA controller 2020-06-20 10:25:16 +02:00
init x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:17:15 +02:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2020-05-20 08:17:07 +02:00
kernel kernel/cpu_pm: Fix uninitted local in cpu_pm 2020-06-20 10:25:19 +02:00
lib lib/mpi: Fix 64-bit MIPS build with Clang 2020-06-20 10:25:10 +02:00
mm mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() 2020-06-20 10:25:15 +02:00
net netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported 2020-06-20 10:25:10 +02:00
samples samples: bpf: Fix build error 2020-06-03 08:17:55 +02:00
scripts gcc-common.h: Update for GCC 10 2020-05-27 16:42:53 +02:00
security evm: Fix possible memory leak in evm_calc_hmac_or_hash() 2020-06-20 10:25:15 +02:00
sound vga_switcheroo: Use device link for HDA controller 2020-06-20 10:25:16 +02:00
tools tools api fs: Make xxx__mountpoint() more scalable 2020-06-20 10:25:09 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:34:19 +02:00
virt KVM: arm: vgic: Fix limit condition when writing to GICD_I[CS]ACTIVER 2020-05-20 08:16:58 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Update drm/i915 bug filing URL 2020-02-28 16:36:12 +01:00
Makefile Linux 4.14.184 2020-06-11 09:23:02 +02:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.