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

Commit 21c7075f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
  [S390] use siginfo for sigtrap signals
  [S390] dasd: add enhanced DASD statistics interface
  [S390] kvm: make sigp emerg smp capable
  [S390] disable cpu measurement alerts on a dying cpu
  [S390] initial cr0 bits
  [S390] iucv cr0 enablement bit
  [S390] race safe external interrupt registration
  [S390] remove tape block docu
  [S390] ap: toleration support for ap device type 10
  [S390] cleanup program check handler prototypes
  [S390] remove kvm mmu reload on s390
  [S390] Use gmap translation for accessing guest memory
  [S390] use gmap address spaces for kvm guest images
  [S390] kvm guest address space mapping
  [S390] fix s390 assembler code alignments
  [S390] move sie code to entry.S
  [S390] kvm: handle tprot intercepts
  [S390] qdio: clear shared DSCI before scheduling the queue handler
  [S390] reference bit testing for unmapped pages
  [S390] irqs: Do not trace arch_local_{*,irq_*} functions
  ...
parents ff0c4ad2 73b7d40f
Loading
Loading
Loading
Loading

Documentation/s390/TAPE

deleted100644 → 0
+0 −122
Original line number Diff line number Diff line
Channel attached Tape device driver 

-----------------------------WARNING-----------------------------------------
This driver is considered to be EXPERIMENTAL. Do NOT use it in 
production environments. Feel free to test it and report problems back to us. 
-----------------------------------------------------------------------------

The LINUX for zSeries tape device driver manages channel attached tape drives 
which are compatible to IBM 3480 or IBM 3490 magnetic tape subsystems. This 
includes various models of these devices (for example the 3490E). 


Tape driver features 

The device driver supports a maximum of 128 tape devices. 
No official LINUX device major number is assigned to the zSeries tape device 
driver. It allocates major numbers dynamically and reports them on system 
startup. 
Typically it will get major number 254 for both the character device front-end 
and the block device front-end. 

The tape device driver needs no kernel parameters. All supported devices 
present are detected on driver initialization at system startup or module load.
The devices detected are ordered by their subchannel numbers. The device with 
the lowest subchannel number becomes device 0, the next one will be device 1 
and so on. 


Tape character device front-end 

The usual way to read or write to the tape device is through the character 
device front-end. The zSeries tape device driver provides two character devices
for each physical device -- the first of these will rewind automatically when 
it is closed, the second will not rewind automatically. 

The character device nodes are named /dev/rtibm0 (rewinding) and /dev/ntibm0 
(non-rewinding) for the first device, /dev/rtibm1 and /dev/ntibm1 for the 
second, and so on. 

The character device front-end can be used as any other LINUX tape device. You 
can write to it and read from it using LINUX facilities such as GNU tar. The 
tool mt can be used to perform control operations, such as rewinding the tape 
or skipping a file. 

Most LINUX tape software should work with either tape character device. 


Tape block device front-end 

The tape device may also be accessed as a block device in read-only mode. 
This could be used for software installation in the same way as it is used with 
other operation systems on the zSeries platform (and most LINUX 
distributions are shipped on compact disk using ISO9660 filesystems). 

One block device node is provided for each physical device. These are named 
/dev/btibm0 for the first device, /dev/btibm1 for the second and so on. 
You should only use the ISO9660 filesystem on LINUX for zSeries tapes because 
the physical tape devices cannot perform fast seeks and the ISO9660 system is 
optimized for this situation. 


Tape block device example 

In this example a tape with an ISO9660 filesystem is created using the first 
tape device. ISO9660 filesystem support must be built into your system kernel
for this. 
The mt command is used to issue tape commands and the mkisofs command to 
create an ISO9660 filesystem: 

- create a LINUX directory (somedir) with the contents of the filesystem 
     mkdir somedir
     cp contents somedir 

- insert a tape 

- ensure the tape is at the beginning 
     mt -f /dev/ntibm0 rewind 

- set the blocksize of the character driver. The blocksize 2048 bytes
  is commonly used on ISO9660 CD-Roms
     mt -f /dev/ntibm0 setblk 2048 

- write the filesystem to the character device driver 
     mkisofs -o /dev/ntibm0 somedir 

- rewind the tape again 
     mt -f /dev/ntibm0 rewind 

- Now you can mount your new filesystem as a block device: 
     mount -t iso9660 -o ro,block=2048 /dev/btibm0 /mnt 

TODO List 

   - Driver has to be stabilized still

BUGS 

This driver is considered BETA, which means some weaknesses may still
be in it.
If an error occurs which cannot be handled by the code you will get a 
sense-data dump.In that case please do the following: 

