Rebase to Linux v3.5

This commit is contained in:
Josh Boyer 2012-07-26 15:12:33 -04:00
parent 63bb17548c
commit 53ecebd579
26 changed files with 658 additions and 12944 deletions

View File

@ -1,38 +0,0 @@
From 0971d87045f5052de9f16f3b1aa0dce59f59a060 Mon Sep 17 00:00:00 2001
From: Jerome Glisse <jglisse@redhat.com>
Date: Thu, 3 May 2012 19:05:40 -0400
Subject: [PATCH] drm/radeon: don't mess with hot plug detect for eDP or LVDS
connector
It seems imac pannel doesn't like whe we change the hot plug setup
and then refuse to work. This should fix :
https://bugzilla.redhat.com/show_bug.cgi?id=726143
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
---
drivers/gpu/drm/radeon/r600.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 4fbc590..5fd0490 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -713,6 +713,14 @@ void r600_hpd_init(struct radeon_device *rdev)
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+ if (connector->connector_type == DRM_MODE_CONNECTOR_eDP ||
+ connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
+ /* don't try to enable HDP on eDP or LVDS help to avoid
+ * issue such as:
+ * https://bugzilla.redhat.com/show_bug.cgi?id=726143
+ */
+ continue;
+ }
if (ASIC_IS_DCE3(rdev)) {
u32 tmp = DC_HPDx_CONNECTION_TIMER(0x9c4) | DC_HPDx_RX_INT_TIMER(0xfa);
if (ASIC_IS_DCE32(rdev))
--
1.7.7.6

View File

@ -52,9 +52,11 @@ Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c | 40 ++++++++++++++++++++++++++++++++++++----
2 files changed, 39 insertions(+), 4 deletions(-)
--- linux-3.4.6-3.1.fc17.noarch.orig/kernel/cpuset.c
+++ linux-3.4.6-3.1.fc17.noarch/kernel/cpuset.c
@@ -2065,6 +2065,9 @@ static void scan_for_empty_cpusets(struc
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 47de450..77abe1a 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2054,6 +2054,9 @@ static void scan_for_empty_cpusets(struct cpuset *root)
* (of no affect) on systems that are actively using CPU hotplug
* but making no active use of cpusets.
*
@ -64,11 +66,13 @@ Signed-off-by: Ingo Molnar <mingo@kernel.org>
* This routine ensures that top_cpuset.cpus_allowed tracks
* cpu_active_mask on each CPU hotplug (cpuhp) event.
*
--- linux-3.4.6-3.1.fc17.noarch.orig/kernel/sched/core.c
+++ linux-3.4.6-3.1.fc17.noarch/kernel/sched/core.c
@@ -6931,34 +6931,66 @@ int __init sched_create_sysfs_power_savi
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ca07ee0..e368731 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7014,34 +7014,66 @@ match2:
mutex_unlock(&sched_domains_mutex);
}
#endif /* CONFIG_SCHED_MC || CONFIG_SCHED_SMT */
+static int num_cpus_frozen; /* used to mark begin/end of suspend/resume */
+
@ -137,3 +141,6 @@ Signed-off-by: Ingo Molnar <mingo@kernel.org>
}
void __init sched_init_smp(void)
--
1.7.7.6

File diff suppressed because it is too large Load Diff

View File

@ -138,6 +138,12 @@ CONFIG_RTC_DRV_PL031=y
CONFIG_ARM_UNWIND=y
CONFIG_RCU_FANOUT=32
CONFIG_RCU_FANOUT_LEAF=8
# CONFIG_ARM_ARCH_TIMER is not set
# CONFIG_HW_RANDOM_ATMEL is not set
# CONFIG_SERIAL_8250_EM is not set
# CONFIG_SND_SIMPLE_CARD is not set
# CONFIG_USB_ULPI is not set
# CONFIG_OC_ETM is not set

View File

@ -87,3 +87,13 @@ CONFIG_LEDS_RENESAS_TPU=y
CONFIG_MFD_ANATOP=y
# CONFIG_MTD_NAND_GPMI_NAND is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_DEBUG_PINCTRL is not set
# CONFIG_PINCTRL_IMX51 is not set
# CONFIG_GPIO_EM is not set
# CONFIG_FB_IMX is not set
# CONFIG_SND_SOC_IMX_SGTL5000 is not set
# CONFIG_RTC_DRV_MXC is not set
# CONFIG_COMMON_CLK_DEBUG is not set

View File

@ -52,3 +52,13 @@ CONFIG_CRYPTO_DEV_MV_CESA=m
# CONFIG_VFPv3 is not set
# CONFIG_NEON is not set
# CONFIG_SMP is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_MACH_ICONNECT_DT is not set
# CONFIG_MACH_DLINK_KIRKWOOD_DT is not set
# CONFIG_MACH_IB62X0_DT is not set
# CONFIG_RFKILL_GPIO is not set
# CONFIG_TCM_QLA2XXX is not set
# CONFIG_GPIO_EM is not set
# CONFIG_LEDS_RENESAS_TPU is not set
# CONFIG_COMMON_CLK_DEBUG is not set

View File

@ -1085,3 +1085,24 @@ CONFIG_USB_RENESAS_USBHS_HCD=m
# CONFIG_VIDEO_AS3645A is not set
#
# CONFIG_TI_CPSW is not set
# CONFIG_SOC_TI81XX is not set
# CONFIG_SOC_AM33XX is not set
# CONFIG_MTD_NAND_OMAP_BCH is not set
# CONFIG_BMP085_SPI is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_GPIO_EM is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MC13XXX_SPI is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_VIDEO_SMIAPP is not set
# CONFIG_PANEL_TFP410 is not set
# CONFIG_SND_OMAP_SOC_OMAP_HDMI is not set
# CONFIG_USB_FUSB300 is not set
# CONFIG_USB_OMAP is not set
# CONFIG_USB_R8A66597 is not set
# CONFIG_USB_RENESAS_USBHS_UDC is not set
# CONFIG_USB_MV_UDC is not set
# CONFIG_USB_M66592 is not set
# CONFIG_USB_NET2272 is not set
# CONFIG_USB_DUMMY_HCD is not set
#

View File

@ -97,3 +97,10 @@ CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_TEGRA_IOMMU_GART=y
CONFIG_TEGRA_IOMMU_SMMU=y
# CONFIG_TEGRA_AHB is not set
# CONFIG_TCM_QLA2XXX is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_GPIO_EM is not set
# CONFIG_SND_SOC_TEGRA_WM8753 is not set

View File

