diff options
Diffstat (limited to 'arch/avr32')
76 files changed, 195 insertions, 324 deletions
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index 22fb66590dc..dba48a5d5bb 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile @@ -11,7 +11,7 @@ all: uImage vmlinux.elf  KBUILD_DEFCONFIG	:= atstk1002_defconfig -KBUILD_CFLAGS	+= -pipe -fno-builtin -mno-pic +KBUILD_CFLAGS	+= -pipe -fno-builtin -mno-pic -D__linux__  KBUILD_AFLAGS	+= -mrelax -mno-pic  KBUILD_CFLAGS_MODULE += -mno-relax  LDFLAGS_vmlinux	+= --relax diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c index 20388750d56..64919b0da7a 100644 --- a/arch/avr32/boards/atngw100/evklcd10x.c +++ b/arch/avr32/boards/atngw100/evklcd10x.c @@ -58,7 +58,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {  	.dclkmax		= 28330000,  }; -static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = { +static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {  	.default_bpp		= 16,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT @@ -96,7 +96,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {  	.dclkmax		= 7000000,  }; -static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = { +static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {  	.default_bpp		= 16,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT @@ -134,7 +134,7 @@ static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {  	.dclkmax		= 6400000,  }; -static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = { +static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {  	.default_bpp		= 16,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT @@ -145,7 +145,7 @@ static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {  };  #endif -static void atevklcd10x_lcdc_power_control(int on) +static void atevklcd10x_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)  {  	gpio_set_value(GPIO_PIN_PB(15), on);  } diff --git a/arch/avr32/boards/atngw100/mrmt.c b/arch/avr32/boards/atngw100/mrmt.c index 7de083d19b7..1ba09e4c02b 100644 --- a/arch/avr32/boards/atngw100/mrmt.c +++ b/arch/avr32/boards/atngw100/mrmt.c @@ -83,7 +83,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {  	.dclkmax		= 9260000,  }; -static struct atmel_lcdfb_info __initdata rmt_lcdc_data = { +static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {  	.default_bpp		= 24,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT @@ -126,7 +126,7 @@ static struct fb_monspecs __initdata lcd_fb_default_monspecs = {  	.dclkmax		= 9260000,  }; -static struct atmel_lcdfb_info __initdata rmt_lcdc_data = { +static struct atmel_lcdfb_pdata __initdata rmt_lcdc_data = {  	.default_bpp		= 24,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT diff --git a/arch/avr32/boards/atstk1000/atstk1000.h b/arch/avr32/boards/atstk1000/atstk1000.h index 9392d325286..653cc09e536 100644 --- a/arch/avr32/boards/atstk1000/atstk1000.h +++ b/arch/avr32/boards/atstk1000/atstk1000.h @@ -10,7 +10,7 @@  #ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H  #define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H -extern struct atmel_lcdfb_info atstk1000_lcdc_data; +extern struct atmel_lcdfb_pdata atstk1000_lcdc_data;  void atstk1000_setup_j2_leds(void); diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index 2d6b560115d..b6b88f5e0b4 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c @@ -55,7 +55,7 @@ static struct fb_monspecs __initdata atstk1000_default_monspecs = {  	.dclkmax		= 30000000,  }; -struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = { +struct atmel_lcdfb_pdata __initdata atstk1000_lcdc_data = {  	.default_bpp		= 24,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 27bd6fbe21c..1f121497b51 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c @@ -125,7 +125,7 @@ static struct fb_monspecs __initdata favr32_default_monspecs = {  	.dclkmax		= 28000000,  }; -struct atmel_lcdfb_info __initdata favr32_lcdc_data = { +struct atmel_lcdfb_pdata __initdata favr32_lcdc_data = {  	.default_bpp		= 16,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT @@ -298,8 +298,10 @@ static int __init set_abdac_rate(struct platform_device *pdev)  	 */  	retval = clk_round_rate(pll1,  			CONFIG_BOARD_FAVR32_ABDAC_RATE * 256 * 16); -	if (retval < 0) +	if (retval <= 0) { +		retval = -EINVAL;  		goto out_abdac; +	}  	retval = clk_set_rate(pll1, retval);  	if (retval != 0) diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c index 9d1efd1cd42..dc0e317f2ec 100644 --- a/arch/avr32/boards/hammerhead/setup.c +++ b/arch/avr32/boards/hammerhead/setup.c @@ -77,7 +77,7 @@ static struct fb_monspecs __initdata hammerhead_hda350t_monspecs = {  	.dclkmax		= 10000000,  }; -struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = { +struct atmel_lcdfb_pdata __initdata hammerhead_lcdc_data = {  	.default_bpp		= 24,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT diff --git a/arch/avr32/boards/merisc/display.c b/arch/avr32/boards/merisc/display.c index 85a543cd4ab..e7683ee7ed4 100644 --- a/arch/avr32/boards/merisc/display.c +++ b/arch/avr32/boards/merisc/display.c @@ -45,7 +45,7 @@ static struct fb_monspecs merisc_fb_monspecs = {  	.dclkmax	= 30000000,  }; -struct atmel_lcdfb_info merisc_lcdc_data = { +struct atmel_lcdfb_pdata merisc_lcdc_data = {  	.default_bpp		= 24,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT diff --git a/arch/avr32/boards/mimc200/Makefile b/arch/avr32/boards/mimc200/Makefile index 79c076e168a..c740aa11675 100644 --- a/arch/avr32/boards/mimc200/Makefile +++ b/arch/avr32/boards/mimc200/Makefile @@ -1 +1 @@ -obj-y				+= setup.o flash.o fram.o +obj-y				+= setup.o flash.o diff --git a/arch/avr32/boards/mimc200/fram.c b/arch/avr32/boards/mimc200/fram.c deleted file mode 100644 index 9764a1a1073..00000000000 --- a/arch/avr32/boards/mimc200/fram.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * FRAM driver for MIMC200 board - * - * Copyright 2008 Mark Jackson <mpfj@mimc.co.uk> - * - * This module adds *very* simply support for the system's FRAM device. - * At the moment, this is hard-coded to the MIMC200 platform, and only - * supports mmap(). - */ - -#define FRAM_VERSION	"1.0" - -#include <linux/miscdevice.h> -#include <linux/proc_fs.h> -#include <linux/mm.h> -#include <linux/io.h> - -#define FRAM_BASE	0xac000000 -#define FRAM_SIZE	0x20000 - -/* - * The are the file operation function for user access to /dev/fram - */ - -static int fram_mmap(struct file *filp, struct vm_area_struct *vma) -{ -	int ret; - -	ret = remap_pfn_range(vma, -		vma->vm_start, -		virt_to_phys((void *)((unsigned long)FRAM_BASE)) >> PAGE_SHIFT, -		vma->vm_end-vma->vm_start, -		PAGE_SHARED); - -	if (ret != 0) -		return -EAGAIN; - -	return 0; -} - -static const struct file_operations fram_fops = { -	.owner			= THIS_MODULE, -	.mmap			= fram_mmap, -	.llseek			= noop_llseek, -}; - -#define FRAM_MINOR	0 - -static struct miscdevice fram_dev = { -	FRAM_MINOR, -	"fram", -	&fram_fops -}; - -static int __init -fram_init(void) -{ -	int ret; - -	ret = misc_register(&fram_dev); -	if (ret) { -		printk(KERN_ERR "fram: can't misc_register on minor=%d\n", -		    FRAM_MINOR); -		return ret; -	} -	printk(KERN_INFO "FRAM memory driver v" FRAM_VERSION "\n"); -	return 0; -} - -static void __exit -fram_cleanup_module(void) -{ -	misc_deregister(&fram_dev); -} - -module_init(fram_init); -module_exit(fram_cleanup_module); - -MODULE_LICENSE("GPL"); - -MODULE_ALIAS_MISCDEV(FRAM_MINOR); diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c index 05358aa5ef7..1cb8e9cc5cf 100644 --- a/arch/avr32/boards/mimc200/setup.c +++ b/arch/avr32/boards/mimc200/setup.c @@ -8,7 +8,7 @@   * published by the Free Software Foundation.   */ -extern struct atmel_lcdfb_info mimc200_lcdc_data; +extern struct atmel_lcdfb_pdata mimc200_lcdc_data;  #include <linux/clk.h>  #include <linux/etherdevice.h> @@ -71,7 +71,7 @@ static struct fb_monspecs __initdata mimc200_default_monspecs = {  	.dclkmax		= 25200000,  }; -struct atmel_lcdfb_info __initdata mimc200_lcdc_data = { +struct atmel_lcdfb_pdata __initdata mimc200_lcdc_data = {  	.default_bpp		= 16,  	.default_dmacon		= ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,  	.default_lcdcon2	= (ATMEL_LCDC_DISTYPE_TFT diff --git a/arch/avr32/boot/u-boot/head.S b/arch/avr32/boot/u-boot/head.S index 4488fa27fe9..2ffc298f061 100644 --- a/arch/avr32/boot/u-boot/head.S +++ b/arch/avr32/boot/u-boot/head.S @@ -8,6 +8,8 @@   * published by the Free Software Foundation.   */  #include <asm/setup.h> +#include <asm/thread_info.h> +#include <asm/sysreg.h>  	/*  	 * The kernel is loaded where we want it to be and all caches @@ -20,11 +22,6 @@  	.section .init.text,"ax"  	.global _start  _start: -	/* Check if the boot loader actually provided a tag table */ -	lddpc	r0, magic_number -	cp.w	r12, r0 -	brne	no_tag_table -  	/* Initialize .bss */  	lddpc	r2, bss_start_addr  	lddpc   r3, end_addr @@ -34,6 +31,25 @@ _start:  	cp      r2, r3  	brlo    1b +	/* Initialize status register */ +	lddpc	r0, init_sr +	mtsr	SYSREG_SR, r0 + +	/* Set initial stack pointer */ +	lddpc	sp, stack_addr +	sub	sp, -THREAD_SIZE + +#ifdef CONFIG_FRAME_POINTER +	/* Mark last stack frame */ +	mov	lr, 0 +	mov	r7, 0 +#endif + +	/* Check if the boot loader actually provided a tag table */ +	lddpc	r0, magic_number +	cp.w	r12, r0 +	brne	no_tag_table +  	/*  	 * Save the tag table address for later use. This must be done  	 * _after_ .bss has been initialized... @@ -53,8 +69,15 @@ bss_start_addr:  	.long   __bss_start  end_addr:  	.long   _end +init_sr: +	.long	0x007f0000	/* Supervisor mode, everything masked */ +stack_addr: +	.long	init_thread_union +panic_addr: +	.long	panic  no_tag_table:  	sub	r12, pc, (. - 2f) -	bral	panic +	/* branch to panic() which can be far away with that construct */ +	lddpc	pc, panic_addr  2:	.asciz	"Boot loader didn't provide correct magic number\n" diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index d5aff36ade9..4733e38e7ae 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig @@ -59,7 +59,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig index 4abcf435d59..1be0ee31bd9 100644 --- a/arch/avr32/configs/atngw100_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100_evklcd100_defconfig @@ -61,7 +61,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig index 18f3fa0470f..796e536f7bc 100644 --- a/arch/avr32/configs/atngw100_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100_evklcd101_defconfig @@ -60,7 +60,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100_mrmt_defconfig b/arch/avr32/configs/atngw100_mrmt_defconfig index 06e389cfcd1..9a57da44eb6 100644 --- a/arch/avr32/configs/atngw100_mrmt_defconfig +++ b/arch/avr32/configs/atngw100_mrmt_defconfig @@ -48,7 +48,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100mkii_defconfig b/arch/avr32/configs/atngw100mkii_defconfig index 2518a1368d7..97fe1b399b0 100644 --- a/arch/avr32/configs/atngw100mkii_defconfig +++ b/arch/avr32/configs/atngw100mkii_defconfig @@ -59,7 +59,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig index 245ef6bd0fa..a176d24467e 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig @@ -62,7 +62,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig index fa6cbac6e41..d1bf6dcfc47 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig @@ -61,7 +61,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index bbd5131021a..2813dd2b913 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig @@ -53,7 +53,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig index c1cd726f901..f8ff3a3baad 100644 --- a/arch/avr32/configs/atstk1003_defconfig +++ b/arch/avr32/configs/atstk1003_defconfig @@ -42,7 +42,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig index 754ae56b276..992228e54e3 100644 --- a/arch/avr32/configs/atstk1004_defconfig +++ b/arch/avr32/configs/atstk1004_defconfig @@ -42,7 +42,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig index 58589d8cc0a..b8e698b0d1f 100644 --- a/arch/avr32/configs/atstk1006_defconfig +++ b/arch/avr32/configs/atstk1006_defconfig @@ -54,7 +54,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig index c90fbf6d35b..07bed3f7eb5 100644 --- a/arch/avr32/configs/favr-32_defconfig +++ b/arch/avr32/configs/favr-32_defconfig @@ -58,7 +58,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig index ba7c31e269c..4912f0aadaa 100644 --- a/arch/avr32/configs/hammerhead_defconfig +++ b/arch/avr32/configs/hammerhead_defconfig @@ -58,7 +58,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y @@ -118,7 +117,6 @@ CONFIG_HID_SAMSUNG=m  CONFIG_HID_SONY=m  CONFIG_HID_SUNPLUS=m  CONFIG_USB=m -CONFIG_USB_DEVICEFS=y  # CONFIG_USB_DEVICE_CLASS is not set  CONFIG_USB_MON=m  CONFIG_USB_ISP116X_HCD=m diff --git a/arch/avr32/configs/merisc_defconfig b/arch/avr32/configs/merisc_defconfig index 65de4431108..91df6b2986b 100644 --- a/arch/avr32/configs/merisc_defconfig +++ b/arch/avr32/configs/merisc_defconfig @@ -46,7 +46,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y  CONFIG_MTD_CONCAT=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y  CONFIG_MTD_CFI=y diff --git a/arch/avr32/configs/mimc200_defconfig b/arch/avr32/configs/mimc200_defconfig index 0a8bfdc420e..d630e089dd3 100644 --- a/arch/avr32/configs/mimc200_defconfig +++ b/arch/avr32/configs/mimc200_defconfig @@ -49,7 +49,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"  # CONFIG_PREVENT_FIRMWARE_BUILD is not set  # CONFIG_FW_LOADER is not set  CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y  CONFIG_MTD_CMDLINE_PARTS=y  CONFIG_MTD_CHAR=y  CONFIG_MTD_BLOCK=y diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index fd798074389..00a0f3ccd6e 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild @@ -1,19 +1,23 @@ -generic-y	+= clkdev.h -generic-y       += cputime.h -generic-y       += delay.h -generic-y       += device.h -generic-y       += div64.h -generic-y       += emergency-restart.h -generic-y	+= exec.h -generic-y       += futex.h -generic-y       += irq_regs.h -generic-y	+= param.h -generic-y       += local.h -generic-y       += local64.h -generic-y       += percpu.h -generic-y       += scatterlist.h -generic-y       += sections.h -generic-y       += topology.h -generic-y	+= trace_clock.h -generic-y       += xor.h +generic-y += clkdev.h +generic-y += cputime.h +generic-y += delay.h +generic-y += device.h +generic-y += div64.h +generic-y += emergency-restart.h +generic-y += exec.h +generic-y += futex.h +generic-y += hash.h +generic-y += irq_regs.h +generic-y += local.h +generic-y += local64.h +generic-y += mcs_spinlock.h +generic-y += param.h +generic-y += percpu.h +generic-y += preempt.h +generic-y += scatterlist.h +generic-y += sections.h +generic-y += topology.h +generic-y += trace_clock.h +generic-y += vga.h +generic-y += xor.h diff --git a/arch/avr32/include/asm/atomic.h b/arch/avr32/include/asm/atomic.h index 61407279208..0780f3f2415 100644 --- a/arch/avr32/include/asm/atomic.h +++ b/arch/avr32/include/asm/atomic.h @@ -183,9 +183,4 @@ static inline int atomic_sub_if_positive(int i, atomic_t *v)  #define atomic_dec_if_positive(v) atomic_sub_if_positive(1, v) -#define smp_mb__before_atomic_dec()	barrier() -#define smp_mb__after_atomic_dec()	barrier() -#define smp_mb__before_atomic_inc()	barrier() -#define smp_mb__after_atomic_inc()	barrier() -  #endif /*  __ASM_AVR32_ATOMIC_H */ diff --git a/arch/avr32/include/asm/barrier.h b/arch/avr32/include/asm/barrier.h index 0961275373d..715100790fd 100644 --- a/arch/avr32/include/asm/barrier.h +++ b/arch/avr32/include/asm/barrier.h @@ -8,22 +8,15 @@  #ifndef __ASM_AVR32_BARRIER_H  #define __ASM_AVR32_BARRIER_H -#define nop()			asm volatile("nop") - -#define mb()			asm volatile("" : : : "memory") -#define rmb()			mb() -#define wmb()			asm volatile("sync 0" : : : "memory") -#define read_barrier_depends()  do { } while(0) -#define set_mb(var, value)      do { var = value; mb(); } while(0) +/* + * Weirdest thing ever.. no full barrier, but it has a write barrier! + */ +#define wmb()	asm volatile("sync 0" : : : "memory")  #ifdef CONFIG_SMP  # error "The AVR32 port does not support SMP" -#else -# define smp_mb()		barrier() -# define smp_rmb()		barrier() -# define smp_wmb()		barrier() -# define smp_read_barrier_depends() do { } while(0)  #endif +#include <asm-generic/barrier.h>  #endif /* __ASM_AVR32_BARRIER_H */ diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h index ebe7ad3f490..910d5374ce5 100644 --- a/arch/avr32/include/asm/bitops.h +++ b/arch/avr32/include/asm/bitops.h @@ -13,12 +13,7 @@  #endif  #include <asm/byteorder.h> - -/* - * clear_bit() doesn't provide any barrier for the compiler - */ -#define smp_mb__before_clear_bit()	barrier() -#define smp_mb__after_clear_bit()	barrier() +#include <asm/barrier.h>  /*   * set_bit - Atomically set a bit in memory @@ -67,7 +62,7 @@ static inline void set_bit(int nr, volatile void * addr)   *   * clear_bit() is atomic and may not be reordered.  However, it does   * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() + * you should call smp_mb__before_atomic() and/or smp_mb__after_atomic()   * in order to ensure changes are visible on other processors.   */  static inline void clear_bit(int nr, volatile void * addr) diff --git a/arch/avr32/include/asm/bugs.h b/arch/avr32/include/asm/bugs.h index 7635e770622..278661bbd1b 100644 --- a/arch/avr32/include/asm/bugs.h +++ b/arch/avr32/include/asm/bugs.h @@ -9,7 +9,7 @@  static void __init check_bugs(void)  { -	cpu_data->loops_per_jiffy = loops_per_jiffy; +	boot_cpu_data.loops_per_jiffy = loops_per_jiffy;  }  #endif /* __ASM_AVR32_BUGS_H */ diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h index fc6483f83cc..4f5ec2bb717 100644 --- a/arch/avr32/include/asm/io.h +++ b/arch/avr32/include/asm/io.h @@ -295,6 +295,8 @@ extern void __iounmap(void __iomem *addr);  #define iounmap(addr)				\  	__iounmap(addr) +#define ioremap_wc ioremap_nocache +  #define cached(addr) P1SEGADDR(addr)  #define uncached(addr) P2SEGADDR(addr) diff --git a/arch/avr32/include/asm/kprobes.h b/arch/avr32/include/asm/kprobes.h index 996cb656474..45f563ed73f 100644 --- a/arch/avr32/include/asm/kprobes.h +++ b/arch/avr32/include/asm/kprobes.h @@ -16,6 +16,7 @@  typedef u16	kprobe_opcode_t;  #define BREAKPOINT_INSTRUCTION	0xd673	/* breakpoint */  #define MAX_INSN_SIZE		2 +#define MAX_STACK_SIZE		64	/* 32 would probably be OK */  #define kretprobe_blacklist_size 0 @@ -26,6 +27,19 @@ struct arch_specific_insn {  	kprobe_opcode_t	insn[MAX_INSN_SIZE];  }; +struct prev_kprobe { +	struct kprobe *kp; +	unsigned int status; +}; + +/* per-cpu kprobe control block */ +struct kprobe_ctlblk { +	unsigned int kprobe_status; +	struct prev_kprobe prev_kprobe; +	struct pt_regs jprobe_saved_regs; +	char jprobes_stack[MAX_STACK_SIZE]; +}; +  extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);  extern int kprobe_exceptions_notify(struct notifier_block *self,  				    unsigned long val, void *data); diff --git a/arch/avr32/include/asm/pgalloc.h b/arch/avr32/include/asm/pgalloc.h index bc7e8ae479e..1aba19d68c5 100644 --- a/arch/avr32/include/asm/pgalloc.h +++ b/arch/avr32/include/asm/pgalloc.h @@ -68,7 +68,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,  		return NULL;  	page = virt_to_page(pg); -	pgtable_page_ctor(page); +	if (!pgtable_page_ctor(page)) { +		quicklist_free(QUICK_PT, NULL, pg); +		return NULL; +	}  	return page;  } diff --git a/arch/avr32/include/asm/processor.h b/arch/avr32/include/asm/processor.h index 48d71c5c898..972adcc1e8f 100644 --- a/arch/avr32/include/asm/processor.h +++ b/arch/avr32/include/asm/processor.h @@ -83,13 +83,8 @@ static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu)  extern struct avr32_cpuinfo boot_cpu_data; -#ifdef CONFIG_SMP -extern struct avr32_cpuinfo cpu_data[]; -#define current_cpu_data cpu_data[smp_processor_id()] -#else -#define cpu_data (&boot_cpu_data) +/* No SMP support so far */  #define current_cpu_data boot_cpu_data -#endif  /* This decides where the kernel will search for a free chunk of vm   * space during mmap's diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index 6dc62e1f94c..a978f3fe7c2 100644 --- a/arch/avr32/include/asm/thread_info.h +++ b/arch/avr32/include/asm/thread_info.h @@ -66,8 +66,6 @@ static inline struct thread_info *current_thread_info(void)  #endif /* !__ASSEMBLY__ */ -#define PREEMPT_ACTIVE		0x40000000 -  /*   * Thread information flags   * - these are process state flags that various assembly files may need to access diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild index 3b85eaddf52..08d8a3d76ea 100644 --- a/arch/avr32/include/uapi/asm/Kbuild +++ b/arch/avr32/include/uapi/asm/Kbuild @@ -2,35 +2,35 @@  include include/uapi/asm-generic/Kbuild.asm  header-y += auxvec.h -header-y += bitsperlong.h  header-y += byteorder.h  header-y += cachectl.h -header-y += errno.h -header-y += fcntl.h -header-y += ioctl.h -header-y += ioctls.h -header-y += ipcbuf.h -header-y += kvm_para.h -header-y += mman.h  header-y += msgbuf.h  header-y += param.h -header-y += poll.h  header-y += posix_types.h  header-y += ptrace.h -header-y += resource.h  header-y += sembuf.h  header-y += setup.h  header-y += shmbuf.h  header-y += sigcontext.h -header-y += siginfo.h  header-y += signal.h  header-y += socket.h  header-y += sockios.h  header-y += stat.h -header-y += statfs.h  header-y += swab.h  header-y += termbits.h  header-y += termios.h  header-y += types.h  header-y += unistd.h +generic-y += bitsperlong.h +generic-y += errno.h +generic-y += fcntl.h +generic-y += ioctl.h +generic-y += ioctls.h +generic-y += ipcbuf.h +generic-y += kvm_para.h +generic-y += mman.h  generic-y += param.h +generic-y += poll.h +generic-y += resource.h +generic-y += siginfo.h +generic-y += statfs.h diff --git a/arch/avr32/include/uapi/asm/auxvec.h b/arch/avr32/include/uapi/asm/auxvec.h index d5dd435bf8f..4f02da3ffef 100644 --- a/arch/avr32/include/uapi/asm/auxvec.h +++ b/arch/avr32/include/uapi/asm/auxvec.h @@ -1,4 +1,4 @@ -#ifndef __ASM_AVR32_AUXVEC_H -#define __ASM_AVR32_AUXVEC_H +#ifndef _UAPI__ASM_AVR32_AUXVEC_H +#define _UAPI__ASM_AVR32_AUXVEC_H -#endif /* __ASM_AVR32_AUXVEC_H */ +#endif /* _UAPI__ASM_AVR32_AUXVEC_H */ diff --git a/arch/avr32/include/uapi/asm/bitsperlong.h b/arch/avr32/include/uapi/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b..00000000000 --- a/arch/avr32/include/uapi/asm/bitsperlong.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/bitsperlong.h> diff --git a/arch/avr32/include/uapi/asm/byteorder.h b/arch/avr32/include/uapi/asm/byteorder.h index 50abc21619a..71242f0d39c 100644 --- a/arch/avr32/include/uapi/asm/byteorder.h +++ b/arch/avr32/include/uapi/asm/byteorder.h @@ -1,9 +1,9 @@  /*   * AVR32 endian-conversion functions.   */ -#ifndef __ASM_AVR32_BYTEORDER_H -#define __ASM_AVR32_BYTEORDER_H +#ifndef _UAPI__ASM_AVR32_BYTEORDER_H +#define _UAPI__ASM_AVR32_BYTEORDER_H  #include <linux/byteorder/big_endian.h> -#endif /* __ASM_AVR32_BYTEORDER_H */ +#endif /* _UAPI__ASM_AVR32_BYTEORDER_H */ diff --git a/arch/avr32/include/uapi/asm/cachectl.h b/arch/avr32/include/uapi/asm/cachectl.h index 4faf1ce6006..573a9584dd5 100644 --- a/arch/avr32/include/uapi/asm/cachectl.h +++ b/arch/avr32/include/uapi/asm/cachectl.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_CACHECTL_H -#define __ASM_AVR32_CACHECTL_H +#ifndef _UAPI__ASM_AVR32_CACHECTL_H +#define _UAPI__ASM_AVR32_CACHECTL_H  /*   * Operations that can be performed through the cacheflush system call @@ -8,4 +8,4 @@  /* Clean the data cache, then invalidate the icache */  #define CACHE_IFLUSH	0 -#endif /* __ASM_AVR32_CACHECTL_H */ +#endif /* _UAPI__ASM_AVR32_CACHECTL_H */ diff --git a/arch/avr32/include/uapi/asm/errno.h b/arch/avr32/include/uapi/asm/errno.h deleted file mode 100644 index 558a7249f06..00000000000 --- a/arch/avr32/include/uapi/asm/errno.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_ERRNO_H -#define __ASM_AVR32_ERRNO_H - -#include <asm-generic/errno.h> - -#endif /* __ASM_AVR32_ERRNO_H */ diff --git a/arch/avr32/include/uapi/asm/fcntl.h b/arch/avr32/include/uapi/asm/fcntl.h deleted file mode 100644 index 14c0c4402b1..00000000000 --- a/arch/avr32/include/uapi/asm/fcntl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_FCNTL_H -#define __ASM_AVR32_FCNTL_H - -#include <asm-generic/fcntl.h> - -#endif /* __ASM_AVR32_FCNTL_H */ diff --git a/arch/avr32/include/uapi/asm/ioctl.h b/arch/avr32/include/uapi/asm/ioctl.h deleted file mode 100644 index c8472c1398e..00000000000 --- a/arch/avr32/include/uapi/asm/ioctl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_IOCTL_H -#define __ASM_AVR32_IOCTL_H - -#include <asm-generic/ioctl.h> - -#endif /* __ASM_AVR32_IOCTL_H */ diff --git a/arch/avr32/include/uapi/asm/ioctls.h b/arch/avr32/include/uapi/asm/ioctls.h deleted file mode 100644 index 909cf66feaf..00000000000 --- a/arch/avr32/include/uapi/asm/ioctls.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_IOCTLS_H -#define __ASM_AVR32_IOCTLS_H - -#include <asm-generic/ioctls.h> - -#endif /* __ASM_AVR32_IOCTLS_H */ diff --git a/arch/avr32/include/uapi/asm/ipcbuf.h b/arch/avr32/include/uapi/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d..00000000000 --- a/arch/avr32/include/uapi/asm/ipcbuf.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/ipcbuf.h> diff --git a/arch/avr32/include/uapi/asm/kvm_para.h b/arch/avr32/include/uapi/asm/kvm_para.h deleted file mode 100644 index 14fab8f0b95..00000000000 --- a/arch/avr32/include/uapi/asm/kvm_para.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/kvm_para.h> diff --git a/arch/avr32/include/uapi/asm/mman.h b/arch/avr32/include/uapi/asm/mman.h deleted file mode 100644 index 8eebf89f5ab..00000000000 --- a/arch/avr32/include/uapi/asm/mman.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/mman.h> diff --git a/arch/avr32/include/uapi/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h index ac18bc4da7f..9eae6effad1 100644 --- a/arch/avr32/include/uapi/asm/msgbuf.h +++ b/arch/avr32/include/uapi/asm/msgbuf.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_MSGBUF_H -#define __ASM_AVR32_MSGBUF_H +#ifndef _UAPI__ASM_AVR32_MSGBUF_H +#define _UAPI__ASM_AVR32_MSGBUF_H  /*   * The msqid64_ds structure for i386 architecture. @@ -28,4 +28,4 @@ struct msqid64_ds {  	unsigned long  __unused5;  }; -#endif /* __ASM_AVR32_MSGBUF_H */ +#endif /* _UAPI__ASM_AVR32_MSGBUF_H */ diff --git a/arch/avr32/include/uapi/asm/poll.h b/arch/avr32/include/uapi/asm/poll.h deleted file mode 100644 index c98509d3149..00000000000 --- a/arch/avr32/include/uapi/asm/poll.h +++ /dev/null @@ -1 +0,0 @@ -#include <asm-generic/poll.h> diff --git a/arch/avr32/include/uapi/asm/posix_types.h b/arch/avr32/include/uapi/asm/posix_types.h index 9ba9e749b3f..5b813a8abf0 100644 --- a/arch/avr32/include/uapi/asm/posix_types.h +++ b/arch/avr32/include/uapi/asm/posix_types.h @@ -5,8 +5,8 @@   * it under the terms of the GNU General Public License version 2 as   * published by the Free Software Foundation.   */ -#ifndef __ASM_AVR32_POSIX_TYPES_H -#define __ASM_AVR32_POSIX_TYPES_H +#ifndef _UAPI__ASM_AVR32_POSIX_TYPES_H +#define _UAPI__ASM_AVR32_POSIX_TYPES_H  /*   * This file is generally used by user-level software, so you need to @@ -34,4 +34,4 @@ typedef unsigned short  __kernel_old_dev_t;  #include <asm-generic/posix_types.h> -#endif /* __ASM_AVR32_POSIX_TYPES_H */ +#endif /* _UAPI__ASM_AVR32_POSIX_TYPES_H */ diff --git a/arch/avr32/include/uapi/asm/resource.h b/arch/avr32/include/uapi/asm/resource.h deleted file mode 100644 index c6dd101472b..00000000000 --- a/arch/avr32/include/uapi/asm/resource.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_RESOURCE_H -#define __ASM_AVR32_RESOURCE_H - -#include <asm-generic/resource.h> - -#endif /* __ASM_AVR32_RESOURCE_H */ diff --git a/arch/avr32/include/uapi/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h index e472216e0c9..6c6f7cf1e75 100644 --- a/arch/avr32/include/uapi/asm/sembuf.h +++ b/arch/avr32/include/uapi/asm/sembuf.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_SEMBUF_H -#define __ASM_AVR32_SEMBUF_H +#ifndef _UAPI__ASM_AVR32_SEMBUF_H +#define _UAPI__ASM_AVR32_SEMBUF_H  /*  * The semid64_ds structure for AVR32 architecture. @@ -22,4 +22,4 @@ struct semid64_ds {          unsigned long   __unused4;  }; -#endif /* __ASM_AVR32_SEMBUF_H */ +#endif /* _UAPI__ASM_AVR32_SEMBUF_H */ diff --git a/arch/avr32/include/uapi/asm/setup.h b/arch/avr32/include/uapi/asm/setup.h index e58aa9356fa..a654df7dba4 100644 --- a/arch/avr32/include/uapi/asm/setup.h +++ b/arch/avr32/include/uapi/asm/setup.h @@ -13,5 +13,4 @@  #define COMMAND_LINE_SIZE 256 -  #endif /* _UAPI__ASM_AVR32_SETUP_H__ */ diff --git a/arch/avr32/include/uapi/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h index c62fba41739..b94cf8b60b7 100644 --- a/arch/avr32/include/uapi/asm/shmbuf.h +++ b/arch/avr32/include/uapi/asm/shmbuf.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_SHMBUF_H -#define __ASM_AVR32_SHMBUF_H +#ifndef _UAPI__ASM_AVR32_SHMBUF_H +#define _UAPI__ASM_AVR32_SHMBUF_H  /*   * The shmid64_ds structure for i386 architecture. @@ -39,4 +39,4 @@ struct shminfo64 {  	unsigned long	__unused4;  }; -#endif /* __ASM_AVR32_SHMBUF_H */ +#endif /* _UAPI__ASM_AVR32_SHMBUF_H */ diff --git a/arch/avr32/include/uapi/asm/sigcontext.h b/arch/avr32/include/uapi/asm/sigcontext.h index e04062b5f39..27e56bf6377 100644 --- a/arch/avr32/include/uapi/asm/sigcontext.h +++ b/arch/avr32/include/uapi/asm/sigcontext.h @@ -5,8 +5,8 @@   * it under the terms of the GNU General Public License version 2 as   * published by the Free Software Foundation.   */ -#ifndef __ASM_AVR32_SIGCONTEXT_H -#define __ASM_AVR32_SIGCONTEXT_H +#ifndef _UAPI__ASM_AVR32_SIGCONTEXT_H +#define _UAPI__ASM_AVR32_SIGCONTEXT_H  struct sigcontext {  	unsigned long	oldmask; @@ -31,4 +31,4 @@ struct sigcontext {  	unsigned long	r0;  }; -#endif /* __ASM_AVR32_SIGCONTEXT_H */ +#endif /* _UAPI__ASM_AVR32_SIGCONTEXT_H */ diff --git a/arch/avr32/include/uapi/asm/siginfo.h b/arch/avr32/include/uapi/asm/siginfo.h deleted file mode 100644 index 5ee93f40a8a..00000000000 --- a/arch/avr32/include/uapi/asm/siginfo.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _AVR32_SIGINFO_H -#define _AVR32_SIGINFO_H - -#include <asm-generic/siginfo.h> - -#endif diff --git a/arch/avr32/include/uapi/asm/signal.h b/arch/avr32/include/uapi/asm/signal.h index 1b77a93eff5..ffe8c770caf 100644 --- a/arch/avr32/include/uapi/asm/signal.h +++ b/arch/avr32/include/uapi/asm/signal.h @@ -118,5 +118,4 @@ typedef struct sigaltstack {  	size_t ss_size;  } stack_t; -  #endif /* _UAPI__ASM_AVR32_SIGNAL_H */ diff --git a/arch/avr32/include/uapi/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h index 11c4259c62f..6e6cd159924 100644 --- a/arch/avr32/include/uapi/asm/socket.h +++ b/arch/avr32/include/uapi/asm/socket.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_SOCKET_H -#define __ASM_AVR32_SOCKET_H +#ifndef _UAPI__ASM_AVR32_SOCKET_H +#define _UAPI__ASM_AVR32_SOCKET_H  #include <asm/sockios.h> @@ -76,4 +76,8 @@  #define SO_BUSY_POLL		46 -#endif /* __ASM_AVR32_SOCKET_H */ +#define SO_MAX_PACING_RATE	47 + +#define SO_BPF_EXTENSIONS	48 + +#endif /* _UAPI__ASM_AVR32_SOCKET_H */ diff --git a/arch/avr32/include/uapi/asm/sockios.h b/arch/avr32/include/uapi/asm/sockios.h index 0802d742f97..d0478545353 100644 --- a/arch/avr32/include/uapi/asm/sockios.h +++ b/arch/avr32/include/uapi/asm/sockios.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_SOCKIOS_H -#define __ASM_AVR32_SOCKIOS_H +#ifndef _UAPI__ASM_AVR32_SOCKIOS_H +#define _UAPI__ASM_AVR32_SOCKIOS_H  /* Socket-level I/O control calls. */  #define FIOSETOWN 	0x8901 @@ -10,4 +10,4 @@  #define SIOCGSTAMP	0x8906		/* Get stamp (timeval) */  #define SIOCGSTAMPNS	0x8907		/* Get stamp (timespec) */ -#endif /* __ASM_AVR32_SOCKIOS_H */ +#endif /* _UAPI__ASM_AVR32_SOCKIOS_H */ diff --git a/arch/avr32/include/uapi/asm/stat.h b/arch/avr32/include/uapi/asm/stat.h index e72881e1023..c06acef7fce 100644 --- a/arch/avr32/include/uapi/asm/stat.h +++ b/arch/avr32/include/uapi/asm/stat.h @@ -5,8 +5,8 @@   * it under the terms of the GNU General Public License version 2 as   * published by the Free Software Foundation.   */ -#ifndef __ASM_AVR32_STAT_H -#define __ASM_AVR32_STAT_H +#ifndef _UAPI__ASM_AVR32_STAT_H +#define _UAPI__ASM_AVR32_STAT_H  struct __old_kernel_stat {          unsigned short st_dev; @@ -76,4 +76,4 @@ struct stat64 {  	unsigned long	__unused2;  }; -#endif /* __ASM_AVR32_STAT_H */ +#endif /* _UAPI__ASM_AVR32_STAT_H */ diff --git a/arch/avr32/include/uapi/asm/statfs.h b/arch/avr32/include/uapi/asm/statfs.h deleted file mode 100644 index 2961bd18c50..00000000000 --- a/arch/avr32/include/uapi/asm/statfs.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_AVR32_STATFS_H -#define __ASM_AVR32_STATFS_H - -#include <asm-generic/statfs.h> - -#endif /* __ASM_AVR32_STATFS_H */ diff --git a/arch/avr32/include/uapi/asm/swab.h b/arch/avr32/include/uapi/asm/swab.h index 14cc737bbca..1a03549e7dc 100644 --- a/arch/avr32/include/uapi/asm/swab.h +++ b/arch/avr32/include/uapi/asm/swab.h @@ -1,8 +1,8 @@  /*   * AVR32 byteswapping functions.   */ -#ifndef __ASM_AVR32_SWAB_H -#define __ASM_AVR32_SWAB_H +#ifndef _UAPI__ASM_AVR32_SWAB_H +#define _UAPI__ASM_AVR32_SWAB_H  #include <linux/types.h>  #include <linux/compiler.h> @@ -32,4 +32,4 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 val)  #define __arch_swab32 __arch_swab32  #endif -#endif /* __ASM_AVR32_SWAB_H */ +#endif /* _UAPI__ASM_AVR32_SWAB_H */ diff --git a/arch/avr32/include/uapi/asm/termbits.h b/arch/avr32/include/uapi/asm/termbits.h index 366adc5ebb1..32789ccb38f 100644 --- a/arch/avr32/include/uapi/asm/termbits.h +++ b/arch/avr32/include/uapi/asm/termbits.h @@ -1,5 +1,5 @@ -#ifndef __ASM_AVR32_TERMBITS_H -#define __ASM_AVR32_TERMBITS_H +#ifndef _UAPI__ASM_AVR32_TERMBITS_H +#define _UAPI__ASM_AVR32_TERMBITS_H  #include <linux/posix_types.h> @@ -193,4 +193,4 @@ struct ktermios {  #define	TCSADRAIN	1  #define	TCSAFLUSH	2 -#endif /* __ASM_AVR32_TERMBITS_H */ +#endif /* _UAPI__ASM_AVR32_TERMBITS_H */ diff --git a/arch/avr32/include/uapi/asm/termios.h b/arch/avr32/include/uapi/asm/termios.h index b8ef8ea6335..c8a0081556c 100644 --- a/arch/avr32/include/uapi/asm/termios.h +++ b/arch/avr32/include/uapi/asm/termios.h @@ -46,5 +46,4 @@ struct termio {  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -  #endif /* _UAPI__ASM_AVR32_TERMIOS_H */ diff --git a/arch/avr32/include/uapi/asm/types.h b/arch/avr32/include/uapi/asm/types.h index bb34ad349df..7c986c4e99b 100644 --- a/arch/avr32/include/uapi/asm/types.h +++ b/arch/avr32/include/uapi/asm/types.h @@ -5,4 +5,9 @@   * it under the terms of the GNU General Public License version 2 as   * published by the Free Software Foundation.   */ +#ifndef _UAPI__ASM_AVR32_TYPES_H +#define _UAPI__ASM_AVR32_TYPES_H +  #include <asm-generic/int-ll64.h> + +#endif /* _UAPI__ASM_AVR32_TYPES_H */ diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h index 3eaa68753ad..8822bf46ddc 100644 --- a/arch/avr32/include/uapi/asm/unistd.h +++ b/arch/avr32/include/uapi/asm/unistd.h @@ -301,5 +301,4 @@  #define __NR_eventfd		281  #define __NR_setns		283 -  #endif /* _UAPI__ASM_AVR32_UNISTD_H */ diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index 2233be71e2e..0341ae27c9e 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c @@ -39,10 +39,12 @@ static ssize_t store_pc0event(struct device *dev,  			      size_t count)  {  	unsigned long val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf || val > 0x3f) +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret; +	if (val > 0x3f)  		return -EINVAL;  	val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff);  	sysreg_write(PCCR, val); @@ -61,11 +63,11 @@ static ssize_t store_pc0count(struct device *dev,  				const char *buf, size_t count)  {  	unsigned long val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf) -		return -EINVAL; +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret;  	sysreg_write(PCNT0, val);  	return count; @@ -84,10 +86,12 @@ static ssize_t store_pc1event(struct device *dev,  			      size_t count)  {  	unsigned long val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf || val > 0x3f) +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret; +	if (val > 0x3f)  		return -EINVAL;  	val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff);  	sysreg_write(PCCR, val); @@ -106,11 +110,11 @@ static ssize_t store_pc1count(struct device *dev,  			      size_t count)  {  	unsigned long val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf) -		return -EINVAL; +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret;  	sysreg_write(PCNT1, val);  	return count; @@ -129,11 +133,11 @@ static ssize_t store_pccycles(struct device *dev,  			      size_t count)  {  	unsigned long val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf) -		return -EINVAL; +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret;  	sysreg_write(PCCNT, val);  	return count; @@ -152,11 +156,11 @@ static ssize_t store_pcenable(struct device *dev,  			      size_t count)  {  	unsigned long pccr, val; -	char *endp; +	int ret; -	val = simple_strtoul(buf, &endp, 0); -	if (endp == buf) -		return -EINVAL; +	ret = kstrtoul(buf, 0, &val); +	if (ret) +		return ret;  	if (val)  		val = 1; diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S index 9899d3cc6f0..7301f4806bb 100644 --- a/arch/avr32/kernel/entry-avr32b.S +++ b/arch/avr32/kernel/entry-avr32b.S @@ -401,9 +401,10 @@ handle_critical:  	/* We should never get here... */  bad_return:  	sub	r12, pc, (. - 1f) -	bral	panic +	lddpc	pc, 2f  	.align	2  1:	.asciz	"Return from critical exception!" +2:	.long	panic  	.align	1  do_bus_error_write: diff --git a/arch/avr32/kernel/head.S b/arch/avr32/kernel/head.S index 6163bd0acb9..59eae6dfbed 100644 --- a/arch/avr32/kernel/head.S +++ b/arch/avr32/kernel/head.S @@ -10,33 +10,13 @@  #include <linux/linkage.h>  #include <asm/page.h> -#include <asm/thread_info.h> -#include <asm/sysreg.h>  	.section .init.text,"ax"  	.global kernel_entry  kernel_entry: -	/* Initialize status register */ -	lddpc   r0, init_sr -	mtsr	SYSREG_SR, r0 - -	/* Set initial stack pointer */ -	lddpc   sp, stack_addr -	sub	sp, -THREAD_SIZE - -#ifdef CONFIG_FRAME_POINTER -	/* Mark last stack frame */ -	mov	lr, 0 -	mov	r7, 0 -#endif -  	/* Start the show */  	lddpc   pc, kernel_start_addr  	.align  2 -init_sr: -	.long   0x007f0000	/* Supervisor mode, everything masked */ -stack_addr: -	.long   init_thread_union  kernel_start_addr:  	.long   start_kernel diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 12f828ad505..d0f771be9e9 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c @@ -59,7 +59,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)  static struct irqaction timer_irqaction = {  	.handler	= timer_interrupt,  	/* Oprofile uses the same irq as the timer, so allow it to be shared */ -	.flags		= IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED, +	.flags		= IRQF_TIMER | IRQF_SHARED,  	.name		= "avr32_comparator",  }; diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index a68f3cf7c3c..a1f4d1e91b5 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -1439,7 +1439,7 @@ fail:   *  LCDC   * -------------------------------------------------------------------- */  #if defined(CONFIG_CPU_AT32AP7000) || defined(CONFIG_CPU_AT32AP7002) -static struct atmel_lcdfb_info atmel_lcdfb0_data; +static struct atmel_lcdfb_pdata atmel_lcdfb0_data;  static struct resource atmel_lcdfb0_resource[] = {  	{  		.start		= 0xff000000, @@ -1467,12 +1467,12 @@ static struct clk atmel_lcdfb0_pixclk = {  };  struct platform_device *__init -at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, +at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,  		     unsigned long fbmem_start, unsigned long fbmem_len,  		     u64 pin_mask)  {  	struct platform_device *pdev; -	struct atmel_lcdfb_info *info; +	struct atmel_lcdfb_pdata *info;  	struct fb_monspecs *monspecs;  	struct fb_videomode *modedb;  	unsigned int modedb_size; @@ -1529,7 +1529,7 @@ at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data,  	}  	info = pdev->dev.platform_data; -	memcpy(info, data, sizeof(struct atmel_lcdfb_info)); +	memcpy(info, data, sizeof(struct atmel_lcdfb_pdata));  	info->default_monspecs = monspecs;  	pdev->name = "at32ap-lcdfb"; diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index d485b039135..f1a316d52c7 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h @@ -44,9 +44,9 @@ struct platform_device *  at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n);  void at32_spi_setup_slaves(unsigned int bus_num, struct spi_board_info *b, unsigned int n); -struct atmel_lcdfb_info; +struct atmel_lcdfb_pdata;  struct platform_device * -at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_info *data, +at32_add_device_lcdc(unsigned int id, struct atmel_lcdfb_pdata *data,  		     unsigned long fbmem_start, unsigned long fbmem_len,  		     u64 pin_mask); diff --git a/arch/avr32/mach-at32ap/pm.c b/arch/avr32/mach-at32ap/pm.c index 32d680eb6f4..db190842b80 100644 --- a/arch/avr32/mach-at32ap/pm.c +++ b/arch/avr32/mach-at32ap/pm.c @@ -181,7 +181,7 @@ static const struct platform_suspend_ops avr32_pm_ops = {  	.enter	= avr32_pm_enter,  }; -static unsigned long avr32_pm_offset(void *symbol) +static unsigned long __init avr32_pm_offset(void *symbol)  {  	extern u8 pm_exception[]; diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c index 6a46ecd56cf..85d635cd7b2 100644 --- a/arch/avr32/mm/cache.c +++ b/arch/avr32/mm/cache.c @@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end)  	__flush_icache_range(start & ~(linesz - 1),  			     (end + linesz - 1) & ~(linesz - 1));  } +EXPORT_SYMBOL(flush_icache_range);  /*   * This one is called from __do_fault() and do_swap_page().  | 
