Commit 01a23862 authored by Richard Russon's avatar Richard Russon

Merge ssh://linux-ntfs@bkbits.net/ntfs-2.6

into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6
parents 836f98df 9c4ffb34
......@@ -390,7 +390,8 @@ static unsigned int find_physical_cpu_to_start(unsigned int old_hwindex)
static inline int __devinit smp_startup_cpu(unsigned int lcpu)
{
int status;
unsigned long start_here = __pa(pseries_secondary_smp_init);
unsigned long start_here = __pa((u32)*((unsigned long *)
pseries_secondary_smp_init));
unsigned int pcpu;
/* At boot time the cpus are already spinning in hold
......
......@@ -43,7 +43,6 @@ ENTRY(swsusp_arch_resume)
movq mmu_cr4_features(%rip), %rax
movq %rax, %rdx
andq $~(1<<7), %rdx # PGE
movq %rdx, %cr4; # turn off PGE
movq %cr3, %rcx; # flush TLB
......@@ -52,16 +51,16 @@ ENTRY(swsusp_arch_resume)
movl nr_copy_pages(%rip), %eax
xorl %ecx, %ecx
movq $0, loop(%rip)
movq $0, %r10
testl %eax, %eax
je .L108
jz done
.L105:
xorl %esi, %esi
movq $0, loop2(%rip)
movq $0, %r11
jmp .L104
.p2align 4,,7
.L111:
movq loop(%rip), %rcx
copy_one_page:
movq %r10, %rcx
.L104:
movq pagedir_nosave(%rip), %rdx
movq %rcx, %rax
......@@ -74,24 +73,23 @@ ENTRY(swsusp_arch_resume)
movq %cr3, %rax; # flush TLB
movq %rax, %cr3;
movq loop2(%rip), %rax
movq %r11, %rax
incq %rax
cmpq $4095, %rax
movq %rax, %rsi
movq %rax, loop2(%rip)
jbe .L111
movq loop(%rip), %rax
movq %rax, %r11
jbe copy_one_page
movq %r10, %rax
incq %rax
movq %rax, %rcx
movq %rax, loop(%rip)
movq %rax, %r10
mov nr_copy_pages(%rip), %eax
cmpq %rax, %rcx
jb .L105
.L108:
.align 4
done:
movl $24, %eax
movl %eax, %ds
movq saved_context_esp(%rip), %rsp
movq saved_context_ebp(%rip), %rbp
movq saved_context_eax(%rip), %rax
......@@ -111,10 +109,3 @@ ENTRY(swsusp_arch_resume)
pushq saved_context_eflags(%rip) ; popfq
call swsusp_restore
ret
.section .data.nosave
loop:
.quad 0
loop2:
.quad 0
.previous
......@@ -235,6 +235,8 @@ firmware_data_write(struct kobject *kobj,
struct firmware *fw;
ssize_t retval;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
down(&fw_lock);
fw = fw_priv->fw;
if (test_bit(FW_STATUS_DONE, &fw_priv->status)) {
......
......@@ -1778,7 +1778,7 @@ static struct pci_driver agp_intel_pci_driver = {
.name = "agpgart-intel",
.id_table = agp_intel_pci_table,
.probe = agp_intel_probe,
.remove = agp_intel_remove,
.remove = __devexit_p(agp_intel_remove),
.resume = agp_intel_resume,
};
......
......@@ -604,6 +604,8 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
spin_unlock(&shared->lock);
}
}
} else {
spin_unlock(&shared->lock);
}
switch(chip->oldstate) {
......
......@@ -5,6 +5,10 @@
#define FASTCALL(x) x __attribute__((regparm(3)))
#define fastcall __attribute__((regparm(3)))
#ifdef CONFIG_REGPARM
# define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
#endif
#ifdef CONFIG_X86_ALIGNMENT_16
#define __ALIGN .align 16,0x90
#define __ALIGN_STR ".align 16,0x90"
......
......@@ -14,6 +14,10 @@
#define asmlinkage CPP_ASMLINKAGE
#endif
#ifndef prevent_tail_call
# define prevent_tail_call(ret) do { } while (0)
#endif
#ifndef __ALIGN
#define __ALIGN .align 4,0x90
#define __ALIGN_STR ".align 4,0x90"
......
......@@ -1376,6 +1376,8 @@ asmlinkage long sys_waitid(int which, pid_t pid,
struct siginfo __user *infop, int options,
struct rusage __user *ru)
{
long ret;
if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
return -EINVAL;
if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
......@@ -1398,15 +1400,25 @@ asmlinkage long sys_waitid(int which, pid_t pid,
return -EINVAL;
}
return do_wait(pid, options, infop, NULL, ru);
ret = do_wait(pid, options, infop, NULL, ru);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
int options, struct rusage __user *ru)
{
long ret;
if (options & ~(WNOHANG|WUNTRACED|__WNOTHREAD|__WCLONE|__WALL))
return -EINVAL;
return do_wait(pid, options | WEXITED, NULL, stat_addr, ru);
ret = do_wait(pid, options | WEXITED, NULL, stat_addr, ru);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
#ifdef __ARCH_WANT_SYS_WAITPID
......
......@@ -181,7 +181,7 @@ static int shrink_slab(unsigned long scanned, unsigned int gfp_mask,
struct shrinker *shrinker;
if (scanned == 0)
return 0;
scanned = SWAP_CLUSTER_MAX;
if (!down_read_trylock(&shrinker_rwsem))
return 0;
......@@ -1065,7 +1065,8 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages)
total_reclaimed += sc.nr_reclaimed;
if (zone->all_unreclaimable)
continue;
if (zone->pages_scanned > zone->present_pages * 2)
if (zone->pages_scanned >= (zone->nr_active +
zone->nr_inactive) * 4)
zone->all_unreclaimable = 1;
/*
* If we've done a decent amount of scanning and
......@@ -1102,8 +1103,10 @@ static int balance_pgdat(pg_data_t *pgdat, int nr_pages)
zone->prev_priority = zone->temp_priority;
}
if (!all_zones_ok)
if (!all_zones_ok) {
cond_resched();
goto loop_again;
}
return total_reclaimed;
}
......
......@@ -246,7 +246,7 @@ gss_parse_init_downcall(struct gss_api_mech *gm, struct xdr_netobj *buf,
spin_lock_init(&ctx->gc_seq_lock);
atomic_set(&ctx->count,1);
if (simple_get_bytes(&p, end, uid, sizeof(uid)))
if (simple_get_bytes(&p, end, uid, sizeof(*uid)))
goto err_free_ctx;
/* FIXME: discarded timeout for now */
if (simple_get_bytes(&p, end, &timeout, sizeof(timeout)))
......
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