Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b1f2af6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 updates from Martin Schwidefsky:
 "Pretty boring for a merge window pull.

  One change in behaviour is the patch for dasd driver, the module which
  provides the diagnose discipline is now loaded automatically.

  The SCLP code got a nice cleanup, a new global structure replaces a
  bunch of accessor functions.

  And a couple of random, small improvements"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/pci: improve handling of hotplug event 0x301
  s390/setup: fix DMA_API_DEBUG warnings
  s390/zcrypt: remove obsolete __constant
  s390/keyboard: avoid off-by-one when using strnlen_user()
  s390/sclp: pass timeout as HZ independent value
  s390/mm: s/specifiation/specification/, s/an specification/a specification/
  s390/sclp: Use DECLARE_BITMAP
  s390/dasd: Enable automatic loading of dasd_diag_mod
  s390/sclp: move sclp_facilities into "struct sclp"
  s390/sclp: get rid of sclp_get_mtid() and sclp_get_mtid_max()
  s390/sclp: unify basic sclp access by exposing "struct sclp"
  s390/sclp: prepare smp_fill_possible_mask for global "struct sclp"
parents aaa64485 7fc611ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -128,14 +128,14 @@ static struct hypfs_dbfs_file hypfs_sprp_file = {

int hypfs_sprp_init(void)
{
	if (!sclp_has_sprp())
	if (!sclp.has_sprp)
		return 0;
	return hypfs_dbfs_create_file(&hypfs_sprp_file);
}

void hypfs_sprp_exit(void)
{
	if (!sclp_has_sprp())
	if (!sclp.has_sprp)
		return;
	hypfs_dbfs_remove_file(&hypfs_sprp_file);
}
+2 −2
Original line number Diff line number Diff line
@@ -1565,9 +1565,9 @@ static inline int has_transparent_hugepage(void)
/*
 * 64 bit swap entry format:
 * A page-table entry has some bits we have to treat in a special way.
 * Bits 52 and bit 55 have to be zero, otherwise an specification
 * Bits 52 and bit 55 have to be zero, otherwise a specification
 * exception will occur instead of a page translation exception. The
 * specifiation exception has the bad habit not to store necessary
 * specification exception has the bad habit not to store necessary
 * information in the lowcore.
 * Bits 54 and 63 are used to indicate the page type.
 * A swap pte is indicated by bit pattern (pte & 0x201) == 0x200
+20 −14
Original line number Diff line number Diff line
@@ -46,33 +46,39 @@ struct sclp_cpu_info {
	struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1];
};

struct sclp_info {
	unsigned char has_linemode : 1;
	unsigned char has_vt220 : 1;
	unsigned char has_siif : 1;
	unsigned char has_sigpif : 1;
	unsigned char has_cpu_type : 1;
	unsigned char has_sprp : 1;
	unsigned int ibc;
	unsigned int mtid;
	unsigned int mtid_cp;
	unsigned int mtid_prev;
	unsigned long long rzm;
	unsigned long long rnmax;
	unsigned long long hamax;
	unsigned int max_cpu;
	unsigned long hsa_size;
	unsigned long long facilities;
};
extern struct sclp_info sclp;

int sclp_get_cpu_info(struct sclp_cpu_info *info);
int sclp_cpu_configure(u8 cpu);
int sclp_cpu_deconfigure(u8 cpu);
unsigned long long sclp_get_rnmax(void);
unsigned long long sclp_get_rzm(void);
unsigned int sclp_get_max_cpu(void);
unsigned int sclp_get_mtid(u8 cpu_type);
unsigned int sclp_get_mtid_max(void);
unsigned int sclp_get_mtid_prev(void);
int sclp_sdias_blk_count(void);
int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
int sclp_chp_configure(struct chp_id chpid);
int sclp_chp_deconfigure(struct chp_id chpid);
int sclp_chp_read_info(struct sclp_chp_info *info);
void sclp_get_ipl_info(struct sclp_ipl_info *info);
bool __init sclp_has_linemode(void);
bool __init sclp_has_vt220(void);
bool sclp_has_sprp(void);
int sclp_pci_configure(u32 fid);
int sclp_pci_deconfigure(u32 fid);
int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode);
unsigned long sclp_get_hsa_size(void);
void sclp_early_detect(void);
int sclp_has_siif(void);
int sclp_has_sigpif(void);
unsigned int sclp_get_ibc(void);

long _sclp_print_early(const char *);

#endif /* _ASM_S390_SCLP_H */
+4 −4
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static ssize_t copy_oldmem_page_zfcpdump(char *buf, size_t csize,
{
	int rc;

	if (src < sclp_get_hsa_size()) {
	if (src < sclp.hsa_size) {
		rc = memcpy_hsa(buf, src, csize, userbuf);
	} else {
		if (userbuf)
@@ -215,7 +215,7 @@ static int remap_oldmem_pfn_range_zfcpdump(struct vm_area_struct *vma,
					   unsigned long pfn,
					   unsigned long size, pgprot_t prot)
{
	unsigned long hsa_end = sclp_get_hsa_size();
	unsigned long hsa_end = sclp.hsa_size;
	unsigned long size_hsa;

	if (pfn < hsa_end >> PAGE_SHIFT) {
@@ -258,7 +258,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count)
				return rc;
		}
	} else {
		unsigned long hsa_end = sclp_get_hsa_size();
		unsigned long hsa_end = sclp.hsa_size;
		if ((unsigned long) src < hsa_end) {
			copied = min(count, hsa_end - (unsigned long) src);
			rc = memcpy_hsa(dest, (unsigned long) src, copied, 0);
@@ -609,7 +609,7 @@ int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size)
	if (elfcorehdr_addr != ELFCORE_ADDR_MAX)
		return 0;
	/* If we cannot get HSA size for zfcpdump return error */
	if (ipl_info.type == IPL_TYPE_FCP_DUMP && !sclp_get_hsa_size())
	if (ipl_info.type == IPL_TYPE_FCP_DUMP && !sclp.hsa_size)
		return -ENODEV;

	/* For kdump, exclude previous crashkernel memory */
+14 −9
Original line number Diff line number Diff line
@@ -128,9 +128,9 @@ __setup("condev=", condev_setup);
static void __init set_preferred_console(void)
{
	if (MACHINE_IS_KVM) {
		if (sclp_has_vt220())
		if (sclp.has_vt220)
			add_preferred_console("ttyS", 1, NULL);
		else if (sclp_has_linemode())
		else if (sclp.has_linemode)
			add_preferred_console("ttyS", 0, NULL);
		else
			add_preferred_console("hvc", 0, NULL);
@@ -510,8 +510,8 @@ static void reserve_memory_end(void)
{
#ifdef CONFIG_CRASH_DUMP
	if (ipl_info.type == IPL_TYPE_FCP_DUMP &&
	    !OLDMEM_BASE && sclp_get_hsa_size()) {
		memory_end = sclp_get_hsa_size();
	    !OLDMEM_BASE && sclp.hsa_size) {
		memory_end = sclp.hsa_size;
		memory_end &= PAGE_MASK;
		memory_end_set = 1;
	}
@@ -576,7 +576,7 @@ static void __init reserve_crashkernel(void)
		crash_base = low;
	} else {
		/* Find suitable area in free memory */
		low = max_t(unsigned long, crash_size, sclp_get_hsa_size());
		low = max_t(unsigned long, crash_size, sclp.hsa_size);
		high = crash_base ? crash_base + crash_size : ULONG_MAX;

		if (crash_base && crash_base < low) {
@@ -640,19 +640,24 @@ static void __init check_initrd(void)
}

/*
 * Reserve all kernel text
 * Reserve memory used for lowcore/command line/kernel image.
 */
static void __init reserve_kernel(void)
{
	unsigned long start_pfn;
	start_pfn = PFN_UP(__pa(&_end));
	unsigned long start_pfn = PFN_UP(__pa(&_end));

#ifdef CONFIG_DMA_API_DEBUG
	/*
	 * Reserve memory used for lowcore/command line/kernel image.
	 * DMA_API_DEBUG code stumbles over addresses from the
	 * range [_ehead, _stext]. Mark the memory as reserved
	 * so it is not used for CONFIG_DMA_API_DEBUG=y.
	 */
	memblock_reserve(0, PFN_PHYS(start_pfn));
#else
	memblock_reserve(0, (unsigned long)_ehead);
	memblock_reserve((unsigned long)_stext, PFN_PHYS(start_pfn)
			 - (unsigned long)_stext);
#endif
}

static void __init reserve_elfcorehdr(void)
Loading