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