Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190068
b: refs/heads/master
c: 35f2a59
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Apr 20, 2010
1 parent f308ed5 commit 09128d5
Show file tree
Hide file tree
Showing 30 changed files with 197 additions and 288 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 083fd8b21a13742b37ab347089c73f895a896672
refs/heads/master: 35f2a591192d0a5d9f7fc696869c76f0b8e49c3d
4 changes: 2 additions & 2 deletions trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 34
EXTRAVERSION = -rc5
NAME = Sheep on Meth
EXTRAVERSION = -rc4
NAME = Man-Eating Seals of Antiquity

# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/include/asm/thread_info_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ struct thread_info {
#define THREAD_SHIFT PAGE_SHIFT
#endif /* PAGE_SHIFT == 13 */

#define PREEMPT_ACTIVE 0x10000000
#define PREEMPT_ACTIVE 0x4000000

/*
* macros/functions for gaining access to the thread information structure
Expand Down
20 changes: 18 additions & 2 deletions trunk/arch/sparc/kernel/irq_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/seq_file.h>
#include <linux/ftrace.h>
#include <linux/irq.h>
#include <linux/kmemleak.h>

#include <asm/ptrace.h>
#include <asm/processor.h>
Expand All @@ -47,7 +46,6 @@

#include "entry.h"
#include "cpumap.h"
#include "kstack.h"

#define NUM_IVECS (IMAP_INR + 1)

Expand Down Expand Up @@ -714,6 +712,24 @@ void ack_bad_irq(unsigned int virt_irq)
void *hardirq_stack[NR_CPUS];
void *softirq_stack[NR_CPUS];

static __attribute__((always_inline)) void *set_hardirq_stack(void)
{
void *orig_sp, *sp = hardirq_stack[smp_processor_id()];

__asm__ __volatile__("mov %%sp, %0" : "=r" (orig_sp));
if (orig_sp < sp ||
orig_sp > (sp + THREAD_SIZE)) {
sp += THREAD_SIZE - 192 - STACK_BIAS;
__asm__ __volatile__("mov %0, %%sp" : : "r" (sp));
}

return orig_sp;
}
static __attribute__((always_inline)) void restore_hardirq_stack(void *orig_sp)
{
__asm__ __volatile__("mov %0, %%sp" : : "r" (orig_sp));
}

void __irq_entry handler_irq(int irq, struct pt_regs *regs)
{
unsigned long pstate, bucket_pa;
Expand Down
19 changes: 0 additions & 19 deletions trunk/arch/sparc/kernel/kstack.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,4 @@ static inline bool kstack_is_trap_frame(struct thread_info *tp, struct pt_regs *

}

static inline __attribute__((always_inline)) void *set_hardirq_stack(void)
{
void *orig_sp, *sp = hardirq_stack[smp_processor_id()];

__asm__ __volatile__("mov %%sp, %0" : "=r" (orig_sp));
if (orig_sp < sp ||
orig_sp > (sp + THREAD_SIZE)) {
sp += THREAD_SIZE - 192 - STACK_BIAS;
__asm__ __volatile__("mov %0, %%sp" : : "r" (sp));
}

return orig_sp;
}

static inline __attribute__((always_inline)) void restore_hardirq_stack(void *orig_sp)
{
__asm__ __volatile__("mov %0, %%sp" : : "r" (orig_sp));
}

#endif /* _KSTACK_H */
7 changes: 0 additions & 7 deletions trunk/arch/sparc/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <asm/ptrace.h>
#include <asm/pcr.h>

#include "kstack.h"

