]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Tue, 19 Feb 2013 23:48:05 +0000 (10:48 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Tue, 19 Feb 2013 23:46:38 +0000 (10:46 +1100)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Tue, 19 Feb 2013 23:44:33 +0000 (10:44 +1100)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'dwmw2/master'
Stephen Rothwell [Tue, 19 Feb 2013 23:37:15 +0000 (10:37 +1100)]
Merge remote-tracking branch 'dwmw2/master'

Conflicts:
arch/x86/Kconfig

11 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Tue, 19 Feb 2013 23:37:11 +0000 (10:37 +1100)]
Merge remote-tracking branch 'crypto-current/master'

11 years agoMerge remote-tracking branch 'md-current/for-linus'
Stephen Rothwell [Tue, 19 Feb 2013 23:37:08 +0000 (10:37 +1100)]
Merge remote-tracking branch 'md-current/for-linus'

11 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Tue, 19 Feb 2013 23:36:56 +0000 (10:36 +1100)]
Merge remote-tracking branch 'sound-current/for-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Tue, 19 Feb 2013 23:36:55 +0000 (10:36 +1100)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Tue, 19 Feb 2013 23:36:54 +0000 (10:36 +1100)]
Merge remote-tracking branch 'm68k-current/for-linus'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Tue, 19 Feb 2013 23:36:53 +0000 (10:36 +1100)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'kbuild-current/rc-fixes'
Stephen Rothwell [Tue, 19 Feb 2013 23:36:52 +0000 (10:36 +1100)]
Merge remote-tracking branch 'kbuild-current/rc-fixes'

11 years agocrypto: user - ensure user supplied strings are nul-terminated
Mathias Krause [Tue, 5 Feb 2013 17:19:15 +0000 (18:19 +0100)]
crypto: user - ensure user supplied strings are nul-terminated

To avoid misuse, ensure cru_name and cru_driver_name are always
nul-terminated strings.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
11 years agocrypto: user - fix empty string test in report API
Mathias Krause [Tue, 5 Feb 2013 17:19:14 +0000 (18:19 +0100)]
crypto: user - fix empty string test in report API

The current test for empty strings fails because it is testing the
address of a field, not a pointer. So the test will always be true.
Test the first character in the string to not be null instead.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
11 years agocrypto: user - fix info leaks in report API
Mathias Krause [Tue, 5 Feb 2013 17:19:13 +0000 (18:19 +0100)]
crypto: user - fix info leaks in report API

Three errors resulting in kernel memory disclosure:

1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of the API. Switch to strncpy() to fix this.

2/ crypto_report_one() does not initialize all field of struct
crypto_user_alg. Fix this to fix the heap info leak.

3/ For the module name we should copy only as many bytes as
module_name() returns -- not as much as the destination buffer could
hold. But the current code does not and therefore copies random data
from behind the end of the module name, as the module name is always
shorter than CRYPTO_MAX_ALG_NAME.

Also switch to use strncpy() to copy the algorithm's name and
driver_name. They are strings, after all.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
11 years agoLinux 3.8 v3.8
Linus Torvalds [Mon, 18 Feb 2013 23:58:34 +0000 (15:58 -0800)]
Linux 3.8

11 years agoMerge branches 'devel-stable', 'fixes' and 'mmci' into for-next
Russell King [Mon, 18 Feb 2013 22:05:31 +0000 (22:05 +0000)]
Merge branches 'devel-stable', 'fixes' and 'mmci' into for-next

11 years agoMerge branch 'misc' into for-next
Russell King [Mon, 18 Feb 2013 22:05:28 +0000 (22:05 +0000)]
Merge branch 'misc' into for-next

Conflicts:
arch/arm/include/asm/memory.h

11 years agoxfrm: release neighbor upon dst destruction
Romain KUNTZ [Mon, 18 Feb 2013 02:36:24 +0000 (02:36 +0000)]
xfrm: release neighbor upon dst destruction

Neighbor is cloned in xfrm6_fill_dst but seems to never be released.
Neighbor entry should be released when XFRM6 dst entry is destroyed
in xfrm6_dst_destroy, otherwise references may be kept forever on
the device pointed by the neighbor entry.

