public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 26/32] [PATCH] codepage conversion of kernel parameter line
Date: Wed, 24 Feb 2010 09:44:56 +0100	[thread overview]
Message-ID: <20100224084452.612856822@de.ibm.com> (raw)
In-Reply-To: 20100224084430.193562869@de.ibm.com

[-- Attachment #1: 125-kparm-ebcasc.diff --]
[-- Type: text/plain, Size: 2938 bytes --]

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Move the ebcdic to ascii conversion of the kernel parameter line from
head.S to early.c and convert the assembler code to C.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/kernel/early.c |   13 ++++++++++++-
 arch/s390/kernel/head.S  |   18 +-----------------
 2 files changed, 13 insertions(+), 18 deletions(-)

Index: quilt-2.6/arch/s390/kernel/early.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/early.c	2010-02-24 09:44:25.000000000 +0100
+++ quilt-2.6/arch/s390/kernel/early.c	2010-02-24 09:44:28.000000000 +0100
@@ -405,8 +405,19 @@
 
 static void __init setup_boot_command_line(void)
 {
+	int i;
+
+	/* convert arch command line to ascii */
+	for (i = 0; i < ARCH_COMMAND_LINE_SIZE; i++)
+		if (COMMAND_LINE[i] & 0x80)
+			break;
+	if (i < ARCH_COMMAND_LINE_SIZE)
+		EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE);
+	COMMAND_LINE[ARCH_COMMAND_LINE_SIZE-1] = 0;
+
 	/* copy arch command line */
-	strlcpy(boot_command_line, COMMAND_LINE, ARCH_COMMAND_LINE_SIZE);
+	strlcpy(boot_command_line, strstrip(COMMAND_LINE),
+		ARCH_COMMAND_LINE_SIZE);
 
 	/* append IPL PARM data to the boot command line */
 	if (MACHINE_IS_VM)
Index: quilt-2.6/arch/s390/kernel/head.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/head.S	2010-02-24 09:44:26.000000000 +0100
+++ quilt-2.6/arch/s390/kernel/head.S	2010-02-24 09:44:28.000000000 +0100
@@ -287,19 +287,7 @@
 	bz	.Lagain1		# skip dateset trailer
 	la	%r5,0(%r4,%r2)
 	lr	%r3,%r2
-.Lidebc:
-	tm	0(%r5),0x80		# high order bit set ?
-	bo	.Ldocv			#  yes -> convert from EBCDIC
-	ahi	%r5,-1
-	bct	%r3,.Lidebc
-	b	.Lnocv
-.Ldocv:
-	l	%r3,.Lcvtab
-	tr	0(256,%r4),0(%r3)	# convert parameters to ascii
-	tr	256(256,%r4),0(%r3)
-	tr	512(256,%r4),0(%r3)
-	tr	768(122,%r4),0(%r3)
-.Lnocv: la	%r3,COMMAND_LINE-PARMAREA(%r12) # load adr. of command line
+	la	%r3,COMMAND_LINE-PARMAREA(%r12) # load adr. of command line
 	mvc	0(256,%r3),0(%r4)
 	mvc	256(256,%r3),256(%r4)
 	mvc	512(256,%r3),512(%r4)
@@ -383,7 +371,6 @@
 .Linitrd:.long _end + 0x400000		# default address of initrd
 .Lparm:	.long  PARMAREA
 .Lstartup: .long startup
-.Lcvtab:.long	_ebcasc 		# ebcdic to ascii table
 .Lreset:.byte	0xc3,0xc8,0xc1,0xd5,0xc7,0xc5,0x40,0xd9,0xc4,0xd9,0x40
 	.byte	0xc1,0xd3,0xd3,0x40,0xd2,0xc5,0xc5,0xd7,0x40,0xd5,0xd6
 	.byte	0xc8,0xd6,0xd3,0xc4	# "change rdr all keep nohold"
@@ -416,13 +403,10 @@
 .sk8x8:
 	mvc	0(240,%r8),0(%r9)	# copy iplparms into buffer
 .gotr:
-	l	%r10,.tbl		# EBCDIC to ASCII table
-	tr	0(240,%r8),0(%r10)
 	slr	%r0,%r0
 	st	%r0,INITRD_SIZE+ARCH_OFFSET-PARMAREA(%r11)
 	st	%r0,INITRD_START+ARCH_OFFSET-PARMAREA(%r11)
 	j	startup 		# continue with startup
-.tbl:	.long	_ebcasc			# translate table
 .cmd:	.long	COMMAND_LINE		# address of command line buffer
 .parm:	.long	PARMAREA
 .lowcase:


  parent reply	other threads:[~2010-02-24  8:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  8:44 [patch 00/32] s390 patch queue for 2.6.34 Martin Schwidefsky
2010-02-24  8:44 ` [patch 01/32] [PATCH] uaccess: implement strict user copy checks Martin Schwidefsky
2010-02-24  8:44 ` [patch 02/32] [PATCH] adapt text to cu3088-removal Martin Schwidefsky
2010-02-24  8:44 ` [patch 03/32] [PATCH] cio: consolidate workqueues Martin Schwidefsky
2010-02-24  8:44 ` [patch 04/32] [PATCH] cio: introduce cio_settle Martin Schwidefsky
2010-02-24  8:44 ` [patch 05/32] [PATCH] cio: wait for channel report Martin Schwidefsky
2010-02-24  8:44 ` [patch 06/32] [PATCH] cio: make wait_events interruptible Martin Schwidefsky
2010-02-24  8:44 ` [patch 07/32] [PATCH] use inline assembly contraints available with gcc 3.3.3 Martin Schwidefsky
2010-02-24  8:44 ` [patch 08/32] [PATCH] zfcpdump: remove cross arch dump support Martin Schwidefsky
2010-02-24  8:44 ` [patch 09/32] [PATCH] smp: rename and add lowcore defines Martin Schwidefsky
2010-02-24  8:44 ` [patch 10/32] [PATCH] smp: always reboot on cpu 0 Martin Schwidefsky
2010-02-24  8:44 ` [patch 11/32] [PATCH] qdio: account processed SBAL during queue scan Martin Schwidefsky
2010-02-24  8:44 ` [patch 12/32] [PATCH] qdio: optimize cache line usage of struct qdio_irq Martin Schwidefsky
2010-02-24  8:44 ` [patch 13/32] [PATCH] add MACHINE_IS_LPAR flag Martin Schwidefsky
2010-02-24  8:44 ` [patch 14/32] [PATCH] sysinfo: fix SYSIB 3,2,2 structure Martin Schwidefsky
2010-02-24  8:44 ` [patch 15/32] [PATCH] spinlock: check virtual cpu running status Martin Schwidefsky
2010-02-24  8:44 ` [patch 16/32] [PATCH] smp: rework sigp code Martin Schwidefsky
2010-02-24  8:44 ` [patch 17/32] [PATCH] Replace ENOTSUPP usage with EOPNOTSUPP Martin Schwidefsky
2010-02-24  8:44 ` [patch 18/32] [PATCH] free_initmem: reduce code duplication Martin Schwidefsky
2010-02-24  8:44 ` [patch 19/32] [PATCH] ccw_device_notify: improve return codes Martin Schwidefsky
2010-02-24  8:44 ` [patch 20/32] [PATCH] Cleanup struct _lowcore usage and defines Martin Schwidefsky
2010-02-24  8:44 ` [patch 21/32] [PATCH] bug: use relative pointers in bug table entries Martin Schwidefsky
2010-02-24  8:44 ` [patch 22/32] [PATCH] use kprobes_built_in() in mm/fault code Martin Schwidefsky
2010-02-24  8:44 ` [patch 23/32] [PATCH] dasd: fix online/offline race Martin Schwidefsky
2010-02-24  8:44 ` [patch 24/32] [PATCH] add z9-ec/z10 instruction to kernel disassembler Martin Schwidefsky
2010-02-24  8:44 ` [patch 25/32] [PATCH] seq_file: convert drivers/s390/ Martin Schwidefsky
2010-02-24  8:44 ` Martin Schwidefsky [this message]
2010-02-24  8:44 ` [patch 27/32] [PATCH] Define new s390 ELF note sections in elf.h Martin Schwidefsky
2010-02-24  8:44 ` [patch 28/32] [PATCH] add support for compressed kernels Martin Schwidefsky
2010-02-24  8:44 ` [patch 29/32] [PATCH] correct vdso version string Martin Schwidefsky
2010-02-24  8:45 ` [patch 30/32] [PATCH] dasd: fix refcounting Martin Schwidefsky
2010-02-24  8:45 ` [patch 31/32] [PATCH] dasd: correct offline processing Martin Schwidefsky
2010-02-24  8:45 ` [patch 32/32] [PATCH] cio: trigger subchannel event at resume time Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100224084452.612856822@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox