diff --git a/[refs] b/[refs] index b981e673d78c..bae00090d052 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d8f4b819c3a5b54a978c6fe5249a17cff490c4a1 +refs/heads/master: b8b572e1015f81b4e748417be2629dfe51ab99f9 diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index 928a79ceb7aa..de4063cb4fdc 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -278,7 +278,7 @@ it with special cases. a 64-bit platform. d) request and get assigned a platform number (see PLATFORM_* - constants in include/asm-powerpc/processor.h + constants in arch/powerpc/include/asm/processor.h 32-bit embedded kernels: @@ -340,7 +340,7 @@ the block to RAM before passing it to the kernel. --------- The kernel is entered with r3 pointing to an area of memory that is - roughly described in include/asm-powerpc/prom.h by the structure + roughly described in arch/powerpc/include/asm/prom.h by the structure boot_param_header: struct boot_param_header { diff --git a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt index df7afe43d462..9d4e33df624c 100644 --- a/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt +++ b/trunk/Documentation/powerpc/eeh-pci-error-recovery.txt @@ -133,7 +133,7 @@ error. Given an arbitrary address, the routine pci_get_device_by_addr() will find the pci device associated with that address (if any). -The default include/asm-powerpc/io.h macros readb(), inb(), insb(), +The default arch/powerpc/include/asm/io.h macros readb(), inb(), insb(), etc. include a check to see if the i/o read returned all-0xff's. If so, these make a call to eeh_dn_check_failure(), which in turn asks the firmware if the all-ff's value is the sign of a true EEH diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 8223a521d7c3..5e6d6ab82433 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -502,12 +502,6 @@ L: openezx-devel@lists.openezx.org (subscribers-only) W: http://www.openezx.org/ S: Maintained -ARM/FREESCALE IMX / MXC ARM ARCHITECTURE -P: Sascha Hauer -M: kernel@pengutronix.de -L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) -S: Maintained - ARM/GLOMATION GESBC9312SX MACHINE SUPPORT P: Lennert Buytenhek M: kernel@wantstofly.org diff --git a/trunk/arch/arm/boot/compressed/Makefile b/trunk/arch/arm/boot/compressed/Makefile index 94462a097f86..95baac4939e0 100644 --- a/trunk/arch/arm/boot/compressed/Makefile +++ b/trunk/arch/arm/boot/compressed/Makefile @@ -112,3 +112,6 @@ $(obj)/font.c: $(FONTC) $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config @sed "$(SEDFLAGS)" < $< > $@ + +$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c + diff --git a/trunk/arch/arm/kernel/head-common.S b/trunk/arch/arm/kernel/head-common.S index 1c3c6ea5f9e7..7e9c00a8a412 100644 --- a/trunk/arch/arm/kernel/head-common.S +++ b/trunk/arch/arm/kernel/head-common.S @@ -181,7 +181,7 @@ ENTRY(lookup_processor_type) ldmfd sp!, {r4 - r7, r9, pc} /* - * Look in and arch/arm/kernel/arch.[ch] for + * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for * more information about the __proc_info and __arch_info structures. */ .long __proc_info_begin diff --git a/trunk/arch/arm/lib/getuser.S b/trunk/arch/arm/lib/getuser.S index 2034d4dbe6ad..1dd8ea4f9a9c 100644 --- a/trunk/arch/arm/lib/getuser.S +++ b/trunk/arch/arm/lib/getuser.S @@ -20,7 +20,7 @@ * r2, r3 contains the zero-extended value * lr corrupted * - * No other registers must be altered. (see + * No other registers must be altered. (see include/asm-arm/uaccess.h * for specific ASM register usage). * * Note that ADDR_LIMIT is either 0 or 0xc0000000. diff --git a/trunk/arch/arm/lib/putuser.S b/trunk/arch/arm/lib/putuser.S index 08ec7dffa52e..8620afe54f72 100644 --- a/trunk/arch/arm/lib/putuser.S +++ b/trunk/arch/arm/lib/putuser.S @@ -20,7 +20,7 @@ * Outputs: r0 is the error code * lr corrupted * - * No other registers must be altered. (see + * No other registers must be altered. (see include/asm-arm/uaccess.h * for specific ASM register usage). * * Note that ADDR_LIMIT is either 0 or 0xc0000000 diff --git a/trunk/arch/arm/mach-imx/clock.c b/trunk/arch/arm/mach-imx/clock.c index 8915a5fc63cd..6a90fe5578df 100644 --- a/trunk/arch/arm/mach-imx/clock.c +++ b/trunk/arch/arm/mach-imx/clock.c @@ -172,29 +172,24 @@ struct clk *clk_get(struct device *dev, const char *id) return clk; } -EXPORT_SYMBOL(clk_get); void clk_put(struct clk *clk) { } -EXPORT_SYMBOL(clk_put); int clk_enable(struct clk *clk) { return 0; } -EXPORT_SYMBOL(clk_enable); void clk_disable(struct clk *clk) { } -EXPORT_SYMBOL(clk_disable); unsigned long clk_get_rate(struct clk *clk) { return clk->get_rate(); } -EXPORT_SYMBOL(clk_get_rate); int imx_clocks_init(void) { diff --git a/trunk/arch/arm/mach-imx/generic.c b/trunk/arch/arm/mach-imx/generic.c index c40650dcddf5..98ddd8a6d05f 100644 --- a/trunk/arch/arm/mach-imx/generic.c +++ b/trunk/arch/arm/mach-imx/generic.c @@ -251,6 +251,7 @@ void __init set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info) { memcpy(&imx_fb_info,hard_imx_fb_info,sizeof(struct imxfb_mach_info)); } +EXPORT_SYMBOL(set_imx_fb_info); static struct resource imxfb_resources[] = { [0] = { diff --git a/trunk/arch/arm/mach-imx/mx1ads.c b/trunk/arch/arm/mach-imx/mx1ads.c index baeff24ff02d..9635d5812bcd 100644 --- a/trunk/arch/arm/mach-imx/mx1ads.c +++ b/trunk/arch/arm/mach-imx/mx1ads.c @@ -125,7 +125,7 @@ static struct platform_device *devices[] __initdata = { &imx_uart2_device, }; -#if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) +#ifdef CONFIG_MMC_IMX static int mx1ads_mmc_card_present(struct device *dev) { /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ @@ -143,7 +143,7 @@ mx1ads_init(void) #ifdef CONFIG_LEDS imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); #endif -#if defined(CONFIG_MMC_IMX) || defined(CONFIG_MMC_IMX_MODULE) +#ifdef CONFIG_MMC_IMX /* SD/MMC card detect */ imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); imx_set_mmc_info(&mx1ads_mmc_info); diff --git a/trunk/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/trunk/arch/arm/mach-ns9xxx/board-a9m9750dev.c index 46b4f5a2e7f4..a494b71c0195 100644 --- a/trunk/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ b/trunk/arch/arm/mach-ns9xxx/board-a9m9750dev.c @@ -13,12 +13,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "board-a9m9750dev.h" diff --git a/trunk/arch/arm/mach-ns9xxx/gpio-ns9360.c b/trunk/arch/arm/mach-ns9xxx/gpio-ns9360.c index 7bc05a4b45b8..cabfb879dda9 100644 --- a/trunk/arch/arm/mach-ns9xxx/gpio-ns9360.c +++ b/trunk/arch/arm/mach-ns9xxx/gpio-ns9360.c @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include "gpio-ns9360.h" diff --git a/trunk/arch/arm/mach-ns9xxx/gpio.c b/trunk/arch/arm/mach-ns9xxx/gpio.c index ed4c83389d4a..b3c963b0c8f5 100644 --- a/trunk/arch/arm/mach-ns9xxx/gpio.c +++ b/trunk/arch/arm/mach-ns9xxx/gpio.c @@ -13,9 +13,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/trunk/arch/arm/mach-ns9xxx/irq.c b/trunk/arch/arm/mach-ns9xxx/irq.c index d2964257797e..ca85d24cf39f 100644 --- a/trunk/arch/arm/mach-ns9xxx/irq.c +++ b/trunk/arch/arm/mach-ns9xxx/irq.c @@ -13,9 +13,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "generic.h" diff --git a/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c index 7714233fb004..9623fff6b3bc 100644 --- a/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c +++ b/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include "board-a9m9750dev.h" #include "generic.h" diff --git a/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360js.c b/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360js.c index bdbd0bb1a0b3..fcc815bdd291 100644 --- a/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360js.c +++ b/trunk/arch/arm/mach-ns9xxx/mach-cc9p9360js.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include "board-jscc9p9360.h" #include "generic.h" diff --git a/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c b/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c index c9cce9b4e6c9..5aa5d9baf8c8 100644 --- a/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c +++ b/trunk/arch/arm/mach-ns9xxx/plat-serial8250.c @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #define DRIVER_NAME "serial8250" diff --git a/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c b/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c index 8ee81b59b35d..2bee0b7fccbb 100644 --- a/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c +++ b/trunk/arch/arm/mach-ns9xxx/processor-ns9360.c @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include void ns9360_reset(char mode) { diff --git a/trunk/arch/arm/mach-ns9xxx/time-ns9360.c b/trunk/arch/arm/mach-ns9xxx/time-ns9360.c index 66bd58262974..4d573c9793ed 100644 --- a/trunk/arch/arm/mach-ns9xxx/time-ns9360.c +++ b/trunk/arch/arm/mach-ns9xxx/time-ns9360.c @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include "generic.h" diff --git a/trunk/arch/arm/mach-pxa/pcm990-baseboard.c b/trunk/arch/arm/mach-pxa/pcm990-baseboard.c index 90056d56b210..30023b00e476 100644 --- a/trunk/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/trunk/arch/arm/mach-pxa/pcm990-baseboard.c @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/arm/mm/Kconfig b/trunk/arch/arm/mm/Kconfig index ed15f876c725..3a6c8ec34cd9 100644 --- a/trunk/arch/arm/mm/Kconfig +++ b/trunk/arch/arm/mm/Kconfig @@ -187,7 +187,7 @@ config CPU_ARM926T ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ - ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 + ARCH_NS9XXX || ARCH_DAVINCI default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || \ ARCH_OMAP730 || ARCH_OMAP16XX || \ ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ @@ -742,11 +742,3 @@ config CACHE_L2X0 select OUTER_CACHE help This option enables the L2x0 PrimeCell. - -config CACHE_XSC3L2 - bool "Enable the L2 cache on XScale3" - depends on CPU_XSC3 - default y - select OUTER_CACHE - help - This option enables the L2 cache on XScale3. diff --git a/trunk/arch/arm/mm/cache-xsc3l2.c b/trunk/arch/arm/mm/cache-xsc3l2.c deleted file mode 100644 index 158bd96763d3..000000000000 --- a/trunk/arch/arm/mm/cache-xsc3l2.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * arch/arm/mm/cache-xsc3l2.c - XScale3 L2 cache controller support - * - * Copyright (C) 2007 ARM Limited - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include - -#include -#include -#include - -#define CR_L2 (1 << 26) - -#define CACHE_LINE_SIZE 32 -#define CACHE_LINE_SHIFT 5 -#define CACHE_WAY_PER_SET 8 - -#define CACHE_WAY_SIZE(l2ctype) (8192 << (((l2ctype) >> 8) & 0xf)) -#define CACHE_SET_SIZE(l2ctype) (CACHE_WAY_SIZE(l2ctype) >> CACHE_LINE_SHIFT) - -static inline int xsc3_l2_present(void) -{ - unsigned long l2ctype; - - __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); - - return !!(l2ctype & 0xf8); -} - -static inline void xsc3_l2_clean_mva(unsigned long addr) -{ - __asm__("mcr p15, 1, %0, c7, c11, 1" : : "r" (addr)); -} - -static inline void xsc3_l2_clean_pa(unsigned long addr) -{ - xsc3_l2_clean_mva(__phys_to_virt(addr)); -} - -static inline void xsc3_l2_inv_mva(unsigned long addr) -{ - __asm__("mcr p15, 1, %0, c7, c7, 1" : : "r" (addr)); -} - -static inline void xsc3_l2_inv_pa(unsigned long addr) -{ - xsc3_l2_inv_mva(__phys_to_virt(addr)); -} - -static inline void xsc3_l2_inv_all(void) -{ - unsigned long l2ctype, set_way; - int set, way; - - __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); - - for (set = 0; set < CACHE_SET_SIZE(l2ctype); set++) { - for (way = 0; way < CACHE_WAY_PER_SET; way++) { - set_way = (way << 29) | (set << 5); - __asm__("mcr p15, 1, %0, c7, c11, 2" : : "r"(set_way)); - } - } - - dsb(); -} - -static void xsc3_l2_inv_range(unsigned long start, unsigned long end) -{ - if (start == 0 && end == -1ul) { - xsc3_l2_inv_all(); - return; - } - - /* - * Clean and invalidate partial first cache line. - */ - if (start & (CACHE_LINE_SIZE - 1)) { - xsc3_l2_clean_pa(start & ~(CACHE_LINE_SIZE - 1)); - xsc3_l2_inv_pa(start & ~(CACHE_LINE_SIZE - 1)); - start = (start | (CACHE_LINE_SIZE - 1)) + 1; - } - - /* - * Clean and invalidate partial last cache line. - */ - if (end & (CACHE_LINE_SIZE - 1)) { - xsc3_l2_clean_pa(end & ~(CACHE_LINE_SIZE - 1)); - xsc3_l2_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); - end &= ~(CACHE_LINE_SIZE - 1); - } - - /* - * Invalidate all full cache lines between 'start' and 'end'. - */ - while (start != end) { - xsc3_l2_inv_pa(start); - start += CACHE_LINE_SIZE; - } - - dsb(); -} - -static void xsc3_l2_clean_range(unsigned long start, unsigned long end) -{ - start &= ~(CACHE_LINE_SIZE - 1); - while (start < end) { - xsc3_l2_clean_pa(start); - start += CACHE_LINE_SIZE; - } - - dsb(); -} - -/* - * optimize L2 flush all operation by set/way format - */ -static inline void xsc3_l2_flush_all(void) -{ - unsigned long l2ctype, set_way; - int set, way; - - __asm__("mrc p15, 1, %0, c0, c0, 1" : "=r" (l2ctype)); - - for (set = 0; set < CACHE_SET_SIZE(l2ctype); set++) { - for (way = 0; way < CACHE_WAY_PER_SET; way++) { - set_way = (way << 29) | (set << 5); - __asm__("mcr p15, 1, %0, c7, c15, 2" : : "r"(set_way)); - } - } - - dsb(); -} - -static void xsc3_l2_flush_range(unsigned long start, unsigned long end) -{ - if (start == 0 && end == -1ul) { - xsc3_l2_flush_all(); - return; - } - - start &= ~(CACHE_LINE_SIZE - 1); - while (start < end) { - xsc3_l2_clean_pa(start); - xsc3_l2_inv_pa(start); - start += CACHE_LINE_SIZE; - } - - dsb(); -} - -static int __init xsc3_l2_init(void) -{ - if (!cpu_is_xsc3() || !xsc3_l2_present()) - return 0; - - if (!(get_cr() & CR_L2)) { - pr_info("XScale3 L2 cache enabled.\n"); - adjust_cr(CR_L2, CR_L2); - xsc3_l2_inv_all(); - } - - outer_cache.inv_range = xsc3_l2_inv_range; - outer_cache.clean_range = xsc3_l2_clean_range; - outer_cache.flush_range = xsc3_l2_flush_range; - - return 0; -} -core_initcall(xsc3_l2_init); diff --git a/trunk/arch/arm/mm/init.c b/trunk/arch/arm/mm/init.c index 30a69d67d673..e6352946dde0 100644 --- a/trunk/arch/arm/mm/init.c +++ b/trunk/arch/arm/mm/init.c @@ -156,9 +156,9 @@ static int __init check_initrd(struct meminfo *mi) } if (initrd_node == -1) { - printk(KERN_ERR "INITRD: 0x%08lx+0x%08lx extends beyond " + printk(KERN_ERR "initrd (0x%08lx - 0x%08lx) extends beyond " "physical memory - disabling initrd\n", - phys_initrd_start, phys_initrd_size); + phys_initrd_start, end); phys_initrd_start = phys_initrd_size = 0; } #endif @@ -239,32 +239,24 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi) reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, boot_pages << PAGE_SHIFT, BOOTMEM_DEFAULT); - /* - * Reserve any special node zero regions. - */ - if (node == 0) - reserve_node_zero(pgdat); - #ifdef CONFIG_BLK_DEV_INITRD /* * If the initrd is in this node, reserve its memory. */ if (node == initrd_node) { - int res = reserve_bootmem_node(pgdat, phys_initrd_start, - phys_initrd_size, BOOTMEM_EXCLUSIVE); - - if (res == 0) { - initrd_start = __phys_to_virt(phys_initrd_start); - initrd_end = initrd_start + phys_initrd_size; - } else { - printk(KERN_ERR - "INITRD: 0x%08lx+0x%08lx overlaps in-use " - "memory region - disabling initrd\n", - phys_initrd_start, phys_initrd_size); - } + reserve_bootmem_node(pgdat, phys_initrd_start, + phys_initrd_size, BOOTMEM_DEFAULT); + initrd_start = __phys_to_virt(phys_initrd_start); + initrd_end = initrd_start + phys_initrd_size; } #endif + /* + * Finally, reserve any node zero regions. + */ + if (node == 0) + reserve_node_zero(pgdat); + /* * initialise the zones within this node. */ diff --git a/trunk/arch/arm/mm/ioremap.c b/trunk/arch/arm/mm/ioremap.c index b81dbf9ffb77..303a7ff6bfd2 100644 --- a/trunk/arch/arm/mm/ioremap.c +++ b/trunk/arch/arm/mm/ioremap.c @@ -259,7 +259,7 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, * caller shouldn't need to know that small detail. * * 'flags' are the extra L_PTE_ flags that you want to specify for this - * mapping. See for more information. + * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. */ void __iomem * __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, diff --git a/trunk/arch/arm/mm/proc-arm720.S b/trunk/arch/arm/mm/proc-arm720.S index eda733d30455..d64f8e6f75ab 100644 --- a/trunk/arch/arm/mm/proc-arm720.S +++ b/trunk/arch/arm/mm/proc-arm720.S @@ -231,7 +231,7 @@ cpu_arm720_name: .align /* - * See for a definition of this structure. + * See linux/include/asm-arm/procinfo.h for a definition of this structure. */ .section ".proc.info.init", #alloc, #execinstr diff --git a/trunk/arch/arm/mm/proc-xsc3.S b/trunk/arch/arm/mm/proc-xsc3.S index 6ff53c24510f..3533741a76f6 100644 --- a/trunk/arch/arm/mm/proc-xsc3.S +++ b/trunk/arch/arm/mm/proc-xsc3.S @@ -51,6 +51,11 @@ */ #define CACHESIZE 32768 +/* + * Run with L2 enabled. + */ +#define L2_CACHE_ENABLE 1 + /* * This macro is used to wait for a CP15 write and is needed when we * have to ensure that the last operation to the coprocessor was @@ -260,9 +265,12 @@ ENTRY(xsc3_dma_inv_range) tst r0, #CACHELINESIZE - 1 bic r0, r0, #CACHELINESIZE - 1 mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line + mcrne p15, 1, r0, c7, c11, 1 @ clean L2 line tst r1, #CACHELINESIZE - 1 mcrne p15, 0, r1, c7, c10, 1 @ clean L1 D line + mcrne p15, 1, r1, c7, c11, 1 @ clean L2 line 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate L1 D line + mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line add r0, r0, #CACHELINESIZE cmp r0, r1 blo 1b @@ -280,6 +288,7 @@ ENTRY(xsc3_dma_inv_range) ENTRY(xsc3_dma_clean_range) bic r0, r0, #CACHELINESIZE - 1 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line + mcr p15, 1, r0, c7, c11, 1 @ clean L2 line add r0, r0, #CACHELINESIZE cmp r0, r1 blo 1b @@ -297,6 +306,8 @@ ENTRY(xsc3_dma_clean_range) ENTRY(xsc3_dma_flush_range) bic r0, r0, #CACHELINESIZE - 1 1: mcr p15, 0, r0, c7, c14, 1 @ clean/invalidate L1 D line + mcr p15, 1, r0, c7, c11, 1 @ clean L2 line + mcr p15, 1, r0, c7, c7, 1 @ invalidate L2 line add r0, r0, #CACHELINESIZE cmp r0, r1 blo 1b @@ -336,7 +347,9 @@ ENTRY(cpu_xsc3_switch_mm) mcr p15, 0, ip, c7, c5, 0 @ invalidate L1 I cache and BTB mcr p15, 0, ip, c7, c10, 4 @ data write barrier mcr p15, 0, ip, c7, c5, 4 @ prefetch flush +#ifdef L2_CACHE_ENABLE orr r0, r0, #0x18 @ cache the page table in L2 +#endif mcr p15, 0, r0, c2, c0, 0 @ load page table pointer mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs cpwait_ret lr, ip @@ -365,10 +378,12 @@ ENTRY(cpu_xsc3_set_pte_ext) orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w @ combined with user -> user r/w +#if L2_CACHE_ENABLE @ If it's cacheable, it needs to be in L2 also. eor ip, r1, #L_PTE_CACHEABLE tst ip, #L_PTE_CACHEABLE orreq r2, r2, #PTE_EXT_TEX(0x5) +#endif tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? movne r2, #0 @ no -> fault @@ -393,7 +408,9 @@ __xsc3_setup: mcr p15, 0, ip, c7, c10, 4 @ data write barrier mcr p15, 0, ip, c7, c5, 4 @ prefetch flush mcr p15, 0, ip, c8, c7, 0 @ invalidate I and D TLBs +#if L2_CACHE_ENABLE orr r4, r4, #0x18 @ cache the page table in L2 +#endif mcr p15, 0, r4, c2, c0, 0 @ load page table pointer mov r0, #0 @ don't allow CP access @@ -401,7 +418,9 @@ __xsc3_setup: mrc p15, 0, r0, c1, c0, 1 @ get auxiliary control reg and r0, r0, #2 @ preserve bit P bit setting +#if L2_CACHE_ENABLE orr r0, r0, #(1 << 10) @ enable L2 for LLR cache +#endif mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg adr r5, xsc3_crval @@ -410,6 +429,9 @@ __xsc3_setup: bic r0, r0, r5 @ ..V. ..R. .... ..A. orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu) @ ...I Z..S .... .... (uc) +#if L2_CACHE_ENABLE + orr r0, r0, #0x04000000 @ L2 enable +#endif mov pc, lr .size __xsc3_setup, . - __xsc3_setup diff --git a/trunk/arch/arm/nwfpe/fpa11.h b/trunk/arch/arm/nwfpe/fpa11.h index 386cbd13eaf4..4a4d02c09112 100644 --- a/trunk/arch/arm/nwfpe/fpa11.h +++ b/trunk/arch/arm/nwfpe/fpa11.h @@ -69,7 +69,7 @@ typedef union tagFPREG { * This structure is exported to user space. Do not re-order. * Only add new stuff to the end, and do not change the size of * any element. Elements of this structure are used by user - * space, and must match struct user_fp in . + * space, and must match struct user_fp in include/asm-arm/user.h. * We include the byte offsets below for documentation purposes. * * The size of this structure and FPREG are checked by fpmodule.c diff --git a/trunk/arch/mn10300/kernel/module.c b/trunk/arch/mn10300/kernel/module.c index 8fa36893df7a..0e4d2f6fa6e8 100644 --- a/trunk/arch/mn10300/kernel/module.c +++ b/trunk/arch/mn10300/kernel/module.c @@ -24,7 +24,6 @@ #include #include #include -#include #if 0 #define DEBUGP printk @@ -196,7 +195,7 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) { - return module_bug_finalize(hdr, sechdrs, me); + return 0; } /* @@ -204,5 +203,4 @@ int module_finalize(const Elf_Ehdr *hdr, */ void module_arch_cleanup(struct module *mod) { - module_bug_cleanup(mod); } diff --git a/trunk/arch/powerpc/boot/io.h b/trunk/arch/powerpc/boot/io.h index ccaedaec50d5..7c09f4861fe1 100644 --- a/trunk/arch/powerpc/boot/io.h +++ b/trunk/arch/powerpc/boot/io.h @@ -6,7 +6,7 @@ /* * Low-level I/O routines. * - * Copied from (which has no copyright) + * Copied from (which has no copyright) */ static inline int in_8(const volatile unsigned char *addr) { diff --git a/trunk/include/asm-powerpc/8253pit.h b/trunk/arch/powerpc/include/asm/8253pit.h similarity index 100% rename from trunk/include/asm-powerpc/8253pit.h rename to trunk/arch/powerpc/include/asm/8253pit.h diff --git a/trunk/include/asm-powerpc/8xx_immap.h b/trunk/arch/powerpc/include/asm/8xx_immap.h similarity index 100% rename from trunk/include/asm-powerpc/8xx_immap.h rename to trunk/arch/powerpc/include/asm/8xx_immap.h diff --git a/trunk/include/asm-powerpc/Kbuild b/trunk/arch/powerpc/include/asm/Kbuild similarity index 100% rename from trunk/include/asm-powerpc/Kbuild rename to trunk/arch/powerpc/include/asm/Kbuild diff --git a/trunk/include/asm-powerpc/a.out.h b/trunk/arch/powerpc/include/asm/a.out.h similarity index 100% rename from trunk/include/asm-powerpc/a.out.h rename to trunk/arch/powerpc/include/asm/a.out.h diff --git a/trunk/include/asm-powerpc/abs_addr.h b/trunk/arch/powerpc/include/asm/abs_addr.h similarity index 100% rename from trunk/include/asm-powerpc/abs_addr.h rename to trunk/arch/powerpc/include/asm/abs_addr.h diff --git a/trunk/include/asm-powerpc/agp.h b/trunk/arch/powerpc/include/asm/agp.h similarity index 100% rename from trunk/include/asm-powerpc/agp.h rename to trunk/arch/powerpc/include/asm/agp.h diff --git a/trunk/include/asm-powerpc/asm-compat.h b/trunk/arch/powerpc/include/asm/asm-compat.h similarity index 100% rename from trunk/include/asm-powerpc/asm-compat.h rename to trunk/arch/powerpc/include/asm/asm-compat.h diff --git a/trunk/include/asm-powerpc/atomic.h b/trunk/arch/powerpc/include/asm/atomic.h similarity index 100% rename from trunk/include/asm-powerpc/atomic.h rename to trunk/arch/powerpc/include/asm/atomic.h diff --git a/trunk/include/asm-powerpc/auxvec.h b/trunk/arch/powerpc/include/asm/auxvec.h similarity index 100% rename from trunk/include/asm-powerpc/auxvec.h rename to trunk/arch/powerpc/include/asm/auxvec.h diff --git a/trunk/include/asm-powerpc/backlight.h b/trunk/arch/powerpc/include/asm/backlight.h similarity index 100% rename from trunk/include/asm-powerpc/backlight.h rename to trunk/arch/powerpc/include/asm/backlight.h diff --git a/trunk/include/asm-powerpc/bitops.h b/trunk/arch/powerpc/include/asm/bitops.h similarity index 100% rename from trunk/include/asm-powerpc/bitops.h rename to trunk/arch/powerpc/include/asm/bitops.h diff --git a/trunk/include/asm-powerpc/bootx.h b/trunk/arch/powerpc/include/asm/bootx.h similarity index 100% rename from trunk/include/asm-powerpc/bootx.h rename to trunk/arch/powerpc/include/asm/bootx.h diff --git a/trunk/include/asm-powerpc/btext.h b/trunk/arch/powerpc/include/asm/btext.h similarity index 100% rename from trunk/include/asm-powerpc/btext.h rename to trunk/arch/powerpc/include/asm/btext.h diff --git a/trunk/include/asm-powerpc/bug.h b/trunk/arch/powerpc/include/asm/bug.h similarity index 100% rename from trunk/include/asm-powerpc/bug.h rename to trunk/arch/powerpc/include/asm/bug.h diff --git a/trunk/include/asm-powerpc/bugs.h b/trunk/arch/powerpc/include/asm/bugs.h similarity index 100% rename from trunk/include/asm-powerpc/bugs.h rename to trunk/arch/powerpc/include/asm/bugs.h diff --git a/trunk/include/asm-powerpc/byteorder.h b/trunk/arch/powerpc/include/asm/byteorder.h similarity index 100% rename from trunk/include/asm-powerpc/byteorder.h rename to trunk/arch/powerpc/include/asm/byteorder.h diff --git a/trunk/include/asm-powerpc/cache.h b/trunk/arch/powerpc/include/asm/cache.h similarity index 100% rename from trunk/include/asm-powerpc/cache.h rename to trunk/arch/powerpc/include/asm/cache.h diff --git a/trunk/include/asm-powerpc/cacheflush.h b/trunk/arch/powerpc/include/asm/cacheflush.h similarity index 100% rename from trunk/include/asm-powerpc/cacheflush.h rename to trunk/arch/powerpc/include/asm/cacheflush.h diff --git a/trunk/include/asm-powerpc/cell-pmu.h b/trunk/arch/powerpc/include/asm/cell-pmu.h similarity index 100% rename from trunk/include/asm-powerpc/cell-pmu.h rename to trunk/arch/powerpc/include/asm/cell-pmu.h diff --git a/trunk/include/asm-powerpc/cell-regs.h b/trunk/arch/powerpc/include/asm/cell-regs.h similarity index 100% rename from trunk/include/asm-powerpc/cell-regs.h rename to trunk/arch/powerpc/include/asm/cell-regs.h diff --git a/trunk/include/asm-powerpc/checksum.h b/trunk/arch/powerpc/include/asm/checksum.h similarity index 100% rename from trunk/include/asm-powerpc/checksum.h rename to trunk/arch/powerpc/include/asm/checksum.h diff --git a/trunk/include/asm-powerpc/clk_interface.h b/trunk/arch/powerpc/include/asm/clk_interface.h similarity index 100% rename from trunk/include/asm-powerpc/clk_interface.h rename to trunk/arch/powerpc/include/asm/clk_interface.h diff --git a/trunk/include/asm-powerpc/code-patching.h b/trunk/arch/powerpc/include/asm/code-patching.h similarity index 100% rename from trunk/include/asm-powerpc/code-patching.h rename to trunk/arch/powerpc/include/asm/code-patching.h diff --git a/trunk/include/asm-powerpc/compat.h b/trunk/arch/powerpc/include/asm/compat.h similarity index 100% rename from trunk/include/asm-powerpc/compat.h rename to trunk/arch/powerpc/include/asm/compat.h diff --git a/trunk/include/asm-powerpc/cpm.h b/trunk/arch/powerpc/include/asm/cpm.h similarity index 100% rename from trunk/include/asm-powerpc/cpm.h rename to trunk/arch/powerpc/include/asm/cpm.h diff --git a/trunk/include/asm-powerpc/cpm1.h b/trunk/arch/powerpc/include/asm/cpm1.h similarity index 100% rename from trunk/include/asm-powerpc/cpm1.h rename to trunk/arch/powerpc/include/asm/cpm1.h diff --git a/trunk/include/asm-powerpc/cpm2.h b/trunk/arch/powerpc/include/asm/cpm2.h similarity index 100% rename from trunk/include/asm-powerpc/cpm2.h rename to trunk/arch/powerpc/include/asm/cpm2.h diff --git a/trunk/include/asm-powerpc/cputable.h b/trunk/arch/powerpc/include/asm/cputable.h similarity index 100% rename from trunk/include/asm-powerpc/cputable.h rename to trunk/arch/powerpc/include/asm/cputable.h diff --git a/trunk/include/asm-powerpc/cputhreads.h b/trunk/arch/powerpc/include/asm/cputhreads.h similarity index 100% rename from trunk/include/asm-powerpc/cputhreads.h rename to trunk/arch/powerpc/include/asm/cputhreads.h diff --git a/trunk/include/asm-powerpc/cputime.h b/trunk/arch/powerpc/include/asm/cputime.h similarity index 100% rename from trunk/include/asm-powerpc/cputime.h rename to trunk/arch/powerpc/include/asm/cputime.h diff --git a/trunk/include/asm-powerpc/current.h b/trunk/arch/powerpc/include/asm/current.h similarity index 100% rename from trunk/include/asm-powerpc/current.h rename to trunk/arch/powerpc/include/asm/current.h diff --git a/trunk/include/asm-powerpc/dbdma.h b/trunk/arch/powerpc/include/asm/dbdma.h similarity index 100% rename from trunk/include/asm-powerpc/dbdma.h rename to trunk/arch/powerpc/include/asm/dbdma.h diff --git a/trunk/include/asm-powerpc/dcr-generic.h b/trunk/arch/powerpc/include/asm/dcr-generic.h similarity index 100% rename from trunk/include/asm-powerpc/dcr-generic.h rename to trunk/arch/powerpc/include/asm/dcr-generic.h diff --git a/trunk/include/asm-powerpc/dcr-mmio.h b/trunk/arch/powerpc/include/asm/dcr-mmio.h similarity index 100% rename from trunk/include/asm-powerpc/dcr-mmio.h rename to trunk/arch/powerpc/include/asm/dcr-mmio.h diff --git a/trunk/include/asm-powerpc/dcr-native.h b/trunk/arch/powerpc/include/asm/dcr-native.h similarity index 100% rename from trunk/include/asm-powerpc/dcr-native.h rename to trunk/arch/powerpc/include/asm/dcr-native.h diff --git a/trunk/include/asm-powerpc/dcr-regs.h b/trunk/arch/powerpc/include/asm/dcr-regs.h similarity index 100% rename from trunk/include/asm-powerpc/dcr-regs.h rename to trunk/arch/powerpc/include/asm/dcr-regs.h diff --git a/trunk/include/asm-powerpc/dcr.h b/trunk/arch/powerpc/include/asm/dcr.h similarity index 100% rename from trunk/include/asm-powerpc/dcr.h rename to trunk/arch/powerpc/include/asm/dcr.h diff --git a/trunk/include/asm-powerpc/delay.h b/trunk/arch/powerpc/include/asm/delay.h similarity index 100% rename from trunk/include/asm-powerpc/delay.h rename to trunk/arch/powerpc/include/asm/delay.h diff --git a/trunk/include/asm-powerpc/device.h b/trunk/arch/powerpc/include/asm/device.h similarity index 100% rename from trunk/include/asm-powerpc/device.h rename to trunk/arch/powerpc/include/asm/device.h diff --git a/trunk/arch/s390/include/asm/div64.h b/trunk/arch/powerpc/include/asm/div64.h similarity index 100% rename from trunk/arch/s390/include/asm/div64.h rename to trunk/arch/powerpc/include/asm/div64.h diff --git a/trunk/include/asm-powerpc/dma-mapping.h b/trunk/arch/powerpc/include/asm/dma-mapping.h similarity index 100% rename from trunk/include/asm-powerpc/dma-mapping.h rename to trunk/arch/powerpc/include/asm/dma-mapping.h diff --git a/trunk/include/asm-powerpc/dma.h b/trunk/arch/powerpc/include/asm/dma.h similarity index 100% rename from trunk/include/asm-powerpc/dma.h rename to trunk/arch/powerpc/include/asm/dma.h diff --git a/trunk/include/asm-powerpc/edac.h b/trunk/arch/powerpc/include/asm/edac.h similarity index 100% rename from trunk/include/asm-powerpc/edac.h rename to trunk/arch/powerpc/include/asm/edac.h diff --git a/trunk/include/asm-powerpc/eeh.h b/trunk/arch/powerpc/include/asm/eeh.h similarity index 100% rename from trunk/include/asm-powerpc/eeh.h rename to trunk/arch/powerpc/include/asm/eeh.h diff --git a/trunk/include/asm-powerpc/eeh_event.h b/trunk/arch/powerpc/include/asm/eeh_event.h similarity index 100% rename from trunk/include/asm-powerpc/eeh_event.h rename to trunk/arch/powerpc/include/asm/eeh_event.h diff --git a/trunk/include/asm-powerpc/elf.h b/trunk/arch/powerpc/include/asm/elf.h similarity index 100% rename from trunk/include/asm-powerpc/elf.h rename to trunk/arch/powerpc/include/asm/elf.h diff --git a/trunk/include/asm-powerpc/emergency-restart.h b/trunk/arch/powerpc/include/asm/emergency-restart.h similarity index 100% rename from trunk/include/asm-powerpc/emergency-restart.h rename to trunk/arch/powerpc/include/asm/emergency-restart.h diff --git a/trunk/include/asm-powerpc/errno.h b/trunk/arch/powerpc/include/asm/errno.h similarity index 100% rename from trunk/include/asm-powerpc/errno.h rename to trunk/arch/powerpc/include/asm/errno.h diff --git a/trunk/include/asm-powerpc/exception.h b/trunk/arch/powerpc/include/asm/exception.h similarity index 100% rename from trunk/include/asm-powerpc/exception.h rename to trunk/arch/powerpc/include/asm/exception.h diff --git a/trunk/include/asm-powerpc/fb.h b/trunk/arch/powerpc/include/asm/fb.h similarity index 100% rename from trunk/include/asm-powerpc/fb.h rename to trunk/arch/powerpc/include/asm/fb.h diff --git a/trunk/include/asm-powerpc/fcntl.h b/trunk/arch/powerpc/include/asm/fcntl.h similarity index 100% rename from trunk/include/asm-powerpc/fcntl.h rename to trunk/arch/powerpc/include/asm/fcntl.h diff --git a/trunk/include/asm-powerpc/feature-fixups.h b/trunk/arch/powerpc/include/asm/feature-fixups.h similarity index 100% rename from trunk/include/asm-powerpc/feature-fixups.h rename to trunk/arch/powerpc/include/asm/feature-fixups.h diff --git a/trunk/include/asm-powerpc/firmware.h b/trunk/arch/powerpc/include/asm/firmware.h similarity index 100% rename from trunk/include/asm-powerpc/firmware.h rename to trunk/arch/powerpc/include/asm/firmware.h diff --git a/trunk/include/asm-powerpc/fixmap.h b/trunk/arch/powerpc/include/asm/fixmap.h similarity index 100% rename from trunk/include/asm-powerpc/fixmap.h rename to trunk/arch/powerpc/include/asm/fixmap.h diff --git a/trunk/include/asm-powerpc/floppy.h b/trunk/arch/powerpc/include/asm/floppy.h similarity index 100% rename from trunk/include/asm-powerpc/floppy.h rename to trunk/arch/powerpc/include/asm/floppy.h diff --git a/trunk/include/asm-powerpc/fs_pd.h b/trunk/arch/powerpc/include/asm/fs_pd.h similarity index 100% rename from trunk/include/asm-powerpc/fs_pd.h rename to trunk/arch/powerpc/include/asm/fs_pd.h diff --git a/trunk/include/asm-powerpc/fsl_gtm.h b/trunk/arch/powerpc/include/asm/fsl_gtm.h similarity index 100% rename from trunk/include/asm-powerpc/fsl_gtm.h rename to trunk/arch/powerpc/include/asm/fsl_gtm.h diff --git a/trunk/include/asm-powerpc/fsl_lbc.h b/trunk/arch/powerpc/include/asm/fsl_lbc.h similarity index 100% rename from trunk/include/asm-powerpc/fsl_lbc.h rename to trunk/arch/powerpc/include/asm/fsl_lbc.h diff --git a/trunk/include/asm-powerpc/ftrace.h b/trunk/arch/powerpc/include/asm/ftrace.h similarity index 100% rename from trunk/include/asm-powerpc/ftrace.h rename to trunk/arch/powerpc/include/asm/ftrace.h diff --git a/trunk/include/asm-powerpc/futex.h b/trunk/arch/powerpc/include/asm/futex.h similarity index 100% rename from trunk/include/asm-powerpc/futex.h rename to trunk/arch/powerpc/include/asm/futex.h diff --git a/trunk/include/asm-powerpc/gpio.h b/trunk/arch/powerpc/include/asm/gpio.h similarity index 100% rename from trunk/include/asm-powerpc/gpio.h rename to trunk/arch/powerpc/include/asm/gpio.h diff --git a/trunk/include/asm-powerpc/grackle.h b/trunk/arch/powerpc/include/asm/grackle.h similarity index 100% rename from trunk/include/asm-powerpc/grackle.h rename to trunk/arch/powerpc/include/asm/grackle.h diff --git a/trunk/include/asm-powerpc/hardirq.h b/trunk/arch/powerpc/include/asm/hardirq.h similarity index 100% rename from trunk/include/asm-powerpc/hardirq.h rename to trunk/arch/powerpc/include/asm/hardirq.h diff --git a/trunk/include/asm-powerpc/heathrow.h b/trunk/arch/powerpc/include/asm/heathrow.h similarity index 100% rename from trunk/include/asm-powerpc/heathrow.h rename to trunk/arch/powerpc/include/asm/heathrow.h diff --git a/trunk/include/asm-powerpc/highmem.h b/trunk/arch/powerpc/include/asm/highmem.h similarity index 100% rename from trunk/include/asm-powerpc/highmem.h rename to trunk/arch/powerpc/include/asm/highmem.h diff --git a/trunk/include/asm-powerpc/hugetlb.h b/trunk/arch/powerpc/include/asm/hugetlb.h similarity index 100% rename from trunk/include/asm-powerpc/hugetlb.h rename to trunk/arch/powerpc/include/asm/hugetlb.h diff --git a/trunk/include/asm-powerpc/hvcall.h b/trunk/arch/powerpc/include/asm/hvcall.h similarity index 100% rename from trunk/include/asm-powerpc/hvcall.h rename to trunk/arch/powerpc/include/asm/hvcall.h diff --git a/trunk/include/asm-powerpc/hvconsole.h b/trunk/arch/powerpc/include/asm/hvconsole.h similarity index 100% rename from trunk/include/asm-powerpc/hvconsole.h rename to trunk/arch/powerpc/include/asm/hvconsole.h diff --git a/trunk/include/asm-powerpc/hvcserver.h b/trunk/arch/powerpc/include/asm/hvcserver.h similarity index 100% rename from trunk/include/asm-powerpc/hvcserver.h rename to trunk/arch/powerpc/include/asm/hvcserver.h diff --git a/trunk/include/asm-powerpc/hw_irq.h b/trunk/arch/powerpc/include/asm/hw_irq.h similarity index 100% rename from trunk/include/asm-powerpc/hw_irq.h rename to trunk/arch/powerpc/include/asm/hw_irq.h diff --git a/trunk/include/asm-powerpc/hydra.h b/trunk/arch/powerpc/include/asm/hydra.h similarity index 100% rename from trunk/include/asm-powerpc/hydra.h rename to trunk/arch/powerpc/include/asm/hydra.h diff --git a/trunk/include/asm-powerpc/i8259.h b/trunk/arch/powerpc/include/asm/i8259.h similarity index 100% rename from trunk/include/asm-powerpc/i8259.h rename to trunk/arch/powerpc/include/asm/i8259.h diff --git a/trunk/include/asm-powerpc/ibmebus.h b/trunk/arch/powerpc/include/asm/ibmebus.h similarity index 100% rename from trunk/include/asm-powerpc/ibmebus.h rename to trunk/arch/powerpc/include/asm/ibmebus.h diff --git a/trunk/include/asm-powerpc/ide.h b/trunk/arch/powerpc/include/asm/ide.h similarity index 100% rename from trunk/include/asm-powerpc/ide.h rename to trunk/arch/powerpc/include/asm/ide.h diff --git a/trunk/include/asm-powerpc/immap_86xx.h b/trunk/arch/powerpc/include/asm/immap_86xx.h similarity index 100% rename from trunk/include/asm-powerpc/immap_86xx.h rename to trunk/arch/powerpc/include/asm/immap_86xx.h diff --git a/trunk/include/asm-powerpc/immap_cpm2.h b/trunk/arch/powerpc/include/asm/immap_cpm2.h similarity index 100% rename from trunk/include/asm-powerpc/immap_cpm2.h rename to trunk/arch/powerpc/include/asm/immap_cpm2.h diff --git a/trunk/include/asm-powerpc/immap_qe.h b/trunk/arch/powerpc/include/asm/immap_qe.h similarity index 99% rename from trunk/include/asm-powerpc/immap_qe.h rename to trunk/arch/powerpc/include/asm/immap_qe.h index 7b6f411db3e6..3c2fced3ac22 100644 --- a/trunk/include/asm-powerpc/immap_qe.h +++ b/trunk/arch/powerpc/include/asm/immap_qe.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/immap_qe.h - * * QUICC Engine (QE) Internal Memory Map. * The Internal Memory Map for devices with QE on them. This * is the superset of all QE devices (8360, etc.). diff --git a/trunk/include/asm-powerpc/io-defs.h b/trunk/arch/powerpc/include/asm/io-defs.h similarity index 100% rename from trunk/include/asm-powerpc/io-defs.h rename to trunk/arch/powerpc/include/asm/io-defs.h diff --git a/trunk/include/asm-powerpc/io.h b/trunk/arch/powerpc/include/asm/io.h similarity index 100% rename from trunk/include/asm-powerpc/io.h rename to trunk/arch/powerpc/include/asm/io.h diff --git a/trunk/include/asm-powerpc/ioctl.h b/trunk/arch/powerpc/include/asm/ioctl.h similarity index 100% rename from trunk/include/asm-powerpc/ioctl.h rename to trunk/arch/powerpc/include/asm/ioctl.h diff --git a/trunk/include/asm-powerpc/ioctls.h b/trunk/arch/powerpc/include/asm/ioctls.h similarity index 100% rename from trunk/include/asm-powerpc/ioctls.h rename to trunk/arch/powerpc/include/asm/ioctls.h diff --git a/trunk/include/asm-powerpc/iommu.h b/trunk/arch/powerpc/include/asm/iommu.h similarity index 100% rename from trunk/include/asm-powerpc/iommu.h rename to trunk/arch/powerpc/include/asm/iommu.h diff --git a/trunk/include/asm-powerpc/ipcbuf.h b/trunk/arch/powerpc/include/asm/ipcbuf.h similarity index 100% rename from trunk/include/asm-powerpc/ipcbuf.h rename to trunk/arch/powerpc/include/asm/ipcbuf.h diff --git a/trunk/include/asm-powerpc/ipic.h b/trunk/arch/powerpc/include/asm/ipic.h similarity index 99% rename from trunk/include/asm-powerpc/ipic.h rename to trunk/arch/powerpc/include/asm/ipic.h index 8ff08be00146..4cf35531c0ef 100644 --- a/trunk/include/asm-powerpc/ipic.h +++ b/trunk/arch/powerpc/include/asm/ipic.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/ipic.h - * * IPIC external definitions and structure. * * Maintainer: Kumar Gala diff --git a/trunk/include/asm-powerpc/irq.h b/trunk/arch/powerpc/include/asm/irq.h similarity index 100% rename from trunk/include/asm-powerpc/irq.h rename to trunk/arch/powerpc/include/asm/irq.h diff --git a/trunk/include/asm-powerpc/irq_regs.h b/trunk/arch/powerpc/include/asm/irq_regs.h similarity index 100% rename from trunk/include/asm-powerpc/irq_regs.h rename to trunk/arch/powerpc/include/asm/irq_regs.h diff --git a/trunk/include/asm-powerpc/irqflags.h b/trunk/arch/powerpc/include/asm/irqflags.h similarity index 93% rename from trunk/include/asm-powerpc/irqflags.h rename to trunk/arch/powerpc/include/asm/irqflags.h index cc6fdba33660..17ba3a881bfd 100644 --- a/trunk/include/asm-powerpc/irqflags.h +++ b/trunk/arch/powerpc/include/asm/irqflags.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/irqflags.h - * * IRQ flags handling */ #ifndef _ASM_IRQFLAGS_H @@ -10,7 +8,7 @@ /* * Get definitions for raw_local_save_flags(x), etc. */ -#include +#include #else #ifdef CONFIG_TRACE_IRQFLAGS diff --git a/trunk/include/asm-powerpc/iseries/alpaca.h b/trunk/arch/powerpc/include/asm/iseries/alpaca.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/alpaca.h rename to trunk/arch/powerpc/include/asm/iseries/alpaca.h diff --git a/trunk/include/asm-powerpc/iseries/hv_call.h b/trunk/arch/powerpc/include/asm/iseries/hv_call.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_call.h rename to trunk/arch/powerpc/include/asm/iseries/hv_call.h diff --git a/trunk/include/asm-powerpc/iseries/hv_call_event.h b/trunk/arch/powerpc/include/asm/iseries/hv_call_event.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_call_event.h rename to trunk/arch/powerpc/include/asm/iseries/hv_call_event.h diff --git a/trunk/include/asm-powerpc/iseries/hv_call_sc.h b/trunk/arch/powerpc/include/asm/iseries/hv_call_sc.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_call_sc.h rename to trunk/arch/powerpc/include/asm/iseries/hv_call_sc.h diff --git a/trunk/include/asm-powerpc/iseries/hv_call_xm.h b/trunk/arch/powerpc/include/asm/iseries/hv_call_xm.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_call_xm.h rename to trunk/arch/powerpc/include/asm/iseries/hv_call_xm.h diff --git a/trunk/include/asm-powerpc/iseries/hv_lp_config.h b/trunk/arch/powerpc/include/asm/iseries/hv_lp_config.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_lp_config.h rename to trunk/arch/powerpc/include/asm/iseries/hv_lp_config.h diff --git a/trunk/include/asm-powerpc/iseries/hv_lp_event.h b/trunk/arch/powerpc/include/asm/iseries/hv_lp_event.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_lp_event.h rename to trunk/arch/powerpc/include/asm/iseries/hv_lp_event.h diff --git a/trunk/include/asm-powerpc/iseries/hv_types.h b/trunk/arch/powerpc/include/asm/iseries/hv_types.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/hv_types.h rename to trunk/arch/powerpc/include/asm/iseries/hv_types.h diff --git a/trunk/include/asm-powerpc/iseries/iommu.h b/trunk/arch/powerpc/include/asm/iseries/iommu.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/iommu.h rename to trunk/arch/powerpc/include/asm/iseries/iommu.h diff --git a/trunk/include/asm-powerpc/iseries/it_lp_queue.h b/trunk/arch/powerpc/include/asm/iseries/it_lp_queue.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/it_lp_queue.h rename to trunk/arch/powerpc/include/asm/iseries/it_lp_queue.h diff --git a/trunk/include/asm-powerpc/iseries/lpar_map.h b/trunk/arch/powerpc/include/asm/iseries/lpar_map.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/lpar_map.h rename to trunk/arch/powerpc/include/asm/iseries/lpar_map.h diff --git a/trunk/include/asm-powerpc/iseries/mf.h b/trunk/arch/powerpc/include/asm/iseries/mf.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/mf.h rename to trunk/arch/powerpc/include/asm/iseries/mf.h diff --git a/trunk/include/asm-powerpc/iseries/vio.h b/trunk/arch/powerpc/include/asm/iseries/vio.h similarity index 100% rename from trunk/include/asm-powerpc/iseries/vio.h rename to trunk/arch/powerpc/include/asm/iseries/vio.h diff --git a/trunk/include/asm-powerpc/kdebug.h b/trunk/arch/powerpc/include/asm/kdebug.h similarity index 100% rename from trunk/include/asm-powerpc/kdebug.h rename to trunk/arch/powerpc/include/asm/kdebug.h diff --git a/trunk/include/asm-powerpc/kdump.h b/trunk/arch/powerpc/include/asm/kdump.h similarity index 100% rename from trunk/include/asm-powerpc/kdump.h rename to trunk/arch/powerpc/include/asm/kdump.h diff --git a/trunk/include/asm-powerpc/kexec.h b/trunk/arch/powerpc/include/asm/kexec.h similarity index 100% rename from trunk/include/asm-powerpc/kexec.h rename to trunk/arch/powerpc/include/asm/kexec.h diff --git a/trunk/include/asm-powerpc/keylargo.h b/trunk/arch/powerpc/include/asm/keylargo.h similarity index 100% rename from trunk/include/asm-powerpc/keylargo.h rename to trunk/arch/powerpc/include/asm/keylargo.h diff --git a/trunk/include/asm-powerpc/kgdb.h b/trunk/arch/powerpc/include/asm/kgdb.h similarity index 98% rename from trunk/include/asm-powerpc/kgdb.h rename to trunk/arch/powerpc/include/asm/kgdb.h index 1399caf719ae..edd217006d27 100644 --- a/trunk/include/asm-powerpc/kgdb.h +++ b/trunk/arch/powerpc/include/asm/kgdb.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/kgdb.h - * * The PowerPC (32/64) specific defines / externs for KGDB. Based on * the previous 32bit and 64bit specific files, which had the following * copyrights: diff --git a/trunk/include/asm-powerpc/kmap_types.h b/trunk/arch/powerpc/include/asm/kmap_types.h similarity index 100% rename from trunk/include/asm-powerpc/kmap_types.h rename to trunk/arch/powerpc/include/asm/kmap_types.h diff --git a/trunk/include/asm-powerpc/kprobes.h b/trunk/arch/powerpc/include/asm/kprobes.h similarity index 100% rename from trunk/include/asm-powerpc/kprobes.h rename to trunk/arch/powerpc/include/asm/kprobes.h diff --git a/trunk/include/asm-powerpc/kvm.h b/trunk/arch/powerpc/include/asm/kvm.h similarity index 100% rename from trunk/include/asm-powerpc/kvm.h rename to trunk/arch/powerpc/include/asm/kvm.h diff --git a/trunk/include/asm-powerpc/kvm_asm.h b/trunk/arch/powerpc/include/asm/kvm_asm.h similarity index 100% rename from trunk/include/asm-powerpc/kvm_asm.h rename to trunk/arch/powerpc/include/asm/kvm_asm.h diff --git a/trunk/include/asm-powerpc/kvm_host.h b/trunk/arch/powerpc/include/asm/kvm_host.h similarity index 100% rename from trunk/include/asm-powerpc/kvm_host.h rename to trunk/arch/powerpc/include/asm/kvm_host.h diff --git a/trunk/include/asm-powerpc/kvm_para.h b/trunk/arch/powerpc/include/asm/kvm_para.h similarity index 100% rename from trunk/include/asm-powerpc/kvm_para.h rename to trunk/arch/powerpc/include/asm/kvm_para.h diff --git a/trunk/include/asm-powerpc/kvm_ppc.h b/trunk/arch/powerpc/include/asm/kvm_ppc.h similarity index 100% rename from trunk/include/asm-powerpc/kvm_ppc.h rename to trunk/arch/powerpc/include/asm/kvm_ppc.h diff --git a/trunk/include/asm-powerpc/libata-portmap.h b/trunk/arch/powerpc/include/asm/libata-portmap.h similarity index 100% rename from trunk/include/asm-powerpc/libata-portmap.h rename to trunk/arch/powerpc/include/asm/libata-portmap.h diff --git a/trunk/include/asm-powerpc/linkage.h b/trunk/arch/powerpc/include/asm/linkage.h similarity index 100% rename from trunk/include/asm-powerpc/linkage.h rename to trunk/arch/powerpc/include/asm/linkage.h diff --git a/trunk/include/asm-powerpc/lmb.h b/trunk/arch/powerpc/include/asm/lmb.h similarity index 100% rename from trunk/include/asm-powerpc/lmb.h rename to trunk/arch/powerpc/include/asm/lmb.h diff --git a/trunk/include/asm-powerpc/local.h b/trunk/arch/powerpc/include/asm/local.h similarity index 100% rename from trunk/include/asm-powerpc/local.h rename to trunk/arch/powerpc/include/asm/local.h diff --git a/trunk/include/asm-powerpc/lppaca.h b/trunk/arch/powerpc/include/asm/lppaca.h similarity index 100% rename from trunk/include/asm-powerpc/lppaca.h rename to trunk/arch/powerpc/include/asm/lppaca.h diff --git a/trunk/include/asm-powerpc/lv1call.h b/trunk/arch/powerpc/include/asm/lv1call.h similarity index 100% rename from trunk/include/asm-powerpc/lv1call.h rename to trunk/arch/powerpc/include/asm/lv1call.h diff --git a/trunk/include/asm-powerpc/machdep.h b/trunk/arch/powerpc/include/asm/machdep.h similarity index 100% rename from trunk/include/asm-powerpc/machdep.h rename to trunk/arch/powerpc/include/asm/machdep.h diff --git a/trunk/include/asm-powerpc/macio.h b/trunk/arch/powerpc/include/asm/macio.h similarity index 100% rename from trunk/include/asm-powerpc/macio.h rename to trunk/arch/powerpc/include/asm/macio.h diff --git a/trunk/include/asm-powerpc/mc146818rtc.h b/trunk/arch/powerpc/include/asm/mc146818rtc.h similarity index 100% rename from trunk/include/asm-powerpc/mc146818rtc.h rename to trunk/arch/powerpc/include/asm/mc146818rtc.h diff --git a/trunk/include/asm-powerpc/mediabay.h b/trunk/arch/powerpc/include/asm/mediabay.h similarity index 100% rename from trunk/include/asm-powerpc/mediabay.h rename to trunk/arch/powerpc/include/asm/mediabay.h diff --git a/trunk/include/asm-powerpc/mman.h b/trunk/arch/powerpc/include/asm/mman.h similarity index 100% rename from trunk/include/asm-powerpc/mman.h rename to trunk/arch/powerpc/include/asm/mman.h diff --git a/trunk/include/asm-powerpc/mmu-40x.h b/trunk/arch/powerpc/include/asm/mmu-40x.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-40x.h rename to trunk/arch/powerpc/include/asm/mmu-40x.h diff --git a/trunk/include/asm-powerpc/mmu-44x.h b/trunk/arch/powerpc/include/asm/mmu-44x.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-44x.h rename to trunk/arch/powerpc/include/asm/mmu-44x.h diff --git a/trunk/include/asm-powerpc/mmu-8xx.h b/trunk/arch/powerpc/include/asm/mmu-8xx.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-8xx.h rename to trunk/arch/powerpc/include/asm/mmu-8xx.h diff --git a/trunk/include/asm-powerpc/mmu-fsl-booke.h b/trunk/arch/powerpc/include/asm/mmu-fsl-booke.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-fsl-booke.h rename to trunk/arch/powerpc/include/asm/mmu-fsl-booke.h diff --git a/trunk/include/asm-powerpc/mmu-hash32.h b/trunk/arch/powerpc/include/asm/mmu-hash32.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-hash32.h rename to trunk/arch/powerpc/include/asm/mmu-hash32.h diff --git a/trunk/include/asm-powerpc/mmu-hash64.h b/trunk/arch/powerpc/include/asm/mmu-hash64.h similarity index 100% rename from trunk/include/asm-powerpc/mmu-hash64.h rename to trunk/arch/powerpc/include/asm/mmu-hash64.h diff --git a/trunk/include/asm-powerpc/mmu.h b/trunk/arch/powerpc/include/asm/mmu.h similarity index 100% rename from trunk/include/asm-powerpc/mmu.h rename to trunk/arch/powerpc/include/asm/mmu.h diff --git a/trunk/include/asm-powerpc/mmu_context.h b/trunk/arch/powerpc/include/asm/mmu_context.h similarity index 100% rename from trunk/include/asm-powerpc/mmu_context.h rename to trunk/arch/powerpc/include/asm/mmu_context.h diff --git a/trunk/include/asm-powerpc/mmzone.h b/trunk/arch/powerpc/include/asm/mmzone.h similarity index 100% rename from trunk/include/asm-powerpc/mmzone.h rename to trunk/arch/powerpc/include/asm/mmzone.h diff --git a/trunk/include/asm-powerpc/module.h b/trunk/arch/powerpc/include/asm/module.h similarity index 100% rename from trunk/include/asm-powerpc/module.h rename to trunk/arch/powerpc/include/asm/module.h diff --git a/trunk/include/asm-powerpc/mpc512x.h b/trunk/arch/powerpc/include/asm/mpc512x.h similarity index 100% rename from trunk/include/asm-powerpc/mpc512x.h rename to trunk/arch/powerpc/include/asm/mpc512x.h diff --git a/trunk/include/asm-powerpc/mpc52xx.h b/trunk/arch/powerpc/include/asm/mpc52xx.h similarity index 100% rename from trunk/include/asm-powerpc/mpc52xx.h rename to trunk/arch/powerpc/include/asm/mpc52xx.h diff --git a/trunk/include/asm-powerpc/mpc52xx_psc.h b/trunk/arch/powerpc/include/asm/mpc52xx_psc.h similarity index 100% rename from trunk/include/asm-powerpc/mpc52xx_psc.h rename to trunk/arch/powerpc/include/asm/mpc52xx_psc.h diff --git a/trunk/include/asm-powerpc/mpc6xx.h b/trunk/arch/powerpc/include/asm/mpc6xx.h similarity index 100% rename from trunk/include/asm-powerpc/mpc6xx.h rename to trunk/arch/powerpc/include/asm/mpc6xx.h diff --git a/trunk/include/asm-powerpc/mpc8260.h b/trunk/arch/powerpc/include/asm/mpc8260.h similarity index 100% rename from trunk/include/asm-powerpc/mpc8260.h rename to trunk/arch/powerpc/include/asm/mpc8260.h diff --git a/trunk/include/asm-powerpc/mpc86xx.h b/trunk/arch/powerpc/include/asm/mpc86xx.h similarity index 100% rename from trunk/include/asm-powerpc/mpc86xx.h rename to trunk/arch/powerpc/include/asm/mpc86xx.h diff --git a/trunk/include/asm-powerpc/mpc8xx.h b/trunk/arch/powerpc/include/asm/mpc8xx.h similarity index 100% rename from trunk/include/asm-powerpc/mpc8xx.h rename to trunk/arch/powerpc/include/asm/mpc8xx.h diff --git a/trunk/include/asm-powerpc/mpic.h b/trunk/arch/powerpc/include/asm/mpic.h similarity index 100% rename from trunk/include/asm-powerpc/mpic.h rename to trunk/arch/powerpc/include/asm/mpic.h diff --git a/trunk/include/asm-powerpc/msgbuf.h b/trunk/arch/powerpc/include/asm/msgbuf.h similarity index 100% rename from trunk/include/asm-powerpc/msgbuf.h rename to trunk/arch/powerpc/include/asm/msgbuf.h diff --git a/trunk/arch/s390/include/asm/mutex.h b/trunk/arch/powerpc/include/asm/mutex.h similarity index 100% rename from trunk/arch/s390/include/asm/mutex.h rename to trunk/arch/powerpc/include/asm/mutex.h diff --git a/trunk/include/asm-powerpc/nvram.h b/trunk/arch/powerpc/include/asm/nvram.h similarity index 100% rename from trunk/include/asm-powerpc/nvram.h rename to trunk/arch/powerpc/include/asm/nvram.h diff --git a/trunk/include/asm-powerpc/of_device.h b/trunk/arch/powerpc/include/asm/of_device.h similarity index 100% rename from trunk/include/asm-powerpc/of_device.h rename to trunk/arch/powerpc/include/asm/of_device.h diff --git a/trunk/include/asm-powerpc/of_platform.h b/trunk/arch/powerpc/include/asm/of_platform.h similarity index 100% rename from trunk/include/asm-powerpc/of_platform.h rename to trunk/arch/powerpc/include/asm/of_platform.h diff --git a/trunk/include/asm-powerpc/ohare.h b/trunk/arch/powerpc/include/asm/ohare.h similarity index 100% rename from trunk/include/asm-powerpc/ohare.h rename to trunk/arch/powerpc/include/asm/ohare.h diff --git a/trunk/include/asm-powerpc/oprofile_impl.h b/trunk/arch/powerpc/include/asm/oprofile_impl.h similarity index 100% rename from trunk/include/asm-powerpc/oprofile_impl.h rename to trunk/arch/powerpc/include/asm/oprofile_impl.h diff --git a/trunk/include/asm-powerpc/pSeries_reconfig.h b/trunk/arch/powerpc/include/asm/pSeries_reconfig.h similarity index 100% rename from trunk/include/asm-powerpc/pSeries_reconfig.h rename to trunk/arch/powerpc/include/asm/pSeries_reconfig.h diff --git a/trunk/include/asm-powerpc/paca.h b/trunk/arch/powerpc/include/asm/paca.h similarity index 99% rename from trunk/include/asm-powerpc/paca.h rename to trunk/arch/powerpc/include/asm/paca.h index 7b564444ff61..6493a395508b 100644 --- a/trunk/include/asm-powerpc/paca.h +++ b/trunk/arch/powerpc/include/asm/paca.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/paca.h - * * This control block defines the PACA which defines the processor * specific data for each logical processor on the system. * There are some pointers defined that are utilized by PLIC. diff --git a/trunk/include/asm-powerpc/page.h b/trunk/arch/powerpc/include/asm/page.h similarity index 100% rename from trunk/include/asm-powerpc/page.h rename to trunk/arch/powerpc/include/asm/page.h diff --git a/trunk/include/asm-powerpc/page_32.h b/trunk/arch/powerpc/include/asm/page_32.h similarity index 100% rename from trunk/include/asm-powerpc/page_32.h rename to trunk/arch/powerpc/include/asm/page_32.h diff --git a/trunk/include/asm-powerpc/page_64.h b/trunk/arch/powerpc/include/asm/page_64.h similarity index 100% rename from trunk/include/asm-powerpc/page_64.h rename to trunk/arch/powerpc/include/asm/page_64.h diff --git a/trunk/include/asm-powerpc/param.h b/trunk/arch/powerpc/include/asm/param.h similarity index 100% rename from trunk/include/asm-powerpc/param.h rename to trunk/arch/powerpc/include/asm/param.h diff --git a/trunk/include/asm-powerpc/parport.h b/trunk/arch/powerpc/include/asm/parport.h similarity index 100% rename from trunk/include/asm-powerpc/parport.h rename to trunk/arch/powerpc/include/asm/parport.h diff --git a/trunk/include/asm-powerpc/pasemi_dma.h b/trunk/arch/powerpc/include/asm/pasemi_dma.h similarity index 100% rename from trunk/include/asm-powerpc/pasemi_dma.h rename to trunk/arch/powerpc/include/asm/pasemi_dma.h diff --git a/trunk/include/asm-powerpc/pci-bridge.h b/trunk/arch/powerpc/include/asm/pci-bridge.h similarity index 100% rename from trunk/include/asm-powerpc/pci-bridge.h rename to trunk/arch/powerpc/include/asm/pci-bridge.h diff --git a/trunk/include/asm-powerpc/pci.h b/trunk/arch/powerpc/include/asm/pci.h similarity index 100% rename from trunk/include/asm-powerpc/pci.h rename to trunk/arch/powerpc/include/asm/pci.h diff --git a/trunk/include/asm-powerpc/percpu.h b/trunk/arch/powerpc/include/asm/percpu.h similarity index 100% rename from trunk/include/asm-powerpc/percpu.h rename to trunk/arch/powerpc/include/asm/percpu.h diff --git a/trunk/include/asm-powerpc/pgalloc-32.h b/trunk/arch/powerpc/include/asm/pgalloc-32.h similarity index 100% rename from trunk/include/asm-powerpc/pgalloc-32.h rename to trunk/arch/powerpc/include/asm/pgalloc-32.h diff --git a/trunk/include/asm-powerpc/pgalloc-64.h b/trunk/arch/powerpc/include/asm/pgalloc-64.h similarity index 100% rename from trunk/include/asm-powerpc/pgalloc-64.h rename to trunk/arch/powerpc/include/asm/pgalloc-64.h diff --git a/trunk/include/asm-powerpc/pgalloc.h b/trunk/arch/powerpc/include/asm/pgalloc.h similarity index 100% rename from trunk/include/asm-powerpc/pgalloc.h rename to trunk/arch/powerpc/include/asm/pgalloc.h diff --git a/trunk/include/asm-powerpc/pgtable-4k.h b/trunk/arch/powerpc/include/asm/pgtable-4k.h similarity index 100% rename from trunk/include/asm-powerpc/pgtable-4k.h rename to trunk/arch/powerpc/include/asm/pgtable-4k.h diff --git a/trunk/include/asm-powerpc/pgtable-64k.h b/trunk/arch/powerpc/include/asm/pgtable-64k.h similarity index 100% rename from trunk/include/asm-powerpc/pgtable-64k.h rename to trunk/arch/powerpc/include/asm/pgtable-64k.h diff --git a/trunk/include/asm-powerpc/pgtable-ppc32.h b/trunk/arch/powerpc/include/asm/pgtable-ppc32.h similarity index 100% rename from trunk/include/asm-powerpc/pgtable-ppc32.h rename to trunk/arch/powerpc/include/asm/pgtable-ppc32.h diff --git a/trunk/include/asm-powerpc/pgtable-ppc64.h b/trunk/arch/powerpc/include/asm/pgtable-ppc64.h similarity index 99% rename from trunk/include/asm-powerpc/pgtable-ppc64.h rename to trunk/arch/powerpc/include/asm/pgtable-ppc64.h index 74c6f380b805..db0b8f3b8807 100644 --- a/trunk/include/asm-powerpc/pgtable-ppc64.h +++ b/trunk/arch/powerpc/include/asm/pgtable-ppc64.h @@ -100,7 +100,7 @@ #define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY) -/* __pgprot defined in asm-powerpc/page.h */ +/* __pgprot defined in arch/powerpc/incliude/asm/page.h */ #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED) #define PAGE_SHARED __pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER) diff --git a/trunk/include/asm-powerpc/pgtable.h b/trunk/arch/powerpc/include/asm/pgtable.h similarity index 100% rename from trunk/include/asm-powerpc/pgtable.h rename to trunk/arch/powerpc/include/asm/pgtable.h diff --git a/trunk/include/asm-powerpc/phyp_dump.h b/trunk/arch/powerpc/include/asm/phyp_dump.h similarity index 100% rename from trunk/include/asm-powerpc/phyp_dump.h rename to trunk/arch/powerpc/include/asm/phyp_dump.h diff --git a/trunk/include/asm-powerpc/pmac_feature.h b/trunk/arch/powerpc/include/asm/pmac_feature.h similarity index 100% rename from trunk/include/asm-powerpc/pmac_feature.h rename to trunk/arch/powerpc/include/asm/pmac_feature.h diff --git a/trunk/include/asm-powerpc/pmac_low_i2c.h b/trunk/arch/powerpc/include/asm/pmac_low_i2c.h similarity index 100% rename from trunk/include/asm-powerpc/pmac_low_i2c.h rename to trunk/arch/powerpc/include/asm/pmac_low_i2c.h diff --git a/trunk/include/asm-powerpc/pmac_pfunc.h b/trunk/arch/powerpc/include/asm/pmac_pfunc.h similarity index 100% rename from trunk/include/asm-powerpc/pmac_pfunc.h rename to trunk/arch/powerpc/include/asm/pmac_pfunc.h diff --git a/trunk/include/asm-powerpc/pmc.h b/trunk/arch/powerpc/include/asm/pmc.h similarity index 100% rename from trunk/include/asm-powerpc/pmc.h rename to trunk/arch/powerpc/include/asm/pmc.h diff --git a/trunk/include/asm-powerpc/pmi.h b/trunk/arch/powerpc/include/asm/pmi.h similarity index 100% rename from trunk/include/asm-powerpc/pmi.h rename to trunk/arch/powerpc/include/asm/pmi.h diff --git a/trunk/arch/arm/include/asm/poll.h b/trunk/arch/powerpc/include/asm/poll.h similarity index 100% rename from trunk/arch/arm/include/asm/poll.h rename to trunk/arch/powerpc/include/asm/poll.h diff --git a/trunk/include/asm-powerpc/posix_types.h b/trunk/arch/powerpc/include/asm/posix_types.h similarity index 100% rename from trunk/include/asm-powerpc/posix_types.h rename to trunk/arch/powerpc/include/asm/posix_types.h diff --git a/trunk/include/asm-powerpc/ppc-pci.h b/trunk/arch/powerpc/include/asm/ppc-pci.h similarity index 100% rename from trunk/include/asm-powerpc/ppc-pci.h rename to trunk/arch/powerpc/include/asm/ppc-pci.h diff --git a/trunk/include/asm-powerpc/ppc4xx.h b/trunk/arch/powerpc/include/asm/ppc4xx.h similarity index 100% rename from trunk/include/asm-powerpc/ppc4xx.h rename to trunk/arch/powerpc/include/asm/ppc4xx.h diff --git a/trunk/include/asm-powerpc/ppc_asm.h b/trunk/arch/powerpc/include/asm/ppc_asm.h similarity index 100% rename from trunk/include/asm-powerpc/ppc_asm.h rename to trunk/arch/powerpc/include/asm/ppc_asm.h diff --git a/trunk/include/asm-powerpc/processor.h b/trunk/arch/powerpc/include/asm/processor.h similarity index 100% rename from trunk/include/asm-powerpc/processor.h rename to trunk/arch/powerpc/include/asm/processor.h diff --git a/trunk/include/asm-powerpc/prom.h b/trunk/arch/powerpc/include/asm/prom.h similarity index 100% rename from trunk/include/asm-powerpc/prom.h rename to trunk/arch/powerpc/include/asm/prom.h diff --git a/trunk/include/asm-powerpc/ps3.h b/trunk/arch/powerpc/include/asm/ps3.h similarity index 100% rename from trunk/include/asm-powerpc/ps3.h rename to trunk/arch/powerpc/include/asm/ps3.h diff --git a/trunk/include/asm-powerpc/ps3av.h b/trunk/arch/powerpc/include/asm/ps3av.h similarity index 100% rename from trunk/include/asm-powerpc/ps3av.h rename to trunk/arch/powerpc/include/asm/ps3av.h diff --git a/trunk/include/asm-powerpc/ps3fb.h b/trunk/arch/powerpc/include/asm/ps3fb.h similarity index 100% rename from trunk/include/asm-powerpc/ps3fb.h rename to trunk/arch/powerpc/include/asm/ps3fb.h diff --git a/trunk/include/asm-powerpc/ps3stor.h b/trunk/arch/powerpc/include/asm/ps3stor.h similarity index 100% rename from trunk/include/asm-powerpc/ps3stor.h rename to trunk/arch/powerpc/include/asm/ps3stor.h diff --git a/trunk/include/asm-powerpc/ptrace.h b/trunk/arch/powerpc/include/asm/ptrace.h similarity index 100% rename from trunk/include/asm-powerpc/ptrace.h rename to trunk/arch/powerpc/include/asm/ptrace.h diff --git a/trunk/include/asm-powerpc/qe.h b/trunk/arch/powerpc/include/asm/qe.h similarity index 100% rename from trunk/include/asm-powerpc/qe.h rename to trunk/arch/powerpc/include/asm/qe.h diff --git a/trunk/include/asm-powerpc/qe_ic.h b/trunk/arch/powerpc/include/asm/qe_ic.h similarity index 99% rename from trunk/include/asm-powerpc/qe_ic.h rename to trunk/arch/powerpc/include/asm/qe_ic.h index a779b2c9eaf1..56a7745ca343 100644 --- a/trunk/include/asm-powerpc/qe_ic.h +++ b/trunk/arch/powerpc/include/asm/qe_ic.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/qe_ic.h - * * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. * * Authors: Shlomi Gridish diff --git a/trunk/include/asm-powerpc/reg.h b/trunk/arch/powerpc/include/asm/reg.h similarity index 100% rename from trunk/include/asm-powerpc/reg.h rename to trunk/arch/powerpc/include/asm/reg.h diff --git a/trunk/include/asm-powerpc/reg_8xx.h b/trunk/arch/powerpc/include/asm/reg_8xx.h similarity index 100% rename from trunk/include/asm-powerpc/reg_8xx.h rename to trunk/arch/powerpc/include/asm/reg_8xx.h diff --git a/trunk/include/asm-powerpc/reg_booke.h b/trunk/arch/powerpc/include/asm/reg_booke.h similarity index 100% rename from trunk/include/asm-powerpc/reg_booke.h rename to trunk/arch/powerpc/include/asm/reg_booke.h diff --git a/trunk/include/asm-powerpc/reg_fsl_emb.h b/trunk/arch/powerpc/include/asm/reg_fsl_emb.h similarity index 100% rename from trunk/include/asm-powerpc/reg_fsl_emb.h rename to trunk/arch/powerpc/include/asm/reg_fsl_emb.h diff --git a/trunk/include/asm-powerpc/resource.h b/trunk/arch/powerpc/include/asm/resource.h similarity index 100% rename from trunk/include/asm-powerpc/resource.h rename to trunk/arch/powerpc/include/asm/resource.h diff --git a/trunk/include/asm-powerpc/rheap.h b/trunk/arch/powerpc/include/asm/rheap.h similarity index 100% rename from trunk/include/asm-powerpc/rheap.h rename to trunk/arch/powerpc/include/asm/rheap.h diff --git a/trunk/include/asm-powerpc/rio.h b/trunk/arch/powerpc/include/asm/rio.h similarity index 100% rename from trunk/include/asm-powerpc/rio.h rename to trunk/arch/powerpc/include/asm/rio.h diff --git a/trunk/include/asm-powerpc/rtas.h b/trunk/arch/powerpc/include/asm/rtas.h similarity index 100% rename from trunk/include/asm-powerpc/rtas.h rename to trunk/arch/powerpc/include/asm/rtas.h diff --git a/trunk/include/asm-powerpc/rtc.h b/trunk/arch/powerpc/include/asm/rtc.h similarity index 100% rename from trunk/include/asm-powerpc/rtc.h rename to trunk/arch/powerpc/include/asm/rtc.h diff --git a/trunk/include/asm-powerpc/rwsem.h b/trunk/arch/powerpc/include/asm/rwsem.h similarity index 96% rename from trunk/include/asm-powerpc/rwsem.h rename to trunk/arch/powerpc/include/asm/rwsem.h index a6cc93b78b98..24cd9281ec37 100644 --- a/trunk/include/asm-powerpc/rwsem.h +++ b/trunk/arch/powerpc/include/asm/rwsem.h @@ -8,8 +8,8 @@ #ifdef __KERNEL__ /* - * include/asm-powerpc/rwsem.h: R/W semaphores for PPC using the stuff - * in lib/rwsem.c. Adapted largely from include/asm-i386/rwsem.h + * R/W semaphores for PPC using the stuff in lib/rwsem.c. + * Adapted largely from include/asm-i386/rwsem.h * by Paul Mackerras . */ diff --git a/trunk/include/asm-powerpc/scatterlist.h b/trunk/arch/powerpc/include/asm/scatterlist.h similarity index 100% rename from trunk/include/asm-powerpc/scatterlist.h rename to trunk/arch/powerpc/include/asm/scatterlist.h diff --git a/trunk/include/asm-powerpc/seccomp.h b/trunk/arch/powerpc/include/asm/seccomp.h similarity index 100% rename from trunk/include/asm-powerpc/seccomp.h rename to trunk/arch/powerpc/include/asm/seccomp.h diff --git a/trunk/include/asm-powerpc/sections.h b/trunk/arch/powerpc/include/asm/sections.h similarity index 100% rename from trunk/include/asm-powerpc/sections.h rename to trunk/arch/powerpc/include/asm/sections.h diff --git a/trunk/include/asm-powerpc/sembuf.h b/trunk/arch/powerpc/include/asm/sembuf.h similarity index 100% rename from trunk/include/asm-powerpc/sembuf.h rename to trunk/arch/powerpc/include/asm/sembuf.h diff --git a/trunk/include/asm-powerpc/serial.h b/trunk/arch/powerpc/include/asm/serial.h similarity index 100% rename from trunk/include/asm-powerpc/serial.h rename to trunk/arch/powerpc/include/asm/serial.h diff --git a/trunk/include/asm-powerpc/setjmp.h b/trunk/arch/powerpc/include/asm/setjmp.h similarity index 100% rename from trunk/include/asm-powerpc/setjmp.h rename to trunk/arch/powerpc/include/asm/setjmp.h diff --git a/trunk/include/asm-powerpc/setup.h b/trunk/arch/powerpc/include/asm/setup.h similarity index 100% rename from trunk/include/asm-powerpc/setup.h rename to trunk/arch/powerpc/include/asm/setup.h diff --git a/trunk/include/asm-powerpc/shmbuf.h b/trunk/arch/powerpc/include/asm/shmbuf.h similarity index 100% rename from trunk/include/asm-powerpc/shmbuf.h rename to trunk/arch/powerpc/include/asm/shmbuf.h diff --git a/trunk/include/asm-powerpc/shmparam.h b/trunk/arch/powerpc/include/asm/shmparam.h similarity index 100% rename from trunk/include/asm-powerpc/shmparam.h rename to trunk/arch/powerpc/include/asm/shmparam.h diff --git a/trunk/include/asm-powerpc/sigcontext.h b/trunk/arch/powerpc/include/asm/sigcontext.h similarity index 100% rename from trunk/include/asm-powerpc/sigcontext.h rename to trunk/arch/powerpc/include/asm/sigcontext.h diff --git a/trunk/include/asm-powerpc/siginfo.h b/trunk/arch/powerpc/include/asm/siginfo.h similarity index 100% rename from trunk/include/asm-powerpc/siginfo.h rename to trunk/arch/powerpc/include/asm/siginfo.h diff --git a/trunk/include/asm-powerpc/signal.h b/trunk/arch/powerpc/include/asm/signal.h similarity index 100% rename from trunk/include/asm-powerpc/signal.h rename to trunk/arch/powerpc/include/asm/signal.h diff --git a/trunk/include/asm-powerpc/smp.h b/trunk/arch/powerpc/include/asm/smp.h similarity index 100% rename from trunk/include/asm-powerpc/smp.h rename to trunk/arch/powerpc/include/asm/smp.h diff --git a/trunk/include/asm-powerpc/smu.h b/trunk/arch/powerpc/include/asm/smu.h similarity index 100% rename from trunk/include/asm-powerpc/smu.h rename to trunk/arch/powerpc/include/asm/smu.h diff --git a/trunk/include/asm-powerpc/socket.h b/trunk/arch/powerpc/include/asm/socket.h similarity index 100% rename from trunk/include/asm-powerpc/socket.h rename to trunk/arch/powerpc/include/asm/socket.h diff --git a/trunk/include/asm-powerpc/sockios.h b/trunk/arch/powerpc/include/asm/sockios.h similarity index 100% rename from trunk/include/asm-powerpc/sockios.h rename to trunk/arch/powerpc/include/asm/sockios.h diff --git a/trunk/include/asm-powerpc/sparsemem.h b/trunk/arch/powerpc/include/asm/sparsemem.h similarity index 100% rename from trunk/include/asm-powerpc/sparsemem.h rename to trunk/arch/powerpc/include/asm/sparsemem.h diff --git a/trunk/include/asm-powerpc/spinlock.h b/trunk/arch/powerpc/include/asm/spinlock.h similarity index 100% rename from trunk/include/asm-powerpc/spinlock.h rename to trunk/arch/powerpc/include/asm/spinlock.h diff --git a/trunk/include/asm-powerpc/spinlock_types.h b/trunk/arch/powerpc/include/asm/spinlock_types.h similarity index 100% rename from trunk/include/asm-powerpc/spinlock_types.h rename to trunk/arch/powerpc/include/asm/spinlock_types.h diff --git a/trunk/include/asm-powerpc/spu.h b/trunk/arch/powerpc/include/asm/spu.h similarity index 100% rename from trunk/include/asm-powerpc/spu.h rename to trunk/arch/powerpc/include/asm/spu.h diff --git a/trunk/include/asm-powerpc/spu_csa.h b/trunk/arch/powerpc/include/asm/spu_csa.h similarity index 100% rename from trunk/include/asm-powerpc/spu_csa.h rename to trunk/arch/powerpc/include/asm/spu_csa.h diff --git a/trunk/include/asm-powerpc/spu_info.h b/trunk/arch/powerpc/include/asm/spu_info.h similarity index 100% rename from trunk/include/asm-powerpc/spu_info.h rename to trunk/arch/powerpc/include/asm/spu_info.h diff --git a/trunk/include/asm-powerpc/spu_priv1.h b/trunk/arch/powerpc/include/asm/spu_priv1.h similarity index 100% rename from trunk/include/asm-powerpc/spu_priv1.h rename to trunk/arch/powerpc/include/asm/spu_priv1.h diff --git a/trunk/include/asm-powerpc/sstep.h b/trunk/arch/powerpc/include/asm/sstep.h similarity index 100% rename from trunk/include/asm-powerpc/sstep.h rename to trunk/arch/powerpc/include/asm/sstep.h diff --git a/trunk/include/asm-powerpc/stat.h b/trunk/arch/powerpc/include/asm/stat.h similarity index 100% rename from trunk/include/asm-powerpc/stat.h rename to trunk/arch/powerpc/include/asm/stat.h diff --git a/trunk/include/asm-powerpc/statfs.h b/trunk/arch/powerpc/include/asm/statfs.h similarity index 100% rename from trunk/include/asm-powerpc/statfs.h rename to trunk/arch/powerpc/include/asm/statfs.h diff --git a/trunk/include/asm-powerpc/string.h b/trunk/arch/powerpc/include/asm/string.h similarity index 100% rename from trunk/include/asm-powerpc/string.h rename to trunk/arch/powerpc/include/asm/string.h diff --git a/trunk/include/asm-powerpc/suspend.h b/trunk/arch/powerpc/include/asm/suspend.h similarity index 100% rename from trunk/include/asm-powerpc/suspend.h rename to trunk/arch/powerpc/include/asm/suspend.h diff --git a/trunk/include/asm-powerpc/synch.h b/trunk/arch/powerpc/include/asm/synch.h similarity index 100% rename from trunk/include/asm-powerpc/synch.h rename to trunk/arch/powerpc/include/asm/synch.h diff --git a/trunk/include/asm-powerpc/syscall.h b/trunk/arch/powerpc/include/asm/syscall.h similarity index 100% rename from trunk/include/asm-powerpc/syscall.h rename to trunk/arch/powerpc/include/asm/syscall.h diff --git a/trunk/include/asm-powerpc/syscalls.h b/trunk/arch/powerpc/include/asm/syscalls.h similarity index 100% rename from trunk/include/asm-powerpc/syscalls.h rename to trunk/arch/powerpc/include/asm/syscalls.h diff --git a/trunk/include/asm-powerpc/systbl.h b/trunk/arch/powerpc/include/asm/systbl.h similarity index 100% rename from trunk/include/asm-powerpc/systbl.h rename to trunk/arch/powerpc/include/asm/systbl.h diff --git a/trunk/include/asm-powerpc/system.h b/trunk/arch/powerpc/include/asm/system.h similarity index 100% rename from trunk/include/asm-powerpc/system.h rename to trunk/arch/powerpc/include/asm/system.h diff --git a/trunk/include/asm-powerpc/tce.h b/trunk/arch/powerpc/include/asm/tce.h similarity index 100% rename from trunk/include/asm-powerpc/tce.h rename to trunk/arch/powerpc/include/asm/tce.h diff --git a/trunk/include/asm-powerpc/termbits.h b/trunk/arch/powerpc/include/asm/termbits.h similarity index 100% rename from trunk/include/asm-powerpc/termbits.h rename to trunk/arch/powerpc/include/asm/termbits.h diff --git a/trunk/include/asm-powerpc/termios.h b/trunk/arch/powerpc/include/asm/termios.h similarity index 100% rename from trunk/include/asm-powerpc/termios.h rename to trunk/arch/powerpc/include/asm/termios.h diff --git a/trunk/include/asm-powerpc/thread_info.h b/trunk/arch/powerpc/include/asm/thread_info.h similarity index 100% rename from trunk/include/asm-powerpc/thread_info.h rename to trunk/arch/powerpc/include/asm/thread_info.h diff --git a/trunk/include/asm-powerpc/time.h b/trunk/arch/powerpc/include/asm/time.h similarity index 100% rename from trunk/include/asm-powerpc/time.h rename to trunk/arch/powerpc/include/asm/time.h diff --git a/trunk/include/asm-powerpc/timex.h b/trunk/arch/powerpc/include/asm/timex.h similarity index 100% rename from trunk/include/asm-powerpc/timex.h rename to trunk/arch/powerpc/include/asm/timex.h diff --git a/trunk/include/asm-powerpc/tlb.h b/trunk/arch/powerpc/include/asm/tlb.h similarity index 100% rename from trunk/include/asm-powerpc/tlb.h rename to trunk/arch/powerpc/include/asm/tlb.h diff --git a/trunk/include/asm-powerpc/tlbflush.h b/trunk/arch/powerpc/include/asm/tlbflush.h similarity index 100% rename from trunk/include/asm-powerpc/tlbflush.h rename to trunk/arch/powerpc/include/asm/tlbflush.h diff --git a/trunk/include/asm-powerpc/topology.h b/trunk/arch/powerpc/include/asm/topology.h similarity index 100% rename from trunk/include/asm-powerpc/topology.h rename to trunk/arch/powerpc/include/asm/topology.h diff --git a/trunk/include/asm-powerpc/tsi108.h b/trunk/arch/powerpc/include/asm/tsi108.h similarity index 100% rename from trunk/include/asm-powerpc/tsi108.h rename to trunk/arch/powerpc/include/asm/tsi108.h diff --git a/trunk/include/asm-powerpc/tsi108_irq.h b/trunk/arch/powerpc/include/asm/tsi108_irq.h similarity index 100% rename from trunk/include/asm-powerpc/tsi108_irq.h rename to trunk/arch/powerpc/include/asm/tsi108_irq.h diff --git a/trunk/include/asm-powerpc/tsi108_pci.h b/trunk/arch/powerpc/include/asm/tsi108_pci.h similarity index 100% rename from trunk/include/asm-powerpc/tsi108_pci.h rename to trunk/arch/powerpc/include/asm/tsi108_pci.h diff --git a/trunk/include/asm-powerpc/types.h b/trunk/arch/powerpc/include/asm/types.h similarity index 100% rename from trunk/include/asm-powerpc/types.h rename to trunk/arch/powerpc/include/asm/types.h diff --git a/trunk/include/asm-powerpc/uaccess.h b/trunk/arch/powerpc/include/asm/uaccess.h similarity index 100% rename from trunk/include/asm-powerpc/uaccess.h rename to trunk/arch/powerpc/include/asm/uaccess.h diff --git a/trunk/include/asm-powerpc/ucc.h b/trunk/arch/powerpc/include/asm/ucc.h similarity index 100% rename from trunk/include/asm-powerpc/ucc.h rename to trunk/arch/powerpc/include/asm/ucc.h diff --git a/trunk/include/asm-powerpc/ucc_fast.h b/trunk/arch/powerpc/include/asm/ucc_fast.h similarity index 99% rename from trunk/include/asm-powerpc/ucc_fast.h rename to trunk/arch/powerpc/include/asm/ucc_fast.h index fce16abe7ee1..839aab8bf37d 100644 --- a/trunk/include/asm-powerpc/ucc_fast.h +++ b/trunk/arch/powerpc/include/asm/ucc_fast.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/ucc_fast.h - * * Internal header file for UCC FAST unit routines. * * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. diff --git a/trunk/include/asm-powerpc/ucc_slow.h b/trunk/arch/powerpc/include/asm/ucc_slow.h similarity index 100% rename from trunk/include/asm-powerpc/ucc_slow.h rename to trunk/arch/powerpc/include/asm/ucc_slow.h diff --git a/trunk/include/asm-powerpc/ucontext.h b/trunk/arch/powerpc/include/asm/ucontext.h similarity index 100% rename from trunk/include/asm-powerpc/ucontext.h rename to trunk/arch/powerpc/include/asm/ucontext.h diff --git a/trunk/include/asm-powerpc/udbg.h b/trunk/arch/powerpc/include/asm/udbg.h similarity index 100% rename from trunk/include/asm-powerpc/udbg.h rename to trunk/arch/powerpc/include/asm/udbg.h diff --git a/trunk/include/asm-powerpc/uic.h b/trunk/arch/powerpc/include/asm/uic.h similarity index 95% rename from trunk/include/asm-powerpc/uic.h rename to trunk/arch/powerpc/include/asm/uic.h index 970eb7e2186a..597edfcae3d6 100644 --- a/trunk/include/asm-powerpc/uic.h +++ b/trunk/arch/powerpc/include/asm/uic.h @@ -1,6 +1,4 @@ /* - * include/asm-powerpc/uic.h - * * IBM PPC4xx UIC external definitions and structure. * * Maintainer: David Gibson diff --git a/trunk/include/asm-powerpc/unaligned.h b/trunk/arch/powerpc/include/asm/unaligned.h similarity index 100% rename from trunk/include/asm-powerpc/unaligned.h rename to trunk/arch/powerpc/include/asm/unaligned.h diff --git a/trunk/include/asm-powerpc/uninorth.h b/trunk/arch/powerpc/include/asm/uninorth.h similarity index 100% rename from trunk/include/asm-powerpc/uninorth.h rename to trunk/arch/powerpc/include/asm/uninorth.h diff --git a/trunk/include/asm-powerpc/unistd.h b/trunk/arch/powerpc/include/asm/unistd.h similarity index 100% rename from trunk/include/asm-powerpc/unistd.h rename to trunk/arch/powerpc/include/asm/unistd.h diff --git a/trunk/include/asm-powerpc/user.h b/trunk/arch/powerpc/include/asm/user.h similarity index 100% rename from trunk/include/asm-powerpc/user.h rename to trunk/arch/powerpc/include/asm/user.h diff --git a/trunk/include/asm-powerpc/vdso.h b/trunk/arch/powerpc/include/asm/vdso.h similarity index 100% rename from trunk/include/asm-powerpc/vdso.h rename to trunk/arch/powerpc/include/asm/vdso.h diff --git a/trunk/include/asm-powerpc/vdso_datapage.h b/trunk/arch/powerpc/include/asm/vdso_datapage.h similarity index 100% rename from trunk/include/asm-powerpc/vdso_datapage.h rename to trunk/arch/powerpc/include/asm/vdso_datapage.h diff --git a/trunk/include/asm-powerpc/vga.h b/trunk/arch/powerpc/include/asm/vga.h similarity index 100% rename from trunk/include/asm-powerpc/vga.h rename to trunk/arch/powerpc/include/asm/vga.h diff --git a/trunk/include/asm-powerpc/vio.h b/trunk/arch/powerpc/include/asm/vio.h similarity index 100% rename from trunk/include/asm-powerpc/vio.h rename to trunk/arch/powerpc/include/asm/vio.h diff --git a/trunk/include/asm-powerpc/xilinx_intc.h b/trunk/arch/powerpc/include/asm/xilinx_intc.h similarity index 100% rename from trunk/include/asm-powerpc/xilinx_intc.h rename to trunk/arch/powerpc/include/asm/xilinx_intc.h diff --git a/trunk/include/asm-powerpc/xmon.h b/trunk/arch/powerpc/include/asm/xmon.h similarity index 100% rename from trunk/include/asm-powerpc/xmon.h rename to trunk/arch/powerpc/include/asm/xmon.h diff --git a/trunk/arch/s390/include/asm/xor.h b/trunk/arch/powerpc/include/asm/xor.h similarity index 100% rename from trunk/arch/s390/include/asm/xor.h rename to trunk/arch/powerpc/include/asm/xor.h diff --git a/trunk/arch/powerpc/mm/tlb_64.c b/trunk/arch/powerpc/mm/tlb_64.c index 409fcc7b63ce..be7dd422c0fa 100644 --- a/trunk/arch/powerpc/mm/tlb_64.c +++ b/trunk/arch/powerpc/mm/tlb_64.c @@ -34,7 +34,7 @@ DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); /* This is declared as we are using the more or less generic - * include/asm-powerpc/tlb.h file -- tgall + * arch/powerpc/include/asm/tlb.h file -- tgall */ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); static DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); diff --git a/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c index 835f2dc24dc9..014e26cda08d 100644 --- a/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c +++ b/trunk/arch/powerpc/platforms/86xx/mpc86xx_smp.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/trunk/arch/sparc/include/asm/futex_64.h b/trunk/arch/sparc/include/asm/futex_64.h index 47f95839dc69..d8378935ae90 100644 --- a/trunk/arch/sparc/include/asm/futex_64.h +++ b/trunk/arch/sparc/include/asm/futex_64.h @@ -59,7 +59,7 @@ static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); break; case FUTEX_OP_ANDN: - __futex_cas_op("andn\t%2, %4, %1", ret, oldval, uaddr, oparg); + __futex_cas_op("and\t%2, %4, %1", ret, oldval, uaddr, oparg); break; case FUTEX_OP_XOR: __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); diff --git a/trunk/arch/sparc/include/asm/irq_64.h b/trunk/arch/sparc/include/asm/irq_64.h index 3473e25231d9..0bb9bf531745 100644 --- a/trunk/arch/sparc/include/asm/irq_64.h +++ b/trunk/arch/sparc/include/asm/irq_64.h @@ -90,7 +90,4 @@ static inline unsigned long get_softint(void) return retval; } -void __trigger_all_cpu_backtrace(void); -#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() - #endif diff --git a/trunk/arch/sparc/include/asm/of_platform.h b/trunk/arch/sparc/include/asm/of_platform.h index 93a262c44022..aa699775ffba 100644 --- a/trunk/arch/sparc/include/asm/of_platform.h +++ b/trunk/arch/sparc/include/asm/of_platform.h @@ -1,24 +1,8 @@ #ifndef ___ASM_SPARC_OF_PLATFORM_H #define ___ASM_SPARC_OF_PLATFORM_H -/* - * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. - * - * Modified for Sparc by merging parts of asm/of_device.h - * by Stephen Rothwell - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -/* This is just here during the transition */ -#include - -extern struct bus_type ebus_bus_type; -extern struct bus_type sbus_bus_type; - -#define of_bus_type of_platform_bus_type /* for compatibility */ - +#if defined(__sparc__) && defined(__arch64__) +#include +#else +#include +#endif #endif diff --git a/trunk/arch/sparc/include/asm/of_platform_32.h b/trunk/arch/sparc/include/asm/of_platform_32.h new file mode 100644 index 000000000000..723f7c9b7411 --- /dev/null +++ b/trunk/arch/sparc/include/asm/of_platform_32.h @@ -0,0 +1,24 @@ +#ifndef _ASM_SPARC_OF_PLATFORM_H +#define _ASM_SPARC_OF_PLATFORM_H +/* + * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. + * + * Modified for Sparc by merging parts of asm/of_device.h + * by Stephen Rothwell + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ + +/* This is just here during the transition */ +#include + +extern struct bus_type ebus_bus_type; +extern struct bus_type sbus_bus_type; + +#define of_bus_type of_platform_bus_type /* for compatibility */ + +#endif /* _ASM_SPARC_OF_PLATFORM_H */ diff --git a/trunk/arch/sparc/include/asm/of_platform_64.h b/trunk/arch/sparc/include/asm/of_platform_64.h new file mode 100644 index 000000000000..4f66a5f6342d --- /dev/null +++ b/trunk/arch/sparc/include/asm/of_platform_64.h @@ -0,0 +1,25 @@ +#ifndef _ASM_SPARC64_OF_PLATFORM_H +#define _ASM_SPARC64_OF_PLATFORM_H +/* + * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. + * + * Modified for Sparc by merging parts of asm/of_device.h + * by Stephen Rothwell + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ + +/* This is just here during the transition */ +#include + +extern struct bus_type isa_bus_type; +extern struct bus_type ebus_bus_type; +extern struct bus_type sbus_bus_type; + +#define of_bus_type of_platform_bus_type /* for compatibility */ + +#endif /* _ASM_SPARC64_OF_PLATFORM_H */ diff --git a/trunk/arch/sparc/include/asm/ptrace_32.h b/trunk/arch/sparc/include/asm/ptrace_32.h index d409c4f21a5c..d43c88b86834 100644 --- a/trunk/arch/sparc/include/asm/ptrace_32.h +++ b/trunk/arch/sparc/include/asm/ptrace_32.h @@ -40,6 +40,16 @@ struct pt_regs { #define UREG_FP UREG_I6 #define UREG_RETPC UREG_I7 +static inline bool pt_regs_is_syscall(struct pt_regs *regs) +{ + return (regs->psr & PSR_SYSCALL); +} + +static inline bool pt_regs_clear_syscall(struct pt_regs *regs) +{ + return (regs->psr &= ~PSR_SYSCALL); +} + /* A register window */ struct reg_window { unsigned long locals[8]; @@ -62,16 +72,6 @@ struct sparc_stackf { #ifdef __KERNEL__ -static inline bool pt_regs_is_syscall(struct pt_regs *regs) -{ - return (regs->psr & PSR_SYSCALL); -} - -static inline bool pt_regs_clear_syscall(struct pt_regs *regs) -{ - return (regs->psr &= ~PSR_SYSCALL); -} - #define user_mode(regs) (!((regs)->psr & PSR_PS)) #define instruction_pointer(regs) ((regs)->pc) #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) diff --git a/trunk/arch/sparc/include/asm/ptrace_64.h b/trunk/arch/sparc/include/asm/ptrace_64.h index 06e4914c13f4..ec6d45c84cd0 100644 --- a/trunk/arch/sparc/include/asm/ptrace_64.h +++ b/trunk/arch/sparc/include/asm/ptrace_64.h @@ -37,6 +37,21 @@ struct pt_regs { unsigned int magic; }; +static inline int pt_regs_trap_type(struct pt_regs *regs) +{ + return regs->magic & 0x1ff; +} + +static inline bool pt_regs_is_syscall(struct pt_regs *regs) +{ + return (regs->tstate & TSTATE_SYSCALL); +} + +static inline bool pt_regs_clear_syscall(struct pt_regs *regs) +{ + return (regs->tstate &= ~TSTATE_SYSCALL); +} + struct pt_regs32 { unsigned int psr; unsigned int pc; @@ -113,30 +128,15 @@ struct sparc_trapf { #ifdef __KERNEL__ -static inline int pt_regs_trap_type(struct pt_regs *regs) -{ - return regs->magic & 0x1ff; -} - -static inline bool pt_regs_is_syscall(struct pt_regs *regs) -{ - return (regs->tstate & TSTATE_SYSCALL); -} - -static inline bool pt_regs_clear_syscall(struct pt_regs *regs) -{ - return (regs->tstate &= ~TSTATE_SYSCALL); -} - struct global_reg_snapshot { unsigned long tstate; unsigned long tpc; unsigned long tnpc; unsigned long o7; unsigned long i7; - unsigned long rpc; struct thread_info *thread; unsigned long pad1; + unsigned long pad2; }; #define __ARCH_WANT_COMPAT_SYS_PTRACE @@ -154,6 +154,7 @@ extern unsigned long profile_pc(struct pt_regs *); #define profile_pc(regs) instruction_pointer(regs) #endif extern void show_regs(struct pt_regs *); +extern void __show_regs(struct pt_regs *); #endif #else /* __ASSEMBLY__ */ @@ -314,9 +315,9 @@ extern void show_regs(struct pt_regs *); #define GR_SNAP_TNPC 0x10 #define GR_SNAP_O7 0x18 #define GR_SNAP_I7 0x20 -#define GR_SNAP_RPC 0x28 -#define GR_SNAP_THREAD 0x30 -#define GR_SNAP_PAD1 0x38 +#define GR_SNAP_THREAD 0x28 +#define GR_SNAP_PAD1 0x30 +#define GR_SNAP_PAD2 0x38 #endif /* __KERNEL__ */ diff --git a/trunk/arch/sparc64/kernel/of_device.c b/trunk/arch/sparc64/kernel/of_device.c index f8b50cbf4bf7..4fd48ab7dda4 100644 --- a/trunk/arch/sparc64/kernel/of_device.c +++ b/trunk/arch/sparc64/kernel/of_device.c @@ -56,6 +56,9 @@ struct of_device *of_find_device_by_node(struct device_node *dp) EXPORT_SYMBOL(of_find_device_by_node); #ifdef CONFIG_PCI +struct bus_type isa_bus_type; +EXPORT_SYMBOL(isa_bus_type); + struct bus_type ebus_bus_type; EXPORT_SYMBOL(ebus_bus_type); #endif @@ -838,6 +841,8 @@ static int __init of_bus_driver_init(void) err = of_bus_type_init(&of_platform_bus_type, "of"); #ifdef CONFIG_PCI + if (!err) + err = of_bus_type_init(&isa_bus_type, "isa"); if (!err) err = of_bus_type_init(&ebus_bus_type, "ebus"); #endif diff --git a/trunk/arch/sparc64/kernel/process.c b/trunk/arch/sparc64/kernel/process.c index 7f5debdc5fed..8a9cd3e165b9 100644 --- a/trunk/arch/sparc64/kernel/process.c +++ b/trunk/arch/sparc64/kernel/process.c @@ -52,6 +52,8 @@ #include #include +/* #define VERBOSE_SHOWREGS */ + static void sparc64_yield(int cpu) { if (tlb_type != hypervisor) @@ -211,8 +213,22 @@ static void show_regwindow(struct pt_regs *regs) printk("I7: <%pS>\n", (void *) rwk->ins[7]); } -void show_regs(struct pt_regs *regs) +#ifdef CONFIG_SMP +static DEFINE_SPINLOCK(regdump_lock); +#endif + +void __show_regs(struct pt_regs * regs) { +#ifdef CONFIG_SMP + unsigned long flags; + + /* Protect against xcall ipis which might lead to livelock on the lock */ + __asm__ __volatile__("rdpr %%pstate, %0\n\t" + "wrpr %0, %1, %%pstate" + : "=r" (flags) + : "i" (PSTATE_IE)); + spin_lock(®dump_lock); +#endif printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, regs->tpc, regs->tnpc, regs->y, print_tainted()); printk("TPC: <%pS>\n", (void *) regs->tpc); @@ -230,24 +246,64 @@ void show_regs(struct pt_regs *regs) regs->u_regs[15]); printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); show_regwindow(regs); +#ifdef CONFIG_SMP + spin_unlock(®dump_lock); + __asm__ __volatile__("wrpr %0, 0, %%pstate" + : : "r" (flags)); +#endif } -struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; -static DEFINE_SPINLOCK(global_reg_snapshot_lock); +#ifdef VERBOSE_SHOWREGS +static void idump_from_user (unsigned int *pc) +{ + int i; + int code; + + if((((unsigned long) pc) & 3)) + return; + + pc -= 3; + for(i = -3; i < 6; i++) { + get_user(code, pc); + printk("%c%08x%c",i?' ':'<',code,i?' ':'>'); + pc++; + } + printk("\n"); +} +#endif -static bool kstack_valid(struct thread_info *tp, struct reg_window *rw) +void show_regs(struct pt_regs *regs) { - unsigned long thread_base, fp; +#ifdef VERBOSE_SHOWREGS + extern long etrap, etraptl1; +#endif + __show_regs(regs); +#if 0 +#ifdef CONFIG_SMP + { + extern void smp_report_regs(void); - thread_base = (unsigned long) tp; - fp = (unsigned long) rw; + smp_report_regs(); + } +#endif +#endif - if (fp < (thread_base + sizeof(struct thread_info)) || - fp >= (thread_base + THREAD_SIZE)) - return false; - return true; +#ifdef VERBOSE_SHOWREGS + if (regs->tpc >= &etrap && regs->tpc < &etraptl1 && + regs->u_regs[14] >= (long)current - PAGE_SIZE && + regs->u_regs[14] < (long)current + 6 * PAGE_SIZE) { + printk ("*********parent**********\n"); + __show_regs((struct pt_regs *)(regs->u_regs[14] + PTREGS_OFF)); + idump_from_user(((struct pt_regs *)(regs->u_regs[14] + PTREGS_OFF))->tpc); + printk ("*********endpar**********\n"); + } +#endif } +#ifdef CONFIG_MAGIC_SYSRQ +struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; +static DEFINE_SPINLOCK(global_reg_snapshot_lock); + static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, int this_cpu) { @@ -259,22 +315,14 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; if (regs->tstate & TSTATE_PRIV) { - struct thread_info *tp = current_thread_info(); struct reg_window *rw; rw = (struct reg_window *) (regs->u_regs[UREG_FP] + STACK_BIAS); - if (kstack_valid(tp, rw)) { - global_reg_snapshot[this_cpu].i7 = rw->ins[7]; - rw = (struct reg_window *) - (rw->ins[6] + STACK_BIAS); - if (kstack_valid(tp, rw)) - global_reg_snapshot[this_cpu].rpc = rw->ins[7]; - } - } else { + global_reg_snapshot[this_cpu].i7 = rw->ins[6]; + } else global_reg_snapshot[this_cpu].i7 = 0; - global_reg_snapshot[this_cpu].rpc = 0; - } + global_reg_snapshot[this_cpu].thread = tp; } @@ -293,7 +341,7 @@ static void __global_reg_poll(struct global_reg_snapshot *gp) } } -void __trigger_all_cpu_backtrace(void) +static void sysrq_handle_globreg(int key, struct tty_struct *tty) { struct thread_info *tp = current_thread_info(); struct pt_regs *regs = get_irq_regs(); @@ -327,14 +375,13 @@ void __trigger_all_cpu_backtrace(void) ((tp && tp->task) ? tp->task->pid : -1)); if (gp->tstate & TSTATE_PRIV) { - printk(" TPC[%pS] O7[%pS] I7[%pS] RPC[%pS]\n", + printk(" TPC[%pS] O7[%pS] I7[%pS]\n", (void *) gp->tpc, (void *) gp->o7, - (void *) gp->i7, - (void *) gp->rpc); + (void *) gp->i7); } else { - printk(" TPC[%lx] O7[%lx] I7[%lx] RPC[%lx]\n", - gp->tpc, gp->o7, gp->i7, gp->rpc); + printk(" TPC[%lx] O7[%lx] I7[%lx]\n", + gp->tpc, gp->o7, gp->i7); } } @@ -343,13 +390,6 @@ void __trigger_all_cpu_backtrace(void) spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); } -#ifdef CONFIG_MAGIC_SYSRQ - -static void sysrq_handle_globreg(int key, struct tty_struct *tty) -{ - __trigger_all_cpu_backtrace(); -} - static struct sysrq_key_op sparc_globalreg_op = { .handler = sysrq_handle_globreg, .help_msg = "Globalregs", diff --git a/trunk/arch/sparc64/kernel/signal.c b/trunk/arch/sparc64/kernel/signal.c index ca5a6ae3a6e2..d1b84456a9ee 100644 --- a/trunk/arch/sparc64/kernel/signal.c +++ b/trunk/arch/sparc64/kernel/signal.c @@ -2,7 +2,7 @@ * arch/sparc64/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds - * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net) + * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -91,9 +91,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) err |= __get_user(regs->u_regs[UREG_G4], (&(*grp)[MC_G4])); err |= __get_user(regs->u_regs[UREG_G5], (&(*grp)[MC_G5])); err |= __get_user(regs->u_regs[UREG_G6], (&(*grp)[MC_G6])); - - /* Skip %g7 as that's the thread register in userspace. */ - + err |= __get_user(regs->u_regs[UREG_G7], (&(*grp)[MC_G7])); err |= __get_user(regs->u_regs[UREG_I0], (&(*grp)[MC_O0])); err |= __get_user(regs->u_regs[UREG_I1], (&(*grp)[MC_O1])); err |= __get_user(regs->u_regs[UREG_I2], (&(*grp)[MC_O2])); diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c index 340842e51ce1..7cf72b4bb108 100644 --- a/trunk/arch/sparc64/kernel/smp.c +++ b/trunk/arch/sparc64/kernel/smp.c @@ -843,6 +843,7 @@ void smp_tsb_sync(struct mm_struct *mm) extern unsigned long xcall_flush_tlb_mm; extern unsigned long xcall_flush_tlb_pending; extern unsigned long xcall_flush_tlb_kernel_range; +extern unsigned long xcall_report_regs; #ifdef CONFIG_MAGIC_SYSRQ extern unsigned long xcall_fetch_glob_regs; #endif @@ -1021,6 +1022,11 @@ void kgdb_roundup_cpus(unsigned long flags) } #endif +void smp_report_regs(void) +{ + smp_cross_call(&xcall_report_regs, 0, 0, 0); +} + #ifdef CONFIG_MAGIC_SYSRQ void smp_fetch_global_regs(void) { diff --git a/trunk/arch/sparc64/kernel/sparc64_ksyms.c b/trunk/arch/sparc64/kernel/sparc64_ksyms.c index 0804f71df6cb..504e678ee128 100644 --- a/trunk/arch/sparc64/kernel/sparc64_ksyms.c +++ b/trunk/arch/sparc64/kernel/sparc64_ksyms.c @@ -68,6 +68,7 @@ extern void *__memscan_zero(void *, size_t); extern void *__memscan_generic(void *, int, size_t); extern int __memcmp(const void *, const void *, __kernel_size_t); extern __kernel_size_t strlen(const char *); +extern void show_regs(struct pt_regs *); extern void syscall_trace(struct pt_regs *, int); extern void sys_sigsuspend(void); extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); diff --git a/trunk/arch/sparc64/kernel/traps.c b/trunk/arch/sparc64/kernel/traps.c index 404e8561e2d0..bd30ecba5630 100644 --- a/trunk/arch/sparc64/kernel/traps.c +++ b/trunk/arch/sparc64/kernel/traps.c @@ -1777,7 +1777,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, pfx, ent->err_raddr, ent->err_size, ent->err_cpu); - show_regs(regs); + __show_regs(regs); if ((cnt = atomic_read(ocnt)) != 0) { atomic_set(ocnt, 0); @@ -2177,6 +2177,7 @@ static inline struct reg_window *kernel_stack_up(struct reg_window *rw) void die_if_kernel(char *str, struct pt_regs *regs) { static int die_counter; + extern void smp_report_regs(void); int count = 0; /* Amuse the user. */ @@ -2189,7 +2190,7 @@ void die_if_kernel(char *str, struct pt_regs *regs) printk("%s(%d): %s [#%d]\n", current->comm, task_pid_nr(current), str, ++die_counter); notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV); __asm__ __volatile__("flushw"); - show_regs(regs); + __show_regs(regs); add_taint(TAINT_DIE); if (regs->tstate & TSTATE_PRIV) { struct reg_window *rw = (struct reg_window *) @@ -2214,6 +2215,11 @@ void die_if_kernel(char *str, struct pt_regs *regs) } user_instruction_dump ((unsigned int __user *) regs->tpc); } +#if 0 +#ifdef CONFIG_SMP + smp_report_regs(); +#endif +#endif if (regs->tstate & TSTATE_PRIV) do_exit(SIGKILL); do_exit(SIGSEGV); diff --git a/trunk/arch/sparc64/mm/ultra.S b/trunk/arch/sparc64/mm/ultra.S index ff1dc44d363e..4c8ca131ffaf 100644 --- a/trunk/arch/sparc64/mm/ultra.S +++ b/trunk/arch/sparc64/mm/ultra.S @@ -480,6 +480,41 @@ xcall_sync_tick: b rtrap_xcall ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 + /* NOTE: This is SPECIAL!! We do etrap/rtrap however + * we choose to deal with the "BH's run with + * %pil==15" problem (described in asm/pil.h) + * by just invoking rtrap directly past where + * BH's are checked for. + * + * We do it like this because we do not want %pil==15 + * lockups to prevent regs being reported. + */ + .globl xcall_report_regs +xcall_report_regs: + +661: rdpr %pstate, %g2 + wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate + .section .sun4v_2insn_patch, "ax" + .word 661b + nop + nop + .previous + + rdpr %pil, %g2 + wrpr %g0, 15, %pil + sethi %hi(109f), %g7 + b,pt %xcc, etrap_irq +109: or %g7, %lo(109b), %g7 +#ifdef CONFIG_TRACE_IRQFLAGS + call trace_hardirqs_off + nop +#endif + call __show_regs + add %sp, PTREGS_OFF, %o0 + /* Has to be a non-v9 branch due to the large distance. */ + b rtrap_xcall + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 + #ifdef CONFIG_MAGIC_SYSRQ .globl xcall_fetch_glob_regs xcall_fetch_glob_regs: @@ -496,13 +531,6 @@ xcall_fetch_glob_regs: stx %g7, [%g1 + GR_SNAP_TNPC] stx %o7, [%g1 + GR_SNAP_O7] stx %i7, [%g1 + GR_SNAP_I7] - /* Don't try this at home kids... */ - rdpr %cwp, %g2 - sub %g2, 1, %g7 - wrpr %g7, %cwp - mov %i7, %g7 - wrpr %g2, %cwp - stx %g7, [%g1 + GR_SNAP_RPC] sethi %hi(trap_block), %g7 or %g7, %lo(trap_block), %g7 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2 diff --git a/trunk/block/scsi_ioctl.c b/trunk/block/scsi_ioctl.c index 12a5182173f6..c5b9bcfc0a6d 100644 --- a/trunk/block/scsi_ioctl.c +++ b/trunk/block/scsi_ioctl.c @@ -518,7 +518,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, hdr.sbp = cgc.sense; if (hdr.sbp) hdr.mx_sb_len = sizeof(struct request_sense); - hdr.timeout = jiffies_to_msecs(cgc.timeout); + hdr.timeout = cgc.timeout; hdr.cmdp = ((struct cdrom_generic_command __user*) arg)->cmd; hdr.cmd_len = sizeof(cgc.cmd); diff --git a/trunk/drivers/char/efirtc.c b/trunk/drivers/char/efirtc.c index 34d15d548236..67fbd7aab5db 100644 --- a/trunk/drivers/char/efirtc.c +++ b/trunk/drivers/char/efirtc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/char/hvc_console.h b/trunk/drivers/char/hvc_console.h index d9ce10915625..9790201718ae 100644 --- a/trunk/drivers/char/hvc_console.h +++ b/trunk/drivers/char/hvc_console.h @@ -6,7 +6,7 @@ * Ryan S. Arnold * * hvc_console header information: - * moved here from include/asm-powerpc/hvconsole.h + * moved here from arch/powerpc/include/asm/hvconsole.h * and drivers/char/hvc_console.c * * This program is free software; you can redistribute it and/or modify diff --git a/trunk/drivers/char/hvcs.c b/trunk/drivers/char/hvcs.c index 786d518e9477..473d9b14439a 100644 --- a/trunk/drivers/char/hvcs.c +++ b/trunk/drivers/char/hvcs.c @@ -114,7 +114,7 @@ * the hvcs_final_close() function in order to get it out of the spinlock. * Rearranged hvcs_close(). Cleaned up some printks and did some housekeeping * on the changelog. Removed local CLC_LENGTH and used HVCS_CLC_LENGTH from - * include/asm-powerpc/hvcserver.h + * arch/powerepc/include/asm/hvcserver.h * * 1.3.2 -> 1.3.3 Replaced yield() in hvcs_close() with tty_wait_until_sent() to * prevent possible lockup with realtime scheduling as similarily pointed out by diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index 1bc00c9d860d..82a51f38a546 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -916,6 +916,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) ws.ws_col = vc->vc_cols; ws.ws_ypixel = vc->vc_scan_lines; + mutex_lock(&vc->vc_tty->termios_mutex); spin_lock_irq(&vc->vc_tty->ctrl_lock); if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col)) pgrp = get_pid(vc->vc_tty->pgrp); @@ -925,6 +926,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) put_pid(pgrp); } *cws = ws; + mutex_unlock(&vc->vc_tty->termios_mutex); } if (CON_IS_VISIBLE(vc)) diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c index dd9bc68f1c7b..898c8b5c38dd 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c @@ -42,7 +42,7 @@ */ -#include +#include #include "ehca_classes.h" #include "ehca_tools.h" #include "ehca_qes.h" diff --git a/trunk/drivers/isdn/Makefile b/trunk/drivers/isdn/Makefile index f1f777570e8e..8380a4568d11 100644 --- a/trunk/drivers/isdn/Makefile +++ b/trunk/drivers/isdn/Makefile @@ -5,7 +5,7 @@ obj-$(CONFIG_ISDN_I4L) += i4l/ obj-$(CONFIG_ISDN_CAPI) += capi/ obj-$(CONFIG_MISDN) += mISDN/ -obj-$(CONFIG_ISDN) += hardware/ +obj-$(CONFIG_ISDN_CAPI) += hardware/ obj-$(CONFIG_ISDN_DIVERSION) += divert/ obj-$(CONFIG_ISDN_DRV_HISAX) += hisax/ obj-$(CONFIG_ISDN_DRV_ICN) += icn/ diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c index 1eac03f39d00..2649ea55a9e8 100644 --- a/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/trunk/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -140,7 +140,7 @@ * #define HFC_REGISTER_DEBUG */ -static const char *hfcmulti_revision = "2.02"; +static const char *hfcmulti_revision = "2.00"; #include #include @@ -427,12 +427,12 @@ write_fifo_regio(struct hfc_multi *hc, u_char *data, int len) { outb(A_FIFO_DATA0, (hc->pci_iobase)+4); while (len>>2) { - outl(cpu_to_le32(*(u32 *)data), hc->pci_iobase); + outl(*(u32 *)data, hc->pci_iobase); data += 4; len -= 4; } while (len>>1) { - outw(cpu_to_le16(*(u16 *)data), hc->pci_iobase); + outw(*(u16 *)data, hc->pci_iobase); data += 2; len -= 2; } @@ -447,19 +447,17 @@ void write_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) { while (len>>2) { - writel(cpu_to_le32(*(u32 *)data), - hc->pci_membase + A_FIFO_DATA0); + writel(*(u32 *)data, (hc->pci_membase)+A_FIFO_DATA0); data += 4; len -= 4; } while (len>>1) { - writew(cpu_to_le16(*(u16 *)data), - hc->pci_membase + A_FIFO_DATA0); + writew(*(u16 *)data, (hc->pci_membase)+A_FIFO_DATA0); data += 2; len -= 2; } while (len) { - writeb(*data, hc->pci_membase + A_FIFO_DATA0); + writeb(*data, (hc->pci_membase)+A_FIFO_DATA0); data++; len--; } @@ -470,12 +468,12 @@ read_fifo_regio(struct hfc_multi *hc, u_char *data, int len) { outb(A_FIFO_DATA0, (hc->pci_iobase)+4); while (len>>2) { - *(u32 *)data = le32_to_cpu(inl(hc->pci_iobase)); + *(u32 *)data = inl(hc->pci_iobase); data += 4; len -= 4; } while (len>>1) { - *(u16 *)data = le16_to_cpu(inw(hc->pci_iobase)); + *(u16 *)data = inw(hc->pci_iobase); data += 2; len -= 2; } @@ -492,18 +490,18 @@ read_fifo_pcimem(struct hfc_multi *hc, u_char *data, int len) { while (len>>2) { *(u32 *)data = - le32_to_cpu(readl(hc->pci_membase + A_FIFO_DATA0)); + readl((hc->pci_membase)+A_FIFO_DATA0); data += 4; len -= 4; } while (len>>1) { *(u16 *)data = - le16_to_cpu(readw(hc->pci_membase + A_FIFO_DATA0)); + readw((hc->pci_membase)+A_FIFO_DATA0); data += 2; len -= 2; } while (len) { - *data = readb(hc->pci_membase + A_FIFO_DATA0); + *data = readb((hc->pci_membase)+A_FIFO_DATA0); data++; len--; } @@ -3973,7 +3971,7 @@ open_bchannel(struct hfc_multi *hc, struct dchannel *dch, struct bchannel *bch; int ch; - if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) + if (!test_bit(rq->adr.channel, &dch->dev.channelmap[0])) return -EINVAL; if (rq->protocol == ISDN_P_NONE) return -EINVAL; @@ -4589,7 +4587,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) list_add(&bch->ch.list, &dch->dev.bchannels); hc->chan[ch].bch = bch; hc->chan[ch].port = 0; - set_channelmap(bch->nr, dch->dev.channelmap); + test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); } /* set optical line type */ if (port[Port_cnt] & 0x001) { @@ -4757,7 +4755,7 @@ init_multi_port(struct hfc_multi *hc, int pt) list_add(&bch->ch.list, &dch->dev.bchannels); hc->chan[i + ch].bch = bch; hc->chan[i + ch].port = pt; - set_channelmap(bch->nr, dch->dev.channelmap); + test_and_set_bit(bch->nr, &dch->dev.channelmap[0]); } /* set master clock */ if (port[Port_cnt] & 0x001) { @@ -5052,12 +5050,12 @@ static void __devexit hfc_remove_pci(struct pci_dev *pdev) static const struct hm_map hfcm_map[] = { /*0*/ {VENDOR_BN, "HFC-1S Card (mini PCI)", 4, 1, 1, 3, 0, DIP_4S, 0}, -/*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S, 0}, +/*1*/ {VENDOR_BN, "HFC-2S Card", 4, 2, 1, 3, 0, DIP_4S}, /*2*/ {VENDOR_BN, "HFC-2S Card (mini PCI)", 4, 2, 1, 3, 0, DIP_4S, 0}, /*3*/ {VENDOR_BN, "HFC-4S Card", 4, 4, 1, 2, 0, DIP_4S, 0}, /*4*/ {VENDOR_BN, "HFC-4S Card (mini PCI)", 4, 4, 1, 2, 0, 0, 0}, /*5*/ {VENDOR_CCD, "HFC-4S Eval (old)", 4, 4, 0, 0, 0, 0, 0}, -/*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, DIP_4S, 0}, +/*6*/ {VENDOR_CCD, "HFC-4S IOB4ST", 4, 4, 1, 2, 0, 0, 0}, /*7*/ {VENDOR_CCD, "HFC-4S", 4, 4, 1, 2, 0, 0, 0}, /*8*/ {VENDOR_DIG, "HFC-4S Card", 4, 4, 0, 2, 0, 0, HFC_IO_MODE_REGIO}, /*9*/ {VENDOR_CCD, "HFC-4S Swyx 4xS0 SX2 QuadBri", 4, 4, 1, 2, 0, 0, 0}, @@ -5253,6 +5251,9 @@ HFCmulti_init(void) if (debug & DEBUG_HFCMULTI_INIT) printk(KERN_DEBUG "%s: init entered\n", __func__); +#ifdef __BIG_ENDIAN +#error "not running on big endian machines now" +#endif hfc_interrupt = symbol_get(ztdummy_extern_interrupt); register_interrupt = symbol_get(ztdummy_register_interrupt); unregister_interrupt = symbol_get(ztdummy_unregister_interrupt); diff --git a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c index 9cf5edbb1a9b..3231814e7efa 100644 --- a/trunk/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/trunk/drivers/isdn/hardware/mISDN/hfcpci.c @@ -2056,7 +2056,7 @@ setup_card(struct hfc_pci *card) card->dch.dev.nrbchan = 2; for (i = 0; i < 2; i++) { card->bch[i].nr = i + 1; - set_channelmap(i + 1, card->dch.dev.channelmap); + test_and_set_bit(i + 1, &card->dch.dev.channelmap[0]); card->bch[i].debug = debug; mISDN_initbchannel(&card->bch[i], MAX_DATA_MEM); card->bch[i].hw = card; diff --git a/trunk/drivers/isdn/mISDN/l1oip_core.c b/trunk/drivers/isdn/mISDN/l1oip_core.c index e42150a57780..155b99780c4f 100644 --- a/trunk/drivers/isdn/mISDN/l1oip_core.c +++ b/trunk/drivers/isdn/mISDN/l1oip_core.c @@ -1006,7 +1006,8 @@ open_bchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq) struct bchannel *bch; int ch; - if (!test_channelmap(rq->adr.channel, dch->dev.channelmap)) + if (!test_bit(rq->adr.channel & 0x1f, + &dch->dev.channelmap[rq->adr.channel >> 5])) return -EINVAL; if (rq->protocol == ISDN_P_NONE) return -EINVAL; @@ -1411,7 +1412,8 @@ init_card(struct l1oip *hc, int pri, int bundle) bch->ch.nr = i + ch; list_add(&bch->ch.list, &dch->dev.bchannels); hc->chan[i + ch].bch = bch; - set_channelmap(bch->nr, dch->dev.channelmap); + test_and_set_bit(bch->nr & 0x1f, + &dch->dev.channelmap[bch->nr >> 5]); } ret = mISDN_register_device(&dch->dev, hc->name); if (ret) diff --git a/trunk/drivers/isdn/mISDN/socket.c b/trunk/drivers/isdn/mISDN/socket.c index e5a20f9542d1..4ba4cc364c9e 100644 --- a/trunk/drivers/isdn/mISDN/socket.c +++ b/trunk/drivers/isdn/mISDN/socket.c @@ -379,7 +379,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); di.protocol = dev->D.protocol; memcpy(di.channelmap, dev->channelmap, - sizeof(di.channelmap)); + MISDN_CHMAP_SIZE * 4); di.nrbchan = dev->nrbchan; strcpy(di.name, dev->name); if (copy_to_user((void __user *)arg, &di, sizeof(di))) @@ -637,7 +637,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) di.Bprotocols = dev->Bprotocols | get_all_Bprotocols(); di.protocol = dev->D.protocol; memcpy(di.channelmap, dev->channelmap, - sizeof(di.channelmap)); + MISDN_CHMAP_SIZE * 4); di.nrbchan = dev->nrbchan; strcpy(di.name, dev->name); if (copy_to_user((void __user *)arg, &di, sizeof(di))) diff --git a/trunk/drivers/mtd/maps/ipaq-flash.c b/trunk/drivers/mtd/maps/ipaq-flash.c index 113b1062020d..a806119797e0 100644 --- a/trunk/drivers/mtd/maps/ipaq-flash.c +++ b/trunk/drivers/mtd/maps/ipaq-flash.c @@ -25,7 +25,7 @@ #endif #include -#include +#include #include diff --git a/trunk/drivers/mtd/mtdsuper.c b/trunk/drivers/mtd/mtdsuper.c index 00d46e137b2a..9b6af7e74a65 100644 --- a/trunk/drivers/mtd/mtdsuper.c +++ b/trunk/drivers/mtd/mtdsuper.c @@ -125,11 +125,8 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, int (*fill_super)(struct super_block *, void *, int), struct vfsmount *mnt) { -#ifdef CONFIG_BLOCK struct block_device *bdev; - int ret, major; -#endif - int mtdnr; + int mtdnr, ret; if (!dev_name) return -EINVAL; @@ -181,7 +178,6 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, } } -#ifdef CONFIG_BLOCK /* try the old way - the hack where we allowed users to mount * /dev/mtdblock$(n) but didn't actually _use_ the blockdev */ @@ -194,25 +190,22 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, DEBUG(1, "MTDSB: lookup_bdev() returned 0\n"); ret = -EINVAL; + if (MAJOR(bdev->bd_dev) != MTD_BLOCK_MAJOR) + goto not_an_MTD_device; - major = MAJOR(bdev->bd_dev); mtdnr = MINOR(bdev->bd_dev); bdput(bdev); - if (major != MTD_BLOCK_MAJOR) - goto not_an_MTD_device; - return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super, mnt); not_an_MTD_device: -#endif /* CONFIG_BLOCK */ - if (!(flags & MS_SILENT)) printk(KERN_NOTICE "MTD: Attempt to mount non-MTD device \"%s\"\n", dev_name); - return -EINVAL; + bdput(bdev); + return ret; } EXPORT_SYMBOL_GPL(get_sb_mtd); diff --git a/trunk/drivers/pcmcia/rsrc_nonstatic.c b/trunk/drivers/pcmcia/rsrc_nonstatic.c index 203e579ebbd2..d0c1d63d1891 100644 --- a/trunk/drivers/pcmcia/rsrc_nonstatic.c +++ b/trunk/drivers/pcmcia/rsrc_nonstatic.c @@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, destroy_cis_cache(s); } s->cis_mem.res = NULL; - if ((ret != 0) || (*count == 0)) + if ((ret != 0) || (count == 0)) return 0; return 1; } diff --git a/trunk/drivers/scsi/hptiop.c b/trunk/drivers/scsi/hptiop.c index 74d12b58a263..da876d3924be 100644 --- a/trunk/drivers/scsi/hptiop.c +++ b/trunk/drivers/scsi/hptiop.c @@ -1249,13 +1249,6 @@ static struct pci_device_id hptiop_id_table[] = { { PCI_VDEVICE(TTI, 0x3522), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3540), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x3530), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x3560), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x4322), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x4210), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x4211), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x4310), (kernel_ulong_t)&hptiop_itl_ops }, - { PCI_VDEVICE(TTI, 0x4311), (kernel_ulong_t)&hptiop_itl_ops }, { PCI_VDEVICE(TTI, 0x3120), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3122), (kernel_ulong_t)&hptiop_mv_ops }, { PCI_VDEVICE(TTI, 0x3020), (kernel_ulong_t)&hptiop_mv_ops }, diff --git a/trunk/drivers/scsi/scsi_transport_spi.c b/trunk/drivers/scsi/scsi_transport_spi.c index b29360ed0bdc..75a64a6cae8c 100644 --- a/trunk/drivers/scsi/scsi_transport_spi.c +++ b/trunk/drivers/scsi/scsi_transport_spi.c @@ -366,14 +366,12 @@ spi_transport_rd_attr(rti, "%d\n"); spi_transport_rd_attr(pcomp_en, "%d\n"); spi_transport_rd_attr(hold_mcs, "%d\n"); -/* we only care about the first child device that's a real SCSI device - * so we return 1 to terminate the iteration when we find it */ +/* we only care about the first child device so we return 1 */ static int child_iter(struct device *dev, void *data) { - if (!scsi_is_sdev_device(dev)) - return 0; + struct scsi_device *sdev = to_scsi_device(dev); - spi_dv_device(to_scsi_device(dev)); + spi_dv_device(sdev); return 1; } diff --git a/trunk/drivers/scsi/sd.c b/trunk/drivers/scsi/sd.c index 8e08d51a0f05..e5e7d7856454 100644 --- a/trunk/drivers/scsi/sd.c +++ b/trunk/drivers/scsi/sd.c @@ -375,6 +375,7 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) struct gendisk *disk = rq->rq_disk; struct scsi_disk *sdkp; sector_t block = rq->sector; + sector_t threshold; unsigned int this_count = rq->nr_sectors; unsigned int timeout = sdp->timeout; int ret; @@ -422,13 +423,21 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) } /* - * Some devices (some sdcards for one) don't like it if the - * last sector gets read in a larger then 1 sector read. + * Some SD card readers can't handle multi-sector accesses which touch + * the last one or two hardware sectors. Split accesses as needed. */ - if (unlikely(sdp->last_sector_bug && - rq->nr_sectors > sdp->sector_size / 512 && - block + this_count == get_capacity(disk))) - this_count -= sdp->sector_size / 512; + threshold = get_capacity(disk) - SD_LAST_BUGGY_SECTORS * + (sdp->sector_size / 512); + + if (unlikely(sdp->last_sector_bug && block + this_count > threshold)) { + if (block < threshold) { + /* Access up to the threshold but not beyond */ + this_count = threshold - block; + } else { + /* Access only a single hardware sector */ + this_count = sdp->sector_size / 512; + } + } SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n", (unsigned long long)block)); diff --git a/trunk/drivers/scsi/sd.h b/trunk/drivers/scsi/sd.h index 550b2f70a1f8..95b9f06534d5 100644 --- a/trunk/drivers/scsi/sd.h +++ b/trunk/drivers/scsi/sd.h @@ -31,6 +31,12 @@ */ #define SD_BUF_SIZE 512 +/* + * Number of sectors at the end of the device to avoid multi-sector + * accesses to in the case of last_sector_bug + */ +#define SD_LAST_BUGGY_SECTORS 8 + struct scsi_disk { struct scsi_driver *driver; /* always &sd_template */ struct scsi_device *device; diff --git a/trunk/drivers/scsi/ses.c b/trunk/drivers/scsi/ses.c index 1bcf3c33d7ff..0fe031f003e7 100644 --- a/trunk/drivers/scsi/ses.c +++ b/trunk/drivers/scsi/ses.c @@ -345,14 +345,14 @@ static int ses_enclosure_find_by_addr(struct enclosure_device *edev, return 0; } -#define VPD_INQUIRY_SIZE 36 +#define VPD_INQUIRY_SIZE 512 static void ses_match_to_enclosure(struct enclosure_device *edev, struct scsi_device *sdev) { unsigned char *buf = kmalloc(VPD_INQUIRY_SIZE, GFP_KERNEL); unsigned char *desc; - u16 vpd_len; + int len; struct efd efd = { .addr = 0, }; @@ -372,19 +372,9 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES)) goto free; - vpd_len = (buf[2] << 8) + buf[3]; - kfree(buf); - buf = kmalloc(vpd_len, GFP_KERNEL); - if (!buf) - return; - cmd[3] = vpd_len >> 8; - cmd[4] = vpd_len & 0xff; - if (scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, - vpd_len, NULL, SES_TIMEOUT, SES_RETRIES)) - goto free; - + len = (buf[2] << 8) + buf[3]; desc = buf + 4; - while (desc < buf + vpd_len) { + while (desc < buf + len) { enum scsi_protocol proto = desc[0] >> 4; u8 code_set = desc[0] & 0x0f; u8 piv = desc[1] & 0x80; diff --git a/trunk/drivers/serial/bfin_5xx.c b/trunk/drivers/serial/bfin_5xx.c index efcd44344fb1..9d8543762a30 100644 --- a/trunk/drivers/serial/bfin_5xx.c +++ b/trunk/drivers/serial/bfin_5xx.c @@ -817,7 +817,7 @@ static void bfin_serial_set_ldisc(struct uart_port *port) if (line >= port->info->port.tty->driver->num) return; - switch (port->info->port.tty->termios->c_line) { + switch (port->info->port.tty->ldisc.num) { case N_IRDA: val = UART_GET_GCTL(&bfin_serial_ports[line]); val |= (IREN | RPOLC); diff --git a/trunk/drivers/serial/crisv10.c b/trunk/drivers/serial/crisv10.c index bf94a770bb44..8249ac490559 100644 --- a/trunk/drivers/serial/crisv10.c +++ b/trunk/drivers/serial/crisv10.c @@ -234,7 +234,7 @@ unsigned long r_alt_ser_baudrate_shadow = 0; static struct e100_serial rs_table[] = { { .baud = DEF_BAUD, - .ioport = (unsigned char *)R_SERIAL0_CTRL, + .port = (unsigned char *)R_SERIAL0_CTRL, .irq = 1U << 12, /* uses DMA 6 and 7 */ .oclrintradr = R_DMA_CH6_CLR_INTR, .ofirstadr = R_DMA_CH6_FIRST, @@ -288,7 +288,7 @@ static struct e100_serial rs_table[] = { }, /* ttyS0 */ #ifndef CONFIG_SVINTO_SIM { .baud = DEF_BAUD, - .ioport = (unsigned char *)R_SERIAL1_CTRL, + .port = (unsigned char *)R_SERIAL1_CTRL, .irq = 1U << 16, /* uses DMA 8 and 9 */ .oclrintradr = R_DMA_CH8_CLR_INTR, .ofirstadr = R_DMA_CH8_FIRST, @@ -344,7 +344,7 @@ static struct e100_serial rs_table[] = { }, /* ttyS1 */ { .baud = DEF_BAUD, - .ioport = (unsigned char *)R_SERIAL2_CTRL, + .port = (unsigned char *)R_SERIAL2_CTRL, .irq = 1U << 4, /* uses DMA 2 and 3 */ .oclrintradr = R_DMA_CH2_CLR_INTR, .ofirstadr = R_DMA_CH2_FIRST, @@ -398,7 +398,7 @@ static struct e100_serial rs_table[] = { }, /* ttyS2 */ { .baud = DEF_BAUD, - .ioport = (unsigned char *)R_SERIAL3_CTRL, + .port = (unsigned char *)R_SERIAL3_CTRL, .irq = 1U << 8, /* uses DMA 4 and 5 */ .oclrintradr = R_DMA_CH4_CLR_INTR, .ofirstadr = R_DMA_CH4_FIRST, @@ -939,7 +939,7 @@ static const struct control_pins e100_modem_pins[NR_PORTS] = /* Output */ #define E100_RTS_GET(info) ((info)->rx_ctrl & E100_RTS_MASK) /* Input */ -#define E100_CTS_GET(info) ((info)->ioport[REG_STATUS] & E100_CTS_MASK) +#define E100_CTS_GET(info) ((info)->port[REG_STATUS] & E100_CTS_MASK) /* These are typically PA or PB and 0 means 0V, 1 means 3.3V */ /* Is an output */ @@ -1092,7 +1092,7 @@ e100_rts(struct e100_serial *info, int set) local_irq_save(flags); info->rx_ctrl &= ~E100_RTS_MASK; info->rx_ctrl |= (set ? 0 : E100_RTS_MASK); /* RTS is active low */ - info->ioport[REG_REC_CTRL] = info->rx_ctrl; + info->port[REG_REC_CTRL] = info->rx_ctrl; local_irq_restore(flags); #ifdef SERIAL_DEBUG_IO printk("ser%i rts %i\n", info->line, set); @@ -1142,7 +1142,7 @@ e100_disable_rx(struct e100_serial *info) { #ifndef CONFIG_SVINTO_SIM /* disable the receiver */ - info->ioport[REG_REC_CTRL] = + info->port[REG_REC_CTRL] = (info->rx_ctrl &= ~IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); #endif } @@ -1152,7 +1152,7 @@ e100_enable_rx(struct e100_serial *info) { #ifndef CONFIG_SVINTO_SIM /* enable the receiver */ - info->ioport[REG_REC_CTRL] = + info->port[REG_REC_CTRL] = (info->rx_ctrl |= IO_MASK(R_SERIAL0_REC_CTRL, rec_enable)); #endif } @@ -1490,7 +1490,7 @@ rs_stop(struct tty_struct *tty) xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); } - *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; + *((unsigned long *)&info->port[REG_XOFF]) = xoff; local_irq_restore(flags); } } @@ -1513,7 +1513,7 @@ rs_start(struct tty_struct *tty) xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); } - *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; + *((unsigned long *)&info->port[REG_XOFF]) = xoff; if (!info->uses_dma_out && info->xmit.head != info->xmit.tail && info->xmit.buf) e100_enable_serial_tx_ready_irq(info); @@ -1888,7 +1888,7 @@ static void receive_chars_dma(struct e100_serial *info) handle_all_descr_data(info); /* Read the status register to detect errors */ - rstat = info->ioport[REG_STATUS]; + rstat = info->port[REG_STATUS]; if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { DFLOW(DEBUG_LOG(info->line, "XOFF detect stat %x\n", rstat)); } @@ -1897,7 +1897,7 @@ static void receive_chars_dma(struct e100_serial *info) /* If we got an error, we must reset it by reading the * data_in field */ - unsigned char data = info->ioport[REG_DATA]; + unsigned char data = info->port[REG_DATA]; PROCSTAT(ser_stat[info->line].errors_cnt++); DEBUG_LOG(info->line, "#dERR: s d 0x%04X\n", @@ -2077,7 +2077,7 @@ static int force_eop_if_needed(struct e100_serial *info) /* We check data_avail bit to determine if data has * arrived since last time */ - unsigned char rstat = info->ioport[REG_STATUS]; + unsigned char rstat = info->port[REG_STATUS]; /* error or datavail? */ if (rstat & SER_ERROR_MASK) { @@ -2096,7 +2096,7 @@ static int force_eop_if_needed(struct e100_serial *info) TIMERD(DEBUG_LOG(info->line, "timeout: rstat 0x%03X\n", rstat | (info->line << 8))); /* Read data to clear status flags */ - (void)info->ioport[REG_DATA]; + (void)info->port[REG_DATA]; info->forced_eop = 0; START_FLUSH_FAST_TIMER(info, "magic"); @@ -2296,7 +2296,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) } /* Read data and status at the same time */ - data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); + data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); more_data: if (data_read & IO_MASK(R_SERIAL0_READ, xoff_detect) ) { DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); @@ -2391,7 +2391,7 @@ struct e100_serial * handle_ser_rx_interrupt_no_dma(struct e100_serial *info) info->icount.rx++; - data_read = *((unsigned long *)&info->ioport[REG_DATA_STATUS32]); + data_read = *((unsigned long *)&info->port[REG_DATA_STATUS32]); if (data_read & IO_MASK(R_SERIAL0_READ, data_avail)) { DEBUG_LOG(info->line, "ser_rx %c in loop\n", IO_EXTRACT(R_SERIAL0_READ, data_in, data_read)); goto more_data; @@ -2413,7 +2413,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) return handle_ser_rx_interrupt_no_dma(info); } /* DMA is used */ - rstat = info->ioport[REG_STATUS]; + rstat = info->port[REG_STATUS]; if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) { DFLOW(DEBUG_LOG(info->line, "XOFF detect\n", 0)); } @@ -2426,7 +2426,7 @@ static struct e100_serial* handle_ser_rx_interrupt(struct e100_serial *info) /* If we got an error, we must reset it by reading the * data_in field */ - data = info->ioport[REG_DATA]; + data = info->port[REG_DATA]; DINTR1(DEBUG_LOG(info->line, "ser_rx! %c\n", data)); DINTR1(DEBUG_LOG(info->line, "ser_rx err stat %02X\n", rstat)); if (!data && (rstat & SER_FRAMING_ERR_MASK)) { @@ -2528,10 +2528,10 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) unsigned char rstat; DFLOW(DEBUG_LOG(info->line, "tx_int: xchar 0x%02X\n", info->x_char)); local_irq_save(flags); - rstat = info->ioport[REG_STATUS]; + rstat = info->port[REG_STATUS]; DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); - info->ioport[REG_TR_DATA] = info->x_char; + info->port[REG_TR_DATA] = info->x_char; info->icount.tx++; info->x_char = 0; /* We must enable since it is disabled in ser_interrupt */ @@ -2545,7 +2545,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) /* We only use normal tx interrupt when sending x_char */ DFLOW(DEBUG_LOG(info->line, "tx_int: xchar sent\n", 0)); local_irq_save(flags); - rstat = info->ioport[REG_STATUS]; + rstat = info->port[REG_STATUS]; DFLOW(DEBUG_LOG(info->line, "stat %x\n", rstat)); e100_disable_serial_tx_ready_irq(info); if (info->port.tty->stopped) @@ -2573,7 +2573,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) DINTR2(DEBUG_LOG(info->line, "tx_int %c\n", info->xmit.buf[info->xmit.tail])); /* Send a byte, rs485 timing is critical so turn of ints */ local_irq_save(flags); - info->ioport[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; + info->port[REG_TR_DATA] = info->xmit.buf[info->xmit.tail]; info->xmit.tail = (info->xmit.tail + 1) & (SERIAL_XMIT_SIZE-1); info->icount.tx++; if (info->xmit.head == info->xmit.tail) { @@ -2848,7 +2848,7 @@ startup(struct e100_serial * info) /* dummy read to reset any serial errors */ - (void)info->ioport[REG_DATA]; + (void)info->port[REG_DATA]; /* enable the interrupts */ if (info->uses_dma_out) @@ -2897,7 +2897,7 @@ shutdown(struct e100_serial * info) /* shut down the transmitter and receiver */ DFLOW(DEBUG_LOG(info->line, "shutdown %i\n", info->line)); e100_disable_rx(info); - info->ioport[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); + info->port[REG_TR_CTRL] = (info->tx_ctrl &= ~0x40); /* disable interrupts, reset dma channels */ if (info->uses_dma_in) { @@ -2968,7 +2968,7 @@ change_speed(struct e100_serial *info) if (!info->port.tty || !info->port.tty->termios) return; - if (!info->ioport) + if (!info->port) return; cflag = info->port.tty->termios->c_cflag; @@ -3037,7 +3037,7 @@ change_speed(struct e100_serial *info) info->baud = cflag_to_baud(cflag); #ifndef CONFIG_SVINTO_SIM - info->ioport[REG_BAUD] = cflag_to_etrax_baud(cflag); + info->port[REG_BAUD] = cflag_to_etrax_baud(cflag); #endif /* CONFIG_SVINTO_SIM */ } @@ -3097,8 +3097,8 @@ change_speed(struct e100_serial *info) /* actually write the control regs to the hardware */ - info->ioport[REG_TR_CTRL] = info->tx_ctrl; - info->ioport[REG_REC_CTRL] = info->rx_ctrl; + info->port[REG_TR_CTRL] = info->tx_ctrl; + info->port[REG_REC_CTRL] = info->rx_ctrl; xoff = IO_FIELD(R_SERIAL0_XOFF, xoff_char, STOP_CHAR(info->port.tty)); xoff |= IO_STATE(R_SERIAL0_XOFF, tx_stop, enable); if (info->port.tty->termios->c_iflag & IXON ) { @@ -3107,7 +3107,7 @@ change_speed(struct e100_serial *info) xoff |= IO_STATE(R_SERIAL0_XOFF, auto_xoff, enable); } - *((unsigned long *)&info->ioport[REG_XOFF]) = xoff; + *((unsigned long *)&info->port[REG_XOFF]) = xoff; local_irq_restore(flags); #endif /* !CONFIG_SVINTO_SIM */ @@ -3156,7 +3156,7 @@ static int rs_raw_write(struct tty_struct *tty, #ifdef SERIAL_DEBUG_DATA if (info->line == SERIAL_DEBUG_LINE) printk("rs_raw_write (%d), status %d\n", - count, info->ioport[REG_STATUS]); + count, info->port[REG_STATUS]); #endif #ifdef CONFIG_SVINTO_SIM @@ -3427,7 +3427,7 @@ get_serial_info(struct e100_serial * info, memset(&tmp, 0, sizeof(tmp)); tmp.type = info->type; tmp.line = info->line; - tmp.port = (int)info->ioport; + tmp.port = (int)info->port; tmp.irq = info->irq; tmp.flags = info->flags; tmp.baud_base = info->baud_base; @@ -3557,14 +3557,14 @@ char *get_control_state_str(int MLines, char *s) } #endif -static int +static void rs_break(struct tty_struct *tty, int break_state) { struct e100_serial *info = (struct e100_serial *)tty->driver_data; unsigned long flags; - if (!info->ioport) - return -EIO; + if (!info->port) + return; local_irq_save(flags); if (break_state == -1) { @@ -3575,9 +3575,8 @@ rs_break(struct tty_struct *tty, int break_state) /* Set bit 7 (txd) and 6 (tr_enable) */ info->tx_ctrl |= (0x80 | 0x40); } - info->ioport[REG_TR_CTRL] = info->tx_ctrl; + info->port[REG_TR_CTRL] = info->tx_ctrl; local_irq_restore(flags); - return 0; } static int @@ -4232,9 +4231,9 @@ static int line_info(char *buf, struct e100_serial *info) unsigned long tmp; ret = sprintf(buf, "%d: uart:E100 port:%lX irq:%d", - info->line, (unsigned long)info->ioport, info->irq); + info->line, (unsigned long)info->port, info->irq); - if (!info->ioport || (info->type == PORT_UNKNOWN)) { + if (!info->port || (info->type == PORT_UNKNOWN)) { ret += sprintf(buf+ret, "\n"); return ret; } @@ -4282,7 +4281,7 @@ static int line_info(char *buf, struct e100_serial *info) } { - unsigned char rstat = info->ioport[REG_STATUS]; + unsigned char rstat = info->port[REG_STATUS]; if (rstat & IO_MASK(R_SERIAL0_STATUS, xoff_detect) ) ret += sprintf(buf+ret, " xoff_detect:1"); } @@ -4503,7 +4502,7 @@ rs_init(void) if (info->enabled) { printk(KERN_INFO "%s%d at 0x%x is a builtin UART with DMA\n", - serial_driver->name, info->line, (unsigned int)info->ioport); + serial_driver->name, info->line, (unsigned int)info->port); } } #ifdef CONFIG_ETRAX_FAST_TIMER diff --git a/trunk/drivers/serial/crisv10.h b/trunk/drivers/serial/crisv10.h index e3c5c8c3c09b..ccd0f32b7372 100644 --- a/trunk/drivers/serial/crisv10.h +++ b/trunk/drivers/serial/crisv10.h @@ -36,9 +36,8 @@ struct etrax_recv_buffer { }; struct e100_serial { - struct tty_port port; int baud; - volatile u8 *ioport; /* R_SERIALx_CTRL */ + volatile u8 *port; /* R_SERIALx_CTRL */ u32 irq; /* bitnr in R_IRQ_MASK2 for dmaX_descr */ /* Output registers */ diff --git a/trunk/drivers/spi/atmel_spi.c b/trunk/drivers/spi/atmel_spi.c index 95190c619c10..0c7165660853 100644 --- a/trunk/drivers/spi/atmel_spi.c +++ b/trunk/drivers/spi/atmel_spi.c @@ -184,8 +184,7 @@ static void atmel_spi_next_xfer(struct spi_master *master, { struct atmel_spi *as = spi_master_get_devdata(master); struct spi_transfer *xfer; - u32 len, remaining; - u32 ieval; + u32 len, remaining, total; dma_addr_t tx_dma, rx_dma; if (!as->current_transfer) @@ -198,8 +197,6 @@ static void atmel_spi_next_xfer(struct spi_master *master, xfer = NULL; if (xfer) { - spi_writel(as, PTCR, SPI_BIT(RXTDIS) | SPI_BIT(TXTDIS)); - len = xfer->len; atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); remaining = xfer->len - len; @@ -237,8 +234,6 @@ static void atmel_spi_next_xfer(struct spi_master *master, as->next_transfer = xfer; if (xfer) { - u32 total; - total = len; atmel_spi_next_xfer_data(master, xfer, &tx_dma, &rx_dma, &len); as->next_remaining_bytes = total - len; @@ -255,11 +250,9 @@ static void atmel_spi_next_xfer(struct spi_master *master, " next xfer %p: len %u tx %p/%08x rx %p/%08x\n", xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, xfer->rx_buf, xfer->rx_dma); - ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES); } else { spi_writel(as, RNCR, 0); spi_writel(as, TNCR, 0); - ieval = SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) | SPI_BIT(OVRES); } /* REVISIT: We're waiting for ENDRX before we start the next @@ -272,7 +265,7 @@ static void atmel_spi_next_xfer(struct spi_master *master, * * It should be doable, though. Just not now... */ - spi_writel(as, IER, ieval); + spi_writel(as, IER, SPI_BIT(ENDRX) | SPI_BIT(OVRES)); spi_writel(as, PTCR, SPI_BIT(TXTEN) | SPI_BIT(RXTEN)); } @@ -403,7 +396,7 @@ atmel_spi_interrupt(int irq, void *dev_id) ret = IRQ_HANDLED; - spi_writel(as, IDR, (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX) + spi_writel(as, IDR, (SPI_BIT(ENDTX) | SPI_BIT(ENDRX) | SPI_BIT(OVRES))); /* @@ -425,7 +418,7 @@ atmel_spi_interrupt(int irq, void *dev_id) if (xfer->delay_usecs) udelay(xfer->delay_usecs); - dev_warn(master->dev.parent, "overrun (%u/%u remaining)\n", + dev_warn(master->dev.parent, "fifo overrun (%u/%u remaining)\n", spi_readl(as, TCR), spi_readl(as, RCR)); /* @@ -449,7 +442,7 @@ atmel_spi_interrupt(int irq, void *dev_id) spi_readl(as, SR); atmel_spi_msg_done(master, as, msg, -EIO, 0); - } else if (pending & (SPI_BIT(RXBUFF) | SPI_BIT(ENDRX))) { + } else if (pending & SPI_BIT(ENDRX)) { ret = IRQ_HANDLED; spi_writel(as, IDR, pending); diff --git a/trunk/drivers/spi/spi_s3c24xx.c b/trunk/drivers/spi/spi_s3c24xx.c index 21661c7959c8..1c643c9e1f15 100644 --- a/trunk/drivers/spi/spi_s3c24xx.c +++ b/trunk/drivers/spi/spi_s3c24xx.c @@ -236,19 +236,6 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev) return IRQ_HANDLED; } -static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw) -{ - /* for the moment, permanently enable the clock */ - - clk_enable(hw->clk); - - /* program defaults into the registers */ - - writeb(0xff, hw->regs + S3C2410_SPPRE); - writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN); - writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON); -} - static int __init s3c24xx_spi_probe(struct platform_device *pdev) { struct s3c2410_spi_info *pdata; @@ -340,7 +327,15 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) goto err_no_clk; } - s3c24xx_spi_initialsetup(hw); + /* for the moment, permanently enable the clock */ + + clk_enable(hw->clk); + + /* program defaults into the registers */ + + writeb(0xff, hw->regs + S3C2410_SPPRE); + writeb(SPPIN_DEFAULT, hw->regs + S3C2410_SPPIN); + writeb(SPCON_DEFAULT, hw->regs + S3C2410_SPCON); /* setup any gpio we can */ @@ -420,7 +415,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev) { struct s3c24xx_spi *hw = platform_get_drvdata(pdev); - s3c24xx_spi_initialsetup(hw); + clk_enable(hw->clk); return 0; } diff --git a/trunk/drivers/video/console/.gitignore b/trunk/drivers/video/console/.gitignore deleted file mode 100644 index 0c258b45439c..000000000000 --- a/trunk/drivers/video/console/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# conmakehash generated file -promcon_tbl.c diff --git a/trunk/drivers/watchdog/ar7_wdt.c b/trunk/drivers/watchdog/ar7_wdt.c index ef7b0d67095e..2eb48c0df32c 100644 --- a/trunk/drivers/watchdog/ar7_wdt.c +++ b/trunk/drivers/watchdog/ar7_wdt.c @@ -69,8 +69,7 @@ struct ar7_wdt { u32 prescale; }; -static unsigned long wdt_is_open; -static spinlock_t wdt_lock; +static struct semaphore open_semaphore; static unsigned expect_close; /* XXX currently fixed, allows max margin ~68.72 secs */ @@ -155,10 +154,8 @@ static void ar7_wdt_update_margin(int new_margin) u32 change; change = new_margin * (ar7_vbus_freq() / prescale_value); - if (change < 1) - change = 1; - if (change > 0xffff) - change = 0xffff; + if (change < 1) change = 1; + if (change > 0xffff) change = 0xffff; ar7_wdt_change(change); margin = change * prescale_value / ar7_vbus_freq(); printk(KERN_INFO DRVNAME @@ -182,7 +179,7 @@ static void ar7_wdt_disable_wdt(void) static int ar7_wdt_open(struct inode *inode, struct file *file) { /* only allow one at a time */ - if (test_and_set_bit(0, &wdt_is_open)) + if (down_trylock(&open_semaphore)) return -EBUSY; ar7_wdt_enable_wdt(); expect_close = 0; @@ -198,7 +195,9 @@ static int ar7_wdt_release(struct inode *inode, struct file *file) "will not disable the watchdog timer\n"); else if (!nowayout) ar7_wdt_disable_wdt(); - clear_bit(0, &wdt_is_open); + + up(&open_semaphore); + return 0; } @@ -223,9 +222,7 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data, if (len) { size_t i; - spin_lock(&wdt_lock); ar7_wdt_kick(1); - spin_unlock(&wdt_lock); expect_close = 0; for (i = 0; i < len; ++i) { @@ -240,8 +237,8 @@ static ssize_t ar7_wdt_write(struct file *file, const char *data, return len; } -static long ar7_wdt_ioctl(struct file *file, - unsigned int cmd, unsigned long arg) +static int ar7_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { static struct watchdog_info ident = { .identity = LONGNAME, @@ -272,10 +269,8 @@ static long ar7_wdt_ioctl(struct file *file, if (new_margin < 1) return -EINVAL; - spin_lock(&wdt_lock); ar7_wdt_update_margin(new_margin); ar7_wdt_kick(1); - spin_unlock(&wdt_lock); case WDIOC_GETTIMEOUT: if (put_user(margin, (int *)arg)) @@ -287,7 +282,7 @@ static long ar7_wdt_ioctl(struct file *file, static const struct file_operations ar7_wdt_fops = { .owner = THIS_MODULE, .write = ar7_wdt_write, - .unlocked_ioctl = ar7_wdt_ioctl, + .ioctl = ar7_wdt_ioctl, .open = ar7_wdt_open, .release = ar7_wdt_release, }; @@ -302,8 +297,6 @@ static int __init ar7_wdt_init(void) { int rc; - spin_lock_init(&wdt_lock); - ar7_wdt_get_regs(); if (!request_mem_region(ar7_regs_wdt, sizeof(struct ar7_wdt), @@ -319,6 +312,8 @@ static int __init ar7_wdt_init(void) ar7_wdt_prescale(prescale_value); ar7_wdt_update_margin(margin); + sema_init(&open_semaphore, 1); + rc = register_reboot_notifier(&ar7_wdt_notifier); if (rc) { printk(KERN_ERR DRVNAME diff --git a/trunk/drivers/watchdog/it8712f_wdt.c b/trunk/drivers/watchdog/it8712f_wdt.c index 51bfd5721833..445b7e812112 100644 --- a/trunk/drivers/watchdog/it8712f_wdt.c +++ b/trunk/drivers/watchdog/it8712f_wdt.c @@ -30,8 +30,9 @@ #include #include #include -#include -#include + +#include +#include #define NAME "it8712f_wdt" @@ -49,7 +50,7 @@ static int nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, int, 0); MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); -static unsigned long wdt_open; +static struct semaphore it8712f_wdt_sem; static unsigned expect_close; static spinlock_t io_lock; static unsigned char revision; @@ -85,19 +86,22 @@ static unsigned short address; #define WDT_OUT_PWROK 0x10 #define WDT_OUT_KRST 0x40 -static int superio_inb(int reg) +static int +superio_inb(int reg) { outb(reg, REG); return inb(VAL); } -static void superio_outb(int val, int reg) +static void +superio_outb(int val, int reg) { outb(reg, REG); outb(val, VAL); } -static int superio_inw(int reg) +static int +superio_inw(int reg) { int val; outb(reg++, REG); @@ -107,13 +111,15 @@ static int superio_inw(int reg) return val; } -static inline void superio_select(int ldn) +static inline void +superio_select(int ldn) { outb(LDN, REG); outb(ldn, VAL); } -static inline void superio_enter(void) +static inline void +superio_enter(void) { spin_lock(&io_lock); outb(0x87, REG); @@ -122,19 +128,22 @@ static inline void superio_enter(void) outb(0x55, REG); } -static inline void superio_exit(void) +static inline void +superio_exit(void) { outb(0x02, REG); outb(0x02, VAL); spin_unlock(&io_lock); } -static inline void it8712f_wdt_ping(void) +static inline void +it8712f_wdt_ping(void) { inb(address); } -static void it8712f_wdt_update_margin(void) +static void +it8712f_wdt_update_margin(void) { int config = WDT_OUT_KRST | WDT_OUT_PWROK; int units = margin; @@ -156,7 +165,8 @@ static void it8712f_wdt_update_margin(void) superio_outb(units, WDT_TIMEOUT); } -static int it8712f_wdt_get_status(void) +static int +it8712f_wdt_get_status(void) { if (superio_inb(WDT_CONTROL) & 0x01) return WDIOF_CARDRESET; @@ -164,7 +174,8 @@ static int it8712f_wdt_get_status(void) return 0; } -static void it8712f_wdt_enable(void) +static void +it8712f_wdt_enable(void) { printk(KERN_DEBUG NAME ": enabling watchdog timer\n"); superio_enter(); @@ -179,7 +190,8 @@ static void it8712f_wdt_enable(void) it8712f_wdt_ping(); } -static void it8712f_wdt_disable(void) +static void +it8712f_wdt_disable(void) { printk(KERN_DEBUG NAME ": disabling watchdog timer\n"); @@ -195,7 +207,8 @@ static void it8712f_wdt_disable(void) superio_exit(); } -static int it8712f_wdt_notify(struct notifier_block *this, +static int +it8712f_wdt_notify(struct notifier_block *this, unsigned long code, void *unused) { if (code == SYS_HALT || code == SYS_POWER_OFF) @@ -209,8 +222,9 @@ static struct notifier_block it8712f_wdt_notifier = { .notifier_call = it8712f_wdt_notify, }; -static ssize_t it8712f_wdt_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) +static ssize_t +it8712f_wdt_write(struct file *file, const char __user *data, + size_t len, loff_t *ppos) { /* check for a magic close character */ if (len) { @@ -231,8 +245,9 @@ static ssize_t it8712f_wdt_write(struct file *file, const char __user *data, return len; } -static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int +it8712f_wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int __user *p = argp; @@ -287,16 +302,19 @@ static long it8712f_wdt_ioctl(struct file *file, unsigned int cmd, } } -static int it8712f_wdt_open(struct inode *inode, struct file *file) +static int +it8712f_wdt_open(struct inode *inode, struct file *file) { /* only allow one at a time */ - if (test_and_set_bit(0, &wdt_open)) + if (down_trylock(&it8712f_wdt_sem)) return -EBUSY; it8712f_wdt_enable(); + return nonseekable_open(inode, file); } -static int it8712f_wdt_release(struct inode *inode, struct file *file) +static int +it8712f_wdt_release(struct inode *inode, struct file *file) { if (expect_close != 42) { printk(KERN_WARNING NAME @@ -306,7 +324,7 @@ static int it8712f_wdt_release(struct inode *inode, struct file *file) it8712f_wdt_disable(); } expect_close = 0; - clear_bit(0, &wdt_open); + up(&it8712f_wdt_sem); return 0; } @@ -315,7 +333,7 @@ static const struct file_operations it8712f_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = it8712f_wdt_write, - .unlocked_ioctl = it8712f_wdt_ioctl, + .ioctl = it8712f_wdt_ioctl, .open = it8712f_wdt_open, .release = it8712f_wdt_release, }; @@ -326,7 +344,8 @@ static struct miscdevice it8712f_wdt_miscdev = { .fops = &it8712f_wdt_fops, }; -static int __init it8712f_wdt_find(unsigned short *address) +static int __init +it8712f_wdt_find(unsigned short *address) { int err = -ENODEV; int chip_type; @@ -368,7 +387,8 @@ static int __init it8712f_wdt_find(unsigned short *address) return err; } -static int __init it8712f_wdt_init(void) +static int __init +it8712f_wdt_init(void) { int err = 0; @@ -384,6 +404,8 @@ static int __init it8712f_wdt_init(void) it8712f_wdt_disable(); + sema_init(&it8712f_wdt_sem, 1); + err = register_reboot_notifier(&it8712f_wdt_notifier); if (err) { printk(KERN_ERR NAME ": unable to register reboot notifier\n"); @@ -408,7 +430,8 @@ static int __init it8712f_wdt_init(void) return err; } -static void __exit it8712f_wdt_exit(void) +static void __exit +it8712f_wdt_exit(void) { misc_deregister(&it8712f_wdt_miscdev); unregister_reboot_notifier(&it8712f_wdt_notifier); diff --git a/trunk/drivers/watchdog/s3c2410_wdt.c b/trunk/drivers/watchdog/s3c2410_wdt.c index 97b4a2e8eb09..98532c0e0689 100644 --- a/trunk/drivers/watchdog/s3c2410_wdt.c +++ b/trunk/drivers/watchdog/s3c2410_wdt.c @@ -46,8 +46,9 @@ #include #include #include -#include -#include + +#include +#include #include @@ -64,8 +65,8 @@ static int nowayout = WATCHDOG_NOWAYOUT; static int tmr_margin = CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME; static int tmr_atboot = CONFIG_S3C2410_WATCHDOG_ATBOOT; -static int soft_noboot; -static int debug; +static int soft_noboot = 0; +static int debug = 0; module_param(tmr_margin, int, 0); module_param(tmr_atboot, int, 0); @@ -73,23 +74,24 @@ module_param(nowayout, int, 0); module_param(soft_noboot, int, 0); module_param(debug, int, 0); -MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" - __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); -MODULE_PARM_DESC(tmr_atboot, - "Watchdog is started at boot time if set to 1, default=" - __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT)); -MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); + +MODULE_PARM_DESC(tmr_atboot, "Watchdog is started at boot time if set to 1, default=" __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_ATBOOT)); + +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, 0 to reboot (default depends on ONLY_TESTING)"); + MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); typedef enum close_state { CLOSE_STATE_NOT, - CLOSE_STATE_ALLOW = 0x4021 + CLOSE_STATE_ALLOW=0x4021 } close_state_t; -static unsigned long open_lock; +static DECLARE_MUTEX(open_lock); + static struct device *wdt_dev; /* platform device attached to */ static struct resource *wdt_mem; static struct resource *wdt_irq; @@ -97,58 +99,38 @@ static struct clk *wdt_clock; static void __iomem *wdt_base; static unsigned int wdt_count; static close_state_t allow_close; -static DEFINE_SPINLOCK(wdt_lock); /* watchdog control routines */ #define DBG(msg...) do { \ if (debug) \ printk(KERN_INFO msg); \ - } while (0) + } while(0) /* functions */ -static void s3c2410wdt_keepalive(void) +static int s3c2410wdt_keepalive(void) { - spin_lock(&wdt_lock); writel(wdt_count, wdt_base + S3C2410_WTCNT); - spin_unlock(&wdt_lock); -} - -static void __s3c2410wdt_stop(void) -{ - unsigned long wtcon; - - spin_lock(&wdt_lock); - wtcon = readl(wdt_base + S3C2410_WTCON); - wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN); - writel(wtcon, wdt_base + S3C2410_WTCON); - spin_unlock(&wdt_lock); + return 0; } -static void __s3c2410wdt_stop(void) +static int s3c2410wdt_stop(void) { unsigned long wtcon; wtcon = readl(wdt_base + S3C2410_WTCON); wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN); writel(wtcon, wdt_base + S3C2410_WTCON); -} -static void s3c2410wdt_stop(void) -{ - spin_lock(&wdt_lock); - __s3c2410wdt_stop(); - spin_unlock(&wdt_lock); + return 0; } -static void s3c2410wdt_start(void) +static int s3c2410wdt_start(void) { unsigned long wtcon; - spin_lock(&wdt_lock); - - __s3c2410wdt_stop(); + s3c2410wdt_stop(); wtcon = readl(wdt_base + S3C2410_WTCON); wtcon |= S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128; @@ -167,7 +149,6 @@ static void s3c2410wdt_start(void) writel(wdt_count, wdt_base + S3C2410_WTDAT); writel(wdt_count, wdt_base + S3C2410_WTCNT); writel(wtcon, wdt_base + S3C2410_WTCON); - spin_unlock(&wdt_lock); return 0; } @@ -230,7 +211,7 @@ static int s3c2410wdt_set_heartbeat(int timeout) static int s3c2410wdt_open(struct inode *inode, struct file *file) { - if (test_and_set_bit(0, &open_lock)) + if(down_trylock(&open_lock)) return -EBUSY; if (nowayout) @@ -250,14 +231,15 @@ static int s3c2410wdt_release(struct inode *inode, struct file *file) * Lock it in if it's a module and we set nowayout */ - if (allow_close == CLOSE_STATE_ALLOW) + if (allow_close == CLOSE_STATE_ALLOW) { s3c2410wdt_stop(); - else { + } else { dev_err(wdt_dev, "Unexpected close, not stopping watchdog\n"); s3c2410wdt_keepalive(); } + allow_close = CLOSE_STATE_NOT; - clear_bit(0, &open_lock); + up(&open_lock); return 0; } @@ -267,7 +249,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, /* * Refresh the timer. */ - if (len) { + if(len) { if (!nowayout) { size_t i; @@ -283,6 +265,7 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, allow_close = CLOSE_STATE_ALLOW; } } + s3c2410wdt_keepalive(); } return len; @@ -290,41 +273,48 @@ static ssize_t s3c2410wdt_write(struct file *file, const char __user *data, #define OPTIONS WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE -static const struct watchdog_info s3c2410_wdt_ident = { +static struct watchdog_info s3c2410_wdt_ident = { .options = OPTIONS, .firmware_version = 0, .identity = "S3C2410 Watchdog", }; -static long s3c2410wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int s3c2410wdt_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) { void __user *argp = (void __user *)arg; int __user *p = argp; int new_margin; switch (cmd) { - default: - return -ENOTTY; - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &s3c2410_wdt_ident, - sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0; - case WDIOC_GETSTATUS: - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); - case WDIOC_KEEPALIVE: - s3c2410wdt_keepalive(); - return 0; - case WDIOC_SETTIMEOUT: - if (get_user(new_margin, p)) - return -EFAULT; - if (s3c2410wdt_set_heartbeat(new_margin)) - return -EINVAL; - s3c2410wdt_keepalive(); - return put_user(tmr_margin, p); - case WDIOC_GETTIMEOUT: - return put_user(tmr_margin, p); + default: + return -ENOTTY; + + case WDIOC_GETSUPPORT: + return copy_to_user(argp, &s3c2410_wdt_ident, + sizeof(s3c2410_wdt_ident)) ? -EFAULT : 0; + + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0, p); + + case WDIOC_KEEPALIVE: + s3c2410wdt_keepalive(); + return 0; + + case WDIOC_SETTIMEOUT: + if (get_user(new_margin, p)) + return -EFAULT; + + if (s3c2410wdt_set_heartbeat(new_margin)) + return -EINVAL; + + s3c2410wdt_keepalive(); + return put_user(tmr_margin, p); + + case WDIOC_GETTIMEOUT: + return put_user(tmr_margin, p); } } @@ -334,7 +324,7 @@ static const struct file_operations s3c2410wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = s3c2410wdt_write, - .unlocked_ioctl = s3c2410wdt_ioctl, + .ioctl = s3c2410wdt_ioctl, .open = s3c2410wdt_open, .release = s3c2410wdt_release, }; @@ -421,15 +411,14 @@ static int s3c2410wdt_probe(struct platform_device *pdev) * not, try the default value */ if (s3c2410wdt_set_heartbeat(tmr_margin)) { - started = s3c2410wdt_set_heartbeat( - CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); + started = s3c2410wdt_set_heartbeat(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); - if (started == 0) - dev_info(dev, - "tmr_margin value out of range, default %d used\n", + if (started == 0) { + dev_info(dev,"tmr_margin value out of range, default %d used\n", CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME); - else + } else { dev_info(dev, "default timer value is out of range, cannot start\n"); + } } ret = misc_register(&s3c2410wdt_miscdev); @@ -458,7 +447,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) (wtcon & S3C2410_WTCON_ENABLE) ? "" : "in", (wtcon & S3C2410_WTCON_RSTEN) ? "" : "dis", (wtcon & S3C2410_WTCON_INTEN) ? "" : "en"); - + return 0; err_clk: @@ -498,7 +487,7 @@ static int s3c2410wdt_remove(struct platform_device *dev) static void s3c2410wdt_shutdown(struct platform_device *dev) { - s3c2410wdt_stop(); + s3c2410wdt_stop(); } #ifdef CONFIG_PM @@ -551,8 +540,7 @@ static struct platform_driver s3c2410wdt_driver = { }; -static char banner[] __initdata = - KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; +static char banner[] __initdata = KERN_INFO "S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics\n"; static int __init watchdog_init(void) { diff --git a/trunk/drivers/watchdog/sc1200wdt.c b/trunk/drivers/watchdog/sc1200wdt.c index 621ebad56d86..35cddff7020f 100644 --- a/trunk/drivers/watchdog/sc1200wdt.c +++ b/trunk/drivers/watchdog/sc1200wdt.c @@ -15,18 +15,14 @@ * * Changelog: * 20020220 Zwane Mwaikambo Code based on datasheet, no hardware. - * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik - * and Alan Cox. + * 20020221 Zwane Mwaikambo Cleanups as suggested by Jeff Garzik and Alan Cox. * 20020222 Zwane Mwaikambo Added probing. * 20020225 Zwane Mwaikambo Added ISAPNP support. * 20020412 Rob Radez Broke out start/stop functions - * Return proper status instead of - * temperature warning - * Add WDIOC_GETBOOTSTATUS and - * WDIOC_SETOPTIONS ioctls + * Return proper status instead of temperature warning + * Add WDIOC_GETBOOTSTATUS and WDIOC_SETOPTIONS ioctls * Fix CONFIG_WATCHDOG_NOWAYOUT - * 20020530 Joel Becker Add Matt Domsch's nowayout module - * option + * 20020530 Joel Becker Add Matt Domsch's nowayout module option * 20030116 Adam Belay Updated to the latest pnp code * */ @@ -43,8 +39,9 @@ #include #include #include -#include -#include + +#include +#include #define SC1200_MODULE_VER "build 20020303" #define SC1200_MODULE_NAME "sc1200wdt" @@ -75,7 +72,7 @@ static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER; static int timeout = 1; static int io = -1; static int io_len = 2; /* for non plug and play */ -static unsigned long open_flag; +static struct semaphore open_sem; static char expect_close; static DEFINE_SPINLOCK(sc1200wdt_lock); /* io port access serialisation */ @@ -84,8 +81,7 @@ static int isapnp = 1; static struct pnp_dev *wdt_dev; module_param(isapnp, int, 0); -MODULE_PARM_DESC(isapnp, - "When set to 0 driver ISA PnP support will be disabled"); +MODULE_PARM_DESC(isapnp, "When set to 0 driver ISA PnP support will be disabled"); #endif module_param(io, int, 0); @@ -95,40 +91,26 @@ MODULE_PARM_DESC(timeout, "range is 0-255 minutes, default is 1"); static int nowayout = WATCHDOG_NOWAYOUT; module_param(nowayout, int, 0); -MODULE_PARM_DESC(nowayout, - "Watchdog cannot be stopped once started (default=" - __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); /* Read from Data Register */ -static inline void __sc1200wdt_read_data(unsigned char index, - unsigned char *data) +static inline void sc1200wdt_read_data(unsigned char index, unsigned char *data) { + spin_lock(&sc1200wdt_lock); outb_p(index, PMIR); *data = inb(PMDR); -} - -static void sc1200wdt_read_data(unsigned char index, unsigned char *data) -{ - spin_lock(&sc1200wdt_lock); - __sc1200wdt_read_data(index, data); spin_unlock(&sc1200wdt_lock); } + /* Write to Data Register */ -static inline void __sc1200wdt_write_data(unsigned char index, - unsigned char data) +static inline void sc1200wdt_write_data(unsigned char index, unsigned char data) { + spin_lock(&sc1200wdt_lock); outb_p(index, PMIR); outb(data, PMDR); -} - -static inline void sc1200wdt_write_data(unsigned char index, - unsigned char data) -{ - spin_lock(&sc1200wdt_lock); - __sc1200wdt_write_data(index, data); spin_unlock(&sc1200wdt_lock); } @@ -136,23 +118,22 @@ static inline void sc1200wdt_write_data(unsigned char index, static void sc1200wdt_start(void) { unsigned char reg; - spin_lock(&sc1200wdt_lock); - __sc1200wdt_read_data(WDCF, ®); + sc1200wdt_read_data(WDCF, ®); /* assert WDO when any of the following interrupts are triggered too */ reg |= (KBC_IRQ | MSE_IRQ | UART1_IRQ | UART2_IRQ); - __sc1200wdt_write_data(WDCF, reg); + sc1200wdt_write_data(WDCF, reg); /* set the timeout and get the ball rolling */ - __sc1200wdt_write_data(WDTO, timeout); - - spin_unlock(&sc1200wdt_lock); + sc1200wdt_write_data(WDTO, timeout); } + static void sc1200wdt_stop(void) { sc1200wdt_write_data(WDTO, 0); } + /* This returns the status of the WDO signal, inactive high. */ static inline int sc1200wdt_status(void) { @@ -163,13 +144,14 @@ static inline int sc1200wdt_status(void) * KEEPALIVEPING which is a bit of a kludge because there's nothing * else for enabled/disabled status */ - return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING; + return (ret & 0x01) ? 0 : WDIOF_KEEPALIVEPING; /* bits 1 - 7 are undefined */ } + static int sc1200wdt_open(struct inode *inode, struct file *file) { /* allow one at a time */ - if (test_and_set_bit(0, &open_flag)) + if (down_trylock(&open_sem)) return -EBUSY; if (timeout > MAX_TIMEOUT) @@ -182,71 +164,71 @@ static int sc1200wdt_open(struct inode *inode, struct file *file) } -static long sc1200wdt_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int sc1200wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { int new_timeout; void __user *argp = (void __user *)arg; int __user *p = argp; - static const struct watchdog_info ident = { - .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | - WDIOF_MAGICCLOSE, + static struct watchdog_info ident = { + .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, .firmware_version = 0, .identity = "PC87307/PC97307", }; switch (cmd) { + default: + return -ENOTTY; - case WDIOC_GETSUPPORT: - if (copy_to_user(argp, &ident, sizeof ident)) - return -EFAULT; - return 0; + case WDIOC_GETSUPPORT: + if (copy_to_user(argp, &ident, sizeof ident)) + return -EFAULT; + return 0; - case WDIOC_GETSTATUS: - return put_user(sc1200wdt_status(), p); + case WDIOC_GETSTATUS: + return put_user(sc1200wdt_status(), p); - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); + case WDIOC_GETBOOTSTATUS: + return put_user(0, p); - case WDIOC_KEEPALIVE: - sc1200wdt_write_data(WDTO, timeout); - return 0; - - case WDIOC_SETTIMEOUT: - if (get_user(new_timeout, p)) - return -EFAULT; - /* the API states this is given in secs */ - new_timeout /= 60; - if (new_timeout < 0 || new_timeout > MAX_TIMEOUT) - return -EINVAL; - timeout = new_timeout; - sc1200wdt_write_data(WDTO, timeout); - /* fall through and return the new timeout */ + case WDIOC_KEEPALIVE: + sc1200wdt_write_data(WDTO, timeout); + return 0; - case WDIOC_GETTIMEOUT: - return put_user(timeout * 60, p); + case WDIOC_SETTIMEOUT: + if (get_user(new_timeout, p)) + return -EFAULT; - case WDIOC_SETOPTIONS: - { - int options, retval = -EINVAL; + /* the API states this is given in secs */ + new_timeout /= 60; + if (new_timeout < 0 || new_timeout > MAX_TIMEOUT) + return -EINVAL; - if (get_user(options, p)) - return -EFAULT; + timeout = new_timeout; + sc1200wdt_write_data(WDTO, timeout); + /* fall through and return the new timeout */ - if (options & WDIOS_DISABLECARD) { - sc1200wdt_stop(); - retval = 0; - } + case WDIOC_GETTIMEOUT: + return put_user(timeout * 60, p); - if (options & WDIOS_ENABLECARD) { - sc1200wdt_start(); - retval = 0; - } + case WDIOC_SETOPTIONS: + { + int options, retval = -EINVAL; - return retval; - } - default: - return -ENOTTY; + if (get_user(options, p)) + return -EFAULT; + + if (options & WDIOS_DISABLECARD) { + sc1200wdt_stop(); + retval = 0; + } + + if (options & WDIOS_ENABLECARD) { + sc1200wdt_start(); + retval = 0; + } + + return retval; + } } } @@ -258,18 +240,16 @@ static int sc1200wdt_release(struct inode *inode, struct file *file) printk(KERN_INFO PFX "Watchdog disabled\n"); } else { sc1200wdt_write_data(WDTO, timeout); - printk(KERN_CRIT PFX - "Unexpected close!, timeout = %d min(s)\n", timeout); + printk(KERN_CRIT PFX "Unexpected close!, timeout = %d min(s)\n", timeout); } - clear_bit(0, &open_flag); + up(&open_sem); expect_close = 0; return 0; } -static ssize_t sc1200wdt_write(struct file *file, const char __user *data, - size_t len, loff_t *ppos) +static ssize_t sc1200wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) { if (len) { if (!nowayout) { @@ -295,8 +275,7 @@ static ssize_t sc1200wdt_write(struct file *file, const char __user *data, } -static int sc1200wdt_notify_sys(struct notifier_block *this, - unsigned long code, void *unused) +static int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { if (code == SYS_DOWN || code == SYS_HALT) sc1200wdt_stop(); @@ -305,20 +284,23 @@ static int sc1200wdt_notify_sys(struct notifier_block *this, } -static struct notifier_block sc1200wdt_notifier = { +static struct notifier_block sc1200wdt_notifier = +{ .notifier_call = sc1200wdt_notify_sys, }; -static const struct file_operations sc1200wdt_fops = { +static const struct file_operations sc1200wdt_fops = +{ .owner = THIS_MODULE, .llseek = no_llseek, .write = sc1200wdt_write, - .unlocked_ioctl = sc1200wdt_ioctl, + .ioctl = sc1200wdt_ioctl, .open = sc1200wdt_open, .release = sc1200wdt_release, }; -static struct miscdevice sc1200wdt_miscdev = { +static struct miscdevice sc1200wdt_miscdev = +{ .minor = WATCHDOG_MINOR, .name = "watchdog", .fops = &sc1200wdt_fops, @@ -330,14 +312,14 @@ static int __init sc1200wdt_probe(void) /* The probe works by reading the PMC3 register's default value of 0x0e * there is one caveat, if the device disables the parallel port or any * of the UARTs we won't be able to detect it. - * NB. This could be done with accuracy by reading the SID registers, - * but we don't have access to those io regions. + * Nb. This could be done with accuracy by reading the SID registers, but + * we don't have access to those io regions. */ unsigned char reg; sc1200wdt_read_data(PMC3, ®); - reg &= 0x0f; /* we don't want the UART busy bits */ + reg &= 0x0f; /* we don't want the UART busy bits */ return (reg == 0x0e) ? 0 : -ENODEV; } @@ -350,8 +332,7 @@ static struct pnp_device_id scl200wdt_pnp_devices[] = { {.id = ""}, }; -static int scl200wdt_pnp_probe(struct pnp_dev *dev, - const struct pnp_device_id *dev_id) +static int scl200wdt_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id) { /* this driver only supports one card at a time */ if (wdt_dev || !isapnp) @@ -366,14 +347,13 @@ static int scl200wdt_pnp_probe(struct pnp_dev *dev, return -EBUSY; } - printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n", - io, io_len); + printk(KERN_INFO "scl200wdt: PnP device found at io port %#x/%d\n", io, io_len); return 0; } -static void scl200wdt_pnp_remove(struct pnp_dev *dev) +static void scl200wdt_pnp_remove(struct pnp_dev * dev) { - if (wdt_dev) { + if (wdt_dev){ release_region(io, io_len); wdt_dev = NULL; } @@ -395,6 +375,8 @@ static int __init sc1200wdt_init(void) printk("%s\n", banner); + sema_init(&open_sem, 1); + #if defined CONFIG_PNP if (isapnp) { ret = pnp_register_driver(&scl200wdt_pnp_driver); @@ -428,16 +410,13 @@ static int __init sc1200wdt_init(void) ret = register_reboot_notifier(&sc1200wdt_notifier); if (ret) { - printk(KERN_ERR PFX - "Unable to register reboot notifier err = %d\n", ret); + printk(KERN_ERR PFX "Unable to register reboot notifier err = %d\n", ret); goto out_io; } ret = misc_register(&sc1200wdt_miscdev); if (ret) { - printk(KERN_ERR PFX - "Unable to register miscdev on minor %d\n", - WATCHDOG_MINOR); + printk(KERN_ERR PFX "Unable to register miscdev on minor %d\n", WATCHDOG_MINOR); goto out_rbt; } @@ -467,7 +446,7 @@ static void __exit sc1200wdt_exit(void) unregister_reboot_notifier(&sc1200wdt_notifier); #if defined CONFIG_PNP - if (isapnp) + if(isapnp) pnp_unregister_driver(&scl200wdt_pnp_driver); else #endif diff --git a/trunk/drivers/watchdog/wdt.c b/trunk/drivers/watchdog/wdt.c index 53a6b18bcb9a..756fb15fdce7 100644 --- a/trunk/drivers/watchdog/wdt.c +++ b/trunk/drivers/watchdog/wdt.c @@ -24,10 +24,9 @@ * Matt Crocker). * Alan Cox : Added wdt= boot option * Alan Cox : Cleaned up copy/user stuff - * Tim Hockin : Added insmod parameters, comment - * cleanup, parameterized timeout - * Tigran Aivazian : Restructured wdt_init() to handle - * failures + * Tim Hockin : Added insmod parameters, comment cleanup + * Parameterized timeout + * Tigran Aivazian : Restructured wdt_init() to handle failures * Joel Becker : Added WDIOC_GET/SETTIMEOUT * Matt Domsch : Added nowayout module option */ @@ -43,9 +42,9 @@ #include #include #include -#include -#include +#include +#include #include #include "wd501p.h" @@ -61,19 +60,15 @@ static char expect_close; static int heartbeat = WD_TIMO; static int wd_heartbeat; module_param(heartbeat, int, 0); -MODULE_PARM_DESC(heartbeat, - "Watchdog heartbeat in seconds. (0 < heartbeat < 65536, default=" - __MODULE_STRING(WD_TIMO) ")"); +MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0 65535) + if ((t < 1) || (t > 65535)) return -EINVAL; heartbeat = t; @@ -211,7 +200,7 @@ static int wdt_get_status(int *status) new_status = inb_p(WDT_SR); spin_unlock_irqrestore(&wdt_lock, flags); - *status = 0; + *status=0; if (new_status & WDC_SR_ISOI0) *status |= WDIOF_EXTERN1; if (new_status & WDC_SR_ISII1) @@ -277,7 +266,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) #ifdef CONFIG_WDT_501 if (!(status & WDC_SR_TGOOD)) - printk(KERN_CRIT "Overheat alarm.(%d)\n", inb_p(WDT_RT)); + printk(KERN_CRIT "Overheat alarm.(%d)\n",inb_p(WDT_RT)); if (!(status & WDC_SR_PSUOVER)) printk(KERN_CRIT "PSU over voltage.\n"); if (!(status & WDC_SR_PSUUNDR)) @@ -315,10 +304,9 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id) * write of data will do, as we we don't define content meaning. */ -static ssize_t wdt_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) +static ssize_t wdt_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - if (count) { + if(count) { if (!nowayout) { size_t i; @@ -340,6 +328,7 @@ static ssize_t wdt_write(struct file *file, const char __user *buf, /** * wdt_ioctl: + * @inode: inode of the device * @file: file handle to the device * @cmd: watchdog command * @arg: argument pointer @@ -349,7 +338,8 @@ static ssize_t wdt_write(struct file *file, const char __user *buf, * querying capabilities and current status. */ -static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg) { void __user *argp = (void __user *)arg; int __user *p = argp; @@ -372,28 +362,32 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ident.options |= WDIOF_FANFAULT; #endif /* CONFIG_WDT_501 */ - switch (cmd) { - default: - return -ENOTTY; - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; - case WDIOC_GETSTATUS: - wdt_get_status(&status); - return put_user(status, p); - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); - case WDIOC_KEEPALIVE: - wdt_ping(); - return 0; - case WDIOC_SETTIMEOUT: - if (get_user(new_heartbeat, p)) - return -EFAULT; - if (wdt_set_heartbeat(new_heartbeat)) - return -EINVAL; - wdt_ping(); - /* Fall */ - case WDIOC_GETTIMEOUT: - return put_user(heartbeat, p); + switch(cmd) + { + default: + return -ENOTTY; + case WDIOC_GETSUPPORT: + return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0; + + case WDIOC_GETSTATUS: + wdt_get_status(&status); + return put_user(status, p); + case WDIOC_GETBOOTSTATUS: + return put_user(0, p); + case WDIOC_KEEPALIVE: + wdt_ping(); + return 0; + case WDIOC_SETTIMEOUT: + if (get_user(new_heartbeat, p)) + return -EFAULT; + + if (wdt_set_heartbeat(new_heartbeat)) + return -EINVAL; + + wdt_ping(); + /* Fall */ + case WDIOC_GETTIMEOUT: + return put_user(heartbeat, p); } } @@ -411,7 +405,7 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static int wdt_open(struct inode *inode, struct file *file) { - if (test_and_set_bit(0, &wdt_is_open)) + if(test_and_set_bit(0, &wdt_is_open)) return -EBUSY; /* * Activate @@ -438,8 +432,7 @@ static int wdt_release(struct inode *inode, struct file *file) wdt_stop(); clear_bit(0, &wdt_is_open); } else { - printk(KERN_CRIT - "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); + printk(KERN_CRIT "wdt: WDT device closed unexpectedly. WDT will not stop!\n"); wdt_ping(); } expect_close = 0; @@ -458,15 +451,14 @@ static int wdt_release(struct inode *inode, struct file *file) * farenheit. It was designed by an imperial measurement luddite. */ -static ssize_t wdt_temp_read(struct file *file, char __user *buf, - size_t count, loff_t *ptr) +static ssize_t wdt_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr) { int temperature; if (wdt_get_temperature(&temperature)) return -EFAULT; - if (copy_to_user(buf, &temperature, 1)) + if (copy_to_user (buf, &temperature, 1)) return -EFAULT; return 1; @@ -514,8 +506,10 @@ static int wdt_temp_release(struct inode *inode, struct file *file) static int wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { - if (code == SYS_DOWN || code == SYS_HALT) + if(code==SYS_DOWN || code==SYS_HALT) { + /* Turn the card off */ wdt_stop(); + } return NOTIFY_DONE; } @@ -528,7 +522,7 @@ static const struct file_operations wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdt_write, - .unlocked_ioctl = wdt_ioctl, + .ioctl = wdt_ioctl, .open = wdt_open, .release = wdt_release, }; @@ -582,7 +576,7 @@ static void __exit wdt_exit(void) #endif /* CONFIG_WDT_501 */ unregister_reboot_notifier(&wdt_notifier); free_irq(irq, NULL); - release_region(io, 8); + release_region(io,8); } /** @@ -597,49 +591,44 @@ static int __init wdt_init(void) { int ret; - /* Check that the heartbeat value is within it's range; - if not reset to the default */ + /* Check that the heartbeat value is within it's range ; if not reset to the default */ if (wdt_set_heartbeat(heartbeat)) { wdt_set_heartbeat(WD_TIMO); - printk(KERN_INFO "wdt: heartbeat value must be 0 < heartbeat < 65536, using %d\n", + printk(KERN_INFO "wdt: heartbeat value must be 0 #include #include -#include #include #include #include #include #include -#include -#include +#include +#include #include #define WDT_IS_PCI @@ -76,7 +73,7 @@ /* We can only use 1 card due to the /dev/watchdog restriction */ static int dev_count; -static unsigned long open_lock; +static struct semaphore open_sem; static DEFINE_SPINLOCK(wdtpci_lock); static char expect_close; @@ -89,23 +86,18 @@ static int irq; static int heartbeat = WD_TIMO; static int wd_heartbeat; module_param(heartbeat, int, 0); -MODULE_PARM_DESC(heartbeat, - "Watchdog heartbeat in seconds. (0> 8, WDT_COUNT0 + ctr); - udelay(8); + outb_p(val&0xFF, WDT_COUNT0+ctr); + outb_p(val>>8, WDT_COUNT0+ctr); } /** @@ -145,35 +134,23 @@ static int wdtpci_start(void) * "pet" the watchdog, as Access says. * This resets the clock outputs. */ - inb(WDT_DC); /* Disable watchdog */ - udelay(8); - wdtpci_ctr_mode(2, 0); /* Program CTR2 for Mode 0: - Pulse on Terminal Count */ - outb(0, WDT_DC); /* Enable watchdog */ - udelay(8); - inb(WDT_DC); /* Disable watchdog */ - udelay(8); - outb(0, WDT_CLOCK); /* 2.0833MHz clock */ - udelay(8); - inb(WDT_BUZZER); /* disable */ - udelay(8); - inb(WDT_OPTONOTRST); /* disable */ - udelay(8); - inb(WDT_OPTORST); /* disable */ - udelay(8); - inb(WDT_PROGOUT); /* disable */ - udelay(8); - wdtpci_ctr_mode(0, 3); /* Program CTR0 for Mode 3: - Square Wave Generator */ - wdtpci_ctr_mode(1, 2); /* Program CTR1 for Mode 2: - Rate Generator */ - wdtpci_ctr_mode(2, 1); /* Program CTR2 for Mode 1: - Retriggerable One-Shot */ - wdtpci_ctr_load(0, 20833); /* count at 100Hz */ - wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */ + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_mode(2,0); /* Program CTR2 for Mode 0: Pulse on Terminal Count */ + outb_p(0, WDT_DC); /* Enable watchdog */ + + inb_p(WDT_DC); /* Disable watchdog */ + outb_p(0, WDT_CLOCK); /* 2.0833MHz clock */ + inb_p(WDT_BUZZER); /* disable */ + inb_p(WDT_OPTONOTRST); /* disable */ + inb_p(WDT_OPTORST); /* disable */ + inb_p(WDT_PROGOUT); /* disable */ + wdtpci_ctr_mode(0,3); /* Program CTR0 for Mode 3: Square Wave Generator */ + wdtpci_ctr_mode(1,2); /* Program CTR1 for Mode 2: Rate Generator */ + wdtpci_ctr_mode(2,1); /* Program CTR2 for Mode 1: Retriggerable One-Shot */ + wdtpci_ctr_load(0,20833); /* count at 100Hz */ + wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ /* DO NOT LOAD CTR2 on PCI card! -- JPN */ - outb(0, WDT_DC); /* Enable watchdog */ - udelay(8); + outb_p(0, WDT_DC); /* Enable watchdog */ spin_unlock_irqrestore(&wdtpci_lock, flags); return 0; @@ -185,15 +162,14 @@ static int wdtpci_start(void) * Stop the watchdog driver. */ -static int wdtpci_stop(void) +static int wdtpci_stop (void) { unsigned long flags; /* Turn the card off */ spin_lock_irqsave(&wdtpci_lock, flags); - inb(WDT_DC); /* Disable watchdog */ - udelay(8); - wdtpci_ctr_load(2, 0); /* 0 length reset pulses now */ + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_load(2,0); /* 0 length reset pulses now */ spin_unlock_irqrestore(&wdtpci_lock, flags); return 0; } @@ -201,23 +177,20 @@ static int wdtpci_stop(void) /** * wdtpci_ping: * - * Reload counter one with the watchdog heartbeat. We don't bother - * reloading the cascade counter. + * Reload counter one with the watchdog heartbeat. We don't bother reloading + * the cascade counter. */ static int wdtpci_ping(void) { unsigned long flags; - spin_lock_irqsave(&wdtpci_lock, flags); /* Write a watchdog value */ - inb(WDT_DC); /* Disable watchdog */ - udelay(8); - wdtpci_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2: - Rate Generator */ - wdtpci_ctr_load(1, wd_heartbeat);/* Heartbeat */ - outb(0, WDT_DC); /* Enable watchdog */ - udelay(8); + spin_lock_irqsave(&wdtpci_lock, flags); + inb_p(WDT_DC); /* Disable watchdog */ + wdtpci_ctr_mode(1,2); /* Re-Program CTR1 for Mode 2: Rate Generator */ + wdtpci_ctr_load(1,wd_heartbeat);/* Heartbeat */ + outb_p(0, WDT_DC); /* Enable watchdog */ spin_unlock_irqrestore(&wdtpci_lock, flags); return 0; } @@ -226,14 +199,14 @@ static int wdtpci_ping(void) * wdtpci_set_heartbeat: * @t: the new heartbeat value that needs to be set. * - * Set a new heartbeat value for the watchdog device. If the heartbeat - * value is incorrect we keep the old value and return -EINVAL. - * If successful we return 0. + * Set a new heartbeat value for the watchdog device. If the heartbeat value is + * incorrect we keep the old value and return -EINVAL. If successfull we + * return 0. */ static int wdtpci_set_heartbeat(int t) { /* Arbitrary, can't find the card's limits */ - if (t < 1 || t > 65535) + if ((t < 1) || (t > 65535)) return -EINVAL; heartbeat = t; @@ -254,14 +227,9 @@ static int wdtpci_set_heartbeat(int t) static int wdtpci_get_status(int *status) { - unsigned char new_status; - unsigned long flags; - - spin_lock_irqsave(&wdtpci_lock, flags); - new_status = inb(WDT_SR); - spin_unlock_irqrestore(&wdtpci_lock, flags); + unsigned char new_status=inb_p(WDT_SR); - *status = 0; + *status=0; if (new_status & WDC_SR_ISOI0) *status |= WDIOF_EXTERN1; if (new_status & WDC_SR_ISII1) @@ -291,12 +259,8 @@ static int wdtpci_get_status(int *status) static int wdtpci_get_temperature(int *temperature) { - unsigned short c; - unsigned long flags; - spin_lock_irqsave(&wdtpci_lock, flags); - c = inb(WDT_RT); - udelay(8); - spin_unlock_irqrestore(&wdtpci_lock, flags); + unsigned short c=inb_p(WDT_RT); + *temperature = (c * 11 / 15) + 7; return 0; } @@ -318,25 +282,17 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) * Read the status register see what is up and * then printk it. */ - unsigned char status; - - spin_lock(&wdtpci_lock); - - status = inb(WDT_SR); - udelay(8); + unsigned char status=inb_p(WDT_SR); printk(KERN_CRIT PFX "status %d\n", status); #ifdef CONFIG_WDT_501_PCI - if (!(status & WDC_SR_TGOOD)) { - u8 alarm = inb(WDT_RT); - printk(KERN_CRIT PFX "Overheat alarm.(%d)\n", alarm); - udelay(8); - } + if (!(status & WDC_SR_TGOOD)) + printk(KERN_CRIT PFX "Overheat alarm.(%d)\n",inb_p(WDT_RT)); if (!(status & WDC_SR_PSUOVER)) - printk(KERN_CRIT PFX "PSU over voltage.\n"); + printk(KERN_CRIT PFX "PSU over voltage.\n"); if (!(status & WDC_SR_PSUUNDR)) - printk(KERN_CRIT PFX "PSU under voltage.\n"); + printk(KERN_CRIT PFX "PSU under voltage.\n"); if (tachometer) { if (!(status & WDC_SR_FANGOOD)) printk(KERN_CRIT PFX "Possible fan fault.\n"); @@ -354,7 +310,6 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) printk(KERN_CRIT PFX "Reset in 5ms.\n"); #endif } - spin_unlock(&wdtpci_lock); return IRQ_HANDLED; } @@ -370,8 +325,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id) * write of data will do, as we we don't define content meaning. */ -static ssize_t wdtpci_write(struct file *file, const char __user *buf, - size_t count, loff_t *ppos) +static ssize_t wdtpci_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { if (count) { if (!nowayout) { @@ -381,7 +335,7 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, for (i = 0; i != count; i++) { char c; - if (get_user(c, buf+i)) + if(get_user(c, buf+i)) return -EFAULT; if (c == 'V') expect_close = 42; @@ -389,11 +343,13 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, } wdtpci_ping(); } + return count; } /** * wdtpci_ioctl: + * @inode: inode of the device * @file: file handle to the device * @cmd: watchdog command * @arg: argument pointer @@ -403,8 +359,8 @@ static ssize_t wdtpci_write(struct file *file, const char __user *buf, * querying capabilities and current status. */ -static long wdtpci_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static int wdtpci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg) { int new_heartbeat; int status; @@ -427,29 +383,33 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd, ident.options |= WDIOF_FANFAULT; #endif /* CONFIG_WDT_501_PCI */ - switch (cmd) { - default: - return -ENOTTY; - case WDIOC_GETSUPPORT: - return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; - case WDIOC_GETSTATUS: - wdtpci_get_status(&status); - return put_user(status, p); - case WDIOC_GETBOOTSTATUS: - return put_user(0, p); - case WDIOC_KEEPALIVE: - wdtpci_ping(); - return 0; - case WDIOC_SETTIMEOUT: - if (get_user(new_heartbeat, p)) - return -EFAULT; - if (wdtpci_set_heartbeat(new_heartbeat)) - return -EINVAL; - wdtpci_ping(); - /* Fall */ - case WDIOC_GETTIMEOUT: - return put_user(heartbeat, p); - } + switch(cmd) + { + default: + return -ENOTTY; + case WDIOC_GETSUPPORT: + return copy_to_user(argp, &ident, sizeof(ident))?-EFAULT:0; + + case WDIOC_GETSTATUS: + wdtpci_get_status(&status); + return put_user(status, p); + case WDIOC_GETBOOTSTATUS: + return put_user(0, p); + case WDIOC_KEEPALIVE: + wdtpci_ping(); + return 0; + case WDIOC_SETTIMEOUT: + if (get_user(new_heartbeat, p)) + return -EFAULT; + + if (wdtpci_set_heartbeat(new_heartbeat)) + return -EINVAL; + + wdtpci_ping(); + /* Fall */ + case WDIOC_GETTIMEOUT: + return put_user(heartbeat, p); + } } /** @@ -466,11 +426,12 @@ static long wdtpci_ioctl(struct file *file, unsigned int cmd, static int wdtpci_open(struct inode *inode, struct file *file) { - if (test_and_set_bit(0, &open_lock)) + if (down_trylock(&open_sem)) return -EBUSY; - if (nowayout) + if (nowayout) { __module_get(THIS_MODULE); + } /* * Activate */ @@ -499,7 +460,7 @@ static int wdtpci_release(struct inode *inode, struct file *file) wdtpci_ping(); } expect_close = 0; - clear_bit(0, &open_lock); + up(&open_sem); return 0; } @@ -515,15 +476,14 @@ static int wdtpci_release(struct inode *inode, struct file *file) * fahrenheit. It was designed by an imperial measurement luddite. */ -static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, - size_t count, loff_t *ptr) +static ssize_t wdtpci_temp_read(struct file *file, char __user *buf, size_t count, loff_t *ptr) { int temperature; if (wdtpci_get_temperature(&temperature)) return -EFAULT; - if (copy_to_user(buf, &temperature, 1)) + if (copy_to_user (buf, &temperature, 1)) return -EFAULT; return 1; @@ -569,10 +529,12 @@ static int wdtpci_temp_release(struct inode *inode, struct file *file) */ static int wdtpci_notify_sys(struct notifier_block *this, unsigned long code, - void *unused) + void *unused) { - if (code == SYS_DOWN || code == SYS_HALT) + if (code==SYS_DOWN || code==SYS_HALT) { + /* Turn the card off */ wdtpci_stop(); + } return NOTIFY_DONE; } @@ -585,7 +547,7 @@ static const struct file_operations wdtpci_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = wdtpci_write, - .unlocked_ioctl = wdtpci_ioctl, + .ioctl = wdtpci_ioctl, .open = wdtpci_open, .release = wdtpci_release, }; @@ -622,85 +584,80 @@ static struct notifier_block wdtpci_notifier = { }; -static int __devinit wdtpci_init_one(struct pci_dev *dev, - const struct pci_device_id *ent) +static int __devinit wdtpci_init_one (struct pci_dev *dev, + const struct pci_device_id *ent) { int ret = -EIO; dev_count++; if (dev_count > 1) { - printk(KERN_ERR PFX "This driver only supports one device\n"); + printk (KERN_ERR PFX "this driver only supports 1 device\n"); return -ENODEV; } - if (pci_enable_device(dev)) { - printk(KERN_ERR PFX "Not possible to enable PCI Device\n"); + if (pci_enable_device (dev)) { + printk (KERN_ERR PFX "Not possible to enable PCI Device\n"); return -ENODEV; } - if (pci_resource_start(dev, 2) == 0x0000) { - printk(KERN_ERR PFX "No I/O-Address for card detected\n"); + if (pci_resource_start (dev, 2) == 0x0000) { + printk (KERN_ERR PFX "No I/O-Address for card detected\n"); ret = -ENODEV; goto out_pci; } + sema_init(&open_sem, 1); + irq = dev->irq; - io = pci_resource_start(dev, 2); + io = pci_resource_start (dev, 2); - if (request_region(io, 16, "wdt_pci") == NULL) { - printk(KERN_ERR PFX "I/O address 0x%04x already in use\n", io); + if (request_region (io, 16, "wdt_pci") == NULL) { + printk (KERN_ERR PFX "I/O address 0x%04x already in use\n", io); goto out_pci; } - if (request_irq(irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, + if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED, "wdt_pci", &wdtpci_miscdev)) { - printk(KERN_ERR PFX "IRQ %d is not free\n", irq); + printk (KERN_ERR PFX "IRQ %d is not free\n", irq); goto out_reg; } - printk(KERN_INFO - "PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", - io, irq); + printk ("PCI-WDT500/501 (PCI-WDG-CSM) driver 0.10 at 0x%04x (Interrupt %d)\n", + io, irq); - /* Check that the heartbeat value is within its range; - if not reset to the default */ + /* Check that the heartbeat value is within it's range ; if not reset to the default */ if (wdtpci_set_heartbeat(heartbeat)) { wdtpci_set_heartbeat(WD_TIMO); - printk(KERN_INFO PFX - "heartbeat value must be 0 < heartbeat < 65536, using %d\n", - WD_TIMO); + printk(KERN_INFO PFX "heartbeat value must be 0len + 9) & ~3; p->addr = htonl(p->addr); - p->len = htons(p->len); + p->len = htonl(p->len); write(outfd, &p->addr, writelen); p = p->next; } /* EOF record is zero length, since we don't bother to represent the type field in the binary version */ - write(outfd, zeroes, 6); + write(outfd, zeroes, 5); return 0; } diff --git a/trunk/fs/ext4/acl.c b/trunk/fs/ext4/acl.c index 694ed6fadcc8..c7d04e165446 100644 --- a/trunk/fs/ext4/acl.c +++ b/trunk/fs/ext4/acl.c @@ -40,35 +40,34 @@ ext4_acl_from_disk(const void *value, size_t size) acl = posix_acl_alloc(count, GFP_NOFS); if (!acl) return ERR_PTR(-ENOMEM); - for (n = 0; n < count; n++) { + for (n=0; n < count; n++) { ext4_acl_entry *entry = (ext4_acl_entry *)value; if ((char *)value + sizeof(ext4_acl_entry_short) > end) goto fail; acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); - - switch (acl->a_entries[n].e_tag) { - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - value = (char *)value + - sizeof(ext4_acl_entry_short); - acl->a_entries[n].e_id = ACL_UNDEFINED_ID; - break; - - case ACL_USER: - case ACL_GROUP: - value = (char *)value + sizeof(ext4_acl_entry); - if ((char *)value > end) + switch(acl->a_entries[n].e_tag) { + case ACL_USER_OBJ: + case ACL_GROUP_OBJ: + case ACL_MASK: + case ACL_OTHER: + value = (char *)value + + sizeof(ext4_acl_entry_short); + acl->a_entries[n].e_id = ACL_UNDEFINED_ID; + break; + + case ACL_USER: + case ACL_GROUP: + value = (char *)value + sizeof(ext4_acl_entry); + if ((char *)value > end) + goto fail; + acl->a_entries[n].e_id = + le32_to_cpu(entry->e_id); + break; + + default: goto fail; - acl->a_entries[n].e_id = - le32_to_cpu(entry->e_id); - break; - - default: - goto fail; } } if (value != end) @@ -97,26 +96,27 @@ ext4_acl_to_disk(const struct posix_acl *acl, size_t *size) return ERR_PTR(-ENOMEM); ext_acl->a_version = cpu_to_le32(EXT4_ACL_VERSION); e = (char *)ext_acl + sizeof(ext4_acl_header); - for (n = 0; n < acl->a_count; n++) { + for (n=0; n < acl->a_count; n++) { ext4_acl_entry *entry = (ext4_acl_entry *)e; entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm); - switch (acl->a_entries[n].e_tag) { - case ACL_USER: - case ACL_GROUP: - entry->e_id = cpu_to_le32(acl->a_entries[n].e_id); - e += sizeof(ext4_acl_entry); - break; - - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - e += sizeof(ext4_acl_entry_short); - break; - - default: - goto fail; + switch(acl->a_entries[n].e_tag) { + case ACL_USER: + case ACL_GROUP: + entry->e_id = + cpu_to_le32(acl->a_entries[n].e_id); + e += sizeof(ext4_acl_entry); + break; + + case ACL_USER_OBJ: + case ACL_GROUP_OBJ: + case ACL_MASK: + case ACL_OTHER: + e += sizeof(ext4_acl_entry_short); + break; + + default: + goto fail; } } return (char *)ext_acl; @@ -167,23 +167,23 @@ ext4_get_acl(struct inode *inode, int type) if (!test_opt(inode->i_sb, POSIX_ACL)) return NULL; - switch (type) { - case ACL_TYPE_ACCESS: - acl = ext4_iget_acl(inode, &ei->i_acl); - if (acl != EXT4_ACL_NOT_CACHED) - return acl; - name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; - break; - - case ACL_TYPE_DEFAULT: - acl = ext4_iget_acl(inode, &ei->i_default_acl); - if (acl != EXT4_ACL_NOT_CACHED) - return acl; - name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; - break; - - default: - return ERR_PTR(-EINVAL); + switch(type) { + case ACL_TYPE_ACCESS: + acl = ext4_iget_acl(inode, &ei->i_acl); + if (acl != EXT4_ACL_NOT_CACHED) + return acl; + name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; + break; + + case ACL_TYPE_DEFAULT: + acl = ext4_iget_acl(inode, &ei->i_default_acl); + if (acl != EXT4_ACL_NOT_CACHED) + return acl; + name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; + break; + + default: + return ERR_PTR(-EINVAL); } retval = ext4_xattr_get(inode, name_index, "", NULL, 0); if (retval > 0) { @@ -201,14 +201,14 @@ ext4_get_acl(struct inode *inode, int type) kfree(value); if (!IS_ERR(acl)) { - switch (type) { - case ACL_TYPE_ACCESS: - ext4_iset_acl(inode, &ei->i_acl, acl); - break; - - case ACL_TYPE_DEFAULT: - ext4_iset_acl(inode, &ei->i_default_acl, acl); - break; + switch(type) { + case ACL_TYPE_ACCESS: + ext4_iset_acl(inode, &ei->i_acl, acl); + break; + + case ACL_TYPE_DEFAULT: + ext4_iset_acl(inode, &ei->i_default_acl, acl); + break; } } return acl; @@ -232,31 +232,31 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, if (S_ISLNK(inode->i_mode)) return -EOPNOTSUPP; - switch (type) { - case ACL_TYPE_ACCESS: - name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; - if (acl) { - mode_t mode = inode->i_mode; - error = posix_acl_equiv_mode(acl, &mode); - if (error < 0) - return error; - else { - inode->i_mode = mode; - ext4_mark_inode_dirty(handle, inode); - if (error == 0) - acl = NULL; + switch(type) { + case ACL_TYPE_ACCESS: + name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; + if (acl) { + mode_t mode = inode->i_mode; + error = posix_acl_equiv_mode(acl, &mode); + if (error < 0) + return error; + else { + inode->i_mode = mode; + ext4_mark_inode_dirty(handle, inode); + if (error == 0) + acl = NULL; + } } - } - break; + break; - case ACL_TYPE_DEFAULT: - name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; - if (!S_ISDIR(inode->i_mode)) - return acl ? -EACCES : 0; - break; + case ACL_TYPE_DEFAULT: + name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; + if (!S_ISDIR(inode->i_mode)) + return acl ? -EACCES : 0; + break; - default: - return -EINVAL; + default: + return -EINVAL; } if (acl) { value = ext4_acl_to_disk(acl, &size); @@ -269,14 +269,14 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, kfree(value); if (!error) { - switch (type) { - case ACL_TYPE_ACCESS: - ext4_iset_acl(inode, &ei->i_acl, acl); - break; - - case ACL_TYPE_DEFAULT: - ext4_iset_acl(inode, &ei->i_default_acl, acl); - break; + switch(type) { + case ACL_TYPE_ACCESS: + ext4_iset_acl(inode, &ei->i_acl, acl); + break; + + case ACL_TYPE_DEFAULT: + ext4_iset_acl(inode, &ei->i_default_acl, acl); + break; } } return error; diff --git a/trunk/fs/ext4/balloc.c b/trunk/fs/ext4/balloc.c index 1ae5004e93fc..495ab21b9832 100644 --- a/trunk/fs/ext4/balloc.c +++ b/trunk/fs/ext4/balloc.c @@ -314,28 +314,25 @@ ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group) if (unlikely(!bh)) { ext4_error(sb, __func__, "Cannot read block bitmap - " - "block_group = %lu, block_bitmap = %llu", - block_group, bitmap_blk); + "block_group = %d, block_bitmap = %llu", + (int)block_group, (unsigned long long)bitmap_blk); return NULL; } if (bh_uptodate_or_lock(bh)) return bh; - spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group)); if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { ext4_init_block_bitmap(sb, bh, block_group, desc); set_buffer_uptodate(bh); unlock_buffer(bh); - spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); return bh; } - spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); if (bh_submit_read(bh) < 0) { put_bh(bh); ext4_error(sb, __func__, "Cannot read block bitmap - " - "block_group = %lu, block_bitmap = %llu", - block_group, bitmap_blk); + "block_group = %d, block_bitmap = %llu", + (int)block_group, (unsigned long long)bitmap_blk); return NULL; } ext4_valid_block_bitmap(sb, desc, block_group, bh); diff --git a/trunk/fs/ext4/ext4.h b/trunk/fs/ext4/ext4.h index 6c7924d9e358..303e41cf7b14 100644 --- a/trunk/fs/ext4/ext4.h +++ b/trunk/fs/ext4/ext4.h @@ -1044,6 +1044,7 @@ extern void ext4_mb_update_group_info(struct ext4_group_info *grp, /* inode.c */ +void ext4_da_release_space(struct inode *inode, int used, int to_free); int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode, struct buffer_head *bh, ext4_fsblk_t blocknr); struct buffer_head *ext4_getblk(handle_t *, struct inode *, diff --git a/trunk/fs/ext4/extents.c b/trunk/fs/ext4/extents.c index 612c3d2c3824..42c4c0c892ed 100644 --- a/trunk/fs/ext4/extents.c +++ b/trunk/fs/ext4/extents.c @@ -99,7 +99,7 @@ static int ext4_ext_journal_restart(handle_t *handle, int needed) if (handle->h_buffer_credits > needed) return 0; err = ext4_journal_extend(handle, needed); - if (err <= 0) + if (err) return err; return ext4_journal_restart(handle, needed); } @@ -1441,7 +1441,7 @@ unsigned int ext4_ext_check_overlap(struct inode *inode, /* * get the next allocated block if the extent in the path - * is before the requested block(s) + * is before the requested block(s) */ if (b2 < b1) { b2 = ext4_ext_next_allocated_block(path); @@ -1910,13 +1910,9 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, BUG_ON(b != ex_ee_block + ex_ee_len - 1); } - /* - * 3 for leaf, sb, and inode plus 2 (bmap and group - * descriptor) for each block group; assume two block - * groups plus ex_ee_len/blocks_per_block_group for - * the worst case - */ - credits = 7 + 2*(ex_ee_len/EXT4_BLOCKS_PER_GROUP(inode->i_sb)); + /* at present, extent can't cross block group: */ + /* leaf + bitmap + group desc + sb + inode */ + credits = 5; if (ex == EXT_FIRST_EXTENT(eh)) { correct_index = 1; credits += (ext_depth(inode)) + 1; @@ -2327,10 +2323,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, unsigned int newdepth; /* If extent has less than EXT4_EXT_ZERO_LEN zerout directly */ if (allocated <= EXT4_EXT_ZERO_LEN) { - /* - * iblock == ee_block is handled by the zerouout - * at the beginning. - * Mark first half uninitialized. + /* Mark first half uninitialized. * Mark second half initialized and zero out the * initialized extent */ @@ -2353,7 +2346,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, ex->ee_len = orig_ex.ee_len; ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); ext4_ext_dirty(handle, inode, path + depth); - /* blocks available from iblock */ + /* zeroed the full extent */ return allocated; } else if (err) @@ -2381,7 +2374,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, err = PTR_ERR(path); return err; } - /* get the second half extent details */ ex = path[depth].p_ext; err = ext4_ext_get_access(handle, inode, path + depth); @@ -2411,7 +2403,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); ext4_ext_dirty(handle, inode, path + depth); /* zeroed the full extent */ - /* blocks available from iblock */ return allocated; } else if (err) @@ -2427,22 +2418,23 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, */ orig_ex.ee_len = cpu_to_le16(ee_len - ext4_ext_get_actual_len(ex3)); - depth = newdepth; - ext4_ext_drop_refs(path); - path = ext4_ext_find_extent(inode, iblock, path); - if (IS_ERR(path)) { - err = PTR_ERR(path); - goto out; - } - eh = path[depth].p_hdr; - ex = path[depth].p_ext; - if (ex2 != &newex) - ex2 = ex; - - err = ext4_ext_get_access(handle, inode, path + depth); - if (err) - goto out; + if (newdepth != depth) { + depth = newdepth; + ext4_ext_drop_refs(path); + path = ext4_ext_find_extent(inode, iblock, path); + if (IS_ERR(path)) { + err = PTR_ERR(path); + goto out; + } + eh = path[depth].p_hdr; + ex = path[depth].p_ext; + if (ex2 != &newex) + ex2 = ex; + err = ext4_ext_get_access(handle, inode, path + depth); + if (err) + goto out; + } allocated = max_blocks; /* If extent has less than EXT4_EXT_ZERO_LEN and we are trying @@ -2460,7 +2452,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, ext4_ext_store_pblock(ex, ext_pblock(&orig_ex)); ext4_ext_dirty(handle, inode, path + depth); /* zero out the first half */ - /* blocks available from iblock */ return allocated; } } diff --git a/trunk/fs/ext4/ialloc.c b/trunk/fs/ext4/ialloc.c index 655e760212b8..a92eb305344f 100644 --- a/trunk/fs/ext4/ialloc.c +++ b/trunk/fs/ext4/ialloc.c @@ -97,44 +97,34 @@ unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, * Return buffer_head of bitmap on success or NULL. */ static struct buffer_head * -ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) +read_inode_bitmap(struct super_block *sb, ext4_group_t block_group) { struct ext4_group_desc *desc; struct buffer_head *bh = NULL; - ext4_fsblk_t bitmap_blk; desc = ext4_get_group_desc(sb, block_group, NULL); if (!desc) - return NULL; - bitmap_blk = ext4_inode_bitmap(sb, desc); - bh = sb_getblk(sb, bitmap_blk); - if (unlikely(!bh)) { - ext4_error(sb, __func__, - "Cannot read inode bitmap - " - "block_group = %lu, inode_bitmap = %llu", - block_group, bitmap_blk); - return NULL; - } - if (bh_uptodate_or_lock(bh)) - return bh; - - spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group)); + goto error_out; if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) { - ext4_init_inode_bitmap(sb, bh, block_group, desc); - set_buffer_uptodate(bh); - unlock_buffer(bh); - spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); - return bh; - } - spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); - if (bh_submit_read(bh) < 0) { - put_bh(bh); - ext4_error(sb, __func__, + bh = sb_getblk(sb, ext4_inode_bitmap(sb, desc)); + if (!buffer_uptodate(bh)) { + lock_buffer(bh); + if (!buffer_uptodate(bh)) { + ext4_init_inode_bitmap(sb, bh, block_group, + desc); + set_buffer_uptodate(bh); + } + unlock_buffer(bh); + } + } else { + bh = sb_bread(sb, ext4_inode_bitmap(sb, desc)); + } + if (!bh) + ext4_error(sb, "read_inode_bitmap", "Cannot read inode bitmap - " "block_group = %lu, inode_bitmap = %llu", - block_group, bitmap_blk); - return NULL; - } + block_group, ext4_inode_bitmap(sb, desc)); +error_out: return bh; } @@ -210,7 +200,7 @@ void ext4_free_inode (handle_t *handle, struct inode * inode) } block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); - bitmap_bh = ext4_read_inode_bitmap(sb, block_group); + bitmap_bh = read_inode_bitmap(sb, block_group); if (!bitmap_bh) goto error_return; @@ -633,7 +623,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode) goto fail; brelse(bitmap_bh); - bitmap_bh = ext4_read_inode_bitmap(sb, group); + bitmap_bh = read_inode_bitmap(sb, group); if (!bitmap_bh) goto fail; @@ -738,7 +728,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode) /* When marking the block group with * ~EXT4_BG_INODE_UNINIT we don't want to depend - * on the value of bg_itable_unused even though + * on the value of bg_itable_unsed even though * mke2fs could have initialized the same for us. * Instead we calculated the value below */ @@ -901,7 +891,7 @@ struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino) block_group = (ino - 1) / EXT4_INODES_PER_GROUP(sb); bit = (ino - 1) % EXT4_INODES_PER_GROUP(sb); - bitmap_bh = ext4_read_inode_bitmap(sb, block_group); + bitmap_bh = read_inode_bitmap(sb, block_group); if (!bitmap_bh) { ext4_warning(sb, __func__, "inode bitmap error for orphan %lu", ino); @@ -979,7 +969,7 @@ unsigned long ext4_count_free_inodes (struct super_block * sb) continue; desc_count += le16_to_cpu(gdp->bg_free_inodes_count); brelse(bitmap_bh); - bitmap_bh = ext4_read_inode_bitmap(sb, i); + bitmap_bh = read_inode_bitmap(sb, i); if (!bitmap_bh) continue; diff --git a/trunk/fs/ext4/inode.c b/trunk/fs/ext4/inode.c index 59fbbe899acc..9843b046c235 100644 --- a/trunk/fs/ext4/inode.c +++ b/trunk/fs/ext4/inode.c @@ -191,7 +191,6 @@ static int ext4_journal_test_restart(handle_t *handle, struct inode *inode) void ext4_delete_inode (struct inode * inode) { handle_t *handle; - int err; if (ext4_should_order_data(inode)) ext4_begin_ordered_truncate(inode, 0); @@ -200,9 +199,8 @@ void ext4_delete_inode (struct inode * inode) if (is_bad_inode(inode)) goto no_delete; - handle = ext4_journal_start(inode, blocks_for_truncate(inode)+3); + handle = start_transaction(inode); if (IS_ERR(handle)) { - ext4_std_error(inode->i_sb, PTR_ERR(handle)); /* * If we're going to skip the normal cleanup, we still need to * make sure that the in-core orphan linked list is properly @@ -215,34 +213,8 @@ void ext4_delete_inode (struct inode * inode) if (IS_SYNC(inode)) handle->h_sync = 1; inode->i_size = 0; - err = ext4_mark_inode_dirty(handle, inode); - if (err) { - ext4_warning(inode->i_sb, __func__, - "couldn't mark inode dirty (err %d)", err); - goto stop_handle; - } if (inode->i_blocks) ext4_truncate(inode); - - /* - * ext4_ext_truncate() doesn't reserve any slop when it - * restarts journal transactions; therefore there may not be - * enough credits left in the handle to remove the inode from - * the orphan list and set the dtime field. - */ - if (handle->h_buffer_credits < 3) { - err = ext4_journal_extend(handle, 3); - if (err > 0) - err = ext4_journal_restart(handle, 3); - if (err != 0) { - ext4_warning(inode->i_sb, __func__, - "couldn't extend journal (err %d)", err); - stop_handle: - ext4_journal_stop(handle); - goto no_delete; - } - } - /* * Kill off the orphan record which ext4_truncate created. * AKPM: I think this can be inside the above `if'. @@ -980,67 +952,6 @@ int ext4_get_blocks_handle(handle_t *handle, struct inode *inode, return err; } -/* - * Calculate the number of metadata blocks need to reserve - * to allocate @blocks for non extent file based file - */ -static int ext4_indirect_calc_metadata_amount(struct inode *inode, int blocks) -{ - int icap = EXT4_ADDR_PER_BLOCK(inode->i_sb); - int ind_blks, dind_blks, tind_blks; - - /* number of new indirect blocks needed */ - ind_blks = (blocks + icap - 1) / icap; - - dind_blks = (ind_blks + icap - 1) / icap; - - tind_blks = 1; - - return ind_blks + dind_blks + tind_blks; -} - -/* - * Calculate the number of metadata blocks need to reserve - * to allocate given number of blocks - */ -static int ext4_calc_metadata_amount(struct inode *inode, int blocks) -{ - if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) - return ext4_ext_calc_metadata_amount(inode, blocks); - - return ext4_indirect_calc_metadata_amount(inode, blocks); -} - -static void ext4_da_update_reserve_space(struct inode *inode, int used) -{ - struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); - int total, mdb, mdb_free; - - spin_lock(&EXT4_I(inode)->i_block_reservation_lock); - /* recalculate the number of metablocks still need to be reserved */ - total = EXT4_I(inode)->i_reserved_data_blocks - used; - mdb = ext4_calc_metadata_amount(inode, total); - - /* figure out how many metablocks to release */ - BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); - mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; - - /* Account for allocated meta_blocks */ - mdb_free -= EXT4_I(inode)->i_allocated_meta_blocks; - - /* update fs free blocks counter for truncate case */ - percpu_counter_add(&sbi->s_freeblocks_counter, mdb_free); - - /* update per-inode reservations */ - BUG_ON(used > EXT4_I(inode)->i_reserved_data_blocks); - EXT4_I(inode)->i_reserved_data_blocks -= used; - - BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); - EXT4_I(inode)->i_reserved_meta_blocks = mdb; - EXT4_I(inode)->i_allocated_meta_blocks = 0; - spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); -} - /* Maximum number of blocks we map for direct IO at once. */ #define DIO_MAX_BLOCKS 4096 /* @@ -1054,9 +965,10 @@ static void ext4_da_update_reserve_space(struct inode *inode, int used) /* - * The ext4_get_blocks_wrap() function try to look up the requested blocks, - * and returns if the blocks are already mapped. * + * + * ext4_ext4 get_block() wrapper function + * It will do a look up first, and returns if the blocks already mapped. * Otherwise it takes the write lock of the i_data_sem and allocate blocks * and store the allocated blocks in the result buffer head and mark it * mapped. @@ -1157,7 +1069,7 @@ int ext4_get_blocks_wrap(handle_t *handle, struct inode *inode, sector_t block, * which were deferred till now */ if ((retval > 0) && buffer_delay(bh)) - ext4_da_update_reserve_space(inode, retval); + ext4_da_release_space(inode, retval, 0); } up_write((&EXT4_I(inode)->i_data_sem)); @@ -1424,8 +1336,12 @@ static int ext4_ordered_write_end(struct file *file, { handle_t *handle = ext4_journal_current_handle(); struct inode *inode = mapping->host; + unsigned from, to; int ret = 0, ret2; + from = pos & (PAGE_CACHE_SIZE - 1); + to = from + len; + ret = ext4_jbd2_file_inode(handle, inode); if (ret == 0) { @@ -1521,6 +1437,36 @@ static int ext4_journalled_write_end(struct file *file, return ret ? ret : copied; } +/* + * Calculate the number of metadata blocks need to reserve + * to allocate @blocks for non extent file based file + */ +static int ext4_indirect_calc_metadata_amount(struct inode *inode, int blocks) +{ + int icap = EXT4_ADDR_PER_BLOCK(inode->i_sb); + int ind_blks, dind_blks, tind_blks; + + /* number of new indirect blocks needed */ + ind_blks = (blocks + icap - 1) / icap; + + dind_blks = (ind_blks + icap - 1) / icap; + + tind_blks = 1; + + return ind_blks + dind_blks + tind_blks; +} + +/* + * Calculate the number of metadata blocks need to reserve + * to allocate given number of blocks + */ +static int ext4_calc_metadata_amount(struct inode *inode, int blocks) +{ + if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL) + return ext4_ext_calc_metadata_amount(inode, blocks); + + return ext4_indirect_calc_metadata_amount(inode, blocks); +} static int ext4_da_reserve_space(struct inode *inode, int nrblocks) { @@ -1544,6 +1490,7 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); return -ENOSPC; } + /* reduce fs free blocks counter */ percpu_counter_sub(&sbi->s_freeblocks_counter, total); @@ -1554,31 +1501,35 @@ static int ext4_da_reserve_space(struct inode *inode, int nrblocks) return 0; /* success */ } -static void ext4_da_release_space(struct inode *inode, int to_free) +void ext4_da_release_space(struct inode *inode, int used, int to_free) { struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); int total, mdb, mdb_free, release; spin_lock(&EXT4_I(inode)->i_block_reservation_lock); /* recalculate the number of metablocks still need to be reserved */ - total = EXT4_I(inode)->i_reserved_data_blocks - to_free; + total = EXT4_I(inode)->i_reserved_data_blocks - used - to_free; mdb = ext4_calc_metadata_amount(inode, total); /* figure out how many metablocks to release */ BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); mdb_free = EXT4_I(inode)->i_reserved_meta_blocks - mdb; + /* Account for allocated meta_blocks */ + mdb_free -= EXT4_I(inode)->i_allocated_meta_blocks; + release = to_free + mdb_free; /* update fs free blocks counter for truncate case */ percpu_counter_add(&sbi->s_freeblocks_counter, release); /* update per-inode reservations */ - BUG_ON(to_free > EXT4_I(inode)->i_reserved_data_blocks); - EXT4_I(inode)->i_reserved_data_blocks -= to_free; + BUG_ON(used + to_free > EXT4_I(inode)->i_reserved_data_blocks); + EXT4_I(inode)->i_reserved_data_blocks -= (used + to_free); BUG_ON(mdb > EXT4_I(inode)->i_reserved_meta_blocks); EXT4_I(inode)->i_reserved_meta_blocks = mdb; + EXT4_I(inode)->i_allocated_meta_blocks = 0; spin_unlock(&EXT4_I(inode)->i_block_reservation_lock); } @@ -1600,7 +1551,7 @@ static void ext4_da_page_release_reservation(struct page *page, } curr_off = next_off; } while ((bh = bh->b_this_page) != head); - ext4_da_release_space(page->mapping->host, to_release); + ext4_da_release_space(page->mapping->host, 0, to_release); } /* @@ -2329,11 +2280,8 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping, } page = __grab_cache_page(mapping, index); - if (!page) { - ext4_journal_stop(handle); - ret = -ENOMEM; - goto out; - } + if (!page) + return -ENOMEM; *pagep = page; ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata, @@ -3642,16 +3590,6 @@ static int __ext4_get_inode_loc(struct inode *inode, } if (!buffer_uptodate(bh)) { lock_buffer(bh); - - /* - * If the buffer has the write error flag, we have failed - * to write out another inode in the same block. In this - * case, we don't have to read the block because we may - * read the old inode data successfully. - */ - if (buffer_write_io_error(bh) && !buffer_uptodate(bh)) - set_buffer_uptodate(bh); - if (buffer_uptodate(bh)) { /* someone brought it uptodate while we waited */ unlock_buffer(bh); diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index 865e9ddb44d4..8d141a25bbee 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -787,16 +787,13 @@ static int ext4_mb_init_cache(struct page *page, char *incore) if (bh_uptodate_or_lock(bh[i])) continue; - spin_lock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { ext4_init_block_bitmap(sb, bh[i], first_group + i, desc); set_buffer_uptodate(bh[i]); unlock_buffer(bh[i]); - spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); continue; } - spin_unlock(sb_bgl_lock(EXT4_SB(sb), first_group + i)); get_bh(bh[i]); bh[i]->b_end_io = end_buffer_read_sync; submit_bh(READ, bh[i]); @@ -2480,7 +2477,7 @@ static int ext4_mb_init_backend(struct super_block *sb) int ext4_mb_init(struct super_block *sb, int needs_recovery) { struct ext4_sb_info *sbi = EXT4_SB(sb); - unsigned i, j; + unsigned i; unsigned offset; unsigned max; int ret; @@ -2540,7 +2537,7 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) sbi->s_mb_history_filter = EXT4_MB_HISTORY_DEFAULT; sbi->s_mb_group_prealloc = MB_DEFAULT_GROUP_PREALLOC; - i = sizeof(struct ext4_locality_group) * nr_cpu_ids; + i = sizeof(struct ext4_locality_group) * NR_CPUS; sbi->s_locality_groups = kmalloc(i, GFP_KERNEL); if (sbi->s_locality_groups == NULL) { clear_opt(sbi->s_mount_opt, MBALLOC); @@ -2548,12 +2545,11 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) kfree(sbi->s_mb_maxs); return -ENOMEM; } - for (i = 0; i < nr_cpu_ids; i++) { + for (i = 0; i < NR_CPUS; i++) { struct ext4_locality_group *lg; lg = &sbi->s_locality_groups[i]; mutex_init(&lg->lg_mutex); - for (j = 0; j < PREALLOC_TB_SIZE; j++) - INIT_LIST_HEAD(&lg->lg_prealloc_list[j]); + INIT_LIST_HEAD(&lg->lg_prealloc_list); spin_lock_init(&lg->lg_prealloc_lock); } @@ -3264,7 +3260,6 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, struct ext4_prealloc_space *pa) { unsigned int len = ac->ac_o_ex.fe_len; - ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, &ac->ac_b_ex.fe_group, &ac->ac_b_ex.fe_start); @@ -3287,7 +3282,6 @@ static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, static noinline_for_stack int ext4_mb_use_preallocated(struct ext4_allocation_context *ac) { - int order, i; struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); struct ext4_locality_group *lg; struct ext4_prealloc_space *pa; @@ -3328,29 +3322,22 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac) lg = ac->ac_lg; if (lg == NULL) return 0; - order = fls(ac->ac_o_ex.fe_len) - 1; - if (order > PREALLOC_TB_SIZE - 1) - /* The max size of hash table is PREALLOC_TB_SIZE */ - order = PREALLOC_TB_SIZE - 1; - - for (i = order; i < PREALLOC_TB_SIZE; i++) { - rcu_read_lock(); - list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[i], - pa_inode_list) { - spin_lock(&pa->pa_lock); - if (pa->pa_deleted == 0 && - pa->pa_free >= ac->ac_o_ex.fe_len) { - atomic_inc(&pa->pa_count); - ext4_mb_use_group_pa(ac, pa); - spin_unlock(&pa->pa_lock); - ac->ac_criteria = 20; - rcu_read_unlock(); - return 1; - } + + rcu_read_lock(); + list_for_each_entry_rcu(pa, &lg->lg_prealloc_list, pa_inode_list) { + spin_lock(&pa->pa_lock); + if (pa->pa_deleted == 0 && pa->pa_free >= ac->ac_o_ex.fe_len) { + atomic_inc(&pa->pa_count); + ext4_mb_use_group_pa(ac, pa); spin_unlock(&pa->pa_lock); + ac->ac_criteria = 20; + rcu_read_unlock(); + return 1; } - rcu_read_unlock(); + spin_unlock(&pa->pa_lock); } + rcu_read_unlock(); + return 0; } @@ -3573,7 +3560,6 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) pa->pa_free = pa->pa_len; atomic_set(&pa->pa_count, 1); spin_lock_init(&pa->pa_lock); - INIT_LIST_HEAD(&pa->pa_inode_list); pa->pa_deleted = 0; pa->pa_linear = 1; @@ -3594,10 +3580,10 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) list_add(&pa->pa_group_list, &grp->bb_prealloc_list); ext4_unlock_group(sb, ac->ac_b_ex.fe_group); - /* - * We will later add the new pa to the right bucket - * after updating the pa_free in ext4_mb_release_context - */ + spin_lock(pa->pa_obj_lock); + list_add_tail_rcu(&pa->pa_inode_list, &lg->lg_prealloc_list); + spin_unlock(pa->pa_obj_lock); + return 0; } @@ -3747,23 +3733,20 @@ ext4_mb_discard_group_preallocations(struct super_block *sb, bitmap_bh = ext4_read_block_bitmap(sb, group); if (bitmap_bh == NULL) { - ext4_error(sb, __func__, "Error in reading block " - "bitmap for %lu\n", group); - return 0; + /* error handling here */ + ext4_mb_release_desc(&e4b); + BUG_ON(bitmap_bh == NULL); } err = ext4_mb_load_buddy(sb, group, &e4b); - if (err) { - ext4_error(sb, __func__, "Error in loading buddy " - "information for %lu\n", group); - put_bh(bitmap_bh); - return 0; - } + BUG_ON(err != 0); /* error handling here */ if (needed == 0) needed = EXT4_BLOCKS_PER_GROUP(sb) + 1; + grp = ext4_get_group_info(sb, group); INIT_LIST_HEAD(&list); + ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); repeat: ext4_lock_group(sb, group); @@ -3920,18 +3903,13 @@ void ext4_mb_discard_inode_preallocations(struct inode *inode) ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); err = ext4_mb_load_buddy(sb, group, &e4b); - if (err) { - ext4_error(sb, __func__, "Error in loading buddy " - "information for %lu\n", group); - continue; - } + BUG_ON(err != 0); /* error handling here */ bitmap_bh = ext4_read_block_bitmap(sb, group); if (bitmap_bh == NULL) { - ext4_error(sb, __func__, "Error in reading block " - "bitmap for %lu\n", group); + /* error handling here */ ext4_mb_release_desc(&e4b); - continue; + BUG_ON(bitmap_bh == NULL); } ext4_lock_group(sb, group); @@ -4134,168 +4112,22 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac, } -static noinline_for_stack void -ext4_mb_discard_lg_preallocations(struct super_block *sb, - struct ext4_locality_group *lg, - int order, int total_entries) -{ - ext4_group_t group = 0; - struct ext4_buddy e4b; - struct list_head discard_list; - struct ext4_prealloc_space *pa, *tmp; - struct ext4_allocation_context *ac; - - mb_debug("discard locality group preallocation\n"); - - INIT_LIST_HEAD(&discard_list); - ac = kmem_cache_alloc(ext4_ac_cachep, GFP_NOFS); - - spin_lock(&lg->lg_prealloc_lock); - list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[order], - pa_inode_list) { - spin_lock(&pa->pa_lock); - if (atomic_read(&pa->pa_count)) { - /* - * This is the pa that we just used - * for block allocation. So don't - * free that - */ - spin_unlock(&pa->pa_lock); - continue; - } - if (pa->pa_deleted) { - spin_unlock(&pa->pa_lock); - continue; - } - /* only lg prealloc space */ - BUG_ON(!pa->pa_linear); - - /* seems this one can be freed ... */ - pa->pa_deleted = 1; - spin_unlock(&pa->pa_lock); - - list_del_rcu(&pa->pa_inode_list); - list_add(&pa->u.pa_tmp_list, &discard_list); - - total_entries--; - if (total_entries <= 5) { - /* - * we want to keep only 5 entries - * allowing it to grow to 8. This - * mak sure we don't call discard - * soon for this list. - */ - break; - } - } - spin_unlock(&lg->lg_prealloc_lock); - - list_for_each_entry_safe(pa, tmp, &discard_list, u.pa_tmp_list) { - - ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); - if (ext4_mb_load_buddy(sb, group, &e4b)) { - ext4_error(sb, __func__, "Error in loading buddy " - "information for %lu\n", group); - continue; - } - ext4_lock_group(sb, group); - list_del(&pa->pa_group_list); - ext4_mb_release_group_pa(&e4b, pa, ac); - ext4_unlock_group(sb, group); - - ext4_mb_release_desc(&e4b); - list_del(&pa->u.pa_tmp_list); - call_rcu(&(pa)->u.pa_rcu, ext4_mb_pa_callback); - } - if (ac) - kmem_cache_free(ext4_ac_cachep, ac); -} - -/* - * We have incremented pa_count. So it cannot be freed at this - * point. Also we hold lg_mutex. So no parallel allocation is - * possible from this lg. That means pa_free cannot be updated. - * - * A parallel ext4_mb_discard_group_preallocations is possible. - * which can cause the lg_prealloc_list to be updated. - */ - -static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac) -{ - int order, added = 0, lg_prealloc_count = 1; - struct super_block *sb = ac->ac_sb; - struct ext4_locality_group *lg = ac->ac_lg; - struct ext4_prealloc_space *tmp_pa, *pa = ac->ac_pa; - - order = fls(pa->pa_free) - 1; - if (order > PREALLOC_TB_SIZE - 1) - /* The max size of hash table is PREALLOC_TB_SIZE */ - order = PREALLOC_TB_SIZE - 1; - /* Add the prealloc space to lg */ - rcu_read_lock(); - list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order], - pa_inode_list) { - spin_lock(&tmp_pa->pa_lock); - if (tmp_pa->pa_deleted) { - spin_unlock(&pa->pa_lock); - continue; - } - if (!added && pa->pa_free < tmp_pa->pa_free) { - /* Add to the tail of the previous entry */ - list_add_tail_rcu(&pa->pa_inode_list, - &tmp_pa->pa_inode_list); - added = 1; - /* - * we want to count the total - * number of entries in the list - */ - } - spin_unlock(&tmp_pa->pa_lock); - lg_prealloc_count++; - } - if (!added) - list_add_tail_rcu(&pa->pa_inode_list, - &lg->lg_prealloc_list[order]); - rcu_read_unlock(); - - /* Now trim the list to be not more than 8 elements */ - if (lg_prealloc_count > 8) { - ext4_mb_discard_lg_preallocations(sb, lg, - order, lg_prealloc_count); - return; - } - return ; -} - /* * release all resource we used in allocation */ static int ext4_mb_release_context(struct ext4_allocation_context *ac) { - struct ext4_prealloc_space *pa = ac->ac_pa; - if (pa) { - if (pa->pa_linear) { + if (ac->ac_pa) { + if (ac->ac_pa->pa_linear) { /* see comment in ext4_mb_use_group_pa() */ - spin_lock(&pa->pa_lock); - pa->pa_pstart += ac->ac_b_ex.fe_len; - pa->pa_lstart += ac->ac_b_ex.fe_len; - pa->pa_free -= ac->ac_b_ex.fe_len; - pa->pa_len -= ac->ac_b_ex.fe_len; - spin_unlock(&pa->pa_lock); - /* - * We want to add the pa to the right bucket. - * Remove it from the list and while adding - * make sure the list to which we are adding - * doesn't grow big. - */ - if (likely(pa->pa_free)) { - spin_lock(pa->pa_obj_lock); - list_del_rcu(&pa->pa_inode_list); - spin_unlock(pa->pa_obj_lock); - ext4_mb_add_n_trim(ac); - } + spin_lock(&ac->ac_pa->pa_lock); + ac->ac_pa->pa_pstart += ac->ac_b_ex.fe_len; + ac->ac_pa->pa_lstart += ac->ac_b_ex.fe_len; + ac->ac_pa->pa_free -= ac->ac_b_ex.fe_len; + ac->ac_pa->pa_len -= ac->ac_b_ex.fe_len; + spin_unlock(&ac->ac_pa->pa_lock); } - ext4_mb_put_pa(ac, ac->ac_sb, pa); + ext4_mb_put_pa(ac, ac->ac_sb, ac->ac_pa); } if (ac->ac_bitmap_page) page_cache_release(ac->ac_bitmap_page); @@ -4588,15 +4420,11 @@ void ext4_mb_free_blocks(handle_t *handle, struct inode *inode, count -= overflow; } bitmap_bh = ext4_read_block_bitmap(sb, block_group); - if (!bitmap_bh) { - err = -EIO; + if (!bitmap_bh) goto error_return; - } gdp = ext4_get_group_desc(sb, block_group, &gd_bh); - if (!gdp) { - err = -EIO; + if (!gdp) goto error_return; - } if (in_range(ext4_block_bitmap(sb, gdp), block, count) || in_range(ext4_inode_bitmap(sb, gdp), block, count) || diff --git a/trunk/fs/ext4/mballoc.h b/trunk/fs/ext4/mballoc.h index c7c9906c2a75..bfe6add46bcf 100644 --- a/trunk/fs/ext4/mballoc.h +++ b/trunk/fs/ext4/mballoc.h @@ -164,17 +164,11 @@ struct ext4_free_extent { * Locality group: * we try to group all related changes together * so that writeback can flush/allocate them together as well - * Size of lg_prealloc_list hash is determined by MB_DEFAULT_GROUP_PREALLOC - * (512). We store prealloc space into the hash based on the pa_free blocks - * order value.ie, fls(pa_free)-1; */ -#define PREALLOC_TB_SIZE 10 struct ext4_locality_group { /* for allocator */ - /* to serialize allocates */ - struct mutex lg_mutex; - /* list of preallocations */ - struct list_head lg_prealloc_list[PREALLOC_TB_SIZE]; + struct mutex lg_mutex; /* to serialize allocates */ + struct list_head lg_prealloc_list;/* list of preallocations */ spinlock_t lg_prealloc_lock; }; diff --git a/trunk/fs/ext4/resize.c b/trunk/fs/ext4/resize.c index 0a9265164265..f000fbe2cd93 100644 --- a/trunk/fs/ext4/resize.c +++ b/trunk/fs/ext4/resize.c @@ -73,7 +73,7 @@ static int verify_group_input(struct super_block *sb, "Inode bitmap not in group (block %llu)", (unsigned long long)input->inode_bitmap); else if (outside(input->inode_table, start, end) || - outside(itend - 1, start, end)) + outside(itend - 1, start, end)) ext4_warning(sb, __func__, "Inode table not in group (blocks %llu-%llu)", (unsigned long long)input->inode_table, itend - 1); @@ -104,7 +104,7 @@ static int verify_group_input(struct super_block *sb, (unsigned long long)input->inode_bitmap, start, metaend - 1); else if (inside(input->inode_table, start, metaend) || - inside(itend - 1, start, metaend)) + inside(itend - 1, start, metaend)) ext4_warning(sb, __func__, "Inode table (%llu-%llu) overlaps" "GDT table (%llu-%llu)", @@ -158,9 +158,9 @@ static int extend_or_restart_transaction(handle_t *handle, int thresh, if (err) { if ((err = ext4_journal_restart(handle, EXT4_MAX_TRANS_DATA))) return err; - if ((err = ext4_journal_get_write_access(handle, bh))) + if ((err = ext4_journal_get_write_access(handle, bh))) return err; - } + } return 0; } @@ -416,11 +416,11 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, "EXT4-fs: ext4_add_new_gdb: adding group block %lu\n", gdb_num); - /* - * If we are not using the primary superblock/GDT copy don't resize, - * because the user tools have no way of handling this. Probably a - * bad time to do it anyways. - */ + /* + * If we are not using the primary superblock/GDT copy don't resize, + * because the user tools have no way of handling this. Probably a + * bad time to do it anyways. + */ if (EXT4_SB(sb)->s_sbh->b_blocknr != le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { ext4_warning(sb, __func__, @@ -507,14 +507,14 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, return 0; exit_inode: - /* ext4_journal_release_buffer(handle, iloc.bh); */ + //ext4_journal_release_buffer(handle, iloc.bh); brelse(iloc.bh); exit_dindj: - /* ext4_journal_release_buffer(handle, dind); */ + //ext4_journal_release_buffer(handle, dind); exit_primary: - /* ext4_journal_release_buffer(handle, *primary); */ + //ext4_journal_release_buffer(handle, *primary); exit_sbh: - /* ext4_journal_release_buffer(handle, *primary); */ + //ext4_journal_release_buffer(handle, *primary); exit_dind: brelse(dind); exit_bh: @@ -818,12 +818,12 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) if ((err = ext4_journal_get_write_access(handle, sbi->s_sbh))) goto exit_journal; - /* - * We will only either add reserved group blocks to a backup group - * or remove reserved blocks for the first group in a new group block. - * Doing both would be mean more complex code, and sane people don't - * use non-sparse filesystems anymore. This is already checked above. - */ + /* + * We will only either add reserved group blocks to a backup group + * or remove reserved blocks for the first group in a new group block. + * Doing both would be mean more complex code, and sane people don't + * use non-sparse filesystems anymore. This is already checked above. + */ if (gdb_off) { primary = sbi->s_group_desc[gdb_num]; if ((err = ext4_journal_get_write_access(handle, primary))) @@ -835,24 +835,24 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) } else if ((err = add_new_gdb(handle, inode, input, &primary))) goto exit_journal; - /* - * OK, now we've set up the new group. Time to make it active. - * - * Current kernels don't lock all allocations via lock_super(), - * so we have to be safe wrt. concurrent accesses the group - * data. So we need to be careful to set all of the relevant - * group descriptor data etc. *before* we enable the group. - * - * The key field here is sbi->s_groups_count: as long as - * that retains its old value, nobody is going to access the new - * group. - * - * So first we update all the descriptor metadata for the new - * group; then we update the total disk blocks count; then we - * update the groups count to enable the group; then finally we - * update the free space counts so that the system can start - * using the new disk blocks. - */ + /* + * OK, now we've set up the new group. Time to make it active. + * + * Current kernels don't lock all allocations via lock_super(), + * so we have to be safe wrt. concurrent accesses the group + * data. So we need to be careful to set all of the relevant + * group descriptor data etc. *before* we enable the group. + * + * The key field here is sbi->s_groups_count: as long as + * that retains its old value, nobody is going to access the new + * group. + * + * So first we update all the descriptor metadata for the new + * group; then we update the total disk blocks count; then we + * update the groups count to enable the group; then finally we + * update the free space counts so that the system can start + * using the new disk blocks. + */ /* Update group descriptor block for new group */ gdp = (struct ext4_group_desc *)((char *)primary->b_data + @@ -946,8 +946,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) return err; } /* ext4_group_add */ -/* - * Extend the filesystem to the new number of blocks specified. This entry +/* Extend the filesystem to the new number of blocks specified. This entry * point is only used to extend the current filesystem to the end of the last * existing group. It can be accessed via ioctl, or by "remount,resize=" * for emergencies (because it has no dependencies on reserved blocks). @@ -1025,7 +1024,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, o_blocks_count + add, add); /* See if the device is actually as big as what was requested */ - bh = sb_bread(sb, o_blocks_count + add - 1); + bh = sb_bread(sb, o_blocks_count + add -1); if (!bh) { ext4_warning(sb, __func__, "can't read last block, resize aborted"); diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index d5d77958b861..1e69f29a8c55 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -49,19 +49,20 @@ static int ext4_load_journal(struct super_block *, struct ext4_super_block *, unsigned long journal_devnum); static int ext4_create_journal(struct super_block *, struct ext4_super_block *, unsigned int); -static void ext4_commit_super(struct super_block *sb, - struct ext4_super_block *es, int sync); -static void ext4_mark_recovery_complete(struct super_block *sb, - struct ext4_super_block *es); -static void ext4_clear_journal_err(struct super_block *sb, - struct ext4_super_block *es); +static void ext4_commit_super (struct super_block * sb, + struct ext4_super_block * es, + int sync); +static void ext4_mark_recovery_complete(struct super_block * sb, + struct ext4_super_block * es); +static void ext4_clear_journal_err(struct super_block * sb, + struct ext4_super_block * es); static int ext4_sync_fs(struct super_block *sb, int wait); -static const char *ext4_decode_error(struct super_block *sb, int errno, +static const char *ext4_decode_error(struct super_block * sb, int errno, char nbuf[16]); -static int ext4_remount(struct super_block *sb, int *flags, char *data); -static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf); +static int ext4_remount (struct super_block * sb, int * flags, char * data); +static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf); static void ext4_unlockfs(struct super_block *sb); -static void ext4_write_super(struct super_block *sb); +static void ext4_write_super (struct super_block * sb); static void ext4_write_super_lockfs(struct super_block *sb); @@ -210,15 +211,15 @@ static void ext4_handle_error(struct super_block *sb) if (sb->s_flags & MS_RDONLY) return; - if (!test_opt(sb, ERRORS_CONT)) { + if (!test_opt (sb, ERRORS_CONT)) { journal_t *journal = EXT4_SB(sb)->s_journal; EXT4_SB(sb)->s_mount_opt |= EXT4_MOUNT_ABORT; if (journal) jbd2_journal_abort(journal, -EIO); } - if (test_opt(sb, ERRORS_RO)) { - printk(KERN_CRIT "Remounting filesystem read-only\n"); + if (test_opt (sb, ERRORS_RO)) { + printk (KERN_CRIT "Remounting filesystem read-only\n"); sb->s_flags |= MS_RDONLY; } ext4_commit_super(sb, es, 1); @@ -227,13 +228,13 @@ static void ext4_handle_error(struct super_block *sb) sb->s_id); } -void ext4_error(struct super_block *sb, const char *function, - const char *fmt, ...) +void ext4_error (struct super_block * sb, const char * function, + const char * fmt, ...) { va_list args; va_start(args, fmt); - printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function); + printk(KERN_CRIT "EXT4-fs error (device %s): %s: ",sb->s_id, function); vprintk(fmt, args); printk("\n"); va_end(args); @@ -241,7 +242,7 @@ void ext4_error(struct super_block *sb, const char *function, ext4_handle_error(sb); } -static const char *ext4_decode_error(struct super_block *sb, int errno, +static const char *ext4_decode_error(struct super_block * sb, int errno, char nbuf[16]) { char *errstr = NULL; @@ -277,7 +278,8 @@ static const char *ext4_decode_error(struct super_block *sb, int errno, /* __ext4_std_error decodes expected errors from journaling functions * automatically and invokes the appropriate error response. */ -void __ext4_std_error(struct super_block *sb, const char *function, int errno) +void __ext4_std_error (struct super_block * sb, const char * function, + int errno) { char nbuf[16]; const char *errstr; @@ -290,8 +292,8 @@ void __ext4_std_error(struct super_block *sb, const char *function, int errno) return; errstr = ext4_decode_error(sb, errno, nbuf); - printk(KERN_CRIT "EXT4-fs error (device %s) in %s: %s\n", - sb->s_id, function, errstr); + printk (KERN_CRIT "EXT4-fs error (device %s) in %s: %s\n", + sb->s_id, function, errstr); ext4_handle_error(sb); } @@ -306,15 +308,15 @@ void __ext4_std_error(struct super_block *sb, const char *function, int errno) * case we take the easy way out and panic immediately. */ -void ext4_abort(struct super_block *sb, const char *function, - const char *fmt, ...) +void ext4_abort (struct super_block * sb, const char * function, + const char * fmt, ...) { va_list args; - printk(KERN_CRIT "ext4_abort called.\n"); + printk (KERN_CRIT "ext4_abort called.\n"); va_start(args, fmt); - printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function); + printk(KERN_CRIT "EXT4-fs error (device %s): %s: ",sb->s_id, function); vprintk(fmt, args); printk("\n"); va_end(args); @@ -332,8 +334,8 @@ void ext4_abort(struct super_block *sb, const char *function, jbd2_journal_abort(EXT4_SB(sb)->s_journal, -EIO); } -void ext4_warning(struct super_block *sb, const char *function, - const char *fmt, ...) +void ext4_warning (struct super_block * sb, const char * function, + const char * fmt, ...) { va_list args; @@ -494,7 +496,7 @@ static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi) } } -static void ext4_put_super(struct super_block *sb) +static void ext4_put_super (struct super_block * sb) { struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_super_block *es = sbi->s_es; @@ -645,8 +647,7 @@ static void ext4_clear_inode(struct inode *inode) &EXT4_I(inode)->jinode); } -static inline void ext4_show_quota_options(struct seq_file *seq, - struct super_block *sb) +static inline void ext4_show_quota_options(struct seq_file *seq, struct super_block *sb) { #if defined(CONFIG_QUOTA) struct ext4_sb_info *sbi = EXT4_SB(sb); @@ -821,8 +822,8 @@ static struct dentry *ext4_fh_to_parent(struct super_block *sb, struct fid *fid, } #ifdef CONFIG_QUOTA -#define QTYPE2NAME(t) ((t) == USRQUOTA?"user":"group") -#define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) +#define QTYPE2NAME(t) ((t)==USRQUOTA?"user":"group") +#define QTYPE2MOPT(on, t) ((t)==USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) static int ext4_dquot_initialize(struct inode *inode, int type); static int ext4_dquot_drop(struct inode *inode); @@ -990,12 +991,12 @@ static ext4_fsblk_t get_sb_block(void **data) return sb_block; } -static int parse_options(char *options, struct super_block *sb, - unsigned int *inum, unsigned long *journal_devnum, - ext4_fsblk_t *n_blocks_count, int is_remount) +static int parse_options (char *options, struct super_block *sb, + unsigned int *inum, unsigned long *journal_devnum, + ext4_fsblk_t *n_blocks_count, int is_remount) { struct ext4_sb_info *sbi = EXT4_SB(sb); - char *p; + char * p; substring_t args[MAX_OPT_ARGS]; int data_opt = 0; int option; @@ -1008,7 +1009,7 @@ static int parse_options(char *options, struct super_block *sb, if (!options) return 1; - while ((p = strsep(&options, ",")) != NULL) { + while ((p = strsep (&options, ",")) != NULL) { int token; if (!*p) continue; @@ -1016,16 +1017,16 @@ static int parse_options(char *options, struct super_block *sb, token = match_token(p, tokens, args); switch (token) { case Opt_bsd_df: - clear_opt(sbi->s_mount_opt, MINIX_DF); + clear_opt (sbi->s_mount_opt, MINIX_DF); break; case Opt_minix_df: - set_opt(sbi->s_mount_opt, MINIX_DF); + set_opt (sbi->s_mount_opt, MINIX_DF); break; case Opt_grpid: - set_opt(sbi->s_mount_opt, GRPID); + set_opt (sbi->s_mount_opt, GRPID); break; case Opt_nogrpid: - clear_opt(sbi->s_mount_opt, GRPID); + clear_opt (sbi->s_mount_opt, GRPID); break; case Opt_resuid: if (match_int(&args[0], &option)) @@ -1042,41 +1043,41 @@ static int parse_options(char *options, struct super_block *sb, /* *sb_block = match_int(&args[0]); */ break; case Opt_err_panic: - clear_opt(sbi->s_mount_opt, ERRORS_CONT); - clear_opt(sbi->s_mount_opt, ERRORS_RO); - set_opt(sbi->s_mount_opt, ERRORS_PANIC); + clear_opt (sbi->s_mount_opt, ERRORS_CONT); + clear_opt (sbi->s_mount_opt, ERRORS_RO); + set_opt (sbi->s_mount_opt, ERRORS_PANIC); break; case Opt_err_ro: - clear_opt(sbi->s_mount_opt, ERRORS_CONT); - clear_opt(sbi->s_mount_opt, ERRORS_PANIC); - set_opt(sbi->s_mount_opt, ERRORS_RO); + clear_opt (sbi->s_mount_opt, ERRORS_CONT); + clear_opt (sbi->s_mount_opt, ERRORS_PANIC); + set_opt (sbi->s_mount_opt, ERRORS_RO); break; case Opt_err_cont: - clear_opt(sbi->s_mount_opt, ERRORS_RO); - clear_opt(sbi->s_mount_opt, ERRORS_PANIC); - set_opt(sbi->s_mount_opt, ERRORS_CONT); + clear_opt (sbi->s_mount_opt, ERRORS_RO); + clear_opt (sbi->s_mount_opt, ERRORS_PANIC); + set_opt (sbi->s_mount_opt, ERRORS_CONT); break; case Opt_nouid32: - set_opt(sbi->s_mount_opt, NO_UID32); + set_opt (sbi->s_mount_opt, NO_UID32); break; case Opt_nocheck: - clear_opt(sbi->s_mount_opt, CHECK); + clear_opt (sbi->s_mount_opt, CHECK); break; case Opt_debug: - set_opt(sbi->s_mount_opt, DEBUG); + set_opt (sbi->s_mount_opt, DEBUG); break; case Opt_oldalloc: - set_opt(sbi->s_mount_opt, OLDALLOC); + set_opt (sbi->s_mount_opt, OLDALLOC); break; case Opt_orlov: - clear_opt(sbi->s_mount_opt, OLDALLOC); + clear_opt (sbi->s_mount_opt, OLDALLOC); break; #ifdef CONFIG_EXT4DEV_FS_XATTR case Opt_user_xattr: - set_opt(sbi->s_mount_opt, XATTR_USER); + set_opt (sbi->s_mount_opt, XATTR_USER); break; case Opt_nouser_xattr: - clear_opt(sbi->s_mount_opt, XATTR_USER); + clear_opt (sbi->s_mount_opt, XATTR_USER); break; #else case Opt_user_xattr: @@ -1114,7 +1115,7 @@ static int parse_options(char *options, struct super_block *sb, "journal on remount\n"); return 0; } - set_opt(sbi->s_mount_opt, UPDATE_JOURNAL); + set_opt (sbi->s_mount_opt, UPDATE_JOURNAL); break; case Opt_journal_inum: if (is_remount) { @@ -1144,7 +1145,7 @@ static int parse_options(char *options, struct super_block *sb, set_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM); break; case Opt_noload: - set_opt(sbi->s_mount_opt, NOLOAD); + set_opt (sbi->s_mount_opt, NOLOAD); break; case Opt_commit: if (match_int(&args[0], &option)) @@ -1330,7 +1331,7 @@ static int parse_options(char *options, struct super_block *sb, "on this filesystem, use tune2fs\n"); return 0; } - set_opt(sbi->s_mount_opt, EXTENTS); + set_opt (sbi->s_mount_opt, EXTENTS); break; case Opt_noextents: /* @@ -1347,7 +1348,7 @@ static int parse_options(char *options, struct super_block *sb, "-o noextents options\n"); return 0; } - clear_opt(sbi->s_mount_opt, EXTENTS); + clear_opt (sbi->s_mount_opt, EXTENTS); break; case Opt_i_version: set_opt(sbi->s_mount_opt, I_VERSION); @@ -1373,9 +1374,9 @@ static int parse_options(char *options, struct super_block *sb, set_opt(sbi->s_mount_opt, DELALLOC); break; default: - printk(KERN_ERR - "EXT4-fs: Unrecognized mount option \"%s\" " - "or missing value\n", p); + printk (KERN_ERR + "EXT4-fs: Unrecognized mount option \"%s\" " + "or missing value\n", p); return 0; } } @@ -1422,31 +1423,31 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, int res = 0; if (le32_to_cpu(es->s_rev_level) > EXT4_MAX_SUPP_REV) { - printk(KERN_ERR "EXT4-fs warning: revision level too high, " - "forcing read-only mode\n"); + printk (KERN_ERR "EXT4-fs warning: revision level too high, " + "forcing read-only mode\n"); res = MS_RDONLY; } if (read_only) return res; if (!(sbi->s_mount_state & EXT4_VALID_FS)) - printk(KERN_WARNING "EXT4-fs warning: mounting unchecked fs, " - "running e2fsck is recommended\n"); + printk (KERN_WARNING "EXT4-fs warning: mounting unchecked fs, " + "running e2fsck is recommended\n"); else if ((sbi->s_mount_state & EXT4_ERROR_FS)) - printk(KERN_WARNING - "EXT4-fs warning: mounting fs with errors, " - "running e2fsck is recommended\n"); + printk (KERN_WARNING + "EXT4-fs warning: mounting fs with errors, " + "running e2fsck is recommended\n"); else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 && le16_to_cpu(es->s_mnt_count) >= (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) - printk(KERN_WARNING - "EXT4-fs warning: maximal mount count reached, " - "running e2fsck is recommended\n"); + printk (KERN_WARNING + "EXT4-fs warning: maximal mount count reached, " + "running e2fsck is recommended\n"); else if (le32_to_cpu(es->s_checkinterval) && (le32_to_cpu(es->s_lastcheck) + le32_to_cpu(es->s_checkinterval) <= get_seconds())) - printk(KERN_WARNING - "EXT4-fs warning: checktime reached, " - "running e2fsck is recommended\n"); + printk (KERN_WARNING + "EXT4-fs warning: checktime reached, " + "running e2fsck is recommended\n"); #if 0 /* @@@ We _will_ want to clear the valid bit if we find * inconsistencies, to force a fsck at reboot. But for @@ -1505,13 +1506,14 @@ static int ext4_fill_flex_info(struct super_block *sb) flex_group_count = (sbi->s_groups_count + groups_per_flex - 1) / groups_per_flex; - sbi->s_flex_groups = kzalloc(flex_group_count * + sbi->s_flex_groups = kmalloc(flex_group_count * sizeof(struct flex_groups), GFP_KERNEL); if (sbi->s_flex_groups == NULL) { - printk(KERN_ERR "EXT4-fs: not enough memory for " - "%lu flex groups\n", flex_group_count); + printk(KERN_ERR "EXT4-fs: not enough memory\n"); goto failed; } + memset(sbi->s_flex_groups, 0, flex_group_count * + sizeof(struct flex_groups)); gdp = ext4_get_group_desc(sb, 1, &bh); block_bitmap = ext4_block_bitmap(sb, gdp) - 1; @@ -1595,14 +1597,16 @@ static int ext4_check_descriptors(struct super_block *sb) (EXT4_BLOCKS_PER_GROUP(sb) - 1); block_bitmap = ext4_block_bitmap(sb, gdp); - if (block_bitmap < first_block || block_bitmap > last_block) { + if (block_bitmap < first_block || block_bitmap > last_block) + { printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " "Block bitmap for group %lu not in group " "(block %llu)!", i, block_bitmap); return 0; } inode_bitmap = ext4_inode_bitmap(sb, gdp); - if (inode_bitmap < first_block || inode_bitmap > last_block) { + if (inode_bitmap < first_block || inode_bitmap > last_block) + { printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " "Inode bitmap for group %lu not in group " "(block %llu)!", i, inode_bitmap); @@ -1610,28 +1614,26 @@ static int ext4_check_descriptors(struct super_block *sb) } inode_table = ext4_inode_table(sb, gdp); if (inode_table < first_block || - inode_table + sbi->s_itb_per_group - 1 > last_block) { + inode_table + sbi->s_itb_per_group - 1 > last_block) + { printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " "Inode table for group %lu not in group " "(block %llu)!", i, inode_table); return 0; } - spin_lock(sb_bgl_lock(sbi, i)); if (!ext4_group_desc_csum_verify(sbi, i, gdp)) { printk(KERN_ERR "EXT4-fs: ext4_check_descriptors: " "Checksum for group %lu failed (%u!=%u)\n", i, le16_to_cpu(ext4_group_desc_csum(sbi, i, gdp)), le16_to_cpu(gdp->bg_checksum)); - if (!(sb->s_flags & MS_RDONLY)) - return 0; + return 0; } - spin_unlock(sb_bgl_lock(sbi, i)); if (!flexbg_flag) first_block += EXT4_BLOCKS_PER_GROUP(sb); } ext4_free_blocks_count_set(sbi->s_es, ext4_count_free_blocks(sb)); - sbi->s_es->s_free_inodes_count = cpu_to_le32(ext4_count_free_inodes(sb)); + sbi->s_es->s_free_inodes_count=cpu_to_le32(ext4_count_free_inodes(sb)); return 1; } @@ -1652,8 +1654,8 @@ static int ext4_check_descriptors(struct super_block *sb) * e2fsck was run on this filesystem, and it must have already done the orphan * inode cleanup for us, so we can safely abort without any further action. */ -static void ext4_orphan_cleanup(struct super_block *sb, - struct ext4_super_block *es) +static void ext4_orphan_cleanup (struct super_block * sb, + struct ext4_super_block * es) { unsigned int s_flags = sb->s_flags; int nr_orphans = 0, nr_truncates = 0; @@ -1730,7 +1732,7 @@ static void ext4_orphan_cleanup(struct super_block *sb, iput(inode); /* The delete magic happens here! */ } -#define PLURAL(x) (x), ((x) == 1) ? "" : "s" +#define PLURAL(x) (x), ((x)==1) ? "" : "s" if (nr_orphans) printk(KERN_INFO "EXT4-fs: %s: %d orphan inode%s deleted\n", @@ -1897,12 +1899,12 @@ static unsigned long ext4_get_stripe_size(struct ext4_sb_info *sbi) return 0; } -static int ext4_fill_super(struct super_block *sb, void *data, int silent) +static int ext4_fill_super (struct super_block *sb, void *data, int silent) __releases(kernel_lock) __acquires(kernel_lock) { - struct buffer_head *bh; + struct buffer_head * bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi; ext4_fsblk_t block; @@ -1951,7 +1953,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) } if (!(bh = sb_bread(sb, logical_sb_block))) { - printk(KERN_ERR "EXT4-fs: unable to read superblock\n"); + printk (KERN_ERR "EXT4-fs: unable to read superblock\n"); goto out_fail; } /* @@ -2024,8 +2026,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) set_opt(sbi->s_mount_opt, DELALLOC); - if (!parse_options((char *) data, sb, &journal_inum, &journal_devnum, - NULL, 0)) + if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, + NULL, 0)) goto failed_mount; sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | @@ -2100,7 +2102,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) goto failed_mount; } - brelse(bh); + brelse (bh); logical_sb_block = sb_block * EXT4_MIN_BLOCK_SIZE; offset = do_div(logical_sb_block, blocksize); bh = sb_bread(sb, logical_sb_block); @@ -2112,8 +2114,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) es = (struct ext4_super_block *)(((char *)bh->b_data) + offset); sbi->s_es = es; if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { - printk(KERN_ERR - "EXT4-fs: Magic mismatch, very weird !\n"); + printk (KERN_ERR + "EXT4-fs: Magic mismatch, very weird !\n"); goto failed_mount; } } @@ -2130,9 +2132,9 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) || (!is_power_of_2(sbi->s_inode_size)) || (sbi->s_inode_size > blocksize)) { - printk(KERN_ERR - "EXT4-fs: unsupported inode size: %d\n", - sbi->s_inode_size); + printk (KERN_ERR + "EXT4-fs: unsupported inode size: %d\n", + sbi->s_inode_size); goto failed_mount; } if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) @@ -2164,20 +2166,20 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) sbi->s_mount_state = le16_to_cpu(es->s_state); sbi->s_addr_per_block_bits = ilog2(EXT4_ADDR_PER_BLOCK(sb)); sbi->s_desc_per_block_bits = ilog2(EXT4_DESC_PER_BLOCK(sb)); - for (i = 0; i < 4; i++) + for (i=0; i < 4; i++) sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]); sbi->s_def_hash_version = es->s_def_hash_version; if (sbi->s_blocks_per_group > blocksize * 8) { - printk(KERN_ERR - "EXT4-fs: #blocks per group too big: %lu\n", - sbi->s_blocks_per_group); + printk (KERN_ERR + "EXT4-fs: #blocks per group too big: %lu\n", + sbi->s_blocks_per_group); goto failed_mount; } if (sbi->s_inodes_per_group > blocksize * 8) { - printk(KERN_ERR - "EXT4-fs: #inodes per group too big: %lu\n", - sbi->s_inodes_per_group); + printk (KERN_ERR + "EXT4-fs: #inodes per group too big: %lu\n", + sbi->s_inodes_per_group); goto failed_mount; } @@ -2211,10 +2213,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) sbi->s_groups_count = blocks_count; db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) / EXT4_DESC_PER_BLOCK(sb); - sbi->s_group_desc = kmalloc(db_count * sizeof(struct buffer_head *), + sbi->s_group_desc = kmalloc(db_count * sizeof (struct buffer_head *), GFP_KERNEL); if (sbi->s_group_desc == NULL) { - printk(KERN_ERR "EXT4-fs: not enough memory\n"); + printk (KERN_ERR "EXT4-fs: not enough memory\n"); goto failed_mount; } @@ -2224,13 +2226,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) block = descriptor_loc(sb, logical_sb_block, i); sbi->s_group_desc[i] = sb_bread(sb, block); if (!sbi->s_group_desc[i]) { - printk(KERN_ERR "EXT4-fs: " - "can't read group descriptor %d\n", i); + printk (KERN_ERR "EXT4-fs: " + "can't read group descriptor %d\n", i); db_count = i; goto failed_mount2; } } - if (!ext4_check_descriptors(sb)) { + if (!ext4_check_descriptors (sb)) { printk(KERN_ERR "EXT4-fs: group descriptors corrupted!\n"); goto failed_mount2; } @@ -2306,11 +2308,11 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) EXT4_SB(sb)->s_journal->j_failed_commit) { printk(KERN_CRIT "EXT4-fs error (device %s): " "ext4_fill_super: Journal transaction " - "%u is corrupt\n", sb->s_id, + "%u is corrupt\n", sb->s_id, EXT4_SB(sb)->s_journal->j_failed_commit); - if (test_opt(sb, ERRORS_RO)) { - printk(KERN_CRIT - "Mounting filesystem read-only\n"); + if (test_opt (sb, ERRORS_RO)) { + printk (KERN_CRIT + "Mounting filesystem read-only\n"); sb->s_flags |= MS_RDONLY; EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; es->s_state |= cpu_to_le16(EXT4_ERROR_FS); @@ -2330,9 +2332,9 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) goto failed_mount3; } else { if (!silent) - printk(KERN_ERR - "ext4: No journal on filesystem on %s\n", - sb->s_id); + printk (KERN_ERR + "ext4: No journal on filesystem on %s\n", + sb->s_id); goto failed_mount3; } @@ -2416,7 +2418,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) goto failed_mount4; } - ext4_setup_super(sb, es, sb->s_flags & MS_RDONLY); + ext4_setup_super (sb, es, sb->s_flags & MS_RDONLY); /* determine the minimum size of new large inodes, if present */ if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) { @@ -2455,12 +2457,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) ext4_orphan_cleanup(sb, es); EXT4_SB(sb)->s_mount_state &= ~EXT4_ORPHAN_FS; if (needs_recovery) - printk(KERN_INFO "EXT4-fs: recovery complete.\n"); + printk (KERN_INFO "EXT4-fs: recovery complete.\n"); ext4_mark_recovery_complete(sb, es); - printk(KERN_INFO "EXT4-fs: mounted filesystem with %s data mode.\n", - test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ? "journal": - test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered": - "writeback"); + printk (KERN_INFO "EXT4-fs: mounted filesystem with %s data mode.\n", + test_opt(sb,DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ? "journal": + test_opt(sb,DATA_FLAGS) == EXT4_MOUNT_ORDERED_DATA ? "ordered": + "writeback"); if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { printk(KERN_WARNING "EXT4-fs: Ignoring delalloc option - " @@ -2573,14 +2575,14 @@ static journal_t *ext4_get_journal(struct super_block *sb, static journal_t *ext4_get_dev_journal(struct super_block *sb, dev_t j_dev) { - struct buffer_head *bh; + struct buffer_head * bh; journal_t *journal; ext4_fsblk_t start; ext4_fsblk_t len; int hblock, blocksize; ext4_fsblk_t sb_block; unsigned long offset; - struct ext4_super_block *es; + struct ext4_super_block * es; struct block_device *bdev; bdev = ext4_blkdev_get(j_dev); @@ -2695,8 +2697,8 @@ static int ext4_load_journal(struct super_block *sb, "unavailable, cannot proceed.\n"); return -EROFS; } - printk(KERN_INFO "EXT4-fs: write access will " - "be enabled during recovery.\n"); + printk (KERN_INFO "EXT4-fs: write access will " + "be enabled during recovery.\n"); } } @@ -2749,8 +2751,8 @@ static int ext4_load_journal(struct super_block *sb, return 0; } -static int ext4_create_journal(struct super_block *sb, - struct ext4_super_block *es, +static int ext4_create_journal(struct super_block * sb, + struct ext4_super_block * es, unsigned int journal_inum) { journal_t *journal; @@ -2791,8 +2793,9 @@ static int ext4_create_journal(struct super_block *sb, return 0; } -static void ext4_commit_super(struct super_block *sb, - struct ext4_super_block *es, int sync) +static void ext4_commit_super (struct super_block * sb, + struct ext4_super_block * es, + int sync) { struct buffer_head *sbh = EXT4_SB(sb)->s_sbh; @@ -2813,8 +2816,8 @@ static void ext4_commit_super(struct super_block *sb, * remounting) the filesystem readonly, then we will end up with a * consistent fs on disk. Record that fact. */ -static void ext4_mark_recovery_complete(struct super_block *sb, - struct ext4_super_block *es) +static void ext4_mark_recovery_complete(struct super_block * sb, + struct ext4_super_block * es) { journal_t *journal = EXT4_SB(sb)->s_journal; @@ -2836,8 +2839,8 @@ static void ext4_mark_recovery_complete(struct super_block *sb, * has recorded an error from a previous lifetime, move that error to the * main filesystem now. */ -static void ext4_clear_journal_err(struct super_block *sb, - struct ext4_super_block *es) +static void ext4_clear_journal_err(struct super_block * sb, + struct ext4_super_block * es) { journal_t *journal; int j_errno; @@ -2862,7 +2865,7 @@ static void ext4_clear_journal_err(struct super_block *sb, EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; es->s_state |= cpu_to_le16(EXT4_ERROR_FS); - ext4_commit_super(sb, es, 1); + ext4_commit_super (sb, es, 1); jbd2_journal_clear_err(journal); } @@ -2895,7 +2898,7 @@ int ext4_force_commit(struct super_block *sb) * This implicitly triggers the writebehind on sync(). */ -static void ext4_write_super(struct super_block *sb) +static void ext4_write_super (struct super_block * sb) { if (mutex_trylock(&sb->s_lock) != 0) BUG(); @@ -2951,14 +2954,13 @@ static void ext4_unlockfs(struct super_block *sb) } } -static int ext4_remount(struct super_block *sb, int *flags, char *data) +static int ext4_remount (struct super_block * sb, int * flags, char * data) { - struct ext4_super_block *es; + struct ext4_super_block * es; struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_fsblk_t n_blocks_count = 0; unsigned long old_sb_flags; struct ext4_mount_options old_opts; - ext4_group_t g; int err; #ifdef CONFIG_QUOTA int i; @@ -3036,26 +3038,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) goto restore_opts; } - /* - * Make sure the group descriptor checksums - * are sane. If they aren't, refuse to - * remount r/w. - */ - for (g = 0; g < sbi->s_groups_count; g++) { - struct ext4_group_desc *gdp = - ext4_get_group_desc(sb, g, NULL); - - if (!ext4_group_desc_csum_verify(sbi, g, gdp)) { - printk(KERN_ERR - "EXT4-fs: ext4_remount: " - "Checksum for group %lu failed (%u!=%u)\n", - g, le16_to_cpu(ext4_group_desc_csum(sbi, g, gdp)), - le16_to_cpu(gdp->bg_checksum)); - err = -EINVAL; - goto restore_opts; - } - } - /* * If we have an unprocessed orphan list hanging * around from a previously readonly bdev mount, @@ -3081,7 +3063,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) sbi->s_mount_state = le16_to_cpu(es->s_state); if ((err = ext4_group_extend(sb, es, n_blocks_count))) goto restore_opts; - if (!ext4_setup_super(sb, es, 0)) + if (!ext4_setup_super (sb, es, 0)) sb->s_flags &= ~MS_RDONLY; } } @@ -3111,7 +3093,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) return err; } -static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf) +static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf) { struct super_block *sb = dentry->d_sb; struct ext4_sb_info *sbi = EXT4_SB(sb); @@ -3349,12 +3331,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id, } /* Journaling quota? */ if (EXT4_SB(sb)->s_qf_names[type]) { - /* Quotafile not in fs root? */ + /* Quotafile not of fs root? */ if (nd.path.dentry->d_parent->d_inode != sb->s_root->d_inode) printk(KERN_WARNING "EXT4-fs: Quota file not on filesystem root. " "Journaled quota will not work.\n"); - } + } /* * When we journal data on quota file, we have to flush journal to see diff --git a/trunk/fs/ext4/xattr.c b/trunk/fs/ext4/xattr.c index 8954208b4893..93c5fdcdad2e 100644 --- a/trunk/fs/ext4/xattr.c +++ b/trunk/fs/ext4/xattr.c @@ -1512,7 +1512,7 @@ static inline void ext4_xattr_hash_entry(struct ext4_xattr_header *header, char *name = entry->e_name; int n; - for (n = 0; n < entry->e_name_len; n++) { + for (n=0; n < entry->e_name_len; n++) { hash = (hash << NAME_HASH_SHIFT) ^ (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ *name++; diff --git a/trunk/fs/fat/file.c b/trunk/fs/fat/file.c index ddde37025ca6..8707a8cfa02c 100644 --- a/trunk/fs/fat/file.c +++ b/trunk/fs/fat/file.c @@ -313,8 +313,6 @@ static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode) return 0; } -#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) - int fat_setattr(struct dentry *dentry, struct iattr *attr) { struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); @@ -338,9 +336,9 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) /* Check for setting the inode time. */ ia_valid = attr->ia_valid; - if (ia_valid & TIMES_SET_FLAGS) { + if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { if (fat_allow_set_time(sbi, inode)) - attr->ia_valid &= ~TIMES_SET_FLAGS; + attr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET); } error = inode_change_ok(inode, attr); diff --git a/trunk/fs/jbd2/commit.c b/trunk/fs/jbd2/commit.c index adf0395f318e..f8b3be873226 100644 --- a/trunk/fs/jbd2/commit.c +++ b/trunk/fs/jbd2/commit.c @@ -262,18 +262,8 @@ static int journal_finish_inode_data_buffers(journal_t *journal, jinode->i_flags |= JI_COMMIT_RUNNING; spin_unlock(&journal->j_list_lock); err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping); - if (err) { - /* - * Because AS_EIO is cleared by - * wait_on_page_writeback_range(), set it again so - * that user process can get -EIO from fsync(). - */ - set_bit(AS_EIO, - &jinode->i_vfs_inode->i_mapping->flags); - - if (!ret) - ret = err; - } + if (!ret) + ret = err; spin_lock(&journal->j_list_lock); jinode->i_flags &= ~JI_COMMIT_RUNNING; wake_up_bit(&jinode->i_flags, __JI_COMMIT_RUNNING); @@ -680,14 +670,8 @@ void jbd2_journal_commit_transaction(journal_t *journal) * commit block, which happens below in such setting. */ err = journal_finish_inode_data_buffers(journal, commit_transaction); - if (err) { - char b[BDEVNAME_SIZE]; - - printk(KERN_WARNING - "JBD2: Detected IO errors while flushing file data " - "on %s\n", bdevname(journal->j_fs_dev, b)); - err = 0; - } + if (err) + jbd2_journal_abort(journal, err); /* Lo and behold: we have just managed to send a transaction to the log. Before we can commit it, wait for the IO so far to diff --git a/trunk/fs/jbd2/journal.c b/trunk/fs/jbd2/journal.c index 8207a01c4edb..b26c6d9fe6ae 100644 --- a/trunk/fs/jbd2/journal.c +++ b/trunk/fs/jbd2/journal.c @@ -68,6 +68,7 @@ EXPORT_SYMBOL(jbd2_journal_set_features); EXPORT_SYMBOL(jbd2_journal_create); EXPORT_SYMBOL(jbd2_journal_load); EXPORT_SYMBOL(jbd2_journal_destroy); +EXPORT_SYMBOL(jbd2_journal_update_superblock); EXPORT_SYMBOL(jbd2_journal_abort); EXPORT_SYMBOL(jbd2_journal_errno); EXPORT_SYMBOL(jbd2_journal_ack_err); diff --git a/trunk/fs/nfs/nfsroot.c b/trunk/fs/nfs/nfsroot.c index 46763d1cd397..8478fc25daee 100644 --- a/trunk/fs/nfs/nfsroot.c +++ b/trunk/fs/nfs/nfsroot.c @@ -127,7 +127,7 @@ enum { Opt_err }; -static match_table_t __initdata tokens = { +static match_table_t __initconst tokens = { {Opt_port, "port=%u"}, {Opt_rsize, "rsize=%u"}, {Opt_wsize, "wsize=%u"}, diff --git a/trunk/fs/ufs/super.c b/trunk/fs/ufs/super.c index 3141969b456d..3e30e40aa24d 100644 --- a/trunk/fs/ufs/super.c +++ b/trunk/fs/ufs/super.c @@ -1233,7 +1233,7 @@ static int ufs_show_options(struct seq_file *seq, struct vfsmount *vfs) { struct ufs_sb_info *sbi = UFS_SB(vfs->mnt_sb); unsigned mval = sbi->s_mount_opt & UFS_MOUNT_UFSTYPE; - struct match_token *tp = tokens; + const struct match_token *tp = tokens; while (tp->token != Opt_onerror_panic && tp->token != mval) ++tp; diff --git a/trunk/arch/arm/include/asm/Kbuild b/trunk/include/asm-arm/Kbuild similarity index 100% rename from trunk/arch/arm/include/asm/Kbuild rename to trunk/include/asm-arm/Kbuild diff --git a/trunk/arch/arm/include/asm/a.out-core.h b/trunk/include/asm-arm/a.out-core.h similarity index 100% rename from trunk/arch/arm/include/asm/a.out-core.h rename to trunk/include/asm-arm/a.out-core.h diff --git a/trunk/arch/arm/include/asm/a.out.h b/trunk/include/asm-arm/a.out.h similarity index 100% rename from trunk/arch/arm/include/asm/a.out.h rename to trunk/include/asm-arm/a.out.h diff --git a/trunk/include/asm-arm/arch-ns9xxx/debug-macro.S b/trunk/include/asm-arm/arch-ns9xxx/debug-macro.S index 94680950ee67..b21b93eb2dbc 100644 --- a/trunk/include/asm-arm/arch-ns9xxx/debug-macro.S +++ b/trunk/include/asm-arm/arch-ns9xxx/debug-macro.S @@ -9,7 +9,7 @@ */ #include -#include +#include .macro addruart,rx mrc p15, 0, \rx, c1, c0 diff --git a/trunk/include/asm-arm/arch-ns9xxx/entry-macro.S b/trunk/include/asm-arm/arch-ns9xxx/entry-macro.S index 2f6c89ddf958..89a21c530468 100644 --- a/trunk/include/asm-arm/arch-ns9xxx/entry-macro.S +++ b/trunk/include/asm-arm/arch-ns9xxx/entry-macro.S @@ -9,7 +9,7 @@ * the Free Software Foundation. */ #include -#include +#include .macro get_irqnr_preamble, base, tmp ldr \base, =SYS_ISRADDR diff --git a/trunk/include/asm-arm/arch-ns9xxx/processor.h b/trunk/include/asm-arm/arch-ns9xxx/processor.h index 3137e5ba01a9..f7b53b65de81 100644 --- a/trunk/include/asm-arm/arch-ns9xxx/processor.h +++ b/trunk/include/asm-arm/arch-ns9xxx/processor.h @@ -11,7 +11,7 @@ #ifndef __ASM_ARCH_PROCESSOR_H #define __ASM_ARCH_PROCESSOR_H -#include +#include #define processor_is_ns9210() (0 \ || module_is_cc7ucamry() \ diff --git a/trunk/include/asm-arm/arch-ns9xxx/system.h b/trunk/include/asm-arm/arch-ns9xxx/system.h index c2941684d667..1348073afe48 100644 --- a/trunk/include/asm-arm/arch-ns9xxx/system.h +++ b/trunk/include/asm-arm/arch-ns9xxx/system.h @@ -12,8 +12,8 @@ #define __ASM_ARCH_SYSTEM_H #include -#include -#include +#include +#include static inline void arch_idle(void) { diff --git a/trunk/include/asm-arm/arch-omap/board.h b/trunk/include/asm-arm/arch-omap/board.h index 99564c70f128..db44c5d1f1a0 100644 --- a/trunk/include/asm-arm/arch-omap/board.h +++ b/trunk/include/asm-arm/arch-omap/board.h @@ -154,7 +154,7 @@ struct omap_version_config { }; -#include +#include struct omap_board_config_entry { u16 tag; diff --git a/trunk/arch/arm/include/asm/assembler.h b/trunk/include/asm-arm/assembler.h similarity index 98% rename from trunk/arch/arm/include/asm/assembler.h rename to trunk/include/asm-arm/assembler.h index 6116e4893c0a..911393b2c6f0 100644 --- a/trunk/arch/arm/include/asm/assembler.h +++ b/trunk/include/asm-arm/assembler.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/assembler.h + * linux/include/asm-arm/assembler.h * * Copyright (C) 1996-2000 Russell King * diff --git a/trunk/arch/arm/include/asm/atomic.h b/trunk/include/asm-arm/atomic.h similarity index 99% rename from trunk/arch/arm/include/asm/atomic.h rename to trunk/include/asm-arm/atomic.h index 325f881ccb50..3b59f94b5a3d 100644 --- a/trunk/arch/arm/include/asm/atomic.h +++ b/trunk/include/asm-arm/atomic.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/atomic.h + * linux/include/asm-arm/atomic.h * * Copyright (C) 1996 Russell King. * Copyright (C) 2002 Deep Blue Solutions Ltd. diff --git a/trunk/arch/arm/include/asm/auxvec.h b/trunk/include/asm-arm/auxvec.h similarity index 100% rename from trunk/arch/arm/include/asm/auxvec.h rename to trunk/include/asm-arm/auxvec.h diff --git a/trunk/arch/arm/include/asm/bitops.h b/trunk/include/asm-arm/bitops.h similarity index 100% rename from trunk/arch/arm/include/asm/bitops.h rename to trunk/include/asm-arm/bitops.h diff --git a/trunk/arch/arm/include/asm/bug.h b/trunk/include/asm-arm/bug.h similarity index 100% rename from trunk/arch/arm/include/asm/bug.h rename to trunk/include/asm-arm/bug.h diff --git a/trunk/arch/arm/include/asm/bugs.h b/trunk/include/asm-arm/bugs.h similarity index 93% rename from trunk/arch/arm/include/asm/bugs.h rename to trunk/include/asm-arm/bugs.h index a97f1ea708d1..ca54eb0f12d7 100644 --- a/trunk/arch/arm/include/asm/bugs.h +++ b/trunk/include/asm-arm/bugs.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/bugs.h + * linux/include/asm-arm/bugs.h * * Copyright (C) 1995-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/byteorder.h b/trunk/include/asm-arm/byteorder.h similarity index 97% rename from trunk/arch/arm/include/asm/byteorder.h rename to trunk/include/asm-arm/byteorder.h index 4fbfb22f65a0..e6f7fcdc73b0 100644 --- a/trunk/arch/arm/include/asm/byteorder.h +++ b/trunk/include/asm-arm/byteorder.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/byteorder.h + * linux/include/asm-arm/byteorder.h * * ARM Endian-ness. In little endian mode, the data bus is connected such * that byte accesses appear as: diff --git a/trunk/arch/arm/include/asm/cache.h b/trunk/include/asm-arm/cache.h similarity index 80% rename from trunk/arch/arm/include/asm/cache.h rename to trunk/include/asm-arm/cache.h index cb7a9e97fd7e..31332c8ac04e 100644 --- a/trunk/arch/arm/include/asm/cache.h +++ b/trunk/include/asm-arm/cache.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/cache.h + * linux/include/asm-arm/cache.h */ #ifndef __ASMARM_CACHE_H #define __ASMARM_CACHE_H diff --git a/trunk/arch/arm/include/asm/cacheflush.h b/trunk/include/asm-arm/cacheflush.h similarity index 99% rename from trunk/arch/arm/include/asm/cacheflush.h rename to trunk/include/asm-arm/cacheflush.h index 9073d9c6567e..e68a1cbcc852 100644 --- a/trunk/arch/arm/include/asm/cacheflush.h +++ b/trunk/include/asm-arm/cacheflush.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/cacheflush.h + * linux/include/asm-arm/cacheflush.h * * Copyright (C) 1999-2002 Russell King * diff --git a/trunk/arch/arm/include/asm/checksum.h b/trunk/include/asm-arm/checksum.h similarity index 98% rename from trunk/arch/arm/include/asm/checksum.h rename to trunk/include/asm-arm/checksum.h index 6dcc16430868..eaa0efd8d0d4 100644 --- a/trunk/arch/arm/include/asm/checksum.h +++ b/trunk/include/asm-arm/checksum.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/checksum.h + * linux/include/asm-arm/checksum.h * * IP checksum routines * diff --git a/trunk/arch/arm/include/asm/cnt32_to_63.h b/trunk/include/asm-arm/cnt32_to_63.h similarity index 100% rename from trunk/arch/arm/include/asm/cnt32_to_63.h rename to trunk/include/asm-arm/cnt32_to_63.h diff --git a/trunk/arch/arm/include/asm/cpu-multi32.h b/trunk/include/asm-arm/cpu-multi32.h similarity index 97% rename from trunk/arch/arm/include/asm/cpu-multi32.h rename to trunk/include/asm-arm/cpu-multi32.h index e2b5b0b2116a..3479de9266e5 100644 --- a/trunk/arch/arm/include/asm/cpu-multi32.h +++ b/trunk/include/asm-arm/cpu-multi32.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/cpu-multi32.h + * linux/include/asm-arm/cpu-multi32.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/cpu-single.h b/trunk/include/asm-arm/cpu-single.h similarity index 97% rename from trunk/arch/arm/include/asm/cpu-single.h rename to trunk/include/asm-arm/cpu-single.h index f073a6d2a406..0b120ee36091 100644 --- a/trunk/arch/arm/include/asm/cpu-single.h +++ b/trunk/include/asm-arm/cpu-single.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/cpu-single.h + * linux/include/asm-arm/cpu-single.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/cpu.h b/trunk/include/asm-arm/cpu.h similarity index 93% rename from trunk/arch/arm/include/asm/cpu.h rename to trunk/include/asm-arm/cpu.h index 634b2d7c612a..715426b9b08e 100644 --- a/trunk/arch/arm/include/asm/cpu.h +++ b/trunk/include/asm-arm/cpu.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/cpu.h + * linux/include/asm-arm/cpu.h * * Copyright (C) 2004-2005 ARM Ltd. * diff --git a/trunk/arch/arm/include/asm/cputime.h b/trunk/include/asm-arm/cputime.h similarity index 100% rename from trunk/arch/arm/include/asm/cputime.h rename to trunk/include/asm-arm/cputime.h diff --git a/trunk/arch/arm/include/asm/current.h b/trunk/include/asm-arm/current.h similarity index 100% rename from trunk/arch/arm/include/asm/current.h rename to trunk/include/asm-arm/current.h diff --git a/trunk/arch/arm/include/asm/delay.h b/trunk/include/asm-arm/delay.h similarity index 100% rename from trunk/arch/arm/include/asm/delay.h rename to trunk/include/asm-arm/delay.h diff --git a/trunk/arch/arm/include/asm/device.h b/trunk/include/asm-arm/device.h similarity index 100% rename from trunk/arch/arm/include/asm/device.h rename to trunk/include/asm-arm/device.h diff --git a/trunk/arch/arm/include/asm/div64.h b/trunk/include/asm-arm/div64.h similarity index 100% rename from trunk/arch/arm/include/asm/div64.h rename to trunk/include/asm-arm/div64.h diff --git a/trunk/arch/arm/include/asm/dma-mapping.h b/trunk/include/asm-arm/dma-mapping.h similarity index 100% rename from trunk/arch/arm/include/asm/dma-mapping.h rename to trunk/include/asm-arm/dma-mapping.h diff --git a/trunk/arch/arm/include/asm/dma.h b/trunk/include/asm-arm/dma.h similarity index 100% rename from trunk/arch/arm/include/asm/dma.h rename to trunk/include/asm-arm/dma.h diff --git a/trunk/arch/arm/include/asm/domain.h b/trunk/include/asm-arm/domain.h similarity index 98% rename from trunk/arch/arm/include/asm/domain.h rename to trunk/include/asm-arm/domain.h index cc7ef4080711..3c12a7625304 100644 --- a/trunk/arch/arm/include/asm/domain.h +++ b/trunk/include/asm-arm/domain.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/domain.h + * linux/include/asm-arm/domain.h * * Copyright (C) 1999 Russell King. * diff --git a/trunk/arch/arm/include/asm/ecard.h b/trunk/include/asm-arm/ecard.h similarity index 99% rename from trunk/arch/arm/include/asm/ecard.h rename to trunk/include/asm-arm/ecard.h index 29f2610efc70..5e22881a630d 100644 --- a/trunk/arch/arm/include/asm/ecard.h +++ b/trunk/include/asm-arm/ecard.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/ecard.h + * linux/include/asm-arm/ecard.h * * definitions for expansion cards * diff --git a/trunk/arch/arm/include/asm/elf.h b/trunk/include/asm-arm/elf.h similarity index 100% rename from trunk/arch/arm/include/asm/elf.h rename to trunk/include/asm-arm/elf.h diff --git a/trunk/arch/arm/include/asm/emergency-restart.h b/trunk/include/asm-arm/emergency-restart.h similarity index 100% rename from trunk/arch/arm/include/asm/emergency-restart.h rename to trunk/include/asm-arm/emergency-restart.h diff --git a/trunk/arch/arm/include/asm/errno.h b/trunk/include/asm-arm/errno.h similarity index 100% rename from trunk/arch/arm/include/asm/errno.h rename to trunk/include/asm-arm/errno.h diff --git a/trunk/arch/arm/include/asm/fb.h b/trunk/include/asm-arm/fb.h similarity index 100% rename from trunk/arch/arm/include/asm/fb.h rename to trunk/include/asm-arm/fb.h diff --git a/trunk/arch/arm/include/asm/fcntl.h b/trunk/include/asm-arm/fcntl.h similarity index 100% rename from trunk/arch/arm/include/asm/fcntl.h rename to trunk/include/asm-arm/fcntl.h diff --git a/trunk/arch/arm/include/asm/fiq.h b/trunk/include/asm-arm/fiq.h similarity index 96% rename from trunk/arch/arm/include/asm/fiq.h rename to trunk/include/asm-arm/fiq.h index 2242ce22ec6c..a3bad09e825c 100644 --- a/trunk/arch/arm/include/asm/fiq.h +++ b/trunk/include/asm-arm/fiq.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/fiq.h + * linux/include/asm-arm/fiq.h * * Support for FIQ on ARM architectures. * Written by Philip Blundell , 1998 diff --git a/trunk/arch/arm/include/asm/flat.h b/trunk/include/asm-arm/flat.h similarity index 90% rename from trunk/arch/arm/include/asm/flat.h rename to trunk/include/asm-arm/flat.h index 1d77e51907f6..9918aa46d9e5 100644 --- a/trunk/arch/arm/include/asm/flat.h +++ b/trunk/include/asm-arm/flat.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/flat.h -- uClinux flat-format executables + * include/asm-arm/flat.h -- uClinux flat-format executables */ #ifndef __ARM_FLAT_H__ diff --git a/trunk/arch/arm/include/asm/floppy.h b/trunk/include/asm-arm/floppy.h similarity index 99% rename from trunk/arch/arm/include/asm/floppy.h rename to trunk/include/asm-arm/floppy.h index dce20c25ab10..41a5e9d6bb69 100644 --- a/trunk/arch/arm/include/asm/floppy.h +++ b/trunk/include/asm-arm/floppy.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/floppy.h + * linux/include/asm-arm/floppy.h * * Copyright (C) 1996-2000 Russell King * diff --git a/trunk/arch/arm/include/asm/fpstate.h b/trunk/include/asm-arm/fpstate.h similarity index 97% rename from trunk/arch/arm/include/asm/fpstate.h rename to trunk/include/asm-arm/fpstate.h index ee5e03efc1bb..392eb5332323 100644 --- a/trunk/arch/arm/include/asm/fpstate.h +++ b/trunk/include/asm-arm/fpstate.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/fpstate.h + * linux/include/asm-arm/fpstate.h * * Copyright (C) 1995 Russell King * diff --git a/trunk/arch/arm/include/asm/ftrace.h b/trunk/include/asm-arm/ftrace.h similarity index 100% rename from trunk/arch/arm/include/asm/ftrace.h rename to trunk/include/asm-arm/ftrace.h diff --git a/trunk/arch/arm/include/asm/futex.h b/trunk/include/asm-arm/futex.h similarity index 100% rename from trunk/arch/arm/include/asm/futex.h rename to trunk/include/asm-arm/futex.h diff --git a/trunk/arch/arm/include/asm/glue.h b/trunk/include/asm-arm/glue.h similarity index 99% rename from trunk/arch/arm/include/asm/glue.h rename to trunk/include/asm-arm/glue.h index a0e39d5d00c9..a97a182ba287 100644 --- a/trunk/arch/arm/include/asm/glue.h +++ b/trunk/include/asm-arm/glue.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/glue.h + * linux/include/asm-arm/glue.h * * Copyright (C) 1997-1999 Russell King * Copyright (C) 2000-2002 Deep Blue Solutions Ltd. diff --git a/trunk/arch/arm/include/asm/gpio.h b/trunk/include/asm-arm/gpio.h similarity index 100% rename from trunk/arch/arm/include/asm/gpio.h rename to trunk/include/asm-arm/gpio.h diff --git a/trunk/arch/arm/include/asm/hardirq.h b/trunk/include/asm-arm/hardirq.h similarity index 100% rename from trunk/arch/arm/include/asm/hardirq.h rename to trunk/include/asm-arm/hardirq.h diff --git a/trunk/arch/arm/include/asm/hardware.h b/trunk/include/asm-arm/hardware.h similarity index 90% rename from trunk/arch/arm/include/asm/hardware.h rename to trunk/include/asm-arm/hardware.h index eb3b3abb7db7..1fd1a5b6504b 100644 --- a/trunk/arch/arm/include/asm/hardware.h +++ b/trunk/include/asm-arm/hardware.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware.h + * linux/include/asm-arm/hardware.h * * Copyright (C) 1996 Russell King * diff --git a/trunk/arch/arm/include/asm/hardware/arm_timer.h b/trunk/include/asm-arm/hardware/arm_timer.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/arm_timer.h rename to trunk/include/asm-arm/hardware/arm_timer.h diff --git a/trunk/arch/arm/include/asm/hardware/arm_twd.h b/trunk/include/asm-arm/hardware/arm_twd.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/arm_twd.h rename to trunk/include/asm-arm/hardware/arm_twd.h diff --git a/trunk/arch/arm/include/asm/hardware/cache-l2x0.h b/trunk/include/asm-arm/hardware/cache-l2x0.h similarity index 97% rename from trunk/arch/arm/include/asm/hardware/cache-l2x0.h rename to trunk/include/asm-arm/hardware/cache-l2x0.h index 64f2252a25cd..54029a740396 100644 --- a/trunk/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/trunk/include/asm-arm/hardware/cache-l2x0.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/cache-l2x0.h + * include/asm-arm/hardware/cache-l2x0.h * * Copyright (C) 2007 ARM Limited * diff --git a/trunk/arch/arm/include/asm/hardware/clps7111.h b/trunk/include/asm-arm/hardware/clps7111.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/clps7111.h rename to trunk/include/asm-arm/hardware/clps7111.h index 44477225aed6..8d3228dc1778 100644 --- a/trunk/arch/arm/include/asm/hardware/clps7111.h +++ b/trunk/include/asm-arm/hardware/clps7111.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/clps7111.h + * linux/include/asm-arm/hardware/clps7111.h * * This file contains the hardware definitions of the CLPS7111 internal * registers. diff --git a/trunk/arch/arm/include/asm/hardware/cs89712.h b/trunk/include/asm-arm/hardware/cs89712.h similarity index 97% rename from trunk/arch/arm/include/asm/hardware/cs89712.h rename to trunk/include/asm-arm/hardware/cs89712.h index f75626933e94..ad99a3e1b802 100644 --- a/trunk/arch/arm/include/asm/hardware/cs89712.h +++ b/trunk/include/asm-arm/hardware/cs89712.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/cs89712.h + * linux/include/asm-arm/hardware/cs89712.h * * This file contains the hardware definitions of the CS89712 * additional internal registers. diff --git a/trunk/arch/arm/include/asm/hardware/debug-8250.S b/trunk/include/asm-arm/hardware/debug-8250.S similarity index 93% rename from trunk/arch/arm/include/asm/hardware/debug-8250.S rename to trunk/include/asm-arm/hardware/debug-8250.S index 22c689255e6e..07c97fb233fc 100644 --- a/trunk/arch/arm/include/asm/hardware/debug-8250.S +++ b/trunk/include/asm-arm/hardware/debug-8250.S @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/debug-8250.S + * linux/include/asm-arm/hardware/debug-8250.S * * Copyright (C) 1994-1999 Russell King * diff --git a/trunk/arch/arm/include/asm/hardware/debug-pl01x.S b/trunk/include/asm-arm/hardware/debug-pl01x.S similarity index 93% rename from trunk/arch/arm/include/asm/hardware/debug-pl01x.S rename to trunk/include/asm-arm/hardware/debug-pl01x.S index f9fd083eff63..23c541a9e89a 100644 --- a/trunk/arch/arm/include/asm/hardware/debug-pl01x.S +++ b/trunk/include/asm-arm/hardware/debug-pl01x.S @@ -1,4 +1,4 @@ -/* arch/arm/include/asm/hardware/debug-pl01x.S +/* linux/include/asm-arm/hardware/debug-pl01x.S * * Debugging macro include header * diff --git a/trunk/arch/arm/include/asm/hardware/dec21285.h b/trunk/include/asm-arm/hardware/dec21285.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/dec21285.h rename to trunk/include/asm-arm/hardware/dec21285.h index 7068a1c1e4e4..546f7077be9c 100644 --- a/trunk/arch/arm/include/asm/hardware/dec21285.h +++ b/trunk/include/asm-arm/hardware/dec21285.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/dec21285.h + * linux/include/asm-arm/hardware/dec21285.h * * Copyright (C) 1998 Russell King * diff --git a/trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S b/trunk/include/asm-arm/hardware/entry-macro-iomd.S similarity index 99% rename from trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S rename to trunk/include/asm-arm/hardware/entry-macro-iomd.S index e0af4983723f..9bb580a5b15e 100644 --- a/trunk/arch/arm/include/asm/hardware/entry-macro-iomd.S +++ b/trunk/include/asm-arm/hardware/entry-macro-iomd.S @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/entry-macro-iomd.S + * include/asm-arm/hardware/entry-macro-iomd.S * * Low-level IRQ helper macros for IOC/IOMD based platforms * diff --git a/trunk/arch/arm/include/asm/hardware/ep7211.h b/trunk/include/asm-arm/hardware/ep7211.h similarity index 96% rename from trunk/arch/arm/include/asm/hardware/ep7211.h rename to trunk/include/asm-arm/hardware/ep7211.h index 654d5f625c49..017aa68f612d 100644 --- a/trunk/arch/arm/include/asm/hardware/ep7211.h +++ b/trunk/include/asm-arm/hardware/ep7211.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/ep7211.h + * linux/include/asm-arm/hardware/ep7211.h * * This file contains the hardware definitions of the EP7211 internal * registers. diff --git a/trunk/arch/arm/include/asm/hardware/ep7212.h b/trunk/include/asm-arm/hardware/ep7212.h similarity index 98% rename from trunk/arch/arm/include/asm/hardware/ep7212.h rename to trunk/include/asm-arm/hardware/ep7212.h index 3b43bbeaf1db..0e952e747073 100644 --- a/trunk/arch/arm/include/asm/hardware/ep7212.h +++ b/trunk/include/asm-arm/hardware/ep7212.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/ep7212.h + * linux/include/asm-arm/hardware/ep7212.h * * This file contains the hardware definitions of the EP7212 internal * registers. diff --git a/trunk/arch/arm/include/asm/hardware/gic.h b/trunk/include/asm-arm/hardware/gic.h similarity index 96% rename from trunk/arch/arm/include/asm/hardware/gic.h rename to trunk/include/asm-arm/hardware/gic.h index 4924914af188..966e428ad32c 100644 --- a/trunk/arch/arm/include/asm/hardware/gic.h +++ b/trunk/include/asm-arm/hardware/gic.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/gic.h + * linux/include/asm-arm/hardware/gic.h * * Copyright (C) 2002 ARM Limited, All Rights Reserved. * diff --git a/trunk/arch/arm/include/asm/hardware/icst307.h b/trunk/include/asm-arm/hardware/icst307.h similarity index 96% rename from trunk/arch/arm/include/asm/hardware/icst307.h rename to trunk/include/asm-arm/hardware/icst307.h index 554f128a1046..ff8618a441c0 100644 --- a/trunk/arch/arm/include/asm/hardware/icst307.h +++ b/trunk/include/asm-arm/hardware/icst307.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/icst307.h + * linux/include/asm-arm/hardware/icst307.h * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * diff --git a/trunk/arch/arm/include/asm/hardware/icst525.h b/trunk/include/asm-arm/hardware/icst525.h similarity index 96% rename from trunk/arch/arm/include/asm/hardware/icst525.h rename to trunk/include/asm-arm/hardware/icst525.h index 58f0dc43e2ed..edd5a5704406 100644 --- a/trunk/arch/arm/include/asm/hardware/icst525.h +++ b/trunk/include/asm-arm/hardware/icst525.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/icst525.h + * linux/include/asm-arm/hardware/icst525.h * * Copyright (C) 2003 Deep Blue Solutions, Ltd, All Rights Reserved. * diff --git a/trunk/arch/arm/include/asm/hardware/ioc.h b/trunk/include/asm-arm/hardware/ioc.h similarity index 97% rename from trunk/arch/arm/include/asm/hardware/ioc.h rename to trunk/include/asm-arm/hardware/ioc.h index 1f6b8013becb..b3b46ef65943 100644 --- a/trunk/arch/arm/include/asm/hardware/ioc.h +++ b/trunk/include/asm-arm/hardware/ioc.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/ioc.h + * linux/include/asm-arm/hardware/ioc.h * * Copyright (C) Russell King * diff --git a/trunk/arch/arm/include/asm/hardware/iomd.h b/trunk/include/asm-arm/hardware/iomd.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/iomd.h rename to trunk/include/asm-arm/hardware/iomd.h index 9c5afbd71a69..396e55ad06c6 100644 --- a/trunk/arch/arm/include/asm/hardware/iomd.h +++ b/trunk/include/asm-arm/hardware/iomd.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/iomd.h + * linux/include/asm-arm/hardware/iomd.h * * Copyright (C) 1999 Russell King * diff --git a/trunk/arch/arm/include/asm/hardware/iop3xx-adma.h b/trunk/include/asm-arm/hardware/iop3xx-adma.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/iop3xx-adma.h rename to trunk/include/asm-arm/hardware/iop3xx-adma.h diff --git a/trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h b/trunk/include/asm-arm/hardware/iop3xx-gpio.h similarity index 97% rename from trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h rename to trunk/include/asm-arm/hardware/iop3xx-gpio.h index 222e74b7c463..0c9331f9ac24 100644 --- a/trunk/arch/arm/include/asm/hardware/iop3xx-gpio.h +++ b/trunk/include/asm-arm/hardware/iop3xx-gpio.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/iop3xx-gpio.h + * linux/include/asm-arm/hardware/iop3xx-gpio.h * * IOP3xx GPIO wrappers * diff --git a/trunk/arch/arm/include/asm/hardware/iop3xx.h b/trunk/include/asm-arm/hardware/iop3xx.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/iop3xx.h rename to trunk/include/asm-arm/hardware/iop3xx.h index 4b8e7f559929..18f6937f5010 100644 --- a/trunk/arch/arm/include/asm/hardware/iop3xx.h +++ b/trunk/include/asm-arm/hardware/iop3xx.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/iop3xx.h + * include/asm-arm/hardware/iop3xx.h * * Intel IOP32X and IOP33X register definitions * diff --git a/trunk/arch/arm/include/asm/hardware/iop_adma.h b/trunk/include/asm-arm/hardware/iop_adma.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/iop_adma.h rename to trunk/include/asm-arm/hardware/iop_adma.h diff --git a/trunk/arch/arm/include/asm/hardware/it8152.h b/trunk/include/asm-arm/hardware/it8152.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/it8152.h rename to trunk/include/asm-arm/hardware/it8152.h diff --git a/trunk/arch/arm/include/asm/hardware/linkup-l1110.h b/trunk/include/asm-arm/hardware/linkup-l1110.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/linkup-l1110.h rename to trunk/include/asm-arm/hardware/linkup-l1110.h diff --git a/trunk/arch/arm/include/asm/hardware/locomo.h b/trunk/include/asm-arm/hardware/locomo.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/locomo.h rename to trunk/include/asm-arm/hardware/locomo.h index 954b1be991b4..fb0645de6f31 100644 --- a/trunk/arch/arm/include/asm/hardware/locomo.h +++ b/trunk/include/asm-arm/hardware/locomo.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/locomo.h + * linux/include/asm-arm/hardware/locomo.h * * This file contains the definitions for the LoCoMo G/A Chip * diff --git a/trunk/arch/arm/include/asm/hardware/memc.h b/trunk/include/asm-arm/hardware/memc.h similarity index 93% rename from trunk/arch/arm/include/asm/hardware/memc.h rename to trunk/include/asm-arm/hardware/memc.h index 42ba7c167d1f..8aef5aa0e01b 100644 --- a/trunk/arch/arm/include/asm/hardware/memc.h +++ b/trunk/include/asm-arm/hardware/memc.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/memc.h + * linux/include/asm-arm/hardware/memc.h * * Copyright (C) Russell King. * diff --git a/trunk/arch/arm/include/asm/hardware/pci_v3.h b/trunk/include/asm-arm/hardware/pci_v3.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/pci_v3.h rename to trunk/include/asm-arm/hardware/pci_v3.h index 2811c7e2cfdf..4d497bdb9a97 100644 --- a/trunk/arch/arm/include/asm/hardware/pci_v3.h +++ b/trunk/include/asm-arm/hardware/pci_v3.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/pci_v3.h + * linux/include/asm-arm/hardware/pci_v3.h * * Internal header file PCI V3 chip * diff --git a/trunk/arch/arm/include/asm/hardware/sa1111.h b/trunk/include/asm-arm/hardware/sa1111.h similarity index 99% rename from trunk/arch/arm/include/asm/hardware/sa1111.h rename to trunk/include/asm-arm/hardware/sa1111.h index 6cf98d4f7dc3..61b1d05c7df7 100644 --- a/trunk/arch/arm/include/asm/hardware/sa1111.h +++ b/trunk/include/asm-arm/hardware/sa1111.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/sa1111.h + * linux/include/asm-arm/hardware/sa1111.h * * Copyright (C) 2000 John G Dorsey * diff --git a/trunk/arch/arm/include/asm/hardware/scoop.h b/trunk/include/asm-arm/hardware/scoop.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/scoop.h rename to trunk/include/asm-arm/hardware/scoop.h diff --git a/trunk/arch/arm/include/asm/hardware/sharpsl_pm.h b/trunk/include/asm-arm/hardware/sharpsl_pm.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/sharpsl_pm.h rename to trunk/include/asm-arm/hardware/sharpsl_pm.h diff --git a/trunk/arch/arm/include/asm/hardware/ssp.h b/trunk/include/asm-arm/hardware/ssp.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/ssp.h rename to trunk/include/asm-arm/hardware/ssp.h diff --git a/trunk/arch/arm/include/asm/hardware/uengine.h b/trunk/include/asm-arm/hardware/uengine.h similarity index 100% rename from trunk/arch/arm/include/asm/hardware/uengine.h rename to trunk/include/asm-arm/hardware/uengine.h diff --git a/trunk/arch/arm/include/asm/hardware/vic.h b/trunk/include/asm-arm/hardware/vic.h similarity index 97% rename from trunk/arch/arm/include/asm/hardware/vic.h rename to trunk/include/asm-arm/hardware/vic.h index 263f2c362a30..ed9ca3736a0b 100644 --- a/trunk/arch/arm/include/asm/hardware/vic.h +++ b/trunk/include/asm-arm/hardware/vic.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/hardware/vic.h + * linux/include/asm-arm/hardware/vic.h * * Copyright (c) ARM Limited 2003. All rights reserved. * diff --git a/trunk/arch/arm/include/asm/hw_irq.h b/trunk/include/asm-arm/hw_irq.h similarity index 100% rename from trunk/arch/arm/include/asm/hw_irq.h rename to trunk/include/asm-arm/hw_irq.h diff --git a/trunk/arch/arm/include/asm/hwcap.h b/trunk/include/asm-arm/hwcap.h similarity index 100% rename from trunk/arch/arm/include/asm/hwcap.h rename to trunk/include/asm-arm/hwcap.h diff --git a/trunk/arch/arm/include/asm/ide.h b/trunk/include/asm-arm/ide.h similarity index 93% rename from trunk/arch/arm/include/asm/ide.h rename to trunk/include/asm-arm/ide.h index b507ce8e5019..a48019f99d08 100644 --- a/trunk/arch/arm/include/asm/ide.h +++ b/trunk/include/asm-arm/ide.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/ide.h + * linux/include/asm-arm/ide.h * * Copyright (C) 1994-1996 Linus Torvalds & authors */ diff --git a/trunk/arch/arm/include/asm/io.h b/trunk/include/asm-arm/io.h similarity index 99% rename from trunk/arch/arm/include/asm/io.h rename to trunk/include/asm-arm/io.h index ffe07c0f46d8..eebe56e74d6d 100644 --- a/trunk/arch/arm/include/asm/io.h +++ b/trunk/include/asm-arm/io.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/io.h + * linux/include/asm-arm/io.h * * Copyright (C) 1996-2000 Russell King * diff --git a/trunk/arch/arm/include/asm/ioctl.h b/trunk/include/asm-arm/ioctl.h similarity index 100% rename from trunk/arch/arm/include/asm/ioctl.h rename to trunk/include/asm-arm/ioctl.h diff --git a/trunk/arch/arm/include/asm/ioctls.h b/trunk/include/asm-arm/ioctls.h similarity index 100% rename from trunk/arch/arm/include/asm/ioctls.h rename to trunk/include/asm-arm/ioctls.h diff --git a/trunk/arch/arm/include/asm/ipcbuf.h b/trunk/include/asm-arm/ipcbuf.h similarity index 100% rename from trunk/arch/arm/include/asm/ipcbuf.h rename to trunk/include/asm-arm/ipcbuf.h diff --git a/trunk/arch/arm/include/asm/irq.h b/trunk/include/asm-arm/irq.h similarity index 100% rename from trunk/arch/arm/include/asm/irq.h rename to trunk/include/asm-arm/irq.h diff --git a/trunk/arch/arm/include/asm/irq_regs.h b/trunk/include/asm-arm/irq_regs.h similarity index 100% rename from trunk/arch/arm/include/asm/irq_regs.h rename to trunk/include/asm-arm/irq_regs.h diff --git a/trunk/arch/arm/include/asm/irqflags.h b/trunk/include/asm-arm/irqflags.h similarity index 100% rename from trunk/arch/arm/include/asm/irqflags.h rename to trunk/include/asm-arm/irqflags.h diff --git a/trunk/arch/arm/include/asm/kdebug.h b/trunk/include/asm-arm/kdebug.h similarity index 100% rename from trunk/arch/arm/include/asm/kdebug.h rename to trunk/include/asm-arm/kdebug.h diff --git a/trunk/arch/arm/include/asm/kexec.h b/trunk/include/asm-arm/kexec.h similarity index 100% rename from trunk/arch/arm/include/asm/kexec.h rename to trunk/include/asm-arm/kexec.h diff --git a/trunk/arch/arm/include/asm/kgdb.h b/trunk/include/asm-arm/kgdb.h similarity index 100% rename from trunk/arch/arm/include/asm/kgdb.h rename to trunk/include/asm-arm/kgdb.h diff --git a/trunk/arch/arm/include/asm/kmap_types.h b/trunk/include/asm-arm/kmap_types.h similarity index 100% rename from trunk/arch/arm/include/asm/kmap_types.h rename to trunk/include/asm-arm/kmap_types.h diff --git a/trunk/arch/arm/include/asm/kprobes.h b/trunk/include/asm-arm/kprobes.h similarity index 98% rename from trunk/arch/arm/include/asm/kprobes.h rename to trunk/include/asm-arm/kprobes.h index a5d0d99ad387..b1a37876942d 100644 --- a/trunk/arch/arm/include/asm/kprobes.h +++ b/trunk/include/asm-arm/kprobes.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/kprobes.h + * include/asm-arm/kprobes.h * * Copyright (C) 2006, 2007 Motorola Inc. * diff --git a/trunk/arch/arm/include/asm/leds.h b/trunk/include/asm-arm/leds.h similarity index 96% rename from trunk/arch/arm/include/asm/leds.h rename to trunk/include/asm-arm/leds.h index c545739f39b7..12290ea55801 100644 --- a/trunk/arch/arm/include/asm/leds.h +++ b/trunk/include/asm-arm/leds.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/leds.h + * linux/include/asm-arm/leds.h * * Copyright (C) 1998 Russell King * diff --git a/trunk/arch/arm/include/asm/limits.h b/trunk/include/asm-arm/limits.h similarity index 100% rename from trunk/arch/arm/include/asm/limits.h rename to trunk/include/asm-arm/limits.h diff --git a/trunk/arch/arm/include/asm/linkage.h b/trunk/include/asm-arm/linkage.h similarity index 100% rename from trunk/arch/arm/include/asm/linkage.h rename to trunk/include/asm-arm/linkage.h diff --git a/trunk/arch/arm/include/asm/local.h b/trunk/include/asm-arm/local.h similarity index 100% rename from trunk/arch/arm/include/asm/local.h rename to trunk/include/asm-arm/local.h diff --git a/trunk/arch/arm/include/asm/locks.h b/trunk/include/asm-arm/locks.h similarity index 99% rename from trunk/arch/arm/include/asm/locks.h rename to trunk/include/asm-arm/locks.h index ef4c897772d1..852220eecdbc 100644 --- a/trunk/arch/arm/include/asm/locks.h +++ b/trunk/include/asm-arm/locks.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/locks.h + * linux/include/asm-arm/locks.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/arch.h b/trunk/include/asm-arm/mach/arch.h similarity index 97% rename from trunk/arch/arm/include/asm/mach/arch.h rename to trunk/include/asm-arm/mach/arch.h index c59842dc7cb8..bcc8aed7c9a9 100644 --- a/trunk/arch/arm/include/asm/mach/arch.h +++ b/trunk/include/asm-arm/mach/arch.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/arch.h + * linux/include/asm-arm/mach/arch.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/dma.h b/trunk/include/asm-arm/mach/dma.h similarity index 97% rename from trunk/arch/arm/include/asm/mach/dma.h rename to trunk/include/asm-arm/mach/dma.h index fc7278ea7146..e7c4a20aad53 100644 --- a/trunk/arch/arm/include/asm/mach/dma.h +++ b/trunk/include/asm-arm/mach/dma.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/dma.h + * linux/include/asm-arm/mach/dma.h * * Copyright (C) 1998-2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/flash.h b/trunk/include/asm-arm/mach/flash.h similarity index 96% rename from trunk/arch/arm/include/asm/mach/flash.h rename to trunk/include/asm-arm/mach/flash.h index 4ca69fe2c850..05b029ef6371 100644 --- a/trunk/arch/arm/include/asm/mach/flash.h +++ b/trunk/include/asm-arm/mach/flash.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/flash.h + * linux/include/asm-arm/mach/flash.h * * Copyright (C) 2003 Russell King, All Rights Reserved. * diff --git a/trunk/arch/arm/include/asm/mach/irda.h b/trunk/include/asm-arm/mach/irda.h similarity index 93% rename from trunk/arch/arm/include/asm/mach/irda.h rename to trunk/include/asm-arm/mach/irda.h index 38f77b5e56cf..58984d9c0b0b 100644 --- a/trunk/arch/arm/include/asm/mach/irda.h +++ b/trunk/include/asm-arm/mach/irda.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/irda.h + * linux/include/asm-arm/mach/irda.h * * Copyright (C) 2004 Russell King. * diff --git a/trunk/arch/arm/include/asm/mach/irq.h b/trunk/include/asm-arm/mach/irq.h similarity index 96% rename from trunk/arch/arm/include/asm/mach/irq.h rename to trunk/include/asm-arm/mach/irq.h index c57b52ce574a..eb0bfba6570d 100644 --- a/trunk/arch/arm/include/asm/mach/irq.h +++ b/trunk/include/asm-arm/mach/irq.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/irq.h + * linux/include/asm-arm/mach/irq.h * * Copyright (C) 1995-2000 Russell King. * diff --git a/trunk/arch/arm/include/asm/mach/map.h b/trunk/include/asm-arm/mach/map.h similarity index 96% rename from trunk/arch/arm/include/asm/mach/map.h rename to trunk/include/asm-arm/mach/map.h index 06f583b13999..7ef3c8390180 100644 --- a/trunk/arch/arm/include/asm/mach/map.h +++ b/trunk/include/asm-arm/mach/map.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/map.h + * linux/include/asm-arm/map.h * * Copyright (C) 1999-2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/mmc.h b/trunk/include/asm-arm/mach/mmc.h similarity index 88% rename from trunk/arch/arm/include/asm/mach/mmc.h rename to trunk/include/asm-arm/mach/mmc.h index 4da332b03144..eb91145c00c4 100644 --- a/trunk/arch/arm/include/asm/mach/mmc.h +++ b/trunk/include/asm-arm/mach/mmc.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/mmc.h + * linux/include/asm-arm/mach/mmc.h */ #ifndef ASMARM_MACH_MMC_H #define ASMARM_MACH_MMC_H diff --git a/trunk/arch/arm/include/asm/mach/pci.h b/trunk/include/asm-arm/mach/pci.h similarity index 98% rename from trunk/arch/arm/include/asm/mach/pci.h rename to trunk/include/asm-arm/mach/pci.h index 32da1ae17e06..9d4f6b5ea419 100644 --- a/trunk/arch/arm/include/asm/mach/pci.h +++ b/trunk/include/asm-arm/mach/pci.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/pci.h + * linux/include/asm-arm/mach/pci.h * * Copyright (C) 2000 Russell King * diff --git a/trunk/arch/arm/include/asm/mach/serial_at91.h b/trunk/include/asm-arm/mach/serial_at91.h similarity index 94% rename from trunk/arch/arm/include/asm/mach/serial_at91.h rename to trunk/include/asm-arm/mach/serial_at91.h index ea6d063923b8..55b317a89061 100644 --- a/trunk/arch/arm/include/asm/mach/serial_at91.h +++ b/trunk/include/asm-arm/mach/serial_at91.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/serial_at91.h + * linux/include/asm-arm/mach/serial_at91.h * * Based on serial_sa1100.h by Nicolas Pitre * diff --git a/trunk/arch/arm/include/asm/mach/serial_sa1100.h b/trunk/include/asm-arm/mach/serial_sa1100.h similarity index 86% rename from trunk/arch/arm/include/asm/mach/serial_sa1100.h rename to trunk/include/asm-arm/mach/serial_sa1100.h index d09064bf95a0..20c22bb218d9 100644 --- a/trunk/arch/arm/include/asm/mach/serial_sa1100.h +++ b/trunk/include/asm-arm/mach/serial_sa1100.h @@ -1,9 +1,9 @@ /* - * arch/arm/include/asm/mach/serial_sa1100.h + * linux/include/asm-arm/mach/serial_sa1100.h * * Author: Nicolas Pitre * - * Moved and changed lots, Russell King + * Moved to include/asm-arm/mach and changed lots, Russell King * * Low level machine dependent UART functions. */ diff --git a/trunk/arch/arm/include/asm/mach/sharpsl_param.h b/trunk/include/asm-arm/mach/sharpsl_param.h similarity index 100% rename from trunk/arch/arm/include/asm/mach/sharpsl_param.h rename to trunk/include/asm-arm/mach/sharpsl_param.h diff --git a/trunk/arch/arm/include/asm/mach/time.h b/trunk/include/asm-arm/mach/time.h similarity index 97% rename from trunk/arch/arm/include/asm/mach/time.h rename to trunk/include/asm-arm/mach/time.h index b2cc1fcd0400..2fd36ea0130d 100644 --- a/trunk/arch/arm/include/asm/mach/time.h +++ b/trunk/include/asm-arm/mach/time.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/time.h + * linux/include/asm-arm/mach/time.h * * Copyright (C) 2004 MontaVista Software, Inc. * diff --git a/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h b/trunk/include/asm-arm/mach/udc_pxa2xx.h similarity index 95% rename from trunk/arch/arm/include/asm/mach/udc_pxa2xx.h rename to trunk/include/asm-arm/mach/udc_pxa2xx.h index 270902c353fd..9e5ed7c0f27f 100644 --- a/trunk/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/trunk/include/asm-arm/mach/udc_pxa2xx.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mach/udc_pxa2xx.h + * linux/include/asm-arm/mach/udc_pxa2xx.h * * This supports machine-specific differences in how the PXA2xx * USB Device Controller (UDC) is wired. diff --git a/trunk/arch/arm/include/asm/mc146818rtc.h b/trunk/include/asm-arm/mc146818rtc.h similarity index 100% rename from trunk/arch/arm/include/asm/mc146818rtc.h rename to trunk/include/asm-arm/mc146818rtc.h diff --git a/trunk/arch/arm/include/asm/memory.h b/trunk/include/asm-arm/memory.h similarity index 99% rename from trunk/arch/arm/include/asm/memory.h rename to trunk/include/asm-arm/memory.h index 92069221dca9..9ba4d7136e6b 100644 --- a/trunk/arch/arm/include/asm/memory.h +++ b/trunk/include/asm-arm/memory.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/memory.h + * linux/include/asm-arm/memory.h * * Copyright (C) 2000-2002 Russell King * modification for nommu, Hyok S. Choi, 2004 diff --git a/trunk/arch/arm/include/asm/mman.h b/trunk/include/asm-arm/mman.h similarity index 100% rename from trunk/arch/arm/include/asm/mman.h rename to trunk/include/asm-arm/mman.h diff --git a/trunk/arch/arm/include/asm/mmu.h b/trunk/include/asm-arm/mmu.h similarity index 100% rename from trunk/arch/arm/include/asm/mmu.h rename to trunk/include/asm-arm/mmu.h diff --git a/trunk/arch/arm/include/asm/mmu_context.h b/trunk/include/asm-arm/mmu_context.h similarity index 98% rename from trunk/arch/arm/include/asm/mmu_context.h rename to trunk/include/asm-arm/mmu_context.h index a301e446007f..91b9dfdfed52 100644 --- a/trunk/arch/arm/include/asm/mmu_context.h +++ b/trunk/include/asm-arm/mmu_context.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mmu_context.h + * linux/include/asm-arm/mmu_context.h * * Copyright (C) 1996 Russell King. * diff --git a/trunk/arch/arm/include/asm/mmzone.h b/trunk/include/asm-arm/mmzone.h similarity index 94% rename from trunk/arch/arm/include/asm/mmzone.h rename to trunk/include/asm-arm/mmzone.h index f2fbb5084901..b87de151f0a4 100644 --- a/trunk/arch/arm/include/asm/mmzone.h +++ b/trunk/include/asm-arm/mmzone.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mmzone.h + * linux/include/asm-arm/mmzone.h * * 1999-12-29 Nicolas Pitre Created * diff --git a/trunk/arch/arm/include/asm/module.h b/trunk/include/asm-arm/module.h similarity index 100% rename from trunk/arch/arm/include/asm/module.h rename to trunk/include/asm-arm/module.h diff --git a/trunk/arch/arm/include/asm/msgbuf.h b/trunk/include/asm-arm/msgbuf.h similarity index 100% rename from trunk/arch/arm/include/asm/msgbuf.h rename to trunk/include/asm-arm/msgbuf.h diff --git a/trunk/arch/arm/include/asm/mtd-xip.h b/trunk/include/asm-arm/mtd-xip.h similarity index 100% rename from trunk/arch/arm/include/asm/mtd-xip.h rename to trunk/include/asm-arm/mtd-xip.h diff --git a/trunk/arch/arm/include/asm/mutex.h b/trunk/include/asm-arm/mutex.h similarity index 98% rename from trunk/arch/arm/include/asm/mutex.h rename to trunk/include/asm-arm/mutex.h index 93226cf23ae0..020bd98710a1 100644 --- a/trunk/arch/arm/include/asm/mutex.h +++ b/trunk/include/asm-arm/mutex.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/mutex.h + * include/asm-arm/mutex.h * * ARM optimized mutex locking primitives * diff --git a/trunk/arch/arm/include/asm/nwflash.h b/trunk/include/asm-arm/nwflash.h similarity index 100% rename from trunk/arch/arm/include/asm/nwflash.h rename to trunk/include/asm-arm/nwflash.h diff --git a/trunk/arch/arm/include/asm/page-nommu.h b/trunk/include/asm-arm/page-nommu.h similarity index 96% rename from trunk/arch/arm/include/asm/page-nommu.h rename to trunk/include/asm-arm/page-nommu.h index 3574c0deb37f..ea1cde84f500 100644 --- a/trunk/arch/arm/include/asm/page-nommu.h +++ b/trunk/include/asm-arm/page-nommu.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/page-nommu.h + * linux/include/asm-arm/page-nommu.h * * Copyright (C) 2004 Hyok S. Choi * diff --git a/trunk/arch/arm/include/asm/page.h b/trunk/include/asm-arm/page.h similarity index 99% rename from trunk/arch/arm/include/asm/page.h rename to trunk/include/asm-arm/page.h index cf2e2680daaa..7c5fc5582e5d 100644 --- a/trunk/arch/arm/include/asm/page.h +++ b/trunk/include/asm-arm/page.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/page.h + * linux/include/asm-arm/page.h * * Copyright (C) 1995-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/param.h b/trunk/include/asm-arm/param.h similarity index 95% rename from trunk/arch/arm/include/asm/param.h rename to trunk/include/asm-arm/param.h index 8b24bf94c06b..15806468ba72 100644 --- a/trunk/arch/arm/include/asm/param.h +++ b/trunk/include/asm-arm/param.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/param.h + * linux/include/asm-arm/param.h * * Copyright (C) 1995-1999 Russell King * diff --git a/trunk/arch/arm/include/asm/parport.h b/trunk/include/asm-arm/parport.h similarity index 86% rename from trunk/arch/arm/include/asm/parport.h rename to trunk/include/asm-arm/parport.h index 26e94b09035a..f2f90c76ddd1 100644 --- a/trunk/arch/arm/include/asm/parport.h +++ b/trunk/include/asm-arm/parport.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/parport.h: ARM-specific parport initialisation + * linux/include/asm-arm/parport.h: ARM-specific parport initialisation * * Copyright (C) 1999, 2000 Tim Waugh * diff --git a/trunk/arch/arm/include/asm/pci.h b/trunk/include/asm-arm/pci.h similarity index 100% rename from trunk/arch/arm/include/asm/pci.h rename to trunk/include/asm-arm/pci.h diff --git a/trunk/arch/arm/include/asm/percpu.h b/trunk/include/asm-arm/percpu.h similarity index 100% rename from trunk/arch/arm/include/asm/percpu.h rename to trunk/include/asm-arm/percpu.h diff --git a/trunk/arch/arm/include/asm/pgalloc.h b/trunk/include/asm-arm/pgalloc.h similarity index 98% rename from trunk/arch/arm/include/asm/pgalloc.h rename to trunk/include/asm-arm/pgalloc.h index 3dcd64bf1824..163b0305dd76 100644 --- a/trunk/arch/arm/include/asm/pgalloc.h +++ b/trunk/include/asm-arm/pgalloc.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/pgalloc.h + * linux/include/asm-arm/pgalloc.h * * Copyright (C) 2000-2001 Russell King * diff --git a/trunk/arch/arm/include/asm/pgtable-hwdef.h b/trunk/include/asm-arm/pgtable-hwdef.h similarity index 98% rename from trunk/arch/arm/include/asm/pgtable-hwdef.h rename to trunk/include/asm-arm/pgtable-hwdef.h index fd1521d5cb9d..f3b5120c99fe 100644 --- a/trunk/arch/arm/include/asm/pgtable-hwdef.h +++ b/trunk/include/asm-arm/pgtable-hwdef.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/pgtable-hwdef.h + * linux/include/asm-arm/pgtable-hwdef.h * * Copyright (C) 1995-2002 Russell King * diff --git a/trunk/arch/arm/include/asm/pgtable-nommu.h b/trunk/include/asm-arm/pgtable-nommu.h similarity index 98% rename from trunk/arch/arm/include/asm/pgtable-nommu.h rename to trunk/include/asm-arm/pgtable-nommu.h index b011f2e939aa..386fcc10a973 100644 --- a/trunk/arch/arm/include/asm/pgtable-nommu.h +++ b/trunk/include/asm-arm/pgtable-nommu.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/pgtable-nommu.h + * linux/include/asm-arm/pgtable-nommu.h * * Copyright (C) 1995-2002 Russell King * Copyright (C) 2004 Hyok S. Choi diff --git a/trunk/arch/arm/include/asm/pgtable.h b/trunk/include/asm-arm/pgtable.h similarity index 99% rename from trunk/arch/arm/include/asm/pgtable.h rename to trunk/include/asm-arm/pgtable.h index 8ab060a53ab0..5571c13c3f3b 100644 --- a/trunk/arch/arm/include/asm/pgtable.h +++ b/trunk/include/asm-arm/pgtable.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/pgtable.h + * linux/include/asm-arm/pgtable.h * * Copyright (C) 1995-2002 Russell King * diff --git a/trunk/arch/s390/include/asm/poll.h b/trunk/include/asm-arm/poll.h similarity index 100% rename from trunk/arch/s390/include/asm/poll.h rename to trunk/include/asm-arm/poll.h diff --git a/trunk/arch/arm/include/asm/posix_types.h b/trunk/include/asm-arm/posix_types.h similarity index 98% rename from trunk/arch/arm/include/asm/posix_types.h rename to trunk/include/asm-arm/posix_types.h index 2446d23bfdbf..c37379dadcb2 100644 --- a/trunk/arch/arm/include/asm/posix_types.h +++ b/trunk/include/asm-arm/posix_types.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/posix_types.h + * linux/include/asm-arm/posix_types.h * * Copyright (C) 1996-1998 Russell King. * diff --git a/trunk/arch/arm/include/asm/proc-fns.h b/trunk/include/asm-arm/proc-fns.h similarity index 99% rename from trunk/arch/arm/include/asm/proc-fns.h rename to trunk/include/asm-arm/proc-fns.h index db80203b68e0..75ec760f4c74 100644 --- a/trunk/arch/arm/include/asm/proc-fns.h +++ b/trunk/include/asm-arm/proc-fns.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/proc-fns.h + * linux/include/asm-arm/proc-fns.h * * Copyright (C) 1997-1999 Russell King * Copyright (C) 2000 Deep Blue Solutions Ltd diff --git a/trunk/arch/arm/include/asm/processor.h b/trunk/include/asm-arm/processor.h similarity index 98% rename from trunk/arch/arm/include/asm/processor.h rename to trunk/include/asm-arm/processor.h index b01d5e7e3d5a..bd8029e8dc67 100644 --- a/trunk/arch/arm/include/asm/processor.h +++ b/trunk/include/asm-arm/processor.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/processor.h + * linux/include/asm-arm/processor.h * * Copyright (C) 1995-1999 Russell King * diff --git a/trunk/arch/arm/include/asm/procinfo.h b/trunk/include/asm-arm/procinfo.h similarity index 97% rename from trunk/arch/arm/include/asm/procinfo.h rename to trunk/include/asm-arm/procinfo.h index ca52e584ef74..4d3c685075e0 100644 --- a/trunk/arch/arm/include/asm/procinfo.h +++ b/trunk/include/asm-arm/procinfo.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/procinfo.h + * linux/include/asm-arm/procinfo.h * * Copyright (C) 1996-1999 Russell King * diff --git a/trunk/arch/arm/include/asm/ptrace.h b/trunk/include/asm-arm/ptrace.h similarity index 99% rename from trunk/arch/arm/include/asm/ptrace.h rename to trunk/include/asm-arm/ptrace.h index b415c0e85458..8382b7510f94 100644 --- a/trunk/arch/arm/include/asm/ptrace.h +++ b/trunk/include/asm-arm/ptrace.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/ptrace.h + * linux/include/asm-arm/ptrace.h * * Copyright (C) 1996-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/resource.h b/trunk/include/asm-arm/resource.h similarity index 100% rename from trunk/arch/arm/include/asm/resource.h rename to trunk/include/asm-arm/resource.h diff --git a/trunk/arch/arm/include/asm/scatterlist.h b/trunk/include/asm-arm/scatterlist.h similarity index 100% rename from trunk/arch/arm/include/asm/scatterlist.h rename to trunk/include/asm-arm/scatterlist.h diff --git a/trunk/arch/arm/include/asm/sections.h b/trunk/include/asm-arm/sections.h similarity index 100% rename from trunk/arch/arm/include/asm/sections.h rename to trunk/include/asm-arm/sections.h diff --git a/trunk/arch/arm/include/asm/segment.h b/trunk/include/asm-arm/segment.h similarity index 100% rename from trunk/arch/arm/include/asm/segment.h rename to trunk/include/asm-arm/segment.h diff --git a/trunk/arch/arm/include/asm/sembuf.h b/trunk/include/asm-arm/sembuf.h similarity index 100% rename from trunk/arch/arm/include/asm/sembuf.h rename to trunk/include/asm-arm/sembuf.h diff --git a/trunk/arch/arm/include/asm/serial.h b/trunk/include/asm-arm/serial.h similarity index 91% rename from trunk/arch/arm/include/asm/serial.h rename to trunk/include/asm-arm/serial.h index ebb049091e26..015b262dc145 100644 --- a/trunk/arch/arm/include/asm/serial.h +++ b/trunk/include/asm-arm/serial.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/serial.h + * linux/include/asm-arm/serial.h * * Copyright (C) 1996 Russell King. * diff --git a/trunk/arch/arm/include/asm/setup.h b/trunk/include/asm-arm/setup.h similarity index 100% rename from trunk/arch/arm/include/asm/setup.h rename to trunk/include/asm-arm/setup.h diff --git a/trunk/arch/arm/include/asm/shmbuf.h b/trunk/include/asm-arm/shmbuf.h similarity index 100% rename from trunk/arch/arm/include/asm/shmbuf.h rename to trunk/include/asm-arm/shmbuf.h diff --git a/trunk/arch/arm/include/asm/shmparam.h b/trunk/include/asm-arm/shmparam.h similarity index 100% rename from trunk/arch/arm/include/asm/shmparam.h rename to trunk/include/asm-arm/shmparam.h diff --git a/trunk/arch/arm/include/asm/sigcontext.h b/trunk/include/asm-arm/sigcontext.h similarity index 100% rename from trunk/arch/arm/include/asm/sigcontext.h rename to trunk/include/asm-arm/sigcontext.h diff --git a/trunk/arch/arm/include/asm/siginfo.h b/trunk/include/asm-arm/siginfo.h similarity index 100% rename from trunk/arch/arm/include/asm/siginfo.h rename to trunk/include/asm-arm/siginfo.h diff --git a/trunk/arch/arm/include/asm/signal.h b/trunk/include/asm-arm/signal.h similarity index 100% rename from trunk/arch/arm/include/asm/signal.h rename to trunk/include/asm-arm/signal.h diff --git a/trunk/arch/arm/include/asm/sizes.h b/trunk/include/asm-arm/sizes.h similarity index 100% rename from trunk/arch/arm/include/asm/sizes.h rename to trunk/include/asm-arm/sizes.h diff --git a/trunk/arch/arm/include/asm/smp.h b/trunk/include/asm-arm/smp.h similarity index 97% rename from trunk/arch/arm/include/asm/smp.h rename to trunk/include/asm-arm/smp.h index cc12a525a06a..7fffa2404b8e 100644 --- a/trunk/arch/arm/include/asm/smp.h +++ b/trunk/include/asm-arm/smp.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/smp.h + * linux/include/asm-arm/smp.h * * Copyright (C) 2004-2005 ARM Ltd. * @@ -17,7 +17,7 @@ #include #ifndef CONFIG_SMP -# error " included in non-SMP build" +# error " included in non-SMP build" #endif #define raw_smp_processor_id() (current_thread_info()->cpu) diff --git a/trunk/arch/arm/include/asm/socket.h b/trunk/include/asm-arm/socket.h similarity index 100% rename from trunk/arch/arm/include/asm/socket.h rename to trunk/include/asm-arm/socket.h diff --git a/trunk/arch/arm/include/asm/sockios.h b/trunk/include/asm-arm/sockios.h similarity index 100% rename from trunk/arch/arm/include/asm/sockios.h rename to trunk/include/asm-arm/sockios.h diff --git a/trunk/arch/arm/include/asm/sparsemem.h b/trunk/include/asm-arm/sparsemem.h similarity index 100% rename from trunk/arch/arm/include/asm/sparsemem.h rename to trunk/include/asm-arm/sparsemem.h diff --git a/trunk/arch/arm/include/asm/spinlock.h b/trunk/include/asm-arm/spinlock.h similarity index 100% rename from trunk/arch/arm/include/asm/spinlock.h rename to trunk/include/asm-arm/spinlock.h diff --git a/trunk/arch/arm/include/asm/spinlock_types.h b/trunk/include/asm-arm/spinlock_types.h similarity index 100% rename from trunk/arch/arm/include/asm/spinlock_types.h rename to trunk/include/asm-arm/spinlock_types.h diff --git a/trunk/arch/arm/include/asm/stat.h b/trunk/include/asm-arm/stat.h similarity index 100% rename from trunk/arch/arm/include/asm/stat.h rename to trunk/include/asm-arm/stat.h diff --git a/trunk/arch/arm/include/asm/statfs.h b/trunk/include/asm-arm/statfs.h similarity index 100% rename from trunk/arch/arm/include/asm/statfs.h rename to trunk/include/asm-arm/statfs.h diff --git a/trunk/arch/arm/include/asm/string.h b/trunk/include/asm-arm/string.h similarity index 100% rename from trunk/arch/arm/include/asm/string.h rename to trunk/include/asm-arm/string.h diff --git a/trunk/arch/arm/include/asm/suspend.h b/trunk/include/asm-arm/suspend.h similarity index 100% rename from trunk/arch/arm/include/asm/suspend.h rename to trunk/include/asm-arm/suspend.h diff --git a/trunk/arch/arm/include/asm/system.h b/trunk/include/asm-arm/system.h similarity index 100% rename from trunk/arch/arm/include/asm/system.h rename to trunk/include/asm-arm/system.h diff --git a/trunk/arch/arm/include/asm/termbits.h b/trunk/include/asm-arm/termbits.h similarity index 100% rename from trunk/arch/arm/include/asm/termbits.h rename to trunk/include/asm-arm/termbits.h diff --git a/trunk/arch/arm/include/asm/termios.h b/trunk/include/asm-arm/termios.h similarity index 100% rename from trunk/arch/arm/include/asm/termios.h rename to trunk/include/asm-arm/termios.h diff --git a/trunk/arch/arm/include/asm/therm.h b/trunk/include/asm-arm/therm.h similarity index 88% rename from trunk/arch/arm/include/asm/therm.h rename to trunk/include/asm-arm/therm.h index f002f0197d78..e51c923ecdf3 100644 --- a/trunk/arch/arm/include/asm/therm.h +++ b/trunk/include/asm-arm/therm.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/therm.h: Definitions for Dallas Semiconductor + * linux/include/asm-arm/therm.h: Definitions for Dallas Semiconductor * DS1620 thermometer driver (as used in the Rebel.com NetWinder) */ #ifndef __ASM_THERM_H diff --git a/trunk/arch/arm/include/asm/thread_info.h b/trunk/include/asm-arm/thread_info.h similarity index 97% rename from trunk/arch/arm/include/asm/thread_info.h rename to trunk/include/asm-arm/thread_info.h index e56fa48e4ae7..d4be2d646160 100644 --- a/trunk/arch/arm/include/asm/thread_info.h +++ b/trunk/include/asm-arm/thread_info.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/thread_info.h + * linux/include/asm-arm/thread_info.h * * Copyright (C) 2002 Russell King. * @@ -117,7 +117,7 @@ extern void iwmmxt_task_switch(struct thread_info *); /* * We use bit 30 of the preempt_count to indicate that kernel - * preemption is occurring. See . + * preemption is occurring. See include/asm-arm/hardirq.h. */ #define PREEMPT_ACTIVE 0x40000000 diff --git a/trunk/arch/arm/include/asm/thread_notify.h b/trunk/include/asm-arm/thread_notify.h similarity index 96% rename from trunk/arch/arm/include/asm/thread_notify.h rename to trunk/include/asm-arm/thread_notify.h index f27379d7f72a..8866e5216840 100644 --- a/trunk/arch/arm/include/asm/thread_notify.h +++ b/trunk/include/asm-arm/thread_notify.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/thread_notify.h + * linux/include/asm-arm/thread_notify.h * * Copyright (C) 2006 Russell King. * diff --git a/trunk/arch/arm/include/asm/timex.h b/trunk/include/asm-arm/timex.h similarity index 93% rename from trunk/arch/arm/include/asm/timex.h rename to trunk/include/asm-arm/timex.h index e50e2926cd6e..7b8d4cb24be0 100644 --- a/trunk/arch/arm/include/asm/timex.h +++ b/trunk/include/asm-arm/timex.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/timex.h + * linux/include/asm-arm/timex.h * * Copyright (C) 1997,1998 Russell King * diff --git a/trunk/arch/arm/include/asm/tlb.h b/trunk/include/asm-arm/tlb.h similarity index 98% rename from trunk/arch/arm/include/asm/tlb.h rename to trunk/include/asm-arm/tlb.h index 857f1dfac794..36bd402a21cb 100644 --- a/trunk/arch/arm/include/asm/tlb.h +++ b/trunk/include/asm-arm/tlb.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/tlb.h + * linux/include/asm-arm/tlb.h * * Copyright (C) 2002 Russell King * diff --git a/trunk/arch/arm/include/asm/tlbflush.h b/trunk/include/asm-arm/tlbflush.h similarity index 99% rename from trunk/arch/arm/include/asm/tlbflush.h rename to trunk/include/asm-arm/tlbflush.h index 0d0d40f1b599..909656c747ef 100644 --- a/trunk/arch/arm/include/asm/tlbflush.h +++ b/trunk/include/asm-arm/tlbflush.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/tlbflush.h + * linux/include/asm-arm/tlbflush.h * * Copyright (C) 1999-2003 Russell King * diff --git a/trunk/arch/arm/include/asm/topology.h b/trunk/include/asm-arm/topology.h similarity index 100% rename from trunk/arch/arm/include/asm/topology.h rename to trunk/include/asm-arm/topology.h diff --git a/trunk/arch/arm/include/asm/traps.h b/trunk/include/asm-arm/traps.h similarity index 100% rename from trunk/arch/arm/include/asm/traps.h rename to trunk/include/asm-arm/traps.h diff --git a/trunk/arch/arm/include/asm/types.h b/trunk/include/asm-arm/types.h similarity index 100% rename from trunk/arch/arm/include/asm/types.h rename to trunk/include/asm-arm/types.h diff --git a/trunk/arch/arm/include/asm/uaccess.h b/trunk/include/asm-arm/uaccess.h similarity index 99% rename from trunk/arch/arm/include/asm/uaccess.h rename to trunk/include/asm-arm/uaccess.h index d0f51ff900b5..4c1a3fa9f259 100644 --- a/trunk/arch/arm/include/asm/uaccess.h +++ b/trunk/include/asm-arm/uaccess.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/uaccess.h + * linux/include/asm-arm/uaccess.h * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/trunk/arch/arm/include/asm/ucontext.h b/trunk/include/asm-arm/ucontext.h similarity index 100% rename from trunk/arch/arm/include/asm/ucontext.h rename to trunk/include/asm-arm/ucontext.h diff --git a/trunk/arch/arm/include/asm/unaligned.h b/trunk/include/asm-arm/unaligned.h similarity index 100% rename from trunk/arch/arm/include/asm/unaligned.h rename to trunk/include/asm-arm/unaligned.h diff --git a/trunk/arch/arm/include/asm/unistd.h b/trunk/include/asm-arm/unistd.h similarity index 99% rename from trunk/arch/arm/include/asm/unistd.h rename to trunk/include/asm-arm/unistd.h index f95fbb2fcb5f..7c570082b1e0 100644 --- a/trunk/arch/arm/include/asm/unistd.h +++ b/trunk/include/asm-arm/unistd.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/unistd.h + * linux/include/asm-arm/unistd.h * * Copyright (C) 2001-2005 Russell King * diff --git a/trunk/arch/arm/include/asm/user.h b/trunk/include/asm-arm/user.h similarity index 100% rename from trunk/arch/arm/include/asm/user.h rename to trunk/include/asm-arm/user.h diff --git a/trunk/arch/arm/include/asm/vfp.h b/trunk/include/asm-arm/vfp.h similarity index 98% rename from trunk/arch/arm/include/asm/vfp.h rename to trunk/include/asm-arm/vfp.h index f4ab34fd4f72..5f9a2cb3d452 100644 --- a/trunk/arch/arm/include/asm/vfp.h +++ b/trunk/include/asm-arm/vfp.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/vfp.h + * linux/include/asm-arm/vfp.h * * VFP register definitions. * First, the standard VFP set. diff --git a/trunk/arch/arm/include/asm/vfpmacros.h b/trunk/include/asm-arm/vfpmacros.h similarity index 97% rename from trunk/arch/arm/include/asm/vfpmacros.h rename to trunk/include/asm-arm/vfpmacros.h index 422f3cc204a2..cccb3892e73c 100644 --- a/trunk/arch/arm/include/asm/vfpmacros.h +++ b/trunk/include/asm-arm/vfpmacros.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/vfpmacros.h + * linux/include/asm-arm/vfpmacros.h * * Assembler-only file containing VFP macros and register definitions. */ diff --git a/trunk/arch/arm/include/asm/vga.h b/trunk/include/asm-arm/vga.h similarity index 100% rename from trunk/arch/arm/include/asm/vga.h rename to trunk/include/asm-arm/vga.h diff --git a/trunk/arch/arm/include/asm/xor.h b/trunk/include/asm-arm/xor.h similarity index 99% rename from trunk/arch/arm/include/asm/xor.h rename to trunk/include/asm-arm/xor.h index 7604673dc427..e7c4cf58bed1 100644 --- a/trunk/arch/arm/include/asm/xor.h +++ b/trunk/include/asm-arm/xor.h @@ -1,5 +1,5 @@ /* - * arch/arm/include/asm/xor.h + * linux/include/asm-arm/xor.h * * Copyright (C) 2001 Russell King * diff --git a/trunk/include/asm-m68k/contregs.h b/trunk/include/asm-m68k/contregs.h index d1ea750bddfe..1e233e7d191e 100644 --- a/trunk/include/asm-m68k/contregs.h +++ b/trunk/include/asm-m68k/contregs.h @@ -1,53 +1,4 @@ #ifndef _M68K_CONTREGS_H #define _M68K_CONTREGS_H - -/* contregs.h: Addresses of registers in the ASI_CONTROL alternate address - * space. These are for the mmu's context register, etc. - * - * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) - */ - -/* 3=sun3 - 4=sun4 (as in sun4 sysmaint student book) - c=sun4c (according to davem) */ - -#define AC_IDPROM 0x00000000 /* 34 ID PROM, R/O, byte, 32 bytes */ -#define AC_PAGEMAP 0x10000000 /* 3 Pagemap R/W, long */ -#define AC_SEGMAP 0x20000000 /* 3 Segment map, byte */ -#define AC_CONTEXT 0x30000000 /* 34c current mmu-context */ -#define AC_SENABLE 0x40000000 /* 34c system dvma/cache/reset enable reg*/ -#define AC_UDVMA_ENB 0x50000000 /* 34 Not used on Sun boards, byte */ -#define AC_BUS_ERROR 0x60000000 /* 34 Not cleared on read, byte. */ -#define AC_SYNC_ERR 0x60000000 /* c fault type */ -#define AC_SYNC_VA 0x60000004 /* c fault virtual address */ -#define AC_ASYNC_ERR 0x60000008 /* c asynchronous fault type */ -#define AC_ASYNC_VA 0x6000000c /* c async fault virtual address */ -#define AC_LEDS 0x70000000 /* 34 Zero turns on LEDs, byte */ -#define AC_CACHETAGS 0x80000000 /* 34c direct access to the VAC tags */ -#define AC_CACHEDDATA 0x90000000 /* 3 c direct access to the VAC data */ -#define AC_UDVMA_MAP 0xD0000000 /* 4 Not used on Sun boards, byte */ -#define AC_VME_VECTOR 0xE0000000 /* 4 For non-Autovector VME, byte */ -#define AC_BOOT_SCC 0xF0000000 /* 34 bypass to access Zilog 8530. byte.*/ - -/* s=Swift, h=Ross_HyperSPARC, v=TI_Viking, t=Tsunami, r=Ross_Cypress */ -#define AC_M_PCR 0x0000 /* shv Processor Control Reg */ -#define AC_M_CTPR 0x0100 /* shv Context Table Pointer Reg */ -#define AC_M_CXR 0x0200 /* shv Context Register */ -#define AC_M_SFSR 0x0300 /* shv Synchronous Fault Status Reg */ -#define AC_M_SFAR 0x0400 /* shv Synchronous Fault Address Reg */ -#define AC_M_AFSR 0x0500 /* hv Asynchronous Fault Status Reg */ -#define AC_M_AFAR 0x0600 /* hv Asynchronous Fault Address Reg */ -#define AC_M_RESET 0x0700 /* hv Reset Reg */ -#define AC_M_RPR 0x1000 /* hv Root Pointer Reg */ -#define AC_M_TSUTRCR 0x1000 /* s TLB Replacement Ctrl Reg */ -#define AC_M_IAPTP 0x1100 /* hv Instruction Access PTP */ -#define AC_M_DAPTP 0x1200 /* hv Data Access PTP */ -#define AC_M_ITR 0x1300 /* hv Index Tag Register */ -#define AC_M_TRCR 0x1400 /* hv TLB Replacement Control Reg */ -#define AC_M_SFSRX 0x1300 /* s Synch Fault Status Reg prim */ -#define AC_M_SFARX 0x1400 /* s Synch Fault Address Reg prim */ -#define AC_M_RPR1 0x1500 /* h Root Pointer Reg (entry 2) */ -#define AC_M_IAPTP1 0x1600 /* h Instruction Access PTP (entry 2) */ -#define AC_M_DAPTP1 0x1700 /* h Data Access PTP (entry 2) */ - +#include #endif /* _M68K_CONTREGS_H */ diff --git a/trunk/include/asm-m68k/fbio.h b/trunk/include/asm-m68k/fbio.h index b9215a0907d3..c17edf8c7bc4 100644 --- a/trunk/include/asm-m68k/fbio.h +++ b/trunk/include/asm-m68k/fbio.h @@ -1,330 +1 @@ -#ifndef __LINUX_FBIO_H -#define __LINUX_FBIO_H - -#include -#include - -/* Constants used for fbio SunOS compatibility */ -/* (C) 1996 Miguel de Icaza */ - -/* Frame buffer types */ -#define FBTYPE_NOTYPE -1 -#define FBTYPE_SUN1BW 0 /* mono */ -#define FBTYPE_SUN1COLOR 1 -#define FBTYPE_SUN2BW 2 -#define FBTYPE_SUN2COLOR 3 -#define FBTYPE_SUN2GP 4 -#define FBTYPE_SUN5COLOR 5 -#define FBTYPE_SUN3COLOR 6 -#define FBTYPE_MEMCOLOR 7 -#define FBTYPE_SUN4COLOR 8 - -#define FBTYPE_NOTSUN1 9 -#define FBTYPE_NOTSUN2 10 -#define FBTYPE_NOTSUN3 11 - -#define FBTYPE_SUNFAST_COLOR 12 /* cg6 */ -#define FBTYPE_SUNROP_COLOR 13 -#define FBTYPE_SUNFB_VIDEO 14 -#define FBTYPE_SUNGIFB 15 -#define FBTYPE_SUNGPLAS 16 -#define FBTYPE_SUNGP3 17 -#define FBTYPE_SUNGT 18 -#define FBTYPE_SUNLEO 19 /* zx Leo card */ -#define FBTYPE_MDICOLOR 20 /* cg14 */ -#define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */ - -#define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */ - -/* Does not seem to be listed in the Sun file either */ -#define FBTYPE_CREATOR 22 -#define FBTYPE_PCI_IGA1682 23 -#define FBTYPE_P9100COLOR 24 - -#define FBTYPE_PCI_GENERIC 1000 -#define FBTYPE_PCI_MACH64 1001 - -/* fbio ioctls */ -/* Returned by FBIOGTYPE */ -struct fbtype { - int fb_type; /* fb type, see above */ - int fb_height; /* pixels */ - int fb_width; /* pixels */ - int fb_depth; - int fb_cmsize; /* color map entries */ - int fb_size; /* fb size in bytes */ -}; -#define FBIOGTYPE _IOR('F', 0, struct fbtype) - -struct fbcmap { - int index; /* first element (0 origin) */ - int count; - unsigned char __user *red; - unsigned char __user *green; - unsigned char __user *blue; -}; - -#ifdef __KERNEL__ -#define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) -#define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) -#else -#define FBIOPUTCMAP _IOW('F', 3, struct fbcmap) -#define FBIOGETCMAP _IOW('F', 4, struct fbcmap) -#endif - -/* # of device specific values */ -#define FB_ATTR_NDEVSPECIFIC 8 -/* # of possible emulations */ -#define FB_ATTR_NEMUTYPES 4 - -struct fbsattr { - int flags; - int emu_type; /* -1 if none */ - int dev_specific[FB_ATTR_NDEVSPECIFIC]; -}; - -struct fbgattr { - int real_type; /* real frame buffer type */ - int owner; /* unknown */ - struct fbtype fbtype; /* real frame buffer fbtype */ - struct fbsattr sattr; - int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */ -}; -#define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */ -#define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */ - -#define FBIOSVIDEO _IOW('F', 7, int) -#define FBIOGVIDEO _IOR('F', 8, int) - -struct fbcursor { - short set; /* what to set, choose from the list above */ - short enable; /* cursor on/off */ - struct fbcurpos pos; /* cursor position */ - struct fbcurpos hot; /* cursor hot spot */ - struct fbcmap cmap; /* color map info */ - struct fbcurpos size; /* cursor bit map size */ - char __user *image; /* cursor image bits */ - char __user *mask; /* cursor mask bits */ -}; - -/* set/get cursor attributes/shape */ -#define FBIOSCURSOR _IOW('F', 24, struct fbcursor) -#define FBIOGCURSOR _IOWR('F', 25, struct fbcursor) - -/* set/get cursor position */ -#define FBIOSCURPOS _IOW('F', 26, struct fbcurpos) -#define FBIOGCURPOS _IOW('F', 27, struct fbcurpos) - -/* get max cursor size */ -#define FBIOGCURMAX _IOR('F', 28, struct fbcurpos) - -/* wid manipulation */ -struct fb_wid_alloc { -#define FB_WID_SHARED_8 0 -#define FB_WID_SHARED_24 1 -#define FB_WID_DBL_8 2 -#define FB_WID_DBL_24 3 - __u32 wa_type; - __s32 wa_index; /* Set on return */ - __u32 wa_count; -}; -struct fb_wid_item { - __u32 wi_type; - __s32 wi_index; - __u32 wi_attrs; - __u32 wi_values[32]; -}; -struct fb_wid_list { - __u32 wl_flags; - __u32 wl_count; - struct fb_wid_item *wl_list; -}; - -#define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc) -#define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc) -#define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list) -#define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list) - -/* Creator ioctls */ -#define FFB_IOCTL ('F'<<8) -#define FFB_SYS_INFO (FFB_IOCTL|80) -#define FFB_CLUTREAD (FFB_IOCTL|81) -#define FFB_CLUTPOST (FFB_IOCTL|82) -#define FFB_SETDIAGMODE (FFB_IOCTL|83) -#define FFB_GETMONITORID (FFB_IOCTL|84) -#define FFB_GETVIDEOMODE (FFB_IOCTL|85) -#define FFB_SETVIDEOMODE (FFB_IOCTL|86) -#define FFB_SETSERVER (FFB_IOCTL|87) -#define FFB_SETOVCTL (FFB_IOCTL|88) -#define FFB_GETOVCTL (FFB_IOCTL|89) -#define FFB_GETSAXNUM (FFB_IOCTL|90) -#define FFB_FBDEBUG (FFB_IOCTL|91) - -/* Cg14 ioctls */ -#define MDI_IOCTL ('M'<<8) -#define MDI_RESET (MDI_IOCTL|1) -#define MDI_GET_CFGINFO (MDI_IOCTL|2) -#define MDI_SET_PIXELMODE (MDI_IOCTL|3) -# define MDI_32_PIX 32 -# define MDI_16_PIX 16 -# define MDI_8_PIX 8 - -struct mdi_cfginfo { - int mdi_ncluts; /* Number of implemented CLUTs in this MDI */ - int mdi_type; /* FBTYPE name */ - int mdi_height; /* height */ - int mdi_width; /* widht */ - int mdi_size; /* available ram */ - int mdi_mode; /* 8bpp, 16bpp or 32bpp */ - int mdi_pixfreq; /* pixel clock (from PROM) */ -}; - -/* SparcLinux specific ioctl for the MDI, should be replaced for - * the SET_XLUT/SET_CLUTn ioctls instead - */ -#define MDI_CLEAR_XLUT (MDI_IOCTL|9) - -/* leo & ffb ioctls */ -struct fb_clut_alloc { - __u32 clutid; /* Set on return */ - __u32 flag; - __u32 index; -}; - -struct fb_clut { -#define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */ - __u32 flag; - __u32 clutid; - __u32 offset; - __u32 count; - char * red; - char * green; - char * blue; -}; - -struct fb_clut32 { - __u32 flag; - __u32 clutid; - __u32 offset; - __u32 count; - __u32 red; - __u32 green; - __u32 blue; -}; - -#define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc) -#define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc) -#define LEO_CLUTREAD _IOW('L', 55, struct fb_clut) -#define LEO_CLUTPOST _IOW('L', 56, struct fb_clut) -#define LEO_SETGAMMA _IOW('L', 68, int) /* Not yet implemented */ -#define LEO_GETGAMMA _IOR('L', 69, int) /* Not yet implemented */ - -#ifdef __KERNEL__ -/* Addresses on the fd of a cgsix that are mappable */ -#define CG6_FBC 0x70000000 -#define CG6_TEC 0x70001000 -#define CG6_BTREGS 0x70002000 -#define CG6_FHC 0x70004000 -#define CG6_THC 0x70005000 -#define CG6_ROM 0x70006000 -#define CG6_RAM 0x70016000 -#define CG6_DHC 0x80000000 - -#define CG3_MMAP_OFFSET 0x4000000 - -/* Addresses on the fd of a tcx that are mappable */ -#define TCX_RAM8BIT 0x00000000 -#define TCX_RAM24BIT 0x01000000 -#define TCX_UNK3 0x10000000 -#define TCX_UNK4 0x20000000 -#define TCX_CONTROLPLANE 0x28000000 -#define TCX_UNK6 0x30000000 -#define TCX_UNK7 0x38000000 -#define TCX_TEC 0x70000000 -#define TCX_BTREGS 0x70002000 -#define TCX_THC 0x70004000 -#define TCX_DHC 0x70008000 -#define TCX_ALT 0x7000a000 -#define TCX_SYNC 0x7000e000 -#define TCX_UNK2 0x70010000 - -/* CG14 definitions */ - -/* Offsets into the OBIO space: */ -#define CG14_REGS 0 /* registers */ -#define CG14_CURSORREGS 0x1000 /* cursor registers */ -#define CG14_DACREGS 0x2000 /* DAC registers */ -#define CG14_XLUT 0x3000 /* X Look Up Table -- ??? */ -#define CG14_CLUT1 0x4000 /* Color Look Up Table */ -#define CG14_CLUT2 0x5000 /* Color Look Up Table */ -#define CG14_CLUT3 0x6000 /* Color Look Up Table */ -#define CG14_AUTO 0xf000 - -#endif /* KERNEL */ - -/* These are exported to userland for applications to use */ -/* Mappable offsets for the cg14: control registers */ -#define MDI_DIRECT_MAP 0x10000000 -#define MDI_CTLREG_MAP 0x20000000 -#define MDI_CURSOR_MAP 0x30000000 -#define MDI_SHDW_VRT_MAP 0x40000000 - -/* Mappable offsets for the cg14: frame buffer resolutions */ -/* 32 bits */ -#define MDI_CHUNKY_XBGR_MAP 0x50000000 -#define MDI_CHUNKY_BGR_MAP 0x60000000 - -/* 16 bits */ -#define MDI_PLANAR_X16_MAP 0x70000000 -#define MDI_PLANAR_C16_MAP 0x80000000 - -/* 8 bit is done as CG3 MMAP offset */ -/* 32 bits, planar */ -#define MDI_PLANAR_X32_MAP 0x90000000 -#define MDI_PLANAR_B32_MAP 0xa0000000 -#define MDI_PLANAR_G32_MAP 0xb0000000 -#define MDI_PLANAR_R32_MAP 0xc0000000 - -/* Mappable offsets on leo */ -#define LEO_SS0_MAP 0x00000000 -#define LEO_LC_SS0_USR_MAP 0x00800000 -#define LEO_LD_SS0_MAP 0x00801000 -#define LEO_LX_CURSOR_MAP 0x00802000 -#define LEO_SS1_MAP 0x00803000 -#define LEO_LC_SS1_USR_MAP 0x01003000 -#define LEO_LD_SS1_MAP 0x01004000 -#define LEO_UNK_MAP 0x01005000 -#define LEO_LX_KRN_MAP 0x01006000 -#define LEO_LC_SS0_KRN_MAP 0x01007000 -#define LEO_LC_SS1_KRN_MAP 0x01008000 -#define LEO_LD_GBL_MAP 0x01009000 -#define LEO_UNK2_MAP 0x0100a000 - -#ifdef __KERNEL__ -struct fbcmap32 { - int index; /* first element (0 origin) */ - int count; - u32 red; - u32 green; - u32 blue; -}; - -#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) -#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) - -struct fbcursor32 { - short set; /* what to set, choose from the list above */ - short enable; /* cursor on/off */ - struct fbcurpos pos; /* cursor position */ - struct fbcurpos hot; /* cursor hot spot */ - struct fbcmap32 cmap; /* color map info */ - struct fbcurpos size; /* cursor bit map size */ - u32 image; /* cursor image bits */ - u32 mask; /* cursor mask bits */ -}; - -#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) -#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) -#endif - -#endif /* __LINUX_FBIO_H */ +#include diff --git a/trunk/include/asm-m68k/idprom.h b/trunk/include/asm-m68k/idprom.h index 160616a89e05..4349eaf3cfe4 100644 --- a/trunk/include/asm-m68k/idprom.h +++ b/trunk/include/asm-m68k/idprom.h @@ -1,25 +1,6 @@ #ifndef _M68K_IDPROM_H #define _M68K_IDPROM_H -/* - * idprom.h: Macros and defines for idprom routines - * - * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) - */ - -#include - -struct idprom { - u8 id_format; /* Format identifier (always 0x01) */ - u8 id_machtype; /* Machine type */ - u8 id_ethaddr[6]; /* Hardware ethernet address */ - s32 id_date; /* Date of manufacture */ - u32 id_sernum:24; /* Unique serial number */ - u8 id_cksum; /* Checksum - xor of the data bytes */ - u8 reserved[16]; -}; - -extern struct idprom *idprom; -extern void idprom_init(void); +#include /* Sun3: in control space */ #define SUN3_IDPROM_BASE 0x00000000 diff --git a/trunk/arch/s390/include/asm/Kbuild b/trunk/include/asm-s390/Kbuild similarity index 100% rename from trunk/arch/s390/include/asm/Kbuild rename to trunk/include/asm-s390/Kbuild diff --git a/trunk/arch/s390/include/asm/airq.h b/trunk/include/asm-s390/airq.h similarity index 100% rename from trunk/arch/s390/include/asm/airq.h rename to trunk/include/asm-s390/airq.h diff --git a/trunk/arch/s390/include/asm/appldata.h b/trunk/include/asm-s390/appldata.h similarity index 100% rename from trunk/arch/s390/include/asm/appldata.h rename to trunk/include/asm-s390/appldata.h diff --git a/trunk/arch/s390/include/asm/atomic.h b/trunk/include/asm-s390/atomic.h similarity index 100% rename from trunk/arch/s390/include/asm/atomic.h rename to trunk/include/asm-s390/atomic.h diff --git a/trunk/arch/s390/include/asm/auxvec.h b/trunk/include/asm-s390/auxvec.h similarity index 100% rename from trunk/arch/s390/include/asm/auxvec.h rename to trunk/include/asm-s390/auxvec.h diff --git a/trunk/arch/s390/include/asm/bitops.h b/trunk/include/asm-s390/bitops.h similarity index 100% rename from trunk/arch/s390/include/asm/bitops.h rename to trunk/include/asm-s390/bitops.h diff --git a/trunk/arch/s390/include/asm/bug.h b/trunk/include/asm-s390/bug.h similarity index 100% rename from trunk/arch/s390/include/asm/bug.h rename to trunk/include/asm-s390/bug.h diff --git a/trunk/arch/s390/include/asm/bugs.h b/trunk/include/asm-s390/bugs.h similarity index 100% rename from trunk/arch/s390/include/asm/bugs.h rename to trunk/include/asm-s390/bugs.h diff --git a/trunk/arch/s390/include/asm/byteorder.h b/trunk/include/asm-s390/byteorder.h similarity index 100% rename from trunk/arch/s390/include/asm/byteorder.h rename to trunk/include/asm-s390/byteorder.h diff --git a/trunk/arch/s390/include/asm/cache.h b/trunk/include/asm-s390/cache.h similarity index 100% rename from trunk/arch/s390/include/asm/cache.h rename to trunk/include/asm-s390/cache.h diff --git a/trunk/arch/s390/include/asm/cacheflush.h b/trunk/include/asm-s390/cacheflush.h similarity index 100% rename from trunk/arch/s390/include/asm/cacheflush.h rename to trunk/include/asm-s390/cacheflush.h diff --git a/trunk/arch/s390/include/asm/ccwdev.h b/trunk/include/asm-s390/ccwdev.h similarity index 100% rename from trunk/arch/s390/include/asm/ccwdev.h rename to trunk/include/asm-s390/ccwdev.h diff --git a/trunk/arch/s390/include/asm/ccwgroup.h b/trunk/include/asm-s390/ccwgroup.h similarity index 100% rename from trunk/arch/s390/include/asm/ccwgroup.h rename to trunk/include/asm-s390/ccwgroup.h diff --git a/trunk/arch/s390/include/asm/checksum.h b/trunk/include/asm-s390/checksum.h similarity index 100% rename from trunk/arch/s390/include/asm/checksum.h rename to trunk/include/asm-s390/checksum.h diff --git a/trunk/arch/s390/include/asm/chpid.h b/trunk/include/asm-s390/chpid.h similarity index 100% rename from trunk/arch/s390/include/asm/chpid.h rename to trunk/include/asm-s390/chpid.h diff --git a/trunk/arch/s390/include/asm/chsc.h b/trunk/include/asm-s390/chsc.h similarity index 100% rename from trunk/arch/s390/include/asm/chsc.h rename to trunk/include/asm-s390/chsc.h diff --git a/trunk/arch/s390/include/asm/cio.h b/trunk/include/asm-s390/cio.h similarity index 100% rename from trunk/arch/s390/include/asm/cio.h rename to trunk/include/asm-s390/cio.h diff --git a/trunk/arch/s390/include/asm/cmb.h b/trunk/include/asm-s390/cmb.h similarity index 100% rename from trunk/arch/s390/include/asm/cmb.h rename to trunk/include/asm-s390/cmb.h diff --git a/trunk/arch/s390/include/asm/compat.h b/trunk/include/asm-s390/compat.h similarity index 100% rename from trunk/arch/s390/include/asm/compat.h rename to trunk/include/asm-s390/compat.h diff --git a/trunk/arch/s390/include/asm/cpcmd.h b/trunk/include/asm-s390/cpcmd.h similarity index 100% rename from trunk/arch/s390/include/asm/cpcmd.h rename to trunk/include/asm-s390/cpcmd.h diff --git a/trunk/arch/s390/include/asm/cpu.h b/trunk/include/asm-s390/cpu.h similarity index 100% rename from trunk/arch/s390/include/asm/cpu.h rename to trunk/include/asm-s390/cpu.h diff --git a/trunk/arch/s390/include/asm/cputime.h b/trunk/include/asm-s390/cputime.h similarity index 100% rename from trunk/arch/s390/include/asm/cputime.h rename to trunk/include/asm-s390/cputime.h diff --git a/trunk/arch/s390/include/asm/current.h b/trunk/include/asm-s390/current.h similarity index 100% rename from trunk/arch/s390/include/asm/current.h rename to trunk/include/asm-s390/current.h diff --git a/trunk/arch/s390/include/asm/dasd.h b/trunk/include/asm-s390/dasd.h similarity index 100% rename from trunk/arch/s390/include/asm/dasd.h rename to trunk/include/asm-s390/dasd.h diff --git a/trunk/arch/s390/include/asm/debug.h b/trunk/include/asm-s390/debug.h similarity index 100% rename from trunk/arch/s390/include/asm/debug.h rename to trunk/include/asm-s390/debug.h diff --git a/trunk/arch/s390/include/asm/delay.h b/trunk/include/asm-s390/delay.h similarity index 100% rename from trunk/arch/s390/include/asm/delay.h rename to trunk/include/asm-s390/delay.h diff --git a/trunk/arch/s390/include/asm/device.h b/trunk/include/asm-s390/device.h similarity index 100% rename from trunk/arch/s390/include/asm/device.h rename to trunk/include/asm-s390/device.h diff --git a/trunk/arch/s390/include/asm/diag.h b/trunk/include/asm-s390/diag.h similarity index 100% rename from trunk/arch/s390/include/asm/diag.h rename to trunk/include/asm-s390/diag.h diff --git a/trunk/include/asm-powerpc/div64.h b/trunk/include/asm-s390/div64.h similarity index 100% rename from trunk/include/asm-powerpc/div64.h rename to trunk/include/asm-s390/div64.h diff --git a/trunk/arch/s390/include/asm/dma.h b/trunk/include/asm-s390/dma.h similarity index 100% rename from trunk/arch/s390/include/asm/dma.h rename to trunk/include/asm-s390/dma.h diff --git a/trunk/arch/s390/include/asm/ebcdic.h b/trunk/include/asm-s390/ebcdic.h similarity index 100% rename from trunk/arch/s390/include/asm/ebcdic.h rename to trunk/include/asm-s390/ebcdic.h diff --git a/trunk/arch/s390/include/asm/elf.h b/trunk/include/asm-s390/elf.h similarity index 100% rename from trunk/arch/s390/include/asm/elf.h rename to trunk/include/asm-s390/elf.h diff --git a/trunk/arch/s390/include/asm/emergency-restart.h b/trunk/include/asm-s390/emergency-restart.h similarity index 100% rename from trunk/arch/s390/include/asm/emergency-restart.h rename to trunk/include/asm-s390/emergency-restart.h diff --git a/trunk/arch/s390/include/asm/errno.h b/trunk/include/asm-s390/errno.h similarity index 100% rename from trunk/arch/s390/include/asm/errno.h rename to trunk/include/asm-s390/errno.h diff --git a/trunk/arch/s390/include/asm/etr.h b/trunk/include/asm-s390/etr.h similarity index 100% rename from trunk/arch/s390/include/asm/etr.h rename to trunk/include/asm-s390/etr.h diff --git a/trunk/arch/s390/include/asm/extmem.h b/trunk/include/asm-s390/extmem.h similarity index 100% rename from trunk/arch/s390/include/asm/extmem.h rename to trunk/include/asm-s390/extmem.h diff --git a/trunk/arch/s390/include/asm/fb.h b/trunk/include/asm-s390/fb.h similarity index 100% rename from trunk/arch/s390/include/asm/fb.h rename to trunk/include/asm-s390/fb.h diff --git a/trunk/arch/s390/include/asm/fcntl.h b/trunk/include/asm-s390/fcntl.h similarity index 100% rename from trunk/arch/s390/include/asm/fcntl.h rename to trunk/include/asm-s390/fcntl.h diff --git a/trunk/arch/s390/include/asm/fcx.h b/trunk/include/asm-s390/fcx.h similarity index 100% rename from trunk/arch/s390/include/asm/fcx.h rename to trunk/include/asm-s390/fcx.h diff --git a/trunk/arch/s390/include/asm/futex.h b/trunk/include/asm-s390/futex.h similarity index 100% rename from trunk/arch/s390/include/asm/futex.h rename to trunk/include/asm-s390/futex.h diff --git a/trunk/arch/s390/include/asm/hardirq.h b/trunk/include/asm-s390/hardirq.h similarity index 100% rename from trunk/arch/s390/include/asm/hardirq.h rename to trunk/include/asm-s390/hardirq.h diff --git a/trunk/arch/s390/include/asm/hugetlb.h b/trunk/include/asm-s390/hugetlb.h similarity index 100% rename from trunk/arch/s390/include/asm/hugetlb.h rename to trunk/include/asm-s390/hugetlb.h diff --git a/trunk/arch/s390/include/asm/idals.h b/trunk/include/asm-s390/idals.h similarity index 100% rename from trunk/arch/s390/include/asm/idals.h rename to trunk/include/asm-s390/idals.h diff --git a/trunk/arch/s390/include/asm/io.h b/trunk/include/asm-s390/io.h similarity index 100% rename from trunk/arch/s390/include/asm/io.h rename to trunk/include/asm-s390/io.h diff --git a/trunk/arch/s390/include/asm/ioctl.h b/trunk/include/asm-s390/ioctl.h similarity index 100% rename from trunk/arch/s390/include/asm/ioctl.h rename to trunk/include/asm-s390/ioctl.h diff --git a/trunk/arch/s390/include/asm/ioctls.h b/trunk/include/asm-s390/ioctls.h similarity index 100% rename from trunk/arch/s390/include/asm/ioctls.h rename to trunk/include/asm-s390/ioctls.h diff --git a/trunk/arch/s390/include/asm/ipcbuf.h b/trunk/include/asm-s390/ipcbuf.h similarity index 100% rename from trunk/arch/s390/include/asm/ipcbuf.h rename to trunk/include/asm-s390/ipcbuf.h diff --git a/trunk/arch/s390/include/asm/ipl.h b/trunk/include/asm-s390/ipl.h similarity index 100% rename from trunk/arch/s390/include/asm/ipl.h rename to trunk/include/asm-s390/ipl.h diff --git a/trunk/arch/s390/include/asm/irq.h b/trunk/include/asm-s390/irq.h similarity index 100% rename from trunk/arch/s390/include/asm/irq.h rename to trunk/include/asm-s390/irq.h diff --git a/trunk/arch/s390/include/asm/irq_regs.h b/trunk/include/asm-s390/irq_regs.h similarity index 100% rename from trunk/arch/s390/include/asm/irq_regs.h rename to trunk/include/asm-s390/irq_regs.h diff --git a/trunk/arch/s390/include/asm/irqflags.h b/trunk/include/asm-s390/irqflags.h similarity index 100% rename from trunk/arch/s390/include/asm/irqflags.h rename to trunk/include/asm-s390/irqflags.h diff --git a/trunk/arch/s390/include/asm/isc.h b/trunk/include/asm-s390/isc.h similarity index 100% rename from trunk/arch/s390/include/asm/isc.h rename to trunk/include/asm-s390/isc.h diff --git a/trunk/arch/s390/include/asm/itcw.h b/trunk/include/asm-s390/itcw.h similarity index 100% rename from trunk/arch/s390/include/asm/itcw.h rename to trunk/include/asm-s390/itcw.h diff --git a/trunk/arch/s390/include/asm/kdebug.h b/trunk/include/asm-s390/kdebug.h similarity index 100% rename from trunk/arch/s390/include/asm/kdebug.h rename to trunk/include/asm-s390/kdebug.h diff --git a/trunk/arch/s390/include/asm/kexec.h b/trunk/include/asm-s390/kexec.h similarity index 100% rename from trunk/arch/s390/include/asm/kexec.h rename to trunk/include/asm-s390/kexec.h diff --git a/trunk/arch/s390/include/asm/kmap_types.h b/trunk/include/asm-s390/kmap_types.h similarity index 100% rename from trunk/arch/s390/include/asm/kmap_types.h rename to trunk/include/asm-s390/kmap_types.h diff --git a/trunk/arch/s390/include/asm/kprobes.h b/trunk/include/asm-s390/kprobes.h similarity index 100% rename from trunk/arch/s390/include/asm/kprobes.h rename to trunk/include/asm-s390/kprobes.h diff --git a/trunk/arch/s390/include/asm/kvm.h b/trunk/include/asm-s390/kvm.h similarity index 100% rename from trunk/arch/s390/include/asm/kvm.h rename to trunk/include/asm-s390/kvm.h diff --git a/trunk/arch/s390/include/asm/kvm_host.h b/trunk/include/asm-s390/kvm_host.h similarity index 100% rename from trunk/arch/s390/include/asm/kvm_host.h rename to trunk/include/asm-s390/kvm_host.h diff --git a/trunk/arch/s390/include/asm/kvm_para.h b/trunk/include/asm-s390/kvm_para.h similarity index 100% rename from trunk/arch/s390/include/asm/kvm_para.h rename to trunk/include/asm-s390/kvm_para.h diff --git a/trunk/arch/s390/include/asm/kvm_virtio.h b/trunk/include/asm-s390/kvm_virtio.h similarity index 100% rename from trunk/arch/s390/include/asm/kvm_virtio.h rename to trunk/include/asm-s390/kvm_virtio.h diff --git a/trunk/arch/s390/include/asm/linkage.h b/trunk/include/asm-s390/linkage.h similarity index 100% rename from trunk/arch/s390/include/asm/linkage.h rename to trunk/include/asm-s390/linkage.h diff --git a/trunk/arch/s390/include/asm/local.h b/trunk/include/asm-s390/local.h similarity index 100% rename from trunk/arch/s390/include/asm/local.h rename to trunk/include/asm-s390/local.h diff --git a/trunk/arch/s390/include/asm/lowcore.h b/trunk/include/asm-s390/lowcore.h similarity index 100% rename from trunk/arch/s390/include/asm/lowcore.h rename to trunk/include/asm-s390/lowcore.h diff --git a/trunk/arch/s390/include/asm/mathemu.h b/trunk/include/asm-s390/mathemu.h similarity index 100% rename from trunk/arch/s390/include/asm/mathemu.h rename to trunk/include/asm-s390/mathemu.h diff --git a/trunk/arch/s390/include/asm/mman.h b/trunk/include/asm-s390/mman.h similarity index 100% rename from trunk/arch/s390/include/asm/mman.h rename to trunk/include/asm-s390/mman.h diff --git a/trunk/arch/s390/include/asm/mmu.h b/trunk/include/asm-s390/mmu.h similarity index 100% rename from trunk/arch/s390/include/asm/mmu.h rename to trunk/include/asm-s390/mmu.h diff --git a/trunk/arch/s390/include/asm/mmu_context.h b/trunk/include/asm-s390/mmu_context.h similarity index 100% rename from trunk/arch/s390/include/asm/mmu_context.h rename to trunk/include/asm-s390/mmu_context.h diff --git a/trunk/arch/s390/include/asm/module.h b/trunk/include/asm-s390/module.h similarity index 100% rename from trunk/arch/s390/include/asm/module.h rename to trunk/include/asm-s390/module.h diff --git a/trunk/arch/s390/include/asm/monwriter.h b/trunk/include/asm-s390/monwriter.h similarity index 100% rename from trunk/arch/s390/include/asm/monwriter.h rename to trunk/include/asm-s390/monwriter.h diff --git a/trunk/arch/s390/include/asm/msgbuf.h b/trunk/include/asm-s390/msgbuf.h similarity index 100% rename from trunk/arch/s390/include/asm/msgbuf.h rename to trunk/include/asm-s390/msgbuf.h diff --git a/trunk/include/asm-powerpc/mutex.h b/trunk/include/asm-s390/mutex.h similarity index 100% rename from trunk/include/asm-powerpc/mutex.h rename to trunk/include/asm-s390/mutex.h diff --git a/trunk/arch/s390/include/asm/page.h b/trunk/include/asm-s390/page.h similarity index 100% rename from trunk/arch/s390/include/asm/page.h rename to trunk/include/asm-s390/page.h diff --git a/trunk/arch/s390/include/asm/param.h b/trunk/include/asm-s390/param.h similarity index 100% rename from trunk/arch/s390/include/asm/param.h rename to trunk/include/asm-s390/param.h diff --git a/trunk/arch/s390/include/asm/pci.h b/trunk/include/asm-s390/pci.h similarity index 100% rename from trunk/arch/s390/include/asm/pci.h rename to trunk/include/asm-s390/pci.h diff --git a/trunk/arch/s390/include/asm/percpu.h b/trunk/include/asm-s390/percpu.h similarity index 100% rename from trunk/arch/s390/include/asm/percpu.h rename to trunk/include/asm-s390/percpu.h diff --git a/trunk/arch/s390/include/asm/pgalloc.h b/trunk/include/asm-s390/pgalloc.h similarity index 100% rename from trunk/arch/s390/include/asm/pgalloc.h rename to trunk/include/asm-s390/pgalloc.h diff --git a/trunk/arch/s390/include/asm/pgtable.h b/trunk/include/asm-s390/pgtable.h similarity index 100% rename from trunk/arch/s390/include/asm/pgtable.h rename to trunk/include/asm-s390/pgtable.h diff --git a/trunk/include/asm-powerpc/poll.h b/trunk/include/asm-s390/poll.h similarity index 100% rename from trunk/include/asm-powerpc/poll.h rename to trunk/include/asm-s390/poll.h diff --git a/trunk/arch/s390/include/asm/posix_types.h b/trunk/include/asm-s390/posix_types.h similarity index 100% rename from trunk/arch/s390/include/asm/posix_types.h rename to trunk/include/asm-s390/posix_types.h diff --git a/trunk/arch/s390/include/asm/processor.h b/trunk/include/asm-s390/processor.h similarity index 100% rename from trunk/arch/s390/include/asm/processor.h rename to trunk/include/asm-s390/processor.h diff --git a/trunk/arch/s390/include/asm/ptrace.h b/trunk/include/asm-s390/ptrace.h similarity index 100% rename from trunk/arch/s390/include/asm/ptrace.h rename to trunk/include/asm-s390/ptrace.h diff --git a/trunk/arch/s390/include/asm/qdio.h b/trunk/include/asm-s390/qdio.h similarity index 100% rename from trunk/arch/s390/include/asm/qdio.h rename to trunk/include/asm-s390/qdio.h diff --git a/trunk/arch/s390/include/asm/qeth.h b/trunk/include/asm-s390/qeth.h similarity index 100% rename from trunk/arch/s390/include/asm/qeth.h rename to trunk/include/asm-s390/qeth.h diff --git a/trunk/arch/s390/include/asm/reset.h b/trunk/include/asm-s390/reset.h similarity index 100% rename from trunk/arch/s390/include/asm/reset.h rename to trunk/include/asm-s390/reset.h diff --git a/trunk/arch/s390/include/asm/resource.h b/trunk/include/asm-s390/resource.h similarity index 100% rename from trunk/arch/s390/include/asm/resource.h rename to trunk/include/asm-s390/resource.h diff --git a/trunk/arch/s390/include/asm/rwsem.h b/trunk/include/asm-s390/rwsem.h similarity index 100% rename from trunk/arch/s390/include/asm/rwsem.h rename to trunk/include/asm-s390/rwsem.h diff --git a/trunk/arch/s390/include/asm/s390_ext.h b/trunk/include/asm-s390/s390_ext.h similarity index 100% rename from trunk/arch/s390/include/asm/s390_ext.h rename to trunk/include/asm-s390/s390_ext.h diff --git a/trunk/arch/s390/include/asm/s390_rdev.h b/trunk/include/asm-s390/s390_rdev.h similarity index 100% rename from trunk/arch/s390/include/asm/s390_rdev.h rename to trunk/include/asm-s390/s390_rdev.h diff --git a/trunk/arch/s390/include/asm/scatterlist.h b/trunk/include/asm-s390/scatterlist.h similarity index 100% rename from trunk/arch/s390/include/asm/scatterlist.h rename to trunk/include/asm-s390/scatterlist.h diff --git a/trunk/arch/s390/include/asm/schid.h b/trunk/include/asm-s390/schid.h similarity index 100% rename from trunk/arch/s390/include/asm/schid.h rename to trunk/include/asm-s390/schid.h diff --git a/trunk/arch/s390/include/asm/sclp.h b/trunk/include/asm-s390/sclp.h similarity index 100% rename from trunk/arch/s390/include/asm/sclp.h rename to trunk/include/asm-s390/sclp.h diff --git a/trunk/arch/s390/include/asm/sections.h b/trunk/include/asm-s390/sections.h similarity index 100% rename from trunk/arch/s390/include/asm/sections.h rename to trunk/include/asm-s390/sections.h diff --git a/trunk/arch/s390/include/asm/segment.h b/trunk/include/asm-s390/segment.h similarity index 100% rename from trunk/arch/s390/include/asm/segment.h rename to trunk/include/asm-s390/segment.h diff --git a/trunk/arch/s390/include/asm/sembuf.h b/trunk/include/asm-s390/sembuf.h similarity index 100% rename from trunk/arch/s390/include/asm/sembuf.h rename to trunk/include/asm-s390/sembuf.h diff --git a/trunk/arch/s390/include/asm/setup.h b/trunk/include/asm-s390/setup.h similarity index 100% rename from trunk/arch/s390/include/asm/setup.h rename to trunk/include/asm-s390/setup.h diff --git a/trunk/arch/s390/include/asm/sfp-machine.h b/trunk/include/asm-s390/sfp-machine.h similarity index 100% rename from trunk/arch/s390/include/asm/sfp-machine.h rename to trunk/include/asm-s390/sfp-machine.h diff --git a/trunk/arch/s390/include/asm/sfp-util.h b/trunk/include/asm-s390/sfp-util.h similarity index 100% rename from trunk/arch/s390/include/asm/sfp-util.h rename to trunk/include/asm-s390/sfp-util.h diff --git a/trunk/arch/s390/include/asm/shmbuf.h b/trunk/include/asm-s390/shmbuf.h similarity index 100% rename from trunk/arch/s390/include/asm/shmbuf.h rename to trunk/include/asm-s390/shmbuf.h diff --git a/trunk/arch/s390/include/asm/shmparam.h b/trunk/include/asm-s390/shmparam.h similarity index 100% rename from trunk/arch/s390/include/asm/shmparam.h rename to trunk/include/asm-s390/shmparam.h diff --git a/trunk/arch/s390/include/asm/sigcontext.h b/trunk/include/asm-s390/sigcontext.h similarity index 100% rename from trunk/arch/s390/include/asm/sigcontext.h rename to trunk/include/asm-s390/sigcontext.h diff --git a/trunk/arch/s390/include/asm/siginfo.h b/trunk/include/asm-s390/siginfo.h similarity index 100% rename from trunk/arch/s390/include/asm/siginfo.h rename to trunk/include/asm-s390/siginfo.h diff --git a/trunk/arch/s390/include/asm/signal.h b/trunk/include/asm-s390/signal.h similarity index 100% rename from trunk/arch/s390/include/asm/signal.h rename to trunk/include/asm-s390/signal.h diff --git a/trunk/arch/s390/include/asm/sigp.h b/trunk/include/asm-s390/sigp.h similarity index 100% rename from trunk/arch/s390/include/asm/sigp.h rename to trunk/include/asm-s390/sigp.h diff --git a/trunk/arch/s390/include/asm/smp.h b/trunk/include/asm-s390/smp.h similarity index 100% rename from trunk/arch/s390/include/asm/smp.h rename to trunk/include/asm-s390/smp.h diff --git a/trunk/arch/s390/include/asm/socket.h b/trunk/include/asm-s390/socket.h similarity index 100% rename from trunk/arch/s390/include/asm/socket.h rename to trunk/include/asm-s390/socket.h diff --git a/trunk/arch/s390/include/asm/sockios.h b/trunk/include/asm-s390/sockios.h similarity index 100% rename from trunk/arch/s390/include/asm/sockios.h rename to trunk/include/asm-s390/sockios.h diff --git a/trunk/arch/s390/include/asm/sparsemem.h b/trunk/include/asm-s390/sparsemem.h similarity index 100% rename from trunk/arch/s390/include/asm/sparsemem.h rename to trunk/include/asm-s390/sparsemem.h diff --git a/trunk/arch/s390/include/asm/spinlock.h b/trunk/include/asm-s390/spinlock.h similarity index 100% rename from trunk/arch/s390/include/asm/spinlock.h rename to trunk/include/asm-s390/spinlock.h diff --git a/trunk/arch/s390/include/asm/spinlock_types.h b/trunk/include/asm-s390/spinlock_types.h similarity index 100% rename from trunk/arch/s390/include/asm/spinlock_types.h rename to trunk/include/asm-s390/spinlock_types.h diff --git a/trunk/arch/s390/include/asm/stat.h b/trunk/include/asm-s390/stat.h similarity index 100% rename from trunk/arch/s390/include/asm/stat.h rename to trunk/include/asm-s390/stat.h diff --git a/trunk/arch/s390/include/asm/statfs.h b/trunk/include/asm-s390/statfs.h similarity index 100% rename from trunk/arch/s390/include/asm/statfs.h rename to trunk/include/asm-s390/statfs.h diff --git a/trunk/arch/s390/include/asm/string.h b/trunk/include/asm-s390/string.h similarity index 100% rename from trunk/arch/s390/include/asm/string.h rename to trunk/include/asm-s390/string.h diff --git a/trunk/arch/s390/include/asm/suspend.h b/trunk/include/asm-s390/suspend.h similarity index 100% rename from trunk/arch/s390/include/asm/suspend.h rename to trunk/include/asm-s390/suspend.h diff --git a/trunk/arch/s390/include/asm/sysinfo.h b/trunk/include/asm-s390/sysinfo.h similarity index 100% rename from trunk/arch/s390/include/asm/sysinfo.h rename to trunk/include/asm-s390/sysinfo.h diff --git a/trunk/arch/s390/include/asm/system.h b/trunk/include/asm-s390/system.h similarity index 100% rename from trunk/arch/s390/include/asm/system.h rename to trunk/include/asm-s390/system.h diff --git a/trunk/arch/s390/include/asm/tape390.h b/trunk/include/asm-s390/tape390.h similarity index 100% rename from trunk/arch/s390/include/asm/tape390.h rename to trunk/include/asm-s390/tape390.h diff --git a/trunk/arch/s390/include/asm/termbits.h b/trunk/include/asm-s390/termbits.h similarity index 100% rename from trunk/arch/s390/include/asm/termbits.h rename to trunk/include/asm-s390/termbits.h diff --git a/trunk/arch/s390/include/asm/termios.h b/trunk/include/asm-s390/termios.h similarity index 100% rename from trunk/arch/s390/include/asm/termios.h rename to trunk/include/asm-s390/termios.h diff --git a/trunk/arch/s390/include/asm/thread_info.h b/trunk/include/asm-s390/thread_info.h similarity index 100% rename from trunk/arch/s390/include/asm/thread_info.h rename to trunk/include/asm-s390/thread_info.h diff --git a/trunk/arch/s390/include/asm/timer.h b/trunk/include/asm-s390/timer.h similarity index 100% rename from trunk/arch/s390/include/asm/timer.h rename to trunk/include/asm-s390/timer.h diff --git a/trunk/arch/s390/include/asm/timex.h b/trunk/include/asm-s390/timex.h similarity index 100% rename from trunk/arch/s390/include/asm/timex.h rename to trunk/include/asm-s390/timex.h diff --git a/trunk/arch/s390/include/asm/tlb.h b/trunk/include/asm-s390/tlb.h similarity index 100% rename from trunk/arch/s390/include/asm/tlb.h rename to trunk/include/asm-s390/tlb.h diff --git a/trunk/arch/s390/include/asm/tlbflush.h b/trunk/include/asm-s390/tlbflush.h similarity index 100% rename from trunk/arch/s390/include/asm/tlbflush.h rename to trunk/include/asm-s390/tlbflush.h diff --git a/trunk/arch/s390/include/asm/todclk.h b/trunk/include/asm-s390/todclk.h similarity index 100% rename from trunk/arch/s390/include/asm/todclk.h rename to trunk/include/asm-s390/todclk.h diff --git a/trunk/arch/s390/include/asm/topology.h b/trunk/include/asm-s390/topology.h similarity index 100% rename from trunk/arch/s390/include/asm/topology.h rename to trunk/include/asm-s390/topology.h diff --git a/trunk/arch/s390/include/asm/types.h b/trunk/include/asm-s390/types.h similarity index 100% rename from trunk/arch/s390/include/asm/types.h rename to trunk/include/asm-s390/types.h diff --git a/trunk/arch/s390/include/asm/uaccess.h b/trunk/include/asm-s390/uaccess.h similarity index 100% rename from trunk/arch/s390/include/asm/uaccess.h rename to trunk/include/asm-s390/uaccess.h diff --git a/trunk/arch/s390/include/asm/ucontext.h b/trunk/include/asm-s390/ucontext.h similarity index 100% rename from trunk/arch/s390/include/asm/ucontext.h rename to trunk/include/asm-s390/ucontext.h diff --git a/trunk/arch/s390/include/asm/unaligned.h b/trunk/include/asm-s390/unaligned.h similarity index 100% rename from trunk/arch/s390/include/asm/unaligned.h rename to trunk/include/asm-s390/unaligned.h diff --git a/trunk/arch/s390/include/asm/unistd.h b/trunk/include/asm-s390/unistd.h similarity index 100% rename from trunk/arch/s390/include/asm/unistd.h rename to trunk/include/asm-s390/unistd.h diff --git a/trunk/arch/s390/include/asm/user.h b/trunk/include/asm-s390/user.h similarity index 100% rename from trunk/arch/s390/include/asm/user.h rename to trunk/include/asm-s390/user.h diff --git a/trunk/arch/s390/include/asm/vtoc.h b/trunk/include/asm-s390/vtoc.h similarity index 100% rename from trunk/arch/s390/include/asm/vtoc.h rename to trunk/include/asm-s390/vtoc.h diff --git a/trunk/include/asm-powerpc/xor.h b/trunk/include/asm-s390/xor.h similarity index 100% rename from trunk/include/asm-powerpc/xor.h rename to trunk/include/asm-s390/xor.h diff --git a/trunk/arch/s390/include/asm/zcrypt.h b/trunk/include/asm-s390/zcrypt.h similarity index 100% rename from trunk/arch/s390/include/asm/zcrypt.h rename to trunk/include/asm-s390/zcrypt.h diff --git a/trunk/include/linux/ihex.h b/trunk/include/linux/ihex.h index 31d8629e75a1..2baace2788a7 100644 --- a/trunk/include/linux/ihex.h +++ b/trunk/include/linux/ihex.h @@ -18,7 +18,7 @@ struct ihex_binrec { __be32 addr; __be16 len; uint8_t data[0]; -} __attribute__((packed)); +} __attribute__((aligned(4))); /* Find the next record, taking into account the 4-byte alignment */ static inline const struct ihex_binrec * diff --git a/trunk/include/linux/mISDNif.h b/trunk/include/linux/mISDNif.h index 8f2d60da04e7..5c948f337817 100644 --- a/trunk/include/linux/mISDNif.h +++ b/trunk/include/linux/mISDNif.h @@ -37,7 +37,7 @@ */ #define MISDN_MAJOR_VERSION 1 #define MISDN_MINOR_VERSION 0 -#define MISDN_RELEASE 19 +#define MISDN_RELEASE 18 /* primitives for information exchange * generell format @@ -242,8 +242,7 @@ struct mISDNhead { #define TEI_SAPI 63 #define CTRL_SAPI 0 -#define MISDN_MAX_CHANNEL 127 -#define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3) +#define MISDN_CHMAP_SIZE 4 #define SOL_MISDN 0 @@ -276,32 +275,11 @@ struct mISDN_devinfo { u_int Dprotocols; u_int Bprotocols; u_int protocol; - u_char channelmap[MISDN_CHMAP_SIZE]; + u_long channelmap[MISDN_CHMAP_SIZE]; u_int nrbchan; char name[MISDN_MAX_IDLEN]; }; -static inline int -test_channelmap(u_int nr, u_char *map) -{ - if (nr <= MISDN_MAX_CHANNEL) - return map[nr >> 3] & (1 << (nr & 7)); - else - return 0; -} - -static inline void -set_channelmap(u_int nr, u_char *map) -{ - map[nr >> 3] |= (1 << (nr & 7)); -} - -static inline void -clear_channelmap(u_int nr, u_char *map) -{ - map[nr >> 3] &= ~(1 << (nr & 7)); -} - /* CONTROL_CHANNEL parameters */ #define MISDN_CTRL_GETOP 0x0000 #define MISDN_CTRL_LOOP 0x0001 @@ -427,7 +405,7 @@ struct mISDNdevice { u_int Dprotocols; u_int Bprotocols; u_int nrbchan; - u_char channelmap[MISDN_CHMAP_SIZE]; + u_long channelmap[MISDN_CHMAP_SIZE]; struct list_head bchannels; struct mISDNchannel *teimgr; struct device dev; @@ -452,7 +430,7 @@ struct mISDNstack { #endif }; -/* global alloc/queue functions */ +/* global alloc/queue dunctions */ static inline struct sk_buff * mI_alloc_skb(unsigned int len, gfp_t gfp_mask) diff --git a/trunk/include/linux/parser.h b/trunk/include/linux/parser.h index 7dcd05075756..cc554ca8bc78 100644 --- a/trunk/include/linux/parser.h +++ b/trunk/include/linux/parser.h @@ -14,7 +14,7 @@ struct match_token { const char *pattern; }; -typedef struct match_token match_table_t[]; +typedef const struct match_token match_table_t[]; /* Maximum number of arguments that match_token will find in a pattern */ enum {MAX_OPT_ARGS = 3}; diff --git a/trunk/include/linux/tracehook.h b/trunk/include/linux/tracehook.h index ab3ef7aefa95..12532839f508 100644 --- a/trunk/include/linux/tracehook.h +++ b/trunk/include/linux/tracehook.h @@ -487,9 +487,6 @@ static inline int tracehook_notify_jctl(int notify, int why) return notify || (current->ptrace & PT_PTRACED); } -#define DEATH_REAP -1 -#define DEATH_DELAYED_GROUP_LEADER -2 - /** * tracehook_notify_death - task is dead, ready to notify parent * @task: @current task now exiting @@ -504,6 +501,8 @@ static inline int tracehook_notify_jctl(int notify, int why) * * Called with write_lock_irq(&tasklist_lock) held. */ +#define DEATH_REAP -1 +#define DEATH_DELAYED_GROUP_LEADER -2 static inline int tracehook_notify_death(struct task_struct *task, void **death_cookie, int group_dead) { diff --git a/trunk/include/linux/vt_kern.h b/trunk/include/linux/vt_kern.h index 1c78d56c57e5..8c8119ffee12 100644 --- a/trunk/include/linux/vt_kern.h +++ b/trunk/include/linux/vt_kern.h @@ -86,7 +86,6 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); #define con_copy_unimap(d, s) (0) #define con_get_unimap(vc, ct, uct, list) (-EINVAL) #define con_free_unimap(vc) do { ; } while (0) -#define con_protect_unimap(vc, rdonly) do { ; } while (0) #define vc_translate(vc, c) (c) #endif diff --git a/trunk/include/scsi/scsi_device.h b/trunk/include/scsi/scsi_device.h index 9cecc409f0f8..291d56a19167 100644 --- a/trunk/include/scsi/scsi_device.h +++ b/trunk/include/scsi/scsi_device.h @@ -140,7 +140,8 @@ struct scsi_device { unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ - unsigned last_sector_bug:1; /* Always read last sector in a 1 sector read */ + unsigned last_sector_bug:1; /* do not use multisector accesses on + SD_LAST_BUGGY_SECTORS */ DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ struct list_head event_list; /* asserted events */ diff --git a/trunk/kernel/auditsc.c b/trunk/kernel/auditsc.c index 972f8e61d36a..496c3dd37276 100644 --- a/trunk/kernel/auditsc.c +++ b/trunk/kernel/auditsc.c @@ -243,9 +243,6 @@ static inline int open_arg(int flags, int mask) static int audit_match_perm(struct audit_context *ctx, int mask) { - if (unlikely(!ctx)) - return 0; - unsigned n = ctx->major; switch (audit_classify_syscall(ctx->arch, n)) { case 0: /* native */ @@ -287,10 +284,6 @@ static int audit_match_filetype(struct audit_context *ctx, int which) { unsigned index = which & ~S_IFMT; mode_t mode = which & S_IFMT; - - if (unlikely(!ctx)) - return 0; - if (index >= ctx->name_count) return 0; if (ctx->names[index].ino == -1) diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 04160d277e7a..21f7da94662e 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -5004,21 +5004,19 @@ static int __sched_setscheduler(struct task_struct *p, int policy, return -EPERM; } - if (user) { #ifdef CONFIG_RT_GROUP_SCHED - /* - * Do not allow realtime tasks into groups that have no runtime - * assigned. - */ - if (rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0) - return -EPERM; + /* + * Do not allow realtime tasks into groups that have no runtime + * assigned. + */ + if (user + && rt_policy(policy) && task_group(p)->rt_bandwidth.rt_runtime == 0) + return -EPERM; #endif - retval = security_task_setscheduler(p, policy, param); - if (retval) - return retval; - } - + retval = security_task_setscheduler(p, policy, param); + if (retval) + return retval; /* * make sure no PI-waiters arrive (or leave) while we are * changing the priority of the task: diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index a472bcd4b061..6793b9c68107 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -2765,26 +2765,16 @@ int make_pages_present(unsigned long addr, unsigned long end) vma = find_vma(current->mm, addr); if (!vma) - return -ENOMEM; + return -1; write = (vma->vm_flags & VM_WRITE) != 0; BUG_ON(addr >= end); BUG_ON(end > vma->vm_end); len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE; ret = get_user_pages(current, current->mm, addr, len, write, 0, NULL, NULL); - if (ret < 0) { - /* - SUS require strange return value to mlock - - invalid addr generate to ENOMEM. - - out of memory should generate EAGAIN. - */ - if (ret == -EFAULT) - ret = -ENOMEM; - else if (ret == -ENOMEM) - ret = -EAGAIN; + if (ret < 0) return ret; - } - return ret == len ? 0 : -ENOMEM; + return ret == len ? 0 : -1; } #if !defined(__HAVE_ARCH_GATE_AREA) diff --git a/trunk/mm/mlock.c b/trunk/mm/mlock.c index 01fbe93eff5c..7b2656055d6a 100644 --- a/trunk/mm/mlock.c +++ b/trunk/mm/mlock.c @@ -78,6 +78,8 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev, mm->locked_vm -= pages; out: + if (ret == -ENOMEM) + ret = -EAGAIN; return ret; } diff --git a/trunk/mm/truncate.c b/trunk/mm/truncate.c index 894e9a70699f..e68443d74567 100644 --- a/trunk/mm/truncate.c +++ b/trunk/mm/truncate.c @@ -104,6 +104,7 @@ truncate_complete_page(struct address_space *mapping, struct page *page) cancel_dirty_page(page, PAGE_CACHE_SIZE); remove_from_page_cache(page); + ClearPageUptodate(page); ClearPageMappedToDisk(page); page_cache_release(page); /* pagecache ref */ } @@ -355,6 +356,7 @@ invalidate_complete_page2(struct address_space *mapping, struct page *page) BUG_ON(PagePrivate(page)); __remove_from_page_cache(page); spin_unlock_irq(&mapping->tree_lock); + ClearPageUptodate(page); page_cache_release(page); /* pagecache ref */ return 1; failed: diff --git a/trunk/scripts/Makefile.fwinst b/trunk/scripts/Makefile.fwinst index 6bf8e87f1dcf..f63a663de158 100644 --- a/trunk/scripts/Makefile.fwinst +++ b/trunk/scripts/Makefile.fwinst @@ -50,12 +50,8 @@ PHONY += __fw_install __fw_modinst FORCE .PHONY: $(PHONY) __fw_install: $(installed-fw) - __fw_modinst: $(installed-mod-fw) - @: - __fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) - @: FORCE: diff --git a/trunk/scripts/kconfig/conf.c b/trunk/scripts/kconfig/conf.c index 36b5eedcdc75..9fba838c7069 100644 --- a/trunk/scripts/kconfig/conf.c +++ b/trunk/scripts/kconfig/conf.c @@ -596,7 +596,7 @@ int main(int ac, char **av) break; } - if (conf_write(NULL)) { + if (conf_get_changed() && conf_write(NULL)) { fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); exit(1); } diff --git a/trunk/scripts/kconfig/confdata.c b/trunk/scripts/kconfig/confdata.c index df6a188b9930..07597611cc50 100644 --- a/trunk/scripts/kconfig/confdata.c +++ b/trunk/scripts/kconfig/confdata.c @@ -222,8 +222,10 @@ int conf_read_simple(const char *name, int def) continue; if (def == S_DEF_USER) { sym = sym_find(line + 9); - if (!sym) + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 9); break; + } } else { sym = sym_lookup(line + 9, 0); if (sym->type == S_UNKNOWN) @@ -259,8 +261,10 @@ int conf_read_simple(const char *name, int def) } if (def == S_DEF_USER) { sym = sym_find(line + 7); - if (!sym) + if (!sym) { + conf_warning("trying to assign nonexistent symbol %s", line + 7); break; + } } else { sym = sym_lookup(line + 7, 0); if (sym->type == S_UNKNOWN) diff --git a/trunk/sound/core/seq/oss/seq_oss_synth.c b/trunk/sound/core/seq/oss/seq_oss_synth.c index e024e4588b82..558dadbf45f1 100644 --- a/trunk/sound/core/seq/oss/seq_oss_synth.c +++ b/trunk/sound/core/seq/oss/seq_oss_synth.c @@ -604,9 +604,6 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in { struct seq_oss_synth *rec; - if (dev < 0 || dev >= dp->max_synthdev) - return -ENXIO; - if (dp->synths[dev].is_midi) { struct midi_info minf; snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);