/* We don't have a real NMI on sparc64, but we can fake one
* up using profiling counter overflow interrupts and interrupt
* levels.
Expand Down Expand Up @@ -94,16 +92,13 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
{
unsigned int sum, touched = 0;
void *orig_sp;

clear_softint(1 << irq);

local_cpu_data().__nmi_count++;

nmi_enter();

orig_sp = set_hardirq_stack();

if (notify_die(DIE_NMI, "nmi", regs, 0,
pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP)
touched = 1;
Expand All @@ -129,8 +124,6 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
pcr_ops->write(pcr_enable);
}

restore_hardirq_stack(orig_sp);

nmi_exit();
}

Expand Down
12 changes: 1 addition & 11 deletions trunk/arch/sparc/kernel/rtrap_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,7 @@ rtrap_xcall:
nop
call trace_hardirqs_on
nop
/* Do not actually set the %pil here. We will do that
* below after we clear PSTATE_IE in the %pstate register.
* If we re-enable interrupts here, we can recurse down
* the hardirq stack potentially endlessly, causing a
* stack overflow.
*
* It is tempting to put this test and trace_hardirqs_on
* call at the 'rt_continue' label, but that will not work
* as that path hits unconditionally and we do not want to
* execute this in NMI return paths, for example.
*/
wrpr %l4, %pil
#endif
rtrap_no_irq_enable:
andcc %l1, TSTATE_PRIV, %l3
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sparc/kernel/unaligned_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static inline enum direction decode_direction(unsigned int insn)
}

/* 16 = double-word, 8 = extra-word, 4 = word, 2 = half-word */
static inline int decode_access_size(struct pt_regs *regs, unsigned int insn)
static inline int decode_access_size(unsigned int insn)
{
unsigned int tmp;

Expand All @@ -66,7 +66,7 @@ static inline int decode_access_size(struct pt_regs *regs, unsigned int insn)
return 2;
else {
printk("Impossible unaligned trap. insn=%08x\n", insn);
die_if_kernel("Byte sized unaligned access?!?!", regs);
die_if_kernel("Byte sized unaligned access?!?!", current_thread_info()->kregs);

/* GCC should never warn that control reaches the end
* of this function without returning a value because
Expand Down Expand Up @@ -286,7 +286,7 @@ static void log_unaligned(struct pt_regs *regs)
asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn)
{
enum direction dir = decode_direction(insn);
int size = decode_access_size(regs, insn);
int size = decode_access_size(insn);
int orig_asi, asi;

current_thread_info()->kern_una_regs = regs;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/sparc/lib/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mcount:
cmp %g1, %g2
be,pn %icc, 1f
mov %i7, %g3
save %sp, -176, %sp
save %sp, -128, %sp
mov %g3, %o1
jmpl %g1, %o7
mov %i7, %o0
Expand All @@ -56,7 +56,7 @@ mcount:
nop
5: mov %i7, %g2
mov %fp, %g3
save %sp, -176, %sp
save %sp, -128, %sp
mov %g2, %l0
ba,pt %xcc, ftrace_graph_caller
mov %g3, %l1
Expand Down Expand Up @@ -85,7 +85,7 @@ ftrace_caller:
lduw [%g1 + %lo(function_trace_stop)], %g1
brnz,pn %g1, ftrace_stub
mov %fp, %g3
save %sp, -176, %sp
save %sp, -128, %sp
mov %g2, %o1
mov %g2, %l0
mov %g3, %l1
Expand Down Expand Up @@ -120,7 +120,7 @@ ENTRY(ftrace_graph_caller)
END(ftrace_graph_caller)

ENTRY(return_to_handler)
save %sp, -176, %sp
save %sp, -128, %sp
call ftrace_return_to_handler
mov %fp, %o0
jmpl %o0 + 8, %g0
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/ia32/ia32entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ ia32_sys_call_table:
.quad stub32_sigreturn
.quad stub32_clone /* 120 */
.quad sys_setdomainname
.quad sys_newuname
.quad sys_uname
.quad sys_modify_ldt
.quad compat_sys_adjtimex
.quad sys32_mprotect /* 125 */
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/x86/kernel/dumpstack.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :)
#endif

#include <linux/uaccess.h>

extern void
show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
unsigned long *stack, unsigned long bp, char *log_lvl);
Expand Down Expand Up @@ -44,10 +42,8 @@ static inline unsigned long rewind_frame_pointer(int n)
get_bp(frame);

#ifdef CONFIG_FRAME_POINTER
while (n--) {
if (probe_kernel_address(&frame->next_frame, frame))
break;
}
while (n--)
frame = frame->next_frame;
#endif

return (unsigned long)frame;
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/char/pcmcia/cm4000_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,16 +1026,14 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,

xoutb(0, REG_FLAGS1(iobase)); /* clear detectCMM */
/* last check before exit */
if (!io_detect_cm4000(iobase, dev)) {
rc = -ENODEV;
goto release_io;
}
if (!io_detect_cm4000(iobase, dev))
count = -ENODEV;