@ -166,6 +166,7 @@ CONFIG_MLX4_INFINIBAND=m
CONFIG_INFINIBAND_NES=m
# CONFIG_INFINIBAND_NES_DEBUG is not set
CONFIG_INFINIBAND_QIB=m
# CONFIG_INFINIBAND_OCRDMA is not set
#
# Executable file formats
@ -186,6 +187,8 @@ CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_CMA is not set
# CONFIG_SPI is not set
#
@ -330,6 +333,7 @@ CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=m
CONFIG_VIRTIO_MMIO=m
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
CONFIG_VIRTIO_NET=m
CONFIG_VMXNET3=m
CONFIG_HW_RANDOM_VIRTIO=m
@ -472,6 +476,7 @@ CONFIG_SCSI_DC395x=m
CONFIG_SCSI_DEBUG=m
CONFIG_SCSI_DC390T=m
CONFIG_SCSI_QLA_FC=m
CONFIG_TCM_QLA2XXX=m
CONFIG_SCSI_QLA_ISCSI=m
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_DPT_I2O is not set
@ -777,6 +782,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
CONFIG_NETFILTER_XT_TARGET_CT=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HMARK=m
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
@ -1031,6 +1037,8 @@ CONFIG_NET_SCH_MQPRIO=m
CONFIG_NET_SCH_MULTIQ=m
CONFIG_NET_SCH_CHOKE=m
CONFIG_NET_SCH_QFQ=m
CONFIG_NET_SCH_CODEL=m
CONFIG_NET_SCH_FQ_CODEL=m
CONFIG_NET_SCH_PLUG=m
CONFIG_NET_CLS=y
CONFIG_NET_CLS_ACT=y
@ -1231,12 +1239,15 @@ CONFIG_E1000=m
CONFIG_E1000E=m
CONFIG_IGB=m
CONFIG_IGB_DCA=y
CONFIG_IGB_PTP=y
CONFIG_IGBVF=m
CONFIG_IXGB=m
CONFIG_IXGBEVF=m
CONFIG_IXGBE=m
CONFIG_IXGBE_DCA=y
CONFIG_IXGBE_DCB=y
CONFIG_IXGBE_HWMON=y
CONFIG_IXGBE_PTP=y
# CONFIG_NET_VENDOR_I825XX is not set
CONFIG_NET_VENDOR_MARVELL=y
@ -1335,6 +1346,10 @@ CONFIG_VIA_RHINE=m
CONFIG_VIA_RHINE_MMIO=y
CONFIG_VIA_VELOCITY=m
CONFIG_NET_VENDOR_WIZNET=y
CONFIG_WIZNET_W5100=m
CONFIG_WIZNET_W5300=m
CONFIG_NET_VENDOR_XIRCOM=y
CONFIG_PCMCIA_XIRC2PS=m
@ -1387,6 +1402,7 @@ CONFIG_JME=m
#
CONFIG_IP1000=m
CONFIG_MLX4_EN=m
CONFIG_MLX4_EN_DCB=y
# CONFIG_MLX4_DEBUG is not set
CONFIG_SFC=m
CONFIG_SFC_MCDI_MON=y
@ -1503,6 +1519,7 @@ CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
CONFIG_BRCMSMAC=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_SDIO=y
CONFIG_BRCMFMAC_SDIO_OOB=y
CONFIG_BRCMFMAC_USB=y
# CONFIG_BRCMDBG is not set
CONFIG_HERMES=m
@ -1585,6 +1602,7 @@ CONFIG_USB_NET_RNDIS_WLAN=m
CONFIG_USB_NET_KALMIA=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_NET_SMSC75XX=m
# CONFIG_WL_TI is not set
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
@ -1607,6 +1625,7 @@ CONFIG_RTL8192DE=m
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
CONFIG_MWIFIEX_PCIE=m
CONFIG_MWIFIEX_USB=m
#
# Token Ring devices
@ -1866,6 +1885,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
# CONFIG_INPUT_MATRIXKMAP is not set
CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=m
@ -1916,6 +1936,7 @@ CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_ADP5589 is not set
@ -1998,6 +2019,7 @@ CONFIG_TOUCHSCREEN_TOUCHWIN=m
CONFIG_TOUCHSCREEN_PIXCIR=m
CONFIG_TOUCHSCREEN_UCB1400=m
CONFIG_TOUCHSCREEN_WACOM_W8001=m
CONFIG_TOUCHSCREEN_WACOM_I2C=m
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
# CONFIG_TOUCHSCREEN_WM97XX is not set
@ -2252,6 +2274,7 @@ CONFIG_SENSORS_WM8350=m
CONFIG_SENSORS_WM831X=m
CONFIG_SENSORS_LM73=m
CONFIG_SENSORS_AMC6821=m
CONFIG_SENSORS_INA2XX=m
CONFIG_SENSORS_ADT7411=m
CONFIG_SENSORS_ASC7621=m
CONFIG_SENSORS_EMC1403=m
@ -2291,6 +2314,7 @@ CONFIG_SENSORS_MAX1668=m
# CONFIG_HMC6352 is not set
# CONFIG_BMP085 is not set
# CONFIG_BMP085_I2C is not set
# CONFIG_PCH_PHUB is not set
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_USB_SWITCH_FSA9480 is not set
@ -2430,12 +2454,15 @@ CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_DRM=m
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_SAVAGE is not set
CONFIG_DRM_I915=m
@ -2718,6 +2745,7 @@ CONFIG_FB=y
# CONFIG_FB_ATY_CT is not set
# CONFIG_FB_ATY_GX is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_AUO_K190X is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
@ -3038,7 +3066,8 @@ CONFIG_USB_HID=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
CONFIG_HID=y
CONFIG_HID_BATTERY_STRENGTH=y
# debugging default is y upstream now
CONFIG_HIDRAW=y
CONFIG_HID_PID=y
@ -3103,6 +3132,8 @@ CONFIG_HID_WIIMOTE_EXT=y
CONFIG_HID_KYE=m
CONFIG_HID_SAITEK=m
CONFIG_HID_TIVO=m
CONFIG_HID_GENERIC=y
CONFIG_HID_AUREAL=m
#
# USB Imaging devices
@ -3214,6 +3245,7 @@ CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
# CONFIG_USB_MUSB_HDRC is not set
# CONFIG_USB_CHIPIDEA is not set
#
# USB port drivers
@ -3290,6 +3322,7 @@ CONFIG_USB_SERIAL_QCAUX=m
CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m
CONFIG_USB_SERIAL_DEBUG=m
CONFIG_USB_SERIAL_SSU100=m
CONFIG_USB_SERIAL_QT2=m
CONFIG_USB_SERIAL_CONSOLE=y
@ -3351,6 +3384,8 @@ CONFIG_USB_ZERO=m
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
# CONFIG_USB_ISP1301 is not set
# CONFIG_USB_OTG is not set
#
@ -3389,6 +3424,7 @@ CONFIG_MFD_WM8400=m
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_LPC_SCH is not set
# CONFIG_LPC_ICH is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_ASIC3 is not set
@ -3405,6 +3441,8 @@ CONFIG_MFD_WM8400=m
# CONFIG_MFD_TC3589X is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_TPS65217 is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_MC13XXX_I2C is not set
#
# File systems
@ -3541,6 +3579,7 @@ CONFIG_CUSE=m
#
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
@ -3675,6 +3714,17 @@ CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_MAC_ROMAN=m
CONFIG_NLS_MAC_CELTIC=m
CONFIG_NLS_MAC_CENTEURO=m
CONFIG_NLS_MAC_CROATIAN=m
CONFIG_NLS_MAC_CYRILLIC=m
CONFIG_NLS_MAC_GAELIC=m
CONFIG_NLS_MAC_GREEK=m
CONFIG_NLS_MAC_ICELAND=m
CONFIG_NLS_MAC_INUIT=m
CONFIG_NLS_MAC_ROMANIAN=m
CONFIG_NLS_MAC_TURKISH=m
CONFIG_NLS_UTF8=m
CONFIG_NLS_ASCII=y
@ -3697,6 +3747,7 @@ CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_DRIVER is not set
CONFIG_HEADERS_CHECK=y
# CONFIG_LKDTM is not set
# CONFIG_READABLE_ASM is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_LOCKDEP is not set
@ -3730,6 +3781,7 @@ CONFIG_LOCKUP_DETECTOR=y
CONFIG_ATOMIC64_SELFTEST=y
CONFIG_MEMORY_FAILURE=y
CONFIG_HWPOISON_INJECT=m
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_DEBUG_SECTION_MISMATCH is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
CONFIG_LATENCYTOP=y
@ -3862,6 +3914,7 @@ CONFIG_CRC_T10DIF=m
CONFIG_CRC8=m
# CONFIG_CRC7 is not set
CONFIG_CORDIC=m
# CONFIG_DDR is not set
CONFIG_CRYPTO_ZLIB=m
CONFIG_ZLIB_INFLATE=y
@ -3948,6 +4001,8 @@ CONFIG_PM_TRACE_RTC=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_RUNTIME=y
# CONFIG_PM_OPP is not set
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
@ -4022,6 +4077,7 @@ CONFIG_LEDS_TRIGGER_IDE_DISK=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
CONFIG_LEDS_TRIGGER_TRANSIENT=m
CONFIG_LEDS_ALIX2=m
CONFIG_LEDS_CLEVO_MAIL=m
CONFIG_LEDS_INTEL_SS4200=m
@ -4082,7 +4138,7 @@ CONFIG_CFAG12864B_RATE=20
# CONFIG_PHANTOM is not set
# CONFIG_INTEL_MID_PTI is not set
CONFIG_POWER_SUPPLY=m
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_TEST_POWER is not set
@ -4197,6 +4253,8 @@ CONFIG_USB_WUSB_CBAF=m
# CONFIG_USB_WUSB_CBAF_DEBUG is not set
CONFIG_USB_WHCI_HCD=m
CONFIG_USB_HWA_HCD=m
# CONFIG_USB_HCD_BCMA is not set
# CONFIG_USB_HCD_SSB is not set
CONFIG_UWB=m
CONFIG_UWB_HWA=m
@ -4267,6 +4325,8 @@ CONFIG_ALTERA_STAPL=m
# CONFIG_ZSMALLOC is not set
# CONFIG_RAMSTER is not set
# CONFIG_USB_WPAN_HCD is not set
# CONFIG_WIMAX_GDM72XX is not set
# CONFIG_IPACK_BUS is not set
#
# END OF STAGING
@ -4307,6 +4367,12 @@ CONFIG_IEEE802154=m
CONFIG_IEEE802154_6LOWPAN=m
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKEHARD=m
CONFIG_IEEE802154_FAKELB=m
CONFIG_MAC802154=m
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
CONFIG_PPS=m
# CONFIG_PPS_CLIENT_KTIMER is not set
@ -4321,6 +4387,7 @@ CONFIG_PTP_1588_CLOCK=m
CONFIG_PTP_1588_CLOCK_PCH=m
CONFIG_CLEANCACHE=y
CONFIG_FRONTSWAP=y
# CONFIG_MDIO_GPIO is not set
# CONFIG_KEYBOARD_GPIO is not set
@ -4362,6 +4429,7 @@ CONFIG_TEST_KSTRTOX=y
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
CONFIG_LOOPBACK_TARGET=m
CONFIG_SBP_TARGET=m
CONFIG_TCM_IBLOCK=m
CONFIG_TCM_FILEIO=m
CONFIG_TCM_PSCSI=m
@ -4370,6 +4438,7 @@ CONFIG_TCM_FC=m
CONFIG_HWSPINLOCK=m
CONFIG_PSTORE=y
CONFIG_PSTORE_RAM=m
# CONFIG_AVERAGE is not set

