Add two more patches for POWER

This commit is contained in:
Josh Boyer 2013-05-03 09:31:11 -04:00
parent ee95a2a44d
commit a773a38fa1
3 changed files with 92 additions and 1 deletions

View File

@ -62,7 +62,7 @@ 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 302
%global baserelease 303
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -757,6 +757,8 @@ Patch25014: blkcg-fix-scheduling-while-atomic-in-blk_queue_bypass_start.patch
Patch25015: powerpc-Add-isync-to-copy_and_flush.patch
Patch25016: powerpc-power8-Fix-secondary-CPUs-hanging-on-boot-for-HV=0.patch
Patch25017: powerpc-Fix-hardware-IRQs-with-MMU-on-exceptions-when-HV=0.patch
Patch25018: pci-Set-dev-dev.type-in-alloc_pci_dev.patch
Patch25019: powerpc-Set-default-VGA-device.patch
# END OF PATCH DEFINITIONS
@ -1464,6 +1466,8 @@ ApplyPatch blkcg-fix-scheduling-while-atomic-in-blk_queue_bypass_start.patch
ApplyPatch powerpc-Add-isync-to-copy_and_flush.patch
ApplyPatch powerpc-power8-Fix-secondary-CPUs-hanging-on-boot-for-HV=0.patch
ApplyPatch powerpc-Fix-hardware-IRQs-with-MMU-on-exceptions-when-HV=0.patch
ApplyPatch pci-Set-dev-dev.type-in-alloc_pci_dev.patch
ApplyPatch powerpc-Set-default-VGA-device.patch
# END OF PATCH APPLICATIONS
@ -2297,6 +2301,9 @@ fi
# and build.
%changelog
* Fri May 03 2013 Josh Boyer <jwboyer@redhat.com>
- Add two more patches for POWER
* Wed May 01 2013 Josh Boyer <jwboyer@redhat.com>
- Add some powerpc fixes for POWER8

View File

@ -0,0 +1,37 @@
From 88e7b167a079f090405ab4390b629b5effdab41a Mon Sep 17 00:00:00 2001
From: Brian King <brking@linux.vnet.ibm.com>
Date: Mon, 08 Apr 2013 03:05:07 +0000
Subject: pci: Set dev->dev.type in alloc_pci_dev
Set dev->dev.type in alloc_pci_dev so that archs that have their own
versions of pci_setup_device get this set properly in order to ensure
things like the boot_vga sysfs parameter get created as expected.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
(limited to 'drivers/pci/probe.c')
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b494066..92be60c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -988,7 +988,6 @@ int pci_setup_device(struct pci_dev *dev)
dev->sysdata = dev->bus->sysdata;
dev->dev.parent = dev->bus->bridge;
dev->dev.bus = &pci_bus_type;
- dev->dev.type = &pci_dev_type;
dev->hdr_type = hdr_type & 0x7f;
dev->multifunction = !!(hdr_type & 0x80);
dev->error_state = pci_channel_io_normal;
@@ -1208,6 +1207,7 @@ struct pci_dev *alloc_pci_dev(void)
return NULL;
INIT_LIST_HEAD(&dev->bus_list);
+ dev->dev.type = &pci_dev_type;
return dev;
}
--
cgit v0.9.1

View File

@ -0,0 +1,47 @@
From c2e1d84523ad2a19e5be08c1f01999cc9e82652e Mon Sep 17 00:00:00 2001
From: Brian King <brking@linux.vnet.ibm.com>
Date: Mon, 08 Apr 2013 03:05:10 +0000
Subject: powerpc: Set default VGA device
Add a PCI quirk for VGA devices on Power to set the default VGA device.
Ensures a default VGA is always set if a graphics adapter is present,
even if firmware did not initialize it. If more than one graphics
adapter is present, ensure the one initialized by firmware is set
as the default VGA device. This ensures that X autoconfiguration
will work.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
(limited to 'arch/powerpc/kernel/pci-common.c')
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 0324758..f325dc9 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -30,6 +30,7 @@
#include <linux/irq.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
+#include <linux/vgaarb.h>
#include <asm/processor.h>
#include <asm/io.h>
@@ -1734,3 +1735,15 @@ static void fixup_hide_host_resource_fsl(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
+
+static void fixup_vga(struct pci_dev *pdev)
+{
+ u16 cmd;
+
+ pci_read_config_word(pdev, PCI_COMMAND, &cmd);
+ if ((cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) || !vga_default_device())
+ vga_set_default_device(pdev);
+
+}
+DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_DISPLAY_VGA, 8, fixup_vga);
--
cgit v0.9.1