Commit 8b42d462 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: base fixes

- Remove unused variables from smp.c.
- Reserve system call number 110 for sys_lookup_dcache.
- Fix show_trace.
- Remove superfluous asm include file.
- Add statfs64 structure.
parent 8e3ef35e
......@@ -67,6 +67,11 @@ CONFIG_PFAULT=y
# CONFIG_SHARED_KERNEL is not set
# CONFIG_PCMCIA is not set
#
# Generic Driver Options
#
# CONFIG_FW_LOADER is not set
#
# SCSI support
#
......@@ -166,6 +171,7 @@ CONFIG_IPV6=m
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_XFRM_USER is not set
#
......
......@@ -419,8 +419,6 @@ void __init smp_check_cpus(unsigned int max_cpus)
boot_cpu_addr = S390_lowcore.cpu_data.cpu_addr;
current_thread_info()->cpu = 0;
num_cpus = 1;
cpu_possible_map = 1;
cpu_online_map = 1;
for (curr_cpu = 0;
curr_cpu <= 65535 && num_cpus < max_cpus; curr_cpu++) {
if ((__u16) curr_cpu == boot_cpu_addr)
......
......@@ -118,7 +118,7 @@ SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper)
SYSCALL(sys_newlstat,sys_newlstat,compat_sys_newlstat_wrapper)
SYSCALL(sys_newfstat,sys_newfstat,compat_sys_newfstat_wrapper)
NI_SYSCALL /* old uname syscall */
NI_SYSCALL /* 110 iopl for i386 */
NI_SYSCALL /* reserved for sys_lookup_dcache */
SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup)
NI_SYSCALL /* old "idle" system call */
NI_SYSCALL /* vm86old for i386 */
......
......@@ -78,7 +78,7 @@ static int kstack_depth_to_print = 20;
#endif /* CONFIG_ARCH_S390X */
void show_trace(unsigned long * stack)
void show_trace(struct task_struct *task, unsigned long * stack)
{
unsigned long backchain, low_addr, high_addr, ret_addr;
......@@ -109,10 +109,10 @@ void show_trace_task(struct task_struct *tsk)
*/
if (tsk->state == TASK_RUNNING)
return;
show_trace((unsigned long *) tsk->thread.ksp);
show_trace(tsk, (unsigned long *) tsk->thread.ksp);
}
void show_stack(unsigned long *sp)
void show_stack(struct task_struct *task, unsigned long *sp)
{
unsigned long *stack;
int i;
......@@ -132,7 +132,7 @@ void show_stack(unsigned long *sp)
printk("%p ", (void *)*stack++);
}
printk("\n");
show_trace(sp);
show_trace(task, sp);
}
/*
......@@ -140,7 +140,7 @@ void show_stack(unsigned long *sp)
*/
void dump_stack(void)
{
show_stack(0);
show_stack(current, 0);
}
void show_registers(struct pt_regs *regs)
......
......@@ -105,6 +105,4 @@ do { \
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
extern void show_stack(unsigned long * esp);
#endif /* __ASM_HARDIRQ_H */
/*
* include/asm-s390/queue.h
*
* S390 version
* Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
* Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
*
* A little set of queue utilies.
*/
#ifndef __ASM_QUEUE_H
#define __ASM_QUEUE_H
#include <linux/stddef.h>
typedef struct queue
{
struct queue *next;
} queue;
typedef queue list;
typedef struct
{
queue *head;
queue *tail;
} qheader;
static __inline__ void init_queue(qheader *qhead)
{
memset(qhead,0,sizeof(*qhead));
}
static __inline__ void enqueue_tail(qheader *qhead,queue *member)
{
if(member)
{
queue *tail=qhead->tail;
if(tail)
tail->next=member;
else
qhead->head=member;
qhead->tail=member;
member->next=NULL;
}
}
static __inline__ queue *dequeue_head(qheader *qhead)
{
queue *head=qhead->head,*next_head;
if(head)
{
next_head=head->next;
qhead->head=next_head;
if(!next_head)
qhead->tail=NULL;
}
return(head);
}
static __inline__ void init_list(list **lhead)
{
*lhead=NULL;
}
static __inline__ void add_to_list(list **lhead,list *member)
{
member->next=*lhead;
*lhead=member;
}
static __inline__ list *remove_listhead(list **lhead)
{
list *oldhead=*lhead;
if(oldhead)
*lhead=(*lhead)->next;
return(oldhead);
}
static __inline__ void add_to_list_tail(list **lhead,list *member)
{
list *curr,*prev;
if(*lhead==NULL)
*lhead=member;
else
{
prev=*lhead;
for(curr=(*lhead)->next;curr!=NULL;curr=curr->next)
prev=curr;
prev->next=member;
}
}
static __inline__ void add_to_list_tail_null(list **lhead,list *member)
{
member->next=NULL;
add_to_list_tail_null(lhead,member);
}
static __inline__ int is_in_list(list *lhead,list *member)
{
list *curr;
for(curr=lhead;curr!=NULL;curr=curr->next)
if(curr==member)
return(1);
return(0);
}
static __inline__ int get_prev(list *lhead,list *member,list **prev)
{
list *curr;
*prev=NULL;
for(curr=lhead;curr!=NULL;curr=curr->next)
{
if(curr==member)
return(1);
*prev=curr;
}
*prev=NULL;
return(0);
}
static __inline__ int remove_from_list(list **lhead,list *member)
{
list *prev;
if(get_prev(*lhead,member,&prev))
{
if(prev)
prev->next=member->next;
else
*lhead=member->next;
return(1);
}
return(0);
}
static __inline__ int remove_from_queue(qheader *qhead,queue *member)
{
queue *prev;
if(get_prev(qhead->head,(list *)member,(list **)&prev))
{
if(prev)
{
prev->next=member->next;
if(prev->next==NULL)
qhead->tail=prev;
}
else
{
if(qhead->head==qhead->tail)
qhead->tail=NULL;
qhead->head=member->next;
}
return(1);
}
return(0);
}
#endif /* __ASM_QUEUE_H */
......@@ -9,6 +9,10 @@
#ifndef _S390_STATFS_H
#define _S390_STATFS_H
#ifndef __s390x__
#include <asm-generic/statfs.h>
#else
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
......@@ -17,19 +21,25 @@ typedef __kernel_fsid_t fsid_t;
#endif
/*
* This is ugly -- we're already 64-bit clean, so just duplicate the
* definitions.
*/
struct statfs {
#ifndef __s390x__
long f_type;
long f_bsize;
int f_type;
int f_bsize;
long f_blocks;
long f_bfree;
long f_bavail;
long f_files;
long f_ffree;
__kernel_fsid_t f_fsid;
long f_namelen;
long f_spare[6];
#else /* __s390x__ */
int f_namelen;
int f_frsize;
int f_spare[5];
};
struct statfs64 {
int f_type;
int f_bsize;
long f_blocks;
......@@ -39,8 +49,9 @@ struct statfs {
long f_ffree;
__kernel_fsid_t f_fsid;
int f_namelen;
int f_spare[6];
#endif /* __s390x__ */
int f_frsize;
int f_spare[5];
};
#endif /* __s390x__ */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment