aboutsummaryrefslogtreecommitdiff
path: root/arch/arc
AgeCommit message (Collapse)AuthorFilesLines
2013-02-15ARC: Ensure CONFIG_VIRT_TO_BUS is not enabledVineet Gupta1-1/+3
Signed-off-by: Vineet Gupta <[email protected]> Reported-by: James Hogan <[email protected]>
2013-02-15ARC: Fix pt_orig_r8 accessVineet Gupta1-2/+2
Syscall restarting fixes made pt_regs->orig_r8 a short word, which was not reflected in the assembler code - thus could potentially break gdb debugging. Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [3.9] Fallout of hlist iterator updateVineet Gupta1-3/+3
Commit 0bbacca "hlist: drop the node parameter from iterators" changed the iterator across the board - but ARC port being out-of-tree missed it. Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: 64bit RTSC timestamp hardware issueVineet Gupta1-36/+2
The 64bit RTSC is not reliable, causing spurious "jumps" in higher word, making Linux timekeeping go bonkers. So as of now just use the lower 32bit timestamp. A cleaner approach would have been removing RTSC support altogether as the 32bit RTSC is equivalent to old TIMER1 based solution, but some customers can use the 32bit RTSC in SMP syn fashion (vs. TIMER1 which being incore can't be done easily). A fallout of this is sched_clock()'s hardware assisted version needs to go away since it can't use 32bit wrapping counter - instead we use the generic "weak" jiffies based version. Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Don't fiddle with non-existent cachesVineet Gupta1-12/+9
!CONFIG_ARC_HAS_(I|D)CACHE makes Linux disable caches (assuming they exist in hardware) - mostly for debugging issues with new peripherals. However, independent of CONFIG_ARC_HAS_(I|D)CACHE, Linux also needs to handle, non-existant caches, using the information in Cache BCRs (Build Configuration Reg) Reported-by: Alexey Brodkin <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Provide a default serial.h for uart drivers needing BASE_BAUDVineet Gupta1-0/+25
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [plat-arcfpga] defconfig for fully loaded ARC LinuxVineet Gupta1-4/+19
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #8: platform registers SMP callbacksVineet Gupta3-18/+28
Platforms export their SMP callbacks by populating arc_smp_ops. The population itself needs to be done pretty early, from init_early callback. Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #7: SMP common code to use callbacksVineet Gupta2-24/+28
This again is for switch from singleton platform SMP API to multi-platform paradigm Platform code is not yet setup to populate the callbacks, that happens in next commit Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optionalVineet Gupta3-45/+20
All the current platforms can work with 0x8000_0000 based dma_addr_t since the Bus Bridges typically ignore the top bit (the only excpetion was Angel4 PCI-AHB bridge which we no longer care for). That way we don't need plat-specific cpu-addr to bus-addr conversion. Hooks still provided - just in case a platform has an obscure device which say needs 0 based bus address. That way <asm/dma_mapping.h> no longer needs to unconditinally include <plat/dma_addr.h> Also verfied that on Angel4 board, other peripherals (IDE-disk / EMAC) work fine with 0x8000_0000 based dma addresses. Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC coreVineet Gupta2-6/+2
For now this will suffice for all platforms, later exotic ones needs to get this from DeviceTree Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #4: Isolate platform headersVineet Gupta7-20/+7
-Top level ARC makefile removes -I for platform headers -asm/irq.h no longer includes plat/irq.h -platform makefile adds -I for it's specfic platform headers -platform code to directly include it's plat/irq.h -Linker script needed plat/memmap.h for CCM info, already in .config Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #3: switch to board callbackVineet Gupta10-26/+48
-platform API is retired and instead callbacks are used Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #2: Board callback InfrastructureVineet Gupta8-12/+169
The orig platform code orgnaization was singleton design pattern - only one platform (and board thereof) would build at a time. Thus any platform/board specific code (e.g. irq init, early init ...) expected by ARC common code was exported as well defined set of APIs, with only ONE instance building ever. Now with multiple-platform build requirement, that design of code no longer holds - multiple board specific calls need to build at the same time - so ARC common code can't use the API approach, it needs a callback based design where each board registers it's specific set of functions, and at runtime, depending on board detection, the callbacks are used from the registry. This commit adds all the infrastructure, where board specific callbacks are specified as a "maThine description". All the hooks are placed in right spots, no board callbacks registered yet (with MACHINE_STARt/END constructs) so the hooks will not run. Next commit will actually convert the platform to this infrastructure. Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: Fold boards sub-menu into platform/SoC menuVineet Gupta2-23/+14
This is more natural and is now doable since the choice constructs are gone. Signed-off-by: Vineet Gupta <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [Review] Multi-platform image #1: Kconfig enablementVineet Gupta2-7/+4
This mini patchseries addresses the lack of multi-platform-image support in ARC port. Older build system only supported one platform(soc) to build at a time and further only one board of that platform could be built. There was no technical reason for that - we just didn't have the need. So the first step towards multi-platform (and multi-board) builds it to allow build system to do that. So as applicable, <choice .. endchoice> => <menu .. endmenu> Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: Add support for ioremap_prot APIGilad Ben-Yossef4-12/+42
Implement ioremap_prot() to allow mapping IO memory with variable protection via TLB. Implementing this allows the /dev/mem driver to use its generic access() VMA callback, which in turn allows ptrace to examine data in memory mapped regions mapped via /dev/mem, such as Arc DCCM. The end result is that it is possible to examine values of variables placed into DCCM in user space programs via GDB. CC: Alexey Brodkin <[email protected]> CC: Noam Camus <[email protected]> Acked-by: Vineet Gupta <[email protected]> Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: UAPI Disintegrate arch/arc/include/asmVineet Gupta14-75/+108
1. ./genfilelist.pl arch/arc/include/asm/ 2. Create arch/arc/include/uapi/asm/Kbuild as follows +# UAPI Header export list +include include/uapi/asm-generic/Kbuild.asm 3. ./disintegrate-one.pl arch/arc/include/{,uapi/}asm/<above-list> 4. Edit arch/arc/include/asm/Kbuild to remove ref to asm-generic/Kbuild.asm - To work around empty uapi/asm/setup.h added a placholder comment. - Also a manual #ifdef __ASSEMBLY__ for a late ptrace change Signed-off-by: Vineet Gupta <[email protected]> Cc: David Howells <[email protected]>
2013-02-15ARC: Hostlink Pseudo-Driver for Metaware DebuggerVineet Gupta3-0/+68
This allows ARC Target to do I/O to host in absence of any peripherals whatsoever, assisted by Metaware Hostlink facility. Further we have a FUSE based filesystem which makes us mount/access host filesystem on target and do fops. Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Support for single cycle Close Coupled Mem (CCM)Vineet Gupta6-6/+137
* Includes mapping of CCMs in address space * Annotations to move arbitrary code/data into CCM * Moving some of the critical code/data into CCM * Runtime detection/reporting Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: perf support (software counters only)Vineet Gupta2-0/+16
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [plat-arfpga] BVCI Latency Unit setupVineet Gupta2-0/+88
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Boot #2: Verbose Boot reporting / feature verificationVineet Gupta7-11/+490
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: kgdb supportMischa Jonker5-1/+275
Signed-off-by: Mischa Jonker <[email protected]> Signed-off-by: Vineet Gupta <[email protected]> Cc: Jason Wessel <[email protected]> Acked-by: Jason Wessel <[email protected]>
2013-02-15ARC: Unaligned access emulationVineet Gupta9-2/+329
ARC700 doesn't natively support unaligned access, but can be emulated -Unaligned Access Exception -Disassembly at the Fault address to find the exact insn (long/short) Also per Arnd's comment, we runtime control it using 2 sysctl knobs: * SYSCTL_ARCH_UNALIGN_ALLOW: Runtime enable/disble * SYSCTL_ARCH_UNALIGN_NO_WARN: Warn on each emulation attempt Originally contributed by Tim Yao <[email protected]> Signed-off-by: Vineet Gupta <[email protected]> Cc: Tim Yao <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: kprobes supportVineet Gupta7-3/+610
Origin port done by Rajeshwar Ranga Signed-off-by: Vineet Gupta <[email protected]> Cc: Rajeshwar Ranga <[email protected]>
2013-02-15ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul)Vineet Gupta3-1/+656
In-kernel disassembler Due Credits * Orig written by Rajeshwar Ranga * Consolidation/cleanups by Mischa Jonker Signed-off-by: Vineet Gupta <[email protected]> Cc: Rajeshwar Ranga <[email protected]> Cc: Mischa Jonker <[email protected]>
2013-02-15ARC: stacktracing APIs based on dw2 unwinderVineet Gupta2-2/+217
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: DWARF2 .debug_frame based stack unwinderVineet Gupta9-1/+1612
-Originally written by Rajeshwar Ranga -Derived off of generic unwinder in 2.6.19 and adapted to ARC Signed-off-by: Vineet Gupta <[email protected]> Cc: Rajeshwar Ranga <[email protected]>
2013-02-15ARC: SMP supportVineet Gupta23-2/+960
ARC common code to enable a SMP system + ISS provided SMP extensions. ARC700 natively lacks SMP support, hence some of the core features are are only enabled if SoCs have the necessary h/w pixie-dust. This includes: -Inter Processor Interrupts (IPI) -Cache coherency -load-locked/store-conditional ... The low level exception handling would be completely broken in SMP because we don't have hardware assisted stack switching. Thus a fair bit of this code is repurposing the MMU_SCRATCH reg for event handler prologues to keep them re-entrant. Many thanks to Rajeshwar Ranga for his initial "major" contributions to SMP Port (back in 2008), and to Noam Camus and Gilad Ben-Yossef for help with resurrecting that in 3.2 kernel (2012). Note that this platform code is again singleton design pattern - so multiple SMP platforms won't build at the moment - this deficiency is addressed in subsequent patches within this series. Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Rajeshwar Ranga <[email protected]> Cc: Noam Camus <[email protected]> Cc: Gilad Ben-Yossef <[email protected]>
2013-02-15ARC: Diagnostics: show_regs() etcVineet Gupta2-0/+325
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Module supportVineet Gupta3-0/+93
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Support for high priority interrupts in the in-core intcVineet Gupta5-2/+339
There is a bit of hack/kludge right now where we disable preemption if a L2 (High prio) IRQ is taken while L1 (Low prio) is active. Need to revisit this Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: OProfile supportVineet Gupta4-0/+38
Signed-off-by: Vineet Gupta <[email protected]> Cc: Robert Richter <[email protected]> Cc: [email protected] Reviewed-by: James Hogan <[email protected]>
2013-02-15ARC: Futex supportVineet Gupta1-0/+151
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: ptrace supportVineet Gupta4-2/+206
Signed-off-by: Vineet Gupta <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: [optim] Cache "current" in Register r25Vineet Gupta9-1/+120
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [plat-arcfpga] defconfigVineet Gupta1-0/+46
With this we get to a running kernel on ISS ---------------------------------->8----------------------------------- Linux version 3.8.0-rc3+ (vineetg@vineetg-Latitude) (gcc version 4.4.7 (ARCompact elf32 toolchain (built 20121213)) ) #3 Thu Jan 17 14:22:05 IST 2013 Board "arc-angel4" from snps (Manufacturer) Memory size set via devicetree 256M [plat-arcfpga]: registering early dev resources bootconsole [early_ARCuart0] enabled pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 pcpu-alloc: [0] 0 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32624 Kernel command line: console=ttyARC0,115200n8 PID hash table entries: 1024 (order: -1, 4096 bytes) Dentry cache hash table entries: 32768 (order: 4, 131072 bytes) Inode-cache hash table entries: 16384 (order: 3, 65536 bytes) Memory Available: 248M / 256M (1312K code, 463K data, 4184K init, 1400K reserv) SLUB: Genslabs=12, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 NR_IRQS:16 Console: colour dummy device 80x25 Calibrating delay loop... 39.73 BogoMIPS (lpj=198656) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 devtmpfs: initialized [plat-arcfpga]: registering device resources bio: create slab <bio-0> at 0 Switching to clocksource ARC RTSC io scheduler noop registered (default) arc-uart: ttyARC0 at MMIO 0xc0fc1000 (irq = 5) is a arc-uart console [ttyARC0] enabled, bootconsole disabled console [ttyARC0] enabled, bootconsole disabled mousedev: PS/2 mouse device common for all mice Warning: unable to open an initial console. Freeing unused kernel memory: 4184k [80002000] to [80418000] Mounting proc Mounting sysfs Mounting devpts Setting hostname to ARCLinux Starting System logger (syslogd) Bringing up loopback device ifconfig: socket: Function not implemented route: socket: Function not implemented Disk not detected ! Mounting tmpfs mount: mounting tmpfs on /dev/shm failed: Invalid argument /etc/init.d/rcS: line 76: can't create /proc/sys/kernel/msgmni: nonexistent directory Please press Enter to activate this console. *********************************************************************** Welcome to ARCLinux *********************************************************************** [ARCLinux]$ ---------------------------------->8----------------------------------- Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Last bits (stubs) to get to a running kernel with UARTVineet Gupta3-0/+86
This was part of port buildup strategy from Arnd to have a minimal kernel at first and then add optional features (stacktracing, ptrace, smp, kprobes, oprofile....) Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: [plat-arcfpga]: Enabling DeviceTree for Angel4 boardVineet Gupta5-58/+146
* arc-uart platform device now populated dynamically, using of_platform_populate() - applies to any other device whatsoever. * uart in turn requires incore arc-intc to be also present in DT * A irq-domain needs to be instantiated for IRQ requests by DT probed device (e.g. arc-uart) TODO: switch over to linear irq domain once all devs have been transitioned to DT Signed-off-by: Vineet Gupta <[email protected]> Cc: Grant Likely <[email protected]> Cc: Arnd Bergmann <[email protected]>
2013-02-15ARC: [DeviceTree] Convert some Kconfig items to runtime valuesVineet Gupta6-17/+37
* mem size now runtime configured (prev CONFIG_ARC_PLAT_SDRAM_SIZE) * core cpu clk runtime configured (prev CONFIG_ARC_PLAT_CLK) Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Grant Likely <[email protected]>
2013-02-15ARC: [DeviceTree] Basic supportVineet Gupta11-0/+165
This is minimal infrastructure needed for devicetree work. It uses an a sample "skeleton" devicetree - embedded in kernel image - to print the board, manufacturer by parsing the top-level "compatible" string. As of now we don't need any additional "board" specific "machine_desc". TODO: support interpreting the command line as boot-loader passed dtb Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Grant Likely <[email protected]> Cc: [email protected] Cc: Rob Herring <[email protected]> Cc: James Hogan <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: James Hogan <[email protected]>
2013-02-15ARC: [plat-arcfpga] Static platform device for CONFIG_SERIAL_ARCVineet Gupta4-0/+167
N.B. This is old style of hardcoding platform device specific info in code and it's instantiation thererof using platform_add_devices(). Subsequent patches replace this with DeviceTree based runtime probe. This patch has been retained just as an example of "don't-do-this" for newer kernel ports. Signed-off-by: Vineet Gupta <[email protected]> Cc: Arnd Bergmann <[email protected]>
2013-02-15ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem initVineet Gupta8-0/+506
Signed-off-by: Vineet Gupta <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2013-02-15ARC: I/O and DMA MappingsVineet Gupta6-0/+528
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Page Fault handlingVineet Gupta1-0/+228
This includes recent changes to make handler "retry" and/or "killable" The killable (early exit) logic is loosely based on how SH implements it return if SIGKILL + either of VM_FAULT_OOM or VM_FAULT_RETRY which is different from Hexagon implementation which would NOT early exit for SIGKILL + VM_FAULT_OOM + !VM_FAULT_RETRY credits: Non executable stack support from Simon Spooner Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: TLB flush HandlingVineet Gupta3-0/+356
Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: MMU Exception HandlingVineet Gupta5-0/+854
* MMU I-TLB / D-TLB Miss Exceptions - Fast Path TLB Refill Handler - slowpath TLB creation via do_page_fault() -> update_mmu_cache() * Duplicate PD Exception Handler Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: MMU Context ManagementVineet Gupta4-0/+262
ARC700 MMU provides for tagging TLB entries with a 8-bit ASID to avoid having to flush the TLB every task switch. It also allows for a quick way to invalidate all the TLB entries for task useful for: * COW sementics during fork() * task exit()ing Signed-off-by: Vineet Gupta <[email protected]>
2013-02-15ARC: Page Table ManagementVineet Gupta3-0/+627
Signed-off-by: Vineet Gupta <[email protected]>