Commit 514b1923 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 6f73b362 5042ab91
...@@ -13,8 +13,8 @@ config HEXAGON ...@@ -13,8 +13,8 @@ config HEXAGON
# select ARCH_REQUIRE_GPIOLIB # select ARCH_REQUIRE_GPIOLIB
# select HAVE_CLK # select HAVE_CLK
# select IRQ_PER_CPU # select IRQ_PER_CPU
select HAVE_IRQ_WORK
# select GENERIC_PENDING_IRQ if SMP # select GENERIC_PENDING_IRQ if SMP
select HAVE_IRQ_WORK
select GENERIC_ATOMIC64 select GENERIC_ATOMIC64
select HAVE_PERF_EVENTS select HAVE_PERF_EVENTS
select HAVE_GENERIC_HARDIRQS select HAVE_GENERIC_HARDIRQS
...@@ -26,7 +26,7 @@ config HEXAGON ...@@ -26,7 +26,7 @@ config HEXAGON
select NO_IOPORT select NO_IOPORT
select GENERIC_IOMAP select GENERIC_IOMAP
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
# mostly generic routines, with some accelerated ones select STACKTRACE_SUPPORT
---help--- ---help---
Qualcomm Hexagon is a processor architecture designed for high Qualcomm Hexagon is a processor architecture designed for high
performance and low power across a wide variety of applications. performance and low power across a wide variety of applications.
...@@ -73,15 +73,6 @@ config GENERIC_CSUM ...@@ -73,15 +73,6 @@ config GENERIC_CSUM
config GENERIC_IRQ_PROBE config GENERIC_IRQ_PROBE
def_bool y def_bool y
#config ZONE_DMA
# bool
# default y
config HAS_DMA
bool
select HAVE_DMA_ATTRS
default y
config NEED_SG_DMA_LENGTH config NEED_SG_DMA_LENGTH
def_bool y def_bool y
...@@ -114,14 +105,11 @@ config GENERIC_BUG ...@@ -114,14 +105,11 @@ config GENERIC_BUG
def_bool y def_bool y
depends on BUG depends on BUG
config BUG
def_bool y
menu "Machine selection" menu "Machine selection"
choice choice
prompt "System type" prompt "System type"
default HEXAGON_ARCH_V2 default HEXAGON_COMET
config HEXAGON_COMET config HEXAGON_COMET
bool "Comet Board" bool "Comet Board"
...@@ -194,8 +182,7 @@ source "kernel/Kconfig.hz" ...@@ -194,8 +182,7 @@ source "kernel/Kconfig.hz"
source "kernel/time/Kconfig" source "kernel/time/Kconfig"
config GENERIC_GPIO config GENERIC_GPIO
bool "Generic GPIO support" def_bool n
default n
endmenu endmenu
......
...@@ -50,8 +50,3 @@ head-y := arch/hexagon/kernel/head.o ...@@ -50,8 +50,3 @@ head-y := arch/hexagon/kernel/head.o
core-y += arch/hexagon/kernel/ \ core-y += arch/hexagon/kernel/ \
arch/hexagon/mm/ \ arch/hexagon/mm/ \
arch/hexagon/lib/ arch/hexagon/lib/
# arch/hexagon/platform/common/
#
#core-$(CONFIG_HEXAGON_COMET) += arch/hexagon/platform/comet/
#machine-$(CONFIG_HEXAGON_COMET) := comet
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#ifndef _ASM_SPINLOCK_TYPES_H #ifndef _ASM_SPINLOCK_TYPES_H
#define _ASM_SPINLOCK_TYPES_H #define _ASM_SPINLOCK_TYPES_H
#include <linux/version.h>
#ifndef __LINUX_SPINLOCK_TYPES_H #ifndef __LINUX_SPINLOCK_TYPES_H
# error "please don't include this file directly" # error "please don't include this file directly"
#endif #endif
......
...@@ -54,7 +54,7 @@ static struct gen_pool *coherent_pool; ...@@ -54,7 +54,7 @@ static struct gen_pool *coherent_pool;
/* Allocates from a pool of uncached memory that was reserved at boot time */ /* 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, dma_addr_t *dma_addr, gfp_t flag,
struct dma_attrs *attrs) struct dma_attrs *attrs)
{ {
......
...@@ -201,12 +201,10 @@ void __init time_init_deferred(void) ...@@ -201,12 +201,10 @@ void __init time_init_deferred(void)
resource = rtos_timer_device.resource; resource = rtos_timer_device.resource;
/* ioremap here means this has to run later, after paging init */ /* ioremap here means this has to run later, after paging init */
rtos_timer = ioremap(resource->start, resource->end rtos_timer = ioremap(resource->start, resource_size(resource));
- resource->start + 1);
if (!rtos_timer) { if (!rtos_timer) {
release_mem_region(resource->start, resource->end release_mem_region(resource->start, resource_size(resource));
- resource->start + 1);
} }
clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000); clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000);
......
...@@ -53,6 +53,8 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) ...@@ -53,6 +53,8 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
int si_code = SEGV_MAPERR; int si_code = SEGV_MAPERR;
int fault; int fault;
const struct exception_table_entry *fixup; 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, * 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) ...@@ -63,6 +65,7 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
local_irq_enable(); local_irq_enable();
retry:
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
vma = find_vma(mm, address); vma = find_vma(mm, address);
if (!vma) if (!vma)
...@@ -96,14 +99,23 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) ...@@ -96,14 +99,23 @@ void do_page_fault(unsigned long address, long cause, struct pt_regs *regs)
break; 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. */ /* The most common case -- we are done. */
if (likely(!(fault & VM_FAULT_ERROR))) { if (likely(!(fault & VM_FAULT_ERROR))) {
if (fault & VM_FAULT_MAJOR) if (flags & FAULT_FLAG_ALLOW_RETRY) {
current->maj_flt++; if (fault & VM_FAULT_MAJOR)
else current->maj_flt++;
current->min_flt++; else
current->min_flt++;
if (fault & VM_FAULT_RETRY) {
flags &= ~FAULT_FLAG_ALLOW_RETRY;
goto retry;
}
}
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
return; return;
......
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