I may not have understood all the subtleties of XFRM & dst so I would
be happy to receive comments on this patch.

Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 18 Feb 2013 18:23:40 +0000 (10:23 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input subsystem fixes from Dmitry Torokhov:
 "Two small driver fixups and a documentation update for managed input
  devices"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - fix wacom_set_report retry logic
  Input: document that unregistering managed devices is not necessary
  Input: lm8323 - fix checking PWM interrupt status

11 years agoMAINTAINERS: Jiri Pirko email change
Jiri Pirko [Fri, 15 Feb 2013 23:55:05 +0000 (23:55 +0000)]
MAINTAINERS: Jiri Pirko email change

Change email for team driver maintainership.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomm: fix pageblock bitmap allocation
Linus Torvalds [Mon, 18 Feb 2013 17:58:02 +0000 (09:58 -0800)]
mm: fix pageblock bitmap allocation

Commit c060f943d092 ("mm: use aligned zone start for pfn_to_bitidx
calculation") fixed out calculation of the index into the pageblock
bitmap when a !SPARSEMEM zome was not aligned to pageblock_nr_pages.

However, the _allocation_ of that bitmap had never taken this alignment
requirement into accout, so depending on the exact size and alignment of
the zone, the use of that index could then access past the allocation,
resulting in some very subtle memory corruption.

This was reported (and bisected) by Ingo Molnar: one of his random
config builds would hang with certain very specific kernel command line
options.

In the meantime, commit c060f943d092 has been marked for stable, so this
fix needs to be back-ported to the stable kernels that backported the
commit to use the right alignment.

Bisected-and-tested-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agonet: fix a compile error when SOCK_REFCNT_DEBUG is enabled
Ying Xue [Fri, 15 Feb 2013 22:28:25 +0000 (22:28 +0000)]
net: fix a compile error when SOCK_REFCNT_DEBUG is enabled

When SOCK_REFCNT_DEBUG is enabled, below build error is met:

kernel/sysctl_binary.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
kernel/audit.o: In function `sk_refcnt_debug_release':
include/net/sock.h:1025: multiple definition of `sk_refcnt_debug_release'
kernel/sysctl.o:include/net/sock.h:1025: first defined here
make[1]: *** [kernel/built-in.o] Error 1
make: *** [kernel] Error 2

So we decide to make sk_refcnt_debug_release static to eliminate
the error.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoARM: add SCHED_HRTICK config option
Russell King [Sun, 17 Feb 2013 14:40:33 +0000 (14:40 +0000)]
ARM: add SCHED_HRTICK config option

As we don't include kernel/Kconfig.hz as this defines HZ values
unsuitable for ARM platforms, add the SCHED_HRTICK to properly configure
the scheduler for hrtimer operation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7650/1: mm: replace direct access to mm->context.id with new macro
Ben Dooks [Mon, 11 Feb 2013 11:25:05 +0000 (12:25 +0100)]
ARM: 7650/1: mm: replace direct access to mm->context.id with new macro

The mmid macro is meant to be used to get the mm->context.id data
from the mm structure, but it seems to have been missed in a cuple
of files.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7649/1: mm: mm->context.id fix for big-endian
Ben Dooks [Mon, 11 Feb 2013 11:25:06 +0000 (12:25 +0100)]
ARM: 7649/1: mm: mm->context.id fix for big-endian

Since the new ASID code in b5466f8728527a05a493cc4abe9e6f034a1bbaab
("ARM: mm: remove IPI broadcasting on ASID rollover") was changed to
use 64bit operations it has broken the BE operation due to an issue
with the MM code accessing sub-fields of mm->context.id.

When running in BE mode we see the values in mm->context.id are stored
with the highest value first, so the LDR in the arch/arm/mm/proc-macros.S
reads the wrong part of this field. To resolve this, change the LDR in
the mmid macro to load from +4.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7648/1: pci: Allow passing per-controller private data
Thierry Reding [Mon, 11 Feb 2013 07:46:10 +0000 (08:46 +0100)]
ARM: 7648/1: pci: Allow passing per-controller private data

In order to allow drivers to specify private data for each controller,
this commit adds a private_data field to the struct hw_pci. This field
is an array of nr_controllers pointers that will be used to initialize
the private_data field of the corresponding controller's pci_sys_data
structure.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7647/1: pci: Keep pci_common_init() around after init
Thierry Reding [Mon, 11 Feb 2013 07:44:47 +0000 (08:44 +0100)]
ARM: 7647/1: pci: Keep pci_common_init() around after init

When using deferred driver probing, PCI host controller drivers may
actually require this function after the init stage.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: fix warnings introduced by previous patch
Russell King [Thu, 14 Feb 2013 10:50:04 +0000 (10:50 +0000)]
ARM: fix warnings introduced by previous patch

869486d5f51 (ARM: 7646/1: mm: use static_vm for managing static mapped
areas) introduced new warnings:

arch/arm/mm/mmu.c: In function 'pci_reserve_io':
arch/arm/mm/mmu.c:888:16: warning: unused variable 'addr'
arch/arm/mm/mmu.c:887:20: warning: unused variable 'vm'

because it failed to delete the two local variables it no longer used.
Fix this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7646/1: mm: use static_vm for managing static mapped areas
Joonsoo Kim [Sat, 9 Feb 2013 05:28:06 +0000 (06:28 +0100)]
ARM: 7646/1: mm: use static_vm for managing static mapped areas

A static mapped area is ARM-specific, so it is better not to use
generic vmalloc data structure, that is, vmlist and vmlist_lock
for managing static mapped area. And it causes some needless overhead and
reducing this overhead is better idea.

Now, we have newly introduced static_vm infrastructure.
With it, we don't need to iterate all mapped areas. Instead, we just
iterate static mapped areas. It helps to reduce an overhead of finding
matched area. And architecture dependency on vmalloc layer is removed,
so it will help to maintainability for vmalloc layer.

Reviewed-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7645/1: ioremap: introduce an infrastructure for static mapped area
Joonsoo Kim [Sat, 9 Feb 2013 05:28:05 +0000 (06:28 +0100)]
ARM: 7645/1: ioremap: introduce an infrastructure for static mapped area

In current implementation, we used ARM-specific flag, that is,
VM_ARM_STATIC_MAPPING, for distinguishing ARM specific static mapped area.
The purpose of static mapped area is to re-use static mapped area when
entire physical address range of the ioremap request can be covered
by this area.

This implementation causes needless overhead for some cases.
For example, assume that there is only one static mapped area and
vmlist has 300 areas. Every time we call ioremap, we check 300 areas for
deciding whether it is matched or not. Moreover, even if there is
no static mapped area and vmlist has 300 areas, every time we call
ioremap, we check 300 areas in now.

If we construct a extra list for static mapped area, we can eliminate
above mentioned overhead.
With a extra list, if there is one static mapped area,
we just check only one area and proceed next operation quickly.

In fact, it is not a critical problem, because ioremap is not frequently
used. But reducing overhead is better idea.

Another reason for doing this work is for removing architecture dependency
on vmalloc layer. I think that vmlist and vmlist_lock is internal data
structure for vmalloc layer. Some codes for debugging and stat inevitably
use vmlist and vmlist_lock. But it is preferable that they are used
as least as possible in outside of vmalloc.c

Now, I introduce an ARM-specific infrastructure for static mapped area. In
the following patch, we will use this and resolve above mentioned problem.

Reviewed-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7644/1: vmregion: remove vmregion code entirely
Joonsoo Kim [Sat, 9 Feb 2013 05:28:04 +0000 (06:28 +0100)]
ARM: 7644/1: vmregion: remove vmregion code entirely

Now, there is no user for vmregion.
So remove it.

Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoMAINTAINERS: Re-assert MMCI driver maintainer status
Russell King [Mon, 11 Feb 2013 15:28:51 +0000 (15:28 +0000)]
MAINTAINERS: Re-assert MMCI driver maintainer status

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoMAINTAINERS: add additional file for MMCI driver
Russell King [Mon, 11 Feb 2013 15:28:05 +0000 (15:28 +0000)]
MAINTAINERS: add additional file for MMCI driver

The MMCI driver has an additional file in include/linux/amba.  Include
this file in its maintainer entry.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoMAINTAINERS: add maintainer entry for AMBA serial drivers
Russell King [Mon, 11 Feb 2013 15:26:27 +0000 (15:26 +0000)]
MAINTAINERS: add maintainer entry for AMBA serial drivers

Add the proper maintainer entry for the AMBA serial drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7637/1: memory: use SZ_ constants for defining the virtual memory layout
Will Deacon [Thu, 31 Jan 2013 18:19:30 +0000 (19:19 +0100)]
ARM: 7637/1: memory: use SZ_ constants for defining the virtual memory layout

Parts of the virtual memory layout (mainly the modules area) are
described using open-coded immediate values.

Use the SZ_ definitions from linux/sizes.h instead to make the code
clearer.

Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agotipc: fix missing spinlock init in broadcast code
Erik Hugne [Thu, 14 Feb 2013 14:43:33 +0000 (14:43 +0000)]
tipc: fix missing spinlock init in broadcast code

After commit 3c294cb3 "tipc: remove the bearer congestion mechanism",
we try to grab the broadcast bearer lock when sending multicast
messages over the broadcast link. This will cause an oops because
the lock is never initialized. This is an old bug, but the lock
was never actually used before commit 3c294cb3, so that why it was
not visible until now.  The oops will look something like:

BUG: spinlock bad magic on CPU#2, daemon/147
lock: bcast_bearer+0x48/0xffffffffffffd19a [tipc],
.magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Pid: 147, comm: daemon Not tainted 3.8.0-rc3+ #206
Call Trace:
spin_dump+0x8a/0x8f
spin_bug+0x21/0x26
do_raw_spin_lock+0x114/0x150
_raw_spin_lock_bh+0x19/0x20
tipc_bearer_blocked+0x1f/0x40 [tipc]
tipc_link_send_buf+0x82/0x280 [tipc]
? __alloc_skb+0x9f/0x2b0
tipc_bclink_send_msg+0x77/0xa0 [tipc]
tipc_multicast+0x11b/0x1b0 [tipc]
send_msg+0x225/0x530 [tipc]
sock_sendmsg+0xca/0xe0

The above can be triggered by running the multicast demo program.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agostmmac: fix the parsing of the eee_timer parameter
Giuseppe CAVALLARO [Thu, 14 Feb 2013 23:00:13 +0000 (23:00 +0000)]
stmmac: fix the parsing of the eee_timer parameter

This pacth fixes the parsing of the eee_timer driver parameter.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'stable/for-linus-3.8-rc7-tag-two' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 15 Feb 2013 20:12:55 +0000 (12:12 -0800)]
Merge tag 'stable/for-linus-3.8-rc7-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull xen fixes from Konrad Rzeszutek Wilk:
 "Two fixes:

   - A simple bug-fix for redundant NULL check.

   - CVE-2013-0228/XSA-42: x86/xen: don't assume %ds is usable in
     xen_iret for 32-bit PVOPS

  and two reverts:

   - Revert the PVonHVM kexec.  The patch introduces a regression with
     older hypervisor stacks, such as Xen 4.1."

* tag 'stable/for-linus-3.8-rc7-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  Revert "xen PVonHVM: use E820_Reserved area for shared_info"
  Revert "xen/PVonHVM: fix compile warning in init_hvm_pv_info"
  xen: remove redundant NULL check before unregister_and_remove_pcpu().
  x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS.

11 years agoRevert "[media] dvb_frontend: return -ENOTTY for unimplement IOCTL"
Mauro Carvalho Chehab [Fri, 15 Feb 2013 15:39:31 +0000 (13:39 -0200)]
Revert "[media] dvb_frontend: return -ENOTTY for unimplement IOCTL"

As reported by Klaus Schmidinger:
 "In VDR I use an ioctl() call with FE_READ_UNCORRECTED_BLOCKS on a
  device (using stb0899).  After this call I check 'errno' for
  EOPNOTSUPP to determine whether this device supports this call.  This
  used to work just fine, until a few months ago I noticed that my
  devices using stb0899 didn't display their signal quality in VDR's OSD
  any more.  After further investigation I found that
  ioctl(FE_READ_UNCORRECTED_BLOCKS) no longer returns EOPNOTSUPP, but
  rather ENOTTY.  And since I stop getting the signal quality in case
  any unknown errno value appears, this broke my signal quality query
  function."

While the changes reflect what is there at:

  http://comments.gmane.org/gmane.linux.kernel/1235728

it does cause regression on userspace.  So, revert it to stop the
damage.

This reverts commit 177ffe506cf8 ("[media] dvb_frontend: return -ENOTTY
for unimplement IOCTL").

Reported-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 15 Feb 2013 20:05:57 +0000 (12:05 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "A couple small fixes for sparc including some THP brown-paper-bag
  material:

   1) During the merging of all the THP support for various
      architectures, sparc missed adding a
      HAVE_ARCH_TRANSPARENT_HUGEPAGE to it's Kconfig, oops.

   2) Sparc needs to be mindful of hugepages in get_user_pages_fast().

   3) Fix memory leak in SBUS probe, from Cong Ding.

   4) The sunvdc virtual disk client driver has a test of the bitmask of
      vdisk server supported operations which was off by one bit"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sunvdc: Fix off-by-one in generic_request().
  sparc64: Fix get_user_pages_fast() wrt. THP.
  sparc64: Add missing HAVE_ARCH_TRANSPARENT_HUGEPAGE.
  sparc: kernel/sbus.c: fix memory leakage