View File

@ -359,6 +359,9 @@ CONFIG_RFKILL_GPIO=m
# CONFIG_INPUT_GPIO_TILT_POLLED is not set
CONFIG_STRICT_DEVMEM=y
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_IRQ_DOMAIN_DEBUG is not set
# CONFIG_MPIC_MSGR is not set
# CONFIG_FA_DUMP is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set

View File

@ -1,6 +1,8 @@
CONFIG_WINDFARM_PM72=y
CONFIG_WINDFARM_PM81=y
CONFIG_WINDFARM_PM91=y
CONFIG_WINDFARM_PM121=y
CONFIG_WINDFARM_RM31=y
CONFIG_PPC_PMAC64=y
CONFIG_PPC_MAPLE=y
# CONFIG_PPC_CELL is not set
@ -161,6 +163,10 @@ CONFIG_PPC_ICSWX=y
CONFIG_IO_EVENT_IRQ=y
CONFIG_HW_RANDOM_AMD=m
# CONFIG_HW_RANDOM_PSERIES is not set
# CONFIG_CRYPTO_DEV_NX is not set
CONFIG_BPF_JIT=y
# CONFIG_PPC_ICSWX_PID is not set
# CONFIG_PPC_ICSWX_USE_SIGILL is not set

View File

@ -211,6 +211,7 @@ CONFIG_CHSC_SCH=m
CONFIG_HVC_IUCV=y
CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
CONFIG_SECCOMP=y

View File

@ -173,6 +173,7 @@ CONFIG_LEDS_SUNFIRE=m
CONFIG_TADPOLE_TS102_UCTRL=m
CONFIG_RCU_FANOUT=64
CONFIG_RCU_FANOUT_LEAF=16
CONFIG_LIRC_ENE0100=m
# CONFIG_BATTERY_DS2782 is not set
@ -196,3 +197,5 @@ CONFIG_CRYPTO_DEV_NIAGARA2=y
# CONFIG_MTD_PHYSMAP_OF is not set
# CONFIG_MMC_SDHCI_OF is not set
# CONFIG_OF_SELFTEST is not set
CONFIG_BPF_JIT=y

View File

@ -27,6 +27,7 @@ CONFIG_M686=y
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_STA2X11 is not set
CONFIG_NR_CPUS=32
CONFIG_X86_GENERIC=y
@ -212,5 +213,6 @@ CONFIG_I2O_BUS=m
# CONFIG_INPUT_GPIO_TILT_POLLED is not set
# CONFIG_GEOS is not set
# CONFIG_NET5501 is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_GPIO_SODAVILLE is not set
# CONFIG_BACKLIGHT_OT200 is not set

View File

@ -222,6 +222,7 @@ CONFIG_XO15_EBOOK=m
# CONFIG_SMSC37B787_WDT is not set
CONFIG_W83697HF_WDT=m
CONFIG_VIA_WDT=m
CONFIG_IE6XX_WDT=m
CONFIG_CRASH_DUMP=y
CONFIG_PROC_VMCORE=y
@ -354,6 +355,9 @@ CONFIG_TOSHIBA_BT_RFKILL=m
CONFIG_VGA_SWITCHEROO=y
CONFIG_LPC_SCH=m
CONFIG_LPC_ICH=m
CONFIG_GPIO_ICH=m
CONFIG_PCI_CNB20LE_QUIRK=y
@ -409,7 +413,10 @@ CONFIG_DRM_GMA500=m
# CONFIG_DRM_GMA600 is not set
CONFIG_DRM_GMA3600=y
CONFIG_RCU_FANOUT_LEAF=16
# Maybe enable in debug kernels?
# CONFIG_DEBUG_NMI_SELFTEST is not set
CONFIG_APPLE_GMUX=m
CONFIG_INTEL_MEI=m

View File

@ -1,60 +0,0 @@
From b6e2dca9522bfe0f5d54051b00c2ffd11fbf3204 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 30 May 2012 16:42:39 -0400
Subject: [PATCH] drm/edid: Make the header fixup threshold tunable
6 bytes seems to be a reasonable default so far, but for the desperate
it's worth exposing this.
[airlied: change include to module.h for this]
Bugzilla: https://bugzilla.redhat.com/582559
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/drm_edid.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5a18b0d..0a407dbc 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -30,7 +30,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/i2c.h>
-#include <linux/export.h>
+#include <linux/module.h>
#include "drmP.h"
#include "drm_edid.h"
#include "drm_edid_modes.h"
@@ -145,6 +145,11 @@ int drm_edid_header_is_valid(const u8 *raw_edid)
EXPORT_SYMBOL(drm_edid_header_is_valid);
+static int edid_fixup __read_mostly = 6;
+module_param_named(edid_fixup, edid_fixup, int, 0400);
+MODULE_PARM_DESC(edid_fixup,
+ "Minimum number of valid EDID header bytes (0-8, default 6)");
+
/*
* Sanity check the EDID block (base or extension). Return 0 if the block
* doesn't check out, or 1 if it's valid.
@@ -155,10 +160,13 @@ bool drm_edid_block_valid(u8 *raw_edid)
u8 csum = 0;
struct edid *edid = (struct edid *)raw_edid;
+ if (edid_fixup > 8 || edid_fixup < 0)
+ edid_fixup = 6;
+
if (raw_edid[0] == 0x00) {
int score = drm_edid_header_is_valid(raw_edid);
if (score == 8) ;
- else if (score >= 6) {
+ else if (score >= edid_fixup) {
DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
memcpy(raw_edid, edid_header, sizeof(edid_header));
} else {
--
1.7.10.2

View File

@ -1,161 +0,0 @@
From b03543857fd75876b96e10d4320b775e95041bb7 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 20 Mar 2012 12:07:05 +0000
Subject: drm/i915: Check VBIOS value for determining LVDS dual channel mode, too
Currently i915 driver checks [PCH_]LVDS register bits to decide
whether to set up the dual-link or the single-link mode. This relies
implicitly on that BIOS initializes the register properly at boot.
However, BIOS doesn't initialize it always. When the machine is
booted with the closed lid, BIOS skips the LVDS reg initialization.
This ends up in blank output on a machine with a dual-link LVDS when
you open the lid after the boot.
This patch adds a workaround for that problem by checking the initial
LVDS register value in VBT.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37742
Tested-By: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b6098b0..4cbed7f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -406,6 +406,8 @@ typedef struct drm_i915_private {
unsigned int lvds_use_ssc:1;
unsigned int display_clock_mode:1;
int lvds_ssc_freq;
+ unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */
+ unsigned int lvds_val; /* used for checking LVDS channel mode */
struct {
int rate;
int lanes;
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 0ae76d6..e4317da 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -173,6 +173,28 @@ get_lvds_dvo_timing(const struct bdb_lvds_lfp_data *lvds_lfp_data,
return (struct lvds_dvo_timing *)(entry + dvo_timing_offset);
}
+/* get lvds_fp_timing entry
+ * this function may return NULL if the corresponding entry is invalid
+ */
+static const struct lvds_fp_timing *
+get_lvds_fp_timing(const struct bdb_header *bdb,
+ const struct bdb_lvds_lfp_data *data,
+ const struct bdb_lvds_lfp_data_ptrs *ptrs,
+ int index)
+{
+ size_t data_ofs = (const u8 *)data - (const u8 *)bdb;
+ u16 data_size = ((const u16 *)data)[-1]; /* stored in header */
+ size_t ofs;
+
+ if (index >= ARRAY_SIZE(ptrs->ptr))
+ return NULL;
+ ofs = ptrs->ptr[index].fp_timing_offset;
+ if (ofs < data_ofs ||
+ ofs + sizeof(struct lvds_fp_timing) > data_ofs + data_size)
+ return NULL;
+ return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
+}
+
/* Try to find integrated panel data */
static void
parse_lfp_panel_data(struct drm_i915_private *dev_priv,
@@ -182,6 +204,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
const struct bdb_lvds_lfp_data *lvds_lfp_data;
const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
const struct lvds_dvo_timing *panel_dvo_timing;
+ const struct lvds_fp_timing *fp_timing;
struct drm_display_mode *panel_fixed_mode;
int i, downclock;
@@ -243,6 +266,19 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
"Normal Clock %dKHz, downclock %dKHz\n",
panel_fixed_mode->clock, 10*downclock);
}
+
+ fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
+ lvds_lfp_data_ptrs,
+ lvds_options->panel_type);
+ if (fp_timing) {
+ /* check the resolution, just to be sure */
+ if (fp_timing->x_res == panel_fixed_mode->hdisplay &&
+ fp_timing->y_res == panel_fixed_mode->vdisplay) {
+ dev_priv->bios_lvds_val = fp_timing->lvds_reg_val;
+ DRM_DEBUG_KMS("VBT initial LVDS value %x\n",
+ dev_priv->bios_lvds_val);
+ }
+ }
}
/* Try to find sdvo panel data */
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 683002fb..a76ac2e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -360,6 +360,27 @@ static const intel_limit_t intel_limits_ironlake_display_port = {
.find_pll = intel_find_pll_ironlake_dp,
};
+static bool is_dual_link_lvds(struct drm_i915_private *dev_priv,
+ unsigned int reg)
+{
+ unsigned int val;
+
+ if (dev_priv->lvds_val)
+ val = dev_priv->lvds_val;
+ else {
+ /* BIOS should set the proper LVDS register value at boot, but
+ * in reality, it doesn't set the value when the lid is closed;
+ * we need to check "the value to be set" in VBT when LVDS
+ * register is uninitialized.
+ */
+ val = I915_READ(reg);
+ if (!(val & ~LVDS_DETECTED))
+ val = dev_priv->bios_lvds_val;
+ dev_priv->lvds_val = val;
+ }
+ return (val & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP;
+}
+
static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc,
int refclk)
{
@@ -368,8 +389,7 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc,
const intel_limit_t *limit;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
- if ((I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) ==
- LVDS_CLKB_POWER_UP) {
+ if (is_dual_link_lvds(dev_priv, PCH_LVDS)) {
/* LVDS dual channel */
if (refclk == 100000)
limit = &intel_limits_ironlake_dual_lvds_100m;
@@ -397,8 +417,7 @@ static const intel_limit_t *intel_g4x_limit(struct drm_crtc *crtc)
const intel_limit_t *limit;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
- if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
- LVDS_CLKB_POWER_UP)
+ if (is_dual_link_lvds(dev_priv, LVDS))
/* LVDS with dual channel */
limit = &intel_limits_g4x_dual_channel_lvds;
else
@@ -536,8 +555,7 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
* reliably set up different single/dual channel state, if we
* even can.
*/
- if ((I915_READ(LVDS) & LVDS_CLKB_POWER_MASK) ==
- LVDS_CLKB_POWER_UP)
+ if (is_dual_link_lvds(dev_priv, LVDS))
clock.p2 = limit->p2.p2_fast;
else
clock.p2 = limit->p2.p2_slow;
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,104 +0,0 @@
Linux runs in non-secure mode on highbank, so we need secure monitor calls
to enable and disable the PL310. Rather than invent new smc calls, the same
calling convention used by OMAP is used here.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-highbank/Makefile | 6 +++++-
arch/arm/mach-highbank/core.h | 1 +
arch/arm/mach-highbank/highbank.c | 14 ++++++++++++++
arch/arm/mach-highbank/smc.S | 29 +++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/mach-highbank/smc.S
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile
index f8437dd..ded4652 100644
--- a/arch/arm/mach-highbank/Makefile
+++ b/arch/arm/mach-highbank/Makefile
@@ -1,4 +1,8 @@
-obj-y := clock.o highbank.o system.o
+obj-y := clock.o highbank.o system.o smc.o
+
+plus_sec := $(call as-instr,.arch_extension sec,+sec)
+AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec)
+
obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o
obj-$(CONFIG_SMP) += platsmp.o
obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h
index d8e2d0b..141ed51 100644
--- a/arch/arm/mach-highbank/core.h
+++ b/arch/arm/mach-highbank/core.h
@@ -8,3 +8,4 @@ extern void highbank_lluart_map_io(void);
static inline void highbank_lluart_map_io(void) {}
#endif
+extern void highbank_smc1(int fn, int arg);
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 410a112..8777612 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -85,10 +85,24 @@ const static struct of_device_id irq_match[] = {
{}
};
+#ifdef CONFIG_CACHE_L2X0
+static void highbank_l2x0_disable(void)
+{
+ /* Disable PL310 L2 Cache controller */
+ highbank_smc1(0x102, 0x0);
+}
+#endif
+
static void __init highbank_init_irq(void)
{
of_irq_init(irq_match);
+
+#ifdef CONFIG_CACHE_L2X0
+ /* Enable PL310 L2 Cache controller */
+ highbank_smc1(0x102, 0x1);
l2x0_of_init(0, ~0UL);
+ outer_cache.disable = highbank_l2x0_disable;
+#endif
}
static void __init highbank_timer_init(void)
diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S
new file mode 100644
index 0000000..bba369e
--- /dev/null
+++ b/arch/arm/mach-highbank/smc.S
@@ -0,0 +1,29 @@
+/*
+ * Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc.
+ * Copyright 2012 Calxeda, Inc.
+ *
+ * This program is free software,you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+
+/*
+ * This is common routine to manage secure monitor API
+ * used to modify the PL310 secure registers.
+ * 'r0' contains the value to be modified and 'r12' contains
+ * the monitor API number. It uses few CPU registers
+ * internally and hence they need be backed up including
+ * link register "lr".
+ * Function signature : void highbank_smc1(u32 fn, u32 arg)
+ */
+
+ENTRY(highbank_smc1)
+ stmfd sp!, {r2-r12, lr}
+ mov r12, r0
+ mov r0, r1
+ dsb
+ smc #0
+ ldmfd sp!, {r2-r12, pc}
+ENDPROC(highbank_smc1)
--
1.7.9.5

View File

@ -54,19 +54,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 4
%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
# on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
# which yields a base_sublevel of 21.
%define base_sublevel 4
%define base_sublevel 5
## If this is a released kernel ##
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 6
%define stable_update 0
# Is it a -stable RC?
%define stable_rc 0
# Set rpm version accordingly
@ -677,7 +677,6 @@ Patch1555: fix_xen_guest_on_old_EC2.patch
# DRM
#atch1700: drm-edid-try-harder-to-fix-up-broken-headers.patch
Patch1800: drm-vgem.patch
Patch1810: drm-edid-Make-the-header-fixup-threshold-tunable.patch
# nouveau + drm fixes
# intel drm is all merged upstream
@ -686,8 +685,6 @@ Patch1825: drm-i915-dp-stfu.patch
Patch1900: linux-2.6-intel-iommu-igfx.patch
Patch1952: drm-i915-lvds-dual-channel.patch
# Quiet boot fixes
# silence the ACPI blacklist code
Patch2802: linux-2.6-silence-acpi-blacklist.patch
@ -715,27 +712,23 @@ Patch14015: team-update-from-net-next.patch
Patch19000: ips-noirq.patch
# Uprobes (rhbz 832083)
Patch20000: uprobes-3.4-backport.patch
Patch20001: uprobes-3.4-tip.patch
Patch20002: uprobes-task_work_add-generic-process-context-callbacks.patch
# ARM
# Flattened devicetree support
Patch21000: arm-omap-dt-compat.patch
Patch21001: arm-smsc-support-reading-mac-address-from-device-tree.patch
# drm register derived from http://www.digipedia.pl/usenet/thread/19013/36923/
Patch21002: arm-omap-drm-register.patch
#atch21002: arm-omap-drm-register.patch
# ARM tegra
Patch21004: arm-tegra-nvec-kconfig.patch
Patch21005: arm-tegra-usb-no-reset-linux33.patch
Patch21006: arm-beagle-usb-init.patch
#atch21006: arm-beagle-usb-init.patch
# ARM highbank patches
# Highbank clock functions need to be EXPORT for module builds
Patch21010: highbank-export-clock-functions.patch
# http://lists.arm.linux.org.uk/lurker/message/20120605.031140.e7d9b601.en.html
Patch21011: highbank-secure-smc.patch
Patch21094: power-x86-destdir.patch
@ -749,8 +742,6 @@ Patch21306: shlib_base_randomize.patch
Patch21400: unhandled-irqs-switch-to-polling.patch
Patch21620: vgaarb-vga_default_device.patch
Patch22000: weird-root-dentry-name-debug.patch
#selinux ptrace child permissions
@ -758,12 +749,6 @@ Patch22001: selinux-apply-different-permission-to-ptrace-child.patch
Patch22014: efifb-skip-DMI-checks-if-bootloader-knows.patch
#rhbz 726143
Patch22017: 0001-drm-radeon-don-t-mess-with-hot-plug-detect-for-eDP-o.patch
#rhbz 749276
Patch22018: atl1c_net_next_update-3.4.patch
#Fix FIPS for aesni hardare
Patch22055: crypto-testmgr-allow-aesni-intel-and-ghash_clmulni-intel.patch
Patch22056: crypto-aesni-intel-fix-wrong-kfree-pointer.patch
@ -1339,8 +1324,8 @@ ApplyPatch taint-rss.patch
# ApplyPatch arm-smsc-support-reading-mac-address-from-device-tree.patch
ApplyPatch arm-tegra-nvec-kconfig.patch
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
ApplyPatch arm-beagle-usb-init.patch
ApplyPatch arm-omap-drm-register.patch
#pplyPatch arm-beagle-usb-init.patch
#pplyPatch arm-omap-drm-register.patch
#
# bugfixes to drivers and filesystems
@ -1416,7 +1401,6 @@ ApplyPatch fix_xen_guest_on_old_EC2.patch
# DRM core
#ApplyPatch drm-edid-try-harder-to-fix-up-broken-headers.patch
ApplyPatch drm-vgem.patch
ApplyPatch drm-edid-Make-the-header-fixup-threshold-tunable.patch
# Nouveau DRM
@ -1426,8 +1410,6 @@ ApplyPatch drm-i915-dp-stfu.patch
ApplyPatch linux-2.6-intel-iommu-igfx.patch
ApplyPatch drm-i915-lvds-dual-channel.patch
# silence the ACPI blacklist code
ApplyPatch linux-2.6-silence-acpi-blacklist.patch
ApplyPatch quite-apm.patch
@ -1453,9 +1435,7 @@ ApplyPatch team-update-from-net-next.patch
ApplyPatch ips-noirq.patch
# Uprobes (rhbz 832083)
ApplyPatch uprobes-3.4-backport.patch
ApplyPatch uprobes-3.4-tip.patch
ApplyPatch uprobes-task_work_add-generic-process-context-callbacks.patch
ApplyPatch power-x86-destdir.patch
@ -1468,22 +1448,12 @@ ApplyPatch weird-root-dentry-name-debug.patch
#Highbank clock functions
ApplyPatch highbank-export-clock-functions.patch
ApplyPatch highbank-secure-smc.patch
#selinux ptrace child permissions
ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch
#vgaarb patches. blame mjg59
ApplyPatch vgaarb-vga_default_device.patch
ApplyPatch efifb-skip-DMI-checks-if-bootloader-knows.patch
#rhbz 726143
ApplyPatch 0001-drm-radeon-don-t-mess-with-hot-plug-detect-for-eDP-o.patch
#rhbz 749276
ApplyPatch atl1c_net_next_update-3.4.patch
#Fix FIPS for aesni hardare
ApplyPatch crypto-testmgr-allow-aesni-intel-and-ghash_clmulni-intel.patch
ApplyPatch crypto-aesni-intel-fix-wrong-kfree-pointer.patch
@ -2361,6 +2331,9 @@ fi
# '-' | |
# '-'
%changelog
* Thu Jul 26 2012 Josh Boyer <jwboyer@redhat.com>
- Rebase to Linux v3.5
* Thu Jul 26 2012 Josh Boyer <jwboyer@redhat.com>
- kernel: recv{from,msg}() on an rds socket can leak kernel
memory (rhbz 820039 843554)

View File

@ -1,32 +1,20 @@
From b2c6d55b2351152696aafb8c9bf3ec8968acf77c Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
Date: Mon, 29 Mar 2010 23:59:58 -0400
Subject: linux-2.6-input-kill-stupid-messages
---
drivers/input/keyboard/atkbd.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index d358ef8..38db098 100644
index add5ffd..5eb2f03 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -425,11 +426,15 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
@@ -430,11 +430,15 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
goto out;
case ATKBD_RET_ACK:
case ATKBD_RET_NAK:
+#if 0
+# if 0
+ /* Quite a few key switchers and other tools trigger this
+ * and it confuses people who can do nothing about it */
if (printk_ratelimit())
dev_warn(&serio->dev,
"Spurious %s on %s. "
"Some program might be trying access hardware directly.\n",
"Some program might be trying to access hardware directly.\n",
data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
+#endif
goto out;
case ATKBD_RET_ERR:
atkbd->err_count++;
--
1.7.0.1

View File

@ -1,4 +1,4 @@
From f072f7db2194c8255c003d985b61ad2f97ebbee0 Mon Sep 17 00:00:00 2001
From b707aea6a4947c3806ced2c23e889943a0f36876 Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland@redhat.com>
Date: Mon, 6 Oct 2008 23:03:03 -0700
Subject: [PATCH] kbuild: AFTER_LINK
@ -7,24 +7,9 @@ If the make variable AFTER_LINK is set, it is a command line to run
after each final link. This includes vmlinux itself and vDSO images.
Signed-off-by: Roland McGrath <roland@redhat.com>
---
diff --git a/Makefile b/Makefile
index f908acc..960ff6f 100644
--- a/Makefile
+++ b/Makefile
@@ -746,6 +746,10 @@ quiet_cmd_vmlinux__ ?= LD $@
--start-group $(vmlinux-main) --end-group \
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)
+ifdef AFTER_LINK
+cmd_vmlinux__ += ; $(AFTER_LINK)
+endif
+
# Generate new vmlinux version
quiet_cmd_vmlinux_version = GEN .version
cmd_vmlinux_version = set -e; \
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index 51ead52..ad21273 100644
index 9a7946c..28d6765 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -41,7 +41,8 @@ $(obj-vdso32): %.o: %.S
@ -38,7 +23,7 @@ index 51ead52..ad21273 100644
cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index 79da65d..f11c21b 100644
index 8c500d8..d27737b 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -36,7 +36,8 @@ $(obj-vdso64): %.o: %.S
@ -51,11 +36,39 @@ index 79da65d..f11c21b 100644
quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index 8ad2b34..e153572 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -43,7 +43,8 @@ $(obj-vdso32): %.o: %.S
# actual build commands
quiet_cmd_vdso32ld = VDSO32L $@
- cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
+ cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
quiet_cmd_vdso32as = VDSO32A $@
cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $<
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index 2a8ddfd..452ca53 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -43,7 +43,8 @@ $(obj-vdso64): %.o: %.S
# actual build commands
quiet_cmd_vdso64ld = VDSO64L $@
- cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
+ cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 4a2afa1..12ad9f7 100644
index fd14be1..1f3eb19 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -120,8 +120,9 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE
@@ -178,8 +178,9 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE
quiet_cmd_vdso = VDSO $@
cmd_vdso = $(CC) -nostdlib -o $@ \
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
@ -67,32 +80,21 @@ index 4a2afa1..12ad9f7 100644
VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
GCOV_PROFILE := n
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index cd9c6c6..3edf048 100644
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -65,6 +65,10 @@ vmlinux_link()
-lutil ${1}
rm -f linux
fi
+ if [ -n "${AFTER_LINK}" ]; then
+ /usr/lib/rpm/debugedit -b ${RPM_BUILD_DIR} -d /usr/src/debug -i ${2} \
+ > ${2}.id
+ fi
}
--
1.7.7.6
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index d13e875..28a3e1ad 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -40,7 +40,8 @@ $(obj-vdso32): %.o: %.S
# actual build commands
quiet_cmd_vdso32ld = VDSO32L $@
- cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
+ cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
quiet_cmd_vdso32as = VDSO32A $@
cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $<
diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile
index 449352d..e90e656 100644
--- a/arch/s390/kernel/vdso64/Makefile
+++ b/arch/s390/kernel/vdso64/Makefile
@@ -40,7 +40,8 @@ $(obj-vdso64): %.o: %.S
# actual build commands
quiet_cmd_vdso64ld = VDSO64L $@
- cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
+ cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
quiet_cmd_vdso64as = VDSO64A $@
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<

