From 5904a7f9167cdeb95569799e0be652c2ce6d3298 Mon Sep 17 00:00:00 2001 From: Vitaly Wool Date: Wed, 5 Jul 2006 14:47:20 +0100 Subject: [ARM] 3709/1: pnx4008: convert to generic irq subsystem Patch from Vitaly Wool Convert pnx4008 chip support to use generic irq subsystem Signed-off-by: Vitaly Wool Signed-off-by: Russell King --- arch/arm/mach-pnx4008/core.c | 2 -- arch/arm/mach-pnx4008/dma.c | 1 - arch/arm/mach-pnx4008/irq.c | 22 ++++++++++------------ arch/arm/mach-pnx4008/time.c | 8 +++----- 4 files changed, 13 insertions(+), 20 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c index ba91daad64fb..3d73c1e93752 100644 --- a/arch/arm/mach-pnx4008/core.c +++ b/arch/arm/mach-pnx4008/core.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include -#include #include #include diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index 981aa9dcdede..ec01574f88ac 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c index 9b0a8e084e99..3a4bcf3d91fa 100644 --- a/arch/arm/mach-pnx4008/irq.c +++ b/arch/arm/mach-pnx4008/irq.c @@ -22,8 +22,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -96,26 +96,24 @@ void __init pnx4008_init_irq(void) { unsigned int i; - /* configure and enable IRQ 0,1,30,31 (cascade interrupts) mask all others */ + /* configure IRQ's */ + for (i = 0; i < NR_IRQS; i++) { + set_irq_flags(i, IRQF_VALID); + set_irq_chip(i, &pnx4008_irq_chip); + pnx4008_set_irq_type(i, pnx4008_irq_type[i]); + } + + /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */ pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]); pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]); pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]); pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]); + /* mask all others */ __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | (1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N), INTC_ER(MAIN_BASE_INT)); __raw_writel(0, INTC_ER(SIC1_BASE_INT)); __raw_writel(0, INTC_ER(SIC2_BASE_INT)); - - /* configure all other IRQ's */ - for (i = 0; i < NR_IRQS; i++) { - if (i == SUB2_FIQ_N || i == SUB1_FIQ_N || - i == SUB2_IRQ_N || i == SUB1_IRQ_N) - continue; - set_irq_flags(i, IRQF_VALID); - set_irq_chip(i, &pnx4008_irq_chip); - pnx4008_set_irq_type(i, pnx4008_irq_type[i]); - } } diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c index 888bf6cfba8a..756228ddd035 100644 --- a/arch/arm/mach-pnx4008/time.c +++ b/arch/arm/mach-pnx4008/time.c @@ -20,17 +20,15 @@ #include #include #include +#include +#include +#include #include #include #include #include -#include -#include #include - -#include -#include #include /*! Note: all timers are UPCOUNTING */ -- cgit v1.2.3-55-g7522 From ba854e18413d2d827f050984edeb8286c3335895 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 5 Jul 2006 17:22:52 +0100 Subject: [ARM] 3711/1: AT91 timer update Patch from Andrew Victor The AIC interrupt controller is the same on the Atmel AT91RM9200, AT91SAM9261 and AT91SAM9260 processors. This patch removes any RM9200-specific naming from the IRQ driver, and moves the AT91RM9200's default IRQ priority table into at91rm9200.c. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91rm9200/at91rm9200.c | 45 ++++++++++++++++++++++ arch/arm/mach-at91rm9200/generic.h | 8 +++- arch/arm/mach-at91rm9200/irq.c | 70 +++++++--------------------------- include/asm-arm/arch-at91rm9200/irqs.h | 8 ---- 4 files changed, 66 insertions(+), 65 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/at91rm9200.c index 7e1d072bdd80..0985b1c42c7c 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c @@ -107,3 +107,48 @@ void __init at91rm9200_map_io(void) iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); } +/* + * The default interrupt priority levels (0 = lowest, 7 = highest). + */ +static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { + 7, /* Advanced Interrupt Controller (FIQ) */ + 7, /* System Peripherals */ + 0, /* Parallel IO Controller A */ + 0, /* Parallel IO Controller B */ + 0, /* Parallel IO Controller C */ + 0, /* Parallel IO Controller D */ + 6, /* USART 0 */ + 6, /* USART 1 */ + 6, /* USART 2 */ + 6, /* USART 3 */ + 0, /* Multimedia Card Interface */ + 4, /* USB Device Port */ + 0, /* Two-Wire Interface */ + 6, /* Serial Peripheral Interface */ + 5, /* Serial Synchronous Controller 0 */ + 5, /* Serial Synchronous Controller 1 */ + 5, /* Serial Synchronous Controller 2 */ + 0, /* Timer Counter 0 */ + 0, /* Timer Counter 1 */ + 0, /* Timer Counter 2 */ + 0, /* Timer Counter 3 */ + 0, /* Timer Counter 4 */ + 0, /* Timer Counter 5 */ + 3, /* USB Host port */ + 3, /* Ethernet MAC */ + 0, /* Advanced Interrupt Controller (IRQ0) */ + 0, /* Advanced Interrupt Controller (IRQ1) */ + 0, /* Advanced Interrupt Controller (IRQ2) */ + 0, /* Advanced Interrupt Controller (IRQ3) */ + 0, /* Advanced Interrupt Controller (IRQ4) */ + 0, /* Advanced Interrupt Controller (IRQ5) */ + 0 /* Advanced Interrupt Controller (IRQ6) */ +}; + +void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) +{ + if (!priority) + priority = at91rm9200_default_irq_priority; + + at91_aic_init(priority); +} diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h index f0d969d7d874..7979d8ab7e07 100644 --- a/arch/arm/mach-at91rm9200/generic.h +++ b/arch/arm/mach-at91rm9200/generic.h @@ -8,13 +8,19 @@ * published by the Free Software Foundation. */ -void at91_gpio_irq_setup(unsigned banks); + /* Interrupts */ +extern void __init at91rm9200_init_irq(unsigned int priority[]); +extern void __init at91_aic_init(unsigned int priority[]); +extern void __init at91_gpio_irq_setup(unsigned banks); + /* Timer */ struct sys_timer; extern struct sys_timer at91rm9200_timer; + /* Memory Map */ extern void __init at91rm9200_map_io(void); + /* Clocks */ extern int __init at91_clock_init(unsigned long main_clock); struct device; extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func); diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c index dcd560dbcfb7..9b0911320417 100644 --- a/arch/arm/mach-at91rm9200/irq.c +++ b/arch/arm/mach-at91rm9200/irq.c @@ -36,58 +36,20 @@ #include "generic.h" -/* - * The default interrupt priority levels (0 = lowest, 7 = highest). - */ -static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = { - 7, /* Advanced Interrupt Controller */ - 7, /* System Peripheral */ - 0, /* Parallel IO Controller A */ - 0, /* Parallel IO Controller B */ - 0, /* Parallel IO Controller C */ - 0, /* Parallel IO Controller D */ - 6, /* USART 0 */ - 6, /* USART 1 */ - 6, /* USART 2 */ - 6, /* USART 3 */ - 0, /* Multimedia Card Interface */ - 4, /* USB Device Port */ - 0, /* Two-Wire Interface */ - 6, /* Serial Peripheral Interface */ - 5, /* Serial Synchronous Controller */ - 5, /* Serial Synchronous Controller */ - 5, /* Serial Synchronous Controller */ - 0, /* Timer Counter 0 */ - 0, /* Timer Counter 1 */ - 0, /* Timer Counter 2 */ - 0, /* Timer Counter 3 */ - 0, /* Timer Counter 4 */ - 0, /* Timer Counter 5 */ - 3, /* USB Host port */ - 3, /* Ethernet MAC */ - 0, /* Advanced Interrupt Controller */ - 0, /* Advanced Interrupt Controller */ - 0, /* Advanced Interrupt Controller */ - 0, /* Advanced Interrupt Controller */ - 0, /* Advanced Interrupt Controller */ - 0, /* Advanced Interrupt Controller */ - 0 /* Advanced Interrupt Controller */ -}; - -static void at91rm9200_mask_irq(unsigned int irq) +static void at91_aic_mask_irq(unsigned int irq) { /* Disable interrupt on AIC */ at91_sys_write(AT91_AIC_IDCR, 1 << irq); } -static void at91rm9200_unmask_irq(unsigned int irq) +static void at91_aic_unmask_irq(unsigned int irq) { /* Enable interrupt on AIC */ at91_sys_write(AT91_AIC_IECR, 1 << irq); } -static int at91rm9200_irq_type(unsigned irq, unsigned type) +static int at91_aic_set_type(unsigned irq, unsigned type) { unsigned int smr, srctype; @@ -122,7 +84,7 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type) static u32 wakeups; static u32 backups; -static int at91rm9200_irq_set_wake(unsigned irq, unsigned value) +static int at91_aic_set_wake(unsigned irq, unsigned value) { if (unlikely(irq >= 32)) return -EINVAL; @@ -149,28 +111,24 @@ void at91_irq_resume(void) } #else -#define at91rm9200_irq_set_wake NULL +#define at91_aic_set_wake NULL #endif -static struct irqchip at91rm9200_irq_chip = { - .ack = at91rm9200_mask_irq, - .mask = at91rm9200_mask_irq, - .unmask = at91rm9200_unmask_irq, - .set_type = at91rm9200_irq_type, - .set_wake = at91rm9200_irq_set_wake, +static struct irqchip at91_aic_chip = { + .ack = at91_aic_mask_irq, + .mask = at91_aic_mask_irq, + .unmask = at91_aic_unmask_irq, + .set_type = at91_aic_set_type, + .set_wake = at91_aic_set_wake, }; /* * Initialize the AIC interrupt controller. */ -void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) +void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS]) { unsigned int i; - /* No priority list specified for this board -> use defaults */ - if (priority == NULL) - priority = at91rm9200_default_irq_priority; - /* * The IVR is used by macro get_irqnr_and_base to read and verify. * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred. @@ -178,10 +136,10 @@ void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS]) for (i = 0; i < NR_AIC_IRQS; i++) { /* Put irq number in Source Vector Register: */ at91_sys_write(AT91_AIC_SVR(i), i); - /* Store the Source Mode Register as defined in table above */ + /* Active Low interrupt, with the specified priority */ at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]); - set_irq_chip(i, &at91rm9200_irq_chip); + set_irq_chip(i, &at91_aic_chip); set_irq_handler(i, do_level_IRQ); set_irq_flags(i, IRQF_VALID | IRQF_PROBE); diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h index 2dc93b174a8f..f63842c2c093 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91rm9200/irqs.h @@ -39,12 +39,4 @@ */ #define NR_IRQS (NR_AIC_IRQS + (4 * 32)) - -#ifndef __ASSEMBLY__ -/* - * Initialize the IRQ controller. - */ -extern void at91rm9200_init_irq(unsigned int priority[]); -#endif - #endif -- cgit v1.2.3-55-g7522 From ba1826e5eced176cc9ec0033ad8ee0f1cd5ad2e4 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 5 Jul 2006 15:36:15 +1000 Subject: [PATCH] powerpc: Fix loss of interrupts with MPIC With the new interrupt rework, an interrupt "host" map() callback can be called after the interrupt is already active. It's called again for an already mapped interrupt to allow changing the trigger setup, and currently this is not guarded with a test of wether the interrupt is requested or not. I plan to change some of this logic to be a bit less lenient against random reconfiguring of live interrupts but just not yet. The ported MPIC driver has a bug where when that happens, it will mask the interrupt. This changes it to preserve the previous masking of the interrupt instead. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- arch/powerpc/sysdev/mpic.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'arch') diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 7d31d7cc392d..9cecebaa0360 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -405,20 +405,22 @@ static void mpic_unmask_irq(unsigned int irq) unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq(irq); unsigned int src = mpic_irq_to_hw(irq); + unsigned long flags; DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); + spin_lock_irqsave(&mpic_lock, flags); mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK); - /* make sure mask gets to controller before we return to user */ do { if (!loops--) { printk(KERN_ERR "mpic_enable_irq timeout\n"); break; } - } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); + } while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK); + spin_unlock_irqrestore(&mpic_lock, flags); } static void mpic_mask_irq(unsigned int irq) @@ -426,9 +428,11 @@ static void mpic_mask_irq(unsigned int irq) unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq(irq); unsigned int src = mpic_irq_to_hw(irq); + unsigned long flags; DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); + spin_lock_irqsave(&mpic_lock, flags); mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | MPIC_VECPRI_MASK); @@ -440,6 +444,7 @@ static void mpic_mask_irq(unsigned int irq) break; } } while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK)); + spin_unlock_irqrestore(&mpic_lock, flags); } static void mpic_end_irq(unsigned int irq) @@ -624,9 +629,10 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, struct irq_desc *desc = get_irq_desc(virq); struct irq_chip *chip; struct mpic *mpic = h->host_data; - unsigned int vecpri = MPIC_VECPRI_SENSE_LEVEL | + u32 v, vecpri = MPIC_VECPRI_SENSE_LEVEL | MPIC_VECPRI_POLARITY_NEGATIVE; int level; + unsigned long iflags; pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n", virq, hw, flags); @@ -668,11 +674,21 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq, } #endif - /* Reconfigure irq */ - vecpri |= MPIC_VECPRI_MASK | hw | (8 << MPIC_VECPRI_PRIORITY_SHIFT); - mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri); - - pr_debug("mpic: mapping as IRQ\n"); + /* Reconfigure irq. We must preserve the mask bit as we can be called + * while the interrupt is still active (This may change in the future + * but for now, it is the case). + */ + spin_lock_irqsave(&mpic_lock, iflags); + v = mpic_irq_read(hw, MPIC_IRQ_VECTOR_PRI); + vecpri = (v & + ~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK)) | + vecpri; + if (vecpri != v) + mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri); + spin_unlock_irqrestore(&mpic_lock, iflags); + + pr_debug("mpic: mapping as IRQ, vecpri = 0x%08x (was 0x%08x)\n", + vecpri, v); set_irq_chip_data(virq, mpic); set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq); @@ -904,8 +920,8 @@ void __init mpic_init(struct mpic *mpic) /* do senses munging */ if (mpic->senses && i < mpic->senses_count) - vecpri = mpic_flags_to_vecpri(mpic->senses[i], - &level); + vecpri |= mpic_flags_to_vecpri(mpic->senses[i], + &level); else vecpri |= MPIC_VECPRI_SENSE_LEVEL; @@ -955,14 +971,17 @@ void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) void __init mpic_set_serial_int(struct mpic *mpic, int enable) { + unsigned long flags; u32 v; + spin_lock_irqsave(&mpic_lock, flags); v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); if (enable) v |= MPIC_GREG_GLOBAL_CONF_1_SIE; else v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); + spin_unlock_irqrestore(&mpic_lock, flags); } void mpic_irq_set_priority(unsigned int irq, unsigned int pri) -- cgit v1.2.3-55-g7522 From 7233589d77fdb593b482a8b7ee867e901f54b593 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 5 Jul 2006 20:18:39 -0700 Subject: [SPARC64]: Fix sparc64 build errors when CONFIG_PCI=n. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller --- arch/sparc64/kernel/prom.c | 2 ++ arch/sparc64/kernel/time.c | 5 ++++- include/asm-sparc64/dma-mapping.h | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index fa484d4f241e..99daeee4209d 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c @@ -1032,7 +1032,9 @@ static void sun4v_vdev_irq_trans_init(struct device_node *dp) static void irq_trans_init(struct device_node *dp) { const char *model; +#ifdef CONFIG_PCI int i; +#endif model = of_get_property(dp, "model", NULL); if (!model) diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 8dcbfbffacc9..b43de647ba73 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -788,12 +788,15 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id if (!regs) return -ENOMEM; +#ifdef CONFIG_PCI if (!strcmp(model, "ds1287") || !strcmp(model, "m5819") || !strcmp(model, "m5819p") || !strcmp(model, "m5823")) { ds1287_regs = (unsigned long) regs; - } else if (model[5] == '0' && model[6] == '2') { + } else +#endif + if (model[5] == '0' && model[6] == '2') { mstk48t02_regs = regs; } else if(model[5] == '0' && model[6] == '8') { mstk48t08_regs = regs; diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 0f5b89c9323b..27c46fbeebd6 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h @@ -160,6 +160,20 @@ static inline void dma_free_coherent(struct device *dev, size_t size, BUG(); } +static inline void +dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + +static inline void +dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ + BUG(); +} + #endif /* PCI */ -- cgit v1.2.3-55-g7522 From 37e64e5ae1a9554762b6ec494871adcf48be20cf Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Wed, 5 Jul 2006 20:42:58 -0700 Subject: [SPARC64]: Fix stack overflow checking in modular non-SMP kernels. The sparc64 kernel's EXPORT_SYMBOL(_mcount) is inside an #ifdef CONFIG_SMP. This breaks modules in non-SMP kernels built with stack overflow checking (CONFIG_STACK_DEBUG=y), as modules_install reports: WARNING: /lib/modules/2.6.17/kernel/drivers/ide/ide-cd.ko needs unknown symbol _mcount Trivially fixed by moving EXPORT_SYMBOL(_mcount) outside of the #ifdef CONFIG_SMP. Signed-off-by: Mikael Pettersson Signed-off-by: David S. Miller --- arch/sparc64/kernel/sparc64_ksyms.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 4173de425f09..237524d87cab 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -124,11 +124,6 @@ EXPORT_SYMBOL(__write_lock); EXPORT_SYMBOL(__write_unlock); EXPORT_SYMBOL(__write_trylock); -#if defined(CONFIG_MCOUNT) -extern void _mcount(void); -EXPORT_SYMBOL(_mcount); -#endif - /* CPU online map and active count. */ EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(phys_cpu_present_map); @@ -136,6 +131,11 @@ EXPORT_SYMBOL(phys_cpu_present_map); EXPORT_SYMBOL(smp_call_function); #endif /* CONFIG_SMP */ +#if defined(CONFIG_MCOUNT) +extern void _mcount(void); +EXPORT_SYMBOL(_mcount); +#endif + EXPORT_SYMBOL(sparc64_get_clock_tick); /* semaphores */ -- cgit v1.2.3-55-g7522 From b3cf257623fabd8f1ee6700a6d328cc1c5da5a1d Mon Sep 17 00:00:00 2001 From: Stephane Eranian Date: Sun, 9 Jul 2006 21:12:39 -0400 Subject: [PATCH] i386: use thread_info flags for debug regs and IO bitmaps Use thread info flags to track use of debug registers and IO bitmaps. - add TIF_DEBUG to track when debug registers are active - add TIF_IO_BITMAP to track when I/O bitmap is used - modify __switch_to() to use the new TIF flags Performance tested on Pentium II, ten runs of LMbench context switch benchmark (smaller is better:) before after avg 3.65 3.39 min 3.55 3.33 Signed-off-by: Stephane Eranian Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Acked-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/i386/kernel/ioport.c | 1 + arch/i386/kernel/process.c | 50 ++++++++++++++++++++++++------------------ arch/i386/kernel/ptrace.c | 5 ++++- include/asm-i386/thread_info.h | 7 ++++++ 4 files changed, 41 insertions(+), 22 deletions(-) (limited to 'arch') diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c index 79026f026b85..498e8bc197d5 100644 --- a/arch/i386/kernel/ioport.c +++ b/arch/i386/kernel/ioport.c @@ -79,6 +79,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) memset(bitmap, 0xff, IO_BITMAP_BYTES); t->io_bitmap_ptr = bitmap; + set_thread_flag(TIF_IO_BITMAP); } /* diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 94e2c87edeaa..923bb292f47f 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c @@ -359,16 +359,16 @@ EXPORT_SYMBOL(kernel_thread); */ void exit_thread(void) { - struct task_struct *tsk = current; - struct thread_struct *t = &tsk->thread; - /* The process may have allocated an io port bitmap... nuke it. */ - if (unlikely(NULL != t->io_bitmap_ptr)) { + if (unlikely(test_thread_flag(TIF_IO_BITMAP))) { + struct task_struct *tsk = current; + struct thread_struct *t = &tsk->thread; int cpu = get_cpu(); struct tss_struct *tss = &per_cpu(init_tss, cpu); kfree(t->io_bitmap_ptr); t->io_bitmap_ptr = NULL; + clear_thread_flag(TIF_IO_BITMAP); /* * Careful, clear this in the TSS too: */ @@ -387,6 +387,7 @@ void flush_thread(void) memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8); memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); + clear_tsk_thread_flag(tsk, TIF_DEBUG); /* * Forget coprocessor state.. */ @@ -431,7 +432,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, savesegment(gs,p->thread.gs); tsk = current; - if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) { + if (unlikely(test_tsk_thread_flag(tsk, TIF_IO_BITMAP))) { p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); if (!p->thread.io_bitmap_ptr) { p->thread.io_bitmap_max = 0; @@ -439,6 +440,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, } memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr, IO_BITMAP_BYTES); + set_tsk_thread_flag(p, TIF_IO_BITMAP); } /* @@ -533,10 +535,24 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) return 1; } -static inline void -handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss) +static noinline void __switch_to_xtra(struct task_struct *next_p, + struct tss_struct *tss) { - if (!next->io_bitmap_ptr) { + struct thread_struct *next; + + next = &next_p->thread; + + if (test_tsk_thread_flag(next_p, TIF_DEBUG)) { + set_debugreg(next->debugreg[0], 0); + set_debugreg(next->debugreg[1], 1); + set_debugreg(next->debugreg[2], 2); + set_debugreg(next->debugreg[3], 3); + /* no 4 and 5 */ + set_debugreg(next->debugreg[6], 6); + set_debugreg(next->debugreg[7], 7); + } + + if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { /* * Disable the bitmap via an invalid offset. We still cache * the previous bitmap owner and the IO bitmap contents: @@ -544,6 +560,7 @@ handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss) tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET; return; } + if (likely(next == tss->io_bitmap_owner)) { /* * Previous owner of the bitmap (hence the bitmap content) @@ -671,20 +688,11 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas set_iopl_mask(next->iopl); /* - * Now maybe reload the debug registers + * Now maybe handle debug registers and/or IO bitmaps */ - if (unlikely(next->debugreg[7])) { - set_debugreg(next->debugreg[0], 0); - set_debugreg(next->debugreg[1], 1); - set_debugreg(next->debugreg[2], 2); - set_debugreg(next->debugreg[3], 3); - /* no 4 and 5 */ - set_debugreg(next->debugreg[6], 6); - set_debugreg(next->debugreg[7], 7); - } - - if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) - handle_io_bitmap(next, tss); + if (unlikely((task_thread_info(next_p)->flags & _TIF_WORK_CTXSW)) + || test_tsk_thread_flag(prev_p, TIF_IO_BITMAP)) + __switch_to_xtra(next_p, tss); disable_tsc(prev_p, next_p); diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index fd7eaf7866e0..d3db03f4085d 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c @@ -468,8 +468,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) for(i=0; i<4; i++) if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1) goto out_tsk; + if (data) + set_tsk_thread_flag(child, TIF_DEBUG); + else + clear_tsk_thread_flag(child, TIF_DEBUG); } - addr -= (long) &dummy->u_debugreg; addr = addr >> 2; child->thread.debugreg[addr] = data; diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 2833fa2c0dd0..54d6d7aea938 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h @@ -140,6 +140,8 @@ static inline struct thread_info *current_thread_info(void) #define TIF_SECCOMP 8 /* secure computing */ #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ #define TIF_MEMDIE 16 +#define TIF_DEBUG 17 /* uses debug registers */ +#define TIF_IO_BITMAP 18 /* uses I/O bitmap */ #define _TIF_SYSCALL_TRACE (1< Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/e820.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index b8eee4c7888b..e56c2adf57a4 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3-55-g7522 From f86bf9b7bcc5d325687a8b80da8ee3eb56e02da7 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 10 Jul 2006 04:44:05 -0700 Subject: [PATCH] lockdep: clean up completion initializer in smpboot.c Clean up lockdep on-stack-completion initializer. (This also removes the dependency on waitqueue_lock_key.) Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/smpboot.c | 4 +--- include/linux/completion.h | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index b7c705969791..975380207b46 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c @@ -771,12 +771,10 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) unsigned long start_rip; struct create_idle c_idle = { .cpu = cpu, - .done = COMPLETION_INITIALIZER(c_idle.done), + .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), }; DECLARE_WORK(work, do_fork_idle, &c_idle); - lockdep_set_class(&c_idle.done.wait.lock, &waitqueue_lock_key); - /* allocate memory for gdts of secondary cpus. Hotplug is considered */ if (!cpu_gdt_descr[cpu].address && !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) { diff --git a/include/linux/completion.h b/include/linux/completion.h index 251c41e3ddd5..268c5a4a2bd4 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -18,6 +18,9 @@ struct completion { #define COMPLETION_INITIALIZER(work) \ { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } +#define COMPLETION_INITIALIZER_ONSTACK(work) \ + ({ init_completion(&work); work; }) + #define DECLARE_COMPLETION(work) \ struct completion work = COMPLETION_INITIALIZER(work) @@ -28,7 +31,7 @@ struct completion { */ #ifdef CONFIG_LOCKDEP # define DECLARE_COMPLETION_ONSTACK(work) \ - struct completion work = ({ init_completion(&work); work; }) + struct completion work = COMPLETION_INITIALIZER_ONSTACK(work) #else # define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work) #endif -- cgit v1.2.3-55-g7522 From 1454aed92b6b89cb1fbe3cbecd8ceaa7a122f3b7 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 10 Jul 2006 04:44:05 -0700 Subject: [PATCH] put a comment at register_die_notifier that the export is used {un}register_die_notifier() is used by kdb... document this so that future "remove dead export" rounds can skip this export. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/traps.c | 4 ++-- arch/x86_64/kernel/traps.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 2bf8b55b91f8..5cfd4f42eeba 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -100,13 +100,13 @@ int register_die_notifier(struct notifier_block *nb) vmalloc_sync_all(); return atomic_notifier_chain_register(&i386die_chain, nb); } -EXPORT_SYMBOL(register_die_notifier); +EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ int unregister_die_notifier(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&i386die_chain, nb); } -EXPORT_SYMBOL(unregister_die_notifier); +EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) { diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 79d05c482072..eb39a2775236 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -76,13 +76,13 @@ int register_die_notifier(struct notifier_block *nb) vmalloc_sync_all(); return atomic_notifier_chain_register(&die_chain, nb); } -EXPORT_SYMBOL(register_die_notifier); +EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */ int unregister_die_notifier(struct notifier_block *nb) { return atomic_notifier_chain_unregister(&die_chain, nb); } -EXPORT_SYMBOL(unregister_die_notifier); +EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */ static inline void conditional_sti(struct pt_regs *regs) { -- cgit v1.2.3-55-g7522 From a8f340e394ff30b79ab5b03c67ab4c94b2ac3646 Mon Sep 17 00:00:00 2001 From: Jon Smirl Date: Mon, 10 Jul 2006 04:44:12 -0700 Subject: [PATCH] vt: Remove VT-specific declarations and definitions from tty.h MAX_NR_CONSOLES, fg_console, want_console and last_console are more of a function of the VT layer than the TTY one. Moving these to vt.h and vt_kern.h allows all of the framebuffer and VT console drivers to remove their dependency on tty.h. [akpm@osdl.org: fix alpha build] Signed-off-by: Jon Smirl Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/alpha/kernel/process.c | 1 + arch/parisc/kernel/pdc_cons.c | 2 ++ drivers/video/68328fb.c | 1 - drivers/video/S3triofb.c | 1 - drivers/video/amifb.c | 1 - drivers/video/arcfb.c | 1 - drivers/video/asiliantfb.c | 1 - drivers/video/atafb.c | 1 - drivers/video/aty/aty128fb.c | 1 - drivers/video/aty/radeon_base.c | 1 - drivers/video/chipsfb.c | 1 - drivers/video/cirrusfb.c | 1 - drivers/video/console/dummycon.c | 1 - drivers/video/console/fbcon.c | 1 - drivers/video/console/mdacon.c | 1 - drivers/video/console/newport_con.c | 1 - drivers/video/console/promcon.c | 1 - drivers/video/console/softcursor.c | 1 - drivers/video/console/sticon.c | 1 - drivers/video/console/vgacon.c | 1 - drivers/video/controlfb.c | 1 - drivers/video/cyber2000fb.c | 1 - drivers/video/cyberfb.c | 1 - drivers/video/dnfb.c | 1 - drivers/video/epson1355fb.c | 1 - drivers/video/fbcmap.c | 1 - drivers/video/fbmem.c | 2 +- drivers/video/fbmon.c | 1 - drivers/video/g364fb.c | 1 - drivers/video/geode/gx1fb_core.c | 1 - drivers/video/geode/gxfb_core.c | 1 - drivers/video/hgafb.c | 1 - drivers/video/hitfb.c | 1 - drivers/video/hpfb.c | 1 - drivers/video/i810/i810_main.c | 1 - drivers/video/igafb.c | 1 - drivers/video/imacfb.c | 2 +- drivers/video/imsttfb.c | 1 - drivers/video/intelfb/intelfbdrv.c | 2 +- drivers/video/intelfb/intelfbhw.c | 1 - drivers/video/kyro/fbdev.c | 1 - drivers/video/macfb.c | 1 - drivers/video/matrox/matroxfb_base.h | 1 - drivers/video/maxinefb.c | 1 - drivers/video/modedb.c | 1 - drivers/video/neofb.c | 1 - drivers/video/nvidia/nvidia.c | 1 - drivers/video/offb.c | 1 - drivers/video/platinumfb.c | 1 - drivers/video/pm2fb.c | 1 - drivers/video/pm3fb.c | 1 - drivers/video/pmag-aa-fb.c | 1 - drivers/video/pvr2fb.c | 1 - drivers/video/q40fb.c | 1 - drivers/video/retz3fb.c | 1 - drivers/video/riva/fbdev.c | 1 - drivers/video/s3c2410fb.c | 1 - drivers/video/savage/savagefb_driver.c | 1 - drivers/video/sis/sis_main.c | 6 ++++++ drivers/video/skeletonfb.c | 1 - drivers/video/sun3fb.c | 1 - drivers/video/tdfxfb.c | 1 - drivers/video/tgafb.c | 1 - drivers/video/tx3912fb.c | 1 - drivers/video/valkyriefb.c | 1 - drivers/video/vesafb.c | 2 +- drivers/video/vfb.c | 1 - drivers/video/vga16fb.c | 2 +- drivers/video/virgefb.c | 1 - include/linux/console_struct.h | 1 + include/linux/fb.h | 1 - include/linux/tty.h | 11 ----------- include/linux/vt.h | 10 ++++++++++ include/linux/vt_kern.h | 1 + 74 files changed, 26 insertions(+), 78 deletions(-) (limited to 'arch') diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 41ebf51a107a..b3a8a2980365 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index ce78f412ff2e..aab05767427c 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -89,6 +89,8 @@ static int pdc_console_setup(struct console *co, char *options) } #if defined(CONFIG_PDC_CONSOLE) +#include + static struct tty_driver * pdc_console_device (struct console *c, int *index) { extern struct tty_driver console_driver; diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c index 78488bb41aeb..0dda73da8628 100644 --- a/drivers/video/68328fb.c +++ b/drivers/video/68328fb.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c index e714e8449c1d..afd146f5f683 100644 --- a/drivers/video/S3triofb.c +++ b/drivers/video/S3triofb.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index f9bc9f777e75..f1ba54f4fc39 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index fd95c2dbd4f7..70dd8115a4d8 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index eaeaf4d1a094..1fd22f460b0f 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index e69ab65f7843..5831893bf7a0 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 72c589109471..1006f125fcc7 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 51b78f8de949..8d85fc58142e 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index 0e465c80ef24..eba9d93ae360 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 7355da09c721..daf43f535a0b 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 878707a04398..7c8eeeb30a47 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 94e9f7069bef..390439b3d899 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -64,7 +64,6 @@ #include #include #include /* MSch: for IRQ probe */ -#include #include #include #include diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index c89f90edf8ac..52ed12b12acc 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c index 03041311711b..7fa1afeae8dc 100644 --- a/drivers/video/console/newport_con.c +++ b/drivers/video/console/newport_con.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c index 5cd5e114d1e6..b78eac63459f 100644 --- a/drivers/video/console/promcon.c +++ b/drivers/video/console/promcon.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 3957fc7523e2..557c563e4aed 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index 45c4f227e56e..45586aaabd1e 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 05735ff4e9c5..7f1f0e7a5b20 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index acdd6a103dbb..8cc6c0e2d27a 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index 2e2924957d8f..aae6d9c26e88 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/cyberfb.c b/drivers/video/cyberfb.c index a3e189f90a7d..c40e72dafb0e 100644 --- a/drivers/video/cyberfb.c +++ b/drivers/video/cyberfb.c @@ -81,7 +81,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c index 5abd3cb00671..b083ea7e9c69 100644 --- a/drivers/video/dnfb.c +++ b/drivers/video/dnfb.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index f0a621ecc288..737257d278f0 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c index 1f98392a43b3..e8b135f3d80d 100644 --- a/drivers/video/fbcmap.c +++ b/drivers/video/fbcmap.c @@ -13,7 +13,6 @@ #include #include -#include #include #include diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 33034f81114d..4fc9df426c1a 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 3ccfff715a51..de93139ccbb5 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -26,7 +26,6 @@ * for more details. * */ -#include #include #include #include diff --git a/drivers/video/g364fb.c b/drivers/video/g364fb.c index 605d1a132020..1b981b635675 100644 --- a/drivers/video/g364fb.c +++ b/drivers/video/g364fb.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 4d3a8871d3d1..bcf9cea54d8b 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 5ef12a3dfa50..0d3643fc6293 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index 4e39035cf335..fb9e67228543 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c index 01864767450d..4cc6b454265e 100644 --- a/drivers/video/hitfb.c +++ b/drivers/video/hitfb.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index abd920a663a0..91cf3b577d15 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index fbe8a2c4b04c..a6ca02f2156a 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index 8a0c2d3d3805..67f384f86758 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c index cdbae173d69a..ff233b84dec4 100644 --- a/drivers/video/imacfb.c +++ b/drivers/video/imacfb.c @@ -15,9 +15,9 @@ #include #include #include +#include #include #include -#include #include diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index 5f393d985b11..5715b8ad0ddc 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 3f39d84015f1..06af89d44a0d 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c @@ -113,7 +113,6 @@ #include #include #include -#include #include #include #include @@ -122,6 +121,7 @@ #include #include #include +#include #include diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 3b78a57924f0..2a9322f9cfdc 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c index 2fdbe9b2b04b..f0d614a80f1f 100644 --- a/drivers/video/kyro/fbdev.c +++ b/drivers/video/kyro/fbdev.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index e6cbd9de944a..80a043807161 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index b95779b57c06..9c25c2f7966b 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index f85421bf7cb5..38c8d38de4fd 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index ff5454601e22..d1267904c280 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -12,7 +12,6 @@ */ #include -#include #include #include diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index 773855a311e8..59a6f5fa5ae6 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index b02d6033cc0c..ef58c3825501 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 71ce1fa45cf4..ce5f3031b99b 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 450e802e0aa8..983be3ec2345 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c index 49a203e1591c..a560a2223825 100644 --- a/drivers/video/pm2fb.c +++ b/drivers/video/pm2fb.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c index 0e0f977b05ee..1d81ef47efd3 100644 --- a/drivers/video/pm3fb.c +++ b/drivers/video/pm3fb.c @@ -57,7 +57,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/pmag-aa-fb.c b/drivers/video/pmag-aa-fb.c index d92f352211ef..68ca3cc40770 100644 --- a/drivers/video/pmag-aa-fb.c +++ b/drivers/video/pmag-aa-fb.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index 4a1e0e856920..940ba2be55e9 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index fc91dbf896d2..48536c3e58a4 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/retz3fb.c b/drivers/video/retz3fb.c index 5e2c64f622cb..cf41ff177644 100644 --- a/drivers/video/retz3fb.c +++ b/drivers/video/retz3fb.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 2788655e6e7d..baf494cecc10 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index f461eb10cc79..ad3bdd6f1ac1 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c @@ -76,7 +76,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 4729af477fbf..461e094e7b45 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index b848ca7db7f9..f8dfabd73b00 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c @@ -44,7 +44,13 @@ #include #include #include + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include +#else +#include +#endif + #include #include #include diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index 67f429e93189..bb96cb65fdaa 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c index e046e20f02b9..f80356dfa8e8 100644 --- a/drivers/video/sun3fb.c +++ b/drivers/video/sun3fb.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c index 239b1496874b..689ce0270b81 100644 --- a/drivers/video/tdfxfb.c +++ b/drivers/video/tdfxfb.c @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index 6c2c78ab9827..94fde625a6c0 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c index d904da44e1aa..07389ba01eff 100644 --- a/drivers/video/tx3912fb.c +++ b/drivers/video/tx3912fb.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c index 1d76c035050e..47f27924a7d7 100644 --- a/drivers/video/valkyriefb.c +++ b/drivers/video/valkyriefb.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index 5718924b677f..2196448396ec 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c @@ -13,13 +13,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include