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

Commit 9f9d7632 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] vmlogrdr function annotation.
  [S390] s390: rename CPU_IDLE to S390_CPU_IDLE
  [S390] cio: Remove prototype for non-existing function cmf_reset().
  [S390] zcrypt: fix request timeout handling
  [S390] system call optimization.
  [S390] dasd: Avoid compile warnings on !CONFIG_DASD_PROFILE
  [S390] Remove volatile from atomic_t
  [S390] Program check in diag 210 under 31 bit
  [S390] Bogomips calculation for 64 bit.
  [S390] smp: Merge smp_count_cpus() and smp_get_save_areas().
  [S390] zcore: Fix __user annotation.
  [S390] fixed cdl-format detection.
  [S390] sclp: Test facility list before executing a service call.
  [S390] sclp: introduce some new interfaces.
  [S390] Fixed comment typo.
  [S390] vmcp cleanup
parents 1b21f458 f60d8910
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@
#define CRYPT_S390_PRIORITY 300
#define CRYPT_S390_PRIORITY 300
#define CRYPT_S390_COMPOSITE_PRIORITY 400
#define CRYPT_S390_COMPOSITE_PRIORITY 400


/* s930 cryptographic operations */
/* s390 cryptographic operations */
enum crypt_s390_operations {
enum crypt_s390_operations {
	CRYPT_S390_KM   = 0x0100,
	CRYPT_S390_KM   = 0x0100,
	CRYPT_S390_KMC  = 0x0200,
	CRYPT_S390_KMC  = 0x0200,
+12 −33
Original line number Original line Diff line number Diff line
@@ -171,37 +171,6 @@ static inline int memory_fast_detect(void)
}
}
#endif
#endif


#define ADDR2G	(1UL << 31)

static noinline __init unsigned long sclp_memory_detect(void)
{
	struct sclp_readinfo_sccb *sccb;
	unsigned long long memsize;

	sccb = &s390_readinfo_sccb;

	if (sccb->header.response_code != 0x10)
		return 0;

	if (sccb->rnsize)
		memsize = sccb->rnsize << 20;
	else
		memsize = sccb->rnsize2 << 20;
	if (sccb->rnmax)
		memsize *= sccb->rnmax;
	else
		memsize *= sccb->rnmax2;
#ifndef CONFIG_64BIT
	/*
	 * Can't deal with more than 2G in 31 bit addressing mode, so
	 * limit the value in order to avoid strange side effects.
	 */
	if (memsize > ADDR2G)
		memsize = ADDR2G;
#endif
	return (unsigned long) memsize;
}

