Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel

Pull Hexagon architecture changes from Richard Kuo:
 "These are mostly cleanups and feedback remaining from the original
  upstreaming."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
  various Kconfig cleanup and old platform build code removal
  hexagon/mm/vm_fault.c: Port OOM changes to do_page_fault
  arch/hexagon/kernel/dma.c: make function static
  Remove unneeded include of version.h from arch/hexagon/include/asm/spinlock_types.h
  Hexagon: Use resource_size function
This commit is contained in:
Linus Torvalds 2012-05-23 09:04:58 -07:00
commit 514b1923e1
6 changed files with 24 additions and 34 deletions

View file

@ -13,8 +13,8 @@ config HEXAGON
# select ARCH_REQUIRE_GPIOLIB
# select HAVE_CLK
# select IRQ_PER_CPU
select HAVE_IRQ_WORK
# select GENERIC_PENDING_IRQ if SMP
select HAVE_IRQ_WORK
select GENERIC_ATOMIC64
select HAVE_PERF_EVENTS
select HAVE_GENERIC_HARDIRQS
@ -26,7 +26,7 @@ config HEXAGON
select NO_IOPORT
select GENERIC_IOMAP
select GENERIC_SMP_IDLE_THREAD
# mostly generic routines, with some accelerated ones
select STACKTRACE_SUPPORT
---help---
Qualcomm Hexagon is a processor architecture designed for high
performance and low power across a wide variety of applications.
@ -73,15 +73,6 @@ config GENERIC_CSUM
config GENERIC_IRQ_PROBE
def_bool y
#config ZONE_DMA
# bool
# default y
config HAS_DMA
bool
select HAVE_DMA_ATTRS
default y
config NEED_SG_DMA_LENGTH
def_bool y
@ -114,14 +105,11 @@ config GENERIC_BUG
def_bool y
depends on BUG
config BUG
def_bool y
menu "Machine selection"
choice
prompt "System type"
default HEXAGON_ARCH_V2
default HEXAGON_COMET
config HEXAGON_COMET
bool "Comet Board"
@ -194,8 +182,7 @@ source "kernel/Kconfig.hz"
source "kernel/time/Kconfig"
config GENERIC_GPIO
bool "Generic GPIO support"
default n
def_bool n
endmenu

View file

@ -50,8 +50,3 @@ head-y := arch/hexagon/kernel/head.o
core-y += arch/hexagon/kernel/ \
arch/hexagon/mm/ \
arch/hexagon/lib/
# arch/hexagon/platform/common/
#
#core-$(CONFIG_HEXAGON_COMET) += arch/hexagon/platform/comet/
#machine-$(CONFIG_HEXAGON_COMET) := comet

View file

@ -21,8 +21,6 @@
#ifndef _ASM_SPINLOCK_TYPES_H
#define _ASM_SPINLOCK_TYPES_H
#include <linux/version.h>
#ifndef __LINUX_SPINLOCK_TYPES_H
# error "please don't include this file directly"
#endif

View file

@ -54,7 +54,7 @@ static struct gen_pool *coherent_pool;
/* Allocates from a pool of uncached memory that was reserved at boot time */
void *hexagon_dma_alloc_coherent(struct device *dev, size_t size,
static void *hexagon_dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_addr, gfp_t flag,
struct dma_attrs *attrs)
{

View file

@ -201,12 +201,10 @@ void __init time_init_deferred(void)
resource = rtos_timer_device.resource;
/* ioremap here means this has to run later, after paging init */
rtos_timer = ioremap(resource->start, resource->end
- resource->start + 1);
rtos_timer = ioremap(resource->start, resource_size(resource));
if (!rtos_timer) {
release_mem_region(resource->start, resource->end
- resource->start + 1);
release_mem_region(resource->start, resource_size(resource));
}
clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000);

View file

@ -53,6 +53,8 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
int si_code = SEGV_MAPERR;
int fault;
const struct exception_table_entry *fixup;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
(cause > 0 ? FAULT_FLAG_WRITE : 0);
/*
* If we're in an interrupt or have no user context,
@ -63,6 +65,7 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
local_irq_enable();
retry:
down_read(&mm->mmap_sem);
vma = find_vma(mm, address);
if (!vma)
@ -96,14 +99,23 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
break;
}
fault = handle_mm_fault(mm, vma, address, (cause > 0));
fault = handle_mm_fault(mm, vma, address, flags);
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
return;
/* The most common case -- we are done. */
if (likely(!(fault & VM_FAULT_ERROR))) {
if (fault & VM_FAULT_MAJOR)
current->maj_flt++;
else
current->min_flt++;
if (flags & FAULT_FLAG_ALLOW_RETRY) {
if (fault & VM_FAULT_MAJOR)
current->maj_flt++;
else
current->min_flt++;
if (fault & VM_FAULT_RETRY) {
flags &= ~FAULT_FLAG_ALLOW_RETRY;
goto retry;
}
}
up_read(&mm->mmap_sem);
return;