]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge remote-tracking branch 'metag/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:52:04 +0000 (10:52 +1000)]
Merge remote-tracking branch 'metag/for-next'

11 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:50:31 +0000 (10:50 +1000)]
Merge remote-tracking branch 'm68k/for-next'

Conflicts:
arch/cris/arch-v32/drivers/Kconfig

11 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Wed, 19 Jun 2013 00:48:58 +0000 (10:48 +1000)]
Merge remote-tracking branch 'ia64/next'

11 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:47:23 +0000 (10:47 +1000)]
Merge remote-tracking branch 'cris/for-next'

11 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Wed, 19 Jun 2013 00:45:44 +0000 (10:45 +1000)]
Merge remote-tracking branch 'arm64/upstream'

Conflicts:
include/uapi/linux/kvm.h

11 years agoMerge remote-tracking branch 'xilinx/arm-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:45:41 +0000 (10:45 +1000)]
Merge remote-tracking branch 'xilinx/arm-next'

Conflicts:
arch/arm/mach-highbank/highbank.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-spear/spear13xx.c
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-zynq/platsmp.c
drivers/clocksource/Makefile
drivers/clocksource/tegra20_timer.c

11 years agoMerge remote-tracking branch 'arm-mpidr/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:44:02 +0000 (10:44 +1000)]
Merge remote-tracking branch 'arm-mpidr/for-next'

Conflicts:
arch/arm/kernel/suspend.c

11 years agoMerge remote-tracking branch 'arm/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:33:14 +0000 (10:33 +1000)]
Merge remote-tracking branch 'arm/for-next'

11 years agoMerge remote-tracking branch 'arc/for-next'
Stephen Rothwell [Wed, 19 Jun 2013 00:31:42 +0000 (10:31 +1000)]
Merge remote-tracking branch 'arc/for-next'

11 years agoMerge remote-tracking branch 'ide/master'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:54 +0000 (10:29 +1000)]
Merge remote-tracking branch 'ide/master'

11 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:53 +0000 (10:29 +1000)]
Merge remote-tracking branch 'crypto-current/master'

11 years agoMerge remote-tracking branch 'input-current/for-linus'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:48 +0000 (10:29 +1000)]
Merge remote-tracking branch 'input-current/for-linus'

11 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:46 +0000 (10:29 +1000)]
Merge remote-tracking branch 'usb.current/usb-linus'

11 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:46 +0000 (10:29 +1000)]
Merge remote-tracking branch 'tty.current/tty-linus'

11 years agoMerge remote-tracking branch 'driver-core.current/driver-core-linus'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:45 +0000 (10:29 +1000)]
Merge remote-tracking branch 'driver-core.current/driver-core-linus'

11 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:43 +0000 (10:29 +1000)]
Merge remote-tracking branch 'net/master'