1. set the tape driver debug level to maximum: 
     echo 6 >/proc/s390dbf/tape/level 

2. re-perform the actions which produced the bug. (Hopefully the bug will 
   reappear.) 

3. get a snapshot from the debug-feature: 
     cat /proc/s390dbf/tape/hex_ascii >somefile 

4. Now put the snapshot together with a detailed description of the situation 
   that led to the bug: 
 - Which tool did you use? 
 - Which hardware do you have? 
 - Was your tape unit online? 
 - Is it a shared tape unit? 

5. Send an email with your bug report to: 
     mailto:Linux390@de.ibm.com 

+2 −2
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@
 */

#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/page.h>
#include "sizes.h"

__HEAD
	.globl	startup_continue
startup_continue:
ENTRY(startup_continue)
	basr	%r13,0			# get base
.LPG1:
	# setup stack
+2 −2
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@
 */

#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/page.h>
#include "sizes.h"

__HEAD
	.globl	startup_continue
startup_continue:
ENTRY(startup_continue)
	basr	%r13,0			# get base
.LPG1:
	# setup stack
+8 −8
Original line number Diff line number Diff line
@@ -29,42 +29,42 @@
})

/* set system mask. */
static inline void __arch_local_irq_ssm(unsigned long flags)
static inline notrace void __arch_local_irq_ssm(unsigned long flags)
{
	asm volatile("ssm   %0" : : "Q" (flags) : "memory");
}

static inline unsigned long arch_local_save_flags(void)
static inline notrace unsigned long arch_local_save_flags(void)
{
	return __arch_local_irq_stosm(0x00);
}

static inline unsigned long arch_local_irq_save(void)
static inline notrace unsigned long arch_local_irq_save(void)
{
	return __arch_local_irq_stnsm(0xfc);
}

static inline void arch_local_irq_disable(void)
static inline notrace void arch_local_irq_disable(void)
{
	arch_local_irq_save();
}

static inline void arch_local_irq_enable(void)
static inline notrace void arch_local_irq_enable(void)
{
	__arch_local_irq_stosm(0x03);
}

static inline void arch_local_irq_restore(unsigned long flags)
static inline notrace void arch_local_irq_restore(unsigned long flags)
{
	__arch_local_irq_ssm(flags);
}

static inline bool arch_irqs_disabled_flags(unsigned long flags)
static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
{
	return !(flags & (3UL << (BITS_PER_LONG - 8)));
}

static inline bool arch_irqs_disabled(void)
static inline notrace bool arch_irqs_disabled(void)
{
	return arch_irqs_disabled_flags(arch_local_save_flags());
}
+9 −3
Original line number Diff line number Diff line
@@ -93,9 +93,7 @@ struct kvm_s390_sie_block {
	__u32	scaol;			/* 0x0064 */
	__u8	reserved68[4];		/* 0x0068 */
	__u32	todpr;			/* 0x006c */
	__u8	reserved70[16];		/* 0x0070 */
	__u64	gmsor;			/* 0x0080 */
	__u64	gmslm;			/* 0x0088 */
	__u8	reserved70[32];		/* 0x0070 */
	psw_t	gpsw;			/* 0x0090 */
	__u64	gg14;			/* 0x00a0 */
	__u64	gg15;			/* 0x00a8 */
@@ -138,6 +136,7 @@ struct kvm_vcpu_stat {
	u32 instruction_chsc;
	u32 instruction_stsi;
	u32 instruction_stfl;
	u32 instruction_tprot;
	u32 instruction_sigp_sense;
	u32 instruction_sigp_emergency;
	u32 instruction_sigp_stop;
@@ -175,6 +174,10 @@ struct kvm_s390_prefix_info {
	__u32 address;
};

struct kvm_s390_emerg_info {
	__u16 code;
};

struct kvm_s390_interrupt_info {
	struct list_head list;
	u64	type;
@@ -182,6 +185,7 @@ struct kvm_s390_interrupt_info {
		struct kvm_s390_io_info io;
		struct kvm_s390_ext_info ext;
		struct kvm_s390_pgm_info pgm;
		struct kvm_s390_emerg_info emerg;
		struct kvm_s390_prefix_info prefix;
	};
};
@@ -226,6 +230,7 @@ struct kvm_vcpu_arch {
		struct cpuid	cpu_id;
		u64		stidp_data;
	};
	struct gmap *gmap;
};

struct kvm_vm_stat {
@@ -236,6 +241,7 @@ struct kvm_arch{
	struct sca_block *sca;
	debug_info_t *dbf;
	struct kvm_s390_float_interrupt float_int;
	struct gmap *gmap;
};

extern int sie64a(struct kvm_s390_sie_block *, unsigned long *);
Loading