ARC: dma_alloc_coherent need not force GFP_HIGHMEM

With accidental switching on of CONFIG_DEBUG_VM, started seeing
__get_free_pages() barf for __GFP_HIGHMEM, which dma_alloc_coherent()
was forcing.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: add support for ioremap_prot API.

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.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
CC: Vineet Gupta <Vineet.Gupta1@synopsys.com>
CC: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
CC: Noam Camus <noamc@ezchip.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
ARC: ioremap cleanups

* ioremap only support uncached mappings - thus we don't need the
  redirection layer __ioremap( )

* whilw we are at it also cleanup iounmap - use vfree()

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: clarify update_mmu_cache() not handling current->mm != vma->mm

When debugging the current round of gdb issues - traced the complete
flow for COWing of a page where break point is inserted.

This involves a call to update_mmu_cache( ) - to preinstall TLB entry
for the new page, which however was simply returning due to check
above.

However it makes sense to keep the current behvaiour as described in
code comments.
--------------------->8--------------------------------
/*
 * create_tlb() assumes that current->mm == vma->mm, hence check below
 *
 * Removing the check will involve making it use the values from
 * vma->mm->context{ASID,SASID}, as opposed to MMU registers themselves.
 * The TLB paranoid debug code will trigger false negatives as well.
 * More importantly this might make it inconsistent with the fast-path
 * TLB Refill handler which always installs the TLB entry for the
 * current ASID/SASID in MMU regs.
 *
 * Lets see the use cases when current->mm != vma->mm
 *  1. execve->copy_strings()->__get_user_pages->handle_mm_fault
 *     Here VM wants to pre-install a TLB entry for user stack while
 *     current->mm still points to pre-execve mm (hence the condition).
 *     However the stack vaddr is soon relocated (randomization) and
 *     move_page_tables() tries to undo that TLB entry. Thus not
 *     creating
 *     TLB entry is not any worse.
 *
 *  2. ptrace(POKETEXT) causes a CoW - inserting a breakpoint in the
 *     debugged task. This however happens in the context of debugger
 *     (hence the consition). If create_tlb() doesn't happen - it will
 *     happen when the task starts to run - no no big deal if not done.
 *
 * Both the cases above are not worth the additional complexity/risk.
 */
--------------------->8--------------------------------

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ARC: make clock source/events to be per platform.

Each platform should provide functions:
arc_platform_read_timer1
arc_platform_periodic_timer_setup
arc_platform_timer_init

Now each platform can apply its own methods to handle SMP.
Where in SMP we need some global clock source.

Signed-off-by: Noam Camus <noamc@ezchip.com>
NET: Add network driver

This patch adds an driver for the debug LAN device used in EZchip NPS boards.

Signed-off-by: Noam Camus <noamc@ezchip.com>
tty/8250_early: Turn serial_in/serial_out to weak symbols to allow platforms to override them.

Now one can replace default methods with similar fit to its needs.
e.g. choose other regshift, register offset, or any other manipulation.

This is useful for big endian platforms wishing to use the early serial driver.
Platform that needs to swab bytes before the register accesses.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: [plat-eznps] Add eznps platform

This platform include boards:
	Hardware Emulator (HE) version 0,1...
	Simulator based upon nSIM.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: [plat-eznps] Add eznps default board configurations

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: TLB flush for SMP

This is for cases we need to flush tlb's in several CPU's since a memory
structure may be held by several threads in the same time in different
CPU's.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: ASID with SMP

Each CPU got its own TLB and therefore it's own software cache.
Also each mmu context may reside at the same in several CPU's thanks to
threads sharing the context therefore may have different ASID.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: Add initrd from external file.

We now can easly get rootfs from external file.
It may be cpio, ext2, cramfs...

This makes vmlinux usable not only for internal cpio.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: Handle un-aligned user space access in BE.

Adding endian awarness to un-aligned access exception handling.

Signed-off-by: Noam Camus <noamc@ezchip.com>
ARC: uImage compression mode

It is possible to add configuration for gzip compression.

The default is none, no compression at all.

Signed-off-by: Noam Camus <noamc@ezchip.com>
Changed linux version to EXTRAVERSION = .EZchip_1.0
ARC: Reserve space address between STACK_TOP and TASK_SIZE

This reserved space is platform specific.
It can be used for any porpuse without overlapping user vaddr.

Signed-off-by: Noam Camus <noamc@ezchip.com>