11 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:42 +0000 (10:29 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

11 years agoMerge remote-tracking branch 'arc-current/for-curr'
Stephen Rothwell [Wed, 19 Jun 2013 00:29:41 +0000 (10:29 +1000)]
Merge remote-tracking branch 'arc-current/for-curr'

11 years agoMerge branch 'devel-stable' into for-next
Russell King [Tue, 18 Jun 2013 19:14:44 +0000 (20:14 +0100)]
Merge branch 'devel-stable' into for-next

11 years agoMerge branches 'fixes', 'mcpm', 'misc' and 'mmci' into for-next
Russell King [Tue, 18 Jun 2013 19:14:36 +0000 (20:14 +0100)]
Merge branches 'fixes', 'mcpm', 'misc' and 'mmci' into for-next

11 years agoMerge branch 'for-rmk/arch-timer-cleanups' of git://linux-arm.org/linux-mr into devel...
Russell King [Tue, 18 Jun 2013 19:12:18 +0000 (20:12 +0100)]
Merge branch 'for-rmk/arch-timer-cleanups' of git://linux-arm.org/linux-mr into devel-stable

Please pull these arch_timer cleanups I've been holding onto for a while.
They're the same as my last posting [1], but have been rebased to v3.10-rc3.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/170602.html
-- Mark Rutland

11 years agoMerge branch 'for-rmk/lpae' of git://git.kernel.org/pub/scm/linux/kernel/git/will...
Russell King [Tue, 18 Jun 2013 19:11:32 +0000 (20:11 +0100)]
Merge branch 'for-rmk/lpae' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable

Conflicts:
arch/arm/kernel/smp.c

Please pull these miscellaneous LPAE fixes I've been collecting for a while
now for 3.11. They've been tested and reviewed by quite a few people, and most
of the patches are pretty trivial. -- Will Deacon.

11 years agoMerge branch 'for-rmk/hugepages' of git://git.linaro.org/people/stevecapper/linux...
Russell King [Tue, 18 Jun 2013 19:03:30 +0000 (20:03 +0100)]
Merge branch 'for-rmk/hugepages' of git://git.linaro.org/people/stevecapper/linux into devel-stable

These changes bring both HugeTLB support and Transparent HugePage
(THP) support to ARM.  Only long descriptors (LPAE) are supported
in this series.

The code has been tested on an Arndale board (Exynos 5250).

11 years agofirmware loader: fix use-after-free by double abort
Ming Lei [Sat, 15 Jun 2013 08:36:38 +0000 (16:36 +0800)]
firmware loader: fix use-after-free by double abort

fw_priv->buf is accessed in both request_firmware_load() and
writing to sysfs file of 'loading' context, but not protected
by 'fw_lock' entirely. The patch makes sure that access on
'fw_priv->buf' is protected by the lock.

So fixes the double abort problem reported by nirinA raseliarison:

http://lkml.org/lkml/2013/6/14/188

Reported-and-tested-by: nirinA raseliarison <nirina.raseliarison@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable <stable@vger.kernel.org> # 3.9
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: phy: Improve Kconfig help for CONFIG_USB_PHY
George Spelvin [Mon, 17 Jun 2013 05:45:50 +0000 (01:45 -0400)]
usb: phy: Improve Kconfig help for CONFIG_USB_PHY

The previous text confused users by not describing the very common
(e.g. x86 PC) sitations where no PHY driver is necessary.

Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'exotic-arch-fixes' into for-next
Geert Uytterhoeven [Tue, 18 Jun 2013 16:43:15 +0000 (18:43 +0200)]
Merge branch 'exotic-arch-fixes' into for-next

11 years agolib: Move fonts from drivers/video/console/ to lib/fonts/
Geert Uytterhoeven [Sun, 9 Jun 2013 09:46:43 +0000 (11:46 +0200)]
lib: Move fonts from drivers/video/console/ to lib/fonts/

Several drivers need font support independent of CONFIG_VT, cfr. commit
9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
support code selection logic").
Hence move the fonts and their support logic from drivers/video/console/ to
its own library directory lib/fonts/.
This also allows to limit processing of drivers/video/console/Makefile to
CONFIG_VT=y again.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoconsole/font: Refactor font support code selection logic
Geert Uytterhoeven [Wed, 15 May 2013 11:26:20 +0000 (13:26 +0200)]
console/font: Refactor font support code selection logic

The current Makefile rules to build font support are messy and buggy.
Replace them by Kconfig rules:
  - Introduce CONFIG_FONT_SUPPORT, which controls the building of all font
    code,
  - Select CONFIG_FONT_SUPPORT for all drivers that use fonts,
  - Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16
    font,
  - Drop the bogus console dependency for CONFIG_VIDEO_VIVI,
  - Always process drivers/video/console/Makefile, as some drivers need
    fonts even if CONFIG_VT is not set.

This fixes (if CONFIG_SOLO6X10=y and there are no built-in console
drivers):

drivers/built-in.o: In function `solo_osd_print':
drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font'

This fixes (if CONFIG_VT=n):

drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part]
Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]
11 years agoRevert "staging/solo6x10: depend on CONFIG_FONTS"
Geert Uytterhoeven [Mon, 27 May 2013 07:32:54 +0000 (09:32 +0200)]
Revert "staging/solo6x10: depend on CONFIG_FONTS"

This reverts commit 8c090cfbf980581454ae4caae731574fedd7dce8.

CONFIG_FONTS is not about enabling font support, but about enabling
manual selection of built-in fonts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoinput: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
Geert Uytterhoeven [Wed, 8 May 2013 21:41:18 +0000 (23:41 +0200)]
input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP

If CONFIG_PM_SLEEP is not set:

drivers/input/keyboard/cros_ec_keyb.c:211: warning: ‘cros_ec_keyb_clear_keyboard’ defined but not used

Move the definition of cros_ec_keyb_clear_keyboard() inside the section
protected by #ifdef CONFIG_PM_SLEEP to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoscore: Wire up asm-generic/xor.h
Geert Uytterhoeven [Tue, 14 May 2013 07:26:28 +0000 (09:26 +0200)]
score: Wire up asm-generic/xor.h

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoscore: Remove unneeded <asm/dma-mapping.h>
Geert Uytterhoeven [Thu, 27 Dec 2012 19:56:15 +0000 (20:56 +0100)]
score: Remove unneeded <asm/dma-mapping.h>

It just includes <asm-generic/dma-mapping-broken.h>, which is already
handled by <linux/dma-mapping.h> for the !CONFIG_HAS_DMA case (score sets
CONFIG_NO_DMA=y).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
11 years agoopenrisc: Wire up asm-generic/xor.h
Geert Uytterhoeven [Tue, 14 May 2013 07:26:17 +0000 (09:26 +0200)]
openrisc: Wire up asm-generic/xor.h

crypto/xor.c:25:21: error: asm/xor.h: No such file or directory

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jonas Bonn <jonas@southpole.se>
11 years agoh8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
Geert Uytterhoeven [Sun, 9 Jun 2013 08:07:45 +0000 (10:07 +0200)]
h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"

On Ubuntu, where /bin/sh -> dash, "make ARCH=h8300 clean" gives:

printf: 1: $[0x00400000+0x00140000]: expected numeric value

Replace the bash-specific "$[...]" by POSIX "$((..))" for arithmetic
expansion to fix this.
Note that according to the bash 4.1 manpage, "$[...]" is deprecated, and
will be removed in upcoming versions of bash.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Mark H83002 and H83048 CPU support broken
Geert Uytterhoeven [Fri, 17 May 2013 09:05:25 +0000 (11:05 +0200)]
h8300: Mark H83002 and H83048 CPU support broken

arch/h8300/include/asm/io.h supports only H83007 (H8/3006,3007), H83068
(H8/3065,3066,3067,3068,3069), and H8S2678 (H8S/2670,2673,2674R,2675,2676)
CPU types.

Hence disable H83002 (H8/3001,3002,3003) and H83048
(H8/3044,3045,3046,3047,3048,3052) CPU support at the Kconfig level.

This fixes build failures in allmodconfig/allyesconfig builds, as these
always choose the first CPU type (H83002), which was unsupported:

arch/h8300/include/asm/io.h:13:2: error: #error UNKNOWN CPU TYPE

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Switch h8300 to drivers/Kconfig
Geert Uytterhoeven [Thu, 16 May 2013 16:42:12 +0000 (18:42 +0200)]
h8300: Switch h8300 to drivers/Kconfig

Convert the last remaining architecture to drivers/Kconfig.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Limit timer channel ranges in Kconfig
Geert Uytterhoeven [Thu, 16 May 2013 13:54:29 +0000 (15:54 +0200)]
h8300: Limit timer channel ranges in Kconfig

arch/h8300/kernel/timer/itu.c and arch/h8300/kernel/timer/tpu.c
only support 0--4 for CONFIG_H8300_ITU_CH resp. H8300_TPU_CH, hence limit
them to that range in Kconfig.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Wire up asm-generic/xor.h
Geert Uytterhoeven [Tue, 14 May 2013 07:26:03 +0000 (09:26 +0200)]
h8300: Wire up asm-generic/xor.h

crypto/xor.c:25:21: fatal error: asm/xor.h: No such file or directory

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Fill the system call table using a CALL() macro
Geert Uytterhoeven [Thu, 9 May 2013 20:47:46 +0000 (22:47 +0200)]
h8300: Fill the system call table using a CALL() macro

The CALL() macro abstracts (a.o.) the underscore symbol prefix.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
11 years agoh8300: Fix <asm/tlb.h>
Geert Uytterhoeven [Tue, 7 May 2013 08:27:53 +0000 (10:27 +0200)]
h8300: Fix <asm/tlb.h>

Ten years ago, a mismerge happened, concatenating two slightly different
versions of the same file. As a consequence, <asm-generic/tlb.h> was never
included, leading to a build failure only now:

kernel/cpu/idle.c: In function 'cpu_idle_loop':
kernel/cpu/idle.c:70:4: error: implicit declaration of function 'check_pgt_cache' [-Werror=implicit-function-declaration]

Remove the duplicates, and the header comment with the no longer correct
file name.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>
11 years agoh8300: Hardcode symbol prefixes in asm sources
Geert Uytterhoeven [Mon, 6 May 2013 19:32:46 +0000 (21:32 +0200)]
h8300: Hardcode symbol prefixes in asm sources

Commit e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea ("consolidate cond_syscall
and SYSCALL_ALIAS declarations") broke the h8300 build because it removed
the duplicate SYMBOL_NAME() macro from arch/h8300/include/asm/linkage.h,
and all the h8300 asm files include <asm/linkage.h> instead of
<linux/linkage.h>.

Commit 126de6b20bfb82cc19012d5048f11f339ae5a021 ("linkage.h: fix build
breakage due to symbol prefix handling") broke it even more, by removing
SYMBOL_NAME() and replacing it by __SYMBOL_NAME().

Commit f8ce1faf55955de62e0a12e330c6d9a526071f65 ("Merge tag
'modules-next-for-linus' of
git://git.kernel.org/pub/scm/linuxkernel/git/rusty/linux")
also removed __SYMBOL_NAME(), hidden in a merge conflict resolution.

Hence, replace the use of SYMBOL_NAME() and SYMBOL_NAME_LABEL() in h8300
assembler sources by hardcoding the underscore symbol prefix, like other
architectures (blackfin/metag) do.

This allows to kill SYMBOL_NAME_LABEL(). Now <asm/linkage.h> becomes empty,
and h8300 can be switched to asm-generic/linkage.h.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
11 years agoMerge tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 18 Jun 2013 16:29:19 +0000 (06:29 -1000)]
Merge tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull ia64 build fix from Tony Luck:
 "Fix ia64 build breakage by adding newly needed #include"

We're still debating the patch that caused the build breakage, but this
fix seems like a good idea regardless of how that ends up being handled.

* tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  [IA64] Fix include dependency in asm/irqflags.h

11 years agoMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Tue, 18 Jun 2013 16:27:47 +0000 (06:27 -1000)]
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux

Pull SLAB fix from Pekka Enberg:
 "A slab regression fix by Sasha Levin"

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  slab: prevent warnings when allocating with __GFP_NOWARN

11 years agoMerge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Tue, 18 Jun 2013 16:26:14 +0000 (06:26 -1000)]
Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Only driver/device-specific small fixes that are pretty safe to apply:

   - USB-audio Android and Logitech webcam fixes
   - HD-audio MacBook Air 4,2 quirk
   - Complete Dell headset quirk entries that were introduced in 3.10"

* tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Add models for Dell headset jacks
  ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
  ALSA: hda - Fix pin configurations for MacBook Air 4,2
  ALSA: usb-audio: work around Android accessory firmware bug
  ALSA: hda - Headset mic support for three more machines

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 18 Jun 2013 16:25:08 +0000 (06:25 -1000)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "Series of fixes for 3.10.  There are some usual driver fixes (mostly
  on s5p/exynos playform drivers), plus some fixes at V4L2 core"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits)
  [media] soc_camera: error dev remove and v4l2 call
  [media] sh_veu: fix the buffer size calculation
  [media] sh_veu: keep power supply until the m2m context is released
  [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
  [media] v4l2-ioctl: don't print the clips list
  [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
  [media] cx88: fix NULL pointer dereference
  [media] DocBook/media/v4l: update version number
  [media] exynos4-is: Remove "sysreg" clock handling
  [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
  [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
  [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
  [media] s5p-mfc: Add NULL check for allocated buffer
  [media] s5p-mfc: added missing end-of-lines in debug messages
  [media] s5p-mfc: v4l2 controls setup routine moved to initialization code
  [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
  [media] s5p-mfc: Remove special clock usage in driver
  [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
  [media] v4l2: mem2mem: save irq flags correctly
  [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
  ...

11 years agoMerge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux
Linus Torvalds [Tue, 18 Jun 2013 16:23:51 +0000 (06:23 -1000)]
Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux

Pull clock framework fixes from Mike Turquette:
 "Half of the fixes here are for Exynos5, fixing regressions in CPUfreq
  due to the common clock framework conversion as well as one fix which
  allows the platform to properly reboot again.

  One core framework fix patches up a memory leak, another fixes a build
  error for the SPEAr platform and finally a Tegra-specific fix allows
  PCIe to initialize properly on that platform again"

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
  ARM: tegra30: clocks: Fix pciex clock registration
  clk: exynos5250: Add CLK_IGNORE_UNUSED flag for pmu clock
  clk: spear: fix build error for spear3xx
  clk: samsung: Fix pll36xx_recalc_rate to handle kdiv properly
  clk: exynos5250: Add sclk_mpll to the parent list of mout_cpu clock
  clk: exynos5250: Update cpufreq related clocks for EXYNOS5250
  clk: remove notifier from list before freeing it

11 years agoipv6: ndisc: fix ndisc_send_redirect writing to the wrong skb
Matthias Schiffer [Fri, 31 May 2013 01:27:55 +0000 (03:27 +0200)]
ipv6: ndisc: fix ndisc_send_redirect writing to the wrong skb

Since some refactoring in 5f5a011, ndisc_send_redirect called
ndisc_fill_redirect_hdr_option on the wrong skb, leading to data corruption or
in the worst case a panic when the skb_put failed.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobridge: fix switched interval for MLD Query types
Linus Lüssing [Sun, 16 Jun 2013 21:20:34 +0000 (23:20 +0200)]
bridge: fix switched interval for MLD Query types

General Queries (the one with the Multicast Address field
set to zero / '::') are supposed to have a Maximum Response Delay
of [Query Response Interval], while for Multicast-Address-Specific
Queries it is [Last Listener Query Interval] - not the other way
round. (see RFC2710, section 7.3+7.8)

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovlan: restore ethtool ABI to control VLAN hardware acceleration
Fernando Luis Vazquez Cao [Mon, 17 Jun 2013 02:28:03 +0000 (11:28 +0900)]
vlan: restore ethtool ABI to control VLAN hardware acceleration

As part of the push to add 802.1ad server provider tagging support to the
kernel the VLAN features flags were renamed. Unfortunately the kernel name
for the VLAN hardware acceleration features that the kernel shows user space
was included in the rename, which broke ethtool (txvlan and rxvlan options
do not work). This patch restores the original names, i.e. the original ABI.
If we wanted to make clear to users that we are refering to CTAGs we can
always change ethtool's short_name and long_name for these features (for
example something along the lines of txvlan -> txvlan-ctag, tx-vlan-offload ->
tx-vlan-ctag-offload).

Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: cpsw: check for cpts pointer after its allocation
Sebastian Siewior [Mon, 17 Jun 2013 17:31:52 +0000 (19:31 +0200)]
net: cpsw: check for cpts pointer after its allocation

after priv->cpts got allocated then this pointer should check to determine
if the allocation succeeded or not.

Cc: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 17 Jun 2013 23:15:51 +0000 (16:15 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into wireless

John W. Linville says:

====================
This will probably be the last batch of wireless fixes intended
for 3.10.  Many of these are one- or two-liners, and a couple of
others are mostly relocating existing code to avoid races or to
limit the code to effecting specific hardware, etc.

The mac80211 fixes have a couple of exceptions to the above.
Regarding those, Johannes says:

"Following davem's complaint about my patch, here's a new pull request
w/o the patch he was complaining about, but instead with the const
fix rolled into the fix.

I have a fix for radar detection, one for rate control and a workaround
for broken HT APs which is a regression fix because we didn't rely
on them to be correct before."

Johannes also sends some iwlwifi fixes:

"I picked up Nikolay's patch for the chain noise calibration bug
that seems to have been there forever, a fix from Emmanuel for
setting TX flags on BAR frames and a fix of my own to avoid printing
request_module() errors if the kernel isn't even modular. We also
have our own version of Stanislaw's fix for rate control."

Along with those...

Anderson Lizardo fixes a Bluetooth memory corruption bug when an MTU
value is set to too small of a value.

Arend van Spriel sends a revised brcmsmac bug that fixes a regression
caused by a bad return value in an earlier patch.  He also sends a
brcmfmac fix to avoid an oops when loading the driver at boot.

Daniel Drake fixes a race condition in btmrvl that causes hangs on
suspend for OLPC hardware.

Johan Hedberg adds a check to avoid sending a
HCI_Delete_Stored_Link_Key command to devices that don't support them,
avoiding some scary looking log spam.

Stanislaw Gruszka gives us a fix for iwlegacy to be able to use rates
higher than 1Mb/s on older wireless networks.  He also sends an rt2x00
fix to reinstate older tx power handling behavior for some devices
that didn't work well with the current code.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
David S. Miller [Mon, 17 Jun 2013 23:13:45 +0000 (16:13 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

====================
The following patchset contains Netfilter fixes. They are targeted to the
TCP option targets, that have receive some scrinity in the last week. The
changes are:

* Fix TCPOPTSTRIP, it stopped working in the forward chain as tcp_hdr
  uses skb->transport_header, and we cannot use that in the forwarding
  case, from myself.

* Fix default IPv6 MSS in TCPMSS in case of absence of TCP MSS options,
  from Phil Oester.

* Fix missing fragmentation handling again in TCPMSS, from Phil Oester.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoalx: add a simple AR816x/AR817x device driver
Johannes Berg [Mon, 17 Jun 2013 20:44:02 +0000 (22:44 +0200)]
alx: add a simple AR816x/AR817x device driver

This is a very simple driver, based on the original vendor
driver that Qualcomm/Atheros published/submitted previously,
but reworked to make the code saner. However, it also lost
a number of features (TSO/GSO, VLAN acceleration and multi-
queue support) in the process, as well as debugging support
features I didn't have any use for. The only thing I left
is checksum offload.

More features can obviously be added, but this seemed like
a good start for having a driver in mainline at all.

Johannes Stezenbach has verified that the driver works on
AR8161, I have a AR8171 myself. The E2200 device ID I found
on github in somebody's repository.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoFix the VLAN_TAG_PRESENT in netvsc_recv_callback()
Haiyang Zhang [Mon, 17 Jun 2013 22:36:49 +0000 (15:36 -0700)]
Fix the VLAN_TAG_PRESENT in netvsc_recv_callback()

We should call __vlan_hwaccel_put_tag() only if the packet
comes from vlan, otherwise VLAN_TAG_PRESENT will always be
added.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: handle skb_clone failure
stephen hemminger [Mon, 17 Jun 2013 19:09:59 +0000 (12:09 -0700)]
vxlan: handle skb_clone failure

If skb_clone fails if out of memory then just skip the fanout.

Problem was introduced in 3.10 with:
  commit 6681712d67eef14c4ce793561c3231659153a320
  Author: David Stevens <dlstevens@us.ibm.com>
  Date:   Fri Mar 15 04:35:51 2013 +0000

    vxlan: generalize forwarding tables

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: only migrate dynamic FDB entries
stephen hemminger [Mon, 17 Jun 2013 19:09:58 +0000 (12:09 -0700)]
vxlan: only migrate dynamic FDB entries

Only migrate dynamic forwarding table entries, don't modify
static entries. If packet received from incorrect source IP address
assume it is an imposter and drop it.

This patch applies only to -net, a different patch would be needed for earlier
kernels since the NTF_SELF flag was introduced with 3.10.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovxlan: fix race between flush and incoming learning
stephen hemminger [Mon, 17 Jun 2013 19:09:57 +0000 (12:09 -0700)]
vxlan: fix race between flush and incoming learning

It is possible for a packet to arrive during vxlan_stop(), and
have a dynamic entry created. Close this by checking if device
is up.

 CPU1                             CPU2
vxlan_stop
  vxlan_flush
     hash_lock acquired
                                  vxlan_encap_recv
                                     vxlan_snoop
                                        waiting for hash_lock
     hash_lock relased
  vxlan_flush done
                                        hash_lock acquired
                                        vxlan_fdb_create

This is a day-one bug in vxlan goes back to 3.7.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years ago[IA64] Fix include dependency in asm/irqflags.h
David Daney [Sun, 16 Jun 2013 20:06:28 +0000 (13:06 -0700)]
[IA64] Fix include dependency in asm/irqflags.h

asm/kregs.h isn't always included first, so we need an explicit include.

[Fix build breakage introduced by f21afc25f9ed45b8ffe200d0f071b0caec3ed2ef
 smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().]

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
11 years agoARM: 7759/1: decouple CPU offlining from reboot/shutdown
Stephen Warren [Fri, 14 Jun 2013 15:14:14 +0000 (16:14 +0100)]
ARM: 7759/1: decouple CPU offlining from reboot/shutdown

Add comments to machine_shutdown()/halt()/power_off()/restart() that
describe their purpose and/or requirements re: CPUs being active/not.

In machine_shutdown(), replace the call to smp_send_stop() with a call to
disable_nonboot_cpus(). This completely disables all but one CPU, thus
satisfying the requirement that only a single CPU be active for kexec.
Adjust Kconfig dependencies for this change.

In machine_halt()/power_off()/restart(), call smp_send_stop() directly,
rather than via machine_shutdown(); these functions don't need to
completely de-activate all CPUs using hotplug, but rather just quiesce
them.

Remove smp_kill_cpus(), and its call from smp_send_stop().
smp_kill_cpus() was indirectly calling smp_ops.cpu_kill() without calling
smp_ops.cpu_die() on the target CPUs first. At least some implementations
of smp_ops had issues with this; it caused cpu_kill() to hang on Tegra,
for example. Since smp_send_stop() is only used for shutdown, halt, and
power-off, there is no need to attempt any kind of CPU hotplug here.

Adjust Kconfig to reflect that machine_shutdown() (and hence kexec)
relies upon disable_nonboot_cpus(). However, this alone doesn't guarantee
that hotplug will work, or even that hotplug is implemented for a
particular piece of HW that a multi-platform zImage runs on. Hence, add
error-checking to machine_kexec() to determine whether it did work.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Zhangfei Gao <zhangfei.gao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agotty: Fix transient pty write() EIO
Peter Hurley [Thu, 13 Jun 2013 19:56:37 +0000 (15:56 -0400)]
tty: Fix transient pty write() EIO

Commit 699390354da6c258b65bf8fa79cfd5feaede50b6
('pty: Ignore slave pty close() if never successfully opened')
introduced a bug with ptys whereby a write() in parallel with an
open() on an existing pty could mistakenly indicate an I/O error.

Only indicate an I/O error if the condition on open() actually exists.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Cc: stable <stable@vger.kernel.org> # 3.9
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty/vt: Return EBUSY if deallocating VT1 and it is busy
Ross Lagerwall [Fri, 14 Jun 2013 22:24:25 +0000 (23:24 +0100)]
tty/vt: Return EBUSY if deallocating VT1 and it is busy

Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
the behavior when deallocating VT 1.  Previously if trying to
deallocate VT1 and it is busy, we would return EBUSY.  The commit
changed this to return 0 (success).

This commit restores the old behavior.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 17 Jun 2013 17:44:01 +0000 (13:44 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem

11 years agoMerge branch 'ja-nommu-for-rmk-v2' of git://linux-arm.org/linux-ja into devel-stable
Russell King [Mon, 17 Jun 2013 15:52:14 +0000 (16:52 +0100)]
Merge branch 'ja-nommu-for-rmk-v2' of git://linux-arm.org/linux-ja into devel-stable

This includes the following series sent earlier to the list:
 - nommu-fixes
 - R7 Support
 - MPU support

I've left out the ARCH_MULTIPLATFORM/!MMU stuff that Arnd and I were
discussing today until we've reached a conclusion/that's had some more
review.

This is rebased (and re-tested) on your devel-stable branch because
otherwise there were going to be conflicts with Uwe's V7M work now that
you've merged that. I've included the fix for limiting MPU to CPU_V7.

11 years agoARM: mpu: Ensure that MPU depends on CPU_V7
Jonathan Austin [Fri, 24 May 2013 19:47:57 +0000 (20:47 +0100)]
ARM: mpu: Ensure that MPU depends on CPU_V7

The support for the MPU is currently implemented only for R-class
(PMSAv7/R). Since the merge of V7M support in to the kernel it is possible
to select MPU support on V7M.

This patch ensures that until MPU support for M-class processors is
implemented, the MPU can only be selected with R-class CPUs

Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
11 years agoARM: mpu: protect the vectors page with an MPU region
Jonathan Austin [Thu, 18 Apr 2013 17:37:24 +0000 (18:37 +0100)]
ARM: mpu: protect the vectors page with an MPU region

Without an MMU it is possible for userspace programs to start executing code
in places that they have no business executing. The MPU allows some level of
protection against this.

This patch protects the vectors page from access by userspace processes.
Userspace tasks that dereference a null pointer are already protected by an
svc at 0x0 that kills them. However when tasks use an offset from a null
pointer (eg a function in a null struct) they miss this carefully placed svc
and enter the exception vectors in user mode, ending up in the kernel.

This patch causes programs that do this to receive a SEGV instead of happily
entering the kernel in user-mode, and hence avoid a 'Bad Mode' panic.

As part of this change it is necessary to make sigreturn happen via the
stack when there is not an sa_restorer function. This change is invisible to
userspace, and irrelevant to code compiled using a uClibc toolchain, which
always uses an sa_restorer function.

Because we don't get to remap the vectors in !MMU kuser_helpers are not
in a defined location, and hence aren't usable. This means we don't need to
worry about keeping them accessible from PL0

Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
CC: Nicolas Pitre <nico@linaro.org>
CC: Catalin Marinas <catalin.marinas@arm.com>
11 years agoARM: mpu: Allow enabling of the MPU via kconfig
Jonathan Austin [Fri, 22 Feb 2013 18:56:04 +0000 (18:56 +0000)]
ARM: mpu: Allow enabling of the MPU via kconfig

Allows the user to select MPU support when compiling for ARM processors
that support the PMSAv7.

This ensures that CONFIG_SMP depends on the MPU in the case that no MMU
is present.

CONFIG_SMP_ON_UP is not implemented for nommu, so introduce an MMU
dependency there.

Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
11 years agoARC: [PTE] Fold PTE K/U access flags (MMUv4 preps)
Vineet Gupta [Mon, 17 Jun 2013 12:42:13 +0000 (18:12 +0530)]
ARC: [PTE] Fold PTE K/U access flags (MMUv4 preps)

The current ARC VM code has 13 flags in Page Table entry: some software
(accesed/dirty/non-linear-maps) and rest hardware specific. With 8k MMU
page, we need 19 bits for addressing page frame so remaining 13 bits is
just about enough to accomodate the current flags.

In MMUv4 there are 2 additional flags, SZ (normal or super page) and WT
(cache access mode write-thru) - and additionally PFN is 20 bits (vs. 19
before for 8k). Thus these can't be held in current PTE w/o making each
entry 64bit wide.

It seems there is some scope of compressing the current PTE flags (and
freeing up a few bits). Currently PTE contains fully orthogonal distinct
access permissions for kernel and user mode (Kr, Kw, Kx; Ur, Uw, Ux)
which can be folded into one set (R, W, X). The translation of 3 PTE
bits into 6 TLB bits (when programming the MMU) can be done based on
following pre-requites/assumptions:

1. For kernel-mode-only translations (vmalloc: 0x7000_0000 to
   0x7FFF_FFFF), PTE additionally has PAGE_GLOBAL flag set (and user
   space entries can never be global). Thus such a PTE can translate
   to Kr, Kw, Kx (as appropriate) and zero for User mode counterparts.

2. For non global entries, the PTE flags can be used to create mirrored
   K and U TLB bits. This is true after commit a950549c675f2c8c504
   "ARC: copy_(to|from)_user() to honor usermode-access permissions"
   which ensured that user-space translations _MUST_ have same access
   permissions for both U/K mode accesses so that  copy_{to,from}_user()
   play fair with fault based CoW break and such...

There is no such thing as free lunch - the cost is slightly infalted
TLB-Miss Handlers.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [tlb-miss] Fix bug with CONFIG_ARC_DBG_TLB_MISS_COUNT
Vineet Gupta [Mon, 17 Jun 2013 09:03:15 +0000 (14:33 +0530)]
ARC: [tlb-miss] Fix bug with CONFIG_ARC_DBG_TLB_MISS_COUNT

LOAD_FAULT_PTE macro is expected to set r2 with faulting vaddr.
However in case of CONFIG_ARC_DBG_TLB_MISS_COUNT, it was getting
clobbered with statistics collection code.

Fix latter by using a different register.

Note that only I-TLB Miss handler was potentially affected.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [tlb-miss] Redundant PAGE_PRESENT setting
Vineet Gupta [Mon, 17 Jun 2013 06:17:33 +0000 (11:47 +0530)]
ARC: [tlb-miss] Redundant PAGE_PRESENT setting

Post TLB entry installation, in updating PTE for software accessed/dity
bits, no need to update PAGE_PRESENT since it will already be set.
Infact the entry won't have installed if !PAGE_PRESENT.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [tlb-miss] No need to check for READ access in I-TLB Miss handler
Vineet Gupta [Mon, 17 Jun 2013 06:05:15 +0000 (11:35 +0530)]
ARC: [tlb-miss] No need to check for READ access in I-TLB Miss handler

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Setup Vector Table Base in early boot
Vineet Gupta [Mon, 17 Jun 2013 12:57:23 +0000 (18:27 +0530)]
ARC: Setup Vector Table Base in early boot

Otherwise early boot exceptions such as instructions errors due to
configuration mismatch between kernel and hardware go off to la-la land,
as opposed to hitting the handler and panic()'ing properly.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Remove explicit passing around of ECR
Vineet Gupta [Wed, 12 Jun 2013 09:43:40 +0000 (15:13 +0530)]
ARC: Remove explicit passing around of ECR

With ECR now part of pt_regs

* No need to propagate from lowest asm handlers as arg
* No need to save it in tsk->thread.cause_code
* Avoid bit chopping to access the bit-fields

More code consolidation, cleanup

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Use real ECR for pt_regs->event vs. synthetic values
Vineet Gupta [Wed, 12 Jun 2013 04:35:13 +0000 (10:05 +0530)]
ARC: Use real ECR for pt_regs->event vs. synthetic values

pt_regs->event was set with artificial values to identify the low level
system event (syscall trap / breakpoint trap / exceptions / interrupts)

Now we save CPU ECR (Exception Cause Register) itself in there.
Only for Interrupts, where ECR is not applicable, do we resort to
synthetic non ECR values.

The ptrace helpers now use the sub-fields of ECR to distinguish the
events (e.g. vector 0x25 is trap, param 0 is syscall...)

The following benefits will follow:

(1) This centralizes the location of where ECR is saved and will allow
    the cleanup of task->thread.cause_code ECR placeholder which is set
    in non-uniform way. Then ARC VM code can safely rely on it being
    there for purpose of finer grained VM_EXEC dcache flush (based on
    exec fault: I-TLB Miss)

(2) Further, ECR being passed around from low level handlers as arg can
    be eliminated.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: pt_regs cleanup #4: no need to keep backup of r8 (RIP orig_r8)
Vineet Gupta [Tue, 11 Jun 2013 13:26:54 +0000 (18:56 +0530)]
ARC: pt_regs cleanup #4: no need to keep backup of r8 (RIP orig_r8)

Historically, pt_regs have had orig_r8, an overloaded container for
  (1) backup copy of syscall number (in case of syscall Trap Exceptions)
  (2) additional system state: (syscall/Exception/Interrupt)

There is no point in keeping (1) since syscall number is never clobbered
in-place, in pt_regs (unlike r0 which duals as first syscall arg as well
as syscall return value and in case of syscall restart, the orig arg0
needs restoring after having been updated in-place with syscall ret value).

So remove stuffing of syscall num in orig_r8 - simplifies SAVE_ALL_TRAP
Use it exclusively for (2) hence rename to @event - RIP orig_r8

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: r25 saved/restored for K->K transitions as well
Vineet Gupta [Tue, 28 May 2013 08:20:41 +0000 (13:50 +0530)]
ARC: r25 saved/restored for K->K transitions as well

(This is a VERY IMP change for low level interrupt/exception handling)

-----------------------------------------------------------------------
WHAT
-----------------------------------------------------------------------
* User 25 now saved in pt_regs->user_r25 (vs. tsk->thread_info.user_r25)

* This allows Low level interrupt code to unconditionally save r25
  (vs. the prev version which would only do it for U->K transition).
  Ofcourse for nested interrupts, only the pt_regs->user_r25 of
  bottom-most frame is useful.

* simplifies the interrupt prologue/epilogue

* Needed for ARCv2 ISA code and done here to keep design similar with
  ARCompact event handling

-----------------------------------------------------------------------
WHY
-------------------------------------------------------------------------
With CONFIG_ARC_CURR_IN_REG, r25 is used to cache "current" task pointer
in kernel mode. So when entering kernel mode from User Mode
- user r25 is specially safe-kept (it being a callee reg is NOT part of
  pt_regs which are saved by default on each interrupt/trap/exception)
- r25 loaded with current task pointer.

Further, if interrupt was taken in kernel mode, this is skipped since we
know that r25 already has valid "current" pointer.

With 2 level of interrupts in ARCompact ISA, detecting this is difficult
but still possible, since we could be in kernel mode but r25 not already saved
(in fact the stack itself might not have been switched).

A. User mode
B. L1 IRQ taken
C. L2 IRQ taken (while on 1st line of L1 ISR)

So in #C, although in kernel mode, r25 not saved (infact SP not
switched at all)

Given that ARcompact has manual stack switching, we could use a bit of
trickey - The low level code would make sure that SP is only set to kernel
mode value at the very end (after saving r25). So a non kernel mode SP,
even if in kernel mode, meant r25 was NOT saved.

The same paradigm won't work in ARCv2 ISA since SP is auto-switched so
it's setting can't be delayed/constrained.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Exception Entry tweaks - SP saved from one location in code
Vineet Gupta [Mon, 27 May 2013 13:21:27 +0000 (18:51 +0530)]
ARC: Exception Entry tweaks - SP saved from one location in code

Save k/u mode SP on kernel stack from single place.
This paves way for further simplifications.

There's an overhead of 1 insn for the non-common case of interrupt taken
from kernel mode.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Exception Entry tweaks - Simplify branch for in-kernel preemption
Vineet Gupta [Tue, 14 May 2013 13:00:50 +0000 (18:30 +0530)]
ARC: Exception Entry tweaks - Simplify branch for in-kernel preemption

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Exception Entry tweaks - Avoid full LIMMS for ECR values
Vineet Gupta [Tue, 28 May 2013 09:54:30 +0000 (15:24 +0530)]
ARC: Exception Entry tweaks - Avoid full LIMMS for ECR values

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: Increase readability of low level handlers
Vineet Gupta [Tue, 28 May 2013 07:54:43 +0000 (13:24 +0530)]
ARC: Increase readability of low level handlers

* use artificial PUSH/POP contructs for CORE Reg save/restore to stack
* use artificial PUSHAX/POPAX contructs for Auxiliary Space regs
* macro'ize multiple copies of callee-reg-save/restore (SAVE_R13_TO_R24)
* use BIC insn for inverse-and operation

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: pt_regs cleanup #3: Remove unused gutter at start of callee_regs
Vineet Gupta [Mon, 27 May 2013 16:13:41 +0000 (21:43 +0530)]
ARC: pt_regs cleanup #3: Remove unused gutter at start of callee_regs

This is trickier than prev two:

* context switching code saves kernel mode callee regs in the format of
  struct callee_regs thus needs adjustment. This also reduces the height
  of topmost kernel stack frame by 1 word.

* Since kernel stack unwinder is sensitive to height of topmost kernel
  stack frame, that needs a word of adjustment too.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: pt_regs cleanup #2: Remove unused gutter at start of pt_regs
Vineet Gupta [Tue, 28 May 2013 04:13:17 +0000 (09:43 +0530)]
ARC: pt_regs cleanup #2: Remove unused gutter at start of pt_regs

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: pt_regs cleanup #1: Align pt_regs with end of kernel stack page
Vineet Gupta [Tue, 28 May 2013 04:04:45 +0000 (09:34 +0530)]
ARC: pt_regs cleanup #1: Align pt_regs with end of kernel stack page

Historically, pt_regs would end at offset of 1 word from end of stack
page.

        -----------------  -> START of page (task->stack)
        |               |
        | thread_info   |
        -----------------
        |               |
   ^    ~               ~
   |    ~               ~
   |    |               |
   |    |               | <---- pt_regs used to END here
        -----------------
        | 1 word GUTTER |
        ----------------- -> End of page (START of kernel stack)

This required special "one-off" considerations in low level code.

The root cause is very likely assumption of "empty" SP by the original
ARC kernel hackers, despite ARC700 always been "full" SP.

So finally RIP one word gutter !

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: pt_regs cleanup #0: remove kernel stack canary
Vineet Gupta [Mon, 27 May 2013 12:59:16 +0000 (18:29 +0530)]
ARC: pt_regs cleanup #0: remove kernel stack canary

This stack slot is going to be used in subsequent commits

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] Remove @write argument to do_page_fault()
Vineet Gupta [Wed, 12 Jun 2013 08:19:02 +0000 (13:49 +0530)]
ARC: [mm] Remove @write argument to do_page_fault()

This can be ascertained within do_page_fault() since it gets the full
ECR (Exception Cause Register).

Further, for both the callers of do_page_fault(): Prot-V / D-TLB-Miss,
the cause sub-fields in ECR are same for same type of access, making the
code much more simpler.

D-TLB-Miss [LD] 0x00_21_01_00
Prot-V     [LD] 0x00_23_01_00
                        ^^
D-TLB-Miss [ST] 0x00_21_02_00
Prot-V     [ST] 0x00_23_02_00
                        ^^
D-TLB-Miss [EX] 0x00_21_03_00
Prot-V     [EX] 0x00_23_03_00
                        ^^

This helps code consolidation, which is even better when moving code from
assembler to "C".

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] Make stack/heap Non-executable by default
Vineet Gupta [Wed, 5 Jun 2013 12:19:14 +0000 (17:49 +0530)]
ARC: [mm] Make stack/heap Non-executable by default

1. For VM_EXEC based delayed dcache/icache flush, reduces the number of
   flushes.

2. Makes this security feature ON by default rather than OFF before.

3. Applications can use mprotect() to selectively override this.

4. ELF binaries have a GNU_STACK segment which can easily override the
   kernel default permissions.
   For nested-functions/trampolines, gcc already auto-enables executable
   stack in elf. Others needing this can use -Wl,-z,execstack option.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] Assume pagecache page dirty by default
Vineet Gupta [Mon, 13 May 2013 11:53:58 +0000 (17:23 +0530)]
ARC: [mm] Assume pagecache page dirty by default

Similar to ARM/SH

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] optimise VIPT dcache aliasing 2/x
Vineet Gupta [Thu, 23 May 2013 06:32:00 +0000 (12:02 +0530)]
ARC: [mm] optimise VIPT dcache aliasing 2/x

Non-congruent SRC page in copy_user_page() is dcache clean in the end -
so record that fact, to avoid a subsequent extraneous flush.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] optimise VIPT dcache aliasing 1/x
Vineet Gupta [Thu, 16 May 2013 06:53:31 +0000 (12:23 +0530)]
ARC: [mm] optimise VIPT dcache aliasing 1/x

flush_cache_page() - kills icache only if page is executable

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: [mm] Zero page optimization
Vineet Gupta [Sun, 19 May 2013 10:21:03 +0000 (15:51 +0530)]
ARC: [mm] Zero page optimization

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARC: No-op full icache flush if !CONFIG_ARC_HAS_ICACHE
Vineet Gupta [Sat, 15 Jun 2013 16:48:10 +0000 (22:18 +0530)]
ARC: No-op full icache flush if !CONFIG_ARC_HAS_ICACHE

Also remove extraneous irq disabling in flush_cache_all() callstack

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
11 years agoARM: 7756/1: zImage/virt: remove hyp-stub.S during distclean
Magnus Damm [Wed, 12 Jun 2013 09:56:43 +0000 (10:56 +0100)]
ARM: 7756/1: zImage/virt: remove hyp-stub.S during distclean

Make sure hyp-stub.S gets removed during make distclean,
this left over file was introduced in commit:

424e599 ARM: zImage/virt: hyp mode entry support for the zImage loader

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Dave Martin <dave.martin@linaro.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page
Simon Baatz [Mon, 10 Jun 2013 20:10:12 +0000 (21:10 +0100)]
ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page

Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that
the pages it needs to handle are kernel mapped only.  However, for
example when doing direct I/O, pages with user space mappings may
occur.

Thus, continue to do lazy flushing if there are no user space
mappings.  Otherwise, flush the kernel cache lines directly.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org> # 3.2+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7754/1: Fix the CPU ID and the mask associated to the PJ4B
Gregory CLEMENT [Mon, 10 Jun 2013 17:05:51 +0000 (18:05 +0100)]
ARM: 7754/1: Fix the CPU ID and the mask associated to the PJ4B

This commit fixes the ID and mask for the PJ4B which was too
restrictive and didn't match the CPU of the Armada 370 SoC.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7753/1: map_init_section flushes incorrect pmd
Po-Yu Chuang [Fri, 7 Jun 2013 11:15:45 +0000 (12:15 +0100)]
ARM: 7753/1: map_init_section flushes incorrect pmd

This bug was introduced in commit e651eab0.
Some v4/v5 platforms failed to boot due to this.

Signed-off-by: Po-Yu Chuang <ratbert.chuang@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect
Jon Medhurst [Fri, 7 Jun 2013 09:35:35 +0000 (10:35 +0100)]
ARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect

On Cortex-A9 before version r1p0, the LoUIS bit field of the CLIDR
register returns zero when it should return one. This leads to cache
maintenance operations which rely on this value to not function as
intended, causing data corruption.

The workaround for this errata is to detect affected CPUs and correct
the LoUIS value read.

Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoALSA: hda - Add models for Dell headset jacks
David Henningsson [Mon, 17 Jun 2013 09:04:02 +0000 (11:04 +0200)]
ALSA: hda - Add models for Dell headset jacks

These headset jacks keep coming in on more and more platforms, and
it's possible I don't catch them all. Make it easier to test and
verify by making models.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: 7758/1: introduce config HAS_BANDGAP
Eduardo Valentin [Thu, 13 Jun 2013 21:58:52 +0000 (22:58 +0100)]
ARM: 7758/1: introduce config HAS_BANDGAP

Bandgap is a device used to measure temperature on electronic
equipments.  It is widely used in digital integrated circuits.  It is
based on the dependency between silicon voltage and temperature.

This patch introduce HAS_BANDGAP config entry.  This config is a boolean
value so that arch code can flag if they feature a bandgap device.

This config entry follows the same idea behind ARCH_HAS_CPUFREQ.

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Fabio Stevam <festevam@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7757/1: mm: don't flush icache in switch_mm with hardware broadcasting
Will Deacon [Wed, 12 Jun 2013 11:25:56 +0000 (12:25 +0100)]
ARM: 7757/1: mm: don't flush icache in switch_mm with hardware broadcasting

When scheduling an mm on a CPU where it hasn't previously been used, we
flush the icache on that CPU so that any code loaded previously on
a different core can be safely executed.

For cores with hardware broadcasting of cache maintenance operations,
this is clearly unnecessary, since the inner-shareable invalidation in
__sync_icache_dcache will affect all CPUs.

This patch conditionalises the icache flush in switch_mm based on
cache_ops_need_broadcast().

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Albin Tonnerre <albin.tonnerre@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7751/1: zImage: don't overwrite ourself with a page table
Nicolas Pitre [Thu, 6 Jun 2013 04:13:48 +0000 (05:13 +0100)]
ARM: 7751/1: zImage: don't overwrite ourself with a page table

When zImage is loaded into RAM at a low address but TEXT_OFFSET
is set higher, we risk overwriting ourself with the page table
needed to turn on the cache as it is located relative to the relocation
address.  Let's defer the cache setup after relocation in that case.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Stephen Boyd <sboyd@codeurora.org>
Tested-by: Stephen Boyd <sboyd@codeurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock
Will Deacon [Wed, 5 Jun 2013 10:27:26 +0000 (11:27 +0100)]
ARM: 7749/1: spinlock: retry trylock operation if strex fails on free lock

An exclusive store instruction may fail for reasons other than lock
contention (e.g. a cache eviction during the critical section) so, in
line with other architectures using similar exclusive instructions
(alpha, mips, powerpc), retry the trylock operation if the lock appears
to be free but the strex reported failure.

Reported-by: Tony Thompson <anthony.thompson@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>