Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky: "Among the usual minor bug fixes the more interesting patches are the perf counters for the latest machine, the missing select to enable transparent huge pages and a build fix for the UAPI rework." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390,uapi: do not use uapi/asm-generic/kvm_para.h s390/cache: fix data/instruction cache output s390: fix linker script for 31 bit builds s390/thp: select HAVE_ARCH_TRANSPARENT_HUGEPAGE s390/kdump: Use 64 bit mode for 0x10000 entry point perf_cpum_cf: Add support for counters available with IBM zEC12 s390/css: stop stsch loop after cc 3 s390/cio: use generic bitmap functions s390/chpid: make headers usable (again)
This commit is contained in:
commit
4e3ab74c22
|
@ -130,6 +130,7 @@ config S390
|
|||
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
|
||||
select HAVE_UID16 if 32BIT
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
select GENERIC_TIME_VSYSCALL_OLD
|
||||
select GENERIC_CLOCKEVENTS
|
||||
|
|
|
@ -5,7 +5,7 @@ OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|||
OUTPUT_ARCH(s390:64-bit)
|
||||
#else
|
||||
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
|
||||
OUTPUT_ARCH(s390)
|
||||
OUTPUT_ARCH(s390:31-bit)
|
||||
#endif
|
||||
|
||||
ENTRY(startup)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <asm/cpu_mf.h>
|
||||
|
||||
/* CPU-measurement counter facility */
|
||||
#define PERF_CPUM_CF_MAX_CTR 160
|
||||
#define PERF_CPUM_CF_MAX_CTR 256
|
||||
|
||||
/* Per-CPU flags for PMU states */
|
||||
#define PMU_F_RESERVED 0x1000
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# UAPI Header export list
|
||||
include include/uapi/asm-generic/Kbuild.asm
|
||||
|
||||
generic-y += kvm_para.h
|
||||
|
||||
header-y += auxvec.h
|
||||
header-y += bitsperlong.h
|
||||
header-y += byteorder.h
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright IBM Corp. 2007
|
||||
* Copyright IBM Corp. 2007, 2012
|
||||
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
|
||||
*/
|
||||
|
||||
|
@ -12,10 +12,10 @@
|
|||
#define __MAX_CHPID 255
|
||||
|
||||
struct chp_id {
|
||||
u8 reserved1;
|
||||
u8 cssid;
|
||||
u8 reserved2;
|
||||
u8 id;
|
||||
__u8 reserved1;
|
||||
__u8 cssid;
|
||||
__u8 reserved2;
|
||||
__u8 id;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
|
11
arch/s390/include/uapi/asm/kvm_para.h
Normal file
11
arch/s390/include/uapi/asm/kvm_para.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* User API definitions for paravirtual devices on s390
|
||||
*
|
||||
* Copyright IBM Corp. 2008
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License (version 2 only)
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* Author(s): Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
*/
|
|
@ -59,8 +59,8 @@ enum {
|
|||
|
||||
enum {
|
||||
CACHE_TI_UNIFIED = 0,
|
||||
CACHE_TI_INSTRUCTION = 0,
|
||||
CACHE_TI_DATA,
|
||||
CACHE_TI_DATA = 0,
|
||||
CACHE_TI_INSTRUCTION,
|
||||
};
|
||||
|
||||
struct cache_info {
|
||||
|
@ -121,7 +121,10 @@ static int __init cache_add(int level, int private, int type)
|
|||
cache = kzalloc(sizeof(*cache), GFP_KERNEL);
|
||||
if (!cache)
|
||||
return -ENOMEM;
|
||||
ti = type == CACHE_TYPE_DATA ? CACHE_TI_DATA : CACHE_TI_UNIFIED;
|
||||
if (type == CACHE_TYPE_INSTRUCTION)
|
||||
ti = CACHE_TI_INSTRUCTION;
|
||||
else
|
||||
ti = CACHE_TI_UNIFIED;
|
||||
cache->size = ecag(EXTRACT_SIZE, level, ti);
|
||||
cache->line_size = ecag(EXTRACT_LINE_SIZE, level, ti);
|
||||
cache->associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti);
|
||||
|
|
|
@ -85,16 +85,10 @@
|
|||
.align 2
|
||||
startup_kdump_relocated:
|
||||
basr %r13,0
|
||||
0:
|
||||
mvc 0(8,%r0),.Lrestart_psw-0b(%r13) # Setup restart PSW
|
||||
sam31 # Switch to 31 bit addr mode
|
||||
sr %r1,%r1 # Erase register r1
|
||||
sr %r2,%r2 # Erase register r2
|
||||
sigp %r1,%r2,SIGP_SET_ARCHITECTURE # Switch to 31 bit arch mode
|
||||
lpsw 0 # Start new kernel...
|
||||
0: lpswe .Lrestart_psw-0b(%r13) # Start new kernel...
|
||||
.align 8
|
||||
.Lrestart_psw:
|
||||
.long 0x00080000,0x80000000 + startup
|
||||
.quad 0x0000000080000000,0x0000000000000000 + startup
|
||||
#else
|
||||
.align 2
|
||||
.Lep_startup_kdump:
|
||||
|
|
|
@ -94,7 +94,7 @@ static int get_counter_set(u64 event)
|
|||
set = CPUMF_CTR_SET_USER;
|
||||
else if (event < 128)
|
||||
set = CPUMF_CTR_SET_CRYPTO;
|
||||
else if (event < 160)
|
||||
else if (event < 256)
|
||||
set = CPUMF_CTR_SET_EXT;
|
||||
|
||||
return set;
|
||||
|
@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc)
|
|||
case CPUMF_CTR_SET_EXT:
|
||||
if (cpuhw->info.csvn < 1)
|
||||
err = -EOPNOTSUPP;
|
||||
if ((cpuhw->info.csvn == 1 && hwc->config > 159) ||
|
||||
(cpuhw->info.csvn == 2 && hwc->config > 175) ||
|
||||
(cpuhw->info.csvn > 2 && hwc->config > 255))
|
||||
err = -EOPNOTSUPP;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifndef CONFIG_64BIT
|
||||
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
|
||||
OUTPUT_ARCH(s390)
|
||||
OUTPUT_ARCH(s390:31-bit)
|
||||
ENTRY(startup)
|
||||
jiffies = jiffies_64 + 4;
|
||||
#else
|
||||
|
|
|
@ -377,7 +377,11 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow)
|
|||
/* Will be done on the slow path. */
|
||||
return -EAGAIN;
|
||||
}
|
||||
if (stsch_err(schid, &schib) || !css_sch_is_valid(&schib)) {
|
||||
if (stsch_err(schid, &schib)) {
|
||||
/* Subchannel is not provided. */
|
||||
return -ENXIO;
|
||||
}
|
||||
if (!css_sch_is_valid(&schib)) {
|
||||
/* Unusable - ignore. */
|
||||
return 0;
|
||||
}
|
||||
|
@ -536,6 +540,7 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data)
|
|||
case -ENOMEM:
|
||||
case -EIO:
|
||||
/* These should abort looping */
|
||||
idset_sch_del_subseq(slow_subchannel_set, schid);
|
||||
break;
|
||||
default:
|
||||
rc = 0;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
/*
|
||||
* Copyright IBM Corp. 2007
|
||||
* Copyright IBM Corp. 2007, 2012
|
||||
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
|
||||
*/
|
||||
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/bitmap.h>
|
||||
#include <linux/bitops.h>
|
||||
#include "idset.h"
|
||||
#include "css.h"
|
||||
|
@ -89,6 +90,14 @@ void idset_sch_del(struct idset *set, struct subchannel_id schid)
|
|||
idset_del(set, schid.ssid, schid.sch_no);
|
||||
}
|
||||
|
||||
/* Clear ids starting from @schid up to end of subchannel set. */
|
||||
void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid)
|
||||
{
|
||||
int pos = schid.ssid * set->num_id + schid.sch_no;
|
||||
|
||||
bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no);
|
||||
}
|
||||
|
||||
int idset_sch_contains(struct idset *set, struct subchannel_id schid)
|
||||
{
|
||||
return idset_contains(set, schid.ssid, schid.sch_no);
|
||||
|
@ -111,20 +120,13 @@ int idset_sch_get_first(struct idset *set, struct subchannel_id *schid)
|
|||
|
||||
int idset_is_empty(struct idset *set)
|
||||
{
|
||||
int bitnum;
|
||||
|
||||
bitnum = find_first_bit(set->bitmap, set->num_ssid * set->num_id);
|
||||
if (bitnum >= set->num_ssid * set->num_id)
|
||||
return 1;
|
||||
return 0;
|
||||
return bitmap_empty(set->bitmap, set->num_ssid * set->num_id);
|
||||
}
|
||||
|
||||
void idset_add_set(struct idset *to, struct idset *from)
|
||||
{
|
||||
unsigned long i, len;
|
||||
int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
|
||||
__BITOPS_WORDS(from->num_ssid * from->num_id));
|
||||
|
||||
len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
|
||||
__BITOPS_WORDS(from->num_ssid * from->num_id));
|
||||
for (i = 0; i < len ; i++)
|
||||
to->bitmap[i] |= from->bitmap[i];
|
||||
bitmap_or(to->bitmap, to->bitmap, from->bitmap, len);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright IBM Corp. 2007
|
||||
* Copyright IBM Corp. 2007, 2012
|
||||
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
|
||||
*/
|
||||
|
||||
|
@ -17,6 +17,7 @@ void idset_fill(struct idset *set);
|
|||
struct idset *idset_sch_new(void);
|
||||
void idset_sch_add(struct idset *set, struct subchannel_id id);
|
||||
void idset_sch_del(struct idset *set, struct subchannel_id id);
|
||||
void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid);
|
||||
int idset_sch_contains(struct idset *set, struct subchannel_id id);
|
||||
int idset_sch_get_first(struct idset *set, struct subchannel_id *id);
|
||||
int idset_is_empty(struct idset *set);
|
||||
|
|
Loading…
Reference in a new issue