static inline __init unsigned long __tprot(unsigned long addr)
static inline __init unsigned long __tprot(unsigned long addr)
{
{
	int cc = -1;
	int cc = -1;
@@ -218,6 +187,7 @@ static inline __init unsigned long __tprot(unsigned long addr)


/* Checking memory in 128KB increments. */
/* Checking memory in 128KB increments. */
#define CHUNK_INCR	(1UL << 17)
#define CHUNK_INCR	(1UL << 17)
#define ADDR2G		(1UL << 31)


static noinline __init void find_memory_chunks(unsigned long memsize)
static noinline __init void find_memory_chunks(unsigned long memsize)
{
{
@@ -293,7 +263,7 @@ static noinline __init void setup_lowcore_early(void)
 */
 */
void __init startup_init(void)
void __init startup_init(void)
{
{
	unsigned long memsize;
	unsigned long long memsize;


	ipl_save_parameters();
	ipl_save_parameters();
	clear_bss_section();
	clear_bss_section();
@@ -305,8 +275,17 @@ void __init startup_init(void)
	sort_main_extable();
	sort_main_extable();
	setup_lowcore_early();
	setup_lowcore_early();
	sclp_readinfo_early();
	sclp_readinfo_early();
	sclp_facilities_detect();
	memsize = sclp_memory_detect();
	memsize = sclp_memory_detect();
#ifndef CONFIG_64BIT
	/*
	 * Can't deal with more than 2G in 31 bit addressing mode, so
	 * limit the value in order to avoid strange side effects.
	 */
	if (memsize > ADDR2G)
		memsize = ADDR2G;
#endif
	if (memory_fast_detect() < 0)
	if (memory_fast_detect() < 0)
		find_memory_chunks(memsize);
		find_memory_chunks((unsigned long) memsize);
	lockdep_on();
	lockdep_on();
}
}
+6 −1
Original line number Original line Diff line number Diff line
@@ -107,6 +107,11 @@ STACK_SIZE = 1 << STACK_SHIFT
	l	%r13,__LC_SVC_NEW_PSW+4	# load &system_call to %r13
	l	%r13,__LC_SVC_NEW_PSW+4	# load &system_call to %r13
	.endm
	.endm


	.macro	SAVE_ALL_SVC psworg,savearea
	la	%r12,\psworg
	l	%r15,__LC_KERNEL_STACK	# problem state -> load ksp
	.endm

	.macro	SAVE_ALL_SYNC psworg,savearea
	.macro	SAVE_ALL_SYNC psworg,savearea
	la	%r12,\psworg
	la	%r12,\psworg
	tm	\psworg+1,0x01		# test problem state bit
	tm	\psworg+1,0x01		# test problem state bit
@@ -218,7 +223,7 @@ system_call:
	STORE_TIMER __LC_SYNC_ENTER_TIMER
	STORE_TIMER __LC_SYNC_ENTER_TIMER
sysc_saveall:
sysc_saveall:
	SAVE_ALL_BASE __LC_SAVE_AREA
	SAVE_ALL_BASE __LC_SAVE_AREA
	SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	lh	%r7,0x8a	  # get svc number from lowcore
	lh	%r7,0x8a	  # get svc number from lowcore
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+6 −1
Original line number Original line Diff line number Diff line
@@ -99,6 +99,11 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \
	larl	%r13,system_call
	larl	%r13,system_call
	.endm
	.endm


	.macro	SAVE_ALL_SVC psworg,savearea
	la	%r12,\psworg
	lg	%r15,__LC_KERNEL_STACK	# problem state -> load ksp
	.endm

	.macro	SAVE_ALL_SYNC psworg,savearea
	.macro	SAVE_ALL_SYNC psworg,savearea
	la	%r12,\psworg
	la	%r12,\psworg
	tm	\psworg+1,0x01		# test problem state bit
	tm	\psworg+1,0x01		# test problem state bit
@@ -207,7 +212,7 @@ system_call:
	STORE_TIMER __LC_SYNC_ENTER_TIMER
	STORE_TIMER __LC_SYNC_ENTER_TIMER
sysc_saveall:
sysc_saveall:
	SAVE_ALL_BASE __LC_SAVE_AREA
	SAVE_ALL_BASE __LC_SAVE_AREA
	SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA
	llgh	%r7,__LC_SVC_INT_CODE	# get svc number from lowcore
	llgh	%r7,__LC_SVC_INT_CODE	# get svc number from lowcore
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+8 −9
Original line number Original line Diff line number Diff line
@@ -25,10 +25,6 @@


#define IPL_PARM_BLOCK_VERSION 0
#define IPL_PARM_BLOCK_VERSION 0


#define SCCB_VALID (s390_readinfo_sccb.header.response_code == 0x10)
#define SCCB_LOADPARM (&s390_readinfo_sccb.loadparm)
#define SCCB_FLAG (s390_readinfo_sccb.flags)

#define IPL_UNKNOWN_STR		"unknown"
#define IPL_UNKNOWN_STR		"unknown"
#define IPL_CCW_STR		"ccw"
#define IPL_CCW_STR		"ccw"
#define IPL_FCP_STR		"fcp"
#define IPL_FCP_STR		"fcp"
@@ -146,6 +142,8 @@ static struct ipl_parameter_block *dump_block_ccw;


static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
static enum shutdown_action on_panic_action = SHUTDOWN_STOP;


static struct sclp_ipl_info sclp_ipl_info;

int diag308(unsigned long subcode, void *addr)
int diag308(unsigned long subcode, void *addr)
{
{
	register unsigned long _addr asm("0") = (unsigned long) addr;
	register unsigned long _addr asm("0") = (unsigned long) addr;
@@ -375,9 +373,9 @@ static ssize_t ipl_ccw_loadparm_show(struct kset *kset, char *page)
{
{
	char loadparm[LOADPARM_LEN + 1] = {};
	char loadparm[LOADPARM_LEN + 1] = {};


	if (!SCCB_VALID)
	if (!sclp_ipl_info.is_valid)
		return sprintf(page, "#unknown#\n");
		return sprintf(page, "#unknown#\n");
	memcpy(loadparm, SCCB_LOADPARM, LOADPARM_LEN);
	memcpy(loadparm, &sclp_ipl_info.loadparm, LOADPARM_LEN);
	EBCASC(loadparm, LOADPARM_LEN);
	EBCASC(loadparm, LOADPARM_LEN);
	strstrip(loadparm);
	strstrip(loadparm);
	return sprintf(page, "%s\n", loadparm);
	return sprintf(page, "%s\n", loadparm);
@@ -910,9 +908,9 @@ static int __init reipl_ccw_init(void)
	reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
	reipl_block_ccw->hdr.blk0_len = IPL_PARM_BLK0_CCW_LEN;
	reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
	reipl_block_ccw->hdr.pbt = DIAG308_IPL_TYPE_CCW;
	/* check if read scp info worked and set loadparm */
	/* check if read scp info worked and set loadparm */
	if (SCCB_VALID)
	if (sclp_ipl_info.is_valid)
		memcpy(reipl_block_ccw->ipl_info.ccw.load_param,
		memcpy(reipl_block_ccw->ipl_info.ccw.load_param,
		       SCCB_LOADPARM, LOADPARM_LEN);
		       &sclp_ipl_info.loadparm, LOADPARM_LEN);
	else
	else
		/* read scp info failed: set empty loadparm (EBCDIC blanks) */
		/* read scp info failed: set empty loadparm (EBCDIC blanks) */
		memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40,
		memset(reipl_block_ccw->ipl_info.ccw.load_param, 0x40,
@@ -1007,7 +1005,7 @@ static int __init dump_fcp_init(void)
{
{
	int rc;
	int rc;


	if(!(SCCB_FLAG & 0x2) || !SCCB_VALID)
	if (!sclp_ipl_info.has_dump)
		return 0; /* LDIPL DUMP is not installed */
		return 0; /* LDIPL DUMP is not installed */
	if (!diag308_set_works)
	if (!diag308_set_works)
		return 0;
		return 0;
@@ -1088,6 +1086,7 @@ static int __init s390_ipl_init(void)
{
{
	int rc;
	int rc;


	sclp_get_ipl_info(&sclp_ipl_info);
	reipl_probe();
	reipl_probe();
	rc = ipl_init();
	rc = ipl_init();
	if (rc)
	if (rc)
Loading