Commit e00eea42 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32

* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32:
  [AVR32] Define ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES
  [AVR32] STK1000: Set SPI_MODE_3 in the ltv350qv board info
  [AVR32] gpio_*_cansleep() fix
  [AVR32] ratelimit segfault reporting rate
parents bc90ba09 093d0faf
...@@ -42,6 +42,7 @@ static struct spi_board_info spi0_board_info[] __initdata = { ...@@ -42,6 +42,7 @@ static struct spi_board_info spi0_board_info[] __initdata = {
.modalias = "ltv350qv", .modalias = "ltv350qv",
.max_speed_hz = 16000000, .max_speed_hz = 16000000,
.chip_select = 1, .chip_select = 1,
.mode = SPI_MODE_3,
}, },
}; };
......
...@@ -158,7 +158,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) ...@@ -158,7 +158,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs)
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
if (user_mode(regs)) { if (user_mode(regs)) {
if (exception_trace) if (exception_trace && printk_ratelimit())
printk("%s%s[%d]: segfault at %08lx pc %08lx " printk("%s%s[%d]: segfault at %08lx pc %08lx "
"sp %08lx ecr %lu\n", "sp %08lx ecr %lu\n",
is_init(tsk) ? KERN_EMERG : KERN_INFO, is_init(tsk) ? KERN_EMERG : KERN_INFO,
......
...@@ -14,6 +14,8 @@ int gpio_direction_output(unsigned int gpio, int value); ...@@ -14,6 +14,8 @@ int gpio_direction_output(unsigned int gpio, int value);
int gpio_get_value(unsigned int gpio); int gpio_get_value(unsigned int gpio);
void gpio_set_value(unsigned int gpio, int value); void gpio_set_value(unsigned int gpio, int value);
#include <asm-generic/gpio.h> /* cansleep wrappers */
static inline int gpio_to_irq(unsigned int gpio) static inline int gpio_to_irq(unsigned int gpio)
{ {
return gpio + GPIO_IRQ_BASE; return gpio + GPIO_IRQ_BASE;
......
...@@ -4,6 +4,15 @@ ...@@ -4,6 +4,15 @@
#define L1_CACHE_SHIFT 5 #define L1_CACHE_SHIFT 5
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
/*
* Memory returned by kmalloc() may be used for DMA, so we must make
* sure that all such allocations are cache aligned. Otherwise,
* unrelated code may cause parts of the buffer to be read into the
* cache before the transfer is done, causing old data to be seen by
* the CPU.
*/
#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
struct cache_info { struct cache_info {
unsigned int ways; unsigned int ways;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment