diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 13:19:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 13:19:32 -0700 |
commit | 2f997759dffe5458446075a58734df39d8035e6e (patch) | |
tree | b799fbec4b57fa8e1408f3b8b43638bbcc5d7a50 /arch/hexagon | |
parent | 472e374161bc00d392e1755fe9915f42b11e310f (diff) | |
parent | a9a44fdf329668125042055c569656aa83d8cccb (diff) | |
download | talos-op-linux-2f997759dffe5458446075a58734df39d8035e6e.tar.gz talos-op-linux-2f997759dffe5458446075a58734df39d8035e6e.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel
Pull Hexagon updates from Richard Kuo:
"Mostly cleanups for compilation with allmodconfig and some other
miscellaneous fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
Hexagon: update CR year for elf.h
Hexagon: remove SP macro
Hexagon: set ELF_EXEC_PAGESIZE to PAGE_SIZE
Hexagon: set the e_flags in user regset view for core dumps
Hexagon: fix atomic_set
Hexagon: add screen_info for VGA_CONSOLE
hexagon: correct type on pgd copy
smp, hexagon: kill SMP single function call interrupt
arch: hexagon: include: asm: add generic macro 'mmiowb' in "io.h"
arch: hexagon: kernel: hexagon_ksyms.c: export related symbols which various modules need
arch: hexagon: kernel: reset.c: use function pointer instead of function for pm_power_off and export it
arch: hexagon: include: asm: add "vga.h" in Kbuild
arch: hexagon: include: asm: Kbuild: add generic "serial.h" in Kbuild
arch: hexagon: include: uapi: asm: setup.h add swith macro __KERNEL__
arch: hexagon: include: asm: add prefix "hvm[ci]_" for all enum members in "hexagon_vm.h"
arch: hexagon: Kconfig: add HAVE_DMA_ATTR in Kconfig and remove "linux/dma-mapping.h" from "asm/dma-mapping.h"
arch: hexagon: kernel: add export symbol function __delay()
hexagon: include: asm: kgdb: extend DBG_MAX_REG_NUM for "cs0/1"
hexagon: kernel: kgdb: include related header for pass compiling.
hexagon: kernel: remove useless variables 'dn', 'r' and 'err' in time_init_deferred() in "time.c"
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/Kconfig | 1 | ||||
-rw-r--r-- | arch/hexagon/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/hexagon/include/asm/atomic.h | 15 | ||||
-rw-r--r-- | arch/hexagon/include/asm/delay.h | 1 | ||||
-rw-r--r-- | arch/hexagon/include/asm/dma-mapping.h | 1 | ||||
-rw-r--r-- | arch/hexagon/include/asm/elf.h | 4 | ||||
-rw-r--r-- | arch/hexagon/include/asm/hexagon_vm.h | 72 | ||||
-rw-r--r-- | arch/hexagon/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/hexagon/include/asm/kgdb.h | 5 | ||||
-rw-r--r-- | arch/hexagon/include/asm/pgalloc.h | 2 | ||||
-rw-r--r-- | arch/hexagon/include/asm/smp.h | 1 | ||||
-rw-r--r-- | arch/hexagon/include/uapi/asm/registers.h | 4 | ||||
-rw-r--r-- | arch/hexagon/include/uapi/asm/setup.h | 5 | ||||
-rw-r--r-- | arch/hexagon/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/hexagon/kernel/hexagon_ksyms.c | 24 | ||||
-rw-r--r-- | arch/hexagon/kernel/kgdb.c | 2 | ||||
-rw-r--r-- | arch/hexagon/kernel/ptrace.c | 1 | ||||
-rw-r--r-- | arch/hexagon/kernel/reset.c | 5 | ||||
-rw-r--r-- | arch/hexagon/kernel/screen_info.c | 3 | ||||
-rw-r--r-- | arch/hexagon/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/hexagon/kernel/time.c | 12 |
21 files changed, 108 insertions, 62 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 09df2608f40a..fbc5c78c9ac7 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -28,6 +28,7 @@ config HEXAGON select GENERIC_CLOCKEVENTS_BROADCAST select MODULES_USE_ELF_RELA select GENERIC_CPU_DEVICES + select HAVE_DMA_ATTRS ---help--- Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index eadcc118f950..0e69796b58c7 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -41,6 +41,7 @@ generic-y += scatterlist.h generic-y += sections.h generic-y += segment.h generic-y += sembuf.h +generic-y += serial.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h @@ -56,4 +57,5 @@ generic-y += trace_clock.h generic-y += types.h generic-y += ucontext.h generic-y += unaligned.h +generic-y += vga.h generic-y += xor.h diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 7aae4cb2a29a..17dc63780c06 100644 --- a/arch/hexagon/include/asm/atomic.h +++ b/arch/hexagon/include/asm/atomic.h @@ -26,7 +26,20 @@ #include <asm/cmpxchg.h> #define ATOMIC_INIT(i) { (i) } -#define atomic_set(v, i) ((v)->counter = (i)) + +/* Normal writes in our arch don't clear lock reservations */ + +static inline void atomic_set(atomic_t *v, int new) +{ + asm volatile( + "1: r6 = memw_locked(%0);\n" + " memw_locked(%0,p0) = %1;\n" + " if (!P0) jump 1b;\n" + : + : "r" (&v->counter), "r" (new) + : "memory", "p0", "r6" + ); +} /** * atomic_read - reads a word, atomically diff --git a/arch/hexagon/include/asm/delay.h b/arch/hexagon/include/asm/delay.h index 53079719d667..8933b9b1a3bf 100644 --- a/arch/hexagon/include/asm/delay.h +++ b/arch/hexagon/include/asm/delay.h @@ -21,6 +21,7 @@ #include <asm/param.h> +extern void __delay(unsigned long cycles); extern void __udelay(unsigned long usecs); #define udelay(usecs) __udelay((usecs)) diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 85e9935660cb..16965427f6b4 100644 --- a/arch/hexagon/include/asm/dma-mapping.h +++ b/arch/hexagon/include/asm/dma-mapping.h @@ -25,7 +25,6 @@ #include <linux/cache.h> #include <linux/mm.h> #include <linux/scatterlist.h> -#include <linux/dma-mapping.h> #include <linux/dma-debug.h> #include <linux/dma-attrs.h> #include <asm/io.h> diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index e1b933a0e121..80311e7b8ca6 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h @@ -1,7 +1,7 @@ /* * ELF definitions for the Hexagon architecture * - * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. + * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -202,7 +202,7 @@ do { \ #define CORE_DUMP_USE_REGSET /* Hrm is this going to cause problems for changing PAGE_SIZE? */ -#define ELF_EXEC_PAGESIZE 4096 +#define ELF_EXEC_PAGESIZE PAGE_SIZE /* * This is the location that an ET_DYN program is loaded if exec'ed. Typical diff --git a/arch/hexagon/include/asm/hexagon_vm.h b/arch/hexagon/include/asm/hexagon_vm.h index 67bb6d6f3337..1f6918b428de 100644 --- a/arch/hexagon/include/asm/hexagon_vm.h +++ b/arch/hexagon/include/asm/hexagon_vm.h @@ -55,27 +55,27 @@ #ifndef __ASSEMBLY__ enum VM_CACHE_OPS { - ickill, - dckill, - l2kill, - dccleaninva, - icinva, - idsync, - fetch_cfg + hvmc_ickill, + hvmc_dckill, + hvmc_l2kill, + hvmc_dccleaninva, + hvmc_icinva, + hvmc_idsync, + hvmc_fetch_cfg }; enum VM_INT_OPS { - nop, - globen, - globdis, - locen, - locdis, - affinity, - get, - peek, - status, - post, - clear + hvmi_nop, + hvmi_globen, + hvmi_globdis, + hvmi_locen, + hvmi_locdis, + hvmi_affinity, + hvmi_get, + hvmi_peek, + hvmi_status, + hvmi_post, + hvmi_clear }; extern void _K_VM_event_vector(void); @@ -98,95 +98,95 @@ long __vmvpid(void); static inline long __vmcache_ickill(void) { - return __vmcache(ickill, 0, 0); + return __vmcache(hvmc_ickill, 0, 0); } static inline long __vmcache_dckill(void) { - return __vmcache(dckill, 0, 0); + return __vmcache(hvmc_dckill, 0, 0); } static inline long __vmcache_l2kill(void) { - return __vmcache(l2kill, 0, 0); + return __vmcache(hvmc_l2kill, 0, 0); } static inline long __vmcache_dccleaninva(unsigned long addr, unsigned long len) { - return __vmcache(dccleaninva, addr, len); + return __vmcache(hvmc_dccleaninva, addr, len); } static inline long __vmcache_icinva(unsigned long addr, unsigned long len) { - return __vmcache(icinva, addr, len); + return __vmcache(hvmc_icinva, addr, len); } static inline long __vmcache_idsync(unsigned long addr, unsigned long len) { - return __vmcache(idsync, addr, len); + return __vmcache(hvmc_idsync, addr, len); } static inline long __vmcache_fetch_cfg(unsigned long val) { - return __vmcache(fetch_cfg, val, 0); + return __vmcache(hvmc_fetch_cfg, val, 0); } /* interrupt operations */ static inline long __vmintop_nop(void) { - return __vmintop(nop, 0, 0, 0, 0); + return __vmintop(hvmi_nop, 0, 0, 0, 0); } static inline long __vmintop_globen(long i) { - return __vmintop(globen, i, 0, 0, 0); + return __vmintop(hvmi_globen, i, 0, 0, 0); } static inline long __vmintop_globdis(long i) { - return __vmintop(globdis, i, 0, 0, 0); + return __vmintop(hvmi_globdis, i, 0, 0, 0); } static inline long __vmintop_locen(long i) { - return __vmintop(locen, i, 0, 0, 0); + return __vmintop(hvmi_locen, i, 0, 0, 0); } static inline long __vmintop_locdis(long i) { - return __vmintop(locdis, i, 0, 0, 0); + return __vmintop(hvmi_locdis, i, 0, 0, 0); } static inline long __vmintop_affinity(long i, long cpu) { - return __vmintop(locdis, i, cpu, 0, 0); + return __vmintop(hvmi_affinity, i, cpu, 0, 0); } static inline long __vmintop_get(void) { - return __vmintop(get, 0, 0, 0, 0); + return __vmintop(hvmi_get, 0, 0, 0, 0); } static inline long __vmintop_peek(void) { - return __vmintop(peek, 0, 0, 0, 0); + return __vmintop(hvmi_peek, 0, 0, 0, 0); } static inline long __vmintop_status(long i) { - return __vmintop(status, i, 0, 0, 0); + return __vmintop(hvmi_status, i, 0, 0, 0); } static inline long __vmintop_post(long i) { - return __vmintop(post, i, 0, 0, 0); + return __vmintop(hvmi_post, i, 0, 0, 0); } static inline long __vmintop_clear(long i) { - return __vmintop(clear, i, 0, 0, 0); + return __vmintop(hvmi_clear, i, 0, 0, 0); } #else /* Only assembly code should reference these */ diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h index 1b7698e19139..70298996e9b2 100644 --- a/arch/hexagon/include/asm/io.h +++ b/arch/hexagon/include/asm/io.h @@ -189,6 +189,8 @@ static inline void writel(u32 data, volatile void __iomem *addr) #define writew_relaxed __raw_writew #define writel_relaxed __raw_writel +#define mmiowb() + /* * Need an mtype somewhere in here, for cache type deals? * This is probably too long for an inline. diff --git a/arch/hexagon/include/asm/kgdb.h b/arch/hexagon/include/asm/kgdb.h index 32a6fb66944a..ccd3ac336b24 100644 --- a/arch/hexagon/include/asm/kgdb.h +++ b/arch/hexagon/include/asm/kgdb.h @@ -34,10 +34,11 @@ static inline void arch_kgdb_breakpoint(void) * 32 gpr + sa0/1 + lc0/1 + m0/1 + gp + ugp + pred + pc = 42 total. * vm regs = psp+elr+est+badva = 4 * syscall+restart = 2 more - * so 48 = 42 +4 + 2 + * also add cs0/1 = 2 + * so 48 = 42 + 4 + 2 + 2 */ #define DBG_USER_REGS 42 -#define DBG_MAX_REG_NUM (DBG_USER_REGS + 6) +#define DBG_MAX_REG_NUM (DBG_USER_REGS + 8) #define NUMREGBYTES (DBG_MAX_REG_NUM*4) #endif /* __HEXAGON_KGDB_H__ */ diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon/include/asm/pgalloc.h index 4c9d382d7798..77da3b0ae3c2 100644 --- a/arch/hexagon/include/asm/pgalloc.h +++ b/arch/hexagon/include/asm/pgalloc.h @@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) * map with a copy of the kernel's persistent map. */ - memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t *)); + memcpy(pgd, swapper_pg_dir, PTRS_PER_PGD*sizeof(pgd_t)); mm->context.generation = kmap_generation; /* Physical version is what is passed to virtual machine on switch */ diff --git a/arch/hexagon/include/asm/smp.h b/arch/hexagon/include/asm/smp.h index 2b9b974e0952..ca171c13891d 100644 --- a/arch/hexagon/include/asm/smp.h +++ b/arch/hexagon/include/asm/smp.h @@ -29,7 +29,6 @@ enum ipi_message_type { IPI_NOP = 0, IPI_RESCHEDULE = 1, IPI_CALL_FUNC, - IPI_CALL_FUNC_SINGLE, IPI_CPU_STOP, IPI_TIMER, }; diff --git a/arch/hexagon/include/uapi/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h index 487d6ceca5e7..e7be31840a90 100644 --- a/arch/hexagon/include/uapi/asm/registers.h +++ b/arch/hexagon/include/uapi/asm/registers.h @@ -6,8 +6,6 @@ #ifndef _ASM_REGISTERS_H #define _ASM_REGISTERS_H -#define SP r29 - #ifndef __ASSEMBLY__ /* See kernel/entry.S for further documentation. */ @@ -215,7 +213,7 @@ struct pt_regs { #define pt_clr_singlestep(regs) ((regs)->hvmer.vmest &= ~(1<<HVM_VMEST_SS_SFT)) #define pt_set_rte_sp(regs, sp) do {\ - pt_psp(regs) = (regs)->SP = (sp);\ + pt_psp(regs) = (regs)->r29 = (sp);\ } while (0) #define pt_set_kmode(regs) \ diff --git a/arch/hexagon/include/uapi/asm/setup.h b/arch/hexagon/include/uapi/asm/setup.h index e48285e4af96..7e3952d6221c 100644 --- a/arch/hexagon/include/uapi/asm/setup.h +++ b/arch/hexagon/include/uapi/asm/setup.h @@ -19,7 +19,12 @@ #ifndef _ASM_SETUP_H #define _ASM_SETUP_H +#ifdef __KERNEL__ #include <linux/init.h> +#else +#define __init +#endif + #include <asm-generic/setup.h> extern char external_cmdline_buffer; diff --git a/arch/hexagon/kernel/Makefile b/arch/hexagon/kernel/Makefile index 29fc933a7722..009228b8611c 100644 --- a/arch/hexagon/kernel/Makefile +++ b/arch/hexagon/kernel/Makefile @@ -15,3 +15,5 @@ obj-y += vm_vectors.o obj-$(CONFIG_HAS_DMA) += dma.o obj-$(CONFIG_STACKTRACE) += stacktrace.o + +obj-$(CONFIG_VGA_CONSOLE) += screen_info.o diff --git a/arch/hexagon/kernel/hexagon_ksyms.c b/arch/hexagon/kernel/hexagon_ksyms.c index 32b1379d6877..c041d8ecb1e2 100644 --- a/arch/hexagon/kernel/hexagon_ksyms.c +++ b/arch/hexagon/kernel/hexagon_ksyms.c @@ -18,23 +18,39 @@ * 02110-1301, USA. */ +#include <linux/dma-mapping.h> #include <asm/hexagon_vm.h> +#include <asm/io.h> #include <asm/uaccess.h> +/* Additional functions */ +EXPORT_SYMBOL(__clear_user_hexagon); EXPORT_SYMBOL(__copy_from_user_hexagon); EXPORT_SYMBOL(__copy_to_user_hexagon); +EXPORT_SYMBOL(__iounmap); +EXPORT_SYMBOL(__strnlen_user); EXPORT_SYMBOL(__vmgetie); EXPORT_SYMBOL(__vmsetie); +EXPORT_SYMBOL(__vmyield); +EXPORT_SYMBOL(empty_zero_page); +EXPORT_SYMBOL(ioremap_nocache); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); +/* Additional variables */ +EXPORT_SYMBOL(__phys_offset); +EXPORT_SYMBOL(_dflt_cache_att); +EXPORT_SYMBOL(bad_dma_address); + #define DECLARE_EXPORT(name) \ extern void name(void); EXPORT_SYMBOL(name) /* Symbols found in libgcc that assorted kernel modules need */ DECLARE_EXPORT(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes); -DECLARE_EXPORT(__hexagon_divsi3); -DECLARE_EXPORT(__hexagon_modsi3); -DECLARE_EXPORT(__hexagon_udivsi3); -DECLARE_EXPORT(__hexagon_umodsi3); +/* Additional functions */ +DECLARE_EXPORT(__divsi3); +DECLARE_EXPORT(__modsi3); +DECLARE_EXPORT(__udivsi3); +DECLARE_EXPORT(__umodsi3); +DECLARE_EXPORT(csum_tcpudp_magic); diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c index 82d5c2593323..038580cc5abf 100644 --- a/arch/hexagon/kernel/kgdb.c +++ b/arch/hexagon/kernel/kgdb.c @@ -18,6 +18,8 @@ * 02110-1301, USA. */ +#include <linux/irq.h> +#include <linux/sched.h> #include <linux/kdebug.h> #include <linux/kgdb.h> diff --git a/arch/hexagon/kernel/ptrace.c b/arch/hexagon/kernel/ptrace.c index de829eb7f185..390a9ad14ca1 100644 --- a/arch/hexagon/kernel/ptrace.c +++ b/arch/hexagon/kernel/ptrace.c @@ -183,6 +183,7 @@ static const struct user_regset_view hexagon_user_view = { .e_machine = ELF_ARCH, .ei_osabi = ELF_OSABI, .regsets = hexagon_regsets, + .e_flags = ELF_CORE_EFLAGS, .n = ARRAY_SIZE(hexagon_regsets) }; diff --git a/arch/hexagon/kernel/reset.c b/arch/hexagon/kernel/reset.c index 6aeabc962b3b..76483c10130d 100644 --- a/arch/hexagon/kernel/reset.c +++ b/arch/hexagon/kernel/reset.c @@ -33,6 +33,5 @@ void machine_restart(char *cmd) { } -void pm_power_off(void) -{ -} +void (*pm_power_off)(void) = NULL; +EXPORT_SYMBOL(pm_power_off); diff --git a/arch/hexagon/kernel/screen_info.c b/arch/hexagon/kernel/screen_info.c new file mode 100644 index 000000000000..1e1ceb18bafe --- /dev/null +++ b/arch/hexagon/kernel/screen_info.c @@ -0,0 +1,3 @@ +#include <linux/screen_info.h> + +struct screen_info screen_info; diff --git a/arch/hexagon/kernel/smp.c b/arch/hexagon/kernel/smp.c index 9faaa940452b..ff759f26b96a 100644 --- a/arch/hexagon/kernel/smp.c +++ b/arch/hexagon/kernel/smp.c @@ -64,10 +64,6 @@ static inline void __handle_ipi(unsigned long *ops, struct ipi_data *ipi, generic_smp_call_function_interrupt(); break; - case IPI_CALL_FUNC_SINGLE: - generic_smp_call_function_single_interrupt(); - break; - case IPI_CPU_STOP: /* * call vmstop() @@ -248,7 +244,7 @@ void smp_send_stop(void) void arch_send_call_function_single_ipi(int cpu) { - send_ipi(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); + send_ipi(cpumask_of(cpu), IPI_CALL_FUNC); } void arch_send_call_function_ipi_mask(const struct cpumask *mask) diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index 9903fad997f3..17fbf45bf150 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c @@ -191,9 +191,6 @@ void __init time_init_deferred(void) { struct resource *resource = NULL; struct clock_event_device *ce_dev = &hexagon_clockevent_dev; - struct device_node *dn; - struct resource r; - int err; ce_dev->cpumask = cpu_all_mask; @@ -232,6 +229,15 @@ void __init time_init(void) late_time_init = time_init_deferred; } +void __delay(unsigned long cycles) +{ + unsigned long long start = __vmgettime(); + + while ((__vmgettime() - start) < cycles) + cpu_relax(); +} +EXPORT_SYMBOL(__delay); + /* * This could become parametric or perhaps even computed at run-time, * but for now we take the observed simulator jitter. |