if (test_bit(IS_INVREV, &dev->flags) && count > 0)
str_invert_revert(dev->rbuf, count);

if (copy_to_user(buf, dev->rbuf, count))
rc = -EFAULT;
return -EFAULT;

release_io:
clear_bit(LOCK_IO, &dev->flags);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/drm_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ void drm_put_dev(struct drm_device *dev)
}
driver = dev->driver;

drm_vblank_cleanup(dev);

drm_lastclose(dev);

if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) &&
Expand All @@ -535,8 +537,6 @@ void drm_put_dev(struct drm_device *dev)
dev->agp = NULL;
}

drm_vblank_cleanup(dev);

list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
drm_rmmap(dev, r_list->map);
drm_ht_remove(&dev->map_hash);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/isdn/gigaset/gigaset.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/ctype.h>
Expand Down
19 changes: 7 additions & 12 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,8 @@ static sector_t raid5_compute_sector(raid5_conf_t *conf, sector_t r_sector,
int previous, int *dd_idx,
struct stripe_head *sh)
{
long stripe;
unsigned long chunk_number;
sector_t stripe;
sector_t chunk_number;
unsigned int chunk_offset;
int pd_idx, qd_idx;
int ddf_layout = 0;
Expand All @@ -1671,17 +1671,12 @@ static sector_t raid5_compute_sector(raid5_conf_t *conf, sector_t r_sector,
*/
chunk_offset = sector_div(r_sector, sectors_per_chunk);
chunk_number = r_sector;
BUG_ON(r_sector != chunk_number);

/*
* Compute the stripe number
*/
stripe = chunk_number / data_disks;

/*
* Compute the data disk and parity disk indexes inside the stripe
*/
*dd_idx = chunk_number % data_disks;
stripe = chunk_number;
*dd_idx = sector_div(stripe, data_disks);

/*
* Select the parity disk based on the user selected algorithm.
Expand Down Expand Up @@ -1870,14 +1865,14 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
: conf->algorithm;
sector_t stripe;
int chunk_offset;
int chunk_number, dummy1, dd_idx = i;
sector_t chunk_number;
int dummy1, dd_idx = i;
sector_t r_sector;
struct stripe_head sh2;


chunk_offset = sector_div(new_sector, sectors_per_chunk);
stripe = new_sector;
BUG_ON(new_sector != stripe);

if (i == sh->pd_idx)
return 0;
Expand Down Expand Up @@ -1970,7 +1965,7 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous)
}

chunk_number = stripe * data_disks + i;
r_sector = (sector_t)chunk_number * sectors_per_chunk + chunk_offset;
r_sector = chunk_number * sectors_per_chunk + chunk_offset;

check = raid5_compute_sector(conf, r_sector,
previous, &dummy1, &sh2);
Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/pcmcia/cistpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,11 +1484,6 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *info)
if (!s)
return -EINVAL;

if (s->functions) {
WARN_ON(1);
return -EINVAL;
}

/* We do not want to validate the CIS cache... */
mutex_lock(&s->ops_mutex);
destroy_cis_cache(s);
Expand Down Expand Up @@ -1644,7 +1639,7 @@ static ssize_t pccard_show_cis(struct kobject *kobj,
count = 0;
else {
struct pcmcia_socket *s;
unsigned int chains = 1;
unsigned int chains;

if (off + count > size)
count = size - off;
Expand All @@ -1653,7 +1648,7 @@ static ssize_t pccard_show_cis(struct kobject *kobj,

if (!(s->state & SOCKET_PRESENT))
return -ENODEV;
if (!s->functions && pccard_validate_cis(s, &chains))
if (pccard_validate_cis(s, &chains))
return -EIO;
if (!chains)
return -ENODATA;
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/pcmcia/db1xxx_ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,8 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)

ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq,
IRQF_DISABLED, "pcmcia_insert", sock);
if (ret) {
local_irq_restore(flags);
if (ret)
goto out1;
}

ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq,
IRQF_DISABLED, "pcmcia_eject", sock);
Expand Down
Loading

0 comments on commit 09128d5

Please sign in to comment.