summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Williamson <awilliam@redhat.com>2014-08-25 09:45:47 -0700
committerAdam Williamson <awilliam@redhat.com>2014-08-25 09:48:26 -0700
commit21e24125a9841c80745cc8f09d79323e1be44b3b (patch)
treeac07b4c0c38a3620257fa682a09062942354bb20
parenta1070754271ac1af0a318745de478f667c0610a8 (diff)
parentc7df1977f27d1459fc4fe5f0d31b37d58a0b4664 (diff)
downloadkernel-21e24125a9841c80745cc8f09d79323e1be44b3b.tar.gz
kernel-21e24125a9841c80745cc8f09d79323e1be44b3b.tar.xz
kernel-21e24125a9841c80745cc8f09d79323e1be44b3b.zip
Merge branch 'f21' into baytrail
Conflicts: kernel-arm64.patch kernel.spec sources
-rw-r--r--0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch36
-rw-r--r--0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch100
-rw-r--r--Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch44
-rw-r--r--Revert-userns-Allow-unprivileged-users-to-create-use.patch44
-rw-r--r--arm-qemu-fixdisplay.patch472
-rw-r--r--arm-tegra-drmdetection.patch111
-rw-r--r--config-arm-generic22
-rw-r--r--config-armv744
-rw-r--r--config-armv7-generic24
-rw-r--r--config-generic8
-rw-r--r--config-nodebug120
-rw-r--r--config-x86-generic2
-rw-r--r--drm-radeon-Disable-writeback-by-default-on-ppc.patch88
-rw-r--r--fs-umount-on-symlink-leaks-mnt-count.patch41
-rw-r--r--kernel-arm64.patch1194
-rw-r--r--kernel.spec144
-rw-r--r--namespaces-remount-fixes.patch625
-rw-r--r--nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch41
-rw-r--r--secure-modules.patch45
-rw-r--r--selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch75
-rw-r--r--serial-460800.patch73
-rw-r--r--sources7
22 files changed, 2831 insertions, 529 deletions
diff --git a/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
new file mode 100644
index 000000000..ec2af2ab2
--- /dev/null
+++ b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
@@ -0,0 +1,36 @@
+From 86da2d12cf6f76b1fa487f7acf3995f058a2e516 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 1 Aug 2014 17:27:49 +0200
+Subject: [PATCH v2 1/2] uas: Limit qdepth to 32 when connected over usb-2
+
+Some jmicron uas chipsets act up (they disconnect from the bus) when sending
+more then 32 commands to them at once.
+
+Rather then building an ever growing list with usb-id based quirks for
+devices using this chipset, simply reduce the qdepth to 32 when connected
+over usb-2. 32 should be plenty to keep things close to maximum
+possible throughput on usb-2.
+
+Cc: stable@vger.kernel.org
+Tested-and-reported-by: Laszlo T. <tlacix@gmail.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ drivers/usb/storage/uas.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
+index 511b229..3f42785 100644
+--- a/drivers/usb/storage/uas.c
++++ b/drivers/usb/storage/uas.c
+@@ -1026,7 +1026,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo)
+ usb_endpoint_num(&eps[3]->desc));
+
+ if (udev->speed != USB_SPEED_SUPER) {
+- devinfo->qdepth = 256;
++ devinfo->qdepth = 32;
+ devinfo->use_streams = 0;
+ } else {
+ devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1,
+--
+2.0.4
+
diff --git a/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch b/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch
new file mode 100644
index 000000000..1b6c45be0
--- /dev/null
+++ b/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch
@@ -0,0 +1,100 @@
+Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1121288
+Upstream-status: Send upstream for 3.16/3.17 with Cc: stable
+
+From 508b353921aa266c48f70e1cd9332d3e2ef67171 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 25 Jul 2014 12:28:02 +0200
+Subject: [PATCH v2] xhci: Blacklist using streams on the Etron EJ168
+ controller
+
+Streams on the EJ168 do not work as they should. I've spend 2 days trying
+to get them to work, but without success.
+
+The first problem is that when ever you ring the stream-ring doorbell, the
+controller starts executing trbs at the beginning of the first ring segment,
+event if it ended somewhere else previously. This can be worked around by
+allowing enqueing only one td (not a problem with how streams are typically
+used) and then resetting our copies of the enqueueing en dequeueing pointers
+on a td completion to match what the controller seems to be doing.
+
+This way things seem to start working with uas and instead of being able
+to complete only the very first scsi command, the scsi core can probe the disk.
+
+But then things break later on when td-s get enqueued with more then one
+trb. The controller does seem to increase its dequeue pointer while executing
+a stream-ring (data transfer events I inserted for debugging do trigger).
+However execution seems to stop at the final normal trb of a multi trb td,
+even if there is a data transfer event inserted after the final trb.
+
+The first problem alone is a serious deviation from the spec, and esp.
+dealing with cancellation would have been very tricky if not outright
+impossible, but the second problem simply is a deal breaker altogether,
+so this patch simply disables streams.
+
+Note this will cause the usb-storage + uas driver pair to automatically switch
+to using usb-storage instead of uas on these devices, essentially reverting
+to the 3.14 and earlier behavior when uas was marked CONFIG_BROKEN.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1121288
+https://bugzilla.kernel.org/show_bug.cgi?id=80101
+
+Cc: stable@vger.kernel.org # 3.15
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ drivers/usb/host/xhci-pci.c | 4 +++-
+ drivers/usb/host/xhci.c | 3 ++-
+ drivers/usb/host/xhci.h | 2 ++
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
+index e20520f..464049f 100644
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -143,6 +143,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
+ pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+ xhci->quirks |= XHCI_TRUST_TX_LENGTH;
++ xhci->quirks |= XHCI_BROKEN_STREAMS;
+ }
+ if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
+ pdev->device == 0x0015)
+@@ -230,7 +231,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
+ goto put_usb3_hcd;
+ /* Roothub already marked as USB 3.0 speed */
+
+- if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
++ if (!(xhci->quirks & XHCI_BROKEN_STREAMS) &&
++ HCC_MAX_PSA(xhci->hcc_params) >= 4)
+ xhci->shared_hcd->can_do_streams = 1;
+
+ /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
+index 7d02e1b..758bc31 100644
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -3163,7 +3163,8 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
+ num_streams);
+
+ /* MaxPSASize value 0 (2 streams) means streams are not supported */
+- if (HCC_MAX_PSA(xhci->hcc_params) < 4) {
++ if ((xhci->quirks & XHCI_BROKEN_STREAMS) ||
++ HCC_MAX_PSA(xhci->hcc_params) < 4) {
+ xhci_dbg(xhci, "xHCI controller does not support streams.\n");
+ return -ENOSYS;
+ }
+diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
+index 1411069..88b2958 100644
+--- a/drivers/usb/host/xhci.h
++++ b/drivers/usb/host/xhci.h
+@@ -1558,6 +1558,8 @@ struct xhci_hcd {
+ #define XHCI_PLAT (1 << 16)
+ #define XHCI_SLOW_SUSPEND (1 << 17)
+ #define XHCI_SPURIOUS_WAKEUP (1 << 18)
++/* For controllers with a broken beyond repair streams implementation */
++#define XHCI_BROKEN_STREAMS (1 << 19)
+ unsigned int num_active_eps;
+ unsigned int limit_active_eps;
+ /* There are two roothubs to keep track of bus suspend info for */
+--
+2.0.4
+
diff --git a/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch b/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
new file mode 100644
index 000000000..2f44032c8
--- /dev/null
+++ b/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
@@ -0,0 +1,44 @@
+Bugzilla: N/A
+Upstream-status: Sigh. We almost got to drop this.
+
+From 20e3f1e1b9341d233a11734c07c076caac9936ef Mon Sep 17 00:00:00 2001
+From: Josh Boyer <jwboyer@fedoraproject.org>
+Date: Mon, 28 Jul 2014 12:59:48 -0400
+Subject: [PATCH] Revert "Revert "ACPI / video: change acpi-video
+ brightness_switch_enabled default to 0""
+
+This reverts commit 2843768b701971ab10e62c77d5c75ad7c306f1bd.
+---
+ Documentation/kernel-parameters.txt | 2 +-
+ drivers/acpi/video.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
+index b7fa2f599459..e8db409a7e3a 100644
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -3532,7 +3532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+ the allocated input device; If set to 0, video driver
+ will only send out the event without touching backlight
+ brightness level.
+- default: 1
++ default: 0
+
+ virtio_mmio.device=
+ [VMMIO] Memory mapped virtio (platform) device.
+diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
+index 350d52a8f781..44c89f705018 100644
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -68,7 +68,7 @@ MODULE_AUTHOR("Bruno Ducrot");
+ MODULE_DESCRIPTION("ACPI Video Driver");
+ MODULE_LICENSE("GPL");
+
+-static bool brightness_switch_enabled = 1;
++static bool brightness_switch_enabled;
+ module_param(brightness_switch_enabled, bool, 0644);
+
+ /*
+--
+1.9.3
+
diff --git a/Revert-userns-Allow-unprivileged-users-to-create-use.patch b/Revert-userns-Allow-unprivileged-users-to-create-use.patch
deleted file mode 100644
index cea6bff01..000000000
--- a/Revert-userns-Allow-unprivileged-users-to-create-use.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Bugzilla: 917708
-Upstream-status: Fedora mustard
-
-From e3da68be55914bfeedb8866f191cc0958579611d Mon Sep 17 00:00:00 2001
-From: Josh Boyer <jwboyer@fedoraproject.org>
-Date: Wed, 13 Nov 2013 10:21:18 -0500
-Subject: [PATCH] Revert "userns: Allow unprivileged users to create user
- namespaces."
-
-This reverts commit 5eaf563e53294d6696e651466697eb9d491f3946.
-
-Conflicts:
- kernel/fork.c
----
- kernel/fork.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/kernel/fork.c b/kernel/fork.c
-index f6d11fc..e04c9a7 100644
---- a/kernel/fork.c
-+++ b/kernel/fork.c
-@@ -1573,6 +1573,19 @@ long do_fork(unsigned long clone_flags,
- long nr;
-
- /*
-+ * Do some preliminary argument and permissions checking before we
-+ * actually start allocating stuff
-+ */
-+ if (clone_flags & CLONE_NEWUSER) {
-+ /* hopefully this check will go away when userns support is
-+ * complete
-+ */
-+ if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SETUID) ||
-+ !capable(CAP_SETGID))
-+ return -EPERM;
-+ }
-+
-+ /*
- * Determine whether and which event to report to ptracer. When
- * called from kernel_thread or CLONE_UNTRACED is explicitly
- * requested, no event is reported; otherwise, report if the event
---
-1.8.3.1
-
diff --git a/arm-qemu-fixdisplay.patch b/arm-qemu-fixdisplay.patch
new file mode 100644
index 000000000..090193c2d
--- /dev/null
+++ b/arm-qemu-fixdisplay.patch
@@ -0,0 +1,472 @@
+commit d10715be03bd8bad59ddc50236cb140c3bd73c7b
+Author: Pawel Moll <pawel.moll@arm.com>
+Date: Tue Jun 24 12:55:11 2014 +0100
+
+ video: ARM CLCD: Add DT support
+
+ This patch adds basic DT bindings for the PL11x CLCD cells
+ and make their fbdev driver use them.
+
+ Signed-off-by: Pawel Moll <pawel.moll@arm.com>
+ Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+
+diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Documentation/devicetree/bindings/video/arm,pl11x.txt
+new file mode 100644
+index 0000000..3e3039a
+--- /dev/null
++++ b/Documentation/devicetree/bindings/video/arm,pl11x.txt
+@@ -0,0 +1,109 @@
++* ARM PrimeCell Color LCD Controller PL110/PL111
++
++See also Documentation/devicetree/bindings/arm/primecell.txt
++
++Required properties:
++
++- compatible: must be one of:
++ "arm,pl110", "arm,primecell"
++ "arm,pl111", "arm,primecell"
++
++- reg: base address and size of the control registers block
++
++- interrupt-names: either the single entry "combined" representing a
++ combined interrupt output (CLCDINTR), or the four entries
++ "mbe", "vcomp", "lnbu", "fuf" representing the individual
++ CLCDMBEINTR, CLCDVCOMPINTR, CLCDLNBUINTR, CLCDFUFINTR interrupts
++
++- interrupts: contains an interrupt specifier for each entry in
++ interrupt-names
++
++- clock-names: should contain "clcdclk" and "apb_pclk"
++
++- clocks: contains phandle and clock specifier pairs for the entries
++ in the clock-names property. See
++ Documentation/devicetree/binding/clock/clock-bindings.txt
++
++Optional properties:
++
++- memory-region: phandle to a node describing memory (see
++ Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt)
++ to be used for the framebuffer; if not present, the framebuffer
++ may be located anywhere in the memory
++
++- max-memory-bandwidth: maximum bandwidth in bytes per second that the
++ cell's memory interface can handle; if not present, the memory
++ interface is fast enough to handle all possible video modes
++
++Required sub-nodes:
++
++- port: describes LCD panel signals, following the common binding
++ for video transmitter interfaces; see
++ Documentation/devicetree/bindings/media/video-interfaces.txt;
++ when it is a TFT panel, the port's endpoint must define the
++ following property:
++
++ - arm,pl11x,tft-r0g0b0-pads: an array of three 32-bit values,
++ defining the way CLD pads are wired up; first value
++ contains index of the "CLD" external pin (pad) used
++ as R0 (first bit of the red component), second value
++ index of the pad used as G0, third value index of the
++ pad used as B0, see also "LCD panel signal multiplexing
++ details" paragraphs in the PL110/PL111 Technical
++ Reference Manuals; this implicitly defines available
++ color modes, for example:
++ - PL111 TFT 4:4:4 panel:
++ arm,pl11x,tft-r0g0b0-pads = <4 15 20>;
++ - PL110 TFT (1:)5:5:5 panel:
++ arm,pl11x,tft-r0g0b0-pads = <1 7 13>;
++ - PL111 TFT (1:)5:5:5 panel:
++ arm,pl11x,tft-r0g0b0-pads = <3 11 19>;
++ - PL111 TFT 5:6:5 panel:
++ arm,pl11x,tft-r0g0b0-pads = <3 10 19>;
++ - PL110 and PL111 TFT 8:8:8 panel:
++ arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
++ - PL110 and PL111 TFT 8:8:8 panel, R & B components swapped:
++ arm,pl11x,tft-r0g0b0-pads = <16 8 0>;
++
++
++Example:
++
++ clcd@10020000 {
++ compatible = "arm,pl111", "arm,primecell";
++ reg = <0x10020000 0x1000>;
++ interrupt-names = "combined";
++ interrupts = <0 44 4>;
++ clocks = <&oscclk1>, <&oscclk2>;
++ clock-names = "clcdclk", "apb_pclk";
++ max-memory-bandwidth = <94371840>; /* Bps, 1024x768@60 16bpp */
++
++ port {
++ clcd_pads: endpoint {
++ remote-endpoint = <&clcd_panel>;
++ arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
++ };
++ };
++
++ };
++
++ panel {
++ compatible = "panel-dpi";
++
++ port {
++ clcd_panel: endpoint {
++ remote-endpoint = <&clcd_pads>;
++ };
++ };
++
++ panel-timing {
++ clock-frequency = <25175000>;
++ hactive = <640>;
++ hback-porch = <40>;
++ hfront-porch = <24>;
++ hsync-len = <96>;
++ vactive = <480>;
++ vback-porch = <32>;
++ vfront-porch = <11>;
++ vsync-len = <2>;
++ };
++ };
+diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
+index 4a7098f..6f451ad 100644
+--- a/drivers/video/fbdev/Kconfig
++++ b/drivers/video/fbdev/Kconfig
+@@ -280,6 +280,7 @@ config FB_ARMCLCD
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
++ select VIDEOMODE_HELPERS if OF
+ help
+ This framebuffer device driver is for the ARM PrimeCell PL110
+ Colour LCD controller. ARM PrimeCells provide the building
+diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
+index 14d6b37..23b3519 100644
+--- a/drivers/video/fbdev/amba-clcd.c
++++ b/drivers/video/fbdev/amba-clcd.c
+@@ -26,6 +26,13 @@
+ #include <linux/amba/clcd.h>
+ #include <linux/clk.h>
+ #include <linux/hardirq.h>
++#include <linux/dma-mapping.h>
++#include <linux/of.h>
++#include <linux/of_address.h>
++#include <linux/of_graph.h>
++#include <video/display_timing.h>
++#include <video/of_display_timing.h>
++#include <video/videomode.h>
+
+ #include <asm/sizes.h>
+
+@@ -543,6 +550,259 @@ static int clcdfb_register(struct clcd_fb *fb)
+ return ret;
+ }
+
++#ifdef CONFIG_OF
++static int clcdfb_of_get_dpi_panel_mode(struct device_node *node,
++ struct fb_videomode *mode)
++{
++ int err;
++ struct display_timing timing;
++ struct videomode video;
++
++ err = of_get_display_timing(node, "panel-timing", &timing);
++ if (err)
++ return err;
++
++ videomode_from_timing(&timing, &video);
++
++ err = fb_videomode_from_videomode(&video, mode);
++ if (err)
++ return err;
++
++ return 0;
++}
++
++static int clcdfb_snprintf_mode(char *buf, int size, struct fb_videomode *mode)
++{
++ return snprintf(buf, size, "%ux%u@%u", mode->xres, mode->yres,
++ mode->refresh);
++}
++
++static int clcdfb_of_get_mode(struct device *dev, struct device_node *endpoint,
++ struct fb_videomode *mode)
++{
++ int err;
++ struct device_node *panel;
++ char *name;
++ int len;
++
++ panel = of_graph_get_remote_port_parent(endpoint);
++ if (!panel)
++ return -ENODEV;
++
++ /* Only directly connected DPI panels supported for now */
++ if (of_device_is_compatible(panel, "panel-dpi"))
++ err = clcdfb_of_get_dpi_panel_mode(panel, mode);
++ else
++ err = -ENOENT;
++ if (err)
++ return err;
++
++ len = clcdfb_snprintf_mode(NULL, 0, mode);
++ name = devm_kzalloc(dev, len + 1, GFP_KERNEL);
++ clcdfb_snprintf_mode(name, len + 1, mode);
++ mode->name = name;
++
++ return 0;
++}
++
++static int clcdfb_of_init_tft_panel(struct clcd_fb *fb, u32 r0, u32 g0, u32 b0)
++{
++ static struct {
++ unsigned int part;
++ u32 r0, g0, b0;
++ u32 caps;
++ } panels[] = {
++ { 0x110, 1, 7, 13, CLCD_CAP_5551 },
++ { 0x110, 0, 8, 16, CLCD_CAP_888 },
++ { 0x111, 4, 14, 20, CLCD_CAP_444 },
++ { 0x111, 3, 11, 19, CLCD_CAP_444 | CLCD_CAP_5551 },
++ { 0x111, 3, 10, 19, CLCD_CAP_444 | CLCD_CAP_5551 |
++ CLCD_CAP_565 },
++ { 0x111, 0, 8, 16, CLCD_CAP_444 | CLCD_CAP_5551 |
++ CLCD_CAP_565 | CLCD_CAP_888 },
++ };
++ int i;
++
++ /* Bypass pixel clock divider, data output on the falling edge */
++ fb->panel->tim2 = TIM2_BCD | TIM2_IPC;
++
++ /* TFT display, vert. comp. interrupt at the start of the back porch */
++ fb->panel->cntl |= CNTL_LCDTFT | CNTL_LCDVCOMP(1);
++
++ fb->panel->caps = 0;
++
++ /* Match the setup with known variants */
++ for (i = 0; i < ARRAY_SIZE(panels) && !fb->panel->caps; i++) {
++ if (amba_part(fb->dev) != panels[i].part)
++ continue;
++ if (g0 != panels[i].g0)
++ continue;
++ if (r0 == panels[i].r0 && b0 == panels[i].b0)
++ fb->panel->caps = panels[i].caps & CLCD_CAP_RGB;
++ if (r0 == panels[i].b0 && b0 == panels[i].r0)
++ fb->panel->caps = panels[i].caps & CLCD_CAP_BGR;
++ }
++
++ return fb->panel->caps ? 0 : -EINVAL;
++}
++
++static int clcdfb_of_init_display(struct clcd_fb *fb)
++{
++ struct device_node *endpoint;
++ int err;
++ u32 max_bandwidth;
++ u32 tft_r0b0g0[3];
++
++ fb->panel = devm_kzalloc(&fb->dev->dev, sizeof(*fb->panel), GFP_KERNEL);
++ if (!fb->panel)
++ return -ENOMEM;
++
++ endpoint = of_graph_get_next_endpoint(fb->dev->dev.of_node, NULL);
++ if (!endpoint)
++ return -ENODEV;
++
++ err = clcdfb_of_get_mode(&fb->dev->dev, endpoint, &fb->panel->mode);
++ if (err)
++ return err;
++
++ err = of_property_read_u32(fb->dev->dev.of_node, "max-memory-bandwidth",
++ &max_bandwidth);
++ if (!err)
++ fb->panel->bpp = 8 * max_bandwidth / (fb->panel->mode.xres *
++ fb->panel->mode.yres * fb->panel->mode.refresh);
++ else
++ fb->panel->bpp = 32;
++
++#ifdef CONFIG_CPU_BIG_ENDIAN
++ fb->panel->cntl |= CNTL_BEBO;
++#endif
++ fb->panel->width = -1;
++ fb->panel->height = -1;
++
++ if (of_property_read_u32_array(endpoint,
++ "arm,pl11x,tft-r0g0b0-pads",
++ tft_r0b0g0, ARRAY_SIZE(tft_r0b0g0)) == 0)
++ return clcdfb_of_init_tft_panel(fb, tft_r0b0g0[0],
++ tft_r0b0g0[1], tft_r0b0g0[2]);
++
++ return -ENOENT;
++}
++
++static int clcdfb_of_vram_setup(struct clcd_fb *fb)
++{
++ int err;
++ struct device_node *memory;
++ u64 size;
++
++ err = clcdfb_of_init_display(fb);
++ if (err)
++ return err;
++
++ memory = of_parse_phandle(fb->dev->dev.of_node, "memory-region", 0);
++ if (!memory)
++ return -ENODEV;
++
++ fb->fb.screen_base = of_iomap(memory, 0);
++ if (!fb->fb.screen_base)
++ return -ENOMEM;
++
++ fb->fb.fix.smem_start = of_translate_address(memory,
++ of_get_address(memory, 0, &size, NULL));
++ fb->fb.fix.smem_len = size;
++
++ return 0;
++}
++
++static int clcdfb_of_vram_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
++{
++ unsigned long off, user_size, kernel_size;
++
++
++ off = vma->vm_pgoff << PAGE_SHIFT;
++ user_size = vma->vm_end - vma->vm_start;
++ kernel_size = fb->fb.fix.smem_len;
++
++ if (off >= kernel_size || user_size > (kernel_size - off))
++ return -ENXIO;
++
++ return remap_pfn_range(vma, vma->vm_start,
++ __phys_to_pfn(fb->fb.fix.smem_start) + vma->vm_pgoff,
++ user_size,
++ pgprot_writecombine(vma->vm_page_prot));
++}
++
++static void clcdfb_of_vram_remove(struct clcd_fb *fb)
++{
++ iounmap(fb->fb.screen_base);
++}
++
++static int clcdfb_of_dma_setup(struct clcd_fb *fb)
++{
++ unsigned long framesize;
++ dma_addr_t dma;
++ int err;
++
++ err = clcdfb_of_init_display(fb);
++ if (err)
++ return err;
++
++ framesize = fb->panel->mode.xres * fb->panel->mode.yres *
++ fb->panel->bpp / 8;
++ fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize,
++ &dma, GFP_KERNEL);
++ if (!fb->fb.screen_base)
++ return -ENOMEM;
++
++ fb->fb.fix.smem_start = dma;
++ fb->fb.fix.smem_len = framesize;
++
++ return 0;
++}
++
++static int clcdfb_of_dma_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
++{
++ return dma_mmap_writecombine(&fb->dev->dev, vma, fb->fb.screen_base,
++ fb->fb.fix.smem_start, fb->fb.fix.smem_len);
++}
++
++static void clcdfb_of_dma_remove(struct clcd_fb *fb)
++{
++ dma_free_coherent(&fb->dev->dev, fb->fb.fix.smem_len,
++ fb->fb.screen_base, fb->fb.fix.smem_start);
++}
++
++static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev)
++{
++ struct clcd_board *board = devm_kzalloc(&dev->dev, sizeof(*board),
++ GFP_KERNEL);
++ struct device_node *node = dev->dev.of_node;
++
++ if (!board)
++ return NULL;
++
++ board->name = of_node_full_name(node);
++ board->caps = CLCD_CAP_ALL;
++ board->check = clcdfb_check;
++ board->decode = clcdfb_decode;
++ if (of_find_property(node, "memory-region", NULL)) {
++ board->setup = clcdfb_of_vram_setup;
++ board->mmap = clcdfb_of_vram_mmap;
++ board->remove = clcdfb_of_vram_remove;
++ } else {
++ board->setup = clcdfb_of_dma_setup;
++ board->mmap = clcdfb_of_dma_mmap;
++ board->remove = clcdfb_of_dma_remove;
++ }
++
++ return board;
++}
++#else
++static struct clcd_board *clcdfb_of_get_board(struct amba_dev *dev)
++{
++ return NULL;
++}
++#endif
++
+ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
+ {
+ struct clcd_board *board = dev_get_platdata(&dev->dev);
+@@ -550,6 +810,9 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id)
+ int ret;
+
+ if (!board)
++ board = clcdfb_of_get_board(dev);
++
++ if (!board)
+ return -EINVAL;
+
+ ret = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
+commit 1d5167b72ca05b2096760e1200fcd53b5f9a7562
+Author: Pawel Moll <pawel.moll@arm.com>
+Date: Fri Aug 1 15:43:34 2014 +0100
+
+ video: ARM CLCD: Fix DT-related build problems
+
+ This patch fixes the following error when !CONFIG_OF:
+
+ drivers/video/fbdev/amba-clcd.c:800:54: warning: ‘struct amba_dev’ declared inside parameter list [enabled by default]
+ static struct clcd_board *clcdfb_of_get_board(struct amba_dev *dev)
+ ^
+ and adds a missing Kconfig select causing this
+ when CONFIG_OF && !CONFIG_FB_MODE_HELPERS:
+
+ drivers/video/fbdev/amba-clcd.c:567: undefined reference to `fb_videomode_from_videomode'
+
+ Reported-by: Fengguang Wu <fengguang.wu@intel.com>
+ Signed-off-by: Pawel Moll <pawel.moll@arm.com>
+ Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
+
+diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
+index 6f451ad..ef94623 100644
+--- a/drivers/video/fbdev/Kconfig
++++ b/drivers/video/fbdev/Kconfig
+@@ -280,6 +280,7 @@ config FB_ARMCLCD
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
++ select FB_MODE_HELPERS if OF
+ select VIDEOMODE_HELPERS if OF
+ help
+ This framebuffer device driver is for the ARM PrimeCell PL110
+diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
+index 23b3519..beadd3e 100644
+--- a/drivers/video/fbdev/amba-clcd.c
++++ b/drivers/video/fbdev/amba-clcd.c
+@@ -797,7 +797,7 @@ static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev)
+ return board;
+ }
+ #else
+-static struct clcd_board *clcdfb_of_get_board(struct amba_dev *dev)
++static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev)
+ {
+ return NULL;
+ }
diff --git a/arm-tegra-drmdetection.patch b/arm-tegra-drmdetection.patch
new file mode 100644
index 000000000..d84040513
--- /dev/null
+++ b/arm-tegra-drmdetection.patch
@@ -0,0 +1,111 @@
+From: Stephen Warren <swarren@xxxxxxxxxx>
+
+When tegra-drm.ko is built as a module, these MODULE_DEVICE_TABLEs allow
+the module to be auto-loaded since the module will match the devices
+instantiated from device tree.
+
+(Notes for stable: in 3.14+, just git rm any conflicting file, since they
+are added in later kernels. For 3.13 and below, manual merging will be
+needed)
+
+Cc: <stable@xxxxxxxxxxxxxxx>
+Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
+---
+v2: Remove change to drm.c, since the match table there isn't used for
+probing.
+---
+ drivers/gpu/drm/tegra/dc.c | 1 +
+ drivers/gpu/drm/tegra/dpaux.c | 1 +
+ drivers/gpu/drm/tegra/dsi.c | 1 +
+ drivers/gpu/drm/tegra/gr2d.c | 1 +
+ drivers/gpu/drm/tegra/gr3d.c | 1 +
+ drivers/gpu/drm/tegra/hdmi.c | 1 +
+ drivers/gpu/drm/tegra/sor.c | 1 +
+ 7 files changed, 7 insertions(+)
+
+diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
+index ef40381f3909..48c3bc460eef 100644
+--- a/drivers/gpu/drm/tegra/dc.c
++++ b/drivers/gpu/drm/tegra/dc.c
+@@ -1303,6 +1303,7 @@ static const struct of_device_id tegra_dc_of_match[] = {
+ /* sentinel */
+ }
+ };
++MODULE_DEVICE_TABLE(of, tegra_dc_of_match);
+
+ static int tegra_dc_parse_dt(struct tegra_dc *dc)
+ {
+diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
+index 3f132e356e9c..708f783ead47 100644
+--- a/drivers/gpu/drm/tegra/dpaux.c
++++ b/drivers/gpu/drm/tegra/dpaux.c
+@@ -382,6 +382,7 @@ static const struct of_device_id tegra_dpaux_of_match[] = {
+ { .compatible = "nvidia,tegra124-dpaux", },
+ { },
+ };
++MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match);
+
+ struct platform_driver tegra_dpaux_driver = {
+ .driver = {
+diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
+index bd56f2affa78..97c409f10456 100644
+--- a/drivers/gpu/drm/tegra/dsi.c
++++ b/drivers/gpu/drm/tegra/dsi.c
+@@ -982,6 +982,7 @@ static const struct of_device_id tegra_dsi_of_match[] = {
+ { .compatible = "nvidia,tegra114-dsi", },
+ { },
+ };
++MODULE_DEVICE_TABLE(of, tegra_dsi_of_match);
+
+ struct platform_driver tegra_dsi_driver = {
+ .driver = {
+diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
+index 7c53941f2a9e..02cd3e37a6ec 100644
+--- a/drivers/gpu/drm/tegra/gr2d.c
++++ b/drivers/gpu/drm/tegra/gr2d.c
+@@ -121,6 +121,7 @@ static const struct of_device_id gr2d_match[] = {
+ { .compatible = "nvidia,tegra20-gr2d" },
+ { },
+ };
++MODULE_DEVICE_TABLE(of, gr2d_match);
+
+ static const u32 gr2d_addr_regs[] = {
+ GR2D_UA_BASE_ADDR,
+diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
+index 30f5ba9bd6d0..2bea2b2d204e 100644
+--- a/drivers/gpu/drm/tegra/gr3d.c
++++ b/drivers/gpu/drm/tegra/gr3d.c
+@@ -130,6 +130,7 @@ static const struct of_device_id tegra_gr3d_match[] = {
+ { .compatible = "nvidia,tegra20-gr3d" },
+ { }
+ };
++MODULE_DEVICE_TABLE(of, tegra_gr3d_match);
+
+ static const u32 gr3d_addr_regs[] = {
+ GR3D_IDX_ATTRIBUTE( 0),
+diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
+index a0b8d8539d07..84ea0c8b47f7 100644
+--- a/drivers/gpu/drm/tegra/hdmi.c
++++ b/drivers/gpu/drm/tegra/hdmi.c
+@@ -1370,6 +1370,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = {
+ { .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config },
+ { },
+ };
++MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match);
+
+ static int tegra_hdmi_probe(struct platform_device *pdev)
+ {
+diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
+index 27c979b50111..061a5c501124 100644
+--- a/drivers/gpu/drm/tegra/sor.c
++++ b/drivers/gpu/drm/tegra/sor.c
+@@ -1455,6 +1455,7 @@ static const struct of_device_id tegra_sor_of_match[] = {
+ { .compatible = "nvidia,tegra124-sor", },
+ { },
+ };
++MODULE_DEVICE_TABLE(of, tegra_sor_of_match);
+
+ struct platform_driver tegra_sor_driver = {
+ .driver = {
+--
+1.8.1.5
diff --git a/config-arm-generic b/config-arm-generic
index 0c5242c69..a75d77263 100644
--- a/config-arm-generic
+++ b/config-arm-generic
@@ -142,6 +142,9 @@ CONFIG_I2C_MUX_PINCTRL=m
CONFIG_I2C_MUX_PCA9541=m
CONFIG_I2C_MUX_PCA954x=m
+# spi
+CONFIG_SPI_PL022=m
+
# Sensors
CONFIG_SENSORS_IIO_HWMON=m
CONFIG_IIO_SYSFS_TRIGGER=m
@@ -173,29 +176,18 @@ CONFIG_CMA_AREAS=7
# CONFIG_CRYPTO_TEST is not set
# CONFIG_TRANSPARENT_HUGEPAGE is not set
# CONFIG_XEN is not set
-# CONFIG_DRM_RCAR_DU is not set
-# CONFIG_I2C_RCAR is not set
-# CONFIG_DRM_SHMOBILE is not set
-# CONFIG_I2C_SH_MOBILE is not set
+
# CONFIG_MMC_DW_SOCFPGA is not set
# CONFIG_I2C_NOMADIK is not set
-# CONFIG_IRQ_DOMAIN_DEBUG is not set
# CONFIG_LEDS_RENESAS_TPU is not set
-# CONFIG_LOCK_STAT is not set
-
# CONFIG_DRM_ARMADA is not set
-# CONFIG_DRM_TEGRA is not set
-# CONFIG_SHMOBILE_IOMMU is not set
-
# CONFIG_COMMON_CLK_SI570 is not set
# CONFIG_COMMON_CLK_QCOM is not set
+# CONFIG_IRQ_DOMAIN_DEBUG is not set
# CONFIG_ARM_PTDUMP is not set
-# CONFIG_PATA_PLATFORM is not set
-# CONFIG_USB_ULPI is not set
-
-### turn off things which make no sense on embedded SoC
+### turn off things which make no sense on ARM
# core
@@ -208,6 +200,8 @@ CONFIG_CMA_AREAS=7
# CONFIG_ISDN is not set
# CONFIG_GAMEPORT is not set
# CONFIG_AGP is not set
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_USB_ULPI is not set
# netdrv
diff --git a/config-armv7 b/config-armv7
index 6dd7ced4e..967cdad5e 100644
--- a/config-armv7
+++ b/config-armv7
@@ -25,9 +25,9 @@ CONFIG_ARCH_ZYNQ=y
# mvebu
CONFIG_MACH_ARMADA_370_XP=y
CONFIG_MACH_ARMADA_370=y
+CONFIG_MACH_ARMADA_375=y
+CONFIG_MACH_ARMADA_38X=y
CONFIG_MACH_ARMADA_XP=y
-# CONFIG_MACH_ARMADA_375 is not set
-# CONFIG_MACH_ARMADA_38X is not set
CONFIG_MACH_DOVE=y
CONFIG_MVEBU_DEVBUS=y
@@ -67,6 +67,7 @@ CONFIG_SND_KIRKWOOD_SOC=m
CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=m
CONFIG_USB_EHCI_HCD_ORION=m
CONFIG_MMC_SDHCI_PXAV3=m
+CONFIG_MVPP2=m
# CONFIG_CACHE_FEROCEON_L2 is not set
# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
@@ -109,7 +110,6 @@ CONFIG_OMAP_PACKAGE_CUS=y
CONFIG_OMAP_MCBSP=y
CONFIG_OMAP2PLUS_MBOX=m
-CONFIG_OMAP_MBOX_FWK=m
CONFIG_OMAP_MBOX_KFIFO_SIZE=256
CONFIG_OMAP_DM_TIMER=y
CONFIG_OMAP_PM_NOOP=y
@@ -302,15 +302,6 @@ CONFIG_RADIO_WL128X=m
CONFIG_OMAP_REMOTEPROC=m
# CONFIG_TIDSPBRIDGE is not set
-# CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE=0x600000
-# CONFIG_TIDSPBRIDGE_DEBUG is not set
-# CONFIG_TIDSPBRIDGE_RECOVERY=y
-# CONFIG_TIDSPBRIDGE_CACHE_LINE_CHECK is not set
-# CONFIG_TIDSPBRIDGE_WDT3=y
-# CONFIG_TIDSPBRIDGE_WDT_TIMEOUT=5
-# CONFIG_TIDSPBRIDGE_NTFY_PWRERR is not set
-# CONFIG_TIDSPBRIDGE_BACKTRACE is not set
-
# CONFIG_OMAP2_DSS_DEBUGFS is not set
# CONFIG_OMAP_IOMMU_DEBUG is not set
# CONFIG_OMAP_MUX_DEBUG is not set
@@ -359,6 +350,17 @@ CONFIG_SERIAL_MSM=y
CONFIG_SERIAL_MSM_CONSOLE=y
CONFIG_PINCTRL_APQ8064=m
CONFIG_PINCTRL_IPQ8064=m
+CONFIG_PINCTRL_MSM8960=m
+CONFIG_PINCTRL_MSM8960=m
+CONFIG_COMMON_CLK_QCOM=m
+CONFIG_APQ_GCC_8084=m
+CONFIG_APQ_MMCC_8084=m
+CONFIG_IPQ_GCC_806X=m
+CONFIG_MSM_GCC_8660=m
+CONFIG_MSM_GCC_8960=m
+CONFIG_MSM_MMCC_8960=m
+CONFIG_MSM_GCC_8974=m
+CONFIG_MSM_MMCC_8974=m
CONFIG_HW_RANDOM_MSM=m
CONFIG_I2C_QUP=m
CONFIG_SPI_QUP=m
@@ -378,17 +380,21 @@ CONFIG_USB_EHCI_MSM=m
CONFIG_MXC_IRQ_PRIOR=y
# CONFIG_MXC_DEBUG_BOARD is not set
CONFIG_SOC_IMX50=y
+CONFIG_SOC_IMX51=y
CONFIG_SOC_IMX53=y
CONFIG_SOC_IMX6Q=y
CONFIG_SOC_IMX6SL=y
CONFIG_SOC_IMX6SX=y
# CONFIG_SOC_VF610 is not set
CONFIG_MACH_IMX51_DT=y
-# CONFIG_MACH_MX51_BABBAGE is not set
CONFIG_ARM_IMX6Q_CPUFREQ=m
+CONFIG_PCI_IMX6=y
CONFIG_IMX_THERMAL=m
+CONFIG_IMX_SDMA=m
+CONFIG_IMX_DMA=m
+CONFIG_MXS_DMA=y
+CONFIG_AHCI_IMX=m
CONFIG_PATA_IMX=m
-CONFIG_PCI_IMX6=y
CONFIG_USB_EHCI_MXC=m
CONFIG_USB_CHIPIDEA=m
CONFIG_USB_CHIPIDEA_UDC=y
@@ -406,10 +412,12 @@ CONFIG_PINCTRL_IMX6SL=y
CONFIG_I2C_IMX=m
CONFIG_STMPE_I2C=y
CONFIG_SPI_IMX=m
+CONFIG_SPI_FSL_QUADSPI=m
CONFIG_STMPE_SPI=y
CONFIG_MFD_MC13783=m
CONFIG_MFD_MC13XXX_SPI=m
CONFIG_MFD_STMPE=y
+CONFIG_MTD_NAND_GPMI_NAND=m
CONFIG_W1_MASTER_MXC=m
CONFIG_IMX_WEIM=y
CONFIG_IMX2_WDT=m
@@ -435,6 +443,7 @@ CONFIG_SND_SOC_IMX_MC13783=m
CONFIG_SND_SOC_IMX_SPDIF=m
CONFIG_SND_SOC_EUKREA_TLV320=m
CONFIG_SND_SOC_TVL320AIC32X4=m
+CONFIG_SND_SOC_WM8731=m
CONFIG_USB_IMX21_HCD=m
CONFIG_USB_MXS_PHY=m
@@ -445,10 +454,6 @@ CONFIG_RTC_DRV_IMXDI=m
CONFIG_RTC_DRV_MXC=m
# CONFIG_MX3_IPU is not set
# CONFIG_MX3_IPU_IRQS is not set
-CONFIG_IMX_SDMA=m
-CONFIG_IMX_DMA=m
-CONFIG_AHCI_IMX=m
-# CONFIG_MXS_DMA is not set
CONFIG_PWM_IMX=m
CONFIG_DRM_IMX=m
@@ -508,7 +513,7 @@ CONFIG_MACH_HREFV60=y
CONFIG_MACH_SNOWBALL=y
CONFIG_ABX500_CORE=y
-CONFIG_ARM_U8500_CPUIDLE=y
+# CONFIG_ARM_U8500_CPUIDLE is not set
CONFIG_UX500_DEBUG_UART=2
CONFIG_AB8500_CORE=y
CONFIG_STE_DMA40=y
@@ -631,6 +636,7 @@ CONFIG_DRM_PANEL=y
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_PANEL_LD9040=m
CONFIG_DRM_PANEL_S6E8AA0=m
+CONFIG_NOUVEAU_PLATFORM_DRIVER=m
# OLPC XO
CONFIG_SERIO_OLPC_APSP=m
diff --git a/config-armv7-generic b/config-armv7-generic
index be7822bd3..82faa0303 100644
--- a/config-armv7-generic
+++ b/config-armv7-generic
@@ -181,6 +181,8 @@ CONFIG_I2C_SUN6I_P2WI=m
CONFIG_GPIO_PCA953X=m
CONFIG_POWER_RESET_SUN6I=y
CONFIG_TOUCHSCREEN_SUN4I=m
+CONFIG_MFD_AXP20X=y
+CONFIG_REGULATOR_AXP20X=m
# Exynos
CONFIG_ARCH_EXYNOS3=y
@@ -203,6 +205,7 @@ CONFIG_ARM_EXYNOS5250_CPUFREQ=y
CONFIG_ARM_EXYNOS5440_CPUFREQ=y
CONFIG_ARM_EXYNOS_CPU_FREQ_BOOST_SW=y
CONFIG_ARM_EXYNOS_CPUIDLE=y
+# CONFIG_EXYNOS5420_MCPM not set
CONFIG_I2C_EXYNOS5=m
CONFIG_I2C_S3C2410=m
@@ -246,6 +249,7 @@ CONFIG_DRM_EXYNOS_IOMMU=y
CONFIG_DRM_EXYNOS_IPP=y
CONFIG_DRM_EXYNOS_ROTATOR=y
CONFIG_DRM_EXYNOS_VIDI=y
+CONFIG_PHY_EXYNOS_DP_VIDEO=m
# CONFIG_FB_S3C is not set
# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set
CONFIG_VIDEO_SAMSUNG_S5P_G2D=m
@@ -259,6 +263,7 @@ CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF=m
CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=m
CONFIG_SND_SOC_SMDK_WM8994_PCM=m
CONFIG_SND_SOC_SNOW=m
+CONFIG_SND_SOC_ODROIDX2=m
# CONFIG_GPIO_WM8994 is not set
# CONFIG_REGULATOR_WM8994 is not set
# CONFIG_EXYNOS_IOMMU_DEBUG is not set
@@ -297,15 +302,14 @@ CONFIG_GENERIC_CPUFREQ_CPU0=m
# usb
CONFIG_USB_OHCI_HCD_PLATFORM=m
CONFIG_USB_EHCI_HCD_PLATFORM=m
-CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_ULPI=y
CONFIG_AX88796=m
CONFIG_AX88796_93CX6=y
-CONFIG_USB_ISP1760_HCD=m
# usb gadget
+CONFIG_USB_OTG=y
CONFIG_USB_GADGET=m
CONFIG_USB_GADGET_MUSB_HDRC=m
CONFIG_USB_GADGET_VBUS_DRAW=100
@@ -314,19 +318,6 @@ CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_MUSB_DSPS=m
CONFIG_USB_GPIO_VBUS=m
-CONFIG_USB_G_ACM_MS=m
-CONFIG_USB_G_DBGP=m
-CONFIG_USB_G_DBGP_SERIAL=y
-CONFIG_USB_G_MULTI=m
-CONFIG_USB_G_MULTI_CDC=y
-# CONFIG_USB_G_MULTI_RNDIS is not set
-CONFIG_USB_G_NCM=m
-CONFIG_USB_G_SERIAL=m
-CONFIG_USB_ETH_EEM=y
-# CONFIG_USB_ETH_RNDIS is not set
-CONFIG_USB_CDC_COMPOSITE=m
-CONFIG_USB_GADGET_TARGET=m
-CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_CONFIGFS=m
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_ECM=y
@@ -423,7 +414,6 @@ CONFIG_SPI_BUTTERFLY=m
CONFIG_SPI_DESIGNWARE=m
CONFIG_SPI_LM70_LLP=m
CONFIG_SPI_OC_TINY=m
-CONFIG_SPI_PL022=m
CONFIG_SPI_SC18IS602=m
CONFIG_SPI_TLE62X0=m
CONFIG_SPI_XCOMM=m
@@ -437,7 +427,6 @@ CONFIG_NFC_NCI_SPI=y
CONFIG_I2C_DESIGNWARE_CORE=m
CONFIG_I2C_DESIGNWARE_PLATFORM=m
CONFIG_I2C_MV64XXX=m
-# CONFIG_I2C_CROS_EC_TUNNEL is not set
# HW crypto and rng
CONFIG_CRYPTO_SHA1_ARM=m
@@ -730,6 +719,7 @@ CONFIG_MFD_CROS_EC=m
CONFIG_MFD_CROS_EC_I2C=m
CONFIG_MFD_CROS_EC_SPI=m
CONFIG_KEYBOARD_CROS_EC=m
+CONFIG_I2C_CROS_EC_TUNNEL=m
# Should be in generic
CONFIG_BPF_JIT=y
diff --git a/config-generic b/config-generic
index 9c028deab..edefb8909 100644
--- a/config-generic
+++ b/config-generic
@@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y
CONFIG_B43_BCMA=y
# CONFIG_B43_BCMA_EXTRA is not set
CONFIG_B43_BCMA_PIO=y
-CONFIG_B43_DEBUG=y
+# CONFIG_B43_DEBUG is not set
CONFIG_B43_PHY_LP=y
CONFIG_B43_PHY_N=y
CONFIG_B43_PHY_HT=y
# CONFIG_B43_FORCE_PIO is not set
CONFIG_B43LEGACY=m
-CONFIG_B43LEGACY_DEBUG=y
+# CONFIG_B43LEGACY_DEBUG is not set
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
@@ -3908,7 +3908,6 @@ CONFIG_USB_CXACRU=m
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_CYTHERM is not set
CONFIG_USB_EMI26=m
-CONFIG_USB_ETH=m
CONFIG_USB_FTDI_ELAN=m
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
@@ -3946,7 +3945,6 @@ CONFIG_USB_TRANCEVIBRATOR=m
CONFIG_USB_U132_HCD=m
CONFIG_USB_UEAGLEATM=m
CONFIG_USB_XUSBATM=m
-CONFIG_USB_ZERO=m
# CONFIG_USB_DWC2 is not set
@@ -4644,7 +4642,7 @@ CONFIG_PM_DEBUG=y
# CONFIG_DPM_WATCHDOG is not set # revisit this in debug
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
-CONFIG_PM_TEST_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_RUNTIME=y
# CONFIG_PM_OPP is not set
# CONFIG_PM_AUTOSLEEP is not set
diff --git a/config-nodebug b/config-nodebug
index 360f418d4..e16a37b57 100644
--- a/config-nodebug
+++ b/config-nodebug
@@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
CONFIG_SND_PCM_XRUN_DEBUG=y
-CONFIG_DEBUG_ATOMIC_SLEEP=y
-
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
-CONFIG_DEBUG_RT_MUTEXES=y
-CONFIG_DEBUG_LOCK_ALLOC=y
-CONFIG_LOCK_TORTURE_TEST=m
-CONFIG_PROVE_LOCKING=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_PROVE_RCU=y
+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
+
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_LOCK_TORTURE_TEST is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_PROVE_RCU is not set
# CONFIG_PROVE_RCU_REPEATEDLY is not set
-CONFIG_DEBUG_PER_CPU_MAPS=y
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
CONFIG_CPUMASK_OFFSTACK=y
-CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
+# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
-CONFIG_FAULT_INJECTION=y
-CONFIG_FAILSLAB=y
-CONFIG_FAIL_PAGE_ALLOC=y
-CONFIG_FAIL_MAKE_REQUEST=y
-CONFIG_FAULT_INJECTION_DEBUG_FS=y
-CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
-CONFIG_FAIL_IO_TIMEOUT=y
-CONFIG_FAIL_MMC_REQUEST=y
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_FAILSLAB is not set
+# CONFIG_FAIL_PAGE_ALLOC is not set
+# CONFIG_FAIL_MAKE_REQUEST is not set
+# CONFIG_FAULT_INJECTION_DEBUG_FS is not set
+# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set
+# CONFIG_FAIL_IO_TIMEOUT is not set
+# CONFIG_FAIL_MMC_REQUEST is not set
-CONFIG_LOCK_STAT=y
+# CONFIG_LOCK_STAT is not set
-CONFIG_DEBUG_STACK_USAGE=y
+# CONFIG_DEBUG_STACK_USAGE is not set
-CONFIG_ACPI_DEBUG=y
+# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
-CONFIG_DEBUG_SG=y
-CONFIG_DEBUG_PI_LIST=y
+# CONFIG_DEBUG_SG is not set
+# CONFIG_DEBUG_PI_LIST is not set
# CONFIG_DEBUG_PAGEALLOC is not set
-CONFIG_DEBUG_WRITECOUNT=y
-CONFIG_DEBUG_OBJECTS=y
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
-CONFIG_DEBUG_OBJECTS_FREE=y
-CONFIG_DEBUG_OBJECTS_TIMERS=y
-CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
+# CONFIG_DEBUG_OBJECTS_FREE is not set
+# CONFIG_DEBUG_OBJECTS_TIMERS is not set
+# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
-CONFIG_X86_PTDUMP=y
-CONFIG_EFI_PGT_DUMP=y
+# CONFIG_X86_PTDUMP is not set
+# CONFIG_EFI_PGT_DUMP is not set
-CONFIG_CAN_DEBUG_DEVICES=y
+# CONFIG_CAN_DEBUG_DEVICES is not set
-CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
-CONFIG_DEBUG_NOTIFIERS=y
+# CONFIG_DEBUG_NOTIFIERS is not set
-CONFIG_DMA_API_DEBUG=y
+# CONFIG_DMA_API_DEBUG is not set
-CONFIG_MMIOTRACE=y
+# CONFIG_MMIOTRACE is not set
-CONFIG_DEBUG_CREDENTIALS=y
+# CONFIG_DEBUG_CREDENTIALS is not set
# off in both production debug and nodebug builds,
# on in rawhide nodebug builds
-CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
+# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
-CONFIG_EXT4_DEBUG=y
+# CONFIG_EXT4_DEBUG is not set
# CONFIG_XFS_WARN is not set
-CONFIG_DEBUG_PERF_USE_VMALLOC=y
+# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-CONFIG_JBD2_DEBUG=y
+# CONFIG_JBD2_DEBUG is not set
-CONFIG_NFSD_FAULT_INJECTION=y
+# CONFIG_NFSD_FAULT_INJECTION is not set
-CONFIG_DEBUG_BLK_CGROUP=y
+# CONFIG_DEBUG_BLK_CGROUP is not set
-CONFIG_DRBD_FAULT_INJECTION=y
+# CONFIG_DRBD_FAULT_INJECTION is not set
-CONFIG_ATH_DEBUG=y
-CONFIG_CARL9170_DEBUGFS=y
-CONFIG_IWLWIFI_DEVICE_TRACING=y
+# CONFIG_ATH_DEBUG is not set
+# CONFIG_CARL9170_DEBUGFS is not set
+# CONFIG_IWLWIFI_DEVICE_TRACING is not set
# CONFIG_RTLWIFI_DEBUG is not set
-CONFIG_DEBUG_OBJECTS_WORK=y
+# CONFIG_DEBUG_OBJECTS_WORK is not set
-CONFIG_DMADEVICES_DEBUG=y
-CONFIG_DMADEVICES_VDEBUG=y
+# CONFIG_DMADEVICES_DEBUG is not set
+# CONFIG_DMADEVICES_VDEBUG is not set
CONFIG_PM_ADVANCED_DEBUG=y
-CONFIG_CEPH_LIB_PRETTYDEBUG=y
-CONFIG_QUOTA_DEBUG=y
+# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
+# CONFIG_QUOTA_DEBUG is not set
CONFIG_PCI_DEFAULT_USE_CRS=y
@@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
-CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
+# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set
# CONFIG_PERCPU_TEST is not set
-CONFIG_TEST_LIST_SORT=y
+# CONFIG_TEST_LIST_SORT is not set
# CONFIG_TEST_STRING_HELPERS is not set
-CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_DETECT_HUNG_TASK is not set
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
-CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
+# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set
-CONFIG_DEBUG_KMEMLEAK=y
+# CONFIG_DEBUG_KMEMLEAK is not set
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
# CONFIG_DEBUG_KMEMLEAK_TEST is not set
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
@@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
# CONFIG_SPI_DEBUG is not set
-CONFIG_X86_DEBUG_STATIC_CPU_HAS=y
+# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_LATENCYTOP is not set
diff --git a/config-x86-generic b/config-x86-generic
index 375963229..d0e1dbd54 100644
--- a/config-x86-generic
+++ b/config-x86-generic
@@ -396,7 +396,7 @@ CONFIG_SP5100_TCO=m
# CONFIG_MEMTEST is not set
# CONFIG_DEBUG_TLBFLUSH is not set
-CONFIG_MAXSMP=y
+# CONFIG_MAXSMP is not set
CONFIG_HP_ILO=m
diff --git a/drm-radeon-Disable-writeback-by-default-on-ppc.patch b/drm-radeon-Disable-writeback-by-default-on-ppc.patch
deleted file mode 100644
index 3aa1b147a..000000000
--- a/drm-radeon-Disable-writeback-by-default-on-ppc.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Bugzilla: N/A
-Upstream-status: Replaced by http://lists.freedesktop.org/archives/dri-devel/2013-December/050290.html in 3.14
-
-From b67e0a6a7409f9c1a12e573fb7d8d80ee455b103 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Mon, 17 Jun 2013 09:59:34 -0400
-Subject: [PATCH] drm/radeon: Disable writeback by default on ppc
-
-At least on an IBM Power 720, this check passes, but several piglit
-tests will reliably trigger GPU resets due to the ring buffer pointers
-not being updated. There's probably a better way to limit this to just
-affected machines though.
-
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
- drivers/gpu/drm/radeon/r600_cp.c | 7 +++++++
- drivers/gpu/drm/radeon/radeon_cp.c | 7 +++++++
- drivers/gpu/drm/radeon/radeon_device.c | 4 ++--
- drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
- 4 files changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
-index 1c51c08..ef28532 100644
---- a/drivers/gpu/drm/radeon/r600_cp.c
-+++ b/drivers/gpu/drm/radeon/r600_cp.c
-@@ -552,6 +552,13 @@ static void r600_test_writeback(drm_radeon_private_t *dev_priv)
- dev_priv->writeback_works = 0;
- DRM_INFO("writeback test failed\n");
- }
-+#if defined(__ppc__) || defined(__ppc64__)
-+ /* the test might succeed on ppc, but it's usually not reliable */
-+ if (radeon_no_wb == -1) {
-+ radeon_no_wb = 1;
-+ DRM_INFO("not trusting writeback test due to arch quirk\n");
-+ }
-+#endif
- if (radeon_no_wb == 1) {
- dev_priv->writeback_works = 0;
- DRM_INFO("writeback forced off\n");
-diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c
-index efc4f64..a967b33 100644
---- a/drivers/gpu/drm/radeon/radeon_cp.c
-+++ b/drivers/gpu/drm/radeon/radeon_cp.c
-@@ -892,6 +892,13 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv)
- dev_priv->writeback_works = 0;
- DRM_INFO("writeback test failed\n");
- }
-+#if defined(__ppc__) || defined(__ppc64__)
-+ /* the test might succeed on ppc, but it's usually not reliable */
-+ if (radeon_no_wb == -1) {
-+ radeon_no_wb = 1;
-+ DRM_INFO("not trusting writeback test due to arch quirk\n");
-+ }
-+#endif
- if (radeon_no_wb == 1) {
- dev_priv->writeback_works = 0;
- DRM_INFO("writeback forced off\n");
-diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
-index 1899738..524046e 100644
---- a/drivers/gpu/drm/radeon/radeon_device.c
-+++ b/drivers/gpu/drm/radeon/radeon_device.c
-@@ -322,8 +322,8 @@ int radeon_wb_init(struct radeon_device *rdev)
- /* disable event_write fences */
- rdev->wb.use_event = false;
- /* disabled via module param */
-- if (radeon_no_wb == 1) {
-- rdev->wb.enabled = false;
-+ if (radeon_no_wb != -1) {
-+ rdev->wb.enabled = !!radeon_no_wb;
- } else {
- if (rdev->flags & RADEON_IS_AGP) {
- /* often unreliable on AGP */
-diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
-index 094e7e5..04809d4 100644
---- a/drivers/gpu/drm/radeon/radeon_drv.c
-+++ b/drivers/gpu/drm/radeon/radeon_drv.c
-@@ -146,7 +146,7 @@ static inline void radeon_register_atpx_handler(void) {}
- static inline void radeon_unregister_atpx_handler(void) {}
- #endif
-
--int radeon_no_wb;
-+int radeon_no_wb = -1;
- int radeon_modeset = -1;
- int radeon_dynclks = -1;
- int radeon_r4xx_atom = 0;
---
-1.8.2.1
-
diff --git a/fs-umount-on-symlink-leaks-mnt-count.patch b/fs-umount-on-symlink-leaks-mnt-count.patch
deleted file mode 100644
index ed0e8a397..000000000
--- a/fs-umount-on-symlink-leaks-mnt-count.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Bugzilla: 1122482
-Upstream-status: Sent for 3.16
-From: Vasily Averin <vvs@openvz.org>
-Subject: [PATCH v4] fs: umount on symlink leaks mnt count
-Currently umount on symlink blocks following umount:
-
-/vz is separate mount
-
-# ls /vz/ -al | grep test
-drwxr-xr-x. 2 root root 4096 Jul 19 01:14 testdir
-lrwxrwxrwx. 1 root root 11 Jul 19 01:16 testlink -> /vz/testdir
-# umount -l /vz/testlink
-umount: /vz/testlink: not mounted (expected)
-# lsof /vz
-# umount /vz
-umount: /vz: device is busy. (unexpected)
-
-In this case mountpoint_last() gets an extra refcount on path->mnt
-
-Signed-off-by: Vasily Averin <vvs@openvz.org>
----
- fs/namei.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-diff --git a/fs/namei.c b/fs/namei.c
-index 985c6f3..9eb787e 100644
---- a/fs/namei.c
-+++ b/fs/namei.c
-@@ -2256,9 +2256,10 @@ done:
- goto out;
- }
- path->dentry = dentry;
-- path->mnt = mntget(nd->path.mnt);
-+ path->mnt = nd->path.mnt;
- if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
- return 1;
-+ mntget(path->mnt);
- follow_mount(path);
- error = 0;
- out:
---
-1.7.5.4
diff --git a/kernel-arm64.patch b/kernel-arm64.patch
index 42959490a..25f0479c8 100644
--- a/kernel-arm64.patch
+++ b/kernel-arm64.patch
@@ -1,3 +1,964 @@
+commit db044807ca763c21bae298388239be6177c6ccec
+Merge: 649c9e3 26bcd8b
+Author: Kyle McMartin <kmcmarti@redhat.com>
+Date: Wed Jul 30 14:31:24 2014 -0400
+
+ Merge branch 'master' into devel
+
+ Conflicts:
+ virt/kvm/arm/vgic.c
+
+commit 649c9e3a45e81852daf80c126a332297b75cb109
+Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Date: Tue Jul 29 12:49:10 2014 +0200
+
+ arm64/efi: efistub: don't abort if base of DRAM is occupied
+
+ If we cannot relocate the kernel Image to its preferred offset of base of DRAM
+ plus TEXT_OFFSET, instead relocate it to the lowest available 2 MB boundary plus
+ TEXT_OFFSET. We may lose a bit of memory at the low end, but we can still
+ proceed normally otherwise.
+
+ Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+
+commit 5102fd06b12467a0518537061805483a759bc856
+Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+Date: Tue Jul 29 12:49:09 2014 +0200
+
+ arm64/efi: efistub: cover entire static mem footprint in PE/COFF .text
+
+ The static memory footprint of a kernel Image at boot is larger than the
+ Image file itself. Things like .bss data and initial page tables are allocated
+ statically but populated dynamically so their content is not contained in the
+ Image file.
+
+ However, if EFI (or GRUB) has loaded the Image at precisely the desired offset
+ of base of DRAM + TEXT_OFFSET, the Image will be booted in place, and we have
+ to make sure that the allocation done by the PE/COFF loader is large enough.
+
+ Fix this by growing the PE/COFF .text section to cover the entire static
+ memory footprint. The part of the section that is not covered by the payload
+ will be zero initialised by the PE/COFF loader.
+
+ Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
+
+commit 3b4dfb00a401b7fecf01d3c89b154907167dff52
+Author: Mark Rutland <mark.rutland@arm.com>
+Date: Tue Jul 29 12:49:08 2014 +0200
+
+ arm64: spin-table: handle unmapped cpu-release-addrs
+
+ In certain cases the cpu-release-addr of a CPU may not fall in the
+ linear mapping (e.g. when the kernel is loaded above this address due to
+ the presence of other images in memory). This is problematic for the
+ spin-table code as it assumes that it can trivially convert a
+ cpu-release-addr to a valid VA in the linear map.
+
+ This patch modifies the spin-table code to use a temporary cached
+ mapping to write to a given cpu-release-addr, enabling us to support
+ addresses regardless of whether they are covered by the linear mapping.
+
+ Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+
+commit a49ad891b2e91338587dc5576c9da73b249a9d13
+Author: Mark Salter <msalter@redhat.com>
+Date: Mon Jul 14 15:52:06 2014 -0400
+
+ pci/xgene: use pci_remap_iospace() instead of pci_ioremap_io()
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 1a958ec71db226d35ed51756b7164142bb0a60a3
+Author: Tanmay Inamdar <tinamdar@apm.com>
+Date: Wed Mar 19 16:12:42 2014 -0700
+
+ MAINTAINERS: entry for APM X-Gene PCIe host driver
+
+ Add entry for AppliedMicro X-Gene PCIe host driver.
+
+ Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 03dc92f35b8f8be898ca12e3dc7c15961f414907
+Author: Tanmay Inamdar <tinamdar@apm.com>
+Date: Wed Mar 19 16:12:41 2014 -0700
+
+ dt-bindings: pci: xgene pcie device tree bindings
+
+ This patch adds the bindings for X-Gene PCIe driver. The driver resides
+ under 'drivers/pci/host/pci-xgene.c' file.
+
+ Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 1f8d894f2066d9db2b251d512f6f6f772ae7147f
+Author: Tanmay Inamdar <tinamdar@apm.com>
+Date: Wed Mar 19 16:12:40 2014 -0700
+
+ arm64: dts: APM X-Gene PCIe device tree nodes
+
+ This patch adds the device tree nodes for APM X-Gene PCIe controller and
+ PCIe clock interface. Since X-Gene SOC supports maximum 5 ports, 5 dts
+ nodes are added.
+
+ Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit c0855fcf0cc9adcb1ba5e6b1318536c56244796d
+Author: Tanmay Inamdar <tinamdar@apm.com>
+Date: Wed Mar 19 16:12:39 2014 -0700
+
+ pci: APM X-Gene PCIe controller driver
+
+ This patch adds the AppliedMicro X-Gene SOC PCIe controller driver.
+ X-Gene PCIe controller supports maximum up to 8 lanes and GEN3 speed.
+ X-Gene SOC supports maximum 5 PCIe ports.
+
+ Signed-off-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 1cc0c322237d3b58b08fe39e79e6c2e2f90a8c98
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:44:00 2014 +0100
+
+ arm64: Add architectural support for PCI
+
+ Use the generic host bridge functions to provide support for
+ PCI Express on arm64.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+
+commit aba1eca911a87959eb4be515110f7a6b8692e9a4
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:34 2014 +0100
+
+ pci: Remap I/O bus resources into CPU space with pci_remap_iospace()
+
+ Introduce a default implementation for remapping PCI bus I/O resources
+ onto the CPU address space. Architectures with special needs may
+ provide their own version, but most should be able to use this one.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+
+commit e1eacc3da10ca19eff1f88fb342a13586092b613
+Author: Liviu Dudau <liviu@dudau.co.uk>
+Date: Tue Jul 1 21:50:50 2014 +0100
+
+ pci: Add support for creating a generic host_bridge from device tree
+
+ Several platforms use a rather generic version of parsing
+ the device tree to find the host bridge ranges. Move the common code
+ into the generic PCI code and use it to create a pci_host_bridge
+ structure that can be used by arch code.
+
+ Based on early attempts by Andrew Murray to unify the code.
+ Used powerpc and microblaze PCI code as starting point.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit aee55d507eb451223b51b52e6617b06b8e518ea6
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:32 2014 +0100
+
+ pci: of: Parse and map the IRQ when adding the PCI device.
+
+ Enhance the default implementation of pcibios_add_device() to
+ parse and map the IRQ of the device if a DT binding is available.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+
+commit 0cf0470962f0498b598ff44e0c671407df54b22e
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:31 2014 +0100
+
+ pci: Introduce a domain number for pci_host_bridge.
+
+ Make it easier to discover the domain number of a bus by storing
+ the number in pci_host_bridge for the root bus. Several architectures
+ have their own way of storing this information, so it makes sense
+ to try to unify the code. While at this, add a new function that
+ creates a root bus in a given domain and make pci_create_root_bus()
+ a wrapper around this function.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 1bc8fcf01469c202b4aea5f1d0a3a75c9302f3e2
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:30 2014 +0100
+
+ pci: Create pci_host_bridge before its associated bus in pci_create_root_bus.
+
+ Before commit 7b5436635800 the pci_host_bridge was created before the root bus.
+ As that commit has added a needless dependency on the bus for pci_alloc_host_bridge()
+ the creation order has been changed for no good reason. Revert the order of
+ creation as we are going to depend on the pci_host_bridge structure to retrieve the
+ domain number of the root bus.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Acked-by: Grant Likely <grant.likely@linaro.org>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 55353327169dc08c1047d994e00b8a38630f5a8d
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:29 2014 +0100
+
+ pci: OF: Fix the conversion of IO ranges into IO resources.
+
+ The ranges property for a host bridge controller in DT describes
+ the mapping between the PCI bus address and the CPU physical address.
+ The resources framework however expects that the IO resources start
+ at a pseudo "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT.
+ The conversion from pci ranges to resources failed to take that into account.
+
+ In the process move the function into drivers/of/address.c as it now
+ depends on pci_address_to_pio() code and make it return an error message.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 34079a20796d5c74e2984c37a99baef4871709a6
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:28 2014 +0100
+
+ pci: Introduce pci_register_io_range() helper function.
+
+ Some architectures do not have a simple view of the PCI I/O space
+ and instead use a range of CPU addresses that map to bus addresses. For
+ some architectures these ranges will be expressed by OF bindings
+ in a device tree file.
+
+ Introduce a pci_register_io_range() helper function with a generic
+ implementation that can be used by such architectures to keep track
+ of the I/O ranges described by the PCI bindings. If the PCI_IOBASE
+ macro is not defined that signals lack of support for PCI and we
+ return an error.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+
+commit a81abc095ab4b9b90e446ddbd59247e23df9d4ad
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:27 2014 +0100
+
+ pci: Export find_pci_host_bridge() function.
+
+ This is a useful function and we should make it visible outside the
+ generic PCI code. Export it as a GPL symbol.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 78361698444e81bedbf30ec2b7aae1afd110d11f
+Author: Liviu Dudau <Liviu.Dudau@arm.com>
+Date: Tue Jul 1 19:43:26 2014 +0100
+
+ Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases.
+
+ The inline version of ioport_map() that gets used when !CONFIG_GENERIC_IOMAP
+ is wrong. It returns a mapped (i.e. virtual) address that can start from
+ zero and completely ignores the PCI_IOBASE and IO_SPACE_LIMIT that most
+ architectures that use !CONFIG_GENERIC_MAP define.
+
+ Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
+ Acked-by: Arnd Bergmann <arnd@arndb.de>
+ Tested-by: Tanmay Inamdar <tinamdar@apm.com>
+
+commit 5540bbe2eca72e37be2e6a1c18e2fc7e73f0eab6
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:50 2014 +0100
+
+ arm64: KVM: vgic: enable GICv2 emulation on top on GICv3 hardware
+
+ Add the last missing bits that enable GICv2 emulation on top of
+ GICv3 hardware.
+
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit f057aaf81a7df641bcaa992965a257e3260ad36e
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:49 2014 +0100
+
+ arm64: KVM: vgic: add GICv3 world switch
+
+ Introduce the GICv3 world switch code used to save/restore the
+ GICv3 context.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 7f1b8a791bb375933fdc8420cd08f127d07dd259
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:48 2014 +0100
+
+ KVM: ARM: vgic: add the GICv3 backend
+
+ Introduce the support code for emulating a GICv2 on top of GICv3
+ hardware.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 74428905c3b450eab53a21bee74236501629a443
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:47 2014 +0100
+
+ arm64: KVM: move HCR_EL2.{IMO, FMO} manipulation into the vgic switch code
+
+ GICv3 requires the IMO and FMO bits to be tightly coupled with some
+ of the interrupt controller's register switch.
+
+ In order to have similar code paths, move the manipulation of these
+ bits to the GICv2 switch code.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit b691c1f97f1fb5b29c3ae4cc836fdbefe61a11ff
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:46 2014 +0100
+
+ arm64: KVM: split GICv2 world switch from hyp code
+
+ Move the GICv2 world switch code into its own file, and add the
+ necessary indirection to the arm64 switch code.
+
+ Also introduce a new type field to the vgic_params structure.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit d3f4563f1bebed7f60f714bdab640e477a081c4b
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:45 2014 +0100
+
+ arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S
+
+ We already have __hyp_text_{start,end} to express the boundaries
+ of the HYP text section, and __kvm_hyp_code_{start,end} are getting
+ in the way of a more modular world switch code.
+
+ Just turn __kvm_hyp_code_{start,end} into #defines mapping the
+ linker-emited symbols.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 8ede261e09ad25ab8229d5efb476d5b4f6dc6434
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:44 2014 +0100
+
+ KVM: ARM: vgic: revisit implementation of irqchip_in_kernel
+
+ So far, irqchip_in_kernel() was implemented by testing the value of
+ vctrl_base, which worked fine with GICv2.
+
+ With GICv3, this field is useless, as we're using system registers
+ instead of a emmory mapped interface. To solve this, add a boolean
+ flag indicating if the we're using a vgic or not.
+
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit ff7faf70feb47e5f1cf1e0f0d02e0f2807da11f5
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:43 2014 +0100
+
+ KVM: ARM: vgic: split GICv2 backend from the main vgic code
+
+ Brutally hack the innocent vgic code, and move the GICv2 specific code
+ to its own file, using vgic_ops and vgic_params as a way to pass
+ information between the two blocks.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 63480283c0e1dc92f506e5e5306be0ac9b239499
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:42 2014 +0100
+
+ KVM: ARM: introduce vgic_params structure
+
+ Move all the data specific to a given GIC implementation into its own
+ little structure.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit dcb20f9b66d5615a3e7e492424fa7953c1fe9f01
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:41 2014 +0100
+
+ KVM: ARM: vgic: introduce vgic_enable
+
+ Move the code dealing with enabling the VGIC on to vgic_ops.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 67e3bcf8dd823eec79c74bc993fa62fb08b1acea
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:40 2014 +0100
+
+ KVM: ARM: vgic: abstract VMCR access
+
+ Instead of directly messing with with the GICH_VMCR bits for the CPU
+ interface save/restore code, add accessors that encode/decode the
+ entire set of registers exposed by VMCR.
+
+ Not the most efficient thing, but given that this code is only used
+ by the save/restore code, performance is far from being critical.
+
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 67caf34f138a4f2516a2afcd5657add2eaaf0ab4
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:39 2014 +0100
+
+ KVM: ARM: vgic: move underflow handling to vgic_ops
+
+ Move the code dealing with LR underflow handling to its own functions,
+ and make them accessible through vgic_ops.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 30acb0a340d388135ae89bed7e248bad203ec876
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:38 2014 +0100
+
+ KVM: ARM: vgic: abstract MISR decoding
+
+ Instead of directly dealing with the GICH_MISR bits, move the code to
+ its own function and use a couple of public flags to represent the
+ actual state.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 464cbe47011e07b654d161ab4d4bdd05b4d025b3
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:37 2014 +0100
+
+ KVM: ARM: vgic: abstract EISR bitmap access
+
+ Move the GICH_EISR access to its own function.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 33930dc5f401e9fc2268c2f128853eb5275e7ab1
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:36 2014 +0100
+
+ KVM: ARM: vgic: abstract access to the ELRSR bitmap
+
+ Move the GICH_ELRSR access to its own functions, and add them to
+ the vgic_ops structure.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 0dca962ccd5b96fb7174880c1bc25085dcc09927
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:35 2014 +0100
+
+ KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives
+
+ In order to split the various register manipulation from the main vgic
+ code, introduce a vgic_ops structure, and start by abstracting the
+ LR manipulation code with a couple of accessors.
+
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit e66aa6cbdaa25764c58ba8d21da8d1b7d75e7570
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:34 2014 +0100
+
+ KVM: arm/arm64: vgic: move GICv2 registers to their own structure
+
+ In order to make way for the GICv3 registers, move the v2-specific
+ registers to their own structure.
+
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit b04259737c6bb38592c02c93e939fd53909dad04
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:33 2014 +0100
+
+ arm64: boot protocol documentation update for GICv3
+
+ Linux has some requirements that must be satisfied in order to boot
+ on a system built with a GICv3.
+
+ Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit a864693311bd4305214d966b7ca0e0015216c2c4
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:32 2014 +0100
+
+ arm64: GICv3 device tree binding documentation
+
+ Add the necessary documentation to support GICv3.
+
+ Cc: Thomas Gleixner <tglx@linutronix.de>
+ Cc: Mark Rutland <mark.rutland@arm.com>
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Acked-by: Rob Herring <robh@kernel.org>
+ Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit af3035d3ddddb6e19bac9295f0c785bb2c8e718c
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:31 2014 +0100
+
+ irqchip: arm64: Initial support for GICv3
+
+ The Generic Interrupt Controller (version 3) offers services that are
+ similar to GICv2, with a number of additional features:
+ - Affinity routing based on the CPU MPIDR (ARE)
+ - System register for the CPU interfaces (SRE)
+ - Support for more that 8 CPUs
+ - Locality-specific Peripheral Interrupts (LPIs)
+ - Interrupt Translation Services (ITS)
+
+ This patch adds preliminary support for GICv3 with ARE and SRE,
+ non-secure mode only. It relies on higher exception levels to grant ARE
+ and SRE access.
+
+ Support for LPI and ITS will be added at a later time.
+
+ Cc: Thomas Gleixner <tglx@linutronix.de>
+ Cc: Jason Cooper <jason@lakedaemon.net>
+ Reviewed-by: Zi Shen Lim <zlim@broadcom.com>
+ Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Reviewed-by: Tirumalesh Chalamarla <tchalamarla@cavium.com>
+ Reviewed-by: Yun Wu <wuyun.wu@huawei.com>
+ Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com>
+ Tested-by: Tirumalesh Chalamarla<tchalamarla@cavium.com>
+ Tested-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
+ Acked-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
+ Acked-by: Catalin Marinas <catalin.marinas@arm.com>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit c50b02761c3ad5d37ce8fffe7c0bf6b46d23109e
+Author: Marc Zyngier <marc.zyngier@arm.com>
+Date: Mon Jun 30 16:01:30 2014 +0100
+
+ irqchip: ARM: GIC: Move some bits of GICv2 to a library-type file
+
+ A few GICv2 low-level function are actually very useful to GICv3,
+ and it makes some sense to share them across the two drivers.
+ They end-up in their own file, with an additional parameter used
+ to ensure an optional synchronization (unused on GICv2).
+
+ Cc: Thomas Gleixner <tglx@linutronix.de>
+ Cc: Jason Cooper <jason@lakedaemon.net>
+ Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
+ Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
+
+commit 6a6033cdcbf6022c2848e2181ed6d8b7545af02e
+Author: Mark Salter <msalter@redhat.com>
+Date: Tue Jun 24 23:16:45 2014 -0400
+
+ perf: fix arm64 build error
+
+ I'm seeing the following build error on arm64:
+
+ In file included from util/event.c:3:0:
+ util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function)
+ u64 cache_regs[PERF_REGS_MAX];
+ ^
+
+ This patch adds a PEFF_REGS_MAX definition for arm64.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 1de8987fa549d421576c1b61282c4041c8c78a5f
+Author: Mark Salter <msalter@redhat.com>
+Date: Tue Jun 24 09:50:28 2014 -0400
+
+ arm64: use EFI as last resort for reboot and poweroff
+
+ Wire in support for EFI reboot and poweroff functions. We use these
+ only if no other mechanism has been registered with arm_pm_reboot
+ and/or pm_power_off respectively.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 1c973051e86625be7ffb3db90d4a70b9ca4199c6
+Author: Matt Fleming <matt.fleming@intel.com>
+Date: Fri Jun 13 12:39:55 2014 +0100
+
+ x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag
+
+ It appears that the BayTrail-T class of hardware requires EFI in order
+ to powerdown and reboot and no other reliable method exists.
+
+ This quirk is generally applicable to all hardware that has the ACPI
+ Hardware Reduced bit set, since usually ACPI would be the preferred
+ method.
+
+ Cc: Len Brown <len.brown@intel.com>
+ Cc: Mark Salter <msalter@redhat.com>
+ Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+
+commit 621b2a0f1df86bd2f147799303b94575f3acee95
+Author: Matt Fleming <matt.fleming@intel.com>
+Date: Fri Jun 13 12:35:21 2014 +0100
+
+ efi/reboot: Allow powering off machines using EFI
+
+ Not only can EfiResetSystem() be used to reboot, it can also be used to
+ power down machines.
+
+ By and large, this functionality doesn't work very well across the range
+ of EFI machines in the wild, so it should definitely only be used as a
+ last resort. In an ideal world, this wouldn't be needed at all.
+
+ Unfortunately, we're starting to see machines where EFI is the *only*
+ reliable way to power down, and nothing else, not PCI, not ACPI, works.
+
+ efi_poweroff_required() should be implemented on a per-architecture
+ basis, since exactly when we should be using EFI runtime services is a
+ platform-specific decision. There's no analogue for reboot because each
+ architecture handles reboot very differently - the x86 code in
+ particular is pretty complex.
+
+ Patches to enable this for specific classes of hardware will be
+ submitted separately.
+
+ Cc: Mark Salter <msalter@redhat.com>
+ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+
+commit 6b2e219b20933cad5d5ba34f7af4efc5317c0fb9
+Author: Matt Fleming <matt.fleming@intel.com>
+Date: Fri Jun 13 12:22:22 2014 +0100
+
+ efi/reboot: Add generic wrapper around EfiResetSystem()
+
+ Implement efi_reboot(), which is really just a wrapper around the
+ EfiResetSystem() EFI runtime service, but it does at least allow us to
+ funnel all callers through a single location.
+
+ It also simplifies the callsites since users no longer need to check to
+ see whether EFI_RUNTIME_SERVICES are enabled.
+
+ Cc: Tony Luck <tony.luck@intel.com>
+ Cc: Mark Salter <msalter@redhat.com>
+ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+
+commit d0d41b99122d97f81ad05868dff38ccf0a3ffd33
+Author: Saurabh Tangri <saurabh.tangri@intel.com>
+Date: Mon Jun 2 05:18:35 2014 -0700
+
+ x86/efi: Move all workarounds to a separate file quirks.c
+
+ Currently, it's difficult to find all the workarounds that are
+ applied when running on EFI, because they're littered throughout
+ various code paths. This change moves all of them into a separate
+ file with the hope that it will be come the single location for all
+ our well documented quirks.
+
+ Signed-off-by: Saurabh Tangri <saurabh.tangri@intel.com>
+ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+
+commit b5e3a1e8825abb0406ead0e85436df4df20ddcdb
+Author: Don Dutile <ddutile@redhat.com>
+Date: Tue Mar 25 20:22:26 2014 -0400
+
+ pmu: Adding support for Xgene PMUs
+
+ Message-id: <1395778948-47814-2-git-send-email-ddutile@redhat.com>
+ Patchwork-id: 78602
+ O-Subject: [PATCH 1/3] pmu: Adding support for Xgene PMUs
+ Bugzilla: 1079110
+
+ Backport of these two posted (but not upstream) patches.
+ Combined into single patch due to gic-patch dependency.
+
+ Signed-off-by: Donald Dutile <ddutile@redhat.com>
+
+commit 9f4c27693bb120a3134e3e7e8d452fb02d023e2b
+Author: Mark Salter <msalter@redhat.com>
+Date: Sun Jun 15 09:06:55 2014 -0400
+
+ arm64: fix up APM Mustang devicetree
+
+ These are changes needed when loading device tree blob built with
+ kernel. i.e. with grub. These are not needed when using devicetree
+ from Tianocore which will be fixed up at tianocore runtime.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 1f3a5b228be88be3f734d7a43db3b3f81e160443
+Author: Iyappan Subramanian <isubramanian@apm.com>
+Date: Mon Jul 14 15:18:05 2014 -0700
+
+ drivers: net: Add APM X-Gene SoC ethernet driver support.
+
+ This patch adds network driver for APM X-Gene SoC ethernet.
+
+ Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
+ Signed-off-by: Ravi Patel <rapatel@apm.com>
+ Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
+
+commit 54b3fe04c4a953eeb6907ffe9f57aae282f59457
+Author: Iyappan Subramanian <isubramanian@apm.com>
+Date: Mon Jul 14 15:18:04 2014 -0700
+
+ dts: Add bindings for APM X-Gene SoC ethernet driver
+
+ This patch adds bindings for APM X-Gene SoC ethernet driver.
+
+ Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
+ Signed-off-by: Ravi Patel <rapatel@apm.com>
+ Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
+
+commit 85125c4e1c1b1ef53d6cb77966efa89062540f43
+Author: Iyappan Subramanian <isubramanian@apm.com>
+Date: Mon Jul 14 15:18:03 2014 -0700
+
+ Documentation: dts: Add bindings for APM X-Gene SoC ethernet driver
+
+ This patch adds documentation for APM X-Gene SoC ethernet DTS binding.
+
+ Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
+ Signed-off-by: Ravi Patel <rapatel@apm.com>
+ Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
+
+commit fe8ec437eedc45384c23e1e12a09baa82d24fa16
+Author: Iyappan Subramanian <isubramanian@apm.com>
+Date: Mon Jul 14 15:18:02 2014 -0700
+
+ MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver
+
+ This patch adds a MAINTAINERS entry for APM X-Gene SoC
+ ethernet driver.
+
+ Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
+ Signed-off-by: Ravi Patel <rapatel@apm.com>
+ Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
+
+commit 237639e43c3d6587985a736f33264e129123d7a5
+Author: Mark Salter <msalter@redhat.com>
+Date: Fri Jul 25 15:14:32 2014 -0400
+
+ arm/kvm: WIP fix for stage2 pgd memory leak
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 0794e2900e5e4be4b7aa0b389e6b0bf8b55c5cd7
+Author: Mark Salter <msalter@redhat.com>
+Date: Thu Jul 17 13:34:50 2014 -0400
+
+ ahci_xgene: add errata workaround for ATA_CMD_SMART
+
+ commit 2a0bdff6b958d1b2:
+
+ ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command.
+
+ added a workaround for X-Gene AHCI controller errata. This was done
+ for all ATA_CMD_ID_ATA commands. The errata also appears to affect
+ ATA_CMD_SMART commands as well. This was discovered when running
+ smartd or just smartctl -x. This patch adds a dma engine restart for
+ ATA_CMD_SMART commands which clears up the issues seen with smartd.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+
+commit 7adf85b63608b8bea1148f2faa84f475252a9e43
+Author: Mark Salter <msalter@redhat.com>
+Date: Fri Jul 25 15:32:05 2014 -0400
+
+ rtc: ia64: allow other architectures to use EFI RTC
+
+ Currently, the rtc-efi driver is restricted to ia64 only. Newer
+ architectures with EFI support may want to also use that driver. This
+ patch moves the platform device setup from ia64 into drivers/rtc and allow
+ any architecture with CONFIG_EFI=y to use the rtc-efi driver.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+ Cc: Alessandro Zummo <a.zummo@towertech.it>
+ Cc: Tony Luck <tony.luck@intel.com>
+ Cc: Fenghua Yu <fenghua.yu@intel.com>
+ Cc: Andrew Morton <akpm@linux-foundation.org>
+
+commit 3b2f96c7a6bfbd46e7dee1d7000081422a7983ce
+Author: Kyle McMartin <kmcmarti@redhat.com>
+Date: Tue May 13 22:25:26 2014 -0400
+
+ arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects
+
+ Message-id: <20140513222526.GC26038@redacted.bos.redhat.com>
+ Patchwork-id: 79789
+ O-Subject: [ACADIA PATCH] arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects
+ Bugzilla: 1085528
+
+ BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1085528
+ Upstream: submitted soon
+
+ [Sadly this isn't (yet) sufficient... but it fixes at least one issue
+ here... cat /proc/$$/personality shows READ_IMPLIES_EXEC before. I'll
+ try to figure the rest out tomorrow.]
+
+ Currently, we're accidentally ending up with executable stacks on
+ AArch64 when the ABI says we shouldn't be, and relying on glibc to fix
+ things up for us when we're loaded. However, SELinux will deny us
+ mucking with the stack, and hit us with execmem AVCs.
+
+ The reason this is happening is somewhat complex:
+
+ fs/binfmt_elf.c:load_elf_binary()
+ - initializes executable_stack = EXSTACK_DEFAULT implying the
+ architecture should make up its mind.
+ - does a pile of loading goo
+ - runs through the program headers, looking for PT_GNU_STACK
+ and setting (or unsetting) executable_stack if it finds it.
+
+ This is our first problem, we won't generate these unless an
+ executable stack is explicitly requested.
+
+ - more ELF loading goo
+ - sets whether we're a compat task or not (TIF_32BIT) based on compat.h
+ - for compat reasons (pre-GNU_STACK) checks if the READ_IMPLIES_EXEC
+ flag should be set for ancient toolchains
+
+ Here's our second problem, we test if read_implies_exec based on
+ stk != EXSTACK_DISABLE_X, which is true since stk == EXSTACK_DEFAULT.
+
+ So we set current->personality |= READ_IMPLIES_EXEC like a broken
+ legacy toolchain would want.
+
+ - Now we call setup_arg_pages to set up the stack...
+
+ fs/exec.c:setup_arg_pages()
+ - lots of magic happens here
+ - vm_flags gets initialized to VM_STACK_FLAGS
+
+ Here's our third problem, VM_STACK_FLAGS on arm64 is
+ VM_DEFAULT_DATA_FLAG which tests READ_IMPLIES_EXEC and sets VM_EXEC
+ if it's true. So we end up with an executable stack mapping, since we
+ don't have executable_stack set (it's still EXSTACK_DEFAULT at this
+ point) to unset it anywhere.
+
+ Bang. execstack AVC when the program starts running.
+
+ The easiest way I can see to fix this is to test if we're a legacy task
+ and fix it up there. But that's not as simple as it sounds, because
+ the 32-bit ABI depends on what revision of the CPU we've enabled (not
+ that it matters since we're ARMv8...) Regardless, in the compat case,
+ set READ_IMPLIES_EXEC if we've found a GNU_STACK header which explicitly
+ requested it as in arch/arm/kernel/elf.c:arm_elf_read_implies_exec().
+
+ Signed-off-by: Kyle McMartin <kmcmarti@redhat.com>
+ Signed-off-by: Donald Dutile <ddutile@redhat.com>
+
+commit 4b866971e92b925a44da8d876cb57864942a90b8
+Author: Mark Salter <msalter@redhat.com>
+Date: Thu Jul 24 15:56:15 2014 +0100
+
+ arm64: fix soft lockup due to large tlb flush range
+
+ Under certain loads, this soft lockup has been observed:
+
+ BUG: soft lockup - CPU#2 stuck for 22s! [ip6tables:1016]
+ Modules linked in: ip6t_rpfilter ip6t_REJECT cfg80211 rfkill xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vfat fat efivarfs xfs libcrc32c
+
+ CPU: 2 PID: 1016 Comm: ip6tables Not tainted 3.13.0-0.rc7.30.sa2.aarch64 #1
+ task: fffffe03e81d1400 ti: fffffe03f01f8000 task.ti: fffffe03f01f8000
+ PC is at __cpu_flush_kern_tlb_range+0xc/0x40
+ LR is at __purge_vmap_area_lazy+0x28c/0x3ac
+ pc : [<fffffe000009c5cc>] lr : [<fffffe0000182710>] pstate: 80000145
+ sp : fffffe03f01fbb70
+ x29: fffffe03f01fbb70 x28: fffffe03f01f8000
+ x27: fffffe0000b19000 x26: 00000000000000d0
+ x25: 000000000000001c x24: fffffe03f01fbc50
+ x23: fffffe03f01fbc58 x22: fffffe03f01fbc10
+ x21: fffffe0000b2a3f8 x20: 0000000000000802
+ x19: fffffe0000b2a3c8 x18: 000003fffdf52710
+ x17: 000003ff9d8bb910 x16: fffffe000050fbfc
+ x15: 0000000000005735 x14: 000003ff9d7e1a5c
+ x13: 0000000000000000 x12: 000003ff9d7e1a5c
+ x11: 0000000000000007 x10: fffffe0000c09af0
+ x9 : fffffe0000ad1000 x8 : 000000000000005c
+ x7 : fffffe03e8624000 x6 : 0000000000000000
+ x5 : 0000000000000000 x4 : 0000000000000000
+ x3 : fffffe0000c09cc8 x2 : 0000000000000000
+ x1 : 000fffffdfffca80 x0 : 000fffffcd742150
+
+ The __cpu_flush_kern_tlb_range() function looks like:
+
+ ENTRY(__cpu_flush_kern_tlb_range)
+ dsb sy
+ lsr x0, x0, #12
+ lsr x1, x1, #12
+ 1: tlbi vaae1is, x0
+ add x0, x0, #1
+ cmp x0, x1
+ b.lo 1b
+ dsb sy
+ isb
+ ret
+ ENDPROC(__cpu_flush_kern_tlb_range)
+
+ The above soft lockup shows the PC at tlbi insn with:
+
+ x0 = 0x000fffffcd742150
+ x1 = 0x000fffffdfffca80
+
+ So __cpu_flush_kern_tlb_range has 0x128ba930 tlbi flushes left
+ after it has already been looping for 23 seconds!.
+
+ Looking up one frame at __purge_vmap_area_lazy(), there is:
+
+ ...
+ list_for_each_entry_rcu(va, &vmap_area_list, list) {
+ if (va->flags & VM_LAZY_FREE) {
+ if (va->va_start < *start)
+ *start = va->va_start;
+ if (va->va_end > *end)
+ *end = va->va_end;
+ nr += (va->va_end - va->va_start) >> PAGE_SHIFT;
+ list_add_tail(&va->purge_list, &valist);
+ va->flags |= VM_LAZY_FREEING;
+ va->flags &= ~VM_LAZY_FREE;
+ }
+ }
+ ...
+ if (nr || force_flush)
+ flush_tlb_kernel_range(*start, *end);
+
+ So if two areas are being freed, the range passed to
+ flush_tlb_kernel_range() may be as large as the vmalloc
+ space. For arm64, this is ~240GB for 4k pagesize and ~2TB
+ for 64kpage size.
+
+ This patch works around this problem by adding a loop limit.
+ If the range is larger than the limit, use flush_tlb_all()
+ rather than flushing based on individual pages. The limit
+ chosen is arbitrary as the TLB size is implementation
+ specific and not accessible in an architected way. The aim
+ of the arbitrary limit is to avoid soft lockup.
+
+ Signed-off-by: Mark Salter <msalter@redhat.com>
+ [catalin.marinas@arm.com: commit log update]
+ [catalin.marinas@arm.com: marginal optimisation]
+ [catalin.marinas@arm.com: changed to MAX_TLB_RANGE and added comment]
+ Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 37fc4f6..da1d4bf 100644
--- a/Documentation/arm64/booting.txt
@@ -239,7 +1200,7 @@ index 0000000..e19fdb8
+ status = "ok";
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
-index 61a8f48..78946ce 100644
+index 86efa7e..14a3ef1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -699,6 +699,14 @@ S: Maintained
@@ -876,6 +1837,29 @@ index 92242ce..4ae9213 100644
+}
+
#endif /* __ARM64_KVM_HOST_H__ */
+diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h
+index 7d29847..d7f77ff 100644
+--- a/arch/arm64/include/asm/kvm_mmu.h
++++ b/arch/arm64/include/asm/kvm_mmu.h
+@@ -122,8 +122,16 @@ static inline void kvm_set_s2pmd_writable(pmd_t *pmd)
+ }
+
+ #define kvm_pgd_addr_end(addr, end) pgd_addr_end(addr, end)
+-#define kvm_pud_addr_end(addr, end) pud_addr_end(addr, end)
+-#define kvm_pmd_addr_end(addr, end) pmd_addr_end(addr, end)
++
++#define kvm_pud_addr_end(addr, end) \
++({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; \
++ (__boundary - 1 < (end) - 1)? __boundary: (end); \
++})
++
++#define kvm_pmd_addr_end(addr, end) \
++({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \
++ (__boundary - 1 < (end) - 1)? __boundary: (end); \
++})
+
+ struct kvm;
+
diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h
new file mode 100644
index 0000000..3f7856e
@@ -932,7 +1916,7 @@ index 0000000..3f7856e
+#endif /* __KERNEL__ */
+#endif /* __ASM_PCI_H */
diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h
-index b9349c4..e0f37ef 100644
+index b9349c4..ecbd081 100644
--- a/arch/arm64/include/asm/tlbflush.h
+++ b/arch/arm64/include/asm/tlbflush.h
@@ -98,8 +98,8 @@ static inline void flush_tlb_page(struct vm_area_struct *vma,
@@ -946,25 +1930,28 @@ index b9349c4..e0f37ef 100644
{
unsigned long asid = (unsigned long)ASID(vma->vm_mm) << 48;
unsigned long addr;
-@@ -112,7 +112,9 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
+@@ -112,7 +112,7 @@ static inline void flush_tlb_range(struct vm_area_struct *vma,
dsb(ish);
}
-static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
-+#define MAX_TLB_LOOP 128
-+
+static inline void __flush_tlb_kernel_range(unsigned long start, unsigned long end)
{
unsigned long addr;
start >>= 12;
-@@ -124,6 +126,23 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end
- dsb(ish);
+@@ -125,6 +125,29 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end
}
+ /*
++ * This is meant to avoid soft lock-ups on large TLB flushing ranges and not
++ * necessarily a performance improvement.
++ */
++#define MAX_TLB_RANGE (1024UL << PAGE_SHIFT)
++
+static inline void flush_tlb_range(struct vm_area_struct *vma,
+ unsigned long start, unsigned long end)
+{
-+ if (((end - start) >> PAGE_SHIFT) < MAX_TLB_LOOP)
++ if ((end - start) <= MAX_TLB_RANGE)
+ __flush_tlb_range(vma, start, end);
+ else
+ flush_tlb_mm(vma->vm_mm);
@@ -972,15 +1959,16 @@ index b9349c4..e0f37ef 100644
+
+static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end)
+{
-+ if (((end - start) >> PAGE_SHIFT) < MAX_TLB_LOOP)
++ if ((end - start) <= MAX_TLB_RANGE)
+ __flush_tlb_kernel_range(start, end);
+ else
+ flush_tlb_all();
+}
+
- /*
++/*
* On AArch64, the cache coherency is handled via the set_pte_at() function.
*/
+ static inline void update_mmu_cache(struct vm_area_struct *vma,
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h
index 215ad46..7a5df52 100644
--- a/arch/arm64/include/asm/virt.h
@@ -1044,6 +2032,37 @@ index 646f888..e74654c 100644
DEFINE(VGIC_CPU_NR_LR, offsetof(struct vgic_cpu, nr_lr));
DEFINE(KVM_VTTBR, offsetof(struct kvm, arch.vttbr));
DEFINE(KVM_VGIC_VCTRL, offsetof(struct kvm, arch.vgic.vctrl_base));
+diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c
+index e786e6c..320ef48 100644
+--- a/arch/arm64/kernel/efi-stub.c
++++ b/arch/arm64/kernel/efi-stub.c
+@@ -58,20 +58,16 @@ static efi_status_t handle_kernel_image(efi_system_table_t *sys_table,
+ kernel_size = _edata - _text;
+ if (*image_addr != (dram_base + TEXT_OFFSET)) {
+ kernel_memsize = kernel_size + (_end - _edata);
+- status = efi_relocate_kernel(sys_table, image_addr,
+- kernel_size, kernel_memsize,
+- dram_base + TEXT_OFFSET,
+- PAGE_SIZE);
++ status = efi_low_alloc(sys_table, kernel_memsize + TEXT_OFFSET,
++ SZ_2M, reserve_addr);
+ if (status != EFI_SUCCESS) {
+ pr_efi_err(sys_table, "Failed to relocate kernel\n");
+ return status;
+ }
+- if (*image_addr != (dram_base + TEXT_OFFSET)) {
+- pr_efi_err(sys_table, "Failed to alloc kernel memory\n");
+- efi_free(sys_table, kernel_memsize, *image_addr);
+- return EFI_ERROR;
+- }
+- *image_size = kernel_memsize;
++ memcpy((void *)*reserve_addr + TEXT_OFFSET, (void *)*image_addr,
++ kernel_size);
++ *image_addr = *reserve_addr + TEXT_OFFSET;
++ *reserve_size = kernel_memsize + TEXT_OFFSET;
+ }
+
+
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 14db1f6..453b7f8 100644
--- a/arch/arm64/kernel/efi.c
@@ -1064,7 +2083,7 @@ index 14db1f6..453b7f8 100644
+ return pm_power_off == NULL;
+}
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
-index a2c1195..d1f7b96 100644
+index a2c1195..8df59be 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -22,6 +22,7 @@
@@ -1075,6 +2094,33 @@ index a2c1195..d1f7b96 100644
#include <asm/assembler.h>
#include <asm/ptrace.h>
+@@ -156,7 +157,7 @@ optional_header:
+ .short 0x20b // PE32+ format
+ .byte 0x02 // MajorLinkerVersion
+ .byte 0x14 // MinorLinkerVersion
+- .long _edata - stext // SizeOfCode
++ .long _end - stext // SizeOfCode
+ .long 0 // SizeOfInitializedData
+ .long 0 // SizeOfUninitializedData
+ .long efi_stub_entry - efi_head // AddressOfEntryPoint
+@@ -174,7 +175,7 @@ extra_header_fields:
+ .short 0 // MinorSubsystemVersion
+ .long 0 // Win32VersionValue
+
+- .long _edata - efi_head // SizeOfImage
++ .long _end - efi_head // SizeOfImage
+
+ // Everything before the kernel image is considered part of the header
+ .long stext - efi_head // SizeOfHeaders
+@@ -221,7 +222,7 @@ section_table:
+ .byte 0
+ .byte 0
+ .byte 0 // end of 0 padding of section name
+- .long _edata - stext // VirtualSize
++ .long _end - stext // VirtualSize
+ .long stext - efi_head // VirtualAddress
+ .long _edata - stext // SizeOfRawData
+ .long stext - efi_head // PointerToRawData
@@ -295,6 +296,23 @@ CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1
msr cnthctl_el2, x0
msr cntvoff_el2, xzr // Clear virtual offset
@@ -1179,6 +2225,62 @@ index 43b7c34..ec5cbbe 100644
* Whoops - the architecture was unable to reboot.
*/
printk("Reboot failed -- System halted\n");
+diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c
+index 0347d38..70181c1 100644
+--- a/arch/arm64/kernel/smp_spin_table.c
++++ b/arch/arm64/kernel/smp_spin_table.c
+@@ -20,6 +20,7 @@
+ #include <linux/init.h>
+ #include <linux/of.h>
+ #include <linux/smp.h>
++#include <linux/types.h>
+
+ #include <asm/cacheflush.h>
+ #include <asm/cpu_ops.h>
+@@ -65,12 +66,21 @@ static int smp_spin_table_cpu_init(struct device_node *dn, unsigned int cpu)
+
+ static int smp_spin_table_cpu_prepare(unsigned int cpu)
+ {
+- void **release_addr;
++ __le64 __iomem *release_addr;
+
+ if (!cpu_release_addr[cpu])
+ return -ENODEV;
+
+- release_addr = __va(cpu_release_addr[cpu]);
++ /*
++ * The cpu-release-addr may or may not be inside the linear mapping.
++ * As ioremap_cache will either give us a new mapping or reuse the
++ * existing linear mapping, we can use it to cover both cases. In
++ * either case the memory will be MT_NORMAL.
++ */
++ release_addr = ioremap_cache(cpu_release_addr[cpu],
++ sizeof(*release_addr));
++ if (!release_addr)
++ return -ENOMEM;
+
+ /*
+ * We write the release address as LE regardless of the native
+@@ -79,15 +89,16 @@ static int smp_spin_table_cpu_prepare(unsigned int cpu)
+ * boot-loader's endianess before jumping. This is mandated by
+ * the boot protocol.
+ */
+- release_addr[0] = (void *) cpu_to_le64(__pa(secondary_holding_pen));
+-
+- __flush_dcache_area(release_addr, sizeof(release_addr[0]));
++ writeq_relaxed(__pa(secondary_holding_pen), release_addr);
++ __flush_dcache_area(release_addr, sizeof(*release_addr));
+
+ /*
+ * Send an event to wake up the secondary CPU.
+ */
+ sev();
+
++ iounmap(release_addr);
++
+ return 0;
+ }
+
diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile
index 72a9fd5..32a0961 100644
--- a/arch/arm64/kvm/Makefile
@@ -7377,10 +8479,10 @@ index 70347d0..f1dfc36 100644
rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o
diff --git a/drivers/rtc/rtc-efi-platform.c b/drivers/rtc/rtc-efi-platform.c
new file mode 100644
-index 0000000..1a7f890
+index 0000000..b40fbe3
--- /dev/null
+++ b/drivers/rtc/rtc-efi-platform.c
-@@ -0,0 +1,30 @@
+@@ -0,0 +1,31 @@
+/*
+ * Moved from arch/ia64/kernel/time.c
+ *
@@ -7404,8 +8506,9 @@ index 0000000..1a7f890
+
+static int __init rtc_init(void)
+{
-+ if (platform_device_register(&rtc_efi_dev) < 0)
-+ pr_err("unable to register rtc device...\n");
++ if (efi_enabled(EFI_RUNTIME_SERVICES))
++ if (platform_device_register(&rtc_efi_dev) < 0)
++ pr_err("unable to register rtc device...\n");
+
+ /* not necessarily an error */
+ return 0;
@@ -7965,10 +9068,10 @@ index e9441b9..1d3f39c 100644
diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c
new file mode 100644
-index 0000000..5fd2b75
+index 0000000..ff597d8
--- /dev/null
+++ b/virt/kvm/arm/vgic-v2.c
-@@ -0,0 +1,243 @@
+@@ -0,0 +1,259 @@
+/*
+ * Copyright (C) 2012,2013 ARM Limited, All Rights Reserved.
+ * Author: Marc Zyngier <marc.zyngier@arm.com>
@@ -8196,10 +9299,26 @@ index 0000000..5fd2b75
+ ret = -ENXIO;
+ goto out_unmap;
+ }
++
++ if (!PAGE_ALIGNED(vcpu_res.start)) {
++ kvm_err("GICV physical address 0x%llx not page aligned\n",
++ (unsigned long long)vcpu_res.start);
++ ret = -ENXIO;
++ goto out_unmap;
++ }
++
++ if (!PAGE_ALIGNED(resource_size(&vcpu_res))) {
++ kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n",
++ (unsigned long long)resource_size(&vcpu_res),
++ PAGE_SIZE);
++ ret = -ENXIO;
++ goto out_unmap;
++ }
++
+ vgic->vcpu_base = vcpu_res.start;
+
+ kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
-+ vctrl_res.start, vgic->maint_irq);
++ vgic->vctrl_base, vgic->maint_irq);
+
+ vgic->type = VGIC_V2;
+ *ops = &vgic_v2_ops;
@@ -8450,7 +9569,7 @@ index 0000000..f01d446
+ return ret;
+}
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
-index 56ff9be..795ab48 100644
+index 476d3bf..795ab48 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -76,14 +76,6 @@
@@ -8912,7 +10031,7 @@ index 56ff9be..795ab48 100644
}
ret = __register_cpu_notifier(&vgic_cpu_nb);
-@@ -1502,49 +1567,15 @@ int kvm_vgic_hyp_init(void)
+@@ -1502,65 +1567,15 @@ int kvm_vgic_hyp_init(void)
goto out_free_irq;
}
@@ -8940,20 +10059,37 @@ index 56ff9be..795ab48 100644
- goto out_unmap;
- }
-
-- kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
-- vctrl_res.start, vgic_maint_irq);
- on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
-
- if (of_address_to_resource(vgic_node, 3, &vcpu_res)) {
- kvm_err("Cannot obtain VCPU resource\n");
- ret = -ENXIO;
- goto out_unmap;
- }
+-
+- if (!PAGE_ALIGNED(vcpu_res.start)) {
+- kvm_err("GICV physical address 0x%llx not page aligned\n",
+- (unsigned long long)vcpu_res.start);
+- ret = -ENXIO;
+- goto out_unmap;
+- }
+-
+- if (!PAGE_ALIGNED(resource_size(&vcpu_res))) {
+- kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n",
+- (unsigned long long)resource_size(&vcpu_res),
+- PAGE_SIZE);
+- ret = -ENXIO;
+- goto out_unmap;
+- }
+-
- vgic_vcpu_base = vcpu_res.start;
-+ /* Callback into for arch code for setup */
-+ vgic_arch_setup(vgic);
+-
+- kvm_info("%s@%llx IRQ%d\n", vgic_node->name,
+- vctrl_res.start, vgic_maint_irq);
+ on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
- goto out;
++ /* Callback into for arch code for setup */
++ vgic_arch_setup(vgic);
++
+ return 0;
-out_unmap:
@@ -8966,7 +10102,7 @@ index 56ff9be..795ab48 100644
return ret;
}
-@@ -1577,7 +1608,7 @@ int kvm_vgic_init(struct kvm *kvm)
+@@ -1593,7 +1608,7 @@ int kvm_vgic_init(struct kvm *kvm)
}
ret = kvm_phys_addr_ioremap(kvm, kvm->arch.vgic.vgic_cpu_base,
@@ -8975,7 +10111,7 @@ index 56ff9be..795ab48 100644
if (ret) {
kvm_err("Unable to remap VGIC CPU to VCPU\n");
goto out;
-@@ -1623,7 +1654,8 @@ int kvm_vgic_create(struct kvm *kvm)
+@@ -1639,7 +1654,8 @@ int kvm_vgic_create(struct kvm *kvm)
}
spin_lock_init(&kvm->arch.vgic.lock);
@@ -8985,7 +10121,7 @@ index 56ff9be..795ab48 100644
kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
-@@ -1722,39 +1754,40 @@ int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write)
+@@ -1738,39 +1754,40 @@ int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write)
static bool handle_cpu_mmio_misc(struct kvm_vcpu *vcpu,
struct kvm_exit_mmio *mmio, phys_addr_t offset)
{
diff --git a/kernel.spec b/kernel.spec
index caf4ecb08..0c5a3a7aa 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -6,7 +6,7 @@ Summary: The Linux kernel
# For a stable, released kernel, released_kernel should be 1. For rawhide
# and/or a kernel built from an rc or git snapshot, released_kernel should
# be 0.
-%global released_kernel 0
+%global released_kernel 1
%global aarch64patches 1
@@ -43,19 +43,19 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
-%global baserelease 1
+%global baserelease 301
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
# on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base,
# which yields a base_sublevel of 0.
-%define base_sublevel 15
+%define base_sublevel 16
## If this is a released kernel ##
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 0
+%define stable_update 1
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@@ -68,9 +68,9 @@ Summary: The Linux kernel
# The next upstream release sublevel (base_sublevel+1)
%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
# The rc snapshot level
-%define rcrev 6
+%define rcrev 0
# The git snapshot level
-%define gitrev 2
+%define gitrev 0
# Set rpm version accordingly
%define rpmversion 3.%{upstream_sublevel}.0
%endif
@@ -131,7 +131,7 @@ Summary: The Linux kernel
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
# and 0 for rawhide (all kernels are debug kernels).
# See also 'make debug' and 'make release'.
-%define debugbuildsenabled 0
+%define debugbuildsenabled 1
# Want to build a vanilla kernel build without any non-upstream patches?
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
@@ -552,18 +552,15 @@ Patch09: upstream-reverts.patch
Patch450: input-kill-stupid-messages.patch
Patch452: no-pcspkr-modalias.patch
-Patch460: serial-460800.patch
-
Patch470: die-floppy-die.patch
+Patch500: Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
+
Patch510: silence-noise.patch
Patch530: silence-fbcon-logo.patch
Patch600: 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
-#rhbz 917708
-Patch700: Revert-userns-Allow-unprivileged-users-to-create-use.patch
-
Patch800: crash-driver.patch
# crypto/
@@ -603,6 +600,9 @@ Patch15000: nowatchdog-on-virt.patch
Patch21020: arm-tegra-usb-no-reset-linux33.patch
Patch21021: arm-beagle.patch
Patch21022: arm-imx6-utilite.patch
+# http://www.spinics.net/lists/linux-tegra/msg17948.html
+Patch21023: arm-tegra-drmdetection.patch
+Patch21024: arm-qemu-fixdisplay.patch
#rhbz 754518
Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
@@ -615,8 +615,6 @@ Patch21247: ath9k_rx_dma_stop_check.patch
Patch22000: weird-root-dentry-name-debug.patch
-Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch
-
#rhbz 1025603
Patch25063: disable-libdw-unwind-on-non-x86.patch
@@ -640,11 +638,17 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch
#rhbz 1117942
Patch25118: sched-fix-sched_setparam-policy-1-logic.patch
-#CVE-2014-5045 rhbz 1122472 1122482
-Patch25119: fs-umount-on-symlink-leaks-mnt-count.patch
+#CVE-2014-{5206,5207} rhbz 1129662 1129669
+Patch25119: namespaces-remount-fixes.patch
+
+#rhbz 1121288
+Patch25120: 0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch
-#rhbz 1115120
-Patch25120: selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch
+#rhbz 1128472
+Patch25121: 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
+
+#rhbz 1131551
+Patch25122: nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
# git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
Patch30000: kernel-arm64.patch
@@ -1268,6 +1272,8 @@ ApplyPatch 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
ApplyPatch arm-beagle.patch
ApplyPatch arm-imx6-utilite.patch
+ApplyPatch arm-tegra-drmdetection.patch
+ApplyPatch arm-qemu-fixdisplay.patch
#
# bugfixes to drivers and filesystems
@@ -1299,6 +1305,8 @@ ApplyPatch arm-imx6-utilite.patch
# ACPI
+ApplyPatch Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
+
# ALSA
# Networking
@@ -1312,9 +1320,6 @@ ApplyPatch die-floppy-die.patch
ApplyPatch no-pcspkr-modalias.patch
-# Allow to use 480600 baud on 16C950 UARTs
-ApplyPatch serial-460800.patch
-
# Silence some useless messages that still get printed with 'quiet'
ApplyPatch silence-noise.patch
@@ -1323,9 +1328,6 @@ ApplyPatch silence-fbcon-logo.patch
# Changes to upstream defaults.
-#rhbz 917708
-ApplyPatch Revert-userns-Allow-unprivileged-users-to-create-use.patch
-
# /dev/crash driver.
ApplyPatch crash-driver.patch
@@ -1370,8 +1372,6 @@ ApplyPatch criu-no-expert.patch
#rhbz 892811
ApplyPatch ath9k_rx_dma_stop_check.patch
-ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch
-
#rhbz 1025603
ApplyPatch disable-libdw-unwind-on-non-x86.patch
@@ -1395,11 +1395,17 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch
#rhbz 1117942
ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch
-#CVE-2014-5045 rhbz 1122472 1122482
-ApplyPatch fs-umount-on-symlink-leaks-mnt-count.patch
+#CVE-2014-{5206,5207} rhbz 1129662 1129669
+ApplyPatch namespaces-remount-fixes.patch
+
+#rhbz 1121288
+ApplyPatch 0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch
+
+#rhbz 1128472
+ApplyPatch 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch
-#rhbz 1115120
-ApplyPatch selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch
+#rhbz 1131551
+ApplyPatch nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
%if 0%{?aarch64patches}
ApplyPatch kernel-arm64.patch
@@ -2289,15 +2295,81 @@ fi
#
#
# ___________________________________________________________
-# / This branch is for Fedora 22. You probably want to commit \
-# _____ ____ ____ \ to the f21 branch instead, or in addition to this one. /
-# | ___|___ \|___ \ -----------------------------------------------------------
-# | |_ __) | __) | \ ^__^
-# | _| / __/ / __/ \ (@@)\_______
-# |_| |_____|_____| (__)\ )\/\
+# / This branch is for Fedora 21. You probably want to commit \
+# _____ ____ _ \ to the F-20 branch instead, or in addition to this one. /
+# | ___|___ \/ | -----------------------------------------------------------
+# | |_ __) | | \ ^__^
+# | _| / __/| | \ (@@)\_______
+# |_| |_____|_| (__)\ )\/\
# ||----w |
# || ||
%changelog
+* Fri Aug 22 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.1-301
+- Drop userns revert patch (rhbz 917708)
+
+* Tue Aug 19 2014 Josh Boyer <jwboyer@fedoraproject.org>
+- Fix NFSv3 oops (rhbz 1131551)
+
+* Fri Aug 15 2014 Peter Robinson <pbrobinson@fedoraproject.org>
+- ARM updates for 3.16
+- Cleanup some old removed options
+- Disable legacy USB OTG (using new configfs equivilents)
+- Upstream patch to fix display on qemu (VExpress A9)
+
+* Thu Aug 14 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.1-300
+- Linux v3.16.1
+
+* Thu Aug 14 2014 Hans de Goede <hdegoede@redhat.com>
+- Blacklist usb bulk streams on Etron EJ168 xhci controllers (rhbz#1121288)
+- UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472)
+
+* Wed Aug 13 2014 Josh Boyer <jwboyer@fedoraproject.org>
+- CVE-2014-{5206,5207} ro bind mount bypass with namespaces (rhbz 1129662 1129669)
+
+* Mon Aug 04 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-1
+- Linux v3.16
+- Disable debugging options.
+
+* Sun Aug 3 2014 Peter Robinson <pbrobinson@redhat.com>
+- Minor config updates for Armada and Sunxi ARM devices
+
+* Fri Aug 01 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc7.git4.1
+- Linux v3.16-rc7-84-g6f0928036bcb
+
+* Thu Jul 31 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc7.git3.1
+- Linux v3.16-rc7-76-g3a1122d26c62
+
+* Wed Jul 30 2014 Kyle McMartin <kyle@fedoraproject.org>
+- kernel-arm64.patch: fix up merge conflict and re-enable
+
+* Wed Jul 30 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc7.git2.1
+- Linux v3.16-rc7-64-g26bcd8b72563
+- Temporarily disable aarch64patches
+
+* Wed Jul 30 2014 Josh Boyer <jwboyer@fedoraproject.org>
+- Apply different patch from Milan Broz to fix LUKS partitions (rhbz 1115120)
+
+* Tue Jul 29 2014 Kyle McMartin <kyle@fedoraproject.org>
+- kernel-arm64.patch: update from upstream git.
+
+* Tue Jul 29 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc7.git1.1
+- Linux v3.16-rc7-7-g31dab719fa50
+- Reenable debugging options.
+
+* Mon Jul 28 2014 Josh Boyer <jwboyer@fedoraproject.org>
+- Make sure acpi brightness_switch is disabled (like forever in Fedora)
+- CVE-2014-5077 sctp: fix NULL ptr dereference (rhbz 1122982 1123696)
+
+* Mon Jul 28 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc7.git0.1
+- Linux v3.16-rc7
+- Disable debugging options.
+
+* Mon Jul 28 2014 Peter Robinson <pbrobinson@fedoraproject.org>
+- Add patch to fix loading of tegra drm using device tree
+
+* Sat Jul 26 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc6.git3.1
+- Linux v3.16-rc6-139-g9c5502189fa0
+
* Fri Jul 25 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.16.0-0.rc6.git2.1
- Linux v3.16-rc6-118-g82e13c71bc65
- Fix selinux sock_graft hook for AF_ALG address family (rhbz 1115120)
diff --git a/namespaces-remount-fixes.patch b/namespaces-remount-fixes.patch
new file mode 100644
index 000000000..2e2800cb8
--- /dev/null
+++ b/namespaces-remount-fixes.patch
@@ -0,0 +1,625 @@
+Bugzilla: 1129669
+Upstream-status: 3.17 and CC'd to stable
+
+From a6138db815df5ee542d848318e5dae681590fccd Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 28 Jul 2014 16:26:53 -0700
+Subject: [PATCH 1/5] mnt: Only change user settable mount flags in remount
+
+Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
+read-only bind mount read-only in a user namespace the
+MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
+to the remount a read-only mount read-write.
+
+Correct this by replacing the mask of mount flags to preserve
+with a mask of mount flags that may be changed, and preserve
+all others. This ensures that any future bugs with this mask and
+remount will fail in an easy to detect way where new mount flags
+simply won't change.
+
+Cc: stable@vger.kernel.org
+Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+---
+ fs/namespace.c | 2 +-
+ include/linux/mount.h | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/fs/namespace.c b/fs/namespace.c
+index 7187d01329c3..cb40449ea0df 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1937,7 +1937,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
+ err = do_remount_sb(sb, flags, data, 0);
+ if (!err) {
+ lock_mount_hash();
+- mnt_flags |= mnt->mnt.mnt_flags & MNT_PROPAGATION_MASK;
++ mnt_flags |= mnt->mnt.mnt_flags & ~MNT_USER_SETTABLE_MASK;
+ mnt->mnt.mnt_flags = mnt_flags;
+ touch_mnt_namespace(mnt->mnt_ns);
+ unlock_mount_hash();
+diff --git a/include/linux/mount.h b/include/linux/mount.h
+index 839bac270904..b637a89e1fae 100644
+--- a/include/linux/mount.h
++++ b/include/linux/mount.h
+@@ -42,7 +42,9 @@ struct mnt_namespace;
+ * flag, consider how it interacts with shared mounts.
+ */
+ #define MNT_SHARED_MASK (MNT_UNBINDABLE)
+-#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE)
++#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \
++ | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \
++ | MNT_READONLY)
+
+ #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \
+ MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED)
+--
+2.0.4
+
+
+From 07b645589dcda8b7a5249e096fece2a67556f0f4 Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 28 Jul 2014 17:10:56 -0700
+Subject: [PATCH 2/5] mnt: Move the test for MNT_LOCK_READONLY from
+ change_mount_flags into do_remount
+
+There are no races as locked mount flags are guaranteed to never change.
+
+Moving the test into do_remount makes it more visible, and ensures all
+filesystem remounts pass the MNT_LOCK_READONLY permission check. This
+second case is not an issue today as filesystem remounts are guarded
+by capable(CAP_DAC_ADMIN) and thus will always fail in less privileged
+mount namespaces, but it could become an issue in the future.
+
+Cc: stable@vger.kernel.org
+Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+---
+ fs/namespace.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/fs/namespace.c b/fs/namespace.c
+index cb40449ea0df..1105a577a14f 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1896,9 +1896,6 @@ static int change_mount_flags(struct vfsmount *mnt, int ms_flags)
+ if (readonly_request == __mnt_is_readonly(mnt))
+ return 0;
+
+- if (mnt->mnt_flags & MNT_LOCK_READONLY)
+- return -EPERM;
+-
+ if (readonly_request)
+ error = mnt_make_readonly(real_mount(mnt));
+ else
+@@ -1924,6 +1921,16 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
+ if (path->dentry != path->mnt->mnt_root)
+ return -EINVAL;
+
++ /* Don't allow changing of locked mnt flags.
++ *
++ * No locks need to be held here while testing the various
++ * MNT_LOCK flags because those flags can never be cleared
++ * once they are set.
++ */
++ if ((mnt->mnt.mnt_flags & MNT_LOCK_READONLY) &&
++ !(mnt_flags & MNT_READONLY)) {
++ return -EPERM;
++ }
+ err = security_sb_remount(sb, data);
+ if (err)
+ return err;
+--
+2.0.4
+
+
+From 9566d6742852c527bf5af38af5cbb878dad75705 Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 28 Jul 2014 17:26:07 -0700
+Subject: [PATCH 3/5] mnt: Correct permission checks in do_remount
+
+While invesgiating the issue where in "mount --bind -oremount,ro ..."
+would result in later "mount --bind -oremount,rw" succeeding even if
+the mount started off locked I realized that there are several
+additional mount flags that should be locked and are not.
+
+In particular MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, and the atime
+flags in addition to MNT_READONLY should all be locked. These
+flags are all per superblock, can all be changed with MS_BIND,
+and should not be changable if set by a more privileged user.
+
+The following additions to the current logic are added in this patch.
+- nosuid may not be clearable by a less privileged user.
+- nodev may not be clearable by a less privielged user.
+- noexec may not be clearable by a less privileged user.
+- atime flags may not be changeable by a less privileged user.
+
+The logic with atime is that always setting atime on access is a
+global policy and backup software and auditing software could break if
+atime bits are not updated (when they are configured to be updated),
+and serious performance degradation could result (DOS attack) if atime
+updates happen when they have been explicitly disabled. Therefore an
+unprivileged user should not be able to mess with the atime bits set
+by a more privileged user.
+
+The additional restrictions are implemented with the addition of
+MNT_LOCK_NOSUID, MNT_LOCK_NODEV, MNT_LOCK_NOEXEC, and MNT_LOCK_ATIME
+mnt flags.
+
+Taken together these changes and the fixes for MNT_LOCK_READONLY
+should make it safe for an unprivileged user to create a user
+namespace and to call "mount --bind -o remount,... ..." without
+the danger of mount flags being changed maliciously.
+
+Cc: stable@vger.kernel.org
+Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+---
+ fs/namespace.c | 36 +++++++++++++++++++++++++++++++++---
+ include/linux/mount.h | 5 +++++
+ 2 files changed, 38 insertions(+), 3 deletions(-)
+
+diff --git a/fs/namespace.c b/fs/namespace.c
+index 1105a577a14f..dd9c93b5a9d5 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
+
+ mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED);
+ /* Don't allow unprivileged users to change mount flags */
+- if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY))
+- mnt->mnt.mnt_flags |= MNT_LOCK_READONLY;
++ if (flag & CL_UNPRIVILEGED) {
++ mnt->mnt.mnt_flags |= MNT_LOCK_ATIME;
++
++ if (mnt->mnt.mnt_flags & MNT_READONLY)
++ mnt->mnt.mnt_flags |= MNT_LOCK_READONLY;
++
++ if (mnt->mnt.mnt_flags & MNT_NODEV)
++ mnt->mnt.mnt_flags |= MNT_LOCK_NODEV;
++
++ if (mnt->mnt.mnt_flags & MNT_NOSUID)
++ mnt->mnt.mnt_flags |= MNT_LOCK_NOSUID;
++
++ if (mnt->mnt.mnt_flags & MNT_NOEXEC)
++ mnt->mnt.mnt_flags |= MNT_LOCK_NOEXEC;
++ }
+
+ /* Don't allow unprivileged users to reveal what is under a mount */
+ if ((flag & CL_UNPRIVILEGED) && list_empty(&old->mnt_expire))
+@@ -1931,6 +1944,23 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
+ !(mnt_flags & MNT_READONLY)) {
+ return -EPERM;
+ }
++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NODEV) &&
++ !(mnt_flags & MNT_NODEV)) {
++ return -EPERM;
++ }
++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOSUID) &&
++ !(mnt_flags & MNT_NOSUID)) {
++ return -EPERM;
++ }
++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOEXEC) &&
++ !(mnt_flags & MNT_NOEXEC)) {
++ return -EPERM;
++ }
++ if ((mnt->mnt.mnt_flags & MNT_LOCK_ATIME) &&
++ ((mnt->mnt.mnt_flags & MNT_ATIME_MASK) != (mnt_flags & MNT_ATIME_MASK))) {
++ return -EPERM;
++ }
++
+ err = security_sb_remount(sb, data);
+ if (err)
+ return err;
+@@ -2129,7 +2159,7 @@ static int do_new_mount(struct path *path, const char *fstype, int flags,
+ */
+ if (!(type->fs_flags & FS_USERNS_DEV_MOUNT)) {
+ flags |= MS_NODEV;
+- mnt_flags |= MNT_NODEV;
++ mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
+ }
+ }
+
+diff --git a/include/linux/mount.h b/include/linux/mount.h
+index b637a89e1fae..b0c1e6574e7f 100644
+--- a/include/linux/mount.h
++++ b/include/linux/mount.h
+@@ -45,12 +45,17 @@ struct mnt_namespace;
+ #define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \
+ | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \
+ | MNT_READONLY)
++#define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME )
+
+ #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \
+ MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED)
+
+ #define MNT_INTERNAL 0x4000
+
++#define MNT_LOCK_ATIME 0x040000
++#define MNT_LOCK_NOEXEC 0x080000
++#define MNT_LOCK_NOSUID 0x100000
++#define MNT_LOCK_NODEV 0x200000
+ #define MNT_LOCK_READONLY 0x400000
+ #define MNT_LOCKED 0x800000
+ #define MNT_DOOMED 0x1000000
+--
+2.0.4
+
+
+From ffbc6f0ead47fa5a1dc9642b0331cb75c20a640e Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Mon, 28 Jul 2014 17:36:04 -0700
+Subject: [PATCH 4/5] mnt: Change the default remount atime from relatime to
+ the existing value
+
+Since March 2009 the kernel has treated the state that if no
+MS_..ATIME flags are passed then the kernel defaults to relatime.
+
+Defaulting to relatime instead of the existing atime state during a
+remount is silly, and causes problems in practice for people who don't
+specify any MS_...ATIME flags and to get the default filesystem atime
+setting. Those users may encounter a permission error because the
+default atime setting does not work.
+
+A default that does not work and causes permission problems is
+ridiculous, so preserve the existing value to have a default
+atime setting that is always guaranteed to work.
+
+Using the default atime setting in this way is particularly
+interesting for applications built to run in restricted userspace
+environments without /proc mounted, as the existing atime mount
+options of a filesystem can not be read from /proc/mounts.
+
+In practice this fixes user space that uses the default atime
+setting on remount that are broken by the permission checks
+keeping less privileged users from changing more privileged users
+atime settings.
+
+Cc: stable@vger.kernel.org
+Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+---
+ fs/namespace.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/fs/namespace.c b/fs/namespace.c
+index dd9c93b5a9d5..7886176232c1 100644
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -2473,6 +2473,14 @@ long do_mount(const char *dev_name, const char *dir_name,
+ if (flags & MS_RDONLY)
+ mnt_flags |= MNT_READONLY;
+
++ /* The default atime for remount is preservation */
++ if ((flags & MS_REMOUNT) &&
++ ((flags & (MS_NOATIME | MS_NODIRATIME | MS_RELATIME |
++ MS_STRICTATIME)) == 0)) {
++ mnt_flags &= ~MNT_ATIME_MASK;
++ mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK;
++ }
++
+ flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | MS_BORN |
+ MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
+ MS_STRICTATIME);
+--
+2.0.4
+
+
+From db181ce011e3c033328608299cd6fac06ea50130 Mon Sep 17 00:00:00 2001
+From: "Eric W. Biederman" <ebiederm@xmission.com>
+Date: Tue, 29 Jul 2014 15:50:44 -0700
+Subject: [PATCH 5/5] mnt: Add tests for unprivileged remount cases that have
+ found to be faulty
+
+Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
+read-only bind mount read-only in a user namespace the
+MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
+to the remount a read-only mount read-write.
+
+Upon review of the code in remount it was discovered that the code allowed
+nosuid, noexec, and nodev to be cleared. It was also discovered that
+the code was allowing the per mount atime flags to be changed.
+
+The first naive patch to fix these issues contained the flaw that using
+default atime settings when remounting a filesystem could be disallowed.
+
+To avoid this problems in the future add tests to ensure unprivileged
+remounts are succeeding and failing at the appropriate times.
+
+Cc: stable@vger.kernel.org
+Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
+Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
+---
+ tools/testing/selftests/Makefile | 1 +
+ tools/testing/selftests/mount/Makefile | 17 ++
+ .../selftests/mount/unprivileged-remount-test.c | 242 +++++++++++++++++++++
+ 3 files changed, 260 insertions(+)
+ create mode 100644 tools/testing/selftests/mount/Makefile
+ create mode 100644 tools/testing/selftests/mount/unprivileged-remount-test.c
+
+diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
+index e66e710cc595..0a8a9db43d34 100644
+--- a/tools/testing/selftests/Makefile
++++ b/tools/testing/selftests/Makefile
+@@ -4,6 +4,7 @@ TARGETS += efivarfs
+ TARGETS += kcmp
+ TARGETS += memory-hotplug
+ TARGETS += mqueue
++TARGETS += mount
+ TARGETS += net
+ TARGETS += ptrace
+ TARGETS += timers
+diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
+new file mode 100644
+index 000000000000..337d853c2b72
+--- /dev/null
++++ b/tools/testing/selftests/mount/Makefile
+@@ -0,0 +1,17 @@
++# Makefile for mount selftests.
++
++all: unprivileged-remount-test
++
++unprivileged-remount-test: unprivileged-remount-test.c
++ gcc -Wall -O2 unprivileged-remount-test.c -o unprivileged-remount-test
++
++# Allow specific tests to be selected.
++test_unprivileged_remount: unprivileged-remount-test
++ @if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi
++
++run_tests: all test_unprivileged_remount
++
++clean:
++ rm -f unprivileged-remount-test
++
++.PHONY: all test_unprivileged_remount
+diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c
+new file mode 100644
+index 000000000000..1b3ff2fda4d0
+--- /dev/null
++++ b/tools/testing/selftests/mount/unprivileged-remount-test.c
+@@ -0,0 +1,242 @@
++#define _GNU_SOURCE
++#include <sched.h>
++#include <stdio.h>
++#include <errno.h>
++#include <string.h>
++#include <sys/types.h>
++#include <sys/mount.h>
++#include <sys/wait.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <grp.h>
++#include <stdbool.h>
++#include <stdarg.h>
++
++#ifndef CLONE_NEWNS
++# define CLONE_NEWNS 0x00020000
++#endif
++#ifndef CLONE_NEWUTS
++# define CLONE_NEWUTS 0x04000000
++#endif
++#ifndef CLONE_NEWIPC
++# define CLONE_NEWIPC 0x08000000
++#endif
++#ifndef CLONE_NEWNET
++# define CLONE_NEWNET 0x40000000
++#endif
++#ifndef CLONE_NEWUSER
++# define CLONE_NEWUSER 0x10000000
++#endif
++#ifndef CLONE_NEWPID
++# define CLONE_NEWPID 0x20000000
++#endif
++
++#ifndef MS_RELATIME
++#define MS_RELATIME (1 << 21)
++#endif
++#ifndef MS_STRICTATIME
++#define MS_STRICTATIME (1 << 24)
++#endif
++
++static void die(char *fmt, ...)
++{
++ va_list ap;
++ va_start(ap, fmt);
++ vfprintf(stderr, fmt, ap);
++ va_end(ap);
++ exit(EXIT_FAILURE);
++}
++
++static void write_file(char *filename, char *fmt, ...)
++{
++ char buf[4096];
++ int fd;
++ ssize_t written;
++ int buf_len;
++ va_list ap;
++
++ va_start(ap, fmt);
++ buf_len = vsnprintf(buf, sizeof(buf), fmt, ap);
++ va_end(ap);
++ if (buf_len < 0) {
++ die("vsnprintf failed: %s\n",
++ strerror(errno));
++ }
++ if (buf_len >= sizeof(buf)) {
++ die("vsnprintf output truncated\n");
++ }
++
++ fd = open(filename, O_WRONLY);
++ if (fd < 0) {
++ die("open of %s failed: %s\n",
++ filename, strerror(errno));
++ }
++ written = write(fd, buf, buf_len);
++ if (written != buf_len) {
++ if (written >= 0) {
++ die("short write to %s\n", filename);
++ } else {
++ die("write to %s failed: %s\n",
++ filename, strerror(errno));
++ }
++ }
++ if (close(fd) != 0) {
++ die("close of %s failed: %s\n",
++ filename, strerror(errno));
++ }
++}
++
++static void create_and_enter_userns(void)
++{
++ uid_t uid;
++ gid_t gid;
++
++ uid = getuid();
++ gid = getgid();
++
++ if (unshare(CLONE_NEWUSER) !=0) {
++ die("unshare(CLONE_NEWUSER) failed: %s\n",
++ strerror(errno));
++ }
++
++ write_file("/proc/self/uid_map", "0 %d 1", uid);
++ write_file("/proc/self/gid_map", "0 %d 1", gid);
++
++ if (setgroups(0, NULL) != 0) {
++ die("setgroups failed: %s\n",
++ strerror(errno));
++ }
++ if (setgid(0) != 0) {
++ die ("setgid(0) failed %s\n",
++ strerror(errno));
++ }
++ if (setuid(0) != 0) {
++ die("setuid(0) failed %s\n",
++ strerror(errno));
++ }
++}
++
++static
++bool test_unpriv_remount(int mount_flags, int remount_flags, int invalid_flags)
++{
++ pid_t child;
++
++ child = fork();
++ if (child == -1) {
++ die("fork failed: %s\n",
++ strerror(errno));
++ }
++ if (child != 0) { /* parent */
++ pid_t pid;
++ int status;
++ pid = waitpid(child, &status, 0);
++ if (pid == -1) {
++ die("waitpid failed: %s\n",
++ strerror(errno));
++ }
++ if (pid != child) {
++ die("waited for %d got %d\n",
++ child, pid);
++ }
++ if (!WIFEXITED(status)) {
++ die("child did not terminate cleanly\n");
++ }
++ return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false;
++ }
++
++ create_and_enter_userns();
++ if (unshare(CLONE_NEWNS) != 0) {
++ die("unshare(CLONE_NEWNS) failed: %s\n",
++ strerror(errno));
++ }
++
++ if (mount("testing", "/tmp", "ramfs", mount_flags, NULL) != 0) {
++ die("mount of /tmp failed: %s\n",
++ strerror(errno));
++ }
++
++ create_and_enter_userns();
++
++ if (unshare(CLONE_NEWNS) != 0) {
++ die("unshare(CLONE_NEWNS) failed: %s\n",
++ strerror(errno));
++ }
++
++ if (mount("/tmp", "/tmp", "none",
++ MS_REMOUNT | MS_BIND | remount_flags, NULL) != 0) {
++ /* system("cat /proc/self/mounts"); */
++ die("remount of /tmp failed: %s\n",
++ strerror(errno));
++ }
++
++ if (mount("/tmp", "/tmp", "none",
++ MS_REMOUNT | MS_BIND | invalid_flags, NULL) == 0) {
++ /* system("cat /proc/self/mounts"); */
++ die("remount of /tmp with invalid flags "
++ "succeeded unexpectedly\n");
++ }
++ exit(EXIT_SUCCESS);
++}
++
++static bool test_unpriv_remount_simple(int mount_flags)
++{
++ return test_unpriv_remount(mount_flags, mount_flags, 0);
++}
++
++static bool test_unpriv_remount_atime(int mount_flags, int invalid_flags)
++{
++ return test_unpriv_remount(mount_flags, mount_flags, invalid_flags);
++}
++
++int main(int argc, char **argv)
++{
++ if (!test_unpriv_remount_simple(MS_RDONLY|MS_NODEV)) {
++ die("MS_RDONLY malfunctions\n");
++ }
++ if (!test_unpriv_remount_simple(MS_NODEV)) {
++ die("MS_NODEV malfunctions\n");
++ }
++ if (!test_unpriv_remount_simple(MS_NOSUID|MS_NODEV)) {
++ die("MS_NOSUID malfunctions\n");
++ }
++ if (!test_unpriv_remount_simple(MS_NOEXEC|MS_NODEV)) {
++ die("MS_NOEXEC malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODEV,
++ MS_NOATIME|MS_NODEV))
++ {
++ die("MS_RELATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODEV,
++ MS_NOATIME|MS_NODEV))
++ {
++ die("MS_STRICTATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODEV,
++ MS_STRICTATIME|MS_NODEV))
++ {
++ die("MS_RELATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODIRATIME|MS_NODEV,
++ MS_NOATIME|MS_NODEV))
++ {
++ die("MS_RELATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODIRATIME|MS_NODEV,
++ MS_NOATIME|MS_NODEV))
++ {
++ die("MS_RELATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODIRATIME|MS_NODEV,
++ MS_STRICTATIME|MS_NODEV))
++ {
++ die("MS_RELATIME malfunctions\n");
++ }
++ if (!test_unpriv_remount(MS_STRICTATIME|MS_NODEV, MS_NODEV,
++ MS_NOATIME|MS_NODEV))
++ {
++ die("Default atime malfunctions\n");
++ }
++ return EXIT_SUCCESS;
++}
+--
+2.0.4
+
diff --git a/nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch b/nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
new file mode 100644
index 000000000..5f48a1262
--- /dev/null
+++ b/nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
@@ -0,0 +1,41 @@
+Bugzilla: 1131551
+Upstream-status: 3.17-rc1 and Cc'd to stable
+
+From 7a9e75a185e6b3a3860e6a26fb6e88691fc2c9d9 Mon Sep 17 00:00:00 2001
+From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
+Date: Sat, 26 Jul 2014 14:58:01 +0300
+Subject: [PATCH] nfs3_list_one_acl(): check get_acl() result with
+ IS_ERR_OR_NULL
+
+There was a check for result being not NULL. But get_acl() may return
+NULL, or ERR_PTR, or actual pointer.
+The purpose of the function where current change is done is to "list
+ACLs only when they are available", so any error condition of get_acl()
+mustn't be elevated, and returning 0 there is still valid.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81111
+Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Fixes: 74adf83f5d77 (nfs: only show Posix ACLs in listxattr if actually...)
+Cc: stable@vger.kernel.org # 3.14+
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+---
+ fs/nfs/nfs3acl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
+index 8f854dde4150..d0fec260132a 100644
+--- a/fs/nfs/nfs3acl.c
++++ b/fs/nfs/nfs3acl.c
+@@ -256,7 +256,7 @@ nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
+ char *p = data + *result;
+
+ acl = get_acl(inode, type);
+- if (!acl)
++ if (IS_ERR_OR_NULL(acl))
+ return 0;
+
+ posix_acl_release(acl);
+--
+1.9.3
+
diff --git a/secure-modules.patch b/secure-modules.patch
index b51a22cdb..2d3174c22 100644
--- a/secure-modules.patch
+++ b/secure-modules.patch
@@ -1,8 +1,7 @@
Bugzilla: N/A
Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd
-
-From 3b083aa4b42c6f2e814742b24e1948aced3a5e3f Mon Sep 17 00:00:00 2001
+From 952dbcbea4cffb1a05773af3b5f41e8ed477c5fe Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Aug 2013 17:58:15 -0400
Subject: [PATCH 01/14] Add secure_modules() call
@@ -64,7 +63,7 @@ index 81e727cf6df9..fc14f48915dd 100644
1.9.3
-From 5c9708ebd7a52bf432745dc9b739c54666f2789d Mon Sep 17 00:00:00 2001
+From 3b451a12e60a47d152ecce1c02634c4d7320b024 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Thu, 8 Mar 2012 10:10:38 -0500
Subject: [PATCH 02/14] PCI: Lock down BAR access when module security is
@@ -183,7 +182,7 @@ index b91c4da68365..98f5637304d1 100644
1.9.3
-From c5f35519151d28b1a3c3dee5cb67fd67befa7fb6 Mon Sep 17 00:00:00 2001
+From 42a620055ac873fb378ec69731c7a2200f6779cc Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Thu, 8 Mar 2012 10:35:59 -0500
Subject: [PATCH 03/14] x86: Lock down IO port access when module security is
@@ -256,7 +255,7 @@ index 917403fe10da..cdf839f9defe 100644
1.9.3
-From 24b607adc80fdebbc3497efc4b997a62edc06280 Mon Sep 17 00:00:00 2001
+From 8019fb7c7b5f18b19f7c980987953680ee218c9f Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 08:39:37 -0500
Subject: [PATCH 04/14] ACPI: Limit access to custom_method
@@ -288,7 +287,7 @@ index c68e72414a67..4277938af700 100644
1.9.3
-From 215559c7708671e85ceb42f6e25445b9b27f6c38 Mon Sep 17 00:00:00 2001
+From bf84e9e1022b2d3d0c97ae48fb8b61e5336c50f8 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 08:46:50 -0500
Subject: [PATCH 05/14] asus-wmi: Restrict debugfs interface when module
@@ -343,7 +342,7 @@ index 3c6ccedc82b6..960c46536c65 100644
1.9.3
-From b709a5110b728b526063c6814413a8c0f0d01203 Mon Sep 17 00:00:00 2001
+From 9a56e8715d3b6dc84989997f34b6b5d407cabad2 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Mar 2012 09:28:15 -0500
Subject: [PATCH 06/14] Restrict /dev/mem and /dev/kmem when module loading is
@@ -386,7 +385,7 @@ index cdf839f9defe..c63cf93b00eb 100644
1.9.3
-From 2896018a1c991e19691ab203a9e9010e898587e7 Mon Sep 17 00:00:00 2001
+From 8d6faa19bbbaa4df411becda7e40c4ea0684c134 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@redhat.com>
Date: Mon, 25 Jun 2012 19:57:30 -0400
Subject: [PATCH 07/14] acpi: Ignore acpi_rsdp kernel parameter when module
@@ -426,7 +425,7 @@ index bad25b070fe0..0606585e8b93 100644
1.9.3
-From a9c7c2c5e39d3e687b3e90845a753673144a754b Mon Sep 17 00:00:00 2001
+From 1ff86ddea019f543f6668b56889f86811028f303 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Aug 2013 03:33:56 -0400
Subject: [PATCH 08/14] kexec: Disable at runtime if the kernel enforces module
@@ -442,18 +441,18 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
1 file changed, 8 insertions(+)
diff --git a/kernel/kexec.c b/kernel/kexec.c
-index 6748688813d0..d4d88984bf45 100644
+index 4b8f0c925884..df14daa323a9 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
-@@ -33,6 +33,7 @@
- #include <linux/swap.h>
+@@ -34,6 +34,7 @@
#include <linux/syscore_ops.h>
#include <linux/compiler.h>
+ #include <linux/hugetlb.h>
+#include <linux/module.h>
#include <asm/page.h>
#include <asm/uaccess.h>
-@@ -946,6 +947,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
+@@ -947,6 +948,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
return -EPERM;
/*
@@ -471,7 +470,7 @@ index 6748688813d0..d4d88984bf45 100644
1.9.3
-From 4ce6023b9f02d5397156976568b3aad88b2f5b95 Mon Sep 17 00:00:00 2001
+From 4d56368f1364b45c18067bab1d6abc5ce0f67183 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 8 Feb 2013 11:12:13 -0800
Subject: [PATCH 09/14] x86: Restrict MSR access when module loading is
@@ -516,7 +515,7 @@ index c9603ac80de5..8bef43fc3f40 100644
1.9.3
-From c95290110f65724e58b7506281759c0bac59b9f5 Mon Sep 17 00:00:00 2001
+From aab8ba85241a85a0b2ed622edd7874c74cafa496 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Fri, 9 Aug 2013 18:36:30 -0400
Subject: [PATCH 10/14] Add option to automatically enforce module signatures
@@ -552,10 +551,10 @@ index 199f453cb4de..ec38acf00b40 100644
290/040 ALL edd_mbr_sig_buffer EDD MBR signatures
2D0/A00 ALL e820_map E820 memory map table
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
-index a8f749ef0fdc..35bfd8259993 100644
+index d24887b645dc..870aac9520b3 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
-@@ -1556,6 +1556,16 @@ config EFI_MIXED
+@@ -1557,6 +1557,16 @@ config EFI_MIXED
If unsure, say N.
@@ -703,7 +702,7 @@ index fc14f48915dd..2d68d276f3b6 100644
1.9.3
-From f0baa6f34da3f151c059ca3043945837db0ca8d1 Mon Sep 17 00:00:00 2001
+From eae8a80ddc185b3f233e2620dbfc6454b6f0c3a6 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Tue, 5 Feb 2013 19:25:05 -0500
Subject: [PATCH 11/14] efi: Disable secure boot if shim is in insecure mode
@@ -762,7 +761,7 @@ index 85defaf5a27c..b4013a4ba005 100644
1.9.3
-From 6bc90bfd4c13fd6cc4a536630807406c16395bf5 Mon Sep 17 00:00:00 2001
+From 9728a4f49b284b7354876e1d77174d5838306e21 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Tue, 27 Aug 2013 13:28:43 -0400
Subject: [PATCH 12/14] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI
@@ -776,10 +775,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
-index 35bfd8259993..746b1b63da8c 100644
+index 870aac9520b3..7aecd3f9f8ee 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
-@@ -1557,7 +1557,8 @@ config EFI_MIXED
+@@ -1558,7 +1558,8 @@ config EFI_MIXED
If unsure, say N.
config EFI_SECURE_BOOT_SIG_ENFORCE
@@ -793,7 +792,7 @@ index 35bfd8259993..746b1b63da8c 100644
1.9.3
-From 292f6faa86f44fe261c8da58cc2c7f65aa0acad6 Mon Sep 17 00:00:00 2001
+From 4211b4919b8ccecc4f4cdc0a46ead7294478b687 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Tue, 27 Aug 2013 13:33:03 -0400
Subject: [PATCH 13/14] efi: Add EFI_SECURE_BOOT bit
@@ -837,7 +836,7 @@ index 41bbf8ba4ba8..e73f391fd3c8 100644
1.9.3
-From 594e605ee9589150919aa113e3e01163168ad041 Mon Sep 17 00:00:00 2001
+From 18b50c6f0597b606cb03cbd8a9fdef7478cb2b21 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer@fedoraproject.org>
Date: Fri, 20 Jun 2014 08:53:24 -0400
Subject: [PATCH 14/14] hibernate: Disable in a signed modules environment
diff --git a/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch b/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch
deleted file mode 100644
index bf8d534fc..000000000
--- a/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Bugzilla: 1115120
-Upstream-status: sent for 3.16
-
-From 4da6daf4d3df5a977e4623963f141a627fd2efce Mon Sep 17 00:00:00 2001
-From: Paul Moore <pmoore@redhat.com>
-Date: Thu, 10 Jul 2014 10:17:48 -0400
-Subject: [PATCH] selinux: fix the default socket labeling in sock_graft()
-
-The sock_graft() hook has special handling for AF_INET, AF_INET, and
-AF_UNIX sockets as those address families have special hooks which
-label the sock before it is attached its associated socket.
-Unfortunately, the sock_graft() hook was missing a default approach
-to labeling sockets which meant that any other address family which
-made use of connections or the accept() syscall would find the
-returned socket to be in an "unlabeled" state. This was recently
-demonstrated by the kcrypto/AF_ALG subsystem and the newly released
-cryptsetup package (cryptsetup v1.6.5 and later).
-
-This patch preserves the special handling in selinux_sock_graft(),
-but adds a default behavior - setting the sock's label equal to the
-associated socket - which resolves the problem with AF_ALG and
-presumably any other address family which makes use of accept().
-
-Cc: stable@vger.kernel.org
-Signed-off-by: Paul Moore <pmoore@redhat.com>
-Tested-by: Milan Broz <gmazyland@gmail.com>
----
- include/linux/security.h | 5 ++++-
- security/selinux/hooks.c | 13 +++++++++++--
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/include/linux/security.h b/include/linux/security.h
-index 6478ce3..794be73 100644
---- a/include/linux/security.h
-+++ b/include/linux/security.h
-@@ -987,7 +987,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
- * Retrieve the LSM-specific secid for the sock to enable caching of network
- * authorizations.
- * @sock_graft:
-- * Sets the socket's isec sid to the sock's sid.
-+ * This hook is called in response to a newly created sock struct being
-+ * grafted onto an existing socket and allows the security module to
-+ * perform whatever security attribute management is necessary for both
-+ * the sock and socket.
- * @inet_conn_request:
- * Sets the openreq's sid to socket's sid with MLS portion taken from peer sid.
- * @inet_csk_clone:
-diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
-index 336f0a0..b3a6754 100644
---- a/security/selinux/hooks.c
-+++ b/security/selinux/hooks.c
-@@ -4499,9 +4499,18 @@ static void selinux_sock_graft(struct sock *sk, struct socket *parent)
- struct inode_security_struct *isec = SOCK_INODE(parent)->i_security;
- struct sk_security_struct *sksec = sk->sk_security;
-
-- if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6 ||
-- sk->sk_family == PF_UNIX)
-+ switch (sk->sk_family) {
-+ case PF_INET:
-+ case PF_INET6:
-+ case PF_UNIX:
- isec->sid = sksec->sid;
-+ break;
-+ default:
-+ /* by default there is no special labeling mechanism for the
-+ * sksec label so inherit the label from the parent socket */
-+ BUG_ON(sksec->sid != SECINITSID_UNLABELED);
-+ sksec->sid = isec->sid;
-+ }
- sksec->sclass = isec->sclass;
- }
-
---
-1.9.3
-
diff --git a/serial-460800.patch b/serial-460800.patch
deleted file mode 100644
index 2abea1e4c..000000000
--- a/serial-460800.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Bugzilla: N/A
-Upstream-status: Fedora mustard but I have no idea why.
-
-diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
-index 2209620..659c1bb 100644
---- a/drivers/tty/serial/8250/8250_core.c
-+++ b/drivers/tty/serial/8250/8250_core.c
-@@ -7,6 +7,9 @@
- *
- * Copyright (C) 2001 Russell King.
- *
-+ * 2005/09/16: Enabled higher baud rates for 16C95x.
-+ * (Mathias Adam <a2@adamis.de>)
-+ *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
-@@ -2227,6 +2230,14 @@ static unsigned int serial8250_get_divisor(struct uart_port *port, unsigned int
- else if ((port->flags & UPF_MAGIC_MULTIPLIER) &&
- baud == (port->uartclk/8))
- quot = 0x8002;
-+ /*
-+ * For 16C950s UART_TCR is used in combination with divisor==1
-+ * to achieve baud rates up to baud_base*4.
-+ */
-+ else if ((port->type == PORT_16C950) &&
-+ baud > (port->uartclk/16))
-+ quot = 1;
-+
- else
- quot = uart_get_divisor(port, baud);
-
-@@ -2240,7 +2251,7 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
- container_of(port, struct uart_8250_port, port);
- unsigned char cval, fcr = 0;
- unsigned long flags;
-- unsigned int baud, quot;
-+ unsigned int baud, quot, max_baud;
- int fifo_bug = 0;
-
- switch (termios->c_cflag & CSIZE) {
-@@ -2272,9 +2283,10 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
- /*
- * Ask the core to calculate the divisor for us.
- */
-+ max_baud = (up->port.type == PORT_16C950 ? port->uartclk/4 : port->uartclk/16);
- baud = uart_get_baud_rate(port, termios, old,
- port->uartclk / 16 / 0xffff,
-- port->uartclk / 16);
-+ max_baud);
- quot = serial8250_get_divisor(port, baud);
-
- /*
-@@ -2311,6 +2323,19 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
- spin_lock_irqsave(&up->port.lock, flags);
-
- /*
-+ * 16C950 supports additional prescaler ratios between 1:16 and 1:4
-+ * thus increasing max baud rate to uartclk/4.
-+ */
-+ if (up->port.type == PORT_16C950) {
-+ if (baud == port->uartclk/4)
-+ serial_icr_write(up, UART_TCR, 0x4);
-+ else if (baud == port->uartclk/8)
-+ serial_icr_write(up, UART_TCR, 0x8);
-+ else
-+ serial_icr_write(up, UART_TCR, 0);
-+ }
-+
-+ /*
- * Update the per-port timeout.
- */
- uart_update_timeout(port, termios->c_cflag, baud);
diff --git a/sources b/sources
index 5074e14fd..0dc4b028c 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,3 @@
-97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz
-ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz
-93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz
-cfbb28625de3f01fcd2c633c6f2a8730 patch-3.16-rc6-git2.xz
+5c569ed649a0c9711879f333e90c5386 linux-3.16.tar.xz
+49868ce6467b35cd9ffea1120d129462 perf-man-3.16.tar.gz
+9da4b0f5e343455b8141bcfa47e88cf5 patch-3.16.1.xz