11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Feb 2013 20:04:57 +0000 (12:04 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull one more x86 fix from Peter Anvin:
 "Sigh.  One more patch in the "please don't brick my Samsung" series"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: Clear EFI_RUNTIME_SERVICES rather than EFI_BOOT by "noefi" boot parameter

11 years agoMerge tag '3.8-pci-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Fri, 15 Feb 2013 20:04:08 +0000 (12:04 -0800)]
Merge tag '3.8-pci-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "This is another fix for v3.8.  It fixes an oops that happens when a
  Thunderbolt adapter is unplugged (remove device, poll for PME events
  on no-longer-existing device, oops)."

* tag '3.8-pci-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/PM: Clean up PME state when removing a device

11 years agoMerge tag 'omapdss-for-3.8-rc8' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Fri, 15 Feb 2013 20:03:09 +0000 (12:03 -0800)]
Merge tag 'omapdss-for-3.8-rc8' of git://gitorious.org/linux-omap-dss2/linux

Pull omapdss fixes from Tomi Valkeinen:
 "It'd be great if these two late fixes would still make it into 3.8.
  The other one fixes ARM kernel compilation when using 'allyesconfig',
  and the other makes DPI displays function again on OMAP3630 boards:

   - Fix ARM compilation with "allyesconfig" (omapdrm: fix the
     dependency to omapdss)

   - fix DPI displays on OMAP3630 (OMAPDSS: add FEAT_DPI_USES_VDDS_DSI
     to omap3630_dss_feat_list)"

* tag 'omapdss-for-3.8-rc8' of git://gitorious.org/linux-omap-dss2/linux:
  omapdrm: fix the dependency to omapdss
  OMAPDSS: add FEAT_DPI_USES_VDDS_DSI to omap3630_dss_feat_list

11 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 15 Feb 2013 19:59:27 +0000 (11:59 -0800)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c maintainer info update from Wolfram Sang:
 "Since my old email and repos are not working anymore, and this already
  caused some confusion, I think a MAINTAINERS update for 3.8 is
  helpful.  So, people trying I2C with the new kernel can properly reach
  me and find my repos."

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  MAINTAINERS: change my email and repos

11 years agoARC: [plat-arcfpga] DT arc-uart bindings change: "baud" => "current-speed"
Vineet Gupta [Mon, 11 Feb 2013 09:32:08 +0000 (15:02 +0530)]
ARC: [plat-arcfpga] DT arc-uart bindings change: "baud" => "current-speed"

Per Grant's review comment - driver changes via tty tree

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Ensure CONFIG_VIRT_TO_BUS is not enabled
Vineet Gupta [Mon, 11 Feb 2013 11:49:32 +0000 (17:19 +0530)]
ARC: Ensure CONFIG_VIRT_TO_BUS is not enabled

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Reported-by: James Hogan <james.hogan@imgtec.com>
11 years agoARC: Fix pt_orig_r8 access
Vineet Gupta [Mon, 11 Feb 2013 09:10:55 +0000 (14:40 +0530)]
ARC: Fix pt_orig_r8 access

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 <vgupta@synopsys.com>
11 years agoARC: [3.9] Fallout of hlist iterator update
Vineet Gupta [Fri, 8 Feb 2013 06:40:17 +0000 (12:10 +0530)]
ARC: [3.9] Fallout of hlist iterator update

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 <vgupta@synopsys.com>
11 years agoARC: 64bit RTSC timestamp hardware issue
Vineet Gupta [Wed, 6 Feb 2013 09:39:13 +0000 (15:09 +0530)]
ARC: 64bit RTSC timestamp hardware issue

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 <vgupta@synopsys.com>
11 years agoARC: Don't fiddle with non-existent caches
Vineet Gupta [Mon, 28 Jan 2013 09:37:31 +0000 (15:07 +0530)]
ARC: Don't fiddle with non-existent caches

