Commit 4e3ab74c authored by Linus Torvalds's avatar Linus Torvalds

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)
parents 4a09cbce fd2c32a9
...@@ -130,6 +130,7 @@ config S390 ...@@ -130,6 +130,7 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
select HAVE_UID16 if 32BIT select HAVE_UID16 if 32BIT
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
select GENERIC_TIME_VSYSCALL_OLD select GENERIC_TIME_VSYSCALL_OLD
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
......
...@@ -5,7 +5,7 @@ OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") ...@@ -5,7 +5,7 @@ OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
OUTPUT_ARCH(s390:64-bit) OUTPUT_ARCH(s390:64-bit)
#else #else
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
OUTPUT_ARCH(s390) OUTPUT_ARCH(s390:31-bit)
#endif #endif
ENTRY(startup) ENTRY(startup)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <asm/cpu_mf.h> #include <asm/cpu_mf.h>
/* CPU-measurement counter facility */ /* CPU-measurement counter facility */
#define PERF_CPUM_CF_MAX_CTR 160 #define PERF_CPUM_CF_MAX_CTR 256
/* Per-CPU flags for PMU states */ /* Per-CPU flags for PMU states */
#define PMU_F_RESERVED 0x1000 #define PMU_F_RESERVED 0x1000
......
# UAPI Header export list # UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += kvm_para.h
header-y += auxvec.h header-y += auxvec.h
header-y += bitsperlong.h header-y += bitsperlong.h
header-y += byteorder.h header-y += byteorder.h
......
/* /*
* Copyright IBM Corp. 2007 * Copyright IBM Corp. 2007, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/ */
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
#define __MAX_CHPID 255 #define __MAX_CHPID 255
struct chp_id { struct chp_id {
u8 reserved1; __u8 reserved1;
u8 cssid; __u8 cssid;
u8 reserved2; __u8 reserved2;
u8 id; __u8 id;
} __attribute__((packed)); } __attribute__((packed));
......
/*
* 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 { ...@@ -59,8 +59,8 @@ enum {
enum { enum {
CACHE_TI_UNIFIED = 0, CACHE_TI_UNIFIED = 0,
CACHE_TI_INSTRUCTION = 0, CACHE_TI_DATA = 0,
CACHE_TI_DATA, CACHE_TI_INSTRUCTION,
}; };
struct cache_info { struct cache_info {
...@@ -121,7 +121,10 @@ static int __init cache_add(int level, int private, int type) ...@@ -121,7 +121,10 @@ static int __init cache_add(int level, int private, int type)
cache = kzalloc(sizeof(*cache), GFP_KERNEL); cache = kzalloc(sizeof(*cache), GFP_KERNEL);
if (!cache) if (!cache)
return -ENOMEM; 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->size = ecag(EXTRACT_SIZE, level, ti);
cache->line_size = ecag(EXTRACT_LINE_SIZE, level, ti); cache->line_size = ecag(EXTRACT_LINE_SIZE, level, ti);
cache->associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti); cache->associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti);
......
...@@ -85,16 +85,10 @@ ...@@ -85,16 +85,10 @@
.align 2 .align 2
startup_kdump_relocated: startup_kdump_relocated:
basr %r13,0 basr %r13,0
0: 0: lpswe .Lrestart_psw-0b(%r13) # Start new kernel...
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...
.align 8 .align 8
.Lrestart_psw: .Lrestart_psw:
.long 0x00080000,0x80000000 + startup .quad 0x0000000080000000,0x0000000000000000 + startup
#else #else
.align 2 .align 2
.Lep_startup_kdump: .Lep_startup_kdump:
......
...@@ -94,7 +94,7 @@ static int get_counter_set(u64 event) ...@@ -94,7 +94,7 @@ static int get_counter_set(u64 event)
set = CPUMF_CTR_SET_USER; set = CPUMF_CTR_SET_USER;
else if (event < 128) else if (event < 128)
set = CPUMF_CTR_SET_CRYPTO; set = CPUMF_CTR_SET_CRYPTO;
else if (event < 160) else if (event < 256)
set = CPUMF_CTR_SET_EXT; set = CPUMF_CTR_SET_EXT;
return set; return set;
...@@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc) ...@@ -138,6 +138,10 @@ static int validate_ctr_version(const struct hw_perf_event *hwc)
case CPUMF_CTR_SET_EXT: case CPUMF_CTR_SET_EXT:
if (cpuhw->info.csvn < 1) if (cpuhw->info.csvn < 1)
err = -EOPNOTSUPP; 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; break;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef CONFIG_64BIT #ifndef CONFIG_64BIT
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
OUTPUT_ARCH(s390) OUTPUT_ARCH(s390:31-bit)
ENTRY(startup) ENTRY(startup)
jiffies = jiffies_64 + 4; jiffies = jiffies_64 + 4;
#else #else
......
...@@ -377,7 +377,11 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow) ...@@ -377,7 +377,11 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow)
/* Will be done on the slow path. */ /* Will be done on the slow path. */
return -EAGAIN; 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. */ /* Unusable - ignore. */
return 0; return 0;
} }
...@@ -536,6 +540,7 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data) ...@@ -536,6 +540,7 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data)
case -ENOMEM: case -ENOMEM:
case -EIO: case -EIO:
/* These should abort looping */ /* These should abort looping */
idset_sch_del_subseq(slow_subchannel_set, schid);
break; break;
default: default:
rc = 0; rc = 0;
......
/* /*
* Copyright IBM Corp. 2007 * Copyright IBM Corp. 2007, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/ */
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/bitmap.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include "idset.h" #include "idset.h"
#include "css.h" #include "css.h"
...@@ -89,6 +90,14 @@ void idset_sch_del(struct idset *set, struct subchannel_id schid) ...@@ -89,6 +90,14 @@ void idset_sch_del(struct idset *set, struct subchannel_id schid)
idset_del(set, schid.ssid, schid.sch_no); 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) int idset_sch_contains(struct idset *set, struct subchannel_id schid)
{ {
return idset_contains(set, schid.ssid, schid.sch_no); 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) ...@@ -111,20 +120,13 @@ int idset_sch_get_first(struct idset *set, struct subchannel_id *schid)
int idset_is_empty(struct idset *set) int idset_is_empty(struct idset *set)
{ {
int bitnum; return bitmap_empty(set->bitmap, set->num_ssid * set->num_id);
bitnum = find_first_bit(set->bitmap, set->num_ssid * set->num_id);
if (bitnum >= set->num_ssid * set->num_id)
return 1;
return 0;
} }
void idset_add_set(struct idset *to, struct idset *from) 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),
len = min(__BITOPS_WORDS(to->num_ssid * to->num_id),
__BITOPS_WORDS(from->num_ssid * from->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);
} }
/* /*
* Copyright IBM Corp. 2007 * Copyright IBM Corp. 2007, 2012
* Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com> * Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
*/ */
...@@ -17,6 +17,7 @@ void idset_fill(struct idset *set); ...@@ -17,6 +17,7 @@ void idset_fill(struct idset *set);
struct idset *idset_sch_new(void); struct idset *idset_sch_new(void);
void idset_sch_add(struct idset *set, struct subchannel_id id); 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(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_contains(struct idset *set, struct subchannel_id id);
int idset_sch_get_first(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); int idset_is_empty(struct idset *set);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment