diff options
Diffstat (limited to 'arch/unicore32')
23 files changed, 72 insertions, 106 deletions
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 82cdd8906f3..928237a7b9c 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -1,5 +1,7 @@  config UNICORE32  	def_bool y +	select ARCH_MIGHT_HAVE_PC_PARPORT +	select ARCH_MIGHT_HAVE_PC_SERIO  	select HAVE_MEMBLOCK  	select HAVE_GENERIC_DMA_COHERENT  	select HAVE_DMA_ATTRS @@ -25,7 +27,7 @@ config UNICORE32  config GENERIC_CSUM  	def_bool y -config NO_IOPORT +config NO_IOPORT_MAP  	bool  config STACKTRACE_SUPPORT @@ -49,9 +51,6 @@ config ARCH_HAS_ILOG2_U32  config ARCH_HAS_ILOG2_U64  	bool -config ARCH_HAS_CPUFREQ -	bool -  config GENERIC_HWEIGHT  	def_bool y @@ -85,7 +84,6 @@ config ARCH_PUV3  	select GENERIC_CLOCKEVENTS  	select HAVE_CLK  	select ARCH_REQUIRE_GPIOLIB -	select ARCH_HAS_CPUFREQ  # CONFIGs for ARCH_PUV3 @@ -196,9 +194,7 @@ menu "Power management options"  source "kernel/power/Kconfig" -if ARCH_HAS_CPUFREQ  source "drivers/cpufreq/Kconfig" -endif  config ARCH_SUSPEND_POSSIBLE  	def_bool y if !ARCH_FPGA diff --git a/arch/unicore32/configs/unicore32_defconfig b/arch/unicore32/configs/unicore32_defconfig index c9dd3198b6f..45f47f88d86 100644 --- a/arch/unicore32/configs/unicore32_defconfig +++ b/arch/unicore32/configs/unicore32_defconfig @@ -149,7 +149,6 @@ CONFIG_SND_PCM_OSS=m  #	USB support  CONFIG_USB_ARCH_HAS_HCD=n  CONFIG_USB=n -CONFIG_USB_DEVICEFS=n  CONFIG_USB_PRINTER=n  CONFIG_USB_STORAGE=n  #	Inventra Highspeed Dual Role Controller diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 89d8b6c4e39..1e5fb872a4a 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -16,6 +16,7 @@ generic-y += fcntl.h  generic-y += ftrace.h  generic-y += futex.h  generic-y += hardirq.h +generic-y += hash.h  generic-y += hw_irq.h  generic-y += ioctl.h  generic-y += ioctls.h @@ -24,6 +25,7 @@ generic-y += irq_regs.h  generic-y += kdebug.h  generic-y += kmap_types.h  generic-y += local.h +generic-y += mcs_spinlock.h  generic-y += mman.h  generic-y += module.h  generic-y += msgbuf.h @@ -32,6 +34,7 @@ generic-y += parport.h  generic-y += percpu.h  generic-y += poll.h  generic-y += posix_types.h +generic-y += preempt.h  generic-y += resource.h  generic-y += scatterlist.h  generic-y += sections.h diff --git a/arch/unicore32/include/asm/barrier.h b/arch/unicore32/include/asm/barrier.h index a6620e5336b..83d6a520f4b 100644 --- a/arch/unicore32/include/asm/barrier.h +++ b/arch/unicore32/include/asm/barrier.h @@ -14,15 +14,6 @@  #define dsb() __asm__ __volatile__ ("" : : : "memory")  #define dmb() __asm__ __volatile__ ("" : : : "memory") -#define mb()				barrier() -#define rmb()				barrier() -#define wmb()				barrier() -#define smp_mb()			barrier() -#define smp_rmb()			barrier() -#define smp_wmb()			barrier() -#define read_barrier_depends()		do { } while (0) -#define smp_read_barrier_depends()	do { } while (0) - -#define set_mb(var, value)		do { var = value; smp_mb(); } while (0) +#include <asm-generic/barrier.h>  #endif /* __UNICORE_BARRIER_H__ */ diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h index 39decb6e6f5..cb1d8fd2b16 100644 --- a/arch/unicore32/include/asm/io.h +++ b/arch/unicore32/include/asm/io.h @@ -39,10 +39,37 @@ extern void __uc32_iounmap(volatile void __iomem *addr);  #define ioremap_nocache(cookie, size)	__uc32_ioremap(cookie, size)  #define iounmap(cookie)			__uc32_iounmap(cookie) +#define readb_relaxed readb +#define readw_relaxed readw +#define readl_relaxed readl +  #define HAVE_ARCH_PIO_SIZE  #define PIO_OFFSET		(unsigned int)(PCI_IOBASE)  #define PIO_MASK		(unsigned int)(IO_SPACE_LIMIT)  #define PIO_RESERVED		(PIO_OFFSET + PIO_MASK + 1) +#ifdef CONFIG_STRICT_DEVMEM + +#include <linux/ioport.h> +#include <linux/mm.h> + +/* + * devmem_is_allowed() checks to see if /dev/mem access to a certain + * address is valid. The argument is a physical page number. + * We mimic x86 here by disallowing access to system RAM as well as + * device-exclusive MMIO regions. This effectively disable read()/write() + * on /dev/mem. + */ +static inline int devmem_is_allowed(unsigned long pfn) +{ +	if (iomem_is_exclusive(pfn << PAGE_SHIFT)) +		return 0; +	if (!page_is_ram(pfn)) +		return 1; +	return 0; +} + +#endif /* CONFIG_STRICT_DEVMEM */ +  #endif	/* __KERNEL__ */  #endif	/* __UNICORE_IO_H__ */ diff --git a/arch/unicore32/include/asm/mmu_context.h b/arch/unicore32/include/asm/mmu_context.h index fb5e4c658f7..ef470a7a3d0 100644 --- a/arch/unicore32/include/asm/mmu_context.h +++ b/arch/unicore32/include/asm/mmu_context.h @@ -14,6 +14,8 @@  #include <linux/compiler.h>  #include <linux/sched.h> +#include <linux/mm.h> +#include <linux/vmacache.h>  #include <linux/io.h>  #include <asm/cacheflush.h> @@ -73,7 +75,7 @@ do { \  		else \  			mm->mmap = NULL; \  		rb_erase(&high_vma->vm_rb, &mm->mm_rb); \ -		mm->mmap_cache = NULL; \ +		vmacache_invalidate(mm); \  		mm->map_count--; \  		remove_vma(high_vma); \  	} \ diff --git a/arch/unicore32/include/asm/pci.h b/arch/unicore32/include/asm/pci.h index f5e108f4a15..654407e9861 100644 --- a/arch/unicore32/include/asm/pci.h +++ b/arch/unicore32/include/asm/pci.h @@ -18,11 +18,6 @@  #include <asm-generic/pci.h>  #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ -static inline void pcibios_penalize_isa_irq(int irq, int active) -{ -	/* We don't do dynamic PCI IRQ allocation */ -} -  #ifdef CONFIG_PCI  static inline void pci_dma_burst_advice(struct pci_dev *pdev,  					enum pci_dma_burst_strategy *strat, diff --git a/arch/unicore32/include/asm/pgalloc.h b/arch/unicore32/include/asm/pgalloc.h index 0213e373a89..2e02d1356fd 100644 --- a/arch/unicore32/include/asm/pgalloc.h +++ b/arch/unicore32/include/asm/pgalloc.h @@ -51,12 +51,14 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)  	struct page *pte;  	pte = alloc_pages(PGALLOC_GFP, 0); -	if (pte) { -		if (!PageHighMem(pte)) { -			void *page = page_address(pte); -			clean_dcache_area(page, PTRS_PER_PTE * sizeof(pte_t)); -		} -		pgtable_page_ctor(pte); +	if (!pte) +		return NULL; +	if (!PageHighMem(pte)) { +		void *page = page_address(pte); +		clean_dcache_area(page, PTRS_PER_PTE * sizeof(pte_t)); +	} +	if (!pgtable_page_ctor(pte)) { +		__free_page(pte);  	}  	return pte; diff --git a/arch/unicore32/include/asm/pgtable.h b/arch/unicore32/include/asm/pgtable.h index 233c25880df..ed6f7d000fb 100644 --- a/arch/unicore32/include/asm/pgtable.h +++ b/arch/unicore32/include/asm/pgtable.h @@ -87,16 +87,16 @@ extern pgprot_t pgprot_kernel;  #define PAGE_NONE		pgprot_user  #define PAGE_SHARED		__pgprot(pgprot_val(pgprot_user | PTE_READ \ -								| PTE_WRITE) +								| PTE_WRITE))  #define PAGE_SHARED_EXEC	__pgprot(pgprot_val(pgprot_user | PTE_READ \  								| PTE_WRITE \ -								| PTE_EXEC) +								| PTE_EXEC))  #define PAGE_COPY		__pgprot(pgprot_val(pgprot_user | PTE_READ)  #define PAGE_COPY_EXEC		__pgprot(pgprot_val(pgprot_user | PTE_READ \ -								| PTE_EXEC) -#define PAGE_READONLY		__pgprot(pgprot_val(pgprot_user | PTE_READ) +								| PTE_EXEC)) +#define PAGE_READONLY		__pgprot(pgprot_val(pgprot_user | PTE_READ))  #define PAGE_READONLY_EXEC	__pgprot(pgprot_val(pgprot_user | PTE_READ \ -								| PTE_EXEC) +								| PTE_EXEC))  #define PAGE_KERNEL		pgprot_kernel  #define PAGE_KERNEL_EXEC	__pgprot(pgprot_val(pgprot_kernel | PTE_EXEC)) diff --git a/arch/unicore32/include/asm/ptrace.h b/arch/unicore32/include/asm/ptrace.h index 9df53d991c7..02bf5a415bf 100644 --- a/arch/unicore32/include/asm/ptrace.h +++ b/arch/unicore32/include/asm/ptrace.h @@ -55,6 +55,7 @@ static inline int valid_user_regs(struct pt_regs *regs)  #define instruction_pointer(regs)	((regs)->UCreg_pc)  #define user_stack_pointer(regs)	((regs)->UCreg_sp) +#define profile_pc(regs)		instruction_pointer(regs)  #endif /* __ASSEMBLY__ */  #endif diff --git a/arch/unicore32/include/asm/thread_info.h b/arch/unicore32/include/asm/thread_info.h index 818b4a1edb5..af36d8eabdf 100644 --- a/arch/unicore32/include/asm/thread_info.h +++ b/arch/unicore32/include/asm/thread_info.h @@ -118,12 +118,6 @@ static inline struct thread_info *current_thread_info(void)  #endif  /* - * We use bit 30 of the preempt_count to indicate that kernel - * preemption is occurring.  See <asm/hardirq.h>. - */ -#define PREEMPT_ACTIVE	0x40000000 - -/*   * thread information flags:   *  TIF_SYSCALL_TRACE	- syscall trace active   *  TIF_SIGPENDING	- signal pending diff --git a/arch/unicore32/kernel/clock.c b/arch/unicore32/kernel/clock.c index 18d4563e6fa..b1ca775f6f6 100644 --- a/arch/unicore32/kernel/clock.c +++ b/arch/unicore32/kernel/clock.c @@ -179,7 +179,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)  	}  #ifdef CONFIG_CPU_FREQ  	if (clk == &clk_mclk_clk) { -		u32 pll_rate, divstatus = PM_DIVSTATUS; +		u32 pll_rate, divstatus = readl(PM_DIVSTATUS);  		int ret, i;  		/* lookup mclk_clk_table */ @@ -201,10 +201,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)  				/ (((divstatus & 0x0000f000) >> 12) + 1);  		/* set pll sys cfg reg. */ -		PM_PLLSYSCFG = pll_rate; +		writel(pll_rate, PM_PLLSYSCFG); -		PM_PMCR = PM_PMCR_CFBSYS; -		while ((PM_PLLDFCDONE & PM_PLLDFCDONE_SYSDFC) +		writel(PM_PMCR_CFBSYS, PM_PMCR); +		while ((readl(PM_PLLDFCDONE) & PM_PLLDFCDONE_SYSDFC)  				!= PM_PLLDFCDONE_SYSDFC)  			udelay(100);  			/* about 1ms */ diff --git a/arch/unicore32/kernel/early_printk.c b/arch/unicore32/kernel/early_printk.c index 9be0d5d02a9..f2f6323c8d6 100644 --- a/arch/unicore32/kernel/early_printk.c +++ b/arch/unicore32/kernel/early_printk.c @@ -35,17 +35,11 @@ static struct console early_ocd_console = {  static int __init setup_early_printk(char *buf)  { -	int keep_early; -  	if (!buf || early_console)  		return 0; -	if (strstr(buf, "keep")) -		keep_early = 1; -  	early_console = &early_ocd_console; - -	if (keep_early) +	if (strstr(buf, "keep"))  		early_console->flags &= ~CON_BOOT;  	else  		early_console->flags |= CON_BOOT; diff --git a/arch/unicore32/kernel/ksyms.c b/arch/unicore32/kernel/ksyms.c index d285d71cbe3..0323528a80f 100644 --- a/arch/unicore32/kernel/ksyms.c +++ b/arch/unicore32/kernel/ksyms.c @@ -23,41 +23,15 @@  #include "ksyms.h" +EXPORT_SYMBOL(find_first_bit); +EXPORT_SYMBOL(find_first_zero_bit);  EXPORT_SYMBOL(find_next_zero_bit);  EXPORT_SYMBOL(find_next_bit); -EXPORT_SYMBOL(__backtrace); -  	/* platform dependent support */  EXPORT_SYMBOL(__udelay);  EXPORT_SYMBOL(__const_udelay); -	/* networking */ -EXPORT_SYMBOL(csum_partial); -EXPORT_SYMBOL(csum_partial_copy_from_user); -EXPORT_SYMBOL(csum_partial_copy_nocheck); -EXPORT_SYMBOL(__csum_ipv6_magic); - -	/* io */ -#ifndef __raw_readsb -EXPORT_SYMBOL(__raw_readsb); -#endif -#ifndef __raw_readsw -EXPORT_SYMBOL(__raw_readsw); -#endif -#ifndef __raw_readsl -EXPORT_SYMBOL(__raw_readsl); -#endif -#ifndef __raw_writesb -EXPORT_SYMBOL(__raw_writesb); -#endif -#ifndef __raw_writesw -EXPORT_SYMBOL(__raw_writesw); -#endif -#ifndef __raw_writesl -EXPORT_SYMBOL(__raw_writesl); -#endif -  	/* string / mem functions */  EXPORT_SYMBOL(strchr);  EXPORT_SYMBOL(strrchr); @@ -76,23 +50,12 @@ EXPORT_SYMBOL(__copy_from_user);  EXPORT_SYMBOL(__copy_to_user);  EXPORT_SYMBOL(__clear_user); -EXPORT_SYMBOL(__get_user_1); -EXPORT_SYMBOL(__get_user_2); -EXPORT_SYMBOL(__get_user_4); - -EXPORT_SYMBOL(__put_user_1); -EXPORT_SYMBOL(__put_user_2); -EXPORT_SYMBOL(__put_user_4); -EXPORT_SYMBOL(__put_user_8); -  EXPORT_SYMBOL(__ashldi3);  EXPORT_SYMBOL(__ashrdi3);  EXPORT_SYMBOL(__divsi3);  EXPORT_SYMBOL(__lshrdi3);  EXPORT_SYMBOL(__modsi3); -EXPORT_SYMBOL(__muldi3);  EXPORT_SYMBOL(__ucmpdi2);  EXPORT_SYMBOL(__udivsi3);  EXPORT_SYMBOL(__umodsi3); -EXPORT_SYMBOL(__bswapsi2); diff --git a/arch/unicore32/kernel/ksyms.h b/arch/unicore32/kernel/ksyms.h index 185cdc712d0..31472ad9467 100644 --- a/arch/unicore32/kernel/ksyms.h +++ b/arch/unicore32/kernel/ksyms.h @@ -8,8 +8,6 @@ extern void __ashrdi3(void);  extern void __divsi3(void);  extern void __lshrdi3(void);  extern void __modsi3(void); -extern void __muldi3(void);  extern void __ucmpdi2(void);  extern void __udivsi3(void);  extern void __umodsi3(void); -extern void __bswapsi2(void); diff --git a/arch/unicore32/kernel/module.c b/arch/unicore32/kernel/module.c index 16bd1495b93..dc41f6dfedb 100644 --- a/arch/unicore32/kernel/module.c +++ b/arch/unicore32/kernel/module.c @@ -24,14 +24,9 @@  void *module_alloc(unsigned long size)  { -	struct vm_struct *area; - -	size = PAGE_ALIGN(size); -	area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); -	if (!area) -		return NULL; - -	return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC); +	return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, +				GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE, +				__builtin_return_address(0));  }  int diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index 778ebba8082..b008e996146 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c @@ -60,6 +60,7 @@ void machine_halt(void)   * Function pointers to optional machine specific functions   */  void (*pm_power_off)(void) = NULL; +EXPORT_SYMBOL(pm_power_off);  void machine_power_off(void)  { diff --git a/arch/unicore32/kernel/puv3-nb0916.c b/arch/unicore32/kernel/puv3-nb0916.c index 181108b8ecc..0c6618e7189 100644 --- a/arch/unicore32/kernel/puv3-nb0916.c +++ b/arch/unicore32/kernel/puv3-nb0916.c @@ -54,6 +54,7 @@ static struct platform_pwm_backlight_data nb0916_backlight_data = {  	.max_brightness	= 100,  	.dft_brightness	= 100,  	.pwm_period_ns	= 70 * 1024, +	.enable_gpio	= -1,  };  static struct gpio_keys_button nb0916_gpio_keys[] = { diff --git a/arch/unicore32/kernel/setup.c b/arch/unicore32/kernel/setup.c index 87adbf5ebfe..3fa317f9612 100644 --- a/arch/unicore32/kernel/setup.c +++ b/arch/unicore32/kernel/setup.c @@ -53,6 +53,10 @@ struct stack {  static struct stack stacks[NR_CPUS]; +#ifdef CONFIG_VGA_CONSOLE +struct screen_info screen_info; +#endif +  char elf_platform[ELF_PLATFORM_SIZE];  EXPORT_SYMBOL(elf_platform); diff --git a/arch/unicore32/mm/alignment.c b/arch/unicore32/mm/alignment.c index de7dc5fdd58..24e836023e6 100644 --- a/arch/unicore32/mm/alignment.c +++ b/arch/unicore32/mm/alignment.c @@ -21,6 +21,7 @@  #include <linux/sched.h>  #include <linux/uaccess.h> +#include <asm/pgtable.h>  #include <asm/tlbflush.h>  #include <asm/unaligned.h> diff --git a/arch/unicore32/mm/init.c b/arch/unicore32/mm/init.c index ae6bc036db9..be2bde9b07c 100644 --- a/arch/unicore32/mm/init.c +++ b/arch/unicore32/mm/init.c @@ -66,9 +66,6 @@ void show_mem(unsigned int filter)  	printk(KERN_DEFAULT "Mem-info:\n");  	show_free_areas(filter); -	if (filter & SHOW_MEM_FILTER_PAGE_COUNT) -		return; -  	for_each_bank(i, mi) {  		struct membank *bank = &mi->bank[i];  		unsigned int pfn1, pfn2; diff --git a/arch/unicore32/mm/ioremap.c b/arch/unicore32/mm/ioremap.c index 13068ee22f3..bf012b2b71a 100644 --- a/arch/unicore32/mm/ioremap.c +++ b/arch/unicore32/mm/ioremap.c @@ -144,11 +144,11 @@ void __iomem *__uc32_ioremap_pfn_caller(unsigned long pfn,  	 * Don't allow RAM to be mapped  	 */  	if (pfn_valid(pfn)) { -		printk(KERN_WARNING "BUG: Your driver calls ioremap() on\n" +		WARN(1, "BUG: Your driver calls ioremap() on\n"  			"system memory.  This leads to architecturally\n"  			"unpredictable behaviour, and ioremap() will fail in\n"  			"the next kernel release. Please fix your driver.\n"); -		WARN_ON(1); +		return NULL;  	}  	type = get_mem_type(mtype); diff --git a/arch/unicore32/mm/proc-syms.c b/arch/unicore32/mm/proc-syms.c index f30071e3665..21c00fc85c9 100644 --- a/arch/unicore32/mm/proc-syms.c +++ b/arch/unicore32/mm/proc-syms.c @@ -19,5 +19,7 @@  EXPORT_SYMBOL(cpu_dcache_clean_area);  EXPORT_SYMBOL(cpu_set_pte); +EXPORT_SYMBOL(__cpuc_coherent_kern_range); +  EXPORT_SYMBOL(__cpuc_dma_flush_range);  EXPORT_SYMBOL(__cpuc_dma_clean_range);  | 