!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 <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Add self to MAINTAINERS
Vineet Gupta [Fri, 18 Jan 2013 09:42:25 +0000 (15:12 +0530)]
ARC: Add self to MAINTAINERS

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Provide a default serial.h for uart drivers needing BASE_BAUD
Vineet Gupta [Wed, 23 Jan 2013 11:54:17 +0000 (17:24 +0530)]
ARC: Provide a default serial.h for uart drivers needing BASE_BAUD

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [plat-arcfpga] defconfig for fully loaded ARC Linux
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [plat-arcfpga] defconfig for fully loaded ARC Linux

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [Review] Multi-platform image #8: platform registers SMP callbacks
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #8: platform registers SMP callbacks

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #7: SMP common code to use callbacks
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #7: SMP common code to use callbacks

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional
Vineet Gupta [Tue, 22 Jan 2013 11:23:57 +0000 (16:53 +0530)]
ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC core
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC core

For now this will suffice for all platforms, later exotic ones needs to
get this from DeviceTree

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #4: Isolate platform headers
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #4: Isolate platform headers

-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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #3: switch to board callback
Vineet Gupta [Wed, 23 Jan 2013 11:02:48 +0000 (16:32 +0530)]
ARC: [Review] Multi-platform image #3: switch to board callback

-platform API is retired and instead callbacks are used

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #2: Board callback Infrastructure
Vineet Gupta [Fri, 18 Jan 2013 09:42:26 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #2: Board callback Infrastructure

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: Fold boards sub-menu into platform/SoC menu
Vineet Gupta [Tue, 22 Jan 2013 11:21:50 +0000 (16:51 +0530)]
ARC: Fold boards sub-menu into platform/SoC menu

This is more natural and is now doable since the choice constructs are
gone.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [Review] Multi-platform image #1: Kconfig enablement
Vineet Gupta [Fri, 18 Jan 2013 09:42:25 +0000 (15:12 +0530)]
ARC: [Review] Multi-platform image #1: Kconfig enablement

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: Add support for ioremap_prot API
Gilad Ben-Yossef [Tue, 22 Jan 2013 11:18:45 +0000 (16:48 +0530)]
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.

CC: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
CC: Noam Camus <noamc@ezchip.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: UAPI Disintegrate arch/arc/include/asm
Vineet Gupta [Mon, 11 Feb 2013 14:25:33 +0000 (19:55 +0530)]
ARC: UAPI Disintegrate arch/arc/include/asm

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 <vgupta@synopsys.com>
Cc: David Howells <dhowells@redhat.com>
11 years agoARC: Hostlink Pseudo-Driver for Metaware Debugger
Vineet Gupta [Fri, 18 Jan 2013 09:42:25 +0000 (15:12 +0530)]
ARC: Hostlink Pseudo-Driver for Metaware Debugger

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 <vgupta@synopsys.com>
11 years agoARC: Support for single cycle Close Coupled Mem (CCM)
Vineet Gupta [Fri, 18 Jan 2013 09:42:25 +0000 (15:12 +0530)]
ARC: Support for single cycle Close Coupled Mem (CCM)

* 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 <vgupta@synopsys.com>
11 years agoARC: perf support (software counters only)
Vineet Gupta [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
ARC: perf support (software counters only)

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoperf, ARC: Enable building perf tools for ARC
Vineet Gupta [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
perf, ARC: Enable building perf tools for ARC

Although with uClibc there's more we need to do

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
11 years agoARC: [plat-arfpga] BVCI Latency Unit setup
Vineet Gupta [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
ARC: [plat-arfpga] BVCI Latency Unit setup

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Boot #2: Verbose Boot reporting / feature verification
Vineet Gupta [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
ARC: Boot #2: Verbose Boot reporting / feature verification

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: kgdb support
Mischa Jonker [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
ARC: kgdb support

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
11 years agoARC: Unaligned access emulation
Vineet Gupta [Wed, 23 Jan 2013 11:00:36 +0000 (16:30 +0530)]
ARC: Unaligned access emulation

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 <tim.yao@amlogic.com>

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Tim Yao <tim.yao@amlogic.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agosysctl: Enable PARISC "unaligned-trap" to be used cross-arch
Vineet Gupta [Fri, 18 Jan 2013 09:42:24 +0000 (15:12 +0530)]
sysctl: Enable PARISC "unaligned-trap" to be used cross-arch

PARISC defines /proc/sys/kernel/unaligned-trap to runtime toggle
unaligned access emulation.

The exact mechanics of enablig/disabling are still arch specific, we can
make the sysctl usable by other arches.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
11 years agoARC: kprobes support
Vineet Gupta [Tue, 22 Jan 2013 11:33:59 +0000 (17:03 +0530)]
ARC: kprobes support

Origin port done by Rajeshwar Ranga

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
11 years agoARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul)
Vineet Gupta [Wed, 30 Jan 2013 12:16:13 +0000 (17:46 +0530)]
ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul)

In-kernel disassembler

Due Credits
* Orig written by Rajeshwar Ranga
* Consolidation/cleanups by Mischa Jonker

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
Cc: Mischa Jonker <mjonker@synopsys.com>
11 years agoARC: stacktracing APIs based on dw2 unwinder
Vineet Gupta [Fri, 18 Jan 2013 09:42:23 +0000 (15:12 +0530)]
ARC: stacktracing APIs based on dw2 unwinder

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: DWARF2 .debug_frame based stack unwinder
Vineet Gupta [Tue, 22 Jan 2013 11:33:19 +0000 (17:03 +0530)]
ARC: DWARF2 .debug_frame based stack unwinder

-Originally written by Rajeshwar Ranga
-Derived off of generic unwinder in 2.6.19 and adapted to ARC

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
11 years agoARC: SMP support
Vineet Gupta [Fri, 18 Jan 2013 09:42:23 +0000 (15:12 +0530)]
ARC: SMP support

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
Cc: Noam Camus <noamc@ezchip.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
11 years agoARC: Diagnostics: show_regs() etc
Vineet Gupta [Fri, 18 Jan 2013 09:42:23 +0000 (15:12 +0530)]
ARC: Diagnostics: show_regs() etc

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Module support
Vineet Gupta [Tue, 29 Jan 2013 13:58:05 +0000 (19:28 +0530)]
ARC: Module support

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Support for high priority interrupts in the in-core intc
Vineet Gupta [Fri, 18 Jan 2013 09:42:22 +0000 (15:12 +0530)]
ARC: Support for high priority interrupts in the in-core intc

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 <vgupta@synopsys.com>
11 years agoARC: OProfile support
Vineet Gupta [Tue, 22 Jan 2013 11:32:38 +0000 (17:02 +0530)]
ARC: OProfile support

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Robert Richter <rric@kernel.org>
Cc: oprofile-list@lists.sf.net
Reviewed-by: James Hogan <james.hogan@imgtec.com>
11 years agoARC: Futex support
Vineet Gupta [Fri, 18 Jan 2013 09:42:22 +0000 (15:12 +0530)]
ARC: Futex support

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: ptrace support
Vineet Gupta [Fri, 18 Jan 2013 09:42:22 +0000 (15:12 +0530)]
ARC: ptrace support

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [optim] Cache "current" in Register r25
Vineet Gupta [Mon, 11 Feb 2013 14:22:57 +0000 (19:52 +0530)]
ARC: [optim] Cache "current" in Register r25

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [plat-arcfpga] defconfig
Vineet Gupta [Fri, 18 Jan 2013 09:42:22 +0000 (15:12 +0530)]
ARC: [plat-arcfpga] defconfig

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 <vgupta@synopsys.com>
11 years agoARC: Last bits (stubs) to get to a running kernel with UART
Vineet Gupta [Fri, 18 Jan 2013 09:42:21 +0000 (15:12 +0530)]
ARC: Last bits (stubs) to get to a running kernel with UART

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 <vgupta@synopsys.com>
11 years agoARC: [plat-arcfpga]: Enabling DeviceTree for Angel4 board
Vineet Gupta [Fri, 18 Jan 2013 09:42:21 +0000 (15:12 +0530)]
ARC: [plat-arcfpga]: Enabling DeviceTree for Angel4 board

* 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 <vgupta@synopsys.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: [DeviceTree] Convert some Kconfig items to runtime values
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: [DeviceTree] Convert some Kconfig items to runtime values

* 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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
11 years agoARC: [DeviceTree] Basic support
Vineet Gupta [Tue, 22 Jan 2013 11:30:52 +0000 (17:00 +0530)]
ARC: [DeviceTree] Basic support

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
11 years agoARC: [plat-arcfpga] Static platform device for CONFIG_SERIAL_ARC
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: [plat-arcfpga] Static platform device for CONFIG_SERIAL_ARC

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 <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
11 years agoARC: I/O and DMA Mappings
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: I/O and DMA Mappings

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Page Fault handling
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: Page Fault handling

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 <vgupta@synopsys.com>
11 years agoARC: TLB flush Handling
Vineet Gupta [Fri, 18 Jan 2013 09:42:20 +0000 (15:12 +0530)]
ARC: TLB flush Handling

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: MMU Exception Handling
Vineet Gupta [Fri, 18 Jan 2013 09:42:19 +0000 (15:12 +0530)]
ARC: MMU Exception Handling

* 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 <vgupta@synopsys.com>
11 years agoARC: MMU Context Management
Vineet Gupta [Fri, 18 Jan 2013 09:42:19 +0000 (15:12 +0530)]
ARC: MMU Context Management

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 <vgupta@synopsys.com>
11 years agoARC: Page Table Management
Vineet Gupta [Fri, 18 Jan 2013 09:42:19 +0000 (15:12 +0530)]
ARC: Page Table Management

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Cache Flush Management
Vineet Gupta [Fri, 18 Jan 2013 09:42:19 +0000 (15:12 +0530)]
ARC: Cache Flush Management

* ARC700 has VIPT L1 Caches
* Caches don't snoop and are not coherent
* Given the PAGE_SIZE and Cache associativity, we don't support aliasing
  D$ configurations (yet), but do allow aliasing I$ configs

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [Review] Prevent incorrect syscall restarts
Vineet Gupta [Fri, 18 Jan 2013 09:42:19 +0000 (15:12 +0530)]
ARC: [Review] Prevent incorrect syscall restarts

Per Al Viro's "signals for dummies" https://lkml.org/lkml/2012/12/6/366
there are 3 golden rules for (not) restarting syscalls:

" What we need to guarantee is
* restarts do not happen on signals caught in interrupts or exceptions
* restarts do not happen on signals caught in sigreturn()
* restart should happen only once, even if we get through do_signal()
  many times."

ARC Port already handled #1, this patch fixes #2 and #3.

We use the additional state in pt_regs->orig_r8 to ckh if restarting
has already been done once.

Thanks to Al Viro for spotting this.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>