View File

@ -1,2 +1 @@
967f72983655e2479f951195953e8480 linux-3.4.tar.xz
14443e53d3ab88e6eac45d954d891e00 patch-3.4.6.xz
24153eaaa81dedc9481ada8cd9c3b83d linux-3.5.tar.xz

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,249 +0,0 @@
FYI. This patch is upstream since linux-3.5. Backported in order to
bring SystemTap functionality back after the switch to linux-3.4 that
doesn't have utrace. :)
The split-out series is available in the git repository at:
git://fedorapeople.org/home/fedora/aarapov/public_git/kernel-uprobes.git
Oleg Nesterov (1):
task_work_add: generic process-context callbacks
Signed-off-by: Anton Arapov <anton@redhat.com>
---
include/linux/sched.h | 2 ++
include/linux/task_work.h | 33 ++++++++++++++++++
include/linux/tracehook.h | 11 ++++++
kernel/Makefile | 2 +-
kernel/exit.c | 5 ++-
kernel/fork.c | 1 +
kernel/task_work.c | 84 +++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 136 insertions(+), 2 deletions(-)
create mode 100644 include/linux/task_work.h
create mode 100644 kernel/task_work.c
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6869c60..e011a11 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1445,6 +1445,8 @@ struct task_struct {
int (*notifier)(void *priv);
void *notifier_data;
sigset_t *notifier_mask;
+ struct hlist_head task_works;
+
struct audit_context *audit_context;
#ifdef CONFIG_AUDITSYSCALL
uid_t loginuid;
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
new file mode 100644
index 0000000..294d5d5
--- /dev/null
+++ b/include/linux/task_work.h
@@ -0,0 +1,33 @@
+#ifndef _LINUX_TASK_WORK_H
+#define _LINUX_TASK_WORK_H
+
+#include <linux/list.h>
+#include <linux/sched.h>
+
+struct task_work;
+typedef void (*task_work_func_t)(struct task_work *);
+
+struct task_work {
+ struct hlist_node hlist;
+ task_work_func_t func;
+ void *data;
+};
+
+static inline void
+init_task_work(struct task_work *twork, task_work_func_t func, void *data)
+{
+ twork->func = func;
+ twork->data = data;
+}
+
+int task_work_add(struct task_struct *task, struct task_work *twork, bool);
+struct task_work *task_work_cancel(struct task_struct *, task_work_func_t);
+void task_work_run(void);
+
+static inline void exit_task_work(struct task_struct *task)
+{
+ if (unlikely(!hlist_empty(&task->task_works)))
+ task_work_run();
+}
+
+#endif /* _LINUX_TASK_WORK_H */
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 51bd91d..48c597d 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -49,6 +49,7 @@
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <linux/security.h>
+#include <linux/task_work.h>
struct linux_binprm;
/*
@@ -165,8 +166,10 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info,
*/
static inline void set_notify_resume(struct task_struct *task)
{
+#ifdef TIF_NOTIFY_RESUME
if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME))
kick_process(task);
+#endif
}
/**
@@ -184,6 +187,14 @@ static inline void set_notify_resume(struct task_struct *task)
*/
static inline void tracehook_notify_resume(struct pt_regs *regs)
{
+ /*
+ * The caller just cleared TIF_NOTIFY_RESUME. This barrier
+ * pairs with task_work_add()->set_notify_resume() after
+ * hlist_add_head(task->task_works);
+ */
+ smp_mb__after_clear_bit();
+ if (unlikely(!hlist_empty(&current->task_works)))
+ task_work_run();
}
#endif /* TIF_NOTIFY_RESUME */
diff --git a/kernel/Makefile b/kernel/Makefile
index cb41b95..2479528 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -5,7 +5,7 @@
obj-y = fork.o exec_domain.o panic.o printk.o \
cpu.o exit.o itimer.o time.o softirq.o resource.o \
sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \
- signal.o sys.o kmod.o workqueue.o pid.o \
+ signal.o sys.o kmod.o workqueue.o pid.o task_work.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
diff --git a/kernel/exit.c b/kernel/exit.c
index d8bd3b42..b82c38e 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -946,11 +946,14 @@ void do_exit(long code)
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against
- * an exiting task cleaning up the robust pi futexes.
+ * an exiting task cleaning up the robust pi futexes, and in
+ * task_work_add() to avoid the race with exit_task_work().
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
+ exit_task_work(tsk);
+
exit_irq_thread();
if (unlikely(in_atomic()))
diff --git a/kernel/fork.c b/kernel/fork.c
index 5b87e9f..76a961d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1391,6 +1391,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
*/
p->group_leader = p;
INIT_LIST_HEAD(&p->thread_group);
+ INIT_HLIST_HEAD(&p->task_works);
/* Now that the task is set up, run cgroup callbacks if
* necessary. We need to run them before the task is visible
diff --git a/kernel/task_work.c b/kernel/task_work.c
new file mode 100644
index 0000000..82d1c79
--- /dev/null
+++ b/kernel/task_work.c
@@ -0,0 +1,84 @@
+#include <linux/spinlock.h>
+#include <linux/task_work.h>
+#include <linux/tracehook.h>
+
+int
+task_work_add(struct task_struct *task, struct task_work *twork, bool notify)
+{
+ unsigned long flags;
+ int err = -ESRCH;
+
+#ifndef TIF_NOTIFY_RESUME
+ if (notify)
+ return -ENOTSUPP;
+#endif
+ /*
+ * We must not insert the new work if the task has already passed
+ * exit_task_work(). We rely on do_exit()->raw_spin_unlock_wait()
+ * and check PF_EXITING under pi_lock.
+ */
+ raw_spin_lock_irqsave(&task->pi_lock, flags);
+ if (likely(!(task->flags & PF_EXITING))) {
+ hlist_add_head(&twork->hlist, &task->task_works);
+ err = 0;
+ }
+ raw_spin_unlock_irqrestore(&task->pi_lock, flags);
+
+ /* test_and_set_bit() implies mb(), see tracehook_notify_resume(). */
+ if (likely(!err) && notify)
+ set_notify_resume(task);
+ return err;
+}
+
+struct task_work *
+task_work_cancel(struct task_struct *task, task_work_func_t func)
+{
+ unsigned long flags;
+ struct task_work *twork;
+ struct hlist_node *pos;
+
+ raw_spin_lock_irqsave(&task->pi_lock, flags);
+ hlist_for_each_entry(twork, pos, &task->task_works, hlist) {
+ if (twork->func == func) {
+ hlist_del(&twork->hlist);
+ goto found;
+ }
+ }
+ twork = NULL;
+ found:
+ raw_spin_unlock_irqrestore(&task->pi_lock, flags);
+
+ return twork;
+}
+
+void task_work_run(void)
+{
+ struct task_struct *task = current;
+ struct hlist_head task_works;
+ struct hlist_node *pos;
+
+ raw_spin_lock_irq(&task->pi_lock);
+ hlist_move_list(&task->task_works, &task_works);
+ raw_spin_unlock_irq(&task->pi_lock);
+
+ if (unlikely(hlist_empty(&task_works)))
+ return;
+ /*
+ * We use hlist to save the space in task_struct, but we want fifo.
+ * Find the last entry, the list should be short, then process them
+ * in reverse order.
+ */
+ for (pos = task_works.first; pos->next; pos = pos->next)
+ ;
+
+ for (;;) {
+ struct hlist_node **pprev = pos->pprev;
+ struct task_work *twork = container_of(pos, struct task_work,
+ hlist);
+ twork->func(twork);
+
+ if (pprev == &task_works.first)
+ break;
+ pos = container_of(pprev, struct hlist_node, next);
+ }
+}

