From 42b07b2846e8c881eeb890db00388afa35d3b67e Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 29 Sep 2005 17:07:20 -0700 Subject: [PATCH] --- yaml --- r: 9478 b: refs/heads/master c: 01ff367e62f0474e4d39aa5812cbe2a30d96e1e9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/common/gic.c | 2 - trunk/arch/arm/common/locomo.c | 1 + trunk/arch/arm/mach-imx/leds-mx1ads.c | 1 + trunk/arch/arm/mach-iop3xx/common.c | 1 + trunk/arch/arm/mach-iop3xx/iop321-time.c | 1 + trunk/arch/arm/mach-iop3xx/iop331-time.c | 1 + trunk/arch/arm/mach-iop3xx/iq31244-mm.c | 1 + trunk/arch/arm/mach-iop3xx/iq80321-mm.c | 1 + trunk/arch/arm/mach-iop3xx/iq80331-mm.c | 1 + trunk/arch/arm/mach-iop3xx/iq80332-mm.c | 1 + trunk/arch/arm/mach-ixp2000/core.c | 1 + trunk/arch/arm/mach-ixp2000/pci.c | 1 + trunk/arch/arm/mach-l7200/core.c | 1 + trunk/arch/arm/mach-pxa/corgi_lcd.c | 1 + trunk/arch/arm/mach-pxa/generic.c | 1 - trunk/arch/arm/mach-s3c2410/usb-simtec.c | 1 + trunk/arch/arm/mach-versatile/core.c | 1 + trunk/arch/arm/mach-versatile/pci.c | 1 + trunk/arch/arm/mm/cache-v6.S | 9 +- trunk/arch/arm/mm/flush.c | 36 ++++---- trunk/arch/arm/plat-omap/common.c | 1 + trunk/arch/arm/plat-omap/cpu-omap.c | 1 + trunk/arch/arm/plat-omap/usb.c | 1 + trunk/arch/i386/kernel/cpu/amd.c | 16 ---- trunk/arch/ppc64/kernel/bpa_iommu.c | 6 +- trunk/arch/um/drivers/port_kern.c | 1 + trunk/arch/um/kernel/irq.c | 1 + trunk/arch/x86_64/kernel/mce.c | 10 +-- trunk/arch/x86_64/kernel/setup.c | 22 +++-- trunk/drivers/macintosh/smu.c | 4 +- trunk/drivers/mtd/maps/bast-flash.c | 1 + trunk/drivers/mtd/maps/ixp2000.c | 1 + trunk/drivers/mtd/maps/ixp4xx.c | 1 + trunk/drivers/mtd/maps/omap_nor.c | 1 + trunk/drivers/mtd/maps/sa1100-flash.c | 1 + trunk/drivers/mtd/nand/s3c2410.c | 1 + trunk/drivers/net/bmac.c | 2 +- trunk/drivers/net/cassini.c | 18 ++-- trunk/drivers/pcmcia/omap_cf.c | 1 + trunk/drivers/serial/s3c2410.c | 2 + trunk/drivers/usb/host/ohci-lh7a404.c | 2 + trunk/drivers/usb/host/ohci-omap.c | 1 + trunk/drivers/usb/host/ohci-s3c2410.c | 1 + trunk/drivers/video/backlight/corgi_bl.c | 1 + trunk/drivers/video/imxfb.c | 1 + trunk/drivers/video/pxafb.c | 108 +++++++++++------------ trunk/drivers/video/pxafb.h | 9 ++ trunk/fs/9p/vfs_super.c | 2 +- trunk/fs/read_write.c | 3 - trunk/include/asm-arm/elf.h | 2 - trunk/include/asm-ppc/io.h | 20 ++--- trunk/include/asm-um/uaccess.h | 2 +- trunk/include/asm-x86_64/msr.h | 1 - trunk/include/linux/sched.h | 22 ++--- trunk/kernel/cpuset.c | 12 ++- trunk/kernel/signal.c | 3 +- trunk/net/ipv4/tcp_output.c | 9 +- 58 files changed, 177 insertions(+), 180 deletions(-) diff --git a/[refs] b/[refs] index df34411a2b78..b5ccc60b4a01 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3ca066efb18524bf3f07137a8f8ff434022c4f2 +refs/heads/master: 01ff367e62f0474e4d39aa5812cbe2a30d96e1e9 diff --git a/trunk/arch/arm/common/gic.c b/trunk/arch/arm/common/gic.c index c02dc8116a18..d74990717559 100644 --- a/trunk/arch/arm/common/gic.c +++ b/trunk/arch/arm/common/gic.c @@ -68,7 +68,6 @@ static void gic_unmask_irq(unsigned int irq) writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4); } -#ifdef CONFIG_SMP static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu) { void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3); @@ -79,7 +78,6 @@ static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu val |= 1 << (cpu + shift); writel(val, reg); } -#endif static struct irqchip gic_chip = { .ack = gic_ack_irq, diff --git a/trunk/arch/arm/common/locomo.c b/trunk/arch/arm/common/locomo.c index e8053d16829b..a7bd85700152 100644 --- a/trunk/arch/arm/common/locomo.c +++ b/trunk/arch/arm/common/locomo.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-imx/leds-mx1ads.c b/trunk/arch/arm/mach-imx/leds-mx1ads.c index 79236404aec2..e6399b06e4a4 100644 --- a/trunk/arch/arm/mach-imx/leds-mx1ads.c +++ b/trunk/arch/arm/mach-imx/leds-mx1ads.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "leds.h" /* diff --git a/trunk/arch/arm/mach-iop3xx/common.c b/trunk/arch/arm/mach-iop3xx/common.c index fdeeef489a73..bda7394ec06c 100644 --- a/trunk/arch/arm/mach-iop3xx/common.c +++ b/trunk/arch/arm/mach-iop3xx/common.c @@ -27,6 +27,7 @@ unsigned long iop3xx_pcibios_min_mem = 0; /* * Default power-off for EP80219 */ +#include static inline void ep80219_send_to_pic(__u8 c) { } diff --git a/trunk/arch/arm/mach-iop3xx/iop321-time.c b/trunk/arch/arm/mach-iop3xx/iop321-time.c index d67ac0e5d438..0039793b694a 100644 --- a/trunk/arch/arm/mach-iop3xx/iop321-time.c +++ b/trunk/arch/arm/mach-iop3xx/iop321-time.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-iop3xx/iop331-time.c b/trunk/arch/arm/mach-iop3xx/iop331-time.c index 3c1f0ebbd636..8eddfac7e2b0 100644 --- a/trunk/arch/arm/mach-iop3xx/iop331-time.c +++ b/trunk/arch/arm/mach-iop3xx/iop331-time.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-iop3xx/iq31244-mm.c b/trunk/arch/arm/mach-iop3xx/iq31244-mm.c index 55992ab586ba..b01042f7de71 100644 --- a/trunk/arch/arm/mach-iop3xx/iq31244-mm.c +++ b/trunk/arch/arm/mach-iop3xx/iq31244-mm.c @@ -21,6 +21,7 @@ #include #include +#include /* diff --git a/trunk/arch/arm/mach-iop3xx/iq80321-mm.c b/trunk/arch/arm/mach-iop3xx/iq80321-mm.c index bb3e9e5a9aff..1580c7ed2b9d 100644 --- a/trunk/arch/arm/mach-iop3xx/iq80321-mm.c +++ b/trunk/arch/arm/mach-iop3xx/iq80321-mm.c @@ -21,6 +21,7 @@ #include #include +#include /* diff --git a/trunk/arch/arm/mach-iop3xx/iq80331-mm.c b/trunk/arch/arm/mach-iop3xx/iq80331-mm.c index 129eb49b0670..ee8c333e115f 100644 --- a/trunk/arch/arm/mach-iop3xx/iq80331-mm.c +++ b/trunk/arch/arm/mach-iop3xx/iq80331-mm.c @@ -21,6 +21,7 @@ #include #include +#include /* diff --git a/trunk/arch/arm/mach-iop3xx/iq80332-mm.c b/trunk/arch/arm/mach-iop3xx/iq80332-mm.c index 2feaf7591f53..084afcdfb1eb 100644 --- a/trunk/arch/arm/mach-iop3xx/iq80332-mm.c +++ b/trunk/arch/arm/mach-iop3xx/iq80332-mm.c @@ -21,6 +21,7 @@ #include #include +#include /* diff --git a/trunk/arch/arm/mach-ixp2000/core.c b/trunk/arch/arm/mach-ixp2000/core.c index f34797a46a23..74bd2fd602d4 100644 --- a/trunk/arch/arm/mach-ixp2000/core.c +++ b/trunk/arch/arm/mach-ixp2000/core.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ixp2000/pci.c b/trunk/arch/arm/mach-ixp2000/pci.c index 522205acb316..0788fb2b5c10 100644 --- a/trunk/arch/arm/mach-ixp2000/pci.c +++ b/trunk/arch/arm/mach-ixp2000/pci.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-l7200/core.c b/trunk/arch/arm/mach-l7200/core.c index 5fd8c9f97f9a..2a7fee2a7635 100644 --- a/trunk/arch/arm/mach-l7200/core.c +++ b/trunk/arch/arm/mach-l7200/core.c @@ -12,6 +12,7 @@ #include #include +#include /* * IRQ base register diff --git a/trunk/arch/arm/mach-pxa/corgi_lcd.c b/trunk/arch/arm/mach-pxa/corgi_lcd.c index c02ef7c0f7ef..c5efcd04fcbc 100644 --- a/trunk/arch/arm/mach-pxa/corgi_lcd.c +++ b/trunk/arch/arm/mach-pxa/corgi_lcd.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-pxa/generic.c b/trunk/arch/arm/mach-pxa/generic.c index d0660a8c4b70..a45aaa115a76 100644 --- a/trunk/arch/arm/mach-pxa/generic.c +++ b/trunk/arch/arm/mach-pxa/generic.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "generic.h" diff --git a/trunk/arch/arm/mach-s3c2410/usb-simtec.c b/trunk/arch/arm/mach-s3c2410/usb-simtec.c index 5098b50158a3..f021fd82be52 100644 --- a/trunk/arch/arm/mach-s3c2410/usb-simtec.c +++ b/trunk/arch/arm/mach-s3c2410/usb-simtec.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "devs.h" #include "usb-simtec.h" diff --git a/trunk/arch/arm/mach-versatile/core.c b/trunk/arch/arm/mach-versatile/core.c index a30e0451df72..58c1330d8638 100644 --- a/trunk/arch/arm/mach-versatile/core.c +++ b/trunk/arch/arm/mach-versatile/core.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/arm/mach-versatile/pci.c b/trunk/arch/arm/mach-versatile/pci.c index b80d57d51699..d1565e851f0e 100644 --- a/trunk/arch/arm/mach-versatile/pci.c +++ b/trunk/arch/arm/mach-versatile/pci.c @@ -29,6 +29,7 @@ #include #include #include +#include /* * these spaces are mapped using the following base registers: diff --git a/trunk/arch/arm/mm/cache-v6.S b/trunk/arch/arm/mm/cache-v6.S index 72966d90e956..85c10a71e7c6 100644 --- a/trunk/arch/arm/mm/cache-v6.S +++ b/trunk/arch/arm/mm/cache-v6.S @@ -18,7 +18,6 @@ #define HARVARD_CACHE #define CACHE_LINE_SIZE 32 #define D_CACHE_LINE_SIZE 32 -#define BTB_FLUSH_SIZE 8 /* * v6_flush_cache_all() @@ -99,13 +98,7 @@ ENTRY(v6_coherent_user_range) mcr p15, 0, r0, c7, c5, 1 @ invalidate I line #endif mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry - add r0, r0, #BTB_FLUSH_SIZE - mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry - add r0, r0, #BTB_FLUSH_SIZE - mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry - add r0, r0, #BTB_FLUSH_SIZE - mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry - add r0, r0, #BTB_FLUSH_SIZE + add r0, r0, #CACHE_LINE_SIZE cmp r0, r1 blo 1b #ifdef HARVARD_CACHE diff --git a/trunk/arch/arm/mm/flush.c b/trunk/arch/arm/mm/flush.c index c9a03981b785..b0208c992576 100644 --- a/trunk/arch/arm/mm/flush.c +++ b/trunk/arch/arm/mm/flush.c @@ -17,24 +17,6 @@ #ifdef CONFIG_CPU_CACHE_VIPT -#define ALIAS_FLUSH_START 0xffff4000 - -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - -static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) -{ - unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); - - set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); - flush_tlb_kernel_page(to); - - asm( "mcrr p15, 0, %1, %0, c14\n" - " mcrr p15, 0, %1, %0, c5\n" - : - : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES) - : "cc"); -} - void flush_cache_mm(struct mm_struct *mm) { if (cache_is_vivt()) { @@ -85,6 +67,24 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig if (cache_is_vipt_aliasing()) flush_pfn_alias(pfn, user_addr); } + +#define ALIAS_FLUSH_START 0xffff4000 + +#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) + +static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) +{ + unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); + + set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); + flush_tlb_kernel_page(to); + + asm( "mcrr p15, 0, %1, %0, c14\n" + " mcrr p15, 0, %1, %0, c5\n" + : + : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES) + : "cc"); +} #else #define flush_pfn_alias(pfn,vaddr) do { } while (0) #endif diff --git a/trunk/arch/arm/plat-omap/common.c b/trunk/arch/arm/plat-omap/common.c index 02bcc6c1cd1b..6cb20aea7f51 100644 --- a/trunk/arch/arm/plat-omap/common.c +++ b/trunk/arch/arm/plat-omap/common.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/arm/plat-omap/cpu-omap.c b/trunk/arch/arm/plat-omap/cpu-omap.c index fd894bb00107..409aac2c4b9d 100644 --- a/trunk/arch/arm/plat-omap/cpu-omap.c +++ b/trunk/arch/arm/plat-omap/cpu-omap.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/arm/plat-omap/usb.c b/trunk/arch/arm/plat-omap/usb.c index 14a836d7ac25..98f1c76f8660 100644 --- a/trunk/arch/arm/plat-omap/usb.c +++ b/trunk/arch/arm/plat-omap/usb.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/trunk/arch/i386/kernel/cpu/amd.c b/trunk/arch/i386/kernel/cpu/amd.c index 4c1ddf2b57cc..73aeaf5a9d4e 100644 --- a/trunk/arch/i386/kernel/cpu/amd.c +++ b/trunk/arch/i386/kernel/cpu/amd.c @@ -28,22 +28,6 @@ static void __init init_amd(struct cpuinfo_x86 *c) int mbytes = num_physpages >> (20-PAGE_SHIFT); int r; -#ifdef CONFIG_SMP - unsigned long value; - - /* Disable TLB flush filter by setting HWCR.FFDIS on K8 - * bit 6 of msr C001_0015 - * - * Errata 63 for SH-B3 steppings - * Errata 122 for all steppings (F+ have it disabled by default) - */ - if (c->x86 == 15) { - rdmsrl(MSR_K7_HWCR, value); - value |= 1 << 6; - wrmsrl(MSR_K7_HWCR, value); - } -#endif - /* * FIXME: We should handle the K5 here. Set up the write * range and also turn on MSR 83 bits 4 and 31 (write alloc, diff --git a/trunk/arch/ppc64/kernel/bpa_iommu.c b/trunk/arch/ppc64/kernel/bpa_iommu.c index 507eb9d0223f..f33a7bccb0d7 100644 --- a/trunk/arch/ppc64/kernel/bpa_iommu.c +++ b/trunk/arch/ppc64/kernel/bpa_iommu.c @@ -99,11 +99,7 @@ get_iost_entry(unsigned long iopt_base, unsigned long io_address, unsigned page_ break; default: /* not a known compile time constant */ - { - /* BUILD_BUG_ON() is not usable here */ - extern void __get_iost_entry_bad_page_size(void); - __get_iost_entry_bad_page_size(); - } + BUILD_BUG_ON(1); break; } diff --git a/trunk/arch/um/drivers/port_kern.c b/trunk/arch/um/drivers/port_kern.c index 189839e4f1d4..c41efd207fcc 100644 --- a/trunk/arch/um/drivers/port_kern.c +++ b/trunk/arch/um/drivers/port_kern.c @@ -7,6 +7,7 @@ #include "linux/sched.h" #include "linux/slab.h" #include "linux/interrupt.h" +#include "linux/irq.h" #include "linux/spinlock.h" #include "linux/errno.h" #include "asm/atomic.h" diff --git a/trunk/arch/um/kernel/irq.c b/trunk/arch/um/kernel/irq.c index bbf94bf2921e..dcd814971995 100644 --- a/trunk/arch/um/kernel/irq.c +++ b/trunk/arch/um/kernel/irq.c @@ -9,6 +9,7 @@ #include "linux/kernel.h" #include "linux/module.h" #include "linux/smp.h" +#include "linux/irq.h" #include "linux/kernel_stat.h" #include "linux/interrupt.h" #include "linux/random.h" diff --git a/trunk/arch/x86_64/kernel/mce.c b/trunk/arch/x86_64/kernel/mce.c index 69541db5ff2c..08203b07f4bd 100644 --- a/trunk/arch/x86_64/kernel/mce.c +++ b/trunk/arch/x86_64/kernel/mce.c @@ -54,12 +54,9 @@ void mce_log(struct mce *mce) { unsigned next, entry; mce->finished = 0; - wmb(); + smp_wmb(); for (;;) { entry = rcu_dereference(mcelog.next); - /* The rmb forces the compiler to reload next in each - iteration */ - rmb(); for (;;) { /* When the buffer fills up discard new entries. Assume that the earlier errors are the more interesting. */ @@ -72,7 +69,6 @@ void mce_log(struct mce *mce) entry++; continue; } - break; } smp_rmb(); next = entry + 1; @@ -80,9 +76,9 @@ void mce_log(struct mce *mce) break; } memcpy(mcelog.entry + entry, mce, sizeof(struct mce)); - wmb(); + smp_wmb(); mcelog.entry[entry].finished = 1; - wmb(); + smp_wmb(); if (!test_and_set_bit(0, &console_logged)) notify_user = 1; diff --git a/trunk/arch/x86_64/kernel/setup.c b/trunk/arch/x86_64/kernel/setup.c index 257f5ba17902..238f73e1a834 100644 --- a/trunk/arch/x86_64/kernel/setup.c +++ b/trunk/arch/x86_64/kernel/setup.c @@ -831,6 +831,8 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) #endif } +#define HWCR 0xc0010015 + static int __init init_amd(struct cpuinfo_x86 *c) { int r; @@ -839,18 +841,14 @@ static int __init init_amd(struct cpuinfo_x86 *c) #ifdef CONFIG_SMP unsigned long value; - /* - * Disable TLB flush filter by setting HWCR.FFDIS on K8 - * bit 6 of msr C001_0015 - * - * Errata 63 for SH-B3 steppings - * Errata 122 for all steppings (F+ have it disabled by default) - */ - if (c->x86 == 15) { - rdmsrl(MSR_K8_HWCR, value); - value |= 1 << 6; - wrmsrl(MSR_K8_HWCR, value); - } + // Disable TLB flush filter by setting HWCR.FFDIS: + // bit 6 of msr C001_0015 + // + // Errata 63 for SH-B3 steppings + // Errata 122 for all(?) steppings + rdmsrl(HWCR, value); + value |= 1 << 6; + wrmsrl(HWCR, value); #endif /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; diff --git a/trunk/drivers/macintosh/smu.c b/trunk/drivers/macintosh/smu.c index 9b38674fbf75..a85ac18dd21d 100644 --- a/trunk/drivers/macintosh/smu.c +++ b/trunk/drivers/macintosh/smu.c @@ -153,10 +153,8 @@ static irqreturn_t smu_db_intr(int irq, void *arg, struct pt_regs *regs) spin_lock_irqsave(&smu->lock, flags); gpio = pmac_do_feature_call(PMAC_FTR_READ_GPIO, NULL, smu->doorbell); - if ((gpio & 7) != 7) { - spin_unlock_irqrestore(&smu->lock, flags); + if ((gpio & 7) != 7) return IRQ_HANDLED; - } cmd = smu->cmd_cur; smu->cmd_cur = NULL; diff --git a/trunk/drivers/mtd/maps/bast-flash.c b/trunk/drivers/mtd/maps/bast-flash.c index 0ba0ff7d43b9..0c45464e3f7b 100644 --- a/trunk/drivers/mtd/maps/bast-flash.c +++ b/trunk/drivers/mtd/maps/bast-flash.c @@ -39,6 +39,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/mtd/maps/ixp2000.c b/trunk/drivers/mtd/maps/ixp2000.c index a9f86c7fbd52..3e94b616743d 100644 --- a/trunk/drivers/mtd/maps/ixp2000.c +++ b/trunk/drivers/mtd/maps/ixp2000.c @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/mtd/maps/ixp4xx.c b/trunk/drivers/mtd/maps/ixp4xx.c index 3fcc32884074..bbb0e6e569a6 100644 --- a/trunk/drivers/mtd/maps/ixp4xx.c +++ b/trunk/drivers/mtd/maps/ixp4xx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/mtd/maps/omap_nor.c b/trunk/drivers/mtd/maps/omap_nor.c index b17bca657daf..8cc71409a328 100644 --- a/trunk/drivers/mtd/maps/omap_nor.c +++ b/trunk/drivers/mtd/maps/omap_nor.c @@ -42,6 +42,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/mtd/maps/sa1100-flash.c b/trunk/drivers/mtd/maps/sa1100-flash.c index 8dcaa357b4bb..52385705da09 100644 --- a/trunk/drivers/mtd/maps/sa1100-flash.c +++ b/trunk/drivers/mtd/maps/sa1100-flash.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/mtd/nand/s3c2410.c b/trunk/drivers/mtd/nand/s3c2410.c index b47ebcb31e0f..891e3a1b9110 100644 --- a/trunk/drivers/mtd/nand/s3c2410.c +++ b/trunk/drivers/mtd/nand/s3c2410.c @@ -58,6 +58,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/net/bmac.c b/trunk/drivers/net/bmac.c index 60dba4a1ca5c..8dc657fc8afb 100644 --- a/trunk/drivers/net/bmac.c +++ b/trunk/drivers/net/bmac.c @@ -218,7 +218,7 @@ void bmwrite(struct net_device *dev, unsigned long reg_offset, unsigned data ) static inline -unsigned short bmread(struct net_device *dev, unsigned long reg_offset ) +volatile unsigned short bmread(struct net_device *dev, unsigned long reg_offset ) { return in_le16((void __iomem *)dev->base_addr + reg_offset); } diff --git a/trunk/drivers/net/cassini.c b/trunk/drivers/net/cassini.c index 45831fb377a0..69cb368247e7 100644 --- a/trunk/drivers/net/cassini.c +++ b/trunk/drivers/net/cassini.c @@ -3244,7 +3244,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr, goto use_random_mac_addr; /* search for beginning of vpd */ - base = NULL; + base = 0; for (i = 2; i < EXPANSION_ROM_SIZE; i++) { /* check for PCIR */ if ((readb(p + i + 0) == 0x50) && @@ -4564,7 +4564,7 @@ static void cas_set_multicast(struct net_device *dev) /* Eventually add support for changing the advertisement * on autoneg. */ -static int cas_ethtool_ioctl(struct net_device *dev, void __user *ep_user) +static int cas_ethtool_ioctl(struct net_device *dev, void *ep_user) { struct cas *cp = netdev_priv(dev); u16 bmcr; @@ -4578,7 +4578,7 @@ static int cas_ethtool_ioctl(struct net_device *dev, void __user *ep_user) switch(ecmd.cmd) { case ETHTOOL_GDRVINFO: { - struct ethtool_drvinfo info = { .cmd = ETHTOOL_GDRVINFO }; + struct ethtool_drvinfo info = { cmd: ETHTOOL_GDRVINFO }; strncpy(info.driver, DRV_MODULE_NAME, ETHTOOL_BUSINFO_LEN); @@ -4738,7 +4738,7 @@ static int cas_ethtool_ioctl(struct net_device *dev, void __user *ep_user) /* get link status */ case ETHTOOL_GLINK: { - struct ethtool_value edata = { .cmd = ETHTOOL_GLINK }; + struct ethtool_value edata = { cmd: ETHTOOL_GLINK }; edata.data = (cp->lstate == link_up); if (copy_to_user(ep_user, &edata, sizeof(edata))) @@ -4748,7 +4748,7 @@ static int cas_ethtool_ioctl(struct net_device *dev, void __user *ep_user) /* get message-level */ case ETHTOOL_GMSGLVL: { - struct ethtool_value edata = { .cmd = ETHTOOL_GMSGLVL }; + struct ethtool_value edata = { cmd: ETHTOOL_GMSGLVL }; edata.data = cp->msg_enable; if (copy_to_user(ep_user, &edata, sizeof(edata))) @@ -4874,7 +4874,7 @@ static int cas_ethtool_ioctl(struct net_device *dev, void __user *ep_user) static int cas_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct cas *cp = netdev_priv(dev); - struct mii_ioctl_data *data = if_mii(ifr); + struct mii_ioctl_data *data = (struct mii_ioctl_data *)&ifr->ifr_data; unsigned long flags; int rc = -EOPNOTSUPP; @@ -5168,7 +5168,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, cas_shutdown(cp); up(&cp->pm_sem); - iounmap(cp->regs); + iounmap((void *) cp->regs); err_out_free_res: @@ -5216,7 +5216,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev) #endif pci_free_consistent(pdev, sizeof(struct cas_init_block), cp->init_block, cp->block_dvma); - iounmap(cp->regs); + iounmap((void *) cp->regs); free_netdev(dev); pci_release_regions(pdev); pci_disable_device(pdev); @@ -5224,7 +5224,7 @@ static void __devexit cas_remove_one(struct pci_dev *pdev) } #ifdef CONFIG_PM -static int cas_suspend(struct pci_dev *pdev, pm_message_t state) +static int cas_suspend(struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata(pdev); struct cas *cp = netdev_priv(dev); diff --git a/trunk/drivers/pcmcia/omap_cf.c b/trunk/drivers/pcmcia/omap_cf.c index 94be9e51654e..08d1c9288264 100644 --- a/trunk/drivers/pcmcia/omap_cf.c +++ b/trunk/drivers/pcmcia/omap_cf.c @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/serial/s3c2410.c b/trunk/drivers/serial/s3c2410.c index 50d7870d92bb..1195e6a0901a 100644 --- a/trunk/drivers/serial/s3c2410.c +++ b/trunk/drivers/serial/s3c2410.c @@ -82,6 +82,8 @@ #include #include +#include + /* structures */ struct s3c24xx_uart_info { diff --git a/trunk/drivers/usb/host/ohci-lh7a404.c b/trunk/drivers/usb/host/ohci-lh7a404.c index 859aca7be753..817620d73841 100644 --- a/trunk/drivers/usb/host/ohci-lh7a404.c +++ b/trunk/drivers/usb/host/ohci-lh7a404.c @@ -17,6 +17,8 @@ */ #include +#include +#include extern int usb_disabled(void); diff --git a/trunk/drivers/usb/host/ohci-omap.c b/trunk/drivers/usb/host/ohci-omap.c index d8f3ba7ad52e..5cde76faab93 100644 --- a/trunk/drivers/usb/host/ohci-omap.c +++ b/trunk/drivers/usb/host/ohci-omap.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/drivers/usb/host/ohci-s3c2410.c b/trunk/drivers/usb/host/ohci-s3c2410.c index da7d5478f74d..3d9bcf78a9a4 100644 --- a/trunk/drivers/usb/host/ohci-s3c2410.c +++ b/trunk/drivers/usb/host/ohci-s3c2410.c @@ -20,6 +20,7 @@ */ #include +#include #include #include diff --git a/trunk/drivers/video/backlight/corgi_bl.c b/trunk/drivers/video/backlight/corgi_bl.c index 3c72c627e65e..630f2dfa9699 100644 --- a/trunk/drivers/video/backlight/corgi_bl.c +++ b/trunk/drivers/video/backlight/corgi_bl.c @@ -19,6 +19,7 @@ #include #include +#include #include #define CORGI_DEFAULT_INTENSITY 0x1f diff --git a/trunk/drivers/video/imxfb.c b/trunk/drivers/video/imxfb.c index 1d54d3d6960b..6c2244cf0e74 100644 --- a/trunk/drivers/video/imxfb.c +++ b/trunk/drivers/video/imxfb.c @@ -36,6 +36,7 @@ #include #include +#include #include #include diff --git a/trunk/drivers/video/pxafb.c b/trunk/drivers/video/pxafb.c index 194eed0a238c..34d4dcc0320a 100644 --- a/trunk/drivers/video/pxafb.c +++ b/trunk/drivers/video/pxafb.c @@ -260,9 +260,9 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) } #ifdef CONFIG_CPU_FREQ - pr_debug("pxafb: dma period = %d ps, clock = %d kHz\n", - pxafb_display_dma_period(var), - get_clk_frequency_khz(0)); + DPRINTK("dma period = %d ps, clock = %d kHz\n", + pxafb_display_dma_period(var), + get_clk_frequency_khz(0)); #endif return 0; @@ -270,7 +270,7 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static inline void pxafb_set_truecolor(u_int is_true_color) { - pr_debug("pxafb: true_color = %d\n", is_true_color); + DPRINTK("true_color = %d\n", is_true_color); // do your machine-specific setup if needed } @@ -284,7 +284,7 @@ static int pxafb_set_par(struct fb_info *info) struct fb_var_screeninfo *var = &info->var; unsigned long palette_mem_size; - pr_debug("pxafb: set_par\n"); + DPRINTK("set_par\n"); if (var->bits_per_pixel == 16) fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR; @@ -308,7 +308,7 @@ static int pxafb_set_par(struct fb_info *info) palette_mem_size = fbi->palette_size * sizeof(u16); - pr_debug("pxafb: palette_mem_size = 0x%08lx\n", palette_mem_size); + DPRINTK("palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size); fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size); fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; @@ -369,7 +369,7 @@ static int pxafb_blank(int blank, struct fb_info *info) struct pxafb_info *fbi = (struct pxafb_info *)info; int i; - pr_debug("pxafb: blank=%d\n", blank); + DPRINTK("pxafb_blank: blank=%d\n", blank); switch (blank) { case FB_BLANK_POWERDOWN: @@ -508,15 +508,15 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * u_long flags; u_int lines_per_panel, pcd = get_pcd(var->pixclock); - pr_debug("pxafb: Configuring PXA LCD\n"); + DPRINTK("Configuring PXA LCD\n"); - pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n", - var->xres, var->hsync_len, - var->left_margin, var->right_margin); - pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n", - var->yres, var->vsync_len, - var->upper_margin, var->lower_margin); - pr_debug("var: pixclock=%d pcd=%d\n", var->pixclock, pcd); + DPRINTK("var: xres=%d hslen=%d lm=%d rm=%d\n", + var->xres, var->hsync_len, + var->left_margin, var->right_margin); + DPRINTK("var: yres=%d vslen=%d um=%d bm=%d\n", + var->yres, var->vsync_len, + var->upper_margin, var->lower_margin); + DPRINTK("var: pixclock=%d pcd=%d\n", var->pixclock, pcd); #if DEBUG_VAR if (var->xres < 16 || var->xres > 1024) @@ -589,10 +589,10 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * if (pcd) new_regs.lccr3 |= LCCR3_PixClkDiv(pcd); - pr_debug("nlccr0 = 0x%08x\n", new_regs.lccr0); - pr_debug("nlccr1 = 0x%08x\n", new_regs.lccr1); - pr_debug("nlccr2 = 0x%08x\n", new_regs.lccr2); - pr_debug("nlccr3 = 0x%08x\n", new_regs.lccr3); + DPRINTK("nlccr0 = 0x%08x\n", new_regs.lccr0); + DPRINTK("nlccr1 = 0x%08x\n", new_regs.lccr1); + DPRINTK("nlccr2 = 0x%08x\n", new_regs.lccr2); + DPRINTK("nlccr3 = 0x%08x\n", new_regs.lccr3); /* Update shadow copy atomically */ local_irq_save(flags); @@ -637,24 +637,24 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * } #if 0 - pr_debug("fbi->dmadesc_fblow_cpu = 0x%p\n", fbi->dmadesc_fblow_cpu); - pr_debug("fbi->dmadesc_fbhigh_cpu = 0x%p\n", fbi->dmadesc_fbhigh_cpu); - pr_debug("fbi->dmadesc_palette_cpu = 0x%p\n", fbi->dmadesc_palette_cpu); - pr_debug("fbi->dmadesc_fblow_dma = 0x%x\n", fbi->dmadesc_fblow_dma); - pr_debug("fbi->dmadesc_fbhigh_dma = 0x%x\n", fbi->dmadesc_fbhigh_dma); - pr_debug("fbi->dmadesc_palette_dma = 0x%x\n", fbi->dmadesc_palette_dma); - - pr_debug("fbi->dmadesc_fblow_cpu->fdadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fdadr); - pr_debug("fbi->dmadesc_fbhigh_cpu->fdadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fdadr); - pr_debug("fbi->dmadesc_palette_cpu->fdadr = 0x%x\n", fbi->dmadesc_palette_cpu->fdadr); - - pr_debug("fbi->dmadesc_fblow_cpu->fsadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fsadr); - pr_debug("fbi->dmadesc_fbhigh_cpu->fsadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fsadr); - pr_debug("fbi->dmadesc_palette_cpu->fsadr = 0x%x\n", fbi->dmadesc_palette_cpu->fsadr); - - pr_debug("fbi->dmadesc_fblow_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fblow_cpu->ldcmd); - pr_debug("fbi->dmadesc_fbhigh_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fbhigh_cpu->ldcmd); - pr_debug("fbi->dmadesc_palette_cpu->ldcmd = 0x%x\n", fbi->dmadesc_palette_cpu->ldcmd); + DPRINTK("fbi->dmadesc_fblow_cpu = 0x%p\n", fbi->dmadesc_fblow_cpu); + DPRINTK("fbi->dmadesc_fbhigh_cpu = 0x%p\n", fbi->dmadesc_fbhigh_cpu); + DPRINTK("fbi->dmadesc_palette_cpu = 0x%p\n", fbi->dmadesc_palette_cpu); + DPRINTK("fbi->dmadesc_fblow_dma = 0x%x\n", fbi->dmadesc_fblow_dma); + DPRINTK("fbi->dmadesc_fbhigh_dma = 0x%x\n", fbi->dmadesc_fbhigh_dma); + DPRINTK("fbi->dmadesc_palette_dma = 0x%x\n", fbi->dmadesc_palette_dma); + + DPRINTK("fbi->dmadesc_fblow_cpu->fdadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fdadr); + DPRINTK("fbi->dmadesc_fbhigh_cpu->fdadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fdadr); + DPRINTK("fbi->dmadesc_palette_cpu->fdadr = 0x%x\n", fbi->dmadesc_palette_cpu->fdadr); + + DPRINTK("fbi->dmadesc_fblow_cpu->fsadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fsadr); + DPRINTK("fbi->dmadesc_fbhigh_cpu->fsadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fsadr); + DPRINTK("fbi->dmadesc_palette_cpu->fsadr = 0x%x\n", fbi->dmadesc_palette_cpu->fsadr); + + DPRINTK("fbi->dmadesc_fblow_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fblow_cpu->ldcmd); + DPRINTK("fbi->dmadesc_fbhigh_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fbhigh_cpu->ldcmd); + DPRINTK("fbi->dmadesc_palette_cpu->ldcmd = 0x%x\n", fbi->dmadesc_palette_cpu->ldcmd); #endif fbi->reg_lccr0 = new_regs.lccr0; @@ -684,7 +684,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info * */ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on) { - pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff"); + DPRINTK("backlight o%s\n", on ? "n" : "ff"); if (pxafb_backlight_power) pxafb_backlight_power(on); @@ -692,7 +692,7 @@ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on) static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) { - pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff"); + DPRINTK("LCD power o%s\n", on ? "n" : "ff"); if (pxafb_lcd_power) pxafb_lcd_power(on); @@ -740,13 +740,13 @@ static void pxafb_setup_gpio(struct pxafb_info *fbi) static void pxafb_enable_controller(struct pxafb_info *fbi) { - pr_debug("pxafb: Enabling LCD controller\n"); - pr_debug("fdadr0 0x%08x\n", (unsigned int) fbi->fdadr0); - pr_debug("fdadr1 0x%08x\n", (unsigned int) fbi->fdadr1); - pr_debug("reg_lccr0 0x%08x\n", (unsigned int) fbi->reg_lccr0); - pr_debug("reg_lccr1 0x%08x\n", (unsigned int) fbi->reg_lccr1); - pr_debug("reg_lccr2 0x%08x\n", (unsigned int) fbi->reg_lccr2); - pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); + DPRINTK("Enabling LCD controller\n"); + DPRINTK("fdadr0 0x%08x\n", (unsigned int) fbi->fdadr0); + DPRINTK("fdadr1 0x%08x\n", (unsigned int) fbi->fdadr1); + DPRINTK("reg_lccr0 0x%08x\n", (unsigned int) fbi->reg_lccr0); + DPRINTK("reg_lccr1 0x%08x\n", (unsigned int) fbi->reg_lccr1); + DPRINTK("reg_lccr2 0x%08x\n", (unsigned int) fbi->reg_lccr2); + DPRINTK("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); /* enable LCD controller clock */ pxa_set_cken(CKEN16_LCD, 1); @@ -761,19 +761,19 @@ static void pxafb_enable_controller(struct pxafb_info *fbi) FDADR1 = fbi->fdadr1; LCCR0 |= LCCR0_ENB; - pr_debug("FDADR0 0x%08x\n", (unsigned int) FDADR0); - pr_debug("FDADR1 0x%08x\n", (unsigned int) FDADR1); - pr_debug("LCCR0 0x%08x\n", (unsigned int) LCCR0); - pr_debug("LCCR1 0x%08x\n", (unsigned int) LCCR1); - pr_debug("LCCR2 0x%08x\n", (unsigned int) LCCR2); - pr_debug("LCCR3 0x%08x\n", (unsigned int) LCCR3); + DPRINTK("FDADR0 0x%08x\n", (unsigned int) FDADR0); + DPRINTK("FDADR1 0x%08x\n", (unsigned int) FDADR1); + DPRINTK("LCCR0 0x%08x\n", (unsigned int) LCCR0); + DPRINTK("LCCR1 0x%08x\n", (unsigned int) LCCR1); + DPRINTK("LCCR2 0x%08x\n", (unsigned int) LCCR2); + DPRINTK("LCCR3 0x%08x\n", (unsigned int) LCCR3); } static void pxafb_disable_controller(struct pxafb_info *fbi) { DECLARE_WAITQUEUE(wait, current); - pr_debug("pxafb: disabling LCD controller\n"); + DPRINTK("Disabling LCD controller\n"); set_current_state(TASK_UNINTERRUPTIBLE); add_wait_queue(&fbi->ctrlr_wait, &wait); @@ -1039,7 +1039,7 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi) fbi->palette_size = fbi->fb.var.bits_per_pixel == 8 ? 256 : 16; palette_mem_size = fbi->palette_size * sizeof(u16); - pr_debug("pxafb: palette_mem_size = 0x%08lx\n", palette_mem_size); + DPRINTK("palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size); fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size); fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; diff --git a/trunk/drivers/video/pxafb.h b/trunk/drivers/video/pxafb.h index 47f41f70db7a..22c00be786a8 100644 --- a/trunk/drivers/video/pxafb.h +++ b/trunk/drivers/video/pxafb.h @@ -113,6 +113,15 @@ struct pxafb_info { #define PXA_NAME "PXA" +/* + * Debug macros + */ +#if DEBUG +# define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ## args) +#else +# define DPRINTK(fmt, args...) +#endif + /* * Minimum X and Y resolutions */ diff --git a/trunk/fs/9p/vfs_super.c b/trunk/fs/9p/vfs_super.c index 82c5b0084079..0957f4da91d4 100644 --- a/trunk/fs/9p/vfs_super.c +++ b/trunk/fs/9p/vfs_super.c @@ -129,7 +129,7 @@ static struct super_block *v9fs_get_sb(struct file_system_type if ((newfid = v9fs_session_init(v9ses, dev_name, data)) < 0) { dprintk(DEBUG_ERROR, "problem initiating session\n"); - return ERR_PTR(newfid); + return newfid; } sb = sget(fs_type, NULL, v9fs_set_super, v9ses); diff --git a/trunk/fs/read_write.c b/trunk/fs/read_write.c index a091ee4f430d..b60324aaa2b6 100644 --- a/trunk/fs/read_write.c +++ b/trunk/fs/read_write.c @@ -497,9 +497,6 @@ static ssize_t do_readv_writev(int type, struct file *file, } ret = rw_verify_area(type, file, pos, tot_len); - if (ret) - goto out; - ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE); if (ret) goto out; diff --git a/trunk/include/asm-arm/elf.h b/trunk/include/asm-arm/elf.h index 7da97a937548..a1696ba238d3 100644 --- a/trunk/include/asm-arm/elf.h +++ b/trunk/include/asm-arm/elf.h @@ -124,8 +124,6 @@ do { \ if (((ex).e_flags & EF_ARM_EABI_MASK) || \ ((ex).e_flags & EF_ARM_SOFT_FLOAT)) \ set_thread_flag(TIF_USING_IWMMXT); \ - else \ - clear_thread_flag(TIF_USING_IWMMXT); \ } while (0) #endif diff --git a/trunk/include/asm-ppc/io.h b/trunk/include/asm-ppc/io.h index 94d83998a759..7eb7cf6360bd 100644 --- a/trunk/include/asm-ppc/io.h +++ b/trunk/include/asm-ppc/io.h @@ -56,7 +56,7 @@ extern unsigned long pci_dram_offset; * is actually performed (i.e. the data has come back) before we start * executing any following instructions. */ -extern inline int in_8(const volatile unsigned char __iomem *addr) +extern inline int in_8(volatile unsigned char __iomem *addr) { int ret; @@ -72,7 +72,7 @@ extern inline void out_8(volatile unsigned char __iomem *addr, int val) __asm__ __volatile__("stb%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); } -extern inline int in_le16(const volatile unsigned short __iomem *addr) +extern inline int in_le16(volatile unsigned short __iomem *addr) { int ret; @@ -83,7 +83,7 @@ extern inline int in_le16(const volatile unsigned short __iomem *addr) return ret; } -extern inline int in_be16(const volatile unsigned short __iomem *addr) +extern inline int in_be16(volatile unsigned short __iomem *addr) { int ret; @@ -104,7 +104,7 @@ extern inline void out_be16(volatile unsigned short __iomem *addr, int val) __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); } -extern inline unsigned in_le32(const volatile unsigned __iomem *addr) +extern inline unsigned in_le32(volatile unsigned __iomem *addr) { unsigned ret; @@ -115,7 +115,7 @@ extern inline unsigned in_le32(const volatile unsigned __iomem *addr) return ret; } -extern inline unsigned in_be32(const volatile unsigned __iomem *addr) +extern inline unsigned in_be32(volatile unsigned __iomem *addr) { unsigned ret; @@ -139,7 +139,7 @@ extern inline void out_be32(volatile unsigned __iomem *addr, int val) #define readb(addr) in_8((volatile u8 *)(addr)) #define writeb(b,addr) out_8((volatile u8 *)(addr), (b)) #else -static inline __u8 readb(const volatile void __iomem *addr) +static inline __u8 readb(volatile void __iomem *addr) { return in_8(addr); } @@ -150,11 +150,11 @@ static inline void writeb(__u8 b, volatile void __iomem *addr) #endif #if defined(CONFIG_APUS) -static inline __u16 readw(const volatile void __iomem *addr) +static inline __u16 readw(volatile void __iomem *addr) { return *(__force volatile __u16 *)(addr); } -static inline __u32 readl(const volatile void __iomem *addr) +static inline __u32 readl(volatile void __iomem *addr) { return *(__force volatile __u32 *)(addr); } @@ -173,11 +173,11 @@ static inline void writel(__u32 b, volatile void __iomem *addr) #define writew(b,addr) out_le16((volatile u16 *)(addr),(b)) #define writel(b,addr) out_le32((volatile u32 *)(addr),(b)) #else -static inline __u16 readw(const volatile void __iomem *addr) +static inline __u16 readw(volatile void __iomem *addr) { return in_le16(addr); } -static inline __u32 readl(const volatile void __iomem *addr) +static inline __u32 readl(volatile void __iomem *addr) { return in_le32(addr); } diff --git a/trunk/include/asm-um/uaccess.h b/trunk/include/asm-um/uaccess.h index 2ee028b8de9d..801710d00a40 100644 --- a/trunk/include/asm-um/uaccess.h +++ b/trunk/include/asm-um/uaccess.h @@ -44,7 +44,7 @@ const __typeof__(ptr) __private_ptr = ptr; \ __typeof__(*(__private_ptr)) __private_val; \ int __private_ret = -EFAULT; \ - (x) = (__typeof__(*(__private_ptr)))0; \ + (x) = 0; \ if (__copy_from_user(&__private_val, (__private_ptr), \ sizeof(*(__private_ptr))) == 0) {\ (x) = (__typeof__(*(__private_ptr))) __private_val; \ diff --git a/trunk/include/asm-x86_64/msr.h b/trunk/include/asm-x86_64/msr.h index 5a7fe3c6c3d8..4d727f3f5550 100644 --- a/trunk/include/asm-x86_64/msr.h +++ b/trunk/include/asm-x86_64/msr.h @@ -234,7 +234,6 @@ static inline unsigned int cpuid_edx(unsigned int op) #define MSR_K8_TOP_MEM1 0xC001001A #define MSR_K8_TOP_MEM2 0xC001001D #define MSR_K8_SYSCFG 0xC0010010 -#define MSR_K8_HWCR 0xC0010015 /* K6 MSRs */ #define MSR_K6_EFER 0xC0000080 diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index c3ba31f210a9..afe6c61f13e5 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -107,26 +107,14 @@ extern unsigned long nr_iowait(void); #include -/* - * Task state bitmask. NOTE! These bits are also - * encoded in fs/proc/array.c: get_task_state(). - * - * We have two separate sets of flags: task->state - * is about runnability, while task->exit_state are - * about the task exiting. Confusing, but this way - * modifying one set can't modify the other one by - * mistake. - */ #define TASK_RUNNING 0 #define TASK_INTERRUPTIBLE 1 #define TASK_UNINTERRUPTIBLE 2 -#define TASK_STOPPED 4 -#define TASK_TRACED 8 -/* in tsk->exit_state */ -#define EXIT_ZOMBIE 16 -#define EXIT_DEAD 32 -/* in tsk->state again */ -#define TASK_NONINTERACTIVE 64 +#define TASK_NONINTERACTIVE 4 +#define TASK_STOPPED 8 +#define TASK_TRACED 16 +#define EXIT_ZOMBIE 32 +#define EXIT_DEAD 64 #define __set_task_state(tsk, state_value) \ do { (tsk)->state = (state_value); } while (0) diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 45a5719a0104..6a6e87b2f2fd 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -968,6 +968,8 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf, char *page; ssize_t retval = 0; char *s; + char *start; + ssize_t n; if (!(page = (char *)__get_free_page(GFP_KERNEL))) return -ENOMEM; @@ -997,7 +999,15 @@ static ssize_t cpuset_common_file_read(struct file *file, char __user *buf, *s++ = '\n'; *s = '\0'; - retval = simple_read_from_buffer(buf, nbytes, ppos, page, s - page); + start = page + *ppos; + n = s - start; + + /* Do nothing if *ppos is at the eof or beyond the eof. */ + if (n <= 0) + goto out; + + retval = n - copy_to_user(buf, start, min(n, nbytes)); + *ppos += retval; out: free_page((unsigned long)page); return retval; diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index 619b027e92b5..5a274705ba19 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1763,8 +1763,7 @@ do_signal_stop(int signr) * stop is always done with the siglock held, * so this check has no races. */ - if (!t->exit_state && - !(t->state & (TASK_STOPPED|TASK_TRACED))) { + if (t->state < TASK_STOPPED) { stop_count++; signal_wake_up(t, 0); } diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index caf2e2cff293..c5b911f9b662 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/net/ipv4/tcp_output.c @@ -194,12 +194,11 @@ void tcp_select_initial_window(int __space, __u32 mss, * will be satisfied with 2. */ if (mss > (1<<*rcv_wscale)) { - int init_cwnd; - - if (mss > 1460) + int init_cwnd = 4; + if (mss > 1460*3) init_cwnd = 2; - else - init_cwnd = (mss > 1095) ? 3 : 4; + else if (mss > 1460) + init_cwnd = 3; if (*rcv_wnd > init_cwnd*mss) *rcv_wnd = init_cwnd*mss; }