Merge pull request #265 from stewart-ibm/update-petitboot-for-1.7
Update petitboot for 1.7
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
index 4eae3ef..50f4890 100644
--- a/openpower/configs/firestone_defconfig
+++ b/openpower/configs/firestone_defconfig
@@ -41,9 +41,9 @@
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8adc30a30b88c793c2058e85426f4f94158797ad"
+BR2_LINUX_KERNEL_VERSION="4.2"
+BR2_KERNEL_HEADERS_4_2=y
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/garrison_defconfig b/openpower/configs/garrison_defconfig
index 1a3019f..231af1a 100644
--- a/openpower/configs/garrison_defconfig
+++ b/openpower/configs/garrison_defconfig
@@ -39,9 +39,9 @@
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8adc30a30b88c793c2058e85426f4f94158797ad"
+BR2_LINUX_KERNEL_VERSION="4.2"
+BR2_KERNEL_HEADERS_4_2=y
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
index 381b92b..f50f6cc 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/habanero_defconfig
@@ -41,9 +41,9 @@
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8adc30a30b88c793c2058e85426f4f94158797ad"
+BR2_LINUX_KERNEL_VERSION="4.2"
+BR2_KERNEL_HEADERS_4_2=y
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/openpower_mambo_defconfig b/openpower/configs/openpower_mambo_defconfig
index e10d5e4..1f2773e 100644
--- a/openpower/configs/openpower_mambo_defconfig
+++ b/openpower/configs/openpower_mambo_defconfig
@@ -29,9 +29,9 @@
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8adc30a30b88c793c2058e85426f4f94158797ad"
+BR2_LINUX_KERNEL_VERSION="4.2"
+BR2_KERNEL_HEADERS_4_2=y
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
index 9ebb2c5..b5545ed 100644
--- a/openpower/configs/palmetto_defconfig
+++ b/openpower/configs/palmetto_defconfig
@@ -40,9 +40,9 @@
BR2_TARGET_GENERIC_GETTY_PORT="hvc0"
BR2_ROOTFS_OVERLAY="overlay"
BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/open-power/linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="8adc30a30b88c793c2058e85426f4f94158797ad"
+BR2_LINUX_KERNEL_VERSION="4.2"
+BR2_KERNEL_HEADERS_4_2=y
+BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/configs/linux/skiroot_defconfig"
BR2_LINUX_KERNEL_ZIMAGE_EPAPR=y
diff --git a/openpower/linux/linux-0001-powerpc-Add-openpower_defconfig.patch b/openpower/linux/linux-0001-powerpc-Add-openpower_defconfig.patch
new file mode 100644
index 0000000..51b51c3
--- /dev/null
+++ b/openpower/linux/linux-0001-powerpc-Add-openpower_defconfig.patch
@@ -0,0 +1,240 @@
+From 89cf6cbb22c46699151caf946856fd1f32412ef5 Mon Sep 17 00:00:00 2001
+From: Jeremy Kerr <jk@ozlabs.org>
+Date: Fri, 12 Dec 2014 08:03:11 +0800
+Subject: [PATCH 1/9] powerpc: Add openpower_defconfig
+
+Simplifies building an openpower kernel a little. It is based on the
+configuration used by the op-build openpower buildroot overlay.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/configs/openpower_defconfig | 216 +++++++++++++++++++++++++++++++
+ 1 file changed, 216 insertions(+)
+ create mode 100644 arch/powerpc/configs/openpower_defconfig
+
+diff --git a/arch/powerpc/configs/openpower_defconfig b/arch/powerpc/configs/openpower_defconfig
+new file mode 100644
+index 0000000..314177e
+--- /dev/null
++++ b/arch/powerpc/configs/openpower_defconfig
+@@ -0,0 +1,216 @@
++CONFIG_PPC64=y
++CONFIG_ALTIVEC=y
++CONFIG_VSX=y
++CONFIG_SMP=y
++CONFIG_NR_CPUS=2048
++CONFIG_CPU_LITTLE_ENDIAN=y
++# CONFIG_SWAP is not set
++CONFIG_SYSVIPC=y
++CONFIG_POSIX_MQUEUE=y
++# CONFIG_CROSS_MEMORY_ATTACH is not set
++CONFIG_IRQ_DOMAIN_DEBUG=y
++CONFIG_NO_HZ=y
++CONFIG_HIGH_RES_TIMERS=y
++CONFIG_TASKSTATS=y
++CONFIG_TASK_DELAY_ACCT=y
++CONFIG_TASK_XACCT=y
++CONFIG_TASK_IO_ACCOUNTING=y
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_LOG_BUF_SHIFT=20
++CONFIG_RELAY=y
++CONFIG_BLK_DEV_INITRD=y
++# CONFIG_RD_GZIP is not set
++# CONFIG_RD_BZIP2 is not set
++# CONFIG_RD_LZMA is not set
++# CONFIG_RD_LZO is not set
++# CONFIG_RD_LZ4 is not set
++CONFIG_KALLSYMS_ALL=y
++CONFIG_PERF_EVENTS=y
++# CONFIG_COMPAT_BRK is not set
++CONFIG_JUMP_LABEL=y
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_PARTITION_ADVANCED=y
++# CONFIG_IOSCHED_DEADLINE is not set
++# CONFIG_PPC_PMAC is not set
++CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
++CONFIG_HZ_100=y
++CONFIG_KEXEC=y
++CONFIG_IRQ_ALL_CPUS=y
++# CONFIG_COMPACTION is not set
++# CONFIG_MIGRATION is not set
++# CONFIG_BOUNCE is not set
++CONFIG_PPC_64K_PAGES=y
++CONFIG_SCHED_SMT=y
++# CONFIG_SUSPEND is not set
++# CONFIG_SECCOMP is not set
++CONFIG_NET=y
++CONFIG_PACKET=y
++CONFIG_UNIX=y
++CONFIG_INET=y
++CONFIG_IP_MULTICAST=y
++CONFIG_NET_IPIP=y
++CONFIG_SYN_COOKIES=y
++# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
++# CONFIG_INET_XFRM_MODE_TUNNEL is not set
++# CONFIG_INET_XFRM_MODE_BEET is not set
++# CONFIG_IPV6 is not set
++# CONFIG_WIRELESS is not set
++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
++CONFIG_DEVTMPFS=y
++CONFIG_DEVTMPFS_MOUNT=y
++CONFIG_BLK_DEV_LOOP=y
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_SIZE=65536
++CONFIG_ATA_OVER_ETH=y
++CONFIG_VIRTIO_BLK=y
++CONFIG_EEPROM_AT24=y
++CONFIG_CXL=y
++CONFIG_BLK_DEV_SD=y
++CONFIG_CHR_DEV_ST=y
++CONFIG_BLK_DEV_SR=y
++CONFIG_BLK_DEV_SR_VENDOR=y
++CONFIG_CHR_DEV_SG=y
++CONFIG_SCSI_CONSTANTS=y
++CONFIG_SCSI_SCAN_ASYNC=y
++CONFIG_SCSI_FC_ATTRS=y
++CONFIG_SCSI_CXGB3_ISCSI=y
++CONFIG_SCSI_CXGB4_ISCSI=y
++CONFIG_SCSI_BNX2_ISCSI=y
++CONFIG_BE2ISCSI=y
++CONFIG_SCSI_MPT2SAS=y
++CONFIG_SCSI_IBMVSCSI=y
++CONFIG_SCSI_SYM53C8XX_2=y
++CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
++CONFIG_SCSI_IPR=y
++# CONFIG_SCSI_IPR_TRACE is not set
++# CONFIG_SCSI_IPR_DUMP is not set
++CONFIG_SCSI_QLA_FC=y
++CONFIG_SCSI_QLA_ISCSI=y
++CONFIG_SCSI_LPFC=y
++CONFIG_SCSI_VIRTIO=y
++CONFIG_SCSI_DH=y
++CONFIG_SCSI_DH_ALUA=y
++CONFIG_ATA=y
++CONFIG_SATA_AHCI=y
++# CONFIG_ATA_SFF is not set
++CONFIG_MD=y
++CONFIG_BLK_DEV_MD=y
++CONFIG_MD_LINEAR=y
++CONFIG_MD_RAID0=y
++CONFIG_MD_RAID1=y
++CONFIG_MD_RAID10=y
++CONFIG_MD_RAID456=y
++CONFIG_MD_MULTIPATH=y
++CONFIG_MD_FAULTY=y
++CONFIG_BLK_DEV_DM=y
++CONFIG_DM_CRYPT=y
++CONFIG_DM_SNAPSHOT=y
++CONFIG_DM_MIRROR=y
++CONFIG_DM_ZERO=y
++CONFIG_DM_MULTIPATH=y
++CONFIG_NETCONSOLE=y
++CONFIG_TUN=y
++CONFIG_VIRTIO_NET=y
++CONFIG_VORTEX=y
++CONFIG_ACENIC=y
++CONFIG_ACENIC_OMIT_TIGON_I=y
++CONFIG_PCNET32=y
++CONFIG_TIGON3=y
++CONFIG_BNX2X=y
++CONFIG_CHELSIO_T1=y
++CONFIG_BE2NET=y
++CONFIG_S2IO=y
++CONFIG_IBMVETH=y
++CONFIG_E100=y
++CONFIG_E1000=y
++CONFIG_E1000E=y
++CONFIG_IXGB=y
++CONFIG_IXGBE=y
++CONFIG_MLX4_EN=y
++CONFIG_MYRI10GE=y
++CONFIG_QLGE=y
++CONFIG_NETXEN_NIC=y
++CONFIG_SFC=y
++# CONFIG_WLAN is not set
++# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
++CONFIG_INPUT_EVDEV=y
++CONFIG_INPUT_MISC=y
++# CONFIG_SERIO_SERPORT is not set
++CONFIG_SERIAL_8250=y
++CONFIG_SERIAL_8250_CONSOLE=y
++CONFIG_HVC_CONSOLE=y
++CONFIG_IPMI_HANDLER=y
++CONFIG_IPMI_DEVICE_INTERFACE=y
++CONFIG_IPMI_POWERNV=y
++CONFIG_HW_RANDOM=y
++CONFIG_GEN_RTC=y
++CONFIG_RAW_DRIVER=y
++CONFIG_MAX_RAW_DEVS=1024
++# CONFIG_I2C_COMPAT is not set
++CONFIG_I2C_CHARDEV=y
++# CONFIG_I2C_HELPER_AUTO is not set
++CONFIG_DRM=y
++CONFIG_DRM_RADEON=y
++CONFIG_DRM_AST=y
++CONFIG_FIRMWARE_EDID=y
++CONFIG_FB_MODE_HELPERS=y
++CONFIG_FB_OF=y
++CONFIG_FB_MATROX=y
++CONFIG_FB_MATROX_MILLENIUM=y
++CONFIG_FB_MATROX_MYSTIQUE=y
++CONFIG_FB_MATROX_G=y
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++# CONFIG_LCD_CLASS_DEVICE is not set
++# CONFIG_BACKLIGHT_GENERIC is not set
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_LOGO=y
++CONFIG_USB_HIDDEV=y
++CONFIG_USB=y
++CONFIG_USB_MON=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_EHCI_HCD=y
++# CONFIG_USB_EHCI_HCD_PPC_OF is not set
++CONFIG_USB_OHCI_HCD=y
++CONFIG_USB_STORAGE=y
++CONFIG_VIRT_DRIVERS=y
++CONFIG_VIRTIO_PCI=y
++# CONFIG_IOMMU_SUPPORT is not set
++CONFIG_EXT4_FS=y
++CONFIG_EXT4_FS_POSIX_ACL=y
++CONFIG_EXT4_FS_SECURITY=y
++CONFIG_XFS_FS=y
++CONFIG_XFS_POSIX_ACL=y
++CONFIG_BTRFS_FS=y
++CONFIG_BTRFS_FS_POSIX_ACL=y
++CONFIG_AUTOFS4_FS=y
++CONFIG_ISO9660_FS=y
++CONFIG_UDF_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_PROC_KCORE=y
++CONFIG_TMPFS=y
++CONFIG_TMPFS_POSIX_ACL=y
++CONFIG_NFS_FS=y
++CONFIG_NFS_V3_ACL=y
++CONFIG_NFS_V4=y
++CONFIG_CIFS=y
++# CONFIG_CIFS_DEBUG is not set
++CONFIG_NLS_DEFAULT="utf8"
++CONFIG_NLS_CODEPAGE_437=y
++CONFIG_NLS_ASCII=y
++CONFIG_NLS_ISO8859_1=y
++CONFIG_NLS_UTF8=y
++CONFIG_PRINTK_TIME=y
++CONFIG_DEBUG_FS=y
++CONFIG_MAGIC_SYSRQ=y
++CONFIG_DEBUG_KERNEL=y
++CONFIG_DEBUG_STACKOVERFLOW=y
++CONFIG_LOCKUP_DETECTOR=y
++CONFIG_SCHEDSTATS=y
++# CONFIG_FTRACE is not set
++CONFIG_XMON=y
++CONFIG_XMON_DEFAULT=y
++CONFIG_CRYPTO_ECHAINIV=y
++# CONFIG_CRYPTO_HW is not set
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0002-net-bnx2x-Add-shutdown-handler.patch b/openpower/linux/linux-0002-net-bnx2x-Add-shutdown-handler.patch
new file mode 100644
index 0000000..a6dd2a0
--- /dev/null
+++ b/openpower/linux/linux-0002-net-bnx2x-Add-shutdown-handler.patch
@@ -0,0 +1,28 @@
+From 28d7a2c24daad8af0089c22ee2ea94ffa57a63ff Mon Sep 17 00:00:00 2001
+From: Jeremy Kerr <jk@ozlabs.org>
+Date: Fri, 7 Mar 2014 10:17:22 +0800
+Subject: [PATCH 2/9] net/bnx2x: Add shutdown handler
+
+This change uses the existing .remove handler for device shutdown.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+index c27af12..d08fd26 100644
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -13906,6 +13906,7 @@ static struct pci_driver bnx2x_pci_driver = {
+ .name = DRV_MODULE_NAME,
+ .id_table = bnx2x_pci_tbl,
+ .probe = bnx2x_init_one,
++ .shutdown = bnx2x_remove_one,
+ .remove = bnx2x_remove_one,
+ .suspend = bnx2x_suspend,
+ .resume = bnx2x_resume,
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0003-xhci-do-not-halt-the-secondary-HCD.patch b/openpower/linux/linux-0003-xhci-do-not-halt-the-secondary-HCD.patch
new file mode 100644
index 0000000..586c97c
--- /dev/null
+++ b/openpower/linux/linux-0003-xhci-do-not-halt-the-secondary-HCD.patch
@@ -0,0 +1,42 @@
+From 4e2b4ad4e52739f9e57eb62fed48a61348d272dd Mon Sep 17 00:00:00 2001
+From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
+Date: Mon, 10 Mar 2014 13:02:13 -0300
+Subject: [PATCH 3/9] xhci: do not halt the secondary HCD
+
+We can't halt the secondary HCD, because it's also the primary HCD,
+which will cause problems if we have devices attached to the primary
+HCD, like a keyboard.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ drivers/usb/host/xhci.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
+index 526ebc0..07f9683 100644
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -659,7 +659,18 @@ static void xhci_only_stop_hcd(struct usb_hcd *hcd)
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+
+ spin_lock_irq(&xhci->lock);
+- xhci_halt(xhci);
++ /*
++ * We can't halt the secondary HCD, because it's also the
++ * primary HCD, which will cause problems if we have devices
++ * attached to the primary HCD, like a keyboard.
++ */
++ /*xhci_halt(xhci);*/
++
++ /* The shared_hcd is going to be deallocated shortly (the USB core only
++ * calls this function when allocation fails in usb_add_hcd(), or
++ * usb_remove_hcd() is called). So we need to unset xHCI's pointer.
++ */
++ xhci->shared_hcd = NULL;
+ spin_unlock_irq(&xhci->lock);
+ }
+
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0004-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch b/openpower/linux/linux-0004-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
new file mode 100644
index 0000000..ea566f0
--- /dev/null
+++ b/openpower/linux/linux-0004-xhci-Use-xhci_pci_remove-for-xhci-device-shutdown.patch
@@ -0,0 +1,27 @@
+From 778e896031b1143c90d98f1675e1fbbc3edfc044 Mon Sep 17 00:00:00 2001
+From: Thadeu Lima De Souza Cascardo <thadeul@br.ibm.com>
+Date: Tue, 25 Mar 2014 10:45:16 -0400
+Subject: [PATCH 4/9] xhci: Use xhci_pci_remove for xhci device shutdown
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ drivers/usb/host/xhci-pci.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
+index 5590eac..ed4cabd 100644
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -419,7 +419,7 @@ static struct pci_driver xhci_pci_driver = {
+ .remove = xhci_pci_remove,
+ /* suspend and resume implemented later */
+
+- .shutdown = usb_hcd_pci_shutdown,
++ .shutdown = xhci_pci_remove,
+ #ifdef CONFIG_PM
+ .driver = {
+ .pm = &usb_hcd_pci_pm_ops
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0005-drm-ast-Default-to-8bpp-on-big-endian.patch b/openpower/linux/linux-0005-drm-ast-Default-to-8bpp-on-big-endian.patch
new file mode 100644
index 0000000..70e0ffc
--- /dev/null
+++ b/openpower/linux/linux-0005-drm-ast-Default-to-8bpp-on-big-endian.patch
@@ -0,0 +1,45 @@
+From f830d515678686ba2975dca0eac47dbae77a63b3 Mon Sep 17 00:00:00 2001
+From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Date: Fri, 31 Oct 2014 15:06:38 +1100
+Subject: [PATCH 5/9] drm/ast: Default to 8bpp on big endian
+
+This chip is LE only (some versions support HW swappers but not
+the latest and the driver doesn't anyway).
+
+I tried using the "foreign endian" fb flag but it appears to be
+busted, so instead, default to endian-neutral 8bpp for BE.
+
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ drivers/gpu/drm/ast/ast_fb.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c
+index ff68eef..c532c69 100644
+--- a/drivers/gpu/drm/ast/ast_fb.c
++++ b/drivers/gpu/drm/ast/ast_fb.c
+@@ -345,7 +345,20 @@ int ast_fbdev_init(struct drm_device *dev)
+ /* disable all the possible outputs/crtcs before entering KMS mode */
+ drm_helper_disable_unused_functions(dev);
+
++ /*
++ * This chip is LE only (some versions support HW swappers but not
++ * the latest and the driver doesn't anyway).
++ *
++ * I tried using the "foreign endian" fb flag but it appears to be
++ * busted, so instead, default to endian-neutral 8bpp for BE.
++ *
++ * (and it's faster !)
++ */
++#if defined(__BIG_ENDIAN)
++ ret = drm_fb_helper_initial_config(&afbdev->helper, 8);
++#else
+ ret = drm_fb_helper_initial_config(&afbdev->helper, 32);
++#endif
+ if (ret)
+ goto fini;
+
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0006-powerpc-kexec-Reset-secondary-cpu-endianess-before-k.patch b/openpower/linux/linux-0006-powerpc-kexec-Reset-secondary-cpu-endianess-before-k.patch
new file mode 100644
index 0000000..0381305
--- /dev/null
+++ b/openpower/linux/linux-0006-powerpc-kexec-Reset-secondary-cpu-endianess-before-k.patch
@@ -0,0 +1,47 @@
+From 301de197bdeefada57511b991f67a584e3ab2c43 Mon Sep 17 00:00:00 2001
+From: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
+Date: Mon, 29 Jun 2015 13:43:51 +1000
+Subject: [PATCH 6/9] powerpc/kexec: Reset secondary cpu endianess before kexec
+
+If the target kernel does not inlcude the FIXUP_ENDIAN check, coming
+from a different-endian kernel will cause the target kernel to panic.
+All ppc64 kernels can handle starting in big-endian mode, so return to
+big-endian before branching into the target kernel.
+
+This mainly affects pseries as secondaries on powernv are returned to
+OPAL.
+
+Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/kernel/misc_64.S | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
+index 4e314b9..6e4168c 100644
+--- a/arch/powerpc/kernel/misc_64.S
++++ b/arch/powerpc/kernel/misc_64.S
+@@ -475,9 +475,18 @@ _GLOBAL(kexec_wait)
+ #ifdef CONFIG_KEXEC /* use no memory without kexec */
+ lwz r4,0(r5)
+ cmpwi 0,r4,0
+- bnea 0x60
++ beq 99b
++#ifdef CONFIG_PPC_BOOK3S_64
++ li r10,0x60
++ mfmsr r11
++ clrrdi r11,r11,1 /* Clear MSR_LE */
++ mtsrr0 r10
++ mtsrr1 r11
++ rfid
++#else
++ ba 0x60
++#endif
+ #endif
+- b 99b
+
+ /* this can be in text because we won't change it until we are
+ * running in real anyways
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0007-powerpc-kexec-Reset-HILE-before-kexec_sequence.patch b/openpower/linux/linux-0007-powerpc-kexec-Reset-HILE-before-kexec_sequence.patch
new file mode 100644
index 0000000..3fc25ca
--- /dev/null
+++ b/openpower/linux/linux-0007-powerpc-kexec-Reset-HILE-before-kexec_sequence.patch
@@ -0,0 +1,40 @@
+From a198d8086077cb97afdb24658ef549717e6bdec7 Mon Sep 17 00:00:00 2001
+From: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
+Date: Wed, 22 Jul 2015 11:09:15 +1000
+Subject: [PATCH 7/9] powerpc/kexec: Reset HILE before kexec_sequence
+
+On powernv secondary cpus are returned to OPAL, and will then enter
+the target kernel in big-endian. However if it is set the HILE bit
+will persist, causing the first exception in the target kernel to be
+delivered in litte-endian regardless of the current endianess.
+
+If running on top of OPAL make sure the HILE bit is reset once we've
+finished waiting for all of the secondaries to be returned to OPAL.
+
+Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/platforms/powernv/setup.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
+index 53737e0..59076db 100644
+--- a/arch/powerpc/platforms/powernv/setup.c
++++ b/arch/powerpc/platforms/powernv/setup.c
+@@ -243,6 +243,13 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
+ } else {
+ /* Primary waits for the secondaries to have reached OPAL */
+ pnv_kexec_wait_secondaries_down();
++
++ /*
++ * We might be running as little-endian - now that interrupts
++ * are disabled, reset the HILE bit to big-endian so we don't
++ * take interrupts in the wrong endian later
++ */
++ opal_reinit_cpus(OPAL_REINIT_CPUS_HILE_BE);
+ }
+ }
+ #endif /* CONFIG_KEXEC */
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0008-Revert-powerpc-Reject-binutils-2.24-when-building-li.patch b/openpower/linux/linux-0008-Revert-powerpc-Reject-binutils-2.24-when-building-li.patch
new file mode 100644
index 0000000..c6fb8ed
--- /dev/null
+++ b/openpower/linux/linux-0008-Revert-powerpc-Reject-binutils-2.24-when-building-li.patch
@@ -0,0 +1,38 @@
+From f738525309bdd1b85add503ddadea7968428f4d1 Mon Sep 17 00:00:00 2001
+From: Joel Stanley <joel@jms.id.au>
+Date: Fri, 11 Sep 2015 14:43:18 +0930
+Subject: [PATCH 8/9] Revert "powerpc: Reject binutils 2.24 when building
+ little endian"
+
+This reverts commit 60e065f70bdb0b0e916389024922ad40f3270c96.
+
+We know better than Michael does; we carry a patch that fixes our
+binutils.
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/Makefile | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index 05f464e..b2ae85d 100644
+--- a/arch/powerpc/Makefile
++++ b/arch/powerpc/Makefile
+@@ -358,14 +358,6 @@ checkbin:
+ echo 'disable kernel modules' ; \
+ false ; \
+ fi
+- @if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
+- && $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
+- echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
+- echo 'in some circumstances.' ; \
+- echo -n '*** Please use a different binutils version.' ; \
+- false ; \
+- fi
+-
+
+ CLEAN_FILES += $(TOUT)
+
+--
+2.5.0
+
diff --git a/openpower/linux/linux-0009-Release-4.2-openpower1.patch b/openpower/linux/linux-0009-Release-4.2-openpower1.patch
new file mode 100644
index 0000000..8d1d304
--- /dev/null
+++ b/openpower/linux/linux-0009-Release-4.2-openpower1.patch
@@ -0,0 +1,26 @@
+From a5b82ac114aaa4235f61cd2c289e3afc2aca667c Mon Sep 17 00:00:00 2001
+From: Joel Stanley <joel@jms.id.au>
+Date: Fri, 11 Sep 2015 16:09:56 +0930
+Subject: [PATCH 9/9] Release 4.2-openpower1
+
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index c361593..0d12263 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ VERSION = 4
+ PATCHLEVEL = 2
+ SUBLEVEL = 0
+-EXTRAVERSION =
++EXTRAVERSION = -openpower1
+ NAME = Hurr durr I'ma sheep
+
+ # *DOCUMENTATION*
+--
+2.5.0
+