Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125015
b: refs/heads/master
c: b58602a
h: refs/heads/master
i:
  125013: 4ea9dc4
  125011: 465c467
  125007: a8cf452
v: v3
  • Loading branch information
Linus Torvalds committed Dec 31, 2008
1 parent 3967123 commit 522f787
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 112 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: 1f3403fa640f9f7b135dee79f2d39d01c8ad4a08
refs/heads/master: b58602a4bac012b5f4fc12fe6b46ab237b610d5d
18 changes: 6 additions & 12 deletions trunk/arch/x86/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static struct irq_cfg irq_cfgx[NR_IRQS] = {
[15] = { .domain = CPU_MASK_ALL, .vector = IRQ15_VECTOR, },
};

void __init arch_early_irq_init(void)
int __init arch_early_irq_init(void)
{
struct irq_cfg *cfg;
struct irq_desc *desc;
Expand All @@ -184,6 +184,8 @@ void __init arch_early_irq_init(void)
desc = irq_to_desc(i);
desc->chip_data = &cfg[i];
}

return 0;
}

#ifdef CONFIG_SPARSE_IRQ
Expand Down Expand Up @@ -212,7 +214,7 @@ static struct irq_cfg *get_one_free_irq_cfg(int cpu)
return cfg;
}

void arch_init_chip_data(struct irq_desc *desc, int cpu)
int arch_init_chip_data(struct irq_desc *desc, int cpu)
{
struct irq_cfg *cfg;

Expand All @@ -224,6 +226,8 @@ void arch_init_chip_data(struct irq_desc *desc, int cpu)
BUG_ON(1);
}
}

return 0;
}

#ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC
Expand Down Expand Up @@ -1345,8 +1349,6 @@ void __setup_vector_irq(int cpu)

/* Mark the inuse vectors */
for_each_irq_desc(irq, desc) {
if (!desc)
continue;
cfg = desc->chip_data;
if (!cpu_isset(cpu, cfg->domain))
continue;
Expand Down Expand Up @@ -1730,8 +1732,6 @@ __apicdebuginit(void) print_IO_APIC(void)
for_each_irq_desc(irq, desc) {
struct irq_pin_list *entry;

if (!desc)
continue;
cfg = desc->chip_data;
entry = cfg->irq_2_pin;
if (!entry)
Expand Down Expand Up @@ -2378,9 +2378,6 @@ static void ir_irq_migration(struct work_struct *work)
struct irq_desc *desc;

for_each_irq_desc(irq, desc) {
if (!desc)
continue;

if (desc->status & IRQ_MOVE_PENDING) {
unsigned long flags;

Expand Down Expand Up @@ -2670,9 +2667,6 @@ static inline void init_IO_APIC_traps(void)
* 0x80, because int 0x80 is hm, kind of importantish. ;)
*/
for_each_irq_desc(irq, desc) {
if (!desc)
continue;

cfg = desc->chip_data;
if (IO_APIC_IRQ(irq) && cfg && !cfg->vector) {
/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ static void init_evtchn_cpu_bindings(void)

/* By default all event channels notify CPU#0. */
for_each_irq_desc(i, desc) {
if (!desc)
continue;

desc->affinity = cpumask_of_cpu(0);
}
#endif
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/fat/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,6 @@ const struct file_operations fat_dir_operations = {
.compat_ioctl = fat_compat_dir_ioctl,
#endif
.fsync = file_fsync,
.llseek = generic_file_llseek,
};

static int fat_get_short_entry(struct inode *dir, loff_t *pos,
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ static struct dentry *fat_get_parent(struct dentry *child)
brelse(bh);

parent = d_obtain_alias(inode);
if (!IS_ERR(parent))
parent->d_op = sb->s_root->d_op;
out:
unlock_super(sb);

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
* for creation.
*/
if (!(nd->flags & (LOOKUP_CONTINUE | LOOKUP_PARENT))) {
if (nd->flags & LOOKUP_CREATE)
if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
return 0;
}

Expand Down
11 changes: 1 addition & 10 deletions trunk/fs/proc/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/irqnr.h>
#include <asm/cputime.h>

#ifndef arch_irq_stat_cpu
Expand Down Expand Up @@ -45,10 +46,6 @@ static int show_stat(struct seq_file *p, void *v)
steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest);
for_each_irq_nr(j) {
#ifdef CONFIG_SPARSE_IRQ
if (!irq_to_desc(j))
continue;
#endif
sum += kstat_irqs_cpu(j, i);
}
sum += arch_irq_stat_cpu(i);
Expand Down Expand Up @@ -95,12 +92,6 @@ static int show_stat(struct seq_file *p, void *v)
/* sum again ? it could be updated? */
for_each_irq_nr(j) {
per_irq_sum = 0;
#ifdef CONFIG_SPARSE_IRQ
if (!irq_to_desc(j)) {
seq_printf(p, " %u", per_irq_sum);
continue;
}
#endif
for_each_possible_cpu(i)
per_irq_sum += kstat_irqs_cpu(j, i);

Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,4 +464,10 @@ static inline void init_irq_proc(void)

int show_interrupts(struct seq_file *p, void *v);

struct irq_desc;

extern int early_irq_init(void);
extern int arch_early_irq_init(void);
extern int arch_init_chip_data(struct irq_desc *desc, int cpu);

#endif
27 changes: 4 additions & 23 deletions trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,42 +193,23 @@ struct irq_desc {
const char *name;
} ____cacheline_internodealigned_in_smp;

extern void early_irq_init(void);
extern void arch_early_irq_init(void);
extern void arch_init_chip_data(struct irq_desc *desc, int cpu);
extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
struct irq_desc *desc, int cpu);
extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);

#ifndef CONFIG_SPARSE_IRQ
extern struct irq_desc irq_desc[NR_IRQS];

static inline struct irq_desc *irq_to_desc(unsigned int irq)
{
return (irq < NR_IRQS) ? irq_desc + irq : NULL;
}
static inline struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
{
return irq_to_desc(irq);
}

#else

extern struct irq_desc *irq_to_desc(unsigned int irq);
extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
#else /* CONFIG_SPARSE_IRQ */
extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);

# define for_each_irq_desc(irq, desc) \
for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; irq++, desc = irq_to_desc(irq))
# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; irq--, desc = irq_to_desc(irq))

#define kstat_irqs_this_cpu(DESC) \
((DESC)->kstat_irqs[smp_processor_id()])
#define kstat_incr_irqs_this_cpu(irqno, DESC) \
((DESC)->kstat_irqs[smp_processor_id()]++)

#endif
#endif /* CONFIG_SPARSE_IRQ */

extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);

static inline struct irq_desc *
irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)
Expand Down
23 changes: 13 additions & 10 deletions trunk/include/linux/irqnr.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@

# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs - 1; irq >= 0; irq--)
#else
#else /* CONFIG_GENERIC_HARDIRQS */

extern int nr_irqs;
extern struct irq_desc *irq_to_desc(unsigned int irq);

#ifndef CONFIG_SPARSE_IRQ
# define for_each_irq_desc(irq, desc) \
for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; \
irq++, desc = irq_to_desc(irq)) \
if (desc)

struct irq_desc;
# define for_each_irq_desc(irq, desc) \
for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc++)
# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs - 1, desc = irq_desc + (nr_irqs - 1); \
irq >= 0; irq--, desc--)
#endif
#endif

# define for_each_irq_desc_reverse(irq, desc) \
for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; \
irq--, desc = irq_to_desc(irq)) \
if (desc)

#endif /* CONFIG_GENERIC_HARDIRQS */

#define for_each_irq_nr(irq) \
for (irq = 0; irq < nr_irqs; irq++)
Expand Down
9 changes: 0 additions & 9 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,6 @@ void __init __weak thread_info_cache_init(void)
{
}

void __init __weak arch_early_irq_init(void)
{
}

void __init __weak early_irq_init(void)
{
arch_early_irq_init();
}

asmlinkage void __init start_kernel(void)
{
char * command_line;
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/

#include <linux/cpu.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/hrtimer.h>
Expand Down
15 changes: 0 additions & 15 deletions trunk/kernel/irq/autoprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ unsigned long probe_irq_on(void)
* flush such a longstanding irq before considering it as spurious.
*/
for_each_irq_desc_reverse(i, desc) {
if (!desc)
continue;

spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
/*
Expand Down Expand Up @@ -71,9 +68,6 @@ unsigned long probe_irq_on(void)
* happened in the previous stage, it may have masked itself)
*/
for_each_irq_desc_reverse(i, desc) {
if (!desc)
continue;

spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
Expand All @@ -92,9 +86,6 @@ unsigned long probe_irq_on(void)
* Now filter out any obviously spurious interrupts
*/
for_each_irq_desc(i, desc) {
if (!desc)
continue;

spin_lock_irq(&desc->lock);
status = desc->status;

Expand Down Expand Up @@ -133,9 +124,6 @@ unsigned int probe_irq_mask(unsigned long val)
int i;

for_each_irq_desc(i, desc) {
if (!desc)
continue;

spin_lock_irq(&desc->lock);
status = desc->status;

Expand Down Expand Up @@ -178,9 +166,6 @@ int probe_irq_off(unsigned long val)
unsigned int status;

for_each_irq_desc(i, desc) {
if (!desc)
continue;

spin_lock_irq(&desc->lock);
status = desc->status;

Expand Down
Loading

0 comments on commit 522f787

Please sign in to comment.