View File

@ -1,474 +0,0 @@
From 1a39b310e920bb7098067d96411b31e459ae8f32 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:02 -0400
Subject: [PATCH] vgaarb: Add support for setting the default video device
(v2)
The default VGA device is a somewhat fluid concept on platforms with
multiple GPUs. Add support for setting it so switching code can update
things appropriately, and make sure that the sysfs code returns the right
device if it's changed.
v2: Updated to fix builds when __ARCH_HAS_VGA_DEFAULT_DEVICE is false.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: benh@kernel.crashing.org
Cc: airlied@redhat.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vgaarb.c | 7 +++++++
drivers/pci/pci-sysfs.c | 5 +++++
include/linux/vgaarb.h | 2 ++
3 files changed, 14 insertions(+)
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index 111d956..e223b96 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -136,6 +136,11 @@ struct pci_dev *vga_default_device(void)
{
return vga_default;
}
+
+void vga_set_default_device(struct pci_dev *pdev)
+{
+ vga_default = pdev;
+}
#endif
static inline void vga_irq_set_state(struct vga_device *vgadev, bool state)
@@ -605,10 +610,12 @@ static bool vga_arbiter_del_pci_device(struct pci_dev *pdev)
goto bail;
}
+#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
if (vga_default == pdev) {
pci_dev_put(vga_default);
vga_default = NULL;
}
+#endif
if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM))
vga_decode_count--;
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index a55e248..86c63fe 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -27,6 +27,7 @@
#include <linux/security.h>
#include <linux/pci-aspm.h>
#include <linux/slab.h>
+#include <linux/vgaarb.h>
#include "pci.h"
static int sysfs_initialized; /* = 0 */
@@ -417,6 +418,10 @@ static ssize_t
boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf)
{
struct pci_dev *pdev = to_pci_dev(dev);
+ struct pci_dev *vga_dev = vga_default_device();
+
+ if (vga_dev)
+ return sprintf(buf, "%u\n", (pdev == vga_dev));
return sprintf(buf, "%u\n",
!!(pdev->resource[PCI_ROM_RESOURCE].flags &
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..759a25ba 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,6 +31,7 @@
#ifndef LINUX_VGA_H
#define LINUX_VGA_H
+#include <video/vga.h>
/* Legacy VGA regions */
#define VGA_RSRC_NONE 0x00
@@ -181,6 +182,7 @@ extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
#ifndef __ARCH_HAS_VGA_DEFAULT_DEVICE
extern struct pci_dev *vga_default_device(void);
+extern void vga_set_default_device(struct pci_dev *pdev);
#endif
/**
--
1.7.10.4
From 2fbe8c7c3ebfed2059a6597322bb0dbc4d96feb5 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:03 -0400
Subject: [PATCH] vga-switcheroo: Use vga_default_device()
vga-switcheroo currently changes the default VGA device by fiddling with
the IORESOURCE_ROM_SHADOW flag on the device. This isn't strictly accurate,
since there's no guarantee that switching also changes the ROM decoding.
Switch over to using the vgaarb functions for this.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vga_switcheroo.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 58434e8..9d83028 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -28,6 +28,8 @@
#include <linux/pci.h>
#include <linux/vga_switcheroo.h>
+#include <linux/vgaarb.h>
+
struct vga_switcheroo_client {
struct pci_dev *pdev;
struct fb_info *fb_info;
@@ -122,7 +124,7 @@ int vga_switcheroo_register_client(struct pci_dev *pdev,
vgasr_priv.clients[index].reprobe = reprobe;
vgasr_priv.clients[index].can_switch = can_switch;
vgasr_priv.clients[index].id = -1;
- if (pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW)
+ if (pdev == vga_default_device())
vgasr_priv.clients[index].active = true;
vgasr_priv.registered_clients |= (1 << index);
@@ -230,9 +232,8 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
if (new_client->pwr_state == VGA_SWITCHEROO_OFF)
vga_switchon(new_client);
- /* swap shadow resource to denote boot VGA device has changed so X starts on new device */
- active->pdev->resource[PCI_ROM_RESOURCE].flags &= ~IORESOURCE_ROM_SHADOW;
- new_client->pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
+ vga_set_default_device(new_client->pdev);
+
return 0;
}
--
1.7.10.4
From 88674088d10ca2538b2efd2559f6620ade8ec373 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:04 -0400
Subject: [PATCH] x86: Use vga_default_device() when determining whether an fb
is primary
IORESOURCE_ROM_SHADOW is not necessarily an indication that the hardware
is the primary device. Add support for using the vgaarb functions and
fall back if nothing's set them.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: mingo@redhat.com
Acked-by: hpa@zytor.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/video/fbdev.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/arch/x86/video/fbdev.c b/arch/x86/video/fbdev.c
index c5ffb6a..d5644bb 100644
--- a/arch/x86/video/fbdev.c
+++ b/arch/x86/video/fbdev.c
@@ -9,24 +9,34 @@
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/module.h>
+#include <linux/vgaarb.h>
int fb_is_primary_device(struct fb_info *info)
{
struct device *device = info->device;
struct pci_dev *pci_dev = NULL;
+ struct pci_dev *default_device = vga_default_device();
struct resource *res = NULL;
- int retval = 0;
if (device)
pci_dev = to_pci_dev(device);
- if (pci_dev)
- res = &pci_dev->resource[PCI_ROM_RESOURCE];
+ if (!pci_dev)
+ return 0;
+
+ if (default_device) {
+ if (pci_dev == default_device)
+ return 1;
+ else
+ return 0;
+ }
+
+ res = &pci_dev->resource[PCI_ROM_RESOURCE];
if (res && res->flags & IORESOURCE_ROM_SHADOW)
- retval = 1;
+ return 1;
- return retval;
+ return 0;
}
EXPORT_SYMBOL(fb_is_primary_device);
MODULE_LICENSE("GPL");
--
1.7.10.4
From b4aa0163056b6c70029b6e8619ce07c274351f42 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:05 -0400
Subject: [PATCH] efifb: Implement vga_default_device() (v2)
EFI doesn't typically make use of the legacy VGA ROM, but it may still be
configured to pass that through to a given video device. This may lead to
an inaccurate choice of default video device. Add support to efifb to pick
out the correct active video device.
v2: fix if->ifdef
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: hpa@zytor.com
Cc: matt.fleming@intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/include/asm/vga.h | 6 ++++
drivers/video/efifb.c | 77 ++++++++++++++++++++++++++++++++------------
2 files changed, 63 insertions(+), 20 deletions(-)
diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h
index c4b9dc2..44282fb 100644
--- a/arch/x86/include/asm/vga.h
+++ b/arch/x86/include/asm/vga.h
@@ -17,4 +17,10 @@
#define vga_readb(x) (*(x))
#define vga_writeb(x, y) (*(y) = (x))
+#ifdef CONFIG_FB_EFI
+#define __ARCH_HAS_VGA_DEFAULT_DEVICE
+extern struct pci_dev *vga_default_device(void);
+extern void vga_set_default_device(struct pci_dev *pdev);
+#endif
+
#endif /* _ASM_X86_VGA_H */
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 784139a..66ed991 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -18,6 +18,8 @@
static bool request_mem_succeeded = false;
+static struct pci_dev *default_vga;
+
static struct fb_var_screeninfo efifb_defined __devinitdata = {
.activate = FB_ACTIVATE_NOW,
.height = -1,
@@ -298,35 +300,70 @@ static struct fb_ops efifb_ops = {
.fb_imageblit = cfb_imageblit,
};
+struct pci_dev *vga_default_device(void)
+{
+ return default_vga;
+}
+
+void vga_set_default_device(struct pci_dev *pdev)
+{
+ default_vga = pdev;
+}
+
static int __init efifb_setup(char *options)
{
char *this_opt;
int i;
+ struct pci_dev *dev = NULL;
+
+ if (options && *options) {
+ while ((this_opt = strsep(&options, ",")) != NULL) {
+ if (!*this_opt) continue;
+
+ for (i = 0; i < M_UNKNOWN; i++) {
+ if (!strcmp(this_opt, dmi_list[i].optname) &&
+ dmi_list[i].base != 0) {
+ screen_info.lfb_base = dmi_list[i].base;
+ screen_info.lfb_linelength = dmi_list[i].stride;
+ screen_info.lfb_width = dmi_list[i].width;
+ screen_info.lfb_height = dmi_list[i].height;
+ }
+ }
+ if (!strncmp(this_opt, "base:", 5))
+ screen_info.lfb_base = simple_strtoul(this_opt+5, NULL, 0);
+ else if (!strncmp(this_opt, "stride:", 7))
+ screen_info.lfb_linelength = simple_strtoul(this_opt+7, NULL, 0) * 4;
+ else if (!strncmp(this_opt, "height:", 7))
+ screen_info.lfb_height = simple_strtoul(this_opt+7, NULL, 0);
+ else if (!strncmp(this_opt, "width:", 6))
+ screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
+ }
+ }
- if (!options || !*options)
- return 0;
+ for_each_pci_dev(dev) {
+ int i;
- while ((this_opt = strsep(&options, ",")) != NULL) {
- if (!*this_opt) continue;
+ if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
+ continue;
- for (i = 0; i < M_UNKNOWN; i++) {
- if (!strcmp(this_opt, dmi_list[i].optname) &&
- dmi_list[i].base != 0) {
- screen_info.lfb_base = dmi_list[i].base;
- screen_info.lfb_linelength = dmi_list[i].stride;
- screen_info.lfb_width = dmi_list[i].width;
- screen_info.lfb_height = dmi_list[i].height;
- }
+ for (i=0; i < DEVICE_COUNT_RESOURCE; i++) {
+ resource_size_t start, end;
+
+ if (!(pci_resource_flags(dev, i) & IORESOURCE_MEM))
+ continue;
+
+ start = pci_resource_start(dev, i);
+ end = pci_resource_end(dev, i);
+
+ if (!start || !end)
+ continue;
+
+ if (screen_info.lfb_base >= start &&
+ (screen_info.lfb_base + screen_info.lfb_size) < end)
+ default_vga = dev;
}
- if (!strncmp(this_opt, "base:", 5))
- screen_info.lfb_base = simple_strtoul(this_opt+5, NULL, 0);
- else if (!strncmp(this_opt, "stride:", 7))
- screen_info.lfb_linelength = simple_strtoul(this_opt+7, NULL, 0) * 4;
- else if (!strncmp(this_opt, "height:", 7))
- screen_info.lfb_height = simple_strtoul(this_opt+7, NULL, 0);
- else if (!strncmp(this_opt, "width:", 6))
- screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
}
+
return 0;
}
--
1.7.10.4
From 6cf20beec4b91c240cf759b4db72669e251f1fc4 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 14 May 2012 17:00:40 +0100
Subject: [PATCH] x86/vga: set the default device from the fixup.
Since Matthew's efi/vga changes on non-EFI machines we were failing
to tell the vgaarb/switcheroo what the default device was, this
sets the default device in the quirk if none has been set before.
This fixes the switcheroo on my T410s.
Cc: Matthew Garrett <mjg@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/pci/fixup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index d0e6e40..0163553 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/pci_x86.h>
+#include <asm/vga.h>
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
@@ -348,6 +349,8 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)
if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n");
+ if (!vga_default_device())
+ vga_set_default_device(pdev);
}
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
--
1.7.10.4
From 1b23170a8e14ef62ad1daa957aa528212a8d0aef Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Tue, 24 Apr 2012 09:31:28 +0100
Subject: [PATCH] vga: fix build when fbdev is a module
This fixes the build breakage reported by Stephen in -next
when merging the drm-next tree.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vgaarb.c | 2 ++
drivers/video/efifb.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index e223b96..3df8fc0 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -137,6 +137,8 @@ struct pci_dev *vga_default_device(void)
return vga_default;
}
+EXPORT_SYMBOL_GPL(vga_default_device);
+
void vga_set_default_device(struct pci_dev *pdev)
{
vga_default = pdev;
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 66ed991..b4a632a 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -305,6 +305,8 @@ struct pci_dev *vga_default_device(void)
return default_vga;
}
+EXPORT_SYMBOL_GPL(vga_default_device);
+
void vga_set_default_device(struct pci_dev *pdev)
{
default_vga = pdev;
--
1.7.10.4
From db2e034d2c55e1f273ed820cc3edcdbc73d0292c Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 17 May 2012 08:31:29 +0100
Subject: [PATCH] x86/vga: fix build with efi disabled.
Reported by sfr on -next merge.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/pci/fixup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 0163553..82487d3 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -6,8 +6,8 @@
#include <linux/dmi.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/vgaarb.h>
#include <asm/pci_x86.h>
-#include <asm/vga.h>
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
--
1.7.10.4