LiS 2.17.X & IBM s390/s390x
Paul Landay <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Message-ID | <[email protected]> |
The LiS 2.17.X level fails to build properly on IBM s390 (31bit) and s390x (64bit) mainframe systems. Attached is a patch which fixes SOME of the the areas unique to those architectures.
LiS-2.17.X-s390.patch
(text/plain, 3.7 KB)
diff -Naur LiS-2.17.X-orig/config.mk LiS-2.17.X-s390/config.mk
--- LiS-2.17.X-orig/config.mk 2004-06-06 17:05:24.000000000 -0400
+++ LiS-2.17.X-s390/config.mk 2004-08-16 07:21:46.437178832 -0400
@@ -31,6 +31,7 @@
# FIXME - libc uses some 'LIB64' variables, but I have no idea how
# to set them - they should be set here if not to be defined from
# the command line
+DEST_LIB64DIR = /usr/lib64
#
# If we are cross compiling then the user needs to supply us with a
diff -Naur LiS-2.17.X-orig/head/linux-mdep.c LiS-2.17.X-s390/head/linux-mdep.c
--- LiS-2.17.X-orig/head/linux-mdep.c 2004-07-02 10:32:40.000000000 -0400
+++ LiS-2.17.X-s390/head/linux-mdep.c 2004-08-16 07:20:22.605923120 -0400
@@ -92,7 +95,7 @@
* S/390 2.4 kernels export smp_num_cpus
* other 2.4 kernels export num_online_cpus()
*/
-#if defined(__s390__) || defined(__s390x__)
+#if ( defined(__s390__) || defined(__s390x__) ) && defined(KERNEL_2_4)
#define NUM_CPUS smp_num_cpus
#elif defined(KERNEL_2_5)
#define NUM_CPUS num_online_cpus()
@@ -196,7 +196,7 @@
void lis_print_dentry(struct dentry *d, char *comment) ;
#ifdef _S390X_LIS_
-extern int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
+extern long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
extern int register_ioctl32_conversion(unsigned int fd,
int (*handler)(unsigned int fd,
unsigned int cmd,
diff -Naur LiS-2.17.X-orig/head/mod.c LiS-2.17.X-s390/head/mod.c
--- LiS-2.17.X-orig/head/mod.c 2004-06-22 11:59:14.000000000 -0400
+++ LiS-2.17.X-s390/head/mod.c 2004-08-16 07:24:03.555333704 -0400
@@ -998,6 +998,7 @@
if (devptr->irq <= 0)
return ;
+#if (!defined(_S390_LIS_) && !defined(_S390X_LIS_))
retval = request_irq(devptr->irq, devptr->handler, 0, name, NULL);
if (retval)
{
@@ -1005,6 +1005,7 @@
name, devptr->irq, retval);
return;
}
+#endif
if (devptr->port > 0 && devptr->nports > 0)
{
@@ -1143,7 +1143,9 @@
devptr = &lis_device_config[i] ;
if (devptr->irq > 0)
{
+#if (!defined(_S390_LIS_) && !defined(_S390X_LIS_))
free_irq(devptr->irq, NULL) ;
+#endif
if (devptr->port > 0 && devptr->nports > 0)
release_region(devptr->port, devptr->nports);
diff -Naur LiS-2.17.X-orig/libc32over64/mk.bdy LiS-2.17.X-s390/libc32over64/mk.bdy
--- LiS-2.17.X-orig/libc32over64/mk.bdy 2004-06-06 17:05:27.000000000 -0400
+++ LiS-2.17.X-s390/libc32over64/mk.bdy 2004-08-16 07:20:55.707890856 -0400
@@ -66,9 +66,9 @@
install: all
$(Q_ECHO) $(qtag_INSTALL)$(relpwd)
$(Q)install -d $(DEST_LIBDIR)
- $(Q)install -m 0755 $(LIB_SHARED) $(DEST_LIBDIR)/$(LIBFILE_SHARED)/.
- $(Q)install -m 0755 $(LIB_PSHARED) $(DEST_LIBDIR)/$(LIBFILE_PSHARED)/.
- $(Q)install -m 0644 $(LIB_STATIC) $(DEST_LIBDIR)/$(LIBFILE_STATIC)/.
+ $(Q)install -m 0755 $(LIB_SHARED) $(DEST_LIBDIR)/$(LIBFILE_SHARED)
+ $(Q)install -m 0755 $(LIB_PSHARED) $(DEST_LIBDIR)/$(LIBFILE_PSHARED)
+ $(Q)install -m 0644 $(LIB_STATIC) $(DEST_LIBDIR)/$(LIBFILE_STATIC)
ifeq ($(DESTDIR),)
$(Q)ldconfig
endif
diff -Naur LiS-2.17.X-orig/head/osif.c LiS-2.17.X-s390/head/osif.c
--- LiS-2.17.X-orig/head/osif.c 2004-09-16 14:50:23.000000000 -0400
+++ LiS-2.17.X-s390/head/osif.c 2004-09-27 13:17:53.000000000 -0400
@@ -557,6 +557,7 @@
const char *device,
void *dev_id)
{
+#if !defined(__s390__)
#if defined (KERNEL_2_5)
int ret ;
lis_devid_t *dv ;
@@ -587,11 +588,14 @@
return(request_irq(irq, kparam, flags, device, dev_id)) ;
#endif
+#endif
}
void _RP lis_free_irq(unsigned int irq, void *dev_id)
{
+#if !defined(__s390__)
free_irq(irq, dev_id) ;
+#endif
}
void _RP lis_enable_irq(unsigned int irq)