Hi Linus,
s390 fixes for 2.5.27:
* designated initializer rework from Rusty Russell
* add sys_security system call
* smp_num_cpus adaptions
* link order in drivers/s390 to make cio get initialised first
* replace kdev_t in dasd driver structures by bdev pointer
* pass bdev pointer instead of a inode pointer in dasd ioctls
* replace tq_immediate by tasklet in con3215, ctctty and iucv
* add missing include statements
* remove xpram_release
* ## C-preprocessor magic in cio
* define USER_HZ
* add hweight64 in bitops
* fix typo in switch_to
blue skies,
Martin.
diff -urN linux-2.5.27/arch/s390/kernel/debug.c linux-2.5.27-s390/arch/s390/kernel/debug.c
--- linux-2.5.27/arch/s390/kernel/debug.c Sat Jul 20 21:11:08 2002
+++ linux-2.5.27-s390/arch/s390/kernel/debug.c Mon Jul 22 19:36:37 2002
@@ -149,10 +149,10 @@
static int initialized = 0;
static struct file_operations debug_file_ops = {
- read: debug_output,
- write: debug_input,
- open: debug_open,
- release: debug_close,
+ .read = debug_output,
+ .write = debug_input,
+ .open = debug_open,
+ .release = debug_close,
};
static struct proc_dir_entry *debug_proc_root_entry;
diff -urN linux-2.5.27/arch/s390/kernel/entry.S linux-2.5.27-s390/arch/s390/kernel/entry.S
--- linux-2.5.27/arch/s390/kernel/entry.S Sat Jul 20 21:11:10 2002
+++ linux-2.5.27-s390/arch/s390/kernel/entry.S Mon Jul 22 18:30:51 2002
@@ -581,7 +581,8 @@
.long sys_futex
.long sys_sched_setaffinity
.long sys_sched_getaffinity /* 240 */
- .rept 255-240
+ .long sys_security
+ .rept 255-241
.long sys_ni_syscall
.endr
diff -urN linux-2.5.27/arch/s390/kernel/irq.c linux-2.5.27-s390/arch/s390/kernel/irq.c
--- linux-2.5.27/arch/s390/kernel/irq.c Sat Jul 20 21:11:19 2002
+++ linux-2.5.27-s390/arch/s390/kernel/irq.c Mon Jul 22 18:42:28 2002
@@ -66,8 +66,9 @@
seq_puts(p, " ");
- for (j=0; j<smp_num_cpus; j++)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; j<NR_CPUS; j++)
+ if (cpu_online(j))
+ seq_printf(p, "CPU%d ",j);
seq_putc(p, '\n');
diff -urN linux-2.5.27/arch/s390/kernel/ptrace.c linux-2.5.27-s390/arch/s390/kernel/ptrace.c
--- linux-2.5.27/arch/s390/kernel/ptrace.c Sat Jul 20 21:11:13 2002
+++ linux-2.5.27-s390/arch/s390/kernel/ptrace.c Mon Jul 22 18:30:51 2002
@@ -227,6 +227,9 @@
/* are we already being traced? */
if (current->ptrace & PT_PTRACED)
goto out;
+ ret = security_ops->ptrace(current->parent, current);
+ if (ret)
+ goto out;
/* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED;
ret = 0;
diff -urN linux-2.5.27/arch/s390/kernel/setup.c linux-2.5.27-s390/arch/s390/kernel/setup.c
--- linux-2.5.27/arch/s390/kernel/setup.c Sat Jul 20 21:11:07 2002
+++ linux-2.5.27-s390/arch/s390/kernel/setup.c Mon Jul 22 19:36:37 2002
@@ -524,7 +524,7 @@
seq_printf(m, "vendor_id : IBM/S390\n"
"# processors : %i\n"
"bogomips per cpu: %lu.%02lu\n",
- smp_num_cpus, loops_per_jiffy/(500000/HZ),
+ num_online_cpus(), loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ))%100);
}
if (cpu_online_map & (1 << n)) {
@@ -553,8 +553,8 @@
{
}
struct seq_operations cpuinfo_op = {
- start: c_start,
- next: c_next,
- stop: c_stop,
- show: show_cpuinfo,
+ .start = c_start,
+ .next = c_next,
+ .stop = c_stop,
+ .show = show_cpuinfo,
};
diff -urN linux-2.5.27/arch/s390/kernel/smp.c linux-2.5.27-s390/arch/s390/kernel/smp.c
--- linux-2.5.27/arch/s390/kernel/smp.c Sat Jul 20 21:11:04 2002
+++ linux-2.5.27-s390/arch/s390/kernel/smp.c Mon Jul 22 18:30:51 2002
@@ -48,7 +48,6 @@
* An array with a pointer the lowcore of every CPU.
*/
static int max_cpus = NR_CPUS; /* Setup configured maximum number of CPUs to activate */
-int smp_num_cpus;
struct _lowcore *lowcore_ptr[NR_CPUS];
cycles_t cacheflush_time=0;
int smp_threads_ready=0; /* Set when the idlers are all forked. */
@@ -150,7 +149,7 @@
*/
{
struct call_data_struct data;
- int cpus = smp_num_cpus-1;
+ int cpus = num_online_cpus()-1;
if (!cpus || !atomic_read(&smp_commenced))
return 0;
@@ -185,8 +184,8 @@
int i, rc;
/* stop all processors */
- for (i = 0; i < smp_num_cpus; i++) {
- if (smp_processor_id() == i)
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i) || smp_processor_id() == i)
continue;
do {
rc = signal_processor_ps(&dummy, 0, i, sigp_stop);
@@ -201,8 +200,8 @@
int i, rc;
/* store status of all processors in their lowcores (real 0) */
- for (i = 0; i < smp_num_cpus; i++) {
- if (smp_processor_id() == i)
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i) || smp_processor_id() == i)
continue;
low_core_addr = (unsigned long)get_cpu_lowcore(i);
do {
@@ -347,8 +346,8 @@
struct _lowcore *lowcore;
int i;
- for (i = 0; i < smp_num_cpus; i++) {
- if (smp_processor_id() == i)
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i) || smp_processor_id() == i)
continue;
lowcore = get_cpu_lowcore(i);
/*
@@ -459,24 +458,24 @@
void smp_count_cpus(void)
{
- int curr_cpu;
+ int curr_cpu, num_cpus;
current_thread_info()->cpu = 0;
- smp_num_cpus = 1;
+ num_cpus = 1;
phys_cpu_present_map = 1;
cpu_online_map = 1;
for (curr_cpu = 0;
- curr_cpu <= 65535 && smp_num_cpus < max_cpus; curr_cpu++) {
+ curr_cpu <= 65535 && num_cpus < max_cpus; curr_cpu++) {
if ((__u16) curr_cpu == boot_cpu_addr)
continue;
- __cpu_logical_map[smp_num_cpus] = (__u16) curr_cpu;
- if (signal_processor(smp_num_cpus, sigp_sense) ==
+ __cpu_logical_map[num_cpus] = (__u16) curr_cpu;
+ if (signal_processor(num_cpus, sigp_sense) ==
sigp_not_operational)
continue;
- set_bit(smp_num_cpus, &phys_cpu_present_map);
- smp_num_cpus++;
+ set_bit(num_cpus, &phys_cpu_present_map);
+ num_cpus++;
}
- printk("Detected %d CPU's\n",(int) smp_num_cpus);
+ printk("Detected %d CPU's\n",(int) num_cpus);
printk("Boot cpu address %2X\n", boot_cpu_addr);
}
@@ -591,7 +590,9 @@
*/
print_cpu_info(&safe_get_cpu_lowcore(0)->cpu_data);
- for(i = 0; i < smp_num_cpus; i++) {
+ for(i = 0; i < NR_CPUS; i++) {
+ if (!test_bit(i, &phys_cpu_present_map))
+ continue;
lowcore_ptr[i] = (struct _lowcore *)
__get_free_page(GFP_KERNEL|GFP_DMA);
async_stack = __get_free_pages(GFP_KERNEL,1);
@@ -637,5 +638,4 @@
EXPORT_SYMBOL(kernel_flag);
EXPORT_SYMBOL(smp_ctl_set_bit);
EXPORT_SYMBOL(smp_ctl_clear_bit);
-EXPORT_SYMBOL(smp_num_cpus);
EXPORT_SYMBOL(smp_call_function);
diff -urN linux-2.5.27/arch/s390/mm/fault.c linux-2.5.27-s390/arch/s390/mm/fault.c
--- linux-2.5.27/arch/s390/mm/fault.c Sat Jul 20 21:11:32 2002
+++ linux-2.5.27-s390/arch/s390/mm/fault.c Mon Jul 22 18:30:51 2002
@@ -234,16 +234,18 @@
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, error_code == 4)) {
- case 1:
+ case VM_FAULT_MINOR:
tsk->min_flt++;
break;
- case 2:
+ case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
- case 0:
+ case VM_FAULT_SIGBUS:
goto do_sigbus;
- default:
+ case VM_FAULT_OOM:
goto out_of_memory;
+ default:
+ BUG();
}
up_read(&mm->mmap_sem);
diff -urN linux-2.5.27/arch/s390x/kernel/debug.c linux-2.5.27-s390/arch/s390x/kernel/debug.c
--- linux-2.5.27/arch/s390x/kernel/debug.c Sat Jul 20 21:11:08 2002
+++ linux-2.5.27-s390/arch/s390x/kernel/debug.c Mon Jul 22 19:36:37 2002
@@ -149,10 +149,10 @@
static int initialized = 0;
static struct file_operations debug_file_ops = {
- read: debug_output,
- write: debug_input,
- open: debug_open,
- release: debug_close,
+ .read = debug_output,
+ .write = debug_input,
+ .open = debug_open,
+ .release = debug_close,
};
static struct proc_dir_entry *debug_proc_root_entry;
diff -urN linux-2.5.27/arch/s390x/kernel/entry.S linux-2.5.27-s390/arch/s390x/kernel/entry.S
--- linux-2.5.27/arch/s390x/kernel/entry.S Sat Jul 20 21:11:11 2002
+++ linux-2.5.27-s390/arch/s390x/kernel/entry.S Mon Jul 22 18:30:51 2002
@@ -612,7 +612,8 @@
.long SYSCALL(sys_futex,sys32_futex_wrapper)
.long SYSCALL(sys_sched_setaffinity,sys32_sched_setaffinity_wrapper)
.long SYSCALL(sys_sched_getaffinity,sys32_sched_getaffinity_wrapper)
- .rept 255-240
+ .long SYSCALL(sys_security, sys_ni_syscall)
+ .rept 255-241
.long SYSCALL(sys_ni_syscall,sys_ni_syscall)
.endr
diff -urN linux-2.5.27/arch/s390x/kernel/irq.c linux-2.5.27-s390/arch/s390x/kernel/irq.c
--- linux-2.5.27/arch/s390x/kernel/irq.c Sat Jul 20 21:12:29 2002
+++ linux-2.5.27-s390/arch/s390x/kernel/irq.c Mon Jul 22 18:43:02 2002
@@ -66,8 +66,9 @@
seq_puts(p, " ");
- for (j=0; j<smp_num_cpus; j++)
- seq_printf(p, "CPU%d ",j);
+ for (j=0; j<NR_CPUS; j++)
+ if (cpu_online(i))
+ seq_printf(p, "CPU%d ",j);
seq_putc(p, '\n');
diff -urN linux-2.5.27/arch/s390x/kernel/linux32.c linux-2.5.27-s390/arch/s390x/kernel/linux32.c
--- linux-2.5.27/arch/s390x/kernel/linux32.c Sat Jul 20 21:11:10 2002
+++ linux-2.5.27-s390/arch/s390x/kernel/linux32.c Mon Jul 22 18:30:51 2002
@@ -514,16 +514,15 @@
if (!p)
return -ENOMEM;
+ err = -EINVAL;
if (second > MSGMAX || first < 0 || second < 0)
- return -EINVAL;
+ goto out;
err = -EFAULT;
if (!uptr)
goto out;
-
- err = get_user (p->mtype, &up->mtype);
- err |= __copy_from_user (p->mtext, &up->mtext, second);
- if (err)
+ if (get_user (p->mtype, &up->mtype) ||
+ __copy_from_user (p->mtext, &up->mtext, second))
goto out;
old_fs = get_fs ();
set_fs (KERNEL_DS);
diff
...
read more »