Commit b2de2046 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/linux-2.5_work
parents f4e1c439 0e4d147b
......@@ -113,10 +113,6 @@ _GLOBAL(DoSyscall)
clrldi r4,r4,32
clrldi r5,r5,32
clrldi r6,r6,32
#if 0 /* XXX Why not ??? - Anton */
clrldi r7,r7,32
clrldi r8,r8,32
#endif
b 17f
15:
#endif
......@@ -187,10 +183,6 @@ _GLOBAL(ret_from_syscall_1)
clrldi r4,r4,32
clrldi r5,r5,32
clrldi r6,r6,32
#if 0 /* XXX Why not ??? - Anton */
clrldi r7,r7,32
clrldi r8,r8,32
#endif
b 57f
55:
#endif
......
......@@ -410,11 +410,13 @@ static irq_balance_t irq_balance[NR_IRQS] __cacheline_aligned
= { [ 0 ... NR_IRQS-1 ] = { 0, 0 } };
#define IDLE_ENOUGH(cpu,now) \
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > ((HZ/100)+1)))
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1))
#define IRQ_ALLOWED(cpu,allowed_mask) \
((1 << cpu) & (allowed_mask))
#define IRQ_BALANCE_INTERVAL (HZ/50)
static unsigned long move(unsigned long curr_cpu, unsigned long allowed_mask,
unsigned long now, int direction)
{
......@@ -447,8 +449,9 @@ static inline void balance_irq(int irq)
irq_balance_t *entry = irq_balance + irq;
unsigned long now = jiffies;
if (unlikely(entry->timestamp != now)) {
if (unlikely(time_after(now, entry->timestamp + IRQ_BALANCE_INTERVAL))) {
unsigned long allowed_mask;
unsigned int new_cpu;
unsigned long random_number;
if (!irq_desc[irq].handler->set_affinity)
......@@ -459,8 +462,11 @@ static inline void balance_irq(int irq)
allowed_mask = cpu_online_map & irq_affinity[irq];
entry->timestamp = now;
entry->cpu = move(entry->cpu, allowed_mask, now, random_number);
irq_desc[irq].handler->set_affinity(irq, 1 << entry->cpu);
new_cpu = move(entry->cpu, allowed_mask, now, random_number);
if (entry->cpu != new_cpu) {
entry->cpu = new_cpu;
irq_desc[irq].handler->set_affinity(irq, 1 << new_cpu);
}
}
}
#else
......
This diff is collapsed.
......@@ -78,14 +78,12 @@ rtas_read_config_##size(struct device_node *dn, int offset, type val) { \
\
if (dn == NULL) { \
ret = -2; \
} else if (dn->status) { \
ret = -1; \
} else { \
addr = (dn->busno << 16) | (dn->devfn << 8) | offset; \
buid = dn->phb->buid; \
if (buid) { \
ret = rtas_call(ibm_read_pci_config, 4, 2, &returnval, addr, buid >> 32, buid & 0xffffffff, nbytes); \
if (ret < 0) \
if (ret < 0|| (returnval == 0xffffffff)) \
ret = rtas_fake_read(dn, offset, nbytes, &returnval); \
} else { \
ret = rtas_call(read_pci_config, 2, 2, &returnval, addr, nbytes); \
......@@ -111,8 +109,6 @@ rtas_write_config_##size(struct device_node *dn, int offset, type val) { \
\
if (dn == NULL) { \
ret = -2; \
} else if (dn->status) { \
ret = -1; \
} else { \
buid = dn->phb->buid; \
addr = (dn->busno << 16) | (dn->devfn << 8) | offset; \
......
......@@ -19,16 +19,13 @@
#include <linux/irq.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <asm/page.h>
#include <asm/semaphore.h>
#include <asm/processor.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#if 0
#include <linux/ide.h>
#include <asm/ide.h>
#endif
#include <asm/atomic.h>
#include <asm/bitops.h>
#include <asm/checksum.h>
......@@ -41,7 +38,6 @@
#include <asm/machdep.h>
#include <asm/hw_irq.h>
#include <asm/abs_addr.h>
#include <asm/smplock.h>
#include <asm/cacheflush.h>
#ifdef CONFIG_PPC_ISERIES
#include <asm/iSeries/iSeries_pci.h>
......
......@@ -259,19 +259,19 @@ int get_fpexc_mode(struct task_struct *tsk, unsigned long adr)
return put_user(val, (unsigned int *) adr);
}
int sys_clone(int p1, int p2, int p3, int p4, int p5, int p6,
struct pt_regs *regs)
int sys_clone(unsigned long clone_flags, u32 p2, u32 p3, u32 p4, u32 p5,
u32 p6, struct pt_regs *regs)
{
struct task_struct *p;
if (regs->msr & MSR_FP)
giveup_fpu(current);
p = do_fork(p1 & ~CLONE_IDLETASK, regs->gpr[1], regs, 0);
p = do_fork(clone_flags & ~CLONE_IDLETASK, regs->gpr[1], regs, 0);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
int sys_fork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
struct pt_regs *regs)
{
struct task_struct *p;
......@@ -283,8 +283,8 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
struct pt_regs *regs)
int sys_vfork(u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
struct pt_regs *regs)
{
struct task_struct *p;
......
......@@ -44,14 +44,10 @@ _GLOBAL(sys32_getsockopt)
clrldi r7, r7, 32 /* int *optlen parm */
b .sys_getsockopt
_GLOBAL(sys32_bdflush)
extsw r4,r4 /* sign extend long data parm */
b .sys_bdflush
_GLOBAL(sys32_mmap2)
_GLOBAL(ppc32_mmap2)
clrldi r7, r7, 32 /* unsigned long fd parm */
extsw r8, r8 /* off_t offset */
b .sys_mmap
clrldi r8, r8, 32 /* unsigned long pgoff */
b .sys32_mmap2
_GLOBAL(sys32_socketcall) /* r3=call, r4=args */
cmpwi r3, 1
......
This diff is collapsed.
......@@ -128,7 +128,6 @@ struct device_node {
int busno; /* for pci devices */
int devfn; /* for pci devices */
struct pci_controller *phb; /* for pci devices */
int status; /* current status of device */
struct TceTable *tce_table; /* for phb's or bridges */
#define DN_STATUS_BIST_FAILED (1<<0)
struct property *properties;
......
......@@ -235,6 +235,7 @@
#define __NR_sched_getaffinity 223
#define __NR_security 224
#define __NR_tuxcall 225
#define __NR_sendfile64 226
#define __NR(n) #n
......
#ifndef __LINUX_PREEMPT_H
#define __LINUX_PREEMPT_H
/*
* include/linux/preempt.h - macros for accessing and manipulating
* preempt_count (used for kernel preemption, interrupt count, etc.)
*/
#include <linux/config.h>
#define preempt_count() (current_thread_info()->preempt_count)
#define preempt_count() (current_thread_info()->preempt_count)
#define inc_preempt_count() \
do { \
......@@ -36,16 +31,17 @@ do { \
barrier(); \
} while (0)
#define preempt_check_resched() \
#define preempt_enable() \
do { \
preempt_enable_no_resched(); \
if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
preempt_schedule(); \
} while (0)
#define preempt_enable() \
#define preempt_check_resched() \
do { \
preempt_enable_no_resched(); \
preempt_check_resched(); \
if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
preempt_schedule(); \
} while (0)
#define inc_preempt_count_non_preempt() do { } while (0)
......@@ -54,7 +50,7 @@ do { \
#else
#define preempt_disable() do { } while (0)
#define preempt_enable_no_resched() do { } while (0)
#define preempt_enable_no_resched() do {} while(0)
#define preempt_enable() do { } while (0)
#define preempt_check_resched() do { } while (0)
......
This diff is collapsed.
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