Commit 2660f058 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents f44ce2e5 4670ef7a
......@@ -624,8 +624,10 @@ ifneq ($(KBUILD_SRC),)
endif
prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER
ifneq ($(KBUILD_MODULES),)
$(Q)rm -rf $(MODVERDIR)
$(if $(CONFIG_MODULES),$(Q)mkdir -p $(MODVERDIR))
$(Q)mkdir -p $(MODVERDIR)
endif
# All the preparing..
prepare-all: prepare0 prepare
......
......@@ -778,12 +778,16 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
MATCH(DMI_BIOS_DATE, "10/26/01"), NO_MATCH
} },
{ exploding_pnp_bios, "Higraded P14H", { /* BIOSPnP problem */
{ exploding_pnp_bios, "Higraded P14H", { /* PnPBIOS GPF on boot */
MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
MATCH(DMI_BIOS_VERSION, "07.00T"),
MATCH(DMI_SYS_VENDOR, "Higraded"),
MATCH(DMI_PRODUCT_NAME, "P14H")
} },
{ exploding_pnp_bios, "ASUS P4P800", { /* PnPBIOS GPF on boot */
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
MATCH(DMI_BOARD_NAME, "P4P800"),
} },
/* Machines which have problems handling enabled local APICs */
......
......@@ -115,7 +115,7 @@ long sys_sigaltstack(const stack_t *uss, stack_t *uoss, unsigned long r5,
* Set up the sigcontext for the signal frame.
*/
static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
static long setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
int signr, sigset_t *set, unsigned long handler)
{
/* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the
......@@ -129,7 +129,7 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
#ifdef CONFIG_ALTIVEC
elf_vrreg_t *v_regs = (elf_vrreg_t *)(((unsigned long)sc->vmx_reserve) & ~0xful);
#endif
int err = 0;
long err = 0;
if (regs->msr & MSR_FP)
giveup_fpu(current);
......@@ -173,18 +173,32 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
* Restore the sigcontext from the signal frame.
*/
static int restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, struct sigcontext *sc)
static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
struct sigcontext *sc)
{
#ifdef CONFIG_ALTIVEC
elf_vrreg_t *v_regs;
#endif
unsigned int err = 0;
unsigned long err = 0;
unsigned long save_r13;
elf_greg_t *gregs = (elf_greg_t *)regs;
int i;
/* If this is not a signal return, we preserve the TLS in r13 */
if (!sig)
save_r13 = regs->gpr[13];
err |= __copy_from_user(regs, &sc->gp_regs, GP_REGS_SIZE);
/* copy everything before MSR */
err |= __copy_from_user(regs, &sc->gp_regs,
PT_MSR*sizeof(unsigned long));
/* skip MSR and SOFTE */
for (i = PT_MSR+1; i <= PT_RESULT; i++) {
if (i == PT_SOFTE)
continue;
err |= __get_user(gregs[i], &sc->gp_regs[i]);
}
if (!sig)
regs->gpr[13] = save_r13;
err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
......@@ -235,9 +249,10 @@ static inline void * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
/*
* Setup the trampoline code on the stack
*/
static int setup_trampoline(unsigned int syscall, unsigned int *tramp)
static long setup_trampoline(unsigned int syscall, unsigned int *tramp)
{
int i, err = 0;
int i;
long err = 0;
/* addi r1, r1, __SIGNAL_FRAMESIZE # Pop the dummy stackframe */
err |= __put_user(0x38210000UL | (__SIGNAL_FRAMESIZE & 0xffff), &tramp[0]);
......@@ -372,7 +387,7 @@ static void setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
func_descr_t *funct_desc_ptr;
struct rt_sigframe *frame;
unsigned long newsp = 0;
int err = 0;
long err = 0;
frame = get_sigframe(ka, regs, sizeof(*frame));
......
......@@ -185,25 +185,28 @@ static int save_user_regs(struct pt_regs *regs, struct mcontext32 *frame, int si
* Restore the current user register values from the user stack,
* (except for MSR).
*/
static int restore_user_regs(struct pt_regs *regs, struct mcontext32 __user *sr, int sig)
static long restore_user_regs(struct pt_regs *regs,
struct mcontext32 __user *sr, int sig)
{
elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
int i, err = 0;
int i;
long err = 0;
unsigned int save_r2;
#ifdef CONFIG_ALTIVEC
unsigned long msr;
#endif
/*
* restore general registers but not including MSR. Also take
* care of keeping r2 (TLS) intact if not a signal
* restore general registers but not including MSR or SOFTE. Also
* take care of keeping r2 (TLS) intact if not a signal
*/
if (!sig)
save_r2 = (unsigned int)regs->gpr[2];
for (i = 0; i < PT_MSR; i ++)
err |= __get_user(gregs[i], &sr->mc_gregs[i]);
for (i ++; i <= PT_RESULT; i ++)
for (i = 0; i <= PT_RESULT; i++) {
if ((i == PT_MSR) || (i == PT_SOFTE))
continue;
err |= __get_user(gregs[i], &sr->mc_gregs[i]);
}
if (!sig)
regs->gpr[2] = (unsigned long) save_r2;
if (err)
......@@ -427,9 +430,9 @@ long sys32_rt_sigpending(compat_sigset_t *set, compat_size_t sigsetsize)
}
static int copy_siginfo_to_user32(compat_siginfo_t *d, siginfo_t *s)
static long copy_siginfo_to_user32(compat_siginfo_t *d, siginfo_t *s)
{
int err;
long err;
if (!access_ok (VERIFY_WRITE, d, sizeof(*d)))
return -EFAULT;
......
......@@ -434,7 +434,7 @@ pnp_set_current_resources(struct device * dmdev, const char * ubuf, size_t count
goto done;
}
done:
if (retval)
if (retval < 0)
return retval;
return count;
}
......
......@@ -995,7 +995,7 @@ static int isapnp_read_resources(struct pnp_dev *dev, struct pnp_resource_table
res->port_resource[tmp].flags = IORESOURCE_IO;
}
for (tmp = 0; tmp < PNP_MAX_MEM; tmp++) {
ret = isapnp_read_dword(ISAPNP_CFG_MEM + (tmp << 3));
ret = isapnp_read_word(ISAPNP_CFG_MEM + (tmp << 3)) << 8;
if (!ret)
continue;
res->mem_resource[tmp].start = ret;
......
......@@ -452,23 +452,19 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
if (!dev->dependent) {
if (pnp_assign_resources(dev, 0))
return 1;
else
return 0;
} else {
dep = dev->dependent;
do {
if (pnp_assign_resources(dev, i))
return 0;
dep = dep->next;
i++;
} while (dep);
}
dep = dev->dependent;
do {
if (pnp_assign_resources(dev, i))
return 1;
/* if this dependent resource failed, try the next one */
dep = dep->next;
i++;
} while (dep);
pnp_err("Unable to assign resources to device %s.", dev->dev.bus_id);
return 0;
return -EBUSY;
}
/**
......@@ -486,7 +482,7 @@ int pnp_activate_dev(struct pnp_dev *dev)
}
/* ensure resources are allocated */
if (!pnp_auto_config_dev(dev))
if (pnp_auto_config_dev(dev))
return -EBUSY;
if (!pnp_can_write(dev)) {
......
......@@ -139,7 +139,7 @@ static int proc_read_devices(char *buf, char **start, off_t pos,
/* 26 = the number of characters per line sprintf'ed */
if ((p - buf + 26) > count)
break;
if (pnp_bios_get_dev_node(&nodenum, PNPMODE_STATIC, node))
if (pnp_bios_get_dev_node(&nodenum, PNPMODE_DYNAMIC, node))
break;
p += sprintf(p, "%02x\t%08x\t%02x:%02x:%02x\t%04x\n",
node->handle, node->eisa_id,
......
......@@ -505,6 +505,11 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de
switch (tag) {
case LARGE_TAG_ANSISTR:
strncpy(dev->name, p + 3, len >= PNP_NAME_LEN ? PNP_NAME_LEN - 2 : len);
dev->name[len >= PNP_NAME_LEN ? PNP_NAME_LEN - 1 : len] = '\0';
break;
case SMALL_TAG_COMPATDEVID: /* compatible ID */
if (len != 4)
goto len_err;
......
......@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/smp_lock.h>
#include <linux/buffer_head.h>
#include <asm/page.h>
#include "rock.h"
......@@ -358,7 +359,7 @@ int parse_rock_ridge_inode_internal(struct iso_directory_record * de,
return 0;
}
static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr)
static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr, char *plimit)
{
int slen;
int rootflag;
......@@ -370,16 +371,25 @@ static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr)
rootflag = 0;
switch (slp->flags & ~1) {
case 0:
if (slp->len > plimit - rpnt)
return NULL;
memcpy(rpnt, slp->text, slp->len);
rpnt+=slp->len;
break;
case 2:
if (rpnt >= plimit)
return NULL;
*rpnt++='.';
break;
case 4:
if (2 > plimit - rpnt)
return NULL;
*rpnt++='.';
/* fallthru */
case 2:
*rpnt++='.';
break;
case 8:
if (rpnt >= plimit)
return NULL;
rootflag = 1;
*rpnt++='/';
break;
......@@ -396,17 +406,23 @@ static char *get_symlink_chunk(char *rpnt, struct rock_ridge *rr)
* If there is another SL record, and this component
* record isn't continued, then add a slash.
*/
if ((!rootflag) && (rr->u.SL.flags & 1) && !(oldslp->flags & 1))
if ((!rootflag) && (rr->u.SL.flags & 1) &&
!(oldslp->flags & 1)) {
if (rpnt >= plimit)
return NULL;
*rpnt++='/';
}
break;
}
/*
* If this component record isn't continued, then append a '/'.
*/
if (!rootflag && !(oldslp->flags & 1))
if (!rootflag && !(oldslp->flags & 1)) {
if (rpnt >= plimit)
return NULL;
*rpnt++='/';
}
}
return rpnt;
}
......@@ -487,7 +503,10 @@ static int rock_ridge_symlink_readpage(struct file *file, struct page *page)
CHECK_SP(goto out);
break;
case SIG('S', 'L'):
rpnt = get_symlink_chunk(rpnt, rr);
rpnt = get_symlink_chunk(rpnt, rr,
link + (PAGE_SIZE - 1));
if (rpnt == NULL)
goto out;
break;
case SIG('C', 'E'):
/* This tells is if there is a continuation record */
......
......@@ -2977,11 +2977,12 @@ int jfs_sync(void *arg)
anon_inode_list);
ip = &jfs_ip->vfs_inode;
/*
* down_trylock returns 0 on success. This is
* inconsistent with spin_trylock.
*/
if (! down_trylock(&jfs_ip->commit_sem)) {
if (! igrab(ip)) {
/*
* Inode is being freed
*/
list_del_init(&jfs_ip->anon_inode_list);
} else if (! down_trylock(&jfs_ip->commit_sem)) {
/*
* inode will be removed from anonymous list
* when it is committed
......@@ -2991,6 +2992,8 @@ int jfs_sync(void *arg)
rc = txCommit(tid, 1, &ip, 0);
txEnd(tid);
up(&jfs_ip->commit_sem);
iput(ip);
/*
* Just to be safe. I don't know how
* long we can run without blocking
......@@ -3010,6 +3013,10 @@ int jfs_sync(void *arg)
/* Put on anon_list2 */
list_add(&jfs_ip->anon_inode_list,
&TxAnchor.anon_list2);
TXN_UNLOCK();
iput(ip);
TXN_LOCK();
}
}
/* Add anon_list2 back to anon_list */
......
......@@ -182,7 +182,7 @@ static void rcu_offline_cpu(int cpu)
* it here
*/
spin_lock_irq(&rcu_ctrlblk.mutex);
if (!rcu_ctrlblk.rcu_cpu_mask)
if (cpus_empty(rcu_ctrlblk.rcu_cpu_mask))
goto unlock;
cpu_clear(cpu, rcu_ctrlblk.rcu_cpu_mask);
......
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