aboutsummaryrefslogtreecommitdiff
path: root/arch/xtensa/kernel
AgeCommit message (Collapse)AuthorFilesLines
2008-12-31take init_fs to saner placeAl Viro1-1/+0
Signed-off-by: Al Viro <[email protected]>
2008-11-06xtensa: move headers files to arch/xtensa/includeChris Zankel2-2/+2
Move all header files for xtensa to arch/xtensa/include and platform and variant header files to the appropriate arch/xtensa/platforms/ and arch/xtensa/variants/ directories. Moving the files gets also rid of all uses of symlinks in the Makefile. This has been completed already for the majority of the architectures and xtensa is one out of six missing. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: Chris Zankel <[email protected]>
2008-10-14xtensa: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-1/+1
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Chris Zankel <[email protected]>
2008-10-13xtensa: remove dead CONFIG_BLK_DEV_IDE codeAdrian Bunk1-5/+0
I don't know why this was there, but it was dead code. Signed-off-by: Adrian Bunk <[email protected]> Cc: [email protected] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
2008-08-05remove unneeded #include <linux/ide.h>'sAdrian Bunk1-1/+0
This patch remove unneeded #include <linux/ide.h>'s. It also adds a required #include <linux/interrupt.h> that was previously implicitely pulled by ide.h Signed-off-by: Adrian Bunk <[email protected]> [bart: revert change to tests/lkdtm.c (spotted by Stephen Rothwell)] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
2008-07-24flag parameters: pipeUlrich Drepper1-1/+1
This patch introduces the new syscall pipe2 which is like pipe but it also takes an additional parameter which takes a flag value. This patch implements the handling of O_CLOEXEC for the flag. I did not add support for the new syscall for the architectures which have a special sys_pipe implementation. I think the maintainers of those archs have the chance to go with the unified implementation but that's up to them. The implementation introduces do_pipe_flags. I did that instead of changing all callers of do_pipe because some of the callers are written in assembler. I would probably screw up changing the assembly code. To avoid breaking code do_pipe is now a small wrapper around do_pipe_flags. Once all callers are changed over to do_pipe_flags the old do_pipe function can be removed. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <sys/syscall.h> #ifndef __NR_pipe2 # ifdef __x86_64__ # define __NR_pipe2 293 # elif defined __i386__ # define __NR_pipe2 331 # else # error "need __NR_pipe2" # endif #endif int main (void) { int fd[2]; if (syscall (__NR_pipe2, fd, 0) != 0) { puts ("pipe2(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { printf ("pipe2(0) set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0) { puts ("pipe2(O_CLOEXEC) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper <[email protected]> Acked-by: Davide Libenzi <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-07-24PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architecturesAndrea Righi1-0/+1
On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit boundary. For example: u64 val = PAGE_ALIGN(size); always returns a value < 4GB even if size is greater than 4GB. The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for example): #define PAGE_SHIFT 12 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) ... #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) The "~" is performed on a 32-bit value, so everything in "and" with PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary. Using the ALIGN() macro seems to be the right way, because it uses typeof(addr) for the mask. Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in include/linux/mm.h. See also lkml discussion: http://lkml.org/lkml/2008/6/11/237 [[email protected]: fix drivers/media/video/uvc/uvc_queue.c] [[email protected]: fix v850] [[email protected]: fix powerpc] [[email protected]: fix arm] [[email protected]: fix mips] [[email protected]: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c] [[email protected]: fix drivers/mtd/maps/uclinux.c] [[email protected]: fix powerpc] Signed-off-by: Andrea Righi <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-16[PATCH] take init_files to fs/file.cAl Viro1-1/+0
Signed-off-by: Al Viro <[email protected]>
2008-04-29xtensa: use kbuild.h macros instead of defining them in asm-offsets.cChristoph Lameter1-2/+1
Signed-off-by: Christoph Lameter <[email protected]> Cc: Chris Zankel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-17Generic semaphore implementationMatthew Wilcox3-236/+1
Semaphores are no longer performance-critical, so a generic C implementation is better for maintainability, debuggability and extensibility. Thanks to Peter Zijlstra for fixing the lockdep warning. Thanks to Harvey Harrison for pointing out that the unlikely() was unnecessary. Signed-off-by: Matthew Wilcox <[email protected]> Acked-by: Ingo Molnar <[email protected]>
2008-02-13[XTENSA] Allow debugger to modify the WINDOWBASE register.Chris Zankel1-31/+35
For the 'return' command, GDB needs to adjust WINDOWBASE. In case WB is different from 0, we need to rotate the window register file and update WINDOWSTART and WMASK. This patch also removes some ret|= statements for __get_user/__put_user as the address range was alrady checked a couple of lines earlier. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Fix register corruption for certain processor configurationsChris Zankel1-29/+15
For processor configurations that have optional registers (compiler-used but non-coprocessor), user space registers might get corrupted when there are only 4 registers in the current window-frame, ie. register a4 belongs to the oldest frame in the register file. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Add support for the sa_restorer functionChris Zankel1-6/+10
Supporting the sa_restorer function allows for better security since the sigreturn system call doesn't need to be placed on the stack, so the stack doesn't need to be executable. This requires support from the c-library as it has to provide the restorer function. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Add support for configurable registers and coprocessorsChris Zankel7-730/+713
The Xtensa architecture allows to define custom instructions and registers. Registers that are bound to a coprocessor are only accessible if the corresponding enable bit is set, which allows to implement a 'lazy' context switch mechanism. Other registers needs to be saved and restore at the time of the context switch or during interrupt handling. This patch adds support for these additional states: - save and restore registers that are used by the compiler upon interrupt entry and exit. - context switch additional registers unbound to any coprocessor - 'lazy' context switch of registers bound to a coprocessor - ptrace interface to provide access to additional registers - update configuration files in include/asm-xtensa/variant-fsf Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Add missing RELOCATE_ENTRY for debug vectorMarc Gauthier1-0/+2
We also need to relocate the debug vector if in RAM. Signed-off-by: Marc Gauthier <[email protected]>
2008-02-13[XTENSA] Remove unused codeChris Zankel1-22/+0
We will never (need to) support signal handling coming from a double exception. There are too many things that could go wrong and delivering signals is not the fastest method for IPC, anyway. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Fix modules for non-exec processor configurationsChris Zankel1-1/+1
We need to use vmalloc_exec for module loading. Also remove the definitions MODULE_START and MODULE_END, which wasn't used, and increase the VMALLOC memory range accordingly. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Fix comments regarding the number of frames to saveChris Zankel1-6/+6
Signed-off-by: Marc Gauthier <[email protected]> Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Add missing a2 register restore in register spill routineChris Zankel1-3/+5
Register a2 is saved in depc but wasn't getting restored before returning from _spill_registers when there weren't any registers to spill. The mask to cut the top bit from the rotated WINDOWMASK register was also one bit short. Signed-off-by: CHris Zankel <[email protected]>
2008-02-13[XTENSA] Remove oldmask from sigcontext and fix register flushChris Zankel1-7/+5
Remove oldmask from the sigcontext structure. Also update wmask and windowstart when we flush the AR registers to stack. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Clean up elf-gregset.Chris Zankel2-60/+7
Remove additional registers from the ELF gregset structure that are only used by the kernel or are not required or invalid in user-space. The ar registers are always aligned to a windowbase value of 0, and the WB register is always assumed to be 0. Increase the size of the structure to 128 entries. This will provide enough space in future. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Add .literal sections for various init sectiont to linker scriptChris Zankel1-1/+3
Xtensa requires separate .literal section for each .text section. Adding addition init sections for cpuinit, meminit, and devinit, broke the Xtensa linker script, so, add these literal sections manually for now. Signed-off-by: Chris Zankel <[email protected]>
2008-02-13[XTENSA] Remove dead code reported by Robert P. J. Day.Adrian Bunk1-5/+0
Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Christian Zankel <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2008-02-13[XTENSA] Remove duplicate includes.Chris Zankel1-1/+0
Signed-off-by: Lucas Woods <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Christian Zankel <[email protected]>
2008-02-08procfs: constify function pointer tablesJan Engelhardt1-1/+1
Signed-off-by: Jan Engelhardt <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Mike Frysinger <[email protected]> Acked-By: David Howells <[email protected]> Acked-by: Bryan Wu <[email protected]> Acked-by: Jesper Nilsson <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-06calibrate_delay() must be __cpuinitAdrian Bunk1-1/+1
calibrate_delay() must be __cpuinit, not __{dev,}init. I've verified that this is correct for all users. While doing the latter, I also did the following cleanups: - remove pointless additional prototypes in C files - ensure all users #include <linux/delay.h> This fixes the following section mismatches with CONFIG_HOTPLUG=n, CONFIG_HOTPLUG_CPU=y: WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder') WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map') Signed-off-by: Adrian Bunk <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Richard Henderson <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Christian Zankel <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Martin Schwidefsky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-01-28all archs: consolidate init and exit sections in vmlinux.lds.hSam Ravnborg1-4/+5
This patch consolidate all definitions of .init.text, .init.data and .exit.text, .exit.data section definitions in the generic vmlinux.lds.h. This is a preparational patch - alone it does not buy us much good. Signed-off-by: Sam Ravnborg <[email protected]>
2007-10-19Use helpers to obtain task pid in printks (arch code)Alexey Dobriyan1-3/+3
One of the easiest things to isolate is the pid printed in kernel log. There was a patch, that made this for arch-independent code, this one makes so for arch/xxx files. It took some time to cross-compile it, but hopefully these are all the printks in arch code. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Pavel Emelyanov <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-10-16Consolidate PTRACE_DETACHAlexey Dobriyan1-4/+0
Identical handlers of PTRACE_DETACH go into ptrace_request(). Not touching compat code. Not touching archs that don't call ptrace_request. Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-08-27[XTENSA] Add support for cache-aliasingChris Zankel2-11/+77
Add support for processors that have cache-aliasing issues, such as the Stretch S5000 processor. Cache-aliasing means that the size of the cache (for one way) is larger than the page size, thus, a page can end up in several places in cache depending on the virtual to physical translation. The method used here is to map a user page temporarily through the auto-refill way 0 and of of the DTLB. We probably will want to revisit this issue and use a better approach with kmap/kunmap. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Add kernel module supportChris Zankel1-18/+177
Add kernel module support. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Add support for executable/non-executable feature in the mmuChris Zankel1-14/+28
Newer processor versions starting with Xtensa6/LX2 support an 'executable' bit for memory pages. This bit replaces the 'valid' bit, so it must be always set to one for older processor versions. To mark a page invalid, we now set the cache-attributes to b11, which is backward compatible. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Initialize semaphore_wake_lockChris Zankel1-1/+1
Initialize semaphore_wake_lock. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Fix timer instabilities.Chris Zankel1-17/+29
The timer code could have missed a tick. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Fix fadvise64_64Chris Zankel1-0/+5
Xtensa passes long long arguments in a even/odd register pair, so we also need to shuffle the arguments when passed through the system call to avoid an empty argument register. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Move string-io functions to io.c from pci.cChris Zankel3-70/+76
The string-io functions (outs{bwl}, ins{bwl}) are independent from the PCI option and should be in a separate file. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] Move pre-initialized structures to init_task.cChris Zankel3-15/+40
Move all initialization structures for the initial task to it's own file. Signed-off-by: Chris Zankel <[email protected]>
2007-08-27[XTENSA] fix wrong usage of __init and __initdata in traps.cChris Zankel1-2/+2
A variable was defined with __init instead of __initdata and the function accessing that variable wasn't initialized with __init. Signed-off-by: Chris Zankel <[email protected]>
2007-07-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds1-1/+2
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits) xtensa: use DATA_DATA in xtensa powerpc: add missing DATA_DATA to powerpc cris: use DATA_DATA in cris kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c kbuild: use -fno-optimize-sibling-calls unconditionally kconfig: reset generated values only if Kconfig and .config agree. kbuild: fix the warning when running make tags kconfig: strip 'CONFIG_' automatically in kernel configuration search kbuild: use POSIX BRE in headers install target Whitelist references from __dbe_table to .init modpost white list pattern adjustment kbuild: do section mismatch check on full vmlinux kbuild: whitelist references from variables named _timer to .init.text kbuild: remove hardcoded _logo names from modpost kbuild: remove hardcoded apic_es7000 from modpost kbuild: warn about references from .init.text to .exit.text kbuild: consolidate section checks kbuild: refactor code in modpost to improve maintainability kbuild: ignore section mismatch warnings originating from .note section kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it ...
2007-07-19define new percpu interface for shared dataFenghua Yu1-4/+1
per cpu data section contains two types of data. One set which is exclusively accessed by the local cpu and the other set which is per cpu, but also shared by remote cpus. In the current kernel, these two sets are not clearely separated out. This can potentially cause the same data cacheline shared between the two sets of data, which will result in unnecessary bouncing of the cacheline between cpus. One way to fix the problem is to cacheline align the remotely accessed per cpu data, both at the beginning and at the end. Because of the padding at both ends, this will likely cause some memory wastage and also the interface to achieve this is not clean. This patch: Moves the remotely accessed per cpu data (which is currently marked as ____cacheline_aligned_in_smp) into a different section, where all the data elements are cacheline aligned. And as such, this differentiates the local only data and remotely accessed data cleanly. Signed-off-by: Fenghua Yu <[email protected]> Acked-by: Suresh Siddha <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17PTRACE_POKEDATA consolidationAlexey Dobriyan1-4/+1
Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata() function. AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless return EPERM. Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17PTRACE_PEEKDATA consolidationAlexey Dobriyan1-11/+1
Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata() function. Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17Report that kernel is tainted if there was an OOPSPavel Emelianov1-0/+1
If the kernel OOPSed or BUGed then it probably should be considered as tainted. Thus, all subsequent OOPSes and SysRq dumps will report the tainted kernel. This saves a lot of time explaining oddities in the calltraces. Signed-off-by: Pavel Emelianov <[email protected]> Acked-by: Randy Dunlap <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> [ Added parisc patch from Matthew Wilson -Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2007-07-17xtensa: use DATA_DATA in xtensaMathieu Desnoyers1-1/+2
* Sam Ravnborg ([email protected]) wrote: > From your patch it looks like I originally missed out > powerpc + xtensa when introducing DATA_DATA - would be nice if > you could fix that. > > Sam Use DATA_DATA in xtensa Signed-off-by: Mathieu Desnoyers <[email protected]> Cc: Chris Zankel <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]>
2007-05-31[XTENSA] Remove non-rt signal handlingChris Zankel3-498/+334
The non-rt signal handling was never really used, so we don't break anything. This patch also cleans up the signal stack-frame to make it independent from the processor configuration. It also improves the method used for controlling single-stepping. We now save and restore the 'icountlevel' register that controls single stepping and set or clear the saved state to enable or disable it. Signed-off-by: Chris Zankel <[email protected]>
2007-05-31[XTENSA] Move common sections into bss sectionsChris Zankel1-8/+11
Move the fields of the COMMON sections 'swapper_pg_dir' and 'empty_zero_page' to the BSS section. Remove the unused COMMON sections 'emtpy_bad_page_table' and 'empty_bad_page'. Signed-off-by: Chris Zankel <[email protected]>
2007-05-31[XTENSA] clean-up header filesChris Zankel2-47/+32
The header files in the asm-xtensa directory are not clean and 'make headers_check' fails. This is a first patch to fix most of the header files. It removes unnecessary include statements and adds some that are required for building the kernel. The linker script required some updates or the linking stage would fail. Signed-off-by: Chris Zankel <[email protected]>
2007-05-31[XTENSA] Remove multi-exported symbols from xtensa_ksyms.cChris Zankel1-11/+0
This patch removes the following symbols from arch/xtensa/kernel/xtensa_ksyms.c that were already exported: memcmp, memchr, strcat, strchr, strlen, stncat, strnlen, strrchr, strstr, enable_irq, and disable_irq Signed-off-by: Chris Zankel <[email protected]>
2007-05-31[XTENSA] Spelling fixes in arch/xtensaChris Zankel1-1/+1
Spelling fixes in arch/xtensa/. Signed-off-by: Simon Arlott <[email protected]> Signed-off-by: Chris Zankel <[email protected]>
2007-05-19all-archs: consolidate .data section definition in asm-genericSam Ravnborg1-1/+2
With this consolidation we can now modify the .data section definition in one spot for all archs. Signed-off-by: Sam Ravnborg <[email protected]>