summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/cache.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-06-09 18:35:46 +0100
committerMark Brown <broonie@kernel.org>2015-06-09 18:35:46 +0100
commit6724af486903df57338c14424e02599e371cf563 (patch)
tree0e42ae32bbfe7e93ba9db11a1124aeb4378cbd71 /arch/s390/kernel/cache.c
parentd2233325e5b7891914901867ca5355347d59df14 (diff)
parent9deef024a12ebae4965c89837f662905ac88944b (diff)
Merge branch 'fix/fsl-dspi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-fsl-dspi
Diffstat (limited to 'arch/s390/kernel/cache.c')
-rw-r--r--arch/s390/kernel/cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c
index 0969d113b3d6..bff5e3b6d822 100644
--- a/arch/s390/kernel/cache.c
+++ b/arch/s390/kernel/cache.c
@@ -70,6 +70,8 @@ void show_cacheinfo(struct seq_file *m)
struct cacheinfo *cache;
int idx;
+ if (!test_facility(34))
+ return;
get_online_cpus();
this_cpu_ci = get_cpu_cacheinfo(cpumask_any(cpu_online_mask));
for (idx = 0; idx < this_cpu_ci->num_leaves; idx++) {
@@ -159,6 +161,8 @@ int populate_cache_leaves(unsigned int cpu)
union cache_topology ct;
enum cache_type ctype;
+ if (!test_facility(34))
+ return -EOPNOTSUPP;
ct.raw = ecag(EXTRACT_TOPOLOGY, 0, 0);
for (idx = 0, level = 0; level < this_cpu_ci->num_levels &&
idx < this_cpu_ci->num_leaves; idx++, level++) {