From c19aa754f32ff1dd7cb8e96454f5eba95c20585e Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 30 Apr 2007 17:15:46 +0200 Subject: [AVR32] Use correct config symbol when setting cpuflags As Robert P. J. Day pointed out, the CONFIG_CPU_AT32AP7000 symbol wasn't used for anything. It should have been used to select the correct -mcpu= options for CFLAGS. -mcpu=ap7000 is the default anyway, so this patch shouldn't really make any difference, but it's always nice to do things correctly. Signed-off-by: Haavard Skinnemoen --- arch/avr32/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile index 6115fc1f0cf..dc6bc01f232 100644 --- a/arch/avr32/Makefile +++ b/arch/avr32/Makefile @@ -16,7 +16,7 @@ AFLAGS += -mrelax -mno-pic CFLAGS_MODULE += -mno-relax LDFLAGS_vmlinux += --relax -cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 +cpuflags-$(CONFIG_CPU_AT32AP7000) += -mcpu=ap7000 CFLAGS += $(cpuflags-y) AFLAGS += $(cpuflags-y) -- cgit v1.2.3 From e89b064a4fd18b9c57b7aecbe7101d782759cf81 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 29 Apr 2007 16:10:34 +0000 Subject: AVR32: Spinlock initializer cleanup Signed-off-by: Thomas Gleixner Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/traps.c | 2 +- arch/avr32/mach-at32ap/clock.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 4de9edf96ed..86d107511dd 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c @@ -123,7 +123,7 @@ asmlinkage void do_address_exception(unsigned long ecr, struct pt_regs *regs) /* This way of handling undefined instructions is stolen from ARM */ static LIST_HEAD(undef_hook); -static spinlock_t undef_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(undef_lock); void register_undef_hook(struct undef_hook *hook) { diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c index 00c435452d7..0f8c89c9f83 100644 --- a/arch/avr32/mach-at32ap/clock.c +++ b/arch/avr32/mach-at32ap/clock.c @@ -18,7 +18,7 @@ #include "clock.h" -static spinlock_t clk_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(clk_lock); struct clk *clk_get(struct device *dev, const char *id) { -- cgit v1.2.3 From a492dbb9e3d04db138f2841648d1904d38a5295d Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Tue, 20 Mar 2007 14:41:13 +0100 Subject: [AVR32] Implement dma_{alloc,free}_writecombine() Implement dma_alloc_writecombine() and its dma_free_writecombine() counterpart. These will do basically the same thing as dma_alloc_coherent() except that the virtual mapping will allow write buffering, causing better performance for certain use cases like frame buffers. The same API is already available on ARM. Signed-off-by: Haavard Skinnemoen --- arch/avr32/mm/dma-coherent.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index b68d669f823..099212d4567 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c @@ -112,16 +112,21 @@ void dma_free_coherent(struct device *dev, size_t size, } EXPORT_SYMBOL(dma_free_coherent); -#if 0 void *dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) { struct page *page; + dma_addr_t phys; page = __dma_alloc(dev, size, handle, gfp); + if (!page) + return NULL; + + phys = page_to_phys(page); + *handle = phys; /* Now, map the page into P3 with write-combining turned on */ - return __ioremap(page_to_phys(page), size, _PAGE_BUFFER); + return __ioremap(phys, size, _PAGE_BUFFER); } EXPORT_SYMBOL(dma_alloc_writecombine); @@ -132,8 +137,7 @@ void dma_free_writecombine(struct device *dev, size_t size, iounmap(cpu_addr); - page = bus_to_page(handle); + page = phys_to_page(handle); __dma_free(dev, size, page, handle); } EXPORT_SYMBOL(dma_free_writecombine); -#endif -- cgit v1.2.3 From b3cfe0cb37ac7c3ca05a29e308f01c8eb27e06d4 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Wed, 9 May 2007 09:26:18 +0200 Subject: [AVR32] Fix section mismatch .taglist -> .init.text Rename .taglist to .taglist.init to silence section mismatch warnings. The .taglist.init section was already placed in the .init output section along with .init.text, so the warning didn't indicate any real problems. Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/vmlinux.lds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/avr32/kernel/vmlinux.lds.c b/arch/avr32/kernel/vmlinux.lds.c index 7ad20cfb48a..e7f72c995a3 100644 --- a/arch/avr32/kernel/vmlinux.lds.c +++ b/arch/avr32/kernel/vmlinux.lds.c @@ -35,7 +35,7 @@ SECTIONS _einittext = .; . = ALIGN(4); __tagtable_begin = .; - *(.taglist) + *(.taglist.init) __tagtable_end = .; *(.init.data) . = ALIGN(16); -- cgit v1.2.3 From 47cc3e780474be2e462278d63d77c27a493b28ed Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Wed, 9 May 2007 10:23:11 +0200 Subject: [AVR32] Wire up sys_utimensat Tested with a slightly hacked version of the test case included with the original utimensat patch. All OK. Signed-off-by: Haavard Skinnemoen --- arch/avr32/kernel/syscall_table.S | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index 7c279586fbb..07f6a6fa340 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S @@ -291,4 +291,5 @@ sys_call_table: .long sys_shmget /* 275 */ .long sys_shmdt .long sys_shmctl + .long sys_utimensat .long sys_ni_syscall /* r8 is saturated at nr_syscalls */ -- cgit v1.2.3