summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freed-ora/current/master/.gitignore4
-rw-r--r--freed-ora/current/master/0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch54
-rw-r--r--freed-ora/current/master/0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch81
-rw-r--r--freed-ora/current/master/Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch42
-rw-r--r--freed-ora/current/master/Makefile145
-rw-r--r--freed-ora/current/master/Makefile.config37
-rw-r--r--freed-ora/current/master/Makefile.release2
-rw-r--r--freed-ora/current/master/TODO34
-rw-r--r--freed-ora/current/master/acpi-sony-nonvs-blacklist.patch19
-rw-r--r--freed-ora/current/master/add-appleir-usb-driver.patch701
-rw-r--r--freed-ora/current/master/add-macbookair41-keyboard.patch119
-rw-r--r--freed-ora/current/master/alps.patch1861
-rw-r--r--freed-ora/current/master/bcma-brcmsmac-compat.patch35
-rw-r--r--freed-ora/current/master/be2net-non-member-vlan-pkts-not-received-in-promisco.patch63
-rw-r--r--freed-ora/current/master/benet-remove-bogus-unlikely-on-vlan-check.patch39
-rw-r--r--freed-ora/current/master/compat-wireless-config-fixups.patch91
-rw-r--r--freed-ora/current/master/compat-wireless-integrated-build.patch12
-rw-r--r--freed-ora/current/master/config-arm-generic29
-rw-r--r--freed-ora/current/master/config-arm-highbank16
-rw-r--r--freed-ora/current/master/config-arm-imx98
-rw-r--r--freed-ora/current/master/config-arm-kirkwood43
-rw-r--r--freed-ora/current/master/config-arm-omap-generic66
-rw-r--r--freed-ora/current/master/config-arm-tegra8
-rw-r--r--freed-ora/current/master/config-backports24
-rw-r--r--freed-ora/current/master/config-debug2
-rw-r--r--freed-ora/current/master/config-generic540
-rw-r--r--freed-ora/current/master/config-ia64-generic205
-rw-r--r--freed-ora/current/master/config-nodebug110
-rw-r--r--freed-ora/current/master/config-powerpc-generic82
-rw-r--r--freed-ora/current/master/config-powerpc32-generic64
-rw-r--r--freed-ora/current/master/config-powerpc6479
-rw-r--r--freed-ora/current/master/config-rhel-generic203
-rw-r--r--freed-ora/current/master/config-s390x2
-rw-r--r--freed-ora/current/master/config-sparc64-generic1
-rw-r--r--freed-ora/current/master/config-x86-32-generic4
-rw-r--r--freed-ora/current/master/config-x86-generic6
-rw-r--r--freed-ora/current/master/config-x86_64-generic10
-rw-r--r--freed-ora/current/master/crypto-register-cryptd-first.patch26
-rwxr-xr-xfreed-ora/current/master/deblob-3.2 (renamed from freed-ora/current/master/deblob-3.1)319
-rwxr-xr-xfreed-ora/current/master/deblob-check283
-rw-r--r--freed-ora/current/master/drm-edid-try-harder-to-fix-up-broken-headers.patch47
-rw-r--r--freed-ora/current/master/drm-i915-sdvo-lvds-is-digital.patch83
-rw-r--r--freed-ora/current/master/drm-intel-make-lvds-work.patch18
-rw-r--r--freed-ora/current/master/drm-lower-severity-radeon-lockup.diff13
-rw-r--r--freed-ora/current/master/drm-nouveau-updates.patch8526
-rw-r--r--freed-ora/current/master/epoll-fix-spurious-lockdep-warnings.patch116
-rw-r--r--freed-ora/current/master/epoll-limit-paths.patch8
-rwxr-xr-xfreed-ora/current/master/find-provides44
-rw-r--r--freed-ora/current/master/floppy-Remove-_hlt-related-functions.patch107
-rw-r--r--freed-ora/current/master/genkey7
-rw-r--r--freed-ora/current/master/git-linus.diff0
-rw-r--r--freed-ora/current/master/hvcs_pi_buf_alloc.patch43
-rw-r--r--freed-ora/current/master/iwlagn-fix-ht_params-NULL-pointer-dereference.patch43
-rw-r--r--freed-ora/current/master/kernel.spec962
-rw-r--r--freed-ora/current/master/linux-2.6-debug-taint-vm.patch51
-rw-r--r--freed-ora/current/master/linux-2.6-e1000-ich9-montevina.patch28
-rw-r--r--freed-ora/current/master/linux-2.6-intel-iommu-igfx.patch35
-rw-r--r--freed-ora/current/master/linux-3.1-keys-remove-special-keyring.patch110
-rw-r--r--freed-ora/current/master/linux-3.1-libre.tar.bz2.sign7
-rw-r--r--freed-ora/current/master/linux-3.1-libre.xdelta.bz2bin73155 -> 0 bytes
-rw-r--r--freed-ora/current/master/linux-3.1-libre.xdelta.bz2.sign7
-rw-r--r--freed-ora/current/master/linux-3.2-brcmfmac-gcc47.patch13
-rw-r--r--freed-ora/current/master/linux-3.2-libre.tar.bz2.sign7
-rw-r--r--freed-ora/current/master/linux-3.2-libre.xdelta.bz2bin0 -> 76579 bytes
-rw-r--r--freed-ora/current/master/linux-3.2-libre.xdelta.bz2.sign7
-rw-r--r--freed-ora/current/master/media-DiBcom-protect-the-I2C-bufer-access.patch1150
-rw-r--r--freed-ora/current/master/media-dib0700-correct-error-message.patch103
-rw-r--r--freed-ora/current/master/media-dib0700-protect-the-dib0700-buffer-access.patch248
-rw-r--r--freed-ora/current/master/mmc-Always-check-for-lower-base-frequency-quirk-for-.patch73
-rw-r--r--freed-ora/current/master/mod-extra.list200
-rw-r--r--freed-ora/current/master/modpost-add-option-to-allow-external-modules-to-avoi.patch80
-rw-r--r--freed-ora/current/master/nfs-client-freezer.patch197
-rw-r--r--freed-ora/current/master/nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch118
-rw-r--r--freed-ora/current/master/pci-Rework-ASPM-disable-code.patch287
-rw-r--r--freed-ora/current/master/pci-fix-ats-compile.patch26
-rw-r--r--freed-ora/current/master/powerpc-Fix-deadlock-in-icswx-code.patch74
-rw-r--r--freed-ora/current/master/quite-apm.patch13
-rw-r--r--freed-ora/current/master/rcu-avoid-just-onlined-cpu-resched.patch47
-rw-r--r--freed-ora/current/master/rcutree-avoid-false-quiescent-states.patch67
-rwxr-xr-xfreed-ora/current/master/scripts/bumpspecfile.py11
-rw-r--r--freed-ora/current/master/scripts/cross-amd64.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-i586.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-i686.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-ia64.sh2
-rw-r--r--freed-ora/current/master/scripts/cross-iseries.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-ppc.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-ppc64.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-ppc8260.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-ppc8560.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-pseries.sh3
-rw-r--r--freed-ora/current/master/scripts/cross-s390.sh2
-rw-r--r--freed-ora/current/master/scripts/cross-s390x.sh2
-rwxr-xr-xfreed-ora/current/master/scripts/get-snapshot.sh35
-rwxr-xr-xfreed-ora/current/master/scripts/pull-upstreams.sh12
-rwxr-xr-xfreed-ora/current/master/scripts/rebase.sh169
-rwxr-xr-xfreed-ora/current/master/scripts/reconfig.sh26
-rw-r--r--freed-ora/current/master/sources2
-rw-r--r--freed-ora/current/master/sysfs-msi-irq-per-device.patch239
-rw-r--r--freed-ora/current/master/udlfb-bind-framebuffer-to-interface.patch33
-rw-r--r--freed-ora/current/master/ums-realtek-driver-uses-stack-memory-for-DMA.patch143
-rw-r--r--freed-ora/current/master/usb-add-quirk-for-logitech-webcams.patch75
-rw-r--r--freed-ora/current/master/utrace.patch1652
-rw-r--r--freed-ora/current/master/x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch211
-rw-r--r--freed-ora/current/master/xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch77
104 files changed, 6186 insertions, 15056 deletions
diff --git a/freed-ora/current/master/.gitignore b/freed-ora/current/master/.gitignore
index 2cd2f944c..e6bb722b2 100644
--- a/freed-ora/current/master/.gitignore
+++ b/freed-ora/current/master/.gitignore
@@ -1,6 +1,6 @@
.svn
-linux-*.tar.bz2
-patch-*.bz2
clog
+*.bz2
*.rpm
+*.orig
kernel-[23].*/
diff --git a/freed-ora/current/master/0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch b/freed-ora/current/master/0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
deleted file mode 100644
index 77777f012..000000000
--- a/freed-ora/current/master/0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6b7025ea927d290a59d2772828435c1893f0267f Mon Sep 17 00:00:00 2001
-From: Rik van Riel <riel@redhat.com>
-Date: Fri, 7 Oct 2011 16:17:22 +0100
-Subject: [PATCH 1/2] mm: vmscan: Limit direct reclaim for higher order
- allocations
-
-When suffering from memory fragmentation due to unfreeable pages,
-THP page faults will repeatedly try to compact memory. Due to the
-unfreeable pages, compaction fails.
-
-Needless to say, at that point page reclaim also fails to create
-free contiguous 2MB areas. However, that doesn't stop the current
-code from trying, over and over again, and freeing a minimum of 4MB
-(2UL << sc->order pages) at every single invocation.
-
-This resulted in my 12GB system having 2-3GB free memory, a
-corresponding amount of used swap and very sluggish response times.
-
-This can be avoided by having the direct reclaim code not reclaim from
-zones that already have plenty of free memory available for compaction.
-
-If compaction still fails due to unmovable memory, doing additional
-reclaim will only hurt the system, not help.
-
-Signed-off-by: Rik van Riel <riel@redhat.com>
-Signed-off-by: Mel Gorman <mgorman@suse.de>
----
- mm/vmscan.c | 10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git a/mm/vmscan.c b/mm/vmscan.c
-index 6072d74..8c03534 100644
---- a/mm/vmscan.c
-+++ b/mm/vmscan.c
-@@ -2022,6 +2022,16 @@ static void shrink_zones(int priority, struct zonelist *zonelist,
- continue;
- if (zone->all_unreclaimable && priority != DEF_PRIORITY)
- continue; /* Let kswapd poll it */
-+ if (COMPACTION_BUILD) {
-+ /*
-+ * If we already have plenty of memory free
-+ * for compaction, don't free any more.
-+ */
-+ if (sc->order > PAGE_ALLOC_COSTLY_ORDER &&
-+ (compaction_suitable(zone, sc->order) ||
-+ compaction_deferred(zone)))
-+ continue;
-+ }
- /*
- * This steals pages from memory cgroups over softlimit
- * and returns the number of reclaimed pages and
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch b/freed-ora/current/master/0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
deleted file mode 100644
index e74b64d91..000000000
--- a/freed-ora/current/master/0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From c01043c9aa51a63bd01c60e53494ca4a7e994542 Mon Sep 17 00:00:00 2001
-From: Mel Gorman <mgorman@suse.de>
-Date: Fri, 7 Oct 2011 16:17:23 +0100
-Subject: [PATCH 2/2] mm: Abort reclaim/compaction if compaction can proceed
-
-If compaction can proceed, shrink_zones() stops doing any work but
-the callers still shrink_slab(), raises the priority and potentially
-sleeps. This patch aborts direct reclaim/compaction entirely if
-compaction can proceed.
-
-Signed-off-by: Mel Gorman <mgorman@suse.de>
----
- mm/vmscan.c | 20 ++++++++++++++++----
- 1 files changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/mm/vmscan.c b/mm/vmscan.c
-index 8c03534..b295a38 100644
---- a/mm/vmscan.c
-+++ b/mm/vmscan.c
-@@ -2000,14 +2000,19 @@ restart:
- *
- * If a zone is deemed to be full of pinned pages then just give it a light
- * scan then give up on it.
-+ *
-+ * This function returns true if a zone is being reclaimed for a costly
-+ * high-order allocation and compaction is either ready to begin or deferred.
-+ * This indicates to the caller that it should retry the allocation or fail.
- */
--static void shrink_zones(int priority, struct zonelist *zonelist,
-+static bool shrink_zones(int priority, struct zonelist *zonelist,
- struct scan_control *sc)
- {
- struct zoneref *z;
- struct zone *zone;
- unsigned long nr_soft_reclaimed;
- unsigned long nr_soft_scanned;
-+ bool should_abort_reclaim = false;
-
- for_each_zone_zonelist_nodemask(zone, z, zonelist,
- gfp_zone(sc->gfp_mask), sc->nodemask) {
-@@ -2025,12 +2030,15 @@ static void shrink_zones(int priority, struct zonelist *zonelist,
- if (COMPACTION_BUILD) {
- /*
- * If we already have plenty of memory free
-- * for compaction, don't free any more.
-+ * for compaction in this zone , don't free any
-+ * more.
- */
- if (sc->order > PAGE_ALLOC_COSTLY_ORDER &&
- (compaction_suitable(zone, sc->order) ||
-- compaction_deferred(zone)))
-+ compaction_deferred(zone))) {
-+ should_abort_reclaim = true;
- continue;
-+ }
- }
- /*
- * This steals pages from memory cgroups over softlimit
-@@ -2049,6 +2057,8 @@ static void shrink_zones(int priority, struct zonelist *zonelist,
-
- shrink_zone(priority, zone, sc);
- }
-+
-+ return should_abort_reclaim;
- }
-
- static bool zone_reclaimable(struct zone *zone)
-@@ -2113,7 +2123,9 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
- sc->nr_scanned = 0;
- if (!priority)
- disable_swap_token(sc->mem_cgroup);
-- shrink_zones(priority, zonelist, sc);
-+ if (shrink_zones(priority, zonelist, sc))
-+ break;
-+
- /*
- * Don't shrink slabs when reclaiming memory from
- * over limit cgroups
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch b/freed-ora/current/master/Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch
new file mode 100644
index 000000000..4b0d78d92
--- /dev/null
+++ b/freed-ora/current/master/Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch
@@ -0,0 +1,42 @@
+From c0190925dacd976a67044f4382d4effbed568dce Mon Sep 17 00:00:00 2001
+From: Jesse Sung <jesse.sung@canonical.com>
+Date: Thu, 22 Dec 2011 10:48:47 +0800
+Subject: [PATCH] Bluetooth: Add support for BCM20702A0 [0a5c:21e3]
+
+Add another vendor specific ID for BCM20702A0.
+
+output of usb-devices:
+T: Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
+D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
+P: Vendor=0a5c ProdID=21e3 Rev=01.12
+S: Manufacturer=Broadcom Corp
+S: Product=BCM20702A0
+S: SerialNumber=9439E5CBF66C
+C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
+I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
+I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
+I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
+I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
+
+Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
+Acked-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
+---
+ drivers/bluetooth/btusb.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index a67c6db..fbfba80 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -101,6 +101,7 @@ static struct usb_device_id btusb_table[] = {
+ { USB_DEVICE(0x0c10, 0x0000) },
+
+ /* Broadcom BCM20702A0 */
++ { USB_DEVICE(0x0a5c, 0x21e3) },
+ { USB_DEVICE(0x413c, 0x8197) },
+
+ { } /* Terminating entry */
+--
+1.7.6.2
+
diff --git a/freed-ora/current/master/Makefile b/freed-ora/current/master/Makefile
index 3430572f4..22fceaa63 100644
--- a/freed-ora/current/master/Makefile
+++ b/freed-ora/current/master/Makefile
@@ -17,15 +17,16 @@ help:
include Makefile.config
-ifndef KVERSION
-KVERSION := $(shell awk '$$1 == "%define" && $$2 == "base_sublevel" { \
- print "2.6." $$3 \
- }' $(SPECFILE))
-endif
-
prep:
fedpkg -v prep --arch=$(PREPARCH)
+noarch:
+ fedpkg -v local --arch=noarch
+
+# 'make local' also needs to build the noarch firmware package
+local: noarch
+ fedpkg -v local
+
extremedebug:
@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
@@ -46,6 +47,7 @@ debug:
@perl -pi -e 's/# CONFIG_FAIL_PAGE_ALLOC is not set/CONFIG_FAIL_PAGE_ALLOC=y/' config-nodebug
@perl -pi -e 's/# CONFIG_FAIL_IO_TIMEOUT is not set/CONFIG_FAIL_IO_TIMEOUT=y/' config-nodebug
@perl -pi -e 's/# CONFIG_FAIL_MAKE_REQUEST is not set/CONFIG_FAIL_MAKE_REQUEST=y/' config-nodebug
+ @perl -pi -e 's/# CONFIG_FAIL_MMC_REQUEST is not set/CONFIG_FAIL_MMC_REQUEST=y/' config-nodebug
@perl -pi -e 's/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/CONFIG_FAULT_INJECTION_DEBUG_FS=y/' config-nodebug
@perl -pi -e 's/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DEBUG_SG is not set/CONFIG_DEBUG_SG=y/' config-nodebug
@@ -79,7 +81,6 @@ debug:
@perl -pi -e 's/# CONFIG_ATH_DEBUG is not set/CONFIG_ATH_DEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_CARL9170_DEBUGFS is not set/CONFIG_CARL9170_DEBUGFS=y/' config-nodebug
@perl -pi -e 's/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/CONFIG_IWLWIFI_DEVICE_TRACING=y/' config-nodebug
- @perl -pi -e 's/# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set/CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DMADEVICES_DEBUG is not set/CONFIG_DMADEVICES_DEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_DMADEVICES_VDEBUG is not set/CONFIG_DMADEVICES_VDEBUG=y/' config-nodebug
@perl -pi -e 's/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/CONFIG_CEPH_LIB_PRETTYDEBUG=y/' config-nodebug
@@ -101,6 +102,7 @@ debug:
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
@perl -pi -e 's/^%define rawhide_skip_docs 0/%define rawhide_skip_docs 1/' kernel.spec
+ @rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
nodebuginfo:
@perl -pi -e 's/^%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 1\}/%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 0\}/' kernel.spec
@@ -109,140 +111,13 @@ nodebug: release
release: config-release
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
@perl -pi -e 's/^%define rawhide_skip_docs 1/%define rawhide_skip_docs 0/' kernel.spec
+ @rpmdev-bumpspec -c "Disable debugging options." kernel.spec
include Makefile.release
-reconfig:
- @rm -f kernel-*-config
- @VERSION=$(KVERSION) make -f Makefile.config configs
- @scripts/reconfig.sh
-
unused-kernel-patches:
@for f in *.patch; do if [ -e $$f ]; then (egrep -q "^Patch[[:digit:]]+:[[:space:]]+$$f" $(SPECFILE) || echo "Unused: $$f") && egrep -q "^ApplyPatch[[:space:]]+$$f|^ApplyOptionalPatch[[:space:]]+$$f" $(SPECFILE) || echo "Unapplied: $$f"; fi; done
-# since i386 isn't a target...
-compile compile-short: DIST_DEFINES += --target $(shell uname -m)
-
-# 'make local' also needs to build the noarch firmware package
-local: noarch
-
-#
-# Hacks for building vanilla (unpatched) kernel rpms.
-# Use "make vanilla-TARGET" like "make TARGET" (make vanilla-scratch-build).
-#
-vanilla-%: $(SPECFILE:.spec=-vanilla.spec)
- @$(MAKE) $* SPECFILE=$<
-
-$(SPECFILE:.spec=-vanilla.spec): $(SPECFILE)
- @rm -f $@
- (echo %define nopatches 1; cat $<) > $@
-
-#scratch-build: NAME = $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{NAME}\n" --specfile $(SPECFILE)| head -1)
-#scratch-build: test-srpm
-# $(BUILD_CLIENT) build $(BUILD_FLAGS) --scratch $(TARGET) \
-# $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
-
-# Dismal kludge for building via brew from cvs after "make vanilla-tag".
-ifdef BEEHIVE_SRPM_BUILD
-export CHECKOUT_TAG ?= $(shell sed s/^.// CVS/Tag)
-tag-pattern = $(TAG_NAME)-$(TAG_VERSION)-0_%_$(TAG_RELEASE)
-ifeq (,$(filter-out $(tag-pattern),$(CHECKOUT_TAG)))
-variant := $(patsubst $(tag-pattern),%,$(CHECKOUT_TAG))
-srpm: SPECFILE := $(wildcard $(SPECFILE:.spec=-$(variant).spec) \
- $(SPECFILE:.spec=.t.$(variant).spec))
-srpm beehive-sprm: RELEASE := 0.$(variant).$(RELEASE)
-endif
-endif
-
-#
-# Hacks for building kernel rpms from upstream code plus local GIT branches.
-# Use "make git/BRANCH/TARGET" like "make TARGET".
-# Use "make git/BRANCH-fedora/TARGET" to include Fedora patches on top.
-#
-ifndef GIT_SPEC
-git/%:
- @$(MAKE) GIT_SPEC=$(subst /,-,$(*D)) git-$(*F)
-else
-git-%: $(SPECFILE:.spec=.t.$(GIT_SPEC).spec)
- @$(MAKE) GIT_SPEC= $* SPECFILE=$<
-endif
-
-#
-# Your git-branches.mk file can define GIT_DIR, e.g.:
-# GIT_DIR = ${HOME}/kernel/.git
-# Make sure GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL are also set
-# or your rpm changelogs will look like crap.
-#
-# For each branch it can define a variable branch-BRANCH or tag-BRANCH
-# giving the parent of BRANCH to diff against in a separate patch. If
-# the parent is unknown, it will use $(branch-upstream) defaulting to
-# "refs/remotes/upstream/master".
-#
-# Defining tag-BRANCH means the tag corresponds to an upstream patch in
-# the sources file, so that is used instead of generating a patch with
-# git. If there is no tag-upstream defined, it will figure out a vNNN
-# tag or vNNN-gitN pseudo-tag from the last patch in the sources file.
-# For example:
-# tag-some-hacks = v2.6.21-rc5
-# branch-more-hacks = some-hacks
-# Leads to patches:
-# git diff v2.6.21-rc5..more-hacks > linux-2.6.21-rc5-some-hacks.patch
-# git diff some-hacks..more-hacks > linux-2.6.21-rc5-more-hacks.patch
-# Whereas having no git-branches.mk at all but doing
-# "make GIT_DIR=... git/mybranch/test-srpm" does:
-# id=`cat patch-2.6.21-rc5-git4.id` # auto-fetched via upstream file
-# git diff $id..upstream > linux-2.6.21-rc5-git4-upstream.patch
-# git diff upstream..mybranch > linux-2.6.21-rc5-git4-mybranch.patch
-# If the upstream patch (or any branch patch) is empty it's left out.
-#
-git-branches.mk:;
--include git-branches.mk
-
-branch-upstream ?= refs/remotes/upstream/master
-
-ifdef GIT_DIR
-export GIT_DIR
-export GIT_AUTHOR_NAME
-export GIT_AUTHOR_EMAIL
-gen-patches ?= gen-patches
-
-ifndef havespec
-$(SPECFILE:.spec=.t.%-fedora.spec): $(SPECFILE) $(gen-patches) FORCE
- ./$(gen-patches) --fedora < $< > $@ $(gen-patches-args)
-$(SPECFILE:.spec=.t.%.spec): $(SPECFILE) $(gen-patches) FORCE
- ./$(gen-patches) < $< > $@ $(gen-patches-args)
-.PRECIOUS: $(SPECFILE:.spec=.t.%.spec) $(SPECFILE:.spec=.t.%-fedora.spec)
-endif
-
-spec-%: $(SPECFILE:.spec=.t.%.spec) ;
-$(SPECFILE):;
-FORCE:;
-
-branch-of-* = $(firstword $(head-$*) $*)
-gen-patches-args = --name $* v$(KVERSION) $(call heads,$(branch-of-*))
-define heads
-$(if $(tag-$1),$(filter-out v$(KVERSION),$(tag-$1)),\
- $(call heads,$(firstword $(branch-$1) $(branch-upstream)))) $1
-endef
-
-files-%-fedora:
- @echo $(SPECFILE:.spec=.t.$*-fedora.spec)
- @$(call list-patches,$(branch-of-*))
-files-%:
- @echo $(SPECFILE:.spec=.t.$*.spec)
- @$(call list-patches,$(branch-of-*))
-define list-patches
-$(if $(tag-$1),version=$(patsubst v%,%,$(tag-$1)),\
- $(call list-patches,$(firstword $(branch-$1) $(branch-upstream)))); \
-echo linux-$${version}-$(patsubst refs/remotes/%/master,%,$1).patch
-endef
-
-ifndef tag-$(branch-upstream)
-tag-$(branch-upstream) := $(shell \
- sed -n 's/^.* *//;s/\.bz2$$//;s/patch-/v/;/^v/h;$${g;p}' sources)
-endif
-endif
-
ifeq ($(MAKECMDGOALS),me a sandwich)
.PHONY: me a sandwich
me a:
diff --git a/freed-ora/current/master/Makefile.config b/freed-ora/current/master/Makefile.config
index ccb035d77..331aa46b9 100644
--- a/freed-ora/current/master/Makefile.config
+++ b/freed-ora/current/master/Makefile.config
@@ -10,14 +10,15 @@ CONFIGFILES = \
$(CFG)-x86_64.config $(CFG)-x86_64-debug.config \
$(CFG)-s390x.config \
$(CFG)-arm.config $(CFG)-armv5tel.config \
+ $(CFG)-armv5tel-kirkwood.config $(CFG)-armv7l-imx.config \
$(CFG)-armv7l-omap.config $(CFG)-armv7l-tegra.config \
+ $(CFG)-armv7hl-imx.config $(CFG)-armv7hl-highbank.config \
$(CFG)-armv7hl-omap.config $(CFG)-armv7hl-tegra.config \
$(CFG)-ppc.config $(CFG)-ppc-smp.config \
$(CFG)-sparc64.config \
- $(CFG)-ppc64.config $(CFG)-ppc64-debug.config \
- $(CFG)-ia64.config
+ $(CFG)-ppc64.config $(CFG)-ppc64-debug.config
-PLATFORMS = x86 x86_64 powerpc powerpc32 powerpc64 s390x ia64 sparc64
+PLATFORMS = x86 x86_64 powerpc powerpc32 powerpc64 s390x sparc64
TEMPFILES = $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
configs: $(CONFIGFILES)
@@ -44,6 +45,15 @@ temp-armv7l-omap-generic: config-arm-omap-generic temp-arm-generic
temp-armv7l-tegra: config-arm-tegra temp-arm-generic
perl merge.pl $^ > $@
+temp-armv5tel-kirkwood: config-arm-kirkwood temp-arm-generic
+ perl merge.pl $^ > $@
+
+temp-armv7l-imx: config-arm-imx temp-arm-generic
+ perl merge.pl $^ > $@
+
+temp-armv7l-highbank: config-arm-highbank temp-arm-generic
+ perl merge.pl $^ > $@
+
temp-x86-32: config-x86-32-generic config-x86-generic
perl merge.pl $^ > $@
@@ -77,9 +87,6 @@ temp-powerpc32-generic: config-powerpc32-generic temp-powerpc-generic
temp-s390-generic: config-s390x temp-generic
perl merge.pl $^ > $@
-temp-ia64-generic: config-ia64-generic temp-generic
- perl merge.pl $^ > $@
-
kernel-$(VERSION)-i686-PAE.config: config-i686-PAE temp-x86-32-generic
perl merge.pl $^ i386 > $@
@@ -116,12 +123,27 @@ kernel-$(VERSION)-arm.config: /dev/null temp-arm-generic
kernel-$(VERSION)-armv5tel.config: /dev/null temp-arm-generic
perl merge.pl $^ arm > $@
+kernel-$(VERSION)-armv5tel-kirkwood.config: /dev/null temp-armv5tel-kirkwood
+ perl merge.pl $^ arm > $@
+
+kernel-$(VERSION)-armv7l-imx.config: /dev/null temp-armv7l-imx
+ perl merge.pl $^ arm > $@
+
+kernel-$(VERSION)-armv7l-highbank.config: /dev/null temp-armv7l-highbank
+ perl merge.pl $^ arm > $@
+
kernel-$(VERSION)-armv7l-omap.config: /dev/null temp-armv7l-omap-generic
perl merge.pl $^ arm > $@
kernel-$(VERSION)-armv7l-tegra.config: /dev/null temp-armv7l-tegra
perl merge.pl $^ arm > $@
+kernel-$(VERSION)-armv7hl-imx.config: /dev/null temp-armv7l-imx
+ perl merge.pl $^ arm > $@
+
+kernel-$(VERSION)-armv7hl-highbank.config: /dev/null temp-armv7l-highbank
+ perl merge.pl $^ arm > $@
+
kernel-$(VERSION)-armv7hl-omap.config: /dev/null temp-armv7l-omap-generic
perl merge.pl $^ arm > $@
@@ -133,6 +155,3 @@ kernel-$(VERSION)-ppc.config: /dev/null temp-powerpc32-generic
kernel-$(VERSION)-ppc-smp.config: config-powerpc32-smp temp-powerpc32-generic
perl merge.pl $^ powerpc > $@
-
-kernel-$(VERSION)-ia64.config: /dev/null temp-ia64-generic
- perl merge.pl $^ ia64 > $@
diff --git a/freed-ora/current/master/Makefile.release b/freed-ora/current/master/Makefile.release
index 88a014dd6..14b6afd40 100644
--- a/freed-ora/current/master/Makefile.release
+++ b/freed-ora/current/master/Makefile.release
@@ -22,6 +22,7 @@ config-release:
@perl -pi -e 's/CONFIG_FAIL_PAGE_ALLOC=y/# CONFIG_FAIL_PAGE_ALLOC is not set/' config-nodebug
@perl -pi -e 's/CONFIG_FAIL_IO_TIMEOUT=y/# CONFIG_FAIL_IO_TIMEOUT is not set/' config-nodebug
@perl -pi -e 's/CONFIG_FAIL_MAKE_REQUEST=y/# CONFIG_FAIL_MAKE_REQUEST is not set/' config-nodebug
+ @perl -pi -e 's/CONFIG_FAIL_MMC_REQUEST=y/# CONFIG_FAIL_MMC_REQUEST is not set/' config-nodebug
@perl -pi -e 's/CONFIG_FAULT_INJECTION_DEBUG_FS=y/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/' config-nodebug
@perl -pi -e 's/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DEBUG_SG=y/# CONFIG_DEBUG_SG is not set/' config-nodebug
@@ -55,7 +56,6 @@ config-release:
@perl -pi -e 's/CONFIG_ATH_DEBUG=y/# CONFIG_ATH_DEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_CARL9170_DEBUGFS=y/# CONFIG_CARL9170_DEBUGFS is not set/' config-nodebug
@perl -pi -e 's/CONFIG_IWLWIFI_DEVICE_TRACING=y/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/' config-nodebug
- @perl -pi -e 's/CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y/# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DMADEVICES_DEBUG=y/# CONFIG_DMADEVICES_DEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_DMADEVICES_VDEBUG=y/# CONFIG_DMADEVICES_VDEBUG is not set/' config-nodebug
@perl -pi -e 's/CONFIG_CEPH_LIB_PRETTYDEBUG=y/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/' config-nodebug
diff --git a/freed-ora/current/master/TODO b/freed-ora/current/master/TODO
index 7883ae53f..ae2e01b0f 100644
--- a/freed-ora/current/master/TODO
+++ b/freed-ora/current/master/TODO
@@ -1,27 +1,15 @@
**** Queued for 3.2 ***********************************************************************************
-* linux-2.6-debug-taint-vm.patch
-* epoll-fix-spurious-lockdep-warnings.patch
-* hvcs_pi_buf_alloc.patch
* acpi-ensure-thermal-limits-match-cpu-freq.patch
-* rcu-avoid-just-onlined-cpu-resched.patch
-* rcutree-avoid-false-quiescent-states.patch
* revert-efi-rtclock.patch
* block-stray-block-put-after-teardown.patch
-* crypto-register-cryptd-first.patch
* efi-dont-map-boot-services-on-32bit.patch
-* powerpc-Fix-deadlock-in-icswx-code.patch
-* udlfb-bind-framebuffer-to-interface.patch
-* ums-realtek-driver-uses-stack-memory-for-DMA.patch
-* usb-add-quirk-for-logitech-webcams.patch
-* add-macbookair41-keyboard.patch
-* ucvideo-fix-crash-when-linking-entities.patch
-* mmc-Always-check-for-lower-base-frequency-quirk-for-.patch (also CC'd stable)
-* 000[12]-mm-*
-* x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch (also CC'd to
- stable)
* epoll-limit-paths.patch (in linux-next via -mm tree)
+**** Queued for 3.3 ***********************************************************************************
+drm-edid-try-harder-to-fix-up-broken-headers.patch
+Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch
+
**** Other stuff that should go upstream (in decreasing likelyhood) ************************************
* linux-2.6-acpi-video-dos.patch
@@ -67,9 +55,6 @@
* dmar-disable-when-ricoh-multifunction.patch
Added October 2010
-* drm-intel-make-lvds-work.patch
- Around since forever. Wtf ?
-
* linux-2.6-intel-iommu-igfx.patch
Invert igfx_off/igfx_on option. Around since forever. Upstreamable ?
Mustard ? Config option ?
@@ -115,8 +100,11 @@
Spec file/config todos/cleanups
-* Remove all of the RHEL stuff. It isn't maintained in fedora at all and is
-just cruft
+* modules-extra: Do a few more things to make it a bit more robust.
+ - Allow for comments in the mod-extra.list file.
+ - Don't fail the build if a module is listed but not built (maybe).
+ - See if it can be tied into Kconfig instead of module names.
+
+* investigate gzip modules. Everything should support this now?
+ Looks like about 70M savings per kernel installed.
-* Drop all the with_firmware stuff in the spec. All releases should be using
-the linux-firmware package by now
diff --git a/freed-ora/current/master/acpi-sony-nonvs-blacklist.patch b/freed-ora/current/master/acpi-sony-nonvs-blacklist.patch
index f332c6443..db500e8bf 100644
--- a/freed-ora/current/master/acpi-sony-nonvs-blacklist.patch
+++ b/freed-ora/current/master/acpi-sony-nonvs-blacklist.patch
@@ -17,3 +17,22 @@ index 3ed80b2..17fc718 100644
.ident = "Sony Vaio VGN-SR11M",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
+index 0e46fae..6d9a3ab 100644
+--- a/drivers/acpi/sleep.c
++++ b/drivers/acpi/sleep.c
+@@ -398,6 +398,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
+ },
+ {
+ .callback = init_nvs_nosave,
++ .ident = "Sony Vaio VPCEB17FX",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "VPCEB17FX"),
++ },
++ },
++ {
++ .callback = init_nvs_nosave,
+ .ident = "Sony Vaio VGN-SR11M",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
diff --git a/freed-ora/current/master/add-appleir-usb-driver.patch b/freed-ora/current/master/add-appleir-usb-driver.patch
deleted file mode 100644
index 0ab0ed6f4..000000000
--- a/freed-ora/current/master/add-appleir-usb-driver.patch
+++ /dev/null
@@ -1,701 +0,0 @@
-From e11e9e78799a7641fe0dc5289f35f2604a4b71a3 Mon Sep 17 00:00:00 2001
-From: Bastien Nocera <hadess@hadess.net>
-Date: Sun, 17 Jan 2010 00:40:15 +0000
-Subject: [PATCH] Input: add appleir USB driver
-
-This driver was originally written by James McKenzie, updated by
-Greg Kroah-Hartman, further updated by myself, with suspend support
-added.
-
-More recent versions of the IR receiver are also supported through
-a patch by Alex Karpenko. The patch also adds support for the 2nd
-and 5th generation of the controller, and the menu key on newer
-brushed metal remotes.
-
-Tested on a MacbookAir1,1
-
-Signed-off-by: Bastien Nocera <hadess@hadess.net>
----
- Documentation/input/appleir.txt | 46 ++++
- drivers/hid/hid-apple.c | 4 -
- drivers/hid/hid-core.c | 7 +-
- drivers/hid/hid-ids.h | 5 +-
- drivers/input/misc/Kconfig | 13 +
- drivers/input/misc/Makefile | 1 +
- drivers/input/misc/appleir.c | 519 +++++++++++++++++++++++++++++++++++++++
- 7 files changed, 588 insertions(+), 7 deletions(-)
- create mode 100644 Documentation/input/appleir.txt
- create mode 100644 drivers/input/misc/appleir.c
-
-diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt
-new file mode 100644
-index 0000000..db637fb
---- /dev/null
-+++ b/Documentation/input/appleir.txt
-@@ -0,0 +1,46 @@
-+Apple IR receiver Driver (appleir)
-+----------------------------------
-+ Copyright (C) 2009 Bastien Nocera <hadess@hadess.net>
-+
-+The appleir driver is a kernel input driver to handle Apple's IR
-+receivers (and associated remotes) in the kernel.
-+
-+The driver is an input driver which only handles "official" remotes
-+as built and sold by Apple.
-+
-+Authors
-+-------
-+
-+James McKenzie (original driver)
-+Alex Karpenko (05ac:8242 support)
-+Greg Kroah-Hartman (cleanups and original submission)
-+Bastien Nocera (further cleanups, brushed metal "enter"
-+button support and suspend support)
-+
-+Supported hardware
-+------------------
-+
-+- All Apple laptops and desktops from 2005 onwards, except:
-+ - the unibody Macbook (2009)
-+ - Mac Pro (all versions)
-+- Apple TV (all revisions prior to September 2010)
-+
-+The remote will only support the 6 (old white) or 7 (brushed metal) buttons
-+of the remotes as sold by Apple. See the next section if you want to use
-+other remotes or want to use lirc with the device instead of the kernel driver.
-+
-+Using lirc (native) instead of the kernel driver
-+------------------------------------------------
-+
-+First, you will need to disable the kernel driver for the receiver.
-+
-+This can be achieved by passing quirks to the usbhid driver.
-+The quirk line would be:
-+usbhid.quirks=0x05ac:0x8242:0x40000010
-+
-+With 0x05ac being the vendor ID (Apple, you shouldn't need to change this)
-+With 0x8242 being the product ID (check the output of lsusb for your hardware)
-+And 0x10 being "HID_QUIRK_HIDDEV_FORCE" and 0x40000000 being "HID_QUIRK_NO_IGNORE"
-+
-+This should force the creation of a hiddev device for the receiver, and
-+make it usable under lirc.
-diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
-index bba05d0..0059d5a 100644
---- a/drivers/hid/hid-apple.c
-+++ b/drivers/hid/hid-apple.c
-@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev)
- }
-
- static const struct hid_device_id apple_devices[] = {
-- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL),
-- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
-- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4),
-- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE),
- .driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
-
-diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
-index baa25ad..abc5bd7 100644
---- a/drivers/hid/hid-core.c
-+++ b/drivers/hid/hid-core.c
-@@ -1244,8 +1244,6 @@ static const struct hid_device_id hid_blacklist[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_RP_649) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, USB_DEVICE_ID_ACTIONSTAR_1011) },
-- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
-- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
-@@ -1577,6 +1575,11 @@ static const struct hid_device_id hid_ignore_list[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) },
- { HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
- { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)},
- { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)},
- { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
-diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
-index 11af537..360a5ca 100644
---- a/drivers/hid/hid-ids.h
-+++ b/drivers/hid/hid-ids.h
-@@ -100,8 +100,11 @@
- #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
- #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
- #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
--#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
-+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
-+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
-+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
- #define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
-+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
-
- #define USB_VENDOR_ID_ASUS 0x0486
- #define USB_DEVICE_ID_ASUS_T91MT 0x0185
-diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
-index 60de906..2f2f2e7 100644
---- a/drivers/input/misc/Kconfig
-+++ b/drivers/input/misc/Kconfig
- help
- Say Y here if you need accelerometer to work in polling mode.
-
-+config INPUT_APPLEIR
-+ tristate "Apple infrared receiver (built in)"
-+ depends on USB_ARCH_HAS_HCD
-+ select USB
-+ help
-+ Say Y here if you want to use a Apple infrared remote control. All
-+ the Apple computers from 2005 onwards include such a port, except
-+ the unibody Macbook (2009), and Mac Pros. This receiver is also
-+ used in the Apple TV set-top box prior to the 2010 model.
-+
-+ To compile this driver as a module, choose M here: the module will
-+ be called appleir.
-+
- config INPUT_POWERMATE
- tristate "Griffin PowerMate and Contour Jog support"
- depends on USB_ARCH_HAS_HCD
-diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
-index 1fe1f6c..d5ef2b9 100644
---- a/drivers/input/misc/Makefile
-+++ b/drivers/input/misc/Makefile
-@@ -13,6 +13,7 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o
- obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o
- obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o
- obj-$(CONFIG_INPUT_APANEL) += apanel.o
-+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o
- obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
- obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
- obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
-diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c
-new file mode 100644
-index 0000000..3817a3c
---- /dev/null
-+++ b/drivers/input/misc/appleir.c
-@@ -0,0 +1,519 @@
-+/*
-+ * appleir: USB driver for the apple ir device
-+ *
-+ * Original driver written by James McKenzie
-+ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman <gregkh@suse.de>
-+ *
-+ * Copyright (C) 2006 James McKenzie
-+ * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
-+ * Copyright (C) 2008 Novell Inc.
-+ *
-+ * 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, version 2.
-+ *
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/input.h>
-+#include <linux/usb/input.h>
-+#include <linux/module.h>
-+#include <linux/init.h>
-+#include <linux/usb.h>
-+#include <linux/usb/input.h>
-+#include <asm/unaligned.h>
-+#include <asm/byteorder.h>
-+
-+#define DRIVER_VERSION "v1.2"
-+#define DRIVER_AUTHOR "James McKenzie"
-+#define DRIVER_DESC "Apple infrared receiver driver"
-+#define DRIVER_LICENSE "GPL"
-+
-+MODULE_AUTHOR(DRIVER_AUTHOR);
-+MODULE_DESCRIPTION(DRIVER_DESC);
-+MODULE_LICENSE(DRIVER_LICENSE);
-+
-+#define USB_VENDOR_ID_APPLE 0x05ac
-+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
-+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440
-+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241
-+#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
-+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
-+
-+#define URB_SIZE 32
-+
-+#define MAX_KEYS 9
-+#define MAX_KEYS_MASK (MAX_KEYS - 1)
-+
-+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
-+
-+static int debug;
-+module_param(debug, int, 0644);
-+MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
-+
-+/* I have two devices both of which report the following */
-+/* 25 87 ee 83 0a + */
-+/* 25 87 ee 83 0c - */
-+/* 25 87 ee 83 09 << */
-+/* 25 87 ee 83 06 >> */
-+/* 25 87 ee 83 05 >" */
-+/* 25 87 ee 83 03 menu */
-+/* 26 00 00 00 00 for key repeat*/
-+
-+/* Thomas Glanzmann reports the following responses */
-+/* 25 87 ee ca 0b + */
-+/* 25 87 ee ca 0d - */
-+/* 25 87 ee ca 08 << */
-+/* 25 87 ee ca 07 >> */
-+/* 25 87 ee ca 04 >" */
-+/* 25 87 ee ca 02 menu */
-+/* 26 00 00 00 00 for key repeat*/
-+/* He also observes the following event sometimes */
-+/* sent after a key is release, which I interpret */
-+/* as a flat battery message */
-+/* 25 87 e0 ca 06 flat battery */
-+
-+/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */
-+/* 25 87 ee 47 0b + */
-+/* 25 87 ee 47 0d - */
-+/* 25 87 ee 47 08 << */
-+/* 25 87 ee 47 07 >> */
-+/* 25 87 ee 47 04 >" */
-+/* 25 87 ee 47 02 menu */
-+/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */
-+
-+/* Bastien Nocera's "new" remote */
-+/* 25 87 ee 91 5f followed by
-+ * 25 87 ee 91 05 gives you >"
-+ *
-+ * 25 87 ee 91 5c followed by
-+ * 25 87 ee 91 05 gives you the middle button */
-+
-+static const unsigned short appleir_key_table[] = {
-+ KEY_RESERVED,
-+ KEY_MENU,
-+ KEY_PLAYPAUSE,
-+ KEY_FORWARD,
-+ KEY_BACK,
-+ KEY_VOLUMEUP,
-+ KEY_VOLUMEDOWN,
-+ KEY_ENTER,
-+ KEY_RESERVED,
-+};
-+
-+struct appleir {
-+ struct input_dev *input_dev;
-+ unsigned short keymap[ARRAY_SIZE(appleir_key_table)];
-+ u8 *data;
-+ dma_addr_t dma_buf;
-+ struct usb_device *usbdev;
-+ unsigned int flags;
-+ struct urb *urb;
-+ struct timer_list key_up_timer;
-+ int current_key;
-+ int prev_key_idx;
-+ char phys[32];
-+};
-+
-+static DEFINE_MUTEX(appleir_mutex);
-+
-+enum {
-+ APPLEIR_OPENED = 0x1,
-+ APPLEIR_SUSPENDED = 0x2,
-+};
-+
-+static struct usb_device_id appleir_ids[] = {
-+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
-+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) },
-+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) },
-+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
-+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) },
-+ {}
-+};
-+MODULE_DEVICE_TABLE(usb, appleir_ids);
-+
-+static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len)
-+{
-+ int i;
-+
-+ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len);
-+
-+ for (i = 0; i < len; ++i)
-+ printk(" %02x", data[i]);
-+ printk(" (should be command %d)\n", (data[4] >> 1) & MAX_KEYS_MASK);
-+}
-+
-+static int get_key(int data)
-+{
-+ switch (data) {
-+ case 0x02:
-+ case 0x03:
-+ /* menu */
-+ return 1;
-+ case 0x04:
-+ case 0x05:
-+ /* >" */
-+ return 2;
-+ case 0x06:
-+ case 0x07:
-+ /* >> */
-+ return 3;
-+ case 0x08:
-+ case 0x09:
-+ /* << */
-+ return 4;
-+ case 0x0a:
-+ case 0x0b:
-+ /* + */
-+ return 5;
-+ case 0x0c:
-+ case 0x0d:
-+ /* - */
-+ return 6;
-+ case 0x5c:
-+ /* Middle button, on newer remotes,
-+ * part of a 2 packet-command */
-+ return -7;
-+ default:
-+ return -1;
-+ }
-+}
-+
-+static void key_up(struct appleir *appleir, int key)
-+{
-+ dbginfo(&appleir->input_dev->dev, "key %d up\n", key);
-+ input_report_key(appleir->input_dev, key, 0);
-+ input_sync(appleir->input_dev);
-+}
-+
-+static void key_down(struct appleir *appleir, int key)
-+{
-+ dbginfo(&appleir->input_dev->dev, "key %d down\n", key);
-+ input_report_key(appleir->input_dev, key, 1);
-+ input_sync(appleir->input_dev);
-+}
-+
-+static void battery_flat(struct appleir *appleir)
-+{
-+ dev_err(&appleir->input_dev->dev, "possible flat battery?\n");
-+}
-+
-+static void key_up_tick(unsigned long data)
-+{
-+ struct appleir *appleir = (struct appleir *)data;
-+
-+ if (appleir->current_key) {
-+ key_up(appleir, appleir->current_key);
-+ appleir->current_key = 0;
-+ }
-+}
-+
-+static void new_data(struct appleir *appleir, u8 *data, int len)
-+{
-+ static const u8 keydown[] = { 0x25, 0x87, 0xee };
-+ static const u8 keyrepeat[] = { 0x26, };
-+ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 };
-+
-+ if (debug)
-+ dump_packet(appleir, "received", data, len);
-+
-+ if (len != 5)
-+ return;
-+
-+ if (!memcmp(data, keydown, sizeof(keydown))) {
-+ int index;
-+
-+ /* If we already have a key down, take it up before marking
-+ this one down */
-+ if (appleir->current_key)
-+ key_up(appleir, appleir->current_key);
-+
-+ /* Handle dual packet commands */
-+ if (appleir->prev_key_idx > 0)
-+ index = appleir->prev_key_idx;
-+ else
-+ index = get_key(data[4]);
-+
-+ if (index > 0) {
-+ appleir->current_key = appleir->keymap[index];
-+
-+ key_down(appleir, appleir->current_key);
-+ /* Remote doesn't do key up, either pull them up, in the test
-+ above, or here set a timer which pulls them up after 1/8 s */
-+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
-+ appleir->prev_key_idx = 0;
-+ return;
-+ } else if (index == -7) {
-+ /* Remember key for next packet */
-+ appleir->prev_key_idx = 0 - index;
-+ return;
-+ }
-+ }
-+
-+ appleir->prev_key_idx = 0;
-+
-+ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) {
-+ key_down(appleir, appleir->current_key);
-+ /* Remote doesn't do key up, either pull them up, in the test
-+ above, or here set a timer which pulls them up after 1/8 s */
-+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
-+ return;
-+ }
-+
-+ if (!memcmp(data, flatbattery, sizeof(flatbattery))) {
-+ battery_flat(appleir);
-+ /* Fall through */
-+ }
-+
-+ dump_packet(appleir, "unknown packet", data, len);
-+}
-+
-+static void appleir_urb(struct urb *urb)
-+{
-+ struct appleir *appleir = urb->context;
-+ int status = urb->status;
-+ int retval;
-+
-+ switch (status) {
-+ case 0:
-+ new_data(appleir, urb->transfer_buffer, urb->actual_length);
-+ break;
-+ case -ECONNRESET:
-+ case -ENOENT:
-+ case -ESHUTDOWN:
-+ /* This urb is terminated, clean up */
-+ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__,
-+ urb->status);
-+ return;
-+ default:
-+ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__,
-+ urb->status);
-+ }
-+
-+ retval = usb_submit_urb(urb, GFP_ATOMIC);
-+ if (retval)
-+ err("%s - usb_submit_urb failed with result %d", __func__,
-+ retval);
-+}
-+
-+static int appleir_open(struct input_dev *dev)
-+{
-+ struct appleir *appleir = input_get_drvdata(dev);
-+ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0);
-+ int r;
-+
-+ r = usb_autopm_get_interface(intf);
-+ if (r) {
-+ dev_err(&intf->dev,
-+ "%s(): usb_autopm_get_interface() = %d\n", __func__, r);
-+ return r;
-+ }
-+
-+ mutex_lock(&appleir_mutex);
-+
-+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) {
-+ r = -EIO;
-+ goto fail;
-+ }
-+
-+ appleir->flags |= APPLEIR_OPENED;
-+
-+ mutex_unlock(&appleir_mutex);
-+
-+ usb_autopm_put_interface(intf);
-+
-+ return 0;
-+fail:
-+ mutex_unlock(&appleir_mutex);
-+ usb_autopm_put_interface(intf);
-+ return r;
-+}
-+
-+static void appleir_close(struct input_dev *dev)
-+{
-+ struct appleir *appleir = input_get_drvdata(dev);
-+
-+ mutex_lock(&appleir_mutex);
-+
-+ if (!(appleir->flags & APPLEIR_SUSPENDED)) {
-+ usb_kill_urb(appleir->urb);
-+ del_timer_sync(&appleir->key_up_timer);
-+ }
-+
-+ appleir->flags &= ~APPLEIR_OPENED;
-+
-+ mutex_unlock(&appleir_mutex);
-+}
-+
-+static int appleir_probe(struct usb_interface *intf,
-+ const struct usb_device_id *id)
-+{
-+ struct usb_device *dev = interface_to_usbdev(intf);
-+ struct usb_endpoint_descriptor *endpoint;
-+ struct appleir *appleir = NULL;
-+ struct input_dev *input_dev;
-+ int retval = -ENOMEM;
-+ int i;
-+
-+ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
-+ if (!appleir)
-+ goto allocfail;
-+
-+ appleir->data = usb_alloc_coherent(dev, URB_SIZE, GFP_KERNEL,
-+ &appleir->dma_buf);
-+ if (!appleir->data)
-+ goto usbfail;
-+
-+ appleir->urb = usb_alloc_urb(0, GFP_KERNEL);
-+ if (!appleir->urb)
-+ goto urbfail;
-+
-+ appleir->usbdev = dev;
-+
-+ input_dev = input_allocate_device();
-+ if (!input_dev)
-+ goto inputfail;
-+
-+ appleir->input_dev = input_dev;
-+
-+ usb_make_path(dev, appleir->phys, sizeof(appleir->phys));
-+ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys));
-+
-+ input_dev->name = "Apple Infrared Remote Controller";
-+ input_dev->phys = appleir->phys;
-+ usb_to_input_id(dev, &input_dev->id);
-+ input_dev->dev.parent = &intf->dev;
-+ input_dev->keycode = appleir->keymap;
-+ input_dev->keycodesize = sizeof(unsigned short);
-+ input_dev->keycodemax = ARRAY_SIZE(appleir->keymap);
-+
-+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
-+
-+ memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap));
-+ for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++)
-+ set_bit(appleir->keymap[i], input_dev->keybit);
-+ clear_bit(KEY_RESERVED, input_dev->keybit);
-+
-+ input_set_drvdata(input_dev, appleir);
-+ input_dev->open = appleir_open;
-+ input_dev->close = appleir_close;
-+
-+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
-+
-+ usb_fill_int_urb(appleir->urb, dev,
-+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
-+ appleir->data, 8,
-+ appleir_urb, appleir, endpoint->bInterval);
-+
-+ appleir->urb->transfer_dma = appleir->dma_buf;
-+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-+
-+ setup_timer(&appleir->key_up_timer,
-+ key_up_tick, (unsigned long) appleir);
-+
-+ retval = input_register_device(appleir->input_dev);
-+ if (retval)
-+ goto inputfail;
-+
-+ usb_set_intfdata(intf, appleir);
-+
-+ return 0;
-+
-+inputfail:
-+ input_free_device(appleir->input_dev);
-+
-+urbfail:
-+ usb_free_urb(appleir->urb);
-+
-+usbfail:
-+ usb_free_coherent(dev, URB_SIZE, appleir->data,
-+ appleir->dma_buf);
-+
-+allocfail:
-+ kfree(appleir);
-+
-+ return retval;
-+}
-+
-+static void appleir_disconnect(struct usb_interface *intf)
-+{
-+ struct appleir *appleir = usb_get_intfdata(intf);
-+
-+ usb_set_intfdata(intf, NULL);
-+ input_unregister_device(appleir->input_dev);
-+ usb_free_urb(appleir->urb);
-+ usb_free_coherent(interface_to_usbdev(intf), URB_SIZE,
-+ appleir->data, appleir->dma_buf);
-+ kfree(appleir);
-+}
-+
-+static int appleir_suspend(struct usb_interface *interface,
-+ pm_message_t message)
-+{
-+ struct appleir *appleir = usb_get_intfdata(interface);
-+
-+ mutex_lock(&appleir_mutex);
-+ if (appleir->flags & APPLEIR_OPENED)
-+ usb_kill_urb(appleir->urb);
-+
-+ appleir->flags |= APPLEIR_SUSPENDED;
-+
-+ mutex_unlock(&appleir_mutex);
-+
-+ return 0;
-+}
-+
-+static int appleir_resume(struct usb_interface *interface)
-+{
-+ struct appleir *appleir;
-+ int r = 0;
-+
-+ appleir = usb_get_intfdata(interface);
-+
-+ mutex_lock(&appleir_mutex);
-+ if (appleir->flags & APPLEIR_OPENED) {
-+ struct usb_endpoint_descriptor *endpoint;
-+
-+ endpoint = &interface->cur_altsetting->endpoint[0].desc;
-+ usb_fill_int_urb(appleir->urb, appleir->usbdev,
-+ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress),
-+ appleir->data, 8,
-+ appleir_urb, appleir, endpoint->bInterval);
-+ appleir->urb->transfer_dma = appleir->dma_buf;
-+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-+
-+ /* And reset the USB device */
-+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC))
-+ r = -EIO;
-+ }
-+
-+ appleir->flags &= ~APPLEIR_SUSPENDED;
-+
-+ mutex_unlock(&appleir_mutex);
-+
-+ return r;
-+}
-+
-+static struct usb_driver appleir_driver = {
-+ .name = "appleir",
-+ .probe = appleir_probe,
-+ .disconnect = appleir_disconnect,
-+ .suspend = appleir_suspend,
-+ .resume = appleir_resume,
-+ .reset_resume = appleir_resume,
-+ .id_table = appleir_ids,
-+};
-+
-+static int __init appleir_init(void)
-+{
-+ return usb_register(&appleir_driver);
-+}
-+
-+static void __exit appleir_exit(void)
-+{
-+ usb_deregister(&appleir_driver);
-+}
-+
-+module_init(appleir_init);
-+module_exit(appleir_exit);
---
-1.7.2.2
-
diff --git a/freed-ora/current/master/add-macbookair41-keyboard.patch b/freed-ora/current/master/add-macbookair41-keyboard.patch
deleted file mode 100644
index bd5afdafe..000000000
--- a/freed-ora/current/master/add-macbookair41-keyboard.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-Path: news.gmane.org!not-for-mail
-From: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
-Newsgroups: gmane.linux.kernel.input
-Subject: [PATCH] Add MacBookAir4,1 keyboard support
-Date: Wed, 7 Sep 2011 16:15:52 -0400
-Lines: 72
-Approved: news@gmane.org
-Message-ID: <20110907201552.GA1962@Caligula>
-NNTP-Posting-Host: lo.gmane.org
-Mime-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-X-Trace: dough.gmane.org 1315426570 11003 80.91.229.12 (7 Sep 2011 20:16:10 GMT)
-X-Complaints-To: usenet@dough.gmane.org
-NNTP-Posting-Date: Wed, 7 Sep 2011 20:16:10 +0000 (UTC)
-To: linux-input@vger.kernel.org
-Original-X-From: linux-input-owner@vger.kernel.org Wed Sep 07 22:16:06 2011
-Return-path: <linux-input-owner@vger.kernel.org>
-Envelope-to: glki-linux-input-2@lo.gmane.org
-Original-Received: from vger.kernel.org ([209.132.180.67])
- by lo.gmane.org with esmtp (Exim 4.69)
- (envelope-from <linux-input-owner@vger.kernel.org>)
- id 1R1OXV-0007QX-Ll
- for glki-linux-input-2@lo.gmane.org; Wed, 07 Sep 2011 22:16:06 +0200
-Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
- id S1751419Ab1IGUQE (ORCPT <rfc822;glki-linux-input-2@m.gmane.org>);
- Wed, 7 Sep 2011 16:16:04 -0400
-Original-Received: from mail-vx0-f174.google.com ([209.85.220.174]:57168 "EHLO
- mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
- with ESMTP id S1751237Ab1IGUQC (ORCPT
- <rfc822;linux-input@vger.kernel.org>); Wed, 7 Sep 2011 16:16:02 -0400
-Original-Received: by vxj15 with SMTP id 15so31147vxj.19
- for <linux-input@vger.kernel.org>; Wed, 07 Sep 2011 13:16:02 -0700 (PDT)
-Original-Received: by 10.52.69.210 with SMTP id g18mr64348vdu.133.1315426562281;
- Wed, 07 Sep 2011 13:16:02 -0700 (PDT)
-Original-Received: from Caligula ([140.247.246.50])
- by mx.google.com with ESMTPS id ch2sm944169vdc.19.2011.09.07.13.16.01
- (version=TLSv1/SSLv3 cipher=OTHER);
- Wed, 07 Sep 2011 13:16:01 -0700 (PDT)
-Content-Disposition: inline
-User-Agent: Mutt/1.5.21 (2010-09-15)
-Original-Sender: linux-input-owner@vger.kernel.org
-Precedence: bulk
-List-ID: <linux-input.vger.kernel.org>
-X-Mailing-List: linux-input@vger.kernel.org
-Xref: news.gmane.org gmane.linux.kernel.input:21462
-Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.input/21462>
-
-This patch adds support for the Apple MacBookAir4,1 released in July
-2011. It was inspired by Joshua Dillon's patch for the MacBookAir4,2
-posted on http://www.almostsure.com/mba42/hid-apple-dkms.patch.
-
-Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
-diff -uNr linux/drivers/hid/hid-apple.c patched/drivers/hid/hid-apple.c
---- linux/drivers/hid/hid-apple.c 2011-09-06 23:41:58.000000000 -0400
-+++ patched/drivers/hid/hid-apple.c 2011-09-06 23:53:05.000000000 -0400
-@@ -183,6 +183,9 @@
- if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
- hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
- table = macbookair_fn_keys;
-+ else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI &&
-+ hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
-+ table = apple_fn_keys;
- else if (hid->product < 0x21d || hid->product >= 0x300)
- table = powerbook_fn_keys;
- else
-@@ -493,6 +499,12 @@
- .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
- .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI),
-+ .driver_data = APPLE_HAS_FN },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO),
-+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS),
-+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
- { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
-diff -uNr linux/drivers/hid/hid-core.c patched/drivers/hid/hid-core.c
---- linux/drivers/hid/hid-core.c 2011-09-06 23:41:58.000000000 -0400
-+++ patched/drivers/hid/hid-core.c 2011-09-06 23:56:22.000000000 -0400
-@@ -1340,6 +1340,9 @@
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS) },
-@@ -1892,6 +1895,9 @@
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO) },
-+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
- { }
-diff -uNr linux/drivers/hid/hid-ids.h patched/drivers/hid/hid-ids.h
---- linux/drivers/hid/hid-ids.h 2011-09-06 23:41:58.000000000 -0400
-+++ patched/drivers/hid/hid-ids.h 2011-09-06 23:57:39.000000000 -0400
-@@ -109,6 +109,9 @@
- #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245
- #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246
- #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247
-+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
-+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
-+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
- #define USB_DEVICE_ID_APPLE_ALU_REVB_ANSI 0x024f
- #define USB_DEVICE_ID_APPLE_ALU_REVB_ISO 0x0250
- #define USB_DEVICE_ID_APPLE_ALU_REVB_JIS 0x0251
---
-To unsubscribe from this list: send the line "unsubscribe linux-input" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-
diff --git a/freed-ora/current/master/alps.patch b/freed-ora/current/master/alps.patch
new file mode 100644
index 000000000..331716d3b
--- /dev/null
+++ b/freed-ora/current/master/alps.patch
@@ -0,0 +1,1861 @@
+From d4b347b29b4d14647c7394f7167bf6785dc98e50 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:53:15 -0800
+Subject: [PATCH 1/6] Input: ALPS - move protocol information to Documentation
+
+In preparation for new protocol support, move the protocol
+information currently documented in alps.c to
+Documentation/input/alps.txt, where it can be expanded without
+cluttering up the driver.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ Documentation/input/alps.txt | 75 ++++++++++++++++++++++++++++++++++++++++++
+ drivers/input/mouse/alps.c | 37 +--------------------
+ 2 files changed, 76 insertions(+), 36 deletions(-)
+ create mode 100644 Documentation/input/alps.txt
+
+diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
+new file mode 100644
+index 0000000..ab5478f
+--- /dev/null
++++ b/Documentation/input/alps.txt
+@@ -0,0 +1,75 @@
++ALPS Touchpad Protocol
++----------------------
++
++Introduction
++------------
++
++Currently the ALPS touchpad driver supports two protocol versions in use by
++ALPS touchpads, the "old" and "new" protocol versions. Fundamentally these
++differ only in the format of their event packets (in reality many features may
++be found on new protocol devices that aren't found on the old protocol
++devices, but these are handled transparently as feature differences rather
++than protocol differences).
++
++Detection
++---------
++
++All ALPS touchpads should respond to the "E6 report" command sequence:
++E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or
++00-00-64.
++
++If the E6 report is successful, the touchpad model is identified using the "E7
++report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
++matched against known models in the alps_model_data_array.
++
++Packet Format
++-------------
++
++In the following tables, the following notation us used.
++
++ CAPITALS = stick, miniscules = touchpad
++
++?'s can have different meanings on different models, such as wheel rotation,
++extra buttons, stick buttons on a dualpoint, etc.
++
++PS/2 packet format
++------------------
++
++ byte 0: 0 0 YSGN XSGN 1 M R L
++ byte 1: X7 X6 X5 X4 X3 X2 X1 X0
++ byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
++
++Note that the device never signals overflow condition.
++
++ALPS Absolute Mode - Old Format
++-------------------------------
++
++ byte 0: 1 0 0 0 1 x9 x8 x7
++ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
++ byte 2: 0 ? ? l r ? fin ges
++ byte 3: 0 ? ? ? ? y9 y8 y7
++ byte 4: 0 y6 y5 y4 y3 y2 y1 y0
++ byte 5: 0 z6 z5 z4 z3 z2 z1 z0
++
++ALPS Absolute Mode - New Format
++-------------------------------
++
++ byte 0: 1 ? ? ? 1 ? ? ?
++ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
++ byte 2: 0 x10 x9 x8 x7 ? fin ges
++ byte 3: 0 y9 y8 y7 1 M R L
++ byte 4: 0 y6 y5 y4 y3 y2 y1 y0
++ byte 5: 0 z6 z5 z4 z3 z2 z1 z0
++
++Dualpoint device -- interleaved packet format
++---------------------------------------------
++
++ byte 0: 1 1 0 0 1 1 1 1
++ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
++ byte 2: 0 x10 x9 x8 x7 0 fin ges
++ byte 3: 0 0 YSGN XSGN 1 1 1 1
++ byte 4: X7 X6 X5 X4 X3 X2 X1 X0
++ byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
++ byte 6: 0 y9 y8 y7 1 m r l
++ byte 7: 0 y6 y5 y4 y3 y2 y1 y0
++ byte 8: 0 z6 z5 z4 z3 z2 z1 z0
+diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+index 003587c..19d0943 100644
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -67,42 +67,7 @@ static const struct alps_model_info alps_model_data[] = {
+ * isn't valid per PS/2 spec.
+ */
+
+-/*
+- * PS/2 packet format
+- *
+- * byte 0: 0 0 YSGN XSGN 1 M R L
+- * byte 1: X7 X6 X5 X4 X3 X2 X1 X0
+- * byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+- *
+- * Note that the device never signals overflow condition.
+- *
+- * ALPS absolute Mode - new format
+- *
+- * byte 0: 1 ? ? ? 1 ? ? ?
+- * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+- * byte 2: 0 x10 x9 x8 x7 ? fin ges
+- * byte 3: 0 y9 y8 y7 1 M R L
+- * byte 4: 0 y6 y5 y4 y3 y2 y1 y0
+- * byte 5: 0 z6 z5 z4 z3 z2 z1 z0
+- *
+- * Dualpoint device -- interleaved packet format
+- *
+- * byte 0: 1 1 0 0 1 1 1 1
+- * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+- * byte 2: 0 x10 x9 x8 x7 0 fin ges
+- * byte 3: 0 0 YSGN XSGN 1 1 1 1
+- * byte 4: X7 X6 X5 X4 X3 X2 X1 X0
+- * byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+- * byte 6: 0 y9 y8 y7 1 m r l
+- * byte 7: 0 y6 y5 y4 y3 y2 y1 y0
+- * byte 8: 0 z6 z5 z4 z3 z2 z1 z0
+- *
+- * CAPITALS = stick, miniscules = touchpad
+- *
+- * ?'s can have different meanings on different models,
+- * such as wheel rotation, extra buttons, stick buttons
+- * on a dualpoint, etc.
+- */
++/* Packet formats are described in Documentation/input/alps.txt */
+
+ static bool alps_is_valid_first_byte(const struct alps_model_info *model,
+ unsigned char data)
+--
+1.7.7.3
+
+
+From fa629ef5222193214da9a2b3c94369f79353bec9 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:53:24 -0800
+Subject: [PATCH 2/6] Input: ALPS - add protocol version field in
+ alps_model_info
+
+In preparation for adding support for more ALPS protocol versions,
+add a field for the protocol version to the model info instead of
+using a field in the flags. OLDPROTO and !OLDPROTO are now called
+version 1 and version 2, repsectively.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ drivers/input/mouse/alps.c | 47 +++++++++++++++++++++----------------------
+ drivers/input/mouse/alps.h | 4 +++
+ 2 files changed, 27 insertions(+), 24 deletions(-)
+
+diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+index 19d0943..77b776d 100644
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -23,7 +23,6 @@
+ #include "psmouse.h"
+ #include "alps.h"
+
+-#define ALPS_OLDPROTO 0x01 /* old style input */
+ #define ALPS_DUALPOINT 0x02 /* touchpad has trackstick */
+ #define ALPS_PASS 0x04 /* device has a pass-through port */
+
+@@ -35,30 +34,30 @@
+ 6-byte ALPS packet */
+
+ static const struct alps_model_info alps_model_data[] = {
+- { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
+- { { 0x33, 0x02, 0x0a }, 0x88, 0xf8, ALPS_OLDPROTO }, /* UMAX-530T */
+- { { 0x53, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
+- { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
+- { { 0x60, 0x03, 0xc8 }, 0xf8, 0xf8, 0 }, /* HP ze1115 */
+- { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
+- { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
+- { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
+- { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x03, 0xc8 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
+- { { 0x73, 0x00, 0x0a }, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
+- { { 0x73, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
+- { { 0x73, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
+- { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
+- { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
+- { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
++ { { 0x32, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
++ { { 0x33, 0x02, 0x0a }, ALPS_PROTO_V1, 0x88, 0xf8, 0 }, /* UMAX-530T */
++ { { 0x53, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x53, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x60, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 }, /* HP ze1115 */
++ { { 0x63, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x02, 0x28 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
++ { { 0x63, 0x02, 0x3c }, ALPS_PROTO_V2, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
++ { { 0x63, 0x02, 0x50 }, ALPS_PROTO_V2, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
++ { { 0x63, 0x02, 0x64 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
++ { { 0x73, 0x00, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
++ { { 0x73, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x73, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
++ { { 0x20, 0x02, 0x0e }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
++ { { 0x22, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
++ { { 0x22, 0x02, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
+ /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
+- { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
++ { { 0x62, 0x02, 0x14 }, ALPS_PROTO_V2, 0xcf, 0xcf,
+ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
+- { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
+- { { 0x52, 0x01, 0x14 }, 0xff, 0xff,
+- ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
++ { { 0x73, 0x02, 0x50 }, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
++ { { 0x52, 0x01, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff,
++ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
+ };
+
+ /*
+@@ -112,7 +111,7 @@ static void alps_process_packet(struct psmouse *psmouse)
+ int x, y, z, ges, fin, left, right, middle;
+ int back = 0, forward = 0;
+
+- if (model->flags & ALPS_OLDPROTO) {
++ if (model->proto_version == ALPS_PROTO_V1) {
+ left = packet[2] & 0x10;
+ right = packet[2] & 0x08;
+ middle = 0;
+diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
+index 904ed8b..4ce9bba 100644
+--- a/drivers/input/mouse/alps.h
++++ b/drivers/input/mouse/alps.h
+@@ -12,8 +12,12 @@
+ #ifndef _ALPS_H
+ #define _ALPS_H
+
++#define ALPS_PROTO_V1 0
++#define ALPS_PROTO_V2 1
++
+ struct alps_model_info {
+ unsigned char signature[3];
++ unsigned char proto_version;
+ unsigned char byte0, mask0;
+ unsigned char flags;
+ };
+--
+1.7.7.3
+
+
+From b46615fe9215214ac00e26d35fc54dbe1c510803 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:53:30 -0800
+Subject: [PATCH 3/6] Input: ALPS - remove assumptions about packet size
+
+In preparation for version 4 protocol support, which has 8-byte
+data packets, remove all hard-coded assumptions about packet size
+and use psmouse->pktsize instead.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ drivers/input/mouse/alps.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+index 77b776d..44a0a71 100644
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -308,7 +308,7 @@ static void alps_flush_packet(unsigned long data)
+
+ serio_pause_rx(psmouse->ps2dev.serio);
+
+- if (psmouse->pktcnt == 6) {
++ if (psmouse->pktcnt == psmouse->pktsize) {
+
+ /*
+ * We did not any more data in reasonable amount of time.
+@@ -359,8 +359,8 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
+ return PSMOUSE_BAD_DATA;
+ }
+
+- /* Bytes 2 - 6 should have 0 in the highest bit */
+- if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
++ /* Bytes 2 - pktsize should have 0 in the highest bit */
++ if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize &&
+ (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) {
+ psmouse_dbg(psmouse, "refusing packet[%i] = %x\n",
+ psmouse->pktcnt - 1,
+@@ -368,7 +368,7 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
+ return PSMOUSE_BAD_DATA;
+ }
+
+- if (psmouse->pktcnt == 6) {
++ if (psmouse->pktcnt == psmouse->pktsize) {
+ alps_process_packet(psmouse);
+ return PSMOUSE_FULL_PACKET;
+ }
+@@ -529,7 +529,7 @@ static int alps_tap_mode(struct psmouse *psmouse, int enable)
+ static int alps_poll(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
+- unsigned char buf[6];
++ unsigned char buf[sizeof(psmouse->packet)];
+ bool poll_failed;
+
+ if (priv->i->flags & ALPS_PASS)
+--
+1.7.7.3
+
+
+From 25bded7cd60fa460e520e9f819bd06f4c5cb53f0 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:53:36 -0800
+Subject: [PATCH 4/6] Input: ALPS - add support for protocol versions 3 and 4
+
+This patch adds support for two ALPS touchpad protocols not
+supported currently by the driver, which I am arbitrarily naming
+version 3 and version 4. Support is single-touch only at this time,
+although both protocols are capable of limited multitouch support.
+
+Thanks to Andrew Skalski, who did the initial reverse-engineering
+of the v3 protocol.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ drivers/input/mouse/alps.c | 791 +++++++++++++++++++++++++++++++++++++++--
+ drivers/input/mouse/alps.h | 14 +
+ drivers/input/mouse/psmouse.h | 1 +
+ 3 files changed, 768 insertions(+), 38 deletions(-)
+
+diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+index 44a0a71..a0248fd 100644
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -23,6 +23,50 @@
+ #include "psmouse.h"
+ #include "alps.h"
+
++/*
++ * Definitions for ALPS version 3 and 4 command mode protocol
++ */
++#define ALPS_CMD_NIBBLE_10 0x01f2
++
++static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
++ { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */
++ { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
++ { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
++ { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
++ { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
++ { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
++ { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
++ { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
++ { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
++ { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
++ { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
++ { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
++ { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
++ { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
++ { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
++ { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
++};
++
++static const struct alps_nibble_commands alps_v4_nibble_commands[] = {
++ { PSMOUSE_CMD_ENABLE, 0x00 }, /* 0 */
++ { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */
++ { PSMOUSE_CMD_SETSCALE21, 0x00 }, /* 2 */
++ { PSMOUSE_CMD_SETRATE, 0x0a }, /* 3 */
++ { PSMOUSE_CMD_SETRATE, 0x14 }, /* 4 */
++ { PSMOUSE_CMD_SETRATE, 0x28 }, /* 5 */
++ { PSMOUSE_CMD_SETRATE, 0x3c }, /* 6 */
++ { PSMOUSE_CMD_SETRATE, 0x50 }, /* 7 */
++ { PSMOUSE_CMD_SETRATE, 0x64 }, /* 8 */
++ { PSMOUSE_CMD_SETRATE, 0xc8 }, /* 9 */
++ { ALPS_CMD_NIBBLE_10, 0x00 }, /* a */
++ { PSMOUSE_CMD_SETRES, 0x00 }, /* b */
++ { PSMOUSE_CMD_SETRES, 0x01 }, /* c */
++ { PSMOUSE_CMD_SETRES, 0x02 }, /* d */
++ { PSMOUSE_CMD_SETRES, 0x03 }, /* e */
++ { PSMOUSE_CMD_SETSCALE11, 0x00 }, /* f */
++};
++
++
+ #define ALPS_DUALPOINT 0x02 /* touchpad has trackstick */
+ #define ALPS_PASS 0x04 /* device has a pass-through port */
+
+@@ -34,30 +78,33 @@
+ 6-byte ALPS packet */
+
+ static const struct alps_model_info alps_model_data[] = {
+- { { 0x32, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
+- { { 0x33, 0x02, 0x0a }, ALPS_PROTO_V1, 0x88, 0xf8, 0 }, /* UMAX-530T */
+- { { 0x53, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x53, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x60, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 }, /* HP ze1115 */
+- { { 0x63, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x02, 0x28 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
+- { { 0x63, 0x02, 0x3c }, ALPS_PROTO_V2, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
+- { { 0x63, 0x02, 0x50 }, ALPS_PROTO_V2, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
+- { { 0x63, 0x02, 0x64 }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x63, 0x03, 0xc8 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
+- { { 0x73, 0x00, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
+- { { 0x73, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
+- { { 0x73, 0x02, 0x14 }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
+- { { 0x20, 0x02, 0x0e }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
+- { { 0x22, 0x02, 0x0a }, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
+- { { 0x22, 0x02, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
++ { { 0x32, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
++ { { 0x33, 0x02, 0x0a }, 0x00, ALPS_PROTO_V1, 0x88, 0xf8, 0 }, /* UMAX-530T */
++ { { 0x53, 0x02, 0x0a }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x53, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x60, 0x03, 0xc8 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 }, /* HP ze1115 */
++ { { 0x63, 0x02, 0x0a }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x02, 0x28 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
++ { { 0x63, 0x02, 0x3c }, 0x00, ALPS_PROTO_V2, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
++ { { 0x63, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
++ { { 0x63, 0x02, 0x64 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x63, 0x03, 0xc8 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D800 */
++ { { 0x73, 0x00, 0x0a }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_DUALPOINT }, /* ThinkPad R61 8918-5QG */
++ { { 0x73, 0x02, 0x0a }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, 0 },
++ { { 0x73, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Ahtec Laptop */
++ { { 0x20, 0x02, 0x0e }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
++ { { 0x22, 0x02, 0x0a }, 0x00, ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
++ { { 0x22, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
+ /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
+- { { 0x62, 0x02, 0x14 }, ALPS_PROTO_V2, 0xcf, 0xcf,
++ { { 0x62, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf,
+ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
+- { { 0x73, 0x02, 0x50 }, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
+- { { 0x52, 0x01, 0x14 }, ALPS_PROTO_V2, 0xff, 0xff,
+- ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
++ { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
++ { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff,
++ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
++ { { 0x73, 0x02, 0x64 }, 0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
++ { { 0x73, 0x02, 0x64 }, 0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT },
++ { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 },
+ };
+
+ /*
+@@ -101,7 +148,7 @@ static void alps_report_buttons(struct psmouse *psmouse,
+ input_sync(dev2);
+ }
+
+-static void alps_process_packet(struct psmouse *psmouse)
++static void alps_process_packet_v1_v2(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
+ const struct alps_model_info *model = priv->i;
+@@ -203,6 +250,224 @@ static void alps_process_packet(struct psmouse *psmouse)
+ input_sync(dev);
+ }
+
++static void alps_process_trackstick_packet_v3(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ unsigned char *packet = psmouse->packet;
++ struct input_dev *dev = priv->dev2;
++ int x, y, z, left, right, middle;
++
++ /* Sanity check packet */
++ if (!(packet[0] & 0x40)) {
++ psmouse_dbg(psmouse, "Bad trackstick packet, discarding\n");
++ return;
++ }
++
++ /*
++ * There's a special packet that seems to indicate the end
++ * of a stream of trackstick data. Filter these out.
++ */
++ if (packet[1] == 0x7f && packet[2] == 0x7f && packet[4] == 0x7f)
++ return;
++
++ x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f));
++ y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f));
++ z = (packet[4] & 0x7c) >> 2;
++
++ /*
++ * The x and y values tend to be quite large, and when used
++ * alone the trackstick is difficult to use. Scale them down
++ * to compensate.
++ */
++ x /= 8;
++ y /= 8;
++
++ input_report_rel(dev, REL_X, x);
++ input_report_rel(dev, REL_Y, -y);
++
++ /*
++ * Most ALPS models report the trackstick buttons in the touchpad
++ * packets, but a few report them here. No reliable way has been
++ * found to differentiate between the models upfront, so we enable
++ * the quirk in response to seeing a button press in the trackstick
++ * packet.
++ */
++ left = packet[3] & 0x01;
++ right = packet[3] & 0x02;
++ middle = packet[3] & 0x04;
++
++ if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS) &&
++ (left || right || middle))
++ priv->quirks |= ALPS_QUIRK_TRACKSTICK_BUTTONS;
++
++ if (priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS) {
++ input_report_key(dev, BTN_LEFT, left);
++ input_report_key(dev, BTN_RIGHT, right);
++ input_report_key(dev, BTN_MIDDLE, middle);
++ }
++
++ input_sync(dev);
++ return;
++}
++
++static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ unsigned char *packet = psmouse->packet;
++ struct input_dev *dev = psmouse->dev;
++ struct input_dev *dev2 = priv->dev2;
++ int x, y, z;
++ int left, right, middle;
++
++ /*
++ * There's no single feature of touchpad position and bitmap
++ * packets that can be used to distinguish between them. We
++ * rely on the fact that a bitmap packet should always follow
++ * a position packet with bit 6 of packet[4] set.
++ */
++ if (priv->multi_packet) {
++ priv->multi_packet = 0;
++
++ /*
++ * Sometimes a position packet will indicate a multi-packet
++ * sequence, but then what follows is another position
++ * packet. Check for this, and when it happens process the
++ * position packet as usual.
++ */
++ if (packet[0] & 0x40) {
++ /*
++ * Bitmap packets are not yet supported, so for now
++ * just ignore them.
++ */
++ return;
++ }
++ }
++
++ if (!priv->multi_packet && (packet[4] & 0x40))
++ priv->multi_packet = 1;
++ else
++ priv->multi_packet = 0;
++
++ left = packet[3] & 0x01;
++ right = packet[3] & 0x02;
++ middle = packet[3] & 0x04;
++
++ x = ((packet[1] & 0x7f) << 4) | ((packet[4] & 0x30) >> 2) |
++ ((packet[0] & 0x30) >> 4);
++ y = ((packet[2] & 0x7f) << 4) | (packet[4] & 0x0f);
++ z = packet[5] & 0x7f;
++
++ /*
++ * Sometimes the hardware sends a single packet with z = 0
++ * in the middle of a stream. Real releases generate packets
++ * with x, y, and z all zero, so these seem to be flukes.
++ * Ignore them.
++ */
++ if (x && y && !z)
++ return;
++
++ if (z >= 64)
++ input_report_key(dev, BTN_TOUCH, 1);
++ else
++ input_report_key(dev, BTN_TOUCH, 0);
++
++ if (z > 0) {
++ input_report_abs(dev, ABS_X, x);
++ input_report_abs(dev, ABS_Y, y);
++ }
++ input_report_abs(dev, ABS_PRESSURE, z);
++
++ input_report_key(dev, BTN_TOOL_FINGER, z > 0);
++ input_report_key(dev, BTN_LEFT, left);
++ input_report_key(dev, BTN_RIGHT, right);
++ input_report_key(dev, BTN_MIDDLE, middle);
++
++ input_sync(dev);
++
++ if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS)) {
++ left = packet[3] & 0x10;
++ right = packet[3] & 0x20;
++ middle = packet[3] & 0x40;
++
++ input_report_key(dev2, BTN_LEFT, left);
++ input_report_key(dev2, BTN_RIGHT, right);
++ input_report_key(dev2, BTN_MIDDLE, middle);
++ input_sync(dev2);
++ }
++}
++
++static void alps_process_packet_v3(struct psmouse *psmouse)
++{
++ unsigned char *packet = psmouse->packet;
++
++ /*
++ * v3 protocol packets come in three types, two representing
++ * touchpad data and one representing trackstick data.
++ * Trackstick packets seem to be distinguished by always
++ * having 0x3f in the last byte. This value has never been
++ * observed in the last byte of either of the other types
++ * of packets.
++ */
++ if (packet[5] == 0x3f) {
++ alps_process_trackstick_packet_v3(psmouse);
++ return;
++ }
++
++ alps_process_touchpad_packet_v3(psmouse);
++}
++
++static void alps_process_packet_v4(struct psmouse *psmouse)
++{
++ unsigned char *packet = psmouse->packet;
++ struct input_dev *dev = psmouse->dev;
++ int x, y, z;
++ int left, right;
++
++ left = packet[4] & 0x01;
++ right = packet[4] & 0x02;
++
++ x = ((packet[1] & 0x7f) << 4) | ((packet[3] & 0x30) >> 2) |
++ ((packet[0] & 0x30) >> 4);
++ y = ((packet[2] & 0x7f) << 4) | (packet[3] & 0x0f);
++ z = packet[5] & 0x7f;
++
++ if (z >= 64)
++ input_report_key(dev, BTN_TOUCH, 1);
++ else
++ input_report_key(dev, BTN_TOUCH, 0);
++
++ if (z > 0) {
++ input_report_abs(dev, ABS_X, x);
++ input_report_abs(dev, ABS_Y, y);
++ }
++ input_report_abs(dev, ABS_PRESSURE, z);
++
++ input_report_key(dev, BTN_TOOL_FINGER, z > 0);
++ input_report_key(dev, BTN_LEFT, left);
++ input_report_key(dev, BTN_RIGHT, right);
++
++ input_sync(dev);
++}
++
++static void alps_process_packet(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ const struct alps_model_info *model = priv->i;
++
++ switch (model->proto_version) {
++ case ALPS_PROTO_V1:
++ case ALPS_PROTO_V2:
++ alps_process_packet_v1_v2(psmouse);
++ break;
++ case ALPS_PROTO_V3:
++ alps_process_packet_v3(psmouse);
++ break;
++ case ALPS_PROTO_V4:
++ alps_process_packet_v4(psmouse);
++ break;
++ }
++}
++
+ static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
+ unsigned char packet[],
+ bool report_buttons)
+@@ -376,11 +641,127 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
+ return PSMOUSE_GOOD_DATA;
+ }
+
++static int alps_command_mode_send_nibble(struct psmouse *psmouse, int nibble)
++{
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ struct alps_data *priv = psmouse->private;
++ int command;
++ unsigned char *param;
++ unsigned char dummy[4];
++
++ BUG_ON(nibble > 0xf);
++
++ command = priv->nibble_commands[nibble].command;
++ param = (command & 0x0f00) ?
++ dummy : (unsigned char *)&priv->nibble_commands[nibble].data;
++
++ if (ps2_command(ps2dev, param, command))
++ return -1;
++
++ return 0;
++}
++
++static int alps_command_mode_set_addr(struct psmouse *psmouse, int addr)
++{
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ struct alps_data *priv = psmouse->private;
++ int i, nibble;
++
++ if (ps2_command(ps2dev, NULL, priv->addr_command))
++ return -1;
++
++ for (i = 12; i >= 0; i -= 4) {
++ nibble = (addr >> i) & 0xf;
++ if (alps_command_mode_send_nibble(psmouse, nibble))
++ return -1;
++ }
++
++ return 0;
++}
++
++static int __alps_command_mode_read_reg(struct psmouse *psmouse, int addr)
++{
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ unsigned char param[4];
++
++ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO))
++ return -1;
++
++ /*
++ * The address being read is returned in the first two bytes
++ * of the result. Check that this address matches the expected
++ * address.
++ */
++ if (addr != ((param[0] << 8) | param[1]))
++ return -1;
++
++ return param[2];
++}
++
++static int alps_command_mode_read_reg(struct psmouse *psmouse, int addr)
++{
++ if (alps_command_mode_set_addr(psmouse, addr))
++ return -1;
++ return __alps_command_mode_read_reg(psmouse, addr);
++}
++
++static int __alps_command_mode_write_reg(struct psmouse *psmouse, u8 value)
++{
++ if (alps_command_mode_send_nibble(psmouse, (value >> 4) & 0xf))
++ return -1;
++ if (alps_command_mode_send_nibble(psmouse, value & 0xf))
++ return -1;
++ return 0;
++}
++
++static int alps_command_mode_write_reg(struct psmouse *psmouse, int addr,
++ u8 value)
++{
++ if (alps_command_mode_set_addr(psmouse, addr))
++ return -1;
++ return __alps_command_mode_write_reg(psmouse, value);
++}
++
++static int alps_enter_command_mode(struct psmouse *psmouse,
++ unsigned char *resp)
++{
++ unsigned char param[4];
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++
++ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) ||
++ ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) {
++ psmouse_err(psmouse, "failed to enter command mode\n");
++ return -1;
++ }
++
++ if (param[0] != 0x88 && param[1] != 0x07) {
++ psmouse_dbg(psmouse,
++ "unknown response while entering command mode: %2.2x %2.2x %2.2x\n",
++ param[0], param[1], param[2]);
++ return -1;
++ }
++
++ if (resp)
++ *resp = param[2];
++ return 0;
++}
++
++static inline int alps_exit_command_mode(struct psmouse *psmouse)
++{
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSTREAM))
++ return -1;
++ return 0;
++}
++
+ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *version)
+ {
+ struct ps2dev *ps2dev = &psmouse->ps2dev;
+ static const unsigned char rates[] = { 0, 10, 20, 40, 60, 80, 100, 200 };
+ unsigned char param[4];
++ const struct alps_model_info *model = NULL;
+ int i;
+
+ /*
+@@ -428,12 +809,41 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
+ *version = (param[0] << 8) | (param[1] << 4) | i;
+ }
+
+- for (i = 0; i < ARRAY_SIZE(alps_model_data); i++)
++ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) {
+ if (!memcmp(param, alps_model_data[i].signature,
+- sizeof(alps_model_data[i].signature)))
+- return alps_model_data + i;
++ sizeof(alps_model_data[i].signature))) {
++ model = alps_model_data + i;
++ break;
++ }
++ }
+
+- return NULL;
++ if (model && model->proto_version > ALPS_PROTO_V2) {
++ /*
++ * Need to check command mode response to identify
++ * model
++ */
++ model = NULL;
++ if (alps_enter_command_mode(psmouse, param)) {
++ psmouse_warn(psmouse,
++ "touchpad failed to enter command mode\n");
++ } else {
++ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) {
++ if (alps_model_data[i].proto_version > ALPS_PROTO_V2 &&
++ alps_model_data[i].command_mode_resp == param[0]) {
++ model = alps_model_data + i;
++ break;
++ }
++ }
++ alps_exit_command_mode(psmouse);
++
++ if (!model)
++ psmouse_dbg(psmouse,
++ "Unknown command mode response %2.2x\n",
++ param[0]);
++ }
++ }
++
++ return model;
+ }
+
+ /*
+@@ -441,7 +851,7 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int
+ * subsequent commands. It looks like glidepad is behind stickpointer,
+ * I'd thought it would be other way around...
+ */
+-static int alps_passthrough_mode(struct psmouse *psmouse, bool enable)
++static int alps_passthrough_mode_v2(struct psmouse *psmouse, bool enable)
+ {
+ struct ps2dev *ps2dev = &psmouse->ps2dev;
+ int cmd = enable ? PSMOUSE_CMD_SETSCALE21 : PSMOUSE_CMD_SETSCALE11;
+@@ -458,7 +868,7 @@ static int alps_passthrough_mode(struct psmouse *psmouse, bool enable)
+ return 0;
+ }
+
+-static int alps_absolute_mode(struct psmouse *psmouse)
++static int alps_absolute_mode_v1_v2(struct psmouse *psmouse)
+ {
+ struct ps2dev *ps2dev = &psmouse->ps2dev;
+
+@@ -533,13 +943,13 @@ static int alps_poll(struct psmouse *psmouse)
+ bool poll_failed;
+
+ if (priv->i->flags & ALPS_PASS)
+- alps_passthrough_mode(psmouse, true);
++ alps_passthrough_mode_v2(psmouse, true);
+
+ poll_failed = ps2_command(&psmouse->ps2dev, buf,
+ PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0;
+
+ if (priv->i->flags & ALPS_PASS)
+- alps_passthrough_mode(psmouse, false);
++ alps_passthrough_mode_v2(psmouse, false);
+
+ if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0)
+ return -1;
+@@ -556,13 +966,13 @@ static int alps_poll(struct psmouse *psmouse)
+ return 0;
+ }
+
+-static int alps_hw_init(struct psmouse *psmouse)
++static int alps_hw_init_v1_v2(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
+ const struct alps_model_info *model = priv->i;
+
+ if ((model->flags & ALPS_PASS) &&
+- alps_passthrough_mode(psmouse, true)) {
++ alps_passthrough_mode_v2(psmouse, true)) {
+ return -1;
+ }
+
+@@ -571,13 +981,13 @@ static int alps_hw_init(struct psmouse *psmouse)
+ return -1;
+ }
+
+- if (alps_absolute_mode(psmouse)) {
++ if (alps_absolute_mode_v1_v2(psmouse)) {
+ psmouse_err(psmouse, "Failed to enable absolute mode\n");
+ return -1;
+ }
+
+ if ((model->flags & ALPS_PASS) &&
+- alps_passthrough_mode(psmouse, false)) {
++ alps_passthrough_mode_v2(psmouse, false)) {
+ return -1;
+ }
+
+@@ -590,6 +1000,297 @@ static int alps_hw_init(struct psmouse *psmouse)
+ return 0;
+ }
+
++/*
++ * Enable or disable passthrough mode to the trackstick. Must be in
++ * command mode when calling this function.
++ */
++static int alps_passthrough_mode_v3(struct psmouse *psmouse, bool enable)
++{
++ int reg_val;
++
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0008);
++ if (reg_val == -1)
++ return -1;
++
++ if (enable)
++ reg_val |= 0x01;
++ else
++ reg_val &= ~0x01;
++
++ if (__alps_command_mode_write_reg(psmouse, reg_val))
++ return -1;
++
++ return 0;
++}
++
++/* Must be in command mode when calling this function */
++static int alps_absolute_mode_v3(struct psmouse *psmouse)
++{
++ int reg_val;
++
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0004);
++ if (reg_val == -1)
++ return -1;
++
++ reg_val |= 0x06;
++ if (__alps_command_mode_write_reg(psmouse, reg_val))
++ return -1;
++
++ return 0;
++}
++
++static int alps_hw_init_v3(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ int reg_val;
++ unsigned char param[4];
++
++ priv->nibble_commands = alps_v3_nibble_commands;
++ priv->addr_command = PSMOUSE_CMD_RESET_WRAP;
++
++ if (alps_enter_command_mode(psmouse, NULL))
++ goto error;
++
++ /* Check for trackstick */
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0008);
++ if (reg_val == -1)
++ goto error;
++ if (reg_val & 0x80) {
++ if (alps_passthrough_mode_v3(psmouse, true))
++ goto error;
++ if (alps_exit_command_mode(psmouse))
++ goto error;
++
++ /*
++ * E7 report for the trackstick
++ *
++ * There have been reports of failures to seem to trace back
++ * to the above trackstick check failing. When these occur
++ * this E7 report fails, so when that happens we continue
++ * with the assumption that there isn't a trackstick after
++ * all.
++ */
++ param[0] = 0x64;
++ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) ||
++ ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) {
++ psmouse_warn(psmouse, "trackstick E7 report failed\n");
++ } else {
++ psmouse_dbg(psmouse,
++ "trackstick E7 report: %2.2x %2.2x %2.2x\n",
++ param[0], param[1], param[2]);
++
++ /*
++ * Not sure what this does, but it is absolutely
++ * essential. Without it, the touchpad does not
++ * work at all and the trackstick just emits normal
++ * PS/2 packets.
++ */
++ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) ||
++ alps_command_mode_send_nibble(psmouse, 0x9) ||
++ alps_command_mode_send_nibble(psmouse, 0x4)) {
++ psmouse_err(psmouse,
++ "Error sending magic E6 sequence\n");
++ goto error_passthrough;
++ }
++ }
++
++ if (alps_enter_command_mode(psmouse, NULL))
++ goto error_passthrough;
++ if (alps_passthrough_mode_v3(psmouse, false))
++ goto error;
++ }
++
++ if (alps_absolute_mode_v3(psmouse)) {
++ psmouse_err(psmouse, "Failed to enter absolute mode\n");
++ goto error;
++ }
++
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0006);
++ if (reg_val == -1)
++ goto error;
++ if (__alps_command_mode_write_reg(psmouse, reg_val | 0x01))
++ goto error;
++
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0007);
++ if (reg_val == -1)
++ goto error;
++ if (__alps_command_mode_write_reg(psmouse, reg_val | 0x01))
++ goto error;
++
++ if (alps_command_mode_read_reg(psmouse, 0x0144) == -1)
++ goto error;
++ if (__alps_command_mode_write_reg(psmouse, 0x04))
++ goto error;
++
++ if (alps_command_mode_read_reg(psmouse, 0x0159) == -1)
++ goto error;
++ if (__alps_command_mode_write_reg(psmouse, 0x03))
++ goto error;
++
++ if (alps_command_mode_read_reg(psmouse, 0x0163) == -1)
++ goto error;
++ if (alps_command_mode_write_reg(psmouse, 0x0163, 0x03))
++ goto error;
++
++ if (alps_command_mode_read_reg(psmouse, 0x0162) == -1)
++ goto error;
++ if (alps_command_mode_write_reg(psmouse, 0x0162, 0x04))
++ goto error;
++
++ /*
++ * This ensures the trackstick packets are in the format
++ * supported by this driver. If bit 1 isn't set the packet
++ * format is different.
++ */
++ if (alps_command_mode_write_reg(psmouse, 0x0008, 0x82))
++ goto error;
++
++ alps_exit_command_mode(psmouse);
++
++ /* Set rate and enable data reporting */
++ param[0] = 0x64;
++ if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE)) {
++ psmouse_err(psmouse, "Failed to enable data reporting\n");
++ return -1;
++ }
++
++ return 0;
++
++error_passthrough:
++ /* Something failed while in passthrough mode, so try to get out */
++ if (!alps_enter_command_mode(psmouse, NULL))
++ alps_passthrough_mode_v3(psmouse, false);
++error:
++ /*
++ * Leaving the touchpad in command mode will essentially render
++ * it unusable until the machine reboots, so exit it here just
++ * to be safe
++ */
++ alps_exit_command_mode(psmouse);
++ return -1;
++}
++
++/* Must be in command mode when calling this function */
++static int alps_absolute_mode_v4(struct psmouse *psmouse)
++{
++ int reg_val;
++
++ reg_val = alps_command_mode_read_reg(psmouse, 0x0004);
++ if (reg_val == -1)
++ return -1;
++
++ reg_val |= 0x02;
++ if (__alps_command_mode_write_reg(psmouse, reg_val))
++ return -1;
++
++ return 0;
++}
++
++static int alps_hw_init_v4(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ struct ps2dev *ps2dev = &psmouse->ps2dev;
++ unsigned char param[4];
++
++ priv->nibble_commands = alps_v4_nibble_commands;
++ priv->addr_command = PSMOUSE_CMD_DISABLE;
++
++ if (alps_enter_command_mode(psmouse, NULL))
++ goto error;
++
++ if (alps_absolute_mode_v4(psmouse)) {
++ psmouse_err(psmouse, "Failed to enter absolute mode\n");
++ goto error;
++ }
++
++ if (alps_command_mode_write_reg(psmouse, 0x0007, 0x8c))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x0149, 0x03))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x0160, 0x03))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x017f, 0x15))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x0151, 0x01))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x0168, 0x03))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x014a, 0x03))
++ goto error;
++
++ if (alps_command_mode_write_reg(psmouse, 0x0161, 0x03))
++ goto error;
++
++ alps_exit_command_mode(psmouse);
++
++ /*
++ * This sequence changes the output from a 9-byte to an
++ * 8-byte format. All the same data seems to be present,
++ * just in a more compact format.
++ */
++ param[0] = 0xc8;
++ param[1] = 0x64;
++ param[2] = 0x50;
++ if (ps2_command(ps2dev, &param[0], PSMOUSE_CMD_SETRATE) ||
++ ps2_command(ps2dev, &param[1], PSMOUSE_CMD_SETRATE) ||
++ ps2_command(ps2dev, &param[2], PSMOUSE_CMD_SETRATE) ||
++ ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
++ return -1;
++
++ /* Set rate and enable data reporting */
++ param[0] = 0x64;
++ if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE) ||
++ ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE)) {
++ psmouse_err(psmouse, "Failed to enable data reporting\n");
++ return -1;
++ }
++
++ return 0;
++
++error:
++ /*
++ * Leaving the touchpad in command mode will essentially render
++ * it unusable until the machine reboots, so exit it here just
++ * to be safe
++ */
++ alps_exit_command_mode(psmouse);
++ return -1;
++}
++
++static int alps_hw_init(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++ const struct alps_model_info *model = priv->i;
++ int ret = -1;
++
++ switch (model->proto_version) {
++ case ALPS_PROTO_V1:
++ case ALPS_PROTO_V2:
++ ret = alps_hw_init_v1_v2(psmouse);
++ break;
++ case ALPS_PROTO_V3:
++ ret = alps_hw_init_v3(psmouse);
++ break;
++ case ALPS_PROTO_V4:
++ ret = alps_hw_init_v4(psmouse);
++ break;
++ }
++
++ return ret;
++}
++
+ static int alps_reconnect(struct psmouse *psmouse)
+ {
+ const struct alps_model_info *model;
+@@ -630,6 +1331,8 @@ int alps_init(struct psmouse *psmouse)
+
+ psmouse->private = priv;
+
++ psmouse_reset(psmouse);
++
+ model = alps_get_model(psmouse, &version);
+ if (!model)
+ goto init_fail;
+@@ -657,8 +1360,20 @@ int alps_init(struct psmouse *psmouse)
+ BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT);
+
+ dev1->evbit[BIT_WORD(EV_ABS)] |= BIT_MASK(EV_ABS);
+- input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0);
+- input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0);
++
++ switch (model->proto_version) {
++ case ALPS_PROTO_V1:
++ case ALPS_PROTO_V2:
++ input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0);
++ input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0);
++ break;
++ case ALPS_PROTO_V3:
++ case ALPS_PROTO_V4:
++ input_set_abs_params(dev1, ABS_X, 0, 2000, 0, 0);
++ input_set_abs_params(dev1, ABS_Y, 0, 1400, 0, 0);
++ break;
++ }
++
+ input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0);
+
+ if (model->flags & ALPS_WHEEL) {
+@@ -701,7 +1416,7 @@ int alps_init(struct psmouse *psmouse)
+ psmouse->poll = alps_poll;
+ psmouse->disconnect = alps_disconnect;
+ psmouse->reconnect = alps_reconnect;
+- psmouse->pktsize = 6;
++ psmouse->pktsize = model->proto_version == ALPS_PROTO_V4 ? 8 : 6;
+
+ /* We are having trouble resyncing ALPS touchpads so disable it for now */
+ psmouse->resync_time = 0;
+diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
+index 4ce9bba..62db7f4 100644
+--- a/drivers/input/mouse/alps.h
++++ b/drivers/input/mouse/alps.h
+@@ -14,22 +14,36 @@
+
+ #define ALPS_PROTO_V1 0
+ #define ALPS_PROTO_V2 1
++#define ALPS_PROTO_V3 2
++#define ALPS_PROTO_V4 3
+
+ struct alps_model_info {
+ unsigned char signature[3];
++ unsigned char command_mode_resp; /* v3/v4 only */
+ unsigned char proto_version;
+ unsigned char byte0, mask0;
+ unsigned char flags;
+ };
+
++struct alps_nibble_commands {
++ int command;
++ unsigned char data;
++};
++
+ struct alps_data {
+ struct input_dev *dev2; /* Relative device */
+ char phys[32]; /* Phys */
+ const struct alps_model_info *i;/* Info */
++ const struct alps_nibble_commands *nibble_commands;
++ int addr_command; /* Command to set register address */
+ int prev_fin; /* Finger bit from previous packet */
++ int multi_packet; /* Multi-packet data in progress */
++ u8 quirks;
+ struct timer_list timer;
+ };
+
++#define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */
++
+ #ifdef CONFIG_MOUSE_PS2_ALPS
+ int alps_detect(struct psmouse *psmouse, bool set_properties);
+ int alps_init(struct psmouse *psmouse);
+diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
+index 9b84b0c..11a9c6c 100644
+--- a/drivers/input/mouse/psmouse.h
++++ b/drivers/input/mouse/psmouse.h
+@@ -8,6 +8,7 @@
+ #define PSMOUSE_CMD_SETSTREAM 0x00ea
+ #define PSMOUSE_CMD_SETPOLL 0x00f0
+ #define PSMOUSE_CMD_POLL 0x00eb /* caller sets number of bytes to receive */
++#define PSMOUSE_CMD_RESET_WRAP 0x00ec
+ #define PSMOUSE_CMD_GETID 0x02f2
+ #define PSMOUSE_CMD_SETRATE 0x10f3
+ #define PSMOUSE_CMD_ENABLE 0x00f4
+--
+1.7.7.3
+
+
+From 01ce661fc83005947dc958a5739c153843af8a73 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:54:13 -0800
+Subject: [PATCH 5/6] Input: ALPS - add semi-MT support for v3 protocol
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ drivers/input/mouse/alps.c | 233 ++++++++++++++++++++++++++++++++++++++++----
+ drivers/input/mouse/alps.h | 1 +
+ 2 files changed, 215 insertions(+), 19 deletions(-)
+
+diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
+index a0248fd..bd87380 100644
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -17,6 +17,7 @@
+
+ #include <linux/slab.h>
+ #include <linux/input.h>
++#include <linux/input/mt.h>
+ #include <linux/serio.h>
+ #include <linux/libps2.h>
+
+@@ -26,6 +27,12 @@
+ /*
+ * Definitions for ALPS version 3 and 4 command mode protocol
+ */
++#define ALPS_V3_X_MAX 2000
++#define ALPS_V3_Y_MAX 1400
++
++#define ALPS_BITMAP_X_BITS 15
++#define ALPS_BITMAP_Y_BITS 11
++
+ #define ALPS_CMD_NIBBLE_10 0x01f2
+
+ static const struct alps_nibble_commands alps_v3_nibble_commands[] = {
+@@ -250,6 +257,137 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse)
+ input_sync(dev);
+ }
+
++/*
++ * Process bitmap data from v3 and v4 protocols. Returns the number of
++ * fingers detected. A return value of 0 means at least one of the
++ * bitmaps was empty.
++ *
++ * The bitmaps don't have enough data to track fingers, so this function
++ * only generates points representing a bounding box of all contacts.
++ * These points are returned in x1, y1, x2, and y2 when the return value
++ * is greater than 0.
++ */
++static int alps_process_bitmap(unsigned int x_map, unsigned int y_map,
++ int *x1, int *y1, int *x2, int *y2)
++{
++ struct alps_bitmap_point {
++ int start_bit;
++ int num_bits;
++ };
++
++ int fingers_x = 0, fingers_y = 0, fingers;
++ int i, bit, prev_bit;
++ struct alps_bitmap_point x_low = {0,}, x_high = {0,};
++ struct alps_bitmap_point y_low = {0,}, y_high = {0,};
++ struct alps_bitmap_point *point;
++
++ if (!x_map || !y_map)
++ return 0;
++
++ *x1 = *y1 = *x2 = *y2 = 0;
++
++ prev_bit = 0;
++ point = &x_low;
++ for (i = 0; x_map != 0; i++, x_map >>= 1) {
++ bit = x_map & 1;
++ if (bit) {
++ if (!prev_bit) {
++ point->start_bit = i;
++ fingers_x++;
++ }
++ point->num_bits++;
++ } else {
++ if (prev_bit)
++ point = &x_high;
++ else
++ point->num_bits = 0;
++ }
++ prev_bit = bit;
++ }
++
++ /*
++ * y bitmap is reversed for what we need (lower positions are in
++ * higher bits), so we process from the top end.
++ */
++ y_map = y_map << (sizeof(y_map) * BITS_PER_BYTE - ALPS_BITMAP_Y_BITS);
++ prev_bit = 0;
++ point = &y_low;
++ for (i = 0; y_map != 0; i++, y_map <<= 1) {
++ bit = y_map & (1 << (sizeof(y_map) * BITS_PER_BYTE - 1));
++ if (bit) {
++ if (!prev_bit) {
++ point->start_bit = i;
++ fingers_y++;
++ }
++ point->num_bits++;
++ } else {
++ if (prev_bit)
++ point = &y_high;
++ else
++ point->num_bits = 0;
++ }
++ prev_bit = bit;
++ }
++
++ /*
++ * Fingers can overlap, so we use the maximum count of fingers
++ * on either axis as the finger count.
++ */
++ fingers = max(fingers_x, fingers_y);
++
++ /*
++ * If total fingers is > 1 but either axis reports only a single
++ * contact, we have overlapping or adjacent fingers. For the
++ * purposes of creating a bounding box, divide the single contact
++ * (roughly) equally between the two points.
++ */
++ if (fingers > 1) {
++ if (fingers_x == 1) {
++ i = x_low.num_bits / 2;
++ x_low.num_bits = x_low.num_bits - i;
++ x_high.start_bit = x_low.start_bit + i;
++ x_high.num_bits = max(i, 1);
++ } else if (fingers_y == 1) {
++ i = y_low.num_bits / 2;
++ y_low.num_bits = y_low.num_bits - i;
++ y_high.start_bit = y_low.start_bit + i;
++ y_high.num_bits = max(i, 1);
++ }
++ }
++
++ *x1 = (ALPS_V3_X_MAX * (2 * x_low.start_bit + x_low.num_bits - 1)) /
++ (2 * (ALPS_BITMAP_X_BITS - 1));
++ *y1 = (ALPS_V3_Y_MAX * (2 * y_low.start_bit + y_low.num_bits - 1)) /
++ (2 * (ALPS_BITMAP_Y_BITS - 1));
++
++ if (fingers > 1) {
++ *x2 = (ALPS_V3_X_MAX * (2 * x_high.start_bit + x_high.num_bits - 1)) /
++ (2 * (ALPS_BITMAP_X_BITS - 1));
++ *y2 = (ALPS_V3_Y_MAX * (2 * y_high.start_bit + y_high.num_bits - 1)) /
++ (2 * (ALPS_BITMAP_Y_BITS - 1));
++ }
++
++ return fingers;
++}
++
++static void alps_set_slot(struct input_dev *dev, int slot, bool active,
++ int x, int y)
++{
++ input_mt_slot(dev, slot);
++ input_mt_report_slot_state(dev, MT_TOOL_FINGER, active);
++ if (active) {
++ input_report_abs(dev, ABS_MT_POSITION_X, x);
++ input_report_abs(dev, ABS_MT_POSITION_Y, y);
++ }
++}
++
++static void alps_report_semi_mt_data(struct input_dev *dev, int num_fingers,
++ int x1, int y1, int x2, int y2)
++{
++ alps_set_slot(dev, 0, num_fingers != 0, x1, y1);
++ alps_set_slot(dev, 1, num_fingers == 2, x2, y2);
++}
++
+ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
+@@ -318,16 +456,17 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
+ struct input_dev *dev2 = priv->dev2;
+ int x, y, z;
+ int left, right, middle;
++ int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
++ int fingers = 0, bmap_fingers;
++ unsigned int x_bitmap, y_bitmap;
+
+ /*
+- * There's no single feature of touchpad position and bitmap
+- * packets that can be used to distinguish between them. We
+- * rely on the fact that a bitmap packet should always follow
+- * a position packet with bit 6 of packet[4] set.
++ * There's no single feature of touchpad position and bitmap packets
++ * that can be used to distinguish between them. We rely on the fact
++ * that a bitmap packet should always follow a position packet with
++ * bit 6 of packet[4] set.
+ */
+ if (priv->multi_packet) {
+- priv->multi_packet = 0;
+-
+ /*
+ * Sometimes a position packet will indicate a multi-packet
+ * sequence, but then what follows is another position
+@@ -335,18 +474,49 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
+ * position packet as usual.
+ */
+ if (packet[0] & 0x40) {
++ fingers = (packet[5] & 0x3) + 1;
++ x_bitmap = ((packet[4] & 0x7e) << 8) |
++ ((packet[1] & 0x7f) << 2) |
++ ((packet[0] & 0x30) >> 4);
++ y_bitmap = ((packet[3] & 0x70) << 4) |
++ ((packet[2] & 0x7f) << 1) |
++ (packet[4] & 0x01);
++
++ bmap_fingers = alps_process_bitmap(x_bitmap, y_bitmap,
++ &x1, &y1, &x2, &y2);
++
+ /*
+- * Bitmap packets are not yet supported, so for now
+- * just ignore them.
++ * We shouldn't report more than one finger if
++ * we don't have two coordinates.
+ */
+- return;
++ if (fingers > 1 && bmap_fingers < 2)
++ fingers = bmap_fingers;
++
++ /* Now process position packet */
++ packet = priv->multi_data;
++ } else {
++ priv->multi_packet = 0;
+ }
+ }
+
+- if (!priv->multi_packet && (packet[4] & 0x40))
++ /*
++ * Bit 6 of byte 0 is not usually set in position packets. The only
++ * times it seems to be set is in situations where the data is
++ * suspect anyway, e.g. a palm resting flat on the touchpad. Given
++ * this combined with the fact that this bit is useful for filtering
++ * out misidentified bitmap packets, we reject anything with this
++ * bit set.
++ */
++ if (packet[0] & 0x40)
++ return;
++
++ if (!priv->multi_packet && (packet[4] & 0x40)) {
+ priv->multi_packet = 1;
+- else
+- priv->multi_packet = 0;
++ memcpy(priv->multi_data, packet, sizeof(priv->multi_data));
++ return;
++ }
++
++ priv->multi_packet = 0;
+
+ left = packet[3] & 0x01;
+ right = packet[3] & 0x02;
+@@ -366,22 +536,38 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse)
+ if (x && y && !z)
+ return;
+
++ /*
++ * If we don't have MT data or the bitmaps were empty, we have
++ * to rely on ST data.
++ */
++ if (!fingers) {
++ x1 = x;
++ y1 = y;
++ fingers = z > 0 ? 1 : 0;
++ }
++
+ if (z >= 64)
+ input_report_key(dev, BTN_TOUCH, 1);
+ else
+ input_report_key(dev, BTN_TOUCH, 0);
+
++ alps_report_semi_mt_data(dev, fingers, x1, y1, x2, y2);
++
++ input_report_key(dev, BTN_TOOL_FINGER, fingers == 1);
++ input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2);
++ input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3);
++ input_report_key(dev, BTN_TOOL_QUADTAP, fingers == 4);
++
++ input_report_key(dev, BTN_LEFT, left);
++ input_report_key(dev, BTN_RIGHT, right);
++ input_report_key(dev, BTN_MIDDLE, middle);
++
+ if (z > 0) {
+ input_report_abs(dev, ABS_X, x);
+ input_report_abs(dev, ABS_Y, y);
+ }
+ input_report_abs(dev, ABS_PRESSURE, z);
+
+- input_report_key(dev, BTN_TOOL_FINGER, z > 0);
+- input_report_key(dev, BTN_LEFT, left);
+- input_report_key(dev, BTN_RIGHT, right);
+- input_report_key(dev, BTN_MIDDLE, middle);
+-
+ input_sync(dev);
+
+ if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS)) {
+@@ -1368,9 +1554,18 @@ int alps_init(struct psmouse *psmouse)
+ input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0);
+ break;
+ case ALPS_PROTO_V3:
++ set_bit(INPUT_PROP_SEMI_MT, dev1->propbit);
++ input_mt_init_slots(dev1, 2);
++ input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, ALPS_V3_X_MAX, 0, 0);
++ input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, ALPS_V3_Y_MAX, 0, 0);
++
++ set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit);
++ set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit);
++ set_bit(BTN_TOOL_QUADTAP, dev1->keybit);
++ /* fall through */
+ case ALPS_PROTO_V4:
+- input_set_abs_params(dev1, ABS_X, 0, 2000, 0, 0);
+- input_set_abs_params(dev1, ABS_Y, 0, 1400, 0, 0);
++ input_set_abs_params(dev1, ABS_X, 0, ALPS_V3_X_MAX, 0, 0);
++ input_set_abs_params(dev1, ABS_Y, 0, ALPS_V3_Y_MAX, 0, 0);
+ break;
+ }
+
+diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
+index 62db7f4..a00a4ab 100644
+--- a/drivers/input/mouse/alps.h
++++ b/drivers/input/mouse/alps.h
+@@ -38,6 +38,7 @@ struct alps_data {
+ int addr_command; /* Command to set register address */
+ int prev_fin; /* Finger bit from previous packet */
+ int multi_packet; /* Multi-packet data in progress */
++ unsigned char multi_data[6]; /* Saved multi-packet data */
+ u8 quirks;
+ struct timer_list timer;
+ };
+--
+1.7.7.3
+
+
+From 7cf801cfc0774b777aa6861cf4a43a90b112b1ed Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Mon, 7 Nov 2011 19:54:35 -0800
+Subject: [PATCH 6/6] Input: ALPS - add documentation for protocol versions 3
+ and 4
+
+Also converts from using "old" and "new" to describe the already-known
+protocols to using "version 1" and "version 2" to match the code.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Acked-by: Chase Douglas <chase.douglas@canonical.com>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+---
+ Documentation/input/alps.txt | 135 ++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 124 insertions(+), 11 deletions(-)
+
+diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
+index ab5478f..f274c28 100644
+--- a/Documentation/input/alps.txt
++++ b/Documentation/input/alps.txt
+@@ -4,12 +4,9 @@ ALPS Touchpad Protocol
+ Introduction
+ ------------
+
+-Currently the ALPS touchpad driver supports two protocol versions in use by
+-ALPS touchpads, the "old" and "new" protocol versions. Fundamentally these
+-differ only in the format of their event packets (in reality many features may
+-be found on new protocol devices that aren't found on the old protocol
+-devices, but these are handled transparently as feature differences rather
+-than protocol differences).
++Currently the ALPS touchpad driver supports four protocol versions in use by
++ALPS touchpads, called versions 1, 2, 3, and 4. Information about the various
++protocol versions is contained in the following sections.
+
+ Detection
+ ---------
+@@ -22,10 +19,37 @@ If the E6 report is successful, the touchpad model is identified using the "E7
+ report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
+ matched against known models in the alps_model_data_array.
+
++With protocol versions 3 and 4, the E7 report model signature is always
++73-02-64. To differentiate between these versions, the response from the
++"Enter Command Mode" sequence must be inspected as described below.
++
++Command Mode
++------------
++
++Protocol versions 3 and 4 have a command mode that is used to read and write
++one-byte device registers in a 16-bit address space. The command sequence
++EC-EC-EC-E9 places the device in command mode, and the device will respond
++with 88-07 followed by a third byte. This third byte can be used to determine
++whether the devices uses the version 3 or 4 protocol.
++
++To exit command mode, PSMOUSE_CMD_SETSTREAM (EA) is sent to the touchpad.
++
++While in command mode, register addresses can be set by first sending a
++specific command, either EC for v3 devices or F5 for v4 devices. Then the
++address is sent one nibble at a time, where each nibble is encoded as a
++command with optional data. This enoding differs slightly between the v3 and
++v4 protocols.
++
++Once an address has been set, the addressed register can be read by sending
++PSMOUSE_CMD_GETINFO (E9). The first two bytes of the response contains the
++address of the register being read, and the third contains the value of the
++register. Registers are written by writing the value one nibble at a time
++using the same encoding used for addresses.
++
+ Packet Format
+ -------------
+
+-In the following tables, the following notation us used.
++In the following tables, the following notation is used.
+
+ CAPITALS = stick, miniscules = touchpad
+
+@@ -41,8 +65,8 @@ PS/2 packet format
+
+ Note that the device never signals overflow condition.
+
+-ALPS Absolute Mode - Old Format
+--------------------------------
++ALPS Absolute Mode - Protocol Verion 1
++--------------------------------------
+
+ byte 0: 1 0 0 0 1 x9 x8 x7
+ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+@@ -51,8 +75,8 @@ ALPS Absolute Mode - Old Format
+ byte 4: 0 y6 y5 y4 y3 y2 y1 y0
+ byte 5: 0 z6 z5 z4 z3 z2 z1 z0
+
+-ALPS Absolute Mode - New Format
+--------------------------------
++ALPS Absolute Mode - Protocol Version 2
++---------------------------------------
+
+ byte 0: 1 ? ? ? 1 ? ? ?
+ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+@@ -73,3 +97,92 @@ Dualpoint device -- interleaved packet format
+ byte 6: 0 y9 y8 y7 1 m r l
+ byte 7: 0 y6 y5 y4 y3 y2 y1 y0
+ byte 8: 0 z6 z5 z4 z3 z2 z1 z0
++
++ALPS Absolute Mode - Protocol Version 3
++---------------------------------------
++
++ALPS protocol version 3 has three different packet formats. The first two are
++associated with touchpad events, and the third is associatd with trackstick
++events.
++
++The first type is the touchpad position packet.
++
++ byte 0: 1 ? x1 x0 1 1 1 1
++ byte 1: 0 x10 x9 x8 x7 x6 x5 x4
++ byte 2: 0 y10 y9 y8 y7 y6 y5 y4
++ byte 3: 0 M R L 1 m r l
++ byte 4: 0 mt x3 x2 y3 y2 y1 y0
++ byte 5: 0 z6 z5 z4 z3 z2 z1 z0
++
++Note that for some devices the trackstick buttons are reported in this packet,
++and on others it is reported in the trackstick packets.
++
++The second packet type contains bitmaps representing the x and y axes. In the
++bitmaps a given bit is set if there is a finger covering that position on the
++given axis. Thus the bitmap packet can be used for low-resolution multi-touch
++data, although finger tracking is not possible. This packet also encodes the
++number of contacts (f1 and f0 in the table below).
++
++ byte 0: 1 1 x1 x0 1 1 1 1
++ byte 1: 0 x8 x7 x6 x5 x4 x3 x2
++ byte 2: 0 y7 y6 y5 y4 y3 y2 y1
++ byte 3: 0 y10 y9 y8 1 1 1 1
++ byte 4: 0 x14 x13 x12 x11 x10 x9 y0
++ byte 5: 0 1 ? ? ? ? f1 f0
++
++This packet only appears after a position packet with the mt bit set, and
++ususally only appears when there are two or more contacts (although
++ocassionally it's seen with only a single contact).
++
++The final v3 packet type is the trackstick packet.
++
++ byte 0: 1 1 x7 y7 1 1 1 1
++ byte 1: 0 x6 x5 x4 x3 x2 x1 x0
++ byte 2: 0 y6 y5 y4 y3 y2 y1 y0
++ byte 3: 0 1 0 0 1 0 0 0
++ byte 4: 0 z4 z3 z2 z1 z0 ? ?
++ byte 5: 0 0 1 1 1 1 1 1
++
++ALPS Absolute Mode - Protocol Version 4
++---------------------------------------
++
++Protocol version 4 has an 8-byte packet format.
++
++ byte 0: 1 ? x1 x0 1 1 1 1
++ byte 1: 0 x10 x9 x8 x7 x6 x5 x4
++ byte 2: 0 y10 y9 y8 y7 y6 y5 y4
++ byte 3: 0 1 x3 x2 y3 y2 y1 y0
++ byte 4: 0 ? ? ? 1 ? r l
++ byte 5: 0 z6 z5 z4 z3 z2 z1 z0
++ byte 6: bitmap data (described below)
++ byte 7: bitmap data (described below)
++
++The last two bytes represent a partial bitmap packet, with 3 full packets
++required to construct a complete bitmap packet. Once assembled, the 6-byte
++bitmap packet has the following format:
++
++ byte 0: 0 1 x7 x6 x5 x4 x3 x2
++ byte 1: 0 x1 x0 y4 y3 y2 y1 y0
++ byte 2: 0 0 ? x14 x13 x12 x11 x10
++ byte 3: 0 x9 x8 y9 y8 y7 y6 y5
++ byte 4: 0 0 0 0 0 0 0 0
++ byte 5: 0 0 0 0 0 0 0 y10
++
++There are several things worth noting here.
++
++ 1) In the bitmap data, bit 6 of byte 0 serves as a sync byte to
++ identify the first fragment of a bitmap packet.
++
++ 2) The bitmaps represent the same data as in the v3 bitmap packets, although
++ the packet layout is different.
++
++ 3) There doesn't seem to be a count of the contact points anywhere in the v4
++ protocol packets. Deriving a count of contact points must be done by
++ analyzing the bitmaps.
++
++ 4) There is a 3 to 1 ratio of position packets to bitmap packets. Therefore
++ MT position can only be updated for every third ST position update, and
++ the count of contact points can only be updated every third packet as
++ well.
++
++So far no v4 devices with tracksticks have been encountered.
+--
+1.7.7.3
+
diff --git a/freed-ora/current/master/bcma-brcmsmac-compat.patch b/freed-ora/current/master/bcma-brcmsmac-compat.patch
new file mode 100644
index 000000000..e16e5b0c5
--- /dev/null
+++ b/freed-ora/current/master/bcma-brcmsmac-compat.patch
@@ -0,0 +1,35 @@
+Simple patch to remove the overlap between the bcma (i.e. b43) driver
+and the brcmsmac driver. David Woodhouse <dwmw2@infradead.org>
+confirmed that this patch restores functionality of bcm4331 devices.
+
+-- John W. Linville <linville@redhat.com>
+
+diff -up linux-3.1.x86_64/drivers/bcma/host_pci.c.orig linux-3.1.x86_64/drivers/bcma/host_pci.c
+--- linux-3.1.x86_64/drivers/bcma/host_pci.c.orig 2011-11-10 11:41:26.829742757 -0500
++++ linux-3.1.x86_64/drivers/bcma/host_pci.c 2011-11-10 11:41:22.884792078 -0500
+@@ -225,11 +225,13 @@ static void bcma_host_pci_remove(struct
+ }
+
+ static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
+- { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
+ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) },
++#if 0 /* Not in Fedora... */
++ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
+ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) },
+ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) },
+ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
++#endif
+ { 0, },
+ };
+ MODULE_DEVICE_TABLE(pci, bcma_pci_bridge_tbl);
+diff -up linux-3.1.x86_64/drivers/net/wireless/brcm80211/Kconfig.orig linux-3.1.x86_64/drivers/net/wireless/brcm80211/Kconfig
+--- linux-3.1.x86_64/drivers/net/wireless/brcm80211/Kconfig.orig 2011-11-10 11:42:31.764930961 -0500
++++ linux-3.1.x86_64/drivers/net/wireless/brcm80211/Kconfig 2011-11-10 11:42:33.613907846 -0500
+@@ -5,7 +5,6 @@ config BRCMSMAC
+ tristate "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver"
+ depends on PCI
+ depends on MAC80211
+- depends on BCMA=n
+ select BRCMUTIL
+ select FW_LOADER
+ select CRC_CCITT
diff --git a/freed-ora/current/master/be2net-non-member-vlan-pkts-not-received-in-promisco.patch b/freed-ora/current/master/be2net-non-member-vlan-pkts-not-received-in-promisco.patch
deleted file mode 100644
index 866473efd..000000000
--- a/freed-ora/current/master/be2net-non-member-vlan-pkts-not-received-in-promisco.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From c0e64ef4899df4cedc872871e54e2c069d29e519 Mon Sep 17 00:00:00 2001
-From: Sathya Perla <sathya.perla@emulex.com>
-Date: Tue, 2 Aug 2011 19:57:43 +0000
-Subject: [PATCH] be2net: non-member vlan pkts not received in promiscous mode
-
-While configuring promiscous mode, explicitly set the
-VLAN_PROMISCOUS bit to make this happen. When switching off
-promiscous mode, re-program the vids.
-
-Signed-off-by: Xavier Selvin <xavier.selvin@emulex.com>
-Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/benet/be_cmds.c | 6 ++++--
- drivers/net/benet/be_main.c | 7 +++++++
- 2 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
-index 1c25dbd..73fd949 100644
---- a/drivers/net/benet/be_cmds.c
-+++ b/drivers/net/benet/be_cmds.c
-@@ -1586,9 +1586,11 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, bool en)
- OPCODE_COMMON_NTWK_RX_FILTER, sizeof(*req));
-
- req->if_id = cpu_to_le32(adapter->if_handle);
-- req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
-+ req->if_flags_mask = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS
-+ | BE_IF_FLAGS_VLAN_PROMISCUOUS);
- if (en)
-- req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS);
-+ req->if_flags = cpu_to_le32(BE_IF_FLAGS_PROMISCUOUS
-+ | BE_IF_FLAGS_VLAN_PROMISCUOUS);
-
- sge->pa_hi = cpu_to_le32(upper_32_bits(promiscous_cmd.dma));
- sge->pa_lo = cpu_to_le32(promiscous_cmd.dma & 0xFFFFFFFF);
-diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
-index 3b2c5e6..32a5b11 100644
---- a/drivers/net/benet/be_main.c
-+++ b/drivers/net/benet/be_main.c
-@@ -728,6 +728,10 @@ static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num)
- status = be_cmd_vlan_config(adapter, if_handle, vtag, 1, 1, 0);
- }
-
-+ /* No need to further configure vids if in promiscuous mode */
-+ if (adapter->promiscuous)
-+ return 0;
-+
- if (adapter->vlans_added <= adapter->max_vlans) {
- /* Construct VLAN Table to give to HW */
- for (i = 0; i < VLAN_N_VID; i++) {
-@@ -787,6 +791,9 @@ static void be_set_multicast_list(struct net_device *netdev)
- if (adapter->promiscuous) {
- adapter->promiscuous = false;
- be_cmd_promiscuous_config(adapter, false);
-+
-+ if (adapter->vlans_added)
-+ be_vid_config(adapter, false, 0);
- }
-
- /* Enable multicast promisc if num configured exceeds what we support */
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/benet-remove-bogus-unlikely-on-vlan-check.patch b/freed-ora/current/master/benet-remove-bogus-unlikely-on-vlan-check.patch
deleted file mode 100644
index 08c00817e..000000000
--- a/freed-ora/current/master/benet-remove-bogus-unlikely-on-vlan-check.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 82f15998fafe683add83f7a11b2e25f919b3cd2d Mon Sep 17 00:00:00 2001
-From: Jiri Pirko <jpirko@redhat.com>
-Date: Tue, 25 Oct 2011 13:47:16 -0400
-Subject: [PATCH] benet: remove bogus "unlikely" on vlan check
-
-Use of unlikely in this place is wrong. Remove it.
-
-Signed-off-by: Jiri Pirko <jpirko@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Backported-by: Josh Boyer <jwboyer@redhat.com>
----
- drivers/net/benet/be_main.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
-index c411bb1..6df0c7e 100644
---- a/drivers/net/benet/be_main.c
-+++ b/drivers/net/benet/be_main.c
-@@ -1192,7 +1192,7 @@ static void be_rx_compl_process(struct be_adapter *adapter,
- skb->rxhash = rxcp->rss_hash;
-
-
-- if (unlikely(rxcp->vlanf))
-+ if (rxcp->vlanf)
- __vlan_hwaccel_put_tag(skb, rxcp->vlan_tag);
-
- netif_receive_skb(skb);
-@@ -1249,7 +1249,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
- if (adapter->netdev->features & NETIF_F_RXHASH)
- skb->rxhash = rxcp->rss_hash;
-
-- if (unlikely(rxcp->vlanf))
-+ if (rxcp->vlanf)
- __vlan_hwaccel_put_tag(skb, rxcp->vlan_tag);
-
- napi_gro_frags(&eq_obj->napi);
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/compat-wireless-config-fixups.patch b/freed-ora/current/master/compat-wireless-config-fixups.patch
new file mode 100644
index 000000000..b2a0aa31a
--- /dev/null
+++ b/freed-ora/current/master/compat-wireless-config-fixups.patch
@@ -0,0 +1,91 @@
+diff -up compat-wireless-2011-12-18/config.mk.orig compat-wireless-2011-12-18/config.mk
+--- compat-wireless-2011-12-18/config.mk.orig 2012-01-03 13:35:41.795494109 -0500
++++ compat-wireless-2011-12-18/config.mk 2012-01-03 13:35:54.598334052 -0500
+@@ -14,6 +14,9 @@ else
+ include $(KLIB_BUILD)/.config
+ endif
+
++# Enable SSB module (needs to be visible in compat_autoconf.h)
++CONFIG_SSB=m
++
+ ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
+
+ COMPAT_LATEST_VERSION = 3
+@@ -395,7 +398,7 @@ ifdef CONFIG_CRC_CCITT
+ CONFIG_RT2800PCI=m
+ CONFIG_RT2800PCI_RT33XX=y
+ CONFIG_RT2800PCI_RT35XX=y
+-# CONFIG_RT2800PCI_RT53XX=y
++CONFIG_RT2800PCI_RT53XX=y
+ endif #CONFIG_CRC_CCITT
+ NEED_RT2X00=y
+
+@@ -525,7 +528,7 @@ ifdef CONFIG_CRC_CCITT
+ CONFIG_RT2800USB=m
+ CONFIG_RT2800USB_RT33XX=y
+ CONFIG_RT2800USB_RT35XX=y
+-# CONFIG_RT2800USB_RT53XX=y
++CONFIG_RT2800USB_RT53XX=y
+ CONFIG_RT2800USB_UNKNOWN=y
+ endif #CONFIG_CRC_CCITT
+ CONFIG_RT2X00_LIB_USB=m
+diff -up compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile
+--- compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile.orig 2012-01-03 13:35:41.795494109 -0500
++++ compat-wireless-2011-12-18/drivers/misc/eeprom/Makefile 2012-01-03 13:35:54.598334052 -0500
+@@ -1 +1 @@
+-obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
++#obj-$(CONFIG_EEPROM_93CX6) += eeprom_93cx6.o
+diff -up compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile.orig compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile
+--- compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile.orig 2012-01-03 13:35:41.795494109 -0500
++++ compat-wireless-2011-12-18/drivers/net/ethernet/atheros/Makefile 2012-01-03 13:35:54.599334040 -0500
+@@ -2,7 +2,7 @@
+ # Makefile for the Atheros network device drivers.
+ #
+
+-obj-$(CONFIG_ATL1) += atlx/
+-obj-$(CONFIG_ATL2) += atlx/
+-obj-$(CONFIG_ATL1E) += atl1e/
+-obj-$(CONFIG_ATL1C) += atl1c/
++#obj-$(CONFIG_ATL1) += atlx/
++#obj-$(CONFIG_ATL2) += atlx/
++#obj-$(CONFIG_ATL1E) += atl1e/
++#obj-$(CONFIG_ATL1C) += atl1c/
+diff -up compat-wireless-2011-12-18/drivers/net/usb/Makefile.orig compat-wireless-2011-12-18/drivers/net/usb/Makefile
+--- compat-wireless-2011-12-18/drivers/net/usb/Makefile.orig 2012-01-03 13:35:41.796494097 -0500
++++ compat-wireless-2011-12-18/drivers/net/usb/Makefile 2012-01-03 13:35:54.599334040 -0500
+@@ -2,7 +2,7 @@
+ # Makefile for USB Network drivers
+ #
+
+-obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o
+-obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o
+-obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o
++#obj-$(CONFIG_USB_NET_COMPAT_CDCETHER) += cdc_ether.o
++#obj-$(CONFIG_USB_NET_COMPAT_RNDIS_HOST) += rndis_host.o
++#obj-$(CONFIG_USB_COMPAT_USBNET) += usbnet.o
+
+diff -up compat-wireless-2011-12-18/Makefile.orig compat-wireless-2011-12-18/Makefile
+--- compat-wireless-2011-12-18/Makefile.orig 2012-01-03 13:35:41.796494097 -0500
++++ compat-wireless-2011-12-18/Makefile 2012-01-03 13:36:14.062090719 -0500
+@@ -8,8 +8,8 @@ endif
+ export KLIB_BUILD ?= $(KLIB)/build
+ # Sometimes not available in the path
+ MODPROBE := /sbin/modprobe
+-MADWIFI=$(shell $(MODPROBE) -l ath_pci)
+-OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
++MADWIFI=""
++OLD_IWL=""
+
+ DESTDIR?=
+
+@@ -41,8 +41,8 @@ endif
+
+ endif
+
+-obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
+-obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
++#obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
++#obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
+
+ else
+
diff --git a/freed-ora/current/master/compat-wireless-integrated-build.patch b/freed-ora/current/master/compat-wireless-integrated-build.patch
new file mode 100644
index 000000000..1d08e4b58
--- /dev/null
+++ b/freed-ora/current/master/compat-wireless-integrated-build.patch
@@ -0,0 +1,12 @@
+diff -up compat-wireless-2011-12-01/Makefile.orig compat-wireless-2011-12-01/Makefile
+--- compat-wireless-2011-12-01/Makefile.orig 2011-12-14 09:10:01.377297637 -0500
++++ compat-wireless-2011-12-01/Makefile 2011-12-14 09:47:36.834100534 -0500
+@@ -68,7 +68,7 @@ all: modules
+
+ modules: $(CREL_CHECK)
+ @./scripts/check_config.sh
+- $(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
++ $(MAKE) -C $(KLIB_BUILD) M=$(PWD) INTEGRATED_BUILD=1 modules
+ @touch $@
+
+ bt: $(CREL_CHECK)
diff --git a/freed-ora/current/master/config-arm-generic b/freed-ora/current/master/config-arm-generic
index 307c66d68..558c7c4d0 100644
--- a/freed-ora/current/master/config-arm-generic
+++ b/freed-ora/current/master/config-arm-generic
@@ -142,8 +142,6 @@ CONFIG_SPARSE_IRQ=y
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
-CONFIG_FTMAC100=m
-
CONFIG_HWSPINLOCK_OMAP=m
CONFIG_USE_OF=y
@@ -154,7 +152,17 @@ CONFIG_MMC_SDHCI_OF=m
CONFIG_MMC_SDHCI_PXAV3=m
CONFIG_MMC_SDHCI_PXAV2=m
-CONFIG_FTGMAC100=m
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_MTD_OF_PARTS=y
+CONFIG_PL330_DMA=y
+# CONFIG_ARM_KPROBES_TEST is not set
+# CONFIG_ARM_ATAG_DTB_COMPAT is not set
+
+# CONFIG_FTGMAC100 is not set
+# CONFIG_FTMAC100 is not set
+#
+CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
+CONFIG_LSM_MMAP_MIN_ADDR=32768
# disable TPM on arm at least on the trimslices it causes havoc
# CONFIG_TCG_TPM is not set
@@ -171,3 +179,18 @@ CONFIG_FTGMAC100=m
# CONFIG_DRM_RADEON is not set
# CONFIG_ATM_HE is not set
# CONFIG_SCSI_ACARD is not set
+
+# these all currently fail due to missing symbols __bad_udelay or
+# error: implicit declaration of function ‘iowrite32be’
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_DRM_NOUVEAU is not set
+# CONFIG_MLX4_EN is not set
+
+# FIXME: Guesses, need checking
+# CONFIG_MACH_EUKREA_CPUIMX35SD is not set
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_751472=y
+# CONFIG_FB_MX3 is not set
+# CONFIG_MX3_IPU is not set
+# CONFIG_MX3_IPU_IRQS is not set
+
diff --git a/freed-ora/current/master/config-arm-highbank b/freed-ora/current/master/config-arm-highbank
new file mode 100644
index 000000000..d4aca8222
--- /dev/null
+++ b/freed-ora/current/master/config-arm-highbank
@@ -0,0 +1,16 @@
+ONFIG_ARCH_HIGHBANK=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
diff --git a/freed-ora/current/master/config-arm-imx b/freed-ora/current/master/config-arm-imx
new file mode 100644
index 000000000..2dbe10a1f
--- /dev/null
+++ b/freed-ora/current/master/config-arm-imx
@@ -0,0 +1,98 @@
+CONFIG_ARCH_MXC=y
+CONFIG_ARCH_MX51=y
+CONFIG_MACH_MX51_BABBAGE=y
+CONFIG_MACH_MX51_3DS=y
+CONFIG_MACH_EUKREA_CPUIMX51=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+
+CONFIG_MACH_EUKREA_CPUIMX51SD=y
+CONFIG_MACH_MX51_EFIKAMX=y
+CONFIG_MACH_MX51_EFIKASB=y
+# CONFIG_SWP_EMULATE is not set
+# CONFIG_THUMB2_KERNEL is not set
+CONFIG_CPU_FREQ_IMX=y
+CONFIG_W1_MASTER_MXC=m
+CONFIG_IMX_SDMA=y
+CONFIG_MACH_MX31ADS=y
+CONFIG_MACH_MX31LILLY=y
+CONFIG_MACH_MX31LITE=y
+CONFIG_MACH_PCM037=y
+CONFIG_MACH_MX31_3DS=y
+CONFIG_MACH_MX31MOBOARD=y
+CONFIG_MACH_QONG=y
+CONFIG_MACH_ARMADILLO5X0=y
+CONFIG_MACH_KZM_ARM11_01=y
+CONFIG_MACH_BUG=y
+CONFIG_MACH_PCM043=y
+CONFIG_MACH_MX35_3DS=y
+CONFIG_MACH_EUKREA_CPUIMX35=y
+CONFIG_MACH_VPR200=y
+CONFIG_SOC_IMX6Q=y
+CONFIG_MXC_IRQ_PRIOR=y
+CONFIG_MXC_PWM=m
+CONFIG_MXC_DEBUG_BOARD=y
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_ARM_DMA_MEM_BUFFERABLE=y
+CONFIG_ARM_ERRATA_411920=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_ARM_ERRATA_364296=y
+CONFIG_HW_PERF_EVENTS=y
+CONFIG_RFKILL_GPIO=m
+CONFIG_PATA_IMX=m
+CONFIG_ETHERNET=y
+CONFIG_NET_VENDOR_BROADCOM=y
+CONFIG_NET_VENDOR_FREESCALE=y
+CONFIG_FEC=y
+CONFIG_KEYBOARD_IMX=m
+CONFIG_SERIAL_IMX=y
+CONFIG_HW_RANDOM_MXC_RNGA=m
+CONFIG_I2C_IMX=m
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_MCP23S08=m
+CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_PLL=m
+CONFIG_SND_IMX_SOC=m
+CONFIG_USB_EHCI_MXC=y
+CONFIG_USB_IMX21_HCD=m
+CONFIG_MMC_SDHCI_ESDHC_IMX=m
+CONFIG_MMC_MXC=m
+CONFIG_RTC_MXC=m
+
+CONFIG_BACKLIGHT_PWM=m
+CONFIG_LEDS_PWM=m
+
+CONFIG_MACH_PCM037_EET=y
+# CONFIG_MACH_MX31_3DS_MXC_NAND_USE_BBT is not set
+CONFIG_MXC_USE_EPIT=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_ARM_ERRATA_430973=y
+CONFIG_ARM_ERRATA_458693=y
+CONFIG_ARM_ERRATA_460075=y
+CONFIG_ARM_ERRATA_743622=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_CAN_FLEXCAN=m
+CONFIG_MTD_NAND_MXC=m
+CONFIG_INPUT_PWM_BEEPER=m
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_IMX2_WDT=m
+CONFIG_SND_SOC_PHYCORE_AC97=m
+CONFIG_SND_SOC_EUKREA_TLV320=m
+
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEBUG=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_FREQ_STAT_DETAILS=y
+
+CONFIG_PL310_ERRATA_769419=y
+CONFIG_LEDS_RENESAS_TPU=y
diff --git a/freed-ora/current/master/config-arm-kirkwood b/freed-ora/current/master/config-arm-kirkwood
new file mode 100644
index 000000000..415e822dc
--- /dev/null
+++ b/freed-ora/current/master/config-arm-kirkwood
@@ -0,0 +1,43 @@
+CONFIG_ARCH_KIRKWOOD=y
+CONFIG_MACH_DB88F6281_BP=y
+CONFIG_MACH_RD88F6192_NAS=y
+CONFIG_MACH_RD88F6281=y
+CONFIG_MACH_MV88F6281GTW_GE=y
+CONFIG_MACH_SHEEVAPLUG=y
+CONFIG_MACH_ESATA_SHEEVAPLUG=y
+CONFIG_MACH_GURUPLUG=y
+CONFIG_MACH_DOCKSTAR=y
+CONFIG_MACH_TS219=y
+CONFIG_MACH_TS41X=y
+CONFIG_MACH_OPENRD_BASE=y
+CONFIG_MACH_OPENRD_CLIENT=y
+CONFIG_MACH_OPENRD_ULTIMATE=y
+CONFIG_MACH_NETSPACE_V2=y
+CONFIG_MACH_INETSPACE_V2=y
+CONFIG_MACH_NETSPACE_MAX_V2=y
+CONFIG_MACH_D2NET_V2=y
+CONFIG_MACH_NET2BIG_V2=y
+CONFIG_MACH_NET5BIG_V2=y
+CONFIG_MACH_T5325=y
+# CONFIG_CPU_FEROCEON_OLD_ID is not set
+
+
+CONFIG_CACHE_FEROCEON_L2=y
+CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH=y
+CONFIG_MTD_NAND_ORION=m
+CONFIG_MV643XX_ETH=m
+CONFIG_I2C_MV64XXX=m
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_MCP23S08=m
+CONFIG_ORION_WATCHDOG=m
+CONFIG_SND_KIRKWOOD_SOC=m
+CONFIG_SND_KIRKWOOD_SOC_OPENRD=m
+CONFIG_SND_KIRKWOOD_SOC_T5325=m
+CONFIG_MMC_MVSDIO=m
+CONFIG_LEDS_NS2=m
+CONFIG_LEDS_NETXBIG=m
+CONFIG_RTC_DRV_MV=m
+CONFIG_MV_XOR=y
+CONFIG_CRYPTO_DEV_MV_CESA=m
+
+# CONFIG_TOUCHSCREEN_EETI is not set
diff --git a/freed-ora/current/master/config-arm-omap-generic b/freed-ora/current/master/config-arm-omap-generic
index e396169b3..d623e1817 100644
--- a/freed-ora/current/master/config-arm-omap-generic
+++ b/freed-ora/current/master/config-arm-omap-generic
@@ -121,6 +121,7 @@ CONFIG_ARM_ERRATA_430973=y
# CONFIG_ARM_ERRATA_742230 is not set
# CONFIG_ARM_ERRATA_742231 is not set
CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_769419=y
CONFIG_ARM_ERRATA_720789=y
# CONFIG_ARM_ERRATA_743622 is not set
# CONFIG_ARM_ERRATA_751472 is not set
@@ -147,7 +148,6 @@ CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_KSM is not set
-CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
# CONFIG_CC_STACKPROTECTOR is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
@@ -182,10 +182,6 @@ CONFIG_PM_SLEEP_SMP=y
# CONFIG_APM_EMULATION is not set
CONFIG_ARCH_HAS_OPP=y
CONFIG_PM_OPP=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
# CONFIG_ARPD is not set
@@ -411,7 +407,6 @@ CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_OMAP=y
CONFIG_SERIAL_OMAP_CONSOLE=y
# CONFIG_SERIAL_IFX6X60 is not set
-# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_R3964 is not set
@@ -447,7 +442,6 @@ CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_SYSFS=y
-# CONFIG_GPIO_GENERIC_PLATFORM is not set
#
# Memory mapped GPIO expanders:
@@ -623,12 +617,6 @@ CONFIG_REGULATOR_TWL4030=y
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_TPS6524X is not set
-CONFIG_MEDIA_SUPPORT=y
-CONFIG_RC_CORE=y
-CONFIG_LIRC=y
-CONFIG_IR_RC5_SZ_DECODER=y
-CONFIG_IR_LIRC_CODEC=y
-# CONFIG_RC_LOOPBACK is not set
CONFIG_VIDEOBUF_DMA_CONTIG=m
CONFIG_V4L2_MEM2MEM_DEV=m
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
@@ -805,25 +793,6 @@ CONFIG_SND_SOC_TLV320AIC3X=y
CONFIG_SND_SOC_TWL4030=y
CONFIG_SND_SOC_TWL6040=y
# CONFIG_SOUND_PRIME is not set
-CONFIG_HID=y
-CONFIG_HID_3M_PCT=m
-CONFIG_HID_A4TECH=m
-# CONFIG_HID_ACRUX is not set
-CONFIG_HID_APPLE=m
-CONFIG_HID_BELKIN=m
-CONFIG_HID_CHERRY=m
-CONFIG_HID_CHICONY=m
-CONFIG_HID_CYPRESS=m
-CONFIG_HID_EZKEY=m
-CONFIG_HID_KYE=m
-CONFIG_HID_KENSINGTON=m
-CONFIG_HID_LOGITECH=m
-CONFIG_HID_MICROSOFT=m
-CONFIG_HID_MOSART=m
-CONFIG_HID_MONTEREY=m
-CONFIG_HID_NTRIG=m
-CONFIG_HID_QUANTA=m
-CONFIG_HID_STANTUM=m
# CONFIG_HID_TIVO_SLIDE is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
# CONFIG_USB_DEVICEFS is not set
@@ -990,11 +959,6 @@ CONFIG_QUOTA_TREE=m
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=m
CONFIG_AUTOFS4_FS=m
-CONFIG_ISO9660_FS=m
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
# CONFIG_JFFS2_SUMMARY is not set
@@ -1037,7 +1001,6 @@ CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_DEBUG_PREEMPT=y
# CONFIG_BKL is not set
# CONFIG_SPARSE_RCU_POINTER is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_HIGHMEM is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_LIST is not set
@@ -1063,9 +1026,6 @@ CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_ICEDCC is not set
CONFIG_OC_ETM=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY_NETWORK_XFRM is not set
-CONFIG_LSM_MMAP_MIN_ADDR=0
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
# CONFIG_IMA is not set
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_RNG=m
@@ -1099,3 +1059,27 @@ CONFIG_LIBCRC32C=y
# CONFIG_USB_HSO is not set
CONFIG_CRYSTALHD=m
+
+CONFIG_GPIO_GENERIC_PLATFORM=y
+
+CONFIG_MACH_OMAP_GENERIC=y
+CONFIG_PL310_ERRATA_753970=y
+CONFIG_ARM_CPU_TOPOLOGY=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_ETHERNET=y
+CONFIG_NET_VENDOR_BROADCOM=y
+CONFIG_NET_VENDOR_MICROCHIP=y
+CONFIG_SENSORS_AD7314=m
+CONFIG_REGULATOR_GPIO=y
+CONFIG_VIDEO_MT9P031=m
+CONFIG_VIDEO_MT9T001=m
+CONFIG_VIDEO_S5K6AA=m
+CONFIG_PANEL_DVI=m
+CONFIG_PANEL_PICODLP=m
+CONFIG_USB_RENESAS_USBHS=m
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+CONFIG_LEDS_RENESAS_TPU=y
+# CONFIG_OMAP_IOMMU is not set
+CONFIG_USB_RENESAS_USBHS_HCD=m
+
diff --git a/freed-ora/current/master/config-arm-tegra b/freed-ora/current/master/config-arm-tegra
index 910b39f81..495e91e65 100644
--- a/freed-ora/current/master/config-arm-tegra
+++ b/freed-ora/current/master/config-arm-tegra
@@ -34,6 +34,7 @@ CONFIG_ARM_ERRATA_430973=y
CONFIG_ARM_ERRATA_742230=y
# CONFIG_ARM_ERRATA_742231 is not set
CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_769419=y
CONFIG_ARM_ERRATA_720789=y
# CONFIG_PL310_ERRATA_727915 is not set
# CONFIG_ARM_ERRATA_743622 is not set
@@ -82,3 +83,10 @@ CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CRYSTALHD=m
+
+CONFIG_MACH_VENTANA=y
+CONFIG_PL310_ERRATA_753970=y
+CONFIG_ARM_CPU_TOPOLOGY=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_LEDS_RENESAS_TPU=y
diff --git a/freed-ora/current/master/config-backports b/freed-ora/current/master/config-backports
new file mode 100644
index 000000000..33a3adcce
--- /dev/null
+++ b/freed-ora/current/master/config-backports
@@ -0,0 +1,24 @@
+# CONFIG_CFG80211 is not set
+# CONFIG_LIB80211 is not set
+
+# CONFIG_MAC80211 is not set
+
+# CONFIG_BCMA is not set
+
+#
+# ssb and b44 share infrastructure with b43
+#
+# CONFIG_SSB is not set
+# CONFIG_B44 is not set
+
+#
+# Prevent b43 and brcmsmac from competing
+#
+# CONFIG_B43_BCMA is not set
+
+#
+# These have to be turned-on again since compat-wireless does not
+# provide them...
+#
+CONFIG_CRC7=m
+CONFIG_AVERAGE=y
diff --git a/freed-ora/current/master/config-debug b/freed-ora/current/master/config-debug
index a25239038..5814f1e12 100644
--- a/freed-ora/current/master/config-debug
+++ b/freed-ora/current/master/config-debug
@@ -24,6 +24,7 @@ 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_SLUB_DEBUG_ON=y
@@ -81,7 +82,6 @@ CONFIG_CARL9170_DEBUGFS=y
CONFIG_IWLWIFI_DEVICE_TRACING=y
CONFIG_DEBUG_OBJECTS_WORK=y
-# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
CONFIG_DMADEVICES_DEBUG=y
CONFIG_DMADEVICES_VDEBUG=y
diff --git a/freed-ora/current/master/config-generic b/freed-ora/current/master/config-generic
index 81ff18581..3016326a6 100644
--- a/freed-ora/current/master/config-generic
+++ b/freed-ora/current/master/config-generic
@@ -32,7 +32,7 @@ CONFIG_KERNEL_GZIP=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_FHANDLE=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
@@ -68,6 +68,7 @@ CONFIG_SLUB=y
CONFIG_MISC_DEVICES=y
# CONFIG_AD525X_DPOT is not set
+# CONFIG_ATMEL_PWM is not set
CONFIG_IWMC3200TOP=m
# CONFIG_IWMC3200TOP_DEBUG is not set
CONFIG_IWMC3200TOP_DEBUGFS=y
@@ -89,6 +90,8 @@ CONFIG_PCI=y
# CONFIG_PCI_DEBUG is not set
CONFIG_PCI_STUB=y
CONFIG_PCI_IOV=y
+CONFIG_PCI_PRI=y
+CONFIG_PCI_PASID=y
CONFIG_HT_IRQ=y
CONFIG_PCI_MSI=y
CONFIG_PCIEPORTBUS=y
@@ -204,6 +207,7 @@ CONFIG_MTD_BLOCK2MTD=m
CONFIG_MTD_OOPS=m
# CONFIG_MTD_INTEL_VR_NOR is not set
CONFIG_MTD_ALAUDA=m
+CONFIG_MTD_DOCG3=m
CONFIG_FTL=m
CONFIG_NFTL=m
@@ -432,6 +436,7 @@ CONFIG_BLK_DEV_IDEDMA=y
CONFIG_VIRTIO_BLK=m
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=m
+CONFIG_VIRTIO_MMIO=m
CONFIG_VIRTIO_NET=m
CONFIG_VMXNET3=m
CONFIG_HW_RANDOM_VIRTIO=m
@@ -528,6 +533,8 @@ CONFIG_SCSI_MPT2SAS=m
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
CONFIG_SCSI_MPT2SAS_LOGGING=y
+CONFIG_SCSI_MVUMI=m
+
CONFIG_SCSI_OSD_INITIATOR=m
CONFIG_SCSI_OSD_ULD=m
CONFIG_SCSI_OSD_DPRINT_SENSE=1
@@ -687,6 +694,9 @@ CONFIG_DM_DEBUG=y
CONFIG_DM_MIRROR=y
CONFIG_DM_MULTIPATH=m
CONFIG_DM_SNAPSHOT=y
+CONFIG_DM_THIN_PROVISIONING=m
+# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set
+# CONFIG_DM_DEBUG_SPACE_MAPS is not set
CONFIG_DM_UEVENT=y
CONFIG_DM_ZERO=y
CONFIG_DM_LOG_USERSPACE=m
@@ -1058,7 +1068,7 @@ CONFIG_LLC=m
CONFIG_IPX=m
# CONFIG_IPX_INTERN is not set
CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
+CONFIG_DEV_APPLETALK=m
CONFIG_IPDDP=m
CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
@@ -1072,7 +1082,7 @@ CONFIG_IP_DCCP_CCID2=m
CONFIG_IP_DCCP_CCID3=y
# CONFIG_IP_DCCP_CCID3_DEBUG is not set
# CONFIG_IP_DCCP_DEBUG is not set
-CONFIG_NET_DCCPPROBE=m
+# CONFIG_NET_DCCPPROBE is not set
#
# TIPC Configuration (EXPERIMENTAL)
@@ -1218,45 +1228,48 @@ CONFIG_L2TP_ETH=m
CONFIG_RFKILL=m
CONFIG_RFKILL_INPUT=y
+CONFIG_NFC_NCI=m
+
#
# Ethernet (10 or 100Mbit)
#
-CONFIG_NETDEV_1000=y
-CONFIG_NETDEV_10000=y
-CONFIG_NET_ETHERNET=y
-CONFIG_PHYLIB=m
-CONFIG_BROADCOM_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_FIXED_PHY=y
-CONFIG_MDIO_BITBANG=m
-CONFIG_NATIONAL_PHY=m
-CONFIG_ICPLUS_PHY=m
-CONFIG_BCM63XX_PHY=m
-CONFIG_LSI_ET1011C_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_MARVELL_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_REALTEK_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_STE10XP=m
-CONFIG_VITESSE_PHY=m
-CONFIG_MICREL_PHY=m
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_DNET=m
-CONFIG_STMMAC_ETH=m
-# CONFIG_STMMAC_DA is not set
-# CONFIG_STMMAC_DUAL_MAC is not set
-# CONFIG_STMMAC_TIMER is not set
+CONFIG_NET_VENDOR_ADAPTEC=y
+CONFIG_ADAPTEC_STARFIRE=m
-# CONFIG_PCH_GBE is not set
+CONFIG_NET_VENDOR_ALTEON=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+
+CONFIG_NET_VENDOR_AMD=y
+# CONFIG_LANCE is not set
+CONFIG_PCNET32=m
+CONFIG_AMD8111_ETH=m
+CONFIG_PCMCIA_NMCLAN=m
+
+CONFIG_NET_VENDOR_ATHEROS=y
+CONFIG_ATL2=m
+CONFIG_ATL1=m
+CONFIG_ATL1C=m
+CONFIG_ATL1E=m
+
+CONFIG_NET_VENDOR_BROCADE=y
+CONFIG_BNA=m
+
+CONFIG_NET_VENDOR_CHELSIO=y
+CONFIG_CHELSIO_T1=m
+CONFIG_CHELSIO_T1_1G=y
+CONFIG_CHELSIO_T3=m
+CONFIG_CHELSIO_T4=m
+CONFIG_CHELSIO_T4VF=m
+# CONFIG_NET_VENDOR_CIRRUS is not set
+#
+CONFIG_NET_VENDOR_CISCO=y
+CONFIG_ENIC=m
+
+CONFIG_NET_VENDOR_DEC=y
+CONFIG_EWRK3=m
#
# Tulip family network device support
#
@@ -1273,113 +1286,192 @@ CONFIG_WINBOND_840=m
CONFIG_DM9102=m
CONFIG_PCMCIA_XIRCOM=m
CONFIG_ULI526X=m
-# CONFIG_HP100 is not set
-CONFIG_LNE390=m
-CONFIG_NE3210=m
-CONFIG_ES3210=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_KSZ884X_PCI=m
-CONFIG_B44=m
-CONFIG_B44_PCI=y
-CONFIG_BNX2=m
-CONFIG_CNIC=m
-CONFIG_QLA3XXX=m
-CONFIG_ATL1=m
-CONFIG_ATL1C=m
-CONFIG_ATL2=m
-CONFIG_ATL1E=m
+
+CONFIG_NET_VENDOR_DLINK=y
+CONFIG_DE600=m
+CONFIG_DE620=m
+CONFIG_DL2K=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+
+CONFIG_NET_VENDOR_EMULEX=y
+CONFIG_BE2NET=m
+
+CONFIG_NET_VENDOR_EXAR=y
+CONFIG_S2IO=m
+CONFIG_VXGE=m
+# CONFIG_VXGE_DEBUG_TRACE_ALL is not set
+
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_FUJITSU is not set
+# CONFIG_NET_VENDOR_HP is not set
+CONFIG_NET_VENDOR_INTEL=y
CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_FORCEDETH=m
+CONFIG_E1000=m
+CONFIG_E1000E=m
+CONFIG_IGB=m
+CONFIG_IGB_DCA=y
+CONFIG_IGBVF=m
+CONFIG_IXGB=m
+CONFIG_IXGBEVF=m
+CONFIG_IXGBE=m
+CONFIG_IXGBE_DCA=y
+CONFIG_IXGBE_DCB=y
+
+# CONFIG_NET_VENDOR_I825XX is not set
+CONFIG_NET_VENDOR_MARVELL=y
+CONFIG_SKGE=m
+# CONFIG_SKGE_DEBUG is not set
+CONFIG_SKGE_GENESIS=y
+CONFIG_SKY2=m
+# CONFIG_SKY2_DEBUG is not set
+
+CONFIG_NET_VENDOR_MICREL=y
+CONFIG_KSZ884X_PCI=m
+# CONFIG_KS8842 is not set
+# CONFIG_KS8851_MLL is not set
+
+CONFIG_NET_VENDOR_MYRI=y
+CONFIG_MYRI10GE=m
+CONFIG_MYRI10GE_DCA=y
+
+CONFIG_NET_VENDOR_NATSEMI=y
CONFIG_NATSEMI=m
+CONFIG_NS83820=m
+
+CONFIG_NET_VENDOR_8390=y
+# CONFIG_AC3200 is not set
+CONFIG_PCMCIA_AXNET=m
CONFIG_NE2K_PCI=m
+CONFIG_NE3210=m
+CONFIG_PCMCIA_PCNET=m
+
+CONFIG_NET_VENDOR_NVIDIA=y
+CONFIG_FORCEDETH=m
+
+CONFIG_NET_VENDOR_OKI=y
+# CONFIG_PCH_GBE is not set
+
+CONFIG_NET_PACKET_ENGINE=y
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+
+CONFIG_NET_VENDOR_QLOGIC=y
+CONFIG_QLA3XXX=m
+CONFIG_QLCNIC=m
+CONFIG_QLGE=m
+CONFIG_NETXEN_NIC=m
+
+CONFIG_NET_VENDOR_REALTEK=y
+CONFIG_ATP=m
CONFIG_8139CP=m
CONFIG_8139TOO=m
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
CONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_R8169=m
+
+CONFIG_NET_VENDOR_RDC=y
+CONFIG_R6040=m
+
+# CONFIG_NET_VENDOR_SEEQ is not set
+
+CONFIG_NET_VENDOR_SILAN=y
+CONFIG_SC92031=m
+
+CONFIG_NET_VENDOR_SIS=y
CONFIG_SIS900=m
CONFIG_SIS190=m
+
+CONFIG_NET_VENDOR_SMSC=y
+# CONFIG_SMC9194 is not set
+CONFIG_PCMCIA_SMC91C92=m
CONFIG_EPIC100=m
-CONFIG_SC92031=m
CONFIG_SMSC9420=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
+
+CONFIG_NET_VENDOR_STMICRO=y
+CONFIG_STMMAC_ETH=m
+# CONFIG_STMMAC_DA is not set
+# CONFIG_STMMAC_DUAL_MAC is not set
+# CONFIG_STMMAC_TIMER is not set
+# CONFIG_STMMAC_DEBUG_FS is not set
+
+CONFIG_NET_VENDOR_SUN=y
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_CASSINI=m
+CONFIG_NIU=m
+
+CONFIG_NET_VENDOR_TEHUTI=y
+CONFIG_TEHUTI=m
+
+CONFIG_NET_VENDOR_TI=y
CONFIG_TLAN=m
+
+CONFIG_NET_VENDOR_VIA=y
CONFIG_VIA_RHINE=m
CONFIG_VIA_RHINE_MMIO=y
CONFIG_VIA_VELOCITY=m
+
+CONFIG_NET_VENDOR_XIRCOM=y
+CONFIG_PCMCIA_XIRC2PS=m
+
+CONFIG_PHYLIB=y
+CONFIG_BROADCOM_PHY=m
+CONFIG_CICADA_PHY=m
+CONFIG_DAVICOM_PHY=m
+CONFIG_FIXED_PHY=y
+CONFIG_MDIO_BITBANG=m
+CONFIG_NATIONAL_PHY=m
+CONFIG_ICPLUS_PHY=m
+CONFIG_BCM63XX_PHY=m
+CONFIG_LSI_ET1011C_PHY=m
+CONFIG_LXT_PHY=m
+CONFIG_MARVELL_PHY=m
+CONFIG_QSEMI_PHY=m
+CONFIG_REALTEK_PHY=m
+CONFIG_SMSC_PHY=m
+CONFIG_STE10XP=m
+CONFIG_VITESSE_PHY=m
+CONFIG_MICREL_PHY=m
+
+CONFIG_MII=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+CONFIG_DNET=m
+
+
+CONFIG_LNE390=m
+CONFIG_ES3210=m
+CONFIG_NET_PCI=y
+CONFIG_B44=m
+CONFIG_B44_PCI=y
+CONFIG_BNX2=m
+CONFIG_CNIC=m
+CONFIG_FEALNX=m
CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-CONFIG_CASSINI=m
CONFIG_ETHOC=m
-# CONFIG_KS8842 is not set
-# CONFIG_KS8851_MLL is not set
#
# Ethernet (1000 Mbit)
#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_IGB_DCA=y
-CONFIG_IGBVF=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SKGE=m
-# CONFIG_SKGE_DEBUG is not set
-CONFIG_SKGE_GENESIS=y
CONFIG_TIGON3=m
-CONFIG_SKY2=m
-# CONFIG_SKY2_DEBUG is not set
CONFIG_JME=m
#
# Ethernet (10000 Mbit)
#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T1_1G=y
-CONFIG_CHELSIO_T3=m
-CONFIG_CHELSIO_T4=m
-CONFIG_CHELSIO_T4VF=m
CONFIG_IP1000=m
-CONFIG_IXGB=m
-CONFIG_IXGBEVF=m
-CONFIG_IXGBE=m
-CONFIG_IXGBE_DCA=y
-CONFIG_IXGBE_DCB=y
-CONFIG_MYRI10GE=m
-CONFIG_MYRI10GE_DCA=y
-CONFIG_NETXEN_NIC=m
-CONFIG_NIU=m
-CONFIG_S2IO=m
-CONFIG_VXGE=m
-# CONFIG_VXGE_DEBUG_TRACE_ALL is not set
-CONFIG_TEHUTI=m
-CONFIG_ENIC=m
CONFIG_MLX4_EN=m
# CONFIG_MLX4_DEBUG is not set
-CONFIG_QLCNIC=m
-CONFIG_QLGE=m
-CONFIG_BNA=m
CONFIG_SFC=m
CONFIG_SFC_MTD=y
-CONFIG_BE2NET=m
-CONFIG_FDDI=y
+# CONFIG_FDDI is not set
# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
+# CONFIG_SKFP is not set
# CONFIG_HIPPI is not set
CONFIG_PLIP=m
CONFIG_PPP=m
@@ -1444,6 +1536,8 @@ CONFIG_ATH_COMMON=m
CONFIG_ATH5K=m
CONFIG_ATH5K_DEBUG=y
# CONFIG_ATH5K_TRACER is not set
+CONFIG_ATH6KL=m
+CONFIG_ATH6KL_DEBUG=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
@@ -1454,6 +1548,7 @@ CONFIG_ATH9K_HTC=m
CONFIG_ATH9K_RATE_CONTROL=y
CONFIG_CARL9170=m
CONFIG_CARL9170_LEDS=y
+# CONFIG_CARL9170_HWRNG is not set
CONFIG_AT76C50X_USB=m
CONFIG_AIRO=m
CONFIG_AIRO_CS=m
@@ -1462,17 +1557,22 @@ CONFIG_B43=m
CONFIG_B43_PCMCIA=y
CONFIG_B43_SDIO=y
CONFIG_B43_BCMA=y
-CONFIG_B43_DEBUG=y
+CONFIG_B43_BCMA_PIO=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
# CONFIG_B43LEGACY_DMA_MODE is not set
# CONFIG_B43LEGACY_PIO_MODE is not set
+CONFIG_BRCMSMAC=m
+CONFIG_BRCMFMAC=m
+# CONFIG_BRCMDBG is not set
CONFIG_HERMES=m
CONFIG_HERMES_CACHE_FW_ON_INIT=y
# CONFIG_HERMES_PRISM is not set
@@ -1572,6 +1672,7 @@ CONFIG_RTL8192DE=m
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
+CONFIG_MWIFIEX_PCIE=m
#
# Token Ring devices
@@ -1601,11 +1702,6 @@ CONFIG_NET_PCMCIA=y
CONFIG_PCMCIA_3C589=m
CONFIG_PCMCIA_3C574=m
CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
#
# Amateur Radio support
@@ -1616,13 +1712,16 @@ CONFIG_AX25_DAMA_SLAVE=y
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
+CONFIG_CAN_GW=m
CONFIG_CAN_VCAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_SJA1000=m
CONFIG_CAN_SJA1000_ISA=m
CONFIG_CAN_SJA1000_PLATFORM=m
+CONFIG_CAN_EMS_PCMCIA=m
CONFIG_CAN_EMS_PCI=m
+CONFIG_CAN_PEAK_PCI=m
CONFIG_CAN_EMS_USB=m
CONFIG_CAN_ESD_USB2=m
CONFIG_CAN_KVASER_PCI=m
@@ -1882,6 +1981,7 @@ CONFIG_INPUT_CM109=m
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m
# CONFIG_INPUT_ADXL34X is not set
+# CONFIG_INPUT_BMA150 is not set
CONFIG_INPUT_CMA3000=m
CONFIG_INPUT_CMA3000_I2C=m
@@ -1984,6 +2084,7 @@ CONFIG_TOUCHSCREEN_MCS5000=m
CONFIG_TOUCHSCREEN_MK712=m
CONFIG_TOUCHSCREEN_PENMOUNT=m
# CONFIG_TOUCHSCREEN_TPS6507X is not set
+CONFIG_TOUCHSCREEN_TSC_SERIO=m
CONFIG_TOUCHSCREEN_TSC2007=m
CONFIG_TOUCHSCREEN_TOUCHIT213=m
CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
@@ -2005,7 +2106,6 @@ CONFIG_INPUT_UINPUT=m
CONFIG_INPUT_WISTRON_BTNS=m
CONFIG_INPUT_ATLAS_BTNS=m
-CONFIG_INPUT_ATI_REMOTE=m
CONFIG_INPUT_ATI_REMOTE2=m
CONFIG_INPUT_KEYSPAN_REMOTE=m
@@ -2060,6 +2160,7 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y
+# CONFIG_SERIAL_8250_DW is not set
CONFIG_CYCLADES=m
# CONFIG_CYZ_INTR is not set
# CONFIG_MOXA_INTELLIO is not set
@@ -2269,12 +2370,14 @@ CONFIG_SENSORS_MAX6642=m
CONFIG_SENSORS_ADM1275=m
CONFIG_SENSORS_UCD9000=m
CONFIG_SENSORS_UCD9200=m
+CONFIG_SENSORS_ZL6100=m
CONFIG_SENSORS_EMC6W201=m
CONFIG_PMBUS=m
CONFIG_SENSORS_PMBUS=m
CONFIG_SENSORS_MAX16064=m
CONFIG_SENSORS_LM25066=m
+CONFIG_SENSORS_LTC2978=m
CONFIG_SENSORS_MAX34440=m
CONFIG_SENSORS_MAX8688=m
CONFIG_SENSORS_MAX1668=m
@@ -2285,25 +2388,7 @@ CONFIG_SENSORS_MAX1668=m
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_USB_SWITCH_FSA9480 is not set
-CONFIG_W1=m
-CONFIG_W1_CON=y
-# This is busted.
-# If we enable it, it steals Matrox cards, and the
-# framebuffer drivers stop working.
-# CONFIG_W1_MASTER_MATROX is not set
-CONFIG_W1_MASTER_DS2482=m
-CONFIG_W1_MASTER_DS2490=m
-CONFIG_W1_MASTER_DS1WM=m
-CONFIG_W1_SLAVE_THERM=m
-CONFIG_W1_SLAVE_SMEM=m
-CONFIG_W1_SLAVE_DS2431=m
-CONFIG_W1_SLAVE_DS2433=m
-CONFIG_W1_SLAVE_DS2433_CRC=y
-CONFIG_W1_SLAVE_DS2760=m
-CONFIG_W1_SLAVE_DS2423=m
-CONFIG_W1_SLAVE_DS2408=m
-CONFIG_W1_SLAVE_DS2780=m
-CONFIG_W1_SLAVE_BQ27000=m
+# CONFIG_W1 is not set
#
# Mice
@@ -2431,19 +2516,19 @@ CONFIG_AGP_VIA=y
CONFIG_AGP_EFFICEON=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
-CONFIG_STUB_POULSBO=m
+# CONFIG_STUB_POULSBO is not set
CONFIG_DRM=m
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_DRM_I810=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-CONFIG_DRM_SAVAGE=m
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_SAVAGE is not set
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
-CONFIG_DRM_VIA=m
+# CONFIG_DRM_VIA is not set
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
CONFIG_DRM_NOUVEAU_DEBUG=y
@@ -2496,7 +2581,7 @@ CONFIG_VIDEO_CAFE_CCIC=m
CONFIG_VIDEO_CPIA2=m
CONFIG_VIDEO_CQCAM=m
CONFIG_VIDEO_CX23885=m
-# CONFIG_MEDIA_ALTERA_CI is not set
+CONFIG_MEDIA_ALTERA_CI=m
CONFIG_VIDEO_CX18=m
CONFIG_VIDEO_CX18_ALSA=m
CONFIG_VIDEO_CX88=m
@@ -2536,6 +2621,9 @@ CONFIG_VIDEO_ZORAN_LML33R10=m
CONFIG_VIDEO_ZORAN_ZR36060=m
CONFIG_VIDEO_FB_IVTV=m
CONFIG_VIDEO_SAA7164=m
+CONFIG_VIDEO_TM6000=m
+CONFIG_VIDEO_TM6000_ALSA=m
+CONFIG_VIDEO_TM6000_DVB=m
CONFIG_VIDEO_TLG2300=m
# CONFIG_VIDEO_TIMBERDALE is not set
# CONFIG_VIDEO_M5MOLS is not set
@@ -2663,6 +2751,13 @@ CONFIG_DVB_USB_ANYSEE=m
CONFIG_DVB_USB_DW2102=m
CONFIG_DVB_USB_FRIIO=m
CONFIG_DVB_USB_EC168=m
+CONFIG_DVB_USB_PCTV452E=m
+CONFIG_DVB_USB_IT913X=m
+CONFIG_DVB_USB_MXL111SF=m
+CONFIG_DVB_TDA10071=m
+CONFIG_DVB_LNBP22=m
+CONFIG_DVB_A8293=m
+CONFIG_DVB_IT913X_FE=m
CONFIG_DVB_DM1105=m
CONFIG_DVB_S921=m
CONFIG_DVB_ISL6405=m
@@ -2742,6 +2837,7 @@ CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_RC_CORE=m
CONFIG_RC_LOOPBACK=m
CONFIG_RC_MAP=m
+CONFIG_RC_ATI_REMOTE=m
CONFIG_IR_NEC_DECODER=m
CONFIG_IR_RC5_DECODER=m
CONFIG_IR_RC6_DECODER=m
@@ -2757,6 +2853,7 @@ CONFIG_IR_NUVOTON=m
CONFIG_IR_FINTEK=m
CONFIG_IR_REDRAT3=m
+
CONFIG_V4L_MEM2MEM_DRIVERS=y
# CONFIG_VIDEO_MEM2MEM_TESTDEV is not set
@@ -2774,19 +2871,16 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
-CONFIG_FB_3DFX=m
-CONFIG_FB_3DFX_ACCEL=y
-CONFIG_FB_3DFX_I2C=y
+# CONFIG_FB_3DFX is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ARK is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_GENERIC_LCD=y
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_ATY_CT is not set
+# CONFIG_FB_ATY_GX is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_CARMINE is not set
-CONFIG_FB_CIRRUS=m
+# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_HECUBA is not set
@@ -2798,39 +2892,34 @@ CONFIG_FB_I810_I2C=y
# CONFIG_FB_INTEL is not set
# CONFIG_FB_INTEL_DEBUG is not set
# CONFIG_FB_INTEL_I2C is not set
-CONFIG_FB_KYRO=m
+# CONFIG_FB_KYRO is not set
# CONFIG_FB_LE80578 is not set
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_NVIDIA=m
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_MATROX_MILLENIUM is not set
+# CONFIG_FB_MATROX_MYSTIQUE is not set
+# CONFIG_FB_MATROX_G is not set
+# CONFIG_FB_MATROX_I2C is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_NVIDIA_I2C is not set
# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_I2C=y
# CONFIG_FB_PM2 is not set
# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
# CONFIG_FB_PM3 is not set
-CONFIG_FB_RADEON=m
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_RADEON_I2C is not set
# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_RADEON_I2C=y
-CONFIG_FB_RIVA=m
+# CONFIG_FB_RIVA is not set
# CONFIG_FB_RIVA_DEBUG is not set
# CONFIG_FB_RIVA_I2C is not set
# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_S3=m
-CONFIG_FB_S3_DDC=y
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_SM501=m
+# CONFIG_FB_SM501 is not set
+# CONFIG_FB_SMSCUFX is not set
CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_TRIDENT=m
+# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
CONFIG_FB_VGA16=m
@@ -2838,10 +2927,9 @@ CONFIG_FB_VIRTUAL=m
CONFIG_FB_VOODOO1=m
# CONFIG_FB_VT8623 is not set
CONFIG_FB_EFI=y
-CONFIG_FB_VIA=m
-CONFIG_FB_VIA_X_COMPATIBILITY=y
+# CONFIG_FB_VIA is not set
# CONFIG_FB_VIA_DIRECT_PROCFS is not set
-CONFIG_FB_METRONOME=m
+# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_PRE_INIT_FB is not set
# CONFIG_FB_TMIO is not set
@@ -3102,6 +3190,7 @@ CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_ALAUDA=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_REALTEK=m
+CONFIG_REALTEK_AUTOPM=y
CONFIG_USB_STORAGE_ENE_UB6250=m
# CONFIG_USB_LIBUSUAL is not set
CONFIG_USB_UAS=m
@@ -3119,6 +3208,7 @@ CONFIG_HID=m
CONFIG_HIDRAW=y
CONFIG_HID_PID=y
CONFIG_LOGITECH_FF=y
+CONFIG_HID_LOGITECH_DJ=m
CONFIG_LOGIWII_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_PANTHERLORD_FF=y
@@ -3132,10 +3222,12 @@ CONFIG_DRAGONRISE_FF=y
CONFIG_GREENASIA_FF=y
CONFIG_SMARTJOYPLUS_FF=y
CONFIG_LOGIG940_FF=y
+CONFIG_LOGIWHEELS_FF=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MULTITOUCH=m
CONFIG_HID_NTRIG=y
CONFIG_HID_QUANTA=y
+CONFIG_HID_PRIMAX=m
CONFIG_HID_PRODIKEYS=m
CONFIG_HID_DRAGONRISE=m
CONFIG_HID_GYRATION=m
@@ -3155,7 +3247,6 @@ CONFIG_HID_TOPSEED=m
CONFIG_HID_THRUSTMASTER=m
CONFIG_HID_ZEROPLUS=m
CONFIG_HID_ZYDACRON=m
-CONFIG_HID_ACRUX_FF=m
CONFIG_HID_EMS_FF=m
CONFIG_HID_ELECOM=m
CONFIG_HID_UCLOGIC=m
@@ -3163,6 +3254,7 @@ CONFIG_HID_WALTOP=m
CONFIG_HID_ROCCAT_PYRA=m
CONFIG_HID_ROCCAT_KONEPLUS=m
CONFIG_HID_ACRUX=m
+CONFIG_HID_ACRUX_FF=y
CONFIG_HID_KEYTOUCH=m
CONFIG_HID_LCPOWER=m
CONFIG_HID_ROCCAT_ARVO=m
@@ -3212,6 +3304,7 @@ CONFIG_USB_GSPCA_SPCA561=m
CONFIG_USB_GSPCA_STK014=m
CONFIG_USB_GSPCA_SUNPLUS=m
CONFIG_USB_GSPCA_T613=m
+CONFIG_USB_GSPCA_TOPRO=m
CONFIG_USB_GSPCA_TV8532=m
CONFIG_USB_GSPCA_VC032X=m
CONFIG_USB_GSPCA_ZC3XX=m
@@ -3235,22 +3328,7 @@ CONFIG_USB_S2255=m
# CONFIG_VIDEO_SH_MOBILE_CSI2 is not set
# CONFIG_USB_SN9C102 is not set
CONFIG_USB_ZR364XX=m
-CONFIG_SOC_CAMERA=m
-CONFIG_SOC_CAMERA_MT9M001=m
-CONFIG_SOC_CAMERA_MT9V022=m
-CONFIG_SOC_CAMERA_PLATFORM=m
-CONFIG_SOC_CAMERA_MT9M111=m
-CONFIG_SOC_CAMERA_MT9T031=m
-CONFIG_SOC_CAMERA_TW9910=m
-CONFIG_SOC_CAMERA_OV772X=m
-CONFIG_SOC_CAMERA_MT9T112=m
-CONFIG_SOC_CAMERA_RJ54N1=m
-CONFIG_SOC_CAMERA_OV9640=m
-CONFIG_SOC_CAMERA_OV6650=m
-CONFIG_SOC_CAMERA_OV5642=m
-CONFIG_SOC_CAMERA_IMX074=m
-CONFIG_SOC_CAMERA_OV2640=m
-CONFIG_SOC_CAMERA_OV9740=m
+# CONFIG_SOC_CAMERA is not set
#
# USB Network adaptors
@@ -3395,6 +3473,7 @@ CONFIG_USB_FTDI_ELAN=m
CONFIG_USB_FILE_STORAGE=m
# CONFIG_USB_FILE_STORAGE_TEST is not set
# CONFIG_USB_GADGET is not set
+# CONFIG_USB_DWC3 is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
@@ -3520,13 +3599,14 @@ CONFIG_DNOTIFY=y
# Autofsv3 is obsolete.
# systemd is dependant upon AUTOFS, so build it in.
CONFIG_AUTOFS4_FS=y
-CONFIG_EXOFS_FS=m
+# CONFIG_EXOFS_FS is not set
# CONFIG_EXOFS_DEBUG is not set
-CONFIG_NILFS2_FS=m
-CONFIG_LOGFS=m
+# CONFIG_NILFS2_FS is not set
+# CONFIG_LOGFS is not set
CONFIG_CEPH_FS=m
CONFIG_BLK_DEV_RBD=m
CONFIG_CEPH_LIB=m
+# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
CONFIG_FSCACHE=m
CONFIG_FSCACHE_STATS=y
@@ -3579,8 +3659,8 @@ CONFIG_HFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_BEFS_FS=m
# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
CONFIG_JFFS2_FS=m
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
@@ -3596,10 +3676,11 @@ CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZLIB=y
+# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_VXFS_FS=m
+# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
-CONFIG_QNX4FS_FS=m
+# CONFIG_QNX4FS_FS is not set
CONFIG_SYSV_FS=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
@@ -3608,7 +3689,7 @@ CONFIG_9P_FS=m
CONFIG_9P_FSCACHE=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_FUSE_FS=m
-CONFIG_OMFS_FS=m
+# CONFIG_OMFS_FS is not set
CONFIG_CUSE=m
#
@@ -3626,7 +3707,7 @@ CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
-# CONFIG_NFS_USE_NEW_IDMAPPER is not set
+CONFIG_NFS_USE_NEW_IDMAPPER=y
CONFIG_PNFS_OBJLAYOUT=m
CONFIG_PNFS_BLOCK=m
CONFIG_LOCKD=m
@@ -3671,7 +3752,7 @@ CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
-CONFIG_CONFIGFS_FS=m
+CONFIG_CONFIGFS_FS=y
CONFIG_DLM=m
CONFIG_DLM_DEBUG=y
@@ -3765,7 +3846,7 @@ CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_INFO=y
CONFIG_FRAME_POINTER=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_DEBUG_DRIVER is not set
CONFIG_HEADERS_CHECK=y
# CONFIG_RCU_TORTURE_TEST is not set
@@ -3871,6 +3952,9 @@ CONFIG_CRYPTO_ANSI_CPRNG=m
CONFIG_CRYPTO_DEV_HIFN_795X=m
CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
CONFIG_CRYPTO_PCRYPT=m
+CONFIG_CRYPTO_USER=m
+
+
# Random number generation
@@ -3919,6 +4003,7 @@ CONFIG_LCD_PLATFORM=m
CONFIG_SCHEDSTATS=y
CONFIG_SCHED_DEBUG=y
CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_CFS_BANDWIDTH=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_SCHED_AUTOGROUP=y
@@ -3937,7 +4022,6 @@ CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y # XXX disabled by default, pass 'swapaccount'
# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set
CONFIG_CGROUP_PERF=y
CONFIG_BLK_CGROUP=y
-# CONFIG_DEBUG_BLK_CGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_SYSFS_DEPRECATED_V2 is not set
@@ -3962,7 +4046,7 @@ CONFIG_IBMASR=m
CONFIG_PM_DEBUG=y
CONFIG_PM_TRACE=y
-CONFIG_PM_TEST_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_RUNTIME=y
CONFIG_CPU_FREQ=y
@@ -4002,35 +4086,19 @@ CONFIG_SCSI_ARCMSR_AER=y
# CONFIG_EL1 is not set
# CONFIG_EL2 is not set
-# CONFIG_ELPLUS is not set
-# CONFIG_EL16 is not set
CONFIG_EL3=m
# CONFIG_3C515 is not set
-# CONFIG_LANCE is not set
CONFIG_NET_VENDOR_SMC=y
# CONFIG_WD80x3 is not set
CONFIG_ULTRA=m
-# CONFIG_SMC9194 is not set
# CONFIG_NET_VENDOR_RACAL is not set
-# CONFIG_NI52 is not set
# CONFIG_NI65 is not set
-# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
CONFIG_NET_ISA=y
CONFIG_NE2000=m
# CONFIG_E2100 is not set
-CONFIG_EWRK3=m
-# CONFIG_EEXPRESS is not set
-# CONFIG_EEXPRESS_PRO is not set
# CONFIG_HPLAN_PLUS is not set
# CONFIG_HPLAN is not set
-# CONFIG_LP486E is not set
-# CONFIG_ETH16I is not set
-# CONFIG_ZNET is not set
-# CONFIG_SEEQ8005 is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_CS89x0 is not set
# CONFIG_IBMTR is not set
# CONFIG_SKISA is not set
# CONFIG_PROTEON is not set
@@ -4251,7 +4319,6 @@ CONFIG_LIRC_TTUSBIR=m
# CONFIG_DEVKMEM is not set
CONFIG_PM_TRACE_RTC=y
-CONFIG_R6040=m
CONFIG_BNX2X=m
CONFIG_SCSI_BNX2X_FCOE=m
@@ -4299,6 +4366,7 @@ CONFIG_OPTIMIZE_INLINING=y
# CONFIG_HP_ILO is not set
# CONFIG_GPIOLIB is not set
+# CONFIG_PINCTRL is not set
CONFIG_NETFILTER_TPROXY=m
@@ -4344,9 +4412,9 @@ CONFIG_UWB_WHCI=m
CONFIG_UWB_I1480U=m
CONFIG_STAGING=y
+# CONFIG_STAGING_MEDIA is not set
# CONFIG_ET131X is not set
# CONFIG_SLICOSS is not set
-# CONFIG_VIDEO_TM6000 is not set
# CONFIG_WLAGS49_H2 is not set
# CONFIG_WLAGS49_H25 is not set
# CONFIG_VIDEO_DT3155 is not set
@@ -4393,14 +4461,17 @@ CONFIG_USB_ATMEL=m
# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
# CONFIG_RTS_PSTOR is not set
-# CONFIG_DRM_PSB is not set
-# CONFIG_ALTERA_STAPL is not set
+CONFIG_DRM_PSB=m
+# CONFIG_DRM_PSB_MRST is not set
+# CONFIG_DRM_PSB_MFLD is not set
+# CONFIG_DRM_PSB_CDV is not set
+CONFIG_ALTERA_STAPL=m
# CONFIG_DVB_CXD2099 is not set
# CONFIG_USBIP_CORE is not set
-# CONFIG_BRCMSMAC is not set
-# CONFIG_BRCMFMAC is not set
# CONFIG_INTEL_MEI is not set
# CONFIG_ZCACHE is not set
+# CONFIG_RTS5139 is not set
+# CONFIG_NVEC_LEDS is not set
#
# Android
@@ -4422,11 +4493,13 @@ CONFIG_FCOE_FNIC=m
CONFIG_NOP_USB_XCEIV=m
-CONFIG_IMA=y
+# CONFIG_IMA is not set
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_AUDIT=y
CONFIG_IMA_LSM_RULES=y
+# CONFIG_EVM is not set
+
CONFIG_LSM_MMAP_MIN_ADDR=65536
# CONFIG_PAGE_POISONING is not set
@@ -4449,6 +4522,7 @@ CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_IEEE802154=m
+CONFIG_IEEE802154_6LOWPAN=m
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKEHARD=m
@@ -4460,6 +4534,7 @@ CONFIG_PPS_CLIENT_LDISC=m
# CONFIG_PPS_DEBUG is not set
CONFIG_PPS_CLIENT_PARPORT=m
CONFIG_PPS_GENERATOR_PARPORT=m
+CONFIG_PPS_CLIENT_GPIO=m
CONFIG_NTP_PPS=y
CONFIG_PTP_1588_CLOCK=m
@@ -4489,6 +4564,7 @@ CONFIG_DEBUG_DEVRES=y
CONFIG_DEBUG_RODATA_TEST=y
CONFIG_DEBUG_NX_TEST=m
CONFIG_DEBUG_BOOT_PARAMS=y
+# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
CONFIG_LOCKUP_DETECTOR=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
@@ -4505,6 +4581,8 @@ CONFIG_BLK_DEV_DRBD=m
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_MOUSE_GPIO is not set
+# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
+# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_DEBUG_GPIO is not set
# CONFIG_W1_MASTER_GPIO is not set
@@ -4553,6 +4631,7 @@ CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_PN544_NFC=m
CONFIG_NFC_PN533=m
+CONFIG_NFC_WILINK=m
CONFIG_TARGET_CORE=m
CONFIG_ISCSI_TARGET=m
@@ -4574,10 +4653,15 @@ CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
CONFIG_TEST_KSTRTOX=m
-# CONFIG_BCMA is not set
+CONFIG_BCMA=m
+CONFIG_BCMA_BLOCKIO=y
+CONFIG_BCMA_HOST_PCI_POSSIBLE=y
+CONFIG_BCMA_HOST_PCI=y
+# CONFIG_BCMA_DEBUG is not set
# CONFIG_GOOGLE_FIRMWARE is not set
CONFIG_INTEL_MID_PTI=m
CONFIG_IOMMU_SUPPORT=y
+# CONFIG_PM_DEVFREQ is not set
diff --git a/freed-ora/current/master/config-ia64-generic b/freed-ora/current/master/config-ia64-generic
deleted file mode 100644
index 1fa386d11..000000000
--- a/freed-ora/current/master/config-ia64-generic
+++ /dev/null
@@ -1,205 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-# CONFIG_XEN is not set
-CONFIG_MMU=y
-CONFIG_EFI=y
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-CONFIG_IA64_GENERIC=y
-CONFIG_DMAR=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN2 is not set
-CONFIG_IA64_ESI=y
-CONFIG_IA64_HP_AML_NFW=y
-CONFIG_MSPEC=y
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_NUMA=y
-# CONFIG_VIRTUAL_MEM_MAP is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTREMOVE=y
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_IA64_CYCLONE=y
-CONFIG_MMTIMER=y
-CONFIG_IOSAPIC=y
-CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_NR_CPUS=1024
-# CONFIG_IA32_SUPPORT is not set
-# CONFIG_COMPAT is not set
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_EFI_VARS=y
-CONFIG_SERIAL_8250_RUNTIME_UARTS=16
-CONFIG_EFI_PCDP=y
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_BLK_DEV_SGIIOC4=y
-
-#
-# Character devices
-#
-CONFIG_TCG_INFINEON=m
-
-#
-# Watchdog Cards
-#
-# CONFIG_HW_RANDOM is not set
-# CONFIG_GEN_RTC is not set
-CONFIG_EFI_RTC=y
-CONFIG_RTC_DRV_EFI=y
-
-
-#
-# AGP
-#
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_AGP_SGI_TIOCA=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# SGI
-#
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
-CONFIG_SGI_IOC3=m
-CONFIG_SGI_IOC4=y
-CONFIG_SGI_XP=m
-CONFIG_SGI_GRU=m
-# CONFIG_SGI_GRU_DEBUG is not set
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-CONFIG_SERIAL_SGI_IOC3=m
-CONFIG_SERIAL_SGI_IOC4=m
-
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_SCSI_BUSLOGIC is not set
-
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_SYSFS_POWER=y
-# CONFIG_ACPI_BATTERY is not set
-CONFIG_ACPI_BLACKLIST_YEAR=0
-CONFIG_ACPI_BUTTON=y
-# CONFIG_ACPI_DOCK is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_HOTPLUG_MEMORY=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TOSHIBA is not set
-CONFIG_ACPI_VIDEO=m
-# FIXME: Next two are deprecated. Remove them when they disappear upstream
-# CONFIG_ACPI_PROC_EVENT is not set
-# CONFIG_ACPI_PROCFS_POWER is not set
-CONFIG_ACPI_HED=m
-CONFIG_ACPI_EC_DEBUGFS=m
-CONFIG_ACPI_IPMI=m
-CONFIG_ACPI_CUSTOM_METHOD=m
-CONFIG_SENSORS_ACPI_POWER=m
-
-CONFIG_PM=y
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HPET is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-CONFIG_HOTPLUG_PCI_SGI=m
-CONFIG_PNPACPI=y
-
-CONFIG_SCHED_SMT=y
-
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-
-CONFIG_IA64_ACPI_CPUFREQ=m
-
-# CONFIG_PERMIT_BSP_REMOVE is not set
-# CONFIG_FORCE_CPEI_RETARGET is not set
-
-CONFIG_NODES_SHIFT=10
-
-
-CONFIG_HW_RANDOM_INTEL=m
-
-CONFIG_CRASH_DUMP=y
-CONFIG_PROC_VMCORE=y
-
-# drivers/media/video/usbvision/usbvision-i2c.c:64:39: error: macro "outb" passed 4 arguments, but takes just 2
-# CONFIG_VIDEO_USBVISION is not set
-
-# CONFIG_IA64_MC_ERR_INJECT is not set
-
-CONFIG_DMIID=y
-CONFIG_DMI_SYSFS=y
-
-CONFIG_SENSORS_I5K_AMB=m
-
-CONFIG_SPARSEMEM_VMEMMAP=y
-
-CONFIG_FRAME_WARN=2048
-
-CONFIG_VIRT_CPU_ACCOUNTING=y
-CONFIG_VIRTUALIZATION=y
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-
-CONFIG_HP_ILO=m
-
-CONFIG_PARAVIRT_GUEST=y
-CONFIG_PARAVIRT=y
-CONFIG_PARAVIRT_TIME_ACCOUNTING=y
-
-CONFIG_DMAR_DEFAULT_ON=y
-
-CONFIG_RCU_FANOUT=64
-
-CONFIG_ACPI_POWER_METER=m
-CONFIG_I2C_SCMI=m
-
-# CONFIG_HP_ACCEL is not set
diff --git a/freed-ora/current/master/config-nodebug b/freed-ora/current/master/config-nodebug
index a6acb91de..538dead87 100644
--- a/freed-ora/current/master/config-nodebug
+++ b/freed-ora/current/master/config-nodebug
@@ -2,106 +2,106 @@ 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_RT_MUTEXES=y
-CONFIG_DEBUG_LOCK_ALLOC=y
-CONFIG_PROVE_LOCKING=y
-CONFIG_DEBUG_VM=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_PROVE_RCU=y
+# CONFIG_DEBUG_ATOMIC_SLEEP is not set
+
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_DEBUG_VM 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_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_SLUB_DEBUG_ON=y
+# CONFIG_SLUB_DEBUG_ON 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_SG 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_X86_PTDUMP 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_DEBUG_PERF_USE_VMALLOC=y
+# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
-CONFIG_JBD2_DEBUG=y
+# CONFIG_JBD2_DEBUG 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_DEBUG_OBJECTS_WORK=y
-# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set
+# 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
CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
-CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
-CONFIG_TEST_LIST_SORT=y
+# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set
+# CONFIG_TEST_LIST_SORT is not set
-CONFIG_DEBUG_SET_MODULE_RONX=y
+# CONFIG_DEBUG_SET_MODULE_RONX 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
diff --git a/freed-ora/current/master/config-powerpc-generic b/freed-ora/current/master/config-powerpc-generic
index ee9ab243d..2ca0c3e83 100644
--- a/freed-ora/current/master/config-powerpc-generic
+++ b/freed-ora/current/master/config-powerpc-generic
@@ -38,20 +38,15 @@ CONFIG_AGP_UNINORTH=y
CONFIG_FB_OF=y
# CONFIG_FB_CONTROL is not set
CONFIG_FB_IBM_GXT4500=y
-CONFIG_FB_RADEON=y
CONFIG_FB_MATROX=y
-CONFIG_FB_NVIDIA=m
# CONFIG_FB_VGA16 is not set
CONFIG_FB_ATY128_BACKLIGHT=y
CONFIG_FB_ATY_BACKLIGHT=y
-CONFIG_FB_RADEON_BACKLIGHT=y
CONFIG_FB_RIVA_BACKLIGHT=y
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-# FIXME: Do we care about this hardware ?
-CONFIG_FB_MB862XX=m
-CONFIG_FB_MB862XX_PCI_GDC=y
-CONFIG_FB_MB862XX_LIME=y
-CONFIG_FB_MB862XX_I2C=y
+# CONFIG_FB_MB862XX is not set
+# CONFIG_FB_MB862XX_PCI_GDC is not set
+# CONFIG_FB_MB862XX_LIME is not set
+# CONFIG_FB_MB862XX_I2C is not set
CONFIG_SND_POWERMAC=m
@@ -187,8 +182,8 @@ CONFIG_EDAC_PASEMI=m
CONFIG_EDAC_AMD8131=m
CONFIG_EDAC_AMD8111=m
-CONFIG_AXON_RAM=m
-CONFIG_OPROFILE_CELL=y
+# CONFIG_AXON_RAM is not set
+# CONFIG_OPROFILE_CELL is not set
CONFIG_SUSPEND_FREEZER=y
# CONFIG_IDEPCI_PCIBUS_ORDER is not set
@@ -209,9 +204,9 @@ CONFIG_DMADEVICES=y
CONFIG_SND_PPC=y
-CONFIG_PPC_82xx=y
-CONFIG_PPC_83xx=y
-CONFIG_PPC_86xx=y
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+# CONFIG_PPC_86xx is not set
CONFIG_EXTRA_TARGETS=""
# CONFIG_CODE_PATCHING_SELFTEST is not set
# CONFIG_FTR_FIXUP_SELFTEST is not set
@@ -225,27 +220,28 @@ CONFIG_EXTRA_TARGETS=""
# CONFIG_SERIAL_QE is not set
# CONFIG_I2C_CPM is not set
+CONFIG_NET_VENDOR_IBM=y
-CONFIG_SERIO_XILINX_XPS_PS2=m
+# CONFIG_SERIO_XILINX_XPS_PS2 is not set
# CONFIG_PPC_SMLPAR is not set
-CONFIG_MGCOGE=y
-CONFIG_GEF_SBC610=y
-CONFIG_GEF_PPC9A=y
-CONFIG_GEF_SBC310=y
+# CONFIG_MGCOGE is not set
+# CONFIG_GEF_SBC610 is not set
+# CONFIG_GEF_PPC9A is not set
+# CONFIG_GEF_SBC310 is not set
-CONFIG_QUICC_ENGINE=y
-CONFIG_QE_GPIO=y
-CONFIG_MPC8xxx_GPIO=y
+# CONFIG_QUICC_ENGINE is not set
+# CONFIG_QE_GPIO is not set
+# CONFIG_MPC8xxx_GPIO is not set
CONFIG_IDE_GD=y
CONFIG_IDE_GD_ATA=y
CONFIG_IDE_GD_ATAPI=y
-CONFIG_MCU_MPC8349EMITX=m
+# CONFIG_MCU_MPC8349EMITX is not set
-CONFIG_GPIO_XILINX=y
+# CONFIG_GPIO_XILINX is not set
CONFIG_PMIC_DA903X=y
CONFIG_BACKLIGHT_DA903X=m
@@ -266,11 +262,11 @@ CONFIG_TOUCHSCREEN_DA9034=m
CONFIG_SIMPLE_GPIO=y
-CONFIG_FSL_PQ_MDIO=m
+# CONFIG_FSL_PQ_MDIO is not set
-CONFIG_PS3_VRAM=m
+# CONFIG_PS3_VRAM is not set
CONFIG_MDIO_GPIO=m
-CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL=m
+# CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL is not set
# CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_PCA953X=m
CONFIG_GPIO_PCF857X=m
@@ -278,8 +274,6 @@ CONFIG_GPIO_PCF857X=m
# CONFIG_USB_FHCI_HCD is not set
# CONFIG_FHCI_DEBUG is not set
-# CONFIG_DRM_RADEON_KMS is not set
-
# CONFIG_AMIGAONE is not set
CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
@@ -300,20 +294,20 @@ CONFIG_SWIOTLB=y
CONFIG_PPC_DISABLE_WERROR=y
-CONFIG_XILINX_LL_TEMAC=m
-CONFIG_XILINX_EMACLITE=m
+# CONFIG_XILINX_LL_TEMAC is not set
+# CONFIG_XILINX_EMACLITE is not set
CONFIG_GPIO_WM831X=m
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIO_UCB1400 is not set
-CONFIG_EDAC_MPC85XX=m
+# CONFIG_EDAC_MPC85XX is not set
CONFIG_NR_IRQS=512
CONFIG_SPARSE_IRQ=y
-CONFIG_PPC_MPC5200_LPBFIFO=m
-CONFIG_CAN_MSCAN=m
-CONFIG_CAN_MPC5XXX=m
+# CONFIG_PPC_MPC5200_LPBFIFO is not set
+# CONFIG_CAN_MSCAN is not set
+# CONFIG_CAN_MPC5XXX is not set
CONFIG_PATA_MACIO=m
CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
# CONFIG_PMIC_ADP5520 is not set
@@ -334,7 +328,7 @@ CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
# CONFIG_PPC_MPC512x is not set
# CONFIG_RTC_DRV_MPC5121 is not set
-CONFIG_MPC512X_DMA=m
+# CONFIG_MPC512X_DMA is not set
CONFIG_KVM_GUEST=y
@@ -345,13 +339,17 @@ CONFIG_I2C_MPC=m
CONFIG_RFKILL_GPIO=m
-CONFIG_CRYPTO_DEV_FSL_CAAM=m
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD=255
-CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=2048
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=m
+# CONFIG_CRYPTO_DEV_FSL_CAAM is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_CAN_FLEXCAN is not set
+# CONFIG_NET_VENDOR_XILINX is not set
+# CONFIG_PPC_EPAPR_HV_BYTECHAN is not set
+# CONFIG_IBM_EMAC is not set
+# CONFIG_NET_VENDOR_PASEMI is not set
+# CONFIG_NET_VENDOR_TOSHIBA is not set
+
+# Disable btrfs until it is shown to work with 64k pages (rhbz 747079)
+# CONFIG_BTRFS_FS is not set
diff --git a/freed-ora/current/master/config-powerpc32-generic b/freed-ora/current/master/config-powerpc32-generic
index 31c399e65..e856b9ff0 100644
--- a/freed-ora/current/master/config-powerpc32-generic
+++ b/freed-ora/current/master/config-powerpc32-generic
@@ -7,17 +7,17 @@ CONFIG_PPC32=y
CONFIG_CPU_FREQ_PMAC=y
CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
-CONFIG_PPC_MPC52xx=y
+# CONFIG_PPC_MPC52xx is not set
CONFIG_PPC_PREP=y
# CONFIG_PPC_MPC5200_SIMPLE is not set
-CONFIG_SATA_FSL=m
+# CONFIG_SATA_FSL is not set
# CONFIG_SATA_NV is not set
# busted in .28git1
# ERROR: "cacheable_memzero" [drivers/net/gianfar_driver.ko] undefined!
# CONFIG_GIANFAR is not set
-CONFIG_USB_EHCI_FSL=y
+# CONFIG_USB_EHCI_FSL is not set
CONFIG_PMAC_APM_EMU=y
CONFIG_PMAC_BACKLIGHT=y
@@ -41,6 +41,7 @@ CONFIG_ADB_PMU_LED=y
CONFIG_ADB_PMU_LED_IDE=y
CONFIG_PMAC_MEDIABAY=y
+CONFIG_NET_VENDOR_APPLE=y
CONFIG_BMAC=m
CONFIG_MACE=m
# CONFIG_MACE_AAUI_PORT is not set
@@ -72,24 +73,20 @@ CONFIG_BRIQ_PANEL=m
# CONFIG_ATA_PIIX is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ATIIXP is not set
-CONFIG_PATA_MPC52xx=m
+# CONFIG_PATA_MPC52xx is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_SERIAL_MPC52xx=y
-CONFIG_SERIAL_MPC52xx_CONSOLE=y
-CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
+# CONFIG_SERIAL_MPC52xx is not set
# CONFIG_MPC5200_WDT is not set
CONFIG_8xxx_WDT=m
CONFIG_GEF_WDT=m
-CONFIG_PPC_MPC5200_BUGFIX=y
-CONFIG_FEC_MPC52xx=m
+# CONFIG_PPC_MPC5200_BUGFIX is not set
+# CONFIG_NET_VENDOR_FREESCALE is not set
#CHECK: This may later become a tristate.
-CONFIG_FEC_MPC52xx_MDIO=y
-CONFIG_PPC_MPC5200_GPIO=y
CONFIG_MDIO_GPIO=m
CONFIG_SERIAL_OF_PLATFORM=y
@@ -144,26 +141,28 @@ CONFIG_VIRTUALIZATION=y
CONFIG_SND_ISA=y
CONFIG_CRYPTO_DEV_TALITOS=m
-CONFIG_FSL_EMB_PERFMON=y
-CONFIG_MPC8272_ADS=y
-CONFIG_PQ2FADS=y
-CONFIG_EP8248E=y
-CONFIG_MPC830x_RDB=y
-CONFIG_MPC831x_RDB=y
-CONFIG_MPC832x_MDS=y
-CONFIG_MPC832x_RDB=y
-CONFIG_MPC834x_MDS=y
-CONFIG_MPC834x_ITX=y
-CONFIG_MPC836x_MDS=y
-CONFIG_MPC836x_RDK=y
-CONFIG_MPC837x_MDS=y
-CONFIG_MPC837x_RDB=y
-CONFIG_SBC834x=y
-CONFIG_ASP834x=y
-CONFIG_KMETER1=y
-CONFIG_MPC8641_HPCN=y
-CONFIG_SBC8641D=y
-CONFIG_MPC8610_HPCD=y
+# CONFIG_FSL_EMB_PERFMON is not set
+# CONFIG_MPC8272_ADS is not set
+# CONFIG_PQ2FADS is not set
+# CONFIG_EP8248E is not set
+# CONFIG_MPC830x_RDB is not set
+# CONFIG_MPC831x_RDB is not set
+# CONFIG_MPC832x_MDS is not set
+# CONFIG_MPC832x_RDB is not set
+# CONFIG_MPC834x_MDS is not set
+# CONFIG_MPC834x_ITX is not set
+# CONFIG_MPC836x_MDS is not set
+# CONFIG_MPC836x_RDK is not set
+# CONFIG_MPC837x_MDS is not set
+# CONFIG_MPC837x_RDB is not set
+# CONFIG_SBC834x is not set
+# CONFIG_ASP834x is not set
+# CONFIG_KMETER1 is not set
+# CONFIG_MPC8641_HPCN is not set
+# CONFIG_SBC8641D is not set
+# CONFIG_MPC8610_HPCD is not set
+# CONFIG_FSL_LBC is not set
+# CONFIG_MTD_NAND_FSL_UPM is not set
# CONFIG_USB_MUSB_HDRC is not set
@@ -172,8 +171,6 @@ CONFIG_MPC8610_HPCD=y
# drivers/mtd/maps/sbc8240.c:172: warning: passing argument 1 of 'simple_map_init' from incompatible pointer type
# drivers/mtd/maps/sbc8240.c:177: error: 'struct mtd_info' has no member named 'module'
-CONFIG_MTD_NAND_FSL_UPM=m
-
CONFIG_RCU_FANOUT=32
CONFIG_PERF_COUNTERS=y
@@ -185,3 +182,4 @@ CONFIG_KVM_BOOK3S_32=m
# CONFIG_SCSI_QLA_ISCSI is not set
CONFIG_BATTERY_PMU=m
+
diff --git a/freed-ora/current/master/config-powerpc64 b/freed-ora/current/master/config-powerpc64
index 7142d8007..42b501675 100644
--- a/freed-ora/current/master/config-powerpc64
+++ b/freed-ora/current/master/config-powerpc64
@@ -2,42 +2,23 @@ CONFIG_WINDFARM_PM81=y
CONFIG_WINDFARM_PM91=y
CONFIG_WINDFARM_PM121=y
CONFIG_PPC_PMAC64=y
-CONFIG_PPC_MAPLE=y
-CONFIG_PPC_CELL=y
-CONFIG_PPC_IBM_CELL_BLADE=y
+# CONFIG_PPC_MAPLE is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_IBM_CELL_BLADE is not set
CONFIG_PPC_ISERIES=y
CONFIG_PPC_PSERIES=y
CONFIG_PPC_PMAC=y
-CONFIG_PPC_PASEMI=y
+CONFIG_PPC_POWERNV=y
+CONFIG_PPC_POWERNV_RTAS=y
+# CONFIG_PPC_PASEMI is not set
# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
-CONFIG_PPC_PS3=y
-CONFIG_PPC_CELLEB=y
-CONFIG_PPC_CELL_QPACE=y
-CONFIG_PS3_HTAB_SIZE=20
-# CONFIG_PS3_DYNAMIC_DMA is not set
-CONFIG_PS3_ADVANCED=y
-CONFIG_PS3_HTAB_SIZE=20
-# CONFIG_PS3_DYNAMIC_DMA is not set
-CONFIG_PS3_VUART=y
-CONFIG_PS3_PS3AV=y
-CONFIG_PS3_STORAGE=m
-CONFIG_PS3_DISK=m
-CONFIG_PS3_ROM=m
-CONFIG_PS3_FLASH=m
-CONFIG_PS3_LPM=y
-CONFIG_SND_PS3=m
-CONFIG_SND_PS3_DEFAULT_START_DELAY=1000
-CONFIG_GELIC_NET=m
-CONFIG_GELIC_WIRELESS=y
-CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE=y
-CONFIG_CBE_THERM=m
-CONFIG_CBE_CPUFREQ=m
-CONFIG_CBE_CPUFREQ_PMI=m
-CONFIG_CBE_CPUFREQ_PMI_ENABLE=y
+# CONFIG_PPC_PS3 is not set
+# CONFIG_PPC_CELLEB is not set
+# CONFIG_PPC_CELL_QPACE is not set
CONFIG_PMAC_RACKMETER=m
CONFIG_IBMEBUS=y
-CONFIG_SPU_FS=m
CONFIG_RTAS_FLASH=y
+# CONFIG_UDBG_RTAS_CONSOLE is not set
CONFIG_PPC_SPLPAR=y
CONFIG_SCANLOG=y
CONFIG_LPARCFG=y
@@ -60,10 +41,9 @@ CONFIG_CPU_FREQ_PMAC64=y
CONFIG_SCSI_IPR=m
CONFIG_SCSI_IPR_TRACE=y
CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SPIDER_NET=m
CONFIG_HVC_RTAS=y
CONFIG_HVC_ISERIES=y
-CONFIG_CBE_RAS=y
+CONFIG_HVC_OPAL=y
# iSeries device drivers
#
@@ -75,19 +55,13 @@ CONFIG_VIOTAPE=m
CONFIG_PASEMI_MAC=m
CONFIG_SERIAL_OF_PLATFORM=m
-CONFIG_PPC_PASEMI_IOMMU=y
CONFIG_SERIAL_TXX9=y
CONFIG_SERIAL_TXX9_NR_UARTS=6
CONFIG_SERIAL_TXX9_CONSOLE=y
CONFIG_HVC_BEAT=y
-CONFIG_FB_PS3=y
-CONFIG_FB_PS3_DEFAULT_SIZE_M=18
-
CONFIG_PPC_PMI=m
-CONFIG_PS3_SYS_MANAGER=y
-# CONFIG_BLK_DEV_CELLEB is not set
CONFIG_PATA_SCC=m
@@ -112,6 +86,12 @@ CONFIG_PPC_64K_PAGES=y
CONFIG_PPC_SUBPAGE_PROT=y
CONFIG_SCHED_SMT=y
+CONFIG_HZ=100
+CONFIG_HZ_100=y
+# CONFIG_HZ_1000 is not set
+
+CONFIG_MEMORY_HOTREMOVE=y
+
# CONFIG_MV643XX_ETH is not set
CONFIG_IRQSTACKS=y
CONFIG_DEBUG_STACKOVERFLOW=y
@@ -120,7 +100,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_EHEA=m
CONFIG_INFINIBAND_EHCA=m
-CONFIG_HCALL_STATS=y
+# CONFIG_HCALL_STATS is not set
CONFIG_XMON_DISASSEMBLY=y
@@ -132,19 +112,9 @@ CONFIG_SECCOMP=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
# CONFIG_BLK_DEV_PLATFORM is not set
-CONFIG_IBM_NEW_EMAC=m
-CONFIG_IBM_NEW_EMAC_RXB=128
-CONFIG_IBM_NEW_EMAC_TXB=64
-CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
-CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
-CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
-# CONFIG_IBM_NEW_EMAC_DEBUG is not set
# CONFIG_VIRQ_DEBUG is not set
-CONFIG_ELECTRA_CF=m
-CONFIG_MTD_NAND_PASEMI=m
-CONFIG_EDAC_CELL=m
CONFIG_EDAC_CPC925=m
CONFIG_FRAME_WARN=2048
@@ -158,14 +128,6 @@ CONFIG_SCSI_IBMVFC=m
# CONFIG_SCSI_IBMVFC_TRACE is not set
CONFIG_IBM_BSR=m
-CONFIG_SERIO_XILINX_XPS_PS2=m
-
-CONFIG_PPC_IBM_CELL_RESETBUTTON=y
-CONFIG_PPC_IBM_CELL_POWERBUTTON=m
-CONFIG_CBE_CPUFREQ_SPU_GOVERNOR=m
-
-CONFIG_RTC_DRV_PS3=y
-
CONFIG_CRASH_DUMP=y
CONFIG_RELOCATABLE=y
@@ -185,7 +147,9 @@ CONFIG_KVM_BOOK3S_64=m
CONFIG_PPC_SMLPAR=y
CONFIG_CMM=y
#-- DLPAR memory remove
-# CONFIG_SPARSEMEM_VMEMMAP is not set
+CONFIG_SPARSEMEM_VMEMMAP=y
+
+# CONFIG_COMPACTION is not set
CONFIG_PSERIES_ENERGY=m
@@ -194,4 +158,3 @@ CONFIG_IO_EVENT_IRQ=y
CONFIG_HW_RANDOM_AMD=m
CONFIG_BPF_JIT=y
-CONFIG_CPU_FREQ_MAPLE=y
diff --git a/freed-ora/current/master/config-rhel-generic b/freed-ora/current/master/config-rhel-generic
deleted file mode 100644
index e8ee6e6ac..000000000
--- a/freed-ora/current/master/config-rhel-generic
+++ /dev/null
@@ -1,203 +0,0 @@
-# CONFIG_ISA is not set
-# CONFIG_ISAPNP is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_DC390T is not set
-
-# CONFIG_ATALK is not set
-# CONFIG_DEV_APPLETALK is not set
-# CONFIG_LTPC is not set
-# CONFIG_COPS is not set
-# CONFIG_IPX is not set
-# CONFIG_IPDDP is not set
-# CONFIG_DECNET is not set
-# CONFIG_PLIP is not set
-
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-# CONFIG_EL2 is not set
-# CONFIG_ELPLUS is not set
-# CONFIG_WD80x3 is not set
-# CONFIG_I82092 is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_ULTRA is not set
-# CONFIG_SKFP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_AC3200 is not set
-# CONFIG_NI52 is not set
-# CONFIG_NI65 is not set
-# CONFIG_LANCE is not set
-# CONFIG_EL16 is not set
-# CONFIG_EL3 is not set
-# CONFIG_3C515 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_HP100 is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_NET_SB1000 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_ATP is not set
-
-# CONFIG_TR is not set
-
-# CONFIG_GAMEPORT is not set
-
-# CONFIG_SND_AD1816A is not set
-# CONFIG_SND_AD1848 is not set
-# CONFIG_SND_CS4231 is not set
-# CONFIG_SND_CS4236 is not set
-# CONFIG_SND_ES968 is not set
-# CONFIG_SND_ES1688 is not set
-# CONFIG_SND_ES18XX is not set
-# CONFIG_SND_GUSCLASSIC is not set
-# CONFIG_SND_GUSEXTREME is not set
-# CONFIG_SND_GUSMAX is not set
-# CONFIG_SND_INTERWAVE is not set
-# CONFIG_SND_INTERWAVE_STB is not set
-# CONFIG_SND_OPTI92X_AD1848 is not set
-# CONFIG_SND_OPTI92X_CS4231 is not set
-# CONFIG_SND_OPTI93X is not set
-# CONFIG_SND_MIRO is not set
-# CONFIG_SND_SB8 is not set
-# CONFIG_SND_SB16 is not set
-# CONFIG_SND_SBAWE is not set
-# CONFIG_SND_SB16_CSP is not set
-# CONFIG_SND_WAVEFRONT is not set
-# CONFIG_SND_ALS100 is not set
-# CONFIG_SND_AZT2320 is not set
-# CONFIG_SND_CMI8330 is not set
-# CONFIG_SND_DT019X is not set
-# CONFIG_SND_OPL3SA2 is not set
-# CONFIG_SND_SGALAXY is not set
-# CONFIG_SND_SSCAPE is not set
-
-# CONFIG_WAN_ROUTER is not set
-
-# CONFIG_BINFMT_AOUT is not set
-
-# CONFIG_DRM_TDFX is not set
-# CONFIG_DRM_SIS is not set
-
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-
-# CONFIG_I2O is not set
-
-# CONFIG_MWAVE is not set
-
-# CONFIG_ROCKETPORT is not set
-# CONFIG_R3964 is not set
-
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_MIROPCM20 is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_CPIA_PP is not set
-# CONFIG_VIDEO_CPIA_USB is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_ZORAN_BUZ is not set
-# CONFIG_VIDEO_ZORAN_DC10 is not set
-# CONFIG_VIDEO_ZORAN_DC30 is not set
-# CONFIG_VIDEO_ZORAN_LML33 is not set
-# CONFIG_VIDEO_ZORAN_LML33R10 is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_SAA5246A is not set
-
-# CONFIG_INFTL is not set
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PCI is not set
-
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_HGA_ACCEL is not set
-# CONFIG_FB_3DFX_ACCEL is not set
-
-# CONFIG_JFS_FS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_9P_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-
diff --git a/freed-ora/current/master/config-s390x b/freed-ora/current/master/config-s390x
index 5251b5b32..f03942191 100644
--- a/freed-ora/current/master/config-s390x
+++ b/freed-ora/current/master/config-s390x
@@ -237,3 +237,5 @@ CONFIG_STRICT_DEVMEM=y
# CONFIG_WARN_DYNAMIC_STACK is not set
CONFIG_CRYPTO_GHASH_S390=m
+CONFIG_NET_CORE=y
+CONFIG_ETHERNET=y
diff --git a/freed-ora/current/master/config-sparc64-generic b/freed-ora/current/master/config-sparc64-generic
index e5ee2c4b9..e9b66f6d6 100644
--- a/freed-ora/current/master/config-sparc64-generic
+++ b/freed-ora/current/master/config-sparc64-generic
@@ -43,6 +43,7 @@ CONFIG_I2C_ALI1535=m
# CONFIG_VGASTATE is not set
# CONFIG_FB_DDC is not set
# CONFIG_FB_BW2 is not set
+# CONFIG_FB_GRVGA is not set
CONFIG_FB_CG3=y
CONFIG_FB_CG6=y
# CONFIG_FB_RIVA is not set
diff --git a/freed-ora/current/master/config-x86-32-generic b/freed-ora/current/master/config-x86-32-generic
index 82a6f231e..beeb6f02f 100644
--- a/freed-ora/current/master/config-x86-32-generic
+++ b/freed-ora/current/master/config-x86-32-generic
@@ -153,6 +153,7 @@ CONFIG_OLPC_XO1_PM=y
CONFIG_OLPC_XO15_SCI=y
CONFIG_OLPC_XO1_RTC=y
CONFIG_OLPC_XO1_SCI=y
+# CONFIG_ALIX is not set
# staging
# CONFIG_FB_OLPC_DCON is not set
@@ -202,3 +203,6 @@ CONFIG_I2O_EXT_ADAPTEC=y
CONFIG_I2O_CONFIG_OLD_IOCTL=y
CONFIG_I2O_BUS=m
+# CONFIG_EDAC_SBRIDGE is not set
+
+# CONFIG_X86_WANT_INTEL_MID is not set
diff --git a/freed-ora/current/master/config-x86-generic b/freed-ora/current/master/config-x86-generic
index 2e4cc0a3b..ebf16225c 100644
--- a/freed-ora/current/master/config-x86-generic
+++ b/freed-ora/current/master/config-x86-generic
@@ -36,10 +36,10 @@ CONFIG_FB_EFI=y
# FIXME: 32bit only?
# CONFIG_FB_N411 is not set
-CONFIG_DMAR=y
+CONFIG_INTEL_IOMMU=y
CONFIG_DMAR_BROKEN_GFX_WA=y
-CONFIG_DMAR_FLOPPY_WA=y
-CONFIG_DMAR_DEFAULT_ON=y
+CONFIG_INTEL_IOMMU_FLOPPY_WA=y
+# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_SCSI_ADVANSYS=m
CONFIG_SECCOMP=y
diff --git a/freed-ora/current/master/config-x86_64-generic b/freed-ora/current/master/config-x86_64-generic
index 64710294d..e97455294 100644
--- a/freed-ora/current/master/config-x86_64-generic
+++ b/freed-ora/current/master/config-x86_64-generic
@@ -12,7 +12,7 @@ CONFIG_AMD_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not set
-CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS=256
CONFIG_PHYSICAL_START=0x1000000
CONFIG_IA32_EMULATION=y
@@ -44,6 +44,9 @@ CONFIG_CRYPTO_AES_X86_64=y
CONFIG_CRYPTO_TWOFISH_X86_64=m
CONFIG_CRYPTO_SALSA20_X86_64=m
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
+CONFIG_CRYPTO_SHA1_SSSE3=m
+CONFIG_CRYPTO_BLOWFISH_X86_64=m
+CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=m
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
@@ -53,6 +56,7 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
CONFIG_EDAC_AMD64=m
# CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
+CONFIG_EDAC_SBRIDGE=m
# CONFIG_PC8736x_GPIO is not set
@@ -79,7 +83,7 @@ CONFIG_SGI_GRU=m
# CONFIG_VIDEO_CAFE_CCIC is not set
-CONFIG_XEN_MAX_DOMAIN_MEMORY=32
+CONFIG_XEN_MAX_DOMAIN_MEMORY=128
# CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set
CONFIG_XEN_DEV_EVTCHN=m
CONFIG_XEN_SYS_HYPERVISOR=y
@@ -95,7 +99,7 @@ CONFIG_DIRECT_GBPAGES=y
CONFIG_X86_MPPARSE=y
CONFIG_I7300_IDLE=m
-CONFIG_INTR_REMAP=y
+CONFIG_IRQ_REMAP=y
CONFIG_X86_X2APIC=y
CONFIG_SPARSE_IRQ=y
diff --git a/freed-ora/current/master/crypto-register-cryptd-first.patch b/freed-ora/current/master/crypto-register-cryptd-first.patch
deleted file mode 100644
index 0cd55d6fc..000000000
--- a/freed-ora/current/master/crypto-register-cryptd-first.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 9d4c522a113f6caa8b792ae829a25490fa87b1a2
-Author: Herbert Xu <herbert@gondor.apana.org.au>
-Date: Fri Aug 19 16:11:23 2011 +0800
-
- crypto: cryptd - Use subsys_initcall to prevent races with aesni
-
- As cryptd is depeneded on by other algorithms such as aesni-intel,
- it needs to be registered before them. When everything is built
- as modules, this occurs naturally. However, for this to work when
- they are built-in, we need to use subsys_initcall in cryptd.
-
- Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-
-diff --git a/crypto/cryptd.c b/crypto/cryptd.c
-index e46d21a..671d4d6 100644
---- a/crypto/cryptd.c
-+++ b/crypto/cryptd.c
-@@ -945,7 +945,7 @@ static void __exit cryptd_exit(void)
- crypto_unregister_template(&cryptd_tmpl);
- }
-
--module_init(cryptd_init);
-+subsys_initcall(cryptd_init);
- module_exit(cryptd_exit);
-
- MODULE_LICENSE("GPL");
diff --git a/freed-ora/current/master/deblob-3.1 b/freed-ora/current/master/deblob-3.2
index 2d9f1bef9..534c2742a 100755
--- a/freed-ora/current/master/deblob-3.1
+++ b/freed-ora/current/master/deblob-3.2
@@ -1,6 +1,7 @@
#!/bin/sh
-# Copyright (C) 2008, 2009, 2010, 2011 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009, 2010, 2011, 2012
+# Alexandre Oliva <lxoliva@fsfla.org>
# Copyright (C) 2008 Jeff Moe
# Copyright (C) 2009 Rubén Rodríguez <ruben@gnu.org>
#
@@ -44,7 +45,7 @@
# For each kver release, start extra with an empty string, then count
# from 1 if changes are needed that require rebuilding the tarball.
-kver=3.1 extra=
+kver=3.2 extra=
case $1 in
--force)
@@ -431,7 +432,7 @@ clean_sed '
s,\([" ]\)request_firmware(,\1reject_firmware(,
' arch/arm/mach-netx/xc.c 'disabled non-Free firmware-loading machinery'
clean_blob arch/arm/mach-netx/xc.c
-clean_blob drivers/net/netx-eth.c
+clean_blob drivers/net/ethernet/netx-eth.c
clean_kconfig arch/arm/Kconfig 'ARCH_NETX'
clean_mk CONFIG_ARCH_NETX arch/arm/Makefile
@@ -557,9 +558,13 @@ clean_mk CONFIG_DRM_RADEON drivers/gpu/drm/Makefile
announce IMX_SDMA - "i.MX SDMA support"
reject_firmware drivers/dma/imx-sdma.c
clean_blob arch/arm/mach-imx/mm-imx25.c
-clean_blob arch/arm/mach-imx/mm-imx31.c
-clean_blob arch/arm/mach-imx/mm-imx35.c
+clean_blob arch/arm/mach-imx/mm-imx3.c
clean_blob arch/arm/mach-mx5/mm.c
+clean_blob arch/arm/boot/dts/imx51-babbage.dts
+clean_blob arch/arm/boot/dts/imx53-ard.dts
+clean_blob arch/arm/boot/dts/imx53-evk.dts
+clean_blob arch/arm/boot/dts/imx53-qsb.dts
+clean_blob arch/arm/boot/dts/imx53-smd.dts
clean_blob Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
clean_kconfig drivers/dma/Kconfig 'IMX_SDMA'
clean_mk CONFIG_IMX_SDMA drivers/dma/Makefile
@@ -589,9 +594,9 @@ clean_kconfig drivers/media/common/tuners/Kconfig 'MEDIA_TUNER_XC2028'
clean_mk CONFIG_MEDIA_TUNER_XC2028 drivers/media/common/tuners/Makefile
announce VIDEO_TM6000_DVB - "DVB Support for tm6000 based TV cards"
-clean_blob drivers/staging/tm6000/tm6000-cards.c
-clean_kconfig drivers/staging/tm6000/Kconfig 'VIDEO_TM6000_DVB'
-clean_mk CONFIG_VIDEO_TM6000_DVB drivers/staging/tm6000/Makefile
+clean_blob drivers/media/video/tm6000/tm6000-cards.c
+clean_kconfig drivers/media/video/tm6000/Kconfig 'VIDEO_TM6000_DVB'
+clean_mk CONFIG_VIDEO_TM6000_DVB drivers/media/video/tm6000/Makefile
announce MEDIA_TUNER_XC4000 - "Xceive XC4000 silicon tuner"
undefault_firmware 'XC4000' drivers/media/common/tuners/xc4000.c
@@ -697,6 +702,12 @@ clean_blob drivers/media/dvb/dvb-usb/gp8psk.c
clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_GP8PSK'
clean_mk CONFIG_DVB_USB_GP8PSK drivers/media/dvb/dvb-usb/Makefile
+announce DVB_USB_IT913X - "it913x driver"
+clean_blob drivers/media/dvb/dvb-usb/it913x.c
+clean_file Documentation/dvb/it9137.txt
+clean_kconfig drivers/media/dvb/dvb-usb/Kconfig 'DVB_USB_IT913X'
+clean_mk CONFIG_DVB_USB_IT913X drivers/media/dvb/dvb-usb/Makefile
+
announce DVB_USB_LME2510 - "LME DM04/QQBOX DVB-S USB2.0 support"
reject_firmware drivers/media/dvb/dvb-usb/lmedm04.c
clean_blob drivers/media/dvb/dvb-usb/lmedm04.c
@@ -840,8 +851,21 @@ clean_blob drivers/media/dvb/frontends/tda1004x.c
clean_kconfig drivers/media/dvb/frontends 'DVB_TDA1004X'
clean_mk CONFIG_DVB_TDA1004X drivers/media/dvb/frontends/Makefile
+announce DVB_TDA10071 - "NXP TDA10071"
+undefault_firmware 'TDA10071' drivers/media/dvb/frontends/tda10071_priv.h
+undefault_firmware 'TDA10071' drivers/media/dvb/frontends/tda10071.c
+reject_firmware drivers/media/dvb/frontends/tda10071.c
+clean_kconfig drivers/media/dvb/frontends 'DVB_TDA10071'
+clean_mk CONFIG_DVB_TDA10071 drivers/media/dvb/frontends/Makefile
+
# dvb
+announce DVB_AS102 - "Abilis AS102 DVB receiver"
+reject_firmware drivers/staging/media/as102/as102_fw.c
+clean_blob drivers/staging/media/as102/as102_fw.c
+clean_kconfig drivers/staging/media/as102/Kconfig 'DVB_AS102'
+clean_mk CONFIG_DVB_AS102 drivers/staging/media/as102/Makefile
+
announce DVB_AV7110 - "AV7110 cards"
reject_firmware drivers/media/dvb/ttpci/av7110.c
clean_blob drivers/media/dvb/ttpci/av7110.c
@@ -901,6 +925,7 @@ clean_mk CONFIG_DVB_TTUSB_BUDGET drivers/media/dvb/ttusb-budget/Makefile
announce DVB_TTUSB_DEC - "Technotrend/Hauppauge USB DEC devices"
reject_firmware drivers/media/dvb/ttusb-dec/ttusb_dec.c
clean_blob drivers/media/dvb/ttusb-dec/ttusb_dec.c
+clean_blob Documentation/dvb/ttusb-dec.txt
clean_kconfig drivers/media/dvb/ttusb-dec/Kconfig 'DVB_TTUSB_DEC'
clean_mk CONFIG_DVB_TTUSB_DEC drivers/media/dvb/ttusb-dec/Makefile
@@ -908,6 +933,8 @@ clean_mk CONFIG_DVB_TTUSB_DEC drivers/media/dvb/ttusb-dec/Makefile
announce VIDEO_BT848 - "BT848 Video For Linux"
reject_firmware drivers/media/video/bt8xx/bttv-cards.c
+clean_blob drivers/media/video/bt8xx/bttv-cards.c
+clean_blob Documentation/video4linux/bttv/README
clean_kconfig drivers/media/video/bt8xx/Kconfig 'VIDEO_BT848'
clean_mk CONFIG_VIDEO_BT848 drivers/media/video/bt8xx/Makefile
@@ -974,19 +1001,19 @@ announce "VIDEO_CX23885, VIDEO_CX88_BLACKBIRD, VIDEO_IVTV, VIDEO_PVRUSB2" - "See
clean_blob include/media/cx2341x.h
announce VIDEO_GO7007 - "Go 7007 support"
-reject_firmware drivers/staging/go7007/go7007-driver.c
-clean_blob drivers/staging/go7007/go7007-driver.c
-reject_firmware drivers/staging/go7007/go7007-fw.c
-clean_blob drivers/staging/go7007/go7007-usb.c
-clean_blob drivers/staging/go7007/saa7134-go7007.c
-clean_kconfig drivers/staging/go7007/Kconfig 'VIDEO_GO7007'
-clean_mk CONFIG_VIDEO_GO7007 drivers/staging/go7007/Makefile
+reject_firmware drivers/staging/media/go7007/go7007-driver.c
+clean_blob drivers/staging/media/go7007/go7007-driver.c
+reject_firmware drivers/staging/media/go7007/go7007-fw.c
+clean_blob drivers/staging/media/go7007/go7007-usb.c
+clean_blob drivers/staging/media/go7007/saa7134-go7007.c
+clean_kconfig drivers/staging/media/go7007/Kconfig 'VIDEO_GO7007'
+clean_mk CONFIG_VIDEO_GO7007 drivers/staging/media/go7007/Makefile
announce VIDEO_GO7007_USB_S2250_BOARD - "Sensoray 2250/2251 support"
-reject_firmware drivers/staging/go7007/s2250-loader.c
-clean_blob drivers/staging/go7007/s2250-loader.c
-clean_kconfig drivers/staging/go7007/Kconfig 'VIDEO_GO7007_USB_S2250_BOARD'
-clean_mk CONFIG_VIDEO_GO7007_USB_S2250_BOARD drivers/staging/go7007/Makefile
+reject_firmware drivers/staging/media/go7007/s2250-loader.c
+clean_blob drivers/staging/media/go7007/s2250-loader.c
+clean_kconfig drivers/staging/media/go7007/Kconfig 'VIDEO_GO7007_USB_S2250_BOARD'
+clean_mk CONFIG_VIDEO_GO7007_USB_S2250_BOARD drivers/staging/media/go7007/Makefile
announce VIDEO_SAA7134_DVB - "DVB/ATSC Support for saa7134 based TV cards"
reject_firmware drivers/media/video/saa7134/saa7134-dvb.c
@@ -1050,25 +1077,25 @@ clean_mk CONFIG_RADIO_WL128X drivers/media/radio/Makefile
announce ACENIC - "Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit"
drop_fw_file firmware/acenic/tg1.bin.ihex firmware/acenic/tg1.bin
drop_fw_file firmware/acenic/tg2.bin.ihex firmware/acenic/tg2.bin
-reject_firmware drivers/net/acenic.c
-clean_blob drivers/net/acenic.c
-clean_kconfig drivers/net/Kconfig 'ACENIC'
-clean_mk CONFIG_ACENIC drivers/net/Makefile
+reject_firmware drivers/net/ethernet/alteon/acenic.c
+clean_blob drivers/net/ethernet/alteon/acenic.c
+clean_kconfig drivers/net/ethernet/alteon/Kconfig 'ACENIC'
+clean_mk CONFIG_ACENIC drivers/net/ethernet/alteon/Makefile
announce ADAPTEC_STARFIRE - "Adaptec Starfire/DuraLAN support"
clean_fw firmware/adaptec/starfire_rx.bin.ihex firmware/adaptec/starfire_rx.bin
clean_fw firmware/adaptec/starfire_tx.bin.ihex firmware/adaptec/starfire_tx.bin
-reject_firmware drivers/net/starfire.c
-clean_blob drivers/net/starfire.c
-clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
-clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
+reject_firmware drivers/net/ethernet/adaptec/starfire.c
+clean_blob drivers/net/ethernet/adaptec/starfire.c
+clean_kconfig drivers/net/ethernet/adaptec/Kconfig 'ADAPTEC_STARFIRE'
+clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/ethernet/adaptec/Makefile
announce BNA - "Brocade 1010/1020 10Gb Ethernet Driver support"
-clean_blob drivers/net/bna/bnad.c
-clean_blob drivers/net/bna/cna.h
-reject_firmware drivers/net/bna/cna_fwimg.c
-clean_kconfig drivers/net/Kconfig 'BNA'
-clean_mk CONFIG_BNA drivers/net/bna/Makefile
+clean_blob drivers/net/ethernet/brocade/bna/bnad.c
+clean_blob drivers/net/ethernet/brocade/bna/cna.h
+reject_firmware drivers/net/ethernet/brocade/bna/cna_fwimg.c
+clean_kconfig drivers/net/ethernet/brocade/bna/Kconfig 'BNA'
+clean_mk CONFIG_BNA drivers/net/ethernet/brocade/bna/Makefile
announce BNX2 - "Broadcom NetXtremeII"
drop_fw_file firmware/bnx2/bnx2-mips-09-6.2.1a.fw.ihex firmware/bnx2/bnx2-mips-09-6.2.1a.fw
@@ -1076,35 +1103,35 @@ drop_fw_file firmware/bnx2/bnx2-rv2p-09-6.0.17.fw.ihex firmware/bnx2/bnx2-rv2p-0
drop_fw_file firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw.ihex firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw
drop_fw_file firmware/bnx2/bnx2-mips-06-6.2.1.fw.ihex firmware/bnx2/bnx2-mips-06-6.2.1.fw
drop_fw_file firmware/bnx2/bnx2-rv2p-06-6.0.15.fw.ihex firmware/bnx2/bnx2-rv2p-06-6.0.15.fw
-reject_firmware drivers/net/bnx2.c
-clean_blob drivers/net/bnx2.c
-clean_kconfig drivers/net/Kconfig 'BNX2'
-clean_mk CONFIG_BNX2 drivers/net/Makefile
+reject_firmware drivers/net/ethernet/broadcom/bnx2.c
+clean_blob drivers/net/ethernet/broadcom/bnx2.c
+clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'BNX2'
+clean_mk CONFIG_BNX2 drivers/net/ethernet/broadcom/Makefile
announce BNX2X - "Broadcom NetXtremeII 10Gb support"
drop_fw_file firmware/bnx2x/bnx2x-e1-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e1-6.2.9.0.fw
drop_fw_file firmware/bnx2x/bnx2x-e1h-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e1h-6.2.9.0.fw
drop_fw_file firmware/bnx2x/bnx2x-e2-6.2.9.0.fw.ihex firmware/bnx2x/bnx2x-e2-6.2.9.0.fw
-reject_firmware drivers/net/bnx2x/bnx2x_main.c
+reject_firmware drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
clean_sed '
/^#include "bnx2x_init\.h"/,/^$/{
/^$/i\
#define bnx2x_init_block(bp, start, end) \\\
return (printk(KERN_ERR "%s: Missing Free firmware\\n", bp->dev->name),\\\
-EINVAL)
-}' drivers/net/bnx2x/bnx2x_main.c 'report missing Free firmware'
-clean_blob drivers/net/bnx2x/bnx2x_main.c
-clean_blob drivers/net/bnx2x/bnx2x_hsi.h
-clean_blob drivers/net/bnx2x/bnx2x_init_ops.h
-clean_kconfig drivers/net/Kconfig 'BNX2X'
-clean_mk CONFIG_BNX2X drivers/net/Makefile
+}' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 'report missing Free firmware'
+clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
+clean_blob drivers/net/ethernet/broadcom/bnx2x/bnx2x_init_ops.h
+clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'BNX2X'
+clean_mk CONFIG_BNX2X drivers/net/ethernet/broadcom/bnx2x/Makefile
announce CASSINI - "Sun Cassini"
drop_fw_file firmware/sun/cassini.bin.ihex firmware/sun/cassini.bin
-reject_firmware drivers/net/cassini.c
-clean_blob drivers/net/cassini.c
-clean_kconfig drivers/net/Kconfig 'CASSINI'
-clean_mk CONFIG_CASSINI drivers/net/Makefile
+reject_firmware drivers/net/ethernet/sun/cassini.c
+clean_blob drivers/net/ethernet/sun/cassini.c
+clean_kconfig drivers/net/ethernet/sun/Kconfig 'CASSINI'
+clean_mk CONFIG_CASSINI drivers/net/ethernet/sun/Makefile
announce CHELSIO_T3 - "Chelsio AEL 2005 support"
drop_fw_file firmware/cxgb3/t3b_psram-1.1.0.bin.ihex firmware/cxgb3/t3b_psram-1.1.0.bin
@@ -1113,29 +1140,29 @@ drop_fw_file firmware/cxgb3/t3fw-7.10.0.bin.ihex firmware/cxgb3/t3fw-7.10.0.bin
drop_fw_file firmware/cxgb3/ael2005_opt_edc.bin.ihex firmware/cxgb3/ael2005_opt_edc.bin
drop_fw_file firmware/cxgb3/ael2005_twx_edc.bin.ihex firmware/cxgb3/ael2005_twx_edc.bin
drop_fw_file firmware/cxgb3/ael2020_twx_edc.bin.ihex firmware/cxgb3/ael2020_twx_edc.bin
-reject_firmware drivers/net/cxgb3/cxgb3_main.c
-clean_blob drivers/net/cxgb3/cxgb3_main.c
-clean_kconfig drivers/net/Kconfig 'CHELSIO_T3'
-clean_mk CONFIG_CHELSIO_T3 drivers/net/cxgb3/Makefile
+reject_firmware drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+clean_blob drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+clean_kconfig drivers/net/ethernet/chelsio/Kconfig 'CHELSIO_T3'
+clean_mk CONFIG_CHELSIO_T3 drivers/net/ethernet/chelsio/cxgb3/Makefile
announce CHELSIO_T4 - "Chelsio Communications T4 Ethernet support"
-reject_firmware drivers/net/cxgb4/cxgb4_main.c
-clean_blob drivers/net/cxgb4/cxgb4_main.c
-clean_kconfig drivers/net/Kconfig 'CHELSIO_T4'
-clean_mk CONFIG_CHELSIO_T4 drivers/net/cxgb4/Makefile
+reject_firmware drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+clean_blob drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+clean_kconfig drivers/net/ethernet/chelsio/Kconfig 'CHELSIO_T4'
+clean_mk CONFIG_CHELSIO_T4 drivers/net/ethernet/chelsio/cxgb4/Makefile
announce E100 - "Intel PRO/100+"
drop_fw_file firmware/e100/d101m_ucode.bin.ihex firmware/e100/d101m_ucode.bin
drop_fw_file firmware/e100/d101s_ucode.bin.ihex firmware/e100/d101s_ucode.bin
drop_fw_file firmware/e100/d102e_ucode.bin.ihex firmware/e100/d102e_ucode.bin
-reject_firmware drivers/net/e100.c
+reject_firmware drivers/net/ethernet/intel/e100.c
clean_sed '
/^static const struct firmware \*e100_\(reject\|request\)_firmware(/,/^}$/{
s:^\(.*\)return ERR_PTR(err);$:\1netif_err(nic, probe, nic->netdev, "Proceeding without firmware\\n");\n\1return NULL;:
-}' drivers/net/e100.c 'proceed without firmware'
-clean_blob drivers/net/e100.c
-clean_kconfig drivers/net/Kconfig 'E100'
-clean_mk CONFIG_E100 drivers/net/Makefile
+}' drivers/net/ethernet/intel/e100.c 'proceed without firmware'
+clean_blob drivers/net/ethernet/intel/e100.c
+clean_kconfig drivers/net/ethernet/intel/Kconfig 'E100'
+clean_mk CONFIG_E100 drivers/net/ethernet/intel/Makefile
announce FT1000_PCMCIA - "Driver for ft1000 pcmcia device."
clean_file drivers/staging/ft1000/ft1000-pcmcia/ft1000.img
@@ -1164,34 +1191,34 @@ announce MYRI_SBUS - "MyriCOM Gigabit Ethernet"
drop_fw_file firmware/myricom/lanai.bin.ihex firmware/myricom/lanai.bin
announce MYRI10GE - "Myricom Myri-10G Ethernet support"
-reject_firmware drivers/net/myri10ge/myri10ge.c
-clean_blob drivers/net/myri10ge/myri10ge.c
-clean_kconfig drivers/net/Kconfig 'MYRI10GE'
-clean_mk CONFIG_MYRI10GE drivers/net/myri10ge/Makefile
+reject_firmware drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+clean_blob drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+clean_kconfig drivers/net/ethernet/myricom/Kconfig 'MYRI10GE'
+clean_mk CONFIG_MYRI10GE drivers/net/ethernet/myricom/myri10ge/Makefile
announce NETXEN_NIC - "NetXen Multi port (1/10) Gigabit Ethernet NIC"
-reject_firmware drivers/net/netxen/netxen_nic.h
-reject_firmware drivers/net/netxen/netxen_nic_main.c
-reject_firmware drivers/net/netxen/netxen_nic_init.c
-clean_blob drivers/net/netxen/netxen_nic.h
-clean_blob drivers/net/netxen/netxen_nic_main.c
-clean_kconfig drivers/net/Kconfig 'NETXEN_NIC'
-clean_mk CONFIG_NETXEN_NIC drivers/net/Makefile
+reject_firmware drivers/net/ethernet/qlogic/netxen/netxen_nic.h
+reject_firmware drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+reject_firmware drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
+clean_blob drivers/net/ethernet/qlogic/netxen/netxen_nic.h
+clean_blob drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+clean_kconfig drivers/net/ethernet/qlogic/Kconfig 'NETXEN_NIC'
+clean_mk CONFIG_NETXEN_NIC drivers/net/ethernet/qlogic/Makefile
announce QLCNIC - "QLOGIC QLCNIC 1/10Gb Converged Ethernet NIC Support"
-reject_firmware drivers/net/qlcnic/qlcnic.h
-reject_firmware drivers/net/qlcnic/qlcnic_init.c
-reject_firmware drivers/net/qlcnic/qlcnic_main.c
-clean_blob drivers/net/qlcnic/qlcnic.h
-clean_blob drivers/net/qlcnic/qlcnic_main.c
-clean_kconfig drivers/net/Kconfig 'QLCNIC'
-clean_mk CONFIG_QLCNIC drivers/net/qlcnic/Makefile
+reject_firmware drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+reject_firmware drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+reject_firmware drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+clean_blob drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+clean_blob drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+clean_kconfig drivers/net/ethernet/qlogic/Kconfig 'QLCNIC'
+clean_mk CONFIG_QLCNIC drivers/net/ethernet/qlogic/qlcnic/Makefile
announce R8169 - "Realtek 8169 gigabit ethernet support"
-reject_firmware drivers/net/r8169.c
-clean_blob drivers/net/r8169.c
-clean_kconfig drivers/net/Kconfig R8169
-clean_mk CONFIG_R8169 drivers/net/Makefile
+reject_firmware drivers/net/ethernet/realtek/r8169.c
+clean_blob drivers/net/ethernet/realtek/r8169.c
+clean_kconfig drivers/net/ethernet/realtek/Kconfig R8169
+clean_mk CONFIG_R8169 drivers/net/ethernet/realtek/Makefile
announce SLICOSS - "Alacritech Gigabit IS-NIC cards"
reject_firmware drivers/staging/slicoss/slicoss.c
@@ -1200,42 +1227,42 @@ clean_kconfig drivers/staging/slicoss/Kconfig 'SLICOSS'
clean_mk CONFIG_SLICOSS drivers/staging/slicoss/Makefile
announce SPIDER_NET - "Spider Gigabit Ethernet driver"
-reject_firmware drivers/net/spider_net.c
+reject_firmware drivers/net/ethernet/toshiba/spider_net.c
clean_sed 's,spider_fw\.bin,DEBLOBBED.bin,g' \
- drivers/net/spider_net.c 'removed non-Free firmware notes'
-clean_blob drivers/net/spider_net.c
-clean_blob drivers/net/spider_net.h
-clean_kconfig drivers/net/Kconfig 'SPIDER_NET'
-clean_mk CONFIG_SPIDER_NET drivers/net/Makefile
+ drivers/net/ethernet/toshiba/spider_net.c 'removed non-Free firmware notes'
+clean_blob drivers/net/ethernet/toshiba/spider_net.c
+clean_blob drivers/net/ethernet/toshiba/spider_net.h
+clean_kconfig drivers/net/ethernet/toshiba/Kconfig 'SPIDER_NET'
+clean_mk CONFIG_SPIDER_NET drivers/net/ethernet/toshiba/Makefile
announce TEHUTI - "Tehuti Networks 10G Ethernet"
drop_fw_file firmware/tehuti/bdx.bin.ihex firmware/tehuti/bdx.bin
-reject_firmware drivers/net/tehuti.c
-clean_blob drivers/net/tehuti.c
-clean_kconfig drivers/net/Kconfig 'TEHUTI'
-clean_mk CONFIG_TEHUTI drivers/net/Makefile
+reject_firmware drivers/net/ethernet/tehuti/tehuti.c
+clean_blob drivers/net/ethernet/tehuti/tehuti.c
+clean_kconfig drivers/net/ethernet/tehuti/Kconfig 'TEHUTI'
+clean_mk CONFIG_TEHUTI drivers/net/ethernet/tehuti/Makefile
announce TIGON3 - "Broadcom Tigon3"
drop_fw_file firmware/tigon/tg3.bin.ihex firmware/tigon/tg3.bin
drop_fw_file firmware/tigon/tg3_tso.bin.ihex firmware/tigon/tg3_tso.bin
drop_fw_file firmware/tigon/tg3_tso5.bin.ihex firmware/tigon/tg3_tso5.bin
-reject_firmware drivers/net/tg3.c
-clean_blob drivers/net/tg3.c
-clean_kconfig drivers/net/Kconfig 'TIGON3'
-clean_mk CONFIG_TIGON3 drivers/net/Makefile
+reject_firmware drivers/net/ethernet/broadcom/tg3.c
+clean_blob drivers/net/ethernet/broadcom/tg3.c
+clean_kconfig drivers/net/ethernet/broadcom/Kconfig 'TIGON3'
+clean_mk CONFIG_TIGON3 drivers/net/ethernet/broadcom/Makefile
announce TYPHOON - "3cr990 series Typhoon"
drop_fw_file firmware/3com/typhoon.bin.ihex firmware/3com/typhoon.bin
-reject_firmware drivers/net/typhoon.c
-clean_blob drivers/net/typhoon.c
-clean_kconfig drivers/net/Kconfig 'TYPHOON'
-clean_mk CONFIG_TYPHOON drivers/net/Makefile
+reject_firmware drivers/net/ethernet/3com/typhoon.c
+clean_blob drivers/net/ethernet/3com/typhoon.c
+clean_kconfig drivers/net/ethernet/3com/Kconfig 'TYPHOON'
+clean_mk CONFIG_TYPHOON drivers/net/ethernet/3com/Makefile
announce VXGE - "Exar X3100 Series 10GbE PCIe Server Adapter"
-reject_firmware drivers/net/vxge/vxge-main.c
-clean_blob drivers/net/vxge/vxge-main.c
-clean_kconfig drivers/net/Kconfig 'VXGE'
-clean_mk CONFIG_VXGE drivers/net/vxge/Makefile
+reject_firmware drivers/net/ethernet/neterion/vxge/vxge-main.c
+clean_blob drivers/net/ethernet/neterion/vxge/vxge-main.c
+clean_kconfig drivers/net/ethernet/neterion/Kconfig 'VXGE'
+clean_mk CONFIG_VXGE drivers/net/ethernet/neterion/vxge/Makefile
# appletalk
@@ -1272,14 +1299,16 @@ clean_blob drivers/net/irda/irda-usb.c
clean_kconfig drivers/net/irda/Kconfig 'USB_IRDA'
clean_mk CONFIG_USB_IRDA drivers/net/irda/Makefile
-# pcmcia
+# smsc
announce PCMCIA_SMC91C92 - "SMC 91Cxx PCMCIA"
drop_fw_file firmware/ositech/Xilinx7OD.bin.ihex firmware/ositech/Xilinx7OD.bin
-reject_firmware drivers/net/pcmcia/smc91c92_cs.c
-clean_blob drivers/net/pcmcia/smc91c92_cs.c
-clean_kconfig drivers/net/pcmcia/Kconfig 'PCMCIA_SMC91C92'
-clean_mk CONFIG_PCMCIA_SMC91C92 drivers/net/pcmcia/Makefile
+reject_firmware drivers/net/ethernet/smsc/smc91c92_cs.c
+clean_blob drivers/net/ethernet/smsc/smc91c92_cs.c
+clean_kconfig drivers/net/ethernet/smsc/Kconfig 'PCMCIA_SMC91C92'
+clean_mk CONFIG_PCMCIA_SMC91C92 drivers/net/ethernet/smsc/Makefile
+
+# pcmcia
# CIS files are not software.
# announce PCCARD - "PCCard (PCMCIA/CardBus) support"
@@ -1386,17 +1415,17 @@ clean_kconfig drivers/net/wireless/b43legacy/Kconfig 'B43LEGACY'
clean_mk CONFIG_B43LEGACY drivers/net/wireless/b43legacy/Makefile
announce BRCMSMAC - "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver"
-reject_firmware drivers/staging/brcm80211/brcmsmac/mac80211_if.c
-clean_blob drivers/staging/brcm80211/brcmsmac/mac80211_if.c
-clean_kconfig drivers/staging/brcm80211/Kconfig 'BRCMSMAC'
-clean_mk CONFIG_BRCMSMAC drivers/staging/brcm80211/Makefile
+reject_firmware drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+clean_blob drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMSMAC'
+clean_mk CONFIG_BRCMSMAC drivers/net/wireless/brcm80211/Makefile
announce BRCMFMAC - "Broadcom IEEE802.11n embedded FullMAC WLAN driver"
-reject_firmware drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
-clean_blob drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
-clean_blob drivers/staging/brcm80211/brcmfmac/bcmchip.h
-clean_kconfig drivers/staging/brcm80211/Kconfig 'BRCMFMAC'
-clean_mk CONFIG_BRCMFMAC drivers/staging/brcm80211/Makefile
+reject_firmware drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+clean_blob drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+clean_blob drivers/net/wireless/brcm80211/brcmfmac/bcmchip.h
+clean_kconfig drivers/net/wireless/brcm80211/Kconfig 'BRCMFMAC'
+clean_mk CONFIG_BRCMFMAC drivers/net/wireless/brcm80211/Makefile
announce HERMES - "Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)"
reject_firmware drivers/net/wireless/orinoco/fw.c
@@ -1453,15 +1482,15 @@ clean_blob drivers/net/wireless/iwlegacy/iwl-3945.h
clean_kconfig drivers/net/wireless/iwlegacy/Kconfig 'IWL3945'
clean_mk CONFIG_IWL3945 drivers/net/wireless/iwlegacy/Makefile
-announce IWLAGN - "Intel Wireless WiFi Next Gen AGN"
+announce IWLWIFI - "Intel Wireless WiFi Next Gen AGN"
reject_firmware drivers/net/wireless/iwlwifi/iwl-agn.c
clean_blob drivers/net/wireless/iwlwifi/iwl-agn.c
clean_blob drivers/net/wireless/iwlwifi/iwl-5000.c
clean_blob drivers/net/wireless/iwlwifi/iwl-6000.c
clean_blob drivers/net/wireless/iwlwifi/iwl-1000.c
clean_blob drivers/net/wireless/iwlwifi/iwl-2000.c
-clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLAGN'
-clean_mk CONFIG_IWLAGN drivers/net/wireless/iwlwifi/Makefile
+clean_kconfig drivers/net/wireless/iwlwifi/Kconfig 'IWLWIFI'
+clean_mk CONFIG_IWLWIFI drivers/net/wireless/iwlwifi/Makefile
announce IWL4965 - "Intel Wireless WiFi 4965AGN"
reject_firmware drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -1533,25 +1562,37 @@ clean_blob drivers/net/wireless/libertas_tf/if_usb.c
clean_kconfig drivers/net/wireless/Kconfig 'LIBERTAS_THINFIRM_USB'
clean_mk CONFIG_LIBERTAS_THINFIRM_USB drivers/net/wireless/libertas_tf/Makefile
-announce MWIFIEX_SDIO - "Marvell WiFi-Ex Driver"
+announce MWIFIEX - "Marvell WiFi-Ex Driver"
clean_blob drivers/net/wireless/mwifiex/README
reject_firmware drivers/net/wireless/mwifiex/main.c
+clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX'
+clean_mk CONFIG_MWIFIEX drivers/net/wireless/mwifiex/Makefile
+
+announce MWIFIEX_SDIO - "Marvell WiFi-Ex Driver for SD8787"
clean_blob drivers/net/wireless/mwifiex/sdio.h
clean_blob drivers/net/wireless/mwifiex/sdio.c
clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX_SDIO'
clean_mk CONFIG_MWIFIEX_SDIO drivers/net/wireless/mwifiex/Makefile
+announce MWIFIEX_PCIE - "Marvell WiFi-Ex Driver for PCI 8766"
+clean_blob drivers/net/wireless/mwifiex/pcie.h
+clean_blob drivers/net/wireless/mwifiex/pcie.c
+clean_kconfig drivers/net/wireless/mwifiex/Kconfig 'MWIFIEX_PCIE'
+clean_mk CONFIG_MWIFIEX_PCIE drivers/net/wireless/mwifiex/Makefile
+
announce MWL8K - "Marvell 88W8xxx PCI/PCIe Wireless support"
reject_firmware drivers/net/wireless/mwl8k.c
clean_blob drivers/net/wireless/mwl8k.c
clean_kconfig drivers/net/wireless/Kconfig 'MWL8K'
clean_mk CONFIG_MWL8K drivers/net/wireless/Makefile
-announce ATH6K_LEGACY - "Atheros AR6003 support (non mac80211)"
-reject_firmware drivers/staging/ath6kl/os/linux/include/osapi_linux.h
-clean_blob drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
-clean_kconfig drivers/staging/ath6kl/Kconfig 'ATH6K_LEGACY'
-clean_mk CONFIG_ATH6K_LEGACY drivers/staging/ath6kl/Makefile
+announce ATH6KL - "Atheros ath6kl support"
+reject_firmware drivers/net/wireless/ath/ath6kl/init.c
+clean_blob drivers/net/wireless/ath/ath6kl/init.c
+clean_blob drivers/net/wireless/ath/ath6kl/core.h
+clean_blob drivers/net/wireless/ath/ath6kl/sdio.c
+clean_kconfig drivers/net/wireless/ath/ath6kl/Kconfig 'ATH6KL'
+clean_mk CONFIG_ATH6KL drivers/net/wireless/ath/ath6kl/Makefile
announce ATH9K_HTC - "Atheros HTC based wireless cards support"
reject_firmware drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1648,8 +1689,9 @@ clean_kconfig drivers/net/wireless/rtlwifi/Kconfig RTL8192SE
clean_mk CONFIG_RTL8192SE drivers/net/wireless/rtlwifi/rtl8192se/Makefile
announce RTL8192E - "RealTek RTL8192E Wireless LAN NIC driver"
-reject_firmware drivers/staging/rtl8192e/r819xE_firmware.c
-clean_blob drivers/staging/rtl8192e/r819xE_firmware.c
+reject_firmware drivers/staging/rtl8192e/r8192E_firmware.c
+clean_blob drivers/staging/rtl8192e/r8192E_firmware.c
+clean_blob drivers/staging/rtl8192e/r8192E_hwimg.c
clean_kconfig drivers/staging/rtl8192e/Kconfig RTL8192E
clean_mk CONFIG_RTL8192E drivers/staging/rtl8192e/Makefile
@@ -1766,8 +1808,8 @@ clean_blob drivers/staging/bcm/Macros.h
# the firmware proper.
clean_sed '
/^static \(inline \)\?struct file \*open_firmware_file/,/^}$/ {
- /oldfs=get_fs();/i\
- return /*(DEBLOBBED)*/ NULL;
+ /oldfs *= *get_fs();/i\
+ return /*(DEBLOBBED)*/ NULL;
}' drivers/staging/bcm/Misc.c 'disabled non-Free firmware loading machinery'
clean_kconfig drivers/staging/bcm/Kconfig 'BCM_WIMAX'
clean_mk CONFIG_BCM_WIMAX drivers/staging/bcm/Makefile
@@ -1860,10 +1902,10 @@ clean_kconfig drivers/input/touchscreen/Kconfig 'TOUCHSCREEN_ATMEL_MXT'
clean_mk CONFIG_TOUCHSCREEN_ATMEL_MXT drivers/input/touchscreen/Makefile
announce LIRC_ZILOG - "Zilog/Hauppauge IR Transmitter"
-reject_firmware drivers/staging/lirc/lirc_zilog.c
-clean_blob drivers/staging/lirc/lirc_zilog.c
-clean_kconfig drivers/staging/lirc/Kconfig 'LIRC_ZILOG'
-clean_mk CONFIG_LIRC_ZILOG drivers/staging/lirc/Makefile
+reject_firmware drivers/staging/media/lirc/lirc_zilog.c
+clean_blob drivers/staging/media/lirc/lirc_zilog.c
+clean_kconfig drivers/staging/media/lirc/Kconfig 'LIRC_ZILOG'
+clean_mk CONFIG_LIRC_ZILOG drivers/staging/media/lirc/Makefile
####################
# Data acquisition #
@@ -1887,6 +1929,12 @@ clean_blob drivers/staging/comedi/drivers/usbduxfast.c
clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXFAST'
clean_mk CONFIG_COMEDI_USBDUXFAST drivers/staging/comedi/drivers/Makefile
+announce COMEDI_USBDUXSIGMA - "ITL USB-DUXsigma support"
+reject_firmware drivers/staging/comedi/drivers/usbduxsigma.c
+clean_blob drivers/staging/comedi/drivers/usbduxsigma.c
+clean_kconfig drivers/staging/comedi/Kconfig 'COMEDI_USBDUXSIGMA'
+clean_mk CONFIG_COMEDI_USBDUXSIGMA drivers/staging/comedi/drivers/Makefile
+
#######
# MMC #
@@ -2456,7 +2504,6 @@ clean_mk 'CONFIG_SND_USB_6FIRE' sound/usb/6fire/Makefile
announce Documentation - "non-Free firmware scripts and documentation"
clean_blob Documentation/dvb/avermedia.txt
clean_blob Documentation/dvb/opera-firmware.txt
-clean_blob Documentation/dvb/ttusb-dec.txt
clean_blob Documentation/sound/alsa/ALSA-Configuration.txt
clean_blob Documentation/sound/oss/MultiSound
clean_blob Documentation/sound/oss/PSS
diff --git a/freed-ora/current/master/deblob-check b/freed-ora/current/master/deblob-check
index 9da954f55..f532ae25f 100755
--- a/freed-ora/current/master/deblob-check
+++ b/freed-ora/current/master/deblob-check
@@ -1,13 +1,13 @@
#! /bin/sh
-# deblob-check version 2011-10-24
+# deblob-check version 2012-01-05
# Inspired in gNewSense's find-firmware script.
# Written by Alexandre Oliva <lxoliva@fsfla.org>
# Check http://www.fsfla.org/svn/fsfla/software/linux-libre for newer
# versions.
-# Copyright 2008, 2009, 2010, 2011 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright 2008, 2009, 2010, 2011, 2012 Alexandre Oliva <lxoliva@fsfla.org>
#
# 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
@@ -1651,7 +1651,9 @@ set_except () {
blobname 'dvb-ttusb-dec-\(2000t\|2540t\|3000s\)\.fw' drivers/media/dvb/ttusb-dec/ttusb_dec.c
- blobname 'hcwamc\.rfb' drivers/media/video/bt8xx/bttv-cards.c
+ blob 'For[ ]the[ ]WinTV[/]PVR[^:]*firmware[^:]*:[\n]hcwamc\.rbf[^\n]*\([\n][^\n][^\n]*\)*' Documentation/video4linux/bttv/README
+ blobname 'hcwamc\.rbf' drivers/media/video/bt8xx/bttv-cards.c
+ blobna 'The[ ]hcwamc\.rbf[ ]firmware[ ]file[^*]*\([*]\+[^/*][^*]*\)*[*]\+[/]' drivers/media/video/bt8xx/bttv-cards.c
blobname 'v4l-cx23418-dig\.fw' drivers/media/video/cx18/cx18-av-firmware.c
blobname 'v4l-cx23418-[ac]pu\.fw' drivers/media/video/cx18/cx18-firwmare.c
@@ -2243,7 +2245,7 @@ set_except () {
blob 'static[ ]struct[ ]phy_ucode[ ]PhyUcode\[\][ ]=[^;]*[;]' drivers/staging/sxg/sxgphycode-1.2.h
accept 'device[ ]drivers[ ]which[ ]predate[ ]the[ ]common[ ]use[ ]of[ ]request_firmware[(][)]' firmware/README.AddingFirmware
accept 'As[ ]we[ ]update[ ]those[ ]drivers[ ]to[ ]use[ ]request_firmware[(][)]' firmware/README.AddingFirmware
- blob 'This[ ]directory[ ]is[ ]_NOT_[ ]for[ ]adding[ ]arbitrary[ ]new[ ]firmware[ ]images.*git[ ]pull[ ]request[ ]to:[\n][^\n]*infradead\.org>' firmware/README.AddingFirmware
+ blob 'This[ ]directory[ ]is[ ]_NOT_[ ]for[ ]adding[ ]arbitrary[ ]new[ ]firmware[ ]images.*git[ ]pull[ ]request[ ]to:[\n][^\n]*\(infradead\.org\|decadent\.org\.uk\)>' firmware/README.AddingFirmware
blobna 'linux-firmware\.git' firmware/README.AddingFirmware
blobname '\(ea[/]\)\?\(loader\|indigo_djx\)_dsp\.fw' sound/pci/echoaudio/indigodjx.c
blobname '\(ea[/]\)\?\(loader\|indigo_iox\)_dsp\.fw' sound/pci/echoaudio/indigoiox.c
@@ -2363,7 +2365,7 @@ set_except () {
defsnc 'int[ ]wm831x_isinkv_values\[WM831X_ISINK_MAX_ISEL[ ][+][ ][1]\][ ]=' drivers/mfd/wm831x-core.c
defsnc 'static[ ]struct[ ]nand_ecclayout[ ]hwecc4_2048[ ]__initconst[ ]=' drivers/mtd/nand/davinci_nand.c
defsnc 'static[ ]const[ ]u16[ ]wm8974_reg\[WM8974_CACHEREGNUM\][ ]=' sound/soc/codecs/wm8974.c
- defsnc 'static[ ]const[ ]u16[ ]ak4642_reg\[AK4642_CACHEREGNUM\][ ]=' sound/soc/codecs/ak4642.c
+ defsnc 'static[ ]const[ ]u\(8\|16\)[ ]ak4642_reg\[AK4642_CACHEREGNUM\][ ]=' sound/soc/codecs/ak4642.c
accept 'int[ ]snd_hda_load_patch[(][^\n;{]*[)][ \n][{][^\n]*\([\n]\+[^\n}][^\n]*\)*hda_codec[^\n]*\([\n]\+[^\n}][^\n]*\)*request_firmware[^\n]*\([\n]\+[^\n}][^\n]*\)*[\n]\+[}]' sound/pci/hda/hda_hwdep.c
accept '[ ][ ][ ]Bit[ 0-7]*' Documentation/input/sentelic.txt
accept 'The[ ]hd-audio[ ]driver[ ]reads[ ]the[ ]file[ ]via[ ]request_firmware[(][)]\.' Documentation/sound/alsa/HD-Audio.txt
@@ -2602,64 +2604,64 @@ set_except () {
defsnc 'static[ ]DDR_SET_NODE[ ]asT3\(LP\)\?B\?_DDRSetting\(80\|100\|133\|160\)MHz\[\][ ]\?=' drivers/staging/bcm/DDRInit.c
blobname '\([/]lib[/]firmware[/]\)\?macxvi200\.bin' drivers/staging/bcm/Macros.h
accept '-[ ]On-chip[ ]firmware[ ]loaded[ ]using[ ]standard[ ]request_firmware[(][)]' 'drivers/staging/brcm80211\(/brcmfmac\)\?/README'
- blobname 'brcm[/]bcm43xx\(_hdr\)\?-0[-0-9]*\.fw' drivers/staging/brcm80211/README
- blobname 'brcm[/]bcm4329-fullmac-4[-0-9]*\.\(bin\|txt\)' drivers/staging/brcm80211/brcmfmac/README
+ blobname 'brcm[/]bcm43xx\(_hdr\)\?-0[-0-9]*\.fw' 'drivers/\(staging\|net/wireless\)/brcm80211/README'
+ blobname 'brcm[/]bcm4329-fullmac-4[-0-9]*\.\(bin\|txt\)' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmfmac/README'
blob 'Firmware[ ]installation[\n]=\+\([\n]\+[^\n=][^\n]*\)\+\([/]lib[/]firmware[/]brcm\|\.fw\)[^\n]*\([\n][^\n=][^\n]*\)*\([\n][\n][^=\n][^\n]*[\n][^=\n][^\n]*\([\n][^\n=][^\n]*\)*\)*' 'drivers/staging/brcm80211\(/brcmfmac\)\?/README'
- defsnc '[ ]u16[ ]nrate_list\[4\]\[8\][ ]=' drivers/staging/brcm80211/brcmfmac/wl_iw.c
- defsnc 'static[ ]chan_info_basic_t[ ]chan_info_all\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_cmn.c
- defsnc 'u16[ ]ltrn_list\[PHY_LTRN_LIST_LEN\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_cmn\.c\|brcmsmac/phy/phy_cmn\.c\)'
- defsnc 's8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_cmn\.c\|brcmsmac/phy/phy_cmn\.c\)'
- defsnc 'lcnphy_rx_iqcomp_t[ ]lcnphy_rx_iqcomp_table_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'static[ ]const[ ]u32[ ]lcnphy_23bitgaincode_table\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_table\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_index_offset_for_rssi\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'static[ ]chan_info_2064_lcnphy_t[ ]chan_info_2064_lcnphy\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'lcnphy_radio_regs_t[ ]lcnphy_radio_regs_2064\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 's8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'u16[ \n]*LCNPHY_txdigfiltcoeffs_\(cck\|ofdm\)\[LCNPHY_NUM_TX_DIG_FILTERS_\(CCK\|OFDM\)\][ \n]*\[LCNPHY_NUM_DIG_FILT_COEFFS[ ][+][ ]1\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
- defsnc 'nphy_ipa_txrxgain_t[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'radio_\(20xx_\)\?regs_t[ ]regs_\(SYN_\|[RT]X_\)\?205[5-7]\(_A1\|_rev\([4-8]\|11\)\(v1\)\?\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' 'drivers/staging/mrcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]u8[ ]pad_all_gain_codes_2057\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]u32[ ]nphy_papd_scaltbl\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc '[ ]s32[ ]poll_results\[8\]\[4\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc '[ ]nphy_txiqcal_ladder_t[ ]ladder_\(lo\|iq\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/stagingg/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' 'drivers/stagingg/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u16[ ]dot11lcn_\(unsup_mcs\|iq_local\)_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]lcnphy_tx_gain_tbl_entry[ ]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u32[ ]dot11lcn_papd_compdelta_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u32[ ]frame_struct_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u8[ ]frame_lut_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]\(tmap\|tdtrn\)_tbl_rev[037]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u16[ ]pilot_tbl_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]tdi_tbl[24]0_ant[01]_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]chanest_tbl_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u8[ ]mcs_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]noise_var_tbl[01]\?_rev[037]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u8[ ]\(est\|adj\)_pwr_lut_core[01]_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]\(gainctrl\|iq\)_lut_core[01]_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u16[ ]loft_lut_core[01]_rev[03]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u16[ ]ant_swctrl_tbl_rev3\(_[1-3]\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u16[ ]mcs_tbl_rev3\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u16[ ]papd_comp_rfpwr_tbl_core[01]_rev3\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- defsnc 'const[ ]u32[ ]papd_\(comp_epsilon\|cal_scalars\)_tbl_core[01]_rev[37]\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
- blobname 'brcm[/]bcm43xx' drivers/staging/brcm80211/sys/wl_mac80211.c
- blobname '%s\(_hdr\)\?-%d\.fw' drivers/staging/brcm80211/sys/wl_mac80211.c
- defsnc 'static[ ]const[ ]u8[ ]crc8_table\[256\][ ]=' 'drivers/staging/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
- defsnc 'static[ ]const[ ]u16[ ]crc16_table\[256\][ ]=' 'drivers/staging/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
- defsnc 'static[ ]const[ ]u32[ ]crc32_table\[256\][ ]=' 'drivers/staging/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
- defsnc 'static[ ]const[ ]pmu0_xtaltab0_t[ ]pmu0_xtaltab0\[\][ ]=' drivers/staging/brcm80211/util/hndpmu.c
- defsnc 'static[ ]const[ ]pmu1_xtaltab0_t[ ]pmu1_xtaltab0\(_880\(_4329\)\?\|_1760\|_1440\|_960\)\[\][ ]=' drivers/staging/brcm80211/util/hndpmu.c
- defsnc 'static[ ]const[ ]s16[ ]log_table\[\][ ]=' 'drivers/staging/brcm80211/\(util/qmath\.c\|brcmsmac/phy/phy_qmath\.c\)'
+ defsnc '[ ]u16[ ]nrate_list\[4\]\[8\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmfmac/wl_iw\.c'
+ defsnc 'static[ ]chan_info_basic_t[ ]chan_info_all\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/phy/wlc_phy_cmn\.c'
+ defsnc 'u16[ ]ltrn_list\[PHY_LTRN_LIST_LEN\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_cmn\.c\|brcmsmac/phy/phy_cmn\.c\)'
+ defsnc 's8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_cmn\.c\|brcmsmac/phy/phy_cmn\.c\)'
+ defsnc 'lcnphy_rx_iqcomp_t[ ]lcnphy_rx_iqcomp_table_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]const[ ]u32[ ]lcnphy_23bitgaincode_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_index_offset_for_rssi\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]chan_info_2064_lcnphy_t[ ]chan_info_2064_lcnphy\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'lcnphy_radio_regs_t[ ]lcnphy_radio_regs_2064\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc '\(static[ ]const[ ]\)\?s8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc '\(static[ ]const[ ]\)\?u16[ \n]*LCNPHY_txdigfiltcoeffs_\(cck\|ofdm\)\[LCNPHY_NUM_TX_DIG_FILTERS_\(CCK\|OFDM\)\][\n ]*\[LCNPHY_NUM_DIG_FILT_COEFFS[ ][+][ ]1\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc '\(static[ ]const[ ]\)\?nphy_ipa_txrxgain_t[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '\(static[ ]\)radio_\(20xx_\)\?regs_t[ ]regs_\(SYN_\|[RT]X_\)\?205[5-7]\(_A1\|_rev\([4-8]\|11\)\(v1\)\?\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u8[ ]pad_all_gain_codes_2057\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_papd_scaltbl\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '[ ]s32[ ]poll_results\[8\]\[4\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '[ ]nphy_txiqcal_ladder_t[ ]ladder_\(lo\|iq\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_\(unsup_mcs\|iq_local\)_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]lcnphy_tx_gain_tbl_entry[ ]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_papd_compdelta_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]frame_struct_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]frame_lut_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]\(tmap\|tdtrn\)_tbl_rev[037]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]pilot_tbl_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]tdi_tbl[24]0_ant[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]chanest_tbl_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]mcs_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]noise_var_tbl[01]\?_rev[037]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]\(est\|adj\)_pwr_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]\(gainctrl\|iq\)_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]loft_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]ant_swctrl_tbl_rev3\(_[1-3]\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]mcs_tbl_rev3\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]papd_comp_rfpwr_tbl_core[01]_rev3\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]papd_\(comp_epsilon\|cal_scalars\)_tbl_core[01]_rev[37]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ blobname 'brcm[/]bcm43xx' 'drivers/\(staging\|net/wireless\)/brcm80211/sys/wl_mac80211\.c'
+ blobname '%s\(_hdr\)\?-%d\.fw' 'drivers/\(staging\|net/wireless\)/brcm80211/sys/wl_mac80211\.c'
+ defsnc 'static[ ]const[ ]u8[ ]crc8_table\[256\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
+ defsnc 'static[ ]const[ ]u16[ ]crc16_table\[256\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
+ defsnc 'static[ ]const[ ]u32[ ]crc32_table\[256\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(util/bcmutils\.c\|brcmutil/utils\.c\)'
+ defsnc 'static[ ]const[ ]pmu0_xtaltab0_t[ ]pmu0_xtaltab0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/util/hndpmu\.c'
+ defsnc 'static[ ]const[ ]pmu1_xtaltab0_t[ ]pmu1_xtaltab0\(_880\(_4329\)\?\|_1760\|_1440\|_960\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/util/hndpmu\.c'
+ defsnc 'static[ ]const[ ]s16[ ]log_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(util/qmath\.c\|brcmsmac/phy/phy_qmath\.c\)'
blobname 'ft[12]000\.img' drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
blobname 'ft3000\.img' drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
defsnc '[ ][ ][ ][ ]u8[ ]ConnectionMsg\[\][ ]=' drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -2700,7 +2702,7 @@ set_except () {
defsnc 'static[ ]const[ ]int[ ]mc13892_sw1\?\[\][ ]=' drivers/regulator/mc13892-regulator.c
defsnc 'static[ ]const[ ]int[ ]dcdc[12]_voltages\[\][ ]=' drivers/regulator/tps6524x-regulator.c
defsnc '[ ]\(static[ ]const[ ]\)\?u8[ ]init_hash_seed\[\][ ]=' drivers/net/qlge/qlge_main.c
- blobname 'vxge[/]X3fw\(-pxe\)\.ncf' drivers/net/vxge/vxge-main.c
+ blobname 'vxge[/]X3fw\(-pxe\)\?\.ncf' drivers/net/vxge/vxge-main.c
defsnc '[ ][ ]\(static[ ]const[ ]\)\?int[ ]poly\[\]=' drivers/net/pcmcia/nmclan_cs.c
defsnc 'static[ ]\(const[ ]\)\?int[ ]fifo_map\[\]\[MAX_TX_FIFOS\][ ]=' drivers/net/s2io.h
defsnc 'static[ ]const[ ]struct[ ]efuse_map[ ]RTL8712_SDIO_EFUSE_TABLE\[\][ ]=' drivers/net/wireless/rtlwifi/efuse.c
@@ -2857,9 +2859,9 @@ set_except () {
blobname 'sdma-imx31-to[12]\.bin' arch/arm/mach-imx/mm-imx31.c
blobname 'sdma-imx35-to[12]\.bin' arch/arm/mach-imx/mm-imx35.c
blobname 'sdma-imx5[13]\.bin' arch/arm/mach-mx5/mm.c
- blobname 'brcm[/]bcm43xx' drivers/staging/brcm80211/brcmsmac/mac80211_if.c
- blobname '%s\(_hdr\)\?-%d\.fw' drivers/staging/brcm80211/brcmsmac/mac80211_if.c
- blobname 'brcm[/]bcm4329-fullmac-4\.\(bin\|txt\)' drivers/staging/brcm80211/brcmfmac/bcmchip.h
+ blobname 'brcm[/]bcm43xx' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/mac80211_if\.c'
+ blobname '%s\(_hdr\)\?-%d\.fw' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/mac80211_if\.c'
+ blobname 'brcm[/]bcm4329-fullmac-4\.\(bin\|txt\)' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmfmac/bcmchip\.h'
blobname 'mrvl[/]sd8787_uapsta\.bin' drivers/net/wireless/mwifiex/sdio.h
defsnc 'static[ ]int[ ]omap3_batt_table\[\][ ]=' arch/arm/mach-omap2/twl-common.c
defsnc '[ ]static[ ]u8[ ]InitRegs\[\][ ]=' drivers/media/dvb/frontends/tda18271c2dd.c
@@ -2881,19 +2883,18 @@ set_except () {
defsnc '[ ]u8[ ]channel_\(5g\|all\|info\)\[\(45\|59\)\][ ]=' drivers/net/wireless/rtlwifi/rtl8192de/phy.c
blobname 'rtlwifi[/]rtl8192defw[.]bin' drivers/net/wireless/rtlwifi/rtl8192de/sw.c
defsnc 'u32[ ]rtl8192de_\(phy_reg\|radio[ab]\|mac\|agctab\)_\(\(2t\(_int_pa\)\?\|[25]g\)\?array\|array_pg\)\[\(PHY_REG\|RADIO[AB]\|MAC\|AGCTAB\)_\(\(2T\(_INT_PA\)\?_\|[25]G_\)\?ARRAY\|ARRAY_PG_\)LENGTH\][ ]=' drivers/net/wireless/rtlwifi/rtl8192de/table.c
- defsnc 'static[ ]struct[ ]chan_info_basic[ ]chan_info_all\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c
- defsnc 'struct[ ]lcnphy_rx_iqcomp[ ]lcnphy_rx_iqcomp_table_rev0\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
- defsnc 'static[ ]struct[ ]chan_info_2064_lcnphy[ ]chan_info_2064_lcnphy\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
- defsnc 'struct[ ]lcnphy_radio_regs[ ]lcnphy_radio_regs_2064\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
- defsnc 'u16[]LCNPHY_txdigfiltcoeffs_\(cck\|ofdm\)\[LCNPHY_NUM_TX_DIG_FILTERS_\(CCK\|OFDM\)\][\n ]*\[LCNPHY_NUM_DIG_FILT_COEFFS[ ][+][ ]1\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c
- defsnc 'struct[ ]nphy_ipa_txrxgain[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'static[ ]struct[ ]chan_info_nphy_2055[ ]chan_info_nphy_2055\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'static[ ]struct[ ]chan_info_nphy_radio205x[ ]chan_info_nphyrev\(3_2056\|4_2056_A1\|5_2056v5\|6_2056v6\|5n6_2056v7\|6_2056v\(8\|11\)\)\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'static[ ]struct[ ]chan_info_nphy_radio2057[ ]chan_info_nphyrev\(7_2057_rev4\|8_2057_rev[78]\)\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'static[ ]struct[ ]chan_info_nphy_radio2057_rev5[ ]chan_info_nphyrev\(8_2057_rev5\|9_2057_rev5v1\)\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'struct[ ]radio_\(20xx_\)\?regs[ ]regs_\(2055\|\(SYN\|[TR]X\)_205\(6\(_A1\|_rev\([5678]\|11\)\)\?\)\|2057_rev\([4578]\|5v1\)\)\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc '[ ]struct[ ]nphy_txiqcal_ladder[ ]ladder_\(lo\|iq\)\[\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phy_n.c
- defsnc 'const[ ]struct[ ]lcnphy_tx_gain_tbl_entry[ \n]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' drivers/staging/brcm80211/brcmsmac/phy/phytbl_lcn.c
+ defsnc 'static[ ]\(const[ ]\)struct[ ]chan_info_basic[ ]chan_info_all\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_cmn\.c'
+ defsnc 'struct[ ]lcnphy_rx_iqcomp[ ]lcnphy_rx_iqcomp_table_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_2064_lcnphy[ ]chan_info_2064_lcnphy\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc '\(static[ ]const[ ]\)\?struct[ ]lcnphy_radio_regs[ ]lcnphy_radio_regs_2064\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc '\(static[ ]const[ ]\)\?struct[ ]nphy_ipa_txrxgain[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_2055[ ]chan_info_nphy_2055\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio205x[ ]chan_info_nphyrev\(3_2056\|4_2056_A1\|5_2056v5\|6_2056v6\|5n6_2056v7\|6_2056v\(8\|11\)\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio2057[ ]chan_info_nphyrev\(7_2057_rev4\|8_2057_rev[78]\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio2057_rev5[ \n]chan_info_nphyrev\(8_2057_rev5\|9_2057_rev5v1\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc '\(static[ ]\)\?\(const[ ]\)\?struct[ ]radio_\(20xx_\)\?regs[ \n]regs_\(2055\|\(SYN\|[TR]X\)_205\(6\(_A1\|_rev\([5678]\|11\)\)\?\)\|2057_rev\([4578]\|5v1\)\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc '[ ]struct[ ]nphy_txiqcal_ladder[ ]ladder_\(lo\|iq\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc '\(static[ ]\)\?const[ ]struct[ ]lcnphy_tx_gain_tbl_entry[ \n]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phytbl_lcn\.c'
defsnc 'static[ ]const[ ]unsigned[ ]char[ ]raw_edid\[\][ ]=' drivers/staging/gma500/mrst_hdmi.c
defsnc 'static[ ]const[ ]u8[ ]net2272_test_packet\[\][ ]=' drivers/usb/gadget/net2272.c
defsnc 'static[ ]const[ ]unsigned[ ]short[ ]seq_setting\[\][ ]=' drivers/video/backlight/ams369fg06.c
@@ -2916,12 +2917,122 @@ set_except () {
blobname 'c[bt]2\?fw\(_\(fc\|cna\)\)\?\.bin' drivers/scsi/bfa/bfad.c
blobname 'ene-ub6250[/]\(ms_\(init\|rdwr\)\|msp_rdwr\)\.bin' drivers/usb/storage/ene_ub6250.c
accept '[ ][ ]*dsp_code->pvt->firmware[ ]=[ ]' sound/pci/asihpi/hpidspcd.c
+ # New in 3.2
+ blobname 'ath6k[/]AR600[0-9.]*[/]hw[0-9.]*[/][^/"]*\.\(bin\|z77\)' drivers/net/wireless/ath/ath6kl/core.h
+ accept 'userspace[,][ ]using[ ]the[ ]request_firmware[(][)][ ]function' Documentation/power/suspend-and-cpuhotplug.txt
+ defsnc 'static[ ]struct[ ]sh_keysc_info[ ]keysc_platdata[ ]=[ ]' arch/arm/mach-shmobile/board-kota2.c
+ defsnc 'static[ ]const[ ]u32[ ]rir_offset\[MAX_RIR_RANGES\]\[MAX_RIR_WAY\][ ]=' drivers/edac/sb_edac.c
+ defsnc '[ ]struct[ ]tda10071_reg_val_mask[ ]tab2\[\][ ]=' drivers/media/dvb/frontends/tda10071.c
+ defsnc 'static[ ]const[ ]u8[ ]\(ov965x\|ov971x\)_init\[\]\[2\][ ]=' drivers/media/video/gspca/ov534_9.c
+ defsnc 'static[ ]const[ ]u8[ ]DQT\[17\]\[130\][ ]=' drivers/media/video/gspca/topro.c
+ defsnc 'static[ ]const[ ]struct[ ]cmd[ ]tp6810_late_start\[\][ ]=' drivers/media/video/gspca/topro.c
+ defsnc '[ ]static[ ]const[ ]struct[ ]cmd[ ]sensor_init\[\][ ]=' drivers/media/video/gspca/topro.c
+ defsnc '[ ]static[ ]const[ ]u8[ ]gamma_tb\[NGAMMA\]\[3\]\[1024\][ ]=' drivers/media/video/gspca/topro.c
+ defsnc 'static[ ]struct[ ]s5k6aa_regval[ ]s5k6aa_analog_config\[\][ ]=' drivers/media/video/s5k6aa.c
+ defsnc 'static[ ]const[ ]u32[ ]\(ar5416Modes\(_91[06]0\)\?\|ar9280Modes\(_\(backoff_[12]3db\|original\)_rxgain\|_\(high_power\|original\)_tx_gain\)\?_9280_2\|ar9285Modes\(\(_\(high_power\|original\)_tx_gain\)\?_9285_1_2\|_XE2_0_\(normal\|high\)_power\)\|ar9287Modes\(_[tr]x_gain\)\?_9287_1_1\|ar9271Modes\(_\(normal\|high\)_power_tx_gain\)\?_9271\(_ANI_reg\)\?\)\[\]\[5\][ ]=' 'drivers/net/wireless/ath/ath9k/ar\(5008\|9002\)_initvals\.h'
+ defsnc 'static[ ]const[ ]u32[ ]\(ar9\(462\|580\)_\([12]p0_\)\?\(\(baseband\|mac\|radio\)_core\(_emulation\)\?\|\(common_\)\?\(wo_xlna_\|mixed_\)\?rx_gain_table\(_ar9280\)\?\(_[12]p0\)*\)\|ar9200_ar9280_2p0_radio_core\(_1p0\)\?\)\[\]\[2\][ ]=' 'drivers/net/wireless/ath/ath9k/ar9\(462\|580\)_[12]p0_initvals\.h'
+ defsnc 'static[ ]const[ ]u32[ ]ar9\(462\|580\)_\([12]p0_\)\?\(\(tx_gain_table_\)\?\(baseband\|mac\|radio\)_postamble\(_emulation\)\?\|\(modes_\)\?\(high\|low\(est\)\?\|mixed\|green\)_\(ob_db\|power\)_tx_gain_table\(_[12]p0\)\?\)\[\]\[5\][ ]=' 'drivers/net/wireless/ath/ath9k/ar9\(462\|580\)_[12]p0_initvals\.h'
+ defsnc 'static[ ]const[ ]s32[ ]wmi_rate_tbl\[\]\[2\][ ]=' drivers/net/wireless/ath/ath6kl/wmi.c
+ defsnc '[ ]struct[ ]lcn_tx_iir_filter[ ]tx_iir_filters_\(cck\|ofdm\)\[\][ ]=' drivers/net/wireless/b43/phy_lcn.c
+ defsnc 'const[ ]u32[ ]b43_httab_0x1a_0xc0_late\[\][ ]=' drivers/net/wireless/b43/tables_phy_ht.c
+ defsnc 'static[ ]const[ ]u\(16\|32\)[ ]b43_lcntab_0x[01][0-9a-f]\[\][ ]=' drivers/net/wireless/b43/tables_phy_lcn.c
+ defsnc '[ ]b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0\[B43_LCNTAB_TX_GAIN_SIZE\][ ]=' drivers/net/wireless/b43/tables_phy_lcn.c
+ defsnc 'const[ ]u16[ ]b43_lcntab_sw_ctl_4313_epa_rev0\[\][ ]=' drivers/net/wireless/b43/tables_phy_lcn.c
+ defsnc 'static[ ]const[ ]u16[ ]VCORE_VSEL_table\[\][ ]=' drivers/regulator/tps65023-regulator.c
+ defsnc 'static[ ]struct[ ]channel_list[ ]ChannelPlan\[\][ ]=' drivers/staging/rtl8192e/dot11d.c
+ defsnc 'u32[ ]Rtl8192PciE\(PHY_REG_1T2R\|Radio[AB]_\|AGCTAB_\)Array\[\(PHY_REG_1T2R\|Radio[AB]_\|AGCTAB_\)ArrayLengthPciE\][ ]=' drivers/staging/rtl8192e/r8192E_hwimg.c
+ defsnc 'static[ ]u8[ ]CCKSwingTable_\(Ch1_Ch13\|Ch14\)\[CCK_Table_length\]\[8\][ ]=' drivers/staging/rtl8192e/rtl_dm.c
+ defsnc 'static[ ]const[ ]unsigned[ ]short[ ]XGINew_DDRDRAM_TYPE20\[12\]\[5\][ ]=' drivers/staging/xgifb/vb_init.c
+ defsnc 'static[ ]const[ ]unsigned[ ]short[ ]XGINew_\(MDA\|[CEV]GA\)_DAC\[\][ ]=' drivers/staging/xgifb/vb_setmode.c
+ defsnc 'static[ ]const[ ]unsigned[ ]\(power\|emif[01]\)_pins\[\][ ]=' drivers/pinctrl/pinmux-u300.c
+ defsnc 'static[ ]const[ ]struct[ ]pll_div[ ]codec_\(master\|slave\)_pll_div\[\][ ]=' sound/soc/codecs/rt5631.c
+ accept '[ ]it913x_config\.firmware[ ]=[ ]' drivers/media/dvb/dvb-usb/it913x.c
+ accept '[ ]\.download_firmware[ ]=[ ]it913x_download_firmware[,][\n][ ]\.firmware[ ]=[ ]["]' drivers/media/dvb/dvb-usb/it913x.c
+ blobname 'dvb-usb-it9137-01\.fw' drivers/media/dvb/dvb-usb/it913x.c
+ blobname '%s[/]bdata\.%s\.bin' drivers/net/wireless/ath/ath6kl/init.c
+ blobna 'Used[ ][(]for[ ]now[)][^*]*\([*]\+[^/*][^*]*\)*[*]*["]bdata\.bin["][^*]*\([*]\+[^/*][^*]*\)*[*]\+[/]' drivers/net/wireless/ath/ath6kl/init.c
+ blobname 'mrvl[/]pcie8766_uapsta\.bin' 'drivers/net/wireless/mwifiex/pcie\.[ch]'
+ blobname 'usbduxsigma_firmware\.bin' drivers/staging/comedi/drivers/usbduxsigma.c
+ blobname 'as102_data[12]_[sd]t\.hex' drivers/staging/media/as102/as102_fw.c
+ blob 'u8[ ]Rtl8192PciEFw\(Boot\|Main\|Data\)Array\[\(Boot\|Main\|Data\)ArrayLengthPciE\][ ]=[ ][{][^}]*[}][;]' drivers/staging/rtl8192e/r8192E_hwimg.c
+ blobna '\([&]\|sizeof[(]\)Rtl8192PciEFw\(Boot\|Main\|Data\)Array\(\[0\]\|[)]\)\(,[ \n]*\([&]\|sizeof[(]\)Rtl8192PciEFw\(Boot\|Main\|Data\)Array\(\[0\]\|[)]\)\)*' drivers/staging/rtl8192e/r8192E_firmware.c
+ blobname 'imx[/]sdma[/]sdma-imx5[13]\.bin' 'arch/arm/boot/dts/imx5[13]-\(babbage\|ard\|evk\|qsb\|smd\)\.dts'
+ blobname 'libertas[/]usb8388_olpc\.bin' drivers/net/wireless/libertas/if_usb.c
+ blobname 'rtlwifi[/]rtl8192cfwU\(_B\)\?\.bin' drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+ blobname 'ti-connectivity[/]wl12[78]x-fw-3\.bin' drivers/net/wireless/wl12xx/wl12xx.h
+ blobname 'pcxhr[/]%s' sound/pci/pcxhr/pcxhr_hwdep.c
+ blobname 'mrvl[/]sd8797_uapsta\.bin' drivers/net/wireless/mwifiex/sdio.h
+ blobname 's5p-mfc\.fw' drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c
+ blobname 'rtl_nic[/]rtl8168f-[12]\.fw' drivers/net/ethernet/realtek/r8169.c
+ accept '[ ]bp->firmware[ ]=[ ]NULL[;]' drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
;;
*/*freedo*.patch | */*logo*.patch)
accept 'P[13]\([\n]#[^\n]*\)*[\n]*\([\n][0-9 ]*\)\+' drivers/video/logo/logo_libre_clut224.ppm
;;
+ */brcm80211.patch)
+ blobname 'brcm[/]bcm4329-fullmac-4\.\(bin\|txt\)' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmfmac/bcmchip\.h'
+ blobname 'brcm[/]bcm43xx' 'drivers/\(staging\|net/wireless\)/brcm80211/sys/wl_mac80211\.c'
+ blobname '%s\(_hdr\)\?-%d\.fw' 'drivers/\(staging\|net/wireless\)/brcm80211/sys/wl_mac80211\.c'
+ defsnc 'static[ ]\(const[ ]\)struct[ ]chan_info_basic[ ]chan_info_all\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_cmn\.c'
+ defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
+ defsnc '\(static[ ]const[ ]\)\?s8[ ]lcnphy_gain_index_offset_for_pkt_rssi\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_2064_lcnphy[ ]chan_info_2064_lcnphy\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc '\(static[ ]const[ ]\)\?struct[ ]lcnphy_radio_regs[ ]lcnphy_radio_regs_2064\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc 'struct[ ]lcnphy_rx_iqcomp[ ]lcnphy_rx_iqcomp_table_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc 'static[ ]const[ ]u32[ ]lcnphy_23bitgaincode_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc 'static[ ]const[ ]s8[ ]lcnphy_gain_index_offset_for_rssi\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phy_lcn\.c\)'
+ defsnc '\(static[ ]const[ ]\)\?u16[ \n]*LCNPHY_txdigfiltcoeffs_\(cck\|ofdm\)\[LCNPHY_NUM_TX_DIG_FILTERS_\(CCK\|OFDM\)\][\n ]*\[LCNPHY_NUM_DIG_FILT_COEFFS[ ][+][ ]1\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_lcn\.c'
+ defsnc '\(static[ ]const[ ]\)\?struct[ ]nphy_ipa_txrxgain[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_2055[ ]chan_info_nphy_2055\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio205x[ ]chan_info_nphyrev\(3_2056\|4_2056_A1\|5_2056v5\|6_2056v6\|5n6_2056v7\|6_2056v\(8\|11\)\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio2057[ ]chan_info_nphyrev\(7_2057_rev4\|8_2057_rev[78]\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]\(const[ ]\)\?struct[ ]chan_info_nphy_radio2057_rev5[ \n]chan_info_nphyrev\(8_2057_rev5\|9_2057_rev5v1\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc '\(static[ ]\)\?\(const[ ]\)\?struct[ ]radio_\(20xx_\)\?regs[ \n]regs_\(2055\|\(SYN\|[TR]X\)_205\(6\(_A1\|_rev\([5678]\|11\)\)\?\)\|2057_rev\([4578]\|5v1\)\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u8[ ]pad_all_gain_codes_2057\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_papd_scaltbl\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '[ ]s32[ ]poll_results\[8\]\[4\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc '[ ]struct[ ]nphy_txiqcal_ladder[ ]ladder_\(lo\|iq\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phy_n\.c'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]dot11lcn_\(unsup_mcs\|iq_local\)_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]lcnphy_tx_gain_tbl_entry[ ]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]dot11lcn_papd_compdelta_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc 'static[ ]const[ ]s16[ ]log_table\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(util/qmath\.c\|brcmsmac/phy/phy_qmath\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]struct[ ]lcnphy_tx_gain_tbl_entry[ \n]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/brcmsmac/phy/phytbl_lcn\.c'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]frame_struct_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]frame_lut_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]\(tmap\|tdtrn\)_tbl_rev[037]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]pilot_tbl_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]tdi_tbl[24]0_ant[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]chanest_tbl_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]mcs_tbl_rev0\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]noise_var_tbl[01]\?_rev[037]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u8[ ]\(est\|adj\)_pwr_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]\(gainctrl\|iq\)_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]loft_lut_core[01]_rev[03]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]ant_swctrl_tbl_rev3\(_[1-3]\)\?\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]mcs_tbl_rev3\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u16[ ]papd_comp_rfpwr_tbl_core[01]_rev3\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ defsnc '\(static[ ]\)\?const[ ]u32[ ]papd_\(comp_epsilon\|cal_scalars\)_tbl_core[01]_rev[37]\[\][ ]=' 'drivers/\(staging\|net/wireless\)/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phytbl_n\.c\)'
+ ;;
+
+ */patch*-3.1.*)
+ defsnc 'static[ ]const[ ]u8[ ]ak4642_reg\[AK4642_CACHEREGNUM\][ ]=' sound/soc/codecs/ak4642.c
+ accept '[ ]\+request_firmware[(][)][ ]will[ ]hit[ ]an[ ]OOPS' drivers/media/dvb/frontends/dib7000p.c
+ ;;
+
*/media-DiBcom*.patch)
accept '[ ]\+request_firmware[(][)][ ]will[ ]hit[ ]an[ ]OOPS' drivers/media/dvb/frontends/dib7000p.c
;;
@@ -2945,7 +3056,7 @@ set_except () {
defsnc 'nphy_ipa_txrxgain_t[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
defsnc 'static[ ]chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
defsnc 'radio_\(20xx_\)\?regs_t[ ]regs_\(SYN_\|[RT]X_\)\?205[5-7]\(_A1\|_rev\([4-8]\|11\)\(v1\)\?\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
- defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' 'drivers/staging/mrcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
+ defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
defsnc 'static[ ]u8[ ]pad_all_gain_codes_2057\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_n\.c\|brcmsmac/phy/phy_n\.c\)'
@@ -2955,10 +3066,10 @@ set_except () {
defsnc 'const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/stagingg/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
- defsnc 'const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' 'drivers/stagingg/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
+ defsnc 'const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u16[ ]dot11lcn_\(unsup_mcs\|iq_local\)_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]lcnphy_tx_gain_tbl_entry[ ]dot11lcnphy_[25]GHz_\(extPA_\)\?gaintable_rev0\[128\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
defsnc 'const[ ]u32[ ]dot11lcn_papd_compdelta_tbl_rev0\[\][ ]=' 'drivers/staging/brcm80211/\(phy/wlc_phy_lcn\.c\|brcmsmac/phy/phytbl_lcn\.c\)'
@@ -3132,7 +3243,7 @@ set_except () {
defsnc 'nphy_ipa_txrxgain_t[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'radio_\(20xx_\)\?regs_t[ ]regs_\(SYN_\|[RT]X_\)\?205[5-7]\(_A1\|_rev\([4-8]\|11\)\(v1\)\?\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
- defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' drivers/staging/mrcm80211/phy/wlc_phy_n.c
+ defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]u8[ ]pad_all_gain_codes_2057\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
@@ -3142,7 +3253,7 @@ set_except () {
defsnc 'const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
- defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/stagingg/brcm80211/phy/wlc_phytbl_lcn.c
+ defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
@@ -3392,7 +3503,7 @@ set_except () {
defsnc 'nphy_ipa_txrxgain_t[ ]nphy_ipa_rxcal_gaintbl_2GHz\(_rev7\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]chan_info_nphy_\(radio\)\?205[5x7]\(_rev5\)\?_t[ ]chan_info_nphy\(rev[3-9]\(n6\)\?\)\?_205[5-7]\(_A1\|v\([5-8]\|11\)\|_rev[4-8]\(v1\)\?\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'radio_\(20xx_\)\?regs_t[ ]regs_\(SYN_\|[RT]X_\)\?205[5-7]\(_A1\|_rev\([4-8]\|11\)\(v1\)\?\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
- defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' drivers/staging/mrcm80211/phy/wlc_phy_n.c
+ defsnc 'static[ ]const[ ]u16[ ]tbl_iqcal_gainparams_nphy\[2\]\[NPHY_IQCAL_NUMGAINS\]\[8\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]\(const[ ]\)\?u32[ ]nphy_tpc_\(5GHz_\)\?txgain\(_[ei]pa\)\?\(\(_[25]g\)\?\(_\(2057\)\?\(rev\([3-7]\|4n6\)\?\)\?\)\?\|_HiPwrEPA\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]const[ ]u16[ ]nphy_tpc_loscale\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
defsnc 'static[ ]u8[ ]pad_all_gain_codes_2057\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phy_n.c
@@ -3402,7 +3513,7 @@ set_except () {
defsnc 'const[ ]u32[ ]dot11lcn_gain_\(idx_\|val_\)\?tbl_\(rev[01]\|\(extlna_\)\?2G\|5G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_aux_gain_idx_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u32[ ]dot11lcn_aux_gain_idx_tbl_5G\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
- defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/stagingg/brcm80211/phy/wlc_phytbl_lcn.c
+ defsnc 'const[ ]u8[ ]dot11lcn_gain_val_tbl_\(rev0\|\(extlna_\)\?2G\)\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_\(min_sig_sq\|noise_scale\)_tbl_rev0\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u16[ ]dot11lcn_sw_ctrl_tbl_\(4313_\)\?\(bt_\)\?\(epa_\)\?\(p250_\)\?rev0\(_combo\)\?\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
defsnc 'const[ ]u8[ ]dot11lcn_spur_tbl_rev0\[\][ ]=' drivers/staging/brcm80211/phy/wlc_phytbl_lcn.c
diff --git a/freed-ora/current/master/drm-edid-try-harder-to-fix-up-broken-headers.patch b/freed-ora/current/master/drm-edid-try-harder-to-fix-up-broken-headers.patch
new file mode 100644
index 000000000..26660d767
--- /dev/null
+++ b/freed-ora/current/master/drm-edid-try-harder-to-fix-up-broken-headers.patch
@@ -0,0 +1,47 @@
+From 115cb7ab7d3b87fe43b1fe9b05ec894b1fcfb5cf Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 7 Dec 2011 18:26:23 -0500
+Subject: [PATCH] drm/edid: Try harder to fix up broken headers
+
+There's no reason to force the first byte to be correct if we're already
+scoring how correct the header is.
+
+See also: https://bugzilla.redhat.com/show_bug.cgi?id=722909
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ drivers/gpu/drm/drm_edid.c | 18 ++++++++----------
+ 1 files changed, 8 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
+index 7425e5c..8b16a49 100644
+--- a/drivers/gpu/drm/drm_edid.c
++++ b/drivers/gpu/drm/drm_edid.c
+@@ -154,16 +154,14 @@ drm_edid_block_valid(u8 *raw_edid)
+ int i;
+ u8 csum = 0;
+ struct edid *edid = (struct edid *)raw_edid;
+-
+- if (raw_edid[0] == 0x00) {
+- int score = drm_edid_header_is_valid(raw_edid);
+- if (score == 8) ;
+- else if (score >= 6) {
+- DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
+- memcpy(raw_edid, edid_header, sizeof(edid_header));
+- } else {
+- goto bad;
+- }
++ int score = drm_edid_header_is_valid(raw_edid);
++
++ if (score == 8) ;
++ else if (score >= 6) {
++ DRM_DEBUG("Fixing EDID header, your hardware may be failing\n");
++ memcpy(raw_edid, edid_header, sizeof(edid_header));
++ } else {
++ goto bad;
+ }
+
+ for (i = 0; i < EDID_LENGTH; i++)
+--
+1.7.7.3
+
diff --git a/freed-ora/current/master/drm-i915-sdvo-lvds-is-digital.patch b/freed-ora/current/master/drm-i915-sdvo-lvds-is-digital.patch
deleted file mode 100644
index 68d0c4b31..000000000
--- a/freed-ora/current/master/drm-i915-sdvo-lvds-is-digital.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 64015d6d16d7ed5b6ffcec95dc13e8694bd2a4d6 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Mon, 20 Jun 2011 22:35:24 +0100
-Subject: [PATCH] drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
-
-We were checking whether the supplied edid matched the connector it was
-read from. We do this in case a DDC read returns an EDID for another
-device on a multifunction or otherwise interesting card. However, we
-failed to include LVDS as a digital device and so rejecting an otherwise
-valid EDID.
-
-Fixes the detection of the secondary SDVO LVDS panel on the Libretto
-W105.
-
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
----
- drivers/gpu/drm/i915/intel_sdvo.c | 28 ++++++++++++++++++++--------
- 1 files changed, 20 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
-index f96975c..26eff9f 100644
---- a/drivers/gpu/drm/i915/intel_sdvo.c
-+++ b/drivers/gpu/drm/i915/intel_sdvo.c
-@@ -49,6 +49,7 @@
- #define IS_TMDS(c) (c->output_flag & SDVO_TMDS_MASK)
- #define IS_LVDS(c) (c->output_flag & SDVO_LVDS_MASK)
- #define IS_TV_OR_LVDS(c) (c->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
-+#define IS_DIGITAL(c) (c->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))
-
-
- static const char *tv_format_names[] = {
-@@ -1363,6 +1364,18 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
- return status;
- }
-
-+static bool
-+intel_sdvo_connector_matches_edid(struct intel_sdvo_connector *sdvo,
-+ struct edid *edid)
-+{
-+ bool monitor_is_digital = !!(edid->input & DRM_EDID_INPUT_DIGITAL);
-+ bool connector_is_digital = !!IS_DIGITAL(sdvo);
-+
-+ DRM_DEBUG_KMS("connector_is_digital? %d, monitor_is_digital? %d\n",
-+ connector_is_digital, monitor_is_digital);
-+ return connector_is_digital == monitor_is_digital;
-+}
-+
- static enum drm_connector_status
- intel_sdvo_detect(struct drm_connector *connector, bool force)
- {
-@@ -1407,10 +1420,12 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
- if (edid == NULL)
- edid = intel_sdvo_get_analog_edid(connector);
- if (edid != NULL) {
-- if (edid->input & DRM_EDID_INPUT_DIGITAL)
-- ret = connector_status_disconnected;
-- else
-+ if (intel_sdvo_connector_matches_edid(intel_sdvo_connector,
-+ edid))
- ret = connector_status_connected;
-+ else
-+ ret = connector_status_disconnected;
-+
- connector->display_info.raw_edid = NULL;
- kfree(edid);
- } else
-@@ -1451,11 +1466,8 @@ static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
- edid = intel_sdvo_get_analog_edid(connector);
-
- if (edid != NULL) {
-- struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
-- bool monitor_is_digital = !!(edid->input & DRM_EDID_INPUT_DIGITAL);
-- bool connector_is_digital = !!IS_TMDS(intel_sdvo_connector);
--
-- if (connector_is_digital == monitor_is_digital) {
-+ if (intel_sdvo_connector_matches_edid(to_intel_sdvo_connector(connector),
-+ edid)) {
- drm_mode_connector_update_edid_property(connector, edid);
- drm_add_edid_modes(connector, edid);
- }
---
-1.7.5.4
-
diff --git a/freed-ora/current/master/drm-intel-make-lvds-work.patch b/freed-ora/current/master/drm-intel-make-lvds-work.patch
deleted file mode 100644
index 89f4e2d48..000000000
--- a/freed-ora/current/master/drm-intel-make-lvds-work.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/drivers/gpu/drm/i915/intel_display.c
-+++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -5821,7 +5821,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
- struct intel_load_detect_pipe *old)
- {
- struct drm_encoder *encoder = &intel_encoder->base;
-- struct drm_device *dev = encoder->dev;
- struct drm_crtc *crtc = encoder->crtc;
- struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
- struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
-@@ -5832,7 +5831,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
-
- if (old->load_detect_temp) {
- connector->encoder = NULL;
-- drm_helper_disable_unused_functions(dev);
-
- if (old->release_fb)
- old->release_fb->funcs->destroy(old->release_fb);
diff --git a/freed-ora/current/master/drm-lower-severity-radeon-lockup.diff b/freed-ora/current/master/drm-lower-severity-radeon-lockup.diff
deleted file mode 100644
index 1302c92ea..000000000
--- a/freed-ora/current/master/drm-lower-severity-radeon-lockup.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
-index 7fd4e3e..a488b50 100644
---- a/drivers/gpu/drm/radeon/radeon_fence.c
-+++ b/drivers/gpu/drm/radeon/radeon_fence.c
-@@ -263,7 +263,7 @@ retry:
- */
- if (seq == rdev->fence_drv.last_seq && radeon_gpu_is_lockup(rdev)) {
- /* good news we believe it's a lockup */
-- WARN(1, "GPU lockup (waiting for 0x%08X last fence id 0x%08X)\n",
-+ printk(KERN_WARNING "GPU lockup (waiting for 0x%08X last fence id 0x%08X)\n",
- fence->seq, seq);
- /* FIXME: what should we do ? marking everyone
- * as signaled for now
diff --git a/freed-ora/current/master/drm-nouveau-updates.patch b/freed-ora/current/master/drm-nouveau-updates.patch
deleted file mode 100644
index 8ead1d11f..000000000
--- a/freed-ora/current/master/drm-nouveau-updates.patch
+++ /dev/null
@@ -1,8526 +0,0 @@
-Adjusted for deblobbed sources.
-
-* drivers/gpu/drm/nouveau/nvc0_graph.c: Adjusted for deblobbed required
-module firmware declarations.
-
-diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
-index 0583677..35ef5b1 100644
---- a/drivers/gpu/drm/nouveau/Makefile
-+++ b/drivers/gpu/drm/nouveau/Makefile
-@@ -21,16 +21,17 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \
- nv40_grctx.o nv50_grctx.o nvc0_grctx.o \
- nv84_crypt.o \
- nva3_copy.o nvc0_copy.o \
-- nv40_mpeg.o nv50_mpeg.o \
-+ nv31_mpeg.o nv50_mpeg.o \
- nv04_instmem.o nv50_instmem.o nvc0_instmem.o \
-- nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \
-- nv50_cursor.o nv50_display.o \
- nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \
- nv04_crtc.o nv04_display.o nv04_cursor.o \
-+ nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \
-+ nv50_cursor.o nv50_display.o \
-+ nvd0_display.o \
- nv04_fbcon.o nv50_fbcon.o nvc0_fbcon.o \
- nv10_gpio.o nv50_gpio.o \
- nv50_calc.o \
-- nv04_pm.o nv50_pm.o nva3_pm.o \
-+ nv04_pm.o nv40_pm.o nv50_pm.o nva3_pm.o nvc0_pm.o \
- nv50_vram.o nvc0_vram.o \
- nv50_vm.o nvc0_vm.o
-
-diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
-index 00a55df..fa22b28 100644
---- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
-@@ -37,8 +37,10 @@
- #include "nouveau_drv.h"
- #include "nouveau_drm.h"
- #include "nouveau_reg.h"
-+#include "nouveau_encoder.h"
-
--static int nv40_get_intensity(struct backlight_device *bd)
-+static int
-+nv40_get_intensity(struct backlight_device *bd)
- {
- struct drm_device *dev = bl_get_data(bd);
- int val = (nv_rd32(dev, NV40_PMC_BACKLIGHT) & NV40_PMC_BACKLIGHT_MASK)
-@@ -47,7 +49,8 @@ static int nv40_get_intensity(struct backlight_device *bd)
- return val;
- }
-
--static int nv40_set_intensity(struct backlight_device *bd)
-+static int
-+nv40_set_intensity(struct backlight_device *bd)
- {
- struct drm_device *dev = bl_get_data(bd);
- int val = bd->props.brightness;
-@@ -65,30 +68,8 @@ static const struct backlight_ops nv40_bl_ops = {
- .update_status = nv40_set_intensity,
- };
-
--static int nv50_get_intensity(struct backlight_device *bd)
--{
-- struct drm_device *dev = bl_get_data(bd);
--
-- return nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT);
--}
--
--static int nv50_set_intensity(struct backlight_device *bd)
--{
-- struct drm_device *dev = bl_get_data(bd);
-- int val = bd->props.brightness;
--
-- nv_wr32(dev, NV50_PDISPLAY_SOR_BACKLIGHT,
-- val | NV50_PDISPLAY_SOR_BACKLIGHT_ENABLE);
-- return 0;
--}
--
--static const struct backlight_ops nv50_bl_ops = {
-- .options = BL_CORE_SUSPENDRESUME,
-- .get_brightness = nv50_get_intensity,
-- .update_status = nv50_set_intensity,
--};
--
--static int nouveau_nv40_backlight_init(struct drm_connector *connector)
-+static int
-+nv40_backlight_init(struct drm_connector *connector)
- {
- struct drm_device *dev = connector->dev;
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-@@ -113,34 +94,129 @@ static int nouveau_nv40_backlight_init(struct drm_connector *connector)
- return 0;
- }
-
--static int nouveau_nv50_backlight_init(struct drm_connector *connector)
-+static int
-+nv50_get_intensity(struct backlight_device *bd)
-+{
-+ struct nouveau_encoder *nv_encoder = bl_get_data(bd);
-+ struct drm_device *dev = nv_encoder->base.base.dev;
-+ int or = nv_encoder->or;
-+ u32 div = 1025;
-+ u32 val;
-+
-+ val = nv_rd32(dev, NV50_PDISP_SOR_PWM_CTL(or));
-+ val &= NV50_PDISP_SOR_PWM_CTL_VAL;
-+ return ((val * 100) + (div / 2)) / div;
-+}
-+
-+static int
-+nv50_set_intensity(struct backlight_device *bd)
-+{
-+ struct nouveau_encoder *nv_encoder = bl_get_data(bd);
-+ struct drm_device *dev = nv_encoder->base.base.dev;
-+ int or = nv_encoder->or;
-+ u32 div = 1025;
-+ u32 val = (bd->props.brightness * div) / 100;
-+
-+ nv_wr32(dev, NV50_PDISP_SOR_PWM_CTL(or),
-+ NV50_PDISP_SOR_PWM_CTL_NEW | val);
-+ return 0;
-+}
-+
-+static const struct backlight_ops nv50_bl_ops = {
-+ .options = BL_CORE_SUSPENDRESUME,
-+ .get_brightness = nv50_get_intensity,
-+ .update_status = nv50_set_intensity,
-+};
-+
-+static int
-+nva3_get_intensity(struct backlight_device *bd)
-+{
-+ struct nouveau_encoder *nv_encoder = bl_get_data(bd);
-+ struct drm_device *dev = nv_encoder->base.base.dev;
-+ int or = nv_encoder->or;
-+ u32 div, val;
-+
-+ div = nv_rd32(dev, NV50_PDISP_SOR_PWM_DIV(or));
-+ val = nv_rd32(dev, NV50_PDISP_SOR_PWM_CTL(or));
-+ val &= NVA3_PDISP_SOR_PWM_CTL_VAL;
-+ if (div && div >= val)
-+ return ((val * 100) + (div / 2)) / div;
-+
-+ return 100;
-+}
-+
-+static int
-+nva3_set_intensity(struct backlight_device *bd)
-+{
-+ struct nouveau_encoder *nv_encoder = bl_get_data(bd);
-+ struct drm_device *dev = nv_encoder->base.base.dev;
-+ int or = nv_encoder->or;
-+ u32 div, val;
-+
-+ div = nv_rd32(dev, NV50_PDISP_SOR_PWM_DIV(or));
-+ val = (bd->props.brightness * div) / 100;
-+ if (div) {
-+ nv_wr32(dev, NV50_PDISP_SOR_PWM_CTL(or), val |
-+ NV50_PDISP_SOR_PWM_CTL_NEW |
-+ NVA3_PDISP_SOR_PWM_CTL_UNK);
-+ return 0;
-+ }
-+
-+ return -EINVAL;
-+}
-+
-+static const struct backlight_ops nva3_bl_ops = {
-+ .options = BL_CORE_SUSPENDRESUME,
-+ .get_brightness = nva3_get_intensity,
-+ .update_status = nva3_set_intensity,
-+};
-+
-+static int
-+nv50_backlight_init(struct drm_connector *connector)
- {
- struct drm_device *dev = connector->dev;
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_encoder *nv_encoder;
- struct backlight_properties props;
- struct backlight_device *bd;
-+ const struct backlight_ops *ops;
-+
-+ nv_encoder = find_encoder(connector, OUTPUT_LVDS);
-+ if (!nv_encoder) {
-+ nv_encoder = find_encoder(connector, OUTPUT_DP);
-+ if (!nv_encoder)
-+ return -ENODEV;
-+ }
-
-- if (!nv_rd32(dev, NV50_PDISPLAY_SOR_BACKLIGHT))
-+ if (!nv_rd32(dev, NV50_PDISP_SOR_PWM_CTL(nv_encoder->or)))
- return 0;
-
-+ if (dev_priv->chipset <= 0xa0 ||
-+ dev_priv->chipset == 0xaa ||
-+ dev_priv->chipset == 0xac)
-+ ops = &nv50_bl_ops;
-+ else
-+ ops = &nva3_bl_ops;
-+
- memset(&props, 0, sizeof(struct backlight_properties));
- props.type = BACKLIGHT_RAW;
-- props.max_brightness = 1025;
-- bd = backlight_device_register("nv_backlight", &connector->kdev, dev,
-- &nv50_bl_ops, &props);
-+ props.max_brightness = 100;
-+ bd = backlight_device_register("nv_backlight", &connector->kdev,
-+ nv_encoder, ops, &props);
- if (IS_ERR(bd))
- return PTR_ERR(bd);
-
- dev_priv->backlight = bd;
-- bd->props.brightness = nv50_get_intensity(bd);
-+ bd->props.brightness = bd->ops->get_brightness(bd);
- backlight_update_status(bd);
- return 0;
- }
-
--int nouveau_backlight_init(struct drm_connector *connector)
-+int
-+nouveau_backlight_init(struct drm_device *dev)
- {
-- struct drm_device *dev = connector->dev;
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct drm_connector *connector;
-
- #ifdef CONFIG_ACPI
- if (acpi_video_backlight_support()) {
-@@ -150,21 +226,28 @@ int nouveau_backlight_init(struct drm_connector *connector)
- }
- #endif
-
-- switch (dev_priv->card_type) {
-- case NV_40:
-- return nouveau_nv40_backlight_init(connector);
-- case NV_50:
-- return nouveau_nv50_backlight_init(connector);
-- default:
-- break;
-+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-+ if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
-+ connector->connector_type != DRM_MODE_CONNECTOR_eDP)
-+ continue;
-+
-+ switch (dev_priv->card_type) {
-+ case NV_40:
-+ return nv40_backlight_init(connector);
-+ case NV_50:
-+ return nv50_backlight_init(connector);
-+ default:
-+ break;
-+ }
- }
-
-+
- return 0;
- }
-
--void nouveau_backlight_exit(struct drm_connector *connector)
-+void
-+nouveau_backlight_exit(struct drm_device *dev)
- {
-- struct drm_device *dev = connector->dev;
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-
- if (dev_priv->backlight) {
-diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
-index b311fab..032a820 100644
---- a/drivers/gpu/drm/nouveau/nouveau_bios.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -296,6 +296,11 @@ munge_reg(struct nvbios *bios, uint32_t reg)
- if (dev_priv->card_type < NV_50)
- return reg;
-
-+ if (reg & 0x80000000) {
-+ BUG_ON(bios->display.crtc < 0);
-+ reg += bios->display.crtc * 0x800;
-+ }
-+
- if (reg & 0x40000000) {
- BUG_ON(!dcbent);
-
-@@ -304,7 +309,7 @@ munge_reg(struct nvbios *bios, uint32_t reg)
- reg += 0x00000080;
- }
-
-- reg &= ~0x60000000;
-+ reg &= ~0xe0000000;
- return reg;
- }
-
-@@ -1174,22 +1179,19 @@ init_dp_condition(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
- *
- */
-
-- struct bit_displayport_encoder_table *dpe = NULL;
- struct dcb_entry *dcb = bios->display.output;
- struct drm_device *dev = bios->dev;
- uint8_t cond = bios->data[offset + 1];
-- int dummy;
-+ uint8_t *table, *entry;
-
- BIOSLOG(bios, "0x%04X: subop 0x%02X\n", offset, cond);
-
- if (!iexec->execute)
- return 3;
-
-- dpe = nouveau_bios_dp_table(dev, dcb, &dummy);
-- if (!dpe) {
-- NV_ERROR(dev, "0x%04X: INIT_3A: no encoder table!!\n", offset);
-+ table = nouveau_dp_bios_data(dev, dcb, &entry);
-+ if (!table)
- return 3;
-- }
-
- switch (cond) {
- case 0:
-@@ -1203,7 +1205,7 @@ init_dp_condition(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
- break;
- case 1:
- case 2:
-- if (!(dpe->unknown & cond))
-+ if (!(entry[5] & cond))
- iexec->execute = false;
- break;
- case 5:
-@@ -3221,6 +3223,49 @@ init_8d(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
- return 1;
- }
-
-+static void
-+init_gpio_unknv50(struct nvbios *bios, struct dcb_gpio_entry *gpio)
-+{
-+ const uint32_t nv50_gpio_ctl[2] = { 0xe100, 0xe28c };
-+ u32 r, s, v;
-+
-+ /* Not a clue, needs de-magicing */
-+ r = nv50_gpio_ctl[gpio->line >> 4];
-+ s = (gpio->line & 0x0f);
-+ v = bios_rd32(bios, r) & ~(0x00010001 << s);
-+ switch ((gpio->entry & 0x06000000) >> 25) {
-+ case 1:
-+ v |= (0x00000001 << s);
-+ break;
-+ case 2:
-+ v |= (0x00010000 << s);
-+ break;
-+ default:
-+ break;
-+ }
-+
-+ bios_wr32(bios, r, v);
-+}
-+
-+static void
-+init_gpio_unknvd0(struct nvbios *bios, struct dcb_gpio_entry *gpio)
-+{
-+ u32 v, i;
-+
-+ v = bios_rd32(bios, 0x00d610 + (gpio->line * 4));
-+ v &= 0xffffff00;
-+ v |= (gpio->entry & 0x00ff0000) >> 16;
-+ bios_wr32(bios, 0x00d610 + (gpio->line * 4), v);
-+
-+ i = (gpio->entry & 0x1f000000) >> 24;
-+ if (i) {
-+ v = bios_rd32(bios, 0x00d640 + ((i - 1) * 4));
-+ v &= 0xffffff00;
-+ v |= gpio->line;
-+ bios_wr32(bios, 0x00d640 + ((i - 1) * 4), v);
-+ }
-+}
-+
- static int
- init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
- {
-@@ -3235,7 +3280,6 @@ init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
-
- struct drm_nouveau_private *dev_priv = bios->dev->dev_private;
- struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio;
-- const uint32_t nv50_gpio_ctl[2] = { 0xe100, 0xe28c };
- int i;
-
- if (dev_priv->card_type < NV_50) {
-@@ -3248,33 +3292,20 @@ init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
-
- for (i = 0; i < bios->dcb.gpio.entries; i++) {
- struct dcb_gpio_entry *gpio = &bios->dcb.gpio.entry[i];
-- uint32_t r, s, v;
-
- BIOSLOG(bios, "0x%04X: Entry: 0x%08X\n", offset, gpio->entry);
-
- BIOSLOG(bios, "0x%04X: set gpio 0x%02x, state %d\n",
- offset, gpio->tag, gpio->state_default);
-- if (bios->execute)
-- pgpio->set(bios->dev, gpio->tag, gpio->state_default);
-
-- /* The NVIDIA binary driver doesn't appear to actually do
-- * any of this, my VBIOS does however.
-- */
-- /* Not a clue, needs de-magicing */
-- r = nv50_gpio_ctl[gpio->line >> 4];
-- s = (gpio->line & 0x0f);
-- v = bios_rd32(bios, r) & ~(0x00010001 << s);
-- switch ((gpio->entry & 0x06000000) >> 25) {
-- case 1:
-- v |= (0x00000001 << s);
-- break;
-- case 2:
-- v |= (0x00010000 << s);
-- break;
-- default:
-- break;
-- }
-- bios_wr32(bios, r, v);
-+ if (!bios->execute)
-+ continue;
-+
-+ pgpio->set(bios->dev, gpio->tag, gpio->state_default);
-+ if (dev_priv->card_type < NV_D0)
-+ init_gpio_unknv50(bios, gpio);
-+ else
-+ init_gpio_unknvd0(bios, gpio);
- }
-
- return 1;
-@@ -3737,6 +3768,10 @@ parse_init_table(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
- int count = 0, i, ret;
- uint8_t id;
-
-+ /* catch NULL script pointers */
-+ if (offset == 0)
-+ return 0;
-+
- /*
- * Loop until INIT_DONE causes us to break out of the loop
- * (or until offset > bios length just in case... )
-@@ -4389,86 +4424,37 @@ int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxclk, bool *dl, b
- return 0;
- }
-
--static uint8_t *
--bios_output_config_match(struct drm_device *dev, struct dcb_entry *dcbent,
-- uint16_t record, int record_len, int record_nr,
-- bool match_link)
-+/* BIT 'U'/'d' table encoder subtables have hashes matching them to
-+ * a particular set of encoders.
-+ *
-+ * This function returns true if a particular DCB entry matches.
-+ */
-+bool
-+bios_encoder_match(struct dcb_entry *dcb, u32 hash)
- {
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nvbios *bios = &dev_priv->vbios;
-- uint32_t entry;
-- uint16_t table;
-- int i, v;
-+ if ((hash & 0x000000f0) != (dcb->location << 4))
-+ return false;
-+ if ((hash & 0x0000000f) != dcb->type)
-+ return false;
-+ if (!(hash & (dcb->or << 16)))
-+ return false;
-
-- switch (dcbent->type) {
-+ switch (dcb->type) {
- case OUTPUT_TMDS:
- case OUTPUT_LVDS:
- case OUTPUT_DP:
-- break;
-- default:
-- match_link = false;
-- break;
-- }
--
-- for (i = 0; i < record_nr; i++, record += record_len) {
-- table = ROM16(bios->data[record]);
-- if (!table)
-- continue;
-- entry = ROM32(bios->data[table]);
--
-- if (match_link) {
-- v = (entry & 0x00c00000) >> 22;
-- if (!(v & dcbent->sorconf.link))
-- continue;
-+ if (hash & 0x00c00000) {
-+ if (!(hash & (dcb->sorconf.link << 22)))
-+ return false;
- }
--
-- v = (entry & 0x000f0000) >> 16;
-- if (!(v & dcbent->or))
-- continue;
--
-- v = (entry & 0x000000f0) >> 4;
-- if (v != dcbent->location)
-- continue;
--
-- v = (entry & 0x0000000f);
-- if (v != dcbent->type)
-- continue;
--
-- return &bios->data[table];
-- }
--
-- return NULL;
--}
--
--void *
--nouveau_bios_dp_table(struct drm_device *dev, struct dcb_entry *dcbent,
-- int *length)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nvbios *bios = &dev_priv->vbios;
-- uint8_t *table;
--
-- if (!bios->display.dp_table_ptr) {
-- NV_ERROR(dev, "No pointer to DisplayPort table\n");
-- return NULL;
-- }
-- table = &bios->data[bios->display.dp_table_ptr];
--
-- if (table[0] != 0x20 && table[0] != 0x21) {
-- NV_ERROR(dev, "DisplayPort table version 0x%02x unknown\n",
-- table[0]);
-- return NULL;
-+ default:
-+ return true;
- }
--
-- *length = table[4];
-- return bios_output_config_match(dev, dcbent,
-- bios->display.dp_table_ptr + table[1],
-- table[2], table[3], table[0] >= 0x21);
- }
-
- int
--nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
-- uint32_t sub, int pxclk)
-+nouveau_bios_run_display_table(struct drm_device *dev, u16 type, int pclk,
-+ struct dcb_entry *dcbent, int crtc)
- {
- /*
- * The display script table is located by the BIT 'U' table.
-@@ -4498,7 +4484,7 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
- uint8_t *table = &bios->data[bios->display.script_table_ptr];
- uint8_t *otable = NULL;
- uint16_t script;
-- int i = 0;
-+ int i;
-
- if (!bios->display.script_table_ptr) {
- NV_ERROR(dev, "No pointer to output script table\n");
-@@ -4550,30 +4536,33 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
-
- NV_DEBUG_KMS(dev, "Searching for output entry for %d %d %d\n",
- dcbent->type, dcbent->location, dcbent->or);
-- otable = bios_output_config_match(dev, dcbent, table[1] +
-- bios->display.script_table_ptr,
-- table[2], table[3], table[0] >= 0x21);
-+ for (i = 0; i < table[3]; i++) {
-+ otable = ROMPTR(bios, table[table[1] + (i * table[2])]);
-+ if (otable && bios_encoder_match(dcbent, ROM32(otable[0])))
-+ break;
-+ }
-+
- if (!otable) {
- NV_DEBUG_KMS(dev, "failed to match any output table\n");
- return 1;
- }
-
-- if (pxclk < -2 || pxclk > 0) {
-+ if (pclk < -2 || pclk > 0) {
- /* Try to find matching script table entry */
- for (i = 0; i < otable[5]; i++) {
-- if (ROM16(otable[table[4] + i*6]) == sub)
-+ if (ROM16(otable[table[4] + i*6]) == type)
- break;
- }
-
- if (i == otable[5]) {
- NV_ERROR(dev, "Table 0x%04x not found for %d/%d, "
- "using first\n",
-- sub, dcbent->type, dcbent->or);
-+ type, dcbent->type, dcbent->or);
- i = 0;
- }
- }
-
-- if (pxclk == 0) {
-+ if (pclk == 0) {
- script = ROM16(otable[6]);
- if (!script) {
- NV_DEBUG_KMS(dev, "output script 0 not found\n");
-@@ -4581,9 +4570,9 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
- }
-
- NV_DEBUG_KMS(dev, "0x%04X: parsing output script 0\n", script);
-- nouveau_bios_run_init_table(dev, script, dcbent);
-+ nouveau_bios_run_init_table(dev, script, dcbent, crtc);
- } else
-- if (pxclk == -1) {
-+ if (pclk == -1) {
- script = ROM16(otable[8]);
- if (!script) {
- NV_DEBUG_KMS(dev, "output script 1 not found\n");
-@@ -4591,9 +4580,9 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
- }
-
- NV_DEBUG_KMS(dev, "0x%04X: parsing output script 1\n", script);
-- nouveau_bios_run_init_table(dev, script, dcbent);
-+ nouveau_bios_run_init_table(dev, script, dcbent, crtc);
- } else
-- if (pxclk == -2) {
-+ if (pclk == -2) {
- if (table[4] >= 12)
- script = ROM16(otable[10]);
- else
-@@ -4604,31 +4593,31 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_entry *dcbent,
- }
-
- NV_DEBUG_KMS(dev, "0x%04X: parsing output script 2\n", script);
-- nouveau_bios_run_init_table(dev, script, dcbent);
-+ nouveau_bios_run_init_table(dev, script, dcbent, crtc);
- } else
-- if (pxclk > 0) {
-+ if (pclk > 0) {
- script = ROM16(otable[table[4] + i*6 + 2]);
- if (script)
-- script = clkcmptable(bios, script, pxclk);
-+ script = clkcmptable(bios, script, pclk);
- if (!script) {
- NV_DEBUG_KMS(dev, "clock script 0 not found\n");
- return 1;
- }
-
- NV_DEBUG_KMS(dev, "0x%04X: parsing clock script 0\n", script);
-- nouveau_bios_run_init_table(dev, script, dcbent);
-+ nouveau_bios_run_init_table(dev, script, dcbent, crtc);
- } else
-- if (pxclk < 0) {
-+ if (pclk < 0) {
- script = ROM16(otable[table[4] + i*6 + 4]);
- if (script)
-- script = clkcmptable(bios, script, -pxclk);
-+ script = clkcmptable(bios, script, -pclk);
- if (!script) {
- NV_DEBUG_KMS(dev, "clock script 1 not found\n");
- return 1;
- }
-
- NV_DEBUG_KMS(dev, "0x%04X: parsing clock script 1\n", script);
-- nouveau_bios_run_init_table(dev, script, dcbent);
-+ nouveau_bios_run_init_table(dev, script, dcbent, crtc);
- }
-
- return 0;
-@@ -5478,14 +5467,6 @@ parse_bit_U_tbl_entry(struct drm_device *dev, struct nvbios *bios,
- return 0;
- }
-
--static int
--parse_bit_displayport_tbl_entry(struct drm_device *dev, struct nvbios *bios,
-- struct bit_entry *bitentry)
--{
-- bios->display.dp_table_ptr = ROM16(bios->data[bitentry->offset]);
-- return 0;
--}
--
- struct bit_table {
- const char id;
- int (* const parse_fn)(struct drm_device *, struct nvbios *, struct bit_entry *);
-@@ -5559,7 +5540,6 @@ parse_bit_structure(struct nvbios *bios, const uint16_t bitoffset)
- parse_bit_table(bios, bitoffset, &BIT_TABLE('L', lvds));
- parse_bit_table(bios, bitoffset, &BIT_TABLE('T', tmds));
- parse_bit_table(bios, bitoffset, &BIT_TABLE('U', U));
-- parse_bit_table(bios, bitoffset, &BIT_TABLE('d', displayport));
-
- return 0;
- }
-@@ -5884,9 +5864,15 @@ parse_dcb_gpio_table(struct nvbios *bios)
- }
-
- e->line = (e->entry & 0x0000001f) >> 0;
-- e->state_default = (e->entry & 0x01000000) >> 24;
-- e->state[0] = (e->entry & 0x18000000) >> 27;
-- e->state[1] = (e->entry & 0x60000000) >> 29;
-+ if (gpio[0] == 0x40) {
-+ e->state_default = (e->entry & 0x01000000) >> 24;
-+ e->state[0] = (e->entry & 0x18000000) >> 27;
-+ e->state[1] = (e->entry & 0x60000000) >> 29;
-+ } else {
-+ e->state_default = (e->entry & 0x00000080) >> 7;
-+ e->state[0] = (entry[4] >> 4) & 3;
-+ e->state[1] = (entry[4] >> 6) & 3;
-+ }
- }
- }
-
-@@ -6156,7 +6142,14 @@ parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
- }
- case OUTPUT_DP:
- entry->dpconf.sor.link = (conf & 0x00000030) >> 4;
-- entry->dpconf.link_bw = (conf & 0x00e00000) >> 21;
-+ switch ((conf & 0x00e00000) >> 21) {
-+ case 0:
-+ entry->dpconf.link_bw = 162000;
-+ break;
-+ default:
-+ entry->dpconf.link_bw = 270000;
-+ break;
-+ }
- switch ((conf & 0x0f000000) >> 24) {
- case 0xf:
- entry->dpconf.link_nr = 4;
-@@ -6769,7 +6762,7 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
-
- void
- nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table,
-- struct dcb_entry *dcbent)
-+ struct dcb_entry *dcbent, int crtc)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nvbios *bios = &dev_priv->vbios;
-@@ -6777,11 +6770,22 @@ nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table,
-
- spin_lock_bh(&bios->lock);
- bios->display.output = dcbent;
-+ bios->display.crtc = crtc;
- parse_init_table(bios, table, &iexec);
- bios->display.output = NULL;
- spin_unlock_bh(&bios->lock);
- }
-
-+void
-+nouveau_bios_init_exec(struct drm_device *dev, uint16_t table)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nvbios *bios = &dev_priv->vbios;
-+ struct init_exec iexec = { true, false };
-+
-+ parse_init_table(bios, table, &iexec);
-+}
-+
- static bool NVInitVBIOS(struct drm_device *dev)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-@@ -6863,9 +6867,8 @@ nouveau_run_vbios_init(struct drm_device *dev)
-
- if (dev_priv->card_type >= NV_50) {
- for (i = 0; i < bios->dcb.entries; i++) {
-- nouveau_bios_run_display_table(dev,
-- &bios->dcb.entry[i],
-- 0, 0);
-+ nouveau_bios_run_display_table(dev, 0, 0,
-+ &bios->dcb.entry[i], -1);
- }
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h
-index 050c314..8adb69e 100644
---- a/drivers/gpu/drm/nouveau/nouveau_bios.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_bios.h
-@@ -289,8 +289,8 @@ struct nvbios {
-
- struct {
- struct dcb_entry *output;
-+ int crtc;
- uint16_t script_table_ptr;
-- uint16_t dp_table_ptr;
- } display;
-
- struct {
-diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
-index 890d50e..7226f41 100644
---- a/drivers/gpu/drm/nouveau/nouveau_bo.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
-@@ -956,7 +956,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
- break;
- }
-
-- if (dev_priv->card_type == NV_C0)
-+ if (dev_priv->card_type >= NV_C0)
- page_shift = node->page_shift;
- else
- page_shift = 12;
-diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
-index b0d753f..a319d56 100644
---- a/drivers/gpu/drm/nouveau/nouveau_channel.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
-@@ -411,13 +411,17 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
- return ret;
- init->channel = chan->id;
-
-- if (chan->dma.ib_max)
-- init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM |
-- NOUVEAU_GEM_DOMAIN_GART;
-- else if (chan->pushbuf_bo->bo.mem.mem_type == TTM_PL_VRAM)
-+ if (nouveau_vram_pushbuf == 0) {
-+ if (chan->dma.ib_max)
-+ init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM |
-+ NOUVEAU_GEM_DOMAIN_GART;
-+ else if (chan->pushbuf_bo->bo.mem.mem_type == TTM_PL_VRAM)
-+ init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM;
-+ else
-+ init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
-+ } else {
- init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM;
-- else
-- init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
-+ }
-
- if (dev_priv->card_type < NV_C0) {
- init->subchan[0].handle = NvM2MF;
-diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
-index 939d4df..e0d275e 100644
---- a/drivers/gpu/drm/nouveau/nouveau_connector.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
-@@ -39,7 +39,7 @@
-
- static void nouveau_connector_hotplug(void *, int);
-
--static struct nouveau_encoder *
-+struct nouveau_encoder *
- find_encoder(struct drm_connector *connector, int type)
- {
- struct drm_device *dev = connector->dev;
-@@ -116,10 +116,6 @@ nouveau_connector_destroy(struct drm_connector *connector)
- nouveau_connector_hotplug, connector);
- }
-
-- if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
-- connector->connector_type == DRM_MODE_CONNECTOR_eDP)
-- nouveau_backlight_exit(connector);
--
- kfree(nv_connector->edid);
- drm_sysfs_connector_remove(connector);
- drm_connector_cleanup(connector);
-@@ -712,11 +708,8 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
- case OUTPUT_TV:
- return get_slave_funcs(encoder)->mode_valid(encoder, mode);
- case OUTPUT_DP:
-- if (nv_encoder->dp.link_bw == DP_LINK_BW_2_7)
-- max_clock = nv_encoder->dp.link_nr * 270000;
-- else
-- max_clock = nv_encoder->dp.link_nr * 162000;
--
-+ max_clock = nv_encoder->dp.link_nr;
-+ max_clock *= nv_encoder->dp.link_bw;
- clock = clock * nouveau_connector_bpp(connector) / 8;
- break;
- default:
-@@ -871,7 +864,6 @@ nouveau_connector_create(struct drm_device *dev, int index)
- dev->mode_config.scaling_mode_property,
- nv_connector->scaling_mode);
- }
-- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
- /* fall-through */
- case DCB_CONNECTOR_TV_0:
- case DCB_CONNECTOR_TV_1:
-@@ -888,27 +880,20 @@ nouveau_connector_create(struct drm_device *dev, int index)
- dev->mode_config.dithering_mode_property,
- nv_connector->use_dithering ?
- DRM_MODE_DITHERING_ON : DRM_MODE_DITHERING_OFF);
--
-- if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) {
-- if (dev_priv->card_type >= NV_50)
-- connector->polled = DRM_CONNECTOR_POLL_HPD;
-- else
-- connector->polled = DRM_CONNECTOR_POLL_CONNECT;
-- }
- break;
- }
-
-- if (pgpio->irq_register) {
-+ if (nv_connector->dcb->gpio_tag != 0xff && pgpio->irq_register) {
- pgpio->irq_register(dev, nv_connector->dcb->gpio_tag,
- nouveau_connector_hotplug, connector);
-+
-+ connector->polled = DRM_CONNECTOR_POLL_HPD;
-+ } else {
-+ connector->polled = DRM_CONNECTOR_POLL_CONNECT;
- }
-
- drm_sysfs_connector_add(connector);
-
-- if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
-- connector->connector_type == DRM_MODE_CONNECTOR_eDP)
-- nouveau_backlight_init(connector);
--
- dcb->drm = connector;
- return dcb->drm;
-
-@@ -925,22 +910,13 @@ nouveau_connector_hotplug(void *data, int plugged)
- struct drm_connector *connector = data;
- struct drm_device *dev = connector->dev;
-
-- NV_INFO(dev, "%splugged %s\n", plugged ? "" : "un",
-- drm_get_connector_name(connector));
--
-- if (connector->encoder && connector->encoder->crtc &&
-- connector->encoder->crtc->enabled) {
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(connector->encoder);
-- struct drm_encoder_helper_funcs *helper =
-- connector->encoder->helper_private;
-+ NV_DEBUG(dev, "%splugged %s\n", plugged ? "" : "un",
-+ drm_get_connector_name(connector));
-
-- if (nv_encoder->dcb->type == OUTPUT_DP) {
-- if (plugged)
-- helper->dpms(connector->encoder, DRM_MODE_DPMS_ON);
-- else
-- helper->dpms(connector->encoder, DRM_MODE_DPMS_OFF);
-- }
-- }
-+ if (plugged)
-+ drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
-+ else
-+ drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
-
- drm_helper_hpd_irq_event(dev);
- }
-diff --git a/drivers/gpu/drm/nouveau/nouveau_crtc.h b/drivers/gpu/drm/nouveau/nouveau_crtc.h
-index cb1ce2a..bf8e128 100644
---- a/drivers/gpu/drm/nouveau/nouveau_crtc.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_crtc.h
-@@ -82,14 +82,13 @@ static inline struct drm_crtc *to_drm_crtc(struct nouveau_crtc *crtc)
- }
-
- int nv50_crtc_create(struct drm_device *dev, int index);
--int nv50_cursor_init(struct nouveau_crtc *);
--void nv50_cursor_fini(struct nouveau_crtc *);
- int nv50_crtc_cursor_set(struct drm_crtc *drm_crtc, struct drm_file *file_priv,
- uint32_t buffer_handle, uint32_t width,
- uint32_t height);
- int nv50_crtc_cursor_move(struct drm_crtc *drm_crtc, int x, int y);
-
- int nv04_cursor_init(struct nouveau_crtc *);
-+int nv50_cursor_init(struct nouveau_crtc *);
-
- struct nouveau_connector *
- nouveau_crtc_connector_get(struct nouveau_crtc *crtc);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
-index eb514ea..ddbabef 100644
---- a/drivers/gpu/drm/nouveau/nouveau_display.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
-@@ -105,9 +105,12 @@ nouveau_framebuffer_init(struct drm_device *dev,
- if (dev_priv->chipset == 0x50)
- nv_fb->r_format |= (tile_flags << 8);
-
-- if (!tile_flags)
-- nv_fb->r_pitch = 0x00100000 | fb->pitch;
-- else {
-+ if (!tile_flags) {
-+ if (dev_priv->card_type < NV_D0)
-+ nv_fb->r_pitch = 0x00100000 | fb->pitch;
-+ else
-+ nv_fb->r_pitch = 0x01000000 | fb->pitch;
-+ } else {
- u32 mode = nvbo->tile_mode;
- if (dev_priv->card_type >= NV_C0)
- mode >>= 4;
-diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c
-index 7beb82a..de5efe7 100644
---- a/drivers/gpu/drm/nouveau/nouveau_dp.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_dp.c
-@@ -28,418 +28,619 @@
- #include "nouveau_i2c.h"
- #include "nouveau_connector.h"
- #include "nouveau_encoder.h"
-+#include "nouveau_crtc.h"
-+
-+/******************************************************************************
-+ * aux channel util functions
-+ *****************************************************************************/
-+#define AUX_DBG(fmt, args...) do { \
-+ if (nouveau_reg_debug & NOUVEAU_REG_DEBUG_AUXCH) { \
-+ NV_PRINTK(KERN_DEBUG, dev, "AUXCH(%d): " fmt, ch, ##args); \
-+ } \
-+} while (0)
-+#define AUX_ERR(fmt, args...) NV_ERROR(dev, "AUXCH(%d): " fmt, ch, ##args)
-+
-+static void
-+auxch_fini(struct drm_device *dev, int ch)
-+{
-+ nv_mask(dev, 0x00e4e4 + (ch * 0x50), 0x00310000, 0x00000000);
-+}
-
- static int
--auxch_rd(struct drm_encoder *encoder, int address, uint8_t *buf, int size)
-+auxch_init(struct drm_device *dev, int ch)
- {
-- struct drm_device *dev = encoder->dev;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct nouveau_i2c_chan *auxch;
-- int ret;
--
-- auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
-- if (!auxch)
-- return -ENODEV;
--
-- ret = nouveau_dp_auxch(auxch, 9, address, buf, size);
-- if (ret)
-- return ret;
-+ const u32 unksel = 1; /* nfi which to use, or if it matters.. */
-+ const u32 ureq = unksel ? 0x00100000 : 0x00200000;
-+ const u32 urep = unksel ? 0x01000000 : 0x02000000;
-+ u32 ctrl, timeout;
-+
-+ /* wait up to 1ms for any previous transaction to be done... */
-+ timeout = 1000;
-+ do {
-+ ctrl = nv_rd32(dev, 0x00e4e4 + (ch * 0x50));
-+ udelay(1);
-+ if (!timeout--) {
-+ AUX_ERR("begin idle timeout 0x%08x", ctrl);
-+ return -EBUSY;
-+ }
-+ } while (ctrl & 0x03010000);
-+
-+ /* set some magic, and wait up to 1ms for it to appear */
-+ nv_mask(dev, 0x00e4e4 + (ch * 0x50), 0x00300000, ureq);
-+ timeout = 1000;
-+ do {
-+ ctrl = nv_rd32(dev, 0x00e4e4 + (ch * 0x50));
-+ udelay(1);
-+ if (!timeout--) {
-+ AUX_ERR("magic wait 0x%08x\n", ctrl);
-+ auxch_fini(dev, ch);
-+ return -EBUSY;
-+ }
-+ } while ((ctrl & 0x03000000) != urep);
-
- return 0;
- }
-
- static int
--auxch_wr(struct drm_encoder *encoder, int address, uint8_t *buf, int size)
-+auxch_tx(struct drm_device *dev, int ch, u8 type, u32 addr, u8 *data, u8 size)
- {
-- struct drm_device *dev = encoder->dev;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct nouveau_i2c_chan *auxch;
-- int ret;
-+ u32 ctrl, stat, timeout, retries;
-+ u32 xbuf[4] = {};
-+ int ret, i;
-
-- auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
-- if (!auxch)
-- return -ENODEV;
-+ AUX_DBG("%d: 0x%08x %d\n", type, addr, size);
-
-- ret = nouveau_dp_auxch(auxch, 8, address, buf, size);
-- return ret;
--}
-+ ret = auxch_init(dev, ch);
-+ if (ret)
-+ goto out;
-
--static int
--nouveau_dp_lane_count_set(struct drm_encoder *encoder, uint8_t cmd)
--{
-- struct drm_device *dev = encoder->dev;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- uint32_t tmp;
-- int or = nv_encoder->or, link = !(nv_encoder->dcb->sorconf.link & 1);
--
-- tmp = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
-- tmp &= ~(NV50_SOR_DP_CTRL_ENHANCED_FRAME_ENABLED |
-- NV50_SOR_DP_CTRL_LANE_MASK);
-- tmp |= ((1 << (cmd & DP_LANE_COUNT_MASK)) - 1) << 16;
-- if (cmd & DP_LANE_COUNT_ENHANCED_FRAME_EN)
-- tmp |= NV50_SOR_DP_CTRL_ENHANCED_FRAME_ENABLED;
-- nv_wr32(dev, NV50_SOR_DP_CTRL(or, link), tmp);
--
-- return auxch_wr(encoder, DP_LANE_COUNT_SET, &cmd, 1);
--}
-+ stat = nv_rd32(dev, 0x00e4e8 + (ch * 0x50));
-+ if (!(stat & 0x10000000)) {
-+ AUX_DBG("sink not detected\n");
-+ ret = -ENXIO;
-+ goto out;
-+ }
-
--static int
--nouveau_dp_link_bw_set(struct drm_encoder *encoder, uint8_t cmd)
--{
-- struct drm_device *dev = encoder->dev;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- uint32_t tmp;
-- int reg = 0x614300 + (nv_encoder->or * 0x800);
-+ if (!(type & 1)) {
-+ memcpy(xbuf, data, size);
-+ for (i = 0; i < 16; i += 4) {
-+ AUX_DBG("wr 0x%08x\n", xbuf[i / 4]);
-+ nv_wr32(dev, 0x00e4c0 + (ch * 0x50) + i, xbuf[i / 4]);
-+ }
-+ }
-
-- tmp = nv_rd32(dev, reg);
-- tmp &= 0xfff3ffff;
-- if (cmd == DP_LINK_BW_2_7)
-- tmp |= 0x00040000;
-- nv_wr32(dev, reg, tmp);
-+ ctrl = nv_rd32(dev, 0x00e4e4 + (ch * 0x50));
-+ ctrl &= ~0x0001f0ff;
-+ ctrl |= type << 12;
-+ ctrl |= size - 1;
-+ nv_wr32(dev, 0x00e4e0 + (ch * 0x50), addr);
-+
-+ /* retry transaction a number of times on failure... */
-+ ret = -EREMOTEIO;
-+ for (retries = 0; retries < 32; retries++) {
-+ /* reset, and delay a while if this is a retry */
-+ nv_wr32(dev, 0x00e4e4 + (ch * 0x50), 0x80000000 | ctrl);
-+ nv_wr32(dev, 0x00e4e4 + (ch * 0x50), 0x00000000 | ctrl);
-+ if (retries)
-+ udelay(400);
-+
-+ /* transaction request, wait up to 1ms for it to complete */
-+ nv_wr32(dev, 0x00e4e4 + (ch * 0x50), 0x00010000 | ctrl);
-+
-+ timeout = 1000;
-+ do {
-+ ctrl = nv_rd32(dev, 0x00e4e4 + (ch * 0x50));
-+ udelay(1);
-+ if (!timeout--) {
-+ AUX_ERR("tx req timeout 0x%08x\n", ctrl);
-+ goto out;
-+ }
-+ } while (ctrl & 0x00010000);
-
-- return auxch_wr(encoder, DP_LINK_BW_SET, &cmd, 1);
--}
-+ /* read status, and check if transaction completed ok */
-+ stat = nv_mask(dev, 0x00e4e8 + (ch * 0x50), 0, 0);
-+ if (!(stat & 0x000f0f00)) {
-+ ret = 0;
-+ break;
-+ }
-
--static int
--nouveau_dp_link_train_set(struct drm_encoder *encoder, int pattern)
--{
-- struct drm_device *dev = encoder->dev;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- uint32_t tmp;
-- uint8_t cmd;
-- int or = nv_encoder->or, link = !(nv_encoder->dcb->sorconf.link & 1);
-- int ret;
-+ AUX_DBG("%02d 0x%08x 0x%08x\n", retries, ctrl, stat);
-+ }
-
-- tmp = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
-- tmp &= ~NV50_SOR_DP_CTRL_TRAINING_PATTERN;
-- tmp |= (pattern << 24);
-- nv_wr32(dev, NV50_SOR_DP_CTRL(or, link), tmp);
-+ if (type & 1) {
-+ for (i = 0; i < 16; i += 4) {
-+ xbuf[i / 4] = nv_rd32(dev, 0x00e4d0 + (ch * 0x50) + i);
-+ AUX_DBG("rd 0x%08x\n", xbuf[i / 4]);
-+ }
-+ memcpy(data, xbuf, size);
-+ }
-
-- ret = auxch_rd(encoder, DP_TRAINING_PATTERN_SET, &cmd, 1);
-- if (ret)
-- return ret;
-- cmd &= ~DP_TRAINING_PATTERN_MASK;
-- cmd |= (pattern & DP_TRAINING_PATTERN_MASK);
-- return auxch_wr(encoder, DP_TRAINING_PATTERN_SET, &cmd, 1);
-+out:
-+ auxch_fini(dev, ch);
-+ return ret;
- }
-
--static int
--nouveau_dp_max_voltage_swing(struct drm_encoder *encoder)
-+static u32
-+dp_link_bw_get(struct drm_device *dev, int or, int link)
- {
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct drm_device *dev = encoder->dev;
-- struct bit_displayport_encoder_table_entry *dpse;
-- struct bit_displayport_encoder_table *dpe;
-- int i, dpe_headerlen, max_vs = 0;
--
-- dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
-- if (!dpe)
-- return false;
-- dpse = (void *)((char *)dpe + dpe_headerlen);
-+ u32 ctrl = nv_rd32(dev, 0x614300 + (or * 0x800));
-+ if (!(ctrl & 0x000c0000))
-+ return 162000;
-+ return 270000;
-+}
-
-- for (i = 0; i < dpe_headerlen; i++, dpse++) {
-- if (dpse->vs_level > max_vs)
-- max_vs = dpse->vs_level;
-+static int
-+dp_lane_count_get(struct drm_device *dev, int or, int link)
-+{
-+ u32 ctrl = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
-+ switch (ctrl & 0x000f0000) {
-+ case 0x00010000: return 1;
-+ case 0x00030000: return 2;
-+ default:
-+ return 4;
- }
--
-- return max_vs;
- }
-
--static int
--nouveau_dp_max_pre_emphasis(struct drm_encoder *encoder, int vs)
-+void
-+nouveau_dp_tu_update(struct drm_device *dev, int or, int link, u32 clk, u32 bpp)
- {
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct drm_device *dev = encoder->dev;
-- struct bit_displayport_encoder_table_entry *dpse;
-- struct bit_displayport_encoder_table *dpe;
-- int i, dpe_headerlen, max_pre = 0;
-+ const u32 symbol = 100000;
-+ int bestTU = 0, bestVTUi = 0, bestVTUf = 0, bestVTUa = 0;
-+ int TU, VTUi, VTUf, VTUa;
-+ u64 link_data_rate, link_ratio, unk;
-+ u32 best_diff = 64 * symbol;
-+ u32 link_nr, link_bw, r;
-+
-+ /* calculate packed data rate for each lane */
-+ link_nr = dp_lane_count_get(dev, or, link);
-+ link_data_rate = (clk * bpp / 8) / link_nr;
-+
-+ /* calculate ratio of packed data rate to link symbol rate */
-+ link_bw = dp_link_bw_get(dev, or, link);
-+ link_ratio = link_data_rate * symbol;
-+ r = do_div(link_ratio, link_bw);
-+
-+ for (TU = 64; TU >= 32; TU--) {
-+ /* calculate average number of valid symbols in each TU */
-+ u32 tu_valid = link_ratio * TU;
-+ u32 calc, diff;
-+
-+ /* find a hw representation for the fraction.. */
-+ VTUi = tu_valid / symbol;
-+ calc = VTUi * symbol;
-+ diff = tu_valid - calc;
-+ if (diff) {
-+ if (diff >= (symbol / 2)) {
-+ VTUf = symbol / (symbol - diff);
-+ if (symbol - (VTUf * diff))
-+ VTUf++;
-+
-+ if (VTUf <= 15) {
-+ VTUa = 1;
-+ calc += symbol - (symbol / VTUf);
-+ } else {
-+ VTUa = 0;
-+ VTUf = 1;
-+ calc += symbol;
-+ }
-+ } else {
-+ VTUa = 0;
-+ VTUf = min((int)(symbol / diff), 15);
-+ calc += symbol / VTUf;
-+ }
-
-- dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
-- if (!dpe)
-- return false;
-- dpse = (void *)((char *)dpe + dpe_headerlen);
-+ diff = calc - tu_valid;
-+ } else {
-+ /* no remainder, but the hw doesn't like the fractional
-+ * part to be zero. decrement the integer part and
-+ * have the fraction add a whole symbol back
-+ */
-+ VTUa = 0;
-+ VTUf = 1;
-+ VTUi--;
-+ }
-
-- for (i = 0; i < dpe_headerlen; i++, dpse++) {
-- if (dpse->vs_level != vs)
-- continue;
-+ if (diff < best_diff) {
-+ best_diff = diff;
-+ bestTU = TU;
-+ bestVTUa = VTUa;
-+ bestVTUf = VTUf;
-+ bestVTUi = VTUi;
-+ if (diff == 0)
-+ break;
-+ }
-+ }
-
-- if (dpse->pre_level > max_pre)
-- max_pre = dpse->pre_level;
-+ if (!bestTU) {
-+ NV_ERROR(dev, "DP: unable to find suitable config\n");
-+ return;
- }
-
-- return max_pre;
-+ /* XXX close to vbios numbers, but not right */
-+ unk = (symbol - link_ratio) * bestTU;
-+ unk *= link_ratio;
-+ r = do_div(unk, symbol);
-+ r = do_div(unk, symbol);
-+ unk += 6;
-+
-+ nv_mask(dev, NV50_SOR_DP_CTRL(or, link), 0x000001fc, bestTU << 2);
-+ nv_mask(dev, NV50_SOR_DP_SCFG(or, link), 0x010f7f3f, bestVTUa << 24 |
-+ bestVTUf << 16 |
-+ bestVTUi << 8 |
-+ unk);
- }
-
--static bool
--nouveau_dp_link_train_adjust(struct drm_encoder *encoder, uint8_t *config)
-+u8 *
-+nouveau_dp_bios_data(struct drm_device *dev, struct dcb_entry *dcb, u8 **entry)
- {
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct drm_device *dev = encoder->dev;
-- struct bit_displayport_encoder_table *dpe;
-- int ret, i, dpe_headerlen, vs = 0, pre = 0;
-- uint8_t request[2];
--
-- dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
-- if (!dpe)
-- return false;
--
-- ret = auxch_rd(encoder, DP_ADJUST_REQUEST_LANE0_1, request, 2);
-- if (ret)
-- return false;
--
-- NV_DEBUG_KMS(dev, "\t\tadjust 0x%02x 0x%02x\n", request[0], request[1]);
--
-- /* Keep all lanes at the same level.. */
-- for (i = 0; i < nv_encoder->dp.link_nr; i++) {
-- int lane_req = (request[i >> 1] >> ((i & 1) << 2)) & 0xf;
-- int lane_vs = lane_req & 3;
-- int lane_pre = (lane_req >> 2) & 3;
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nvbios *bios = &dev_priv->vbios;
-+ struct bit_entry d;
-+ u8 *table;
-+ int i;
-+
-+ if (bit_table(dev, 'd', &d)) {
-+ NV_ERROR(dev, "BIT 'd' table not found\n");
-+ return NULL;
-+ }
-
-- if (lane_vs > vs)
-- vs = lane_vs;
-- if (lane_pre > pre)
-- pre = lane_pre;
-+ if (d.version != 1) {
-+ NV_ERROR(dev, "BIT 'd' table version %d unknown\n", d.version);
-+ return NULL;
- }
-
-- if (vs >= nouveau_dp_max_voltage_swing(encoder)) {
-- vs = nouveau_dp_max_voltage_swing(encoder);
-- vs |= 4;
-+ table = ROMPTR(bios, d.data[0]);
-+ if (!table) {
-+ NV_ERROR(dev, "displayport table pointer invalid\n");
-+ return NULL;
- }
-
-- if (pre >= nouveau_dp_max_pre_emphasis(encoder, vs & 3)) {
-- pre = nouveau_dp_max_pre_emphasis(encoder, vs & 3);
-- pre |= 4;
-+ switch (table[0]) {
-+ case 0x20:
-+ case 0x21:
-+ case 0x30:
-+ break;
-+ default:
-+ NV_ERROR(dev, "displayport table 0x%02x unknown\n", table[0]);
-+ return NULL;
- }
-
-- /* Update the configuration for all lanes.. */
-- for (i = 0; i < nv_encoder->dp.link_nr; i++)
-- config[i] = (pre << 3) | vs;
-+ for (i = 0; i < table[3]; i++) {
-+ *entry = ROMPTR(bios, table[table[1] + (i * table[2])]);
-+ if (*entry && bios_encoder_match(dcb, ROM32((*entry)[0])))
-+ return table;
-+ }
-
-- return true;
-+ NV_ERROR(dev, "displayport encoder table not found\n");
-+ return NULL;
- }
-
--static bool
--nouveau_dp_link_train_commit(struct drm_encoder *encoder, uint8_t *config)
--{
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct drm_device *dev = encoder->dev;
-- struct bit_displayport_encoder_table_entry *dpse;
-- struct bit_displayport_encoder_table *dpe;
-- int or = nv_encoder->or, link = !(nv_encoder->dcb->sorconf.link & 1);
-- int dpe_headerlen, ret, i;
-+/******************************************************************************
-+ * link training
-+ *****************************************************************************/
-+struct dp_state {
-+ struct dcb_entry *dcb;
-+ u8 *table;
-+ u8 *entry;
-+ int auxch;
-+ int crtc;
-+ int or;
-+ int link;
-+ u8 *dpcd;
-+ int link_nr;
-+ u32 link_bw;
-+ u8 stat[6];
-+ u8 conf[4];
-+};
-
-- NV_DEBUG_KMS(dev, "\t\tconfig 0x%02x 0x%02x 0x%02x 0x%02x\n",
-- config[0], config[1], config[2], config[3]);
-+static void
-+dp_set_link_config(struct drm_device *dev, struct dp_state *dp)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ int or = dp->or, link = dp->link;
-+ u8 *entry, sink[2];
-+ u32 dp_ctrl;
-+ u16 script;
-+
-+ NV_DEBUG_KMS(dev, "%d lanes at %d KB/s\n", dp->link_nr, dp->link_bw);
-+
-+ /* set selected link rate on source */
-+ switch (dp->link_bw) {
-+ case 270000:
-+ nv_mask(dev, 0x614300 + (or * 0x800), 0x000c0000, 0x00040000);
-+ sink[0] = DP_LINK_BW_2_7;
-+ break;
-+ default:
-+ nv_mask(dev, 0x614300 + (or * 0x800), 0x000c0000, 0x00000000);
-+ sink[0] = DP_LINK_BW_1_62;
-+ break;
-+ }
-
-- dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
-- if (!dpe)
-- return false;
-- dpse = (void *)((char *)dpe + dpe_headerlen);
-+ /* offset +0x0a of each dp encoder table entry is a pointer to another
-+ * table, that has (among other things) pointers to more scripts that
-+ * need to be executed, this time depending on link speed.
-+ */
-+ entry = ROMPTR(&dev_priv->vbios, dp->entry[10]);
-+ if (entry) {
-+ if (dp->table[0] < 0x30) {
-+ while (dp->link_bw < (ROM16(entry[0]) * 10))
-+ entry += 4;
-+ script = ROM16(entry[2]);
-+ } else {
-+ while (dp->link_bw < (entry[0] * 27000))
-+ entry += 3;
-+ script = ROM16(entry[1]);
-+ }
-
-- for (i = 0; i < dpe->record_nr; i++, dpse++) {
-- if (dpse->vs_level == (config[0] & 3) &&
-- dpse->pre_level == ((config[0] >> 3) & 3))
-- break;
-+ nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc);
- }
-- BUG_ON(i == dpe->record_nr);
--
-- for (i = 0; i < nv_encoder->dp.link_nr; i++) {
-- const int shift[4] = { 16, 8, 0, 24 };
-- uint32_t mask = 0xff << shift[i];
-- uint32_t reg0, reg1, reg2;
--
-- reg0 = nv_rd32(dev, NV50_SOR_DP_UNK118(or, link)) & ~mask;
-- reg0 |= (dpse->reg0 << shift[i]);
-- reg1 = nv_rd32(dev, NV50_SOR_DP_UNK120(or, link)) & ~mask;
-- reg1 |= (dpse->reg1 << shift[i]);
-- reg2 = nv_rd32(dev, NV50_SOR_DP_UNK130(or, link)) & 0xffff00ff;
-- reg2 |= (dpse->reg2 << 8);
-- nv_wr32(dev, NV50_SOR_DP_UNK118(or, link), reg0);
-- nv_wr32(dev, NV50_SOR_DP_UNK120(or, link), reg1);
-- nv_wr32(dev, NV50_SOR_DP_UNK130(or, link), reg2);
-+
-+ /* configure lane count on the source */
-+ dp_ctrl = ((1 << dp->link_nr) - 1) << 16;
-+ sink[1] = dp->link_nr;
-+ if (dp->dpcd[2] & DP_ENHANCED_FRAME_CAP) {
-+ dp_ctrl |= 0x00004000;
-+ sink[1] |= DP_LANE_COUNT_ENHANCED_FRAME_EN;
- }
-
-- ret = auxch_wr(encoder, DP_TRAINING_LANE0_SET, config, 4);
-- if (ret)
-- return false;
-+ nv_mask(dev, NV50_SOR_DP_CTRL(or, link), 0x001f4000, dp_ctrl);
-
-- return true;
-+ /* inform the sink of the new configuration */
-+ auxch_tx(dev, dp->auxch, 8, DP_LINK_BW_SET, sink, 2);
- }
-
--bool
--nouveau_dp_link_train(struct drm_encoder *encoder)
-+static void
-+dp_set_training_pattern(struct drm_device *dev, struct dp_state *dp, u8 tp)
- {
-- struct drm_device *dev = encoder->dev;
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio;
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-- struct nouveau_connector *nv_connector;
-- struct bit_displayport_encoder_table *dpe;
-- int dpe_headerlen;
-- uint8_t config[4], status[3];
-- bool cr_done, cr_max_vs, eq_done, hpd_state;
-- int ret = 0, i, tries, voltage;
-+ u8 sink_tp;
-
-- NV_DEBUG_KMS(dev, "link training!!\n");
-+ NV_DEBUG_KMS(dev, "training pattern %d\n", tp);
-
-- nv_connector = nouveau_encoder_connector_get(nv_encoder);
-- if (!nv_connector)
-- return false;
-+ nv_mask(dev, NV50_SOR_DP_CTRL(dp->or, dp->link), 0x0f000000, tp << 24);
-
-- dpe = nouveau_bios_dp_table(dev, nv_encoder->dcb, &dpe_headerlen);
-- if (!dpe) {
-- NV_ERROR(dev, "SOR-%d: no DP encoder table!\n", nv_encoder->or);
-- return false;
-- }
-+ auxch_tx(dev, dp->auxch, 9, DP_TRAINING_PATTERN_SET, &sink_tp, 1);
-+ sink_tp &= ~DP_TRAINING_PATTERN_MASK;
-+ sink_tp |= tp;
-+ auxch_tx(dev, dp->auxch, 8, DP_TRAINING_PATTERN_SET, &sink_tp, 1);
-+}
-
-- /* disable hotplug detect, this flips around on some panels during
-- * link training.
-- */
-- hpd_state = pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, false);
-+static const u8 nv50_lane_map[] = { 16, 8, 0, 24 };
-+static const u8 nvaf_lane_map[] = { 24, 16, 8, 0 };
-+
-+static int
-+dp_link_train_commit(struct drm_device *dev, struct dp_state *dp)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ u32 mask = 0, drv = 0, pre = 0, unk = 0;
-+ const u8 *shifts;
-+ int link = dp->link;
-+ int or = dp->or;
-+ int i;
-+
-+ if (dev_priv->chipset != 0xaf)
-+ shifts = nv50_lane_map;
-+ else
-+ shifts = nvaf_lane_map;
-+
-+ for (i = 0; i < dp->link_nr; i++) {
-+ u8 *conf = dp->entry + dp->table[4];
-+ u8 lane = (dp->stat[4 + (i >> 1)] >> ((i & 1) * 4)) & 0xf;
-+ u8 lpre = (lane & 0x0c) >> 2;
-+ u8 lvsw = (lane & 0x03) >> 0;
-+
-+ mask |= 0xff << shifts[i];
-+ unk |= 1 << (shifts[i] >> 3);
-+
-+ dp->conf[i] = (lpre << 3) | lvsw;
-+ if (lvsw == DP_TRAIN_VOLTAGE_SWING_1200)
-+ dp->conf[i] |= DP_TRAIN_MAX_SWING_REACHED;
-+ if (lpre == DP_TRAIN_PRE_EMPHASIS_9_5)
-+ dp->conf[i] |= DP_TRAIN_MAX_PRE_EMPHASIS_REACHED;
-+
-+ NV_DEBUG_KMS(dev, "config lane %d %02x\n", i, dp->conf[i]);
-+
-+ if (dp->table[0] < 0x30) {
-+ u8 *last = conf + (dp->entry[4] * dp->table[5]);
-+ while (lvsw != conf[0] || lpre != conf[1]) {
-+ conf += dp->table[5];
-+ if (conf >= last)
-+ return -EINVAL;
-+ }
-+
-+ conf += 2;
-+ } else {
-+ /* no lookup table anymore, set entries for each
-+ * combination of voltage swing and pre-emphasis
-+ * level allowed by the DP spec.
-+ */
-+ switch (lvsw) {
-+ case 0: lpre += 0; break;
-+ case 1: lpre += 4; break;
-+ case 2: lpre += 7; break;
-+ case 3: lpre += 9; break;
-+ }
-+
-+ conf = conf + (lpre * dp->table[5]);
-+ conf++;
-+ }
-
-- if (dpe->script0) {
-- NV_DEBUG_KMS(dev, "SOR-%d: running DP script 0\n", nv_encoder->or);
-- nouveau_bios_run_init_table(dev, le16_to_cpu(dpe->script0),
-- nv_encoder->dcb);
-+ drv |= conf[0] << shifts[i];
-+ pre |= conf[1] << shifts[i];
-+ unk = (unk & ~0x0000ff00) | (conf[2] << 8);
- }
-
--train:
-- cr_done = eq_done = false;
-+ nv_mask(dev, NV50_SOR_DP_UNK118(or, link), mask, drv);
-+ nv_mask(dev, NV50_SOR_DP_UNK120(or, link), mask, pre);
-+ nv_mask(dev, NV50_SOR_DP_UNK130(or, link), 0x0000ff0f, unk);
-
-- /* set link configuration */
-- NV_DEBUG_KMS(dev, "\tbegin train: bw %d, lanes %d\n",
-- nv_encoder->dp.link_bw, nv_encoder->dp.link_nr);
-+ return auxch_tx(dev, dp->auxch, 8, DP_TRAINING_LANE0_SET, dp->conf, 4);
-+}
-
-- ret = nouveau_dp_link_bw_set(encoder, nv_encoder->dp.link_bw);
-- if (ret)
-- return false;
-+static int
-+dp_link_train_update(struct drm_device *dev, struct dp_state *dp, u32 delay)
-+{
-+ int ret;
-
-- config[0] = nv_encoder->dp.link_nr;
-- if (nv_encoder->dp.dpcd_version >= 0x11 &&
-- nv_encoder->dp.enhanced_frame)
-- config[0] |= DP_LANE_COUNT_ENHANCED_FRAME_EN;
-+ udelay(delay);
-
-- ret = nouveau_dp_lane_count_set(encoder, config[0]);
-+ ret = auxch_tx(dev, dp->auxch, 9, DP_LANE0_1_STATUS, dp->stat, 6);
- if (ret)
-- return false;
-+ return ret;
-
-- /* clock recovery */
-- NV_DEBUG_KMS(dev, "\tbegin cr\n");
-- ret = nouveau_dp_link_train_set(encoder, DP_TRAINING_PATTERN_1);
-- if (ret)
-- goto stop;
-+ NV_DEBUG_KMS(dev, "status %02x %02x %02x %02x %02x %02x\n",
-+ dp->stat[0], dp->stat[1], dp->stat[2], dp->stat[3],
-+ dp->stat[4], dp->stat[5]);
-+ return 0;
-+}
-
-- tries = 0;
-- voltage = -1;
-- memset(config, 0x00, sizeof(config));
-- for (;;) {
-- if (!nouveau_dp_link_train_commit(encoder, config))
-- break;
-+static int
-+dp_link_train_cr(struct drm_device *dev, struct dp_state *dp)
-+{
-+ bool cr_done = false, abort = false;
-+ int voltage = dp->conf[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
-+ int tries = 0, i;
-
-- udelay(100);
-+ dp_set_training_pattern(dev, dp, DP_TRAINING_PATTERN_1);
-
-- ret = auxch_rd(encoder, DP_LANE0_1_STATUS, status, 2);
-- if (ret)
-+ do {
-+ if (dp_link_train_commit(dev, dp) ||
-+ dp_link_train_update(dev, dp, 100))
- break;
-- NV_DEBUG_KMS(dev, "\t\tstatus: 0x%02x 0x%02x\n",
-- status[0], status[1]);
-
- cr_done = true;
-- cr_max_vs = false;
-- for (i = 0; i < nv_encoder->dp.link_nr; i++) {
-- int lane = (status[i >> 1] >> ((i & 1) * 4)) & 0xf;
--
-+ for (i = 0; i < dp->link_nr; i++) {
-+ u8 lane = (dp->stat[i >> 1] >> ((i & 1) * 4)) & 0xf;
- if (!(lane & DP_LANE_CR_DONE)) {
- cr_done = false;
-- if (config[i] & DP_TRAIN_MAX_PRE_EMPHASIS_REACHED)
-- cr_max_vs = true;
-+ if (dp->conf[i] & DP_TRAIN_MAX_SWING_REACHED)
-+ abort = true;
- break;
- }
- }
-
-- if ((config[0] & DP_TRAIN_VOLTAGE_SWING_MASK) != voltage) {
-- voltage = config[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
-+ if ((dp->conf[0] & DP_TRAIN_VOLTAGE_SWING_MASK) != voltage) {
-+ voltage = dp->conf[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
- tries = 0;
- }
-+ } while (!cr_done && !abort && ++tries < 5);
-
-- if (cr_done || cr_max_vs || (++tries == 5))
-- break;
--
-- if (!nouveau_dp_link_train_adjust(encoder, config))
-- break;
-- }
--
-- if (!cr_done)
-- goto stop;
-+ return cr_done ? 0 : -1;
-+}
-
-- /* channel equalisation */
-- NV_DEBUG_KMS(dev, "\tbegin eq\n");
-- ret = nouveau_dp_link_train_set(encoder, DP_TRAINING_PATTERN_2);
-- if (ret)
-- goto stop;
-+static int
-+dp_link_train_eq(struct drm_device *dev, struct dp_state *dp)
-+{
-+ bool eq_done, cr_done = true;
-+ int tries = 0, i;
-
-- for (tries = 0; tries <= 5; tries++) {
-- udelay(400);
-+ dp_set_training_pattern(dev, dp, DP_TRAINING_PATTERN_2);
-
-- ret = auxch_rd(encoder, DP_LANE0_1_STATUS, status, 3);
-- if (ret)
-+ do {
-+ if (dp_link_train_update(dev, dp, 400))
- break;
-- NV_DEBUG_KMS(dev, "\t\tstatus: 0x%02x 0x%02x\n",
-- status[0], status[1]);
-
-- eq_done = true;
-- if (!(status[2] & DP_INTERLANE_ALIGN_DONE))
-- eq_done = false;
--
-- for (i = 0; eq_done && i < nv_encoder->dp.link_nr; i++) {
-- int lane = (status[i >> 1] >> ((i & 1) * 4)) & 0xf;
--
-- if (!(lane & DP_LANE_CR_DONE)) {
-+ eq_done = !!(dp->stat[2] & DP_INTERLANE_ALIGN_DONE);
-+ for (i = 0; i < dp->link_nr && eq_done; i++) {
-+ u8 lane = (dp->stat[i >> 1] >> ((i & 1) * 4)) & 0xf;
-+ if (!(lane & DP_LANE_CR_DONE))
- cr_done = false;
-- break;
-- }
--
- if (!(lane & DP_LANE_CHANNEL_EQ_DONE) ||
-- !(lane & DP_LANE_SYMBOL_LOCKED)) {
-+ !(lane & DP_LANE_SYMBOL_LOCKED))
- eq_done = false;
-- break;
-- }
- }
-
-- if (eq_done || !cr_done)
-+ if (dp_link_train_commit(dev, dp))
- break;
-+ } while (!eq_done && cr_done && ++tries <= 5);
-
-- if (!nouveau_dp_link_train_adjust(encoder, config) ||
-- !nouveau_dp_link_train_commit(encoder, config))
-- break;
-- }
-+ return eq_done ? 0 : -1;
-+}
-
--stop:
-- /* end link training */
-- ret = nouveau_dp_link_train_set(encoder, DP_TRAINING_PATTERN_DISABLE);
-- if (ret)
-+bool
-+nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate)
-+{
-+ struct drm_nouveau_private *dev_priv = encoder->dev->dev_private;
-+ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio;
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
-+ struct nouveau_connector *nv_connector =
-+ nouveau_encoder_connector_get(nv_encoder);
-+ struct drm_device *dev = encoder->dev;
-+ struct nouveau_i2c_chan *auxch;
-+ const u32 bw_list[] = { 270000, 162000, 0 };
-+ const u32 *link_bw = bw_list;
-+ struct dp_state dp;
-+
-+ auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
-+ if (!auxch)
- return false;
-
-- /* retry at a lower setting, if possible */
-- if (!ret && !(eq_done && cr_done)) {
-- NV_DEBUG_KMS(dev, "\twe failed\n");
-- if (nv_encoder->dp.link_bw != DP_LINK_BW_1_62) {
-- NV_DEBUG_KMS(dev, "retry link training at low rate\n");
-- nv_encoder->dp.link_bw = DP_LINK_BW_1_62;
-- goto train;
-- }
-+ dp.table = nouveau_dp_bios_data(dev, nv_encoder->dcb, &dp.entry);
-+ if (!dp.table)
-+ return -EINVAL;
-+
-+ dp.dcb = nv_encoder->dcb;
-+ dp.crtc = nv_crtc->index;
-+ dp.auxch = auxch->rd;
-+ dp.or = nv_encoder->or;
-+ dp.link = !(nv_encoder->dcb->sorconf.link & 1);
-+ dp.dpcd = nv_encoder->dp.dpcd;
-+
-+ /* some sinks toggle hotplug in response to some of the actions
-+ * we take during link training (DP_SET_POWER is one), we need
-+ * to ignore them for the moment to avoid races.
-+ */
-+ pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, false);
-+
-+ /* enable down-spreading, if possible */
-+ if (dp.table[1] >= 16) {
-+ u16 script = ROM16(dp.entry[14]);
-+ if (nv_encoder->dp.dpcd[3] & 1)
-+ script = ROM16(dp.entry[12]);
-+
-+ nouveau_bios_run_init_table(dev, script, dp.dcb, dp.crtc);
- }
-
-- if (dpe->script1) {
-- NV_DEBUG_KMS(dev, "SOR-%d: running DP script 1\n", nv_encoder->or);
-- nouveau_bios_run_init_table(dev, le16_to_cpu(dpe->script1),
-- nv_encoder->dcb);
-+ /* execute pre-train script from vbios */
-+ nouveau_bios_run_init_table(dev, ROM16(dp.entry[6]), dp.dcb, dp.crtc);
-+
-+ /* start off at highest link rate supported by encoder and display */
-+ while (*link_bw > nv_encoder->dp.link_bw)
-+ link_bw++;
-+
-+ while (link_bw[0]) {
-+ /* find minimum required lane count at this link rate */
-+ dp.link_nr = nv_encoder->dp.link_nr;
-+ while ((dp.link_nr >> 1) * link_bw[0] > datarate)
-+ dp.link_nr >>= 1;
-+
-+ /* drop link rate to minimum with this lane count */
-+ while ((link_bw[1] * dp.link_nr) > datarate)
-+ link_bw++;
-+ dp.link_bw = link_bw[0];
-+
-+ /* program selected link configuration */
-+ dp_set_link_config(dev, &dp);
-+
-+ /* attempt to train the link at this configuration */
-+ memset(dp.stat, 0x00, sizeof(dp.stat));
-+ if (!dp_link_train_cr(dev, &dp) &&
-+ !dp_link_train_eq(dev, &dp))
-+ break;
-+
-+ /* retry at lower rate */
-+ link_bw++;
- }
-
-- /* re-enable hotplug detect */
-- pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, hpd_state);
-+ /* finish link training */
-+ dp_set_training_pattern(dev, &dp, DP_TRAINING_PATTERN_DISABLE);
-
-- return eq_done;
-+ /* execute post-train script from vbios */
-+ nouveau_bios_run_init_table(dev, ROM16(dp.entry[8]), dp.dcb, dp.crtc);
-+
-+ /* re-enable hotplug detect */
-+ pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, true);
-+ return true;
- }
-
- bool
-@@ -447,31 +648,34 @@ nouveau_dp_detect(struct drm_encoder *encoder)
- {
- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
- struct drm_device *dev = encoder->dev;
-- uint8_t dpcd[4];
-+ struct nouveau_i2c_chan *auxch;
-+ u8 *dpcd = nv_encoder->dp.dpcd;
- int ret;
-
-- ret = auxch_rd(encoder, 0x0000, dpcd, 4);
-- if (ret)
-+ auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
-+ if (!auxch)
- return false;
-
-- NV_DEBUG_KMS(dev, "encoder: link_bw %d, link_nr %d\n"
-- "display: link_bw %d, link_nr %d version 0x%02x\n",
-- nv_encoder->dcb->dpconf.link_bw,
-- nv_encoder->dcb->dpconf.link_nr,
-- dpcd[1], dpcd[2] & 0x0f, dpcd[0]);
-+ ret = auxch_tx(dev, auxch->rd, 9, DP_DPCD_REV, dpcd, 8);
-+ if (ret)
-+ return false;
-
-- nv_encoder->dp.dpcd_version = dpcd[0];
-+ nv_encoder->dp.link_bw = 27000 * dpcd[1];
-+ nv_encoder->dp.link_nr = dpcd[2] & DP_MAX_LANE_COUNT_MASK;
-
-- nv_encoder->dp.link_bw = dpcd[1];
-- if (nv_encoder->dp.link_bw != DP_LINK_BW_1_62 &&
-- !nv_encoder->dcb->dpconf.link_bw)
-- nv_encoder->dp.link_bw = DP_LINK_BW_1_62;
-+ NV_DEBUG_KMS(dev, "display: %dx%d dpcd 0x%02x\n",
-+ nv_encoder->dp.link_nr, nv_encoder->dp.link_bw, dpcd[0]);
-+ NV_DEBUG_KMS(dev, "encoder: %dx%d\n",
-+ nv_encoder->dcb->dpconf.link_nr,
-+ nv_encoder->dcb->dpconf.link_bw);
-
-- nv_encoder->dp.link_nr = dpcd[2] & DP_MAX_LANE_COUNT_MASK;
-- if (nv_encoder->dp.link_nr > nv_encoder->dcb->dpconf.link_nr)
-+ if (nv_encoder->dcb->dpconf.link_nr < nv_encoder->dp.link_nr)
- nv_encoder->dp.link_nr = nv_encoder->dcb->dpconf.link_nr;
-+ if (nv_encoder->dcb->dpconf.link_bw < nv_encoder->dp.link_bw)
-+ nv_encoder->dp.link_bw = nv_encoder->dcb->dpconf.link_bw;
-
-- nv_encoder->dp.enhanced_frame = (dpcd[2] & DP_ENHANCED_FRAME_CAP);
-+ NV_DEBUG_KMS(dev, "maximum: %dx%d\n",
-+ nv_encoder->dp.link_nr, nv_encoder->dp.link_bw);
-
- return true;
- }
-@@ -480,105 +684,13 @@ int
- nouveau_dp_auxch(struct nouveau_i2c_chan *auxch, int cmd, int addr,
- uint8_t *data, int data_nr)
- {
-- struct drm_device *dev = auxch->dev;
-- uint32_t tmp, ctrl, stat = 0, data32[4] = {};
-- int ret = 0, i, index = auxch->rd;
--
-- NV_DEBUG_KMS(dev, "ch %d cmd %d addr 0x%x len %d\n", index, cmd, addr, data_nr);
--
-- tmp = nv_rd32(dev, NV50_AUXCH_CTRL(auxch->rd));
-- nv_wr32(dev, NV50_AUXCH_CTRL(auxch->rd), tmp | 0x00100000);
-- tmp = nv_rd32(dev, NV50_AUXCH_CTRL(auxch->rd));
-- if (!(tmp & 0x01000000)) {
-- NV_ERROR(dev, "expected bit 24 == 1, got 0x%08x\n", tmp);
-- ret = -EIO;
-- goto out;
-- }
--
-- for (i = 0; i < 3; i++) {
-- tmp = nv_rd32(dev, NV50_AUXCH_STAT(auxch->rd));
-- if (tmp & NV50_AUXCH_STAT_STATE_READY)
-- break;
-- udelay(100);
-- }
--
-- if (i == 3) {
-- ret = -EBUSY;
-- goto out;
-- }
--
-- if (!(cmd & 1)) {
-- memcpy(data32, data, data_nr);
-- for (i = 0; i < 4; i++) {
-- NV_DEBUG_KMS(dev, "wr %d: 0x%08x\n", i, data32[i]);
-- nv_wr32(dev, NV50_AUXCH_DATA_OUT(index, i), data32[i]);
-- }
-- }
--
-- nv_wr32(dev, NV50_AUXCH_ADDR(index), addr);
-- ctrl = nv_rd32(dev, NV50_AUXCH_CTRL(index));
-- ctrl &= ~(NV50_AUXCH_CTRL_CMD | NV50_AUXCH_CTRL_LEN);
-- ctrl |= (cmd << NV50_AUXCH_CTRL_CMD_SHIFT);
-- ctrl |= ((data_nr - 1) << NV50_AUXCH_CTRL_LEN_SHIFT);
--
-- for (i = 0; i < 16; i++) {
-- nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x80000000);
-- nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl);
-- nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x00010000);
-- if (!nv_wait(dev, NV50_AUXCH_CTRL(index),
-- 0x00010000, 0x00000000)) {
-- NV_ERROR(dev, "expected bit 16 == 0, got 0x%08x\n",
-- nv_rd32(dev, NV50_AUXCH_CTRL(index)));
-- ret = -EBUSY;
-- goto out;
-- }
--
-- udelay(400);
--
-- stat = nv_rd32(dev, NV50_AUXCH_STAT(index));
-- if ((stat & NV50_AUXCH_STAT_REPLY_AUX) !=
-- NV50_AUXCH_STAT_REPLY_AUX_DEFER)
-- break;
-- }
--
-- if (i == 16) {
-- NV_ERROR(dev, "auxch DEFER too many times, bailing\n");
-- ret = -EREMOTEIO;
-- goto out;
-- }
--
-- if (cmd & 1) {
-- if ((stat & NV50_AUXCH_STAT_COUNT) != data_nr) {
-- ret = -EREMOTEIO;
-- goto out;
-- }
--
-- for (i = 0; i < 4; i++) {
-- data32[i] = nv_rd32(dev, NV50_AUXCH_DATA_IN(index, i));
-- NV_DEBUG_KMS(dev, "rd %d: 0x%08x\n", i, data32[i]);
-- }
-- memcpy(data, data32, data_nr);
-- }
--
--out:
-- tmp = nv_rd32(dev, NV50_AUXCH_CTRL(auxch->rd));
-- nv_wr32(dev, NV50_AUXCH_CTRL(auxch->rd), tmp & ~0x00100000);
-- tmp = nv_rd32(dev, NV50_AUXCH_CTRL(auxch->rd));
-- if (tmp & 0x01000000) {
-- NV_ERROR(dev, "expected bit 24 == 0, got 0x%08x\n", tmp);
-- ret = -EIO;
-- }
--
-- udelay(400);
--
-- return ret ? ret : (stat & NV50_AUXCH_STAT_REPLY);
-+ return auxch_tx(auxch->dev, auxch->rd, cmd, addr, data, data_nr);
- }
-
- static int
- nouveau_dp_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
- {
- struct nouveau_i2c_chan *auxch = (struct nouveau_i2c_chan *)adap;
-- struct drm_device *dev = auxch->dev;
- struct i2c_msg *msg = msgs;
- int ret, mcnt = num;
-
-@@ -602,19 +714,6 @@ nouveau_dp_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
- if (ret < 0)
- return ret;
-
-- switch (ret & NV50_AUXCH_STAT_REPLY_I2C) {
-- case NV50_AUXCH_STAT_REPLY_I2C_ACK:
-- break;
-- case NV50_AUXCH_STAT_REPLY_I2C_NACK:
-- return -EREMOTEIO;
-- case NV50_AUXCH_STAT_REPLY_I2C_DEFER:
-- udelay(100);
-- continue;
-- default:
-- NV_ERROR(dev, "bad auxch reply: 0x%08x\n", ret);
-- return -EREMOTEIO;
-- }
--
- ptr += cnt;
- remaining -= cnt;
- }
-diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
-index b30ddd8..c1e01f3 100644
---- a/drivers/gpu/drm/nouveau/nouveau_drv.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
-@@ -41,7 +41,7 @@ int nouveau_agpmode = -1;
- module_param_named(agpmode, nouveau_agpmode, int, 0400);
-
- MODULE_PARM_DESC(modeset, "Enable kernel modesetting");
--static int nouveau_modeset = -1; /* kms */
-+int nouveau_modeset = -1;
- module_param_named(modeset, nouveau_modeset, int, 0400);
-
- MODULE_PARM_DESC(vbios, "Override default VBIOS location");
-diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
-index d7d51de..29837da 100644
---- a/drivers/gpu/drm/nouveau/nouveau_drv.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
-@@ -414,12 +414,13 @@ struct nouveau_gpio_engine {
- };
-
- struct nouveau_pm_voltage_level {
-- u8 voltage;
-- u8 vid;
-+ u32 voltage; /* microvolts */
-+ u8 vid;
- };
-
- struct nouveau_pm_voltage {
- bool supported;
-+ u8 version;
- u8 vid_mask;
-
- struct nouveau_pm_voltage_level *level;
-@@ -428,17 +429,48 @@ struct nouveau_pm_voltage {
-
- struct nouveau_pm_memtiming {
- int id;
-- u32 reg_100220;
-- u32 reg_100224;
-- u32 reg_100228;
-- u32 reg_10022c;
-- u32 reg_100230;
-- u32 reg_100234;
-- u32 reg_100238;
-- u32 reg_10023c;
-- u32 reg_100240;
-+ u32 reg_0; /* 0x10f290 on Fermi, 0x100220 for older */
-+ u32 reg_1;
-+ u32 reg_2;
-+ u32 reg_3;
-+ u32 reg_4;
-+ u32 reg_5;
-+ u32 reg_6;
-+ u32 reg_7;
-+ u32 reg_8;
-+ /* To be written to 0x1002c0 */
-+ u8 CL;
-+ u8 WR;
- };
-
-+struct nouveau_pm_tbl_header{
-+ u8 version;
-+ u8 header_len;
-+ u8 entry_cnt;
-+ u8 entry_len;
-+};
-+
-+struct nouveau_pm_tbl_entry{
-+ u8 tWR;
-+ u8 tUNK_1;
-+ u8 tCL;
-+ u8 tRP; /* Byte 3 */
-+ u8 empty_4;
-+ u8 tRAS; /* Byte 5 */
-+ u8 empty_6;
-+ u8 tRFC; /* Byte 7 */
-+ u8 empty_8;
-+ u8 tRC; /* Byte 9 */
-+ u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14;
-+ u8 empty_15,empty_16,empty_17;
-+ u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21;
-+};
-+
-+/* nouveau_mem.c */
-+void nv30_mem_timing_entry(struct drm_device *dev, struct nouveau_pm_tbl_header *hdr,
-+ struct nouveau_pm_tbl_entry *e, uint8_t magic_number,
-+ struct nouveau_pm_memtiming *timing);
-+
- #define NOUVEAU_PM_MAX_LEVEL 8
- struct nouveau_pm_level {
- struct device_attribute dev_attr;
-@@ -448,11 +480,19 @@ struct nouveau_pm_level {
- u32 core;
- u32 memory;
- u32 shader;
-- u32 unk05;
-- u32 unk0a;
--
-- u8 voltage;
-- u8 fanspeed;
-+ u32 rop;
-+ u32 copy;
-+ u32 daemon;
-+ u32 vdec;
-+ u32 unk05; /* nv50:nva3, roughly.. */
-+ u32 unka0; /* nva3:nvc0 */
-+ u32 hub01; /* nvc0- */
-+ u32 hub06; /* nvc0- */
-+ u32 hub07; /* nvc0- */
-+
-+ u32 volt_min; /* microvolts */
-+ u32 volt_max;
-+ u8 fanspeed;
-
- u16 memscript;
- struct nouveau_pm_memtiming *timing;
-@@ -496,6 +536,11 @@ struct nouveau_pm_engine {
- void *(*clock_pre)(struct drm_device *, struct nouveau_pm_level *,
- u32 id, int khz);
- void (*clock_set)(struct drm_device *, void *);
-+
-+ int (*clocks_get)(struct drm_device *, struct nouveau_pm_level *);
-+ void *(*clocks_pre)(struct drm_device *, struct nouveau_pm_level *);
-+ void (*clocks_set)(struct drm_device *, void *);
-+
- int (*voltage_get)(struct drm_device *);
- int (*voltage_set)(struct drm_device *, int voltage);
- int (*fanspeed_get)(struct drm_device *);
-@@ -504,7 +549,7 @@ struct nouveau_pm_engine {
- };
-
- struct nouveau_vram_engine {
-- struct nouveau_mm *mm;
-+ struct nouveau_mm mm;
-
- int (*init)(struct drm_device *);
- void (*takedown)(struct drm_device *dev);
-@@ -623,6 +668,7 @@ enum nouveau_card_type {
- NV_40 = 0x40,
- NV_50 = 0x50,
- NV_C0 = 0xc0,
-+ NV_D0 = 0xd0
- };
-
- struct drm_nouveau_private {
-@@ -633,8 +679,8 @@ struct drm_nouveau_private {
- enum nouveau_card_type card_type;
- /* exact chipset, derived from NV_PMC_BOOT_0 */
- int chipset;
-- int stepping;
- int flags;
-+ u32 crystal;
-
- void __iomem *mmio;
-
-@@ -721,7 +767,6 @@ struct drm_nouveau_private {
- uint64_t vram_size;
- uint64_t vram_sys_base;
-
-- uint64_t fb_phys;
- uint64_t fb_available_size;
- uint64_t fb_mappable_pages;
- uint64_t fb_aper_free;
-@@ -784,6 +829,7 @@ nouveau_bo_ref(struct nouveau_bo *ref, struct nouveau_bo **pnvbo)
- }
-
- /* nouveau_drv.c */
-+extern int nouveau_modeset;
- extern int nouveau_agpmode;
- extern int nouveau_duallink;
- extern int nouveau_uscript_lvds;
-@@ -824,6 +870,8 @@ extern bool nouveau_wait_eq(struct drm_device *, uint64_t timeout,
- uint32_t reg, uint32_t mask, uint32_t val);
- extern bool nouveau_wait_ne(struct drm_device *, uint64_t timeout,
- uint32_t reg, uint32_t mask, uint32_t val);
-+extern bool nouveau_wait_cb(struct drm_device *, u64 timeout,
-+ bool (*cond)(void *), void *);
- extern bool nouveau_wait_for_idle(struct drm_device *);
- extern int nouveau_card_init(struct drm_device *);
-
-@@ -1006,15 +1054,15 @@ static inline int nouveau_acpi_edid(struct drm_device *dev, struct drm_connector
-
- /* nouveau_backlight.c */
- #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
--extern int nouveau_backlight_init(struct drm_connector *);
--extern void nouveau_backlight_exit(struct drm_connector *);
-+extern int nouveau_backlight_init(struct drm_device *);
-+extern void nouveau_backlight_exit(struct drm_device *);
- #else
--static inline int nouveau_backlight_init(struct drm_connector *dev)
-+static inline int nouveau_backlight_init(struct drm_device *dev)
- {
- return 0;
- }
-
--static inline void nouveau_backlight_exit(struct drm_connector *dev) { }
-+static inline void nouveau_backlight_exit(struct drm_device *dev) { }
- #endif
-
- /* nouveau_bios.c */
-@@ -1022,7 +1070,8 @@ extern int nouveau_bios_init(struct drm_device *);
- extern void nouveau_bios_takedown(struct drm_device *dev);
- extern int nouveau_run_vbios_init(struct drm_device *);
- extern void nouveau_bios_run_init_table(struct drm_device *, uint16_t table,
-- struct dcb_entry *);
-+ struct dcb_entry *, int crtc);
-+extern void nouveau_bios_init_exec(struct drm_device *, uint16_t table);
- extern struct dcb_gpio_entry *nouveau_bios_gpio_entry(struct drm_device *,
- enum dcb_gpio_tag);
- extern struct dcb_connector_table_entry *
-@@ -1030,11 +1079,8 @@ nouveau_bios_connector_entry(struct drm_device *, int index);
- extern u32 get_pll_register(struct drm_device *, enum pll_types);
- extern int get_pll_limits(struct drm_device *, uint32_t limit_match,
- struct pll_lims *);
--extern int nouveau_bios_run_display_table(struct drm_device *,
-- struct dcb_entry *,
-- uint32_t script, int pxclk);
--extern void *nouveau_bios_dp_table(struct drm_device *, struct dcb_entry *,
-- int *length);
-+extern int nouveau_bios_run_display_table(struct drm_device *, u16 id, int clk,
-+ struct dcb_entry *, int crtc);
- extern bool nouveau_bios_fp_mode(struct drm_device *, struct drm_display_mode *);
- extern uint8_t *nouveau_bios_embedded_edid(struct drm_device *);
- extern int nouveau_bios_parse_lvds_table(struct drm_device *, int pxclk,
-@@ -1043,6 +1089,7 @@ extern int run_tmds_table(struct drm_device *, struct dcb_entry *,
- int head, int pxclk);
- extern int call_lvds_script(struct drm_device *, struct dcb_entry *, int head,
- enum LVDS_script, int pxclk);
-+bool bios_encoder_match(struct dcb_entry *, u32 hash);
-
- /* nouveau_ttm.c */
- int nouveau_ttm_global_init(struct drm_nouveau_private *);
-@@ -1053,7 +1100,9 @@ int nouveau_ttm_mmap(struct file *, struct vm_area_struct *);
- int nouveau_dp_auxch(struct nouveau_i2c_chan *auxch, int cmd, int addr,
- uint8_t *data, int data_nr);
- bool nouveau_dp_detect(struct drm_encoder *);
--bool nouveau_dp_link_train(struct drm_encoder *);
-+bool nouveau_dp_link_train(struct drm_encoder *, u32 datarate);
-+void nouveau_dp_tu_update(struct drm_device *, int, int, u32, u32);
-+u8 *nouveau_dp_bios_data(struct drm_device *, struct dcb_entry *, u8 **);
-
- /* nv04_fb.c */
- extern int nv04_fb_init(struct drm_device *);
-@@ -1179,8 +1228,8 @@ extern int nva3_copy_create(struct drm_device *dev);
- /* nvc0_copy.c */
- extern int nvc0_copy_create(struct drm_device *dev, int engine);
-
--/* nv40_mpeg.c */
--extern int nv40_mpeg_create(struct drm_device *dev);
-+/* nv31_mpeg.c */
-+extern int nv31_mpeg_create(struct drm_device *dev);
-
- /* nv50_mpeg.c */
- extern int nv50_mpeg_create(struct drm_device *dev);
-@@ -1265,6 +1314,11 @@ extern int nv04_display_create(struct drm_device *);
- extern int nv04_display_init(struct drm_device *);
- extern void nv04_display_destroy(struct drm_device *);
-
-+/* nvd0_display.c */
-+extern int nvd0_display_create(struct drm_device *);
-+extern int nvd0_display_init(struct drm_device *);
-+extern void nvd0_display_destroy(struct drm_device *);
-+
- /* nv04_crtc.c */
- extern int nv04_crtc_create(struct drm_device *, int index);
-
-@@ -1374,6 +1428,8 @@ int nv50_gpio_init(struct drm_device *dev);
- void nv50_gpio_fini(struct drm_device *dev);
- int nv50_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag);
- int nv50_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state);
-+int nvd0_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag);
-+int nvd0_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state);
- int nv50_gpio_irq_register(struct drm_device *, enum dcb_gpio_tag,
- void (*)(void *, int), void *);
- void nv50_gpio_irq_unregister(struct drm_device *, enum dcb_gpio_tag,
-@@ -1448,6 +1504,8 @@ static inline void nv_wr08(struct drm_device *dev, unsigned reg, u8 val)
- nouveau_wait_eq(dev, 2000000000ULL, (reg), (mask), (val))
- #define nv_wait_ne(dev, reg, mask, val) \
- nouveau_wait_ne(dev, 2000000000ULL, (reg), (mask), (val))
-+#define nv_wait_cb(dev, func, data) \
-+ nouveau_wait_cb(dev, 2000000000ULL, (func), (data))
-
- /* PRAMIN access */
- static inline u32 nv_ri32(struct drm_device *dev, unsigned offset)
-@@ -1514,6 +1572,7 @@ enum {
- NOUVEAU_REG_DEBUG_RMVIO = 0x80,
- NOUVEAU_REG_DEBUG_VGAATTR = 0x100,
- NOUVEAU_REG_DEBUG_EVO = 0x200,
-+ NOUVEAU_REG_DEBUG_AUXCH = 0x400
- };
-
- #define NV_REG_DEBUG(type, dev, fmt, arg...) do { \
-diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h
-index ae69b61..e5d6e3f 100644
---- a/drivers/gpu/drm/nouveau/nouveau_encoder.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h
-@@ -49,17 +49,17 @@ struct nouveau_encoder {
-
- union {
- struct {
-- int mc_unknown;
-- uint32_t unk0;
-- uint32_t unk1;
-- int dpcd_version;
-+ u8 dpcd[8];
- int link_nr;
- int link_bw;
-- bool enhanced_frame;
-+ u32 datarate;
- } dp;
- };
- };
-
-+struct nouveau_encoder *
-+find_encoder(struct drm_connector *connector, int type);
-+
- static inline struct nouveau_encoder *nouveau_encoder(struct drm_encoder *enc)
- {
- struct drm_encoder_slave *slave = to_encoder_slave(enc);
-@@ -83,21 +83,4 @@ nouveau_encoder_connector_get(struct nouveau_encoder *encoder);
- int nv50_sor_create(struct drm_connector *, struct dcb_entry *);
- int nv50_dac_create(struct drm_connector *, struct dcb_entry *);
-
--struct bit_displayport_encoder_table {
-- uint32_t match;
-- uint8_t record_nr;
-- uint8_t unknown;
-- uint16_t script0;
-- uint16_t script1;
-- uint16_t unknown_table;
--} __attribute__ ((packed));
--
--struct bit_displayport_encoder_table_entry {
-- uint8_t vs_level;
-- uint8_t pre_level;
-- uint8_t reg0;
-- uint8_t reg1;
-- uint8_t reg2;
--} __attribute__ ((packed));
--
- #endif /* __NOUVEAU_ENCODER_H__ */
-diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
-index c919cfc..81116cf 100644
---- a/drivers/gpu/drm/nouveau/nouveau_fence.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
-@@ -519,7 +519,7 @@ nouveau_fence_channel_init(struct nouveau_channel *chan)
- if (USE_SEMA(dev) && dev_priv->chipset < 0x84) {
- struct ttm_mem_reg *mem = &dev_priv->fence.bo->bo.mem;
-
-- ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY,
-+ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_FROM_MEMORY,
- mem->start << PAGE_SHIFT,
- mem->size, NV_MEM_ACCESS_RW,
- NV_MEM_TARGET_VRAM, &obj);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c
-index cb389d0..f6a27fa 100644
---- a/drivers/gpu/drm/nouveau/nouveau_i2c.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c
-@@ -107,6 +107,13 @@ nv4e_i2c_getsda(void *data)
- return !!((nv_rd32(dev, i2c->rd) >> 16) & 8);
- }
-
-+static const uint32_t nv50_i2c_port[] = {
-+ 0x00e138, 0x00e150, 0x00e168, 0x00e180,
-+ 0x00e254, 0x00e274, 0x00e764, 0x00e780,
-+ 0x00e79c, 0x00e7b8
-+};
-+#define NV50_I2C_PORTS ARRAY_SIZE(nv50_i2c_port)
-+
- static int
- nv50_i2c_getscl(void *data)
- {
-@@ -130,28 +137,32 @@ static void
- nv50_i2c_setscl(void *data, int state)
- {
- struct nouveau_i2c_chan *i2c = data;
-- struct drm_device *dev = i2c->dev;
-
-- nv_wr32(dev, i2c->wr, 4 | (i2c->data ? 2 : 0) | (state ? 1 : 0));
-+ nv_wr32(i2c->dev, i2c->wr, 4 | (i2c->data ? 2 : 0) | (state ? 1 : 0));
- }
-
- static void
- nv50_i2c_setsda(void *data, int state)
- {
- struct nouveau_i2c_chan *i2c = data;
-- struct drm_device *dev = i2c->dev;
-
-- nv_wr32(dev, i2c->wr,
-- (nv_rd32(dev, i2c->rd) & 1) | 4 | (state ? 2 : 0));
-+ nv_mask(i2c->dev, i2c->wr, 0x00000006, 4 | (state ? 2 : 0));
- i2c->data = state;
- }
-
--static const uint32_t nv50_i2c_port[] = {
-- 0x00e138, 0x00e150, 0x00e168, 0x00e180,
-- 0x00e254, 0x00e274, 0x00e764, 0x00e780,
-- 0x00e79c, 0x00e7b8
--};
--#define NV50_I2C_PORTS ARRAY_SIZE(nv50_i2c_port)
-+static int
-+nvd0_i2c_getscl(void *data)
-+{
-+ struct nouveau_i2c_chan *i2c = data;
-+ return !!(nv_rd32(i2c->dev, i2c->rd) & 0x10);
-+}
-+
-+static int
-+nvd0_i2c_getsda(void *data)
-+{
-+ struct nouveau_i2c_chan *i2c = data;
-+ return !!(nv_rd32(i2c->dev, i2c->rd) & 0x20);
-+}
-
- int
- nouveau_i2c_init(struct drm_device *dev, struct dcb_i2c_entry *entry, int index)
-@@ -163,7 +174,8 @@ nouveau_i2c_init(struct drm_device *dev, struct dcb_i2c_entry *entry, int index)
- if (entry->chan)
- return -EEXIST;
-
-- if (dev_priv->card_type >= NV_50 && entry->read >= NV50_I2C_PORTS) {
-+ if (dev_priv->card_type >= NV_50 &&
-+ dev_priv->card_type <= NV_C0 && entry->read >= NV50_I2C_PORTS) {
- NV_ERROR(dev, "unknown i2c port %d\n", entry->read);
- return -EINVAL;
- }
-@@ -192,10 +204,17 @@ nouveau_i2c_init(struct drm_device *dev, struct dcb_i2c_entry *entry, int index)
- case 5:
- i2c->bit.setsda = nv50_i2c_setsda;
- i2c->bit.setscl = nv50_i2c_setscl;
-- i2c->bit.getsda = nv50_i2c_getsda;
-- i2c->bit.getscl = nv50_i2c_getscl;
-- i2c->rd = nv50_i2c_port[entry->read];
-- i2c->wr = i2c->rd;
-+ if (dev_priv->card_type < NV_D0) {
-+ i2c->bit.getsda = nv50_i2c_getsda;
-+ i2c->bit.getscl = nv50_i2c_getscl;
-+ i2c->rd = nv50_i2c_port[entry->read];
-+ i2c->wr = i2c->rd;
-+ } else {
-+ i2c->bit.getsda = nvd0_i2c_getsda;
-+ i2c->bit.getscl = nvd0_i2c_getscl;
-+ i2c->rd = 0x00d014 + (entry->read * 0x20);
-+ i2c->wr = i2c->rd;
-+ }
- break;
- case 6:
- i2c->rd = entry->read;
-@@ -267,7 +286,10 @@ nouveau_i2c_find(struct drm_device *dev, int index)
- val = 0xe001;
- }
-
-- nv_wr32(dev, reg, (nv_rd32(dev, reg) & ~0xf003) | val);
-+ /* nfi, but neither auxch or i2c work if it's 1 */
-+ nv_mask(dev, reg + 0x0c, 0x00000001, 0x00000000);
-+ /* nfi, but switches auxch vs normal i2c */
-+ nv_mask(dev, reg + 0x00, 0x0000f003, val);
- }
-
- if (!i2c->chan && nouveau_i2c_init(dev, i2c, index))
-diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
-index f9ae2fc..36bec48 100644
---- a/drivers/gpu/drm/nouveau/nouveau_mem.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
-@@ -408,8 +408,6 @@ nouveau_mem_vram_init(struct drm_device *dev)
- if (ret)
- return ret;
-
-- dev_priv->fb_phys = pci_resource_start(dev->pdev, 1);
--
- ret = nouveau_ttm_global_init(dev_priv);
- if (ret)
- return ret;
-@@ -504,35 +502,146 @@ nouveau_mem_gart_init(struct drm_device *dev)
- return 0;
- }
-
-+/* XXX: For now a dummy. More samples required, possibly even a card
-+ * Called from nouveau_perf.c */
-+void nv30_mem_timing_entry(struct drm_device *dev, struct nouveau_pm_tbl_header *hdr,
-+ struct nouveau_pm_tbl_entry *e, uint8_t magic_number,
-+ struct nouveau_pm_memtiming *timing) {
-+
-+ NV_DEBUG(dev,"Timing entry format unknown, please contact nouveau developers");
-+}
-+
-+void nv40_mem_timing_entry(struct drm_device *dev, struct nouveau_pm_tbl_header *hdr,
-+ struct nouveau_pm_tbl_entry *e, uint8_t magic_number,
-+ struct nouveau_pm_memtiming *timing) {
-+
-+ timing->reg_0 = (e->tRC << 24 | e->tRFC << 16 | e->tRAS << 8 | e->tRP);
-+
-+ /* XXX: I don't trust the -1's and +1's... they must come
-+ * from somewhere! */
-+ timing->reg_1 = (e->tWR + 2 + magic_number) << 24 |
-+ 1 << 16 |
-+ (e->tUNK_1 + 2 + magic_number) << 8 |
-+ (e->tCL + 2 - magic_number);
-+ timing->reg_2 = (magic_number << 24 | e->tUNK_12 << 16 | e->tUNK_11 << 8 | e->tUNK_10);
-+ timing->reg_2 |= 0x20200000;
-+
-+ NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x\n", timing->id,
-+ timing->reg_0, timing->reg_1,timing->reg_2);
-+}
-+
-+void nv50_mem_timing_entry(struct drm_device *dev, struct bit_entry *P, struct nouveau_pm_tbl_header *hdr,
-+ struct nouveau_pm_tbl_entry *e, uint8_t magic_number,struct nouveau_pm_memtiming *timing) {
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+
-+ uint8_t unk18 = 1,
-+ unk19 = 1,
-+ unk20 = 0,
-+ unk21 = 0;
-+
-+ switch (min(hdr->entry_len, (u8) 22)) {
-+ case 22:
-+ unk21 = e->tUNK_21;
-+ case 21:
-+ unk20 = e->tUNK_20;
-+ case 20:
-+ unk19 = e->tUNK_19;
-+ case 19:
-+ unk18 = e->tUNK_18;
-+ break;
-+ }
-+
-+ timing->reg_0 = (e->tRC << 24 | e->tRFC << 16 | e->tRAS << 8 | e->tRP);
-+
-+ /* XXX: I don't trust the -1's and +1's... they must come
-+ * from somewhere! */
-+ timing->reg_1 = (e->tWR + unk19 + 1 + magic_number) << 24 |
-+ max(unk18, (u8) 1) << 16 |
-+ (e->tUNK_1 + unk19 + 1 + magic_number) << 8;
-+ if (dev_priv->chipset == 0xa8) {
-+ timing->reg_1 |= (e->tCL - 1);
-+ } else {
-+ timing->reg_1 |= (e->tCL + 2 - magic_number);
-+ }
-+ timing->reg_2 = (e->tUNK_12 << 16 | e->tUNK_11 << 8 | e->tUNK_10);
-+
-+ timing->reg_5 = (e->tRAS << 24 | e->tRC);
-+ timing->reg_5 += max(e->tUNK_10, e->tUNK_11) << 16;
-+
-+ if (P->version == 1) {
-+ timing->reg_2 |= magic_number << 24;
-+ timing->reg_3 = (0x14 + e->tCL) << 24 |
-+ 0x16 << 16 |
-+ (e->tCL - 1) << 8 |
-+ (e->tCL - 1);
-+ timing->reg_4 = (nv_rd32(dev,0x10022c) & 0xffff0000) | e->tUNK_13 << 8 | e->tUNK_13;
-+ timing->reg_5 |= (e->tCL + 2) << 8;
-+ timing->reg_7 = 0x4000202 | (e->tCL - 1) << 16;
-+ } else {
-+ timing->reg_2 |= (unk19 - 1) << 24;
-+ /* XXX: reg_10022c for recentish cards pretty much unknown*/
-+ timing->reg_3 = e->tCL - 1;
-+ timing->reg_4 = (unk20 << 24 | unk21 << 16 |
-+ e->tUNK_13 << 8 | e->tUNK_13);
-+ /* XXX: +6? */
-+ timing->reg_5 |= (unk19 + 6) << 8;
-+
-+ /* XXX: reg_10023c currently unknown
-+ * 10023c seen as 06xxxxxx, 0bxxxxxx or 0fxxxxxx */
-+ timing->reg_7 = 0x202;
-+ }
-+
-+ NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", timing->id,
-+ timing->reg_0, timing->reg_1,
-+ timing->reg_2, timing->reg_3);
-+ NV_DEBUG(dev, " 230: %08x %08x %08x %08x\n",
-+ timing->reg_4, timing->reg_5,
-+ timing->reg_6, timing->reg_7);
-+ NV_DEBUG(dev, " 240: %08x\n", timing->reg_8);
-+}
-+
-+void nvc0_mem_timing_entry(struct drm_device *dev, struct nouveau_pm_tbl_header *hdr,
-+ struct nouveau_pm_tbl_entry *e, struct nouveau_pm_memtiming *timing) {
-+ timing->reg_0 = (e->tRC << 24 | (e->tRFC & 0x7f) << 17 | e->tRAS << 8 | e->tRP);
-+ timing->reg_1 = (nv_rd32(dev,0x10f294) & 0xff000000) | (e->tUNK_11&0x0f) << 20 | (e->tUNK_19 << 7) | (e->tCL & 0x0f);
-+ timing->reg_2 = (nv_rd32(dev,0x10f298) & 0xff0000ff) | e->tWR << 16 | e->tUNK_1 << 8;
-+ timing->reg_3 = e->tUNK_20 << 9 | e->tUNK_13;
-+ timing->reg_4 = (nv_rd32(dev,0x10f2a0) & 0xfff000ff) | e->tUNK_12 << 15;
-+ NV_DEBUG(dev, "Entry %d: 290: %08x %08x %08x %08x\n", timing->id,
-+ timing->reg_0, timing->reg_1,
-+ timing->reg_2, timing->reg_3);
-+ NV_DEBUG(dev, " 2a0: %08x %08x %08x %08x\n",
-+ timing->reg_4, timing->reg_5,
-+ timing->reg_6, timing->reg_7);
-+}
-+
-+/**
-+ * Processes the Memory Timing BIOS table, stores generated
-+ * register values
-+ * @pre init scripts were run, memtiming regs are initialized
-+ */
- void
- nouveau_mem_timing_init(struct drm_device *dev)
- {
-- /* cards < NVC0 only */
- struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
- struct nouveau_pm_memtimings *memtimings = &pm->memtimings;
- struct nvbios *bios = &dev_priv->vbios;
- struct bit_entry P;
-- u8 tUNK_0, tUNK_1, tUNK_2;
-- u8 tRP; /* Byte 3 */
-- u8 tRAS; /* Byte 5 */
-- u8 tRFC; /* Byte 7 */
-- u8 tRC; /* Byte 9 */
-- u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14;
-- u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21;
-- u8 magic_number = 0; /* Yeah... sorry*/
-- u8 *mem = NULL, *entry;
-- int i, recordlen, entries;
-+ struct nouveau_pm_tbl_header *hdr = NULL;
-+ uint8_t magic_number;
-+ u8 *entry;
-+ int i;
-
- if (bios->type == NVBIOS_BIT) {
- if (bit_table(dev, 'P', &P))
- return;
-
- if (P.version == 1)
-- mem = ROMPTR(bios, P.data[4]);
-+ hdr = (struct nouveau_pm_tbl_header *) ROMPTR(bios, P.data[4]);
- else
- if (P.version == 2)
-- mem = ROMPTR(bios, P.data[8]);
-+ hdr = (struct nouveau_pm_tbl_header *) ROMPTR(bios, P.data[8]);
- else {
- NV_WARN(dev, "unknown mem for BIT P %d\n", P.version);
- }
-@@ -541,150 +650,56 @@ nouveau_mem_timing_init(struct drm_device *dev)
- return;
- }
-
-- if (!mem) {
-+ if (!hdr) {
- NV_DEBUG(dev, "memory timing table pointer invalid\n");
- return;
- }
-
-- if (mem[0] != 0x10) {
-- NV_WARN(dev, "memory timing table 0x%02x unknown\n", mem[0]);
-+ if (hdr->version != 0x10) {
-+ NV_WARN(dev, "memory timing table 0x%02x unknown\n", hdr->version);
- return;
- }
-
- /* validate record length */
-- entries = mem[2];
-- recordlen = mem[3];
-- if (recordlen < 15) {
-- NV_ERROR(dev, "mem timing table length unknown: %d\n", mem[3]);
-+ if (hdr->entry_len < 15) {
-+ NV_ERROR(dev, "mem timing table length unknown: %d\n", hdr->entry_len);
- return;
- }
-
- /* parse vbios entries into common format */
- memtimings->timing =
-- kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL);
-+ kcalloc(hdr->entry_cnt, sizeof(*memtimings->timing), GFP_KERNEL);
- if (!memtimings->timing)
- return;
-
- /* Get "some number" from the timing reg for NV_40 and NV_50
-- * Used in calculations later */
-- if (dev_priv->card_type >= NV_40 && dev_priv->chipset < 0x98) {
-+ * Used in calculations later... source unknown */
-+ magic_number = 0;
-+ if (P.version == 1) {
- magic_number = (nv_rd32(dev, 0x100228) & 0x0f000000) >> 24;
- }
-
-- entry = mem + mem[1];
-- for (i = 0; i < entries; i++, entry += recordlen) {
-+ entry = (u8*) hdr + hdr->header_len;
-+ for (i = 0; i < hdr->entry_cnt; i++, entry += hdr->entry_len) {
- struct nouveau_pm_memtiming *timing = &pm->memtimings.timing[i];
- if (entry[0] == 0)
- continue;
-
-- tUNK_18 = 1;
-- tUNK_19 = 1;
-- tUNK_20 = 0;
-- tUNK_21 = 0;
-- switch (min(recordlen, 22)) {
-- case 22:
-- tUNK_21 = entry[21];
-- case 21:
-- tUNK_20 = entry[20];
-- case 20:
-- tUNK_19 = entry[19];
-- case 19:
-- tUNK_18 = entry[18];
-- default:
-- tUNK_0 = entry[0];
-- tUNK_1 = entry[1];
-- tUNK_2 = entry[2];
-- tRP = entry[3];
-- tRAS = entry[5];
-- tRFC = entry[7];
-- tRC = entry[9];
-- tUNK_10 = entry[10];
-- tUNK_11 = entry[11];
-- tUNK_12 = entry[12];
-- tUNK_13 = entry[13];
-- tUNK_14 = entry[14];
-- break;
-- }
--
-- timing->reg_100220 = (tRC << 24 | tRFC << 16 | tRAS << 8 | tRP);
--
-- /* XXX: I don't trust the -1's and +1's... they must come
-- * from somewhere! */
-- timing->reg_100224 = (tUNK_0 + tUNK_19 + 1 + magic_number) << 24 |
-- max(tUNK_18, (u8) 1) << 16 |
-- (tUNK_1 + tUNK_19 + 1 + magic_number) << 8;
-- if (dev_priv->chipset == 0xa8) {
-- timing->reg_100224 |= (tUNK_2 - 1);
-- } else {
-- timing->reg_100224 |= (tUNK_2 + 2 - magic_number);
-- }
--
-- timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10);
-- if (dev_priv->chipset >= 0xa3 && dev_priv->chipset < 0xaa)
-- timing->reg_100228 |= (tUNK_19 - 1) << 24;
-- else
-- timing->reg_100228 |= magic_number << 24;
--
-- if (dev_priv->card_type == NV_40) {
-- /* NV40: don't know what the rest of the regs are..
-- * And don't need to know either */
-- timing->reg_100228 |= 0x20200000;
-- } else if (dev_priv->card_type >= NV_50) {
-- if (dev_priv->chipset < 0x98 ||
-- (dev_priv->chipset == 0x98 &&
-- dev_priv->stepping <= 0xa1)) {
-- timing->reg_10022c = (0x14 + tUNK_2) << 24 |
-- 0x16 << 16 |
-- (tUNK_2 - 1) << 8 |
-- (tUNK_2 - 1);
-- } else {
-- /* XXX: reg_10022c for recentish cards */
-- timing->reg_10022c = tUNK_2 - 1;
-- }
--
-- timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 |
-- tUNK_13 << 8 | tUNK_13);
--
-- timing->reg_100234 = (tRAS << 24 | tRC);
-- timing->reg_100234 += max(tUNK_10, tUNK_11) << 16;
--
-- if (dev_priv->chipset < 0x98 ||
-- (dev_priv->chipset == 0x98 &&
-- dev_priv->stepping <= 0xa1)) {
-- timing->reg_100234 |= (tUNK_2 + 2) << 8;
-- } else {
-- /* XXX: +6? */
-- timing->reg_100234 |= (tUNK_19 + 6) << 8;
-- }
--
-- /* XXX; reg_100238
-- * reg_100238: 0x00?????? */
-- timing->reg_10023c = 0x202;
-- if (dev_priv->chipset < 0x98 ||
-- (dev_priv->chipset == 0x98 &&
-- dev_priv->stepping <= 0xa1)) {
-- timing->reg_10023c |= 0x4000000 | (tUNK_2 - 1) << 16;
-- } else {
-- /* XXX: reg_10023c
-- * currently unknown
-- * 10023c seen as 06xxxxxx, 0bxxxxxx or 0fxxxxxx */
-- }
--
-- /* XXX: reg_100240? */
-- }
- timing->id = i;
--
-- NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i,
-- timing->reg_100220, timing->reg_100224,
-- timing->reg_100228, timing->reg_10022c);
-- NV_DEBUG(dev, " 230: %08x %08x %08x %08x\n",
-- timing->reg_100230, timing->reg_100234,
-- timing->reg_100238, timing->reg_10023c);
-- NV_DEBUG(dev, " 240: %08x\n", timing->reg_100240);
-+ timing->WR = entry[0];
-+ timing->CL = entry[2];
-+
-+ if(dev_priv->card_type <= NV_40) {
-+ nv40_mem_timing_entry(dev,hdr,(struct nouveau_pm_tbl_entry*) entry,magic_number,&pm->memtimings.timing[i]);
-+ } else if(dev_priv->card_type == NV_50){
-+ nv50_mem_timing_entry(dev,&P,hdr,(struct nouveau_pm_tbl_entry*) entry,magic_number,&pm->memtimings.timing[i]);
-+ } else if(dev_priv->card_type == NV_C0) {
-+ nvc0_mem_timing_entry(dev,hdr,(struct nouveau_pm_tbl_entry*) entry,&pm->memtimings.timing[i]);
-+ }
- }
-
-- memtimings->nr_timing = entries;
-- memtimings->supported = (dev_priv->chipset <= 0x98);
-+ memtimings->nr_timing = hdr->entry_cnt;
-+ memtimings->supported = P.version == 1;
- }
-
- void
-@@ -693,7 +708,10 @@ nouveau_mem_timing_fini(struct drm_device *dev)
- struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nouveau_pm_memtimings *mem = &dev_priv->engine.pm.memtimings;
-
-- kfree(mem->timing);
-+ if(mem->timing) {
-+ kfree(mem->timing);
-+ mem->timing = NULL;
-+ }
- }
-
- static int
-diff --git a/drivers/gpu/drm/nouveau/nouveau_mm.c b/drivers/gpu/drm/nouveau/nouveau_mm.c
-index 1640dec..b29ffb3 100644
---- a/drivers/gpu/drm/nouveau/nouveau_mm.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_mm.c
-@@ -27,7 +27,7 @@
- #include "nouveau_mm.h"
-
- static inline void
--region_put(struct nouveau_mm *rmm, struct nouveau_mm_node *a)
-+region_put(struct nouveau_mm *mm, struct nouveau_mm_node *a)
- {
- list_del(&a->nl_entry);
- list_del(&a->fl_entry);
-@@ -35,7 +35,7 @@ region_put(struct nouveau_mm *rmm, struct nouveau_mm_node *a)
- }
-
- static struct nouveau_mm_node *
--region_split(struct nouveau_mm *rmm, struct nouveau_mm_node *a, u32 size)
-+region_split(struct nouveau_mm *mm, struct nouveau_mm_node *a, u32 size)
- {
- struct nouveau_mm_node *b;
-
-@@ -57,33 +57,33 @@ region_split(struct nouveau_mm *rmm, struct nouveau_mm_node *a, u32 size)
- return b;
- }
-
--#define node(root, dir) ((root)->nl_entry.dir == &rmm->nodes) ? NULL : \
-+#define node(root, dir) ((root)->nl_entry.dir == &mm->nodes) ? NULL : \
- list_entry((root)->nl_entry.dir, struct nouveau_mm_node, nl_entry)
-
- void
--nouveau_mm_put(struct nouveau_mm *rmm, struct nouveau_mm_node *this)
-+nouveau_mm_put(struct nouveau_mm *mm, struct nouveau_mm_node *this)
- {
- struct nouveau_mm_node *prev = node(this, prev);
- struct nouveau_mm_node *next = node(this, next);
-
-- list_add(&this->fl_entry, &rmm->free);
-+ list_add(&this->fl_entry, &mm->free);
- this->type = 0;
-
- if (prev && prev->type == 0) {
- prev->length += this->length;
-- region_put(rmm, this);
-+ region_put(mm, this);
- this = prev;
- }
-
- if (next && next->type == 0) {
- next->offset = this->offset;
- next->length += this->length;
-- region_put(rmm, this);
-+ region_put(mm, this);
- }
- }
-
- int
--nouveau_mm_get(struct nouveau_mm *rmm, int type, u32 size, u32 size_nc,
-+nouveau_mm_get(struct nouveau_mm *mm, int type, u32 size, u32 size_nc,
- u32 align, struct nouveau_mm_node **pnode)
- {
- struct nouveau_mm_node *prev, *this, *next;
-@@ -92,17 +92,17 @@ nouveau_mm_get(struct nouveau_mm *rmm, int type, u32 size, u32 size_nc,
- u32 splitoff;
- u32 s, e;
-
-- list_for_each_entry(this, &rmm->free, fl_entry) {
-+ list_for_each_entry(this, &mm->free, fl_entry) {
- e = this->offset + this->length;
- s = this->offset;
-
- prev = node(this, prev);
- if (prev && prev->type != type)
-- s = roundup(s, rmm->block_size);
-+ s = roundup(s, mm->block_size);
-
- next = node(this, next);
- if (next && next->type != type)
-- e = rounddown(e, rmm->block_size);
-+ e = rounddown(e, mm->block_size);
-
- s = (s + align_mask) & ~align_mask;
- e &= ~align_mask;
-@@ -110,10 +110,10 @@ nouveau_mm_get(struct nouveau_mm *rmm, int type, u32 size, u32 size_nc,
- continue;
-
- splitoff = s - this->offset;
-- if (splitoff && !region_split(rmm, this, splitoff))
-+ if (splitoff && !region_split(mm, this, splitoff))
- return -ENOMEM;
-
-- this = region_split(rmm, this, min(size, e - s));
-+ this = region_split(mm, this, min(size, e - s));
- if (!this)
- return -ENOMEM;
-
-@@ -127,52 +127,49 @@ nouveau_mm_get(struct nouveau_mm *rmm, int type, u32 size, u32 size_nc,
- }
-
- int
--nouveau_mm_init(struct nouveau_mm **prmm, u32 offset, u32 length, u32 block)
-+nouveau_mm_init(struct nouveau_mm *mm, u32 offset, u32 length, u32 block)
- {
-- struct nouveau_mm *rmm;
-- struct nouveau_mm_node *heap;
-+ struct nouveau_mm_node *node;
-+
-+ if (block) {
-+ mutex_init(&mm->mutex);
-+ INIT_LIST_HEAD(&mm->nodes);
-+ INIT_LIST_HEAD(&mm->free);
-+ mm->block_size = block;
-+ mm->heap_nodes = 0;
-+ }
-
-- heap = kzalloc(sizeof(*heap), GFP_KERNEL);
-- if (!heap)
-+ node = kzalloc(sizeof(*node), GFP_KERNEL);
-+ if (!node)
- return -ENOMEM;
-- heap->offset = roundup(offset, block);
-- heap->length = rounddown(offset + length, block) - heap->offset;
-+ node->offset = roundup(offset, mm->block_size);
-+ node->length = rounddown(offset + length, mm->block_size) - node->offset;
-
-- rmm = kzalloc(sizeof(*rmm), GFP_KERNEL);
-- if (!rmm) {
-- kfree(heap);
-- return -ENOMEM;
-- }
-- rmm->block_size = block;
-- mutex_init(&rmm->mutex);
-- INIT_LIST_HEAD(&rmm->nodes);
-- INIT_LIST_HEAD(&rmm->free);
-- list_add(&heap->nl_entry, &rmm->nodes);
-- list_add(&heap->fl_entry, &rmm->free);
--
-- *prmm = rmm;
-+ list_add_tail(&node->nl_entry, &mm->nodes);
-+ list_add_tail(&node->fl_entry, &mm->free);
-+ mm->heap_nodes++;
- return 0;
- }
-
- int
--nouveau_mm_fini(struct nouveau_mm **prmm)
-+nouveau_mm_fini(struct nouveau_mm *mm)
- {
-- struct nouveau_mm *rmm = *prmm;
- struct nouveau_mm_node *node, *heap =
-- list_first_entry(&rmm->nodes, struct nouveau_mm_node, nl_entry);
--
-- if (!list_is_singular(&rmm->nodes)) {
-- printk(KERN_ERR "nouveau_mm not empty at destroy time!\n");
-- list_for_each_entry(node, &rmm->nodes, nl_entry) {
-- printk(KERN_ERR "0x%02x: 0x%08x 0x%08x\n",
-- node->type, node->offset, node->length);
-+ list_first_entry(&mm->nodes, struct nouveau_mm_node, nl_entry);
-+ int nodes = 0;
-+
-+ list_for_each_entry(node, &mm->nodes, nl_entry) {
-+ if (nodes++ == mm->heap_nodes) {
-+ printk(KERN_ERR "nouveau_mm in use at destroy time!\n");
-+ list_for_each_entry(node, &mm->nodes, nl_entry) {
-+ printk(KERN_ERR "0x%02x: 0x%08x 0x%08x\n",
-+ node->type, node->offset, node->length);
-+ }
-+ WARN_ON(1);
-+ return -EBUSY;
- }
-- WARN_ON(1);
-- return -EBUSY;
- }
-
- kfree(heap);
-- kfree(rmm);
-- *prmm = NULL;
- return 0;
- }
-diff --git a/drivers/gpu/drm/nouveau/nouveau_mm.h b/drivers/gpu/drm/nouveau/nouveau_mm.h
-index b9c016d..57a600c 100644
---- a/drivers/gpu/drm/nouveau/nouveau_mm.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_mm.h
-@@ -42,10 +42,11 @@ struct nouveau_mm {
- struct mutex mutex;
-
- u32 block_size;
-+ int heap_nodes;
- };
-
--int nouveau_mm_init(struct nouveau_mm **, u32 offset, u32 length, u32 block);
--int nouveau_mm_fini(struct nouveau_mm **);
-+int nouveau_mm_init(struct nouveau_mm *, u32 offset, u32 length, u32 block);
-+int nouveau_mm_fini(struct nouveau_mm *);
- int nouveau_mm_pre(struct nouveau_mm *);
- int nouveau_mm_get(struct nouveau_mm *, int type, u32 size, u32 size_nc,
- u32 align, struct nouveau_mm_node **);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
-index 159b7c4..02222c5 100644
---- a/drivers/gpu/drm/nouveau/nouveau_object.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
-@@ -693,6 +693,7 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan)
- static int
- nvc0_gpuobj_channel_init(struct nouveau_channel *chan, struct nouveau_vm *vm)
- {
-+ struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
- struct drm_device *dev = chan->dev;
- struct nouveau_gpuobj *pgd = NULL;
- struct nouveau_vm_pgd *vpgd;
-@@ -722,6 +723,9 @@ nvc0_gpuobj_channel_init(struct nouveau_channel *chan, struct nouveau_vm *vm)
- nv_wo32(chan->ramin, 0x020c, 0x000000ff);
-
- /* map display semaphore buffers into channel's vm */
-+ if (dev_priv->card_type >= NV_D0)
-+ return 0;
-+
- for (i = 0; i < 2; i++) {
- struct nv50_display_crtc *dispc = &nv50_display(dev)->crtc[i];
-
-@@ -746,7 +750,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
- int ret, i;
-
- NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h);
-- if (dev_priv->card_type == NV_C0)
-+ if (dev_priv->card_type >= NV_C0)
- return nvc0_gpuobj_channel_init(chan, vm);
-
- /* Allocate a chunk of memory for per-channel object storage */
-@@ -793,7 +797,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
- return ret;
-
- /* dma objects for display sync channel semaphore blocks */
-- for (i = 0; i < 2; i++) {
-+ for (i = 0; i < dev->mode_config.num_crtc; i++) {
- struct nouveau_gpuobj *sem = NULL;
- struct nv50_display_crtc *dispc =
- &nv50_display(dev)->crtc[i];
-@@ -875,18 +879,18 @@ nouveau_gpuobj_channel_takedown(struct nouveau_channel *chan)
-
- NV_DEBUG(dev, "ch%d\n", chan->id);
-
-- if (dev_priv->card_type >= NV_50) {
-+ if (dev_priv->card_type >= NV_50 && dev_priv->card_type <= NV_C0) {
- struct nv50_display *disp = nv50_display(dev);
-
-- for (i = 0; i < 2; i++) {
-+ for (i = 0; i < dev->mode_config.num_crtc; i++) {
- struct nv50_display_crtc *dispc = &disp->crtc[i];
- nouveau_bo_vma_del(dispc->sem.bo, &chan->dispc_vma[i]);
- }
--
-- nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd);
-- nouveau_gpuobj_ref(NULL, &chan->vm_pd);
- }
-
-+ nouveau_vm_ref(NULL, &chan->vm, chan->vm_pd);
-+ nouveau_gpuobj_ref(NULL, &chan->vm_pd);
-+
- if (drm_mm_initialized(&chan->ramin_heap))
- drm_mm_takedown(&chan->ramin_heap);
- nouveau_gpuobj_ref(NULL, &chan->ramin);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c
-index ef9dec0..9f178aa 100644
---- a/drivers/gpu/drm/nouveau/nouveau_perf.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_perf.c
-@@ -127,13 +127,57 @@ nouveau_perf_timing(struct drm_device *dev, struct bit_entry *P,
-
- entry += ramcfg * recordlen;
- if (entry[1] >= pm->memtimings.nr_timing) {
-- NV_WARN(dev, "timingset %d does not exist\n", entry[1]);
-+ if (entry[1] != 0xff)
-+ NV_WARN(dev, "timingset %d does not exist\n", entry[1]);
- return NULL;
- }
-
- return &pm->memtimings.timing[entry[1]];
- }
-
-+static void
-+nouveau_perf_voltage(struct drm_device *dev, struct bit_entry *P,
-+ struct nouveau_pm_level *perflvl)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nvbios *bios = &dev_priv->vbios;
-+ u8 *vmap;
-+ int id;
-+
-+ id = perflvl->volt_min;
-+ perflvl->volt_min = 0;
-+
-+ /* boards using voltage table version <0x40 store the voltage
-+ * level directly in the perflvl entry as a multiple of 10mV
-+ */
-+ if (dev_priv->engine.pm.voltage.version < 0x40) {
-+ perflvl->volt_min = id * 10000;
-+ perflvl->volt_max = perflvl->volt_min;
-+ return;
-+ }
-+
-+ /* on newer ones, the perflvl stores an index into yet another
-+ * vbios table containing a min/max voltage value for the perflvl
-+ */
-+ if (P->version != 2 || P->length < 34) {
-+ NV_DEBUG(dev, "where's our volt map table ptr? %d %d\n",
-+ P->version, P->length);
-+ return;
-+ }
-+
-+ vmap = ROMPTR(bios, P->data[32]);
-+ if (!vmap) {
-+ NV_DEBUG(dev, "volt map table pointer invalid\n");
-+ return;
-+ }
-+
-+ if (id < vmap[3]) {
-+ vmap += vmap[1] + (vmap[2] * id);
-+ perflvl->volt_min = ROM32(vmap[0]);
-+ perflvl->volt_max = ROM32(vmap[4]);
-+ }
-+}
-+
- void
- nouveau_perf_init(struct drm_device *dev)
- {
-@@ -141,6 +185,8 @@ nouveau_perf_init(struct drm_device *dev)
- struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
- struct nvbios *bios = &dev_priv->vbios;
- struct bit_entry P;
-+ struct nouveau_pm_memtimings *memtimings = &pm->memtimings;
-+ struct nouveau_pm_tbl_header mt_hdr;
- u8 version, headerlen, recordlen, entries;
- u8 *perf, *entry;
- int vid, i;
-@@ -188,6 +234,22 @@ nouveau_perf_init(struct drm_device *dev)
- }
-
- entry = perf + headerlen;
-+
-+ /* For version 0x15, initialize memtiming table */
-+ if(version == 0x15) {
-+ memtimings->timing =
-+ kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL);
-+ if(!memtimings) {
-+ NV_WARN(dev,"Could not allocate memtiming table\n");
-+ return;
-+ }
-+
-+ mt_hdr.entry_cnt = entries;
-+ mt_hdr.entry_len = 14;
-+ mt_hdr.version = version;
-+ mt_hdr.header_len = 4;
-+ }
-+
- for (i = 0; i < entries; i++) {
- struct nouveau_pm_level *perflvl = &pm->perflvl[pm->nr_perflvl];
-
-@@ -203,7 +265,8 @@ nouveau_perf_init(struct drm_device *dev)
- case 0x13:
- case 0x15:
- perflvl->fanspeed = entry[55];
-- perflvl->voltage = (recordlen > 56) ? entry[56] : 0;
-+ if (recordlen > 56)
-+ perflvl->volt_min = entry[56];
- perflvl->core = ROM32(entry[1]) * 10;
- perflvl->memory = ROM32(entry[5]) * 20;
- break;
-@@ -211,9 +274,10 @@ nouveau_perf_init(struct drm_device *dev)
- case 0x23:
- case 0x24:
- perflvl->fanspeed = entry[4];
-- perflvl->voltage = entry[5];
-- perflvl->core = ROM16(entry[6]) * 1000;
--
-+ perflvl->volt_min = entry[5];
-+ perflvl->shader = ROM16(entry[6]) * 1000;
-+ perflvl->core = perflvl->shader;
-+ perflvl->core += (signed char)entry[8] * 1000;
- if (dev_priv->chipset == 0x49 ||
- dev_priv->chipset == 0x4b)
- perflvl->memory = ROM16(entry[11]) * 1000;
-@@ -223,7 +287,7 @@ nouveau_perf_init(struct drm_device *dev)
- break;
- case 0x25:
- perflvl->fanspeed = entry[4];
-- perflvl->voltage = entry[5];
-+ perflvl->volt_min = entry[5];
- perflvl->core = ROM16(entry[6]) * 1000;
- perflvl->shader = ROM16(entry[10]) * 1000;
- perflvl->memory = ROM16(entry[12]) * 1000;
-@@ -232,7 +296,7 @@ nouveau_perf_init(struct drm_device *dev)
- perflvl->memscript = ROM16(entry[2]);
- case 0x35:
- perflvl->fanspeed = entry[6];
-- perflvl->voltage = entry[7];
-+ perflvl->volt_min = entry[7];
- perflvl->core = ROM16(entry[8]) * 1000;
- perflvl->shader = ROM16(entry[10]) * 1000;
- perflvl->memory = ROM16(entry[12]) * 1000;
-@@ -240,30 +304,34 @@ nouveau_perf_init(struct drm_device *dev)
- perflvl->unk05 = ROM16(entry[16]) * 1000;
- break;
- case 0x40:
--#define subent(n) entry[perf[2] + ((n) * perf[3])]
-+#define subent(n) (ROM16(entry[perf[2] + ((n) * perf[3])]) & 0xfff) * 1000
- perflvl->fanspeed = 0; /*XXX*/
-- perflvl->voltage = entry[2];
-+ perflvl->volt_min = entry[2];
- if (dev_priv->card_type == NV_50) {
-- perflvl->core = ROM16(subent(0)) & 0xfff;
-- perflvl->shader = ROM16(subent(1)) & 0xfff;
-- perflvl->memory = ROM16(subent(2)) & 0xfff;
-+ perflvl->core = subent(0);
-+ perflvl->shader = subent(1);
-+ perflvl->memory = subent(2);
-+ perflvl->vdec = subent(3);
-+ perflvl->unka0 = subent(4);
- } else {
-- perflvl->shader = ROM16(subent(3)) & 0xfff;
-+ perflvl->hub06 = subent(0);
-+ perflvl->hub01 = subent(1);
-+ perflvl->copy = subent(2);
-+ perflvl->shader = subent(3);
-+ perflvl->rop = subent(4);
-+ perflvl->memory = subent(5);
-+ perflvl->vdec = subent(6);
-+ perflvl->daemon = subent(10);
-+ perflvl->hub07 = subent(11);
- perflvl->core = perflvl->shader / 2;
-- perflvl->unk0a = ROM16(subent(4)) & 0xfff;
-- perflvl->memory = ROM16(subent(5)) & 0xfff;
- }
--
-- perflvl->core *= 1000;
-- perflvl->shader *= 1000;
-- perflvl->memory *= 1000;
-- perflvl->unk0a *= 1000;
- break;
- }
-
- /* make sure vid is valid */
-- if (pm->voltage.supported && perflvl->voltage) {
-- vid = nouveau_volt_vid_lookup(dev, perflvl->voltage);
-+ nouveau_perf_voltage(dev, &P, perflvl);
-+ if (pm->voltage.supported && perflvl->volt_min) {
-+ vid = nouveau_volt_vid_lookup(dev, perflvl->volt_min);
- if (vid < 0) {
- NV_DEBUG(dev, "drop perflvl %d, bad vid\n", i);
- entry += recordlen;
-@@ -272,7 +340,11 @@ nouveau_perf_init(struct drm_device *dev)
- }
-
- /* get the corresponding memory timings */
-- if (version > 0x15) {
-+ if (version == 0x15) {
-+ memtimings->timing[i].id = i;
-+ nv30_mem_timing_entry(dev,&mt_hdr,(struct nouveau_pm_tbl_entry*) &entry[41],0,&memtimings->timing[i]);
-+ perflvl->timing = &memtimings->timing[i];
-+ } else if (version > 0x15) {
- /* last 3 args are for < 0x40, ignored for >= 0x40 */
- perflvl->timing =
- nouveau_perf_timing(dev, &P,
-diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
-index da8d994..a539fd2 100644
---- a/drivers/gpu/drm/nouveau/nouveau_pm.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
-@@ -64,18 +64,26 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl)
- if (perflvl == pm->cur)
- return 0;
-
-- if (pm->voltage.supported && pm->voltage_set && perflvl->voltage) {
-- ret = pm->voltage_set(dev, perflvl->voltage);
-+ if (pm->voltage.supported && pm->voltage_set && perflvl->volt_min) {
-+ ret = pm->voltage_set(dev, perflvl->volt_min);
- if (ret) {
- NV_ERROR(dev, "voltage_set %d failed: %d\n",
-- perflvl->voltage, ret);
-+ perflvl->volt_min, ret);
- }
- }
-
-- nouveau_pm_clock_set(dev, perflvl, PLL_CORE, perflvl->core);
-- nouveau_pm_clock_set(dev, perflvl, PLL_SHADER, perflvl->shader);
-- nouveau_pm_clock_set(dev, perflvl, PLL_MEMORY, perflvl->memory);
-- nouveau_pm_clock_set(dev, perflvl, PLL_UNK05, perflvl->unk05);
-+ if (pm->clocks_pre) {
-+ void *state = pm->clocks_pre(dev, perflvl);
-+ if (IS_ERR(state))
-+ return PTR_ERR(state);
-+ pm->clocks_set(dev, state);
-+ } else
-+ if (pm->clock_set) {
-+ nouveau_pm_clock_set(dev, perflvl, PLL_CORE, perflvl->core);
-+ nouveau_pm_clock_set(dev, perflvl, PLL_SHADER, perflvl->shader);
-+ nouveau_pm_clock_set(dev, perflvl, PLL_MEMORY, perflvl->memory);
-+ nouveau_pm_clock_set(dev, perflvl, PLL_UNK05, perflvl->unk05);
-+ }
-
- pm->cur = perflvl;
- return 0;
-@@ -92,9 +100,6 @@ nouveau_pm_profile_set(struct drm_device *dev, const char *profile)
- if (nouveau_perflvl_wr != 7777)
- return -EPERM;
-
-- if (!pm->clock_set)
-- return -EINVAL;
--
- if (!strncmp(profile, "boot", 4))
- perflvl = &pm->boot;
- else {
-@@ -123,31 +128,37 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
- struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
- int ret;
-
-- if (!pm->clock_get)
-- return -EINVAL;
--
- memset(perflvl, 0, sizeof(*perflvl));
-
-- ret = pm->clock_get(dev, PLL_CORE);
-- if (ret > 0)
-- perflvl->core = ret;
-+ if (pm->clocks_get) {
-+ ret = pm->clocks_get(dev, perflvl);
-+ if (ret)
-+ return ret;
-+ } else
-+ if (pm->clock_get) {
-+ ret = pm->clock_get(dev, PLL_CORE);
-+ if (ret > 0)
-+ perflvl->core = ret;
-
-- ret = pm->clock_get(dev, PLL_MEMORY);
-- if (ret > 0)
-- perflvl->memory = ret;
-+ ret = pm->clock_get(dev, PLL_MEMORY);
-+ if (ret > 0)
-+ perflvl->memory = ret;
-
-- ret = pm->clock_get(dev, PLL_SHADER);
-- if (ret > 0)
-- perflvl->shader = ret;
-+ ret = pm->clock_get(dev, PLL_SHADER);
-+ if (ret > 0)
-+ perflvl->shader = ret;
-
-- ret = pm->clock_get(dev, PLL_UNK05);
-- if (ret > 0)
-- perflvl->unk05 = ret;
-+ ret = pm->clock_get(dev, PLL_UNK05);
-+ if (ret > 0)
-+ perflvl->unk05 = ret;
-+ }
-
- if (pm->voltage.supported && pm->voltage_get) {
- ret = pm->voltage_get(dev);
-- if (ret > 0)
-- perflvl->voltage = ret;
-+ if (ret > 0) {
-+ perflvl->volt_min = ret;
-+ perflvl->volt_max = ret;
-+ }
- }
-
- return 0;
-@@ -156,7 +167,7 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
- static void
- nouveau_pm_perflvl_info(struct nouveau_pm_level *perflvl, char *ptr, int len)
- {
-- char c[16], s[16], v[16], f[16], t[16];
-+ char c[16], s[16], v[32], f[16], t[16], m[16];
-
- c[0] = '\0';
- if (perflvl->core)
-@@ -166,9 +177,19 @@ nouveau_pm_perflvl_info(struct nouveau_pm_level *perflvl, char *ptr, int len)
- if (perflvl->shader)
- snprintf(s, sizeof(s), " shader %dMHz", perflvl->shader / 1000);
-
-+ m[0] = '\0';
-+ if (perflvl->memory)
-+ snprintf(m, sizeof(m), " memory %dMHz", perflvl->memory / 1000);
-+
- v[0] = '\0';
-- if (perflvl->voltage)
-- snprintf(v, sizeof(v), " voltage %dmV", perflvl->voltage * 10);
-+ if (perflvl->volt_min && perflvl->volt_min != perflvl->volt_max) {
-+ snprintf(v, sizeof(v), " voltage %dmV-%dmV",
-+ perflvl->volt_min / 1000, perflvl->volt_max / 1000);
-+ } else
-+ if (perflvl->volt_min) {
-+ snprintf(v, sizeof(v), " voltage %dmV",
-+ perflvl->volt_min / 1000);
-+ }
-
- f[0] = '\0';
- if (perflvl->fanspeed)
-@@ -178,8 +199,7 @@ nouveau_pm_perflvl_info(struct nouveau_pm_level *perflvl, char *ptr, int len)
- if (perflvl->timing)
- snprintf(t, sizeof(t), " timing %d", perflvl->timing->id);
-
-- snprintf(ptr, len, "memory %dMHz%s%s%s%s%s\n", perflvl->memory / 1000,
-- c, s, v, f, t);
-+ snprintf(ptr, len, "%s%s%s%s%s%s\n", c, s, m, t, v, f);
- }
-
- static ssize_t
-@@ -190,7 +210,7 @@ nouveau_pm_get_perflvl_info(struct device *d,
- char *ptr = buf;
- int len = PAGE_SIZE;
-
-- snprintf(ptr, len, "%d: ", perflvl->id);
-+ snprintf(ptr, len, "%d:", perflvl->id);
- ptr += strlen(buf);
- len -= strlen(buf);
-
-@@ -211,9 +231,9 @@ nouveau_pm_get_perflvl(struct device *d, struct device_attribute *a, char *buf)
- if (!pm->cur)
- snprintf(ptr, len, "setting: boot\n");
- else if (pm->cur == &pm->boot)
-- snprintf(ptr, len, "setting: boot\nc: ");
-+ snprintf(ptr, len, "setting: boot\nc:");
- else
-- snprintf(ptr, len, "setting: static %d\nc: ", pm->cur->id);
-+ snprintf(ptr, len, "setting: static %d\nc:", pm->cur->id);
- ptr += strlen(buf);
- len -= strlen(buf);
-
-@@ -292,7 +312,7 @@ nouveau_sysfs_fini(struct drm_device *dev)
- }
- }
-
--#ifdef CONFIG_HWMON
-+#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
- static ssize_t
- nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
- {
-@@ -409,7 +429,7 @@ static const struct attribute_group hwmon_attrgroup = {
- static int
- nouveau_hwmon_init(struct drm_device *dev)
- {
--#ifdef CONFIG_HWMON
-+#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
- struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
- struct device *hwmon_dev;
-@@ -442,7 +462,7 @@ nouveau_hwmon_init(struct drm_device *dev)
- static void
- nouveau_hwmon_fini(struct drm_device *dev)
- {
--#ifdef CONFIG_HWMON
-+#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
- struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
-
-@@ -488,7 +508,7 @@ nouveau_pm_init(struct drm_device *dev)
- NV_INFO(dev, "%d available performance level(s)\n", pm->nr_perflvl);
- for (i = 0; i < pm->nr_perflvl; i++) {
- nouveau_pm_perflvl_info(&pm->perflvl[i], info, sizeof(info));
-- NV_INFO(dev, "%d: %s", pm->perflvl[i].id, info);
-+ NV_INFO(dev, "%d:%s", pm->perflvl[i].id, info);
- }
-
- /* determine current ("boot") performance level */
-@@ -498,7 +518,7 @@ nouveau_pm_init(struct drm_device *dev)
- pm->cur = &pm->boot;
-
- nouveau_pm_perflvl_info(&pm->boot, info, sizeof(info));
-- NV_INFO(dev, "c: %s", info);
-+ NV_INFO(dev, "c:%s", info);
- }
-
- /* switch performance levels now if requested */
-diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.h b/drivers/gpu/drm/nouveau/nouveau_pm.h
-index 4a9838dd..8ac02cd 100644
---- a/drivers/gpu/drm/nouveau/nouveau_pm.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_pm.h
-@@ -52,6 +52,11 @@ void *nv04_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *,
- u32 id, int khz);
- void nv04_pm_clock_set(struct drm_device *, void *);
-
-+/* nv40_pm.c */
-+int nv40_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *);
-+void *nv40_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *);
-+void nv40_pm_clocks_set(struct drm_device *, void *);
-+
- /* nv50_pm.c */
- int nv50_pm_clock_get(struct drm_device *, u32 id);
- void *nv50_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *,
-@@ -59,10 +64,12 @@ void *nv50_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *,
- void nv50_pm_clock_set(struct drm_device *, void *);
-
- /* nva3_pm.c */
--int nva3_pm_clock_get(struct drm_device *, u32 id);
--void *nva3_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *,
-- u32 id, int khz);
--void nva3_pm_clock_set(struct drm_device *, void *);
-+int nva3_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *);
-+void *nva3_pm_clocks_pre(struct drm_device *, struct nouveau_pm_level *);
-+void nva3_pm_clocks_set(struct drm_device *, void *);
-+
-+/* nvc0_pm.c */
-+int nvc0_pm_clocks_get(struct drm_device *, struct nouveau_pm_level *);
-
- /* nouveau_temp.c */
- void nouveau_temp_init(struct drm_device *dev);
-diff --git a/drivers/gpu/drm/nouveau/nouveau_reg.h b/drivers/gpu/drm/nouveau/nouveau_reg.h
-index f18cdfc..43a96b9 100644
---- a/drivers/gpu/drm/nouveau/nouveau_reg.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_reg.h
-@@ -826,9 +826,12 @@
- #define NV50_PDISPLAY_SOR_DPMS_STATE_ACTIVE 0x00030000
- #define NV50_PDISPLAY_SOR_DPMS_STATE_BLANKED 0x00080000
- #define NV50_PDISPLAY_SOR_DPMS_STATE_WAIT 0x10000000
--#define NV50_PDISPLAY_SOR_BACKLIGHT 0x0061c084
--#define NV50_PDISPLAY_SOR_BACKLIGHT_ENABLE 0x80000000
--#define NV50_PDISPLAY_SOR_BACKLIGHT_LEVEL 0x00000fff
-+#define NV50_PDISP_SOR_PWM_DIV(i) (0x0061c080 + (i) * 0x800)
-+#define NV50_PDISP_SOR_PWM_CTL(i) (0x0061c084 + (i) * 0x800)
-+#define NV50_PDISP_SOR_PWM_CTL_NEW 0x80000000
-+#define NVA3_PDISP_SOR_PWM_CTL_UNK 0x40000000
-+#define NV50_PDISP_SOR_PWM_CTL_VAL 0x000007ff
-+#define NVA3_PDISP_SOR_PWM_CTL_VAL 0x00ffffff
- #define NV50_SOR_DP_CTRL(i, l) (0x0061c10c + (i) * 0x800 + (l) * 0x80)
- #define NV50_SOR_DP_CTRL_ENABLED 0x00000001
- #define NV50_SOR_DP_CTRL_ENHANCED_FRAME_ENABLED 0x00004000
-@@ -843,7 +846,7 @@
- #define NV50_SOR_DP_CTRL_TRAINING_PATTERN_2 0x02000000
- #define NV50_SOR_DP_UNK118(i, l) (0x0061c118 + (i) * 0x800 + (l) * 0x80)
- #define NV50_SOR_DP_UNK120(i, l) (0x0061c120 + (i) * 0x800 + (l) * 0x80)
--#define NV50_SOR_DP_UNK128(i, l) (0x0061c128 + (i) * 0x800 + (l) * 0x80)
-+#define NV50_SOR_DP_SCFG(i, l) (0x0061c128 + (i) * 0x800 + (l) * 0x80)
- #define NV50_SOR_DP_UNK130(i, l) (0x0061c130 + (i) * 0x800 + (l) * 0x80)
-
- #define NV50_PDISPLAY_USER(i) ((i) * 0x1000 + 0x00640000)
-diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
-index 2706cb3..b75258a 100644
---- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
-@@ -12,8 +12,8 @@ struct nouveau_sgdma_be {
- struct drm_device *dev;
-
- dma_addr_t *pages;
-- bool *ttm_alloced;
- unsigned nr_pages;
-+ bool unmap_pages;
-
- u64 offset;
- bool bound;
-@@ -26,43 +26,28 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages,
- {
- struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)be;
- struct drm_device *dev = nvbe->dev;
-+ int i;
-
- NV_DEBUG(nvbe->dev, "num_pages = %ld\n", num_pages);
-
-- if (nvbe->pages)
-- return -EINVAL;
--
-- nvbe->pages = kmalloc(sizeof(dma_addr_t) * num_pages, GFP_KERNEL);
-- if (!nvbe->pages)
-- return -ENOMEM;
-+ nvbe->pages = dma_addrs;
-+ nvbe->nr_pages = num_pages;
-+ nvbe->unmap_pages = true;
-
-- nvbe->ttm_alloced = kmalloc(sizeof(bool) * num_pages, GFP_KERNEL);
-- if (!nvbe->ttm_alloced) {
-- kfree(nvbe->pages);
-- nvbe->pages = NULL;
-- return -ENOMEM;
-+ /* this code path isn't called and is incorrect anyways */
-+ if (0) { /* dma_addrs[0] != DMA_ERROR_CODE) { */
-+ nvbe->unmap_pages = false;
-+ return 0;
- }
-
-- nvbe->nr_pages = 0;
-- while (num_pages--) {
-- /* this code path isn't called and is incorrect anyways */
-- if (0) { /*dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE)*/
-- nvbe->pages[nvbe->nr_pages] =
-- dma_addrs[nvbe->nr_pages];
-- nvbe->ttm_alloced[nvbe->nr_pages] = true;
-- } else {
-- nvbe->pages[nvbe->nr_pages] =
-- pci_map_page(dev->pdev, pages[nvbe->nr_pages], 0,
-- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-- if (pci_dma_mapping_error(dev->pdev,
-- nvbe->pages[nvbe->nr_pages])) {
-- be->func->clear(be);
-- return -EFAULT;
-- }
-- nvbe->ttm_alloced[nvbe->nr_pages] = false;
-+ for (i = 0; i < num_pages; i++) {
-+ nvbe->pages[i] = pci_map_page(dev->pdev, pages[i], 0,
-+ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-+ if (pci_dma_mapping_error(dev->pdev, nvbe->pages[i])) {
-+ nvbe->nr_pages = --i;
-+ be->func->clear(be);
-+ return -EFAULT;
- }
--
-- nvbe->nr_pages++;
- }
-
- return 0;
-@@ -72,25 +57,16 @@ static void
- nouveau_sgdma_clear(struct ttm_backend *be)
- {
- struct nouveau_sgdma_be *nvbe = (struct nouveau_sgdma_be *)be;
-- struct drm_device *dev;
--
-- if (nvbe && nvbe->pages) {
-- dev = nvbe->dev;
-- NV_DEBUG(dev, "\n");
-+ struct drm_device *dev = nvbe->dev;
-
-- if (nvbe->bound)
-- be->func->unbind(be);
-+ if (nvbe->bound)
-+ be->func->unbind(be);
-
-+ if (nvbe->unmap_pages) {
- while (nvbe->nr_pages--) {
-- if (!nvbe->ttm_alloced[nvbe->nr_pages])
-- pci_unmap_page(dev->pdev, nvbe->pages[nvbe->nr_pages],
-+ pci_unmap_page(dev->pdev, nvbe->pages[nvbe->nr_pages],
- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
- }
-- kfree(nvbe->pages);
-- kfree(nvbe->ttm_alloced);
-- nvbe->pages = NULL;
-- nvbe->ttm_alloced = NULL;
-- nvbe->nr_pages = 0;
- }
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
-index 10656e4..82478e0 100644
---- a/drivers/gpu/drm/nouveau/nouveau_state.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
-@@ -286,9 +286,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
- engine->gpio.get = nv10_gpio_get;
- engine->gpio.set = nv10_gpio_set;
- engine->gpio.irq_enable = NULL;
-- engine->pm.clock_get = nv04_pm_clock_get;
-- engine->pm.clock_pre = nv04_pm_clock_pre;
-- engine->pm.clock_set = nv04_pm_clock_set;
-+ engine->pm.clocks_get = nv40_pm_clocks_get;
-+ engine->pm.clocks_pre = nv40_pm_clocks_pre;
-+ engine->pm.clocks_set = nv40_pm_clocks_set;
- engine->pm.voltage_get = nouveau_voltage_gpio_get;
- engine->pm.voltage_set = nouveau_voltage_gpio_set;
- engine->pm.temp_get = nv40_temp_get;
-@@ -299,7 +299,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
- case 0x50:
- case 0x80: /* gotta love NVIDIA's consistency.. */
- case 0x90:
-- case 0xA0:
-+ case 0xa0:
- engine->instmem.init = nv50_instmem_init;
- engine->instmem.takedown = nv50_instmem_takedown;
- engine->instmem.suspend = nv50_instmem_suspend;
-@@ -359,9 +359,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
- engine->pm.clock_set = nv50_pm_clock_set;
- break;
- default:
-- engine->pm.clock_get = nva3_pm_clock_get;
-- engine->pm.clock_pre = nva3_pm_clock_pre;
-- engine->pm.clock_set = nva3_pm_clock_set;
-+ engine->pm.clocks_get = nva3_pm_clocks_get;
-+ engine->pm.clocks_pre = nva3_pm_clocks_pre;
-+ engine->pm.clocks_set = nva3_pm_clocks_set;
- break;
- }
- engine->pm.voltage_get = nouveau_voltage_gpio_get;
-@@ -376,7 +376,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
- engine->vram.put = nv50_vram_del;
- engine->vram.flags_valid = nv50_vram_flags_valid;
- break;
-- case 0xC0:
-+ case 0xc0:
- engine->instmem.init = nvc0_instmem_init;
- engine->instmem.takedown = nvc0_instmem_takedown;
- engine->instmem.suspend = nvc0_instmem_suspend;
-@@ -422,12 +422,73 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
- engine->vram.put = nv50_vram_del;
- engine->vram.flags_valid = nvc0_vram_flags_valid;
- engine->pm.temp_get = nv84_temp_get;
-+ engine->pm.clocks_get = nvc0_pm_clocks_get;
-+ engine->pm.voltage_get = nouveau_voltage_gpio_get;
-+ engine->pm.voltage_set = nouveau_voltage_gpio_set;
-+ break;
-+ case 0xd0:
-+ engine->instmem.init = nvc0_instmem_init;
-+ engine->instmem.takedown = nvc0_instmem_takedown;
-+ engine->instmem.suspend = nvc0_instmem_suspend;
-+ engine->instmem.resume = nvc0_instmem_resume;
-+ engine->instmem.get = nv50_instmem_get;
-+ engine->instmem.put = nv50_instmem_put;
-+ engine->instmem.map = nv50_instmem_map;
-+ engine->instmem.unmap = nv50_instmem_unmap;
-+ engine->instmem.flush = nv84_instmem_flush;
-+ engine->mc.init = nv50_mc_init;
-+ engine->mc.takedown = nv50_mc_takedown;
-+ engine->timer.init = nv04_timer_init;
-+ engine->timer.read = nv04_timer_read;
-+ engine->timer.takedown = nv04_timer_takedown;
-+ engine->fb.init = nvc0_fb_init;
-+ engine->fb.takedown = nvc0_fb_takedown;
-+ engine->fifo.channels = 128;
-+ engine->fifo.init = nvc0_fifo_init;
-+ engine->fifo.takedown = nvc0_fifo_takedown;
-+ engine->fifo.disable = nvc0_fifo_disable;
-+ engine->fifo.enable = nvc0_fifo_enable;
-+ engine->fifo.reassign = nvc0_fifo_reassign;
-+ engine->fifo.channel_id = nvc0_fifo_channel_id;
-+ engine->fifo.create_context = nvc0_fifo_create_context;
-+ engine->fifo.destroy_context = nvc0_fifo_destroy_context;
-+ engine->fifo.load_context = nvc0_fifo_load_context;
-+ engine->fifo.unload_context = nvc0_fifo_unload_context;
-+ engine->display.early_init = nouveau_stub_init;
-+ engine->display.late_takedown = nouveau_stub_takedown;
-+ engine->display.create = nvd0_display_create;
-+ engine->display.init = nvd0_display_init;
-+ engine->display.destroy = nvd0_display_destroy;
-+ engine->gpio.init = nv50_gpio_init;
-+ engine->gpio.takedown = nouveau_stub_takedown;
-+ engine->gpio.get = nvd0_gpio_get;
-+ engine->gpio.set = nvd0_gpio_set;
-+ engine->gpio.irq_register = nv50_gpio_irq_register;
-+ engine->gpio.irq_unregister = nv50_gpio_irq_unregister;
-+ engine->gpio.irq_enable = nv50_gpio_irq_enable;
-+ engine->vram.init = nvc0_vram_init;
-+ engine->vram.takedown = nv50_vram_fini;
-+ engine->vram.get = nvc0_vram_new;
-+ engine->vram.put = nv50_vram_del;
-+ engine->vram.flags_valid = nvc0_vram_flags_valid;
-+ engine->pm.clocks_get = nvc0_pm_clocks_get;
-+ engine->pm.voltage_get = nouveau_voltage_gpio_get;
-+ engine->pm.voltage_set = nouveau_voltage_gpio_set;
- break;
- default:
- NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset);
- return 1;
- }
-
-+ /* headless mode */
-+ if (nouveau_modeset == 2) {
-+ engine->display.early_init = nouveau_stub_init;
-+ engine->display.late_takedown = nouveau_stub_takedown;
-+ engine->display.create = nouveau_stub_init;
-+ engine->display.init = nouveau_stub_init;
-+ engine->display.destroy = nouveau_stub_takedown;
-+ }
-+
- return 0;
- }
-
-@@ -449,21 +510,6 @@ nouveau_vga_set_decode(void *priv, bool state)
- return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM;
- }
-
--static int
--nouveau_card_init_channel(struct drm_device *dev)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- int ret;
--
-- ret = nouveau_channel_alloc(dev, &dev_priv->channel, NULL,
-- NvDmaFB, NvDmaTT);
-- if (ret)
-- return ret;
--
-- mutex_unlock(&dev_priv->channel->mutex);
-- return 0;
--}
--
- static void nouveau_switcheroo_set_state(struct pci_dev *pdev,
- enum vga_switcheroo_state state)
- {
-@@ -630,8 +676,11 @@ nouveau_card_init(struct drm_device *dev)
- break;
- }
-
-- if (dev_priv->card_type == NV_40)
-- nv40_mpeg_create(dev);
-+ if (dev_priv->card_type == NV_40 ||
-+ dev_priv->chipset == 0x31 ||
-+ dev_priv->chipset == 0x34 ||
-+ dev_priv->chipset == 0x36)
-+ nv31_mpeg_create(dev);
- else
- if (dev_priv->card_type == NV_50 &&
- (dev_priv->chipset < 0x98 || dev_priv->chipset == 0xa0))
-@@ -651,41 +700,69 @@ nouveau_card_init(struct drm_device *dev)
- goto out_engine;
- }
-
-- ret = engine->display.create(dev);
-+ ret = nouveau_irq_init(dev);
- if (ret)
- goto out_fifo;
-
-- ret = drm_vblank_init(dev, nv_two_heads(dev) ? 2 : 1);
-- if (ret)
-- goto out_vblank;
-+ /* initialise general modesetting */
-+ drm_mode_config_init(dev);
-+ drm_mode_create_scaling_mode_property(dev);
-+ drm_mode_create_dithering_property(dev);
-+ dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
-+ dev->mode_config.fb_base = pci_resource_start(dev->pdev, 1);
-+ dev->mode_config.min_width = 0;
-+ dev->mode_config.min_height = 0;
-+ if (dev_priv->card_type < NV_10) {
-+ dev->mode_config.max_width = 2048;
-+ dev->mode_config.max_height = 2048;
-+ } else
-+ if (dev_priv->card_type < NV_50) {
-+ dev->mode_config.max_width = 4096;
-+ dev->mode_config.max_height = 4096;
-+ } else {
-+ dev->mode_config.max_width = 8192;
-+ dev->mode_config.max_height = 8192;
-+ }
-
-- ret = nouveau_irq_init(dev);
-+ ret = engine->display.create(dev);
- if (ret)
-- goto out_vblank;
-+ goto out_irq;
-
-- /* what about PVIDEO/PCRTC/PRAMDAC etc? */
-+ nouveau_backlight_init(dev);
-
- if (dev_priv->eng[NVOBJ_ENGINE_GR]) {
- ret = nouveau_fence_init(dev);
- if (ret)
-- goto out_irq;
-+ goto out_disp;
-
-- ret = nouveau_card_init_channel(dev);
-+ ret = nouveau_channel_alloc(dev, &dev_priv->channel, NULL,
-+ NvDmaFB, NvDmaTT);
- if (ret)
- goto out_fence;
-+
-+ mutex_unlock(&dev_priv->channel->mutex);
-+ }
-+
-+ if (dev->mode_config.num_crtc) {
-+ ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
-+ if (ret)
-+ goto out_chan;
-+
-+ nouveau_fbcon_init(dev);
-+ drm_kms_helper_poll_init(dev);
- }
-
-- nouveau_fbcon_init(dev);
-- drm_kms_helper_poll_init(dev);
- return 0;
-
-+out_chan:
-+ nouveau_channel_put_unlocked(&dev_priv->channel);
- out_fence:
- nouveau_fence_fini(dev);
-+out_disp:
-+ nouveau_backlight_exit(dev);
-+ engine->display.destroy(dev);
- out_irq:
- nouveau_irq_fini(dev);
--out_vblank:
-- drm_vblank_cleanup(dev);
-- engine->display.destroy(dev);
- out_fifo:
- if (!dev_priv->noaccel)
- engine->fifo.takedown(dev);
-@@ -732,15 +809,20 @@ static void nouveau_card_takedown(struct drm_device *dev)
- struct nouveau_engine *engine = &dev_priv->engine;
- int e;
-
-- drm_kms_helper_poll_fini(dev);
-- nouveau_fbcon_fini(dev);
-+ if (dev->mode_config.num_crtc) {
-+ drm_kms_helper_poll_fini(dev);
-+ nouveau_fbcon_fini(dev);
-+ drm_vblank_cleanup(dev);
-+ }
-
- if (dev_priv->channel) {
- nouveau_channel_put_unlocked(&dev_priv->channel);
- nouveau_fence_fini(dev);
- }
-
-+ nouveau_backlight_exit(dev);
- engine->display.destroy(dev);
-+ drm_mode_config_cleanup(dev);
-
- if (!dev_priv->noaccel) {
- engine->fifo.takedown(dev);
-@@ -774,7 +856,6 @@ static void nouveau_card_takedown(struct drm_device *dev)
- engine->vram.takedown(dev);
-
- nouveau_irq_fini(dev);
-- drm_vblank_cleanup(dev);
-
- nouveau_pm_fini(dev);
- nouveau_bios_takedown(dev);
-@@ -907,7 +988,7 @@ static int nouveau_remove_conflicting_drivers(struct drm_device *dev)
- int nouveau_load(struct drm_device *dev, unsigned long flags)
- {
- struct drm_nouveau_private *dev_priv;
-- uint32_t reg0;
-+ uint32_t reg0, strap;
- resource_size_t mmio_start_offs;
- int ret;
-
-@@ -951,13 +1032,11 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
-
- /* Time to determine the card architecture */
- reg0 = nv_rd32(dev, NV03_PMC_BOOT_0);
-- dev_priv->stepping = 0; /* XXX: add stepping for pre-NV10? */
-
- /* We're dealing with >=NV10 */
- if ((reg0 & 0x0f000000) > 0) {
- /* Bit 27-20 contain the architecture in hex */
- dev_priv->chipset = (reg0 & 0xff00000) >> 20;
-- dev_priv->stepping = (reg0 & 0xff);
- /* NV04 or NV05 */
- } else if ((reg0 & 0xff00fff0) == 0x20004000) {
- if (reg0 & 0x00f00000)
-@@ -987,6 +1066,9 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
- case 0xc0:
- dev_priv->card_type = NV_C0;
- break;
-+ case 0xd0:
-+ dev_priv->card_type = NV_D0;
-+ break;
- default:
- NV_INFO(dev, "Unsupported chipset 0x%08x\n", reg0);
- ret = -EINVAL;
-@@ -996,6 +1078,23 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
- NV_INFO(dev, "Detected an NV%2x generation card (0x%08x)\n",
- dev_priv->card_type, reg0);
-
-+ /* determine frequency of timing crystal */
-+ strap = nv_rd32(dev, 0x101000);
-+ if ( dev_priv->chipset < 0x17 ||
-+ (dev_priv->chipset >= 0x20 && dev_priv->chipset <= 0x25))
-+ strap &= 0x00000040;
-+ else
-+ strap &= 0x00400040;
-+
-+ switch (strap) {
-+ case 0x00000000: dev_priv->crystal = 13500; break;
-+ case 0x00000040: dev_priv->crystal = 14318; break;
-+ case 0x00400000: dev_priv->crystal = 27000; break;
-+ case 0x00400040: dev_priv->crystal = 25000; break;
-+ }
-+
-+ NV_DEBUG(dev, "crystal freq: %dKHz\n", dev_priv->crystal);
-+
- /* Determine whether we'll attempt acceleration or not, some
- * cards are disabled by default here due to them being known
- * non-functional, or never been tested due to lack of hw.
-@@ -1030,7 +1129,7 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
- ioremap(pci_resource_start(dev->pdev, ramin_bar),
- dev_priv->ramin_size);
- if (!dev_priv->ramin) {
-- NV_ERROR(dev, "Failed to PRAMIN BAR");
-+ NV_ERROR(dev, "Failed to map PRAMIN BAR\n");
- ret = -ENOMEM;
- goto err_mmio;
- }
-@@ -1130,7 +1229,7 @@ int nouveau_ioctl_getparam(struct drm_device *dev, void *data,
- getparam->value = 1;
- break;
- case NOUVEAU_GETPARAM_HAS_PAGEFLIP:
-- getparam->value = 1;
-+ getparam->value = dev_priv->card_type < NV_D0;
- break;
- case NOUVEAU_GETPARAM_GRAPH_UNITS:
- /* NV40 and NV50 versions are quite different, but register
-@@ -1198,6 +1297,23 @@ nouveau_wait_ne(struct drm_device *dev, uint64_t timeout,
- return false;
- }
-
-+/* Wait until cond(data) == true, up until timeout has hit */
-+bool
-+nouveau_wait_cb(struct drm_device *dev, u64 timeout,
-+ bool (*cond)(void *), void *data)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer;
-+ u64 start = ptimer->read(dev);
-+
-+ do {
-+ if (cond(data) == true)
-+ return true;
-+ } while (ptimer->read(dev) - start < timeout);
-+
-+ return false;
-+}
-+
- /* Waits for PGRAPH to go completely idle */
- bool nouveau_wait_for_idle(struct drm_device *dev)
- {
-diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.c b/drivers/gpu/drm/nouveau/nouveau_vm.c
-index 244fd38..ef0832b 100644
---- a/drivers/gpu/drm/nouveau/nouveau_vm.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_vm.c
-@@ -172,9 +172,9 @@ nouveau_vm_unmap_pgt(struct nouveau_vm *vm, int big, u32 fpde, u32 lpde)
- vm->map_pgt(vpgd->obj, pde, vpgt->obj);
- }
-
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- nouveau_gpuobj_ref(NULL, &pgt);
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- }
- }
-
-@@ -191,18 +191,18 @@ nouveau_vm_map_pgt(struct nouveau_vm *vm, u32 pde, u32 type)
- pgt_size = (1 << (vm->pgt_bits + 12)) >> type;
- pgt_size *= 8;
-
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- ret = nouveau_gpuobj_new(vm->dev, NULL, pgt_size, 0x1000,
- NVOBJ_FLAG_ZERO_ALLOC, &pgt);
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- if (unlikely(ret))
- return ret;
-
- /* someone beat us to filling the PDE while we didn't have the lock */
- if (unlikely(vpgt->refcount[big]++)) {
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- nouveau_gpuobj_ref(NULL, &pgt);
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- return 0;
- }
-
-@@ -223,10 +223,10 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
- u32 fpde, lpde, pde;
- int ret;
-
-- mutex_lock(&vm->mm->mutex);
-- ret = nouveau_mm_get(vm->mm, page_shift, msize, 0, align, &vma->node);
-+ mutex_lock(&vm->mm.mutex);
-+ ret = nouveau_mm_get(&vm->mm, page_shift, msize, 0, align, &vma->node);
- if (unlikely(ret != 0)) {
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- return ret;
- }
-
-@@ -245,13 +245,13 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
- if (ret) {
- if (pde != fpde)
- nouveau_vm_unmap_pgt(vm, big, fpde, pde - 1);
-- nouveau_mm_put(vm->mm, vma->node);
-- mutex_unlock(&vm->mm->mutex);
-+ nouveau_mm_put(&vm->mm, vma->node);
-+ mutex_unlock(&vm->mm.mutex);
- vma->node = NULL;
- return ret;
- }
- }
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
-
- vma->vm = vm;
- vma->offset = (u64)vma->node->offset << 12;
-@@ -270,11 +270,11 @@ nouveau_vm_put(struct nouveau_vma *vma)
- fpde = (vma->node->offset >> vm->pgt_bits);
- lpde = (vma->node->offset + vma->node->length - 1) >> vm->pgt_bits;
-
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- nouveau_vm_unmap_pgt(vm, vma->node->type != vm->spg_shift, fpde, lpde);
-- nouveau_mm_put(vm->mm, vma->node);
-+ nouveau_mm_put(&vm->mm, vma->node);
- vma->node = NULL;
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- }
-
- int
-@@ -306,7 +306,7 @@ nouveau_vm_new(struct drm_device *dev, u64 offset, u64 length, u64 mm_offset,
- block = length;
-
- } else
-- if (dev_priv->card_type == NV_C0) {
-+ if (dev_priv->card_type >= NV_C0) {
- vm->map_pgt = nvc0_vm_map_pgt;
- vm->map = nvc0_vm_map;
- vm->map_sg = nvc0_vm_map_sg;
-@@ -360,11 +360,11 @@ nouveau_vm_link(struct nouveau_vm *vm, struct nouveau_gpuobj *pgd)
-
- nouveau_gpuobj_ref(pgd, &vpgd->obj);
-
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- for (i = vm->fpde; i <= vm->lpde; i++)
- vm->map_pgt(pgd, i, vm->pgt[i - vm->fpde].obj);
- list_add(&vpgd->head, &vm->pgd_list);
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
- return 0;
- }
-
-@@ -377,7 +377,7 @@ nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *mpgd)
- if (!mpgd)
- return;
-
-- mutex_lock(&vm->mm->mutex);
-+ mutex_lock(&vm->mm.mutex);
- list_for_each_entry_safe(vpgd, tmp, &vm->pgd_list, head) {
- if (vpgd->obj == mpgd) {
- pgd = vpgd->obj;
-@@ -386,7 +386,7 @@ nouveau_vm_unlink(struct nouveau_vm *vm, struct nouveau_gpuobj *mpgd)
- break;
- }
- }
-- mutex_unlock(&vm->mm->mutex);
-+ mutex_unlock(&vm->mm.mutex);
-
- nouveau_gpuobj_ref(NULL, &pgd);
- }
-diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.h b/drivers/gpu/drm/nouveau/nouveau_vm.h
-index 579ca8c..6ce995f 100644
---- a/drivers/gpu/drm/nouveau/nouveau_vm.h
-+++ b/drivers/gpu/drm/nouveau/nouveau_vm.h
-@@ -51,7 +51,7 @@ struct nouveau_vma {
-
- struct nouveau_vm {
- struct drm_device *dev;
-- struct nouveau_mm *mm;
-+ struct nouveau_mm mm;
- int refcount;
-
- struct list_head pgd_list;
-diff --git a/drivers/gpu/drm/nouveau/nouveau_volt.c b/drivers/gpu/drm/nouveau/nouveau_volt.c
-index 75e87274..86d03e1 100644
---- a/drivers/gpu/drm/nouveau/nouveau_volt.c
-+++ b/drivers/gpu/drm/nouveau/nouveau_volt.c
-@@ -27,7 +27,7 @@
- #include "nouveau_drv.h"
- #include "nouveau_pm.h"
-
--static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a };
-+static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a, 0x73 };
- static int nr_vidtag = sizeof(vidtag) / sizeof(vidtag[0]);
-
- int
-@@ -170,6 +170,13 @@ nouveau_volt_init(struct drm_device *dev)
- */
- vidshift = 2;
- break;
-+ case 0x40:
-+ headerlen = volt[1];
-+ recordlen = volt[2];
-+ entries = volt[3]; /* not a clue what the entries are for.. */
-+ vidmask = volt[11]; /* guess.. */
-+ vidshift = 0;
-+ break;
- default:
- NV_WARN(dev, "voltage table 0x%02x unknown\n", volt[0]);
- return;
-@@ -197,16 +204,37 @@ nouveau_volt_init(struct drm_device *dev)
- }
-
- /* parse vbios entries into common format */
-- voltage->level = kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL);
-- if (!voltage->level)
-- return;
-+ voltage->version = volt[0];
-+ if (voltage->version < 0x40) {
-+ voltage->nr_level = entries;
-+ voltage->level =
-+ kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL);
-+ if (!voltage->level)
-+ return;
-
-- entry = volt + headerlen;
-- for (i = 0; i < entries; i++, entry += recordlen) {
-- voltage->level[i].voltage = entry[0];
-- voltage->level[i].vid = entry[1] >> vidshift;
-+ entry = volt + headerlen;
-+ for (i = 0; i < entries; i++, entry += recordlen) {
-+ voltage->level[i].voltage = entry[0] * 10000;
-+ voltage->level[i].vid = entry[1] >> vidshift;
-+ }
-+ } else {
-+ u32 volt_uv = ROM32(volt[4]);
-+ s16 step_uv = ROM16(volt[8]);
-+ u8 vid;
-+
-+ voltage->nr_level = voltage->vid_mask + 1;
-+ voltage->level = kcalloc(voltage->nr_level,
-+ sizeof(*voltage->level), GFP_KERNEL);
-+ if (!voltage->level)
-+ return;
-+
-+ for (vid = 0; vid <= voltage->vid_mask; vid++) {
-+ voltage->level[vid].voltage = volt_uv;
-+ voltage->level[vid].vid = vid;
-+ volt_uv += step_uv;
-+ }
- }
-- voltage->nr_level = entries;
-+
- voltage->supported = true;
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c
-index 1715e14..6bd8518 100644
---- a/drivers/gpu/drm/nouveau/nv04_display.c
-+++ b/drivers/gpu/drm/nouveau/nv04_display.c
-@@ -126,27 +126,6 @@ nv04_display_create(struct drm_device *dev)
-
- nouveau_hw_save_vga_fonts(dev, 1);
-
-- drm_mode_config_init(dev);
-- drm_mode_create_scaling_mode_property(dev);
-- drm_mode_create_dithering_property(dev);
--
-- dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
--
-- dev->mode_config.min_width = 0;
-- dev->mode_config.min_height = 0;
-- switch (dev_priv->card_type) {
-- case NV_04:
-- dev->mode_config.max_width = 2048;
-- dev->mode_config.max_height = 2048;
-- break;
-- default:
-- dev->mode_config.max_width = 4096;
-- dev->mode_config.max_height = 4096;
-- break;
-- }
--
-- dev->mode_config.fb_base = dev_priv->fb_phys;
--
- nv04_crtc_create(dev, 0);
- if (nv_two_heads(dev))
- nv04_crtc_create(dev, 1);
-@@ -235,8 +214,6 @@ nv04_display_destroy(struct drm_device *dev)
- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
- crtc->funcs->restore(crtc);
-
-- drm_mode_config_cleanup(dev);
--
- nouveau_hw_save_vga_fonts(dev, 0);
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nv04_pm.c b/drivers/gpu/drm/nouveau/nv04_pm.c
-index eb1c70d..9ae92a8 100644
---- a/drivers/gpu/drm/nouveau/nv04_pm.c
-+++ b/drivers/gpu/drm/nouveau/nv04_pm.c
-@@ -68,6 +68,7 @@ void
- nv04_pm_clock_set(struct drm_device *dev, void *pre_state)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer;
- struct nv04_pm_state *state = pre_state;
- u32 reg = state->pll.reg;
-
-@@ -85,6 +86,9 @@ nv04_pm_clock_set(struct drm_device *dev, void *pre_state)
- nv_mask(dev, 0x1002c0, 0, 1 << 8);
- }
-
-+ if (reg == NV_PRAMDAC_NVPLL_COEFF)
-+ ptimer->init(dev);
-+
- kfree(state);
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nv04_timer.c b/drivers/gpu/drm/nouveau/nv04_timer.c
-index 1d09ddd..263301b 100644
---- a/drivers/gpu/drm/nouveau/nv04_timer.c
-+++ b/drivers/gpu/drm/nouveau/nv04_timer.c
-@@ -6,43 +6,75 @@
- int
- nv04_timer_init(struct drm_device *dev)
- {
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ u32 m, n, d;
-+
- nv_wr32(dev, NV04_PTIMER_INTR_EN_0, 0x00000000);
- nv_wr32(dev, NV04_PTIMER_INTR_0, 0xFFFFFFFF);
-
-- /* Just use the pre-existing values when possible for now; these regs
-- * are not written in nv (driver writer missed a /4 on the address), and
-- * writing 8 and 3 to the correct regs breaks the timings on the LVDS
-- * hardware sequencing microcode.
-- * A correct solution (involving calculations with the GPU PLL) can
-- * be done when kernel modesetting lands
-- */
-- if (!nv_rd32(dev, NV04_PTIMER_NUMERATOR) ||
-- !nv_rd32(dev, NV04_PTIMER_DENOMINATOR)) {
-- nv_wr32(dev, NV04_PTIMER_NUMERATOR, 0x00000008);
-- nv_wr32(dev, NV04_PTIMER_DENOMINATOR, 0x00000003);
-+ /* aim for 31.25MHz, which gives us nanosecond timestamps */
-+ d = 1000000 / 32;
-+
-+ /* determine base clock for timer source */
-+ if (dev_priv->chipset < 0x40) {
-+ n = dev_priv->engine.pm.clock_get(dev, PLL_CORE);
-+ } else
-+ if (dev_priv->chipset == 0x40) {
-+ /*XXX: figure this out */
-+ n = 0;
-+ } else {
-+ n = dev_priv->crystal;
-+ m = 1;
-+ while (n < (d * 2)) {
-+ n += (n / m);
-+ m++;
-+ }
-+
-+ nv_wr32(dev, 0x009220, m - 1);
-+ }
-+
-+ if (!n) {
-+ NV_WARN(dev, "PTIMER: unknown input clock freq\n");
-+ if (!nv_rd32(dev, NV04_PTIMER_NUMERATOR) ||
-+ !nv_rd32(dev, NV04_PTIMER_DENOMINATOR)) {
-+ nv_wr32(dev, NV04_PTIMER_NUMERATOR, 1);
-+ nv_wr32(dev, NV04_PTIMER_DENOMINATOR, 1);
-+ }
-+ return 0;
-+ }
-+
-+ /* reduce ratio to acceptable values */
-+ while (((n % 5) == 0) && ((d % 5) == 0)) {
-+ n /= 5;
-+ d /= 5;
- }
-
-+ while (((n % 2) == 0) && ((d % 2) == 0)) {
-+ n /= 2;
-+ d /= 2;
-+ }
-+
-+ while (n > 0xffff || d > 0xffff) {
-+ n >>= 1;
-+ d >>= 1;
-+ }
-+
-+ nv_wr32(dev, NV04_PTIMER_NUMERATOR, n);
-+ nv_wr32(dev, NV04_PTIMER_DENOMINATOR, d);
- return 0;
- }
-
--uint64_t
-+u64
- nv04_timer_read(struct drm_device *dev)
- {
-- uint32_t low;
-- /* From kmmio dumps on nv28 this looks like how the blob does this.
-- * It reads the high dword twice, before and after.
-- * The only explanation seems to be that the 64-bit timer counter
-- * advances between high and low dword reads and may corrupt the
-- * result. Not confirmed.
-- */
-- uint32_t high2 = nv_rd32(dev, NV04_PTIMER_TIME_1);
-- uint32_t high1;
-+ u32 hi, lo;
-+
- do {
-- high1 = high2;
-- low = nv_rd32(dev, NV04_PTIMER_TIME_0);
-- high2 = nv_rd32(dev, NV04_PTIMER_TIME_1);
-- } while (high1 != high2);
-- return (((uint64_t)high2) << 32) | (uint64_t)low;
-+ hi = nv_rd32(dev, NV04_PTIMER_TIME_1);
-+ lo = nv_rd32(dev, NV04_PTIMER_TIME_0);
-+ } while (hi != nv_rd32(dev, NV04_PTIMER_TIME_1));
-+
-+ return ((u64)hi << 32 | lo);
- }
-
- void
-diff --git a/drivers/gpu/drm/nouveau/nv31_mpeg.c b/drivers/gpu/drm/nouveau/nv31_mpeg.c
-new file mode 100644
-index 0000000..6f06a07
---- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nv31_mpeg.c
-@@ -0,0 +1,344 @@
-+/*
-+ * Copyright 2011 Red Hat Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Authors: Ben Skeggs
-+ */
-+
-+#include "drmP.h"
-+#include "nouveau_drv.h"
-+#include "nouveau_ramht.h"
-+
-+struct nv31_mpeg_engine {
-+ struct nouveau_exec_engine base;
-+ atomic_t refcount;
-+};
-+
-+
-+static int
-+nv31_mpeg_context_new(struct nouveau_channel *chan, int engine)
-+{
-+ struct nv31_mpeg_engine *pmpeg = nv_engine(chan->dev, engine);
-+
-+ if (!atomic_add_unless(&pmpeg->refcount, 1, 1))
-+ return -EBUSY;
-+
-+ chan->engctx[engine] = (void *)0xdeadcafe;
-+ return 0;
-+}
-+
-+static void
-+nv31_mpeg_context_del(struct nouveau_channel *chan, int engine)
-+{
-+ struct nv31_mpeg_engine *pmpeg = nv_engine(chan->dev, engine);
-+ atomic_dec(&pmpeg->refcount);
-+ chan->engctx[engine] = NULL;
-+}
-+
-+static int
-+nv40_mpeg_context_new(struct nouveau_channel *chan, int engine)
-+{
-+ struct drm_device *dev = chan->dev;
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_gpuobj *ctx = NULL;
-+ unsigned long flags;
-+ int ret;
-+
-+ NV_DEBUG(dev, "ch%d\n", chan->id);
-+
-+ ret = nouveau_gpuobj_new(dev, NULL, 264 * 4, 16, NVOBJ_FLAG_ZERO_ALLOC |
-+ NVOBJ_FLAG_ZERO_FREE, &ctx);
-+ if (ret)
-+ return ret;
-+
-+ nv_wo32(ctx, 0x78, 0x02001ec1);
-+
-+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-+ nv_mask(dev, 0x002500, 0x00000001, 0x00000000);
-+ if ((nv_rd32(dev, 0x003204) & 0x1f) == chan->id)
-+ nv_wr32(dev, 0x00330c, ctx->pinst >> 4);
-+ nv_wo32(chan->ramfc, 0x54, ctx->pinst >> 4);
-+ nv_mask(dev, 0x002500, 0x00000001, 0x00000001);
-+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
-+
-+ chan->engctx[engine] = ctx;
-+ return 0;
-+}
-+
-+static void
-+nv40_mpeg_context_del(struct nouveau_channel *chan, int engine)
-+{
-+ struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
-+ struct nouveau_gpuobj *ctx = chan->engctx[engine];
-+ struct drm_device *dev = chan->dev;
-+ unsigned long flags;
-+ u32 inst = 0x80000000 | (ctx->pinst >> 4);
-+
-+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-+ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000);
-+ if (nv_rd32(dev, 0x00b318) == inst)
-+ nv_mask(dev, 0x00b318, 0x80000000, 0x00000000);
-+ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001);
-+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
-+
-+ nouveau_gpuobj_ref(NULL, &ctx);
-+ chan->engctx[engine] = NULL;
-+}
-+
-+static int
-+nv31_mpeg_object_new(struct nouveau_channel *chan, int engine,
-+ u32 handle, u16 class)
-+{
-+ struct drm_device *dev = chan->dev;
-+ struct nouveau_gpuobj *obj = NULL;
-+ int ret;
-+
-+ ret = nouveau_gpuobj_new(dev, chan, 20, 16, NVOBJ_FLAG_ZERO_ALLOC |
-+ NVOBJ_FLAG_ZERO_FREE, &obj);
-+ if (ret)
-+ return ret;
-+ obj->engine = 2;
-+ obj->class = class;
-+
-+ nv_wo32(obj, 0x00, class);
-+
-+ ret = nouveau_ramht_insert(chan, handle, obj);
-+ nouveau_gpuobj_ref(NULL, &obj);
-+ return ret;
-+}
-+
-+static int
-+nv31_mpeg_init(struct drm_device *dev, int engine)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nv31_mpeg_engine *pmpeg = nv_engine(dev, engine);
-+ int i;
-+
-+ /* VPE init */
-+ nv_mask(dev, 0x000200, 0x00000002, 0x00000000);
-+ nv_mask(dev, 0x000200, 0x00000002, 0x00000002);
-+ nv_wr32(dev, 0x00b0e0, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */
-+ nv_wr32(dev, 0x00b0e8, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */
-+
-+ for (i = 0; i < dev_priv->engine.fb.num_tiles; i++)
-+ pmpeg->base.set_tile_region(dev, i);
-+
-+ /* PMPEG init */
-+ nv_wr32(dev, 0x00b32c, 0x00000000);
-+ nv_wr32(dev, 0x00b314, 0x00000100);
-+ nv_wr32(dev, 0x00b220, nv44_graph_class(dev) ? 0x00000044 : 0x00000031);
-+ nv_wr32(dev, 0x00b300, 0x02001ec1);
-+ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001);
-+
-+ nv_wr32(dev, 0x00b100, 0xffffffff);
-+ nv_wr32(dev, 0x00b140, 0xffffffff);
-+
-+ if (!nv_wait(dev, 0x00b200, 0x00000001, 0x00000000)) {
-+ NV_ERROR(dev, "PMPEG init: 0x%08x\n", nv_rd32(dev, 0x00b200));
-+ return -EBUSY;
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+nv31_mpeg_fini(struct drm_device *dev, int engine, bool suspend)
-+{
-+ /*XXX: context save? */
-+ nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000);
-+ nv_wr32(dev, 0x00b140, 0x00000000);
-+ return 0;
-+}
-+
-+static int
-+nv31_mpeg_mthd_dma(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data)
-+{
-+ struct drm_device *dev = chan->dev;
-+ u32 inst = data << 4;
-+ u32 dma0 = nv_ri32(dev, inst + 0);
-+ u32 dma1 = nv_ri32(dev, inst + 4);
-+ u32 dma2 = nv_ri32(dev, inst + 8);
-+ u32 base = (dma2 & 0xfffff000) | (dma0 >> 20);
-+ u32 size = dma1 + 1;
-+
-+ /* only allow linear DMA objects */
-+ if (!(dma0 & 0x00002000))
-+ return -EINVAL;
-+
-+ if (mthd == 0x0190) {
-+ /* DMA_CMD */
-+ nv_mask(dev, 0x00b300, 0x00030000, (dma0 & 0x00030000));
-+ nv_wr32(dev, 0x00b334, base);
-+ nv_wr32(dev, 0x00b324, size);
-+ } else
-+ if (mthd == 0x01a0) {
-+ /* DMA_DATA */
-+ nv_mask(dev, 0x00b300, 0x000c0000, (dma0 & 0x00030000) << 2);
-+ nv_wr32(dev, 0x00b360, base);
-+ nv_wr32(dev, 0x00b364, size);
-+ } else {
-+ /* DMA_IMAGE, VRAM only */
-+ if (dma0 & 0x000c0000)
-+ return -EINVAL;
-+
-+ nv_wr32(dev, 0x00b370, base);
-+ nv_wr32(dev, 0x00b374, size);
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+nv31_mpeg_isr_chid(struct drm_device *dev, u32 inst)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_gpuobj *ctx;
-+ unsigned long flags;
-+ int i;
-+
-+ /* hardcode drm channel id on nv3x, so swmthd lookup works */
-+ if (dev_priv->card_type < NV_40)
-+ return 0;
-+
-+ spin_lock_irqsave(&dev_priv->channels.lock, flags);
-+ for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
-+ if (!dev_priv->channels.ptr[i])
-+ continue;
-+
-+ ctx = dev_priv->channels.ptr[i]->engctx[NVOBJ_ENGINE_MPEG];
-+ if (ctx && ctx->pinst == inst)
-+ break;
-+ }
-+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags);
-+ return i;
-+}
-+
-+static void
-+nv31_vpe_set_tile_region(struct drm_device *dev, int i)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i];
-+
-+ nv_wr32(dev, 0x00b008 + (i * 0x10), tile->pitch);
-+ nv_wr32(dev, 0x00b004 + (i * 0x10), tile->limit);
-+ nv_wr32(dev, 0x00b000 + (i * 0x10), tile->addr);
-+}
-+
-+static void
-+nv31_mpeg_isr(struct drm_device *dev)
-+{
-+ u32 inst = (nv_rd32(dev, 0x00b318) & 0x000fffff) << 4;
-+ u32 chid = nv31_mpeg_isr_chid(dev, inst);
-+ u32 stat = nv_rd32(dev, 0x00b100);
-+ u32 type = nv_rd32(dev, 0x00b230);
-+ u32 mthd = nv_rd32(dev, 0x00b234);
-+ u32 data = nv_rd32(dev, 0x00b238);
-+ u32 show = stat;
-+
-+ if (stat & 0x01000000) {
-+ /* happens on initial binding of the object */
-+ if (type == 0x00000020 && mthd == 0x0000) {
-+ nv_mask(dev, 0x00b308, 0x00000000, 0x00000000);
-+ show &= ~0x01000000;
-+ }
-+
-+ if (type == 0x00000010) {
-+ if (!nouveau_gpuobj_mthd_call2(dev, chid, 0x3174, mthd, data))
-+ show &= ~0x01000000;
-+ }
-+ }
-+
-+ nv_wr32(dev, 0x00b100, stat);
-+ nv_wr32(dev, 0x00b230, 0x00000001);
-+
-+ if (show && nouveau_ratelimit()) {
-+ NV_INFO(dev, "PMPEG: Ch %d [0x%08x] 0x%08x 0x%08x 0x%08x 0x%08x\n",
-+ chid, inst, stat, type, mthd, data);
-+ }
-+}
-+
-+static void
-+nv31_vpe_isr(struct drm_device *dev)
-+{
-+ if (nv_rd32(dev, 0x00b100))
-+ nv31_mpeg_isr(dev);
-+
-+ if (nv_rd32(dev, 0x00b800)) {
-+ u32 stat = nv_rd32(dev, 0x00b800);
-+ NV_INFO(dev, "PMSRCH: 0x%08x\n", stat);
-+ nv_wr32(dev, 0xb800, stat);
-+ }
-+}
-+
-+static void
-+nv31_mpeg_destroy(struct drm_device *dev, int engine)
-+{
-+ struct nv31_mpeg_engine *pmpeg = nv_engine(dev, engine);
-+
-+ nouveau_irq_unregister(dev, 0);
-+
-+ NVOBJ_ENGINE_DEL(dev, MPEG);
-+ kfree(pmpeg);
-+}
-+
-+int
-+nv31_mpeg_create(struct drm_device *dev)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nv31_mpeg_engine *pmpeg;
-+
-+ pmpeg = kzalloc(sizeof(*pmpeg), GFP_KERNEL);
-+ if (!pmpeg)
-+ return -ENOMEM;
-+ atomic_set(&pmpeg->refcount, 0);
-+
-+ pmpeg->base.destroy = nv31_mpeg_destroy;
-+ pmpeg->base.init = nv31_mpeg_init;
-+ pmpeg->base.fini = nv31_mpeg_fini;
-+ if (dev_priv->card_type < NV_40) {
-+ pmpeg->base.context_new = nv31_mpeg_context_new;
-+ pmpeg->base.context_del = nv31_mpeg_context_del;
-+ } else {
-+ pmpeg->base.context_new = nv40_mpeg_context_new;
-+ pmpeg->base.context_del = nv40_mpeg_context_del;
-+ }
-+ pmpeg->base.object_new = nv31_mpeg_object_new;
-+
-+ /* ISR vector, PMC_ENABLE bit, and TILE regs are shared between
-+ * all VPE engines, for this driver's purposes the PMPEG engine
-+ * will be treated as the "master" and handle the global VPE
-+ * bits too
-+ */
-+ pmpeg->base.set_tile_region = nv31_vpe_set_tile_region;
-+ nouveau_irq_register(dev, 0, nv31_vpe_isr);
-+
-+ NVOBJ_ENGINE_ADD(dev, MPEG, &pmpeg->base);
-+ NVOBJ_CLASS(dev, 0x3174, MPEG);
-+ NVOBJ_MTHD (dev, 0x3174, 0x0190, nv31_mpeg_mthd_dma);
-+ NVOBJ_MTHD (dev, 0x3174, 0x01a0, nv31_mpeg_mthd_dma);
-+ NVOBJ_MTHD (dev, 0x3174, 0x01b0, nv31_mpeg_mthd_dma);
-+
-+#if 0
-+ NVOBJ_ENGINE_ADD(dev, ME, &pme->base);
-+ NVOBJ_CLASS(dev, 0x4075, ME);
-+#endif
-+ return 0;
-+
-+}
-diff --git a/drivers/gpu/drm/nouveau/nv40_mpeg.c b/drivers/gpu/drm/nouveau/nv40_mpeg.c
-deleted file mode 100644
-index ad03a0e..0000000
---- a/drivers/gpu/drm/nouveau/nv40_mpeg.c
-+++ /dev/null
-@@ -1,311 +0,0 @@
--/*
-- * Copyright 2011 Red Hat Inc.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a
-- * copy of this software and associated documentation files (the "Software"),
-- * to deal in the Software without restriction, including without limitation
-- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- * and/or sell copies of the Software, and to permit persons to whom the
-- * Software is furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included in
-- * all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-- * OTHER DEALINGS IN THE SOFTWARE.
-- *
-- * Authors: Ben Skeggs
-- */
--
--#include "drmP.h"
--#include "nouveau_drv.h"
--#include "nouveau_ramht.h"
--
--struct nv40_mpeg_engine {
-- struct nouveau_exec_engine base;
--};
--
--static int
--nv40_mpeg_context_new(struct nouveau_channel *chan, int engine)
--{
-- struct drm_device *dev = chan->dev;
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_gpuobj *ctx = NULL;
-- unsigned long flags;
-- int ret;
--
-- NV_DEBUG(dev, "ch%d\n", chan->id);
--
-- ret = nouveau_gpuobj_new(dev, NULL, 264 * 4, 16, NVOBJ_FLAG_ZERO_ALLOC |
-- NVOBJ_FLAG_ZERO_FREE, &ctx);
-- if (ret)
-- return ret;
--
-- nv_wo32(ctx, 0x78, 0x02001ec1);
--
-- spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-- nv_mask(dev, 0x002500, 0x00000001, 0x00000000);
-- if ((nv_rd32(dev, 0x003204) & 0x1f) == chan->id)
-- nv_wr32(dev, 0x00330c, ctx->pinst >> 4);
-- nv_wo32(chan->ramfc, 0x54, ctx->pinst >> 4);
-- nv_mask(dev, 0x002500, 0x00000001, 0x00000001);
-- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
--
-- chan->engctx[engine] = ctx;
-- return 0;
--}
--
--static void
--nv40_mpeg_context_del(struct nouveau_channel *chan, int engine)
--{
-- struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
-- struct nouveau_gpuobj *ctx = chan->engctx[engine];
-- struct drm_device *dev = chan->dev;
-- unsigned long flags;
-- u32 inst = 0x80000000 | (ctx->pinst >> 4);
--
-- spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000);
-- if (nv_rd32(dev, 0x00b318) == inst)
-- nv_mask(dev, 0x00b318, 0x80000000, 0x00000000);
-- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001);
-- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
--
-- nouveau_gpuobj_ref(NULL, &ctx);
-- chan->engctx[engine] = NULL;
--}
--
--static int
--nv40_mpeg_object_new(struct nouveau_channel *chan, int engine,
-- u32 handle, u16 class)
--{
-- struct drm_device *dev = chan->dev;
-- struct nouveau_gpuobj *obj = NULL;
-- int ret;
--
-- ret = nouveau_gpuobj_new(dev, chan, 20, 16, NVOBJ_FLAG_ZERO_ALLOC |
-- NVOBJ_FLAG_ZERO_FREE, &obj);
-- if (ret)
-- return ret;
-- obj->engine = 2;
-- obj->class = class;
--
-- nv_wo32(obj, 0x00, class);
--
-- ret = nouveau_ramht_insert(chan, handle, obj);
-- nouveau_gpuobj_ref(NULL, &obj);
-- return ret;
--}
--
--static int
--nv40_mpeg_init(struct drm_device *dev, int engine)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nv40_mpeg_engine *pmpeg = nv_engine(dev, engine);
-- int i;
--
-- /* VPE init */
-- nv_mask(dev, 0x000200, 0x00000002, 0x00000000);
-- nv_mask(dev, 0x000200, 0x00000002, 0x00000002);
-- nv_wr32(dev, 0x00b0e0, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */
-- nv_wr32(dev, 0x00b0e8, 0x00000020); /* nvidia: rd 0x01, wr 0x20 */
--
-- for (i = 0; i < dev_priv->engine.fb.num_tiles; i++)
-- pmpeg->base.set_tile_region(dev, i);
--
-- /* PMPEG init */
-- nv_wr32(dev, 0x00b32c, 0x00000000);
-- nv_wr32(dev, 0x00b314, 0x00000100);
-- nv_wr32(dev, 0x00b220, 0x00000044);
-- nv_wr32(dev, 0x00b300, 0x02001ec1);
-- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000001);
--
-- nv_wr32(dev, 0x00b100, 0xffffffff);
-- nv_wr32(dev, 0x00b140, 0xffffffff);
--
-- if (!nv_wait(dev, 0x00b200, 0x00000001, 0x00000000)) {
-- NV_ERROR(dev, "PMPEG init: 0x%08x\n", nv_rd32(dev, 0x00b200));
-- return -EBUSY;
-- }
--
-- return 0;
--}
--
--static int
--nv40_mpeg_fini(struct drm_device *dev, int engine, bool suspend)
--{
-- /*XXX: context save? */
-- nv_mask(dev, 0x00b32c, 0x00000001, 0x00000000);
-- nv_wr32(dev, 0x00b140, 0x00000000);
-- return 0;
--}
--
--static int
--nv40_mpeg_mthd_dma(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data)
--{
-- struct drm_device *dev = chan->dev;
-- u32 inst = data << 4;
-- u32 dma0 = nv_ri32(dev, inst + 0);
-- u32 dma1 = nv_ri32(dev, inst + 4);
-- u32 dma2 = nv_ri32(dev, inst + 8);
-- u32 base = (dma2 & 0xfffff000) | (dma0 >> 20);
-- u32 size = dma1 + 1;
--
-- /* only allow linear DMA objects */
-- if (!(dma0 & 0x00002000))
-- return -EINVAL;
--
-- if (mthd == 0x0190) {
-- /* DMA_CMD */
-- nv_mask(dev, 0x00b300, 0x00030000, (dma0 & 0x00030000));
-- nv_wr32(dev, 0x00b334, base);
-- nv_wr32(dev, 0x00b324, size);
-- } else
-- if (mthd == 0x01a0) {
-- /* DMA_DATA */
-- nv_mask(dev, 0x00b300, 0x000c0000, (dma0 & 0x00030000) << 2);
-- nv_wr32(dev, 0x00b360, base);
-- nv_wr32(dev, 0x00b364, size);
-- } else {
-- /* DMA_IMAGE, VRAM only */
-- if (dma0 & 0x000c0000)
-- return -EINVAL;
--
-- nv_wr32(dev, 0x00b370, base);
-- nv_wr32(dev, 0x00b374, size);
-- }
--
-- return 0;
--}
--
--static int
--nv40_mpeg_isr_chid(struct drm_device *dev, u32 inst)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_gpuobj *ctx;
-- unsigned long flags;
-- int i;
--
-- spin_lock_irqsave(&dev_priv->channels.lock, flags);
-- for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
-- if (!dev_priv->channels.ptr[i])
-- continue;
--
-- ctx = dev_priv->channels.ptr[i]->engctx[NVOBJ_ENGINE_MPEG];
-- if (ctx && ctx->pinst == inst)
-- break;
-- }
-- spin_unlock_irqrestore(&dev_priv->channels.lock, flags);
-- return i;
--}
--
--static void
--nv40_vpe_set_tile_region(struct drm_device *dev, int i)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i];
--
-- nv_wr32(dev, 0x00b008 + (i * 0x10), tile->pitch);
-- nv_wr32(dev, 0x00b004 + (i * 0x10), tile->limit);
-- nv_wr32(dev, 0x00b000 + (i * 0x10), tile->addr);
--}
--
--static void
--nv40_mpeg_isr(struct drm_device *dev)
--{
-- u32 inst = (nv_rd32(dev, 0x00b318) & 0x000fffff) << 4;
-- u32 chid = nv40_mpeg_isr_chid(dev, inst);
-- u32 stat = nv_rd32(dev, 0x00b100);
-- u32 type = nv_rd32(dev, 0x00b230);
-- u32 mthd = nv_rd32(dev, 0x00b234);
-- u32 data = nv_rd32(dev, 0x00b238);
-- u32 show = stat;
--
-- if (stat & 0x01000000) {
-- /* happens on initial binding of the object */
-- if (type == 0x00000020 && mthd == 0x0000) {
-- nv_mask(dev, 0x00b308, 0x00000000, 0x00000000);
-- show &= ~0x01000000;
-- }
--
-- if (type == 0x00000010) {
-- if (!nouveau_gpuobj_mthd_call2(dev, chid, 0x3174, mthd, data))
-- show &= ~0x01000000;
-- }
-- }
--
-- nv_wr32(dev, 0x00b100, stat);
-- nv_wr32(dev, 0x00b230, 0x00000001);
--
-- if (show && nouveau_ratelimit()) {
-- NV_INFO(dev, "PMPEG: Ch %d [0x%08x] 0x%08x 0x%08x 0x%08x 0x%08x\n",
-- chid, inst, stat, type, mthd, data);
-- }
--}
--
--static void
--nv40_vpe_isr(struct drm_device *dev)
--{
-- if (nv_rd32(dev, 0x00b100))
-- nv40_mpeg_isr(dev);
--
-- if (nv_rd32(dev, 0x00b800)) {
-- u32 stat = nv_rd32(dev, 0x00b800);
-- NV_INFO(dev, "PMSRCH: 0x%08x\n", stat);
-- nv_wr32(dev, 0xb800, stat);
-- }
--}
--
--static void
--nv40_mpeg_destroy(struct drm_device *dev, int engine)
--{
-- struct nv40_mpeg_engine *pmpeg = nv_engine(dev, engine);
--
-- nouveau_irq_unregister(dev, 0);
--
-- NVOBJ_ENGINE_DEL(dev, MPEG);
-- kfree(pmpeg);
--}
--
--int
--nv40_mpeg_create(struct drm_device *dev)
--{
-- struct nv40_mpeg_engine *pmpeg;
--
-- pmpeg = kzalloc(sizeof(*pmpeg), GFP_KERNEL);
-- if (!pmpeg)
-- return -ENOMEM;
--
-- pmpeg->base.destroy = nv40_mpeg_destroy;
-- pmpeg->base.init = nv40_mpeg_init;
-- pmpeg->base.fini = nv40_mpeg_fini;
-- pmpeg->base.context_new = nv40_mpeg_context_new;
-- pmpeg->base.context_del = nv40_mpeg_context_del;
-- pmpeg->base.object_new = nv40_mpeg_object_new;
--
-- /* ISR vector, PMC_ENABLE bit, and TILE regs are shared between
-- * all VPE engines, for this driver's purposes the PMPEG engine
-- * will be treated as the "master" and handle the global VPE
-- * bits too
-- */
-- pmpeg->base.set_tile_region = nv40_vpe_set_tile_region;
-- nouveau_irq_register(dev, 0, nv40_vpe_isr);
--
-- NVOBJ_ENGINE_ADD(dev, MPEG, &pmpeg->base);
-- NVOBJ_CLASS(dev, 0x3174, MPEG);
-- NVOBJ_MTHD (dev, 0x3174, 0x0190, nv40_mpeg_mthd_dma);
-- NVOBJ_MTHD (dev, 0x3174, 0x01a0, nv40_mpeg_mthd_dma);
-- NVOBJ_MTHD (dev, 0x3174, 0x01b0, nv40_mpeg_mthd_dma);
--
--#if 0
-- NVOBJ_ENGINE_ADD(dev, ME, &pme->base);
-- NVOBJ_CLASS(dev, 0x4075, ME);
--#endif
-- return 0;
--
--}
-diff --git a/drivers/gpu/drm/nouveau/nv40_pm.c b/drivers/gpu/drm/nouveau/nv40_pm.c
-new file mode 100644
-index 0000000..e676b0d
---- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nv40_pm.c
-@@ -0,0 +1,348 @@
-+/*
-+ * Copyright 2011 Red Hat Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Authors: Ben Skeggs
-+ */
-+
-+#include "drmP.h"
-+#include "nouveau_drv.h"
-+#include "nouveau_bios.h"
-+#include "nouveau_pm.h"
-+#include "nouveau_hw.h"
-+
-+#define min2(a,b) ((a) < (b) ? (a) : (b))
-+
-+static u32
-+read_pll_1(struct drm_device *dev, u32 reg)
-+{
-+ u32 ctrl = nv_rd32(dev, reg + 0x00);
-+ int P = (ctrl & 0x00070000) >> 16;
-+ int N = (ctrl & 0x0000ff00) >> 8;
-+ int M = (ctrl & 0x000000ff) >> 0;
-+ u32 ref = 27000, clk = 0;
-+
-+ if (ctrl & 0x80000000)
-+ clk = ref * N / M;
-+
-+ return clk >> P;
-+}
-+
-+static u32
-+read_pll_2(struct drm_device *dev, u32 reg)
-+{
-+ u32 ctrl = nv_rd32(dev, reg + 0x00);
-+ u32 coef = nv_rd32(dev, reg + 0x04);
-+ int N2 = (coef & 0xff000000) >> 24;
-+ int M2 = (coef & 0x00ff0000) >> 16;
-+ int N1 = (coef & 0x0000ff00) >> 8;
-+ int M1 = (coef & 0x000000ff) >> 0;
-+ int P = (ctrl & 0x00070000) >> 16;
-+ u32 ref = 27000, clk = 0;
-+
-+ if ((ctrl & 0x80000000) && M1) {
-+ clk = ref * N1 / M1;
-+ if ((ctrl & 0x40000100) == 0x40000000) {
-+ if (M2)
-+ clk = clk * N2 / M2;
-+ else
-+ clk = 0;
-+ }
-+ }
-+
-+ return clk >> P;
-+}
-+
-+static u32
-+read_clk(struct drm_device *dev, u32 src)
-+{
-+ switch (src) {
-+ case 3:
-+ return read_pll_2(dev, 0x004000);
-+ case 2:
-+ return read_pll_1(dev, 0x004008);
-+ default:
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+int
-+nv40_pm_clocks_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
-+{
-+ u32 ctrl = nv_rd32(dev, 0x00c040);
-+
-+ perflvl->core = read_clk(dev, (ctrl & 0x00000003) >> 0);
-+ perflvl->shader = read_clk(dev, (ctrl & 0x00000030) >> 4);
-+ perflvl->memory = read_pll_2(dev, 0x4020);
-+ return 0;
-+}
-+
-+struct nv40_pm_state {
-+ u32 ctrl;
-+ u32 npll_ctrl;
-+ u32 npll_coef;
-+ u32 spll;
-+ u32 mpll_ctrl;
-+ u32 mpll_coef;
-+};
-+
-+static int
-+nv40_calc_pll(struct drm_device *dev, u32 reg, struct pll_lims *pll,
-+ u32 clk, int *N1, int *M1, int *N2, int *M2, int *log2P)
-+{
-+ struct nouveau_pll_vals coef;
-+ int ret;
-+
-+ ret = get_pll_limits(dev, reg, pll);
-+ if (ret)
-+ return ret;
-+
-+ if (clk < pll->vco1.maxfreq)
-+ pll->vco2.maxfreq = 0;
-+
-+ ret = nouveau_calc_pll_mnp(dev, pll, clk, &coef);
-+ if (ret == 0)
-+ return -ERANGE;
-+
-+ *N1 = coef.N1;
-+ *M1 = coef.M1;
-+ if (N2 && M2) {
-+ if (pll->vco2.maxfreq) {
-+ *N2 = coef.N2;
-+ *M2 = coef.M2;
-+ } else {
-+ *N2 = 1;
-+ *M2 = 1;
-+ }
-+ }
-+ *log2P = coef.log2P;
-+ return 0;
-+}
-+
-+void *
-+nv40_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
-+{
-+ struct nv40_pm_state *info;
-+ struct pll_lims pll;
-+ int N1, N2, M1, M2, log2P;
-+ int ret;
-+
-+ info = kmalloc(sizeof(*info), GFP_KERNEL);
-+ if (!info)
-+ return ERR_PTR(-ENOMEM);
-+
-+ /* core/geometric clock */
-+ ret = nv40_calc_pll(dev, 0x004000, &pll, perflvl->core,
-+ &N1, &M1, &N2, &M2, &log2P);
-+ if (ret < 0)
-+ goto out;
-+
-+ if (N2 == M2) {
-+ info->npll_ctrl = 0x80000100 | (log2P << 16);
-+ info->npll_coef = (N1 << 8) | M1;
-+ } else {
-+ info->npll_ctrl = 0xc0000000 | (log2P << 16);
-+ info->npll_coef = (N2 << 24) | (M2 << 16) | (N1 << 8) | M1;
-+ }
-+
-+ /* use the second PLL for shader/rop clock, if it differs from core */
-+ if (perflvl->shader && perflvl->shader != perflvl->core) {
-+ ret = nv40_calc_pll(dev, 0x004008, &pll, perflvl->shader,
-+ &N1, &M1, NULL, NULL, &log2P);
-+ if (ret < 0)
-+ goto out;
-+
-+ info->spll = 0xc0000000 | (log2P << 16) | (N1 << 8) | M1;
-+ info->ctrl = 0x00000223;
-+ } else {
-+ info->spll = 0x00000000;
-+ info->ctrl = 0x00000333;
-+ }
-+
-+ /* memory clock */
-+ if (!perflvl->memory) {
-+ info->mpll_ctrl = 0x00000000;
-+ goto out;
-+ }
-+
-+ ret = nv40_calc_pll(dev, 0x004020, &pll, perflvl->memory,
-+ &N1, &M1, &N2, &M2, &log2P);
-+ if (ret < 0)
-+ goto out;
-+
-+ info->mpll_ctrl = 0x80000000 | (log2P << 16);
-+ info->mpll_ctrl |= min2(pll.log2p_bias + log2P, pll.max_log2p) << 20;
-+ if (N2 == M2) {
-+ info->mpll_ctrl |= 0x00000100;
-+ info->mpll_coef = (N1 << 8) | M1;
-+ } else {
-+ info->mpll_ctrl |= 0x40000000;
-+ info->mpll_coef = (N2 << 24) | (M2 << 16) | (N1 << 8) | M1;
-+ }
-+
-+out:
-+ if (ret < 0) {
-+ kfree(info);
-+ info = ERR_PTR(ret);
-+ }
-+ return info;
-+}
-+
-+static bool
-+nv40_pm_gr_idle(void *data)
-+{
-+ struct drm_device *dev = data;
-+
-+ if ((nv_rd32(dev, 0x400760) & 0x000000f0) >> 4 !=
-+ (nv_rd32(dev, 0x400760) & 0x0000000f))
-+ return false;
-+
-+ if (nv_rd32(dev, 0x400700))
-+ return false;
-+
-+ return true;
-+}
-+
-+void
-+nv40_pm_clocks_set(struct drm_device *dev, void *pre_state)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nv40_pm_state *info = pre_state;
-+ unsigned long flags;
-+ struct bit_entry M;
-+ u32 crtc_mask = 0;
-+ u8 sr1[2];
-+ int i;
-+
-+ /* determine which CRTCs are active, fetch VGA_SR1 for each */
-+ for (i = 0; i < 2; i++) {
-+ u32 vbl = nv_rd32(dev, 0x600808 + (i * 0x2000));
-+ u32 cnt = 0;
-+ do {
-+ if (vbl != nv_rd32(dev, 0x600808 + (i * 0x2000))) {
-+ nv_wr08(dev, 0x0c03c4 + (i * 0x2000), 0x01);
-+ sr1[i] = nv_rd08(dev, 0x0c03c5 + (i * 0x2000));
-+ if (!(sr1[i] & 0x20))
-+ crtc_mask |= (1 << i);
-+ break;
-+ }
-+ udelay(1);
-+ } while (cnt++ < 32);
-+ }
-+
-+ /* halt and idle engines */
-+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-+ nv_mask(dev, 0x002500, 0x00000001, 0x00000000);
-+ if (!nv_wait(dev, 0x002500, 0x00000010, 0x00000000))
-+ goto resume;
-+ nv_mask(dev, 0x003220, 0x00000001, 0x00000000);
-+ if (!nv_wait(dev, 0x003220, 0x00000010, 0x00000000))
-+ goto resume;
-+ nv_mask(dev, 0x003200, 0x00000001, 0x00000000);
-+ nv04_fifo_cache_pull(dev, false);
-+
-+ if (!nv_wait_cb(dev, nv40_pm_gr_idle, dev))
-+ goto resume;
-+
-+ /* set engine clocks */
-+ nv_mask(dev, 0x00c040, 0x00000333, 0x00000000);
-+ nv_wr32(dev, 0x004004, info->npll_coef);
-+ nv_mask(dev, 0x004000, 0xc0070100, info->npll_ctrl);
-+ nv_mask(dev, 0x004008, 0xc007ffff, info->spll);
-+ mdelay(5);
-+ nv_mask(dev, 0x00c040, 0x00000333, info->ctrl);
-+
-+ if (!info->mpll_ctrl)
-+ goto resume;
-+
-+ /* wait for vblank start on active crtcs, disable memory access */
-+ for (i = 0; i < 2; i++) {
-+ if (!(crtc_mask & (1 << i)))
-+ continue;
-+ nv_wait(dev, 0x600808 + (i * 0x2000), 0x00010000, 0x00000000);
-+ nv_wait(dev, 0x600808 + (i * 0x2000), 0x00010000, 0x00010000);
-+ nv_wr08(dev, 0x0c03c4 + (i * 0x2000), 0x01);
-+ nv_wr08(dev, 0x0c03c5 + (i * 0x2000), sr1[i] | 0x20);
-+ }
-+
-+ /* prepare ram for reclocking */
-+ nv_wr32(dev, 0x1002d4, 0x00000001); /* precharge */
-+ nv_wr32(dev, 0x1002d0, 0x00000001); /* refresh */
-+ nv_wr32(dev, 0x1002d0, 0x00000001); /* refresh */
-+ nv_mask(dev, 0x100210, 0x80000000, 0x00000000); /* no auto refresh */
-+ nv_wr32(dev, 0x1002dc, 0x00000001); /* enable self-refresh */
-+
-+ /* change the PLL of each memory partition */
-+ nv_mask(dev, 0x00c040, 0x0000c000, 0x00000000);
-+ switch (dev_priv->chipset) {
-+ case 0x40:
-+ case 0x45:
-+ case 0x41:
-+ case 0x42:
-+ case 0x47:
-+ nv_mask(dev, 0x004044, 0xc0771100, info->mpll_ctrl);
-+ nv_mask(dev, 0x00402c, 0xc0771100, info->mpll_ctrl);
-+ nv_wr32(dev, 0x004048, info->mpll_coef);
-+ nv_wr32(dev, 0x004030, info->mpll_coef);
-+ case 0x43:
-+ case 0x49:
-+ case 0x4b:
-+ nv_mask(dev, 0x004038, 0xc0771100, info->mpll_ctrl);
-+ nv_wr32(dev, 0x00403c, info->mpll_coef);
-+ default:
-+ nv_mask(dev, 0x004020, 0xc0771100, info->mpll_ctrl);
-+ nv_wr32(dev, 0x004024, info->mpll_coef);
-+ break;
-+ }
-+ udelay(100);
-+ nv_mask(dev, 0x00c040, 0x0000c000, 0x0000c000);
-+
-+ /* re-enable normal operation of memory controller */
-+ nv_wr32(dev, 0x1002dc, 0x00000000);
-+ nv_mask(dev, 0x100210, 0x80000000, 0x80000000);
-+ udelay(100);
-+
-+ /* execute memory reset script from vbios */
-+ if (!bit_table(dev, 'M', &M))
-+ nouveau_bios_init_exec(dev, ROM16(M.data[0]));
-+
-+ /* make sure we're in vblank (hopefully the same one as before), and
-+ * then re-enable crtc memory access
-+ */
-+ for (i = 0; i < 2; i++) {
-+ if (!(crtc_mask & (1 << i)))
-+ continue;
-+ nv_wait(dev, 0x600808 + (i * 0x2000), 0x00010000, 0x00010000);
-+ nv_wr08(dev, 0x0c03c4 + (i * 0x2000), 0x01);
-+ nv_wr08(dev, 0x0c03c5 + (i * 0x2000), sr1[i]);
-+ }
-+
-+ /* resume engines */
-+resume:
-+ nv_wr32(dev, 0x003250, 0x00000001);
-+ nv_mask(dev, 0x003220, 0x00000001, 0x00000001);
-+ nv_wr32(dev, 0x003200, 0x00000001);
-+ nv_wr32(dev, 0x002500, 0x00000001);
-+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
-+
-+ kfree(info);
-+}
-diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
-index 5d98907..882080e 100644
---- a/drivers/gpu/drm/nouveau/nv50_crtc.c
-+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -329,8 +329,6 @@ nv50_crtc_destroy(struct drm_crtc *crtc)
-
- drm_crtc_cleanup(&nv_crtc->base);
-
-- nv50_cursor_fini(nv_crtc);
--
- nouveau_bo_unmap(nv_crtc->lut.nvbo);
- nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo);
- nouveau_bo_unmap(nv_crtc->cursor.nvbo);
-diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.c b/drivers/gpu/drm/nouveau/nv50_cursor.c
-index 9752c35..adfc9b6 100644
---- a/drivers/gpu/drm/nouveau/nv50_cursor.c
-+++ b/drivers/gpu/drm/nouveau/nv50_cursor.c
-@@ -137,21 +137,3 @@ nv50_cursor_init(struct nouveau_crtc *nv_crtc)
- nv_crtc->cursor.show = nv50_cursor_show;
- return 0;
- }
--
--void
--nv50_cursor_fini(struct nouveau_crtc *nv_crtc)
--{
-- struct drm_device *dev = nv_crtc->base.dev;
-- int idx = nv_crtc->index;
--
-- NV_DEBUG_KMS(dev, "\n");
--
-- nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0);
-- if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx),
-- NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, 0)) {
-- NV_ERROR(dev, "timeout: CURSOR_CTRL2_STATUS == 0\n");
-- NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n",
-- nv_rd32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx)));
-- }
--}
--
-diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
-index db1a5f4..d23ca00 100644
---- a/drivers/gpu/drm/nouveau/nv50_display.c
-+++ b/drivers/gpu/drm/nouveau/nv50_display.c
-@@ -247,6 +247,16 @@ static int nv50_display_disable(struct drm_device *dev)
- }
- }
-
-+ for (i = 0; i < 2; i++) {
-+ nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), 0);
-+ if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i),
-+ NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, 0)) {
-+ NV_ERROR(dev, "timeout: CURSOR_CTRL2_STATUS == 0\n");
-+ NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n",
-+ nv_rd32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i)));
-+ }
-+ }
-+
- nv50_evo_fini(dev);
-
- for (i = 0; i < 3; i++) {
-@@ -286,23 +296,6 @@ int nv50_display_create(struct drm_device *dev)
- return -ENOMEM;
- dev_priv->engine.display.priv = priv;
-
-- /* init basic kernel modesetting */
-- drm_mode_config_init(dev);
--
-- /* Initialise some optional connector properties. */
-- drm_mode_create_scaling_mode_property(dev);
-- drm_mode_create_dithering_property(dev);
--
-- dev->mode_config.min_width = 0;
-- dev->mode_config.min_height = 0;
--
-- dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
--
-- dev->mode_config.max_width = 8192;
-- dev->mode_config.max_height = 8192;
--
-- dev->mode_config.fb_base = dev_priv->fb_phys;
--
- /* Create CRTC objects */
- for (i = 0; i < 2; i++)
- nv50_crtc_create(dev, i);
-@@ -364,8 +357,6 @@ nv50_display_destroy(struct drm_device *dev)
-
- NV_DEBUG_KMS(dev, "\n");
-
-- drm_mode_config_cleanup(dev);
--
- nv50_display_disable(dev);
- nouveau_irq_unregister(dev, 26);
- kfree(disp);
-@@ -698,7 +689,7 @@ nv50_display_unk10_handler(struct drm_device *dev)
- struct dcb_entry *dcb = &dev_priv->vbios.dcb.entry[i];
-
- if (dcb->type == type && (dcb->or & (1 << or))) {
-- nouveau_bios_run_display_table(dev, dcb, 0, -1);
-+ nouveau_bios_run_display_table(dev, 0, -1, dcb, -1);
- disp->irq.dcb = dcb;
- goto ack;
- }
-@@ -711,37 +702,6 @@ ack:
- }
-
- static void
--nv50_display_unk20_dp_hack(struct drm_device *dev, struct dcb_entry *dcb)
--{
-- int or = ffs(dcb->or) - 1, link = !(dcb->dpconf.sor.link & 1);
-- struct drm_encoder *encoder;
-- uint32_t tmp, unk0 = 0, unk1 = 0;
--
-- if (dcb->type != OUTPUT_DP)
-- return;
--
-- list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
-- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
--
-- if (nv_encoder->dcb == dcb) {
-- unk0 = nv_encoder->dp.unk0;
-- unk1 = nv_encoder->dp.unk1;
-- break;
-- }
-- }
--
-- if (unk0 || unk1) {
-- tmp = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
-- tmp &= 0xfffffe03;
-- nv_wr32(dev, NV50_SOR_DP_CTRL(or, link), tmp | unk0);
--
-- tmp = nv_rd32(dev, NV50_SOR_DP_UNK128(or, link));
-- tmp &= 0xfef080c0;
-- nv_wr32(dev, NV50_SOR_DP_UNK128(or, link), tmp | unk1);
-- }
--}
--
--static void
- nv50_display_unk20_handler(struct drm_device *dev)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-@@ -753,7 +713,7 @@ nv50_display_unk20_handler(struct drm_device *dev)
- NV_DEBUG_KMS(dev, "0x610030: 0x%08x\n", unk30);
- dcb = disp->irq.dcb;
- if (dcb) {
-- nouveau_bios_run_display_table(dev, dcb, 0, -2);
-+ nouveau_bios_run_display_table(dev, 0, -2, dcb, -1);
- disp->irq.dcb = NULL;
- }
-
-@@ -837,9 +797,15 @@ nv50_display_unk20_handler(struct drm_device *dev)
- }
-
- script = nv50_display_script_select(dev, dcb, mc, pclk);
-- nouveau_bios_run_display_table(dev, dcb, script, pclk);
-+ nouveau_bios_run_display_table(dev, script, pclk, dcb, -1);
-
-- nv50_display_unk20_dp_hack(dev, dcb);
-+ if (type == OUTPUT_DP) {
-+ int link = !(dcb->dpconf.sor.link & 1);
-+ if ((mc & 0x000f0000) == 0x00020000)
-+ nouveau_dp_tu_update(dev, or, link, pclk, 18);
-+ else
-+ nouveau_dp_tu_update(dev, or, link, pclk, 24);
-+ }
-
- if (dcb->type != OUTPUT_ANALOG) {
- tmp = nv_rd32(dev, NV50_PDISPLAY_SOR_CLK_CTRL2(or));
-@@ -904,7 +870,7 @@ nv50_display_unk40_handler(struct drm_device *dev)
- if (!dcb)
- goto ack;
-
-- nouveau_bios_run_display_table(dev, dcb, script, -pclk);
-+ nouveau_bios_run_display_table(dev, script, -pclk, dcb, -1);
- nv50_display_unk40_dp_set_tmds(dev, dcb);
-
- ack:
-diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c
-index d4f4206..793a5cc 100644
---- a/drivers/gpu/drm/nouveau/nv50_gpio.c
-+++ b/drivers/gpu/drm/nouveau/nv50_gpio.c
-@@ -98,6 +98,37 @@ nv50_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state)
- }
-
- int
-+nvd0_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag)
-+{
-+ struct dcb_gpio_entry *gpio;
-+ u32 v;
-+
-+ gpio = nouveau_bios_gpio_entry(dev, tag);
-+ if (!gpio)
-+ return -ENOENT;
-+
-+ v = nv_rd32(dev, 0x00d610 + (gpio->line * 4));
-+ v &= 0x00004000;
-+ return (!!v == (gpio->state[1] & 1));
-+}
-+
-+int
-+nvd0_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state)
-+{
-+ struct dcb_gpio_entry *gpio;
-+ u32 v;
-+
-+ gpio = nouveau_bios_gpio_entry(dev, tag);
-+ if (!gpio)
-+ return -ENOENT;
-+
-+ v = gpio->state[state] ^ 2;
-+
-+ nv_mask(dev, 0x00d610 + (gpio->line * 4), 0x00003000, v << 12);
-+ return 0;
-+}
-+
-+int
- nv50_gpio_irq_register(struct drm_device *dev, enum dcb_gpio_tag tag,
- void (*handler)(void *, int), void *data)
- {
-diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
-index d43c46c..8c979b3 100644
---- a/drivers/gpu/drm/nouveau/nv50_graph.c
-+++ b/drivers/gpu/drm/nouveau/nv50_graph.c
-@@ -120,70 +120,62 @@ nv50_graph_unload_context(struct drm_device *dev)
- return 0;
- }
-
--static void
--nv50_graph_init_reset(struct drm_device *dev)
--{
-- uint32_t pmc_e = NV_PMC_ENABLE_PGRAPH | (1 << 21);
-- NV_DEBUG(dev, "\n");
--
-- nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & ~pmc_e);
-- nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) | pmc_e);
--}
--
--static void
--nv50_graph_init_intr(struct drm_device *dev)
--{
-- NV_DEBUG(dev, "\n");
--
-- nv_wr32(dev, NV03_PGRAPH_INTR, 0xffffffff);
-- nv_wr32(dev, 0x400138, 0xffffffff);
-- nv_wr32(dev, NV40_PGRAPH_INTR_EN, 0xffffffff);
--}
--
--static void
--nv50_graph_init_regs__nv(struct drm_device *dev)
-+static int
-+nv50_graph_init(struct drm_device *dev, int engine)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- uint32_t units = nv_rd32(dev, 0x1540);
-+ struct nv50_graph_engine *pgraph = nv_engine(dev, engine);
-+ u32 units = nv_rd32(dev, 0x001540);
- int i;
-
- NV_DEBUG(dev, "\n");
-
-+ /* master reset */
-+ nv_mask(dev, 0x000200, 0x00200100, 0x00000000);
-+ nv_mask(dev, 0x000200, 0x00200100, 0x00200100);
-+ nv_wr32(dev, 0x40008c, 0x00000004); /* HW_CTX_SWITCH_ENABLED */
-+
-+ /* reset/enable traps and interrupts */
- nv_wr32(dev, 0x400804, 0xc0000000);
- nv_wr32(dev, 0x406800, 0xc0000000);
- nv_wr32(dev, 0x400c04, 0xc0000000);
- nv_wr32(dev, 0x401800, 0xc0000000);
- nv_wr32(dev, 0x405018, 0xc0000000);
- nv_wr32(dev, 0x402000, 0xc0000000);
--
- for (i = 0; i < 16; i++) {
-- if (units & 1 << i) {
-- if (dev_priv->chipset < 0xa0) {
-- nv_wr32(dev, 0x408900 + (i << 12), 0xc0000000);
-- nv_wr32(dev, 0x408e08 + (i << 12), 0xc0000000);
-- nv_wr32(dev, 0x408314 + (i << 12), 0xc0000000);
-- } else {
-- nv_wr32(dev, 0x408600 + (i << 11), 0xc0000000);
-- nv_wr32(dev, 0x408708 + (i << 11), 0xc0000000);
-- nv_wr32(dev, 0x40831c + (i << 11), 0xc0000000);
-- }
-+ if (!(units & (1 << i)))
-+ continue;
-+
-+ if (dev_priv->chipset < 0xa0) {
-+ nv_wr32(dev, 0x408900 + (i << 12), 0xc0000000);
-+ nv_wr32(dev, 0x408e08 + (i << 12), 0xc0000000);
-+ nv_wr32(dev, 0x408314 + (i << 12), 0xc0000000);
-+ } else {
-+ nv_wr32(dev, 0x408600 + (i << 11), 0xc0000000);
-+ nv_wr32(dev, 0x408708 + (i << 11), 0xc0000000);
-+ nv_wr32(dev, 0x40831c + (i << 11), 0xc0000000);
- }
- }
-
- nv_wr32(dev, 0x400108, 0xffffffff);
--
-- nv_wr32(dev, 0x400824, 0x00004000);
-+ nv_wr32(dev, 0x400138, 0xffffffff);
-+ nv_wr32(dev, 0x400100, 0xffffffff);
-+ nv_wr32(dev, 0x40013c, 0xffffffff);
- nv_wr32(dev, 0x400500, 0x00010001);
--}
--
--static void
--nv50_graph_init_zcull(struct drm_device *dev)
--{
-- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- int i;
--
-- NV_DEBUG(dev, "\n");
-
-+ /* upload context program, initialise ctxctl defaults */
-+ nv_wr32(dev, 0x400324, 0x00000000);
-+ for (i = 0; i < pgraph->ctxprog_size; i++)
-+ nv_wr32(dev, 0x400328, pgraph->ctxprog[i]);
-+ nv_wr32(dev, 0x400824, 0x00000000);
-+ nv_wr32(dev, 0x400828, 0x00000000);
-+ nv_wr32(dev, 0x40082c, 0x00000000);
-+ nv_wr32(dev, 0x400830, 0x00000000);
-+ nv_wr32(dev, 0x400724, 0x00000000);
-+ nv_wr32(dev, 0x40032c, 0x00000000);
-+ nv_wr32(dev, 0x400320, 4); /* CTXCTL_CMD = NEWCTXDMA */
-+
-+ /* some unknown zcull magic */
- switch (dev_priv->chipset & 0xf0) {
- case 0x50:
- case 0x80:
-@@ -212,43 +204,7 @@ nv50_graph_init_zcull(struct drm_device *dev)
- nv_wr32(dev, 0x402c28 + (i * 8), 0x00000000);
- nv_wr32(dev, 0x402c2c + (i * 8), 0x00000000);
- }
--}
--
--static int
--nv50_graph_init_ctxctl(struct drm_device *dev)
--{
-- struct nv50_graph_engine *pgraph = nv_engine(dev, NVOBJ_ENGINE_GR);
-- int i;
--
-- NV_DEBUG(dev, "\n");
--
-- nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0);
-- for (i = 0; i < pgraph->ctxprog_size; i++)
-- nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, pgraph->ctxprog[i]);
--
-- nv_wr32(dev, 0x40008c, 0x00000004); /* HW_CTX_SWITCH_ENABLED */
-- nv_wr32(dev, 0x400320, 4);
-- nv_wr32(dev, NV40_PGRAPH_CTXCTL_CUR, 0);
-- nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_POINTER, 0);
-- return 0;
--}
--
--static int
--nv50_graph_init(struct drm_device *dev, int engine)
--{
-- int ret;
--
-- NV_DEBUG(dev, "\n");
--
-- nv50_graph_init_reset(dev);
-- nv50_graph_init_regs__nv(dev);
-- nv50_graph_init_zcull(dev);
--
-- ret = nv50_graph_init_ctxctl(dev);
-- if (ret)
-- return ret;
-
-- nv50_graph_init_intr(dev);
- return 0;
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/nv50_grctx.c
-index de9abff..d05c2c3 100644
---- a/drivers/gpu/drm/nouveau/nv50_grctx.c
-+++ b/drivers/gpu/drm/nouveau/nv50_grctx.c
-@@ -40,6 +40,12 @@
- #define CP_FLAG_UNK0B ((0 * 32) + 0xb)
- #define CP_FLAG_UNK0B_CLEAR 0
- #define CP_FLAG_UNK0B_SET 1
-+#define CP_FLAG_XFER_SWITCH ((0 * 32) + 0xe)
-+#define CP_FLAG_XFER_SWITCH_DISABLE 0
-+#define CP_FLAG_XFER_SWITCH_ENABLE 1
-+#define CP_FLAG_STATE ((0 * 32) + 0x1c)
-+#define CP_FLAG_STATE_STOPPED 0
-+#define CP_FLAG_STATE_RUNNING 1
- #define CP_FLAG_UNK1D ((0 * 32) + 0x1d)
- #define CP_FLAG_UNK1D_CLEAR 0
- #define CP_FLAG_UNK1D_SET 1
-@@ -194,6 +200,9 @@ nv50_grctx_init(struct nouveau_grctx *ctx)
- "the devs.\n");
- return -ENOSYS;
- }
-+
-+ cp_set (ctx, STATE, RUNNING);
-+ cp_set (ctx, XFER_SWITCH, ENABLE);
- /* decide whether we're loading/unloading the context */
- cp_bra (ctx, AUTO_SAVE, PENDING, cp_setup_save);
- cp_bra (ctx, USER_SAVE, PENDING, cp_setup_save);
-@@ -260,6 +269,8 @@ nv50_grctx_init(struct nouveau_grctx *ctx)
- cp_name(ctx, cp_exit);
- cp_set (ctx, USER_SAVE, NOT_PENDING);
- cp_set (ctx, USER_LOAD, NOT_PENDING);
-+ cp_set (ctx, XFER_SWITCH, DISABLE);
-+ cp_set (ctx, STATE, STOPPED);
- cp_out (ctx, CP_END);
- ctx->ctxvals_pos += 0x400; /* padding... no idea why you need it */
-
-diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c
-index 8a28100..3d5a86b 100644
---- a/drivers/gpu/drm/nouveau/nv50_pm.c
-+++ b/drivers/gpu/drm/nouveau/nv50_pm.c
-@@ -115,15 +115,15 @@ nv50_pm_clock_set(struct drm_device *dev, void *pre_state)
- BIT_M.version == 1 && BIT_M.length >= 0x0b) {
- script = ROM16(BIT_M.data[0x05]);
- if (script)
-- nouveau_bios_run_init_table(dev, script, NULL);
-+ nouveau_bios_run_init_table(dev, script, NULL, -1);
- script = ROM16(BIT_M.data[0x07]);
- if (script)
-- nouveau_bios_run_init_table(dev, script, NULL);
-+ nouveau_bios_run_init_table(dev, script, NULL, -1);
- script = ROM16(BIT_M.data[0x09]);
- if (script)
-- nouveau_bios_run_init_table(dev, script, NULL);
-+ nouveau_bios_run_init_table(dev, script, NULL, -1);
-
-- nouveau_bios_run_init_table(dev, perflvl->memscript, NULL);
-+ nouveau_bios_run_init_table(dev, perflvl->memscript, NULL, -1);
- }
-
- if (state->type == PLL_MEMORY) {
-diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
-index ffe8b48..2633aa8 100644
---- a/drivers/gpu/drm/nouveau/nv50_sor.c
-+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
-@@ -124,7 +124,7 @@ nv50_sor_dpms(struct drm_encoder *encoder, int mode)
- if (mode == DRM_MODE_DPMS_ON) {
- u8 status = DP_SET_POWER_D0;
- nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1);
-- nouveau_dp_link_train(encoder);
-+ nouveau_dp_link_train(encoder, nv_encoder->dp.datarate);
- } else {
- u8 status = DP_SET_POWER_D3;
- nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1);
-@@ -187,14 +187,13 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
- struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
- struct drm_device *dev = encoder->dev;
- struct nouveau_crtc *crtc = nouveau_crtc(encoder->crtc);
-+ struct nouveau_connector *nv_connector;
- uint32_t mode_ctl = 0;
- int ret;
-
- NV_DEBUG_KMS(dev, "or %d type %d -> crtc %d\n",
- nv_encoder->or, nv_encoder->dcb->type, crtc->index);
-
-- nv50_sor_dpms(encoder, DRM_MODE_DPMS_ON);
--
- switch (nv_encoder->dcb->type) {
- case OUTPUT_TMDS:
- if (nv_encoder->dcb->sorconf.link & 1) {
-@@ -206,7 +205,15 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
- mode_ctl = 0x0200;
- break;
- case OUTPUT_DP:
-- mode_ctl |= (nv_encoder->dp.mc_unknown << 16);
-+ nv_connector = nouveau_encoder_connector_get(nv_encoder);
-+ if (nv_connector && nv_connector->base.display_info.bpc == 6) {
-+ nv_encoder->dp.datarate = crtc->mode->clock * 18 / 8;
-+ mode_ctl |= 0x00020000;
-+ } else {
-+ nv_encoder->dp.datarate = crtc->mode->clock * 24 / 8;
-+ mode_ctl |= 0x00050000;
-+ }
-+
- if (nv_encoder->dcb->sorconf.link & 1)
- mode_ctl |= 0x00000800;
- else
-@@ -227,6 +234,8 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
- if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
- mode_ctl |= NV50_EVO_SOR_MODE_CTRL_NVSYNC;
-
-+ nv50_sor_dpms(encoder, DRM_MODE_DPMS_ON);
-+
- ret = RING_SPACE(evo, 2);
- if (ret) {
- NV_ERROR(dev, "no space while connecting SOR\n");
-@@ -313,31 +322,6 @@ nv50_sor_create(struct drm_connector *connector, struct dcb_entry *entry)
- encoder->possible_crtcs = entry->heads;
- encoder->possible_clones = 0;
-
-- if (nv_encoder->dcb->type == OUTPUT_DP) {
-- int or = nv_encoder->or, link = !(entry->dpconf.sor.link & 1);
-- uint32_t tmp;
--
-- tmp = nv_rd32(dev, 0x61c700 + (or * 0x800));
-- if (!tmp)
-- tmp = nv_rd32(dev, 0x610798 + (or * 8));
--
-- switch ((tmp & 0x00000f00) >> 8) {
-- case 8:
-- case 9:
-- nv_encoder->dp.mc_unknown = (tmp & 0x000f0000) >> 16;
-- tmp = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link));
-- nv_encoder->dp.unk0 = tmp & 0x000001fc;
-- tmp = nv_rd32(dev, NV50_SOR_DP_UNK128(or, link));
-- nv_encoder->dp.unk1 = tmp & 0x010f7f3f;
-- break;
-- default:
-- break;
-- }
--
-- if (!nv_encoder->dp.mc_unknown)
-- nv_encoder->dp.mc_unknown = 5;
-- }
--
- drm_mode_connector_attach_encoder(connector, encoder);
- return 0;
- }
-diff --git a/drivers/gpu/drm/nouveau/nv50_vram.c b/drivers/gpu/drm/nouveau/nv50_vram.c
-index af32dae..9da2383 100644
---- a/drivers/gpu/drm/nouveau/nv50_vram.c
-+++ b/drivers/gpu/drm/nouveau/nv50_vram.c
-@@ -51,7 +51,7 @@ void
- nv50_vram_del(struct drm_device *dev, struct nouveau_mem **pmem)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_mm *mm = dev_priv->engine.vram.mm;
-+ struct nouveau_mm *mm = &dev_priv->engine.vram.mm;
- struct nouveau_mm_node *this;
- struct nouveau_mem *mem;
-
-@@ -82,7 +82,7 @@ nv50_vram_new(struct drm_device *dev, u64 size, u32 align, u32 size_nc,
- u32 memtype, struct nouveau_mem **pmem)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_mm *mm = dev_priv->engine.vram.mm;
-+ struct nouveau_mm *mm = &dev_priv->engine.vram.mm;
- struct nouveau_mm_node *r;
- struct nouveau_mem *mem;
- int comp = (memtype & 0x300) >> 8;
-diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c
-index e4b2b9e..618c144 100644
---- a/drivers/gpu/drm/nouveau/nva3_pm.c
-+++ b/drivers/gpu/drm/nouveau/nva3_pm.c
-@@ -27,178 +27,316 @@
- #include "nouveau_bios.h"
- #include "nouveau_pm.h"
-
--/* This is actually a lot more complex than it appears here, but hopefully
-- * this should be able to deal with what the VBIOS leaves for us..
-- *
-- * If not, well, I'll jump off that bridge when I come to it.
-- */
-+static u32 read_clk(struct drm_device *, int, bool);
-+static u32 read_pll(struct drm_device *, int, u32);
-
--struct nva3_pm_state {
-- enum pll_types type;
-- u32 src0;
-- u32 src1;
-- u32 ctrl;
-- u32 coef;
-- u32 old_pnm;
-- u32 new_pnm;
-- u32 new_div;
--};
-+static u32
-+read_vco(struct drm_device *dev, int clk)
-+{
-+ u32 sctl = nv_rd32(dev, 0x4120 + (clk * 4));
-+ if ((sctl & 0x00000030) != 0x00000030)
-+ return read_pll(dev, 0x41, 0x00e820);
-+ return read_pll(dev, 0x42, 0x00e8a0);
-+}
-
--static int
--nva3_pm_pll_offset(u32 id)
-+static u32
-+read_clk(struct drm_device *dev, int clk, bool ignore_en)
- {
-- static const u32 pll_map[] = {
-- 0x00, PLL_CORE,
-- 0x01, PLL_SHADER,
-- 0x02, PLL_MEMORY,
-- 0x00, 0x00
-- };
-- const u32 *map = pll_map;
--
-- while (map[1]) {
-- if (id == map[1])
-- return map[0];
-- map += 2;
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ u32 sctl, sdiv, sclk;
-+
-+ /* refclk for the 0xe8xx plls is a fixed frequency */
-+ if (clk >= 0x40) {
-+ if (dev_priv->chipset == 0xaf) {
-+ /* no joke.. seriously.. sigh.. */
-+ return nv_rd32(dev, 0x00471c) * 1000;
-+ }
-+
-+ return dev_priv->crystal;
- }
-
-- return -ENOENT;
-+ sctl = nv_rd32(dev, 0x4120 + (clk * 4));
-+ if (!ignore_en && !(sctl & 0x00000100))
-+ return 0;
-+
-+ switch (sctl & 0x00003000) {
-+ case 0x00000000:
-+ return dev_priv->crystal;
-+ case 0x00002000:
-+ if (sctl & 0x00000040)
-+ return 108000;
-+ return 100000;
-+ case 0x00003000:
-+ sclk = read_vco(dev, clk);
-+ sdiv = ((sctl & 0x003f0000) >> 16) + 2;
-+ return (sclk * 2) / sdiv;
-+ default:
-+ return 0;
-+ }
- }
-
--int
--nva3_pm_clock_get(struct drm_device *dev, u32 id)
-+static u32
-+read_pll(struct drm_device *dev, int clk, u32 pll)
-+{
-+ u32 ctrl = nv_rd32(dev, pll + 0);
-+ u32 sclk = 0, P = 1, N = 1, M = 1;
-+
-+ if (!(ctrl & 0x00000008)) {
-+ if (ctrl & 0x00000001) {
-+ u32 coef = nv_rd32(dev, pll + 4);
-+ M = (coef & 0x000000ff) >> 0;
-+ N = (coef & 0x0000ff00) >> 8;
-+ P = (coef & 0x003f0000) >> 16;
-+
-+ /* no post-divider on these.. */
-+ if ((pll & 0x00ff00) == 0x00e800)
-+ P = 1;
-+
-+ sclk = read_clk(dev, 0x00 + clk, false);
-+ }
-+ } else {
-+ sclk = read_clk(dev, 0x10 + clk, false);
-+ }
-+
-+ return sclk * N / (M * P);
-+}
-+
-+struct creg {
-+ u32 clk;
-+ u32 pll;
-+};
-+
-+static int
-+calc_clk(struct drm_device *dev, int clk, u32 pll, u32 khz, struct creg *reg)
- {
-- u32 src0, src1, ctrl, coef;
-- struct pll_lims pll;
-- int ret, off;
-- int P, N, M;
-+ struct pll_lims limits;
-+ u32 oclk, sclk, sdiv;
-+ int P, N, M, diff;
-+ int ret;
-+
-+ reg->pll = 0;
-+ reg->clk = 0;
-+ if (!khz) {
-+ NV_DEBUG(dev, "no clock for 0x%04x/0x%02x\n", pll, clk);
-+ return 0;
-+ }
-
-- ret = get_pll_limits(dev, id, &pll);
-+ switch (khz) {
-+ case 27000:
-+ reg->clk = 0x00000100;
-+ return khz;
-+ case 100000:
-+ reg->clk = 0x00002100;
-+ return khz;
-+ case 108000:
-+ reg->clk = 0x00002140;
-+ return khz;
-+ default:
-+ sclk = read_vco(dev, clk);
-+ sdiv = min((sclk * 2) / (khz - 2999), (u32)65);
-+ /* if the clock has a PLL attached, and we can get a within
-+ * [-2, 3) MHz of a divider, we'll disable the PLL and use
-+ * the divider instead.
-+ *
-+ * divider can go as low as 2, limited here because NVIDIA
-+ * and the VBIOS on my NVA8 seem to prefer using the PLL
-+ * for 810MHz - is there a good reason?
-+ */
-+ if (sdiv > 4) {
-+ oclk = (sclk * 2) / sdiv;
-+ diff = khz - oclk;
-+ if (!pll || (diff >= -2000 && diff < 3000)) {
-+ reg->clk = (((sdiv - 2) << 16) | 0x00003100);
-+ return oclk;
-+ }
-+ }
-+
-+ if (!pll) {
-+ NV_ERROR(dev, "bad freq %02x: %d %d\n", clk, khz, sclk);
-+ return -ERANGE;
-+ }
-+
-+ break;
-+ }
-+
-+ ret = get_pll_limits(dev, pll, &limits);
- if (ret)
- return ret;
-
-- off = nva3_pm_pll_offset(id);
-- if (off < 0)
-- return off;
-+ limits.refclk = read_clk(dev, clk - 0x10, true);
-+ if (!limits.refclk)
-+ return -EINVAL;
-+
-+ ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P);
-+ if (ret >= 0) {
-+ reg->clk = nv_rd32(dev, 0x4120 + (clk * 4));
-+ reg->pll = (P << 16) | (N << 8) | M;
-+ }
-+ return ret;
-+}
-+
-+static void
-+prog_pll(struct drm_device *dev, int clk, u32 pll, struct creg *reg)
-+{
-+ const u32 src0 = 0x004120 + (clk * 4);
-+ const u32 src1 = 0x004160 + (clk * 4);
-+ const u32 ctrl = pll + 0;
-+ const u32 coef = pll + 4;
-+ u32 cntl;
-+
-+ if (!reg->clk && !reg->pll) {
-+ NV_DEBUG(dev, "no clock for %02x\n", clk);
-+ return;
-+ }
-
-- src0 = nv_rd32(dev, 0x4120 + (off * 4));
-- src1 = nv_rd32(dev, 0x4160 + (off * 4));
-- ctrl = nv_rd32(dev, pll.reg + 0);
-- coef = nv_rd32(dev, pll.reg + 4);
-- NV_DEBUG(dev, "PLL %02x: 0x%08x 0x%08x 0x%08x 0x%08x\n",
-- id, src0, src1, ctrl, coef);
-+ cntl = nv_rd32(dev, ctrl) & 0xfffffff2;
-+ if (reg->pll) {
-+ nv_mask(dev, src0, 0x00000101, 0x00000101);
-+ nv_wr32(dev, coef, reg->pll);
-+ nv_wr32(dev, ctrl, cntl | 0x00000015);
-+ nv_mask(dev, src1, 0x00000100, 0x00000000);
-+ nv_mask(dev, src1, 0x00000001, 0x00000000);
-+ } else {
-+ nv_mask(dev, src1, 0x003f3141, 0x00000101 | reg->clk);
-+ nv_wr32(dev, ctrl, cntl | 0x0000001d);
-+ nv_mask(dev, ctrl, 0x00000001, 0x00000000);
-+ nv_mask(dev, src0, 0x00000100, 0x00000000);
-+ nv_mask(dev, src0, 0x00000001, 0x00000000);
-+ }
-+}
-
-- if (ctrl & 0x00000008) {
-- u32 div = ((src1 & 0x003c0000) >> 18) + 1;
-- return (pll.refclk * 2) / div;
-+static void
-+prog_clk(struct drm_device *dev, int clk, struct creg *reg)
-+{
-+ if (!reg->clk) {
-+ NV_DEBUG(dev, "no clock for %02x\n", clk);
-+ return;
- }
-
-- P = (coef & 0x003f0000) >> 16;
-- N = (coef & 0x0000ff00) >> 8;
-- M = (coef & 0x000000ff);
-- return pll.refclk * N / M / P;
-+ nv_mask(dev, 0x004120 + (clk * 4), 0x003f3141, 0x00000101 | reg->clk);
-+}
-+
-+int
-+nva3_pm_clocks_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
-+{
-+ perflvl->core = read_pll(dev, 0x00, 0x4200);
-+ perflvl->shader = read_pll(dev, 0x01, 0x4220);
-+ perflvl->memory = read_pll(dev, 0x02, 0x4000);
-+ perflvl->unka0 = read_clk(dev, 0x20, false);
-+ perflvl->vdec = read_clk(dev, 0x21, false);
-+ perflvl->daemon = read_clk(dev, 0x25, false);
-+ perflvl->copy = perflvl->core;
-+ return 0;
- }
-
-+struct nva3_pm_state {
-+ struct creg nclk;
-+ struct creg sclk;
-+ struct creg mclk;
-+ struct creg vdec;
-+ struct creg unka0;
-+};
-+
- void *
--nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl,
-- u32 id, int khz)
-+nva3_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
- {
-- struct nva3_pm_state *pll;
-- struct pll_lims limits;
-- int N, M, P, diff;
-- int ret, off;
-+ struct nva3_pm_state *info;
-+ int ret;
-
-- ret = get_pll_limits(dev, id, &limits);
-+ info = kzalloc(sizeof(*info), GFP_KERNEL);
-+ if (!info)
-+ return ERR_PTR(-ENOMEM);
-+
-+ ret = calc_clk(dev, 0x10, 0x4200, perflvl->core, &info->nclk);
- if (ret < 0)
-- return (ret == -ENOENT) ? NULL : ERR_PTR(ret);
-+ goto out;
-
-- off = nva3_pm_pll_offset(id);
-- if (id < 0)
-- return ERR_PTR(-EINVAL);
-+ ret = calc_clk(dev, 0x11, 0x4220, perflvl->shader, &info->sclk);
-+ if (ret < 0)
-+ goto out;
-
-+ ret = calc_clk(dev, 0x12, 0x4000, perflvl->memory, &info->mclk);
-+ if (ret < 0)
-+ goto out;
-
-- pll = kzalloc(sizeof(*pll), GFP_KERNEL);
-- if (!pll)
-- return ERR_PTR(-ENOMEM);
-- pll->type = id;
-- pll->src0 = 0x004120 + (off * 4);
-- pll->src1 = 0x004160 + (off * 4);
-- pll->ctrl = limits.reg + 0;
-- pll->coef = limits.reg + 4;
--
-- /* If target clock is within [-2, 3) MHz of a divisor, we'll
-- * use that instead of calculating MNP values
-- */
-- pll->new_div = min((limits.refclk * 2) / (khz - 2999), 16);
-- if (pll->new_div) {
-- diff = khz - ((limits.refclk * 2) / pll->new_div);
-- if (diff < -2000 || diff >= 3000)
-- pll->new_div = 0;
-- }
-+ ret = calc_clk(dev, 0x20, 0x0000, perflvl->unka0, &info->unka0);
-+ if (ret < 0)
-+ goto out;
-
-- if (!pll->new_div) {
-- ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P);
-- if (ret < 0)
-- return ERR_PTR(ret);
-+ ret = calc_clk(dev, 0x21, 0x0000, perflvl->vdec, &info->vdec);
-+ if (ret < 0)
-+ goto out;
-
-- pll->new_pnm = (P << 16) | (N << 8) | M;
-- pll->new_div = 2 - 1;
-- } else {
-- pll->new_pnm = 0;
-- pll->new_div--;
-+out:
-+ if (ret < 0) {
-+ kfree(info);
-+ info = ERR_PTR(ret);
- }
-+ return info;
-+}
-+
-+static bool
-+nva3_pm_grcp_idle(void *data)
-+{
-+ struct drm_device *dev = data;
-
-- if ((nv_rd32(dev, pll->src1) & 0x00000101) != 0x00000101)
-- pll->old_pnm = nv_rd32(dev, pll->coef);
-- return pll;
-+ if (!(nv_rd32(dev, 0x400304) & 0x00000001))
-+ return true;
-+ if (nv_rd32(dev, 0x400308) == 0x0050001c)
-+ return true;
-+ return false;
- }
-
- void
--nva3_pm_clock_set(struct drm_device *dev, void *pre_state)
-+nva3_pm_clocks_set(struct drm_device *dev, void *pre_state)
- {
-- struct nva3_pm_state *pll = pre_state;
-- u32 ctrl = 0;
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nva3_pm_state *info = pre_state;
-+ unsigned long flags;
-
-- /* For the memory clock, NVIDIA will build a "script" describing
-- * the reclocking process and ask PDAEMON to execute it.
-- */
-- if (pll->type == PLL_MEMORY) {
-- nv_wr32(dev, 0x100210, 0);
-- nv_wr32(dev, 0x1002dc, 1);
-- nv_wr32(dev, 0x004018, 0x00001000);
-- ctrl = 0x18000100;
-+ /* prevent any new grctx switches from starting */
-+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
-+ nv_wr32(dev, 0x400324, 0x00000000);
-+ nv_wr32(dev, 0x400328, 0x0050001c); /* wait flag 0x1c */
-+ /* wait for any pending grctx switches to complete */
-+ if (!nv_wait_cb(dev, nva3_pm_grcp_idle, dev)) {
-+ NV_ERROR(dev, "pm: ctxprog didn't go idle\n");
-+ goto cleanup;
- }
--
-- if (pll->old_pnm || !pll->new_pnm) {
-- nv_mask(dev, pll->src1, 0x003c0101, 0x00000101 |
-- (pll->new_div << 18));
-- nv_wr32(dev, pll->ctrl, 0x0001001d | ctrl);
-- nv_mask(dev, pll->ctrl, 0x00000001, 0x00000000);
-+ /* freeze PFIFO */
-+ nv_mask(dev, 0x002504, 0x00000001, 0x00000001);
-+ if (!nv_wait(dev, 0x002504, 0x00000010, 0x00000010)) {
-+ NV_ERROR(dev, "pm: fifo didn't go idle\n");
-+ goto cleanup;
- }
-
-- if (pll->new_pnm) {
-- nv_mask(dev, pll->src0, 0x00000101, 0x00000101);
-- nv_wr32(dev, pll->coef, pll->new_pnm);
-- nv_wr32(dev, pll->ctrl, 0x0001001d | ctrl);
-- nv_mask(dev, pll->ctrl, 0x00000010, 0x00000000);
-- nv_mask(dev, pll->ctrl, 0x00020010, 0x00020010);
-- nv_wr32(dev, pll->ctrl, 0x00010015 | ctrl);
-- nv_mask(dev, pll->src1, 0x00000100, 0x00000000);
-- nv_mask(dev, pll->src1, 0x00000001, 0x00000000);
-- if (pll->type == PLL_MEMORY)
-- nv_wr32(dev, 0x4018, 0x10005000);
-- } else {
-- nv_mask(dev, pll->ctrl, 0x00000001, 0x00000000);
-- nv_mask(dev, pll->src0, 0x00000100, 0x00000000);
-- nv_mask(dev, pll->src0, 0x00000001, 0x00000000);
-- if (pll->type == PLL_MEMORY)
-- nv_wr32(dev, 0x4018, 0x1000d000);
-- }
-+ prog_pll(dev, 0x00, 0x004200, &info->nclk);
-+ prog_pll(dev, 0x01, 0x004220, &info->sclk);
-+ prog_clk(dev, 0x20, &info->unka0);
-+ prog_clk(dev, 0x21, &info->vdec);
-
-- if (pll->type == PLL_MEMORY) {
-+ if (info->mclk.clk || info->mclk.pll) {
-+ nv_wr32(dev, 0x100210, 0);
-+ nv_wr32(dev, 0x1002dc, 1);
-+ nv_wr32(dev, 0x004018, 0x00001000);
-+ prog_pll(dev, 0x02, 0x004000, &info->mclk);
-+ if (nv_rd32(dev, 0x4000) & 0x00000008)
-+ nv_wr32(dev, 0x004018, 0x1000d000);
-+ else
-+ nv_wr32(dev, 0x004018, 0x10005000);
- nv_wr32(dev, 0x1002dc, 0);
- nv_wr32(dev, 0x100210, 0x80000000);
- }
-
-- kfree(pll);
-+cleanup:
-+ /* unfreeze PFIFO */
-+ nv_mask(dev, 0x002504, 0x00000001, 0x00000000);
-+ /* restore ctxprog to normal */
-+ nv_wr32(dev, 0x400324, 0x00000000);
-+ nv_wr32(dev, 0x400328, 0x0070009c); /* set flag 0x1c */
-+ /* unblock it if necessary */
-+ if (nv_rd32(dev, 0x400308) == 0x0050001c)
-+ nv_mask(dev, 0x400824, 0x10000000, 0x10000000);
-+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
-+ kfree(info);
- }
--
-diff --git a/drivers/gpu/drm/nouveau/nvc0_fb.c b/drivers/gpu/drm/nouveau/nvc0_fb.c
-index 08e6b11..5bf5503 100644
---- a/drivers/gpu/drm/nouveau/nvc0_fb.c
-+++ b/drivers/gpu/drm/nouveau/nvc0_fb.c
-@@ -32,6 +32,30 @@ struct nvc0_fb_priv {
- dma_addr_t r100c10;
- };
-
-+static inline void
-+nvc0_mfb_subp_isr(struct drm_device *dev, int unit, int subp)
-+{
-+ u32 subp_base = 0x141000 + (unit * 0x2000) + (subp * 0x400);
-+ u32 stat = nv_rd32(dev, subp_base + 0x020);
-+
-+ if (stat) {
-+ NV_INFO(dev, "PMFB%d_SUBP%d: 0x%08x\n", unit, subp, stat);
-+ nv_wr32(dev, subp_base + 0x020, stat);
-+ }
-+}
-+
-+static void
-+nvc0_mfb_isr(struct drm_device *dev)
-+{
-+ u32 units = nv_rd32(dev, 0x00017c);
-+ while (units) {
-+ u32 subp, unit = ffs(units) - 1;
-+ for (subp = 0; subp < 2; subp++)
-+ nvc0_mfb_subp_isr(dev, unit, subp);
-+ units &= ~(1 << unit);
-+ }
-+}
-+
- static void
- nvc0_fb_destroy(struct drm_device *dev)
- {
-@@ -39,6 +63,8 @@ nvc0_fb_destroy(struct drm_device *dev)
- struct nouveau_fb_engine *pfb = &dev_priv->engine.fb;
- struct nvc0_fb_priv *priv = pfb->priv;
-
-+ nouveau_irq_unregister(dev, 25);
-+
- if (priv->r100c10_page) {
- pci_unmap_page(dev->pdev, priv->r100c10, PAGE_SIZE,
- PCI_DMA_BIDIRECTIONAL);
-@@ -74,6 +100,7 @@ nvc0_fb_create(struct drm_device *dev)
- return -EFAULT;
- }
-
-+ nouveau_irq_register(dev, 25, nvc0_mfb_isr);
- return 0;
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nvc0_fifo.c b/drivers/gpu/drm/nouveau/nvc0_fifo.c
-index 6f9f341..dcbe0d5 100644
---- a/drivers/gpu/drm/nouveau/nvc0_fifo.c
-+++ b/drivers/gpu/drm/nouveau/nvc0_fifo.c
-@@ -322,7 +322,7 @@ nvc0_fifo_init(struct drm_device *dev)
- }
-
- /* PSUBFIFO[n] */
-- for (i = 0; i < 3; i++) {
-+ for (i = 0; i < priv->spoon_nr; i++) {
- nv_mask(dev, 0x04013c + (i * 0x2000), 0x10000100, 0x00000000);
- nv_wr32(dev, 0x040108 + (i * 0x2000), 0xffffffff); /* INTR */
- nv_wr32(dev, 0x04010c + (i * 0x2000), 0xfffffeff); /* INTR_EN */
-diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c b/drivers/gpu/drm/nouveau/nvc0_graph.c
-index 5b2f6f4..4b8d0b3 100644
---- a/drivers/gpu/drm/nouveau/nvc0_graph.c
-+++ b/drivers/gpu/drm/nouveau/nvc0_graph.c
-@@ -390,7 +390,7 @@ nvc0_graph_init_gpc_0(struct drm_device *dev)
- }
-
- nv_wr32(dev, GPC_BCAST(0x1bd4), magicgpc918);
-- nv_wr32(dev, GPC_BCAST(0x08ac), priv->rop_nr);
-+ nv_wr32(dev, GPC_BCAST(0x08ac), nv_rd32(dev, 0x100800));
- }
-
- static void
-@@ -700,22 +700,6 @@ nvc0_graph_isr(struct drm_device *dev)
- nv_wr32(dev, 0x400500, 0x00010001);
- }
-
--static void
--nvc0_runk140_isr(struct drm_device *dev)
--{
-- u32 units = nv_rd32(dev, 0x00017c) & 0x1f;
--
-- while (units) {
-- u32 unit = ffs(units) - 1;
-- u32 reg = 0x140000 + unit * 0x2000;
-- u32 st0 = nv_mask(dev, reg + 0x1020, 0, 0);
-- u32 st1 = nv_mask(dev, reg + 0x1420, 0, 0);
--
-- NV_DEBUG(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1);
-- units &= ~(1 << unit);
-- }
--}
--
- static int
- nvc0_graph_create_fw(struct drm_device *dev, const char *fwname,
- struct nvc0_graph_fuc *fuc)
-@@ -764,7 +748,6 @@ nvc0_graph_destroy(struct drm_device *dev, int engine)
- }
-
- nouveau_irq_unregister(dev, 12);
-- nouveau_irq_unregister(dev, 25);
-
- nouveau_gpuobj_ref(NULL, &priv->unk4188b8);
- nouveau_gpuobj_ref(NULL, &priv->unk4188b4);
-@@ -803,7 +786,6 @@ nvc0_graph_create(struct drm_device *dev)
-
- NVOBJ_ENGINE_ADD(dev, GR, &priv->base);
- nouveau_irq_register(dev, 12, nvc0_graph_isr);
-- nouveau_irq_register(dev, 25, nvc0_runk140_isr);
-
- if (nouveau_ctxfw) {
- NV_INFO(dev, "PGRAPH: using external firmware\n");
-@@ -864,6 +846,9 @@ nvc0_graph_create(struct drm_device *dev)
- case 0xce: /* 4/4/0/0, 4 */
- priv->magic_not_rop_nr = 0x03;
- break;
-+ case 0xcf: /* 4/0/0/0, 3 */
-+ priv->magic_not_rop_nr = 0x03;
-+ break;
- }
-
- if (!priv->magic_not_rop_nr) {
-@@ -889,5 +874,3 @@ error:
- nvc0_graph_destroy(dev, NVOBJ_ENGINE_GR);
- return ret;
- }
--
--/*(DEBLOBBED)*/
-diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.h b/drivers/gpu/drm/nouveau/nvc0_graph.h
-index 55689e9..636fe98 100644
---- a/drivers/gpu/drm/nouveau/nvc0_graph.h
-+++ b/drivers/gpu/drm/nouveau/nvc0_graph.h
-@@ -82,6 +82,7 @@ nvc0_graph_class(struct drm_device *dev)
- case 0xc3:
- case 0xc4:
- case 0xce: /* guess, mmio trace shows only 0x9097 state */
-+ case 0xcf: /* guess, mmio trace shows only 0x9097 state */
- return 0x9097;
- case 0xc1:
- return 0x9197;
-diff --git a/drivers/gpu/drm/nouveau/nvc0_grctx.c b/drivers/gpu/drm/nouveau/nvc0_grctx.c
-index 31018ea..dd0e6a7 100644
---- a/drivers/gpu/drm/nouveau/nvc0_grctx.c
-+++ b/drivers/gpu/drm/nouveau/nvc0_grctx.c
-@@ -1678,7 +1678,10 @@ nvc0_grctx_generate_tp(struct drm_device *dev)
- nv_wr32(dev, 0x419c04, 0x00000006);
- nv_wr32(dev, 0x419c08, 0x00000002);
- nv_wr32(dev, 0x419c20, 0x00000000);
-- nv_wr32(dev, 0x419cb0, 0x00060048); //XXX: 0xce 0x00020048
-+ if (chipset == 0xce || chipset == 0xcf)
-+ nv_wr32(dev, 0x419cb0, 0x00020048);
-+ else
-+ nv_wr32(dev, 0x419cb0, 0x00060048);
- nv_wr32(dev, 0x419ce8, 0x00000000);
- nv_wr32(dev, 0x419cf4, 0x00000183);
- nv_wr32(dev, 0x419d20, chipset != 0xc1 ? 0x02180000 : 0x12180000);
-@@ -1783,11 +1786,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan)
- nv_wr32(dev, 0x40587c, 0x00000000);
-
- if (1) {
-- const u8 chipset_tp_max[] = { 16, 4, 0, 4, 8, 0, 0, 0,
-- 16, 0, 0, 0, 0, 0, 8, 0 };
-- u8 max = chipset_tp_max[dev_priv->chipset & 0x0f];
-- u8 tpnr[GPC_MAX];
-- u8 data[TP_MAX];
-+ u8 tpnr[GPC_MAX], data[TP_MAX];
-
- memcpy(tpnr, priv->tp_nr, sizeof(priv->tp_nr));
- memset(data, 0x1f, sizeof(data));
-@@ -1801,7 +1800,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan)
- data[tp] = gpc;
- }
-
-- for (i = 0; i < max / 4; i++)
-+ for (i = 0; i < 4; i++)
- nv_wr32(dev, 0x4060a8 + (i * 4), ((u32 *)data)[i]);
- }
-
-diff --git a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc b/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc
-index 0ec2add..06f5e26 100644
---- a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc
-+++ b/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc
-@@ -77,6 +77,11 @@ chipsets:
- .b16 nvc0_gpc_mmio_tail
- .b16 nvc0_tpc_mmio_head
- .b16 nvc3_tpc_mmio_tail
-+.b8 0xcf 0 0 0
-+.b16 nvc0_gpc_mmio_head
-+.b16 nvc0_gpc_mmio_tail
-+.b16 nvc0_tpc_mmio_head
-+.b16 nvcf_tpc_mmio_tail
- .b8 0 0 0 0
-
- // GPC mmio lists
-@@ -134,8 +139,9 @@ mmctx_data(0x000750, 2)
- nvc0_tpc_mmio_tail:
- mmctx_data(0x000758, 1)
- mmctx_data(0x0002c4, 1)
--mmctx_data(0x0004bc, 1)
- mmctx_data(0x0006e0, 1)
-+nvcf_tpc_mmio_tail:
-+mmctx_data(0x0004bc, 1)
- nvc3_tpc_mmio_tail:
- mmctx_data(0x000544, 1)
- nvc1_tpc_mmio_tail:
-diff --git a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h b/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h
-index 1896c89..6f82032 100644
---- a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h
-+++ b/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h
-@@ -25,23 +25,26 @@ uint32_t nvc0_grgpc_data[] = {
- 0x00000000,
- 0x00000000,
- 0x000000c0,
-- 0x011000b0,
-- 0x01640114,
-+ 0x011c00bc,
-+ 0x01700120,
- 0x000000c1,
-- 0x011400b0,
-- 0x01780114,
-+ 0x012000bc,
-+ 0x01840120,
- 0x000000c3,
-- 0x011000b0,
-- 0x01740114,
-+ 0x011c00bc,
-+ 0x01800120,
- 0x000000c4,
-- 0x011000b0,
-- 0x01740114,
-+ 0x011c00bc,
-+ 0x01800120,
- 0x000000c8,
-- 0x011000b0,
-- 0x01640114,
-+ 0x011c00bc,
-+ 0x01700120,
- 0x000000ce,
-- 0x011000b0,
-- 0x01740114,
-+ 0x011c00bc,
-+ 0x01800120,
-+ 0x000000cf,
-+ 0x011c00bc,
-+ 0x017c0120,
- 0x00000000,
- 0x00000380,
- 0x14000400,
-@@ -90,8 +93,8 @@ uint32_t nvc0_grgpc_data[] = {
- 0x04000750,
- 0x00000758,
- 0x000002c4,
-- 0x000004bc,
- 0x000006e0,
-+ 0x000004bc,
- 0x00000544,
- };
-
-diff --git a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc b/drivers/gpu/drm/nouveau/nvc0_grhub.fuc
-index a1a5991..e4f8c7e 100644
---- a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc
-+++ b/drivers/gpu/drm/nouveau/nvc0_grhub.fuc
-@@ -56,6 +56,9 @@ chipsets:
- .b8 0xce 0 0 0
- .b16 nvc0_hub_mmio_head
- .b16 nvc0_hub_mmio_tail
-+.b8 0xcf 0 0 0
-+.b16 nvc0_hub_mmio_head
-+.b16 nvc0_hub_mmio_tail
- .b8 0 0 0 0
-
- nvc0_hub_mmio_head:
-diff --git a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h b/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h
-index b3b541b..241d326 100644
---- a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h
-+++ b/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h
-@@ -23,17 +23,19 @@ uint32_t nvc0_grhub_data[] = {
- 0x00000000,
- 0x00000000,
- 0x000000c0,
-- 0x012c0090,
-+ 0x01340098,
- 0x000000c1,
-- 0x01300090,
-+ 0x01380098,
- 0x000000c3,
-- 0x012c0090,
-+ 0x01340098,
- 0x000000c4,
-- 0x012c0090,
-+ 0x01340098,
- 0x000000c8,
-- 0x012c0090,
-+ 0x01340098,
- 0x000000ce,
-- 0x012c0090,
-+ 0x01340098,
-+ 0x000000cf,
-+ 0x01340098,
- 0x00000000,
- 0x0417e91c,
- 0x04400204,
-@@ -190,8 +192,6 @@ uint32_t nvc0_grhub_data[] = {
- 0x00000000,
- 0x00000000,
- 0x00000000,
-- 0x00000000,
-- 0x00000000,
- };
-
- uint32_t nvc0_grhub_code[] = {
-diff --git a/drivers/gpu/drm/nouveau/nvc0_pm.c b/drivers/gpu/drm/nouveau/nvc0_pm.c
-new file mode 100644
-index 0000000..929aded
---- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nvc0_pm.c
-@@ -0,0 +1,155 @@
-+/*
-+ * Copyright 2011 Red Hat Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Authors: Ben Skeggs
-+ */
-+
-+#include "drmP.h"
-+#include "nouveau_drv.h"
-+#include "nouveau_bios.h"
-+#include "nouveau_pm.h"
-+
-+static u32 read_div(struct drm_device *, int, u32, u32);
-+static u32 read_pll(struct drm_device *, u32);
-+
-+static u32
-+read_vco(struct drm_device *dev, u32 dsrc)
-+{
-+ u32 ssrc = nv_rd32(dev, dsrc);
-+ if (!(ssrc & 0x00000100))
-+ return read_pll(dev, 0x00e800);
-+ return read_pll(dev, 0x00e820);
-+}
-+
-+static u32
-+read_pll(struct drm_device *dev, u32 pll)
-+{
-+ u32 ctrl = nv_rd32(dev, pll + 0);
-+ u32 coef = nv_rd32(dev, pll + 4);
-+ u32 P = (coef & 0x003f0000) >> 16;
-+ u32 N = (coef & 0x0000ff00) >> 8;
-+ u32 M = (coef & 0x000000ff) >> 0;
-+ u32 sclk, doff;
-+
-+ if (!(ctrl & 0x00000001))
-+ return 0;
-+
-+ switch (pll & 0xfff000) {
-+ case 0x00e000:
-+ sclk = 27000;
-+ P = 1;
-+ break;
-+ case 0x137000:
-+ doff = (pll - 0x137000) / 0x20;
-+ sclk = read_div(dev, doff, 0x137120, 0x137140);
-+ break;
-+ case 0x132000:
-+ switch (pll) {
-+ case 0x132000:
-+ sclk = read_pll(dev, 0x132020);
-+ break;
-+ case 0x132020:
-+ sclk = read_div(dev, 0, 0x137320, 0x137330);
-+ break;
-+ default:
-+ return 0;
-+ }
-+ break;
-+ default:
-+ return 0;
-+ }
-+
-+ return sclk * N / M / P;
-+}
-+
-+static u32
-+read_div(struct drm_device *dev, int doff, u32 dsrc, u32 dctl)
-+{
-+ u32 ssrc = nv_rd32(dev, dsrc + (doff * 4));
-+ u32 sctl = nv_rd32(dev, dctl + (doff * 4));
-+
-+ switch (ssrc & 0x00000003) {
-+ case 0:
-+ if ((ssrc & 0x00030000) != 0x00030000)
-+ return 27000;
-+ return 108000;
-+ case 2:
-+ return 100000;
-+ case 3:
-+ if (sctl & 0x80000000) {
-+ u32 sclk = read_vco(dev, dsrc + (doff * 4));
-+ u32 sdiv = (sctl & 0x0000003f) + 2;
-+ return (sclk * 2) / sdiv;
-+ }
-+
-+ return read_vco(dev, dsrc + (doff * 4));
-+ default:
-+ return 0;
-+ }
-+}
-+
-+static u32
-+read_mem(struct drm_device *dev)
-+{
-+ u32 ssel = nv_rd32(dev, 0x1373f0);
-+ if (ssel & 0x00000001)
-+ return read_div(dev, 0, 0x137300, 0x137310);
-+ return read_pll(dev, 0x132000);
-+}
-+
-+static u32
-+read_clk(struct drm_device *dev, int clk)
-+{
-+ u32 sctl = nv_rd32(dev, 0x137250 + (clk * 4));
-+ u32 ssel = nv_rd32(dev, 0x137100);
-+ u32 sclk, sdiv;
-+
-+ if (ssel & (1 << clk)) {
-+ if (clk < 7)
-+ sclk = read_pll(dev, 0x137000 + (clk * 0x20));
-+ else
-+ sclk = read_pll(dev, 0x1370e0);
-+ sdiv = ((sctl & 0x00003f00) >> 8) + 2;
-+ } else {
-+ sclk = read_div(dev, clk, 0x137160, 0x1371d0);
-+ sdiv = ((sctl & 0x0000003f) >> 0) + 2;
-+ }
-+
-+ if (sctl & 0x80000000)
-+ return (sclk * 2) / sdiv;
-+ return sclk;
-+}
-+
-+int
-+nvc0_pm_clocks_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
-+{
-+ perflvl->shader = read_clk(dev, 0x00);
-+ perflvl->core = perflvl->shader / 2;
-+ perflvl->memory = read_mem(dev);
-+ perflvl->rop = read_clk(dev, 0x01);
-+ perflvl->hub07 = read_clk(dev, 0x02);
-+ perflvl->hub06 = read_clk(dev, 0x07);
-+ perflvl->hub01 = read_clk(dev, 0x08);
-+ perflvl->copy = read_clk(dev, 0x09);
-+ perflvl->daemon = read_clk(dev, 0x0c);
-+ perflvl->vdec = read_clk(dev, 0x0e);
-+ return 0;
-+}
-diff --git a/drivers/gpu/drm/nouveau/nvc0_vram.c b/drivers/gpu/drm/nouveau/nvc0_vram.c
-index e45a24d..edbfe93 100644
---- a/drivers/gpu/drm/nouveau/nvc0_vram.c
-+++ b/drivers/gpu/drm/nouveau/nvc0_vram.c
-@@ -61,7 +61,7 @@ nvc0_vram_new(struct drm_device *dev, u64 size, u32 align, u32 ncmin,
- u32 type, struct nouveau_mem **pmem)
- {
- struct drm_nouveau_private *dev_priv = dev->dev_private;
-- struct nouveau_mm *mm = dev_priv->engine.vram.mm;
-+ struct nouveau_mm *mm = &dev_priv->engine.vram.mm;
- struct nouveau_mm_node *r;
- struct nouveau_mem *mem;
- int ret;
-@@ -106,12 +106,50 @@ nvc0_vram_init(struct drm_device *dev)
- struct nouveau_vram_engine *vram = &dev_priv->engine.vram;
- const u32 rsvd_head = ( 256 * 1024) >> 12; /* vga memory */
- const u32 rsvd_tail = (1024 * 1024) >> 12; /* vbios etc */
-- u32 length;
-+ u32 parts = nv_rd32(dev, 0x121c74);
-+ u32 bsize = nv_rd32(dev, 0x10f20c);
-+ u32 offset, length;
-+ bool uniform = true;
-+ int ret, i;
-
-- dev_priv->vram_size = nv_rd32(dev, 0x10f20c) << 20;
-- dev_priv->vram_size *= nv_rd32(dev, 0x121c74);
-+ NV_DEBUG(dev, "0x100800: 0x%08x\n", nv_rd32(dev, 0x100800));
-+ NV_DEBUG(dev, "parts 0x%08x bcast_mem_amount 0x%08x\n", parts, bsize);
-
-- length = (dev_priv->vram_size >> 12) - rsvd_head - rsvd_tail;
-+ /* read amount of vram attached to each memory controller */
-+ for (i = 0; i < parts; i++) {
-+ u32 psize = nv_rd32(dev, 0x11020c + (i * 0x1000));
-+ if (psize != bsize) {
-+ if (psize < bsize)
-+ bsize = psize;
-+ uniform = false;
-+ }
-+
-+ NV_DEBUG(dev, "%d: mem_amount 0x%08x\n", i, psize);
-+
-+ dev_priv->vram_size += (u64)psize << 20;
-+ }
-+
-+ /* if all controllers have the same amount attached, there's no holes */
-+ if (uniform) {
-+ offset = rsvd_head;
-+ length = (dev_priv->vram_size >> 12) - rsvd_head - rsvd_tail;
-+ return nouveau_mm_init(&vram->mm, offset, length, 1);
-+ }
-
-- return nouveau_mm_init(&vram->mm, rsvd_head, length, 1);
-+ /* otherwise, address lowest common amount from 0GiB */
-+ ret = nouveau_mm_init(&vram->mm, rsvd_head, (bsize << 8) * parts, 1);
-+ if (ret)
-+ return ret;
-+
-+ /* and the rest starting from (8GiB + common_size) */
-+ offset = (0x0200000000ULL >> 12) + (bsize << 8);
-+ length = (dev_priv->vram_size >> 12) - (bsize << 8) - rsvd_tail;
-+
-+ ret = nouveau_mm_init(&vram->mm, offset, length, 0);
-+ if (ret) {
-+ nouveau_mm_fini(&vram->mm);
-+ return ret;
-+ }
-+
-+ return 0;
- }
-diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c
-new file mode 100644
-index 0000000..23d63b4
---- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nvd0_display.c
-@@ -0,0 +1,1473 @@
-+/*
-+ * Copyright 2011 Red Hat Inc.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ * Authors: Ben Skeggs
-+ */
-+
-+#include <linux/dma-mapping.h>
-+
-+#include "drmP.h"
-+#include "drm_crtc_helper.h"
-+
-+#include "nouveau_drv.h"
-+#include "nouveau_connector.h"
-+#include "nouveau_encoder.h"
-+#include "nouveau_crtc.h"
-+#include "nouveau_dma.h"
-+#include "nouveau_fb.h"
-+#include "nv50_display.h"
-+
-+struct nvd0_display {
-+ struct nouveau_gpuobj *mem;
-+ struct {
-+ dma_addr_t handle;
-+ u32 *ptr;
-+ } evo[1];
-+
-+ struct tasklet_struct tasklet;
-+ u32 modeset;
-+};
-+
-+static struct nvd0_display *
-+nvd0_display(struct drm_device *dev)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ return dev_priv->engine.display.priv;
-+}
-+
-+static inline int
-+evo_icmd(struct drm_device *dev, int id, u32 mthd, u32 data)
-+{
-+ int ret = 0;
-+ nv_mask(dev, 0x610700 + (id * 0x10), 0x00000001, 0x00000001);
-+ nv_wr32(dev, 0x610704 + (id * 0x10), data);
-+ nv_mask(dev, 0x610704 + (id * 0x10), 0x80000ffc, 0x80000000 | mthd);
-+ if (!nv_wait(dev, 0x610704 + (id * 0x10), 0x80000000, 0x00000000))
-+ ret = -EBUSY;
-+ nv_mask(dev, 0x610700 + (id * 0x10), 0x00000001, 0x00000000);
-+ return ret;
-+}
-+
-+static u32 *
-+evo_wait(struct drm_device *dev, int id, int nr)
-+{
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ u32 put = nv_rd32(dev, 0x640000 + (id * 0x1000)) / 4;
-+
-+ if (put + nr >= (PAGE_SIZE / 4)) {
-+ disp->evo[id].ptr[put] = 0x20000000;
-+
-+ nv_wr32(dev, 0x640000 + (id * 0x1000), 0x00000000);
-+ if (!nv_wait(dev, 0x640004 + (id * 0x1000), ~0, 0x00000000)) {
-+ NV_ERROR(dev, "evo %d dma stalled\n", id);
-+ return NULL;
-+ }
-+
-+ put = 0;
-+ }
-+
-+ return disp->evo[id].ptr + put;
-+}
-+
-+static void
-+evo_kick(u32 *push, struct drm_device *dev, int id)
-+{
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ nv_wr32(dev, 0x640000 + (id * 0x1000), (push - disp->evo[id].ptr) << 2);
-+}
-+
-+#define evo_mthd(p,m,s) *((p)++) = (((s) << 18) | (m))
-+#define evo_data(p,d) *((p)++) = (d)
-+
-+static struct drm_crtc *
-+nvd0_display_crtc_get(struct drm_encoder *encoder)
-+{
-+ return nouveau_encoder(encoder)->crtc;
-+}
-+
-+/******************************************************************************
-+ * CRTC
-+ *****************************************************************************/
-+static int
-+nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool on, bool update)
-+{
-+ struct drm_device *dev = nv_crtc->base.dev;
-+ u32 *push, mode;
-+
-+ mode = 0x00000000;
-+ if (on) {
-+ /* 0x11: 6bpc dynamic 2x2
-+ * 0x13: 8bpc dynamic 2x2
-+ * 0x19: 6bpc static 2x2
-+ * 0x1b: 8bpc static 2x2
-+ * 0x21: 6bpc temporal
-+ * 0x23: 8bpc temporal
-+ */
-+ mode = 0x00000011;
-+ }
-+
-+ push = evo_wait(dev, 0, 4);
-+ if (push) {
-+ evo_mthd(push, 0x0490 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, mode);
-+ if (update) {
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ }
-+ evo_kick(push, dev, 0);
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+nvd0_crtc_set_scale(struct nouveau_crtc *nv_crtc, int type, bool update)
-+{
-+ struct drm_display_mode *mode = &nv_crtc->base.mode;
-+ struct drm_device *dev = nv_crtc->base.dev;
-+ struct nouveau_connector *nv_connector;
-+ u32 *push, outX, outY;
-+
-+ outX = mode->hdisplay;
-+ outY = mode->vdisplay;
-+
-+ nv_connector = nouveau_crtc_connector_get(nv_crtc);
-+ if (nv_connector && nv_connector->native_mode) {
-+ struct drm_display_mode *native = nv_connector->native_mode;
-+ u32 xratio = (native->hdisplay << 19) / mode->hdisplay;
-+ u32 yratio = (native->vdisplay << 19) / mode->vdisplay;
-+
-+ switch (type) {
-+ case DRM_MODE_SCALE_ASPECT:
-+ if (xratio > yratio) {
-+ outX = (mode->hdisplay * yratio) >> 19;
-+ outY = (mode->vdisplay * yratio) >> 19;
-+ } else {
-+ outX = (mode->hdisplay * xratio) >> 19;
-+ outY = (mode->vdisplay * xratio) >> 19;
-+ }
-+ break;
-+ case DRM_MODE_SCALE_FULLSCREEN:
-+ outX = native->hdisplay;
-+ outY = native->vdisplay;
-+ break;
-+ default:
-+ break;
-+ }
-+ }
-+
-+ push = evo_wait(dev, 0, 16);
-+ if (push) {
-+ evo_mthd(push, 0x04c0 + (nv_crtc->index * 0x300), 3);
-+ evo_data(push, (outY << 16) | outX);
-+ evo_data(push, (outY << 16) | outX);
-+ evo_data(push, (outY << 16) | outX);
-+ evo_mthd(push, 0x0494 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x04b8 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, (mode->vdisplay << 16) | mode->hdisplay);
-+ if (update) {
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ }
-+ evo_kick(push, dev, 0);
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+nvd0_crtc_set_image(struct nouveau_crtc *nv_crtc, struct drm_framebuffer *fb,
-+ int x, int y, bool update)
-+{
-+ struct nouveau_framebuffer *nvfb = nouveau_framebuffer(fb);
-+ u32 *push;
-+
-+ push = evo_wait(fb->dev, 0, 16);
-+ if (push) {
-+ evo_mthd(push, 0x0460 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, nvfb->nvbo->bo.offset >> 8);
-+ evo_mthd(push, 0x0468 + (nv_crtc->index * 0x300), 4);
-+ evo_data(push, (fb->height << 16) | fb->width);
-+ evo_data(push, nvfb->r_pitch);
-+ evo_data(push, nvfb->r_format);
-+ evo_data(push, nvfb->r_dma);
-+ evo_mthd(push, 0x04b0 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, (y << 16) | x);
-+ if (update) {
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ }
-+ evo_kick(push, fb->dev, 0);
-+ }
-+
-+ nv_crtc->fb.tile_flags = nvfb->r_dma;
-+ return 0;
-+}
-+
-+static void
-+nvd0_crtc_cursor_show(struct nouveau_crtc *nv_crtc, bool show, bool update)
-+{
-+ struct drm_device *dev = nv_crtc->base.dev;
-+ u32 *push = evo_wait(dev, 0, 16);
-+ if (push) {
-+ if (show) {
-+ evo_mthd(push, 0x0480 + (nv_crtc->index * 0x300), 2);
-+ evo_data(push, 0x85000000);
-+ evo_data(push, nv_crtc->cursor.nvbo->bo.offset >> 8);
-+ evo_mthd(push, 0x048c + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, NvEvoVRAM);
-+ } else {
-+ evo_mthd(push, 0x0480 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x05000000);
-+ evo_mthd(push, 0x048c + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x00000000);
-+ }
-+
-+ if (update) {
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ }
-+
-+ evo_kick(push, dev, 0);
-+ }
-+}
-+
-+static void
-+nvd0_crtc_dpms(struct drm_crtc *crtc, int mode)
-+{
-+}
-+
-+static void
-+nvd0_crtc_prepare(struct drm_crtc *crtc)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ u32 *push;
-+
-+ push = evo_wait(crtc->dev, 0, 2);
-+ if (push) {
-+ evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x0440 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x03000000);
-+ evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x00000000);
-+ evo_kick(push, crtc->dev, 0);
-+ }
-+
-+ nvd0_crtc_cursor_show(nv_crtc, false, false);
-+}
-+
-+static void
-+nvd0_crtc_commit(struct drm_crtc *crtc)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ u32 *push;
-+
-+ push = evo_wait(crtc->dev, 0, 32);
-+ if (push) {
-+ evo_mthd(push, 0x0474 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, nv_crtc->fb.tile_flags);
-+ evo_mthd(push, 0x0440 + (nv_crtc->index * 0x300), 4);
-+ evo_data(push, 0x83000000);
-+ evo_data(push, nv_crtc->lut.nvbo->bo.offset >> 8);
-+ evo_data(push, 0x00000000);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, NvEvoVRAM);
-+ evo_mthd(push, 0x0430 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0xffffff00);
-+ evo_kick(push, crtc->dev, 0);
-+ }
-+
-+ nvd0_crtc_cursor_show(nv_crtc, nv_crtc->cursor.visible, true);
-+}
-+
-+static bool
-+nvd0_crtc_mode_fixup(struct drm_crtc *crtc, struct drm_display_mode *mode,
-+ struct drm_display_mode *adjusted_mode)
-+{
-+ return true;
-+}
-+
-+static int
-+nvd0_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb)
-+{
-+ struct nouveau_framebuffer *nvfb = nouveau_framebuffer(crtc->fb);
-+ int ret;
-+
-+ ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM);
-+ if (ret)
-+ return ret;
-+
-+ if (old_fb) {
-+ nvfb = nouveau_framebuffer(old_fb);
-+ nouveau_bo_unpin(nvfb->nvbo);
-+ }
-+
-+ return 0;
-+}
-+
-+static int
-+nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode,
-+ struct drm_display_mode *mode, int x, int y,
-+ struct drm_framebuffer *old_fb)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ struct nouveau_connector *nv_connector;
-+ u32 htotal = mode->htotal;
-+ u32 vtotal = mode->vtotal;
-+ u32 hsyncw = mode->hsync_end - mode->hsync_start - 1;
-+ u32 vsyncw = mode->vsync_end - mode->vsync_start - 1;
-+ u32 hfrntp = mode->hsync_start - mode->hdisplay;
-+ u32 vfrntp = mode->vsync_start - mode->vdisplay;
-+ u32 hbackp = mode->htotal - mode->hsync_end;
-+ u32 vbackp = mode->vtotal - mode->vsync_end;
-+ u32 hss2be = hsyncw + hbackp;
-+ u32 vss2be = vsyncw + vbackp;
-+ u32 hss2de = htotal - hfrntp;
-+ u32 vss2de = vtotal - vfrntp;
-+ u32 syncs, *push;
-+ int ret;
-+
-+ syncs = 0x00000001;
-+ if (mode->flags & DRM_MODE_FLAG_NHSYNC)
-+ syncs |= 0x00000008;
-+ if (mode->flags & DRM_MODE_FLAG_NVSYNC)
-+ syncs |= 0x00000010;
-+
-+ ret = nvd0_crtc_swap_fbs(crtc, old_fb);
-+ if (ret)
-+ return ret;
-+
-+ push = evo_wait(crtc->dev, 0, 64);
-+ if (push) {
-+ evo_mthd(push, 0x0410 + (nv_crtc->index * 0x300), 5);
-+ evo_data(push, 0x00000000);
-+ evo_data(push, (vtotal << 16) | htotal);
-+ evo_data(push, (vsyncw << 16) | hsyncw);
-+ evo_data(push, (vss2be << 16) | hss2be);
-+ evo_data(push, (vss2de << 16) | hss2de);
-+ evo_mthd(push, 0x042c + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, 0x00000000); /* ??? */
-+ evo_mthd(push, 0x0450 + (nv_crtc->index * 0x300), 3);
-+ evo_data(push, mode->clock * 1000);
-+ evo_data(push, 0x00200000); /* ??? */
-+ evo_data(push, mode->clock * 1000);
-+ evo_mthd(push, 0x0404 + (nv_crtc->index * 0x300), 1);
-+ evo_data(push, syncs);
-+ evo_kick(push, crtc->dev, 0);
-+ }
-+
-+ nv_connector = nouveau_crtc_connector_get(nv_crtc);
-+ nvd0_crtc_set_dither(nv_crtc, nv_connector->use_dithering, false);
-+ nvd0_crtc_set_scale(nv_crtc, nv_connector->scaling_mode, false);
-+ nvd0_crtc_set_image(nv_crtc, crtc->fb, x, y, false);
-+ return 0;
-+}
-+
-+static int
-+nvd0_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
-+ struct drm_framebuffer *old_fb)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ int ret;
-+
-+ if (!crtc->fb) {
-+ NV_DEBUG_KMS(crtc->dev, "No FB bound\n");
-+ return 0;
-+ }
-+
-+ ret = nvd0_crtc_swap_fbs(crtc, old_fb);
-+ if (ret)
-+ return ret;
-+
-+ nvd0_crtc_set_image(nv_crtc, crtc->fb, x, y, true);
-+ return 0;
-+}
-+
-+static int
-+nvd0_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
-+ struct drm_framebuffer *fb, int x, int y,
-+ enum mode_set_atomic state)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ nvd0_crtc_set_image(nv_crtc, fb, x, y, true);
-+ return 0;
-+}
-+
-+static void
-+nvd0_crtc_lut_load(struct drm_crtc *crtc)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ void __iomem *lut = nvbo_kmap_obj_iovirtual(nv_crtc->lut.nvbo);
-+ int i;
-+
-+ for (i = 0; i < 256; i++) {
-+ writew(0x6000 + (nv_crtc->lut.r[i] >> 2), lut + (i * 0x20) + 0);
-+ writew(0x6000 + (nv_crtc->lut.g[i] >> 2), lut + (i * 0x20) + 2);
-+ writew(0x6000 + (nv_crtc->lut.b[i] >> 2), lut + (i * 0x20) + 4);
-+ }
-+}
-+
-+static int
-+nvd0_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
-+ uint32_t handle, uint32_t width, uint32_t height)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ struct drm_device *dev = crtc->dev;
-+ struct drm_gem_object *gem;
-+ struct nouveau_bo *nvbo;
-+ bool visible = (handle != 0);
-+ int i, ret = 0;
-+
-+ if (visible) {
-+ if (width != 64 || height != 64)
-+ return -EINVAL;
-+
-+ gem = drm_gem_object_lookup(dev, file_priv, handle);
-+ if (unlikely(!gem))
-+ return -ENOENT;
-+ nvbo = nouveau_gem_object(gem);
-+
-+ ret = nouveau_bo_map(nvbo);
-+ if (ret == 0) {
-+ for (i = 0; i < 64 * 64; i++) {
-+ u32 v = nouveau_bo_rd32(nvbo, i);
-+ nouveau_bo_wr32(nv_crtc->cursor.nvbo, i, v);
-+ }
-+ nouveau_bo_unmap(nvbo);
-+ }
-+
-+ drm_gem_object_unreference_unlocked(gem);
-+ }
-+
-+ if (visible != nv_crtc->cursor.visible) {
-+ nvd0_crtc_cursor_show(nv_crtc, visible, true);
-+ nv_crtc->cursor.visible = visible;
-+ }
-+
-+ return ret;
-+}
-+
-+static int
-+nvd0_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ const u32 data = (y << 16) | x;
-+
-+ nv_wr32(crtc->dev, 0x64d084 + (nv_crtc->index * 0x1000), data);
-+ nv_wr32(crtc->dev, 0x64d080 + (nv_crtc->index * 0x1000), 0x00000000);
-+ return 0;
-+}
-+
-+static void
-+nvd0_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
-+ uint32_t start, uint32_t size)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ u32 end = max(start + size, (u32)256);
-+ u32 i;
-+
-+ for (i = start; i < end; i++) {
-+ nv_crtc->lut.r[i] = r[i];
-+ nv_crtc->lut.g[i] = g[i];
-+ nv_crtc->lut.b[i] = b[i];
-+ }
-+
-+ nvd0_crtc_lut_load(crtc);
-+}
-+
-+static void
-+nvd0_crtc_destroy(struct drm_crtc *crtc)
-+{
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-+ nouveau_bo_unmap(nv_crtc->cursor.nvbo);
-+ nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
-+ nouveau_bo_unmap(nv_crtc->lut.nvbo);
-+ nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo);
-+ drm_crtc_cleanup(crtc);
-+ kfree(crtc);
-+}
-+
-+static const struct drm_crtc_helper_funcs nvd0_crtc_hfunc = {
-+ .dpms = nvd0_crtc_dpms,
-+ .prepare = nvd0_crtc_prepare,
-+ .commit = nvd0_crtc_commit,
-+ .mode_fixup = nvd0_crtc_mode_fixup,
-+ .mode_set = nvd0_crtc_mode_set,
-+ .mode_set_base = nvd0_crtc_mode_set_base,
-+ .mode_set_base_atomic = nvd0_crtc_mode_set_base_atomic,
-+ .load_lut = nvd0_crtc_lut_load,
-+};
-+
-+static const struct drm_crtc_funcs nvd0_crtc_func = {
-+ .cursor_set = nvd0_crtc_cursor_set,
-+ .cursor_move = nvd0_crtc_cursor_move,
-+ .gamma_set = nvd0_crtc_gamma_set,
-+ .set_config = drm_crtc_helper_set_config,
-+ .destroy = nvd0_crtc_destroy,
-+};
-+
-+static void
-+nvd0_cursor_set_pos(struct nouveau_crtc *nv_crtc, int x, int y)
-+{
-+}
-+
-+static void
-+nvd0_cursor_set_offset(struct nouveau_crtc *nv_crtc, uint32_t offset)
-+{
-+}
-+
-+static int
-+nvd0_crtc_create(struct drm_device *dev, int index)
-+{
-+ struct nouveau_crtc *nv_crtc;
-+ struct drm_crtc *crtc;
-+ int ret, i;
-+
-+ nv_crtc = kzalloc(sizeof(*nv_crtc), GFP_KERNEL);
-+ if (!nv_crtc)
-+ return -ENOMEM;
-+
-+ nv_crtc->index = index;
-+ nv_crtc->set_dither = nvd0_crtc_set_dither;
-+ nv_crtc->set_scale = nvd0_crtc_set_scale;
-+ nv_crtc->cursor.set_offset = nvd0_cursor_set_offset;
-+ nv_crtc->cursor.set_pos = nvd0_cursor_set_pos;
-+ for (i = 0; i < 256; i++) {
-+ nv_crtc->lut.r[i] = i << 8;
-+ nv_crtc->lut.g[i] = i << 8;
-+ nv_crtc->lut.b[i] = i << 8;
-+ }
-+
-+ crtc = &nv_crtc->base;
-+ drm_crtc_init(dev, crtc, &nvd0_crtc_func);
-+ drm_crtc_helper_add(crtc, &nvd0_crtc_hfunc);
-+ drm_mode_crtc_set_gamma_size(crtc, 256);
-+
-+ ret = nouveau_bo_new(dev, 64 * 64 * 4, 0x100, TTM_PL_FLAG_VRAM,
-+ 0, 0x0000, &nv_crtc->cursor.nvbo);
-+ if (!ret) {
-+ ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM);
-+ if (!ret)
-+ ret = nouveau_bo_map(nv_crtc->cursor.nvbo);
-+ if (ret)
-+ nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo);
-+ }
-+
-+ if (ret)
-+ goto out;
-+
-+ ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM,
-+ 0, 0x0000, &nv_crtc->lut.nvbo);
-+ if (!ret) {
-+ ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM);
-+ if (!ret)
-+ ret = nouveau_bo_map(nv_crtc->lut.nvbo);
-+ if (ret)
-+ nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo);
-+ }
-+
-+ if (ret)
-+ goto out;
-+
-+ nvd0_crtc_lut_load(crtc);
-+
-+out:
-+ if (ret)
-+ nvd0_crtc_destroy(crtc);
-+ return ret;
-+}
-+
-+/******************************************************************************
-+ * DAC
-+ *****************************************************************************/
-+static void
-+nvd0_dac_dpms(struct drm_encoder *encoder, int mode)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct drm_device *dev = encoder->dev;
-+ int or = nv_encoder->or;
-+ u32 dpms_ctrl;
-+
-+ dpms_ctrl = 0x80000000;
-+ if (mode == DRM_MODE_DPMS_STANDBY || mode == DRM_MODE_DPMS_OFF)
-+ dpms_ctrl |= 0x00000001;
-+ if (mode == DRM_MODE_DPMS_SUSPEND || mode == DRM_MODE_DPMS_OFF)
-+ dpms_ctrl |= 0x00000004;
-+
-+ nv_wait(dev, 0x61a004 + (or * 0x0800), 0x80000000, 0x00000000);
-+ nv_mask(dev, 0x61a004 + (or * 0x0800), 0xc000007f, dpms_ctrl);
-+ nv_wait(dev, 0x61a004 + (or * 0x0800), 0x80000000, 0x00000000);
-+}
-+
-+static bool
-+nvd0_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
-+ struct drm_display_mode *adjusted_mode)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct nouveau_connector *nv_connector;
-+
-+ nv_connector = nouveau_encoder_connector_get(nv_encoder);
-+ if (nv_connector && nv_connector->native_mode) {
-+ if (nv_connector->scaling_mode != DRM_MODE_SCALE_NONE) {
-+ int id = adjusted_mode->base.id;
-+ *adjusted_mode = *nv_connector->native_mode;
-+ adjusted_mode->base.id = id;
-+ }
-+ }
-+
-+ return true;
-+}
-+
-+static void
-+nvd0_dac_prepare(struct drm_encoder *encoder)
-+{
-+}
-+
-+static void
-+nvd0_dac_commit(struct drm_encoder *encoder)
-+{
-+}
-+
-+static void
-+nvd0_dac_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
-+ struct drm_display_mode *adjusted_mode)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
-+ u32 *push;
-+
-+ nvd0_dac_dpms(encoder, DRM_MODE_DPMS_ON);
-+
-+ push = evo_wait(encoder->dev, 0, 4);
-+ if (push) {
-+ evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 2);
-+ evo_data(push, 1 << nv_crtc->index);
-+ evo_data(push, 0x00ff);
-+ evo_kick(push, encoder->dev, 0);
-+ }
-+
-+ nv_encoder->crtc = encoder->crtc;
-+}
-+
-+static void
-+nvd0_dac_disconnect(struct drm_encoder *encoder)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct drm_device *dev = encoder->dev;
-+ u32 *push;
-+
-+ if (nv_encoder->crtc) {
-+ nvd0_crtc_prepare(nv_encoder->crtc);
-+
-+ push = evo_wait(dev, 0, 4);
-+ if (push) {
-+ evo_mthd(push, 0x0180 + (nv_encoder->or * 0x20), 1);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ evo_kick(push, dev, 0);
-+ }
-+
-+ nv_encoder->crtc = NULL;
-+ }
-+}
-+
-+static enum drm_connector_status
-+nvd0_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
-+{
-+ enum drm_connector_status status = connector_status_disconnected;
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct drm_device *dev = encoder->dev;
-+ int or = nv_encoder->or;
-+ u32 load;
-+
-+ nv_wr32(dev, 0x61a00c + (or * 0x800), 0x00100000);
-+ udelay(9500);
-+ nv_wr32(dev, 0x61a00c + (or * 0x800), 0x80000000);
-+
-+ load = nv_rd32(dev, 0x61a00c + (or * 0x800));
-+ if ((load & 0x38000000) == 0x38000000)
-+ status = connector_status_connected;
-+
-+ nv_wr32(dev, 0x61a00c + (or * 0x800), 0x00000000);
-+ return status;
-+}
-+
-+static void
-+nvd0_dac_destroy(struct drm_encoder *encoder)
-+{
-+ drm_encoder_cleanup(encoder);
-+ kfree(encoder);
-+}
-+
-+static const struct drm_encoder_helper_funcs nvd0_dac_hfunc = {
-+ .dpms = nvd0_dac_dpms,
-+ .mode_fixup = nvd0_dac_mode_fixup,
-+ .prepare = nvd0_dac_prepare,
-+ .commit = nvd0_dac_commit,
-+ .mode_set = nvd0_dac_mode_set,
-+ .disable = nvd0_dac_disconnect,
-+ .get_crtc = nvd0_display_crtc_get,
-+ .detect = nvd0_dac_detect
-+};
-+
-+static const struct drm_encoder_funcs nvd0_dac_func = {
-+ .destroy = nvd0_dac_destroy,
-+};
-+
-+static int
-+nvd0_dac_create(struct drm_connector *connector, struct dcb_entry *dcbe)
-+{
-+ struct drm_device *dev = connector->dev;
-+ struct nouveau_encoder *nv_encoder;
-+ struct drm_encoder *encoder;
-+
-+ nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL);
-+ if (!nv_encoder)
-+ return -ENOMEM;
-+ nv_encoder->dcb = dcbe;
-+ nv_encoder->or = ffs(dcbe->or) - 1;
-+
-+ encoder = to_drm_encoder(nv_encoder);
-+ encoder->possible_crtcs = dcbe->heads;
-+ encoder->possible_clones = 0;
-+ drm_encoder_init(dev, encoder, &nvd0_dac_func, DRM_MODE_ENCODER_DAC);
-+ drm_encoder_helper_add(encoder, &nvd0_dac_hfunc);
-+
-+ drm_mode_connector_attach_encoder(connector, encoder);
-+ return 0;
-+}
-+
-+/******************************************************************************
-+ * SOR
-+ *****************************************************************************/
-+static void
-+nvd0_sor_dpms(struct drm_encoder *encoder, int mode)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct drm_device *dev = encoder->dev;
-+ struct drm_encoder *partner;
-+ int or = nv_encoder->or;
-+ u32 dpms_ctrl;
-+
-+ nv_encoder->last_dpms = mode;
-+
-+ list_for_each_entry(partner, &dev->mode_config.encoder_list, head) {
-+ struct nouveau_encoder *nv_partner = nouveau_encoder(partner);
-+
-+ if (partner->encoder_type != DRM_MODE_ENCODER_TMDS)
-+ continue;
-+
-+ if (nv_partner != nv_encoder &&
-+ nv_partner->dcb->or == nv_encoder->or) {
-+ if (nv_partner->last_dpms == DRM_MODE_DPMS_ON)
-+ return;
-+ break;
-+ }
-+ }
-+
-+ dpms_ctrl = (mode == DRM_MODE_DPMS_ON);
-+ dpms_ctrl |= 0x80000000;
-+
-+ nv_wait(dev, 0x61c004 + (or * 0x0800), 0x80000000, 0x00000000);
-+ nv_mask(dev, 0x61c004 + (or * 0x0800), 0x80000001, dpms_ctrl);
-+ nv_wait(dev, 0x61c004 + (or * 0x0800), 0x80000000, 0x00000000);
-+ nv_wait(dev, 0x61c030 + (or * 0x0800), 0x10000000, 0x00000000);
-+}
-+
-+static bool
-+nvd0_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
-+ struct drm_display_mode *adjusted_mode)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct nouveau_connector *nv_connector;
-+
-+ nv_connector = nouveau_encoder_connector_get(nv_encoder);
-+ if (nv_connector && nv_connector->native_mode) {
-+ if (nv_connector->scaling_mode != DRM_MODE_SCALE_NONE) {
-+ int id = adjusted_mode->base.id;
-+ *adjusted_mode = *nv_connector->native_mode;
-+ adjusted_mode->base.id = id;
-+ }
-+ }
-+
-+ return true;
-+}
-+
-+static void
-+nvd0_sor_prepare(struct drm_encoder *encoder)
-+{
-+}
-+
-+static void
-+nvd0_sor_commit(struct drm_encoder *encoder)
-+{
-+}
-+
-+static void
-+nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
-+ struct drm_display_mode *mode)
-+{
-+ struct drm_nouveau_private *dev_priv = encoder->dev->dev_private;
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
-+ struct nouveau_connector *nv_connector;
-+ struct nvbios *bios = &dev_priv->vbios;
-+ u32 mode_ctrl = (1 << nv_crtc->index);
-+ u32 *push, or_config;
-+
-+ nv_connector = nouveau_encoder_connector_get(nv_encoder);
-+ switch (nv_encoder->dcb->type) {
-+ case OUTPUT_TMDS:
-+ if (nv_encoder->dcb->sorconf.link & 1) {
-+ if (mode->clock < 165000)
-+ mode_ctrl |= 0x00000100;
-+ else
-+ mode_ctrl |= 0x00000500;
-+ } else {
-+ mode_ctrl |= 0x00000200;
-+ }
-+
-+ or_config = (mode_ctrl & 0x00000f00) >> 8;
-+ if (mode->clock >= 165000)
-+ or_config |= 0x0100;
-+ break;
-+ case OUTPUT_LVDS:
-+ or_config = (mode_ctrl & 0x00000f00) >> 8;
-+ if (bios->fp_no_ddc) {
-+ if (bios->fp.dual_link)
-+ or_config |= 0x0100;
-+ if (bios->fp.if_is_24bit)
-+ or_config |= 0x0200;
-+ } else {
-+ if (nv_connector->dcb->type == DCB_CONNECTOR_LVDS_SPWG) {
-+ if (((u8 *)nv_connector->edid)[121] == 2)
-+ or_config |= 0x0100;
-+ } else
-+ if (mode->clock >= bios->fp.duallink_transition_clk) {
-+ or_config |= 0x0100;
-+ }
-+
-+ if (or_config & 0x0100) {
-+ if (bios->fp.strapless_is_24bit & 2)
-+ or_config |= 0x0200;
-+ } else {
-+ if (bios->fp.strapless_is_24bit & 1)
-+ or_config |= 0x0200;
-+ }
-+
-+ if (nv_connector->base.display_info.bpc == 8)
-+ or_config |= 0x0200;
-+
-+ }
-+ break;
-+ default:
-+ BUG_ON(1);
-+ break;
-+ }
-+
-+ nvd0_sor_dpms(encoder, DRM_MODE_DPMS_ON);
-+
-+ push = evo_wait(encoder->dev, 0, 4);
-+ if (push) {
-+ evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 2);
-+ evo_data(push, mode_ctrl);
-+ evo_data(push, or_config);
-+ evo_kick(push, encoder->dev, 0);
-+ }
-+
-+ nv_encoder->crtc = encoder->crtc;
-+}
-+
-+static void
-+nvd0_sor_disconnect(struct drm_encoder *encoder)
-+{
-+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
-+ struct drm_device *dev = encoder->dev;
-+ u32 *push;
-+
-+ if (nv_encoder->crtc) {
-+ nvd0_crtc_prepare(nv_encoder->crtc);
-+
-+ push = evo_wait(dev, 0, 4);
-+ if (push) {
-+ evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 1);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x0080, 1);
-+ evo_data(push, 0x00000000);
-+ evo_kick(push, dev, 0);
-+ }
-+
-+ nv_encoder->crtc = NULL;
-+ nv_encoder->last_dpms = DRM_MODE_DPMS_OFF;
-+ }
-+}
-+
-+static void
-+nvd0_sor_destroy(struct drm_encoder *encoder)
-+{
-+ drm_encoder_cleanup(encoder);
-+ kfree(encoder);
-+}
-+
-+static const struct drm_encoder_helper_funcs nvd0_sor_hfunc = {
-+ .dpms = nvd0_sor_dpms,
-+ .mode_fixup = nvd0_sor_mode_fixup,
-+ .prepare = nvd0_sor_prepare,
-+ .commit = nvd0_sor_commit,
-+ .mode_set = nvd0_sor_mode_set,
-+ .disable = nvd0_sor_disconnect,
-+ .get_crtc = nvd0_display_crtc_get,
-+};
-+
-+static const struct drm_encoder_funcs nvd0_sor_func = {
-+ .destroy = nvd0_sor_destroy,
-+};
-+
-+static int
-+nvd0_sor_create(struct drm_connector *connector, struct dcb_entry *dcbe)
-+{
-+ struct drm_device *dev = connector->dev;
-+ struct nouveau_encoder *nv_encoder;
-+ struct drm_encoder *encoder;
-+
-+ nv_encoder = kzalloc(sizeof(*nv_encoder), GFP_KERNEL);
-+ if (!nv_encoder)
-+ return -ENOMEM;
-+ nv_encoder->dcb = dcbe;
-+ nv_encoder->or = ffs(dcbe->or) - 1;
-+ nv_encoder->last_dpms = DRM_MODE_DPMS_OFF;
-+
-+ encoder = to_drm_encoder(nv_encoder);
-+ encoder->possible_crtcs = dcbe->heads;
-+ encoder->possible_clones = 0;
-+ drm_encoder_init(dev, encoder, &nvd0_sor_func, DRM_MODE_ENCODER_TMDS);
-+ drm_encoder_helper_add(encoder, &nvd0_sor_hfunc);
-+
-+ drm_mode_connector_attach_encoder(connector, encoder);
-+ return 0;
-+}
-+
-+/******************************************************************************
-+ * IRQ
-+ *****************************************************************************/
-+static struct dcb_entry *
-+lookup_dcb(struct drm_device *dev, int id, u32 mc)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ int type, or, i;
-+
-+ if (id < 4) {
-+ type = OUTPUT_ANALOG;
-+ or = id;
-+ } else {
-+ switch (mc & 0x00000f00) {
-+ case 0x00000000: type = OUTPUT_LVDS; break;
-+ case 0x00000100: type = OUTPUT_TMDS; break;
-+ case 0x00000200: type = OUTPUT_TMDS; break;
-+ case 0x00000500: type = OUTPUT_TMDS; break;
-+ default:
-+ NV_ERROR(dev, "PDISP: unknown SOR mc 0x%08x\n", mc);
-+ return NULL;
-+ }
-+
-+ or = id - 4;
-+ }
-+
-+ for (i = 0; i < dev_priv->vbios.dcb.entries; i++) {
-+ struct dcb_entry *dcb = &dev_priv->vbios.dcb.entry[i];
-+ if (dcb->type == type && (dcb->or & (1 << or)))
-+ return dcb;
-+ }
-+
-+ NV_ERROR(dev, "PDISP: DCB for %d/0x%08x not found\n", id, mc);
-+ return NULL;
-+}
-+
-+static void
-+nvd0_display_unk1_handler(struct drm_device *dev, u32 crtc, u32 mask)
-+{
-+ struct dcb_entry *dcb;
-+ int i;
-+
-+ for (i = 0; mask && i < 8; i++) {
-+ u32 mcc = nv_rd32(dev, 0x640180 + (i * 0x20));
-+ if (!(mcc & (1 << crtc)))
-+ continue;
-+
-+ dcb = lookup_dcb(dev, i, mcc);
-+ if (!dcb)
-+ continue;
-+
-+ nouveau_bios_run_display_table(dev, 0x0000, -1, dcb, crtc);
-+ }
-+
-+ nv_wr32(dev, 0x6101d4, 0x00000000);
-+ nv_wr32(dev, 0x6109d4, 0x00000000);
-+ nv_wr32(dev, 0x6101d0, 0x80000000);
-+}
-+
-+static void
-+nvd0_display_unk2_handler(struct drm_device *dev, u32 crtc, u32 mask)
-+{
-+ struct dcb_entry *dcb;
-+ u32 or, tmp, pclk;
-+ int i;
-+
-+ for (i = 0; mask && i < 8; i++) {
-+ u32 mcc = nv_rd32(dev, 0x640180 + (i * 0x20));
-+ if (!(mcc & (1 << crtc)))
-+ continue;
-+
-+ dcb = lookup_dcb(dev, i, mcc);
-+ if (!dcb)
-+ continue;
-+
-+ nouveau_bios_run_display_table(dev, 0x0000, -2, dcb, crtc);
-+ }
-+
-+ pclk = nv_rd32(dev, 0x660450 + (crtc * 0x300)) / 1000;
-+ if (mask & 0x00010000) {
-+ nv50_crtc_set_clock(dev, crtc, pclk);
-+ }
-+
-+ for (i = 0; mask && i < 8; i++) {
-+ u32 mcp = nv_rd32(dev, 0x660180 + (i * 0x20));
-+ u32 cfg = nv_rd32(dev, 0x660184 + (i * 0x20));
-+ if (!(mcp & (1 << crtc)))
-+ continue;
-+
-+ dcb = lookup_dcb(dev, i, mcp);
-+ if (!dcb)
-+ continue;
-+ or = ffs(dcb->or) - 1;
-+
-+ nouveau_bios_run_display_table(dev, cfg, pclk, dcb, crtc);
-+
-+ nv_wr32(dev, 0x612200 + (crtc * 0x800), 0x00000000);
-+ switch (dcb->type) {
-+ case OUTPUT_ANALOG:
-+ nv_wr32(dev, 0x612280 + (or * 0x800), 0x00000000);
-+ break;
-+ case OUTPUT_TMDS:
-+ case OUTPUT_LVDS:
-+ if (cfg & 0x00000100)
-+ tmp = 0x00000101;
-+ else
-+ tmp = 0x00000000;
-+
-+ nv_mask(dev, 0x612300 + (or * 0x800), 0x00000707, tmp);
-+ break;
-+ default:
-+ break;
-+ }
-+
-+ break;
-+ }
-+
-+ nv_wr32(dev, 0x6101d4, 0x00000000);
-+ nv_wr32(dev, 0x6109d4, 0x00000000);
-+ nv_wr32(dev, 0x6101d0, 0x80000000);
-+}
-+
-+static void
-+nvd0_display_unk4_handler(struct drm_device *dev, u32 crtc, u32 mask)
-+{
-+ struct dcb_entry *dcb;
-+ int pclk, i;
-+
-+ pclk = nv_rd32(dev, 0x660450 + (crtc * 0x300)) / 1000;
-+
-+ for (i = 0; mask && i < 8; i++) {
-+ u32 mcp = nv_rd32(dev, 0x660180 + (i * 0x20));
-+ u32 cfg = nv_rd32(dev, 0x660184 + (i * 0x20));
-+ if (!(mcp & (1 << crtc)))
-+ continue;
-+
-+ dcb = lookup_dcb(dev, i, mcp);
-+ if (!dcb)
-+ continue;
-+
-+ nouveau_bios_run_display_table(dev, cfg, -pclk, dcb, crtc);
-+ }
-+
-+ nv_wr32(dev, 0x6101d4, 0x00000000);
-+ nv_wr32(dev, 0x6109d4, 0x00000000);
-+ nv_wr32(dev, 0x6101d0, 0x80000000);
-+}
-+
-+static void
-+nvd0_display_bh(unsigned long data)
-+{
-+ struct drm_device *dev = (struct drm_device *)data;
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ u32 mask, crtc;
-+ int i;
-+
-+ if (drm_debug & (DRM_UT_DRIVER | DRM_UT_KMS)) {
-+ NV_INFO(dev, "PDISP: modeset req %d\n", disp->modeset);
-+ NV_INFO(dev, " STAT: 0x%08x 0x%08x 0x%08x\n",
-+ nv_rd32(dev, 0x6101d0),
-+ nv_rd32(dev, 0x6101d4), nv_rd32(dev, 0x6109d4));
-+ for (i = 0; i < 8; i++) {
-+ NV_INFO(dev, " %s%d: 0x%08x 0x%08x\n",
-+ i < 4 ? "DAC" : "SOR", i,
-+ nv_rd32(dev, 0x640180 + (i * 0x20)),
-+ nv_rd32(dev, 0x660180 + (i * 0x20)));
-+ }
-+ }
-+
-+ mask = nv_rd32(dev, 0x6101d4);
-+ crtc = 0;
-+ if (!mask) {
-+ mask = nv_rd32(dev, 0x6109d4);
-+ crtc = 1;
-+ }
-+
-+ if (disp->modeset & 0x00000001)
-+ nvd0_display_unk1_handler(dev, crtc, mask);
-+ if (disp->modeset & 0x00000002)
-+ nvd0_display_unk2_handler(dev, crtc, mask);
-+ if (disp->modeset & 0x00000004)
-+ nvd0_display_unk4_handler(dev, crtc, mask);
-+}
-+
-+static void
-+nvd0_display_intr(struct drm_device *dev)
-+{
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ u32 intr = nv_rd32(dev, 0x610088);
-+
-+ if (intr & 0x00000002) {
-+ u32 stat = nv_rd32(dev, 0x61009c);
-+ int chid = ffs(stat) - 1;
-+ if (chid >= 0) {
-+ u32 mthd = nv_rd32(dev, 0x6101f0 + (chid * 12));
-+ u32 data = nv_rd32(dev, 0x6101f4 + (chid * 12));
-+ u32 unkn = nv_rd32(dev, 0x6101f8 + (chid * 12));
-+
-+ NV_INFO(dev, "EvoCh: chid %d mthd 0x%04x data 0x%08x "
-+ "0x%08x 0x%08x\n",
-+ chid, (mthd & 0x0000ffc), data, mthd, unkn);
-+ nv_wr32(dev, 0x61009c, (1 << chid));
-+ nv_wr32(dev, 0x6101f0 + (chid * 12), 0x90000000);
-+ }
-+
-+ intr &= ~0x00000002;
-+ }
-+
-+ if (intr & 0x00100000) {
-+ u32 stat = nv_rd32(dev, 0x6100ac);
-+
-+ if (stat & 0x00000007) {
-+ disp->modeset = stat;
-+ tasklet_schedule(&disp->tasklet);
-+
-+ nv_wr32(dev, 0x6100ac, (stat & 0x00000007));
-+ stat &= ~0x00000007;
-+ }
-+
-+ if (stat) {
-+ NV_INFO(dev, "PDISP: unknown intr24 0x%08x\n", stat);
-+ nv_wr32(dev, 0x6100ac, stat);
-+ }
-+
-+ intr &= ~0x00100000;
-+ }
-+
-+ if (intr & 0x01000000) {
-+ u32 stat = nv_rd32(dev, 0x6100bc);
-+ nv_wr32(dev, 0x6100bc, stat);
-+ intr &= ~0x01000000;
-+ }
-+
-+ if (intr & 0x02000000) {
-+ u32 stat = nv_rd32(dev, 0x6108bc);
-+ nv_wr32(dev, 0x6108bc, stat);
-+ intr &= ~0x02000000;
-+ }
-+
-+ if (intr)
-+ NV_INFO(dev, "PDISP: unknown intr 0x%08x\n", intr);
-+}
-+
-+/******************************************************************************
-+ * Init
-+ *****************************************************************************/
-+static void
-+nvd0_display_fini(struct drm_device *dev)
-+{
-+ int i;
-+
-+ /* fini cursors */
-+ for (i = 14; i >= 13; i--) {
-+ if (!(nv_rd32(dev, 0x610490 + (i * 0x10)) & 0x00000001))
-+ continue;
-+
-+ nv_mask(dev, 0x610490 + (i * 0x10), 0x00000001, 0x00000000);
-+ nv_wait(dev, 0x610490 + (i * 0x10), 0x00010000, 0x00000000);
-+ nv_mask(dev, 0x610090, 1 << i, 0x00000000);
-+ nv_mask(dev, 0x6100a0, 1 << i, 0x00000000);
-+ }
-+
-+ /* fini master */
-+ if (nv_rd32(dev, 0x610490) & 0x00000010) {
-+ nv_mask(dev, 0x610490, 0x00000010, 0x00000000);
-+ nv_mask(dev, 0x610490, 0x00000003, 0x00000000);
-+ nv_wait(dev, 0x610490, 0x80000000, 0x00000000);
-+ nv_mask(dev, 0x610090, 0x00000001, 0x00000000);
-+ nv_mask(dev, 0x6100a0, 0x00000001, 0x00000000);
-+ }
-+}
-+
-+int
-+nvd0_display_init(struct drm_device *dev)
-+{
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ u32 *push;
-+ int i;
-+
-+ if (nv_rd32(dev, 0x6100ac) & 0x00000100) {
-+ nv_wr32(dev, 0x6100ac, 0x00000100);
-+ nv_mask(dev, 0x6194e8, 0x00000001, 0x00000000);
-+ if (!nv_wait(dev, 0x6194e8, 0x00000002, 0x00000000)) {
-+ NV_ERROR(dev, "PDISP: 0x6194e8 0x%08x\n",
-+ nv_rd32(dev, 0x6194e8));
-+ return -EBUSY;
-+ }
-+ }
-+
-+ /* nfi what these are exactly, i do know that SOR_MODE_CTRL won't
-+ * work at all unless you do the SOR part below.
-+ */
-+ for (i = 0; i < 3; i++) {
-+ u32 dac = nv_rd32(dev, 0x61a000 + (i * 0x800));
-+ nv_wr32(dev, 0x6101c0 + (i * 0x800), dac);
-+ }
-+
-+ for (i = 0; i < 4; i++) {
-+ u32 sor = nv_rd32(dev, 0x61c000 + (i * 0x800));
-+ nv_wr32(dev, 0x6301c4 + (i * 0x800), sor);
-+ }
-+
-+ for (i = 0; i < 2; i++) {
-+ u32 crtc0 = nv_rd32(dev, 0x616104 + (i * 0x800));
-+ u32 crtc1 = nv_rd32(dev, 0x616108 + (i * 0x800));
-+ u32 crtc2 = nv_rd32(dev, 0x61610c + (i * 0x800));
-+ nv_wr32(dev, 0x6101b4 + (i * 0x800), crtc0);
-+ nv_wr32(dev, 0x6101b8 + (i * 0x800), crtc1);
-+ nv_wr32(dev, 0x6101bc + (i * 0x800), crtc2);
-+ }
-+
-+ /* point at our hash table / objects, enable interrupts */
-+ nv_wr32(dev, 0x610010, (disp->mem->vinst >> 8) | 9);
-+ nv_mask(dev, 0x6100b0, 0x00000307, 0x00000307);
-+
-+ /* init master */
-+ nv_wr32(dev, 0x610494, (disp->evo[0].handle >> 8) | 3);
-+ nv_wr32(dev, 0x610498, 0x00010000);
-+ nv_wr32(dev, 0x61049c, 0x00000001);
-+ nv_mask(dev, 0x610490, 0x00000010, 0x00000010);
-+ nv_wr32(dev, 0x640000, 0x00000000);
-+ nv_wr32(dev, 0x610490, 0x01000013);
-+ if (!nv_wait(dev, 0x610490, 0x80000000, 0x00000000)) {
-+ NV_ERROR(dev, "PDISP: master 0x%08x\n",
-+ nv_rd32(dev, 0x610490));
-+ return -EBUSY;
-+ }
-+ nv_mask(dev, 0x610090, 0x00000001, 0x00000001);
-+ nv_mask(dev, 0x6100a0, 0x00000001, 0x00000001);
-+
-+ /* init cursors */
-+ for (i = 13; i <= 14; i++) {
-+ nv_wr32(dev, 0x610490 + (i * 0x10), 0x00000001);
-+ if (!nv_wait(dev, 0x610490 + (i * 0x10), 0x00010000, 0x00010000)) {
-+ NV_ERROR(dev, "PDISP: curs%d 0x%08x\n", i,
-+ nv_rd32(dev, 0x610490 + (i * 0x10)));
-+ return -EBUSY;
-+ }
-+
-+ nv_mask(dev, 0x610090, 1 << i, 1 << i);
-+ nv_mask(dev, 0x6100a0, 1 << i, 1 << i);
-+ }
-+
-+ push = evo_wait(dev, 0, 32);
-+ if (!push)
-+ return -EBUSY;
-+ evo_mthd(push, 0x0088, 1);
-+ evo_data(push, NvEvoSync);
-+ evo_mthd(push, 0x0084, 1);
-+ evo_data(push, 0x00000000);
-+ evo_mthd(push, 0x0084, 1);
-+ evo_data(push, 0x80000000);
-+ evo_mthd(push, 0x008c, 1);
-+ evo_data(push, 0x00000000);
-+ evo_kick(push, dev, 0);
-+
-+ return 0;
-+}
-+
-+void
-+nvd0_display_destroy(struct drm_device *dev)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nvd0_display *disp = nvd0_display(dev);
-+ struct pci_dev *pdev = dev->pdev;
-+
-+ nvd0_display_fini(dev);
-+
-+ pci_free_consistent(pdev, PAGE_SIZE, disp->evo[0].ptr, disp->evo[0].handle);
-+ nouveau_gpuobj_ref(NULL, &disp->mem);
-+ nouveau_irq_unregister(dev, 26);
-+
-+ dev_priv->engine.display.priv = NULL;
-+ kfree(disp);
-+}
-+
-+int
-+nvd0_display_create(struct drm_device *dev)
-+{
-+ struct drm_nouveau_private *dev_priv = dev->dev_private;
-+ struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem;
-+ struct dcb_table *dcb = &dev_priv->vbios.dcb;
-+ struct drm_connector *connector, *tmp;
-+ struct pci_dev *pdev = dev->pdev;
-+ struct nvd0_display *disp;
-+ struct dcb_entry *dcbe;
-+ int ret, i;
-+
-+ disp = kzalloc(sizeof(*disp), GFP_KERNEL);
-+ if (!disp)
-+ return -ENOMEM;
-+ dev_priv->engine.display.priv = disp;
-+
-+ /* create crtc objects to represent the hw heads */
-+ for (i = 0; i < 2; i++) {
-+ ret = nvd0_crtc_create(dev, i);
-+ if (ret)
-+ goto out;
-+ }
-+
-+ /* create encoder/connector objects based on VBIOS DCB table */
-+ for (i = 0, dcbe = &dcb->entry[0]; i < dcb->entries; i++, dcbe++) {
-+ connector = nouveau_connector_create(dev, dcbe->connector);
-+ if (IS_ERR(connector))
-+ continue;
-+
-+ if (dcbe->location != DCB_LOC_ON_CHIP) {
-+ NV_WARN(dev, "skipping off-chip encoder %d/%d\n",
-+ dcbe->type, ffs(dcbe->or) - 1);
-+ continue;
-+ }
-+
-+ switch (dcbe->type) {
-+ case OUTPUT_TMDS:
-+ case OUTPUT_LVDS:
-+ nvd0_sor_create(connector, dcbe);
-+ break;
-+ case OUTPUT_ANALOG:
-+ nvd0_dac_create(connector, dcbe);
-+ break;
-+ default:
-+ NV_WARN(dev, "skipping unsupported encoder %d/%d\n",
-+ dcbe->type, ffs(dcbe->or) - 1);
-+ continue;
-+ }
-+ }
-+
-+ /* cull any connectors we created that don't have an encoder */
-+ list_for_each_entry_safe(connector, tmp, &dev->mode_config.connector_list, head) {
-+ if (connector->encoder_ids[0])
-+ continue;
-+
-+ NV_WARN(dev, "%s has no encoders, removing\n",
-+ drm_get_connector_name(connector));
-+ connector->funcs->destroy(connector);
-+ }
-+
-+ /* setup interrupt handling */
-+ tasklet_init(&disp->tasklet, nvd0_display_bh, (unsigned long)dev);
-+ nouveau_irq_register(dev, 26, nvd0_display_intr);
-+
-+ /* hash table and dma objects for the memory areas we care about */
-+ ret = nouveau_gpuobj_new(dev, NULL, 0x4000, 0x10000,
-+ NVOBJ_FLAG_ZERO_ALLOC, &disp->mem);
-+ if (ret)
-+ goto out;
-+
-+ nv_wo32(disp->mem, 0x1000, 0x00000049);
-+ nv_wo32(disp->mem, 0x1004, (disp->mem->vinst + 0x2000) >> 8);
-+ nv_wo32(disp->mem, 0x1008, (disp->mem->vinst + 0x2fff) >> 8);
-+ nv_wo32(disp->mem, 0x100c, 0x00000000);
-+ nv_wo32(disp->mem, 0x1010, 0x00000000);
-+ nv_wo32(disp->mem, 0x1014, 0x00000000);
-+ nv_wo32(disp->mem, 0x0000, NvEvoSync);
-+ nv_wo32(disp->mem, 0x0004, (0x1000 << 9) | 0x00000001);
-+
-+ nv_wo32(disp->mem, 0x1020, 0x00000049);
-+ nv_wo32(disp->mem, 0x1024, 0x00000000);
-+ nv_wo32(disp->mem, 0x1028, (dev_priv->vram_size - 1) >> 8);
-+ nv_wo32(disp->mem, 0x102c, 0x00000000);
-+ nv_wo32(disp->mem, 0x1030, 0x00000000);
-+ nv_wo32(disp->mem, 0x1034, 0x00000000);
-+ nv_wo32(disp->mem, 0x0008, NvEvoVRAM);
-+ nv_wo32(disp->mem, 0x000c, (0x1020 << 9) | 0x00000001);
-+
-+ nv_wo32(disp->mem, 0x1040, 0x00000009);
-+ nv_wo32(disp->mem, 0x1044, 0x00000000);
-+ nv_wo32(disp->mem, 0x1048, (dev_priv->vram_size - 1) >> 8);
-+ nv_wo32(disp->mem, 0x104c, 0x00000000);
-+ nv_wo32(disp->mem, 0x1050, 0x00000000);
-+ nv_wo32(disp->mem, 0x1054, 0x00000000);
-+ nv_wo32(disp->mem, 0x0010, NvEvoVRAM_LP);
-+ nv_wo32(disp->mem, 0x0014, (0x1040 << 9) | 0x00000001);
-+
-+ nv_wo32(disp->mem, 0x1060, 0x0fe00009);
-+ nv_wo32(disp->mem, 0x1064, 0x00000000);
-+ nv_wo32(disp->mem, 0x1068, (dev_priv->vram_size - 1) >> 8);
-+ nv_wo32(disp->mem, 0x106c, 0x00000000);
-+ nv_wo32(disp->mem, 0x1070, 0x00000000);
-+ nv_wo32(disp->mem, 0x1074, 0x00000000);
-+ nv_wo32(disp->mem, 0x0018, NvEvoFB32);
-+ nv_wo32(disp->mem, 0x001c, (0x1060 << 9) | 0x00000001);
-+
-+ pinstmem->flush(dev);
-+
-+ /* push buffers for evo channels */
-+ disp->evo[0].ptr =
-+ pci_alloc_consistent(pdev, PAGE_SIZE, &disp->evo[0].handle);
-+ if (!disp->evo[0].ptr) {
-+ ret = -ENOMEM;
-+ goto out;
-+ }
-+
-+ ret = nvd0_display_init(dev);
-+ if (ret)
-+ goto out;
-+
-+out:
-+ if (ret)
-+ nvd0_display_destroy(dev);
-+ return ret;
-+}
diff --git a/freed-ora/current/master/epoll-fix-spurious-lockdep-warnings.patch b/freed-ora/current/master/epoll-fix-spurious-lockdep-warnings.patch
deleted file mode 100644
index c163a86d7..000000000
--- a/freed-ora/current/master/epoll-fix-spurious-lockdep-warnings.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-epoll can acquire multiple ep->mutex on multiple "struct eventpoll"s
-at once in the case where one epoll fd is monitoring another epoll
-fd. This is perfectly OK, since we're careful about the lock ordering,
-but causes spurious lockdep warnings. Annotate the recursion using
-mutex_lock_nested, and add a comment explaining the nesting rules for
-good measure.
-
-Reported-by: Paul Bolle <pebolle@tiscali.nl>
-Signed-off-by: Nelson Elhage <nelhage@nelhage.com>
----
- I've tested this on a synthetic epoll test case, that just adds e1 to
- e2 and then does an epoll_wait(). I verified that it caused lockdep
- problems on 3.0 and that this patch fixed it, but I haven't done more
- extensive testing. Paul, are you able to test systemd against this?
-
- fs/eventpoll.c | 25 ++++++++++++++++++-------
- 1 files changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/fs/eventpoll.c b/fs/eventpoll.c
-index f9cfd16..0cb7bc6 100644
---- a/fs/eventpoll.c
-+++ b/fs/eventpoll.c
-@@ -76,6 +76,15 @@
- * Events that require holding "epmutex" are very rare, while for
- * normal operations the epoll private "ep->mtx" will guarantee
- * a better scalability.
-+ * It is possible to acquire multiple "ep->mtx"es at once in the case
-+ * when one epoll fd is added to another. In this case, we always
-+ * acquire the locks in the order of nesting (i.e. after epoll_ctl(e1,
-+ * EPOLL_CTL_ADD, e2), e1->mtx will always be acquired before
-+ * e2->mtx). Since we disallow cycles of epoll file descriptors, this
-+ * ensures that the mutexes are well-ordered. In order to communicate
-+ * this nesting to lockdep, when walking a tree of epoll file
-+ * descriptors, we use the current recursion depth as the lockdep
-+ * subkey.
- */
-
- /* Epoll private bits inside the event mask */
-@@ -464,13 +473,15 @@ static void ep_unregister_pollwait(struct eventpoll *ep, struct epitem *epi)
- * @ep: Pointer to the epoll private data structure.
- * @sproc: Pointer to the scan callback.
- * @priv: Private opaque data passed to the @sproc callback.
-+ * @depth: The current depth of recursive f_op->poll calls.
- *
- * Returns: The same integer error code returned by the @sproc callback.
- */
- static int ep_scan_ready_list(struct eventpoll *ep,
- int (*sproc)(struct eventpoll *,
- struct list_head *, void *),
-- void *priv)
-+ void *priv,
-+ int depth)
- {
- int error, pwake = 0;
- unsigned long flags;
-@@ -481,7 +492,7 @@ static int ep_scan_ready_list(struct eventpoll *ep,
- * We need to lock this because we could be hit by
- * eventpoll_release_file() and epoll_ctl().
- */
-- mutex_lock(&ep->mtx);
-+ mutex_lock_nested(&ep->mtx, depth);
-
- /*
- * Steal the ready list, and re-init the original one to the
-@@ -670,7 +681,7 @@ static int ep_read_events_proc(struct eventpoll *ep, struct list_head *head,
-
- static int ep_poll_readyevents_proc(void *priv, void *cookie, int call_nests)
- {
-- return ep_scan_ready_list(priv, ep_read_events_proc, NULL);
-+ return ep_scan_ready_list(priv, ep_read_events_proc, NULL, call_nests + 1);
- }
-
- static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait)
-@@ -737,7 +748,7 @@ void eventpoll_release_file(struct file *file)
-
- ep = epi->ep;
- list_del_init(&epi->fllink);
-- mutex_lock(&ep->mtx);
-+ mutex_lock_nested(&ep->mtx, 0);
- ep_remove(ep, epi);
- mutex_unlock(&ep->mtx);
- }
-@@ -1134,7 +1145,7 @@ static int ep_send_events(struct eventpoll *ep,
- esed.maxevents = maxevents;
- esed.events = events;
-
-- return ep_scan_ready_list(ep, ep_send_events_proc, &esed);
-+ return ep_scan_ready_list(ep, ep_send_events_proc, &esed, 0);
- }
-
- static inline struct timespec ep_set_mstimeout(long ms)
-@@ -1267,7 +1278,7 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
- struct rb_node *rbp;
- struct epitem *epi;
-
-- mutex_lock(&ep->mtx);
-+ mutex_lock_nested(&ep->mtx, call_nests + 1);
- for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) {
- epi = rb_entry(rbp, struct epitem, rbn);
- if (unlikely(is_file_epoll(epi->ffd.file))) {
-@@ -1409,7 +1420,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
- }
-
-
-- mutex_lock(&ep->mtx);
-+ mutex_lock_nested(&ep->mtx, 0);
-
- /*
- * Try to lookup the file inside our RB tree, Since we grabbed "mtx"
---
-1.7.4.1
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/freed-ora/current/master/epoll-limit-paths.patch b/freed-ora/current/master/epoll-limit-paths.patch
index 440db27b9..4ed306af4 100644
--- a/freed-ora/current/master/epoll-limit-paths.patch
+++ b/freed-ora/current/master/epoll-limit-paths.patch
@@ -1,4 +1,4 @@
-From 6a4ca79652219cf22da800d990e5b46feaea1ad9 Mon Sep 17 00:00:00 2001
+From 0a6cc45426fe3baaf231efd7efe4300fd879efc8 Mon Sep 17 00:00:00 2001
From: Jason Baron <jbaron@redhat.com>
Date: Mon, 24 Oct 2011 14:59:02 +1100
Subject: [PATCH] epoll: limit paths
@@ -91,7 +91,7 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 files changed, 203 insertions(+), 25 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
-index 4a53743..414ac74 100644
+index b84fad9..414ac74 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -197,6 +197,12 @@ struct eventpoll {
@@ -137,7 +137,7 @@ index 4a53743..414ac74 100644
.llseek = noop_llseek,
};
--/* Fast test to see if the file is an evenpoll file */
+-/* Fast test to see if the file is an eventpoll file */
-static inline int is_file_epoll(struct file *f)
-{
- return f->f_op == &eventpoll_fops;
@@ -449,7 +449,7 @@ index f362733..657ab55 100644
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 277f497..93778e0 100644
+index ba98668..d393a68 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -985,6 +985,7 @@ struct file {
diff --git a/freed-ora/current/master/find-provides b/freed-ora/current/master/find-provides
deleted file mode 100755
index b28d1028f..000000000
--- a/freed-ora/current/master/find-provides
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-#
-# find-provides: munge the provides dependencies from the kabideps file
-#
-# This software may be freely redistributed under the terms of the GNU
-# General Public License (GPL).
-#
-# Takes a directory prefix, then outputs the kabideps file contents.
-
-__author__ = "Jon Masters <jcm@redhat.com>"
-__version__ = "1.0"
-__date__ = "Tue 25 Jul 2006 04:00 GMT"
-__copyright__ = "Copyright (C) 2006 Red Hat, Inc"
-__license__ = "GPL"
-
-import os
-import re
-import string
-import sys
-
-false = 0
-true = 1
-
-kabideps=""
-
-p = re.compile('^(.*)/symvers-(.*).gz$')
-while true:
- foo = sys.stdin.readline()
- if foo == "":
- break
- string.split(foo)
- m = p.match(foo)
- if m:
- kabideps=sys.argv[1] + "/kernel-" + m.group(2) + "-kabideps"
-
-if kabideps == "":
- sys.exit(0)
-
-if not (os.path.isfile(kabideps)):
- sys.stderr.write(sys.argv[0] + ": cannot locate kabideps file: " + kabideps + "\n")
- sys.exit(1)
-
-sys.stderr.write(sys.argv[0] + ": processing kABI: " + kabideps)
-os.system("cat " + kabideps)
diff --git a/freed-ora/current/master/floppy-Remove-_hlt-related-functions.patch b/freed-ora/current/master/floppy-Remove-_hlt-related-functions.patch
new file mode 100644
index 000000000..75609ddae
--- /dev/null
+++ b/freed-ora/current/master/floppy-Remove-_hlt-related-functions.patch
@@ -0,0 +1,107 @@
+From 5c21b39ab123ada8ce248efc733420bd8c9ea255 Mon Sep 17 00:00:00 2001
+From: Josh Boyer <jwboyer@redhat.com>
+Date: Fri, 28 Oct 2011 15:38:06 -0400
+Subject: [PATCH] floppy: Remove _hlt related functions
+
+It's close enough to 2012 and the WARN_ONCE is causing things like abrt to
+auto-file bugs that aren't really bugs.
+
+Signed-off-by: Josh Boyer <jwboyer@redhat.com>
+
+diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
+index d5ac362..df1e87c 100644
+--- a/Documentation/feature-removal-schedule.txt
++++ b/Documentation/feature-removal-schedule.txt
+@@ -6,14 +6,6 @@ be removed from this file.
+
+ ---------------------------
+
+-What: x86 floppy disable_hlt
+-When: 2012
+-Why: ancient workaround of dubious utility clutters the
+- code used by everybody else.
+-Who: Len Brown <len.brown@intel.com>
+-
+----------------------------
+-
+ What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
+ When: 2012
+ Why: This optional sub-feature of APM is of dubious reliability,
+diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
+index 9955a53..40bf4c2 100644
+--- a/drivers/block/floppy.c
++++ b/drivers/block/floppy.c
+@@ -1032,37 +1032,6 @@ static int fd_wait_for_completion(unsigned long delay, timeout_fn function)
+ return 0;
+ }
+
+-static DEFINE_SPINLOCK(floppy_hlt_lock);
+-static int hlt_disabled;
+-static void floppy_disable_hlt(void)
+-{
+- unsigned long flags;
+-
+- WARN_ONCE(1, "floppy_disable_hlt() scheduled for removal in 2012");
+- spin_lock_irqsave(&floppy_hlt_lock, flags);
+- if (!hlt_disabled) {
+- hlt_disabled = 1;
+-#ifdef HAVE_DISABLE_HLT
+- disable_hlt();
+-#endif
+- }
+- spin_unlock_irqrestore(&floppy_hlt_lock, flags);
+-}
+-
+-static void floppy_enable_hlt(void)
+-{
+- unsigned long flags;
+-
+- spin_lock_irqsave(&floppy_hlt_lock, flags);
+- if (hlt_disabled) {
+- hlt_disabled = 0;
+-#ifdef HAVE_DISABLE_HLT
+- enable_hlt();
+-#endif
+- }
+- spin_unlock_irqrestore(&floppy_hlt_lock, flags);
+-}
+-
+ static void setup_DMA(void)
+ {
+ unsigned long f;
+@@ -1107,7 +1076,6 @@ static void setup_DMA(void)
+ fd_enable_dma();
+ release_dma_lock(f);
+ #endif
+- floppy_disable_hlt();
+ }
+
+ static void show_floppy(void);
+@@ -1709,7 +1677,6 @@ irqreturn_t floppy_interrupt(int irq, void *dev_id)
+ fd_disable_dma();
+ release_dma_lock(f);
+
+- floppy_enable_hlt();
+ do_floppy = NULL;
+ if (fdc >= N_FDC || FDCS->address == -1) {
+ /* we don't even know which FDC is the culprit */
+@@ -1858,8 +1825,6 @@ static void floppy_shutdown(unsigned long data)
+ show_floppy();
+ cancel_activity();
+
+- floppy_enable_hlt();
+-
+ flags = claim_dma_lock();
+ fd_disable_dma();
+ release_dma_lock(flags);
+@@ -4504,7 +4469,6 @@ static void floppy_release_irq_and_dma(void)
+ #if N_FDC > 1
+ set_dor(1, ~8, 0);
+ #endif
+- floppy_enable_hlt();
+
+ if (floppy_track_buffer && max_buffer_sectors) {
+ tmpsize = max_buffer_sectors * 1024;
+--
+1.7.6.4
+
diff --git a/freed-ora/current/master/genkey b/freed-ora/current/master/genkey
deleted file mode 100644
index 49c6ce8be..000000000
--- a/freed-ora/current/master/genkey
+++ /dev/null
@@ -1,7 +0,0 @@
-%pubring kernel.pub
-%secring kernel.sec
-Key-Type: DSA
-Key-Length: 512
-Name-Real: Red Hat, Inc.
-Name-Comment: Kernel Module GPG key
-%commit
diff --git a/freed-ora/current/master/git-linus.diff b/freed-ora/current/master/git-linus.diff
deleted file mode 100644
index e69de29bb..000000000
--- a/freed-ora/current/master/git-linus.diff
+++ /dev/null
diff --git a/freed-ora/current/master/hvcs_pi_buf_alloc.patch b/freed-ora/current/master/hvcs_pi_buf_alloc.patch
deleted file mode 100644
index ecabe49b1..000000000
--- a/freed-ora/current/master/hvcs_pi_buf_alloc.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-
-The Power platform requires the partner info buffer to be page aligned
-otherwise it will fail the partner info hcall with H_PARAMETER. Switch
-from using kmalloc to allocate this buffer to __get_free_page to ensure
-page alignment.
-
-Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
----
-
- drivers/tty/hvc/hvcs.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff -puN drivers/tty/hvc/hvcs.c~hvcs_pi_buf_alloc drivers/tty/hvc/hvcs.c
---- linux-2.6/drivers/tty/hvc/hvcs.c~hvcs_pi_buf_alloc 2011-09-09 16:00:25.000000000 -0500
-+++ linux-2.6-bjking1/drivers/tty/hvc/hvcs.c 2011-09-09 16:07:08.000000000 -0500
-@@ -1532,7 +1532,7 @@ static int __devinit hvcs_initialize(voi
- goto register_fail;
- }
-
-- hvcs_pi_buff = kmalloc(PAGE_SIZE, GFP_KERNEL);
-+ hvcs_pi_buff = (unsigned long *) __get_free_page(GFP_KERNEL);
- if (!hvcs_pi_buff) {
- rc = -ENOMEM;
- goto buff_alloc_fail;
-@@ -1548,7 +1548,7 @@ static int __devinit hvcs_initialize(voi
- return 0;
-
- kthread_fail:
-- kfree(hvcs_pi_buff);
-+ free_page((unsigned long)hvcs_pi_buff);
- buff_alloc_fail:
- tty_unregister_driver(hvcs_tty_driver);
- register_fail:
-@@ -1597,7 +1597,7 @@ static void __exit hvcs_module_exit(void
- kthread_stop(hvcs_task);
-
- spin_lock(&hvcs_pi_lock);
-- kfree(hvcs_pi_buff);
-+ free_page((unsigned long)hvcs_pi_buff);
- hvcs_pi_buff = NULL;
- spin_unlock(&hvcs_pi_lock);
-
-_
diff --git a/freed-ora/current/master/iwlagn-fix-ht_params-NULL-pointer-dereference.patch b/freed-ora/current/master/iwlagn-fix-ht_params-NULL-pointer-dereference.patch
deleted file mode 100644
index 4dcf490bb..000000000
--- a/freed-ora/current/master/iwlagn-fix-ht_params-NULL-pointer-dereference.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-This fix regression introduced by commit:
-
-commit 15b3f3b006b42a678523cad989bfd60b76bf4403
-Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-Date: Fri Jun 3 07:54:13 2011 -0700
-
- iwlagn: set smps mode after assoc for 1000 device
-
-Also remove unneeded brackets on the way.
-
-Address:
-https://bugzilla.redhat.com/show_bug.cgi?id=744155
-
-If fix will not get 3.1 release, it should be applied in 3.1 stable.
-
-Cc: stable@kernel.org # 3.1+
-Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
----
- drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
-index ca632f9..5004342 100644
---- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
-@@ -296,8 +296,8 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
- return ret;
- }
-
-- if ((ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION) &&
-- priv->cfg->ht_params->smps_mode)
-+ if (ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION &&
-+ priv->cfg->ht_params && priv->cfg->ht_params->smps_mode)
- ieee80211_request_smps(ctx->vif,
- priv->cfg->ht_params->smps_mode);
-
---
-1.7.1
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html \ No newline at end of file
diff --git a/freed-ora/current/master/kernel.spec b/freed-ora/current/master/kernel.spec
index 990905eb6..6e1b384de 100644
--- a/freed-ora/current/master/kernel.spec
+++ b/freed-ora/current/master/kernel.spec
@@ -48,16 +48,19 @@ Summary: The Linux kernel
# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
# scripts/rebase.sh should be made to do that for you, actually.
#
-# For non-released -rc kernels, this will be prepended with "0.", so
-# for example a 3 here will become 0.3
+# NOTE: baserelease must be > 0 or bad things will happen if you switch
+# to a released kernel (released version will be < rc version)
#
-%global baserelease 4
+# 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 2
%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 1
+%define base_sublevel 2
# librev starts empty, then 1, etc, as the linux-libre tarball
# changes. This is only used to determine which tarball to use.
@@ -65,7 +68,7 @@ Summary: The Linux kernel
# To be inserted between "patch" and "-2.6.".
#define stablelibre -libre
-%define rcrevlibre -libre
+#define rcrevlibre -libre
#define gitrevlibre -libre
# libres (s for suffix) may be bumped for rebuilds in which patches
@@ -96,9 +99,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 10
+%define rcrev 7
# The git snapshot level
-%define gitrev 1
+%define gitrev 5
# Set rpm version accordingly
%define rpmversion 3.%{upstream_sublevel}.0
%endif
@@ -127,6 +130,8 @@ Summary: The Linux kernel
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
# kernel-firmware
%define with_firmware %{?_with_firmware: 1} %{?!_with_firmware: 0}
+# perf
+%define with_perf %{?_without_perf: 0} %{?!_without_perf: 1}
# tools
%define with_tools %{?_without_tools: 0} %{?!_without_tools: 1}
# kernel-debuginfo
@@ -139,6 +144,12 @@ Summary: The Linux kernel
%define with_omap %{?_without_omap: 0} %{?!_without_omap: 1}
# kernel-tegra (only valid for arm)
%define with_tegra %{?_without_tegra: 0} %{?!_without_tegra: 1}
+# kernel-kirkwood (only valid for arm)
+%define with_kirkwood %{?_without_kirkwood: 0} %{?!_without_kirkwood: 1}
+# kernel-imx (only valid for arm)
+%define with_imx %{?_without_imx: 0} %{?!_without_imx: 1}
+# kernel-highbank (only valid for arm)
+%define with_highbank %{?_without_highbank: 0} %{?!_without_highbank: 1}
#
# Additional options for user-friendly one-off kernel building:
#
@@ -153,18 +164,21 @@ Summary: The Linux kernel
#
# should we do C=1 builds with sparse
%define with_sparse %{?_with_sparse: 1} %{?!_with_sparse: 0}
+#
+# build a release kernel on rawhide
+%define with_release %{?_with_release: 1} %{?!_with_release: 0}
+
+# Include driver backports (e.g. compat-wireless) in the kernel build.
+%define with_backports %{?_with_backports: 1} %{?!_with_backports: 0}
# 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}
-# We need to remember if the user has explicitly requested without_debug
-%define requested_nodebug !%{with_debug}
-
# Build the kernel-doc package, but don't fail the build if it botches.
# Here "true" means "continue" and "false" means "fail the build".
%if 0%{?released_kernel}
@@ -173,7 +187,7 @@ Summary: The Linux kernel
%define doc_build_fail true
%endif
-%define rawhide_skip_docs 1
+%define rawhide_skip_docs 0
%if 0%{?rawhide_skip_docs}
%define with_doc 0
%define doc_build_fail true
@@ -184,8 +198,10 @@ Summary: The Linux kernel
%if 0%{?stable_rc}
%define stable_rctag .rc%{stable_rc}
+%define pkg_release 0%{stable_rctag}.%{fedora_build}%{?buildid}%{?dist}%{?libres}
+%else
+%define pkg_release %{fedora_build}%{?buildid}%{?dist}%{?libres}
%endif
-%define pkg_release %{fedora_build}%{?stable_rctag}%{?buildid}%{?dist}%{?libres}
%else
@@ -207,6 +223,20 @@ Summary: The Linux kernel
# The kernel tarball/base version
%define kversion 3.%{base_sublevel}
+# The compat-wireless version
+%define cwversion 2011-12-18
+
+#######################################################################
+# If cwversion is less than kversion, make sure with_backports is
+# turned-off.
+#
+# For rawhide, disable with_backports immediately after a rebase...
+#
+# (Uncomment the '#' and both spaces below to disable with_backports.)
+#
+# % define with_backports 0
+#######################################################################
+
%define make_target bzImage
%define KVERREL %{version}-libre.%{release}.%{_target_cpu}
@@ -251,10 +281,17 @@ Summary: The Linux kernel
%define with_pae 0
%endif
-# kernel-tegra and omap is only built on armv7 hard and softfp
+# kernel-tegra, omap, imx and highbank are only built on armv7 hard and softfp
%ifnarch armv7hl armv7l
%define with_tegra 0
%define with_omap 0
+%define with_imx 0
+%define with_highbank 0
+%endif
+
+# kernel-kirkwood is only built for armv5
+%ifnarch armv5tel
+%define with_kirkwood 0
%endif
# if requested, only build base kernel
@@ -287,19 +324,20 @@ Summary: The Linux kernel
%define with_smp 0
%define with_pae 0
%define with_tools 0
+%define with_perf 0
%endif
%define all_x86 i386 i686
%if %{with_vdso_install}
# These arches install vdso/ directories.
-%define vdso_arches %{all_x86} x86_64 ppc ppc64
+%define vdso_arches %{all_x86} x86_64 ppc ppc64 s390 s390x
%endif
# Overrides for generic default options
-# only ppc and alphav56 need separate smp kernels
-%ifnarch ppc alphaev56
+# only ppc needs a separate smp kernel
+%ifnarch ppc
%define with_smp 0
%endif
@@ -318,6 +356,7 @@ Summary: The Linux kernel
%define with_up 0
%define with_headers 0
%define with_tools 0
+%define with_perf 0
%define all_arch_configs kernel-%{version}-*.config
%define with_firmware %{?_without_firmware: 0} %{?!_without_firmware: 1}
%endif
@@ -327,8 +366,8 @@ Summary: The Linux kernel
%define with_bootwrapper 0
%endif
-# sparse blows up on ppc64 alpha and sparc64
-%ifarch ppc64 ppc alpha sparc64
+# sparse blows up on ppc64 and sparc64
+%ifarch ppc64 ppc sparc64
%define with_sparse 0
%endif
@@ -367,6 +406,7 @@ Summary: The Linux kernel
%define make_target image
%define kernel_image arch/s390/boot/image
%define with_tools 0
+%define with_backports 0
%endif
%ifarch sparc64
@@ -392,20 +432,6 @@ Summary: The Linux kernel
%define kernel_image_elf 1
%endif
-%ifarch ia64
-%define all_arch_configs kernel-%{version}-ia64*.config
-%define image_install_path boot/efi/EFI/redhat
-%define make_target compressed
-%define kernel_image vmlinux.gz
-%endif
-
-%ifarch alpha alphaev56
-%define all_arch_configs kernel-%{version}-alpha*.config
-%define image_install_path boot
-%define make_target vmlinux
-%define kernel_image vmlinux
-%endif
-
%ifarch %{arm}
%define all_arch_configs kernel-%{version}-arm*.config
%define image_install_path boot
@@ -416,18 +442,13 @@ Summary: The Linux kernel
# we build a up kernel on armv5tel. its used for qemu.
%ifnarch armv5tel
%define with_up 0
+%define with_perf 0
%endif
# we only build headers on the base arm arches
# just like we used to only build them on i386 for x86
%ifnarch armv5tel armv7hl
%define with_headers 0
%endif
-%define with_perf 0
-%endif
-
-%if %{nopatches}
-# XXX temporary until last vdso patches are upstream
-%define vdso_arches ppc ppc64
%endif
# Should make listnewconfig fail if there's config options
@@ -452,7 +473,9 @@ Summary: The Linux kernel
%define with_smp 0
%define with_pae 0
%define with_debuginfo 0
+%define with_perf 0
%define with_tools 0
+%define with_backports 0
%define _enable_debug_packages 0
%endif
@@ -473,7 +496,7 @@ Summary: The Linux kernel
# First the general kernel 2.6 required versions as per
# Documentation/Changes
#
-%define kernel_dot_org_conflicts ppp < 2.4.3-3, isdn4k-utils < 3.2-32, nfs-utils < 1.0.7-12, e2fsprogs < 1.37-4, util-linux < 2.12, jfsutils < 1.1.7-2, reiserfs-utils < 3.6.19-2, xfsprogs < 2.6.13-4, procps < 3.2.5-6.3, oprofile < 0.9.1-2, device-mapper-libs < 1.02.63-2, mdadm < 3.2.1-5
+%define kernel_dot_org_conflicts ppp < 2.4.3-3, isdn4k-utils < 3.2-32, nfs-utils < 1.2.5-7.fc17, e2fsprogs < 1.37-4, util-linux < 2.12, jfsutils < 1.1.7-2, reiserfs-utils < 3.6.19-2, xfsprogs < 2.6.13-4, procps < 3.2.5-6.3, oprofile < 0.9.1-2, device-mapper-libs < 1.02.63-2, mdadm < 3.2.1-5
#
# Then a series of requirements that are distribution specific, either
@@ -491,7 +514,7 @@ Summary: The Linux kernel
# Packages that need to be installed before the kernel is, because the %%post
# scripts use them.
#
-%define kernel_prereq fileutils, module-init-tools >= 3.16-2, initscripts >= 8.11.1-1, grubby >= 8.3-1
+%define kernel_prereq fileutils, module-init-tools >= 3.16-4, initscripts >= 8.11.1-1, grubby >= 8.3-1
%define initrd_prereq dracut >= 001-7
#
@@ -506,8 +529,11 @@ Provides: kernel-libre = %{rpmversion}-%{pkg_release}\
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
Provides: kernel-libre-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
Provides: kernel-drm = 4.3.0\
+Provides: kernel-libre-drm = 4.3.0\
Provides: kernel-drm-nouveau = 16\
+Provides: kernel-libre-drm-nouveau = 16\
Provides: kernel-modeset = 1\
+Provides: kernel-libre-modeset = 1\
Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
Provides: kernel-libre-uname-r = %{KVERREL}%{?1:.%{1}}\
Requires(pre): %{kernel_prereq}\
@@ -537,7 +563,7 @@ Version: %{rpmversion}
Release: %{pkg_release}
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
# SET %%nobuildarches (ABOVE) INSTEAD
-ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 %{sparc} s390 s390x alpha alphaev56 %{arm}
+ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 %{sparc} s390 s390x %{arm}
ExclusiveOS: Linux
%kernel_reqprovconf
@@ -546,48 +572,42 @@ ExclusiveOS: Linux
# List the packages used during the kernel build
#
BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
-BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
+BuildRequires: bzip2, xz, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
BuildRequires: net-tools
BuildRequires: xmlto, asciidoc
%if %{with_sparse}
BuildRequires: sparse >= 0.4.1
%endif
+%if %{with_perf}
+BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed)
+%endif
%if %{with_tools}
-BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) pciutils-devel gettext
+BuildRequires: pciutils-devel gettext
%endif
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
-
-%define fancy_debuginfo 0
%if %{with_debuginfo}
-%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
-%define fancy_debuginfo 1
-%endif
-%endif
-
-%if %{fancy_debuginfo}
-# Fancy new debuginfo generation introduced in Fedora 8.
+# Fancy new debuginfo generation introduced in Fedora 8/RHEL 6.
BuildRequires: rpm-build >= 4.4.2.1-4
%define debuginfo_args --strict-build-id
%endif
Source0: http://linux-libre.fsfla.org/pub/linux-libre/freed-ora/src/linux-%{kversion}-libre%{?librev}.tar.bz2
+# Source1: compat-wireless-%{cwversion}.tar.bz2
# For documentation purposes only.
Source3: deblob-main
Source4: deblob-check
Source5: deblob-%{kversion}
-Source11: genkey
-Source14: find-provides
Source15: merge.pl
+Source16: mod-extra.list
Source19: Makefile.release
Source20: Makefile.config
Source21: config-debug
Source22: config-nodebug
Source23: config-generic
-Source24: config-rhel-generic
Source30: config-x86-generic
Source31: config-i686-PAE
@@ -600,8 +620,6 @@ Source51: config-powerpc32-generic
Source52: config-powerpc32-smp
Source53: config-powerpc64
-Source60: config-ia64-generic
-
Source70: config-s390x
Source90: config-sparc64-generic
@@ -609,6 +627,11 @@ Source90: config-sparc64-generic
Source100: config-arm-generic
Source110: config-arm-omap-generic
Source111: config-arm-tegra
+Source112: config-arm-kirkwood
+Source113: config-arm-imx
+Source114: config-arm-highbank
+
+Source200: config-backports
# This file is intentionally left empty in the stock kernel. Its a nicety
# added for those wanting to do custom rebuilds with altered config opts.
@@ -636,9 +659,9 @@ Patch01: %{stable_patch_01}
# near the top of this spec file.
%else
%if 0%{?rcrev}
-Patch00: patch%{?rcrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}.bz2
+Patch00: patch%{?rcrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}.xz
%if 0%{?gitrev}
-Patch01: patch%{?gitrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
+Patch01: patch%{?gitrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.xz
%endif
%else
# pre-{base_sublevel+1}-rc1 case
@@ -652,8 +675,6 @@ Patch00: patch%{?gitrevlibre}-3.%{base_sublevel}-git%{gitrev}.bz2
### BRANCH PATCH ###
%endif
-Patch02: git-linus.diff
-
# we also need compile fixes for -vanilla
Patch04: linux-2.6-compile-fixes.patch
@@ -661,6 +682,7 @@ Patch04: linux-2.6-compile-fixes.patch
Patch05: linux-2.6-makefile-after_link.patch
Patch07: freedo.patch
+Patch08: linux-3.2-brcmfmac-gcc47.patch
%if !%{nopatches}
@@ -675,8 +697,6 @@ Patch100: taint-vbox.patch
Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
Patch161: linux-2.6-i386-nx-emulation.patch
-Patch202: linux-2.6-debug-taint-vm.patch
-
Patch383: linux-2.6-defaults-aspm.patch
Patch390: linux-2.6-defaults-acpi-video.patch
@@ -691,9 +711,12 @@ Patch452: linux-2.6.30-no-pcspkr-modalias.patch
Patch460: linux-2.6-serial-460800.patch
Patch470: die-floppy-die.patch
+Patch471: floppy-Remove-_hlt-related-functions.patch
Patch510: linux-2.6-silence-noise.patch
+Patch520: quite-apm.patch
Patch530: linux-2.6-silence-fbcon-logo.patch
+Patch540: modpost-add-option-to-allow-external-modules-to-avoi.patch
Patch700: linux-2.6-e1000-ich9-montevina.patch
@@ -705,17 +728,11 @@ Patch800: linux-2.6-crash-driver.patch
Patch1555: fix_xen_guest_on_old_EC2.patch
# DRM
+#atch1700: drm-edid-try-harder-to-fix-up-broken-headers.patch
# nouveau + drm fixes
-Patch1810: drm-nouveau-updates.patch
# intel drm is all merged upstream
Patch1824: drm-intel-next.patch
-# make sure the lvds comes back on lid open
-Patch1825: drm-intel-make-lvds-work.patch
-# rhbz#729882, https://bugs.freedesktop.org/attachment.cgi?id=49069
-Patch1826: drm-i915-sdvo-lvds-is-digital.patch
-
-Patch1850: drm-lower-severity-radeon-lockup.diff
Patch1900: linux-2.6-intel-iommu-igfx.patch
@@ -728,30 +745,15 @@ Patch2899: linux-2.6-v4l-dvb-fixes.patch
Patch2900: linux-2.6-v4l-dvb-update.patch
Patch2901: linux-2.6-v4l-dvb-experimental.patch
-Patch2903: media-DiBcom-protect-the-I2C-bufer-access.patch
-Patch2904: media-dib0700-protect-the-dib0700-buffer-access.patch
-Patch2905: media-dib0700-correct-error-message.patch
-
-Patch3000: rcutree-avoid-false-quiescent-states.patch
-
# fs fixes
# NFSv4
+Patch1101: linux-3.1-keys-remove-special-keyring.patch
# patches headed upstream
-Patch12010: add-appleir-usb-driver.patch
-
Patch12016: disable-i8042-check-on-apple-mac.patch
-Patch12021: udlfb-bind-framebuffer-to-interface.patch
-Patch12022: x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch
-
-Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch
-Patch12024: epoll-fix-spurious-lockdep-warnings.patch
-Patch12025: rcu-avoid-just-onlined-cpu-resched.patch
Patch12026: block-stray-block-put-after-teardown.patch
-Patch12027: usb-add-quirk-for-logitech-webcams.patch
-Patch12029: crypto-register-cryptd-first.patch
Patch12030: epoll-limit-paths.patch
Patch12303: dmar-disable-when-ricoh-multifunction.patch
@@ -759,33 +761,33 @@ Patch12303: dmar-disable-when-ricoh-multifunction.patch
Patch13002: revert-efi-rtclock.patch
Patch13003: efi-dont-map-boot-services-on-32bit.patch
-Patch13007: add-macbookair41-keyboard.patch
-
-Patch13009: hvcs_pi_buf_alloc.patch
-
-Patch13013: powerpc-Fix-deadlock-in-icswx-code.patch
-
-Patch13014: iwlagn-fix-ht_params-NULL-pointer-dereference.patch
-
Patch20000: utrace.patch
# Flattened devicetree support
Patch21000: arm-omap-dt-compat.patch
Patch21001: arm-smsc-support-reading-mac-address-from-device-tree.patch
-#rhbz #722509
-Patch21002: mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
+Patch21080: sysfs-msi-irq-per-device.patch
+
+Patch21090: bcma-brcmsmac-compat.patch
+
+Patch21091: pci-Rework-ASPM-disable-code.patch
+
+#rhbz 753236
+Patch21029: nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch
-#rhbz #735946
-Patch21020: 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
-Patch21021: 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
+#rhbz 590880
+Patch21030: alps.patch
-#rhbz 748691
-Patch21030: be2net-non-member-vlan-pkts-not-received-in-promisco.patch
-Patch21031: benet-remove-bogus-unlikely-on-vlan-check.patch
+#rhbz 717735
+Patch21045: nfs-client-freezer.patch
-#rhbz 749166
-Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
+#rhbz 770233
+Patch21065: Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch
+
+# compat-wireless patches
+Patch50000: compat-wireless-config-fixups.patch
+Patch50001: compat-wireless-integrated-build.patch
%endif
@@ -850,14 +852,63 @@ Group: Development/Debug
This package is required by %{name}-debuginfo subpackages.
It provides the kernel source files common to all builds.
+%if %{with_perf}
+%package -n perf-libre
+Provides: perf = %{rpmversion}-%{pkg_release}
+Summary: Performance monitoring for the Linux kernel
+Group: Development/System
+License: GPLv2
+%description -n perf-libre
+This package contains the perf tool, which enables performance monitoring
+of the Linux kernel.
+
+%package -n perf-libre-debuginfo
+Provides: perf-debuginfo = %{rpmversion}-%{pkg_release}
+Summary: Debug information for package perf-libre
+Group: Development/Debug
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
+AutoReqProv: no
+%description -n perf-libre-debuginfo
+This package provides debug information for the perf package.
+
+# Note that this pattern only works right to match the .build-id
+# symlinks because of the trailing nonmatching alternation and
+# the leading .*, because of find-debuginfo.sh's buggy handling
+# of matching the pattern against the symlinks file.
+%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|XXX' -o perf-debuginfo.list}
+
+%package -n python-perf-libre
+Provides: python-perf = %{rpmversion}-%{pkg_release}
+Summary: Python bindings for apps which will manipulate perf events
+Group: Development/Libraries
+%description -n python-perf-libre
+The python-perf-libre package contains a module that permits applications
+written in the Python programming language to use the interface
+to manipulate perf events.
+
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+%package -n python-perf-libre-debuginfo
+Provides: python-perf = %{rpmversion}-%{pkg_release}
+Summary: Debug information for package perf python bindings
+Group: Development/Debug
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
+AutoReqProv: no
+%description -n python-perf-libre-debuginfo
+This package provides debug information for the perf python bindings.
+
+# the python_sitearch macro should already be defined from above
+%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{python_sitearch}/perf.so(\.debug)?|XXX' -o python-perf-debuginfo.list}
+
+
+%endif # with_perf
+
%if %{with_tools}
%package -n kernel-libre-tools
Provides: kernel-tools = %{rpmversion}-%{pkg_release}
Summary: Assortment of tools for the Linux kernel
Group: Development/System
License: GPLv2
-Obsoletes: perf
-Provides: perf
Provides: cpupowerutils = 1:009-0.6.p1
Obsoletes: cpupowerutils < 1:009-0.6.p1
Provides: cpufreq-utils = 1:009-0.6.p1
@@ -867,7 +918,7 @@ Obsoletes: cpufrequtils < 1:009-0.6.p1
Obsoletes: cpuspeed < 1:1.5-16
%description -n kernel-libre-tools
This package contains the tools/ directory from the kernel source
-- the perf tool and the supporting documentation.
+and the supporting documentation.
%package -n kernel-libre-tools-devel
Provides: kernel-tools-devel = %{rpmversion}-%{pkg_release}
@@ -894,8 +945,9 @@ This package provides debug information for package kernel-libre-tools.
# symlinks because of the trailing nonmatching alternation and
# the leading .*, because of find-debuginfo.sh's buggy handling
# of matching the pattern against the symlinks file.
-%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|XXX' -o kernel-libre-tools-debuginfo.list}
-%endif
+%{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|XXX' -o kernel-tools-debuginfo.list}
+
+%endif # with_tools
#
@@ -940,6 +992,29 @@ against the %{?2:%{2} }kernel package.\
%{nil}
#
+# This macro creates a kernel-<subpackage>-modules-extra package.
+# %%kernel_modules-extra_package <subpackage> <pretty-name>
+#
+%define kernel_modules-extra_package() \
+%package %{?1:%{1}-}modules-extra\
+Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
+Group: System Environment/Kernel\
+Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\
+Provides: kernel-libre%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\
+Provides: kernel-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-libre-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-modules-extra = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-libre-modules-extra = %{version}-%{release}%{?1:.%{1}}\
+Provides: kernel-modules-extra-uname-r = %{KVERREL}%{?1:.%{1}}\
+Provides: kernel-libre-modules-extra-uname-r = %{KVERREL}%{?1:.%{1}}\
+Requires: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
+Requires: kernel-libre-uname-r = %{KVERREL}%{?1:.%{1}}\
+AutoReqProv: no\
+%description -n kernel%{?variant}%{?1:-%{1}}-modules-extra\
+This package provides less commonly used kernel modules for the %{?2:%{2} }kernel package.\
+%{nil}
+
+#
# This macro creates a kernel-<subpackage> and its -devel and -debuginfo too.
# %%define variant_summary The Linux kernel compiled for <configuration>
# %%kernel_variant_package [-n <pretty-name>] <subpackage>
@@ -950,12 +1025,14 @@ Summary: %{variant_summary}\
Group: System Environment/Kernel\
%kernel_reqprovconf\
%{expand:%%kernel_devel_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
+%{expand:%%kernel_modules-extra_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
%{expand:%%kernel_debuginfo_package %1}\
%{nil}
# First the auxiliary packages of the main kernel package.
%kernel_devel_package
+%kernel_modules-extra_package
%kernel_debuginfo_package
@@ -1020,6 +1097,23 @@ on kernel bugs, as some of these options impact performance noticably.
The kernel-libre-debug package is the upstream kernel without the
non-Free blobs it includes by default.
+%define variant_summary The Linux kernel compiled for marvell kirkwood boards
+%kernel_variant_package kirkwood
+%description kirkwood
+This package includes a version of the Linux kernel with support for
+marvell kirkwood based systems, i.e., guruplug, sheevaplug
+
+%define variant_summary The Linux kernel compiled for freescale boards
+%kernel_variant_package imx
+%description imx
+This package includes a version of the Linux kernel with support for
+freescale based systems, i.e., efika smartbook.
+
+%define variant_summary The Linux kernel compiled for Calxeda boards
+%kernel_variant_package highbank
+%description highbank
+This package includes a version of the Linux kernel with support for
+Calxeda based systems, i.e., HP arm servers.
%define variant_summary The Linux kernel compiled for TI-OMAP boards
%kernel_variant_package omap
@@ -1050,6 +1144,11 @@ exit 1
%endif
%endif
+%if "%{baserelease}" == "0"
+echo "baserelease must be greater than zero"
+exit 1
+%endif
+
# more sanity checking; do it quietly
if [ "%{patches}" != "%%{patches}" ] ; then
for patch in %{patches} ; do
@@ -1080,7 +1179,8 @@ ApplyPatch()
%endif
case "$patch" in
*.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
- *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+ *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
+ *.xz) unxz < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
*) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
esac
}
@@ -1196,10 +1296,10 @@ perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION =%{?stablelibre:-libre%{?librev}}/
%if "%{?stablelibre}" != "%{?rcrevlibre}"
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION =%{?rcrevlibre:-libre%{?librev}}/" Makefile
%endif
- ApplyPatch patch%{?rcrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}.bz2
+ ApplyPatch patch%{?rcrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}.xz
%if 0%{?gitrev}
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -rc%{rcrev}%{?gitrevlibre:-libre%{?librev}}/" Makefile
- ApplyPatch patch%{?gitrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
+ ApplyPatch patch%{?gitrevlibre}-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.xz
%endif
%else
# pre-{base_sublevel+1}-rc1 case
@@ -1242,6 +1342,7 @@ cd linux-%{kversion}.%{_target_cpu}
ApplyPatch %{stable_patch_00}
%endif
%if 0%{?stable_rc}
+perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION =%{?rcrevlibre:-libre%{?librev}}/" Makefile
ApplyPatch %{stable_patch_01}
%endif
@@ -1254,9 +1355,9 @@ cp $RPM_SOURCE_DIR/config-* .
cp %{SOURCE15} .
%if !%{debugbuildsenabled}
-%if %{requested_nodebug}
+%if %{with_release}
# The normal build is a really debug build and the user has explicitly requested
-# without_debug. Change the config files into non-debug versions.
+# a release kernel. Change the config files into non-debug versions.
make -f %{SOURCE19} config-release
%endif
%endif
@@ -1264,18 +1365,18 @@ make -f %{SOURCE19} config-release
# Dynamically generate kernel .config files from config-* files
make -f %{SOURCE20} VERSION=%{version} configs
-%if %{?all_arch_configs:1}%{!?all_arch_configs:0}
-#if a rhel kernel, apply the rhel config options
-%if 0%{?rhel}
- for i in %{all_arch_configs}
- do
- mv $i $i.tmp
- ./merge.pl config-rhel-generic $i.tmp > $i
- rm $i.tmp
- done
+%if %{with_backports}
+# Turn-off bits provided by compat-wireless
+for i in %{all_arch_configs}
+do
+ mv $i $i.tmp
+ ./merge.pl %{SOURCE200} $i.tmp > $i
+ rm $i.tmp
+done
%endif
# Merge in any user-provided local config option changes
+%if %{?all_arch_configs:1}%{!?all_arch_configs:0}
for i in %{all_arch_configs}
do
mv $i $i.tmp
@@ -1284,8 +1385,6 @@ do
done
%endif
-ApplyOptionalPatch git-linus.diff
-
ApplyPatch linux-2.6-makefile-after_link.patch
#
@@ -1295,6 +1394,7 @@ ApplyOptionalPatch linux-2.6-compile-fixes.patch
# Freedo logo.
ApplyPatch freedo.patch
+ApplyPatch linux-3.2-brcmfmac-gcc47.patch
%if !%{nopatches}
@@ -1322,7 +1422,6 @@ ApplyPatch arm-smsc-support-reading-mac-address-from-device-tree.patch
# ext4
# xfs
-ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
# btrfs
@@ -1330,6 +1429,7 @@ ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
# eCryptfs
# NFSv4
+ApplyPatch linux-3.1-keys-remove-special-keyring.patch
# USB
@@ -1342,9 +1442,6 @@ ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch
ApplyPatch acpi-ensure-thermal-limits-match-cpu-freq.patch
ApplyPatch acpi-sony-nonvs-blacklist.patch
-# Various low-impact patches to aid debugging.
-ApplyPatch linux-2.6-debug-taint-vm.patch
-
#
# PCI
#
@@ -1367,6 +1464,7 @@ ApplyPatch linux-2.6-input-kill-stupid-messages.patch
# stop floppy.ko from autoloading during udev...
ApplyPatch die-floppy-die.patch
+ApplyPatch floppy-Remove-_hlt-related-functions.patch
ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
@@ -1379,6 +1477,11 @@ ApplyPatch linux-2.6-silence-noise.patch
# Make fbcon not show the penguins with 'quiet'
ApplyPatch linux-2.6-silence-fbcon-logo.patch
+%if %{with_backports}
+# modpost: add option to allow external modules to avoid taint
+ApplyPatch modpost-add-option-to-allow-external-modules-to-avoi.patch
+%endif
+
# Changes to upstream defaults.
@@ -1394,21 +1497,18 @@ ApplyPatch linux-2.6-e1000-ich9-montevina.patch
ApplyPatch fix_xen_guest_on_old_EC2.patch
# DRM core
+#ApplyPatch drm-edid-try-harder-to-fix-up-broken-headers.patch
# Nouveau DRM
-ApplyOptionalPatch drm-nouveau-updates.patch
# Intel DRM
ApplyOptionalPatch drm-intel-next.patch
-ApplyPatch drm-intel-make-lvds-work.patch
-ApplyPatch drm-i915-sdvo-lvds-is-digital.patch
-
-ApplyPatch drm-lower-severity-radeon-lockup.diff
ApplyPatch linux-2.6-intel-iommu-igfx.patch
# silence the ACPI blacklist code
ApplyPatch linux-2.6-silence-acpi-blacklist.patch
+ApplyPatch quite-apm.patch
# V4L/DVB updates/fixes/experimental drivers
# apply if non-empty
@@ -1417,23 +1517,10 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
# Patches headed upstream
-ApplyPatch rcutree-avoid-false-quiescent-states.patch
-
ApplyPatch disable-i8042-check-on-apple-mac.patch
-ApplyPatch add-appleir-usb-driver.patch
-
-ApplyPatch udlfb-bind-framebuffer-to-interface.patch
-ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch
-ApplyPatch epoll-fix-spurious-lockdep-warnings.patch
ApplyPatch epoll-limit-paths.patch
-ApplyPatch rcu-avoid-just-onlined-cpu-resched.patch
ApplyPatch block-stray-block-put-after-teardown.patch
-ApplyPatch usb-add-quirk-for-logitech-webcams.patch
-
-ApplyPatch crypto-register-cryptd-first.patch
-
-ApplyPatch x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
@@ -1441,31 +1528,30 @@ ApplyPatch dmar-disable-when-ricoh-multifunction.patch
ApplyPatch revert-efi-rtclock.patch
ApplyPatch efi-dont-map-boot-services-on-32bit.patch
-ApplyPatch add-macbookair41-keyboard.patch
+# utrace.
+ApplyPatch utrace.patch
-ApplyPatch hvcs_pi_buf_alloc.patch
+# Add msi irq ennumeration in sysfs for devices
+ApplyPatch sysfs-msi-irq-per-device.patch
-ApplyPatch powerpc-Fix-deadlock-in-icswx-code.patch
+%if !%{with_backports}
+# Remove overlap between bcma/b43 and brcmsmac and reenable bcm4331
+ApplyPatch bcma-brcmsmac-compat.patch
+%endif
-ApplyPatch iwlagn-fix-ht_params-NULL-pointer-dereference.patch
+ApplyPatch pci-Rework-ASPM-disable-code.patch
-#rhbz #722509
-ApplyPatch mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
+#rhbz 753236
+ApplyPatch nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch
-ApplyPatch media-DiBcom-protect-the-I2C-bufer-access.patch
-ApplyPatch media-dib0700-protect-the-dib0700-buffer-access.patch
-ApplyPatch media-dib0700-correct-error-message.patch
+#rhbz 590880
+ApplyPatch alps.patch
-# utrace.
-ApplyPatch utrace.patch
+#rhbz 717735
+ApplyPatch nfs-client-freezer.patch
-#rhbz #735946
-ApplyPatch 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
-ApplyPatch 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
-
-#rhbz 748691
-ApplyPatch be2net-non-member-vlan-pkts-not-received-in-promisco.patch
-ApplyPatch benet-remove-bogus-unlikely-on-vlan-check.patch
+#rhbz 770233
+ApplyPatch Bluetooth-Add-support-for-BCM20702A0-0a5c-21e3.patch
# END OF PATCH APPLICATIONS
@@ -1522,6 +1608,23 @@ find . -name .gitignore -exec rm -f {} \; >/dev/null
cd ..
+%if %{with_backports}
+
+# Always start fresh
+rm -rf compat-wireless-%{cwversion}
+
+# Extract the compat-wireless bits
+%setup -q -n kernel-%{kversion}%{?dist} -T -D -a 1
+
+cd compat-wireless-%{cwversion}
+
+ApplyPatch compat-wireless-config-fixups.patch
+ApplyPatch compat-wireless-integrated-build.patch
+
+cd ..
+
+%endif
+
###
### build
###
@@ -1531,7 +1634,7 @@ cd ..
%define sparse_mflags C=1
%endif
-%if %{fancy_debuginfo}
+%if %{with_debuginfo}
# This override tweaks the kernel makefiles so that we run debugedit on an
# object before embedding it. When we later run find-debuginfo.sh, it will
# run debugedit again. The edits it does change the build ID bits embedded
@@ -1618,7 +1721,7 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
# Override $(mod-fw) because we don't want it to install any firmware
- # We'll do that ourselves with 'make firmware_install'
+ # we'll get it from the linux-firmware package and we don't want conflicts
make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
%ifarch %{vdso_arches}
make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
@@ -1644,6 +1747,9 @@ BuildKernel() {
# dirs for additional modules per module-init-tools, kbuild/modules.txt
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+%if %{with_backports}
+ mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports
+%endif
# first copy everything
cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -1665,7 +1771,7 @@ BuildKernel() {
fi
rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
-%ifarch ppc
+%ifarch ppc ppc64
cp -a --parents arch/powerpc/lib/crtsavres.[So] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
%endif
if [ -d arch/%{asmarch}/include ]; then
@@ -1680,19 +1786,17 @@ BuildKernel() {
# Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf
-%if %{fancy_debuginfo}
+%if %{with_debuginfo}
if test -s vmlinux.id; then
cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
else
echo >&2 "*** ERROR *** no vmlinux build ID! ***"
exit 1
fi
-%endif
#
# save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
#
-%if %{with_debuginfo}
mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
%endif
@@ -1714,7 +1818,7 @@ BuildKernel() {
}
collect_modules_list networking \
- 'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt2x00(pci|usb)_probe'
+ 'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe'
collect_modules_list block \
'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler'
collect_modules_list drm \
@@ -1736,6 +1840,56 @@ BuildKernel() {
rm -f modinfo modnames
+ pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/
+ rm -rf modnames
+ find . -name "*.ko" -type f > modnames
+ # Look through all of the modules, and throw any that have a dependency in
+ # our list into the list as well.
+ rm -rf dep.list dep2.list
+ rm -rf req.list req2.list
+ cp %{SOURCE16} .
+ for dep in `cat modnames`
+ do
+ depends=`modinfo $dep | grep depends| cut -f2 -d":" | sed -e 's/^[ \t]*//'`
+ [ -z "$depends" ] && continue;
+ for mod in `echo $depends | sed -e 's/,/ /g'`
+ do
+ match=`grep "^$mod.ko" mod-extra.list` ||:
+ if [ -z "$match" ]
+ then
+ continue
+ else
+ echo $mod.ko >> req.list
+ fi
+ done
+ done
+
+ sort -u req.list > req2.list
+ sort -u mod-extra.list > mod-extra2.list
+ join -v 1 mod-extra2.list req2.list > mod-extra3.list
+
+ for mod in `cat mod-extra3.list`
+ do
+ # get the path for the module
+ modpath=`grep /$mod modnames` ||:
+ [ -z "$modpath" ] && continue;
+ echo $modpath >> dep.list
+ done
+
+ sort -u dep.list > dep2.list
+
+ # now move the modules into the extra/ directory
+ for mod in `cat dep2.list`
+ do
+ newpath=`dirname $mod | sed -e 's/kernel\//extra\//'`
+ mkdir -p $newpath
+ mv $mod $newpath
+ done
+
+ rm modnames dep.list dep2.list req.list req2.list
+ rm mod-extra.list mod-extra2.list mod-extra3.list
+ popd
+
# remove files that will be auto generated by depmod at rpm -i time
for i in alias alias.bin builtin.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
do
@@ -1749,6 +1903,22 @@ BuildKernel() {
# prune junk from kernel-devel
find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \;
+
+%if %{with_backports}
+
+ cd ../compat-wireless-%{cwversion}/
+
+ make KLIB_BUILD=../linux-%{kversion}.%{_target_cpu} \
+ KMODPATH_ARG="INSTALL_MOD_PATH=$RPM_BUILD_ROOT" \
+ KMODDIR="backports" install-modules
+
+ # mark modules executable so that strip-to-file can strip them
+ find $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports -name "*.ko" \
+ -type f | xargs --no-run-if-empty chmod u+x
+
+ cd -
+
+%endif
}
###
@@ -1774,6 +1944,18 @@ BuildKernel %make_target %kernel_image PAEdebug
BuildKernel %make_target %kernel_image PAE
%endif
+%if %{with_kirkwood}
+BuildKernel %make_target %kernel_image kirkwood
+%endif
+
+%if %{with_imx}
+BuildKernel %make_target %kernel_image imx
+%endif
+
+%if %{with_highbank}
+BuildKernel %make_target %kernel_image highbank
+%endif
+
%if %{with_omap}
BuildKernel %make_target %kernel_image omap
%endif
@@ -1790,11 +1972,15 @@ BuildKernel %make_target %kernel_image
BuildKernel %make_target %kernel_image smp
%endif
-%if %{with_tools}
+%global perf_make \
+ make %{?_smp_mflags} -C tools/perf -s V=1 EXTRA_CFLAGS="-Wno-error=array-bounds" HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix}
+%if %{with_perf}
# perf
-make %{?_smp_mflags} -C tools/perf -s V=1 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
-make %{?_smp_mflags} -C tools/perf -s V=1 prefix=%{_prefix} man || %{doc_build_fail}
+%{perf_make} all
+%{perf_make} man || %{doc_build_fail}
+%endif
+%if %{with_tools}
%ifarch %{cpupowerarchs}
# cpupower
# make sure version-gen.sh is executable.
@@ -1829,13 +2015,11 @@ find Documentation -type d | xargs chmod u+w
# This macro is used by %%install, so we must redefine it before that.
%define debug_package %{nil}
-%if %{fancy_debuginfo}
+%if %{with_debuginfo}
%define __debug_install_post \
/usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\
%{nil}
-%endif
-%if %{with_debuginfo}
%ifnarch noarch
%global __debug_package 1
%files -f debugfiles.list debuginfo-common-%{_target_cpu}
@@ -1894,13 +2078,18 @@ rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
%endif
-%if %{with_tools}
+%if %{with_perf}
# perf tool binary and supporting scripts/binaries
-make -C tools/perf -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
+%{perf_make} DESTDIR=$RPM_BUILD_ROOT install
+
+# python-perf extension
+%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-python_ext
# perf man pages (note: implicit rpm magic compresses them later)
-make -C tools/perf -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man || %{doc_build_fail}
+%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-man || %{doc_build_fail}
+%endif
+%if %{with_tools}
%ifarch %{cpupowerarchs}
make -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
rm -f %{buildroot}%{_libdir}/*.{a,la}
@@ -1973,6 +2162,14 @@ then\
fi\
%{nil}
+#
+# This macro defines a %%post script for a kernel*-modules-extra package.
+# %%kernel_modules-extra_post [<subpackage>]
+#
+%define kernel_modules_extra_post() \
+%{expand:%%post %{?1:%{1}-}modules-extra}\
+/sbin/depmod -a %{KVERREL}%{?1:.%{1}}\
+%{nil}
# This macro defines a %%posttrans script for a kernel package.
# %%kernel_variant_posttrans [<subpackage>]
@@ -1991,6 +2188,7 @@ fi\
#
%define kernel_variant_post(v:r:) \
%{expand:%%kernel_devel_post %{?-v*}}\
+%{expand:%%kernel_modules_extra_post %{?-v*}}\
%{expand:%%kernel_variant_posttrans %{?-v*}}\
%{expand:%%post %{?-v*}}\
%{-r:\
@@ -2027,6 +2225,15 @@ fi}\
%kernel_variant_post -v PAEdebug -r (kernel|kernel-smp)
%kernel_variant_preun PAEdebug
+%kernel_variant_preun kirkwood
+%kernel_variant_post -v kirkwood
+
+%kernel_variant_preun imx
+%kernel_variant_post -v imx
+
+%kernel_variant_preun highbank
+%kernel_variant_post -v highbank
+
%kernel_variant_preun omap
%kernel_variant_post -v omap
@@ -2072,14 +2279,30 @@ fi
%{_datadir}/man/man9/*
%endif
-%if %{with_tools}
-%files -n kernel-libre-tools -f cpupower.lang
+%if %{with_perf}
+%files -n perf-libre
%defattr(-,root,root)
%{_bindir}/perf
%dir %{_libexecdir}/perf-core
%{_libexecdir}/perf-core/*
-%{_mandir}/man[1-8]/*
+%{_mandir}/man[1-8]/perf*
+
+%files -n python-perf-libre
+%defattr(-,root,root)
+%{python_sitearch}
+%if %{with_debuginfo}
+%files -f perf-debuginfo.list -n perf-libre-debuginfo
+%defattr(-,root,root)
+
+%files -f python-perf-debuginfo.list -n python-perf-libre-debuginfo
+%defattr(-,root,root)
+%endif
+%endif # with_perf
+
+%if %{with_tools}
+%files -n kernel-libre-tools -f cpupower.lang
+%defattr(-,root,root)
%ifarch %{cpupowerarchs}
%{_bindir}/cpupower
%{_bindir}/centrino-decode
@@ -2087,11 +2310,12 @@ fi
%{_libdir}/libcpupower.so.0
%{_libdir}/libcpupower.so.0.0.0
%{_unitdir}/cpupower.service
+%{_mandir}/man[1-8]/cpupower*
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
%endif
%if %{with_debuginfo}
-%files -f kernel-libre-tools-debuginfo.list -n kernel-libre-tools-debuginfo
+%files -f kernel-tools-debuginfo.list -n kernel-libre-tools-debuginfo
%defattr(-,root,root)
%endif
@@ -2100,7 +2324,7 @@ fi
%{_libdir}/libcpupower.so
%{_includedir}/cpufreq.h
%endif
-%endif
+%endif # with_perf
# This is %%{image_install_path} on an arch where that includes ELF files,
# or empty otherwise.
@@ -2122,8 +2346,10 @@ fi
/lib/modules/%{KVERREL}%{?2:.%{2}}/kernel\
/lib/modules/%{KVERREL}%{?2:.%{2}}/build\
/lib/modules/%{KVERREL}%{?2:.%{2}}/source\
-/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
/lib/modules/%{KVERREL}%{?2:.%{2}}/updates\
+%if %{with_backports}\
+/lib/modules/%{KVERREL}%{?2:.%{2}}/backports\
+%endif\
%ifarch %{vdso_arches}\
/lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\
/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\
@@ -2133,21 +2359,13 @@ fi
%{expand:%%files %{?2:%{2}-}devel}\
%defattr(-,root,root)\
/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
+%{expand:%%files %{?2:%{2}-}modules-extra}\
+%defattr(-,root,root)\
+/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
%if %{with_debuginfo}\
%ifnarch noarch\
-%if %{fancy_debuginfo}\
%{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
-%else\
-%{expand:%%files %{?2:%{2}-}debuginfo}\
-%endif\
%defattr(-,root,root)\
-%if !%{fancy_debuginfo}\
-%if "%{elf_image_install_path}" != ""\
-%{debuginfodir}/%{elf_image_install_path}/*-%{KVERREL}%{?2:.%{2}}.debug\
-%endif\
-%{debuginfodir}/lib/modules/%{KVERREL}%{?2:.%{2}}\
-%{debuginfodir}/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
-%endif\
%endif\
%endif\
%endif\
@@ -2159,6 +2377,9 @@ fi
%kernel_variant_files %{with_debug} debug
%kernel_variant_files %{with_pae} PAE
%kernel_variant_files %{with_pae_debug} PAEdebug
+%kernel_variant_files %{with_kirkwood} kirkwood
+%kernel_variant_files %{with_imx} imx
+%kernel_variant_files %{with_highbank} highbank
%kernel_variant_files %{with_omap} omap
%kernel_variant_files %{with_tegra} tegra
@@ -2175,8 +2396,349 @@ fi
# ||----w |
# || ||
%changelog
+* Thu Jan 5 2012 Alexandre Oliva <lxoliva@fsfla.org> -libre
+- Libre-libre 3.2-libre.
+- Patch brcmfmac for GCC 4.7-ish.
+
+* Thu Jan 05 2012 Dave Jones <davej@redhat.com> - 3.2.0-2
+- Disable debugging options.
+
+* Wed Jan 04 2012 Dave Jones <davej@redhat.com> 3.2.0-1
+- Linux 3.2
+
+* Wed Jan 04 2012 Dave Jones <davej@redhat.com> 3.2.0-0.rc7.git5.1
+- Linux 3.2-rc7-git5 (157e8bf8b4823bfcdefa6c1548002374b61f61df)
+
+* Tue Jan 03 2012 John W. Linville <linville@redhat.com>
+- Avoid unnecessary modprobe invocations during compat-wireless build
+
+* Tue Jan 03 2012 Josh Boyer <jwboyer@redhat.com>
+- Add bluetooth support for BCM20102A0 21e3 (rhbz 770233)
+
+* Tue Jan 03 2012 John W. Linville <linville@redhat.com>
+- Re-enable CONFIG_RT2800PCI_RT53XX in compat-wireless build (rhbz #720594)
+
+* Mon Jan 02 2012 Dave Jones <davej@redhat.com> - 3.2.0-0.rc7.git4.1
+- Linux 3.2-rc7-git4 (115e8e705e4be071b9e06ff72578e3b603f2ba65)
+
+* Sat Dec 31 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc7.git3.1
+- Linux 3.2-rc7-git3 (06867fbb8abc936192195e5dcc4b63e12cc78f72)
+
+* Fri Dec 30 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc7.git2.1
+- Linux 3.2-rc7-git2 (89307babf966165171547f105e2253dec261cfa5)
+
+* Wed Dec 28 2011 Dave Jones <davej@redhat.com>
+- Disable unnecessary CONFIG_NET_DCCPPROBE
+
+* Wed Dec 28 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc7.git1.1
+- Linux 3.2-rc7-git1 (371de6e4e0042adf4f9b54c414154f57414ddd37)
+
+* Sat Dec 24 2011 Kyle McMartin <kyle@redhat.com> - 3.2.0-0.rc7.git0.1
+- Linux 3.2-rc7
+
+* Fri Dec 23 2011 Dennis Gilmore <dennis@ausil.us>
+- build imx highbank and kirkwood kernels on arm
+- clean up arm config options
+
+* Thu Dec 22 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc6.git3.1
+- Linux 3.2-rc6-git3 (ecefc36b41ac0fe92d76273a23faf27b2da13411)
+
+* Tue Dec 20 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc6.git2.1
+- Linux 3.2-rc6-git2 (a4a4923919f2d43583789b1f3603f4e5600d8321)
+
+* Tue Dec 20 2011 Josh Boyer <jwboyer@redhat.com>
+- Include crtsaves.o for ppc64 as well (rhbz #769415)
+- Drop EDID headers patch from 751589 for now (rhbz #769103)
+
+* Mon Dec 19 2011 John W. Linville <linville@redhat.com>
+- modpost: add option to allow external modules to avoid taint
+- Make integrated compat-wireless take advantage of the above
+- Turn-on backports again, since TAINT_OOT_MODULE issue is resolved
+- Update compat-wireless snapshot from 2011-12-18
+
+* Mon Dec 19 2011 Dave Jones <davej@redhat.com>
+- Switch x86-code-dump-fix-truncation.patch to use the pending upstream fix.
+
+* Mon Dec 19 2011 Dave Jones <davej@redhat.com>
+- Disable IMA. (Forces TPM on, which may be undesirable: See 733964, 746097)
+ Move TPM modules to modules-extra
+
+* Mon Dec 19 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc6.git1.1
+- Linux 3.2-rc6-git1 (390f998509bf049019df0b078c0a6606e0d57fb4)
+
+* Sat Dec 17 2011 Josh Boyer <jwboyer@redhat.com> - 3.2.0-0.rc6.git0.1
+- Linux 3.2-rc6
+
+* Fri Dec 16 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc5.git4.1
+- Linux 3.2-rc5-git4 (6f12d2ee52dcf97dcefdadbd500e7650311eaa6a)
+
+* Fri Dec 16 2011 Ben Skeggs <bskeggs@redhat.com>
+- Add patch to do a better job of dealing with busted EDID headers (rhbz#751589)
+
+* Thu Dec 15 2011 Josh Boyer <jwboyer@redhat.com> - 3.2.0-0.rc5.git3.1
+- Linux 3.2-rc5-git3 (55b02d2f4445ad625213817a1736bf2884d32547)
+
+* Thu Dec 15 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc5.git2.4
+- Disable Intel IOMMU by default.
+
+* Thu Dec 15 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc5.git2.3
+- Change configfs to be built-in. (rhbz 767432)
+
+* Wed Dec 14 2011 Steve Dickson <steved@redhat.com> 3.2.0-0.rc5.git2.2.fc17
+- Enabled the in-kernel idmapper.
+- keyring: allow special keyrings to be cleared
+
+* Wed Dec 14 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc5.git2.1
+- Linux 3.2-rc5-git2 (373da0a2a33018d560afcb2c77f8842985d79594)
+
+* Tue Dec 13 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc5.git1.1
+- Linux 3.2-rc5-git1 (442ee5a942834431ccf0b412e3cf7bb9ae97ff4e)
+
+* Tue Dec 13 2011 Dave Jones <davej@redhat.com>
+- Disable FDDI/SKFP.
+
+* Tue Dec 13 2011 Josh Boyer <jwboyer@redhat.com>
+- mod-extras: Don't fail the build if a module is listed that isn't built
+- Remove extraneous settings and enable Radeon KMS for powerpc (via Will Woods)
+
+* Mon Dec 12 2011 John W. Linville <linville@redhat.com>
+- Turn-off backports until TAINT_OOT_MODULE issue is resolved
+
+* Mon Dec 12 2011 Josh Boyer <jwboyer@redhat.com>
+- Disable backports on arches where we don't actually build a kernel (or config)
+
+* Sun Dec 11 2011 Kyle McMartin <kyle@redhat.com> - 3.0.0-0.rc5.git0.1
+- Linux 3.2-rc5
+
+* Fri Dec 09 2011 John W. Linville <linville@redhat.com>
+- Do a better job of cleaning-up compat-wireless between builds
+
+* Fri Dec 09 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc4.git6.1
+- Linux 3.2-rc4-git6 (09d9673d53005fdf40de4c759425893904292236)
+
+* Thu Dec 08 2011 Josh Boyer <jwboyer@redhat.com>
+- Add patch from Jeff Layton to fix suspend with NFS (rhbz #717735)
+
+* Wed Dec 07 2011 Dave Jones <davej@redhat.com> - 3.2.0-0.rc4.git5.2
+- Linux 3.2-rc4-git5 (77a7300abad7fe01891b400e88d746f97307ee5a)
+
+* Wed Dec 07 2011 Dave Jones <davej@redhat.com>
+- Turn DEBUG_PAGEALLOC back off.
+
+* Wed Dec 07 2011 Chuck Ebbert <cebbert@redhat.com>
+- Attempt to fix rhbz #736815 by printing spaces before the brackets
+
+* Tue Dec 06 2011 Dave Jones <davej@redhat.com> 3.2.0-0.rc4.git4.2.fc17
+- Linux 3.2-rc4-git2 (b835c0f47f725d864bf2545f10c733b754bb6d51)
+
+* Tue Dec 06 2011 Dave Jones <davej@redhat.com>
+- Turn on DEBUG_PAGEALLOC for a day.
+
+* Tue Dec 06 2011 Dave Jones <davej@redhat.com>
+- Linux 3.2-rc4-git2 (45e713efe2fa574b6662e7fb63fae9497c5e03d4)
+
+* Tue Dec 06 2011 Josh Boyer <jwboyer@redhat.com>
+- Move 802.1q and yenta_socket back into the main kernel package
+
+* Mon Dec 05 2011 Josh Boyer <jwboyer@redhat.com>
+- Only print the apm_cpu_idle message once (rhbz #760341)
+
+* Mon Dec 05 2011 Dave Jones <davej@redhat.com>
+- Enable CONFIG_BSD_ACCT_V3. Should be safe since psacct-6.5.4-4.fc14.
+
+* Mon Dec 05 2011 Dave Jones <davej@redhat.com> 3.2.0-0.rc4.git2.1.fc17
+- Linux 3.2-rc4-git2 (8e8da023f5af71662867729db5547dc54786093c)
+
+* Sat Dec 03 2011 John W. Linville <linville@redhat.com>
+- Add compat-wireless patch to define module_usb_driver
+
+* Fri Dec 02 2011 John W. Linville <linville@redhat.com>
+- Revise compat-wireless configuration
+- Update compat-wireless snapshot
+- Enable with-backports by default
+
+* Fri Dec 02 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc4.git1.4.fc17
+- Backport ALPS touchpad patches from input/next branch (rhbz #590880)
+- Apply patch from John Linville to reverse modules-extra dependency order
+- Put ssb.ko back in the main kernel package
+
+* Fri Dec 02 2011 Dave Jones <davej@redhat.com> 3.2.0-0.rc4.git1.3.fc17
+- Enable Poulsbo DRM.
+
+* Fri Dec 02 2011 Dave Jones <davej@redhat.com>
+- Linux 3.2-rc4-git1 (5983fe2b29df5885880d7fa3b91aca306c7564ef)
+ dropped: rtlwifi-fix-lps_lock-deadlock.patch (applied upstream)
+
+* Fri Dec 02 2011 Josh Boyer <jwboyer@redhat.com>
+- Adjust Requires for modules-extra pacakge to rely on kernel-uname-r
+
+* Thu Dec 01 2011 Dave Jones <davej@redhat.com>
+- Linux 3.2-rc4
+
+* Thu Dec 01 2011 Dave Jones <davej@redhat.com>
+- Linux 3.2-rc3-git2 (b930c26416c4ea6855726fd977145ccea9afbdda)
+
+* Tue Nov 29 2011 Josh Boyer <jwboyer@redhat.com>
+- Add modules-extra subpackage
+- Drop drm-intel-make-lvds-work.patch (rhbz #731296)
+- Add patch to fix deadlock in rtlwifi (rhbz #755154)
+
+* Tue Nov 29 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc3.git1.1
+- Linux 3.2-rc3-git1
+
+* Thu Nov 24 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc3.git0.1
+- Linux 3.2-rc3. Gobble.
+
+* Wed Nov 23 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git8.1
+- Linux 3.2-rc2-git8
+
+* Tue Nov 22 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git7.1
+- Linux 3.2-rc2-git7
+
+* Mon Nov 21 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git6.1
+- Linux 3.2-rc2-git6
+- Update utrace.patch from Oleg Nesterov
+
+* Mon Nov 21 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git5.1
+- Linux 3.2-rc2-git5
+
+* Sun Nov 20 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git4.1
+- Linux 3.2-rc2-git4
+
+* Fri Nov 18 2011 Josh Boyer <jwboyer@redhat.com> 3.2.0-0.rc2.git3.1
+- Linux 3.2-rc2-git3
+- Disable various fb and drm drivers that don't have xorg equivalents per ajax
+- Other minor config cleanup
+
+* Thu Nov 17 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc2-git2
+
+* Thu Nov 17 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Drop Obsoletes/Provides from kernel-tools onto perf.
+
+* Wed Nov 16 2011 John W. Linville <linville@redhat.com>
+- Add compat-wireless as an option for kernel build
+
+* Wed Nov 16 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Work around #663080 and restore building 'perf' on s390x (we don't need
+ kernel-tools since cpuspeed isn't needed on s390...)
+- Restore %{perf_make} to ensure CFLAGS doesn't change across building
+ perf.
+
+* Wed Nov 16 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc2-git1
+
+* Mon Nov 14 2011 Josh Boyer <jwboyer@redhat.com>
+- Patch from Joshua Roys to add rtl8192* to modules.networking (rhbz 753645)
+- Add patch to fix ip6_tunnel naming (rhbz 751165)
+- Quite warning in apm_cpu_idle (rhbz 753776)
+
+* Mon Nov 14 2011 Josh Boyer <jwboyer@redhat.com>
+- CVE-2011-4131: nfs4_getfacl decoding kernel oops (rhbz 753236)
+- Linux 3.2-rc1-git4
+
+* Sat Nov 12 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc1-git3
+
+* Fri Nov 11 2011 Chuck Ebbert <cebbert@redhat.com>
+- Use the same naming scheme as rawhide for -stable RC kernels
+ (e.g. 3.1.1-0.rc1.1 instead of 3.1.1-1.rc1)
+
+* Fri Nov 11 2011 Josh Boyer <jwboyer@redhat.com>
+- Add reworked pci ASPM patch from Matthew Garrett
+
+* Fri Nov 11 2011 John W. Linville <linville@redhat.com>
+- Remove overlap between bcma/b43 and brcmsmac and reenable bcm4331
+
+* Thu Nov 10 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc1-git2
+
+* Wed Nov 09 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc1-git1
+- Enable the brcm80211 modules now that they have left staging
+
+* Tue Nov 08 2011 Josh Boyer <jwboyer@redhat.com>
+- Add python-perf-debuginfo package (rhbz 752140)
+
+* Tue Nov 08 2011 Neil Horman <nhorman@redhat.com>
+- Add msi irq ennumeration per dev in sysfs (bz 744012)
+
+* Tue Nov 08 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.2-rc1
+
+* Mon Nov 07 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git7
+- Drop override for XEN_MAX_DOMAIN_MEMORY (rhbz 751789)
+- Add fixes from git://openlinux.windriver.com/people/paulg/modsplit-post-merge
+- Add two patches to fix mac80211 issues (rhbz 731365)
+
+* Fri Nov 04 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git6
+
+* Thu Nov 03 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git5
+
+* Tue Nov 01 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git4
+
+* Tue Nov 01 2011 Dave Jones <davej@redhat.com>
+- allow building the perf rpm for ARM (rhbz 741325)
+
+* Tue Nov 01 2011 Dave Jones <davej@redhat.com>
+- Add another Sony laptop to the nonvs blacklist. (rhbz 641789)
+
+* Tue Nov 01 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Restore perf sub-package so that sparc64 and s390x get their
+ perf back.
+
+* Mon Oct 31 2011 Josh Boyer <jwboyer@redhat.com>
+-CVE-2011-4097: oom_badness() integer overflow (rhbz 750402)
+
+* Mon Oct 31 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Build a python-perf subpackage.
+
+* Mon Oct 31 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git3. Happy Halloween.
+
+* Fri Oct 28 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git2
+
+* Thu Oct 27 2011 Josh Boyer <jwboyer@redhat.com>
+- Drop ia64
+- Drop alpha
+
+* Wed Oct 26 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Make some config changes caught during a review:
+ - CONFIG_SOC_CAMERA: disable, it's only for some ARM boards
+ - CONFIG_MEDIA_ALTERA_CI=m: needed for some DVB boards
+ - CONFIG_DEBUG_BLK_CGROUP: stop setting it twice...
+
+* Wed Oct 26 2011 Chuck Ebbert <cebbert@redhat.com>
+- Add build option "--with=release" to build a non-debug kernel in rawhide.
+
+* Wed Oct 26 2011 Josh Boyer <jwboyer@redhat.com>
+- Linux 3.1-git1
+
+* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
+- Rebuilt for glibc bug#747377
+
+* Wed Oct 26 2011 Kyle McMartin <kmcmartin@redhat.com>
+- Drop kernel-firmware subpackage. We've had linux-firmware around for
+ enough releases now.
+- ppc64/ppc vdso patches have been upstream for ages.
+- Install vdso on s390/s390x.
+- Fedora 8 was a very long time ago... fancy_debuginfo turns into
+ with_debuginfo in the glorious future.
+- Disable CONFIG_CC_OPTIMIZE_FOR_SIZE, upstream consensus is -O2 has
+ generated better code than -Os for a while
+ (https://lkml.org/lkml/2009/11/26/57)
+- Drop vanilla-% targets, and other Makefile cruft which has been bit
+ rotting for years.
+- Dump %rhel config bits which are not used in Fedora.
+- Drop dead Source0 hacks from the 2.6->3.0 transition.
+
* Wed Oct 26 2011 Josh Boyer <jwboyer@redhat.com>
-- Add patch to fix XFS memory corruption (rhbz 749166)
+- CVE-2011-4077: xfs: potential buffer overflow in xfs_readlink() (rhbz 749166)
* Tue Oct 25 2011 Josh Boyer <jwboyer@redhat.com>
- CVE-2011-3347: be2net: promiscuous mode and non-member VLAN packets DoS (rhbz 748691)
diff --git a/freed-ora/current/master/linux-2.6-debug-taint-vm.patch b/freed-ora/current/master/linux-2.6-debug-taint-vm.patch
deleted file mode 100644
index 672509db2..000000000
--- a/freed-ora/current/master/linux-2.6-debug-taint-vm.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index 4e8985a..70d0853 100644
---- a/mm/page_alloc.c
-+++ b/mm/page_alloc.c
-@@ -318,6 +318,7 @@ static void bad_page(struct page *page)
- current->comm, page_to_pfn(page));
- dump_page(page);
-
-+ print_modules();
- dump_stack();
- out:
- /* Leave bad fields for debug, except PageBuddy could make trouble */
-diff --git a/mm/slab.c b/mm/slab.c
-index d96e223..6f8905b 100644
---- a/mm/slab.c
-+++ b/mm/slab.c
-@@ -1886,8 +1886,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
- /* Print header */
- if (lines == 0) {
- printk(KERN_ERR
-- "Slab corruption: %s start=%p, len=%d\n",
-- cachep->name, realobj, size);
-+ "Slab corruption (%s): %s start=%p, len=%d\n",
-+ print_tainted(), cachep->name, realobj, size);
- print_objinfo(cachep, objp, 0);
- }
- /* Hexdump the affected line */
-@@ -2985,8 +2985,8 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
- if (entries != cachep->num - slabp->inuse) {
- bad:
- printk(KERN_ERR "slab: Internal list corruption detected in "
-- "cache '%s'(%d), slabp %p(%d). Hexdump:\n",
-- cachep->name, cachep->num, slabp, slabp->inuse);
-+ "cache '%s'(%d), slabp %p(%d). Tainted(%s). Hexdump:\n",
-+ cachep->name, cachep->num, slabp, slabp->inuse, print_tainted());
- for (i = 0;
- i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
- i++) {
-diff --git a/mm/slub.c b/mm/slub.c
-index 35f351f..e7ccb39 100644
---- a/mm/slub.c
-+++ b/mm/slub.c
-@@ -472,7 +472,7 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
- va_end(args);
- printk(KERN_ERR "========================================"
- "=====================================\n");
-- printk(KERN_ERR "BUG %s: %s\n", s->name, buf);
-+ printk(KERN_ERR "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
- printk(KERN_ERR "----------------------------------------"
- "-------------------------------------\n\n");
- }
diff --git a/freed-ora/current/master/linux-2.6-e1000-ich9-montevina.patch b/freed-ora/current/master/linux-2.6-e1000-ich9-montevina.patch
index d45fd5673..ec38a3902 100644
--- a/freed-ora/current/master/linux-2.6-e1000-ich9-montevina.patch
+++ b/freed-ora/current/master/linux-2.6-e1000-ich9-montevina.patch
@@ -1,11 +1,22 @@
+From 802e6d8c8477a553a677b23a247d6d2638e01958 Mon Sep 17 00:00:00 2001
+From: Dave Jones <davej@redhat.com>
+Date: Wed, 26 Oct 2011 13:31:47 -0400
+Subject: [PATCH] e1000e: ich9 montevina
+
This only showed up in one SDV (Montevina).
The PCIE slots don't seem to like network cards, so this is the only hope
to get networking working. It's never going upstream, but it's low impact
enough to carry just to keep those SDVs working.
+---
+ drivers/net/ethernet/intel/e1000e/ich8lan.c | 6 ++++++
+ drivers/net/ethernet/intel/e1000e/netdev.c | 1 +
+ 2 files changed, 7 insertions(+), 0 deletions(-)
---- linux-2.6.35.noarch/drivers/net/e1000e/ich8lan.c~ 2010-09-29 17:53:13.000000000 -0400
-+++ linux-2.6.35.noarch/drivers/net/e1000e/ich8lan.c 2010-09-29 17:54:00.000000000 -0400
-@@ -424,6 +424,12 @@ static s32 e1000_init_phy_params_ich8lan
+diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
+index 6a17c62..0e40975 100644
+--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
++++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
+@@ -452,6 +452,12 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
/* Verify phy id */
switch (phy->id) {
@@ -18,9 +29,11 @@ enough to carry just to keep those SDVs working.
case IGP03E1000_E_PHY_ID:
phy->type = e1000_phy_igp_3;
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
---- linux-2.6.35.noarch/drivers/net/e1000e/netdev.c~ 2010-09-29 17:54:07.000000000 -0400
-+++ linux-2.6.35.noarch/drivers/net/e1000e/netdev.c 2010-09-29 17:54:29.000000000 -0400
-@@ -5994,6 +5994,7 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci
+diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
+index a855db1..edac30b 100644
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c
++++ b/drivers/net/ethernet/intel/e1000e/netdev.c
+@@ -6359,6 +6359,7 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = {
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V), board_ich9lan },
@@ -28,3 +41,6 @@ enough to carry just to keep those SDVs working.
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF), board_ich9lan },
+--
+1.7.6.4
+
diff --git a/freed-ora/current/master/linux-2.6-intel-iommu-igfx.patch b/freed-ora/current/master/linux-2.6-intel-iommu-igfx.patch
index b2f8f19e3..3a45abaec 100644
--- a/freed-ora/current/master/linux-2.6-intel-iommu-igfx.patch
+++ b/freed-ora/current/master/linux-2.6-intel-iommu-igfx.patch
@@ -1,6 +1,7 @@
-Subject: [PATCH] [intel_iommu] Default to igfx_off
+From 602e1f209dd983e40d989e871cd253e8187899b8 Mon Sep 17 00:00:00 2001
From: drago01 <drago01@gmail.com>
-To: fedora-kernel-list <fedora-kernel-list@redhat.com>
+Date: Wed, 26 Oct 2011 13:37:27 -0400
+Subject: [PATCH] Default to igfx_off
This option seems to causes way to many issues, it is
being investigated by Intel's chipset team for months now and
@@ -16,14 +17,14 @@ Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
---
Documentation/kernel-parameters.txt | 11 +++++------
- drivers/pci/intel-iommu.c | 9 +++++----
+ drivers/iommu/intel-iommu.c | 9 +++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index e7848a0..9914485 100644
+index 81c287f..ee5693b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
-@@ -992,12 +992,11 @@ and is between 256 and 4096 characters. It is defined in the file
+@@ -1014,12 +1014,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
Enable intel iommu driver.
off
Disable intel iommu driver.
@@ -40,22 +41,22 @@ index e7848a0..9914485 100644
+ mapped as normal device.
forcedac [x86_64]
With this option iommu will not optimize to look
- for io virtual address below 32 bit forcing dual
-diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
-index 4173125..8f36786 100644
+ for io virtual address below 32-bit forcing dual
+diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
+index bdc447f..240db6b 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
-@@ -340,7 +340,8 @@ int dmar_disabled = 0;
- int dmar_disabled = 1;
- #endif /*CONFIG_DMAR_DEFAULT_ON*/
-
+@@ -408,7 +408,8 @@ int dmar_disabled = 1;
+ int intel_iommu_enabled = 0;
+ EXPORT_SYMBOL_GPL(intel_iommu_enabled);
+
-static int dmar_map_gfx = 1;
+/* disabled by default; causes way too many issues */
+static int dmar_map_gfx = 0;
static int dmar_forcedac;
static int intel_iommu_strict;
-
-@@ -361,10 +362,10 @@ static int __init intel_iommu_setup(char *str)
+ static int intel_iommu_superpage = 1;
+@@ -433,10 +434,10 @@ static int __init intel_iommu_setup(char *str)
} else if (!strncmp(str, "off", 3)) {
dmar_disabled = 1;
printk(KERN_INFO "Intel-IOMMU: disabled\n");
@@ -70,9 +71,5 @@ index 4173125..8f36786 100644
printk(KERN_INFO
"Intel-IOMMU: Forcing DAC for PCI devices\n");
--
-1.6.6.1
-_______________________________________________
-kernel mailing list
-kernel@lists.fedoraproject.org
-https://admin.fedoraproject.org/mailman/listinfo/kernel
+1.7.7.4
diff --git a/freed-ora/current/master/linux-3.1-keys-remove-special-keyring.patch b/freed-ora/current/master/linux-3.1-keys-remove-special-keyring.patch
new file mode 100644
index 000000000..4e7f1395b
--- /dev/null
+++ b/freed-ora/current/master/linux-3.1-keys-remove-special-keyring.patch
@@ -0,0 +1,110 @@
+diff -up linux-3.1.x86_64/Documentation/networking/dns_resolver.txt.orig linux-3.1.x86_64/Documentation/networking/dns_resolver.txt
+--- linux-3.1.x86_64/Documentation/networking/dns_resolver.txt.orig 2011-10-24 03:10:05.000000000 -0400
++++ linux-3.1.x86_64/Documentation/networking/dns_resolver.txt 2011-12-13 15:09:35.705766078 -0500
+@@ -102,6 +102,10 @@ implemented in the module can be called
+ If _expiry is non-NULL, the expiry time (TTL) of the result will be
+ returned also.
+
++The kernel maintains an internal keyring in which it caches looked up keys.
++This can be cleared by any process that has the CAP_SYS_ADMIN capability by
++the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
++
+
+ ===============================
+ READING DNS KEYS FROM USERSPACE
+diff -up linux-3.1.x86_64/Documentation/security/keys.txt.orig linux-3.1.x86_64/Documentation/security/keys.txt
+--- linux-3.1.x86_64/Documentation/security/keys.txt.orig 2011-10-24 03:10:05.000000000 -0400
++++ linux-3.1.x86_64/Documentation/security/keys.txt 2011-12-13 15:09:35.706766099 -0500
+@@ -554,6 +554,10 @@ The keyctl syscall functions are:
+ process must have write permission on the keyring, and it must be a
+ keyring (or else error ENOTDIR will result).
+
++ This function can also be used to clear special kernel keyrings if they
++ are appropriately marked if the user has CAP_SYS_ADMIN capability. The
++ DNS resolver cache keyring is an example of this.
++
+
+ (*) Link a key into a keyring:
+
+diff -up linux-3.1.x86_64/fs/cifs/cifsacl.c.orig linux-3.1.x86_64/fs/cifs/cifsacl.c
+--- linux-3.1.x86_64/fs/cifs/cifsacl.c.orig 2011-12-13 12:54:12.221145867 -0500
++++ linux-3.1.x86_64/fs/cifs/cifsacl.c 2011-12-13 15:09:35.707766122 -0500
+@@ -556,6 +556,7 @@ init_cifs_idmap(void)
+
+ /* instruct request_key() to use this special keyring as a cache for
+ * the results it looks up */
++ set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags);
+ cred->thread_keyring = keyring;
+ cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
+ root_cred = cred;
+diff -up linux-3.1.x86_64/fs/nfs/idmap.c.orig linux-3.1.x86_64/fs/nfs/idmap.c
+--- linux-3.1.x86_64/fs/nfs/idmap.c.orig 2011-12-13 12:54:14.657203507 -0500
++++ linux-3.1.x86_64/fs/nfs/idmap.c 2011-12-13 15:10:14.731681691 -0500
+@@ -115,6 +115,7 @@ int nfs_idmap_init(void)
+ if (ret < 0)
+ goto failed_put_key;
+
++ set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags);
+ cred->thread_keyring = keyring;
+ cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
+ id_resolver_cache = cred;
+@@ -185,7 +186,7 @@ static ssize_t nfs_idmap_request_key(con
+ }
+
+ rcu_read_lock();
+- rkey->perm |= KEY_USR_VIEW;
++ rkey->perm |= KEY_USR_VIEW|KEY_USR_WRITE;
+
+ ret = key_validate(rkey);
+ if (ret < 0)
+diff -up linux-3.1.x86_64/include/linux/key.h.orig linux-3.1.x86_64/include/linux/key.h
+--- linux-3.1.x86_64/include/linux/key.h.orig 2011-10-24 03:10:05.000000000 -0400
++++ linux-3.1.x86_64/include/linux/key.h 2011-12-13 15:09:35.748767078 -0500
+@@ -155,6 +155,7 @@ struct key {
+ #define KEY_FLAG_IN_QUOTA 3 /* set if key consumes quota */
+ #define KEY_FLAG_USER_CONSTRUCT 4 /* set if key is being constructed in userspace */
+ #define KEY_FLAG_NEGATIVE 5 /* set if key is negative */
++#define KEY_FLAG_ROOT_CAN_CLEAR 6 /* set if key can be cleared by root without permission */
+
+ /* the description string
+ * - this is used to match a key against search criteria
+diff -up linux-3.1.x86_64/net/dns_resolver/dns_key.c.orig linux-3.1.x86_64/net/dns_resolver/dns_key.c
+--- linux-3.1.x86_64/net/dns_resolver/dns_key.c.orig 2011-10-24 03:10:05.000000000 -0400
++++ linux-3.1.x86_64/net/dns_resolver/dns_key.c 2011-12-13 15:09:35.748767078 -0500
+@@ -281,6 +281,7 @@ static int __init init_dns_resolver(void
+
+ /* instruct request_key() to use this special keyring as a cache for
+ * the results it looks up */
++ set_bit(KEY_FLAG_ROOT_CAN_CLEAR, &keyring->flags);
+ cred->thread_keyring = keyring;
+ cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING;
+ dns_resolver_cache = cred;
+diff -up linux-3.1.x86_64/security/keys/keyctl.c.orig linux-3.1.x86_64/security/keys/keyctl.c
+--- linux-3.1.x86_64/security/keys/keyctl.c.orig 2011-12-13 12:54:30.322571289 -0500
++++ linux-3.1.x86_64/security/keys/keyctl.c 2011-12-13 15:09:35.756767271 -0500
+@@ -388,11 +388,24 @@ long keyctl_keyring_clear(key_serial_t r
+ keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE);
+ if (IS_ERR(keyring_ref)) {
+ ret = PTR_ERR(keyring_ref);
++
++ /* Root is permitted to invalidate certain special keyrings */
++ if (capable(CAP_SYS_ADMIN)) {
++ keyring_ref = lookup_user_key(ringid, 0, 0);
++ if (IS_ERR(keyring_ref))
++ goto error;
++ if (test_bit(KEY_FLAG_ROOT_CAN_CLEAR,
++ &key_ref_to_ptr(keyring_ref)->flags))
++ goto clear;
++ goto error_put;
++ }
++
+ goto error;
+ }
+
++clear:
+ ret = keyring_clear(key_ref_to_ptr(keyring_ref));
+-
++error_put:
+ key_ref_put(keyring_ref);
+ error:
+ return ret;
diff --git a/freed-ora/current/master/linux-3.1-libre.tar.bz2.sign b/freed-ora/current/master/linux-3.1-libre.tar.bz2.sign
deleted file mode 100644
index ae85d3b80..000000000
--- a/freed-ora/current/master/linux-3.1-libre.tar.bz2.sign
+++ /dev/null
@@ -1,7 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iEYEABECAAYFAk6lz4UACgkQvLfPh359R6eNFgCdEs43/MsXseasK9UXpmk51NIv
-RdAAnAzmQCE2NL3gL5cJBSWyKTwYC7tM
-=IPnc
------END PGP SIGNATURE-----
diff --git a/freed-ora/current/master/linux-3.1-libre.xdelta.bz2 b/freed-ora/current/master/linux-3.1-libre.xdelta.bz2
deleted file mode 100644
index 3d94ad053..000000000
--- a/freed-ora/current/master/linux-3.1-libre.xdelta.bz2
+++ /dev/null
Binary files differ
diff --git a/freed-ora/current/master/linux-3.1-libre.xdelta.bz2.sign b/freed-ora/current/master/linux-3.1-libre.xdelta.bz2.sign
deleted file mode 100644
index b26bff3b2..000000000
--- a/freed-ora/current/master/linux-3.1-libre.xdelta.bz2.sign
+++ /dev/null
@@ -1,7 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iEYEABECAAYFAk6lz8cACgkQvLfPh359R6cR1ACfXiIfberhh1bG6XhVF0XNKaUD
-d/cAnjeWP+hVBXrUemM36tfaf22xQfqY
-=58/0
------END PGP SIGNATURE-----
diff --git a/freed-ora/current/master/linux-3.2-brcmfmac-gcc47.patch b/freed-ora/current/master/linux-3.2-brcmfmac-gcc47.patch
new file mode 100644
index 000000000..5e4ddcfa7
--- /dev/null
+++ b/freed-ora/current/master/linux-3.2-brcmfmac-gcc47.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+index 5eddabe..eda1d4e 100644
+--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
++++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+@@ -2463,7 +2463,7 @@ static s32 brcmf_init_iscan(struct brcmf_cfg80211_priv *cfg_priv)
+ return err;
+ }
+
+-static void brcmf_delay(u32 ms)
++static __always_inline void brcmf_delay(u32 ms)
+ {
+ if (ms < 1000 / HZ) {
+ cond_resched();
diff --git a/freed-ora/current/master/linux-3.2-libre.tar.bz2.sign b/freed-ora/current/master/linux-3.2-libre.tar.bz2.sign
new file mode 100644
index 000000000..2b1b2696a
--- /dev/null
+++ b/freed-ora/current/master/linux-3.2-libre.tar.bz2.sign
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iEYEABECAAYFAk8FcjYACgkQvLfPh359R6dr1QCZAT0H8PUbMQDNVWYPdXkvGdG/
+yqMAn1vykdfzAlYI6m9lVO6J/ORSzH/z
+=0hhx
+-----END PGP SIGNATURE-----
diff --git a/freed-ora/current/master/linux-3.2-libre.xdelta.bz2 b/freed-ora/current/master/linux-3.2-libre.xdelta.bz2
new file mode 100644
index 000000000..83a668fac
--- /dev/null
+++ b/freed-ora/current/master/linux-3.2-libre.xdelta.bz2
Binary files differ
diff --git a/freed-ora/current/master/linux-3.2-libre.xdelta.bz2.sign b/freed-ora/current/master/linux-3.2-libre.xdelta.bz2.sign
new file mode 100644
index 000000000..bada72c28
--- /dev/null
+++ b/freed-ora/current/master/linux-3.2-libre.xdelta.bz2.sign
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iEYEABECAAYFAk8FcjkACgkQvLfPh359R6dTkACfXvGBJpZv3qxO4J/dRhcRA65V
+uSwAmgIkhAwXvzcXd9NP5LgCQenbVBPX
+=Vqoc
+-----END PGP SIGNATURE-----
diff --git a/freed-ora/current/master/media-DiBcom-protect-the-I2C-bufer-access.patch b/freed-ora/current/master/media-DiBcom-protect-the-I2C-bufer-access.patch
deleted file mode 100644
index 1b2a54b86..000000000
--- a/freed-ora/current/master/media-DiBcom-protect-the-I2C-bufer-access.patch
+++ /dev/null
@@ -1,1150 +0,0 @@
-From: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
-Date: Wed, 3 Aug 2011 15:08:21 +0000 (-0300)
-Subject: [media] DiBcom: protect the I2C bufer access
-X-Git-Tag: next-20110927~67^2~4^2~225
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=79fcce3230b140f7675f8529ee53fe2f9644f902
-
-[media] DiBcom: protect the I2C bufer access
-
-This patch protects the I2C buffer access in order to manage concurrent
-access. This protection is done using mutex.
-Furthermore, for the dib9000, if a pid filtering command is
-received during the tuning, this pid filtering command is delayed to
-avoid any concurrent access issue.
-
-Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
-Cc: Florian Mickler <florian@mickler.org>
-Cc: stable@kernel.org
-Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
-Signed-off-by: Patrick Boettcher <Patrick.Boettcher@dibcom.fr>
-Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
----
-
-diff --git a/drivers/media/dvb/frontends/dib0070.c b/drivers/media/dvb/frontends/dib0070.c
-index 1d47d4d..dc1cb17 100644
---- a/drivers/media/dvb/frontends/dib0070.c
-+++ b/drivers/media/dvb/frontends/dib0070.c
-@@ -27,6 +27,7 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-
- #include "dvb_frontend.h"
-
-@@ -78,10 +79,18 @@ struct dib0070_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[3];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
--static uint16_t dib0070_read_reg(struct dib0070_state *state, u8 reg)
-+static u16 dib0070_read_reg(struct dib0070_state *state, u8 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = reg;
-
- memset(state->msg, 0, 2 * sizeof(struct i2c_msg));
-@@ -96,13 +105,23 @@ static uint16_t dib0070_read_reg(struct dib0070_state *state, u8 reg)
-
- if (i2c_transfer(state->i2c, state->msg, 2) != 2) {
- printk(KERN_WARNING "DiB0070 I2C read failed\n");
-- return 0;
-- }
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ ret = 0;
-+ } else
-+ ret = (state->i2c_read_buffer[0] << 8)
-+ | state->i2c_read_buffer[1];
-+
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static int dib0070_write_reg(struct dib0070_state *state, u8 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
- state->i2c_write_buffer[0] = reg;
- state->i2c_write_buffer[1] = val >> 8;
- state->i2c_write_buffer[2] = val & 0xff;
-@@ -115,9 +134,12 @@ static int dib0070_write_reg(struct dib0070_state *state, u8 reg, u16 val)
-
- if (i2c_transfer(state->i2c, state->msg, 1) != 1) {
- printk(KERN_WARNING "DiB0070 I2C write failed\n");
-- return -EREMOTEIO;
-- }
-- return 0;
-+ ret = -EREMOTEIO;
-+ } else
-+ ret = 0;
-+
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- #define HARD_RESET(state) do { \
-@@ -734,6 +756,7 @@ struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter
- state->cfg = cfg;
- state->i2c = i2c;
- state->fe = fe;
-+ mutex_init(&state->i2c_buffer_lock);
- fe->tuner_priv = state;
-
- if (dib0070_reset(fe) != 0)
-diff --git a/drivers/media/dvb/frontends/dib0090.c b/drivers/media/dvb/frontends/dib0090.c
-index c9c935a..b174d1c 100644
---- a/drivers/media/dvb/frontends/dib0090.c
-+++ b/drivers/media/dvb/frontends/dib0090.c
-@@ -27,6 +27,7 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-
- #include "dvb_frontend.h"
-
-@@ -196,6 +197,7 @@ struct dib0090_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[3];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- struct dib0090_fw_state {
-@@ -208,10 +210,18 @@ struct dib0090_fw_state {
- struct i2c_msg msg;
- u8 i2c_write_buffer[2];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- static u16 dib0090_read_reg(struct dib0090_state *state, u8 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = reg;
-
- memset(state->msg, 0, 2 * sizeof(struct i2c_msg));
-@@ -226,14 +236,24 @@ static u16 dib0090_read_reg(struct dib0090_state *state, u8 reg)
-
- if (i2c_transfer(state->i2c, state->msg, 2) != 2) {
- printk(KERN_WARNING "DiB0090 I2C read failed\n");
-- return 0;
-- }
-+ ret = 0;
-+ } else
-+ ret = (state->i2c_read_buffer[0] << 8)
-+ | state->i2c_read_buffer[1];
-
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static int dib0090_write_reg(struct dib0090_state *state, u32 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- state->i2c_write_buffer[0] = reg & 0xff;
- state->i2c_write_buffer[1] = val >> 8;
- state->i2c_write_buffer[2] = val & 0xff;
-@@ -246,13 +266,23 @@ static int dib0090_write_reg(struct dib0090_state *state, u32 reg, u16 val)
-
- if (i2c_transfer(state->i2c, state->msg, 1) != 1) {
- printk(KERN_WARNING "DiB0090 I2C write failed\n");
-- return -EREMOTEIO;
-- }
-- return 0;
-+ ret = -EREMOTEIO;
-+ } else
-+ ret = 0;
-+
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static u16 dib0090_fw_read_reg(struct dib0090_fw_state *state, u8 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = reg;
-
- memset(&state->msg, 0, sizeof(struct i2c_msg));
-@@ -262,13 +292,24 @@ static u16 dib0090_fw_read_reg(struct dib0090_fw_state *state, u8 reg)
- state->msg.len = 2;
- if (i2c_transfer(state->i2c, &state->msg, 1) != 1) {
- printk(KERN_WARNING "DiB0090 I2C read failed\n");
-- return 0;
-- }
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ ret = 0;
-+ } else
-+ ret = (state->i2c_read_buffer[0] << 8)
-+ | state->i2c_read_buffer[1];
-+
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static int dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- state->i2c_write_buffer[0] = val >> 8;
- state->i2c_write_buffer[1] = val & 0xff;
-
-@@ -279,9 +320,12 @@ static int dib0090_fw_write_reg(struct dib0090_fw_state *state, u8 reg, u16 val)
- state->msg.len = 2;
- if (i2c_transfer(state->i2c, &state->msg, 1) != 1) {
- printk(KERN_WARNING "DiB0090 I2C write failed\n");
-- return -EREMOTEIO;
-- }
-- return 0;
-+ ret = -EREMOTEIO;
-+ } else
-+ ret = 0;
-+
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- #define HARD_RESET(state) do { if (cfg->reset) { if (cfg->sleep) cfg->sleep(fe, 0); msleep(10); cfg->reset(fe, 1); msleep(10); cfg->reset(fe, 0); msleep(10); } } while (0)
-@@ -2440,6 +2484,7 @@ struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapte
- st->config = config;
- st->i2c = i2c;
- st->fe = fe;
-+ mutex_init(&st->i2c_buffer_lock);
- fe->tuner_priv = st;
-
- if (config->wbd == NULL)
-@@ -2471,6 +2516,7 @@ struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_ada
- st->config = config;
- st->i2c = i2c;
- st->fe = fe;
-+ mutex_init(&st->i2c_buffer_lock);
- fe->tuner_priv = st;
-
- if (dib0090_fw_reset_digital(fe, st->config) != 0)
-diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c
-index 79cb1c2..dbb76d7 100644
---- a/drivers/media/dvb/frontends/dib7000m.c
-+++ b/drivers/media/dvb/frontends/dib7000m.c
-@@ -11,6 +11,7 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-
- #include "dvb_frontend.h"
-
-@@ -55,6 +56,7 @@ struct dib7000m_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[4];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- enum dib7000m_power_mode {
-@@ -69,6 +71,13 @@ enum dib7000m_power_mode {
-
- static u16 dib7000m_read_word(struct dib7000m_state *state, u16 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = (reg >> 8) | 0x80;
- state->i2c_write_buffer[1] = reg & 0xff;
-
-@@ -85,11 +94,21 @@ static u16 dib7000m_read_word(struct dib7000m_state *state, u16 reg)
- if (i2c_transfer(state->i2c_adap, state->msg, 2) != 2)
- dprintk("i2c read error on %d",reg);
-
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ mutex_unlock(&state->i2c_buffer_lock);
-+
-+ return ret;
- }
-
- static int dib7000m_write_word(struct dib7000m_state *state, u16 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- state->i2c_write_buffer[0] = (reg >> 8) & 0xff;
- state->i2c_write_buffer[1] = reg & 0xff;
- state->i2c_write_buffer[2] = (val >> 8) & 0xff;
-@@ -101,7 +120,10 @@ static int dib7000m_write_word(struct dib7000m_state *state, u16 reg, u16 val)
- state->msg[0].buf = state->i2c_write_buffer;
- state->msg[0].len = 4;
-
-- return i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -EREMOTEIO : 0;
-+ ret = (i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ?
-+ -EREMOTEIO : 0);
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
- static void dib7000m_write_tab(struct dib7000m_state *state, u16 *buf)
- {
-@@ -1385,6 +1407,7 @@ struct dvb_frontend * dib7000m_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
- demod = &st->demod;
- demod->demodulator_priv = st;
- memcpy(&st->demod.ops, &dib7000m_ops, sizeof(struct dvb_frontend_ops));
-+ mutex_init(&st->i2c_buffer_lock);
-
- st->timf_default = cfg->bw->timf;
-
-diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c
-index a64a538..4eb9c2b 100644
---- a/drivers/media/dvb/frontends/dib7000p.c
-+++ b/drivers/media/dvb/frontends/dib7000p.c
-@@ -10,6 +10,7 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-
- #include "dvb_math.h"
- #include "dvb_frontend.h"
-@@ -68,6 +69,7 @@ struct dib7000p_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[4];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- enum dib7000p_power_mode {
-@@ -81,6 +83,13 @@ static int dib7090_set_diversity_in(struct dvb_frontend *fe, int onoff);
-
- static u16 dib7000p_read_word(struct dib7000p_state *state, u16 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = reg >> 8;
- state->i2c_write_buffer[1] = reg & 0xff;
-
-@@ -97,11 +106,20 @@ static u16 dib7000p_read_word(struct dib7000p_state *state, u16 reg)
- if (i2c_transfer(state->i2c_adap, state->msg, 2) != 2)
- dprintk("i2c read error on %d", reg);
-
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static int dib7000p_write_word(struct dib7000p_state *state, u16 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- state->i2c_write_buffer[0] = (reg >> 8) & 0xff;
- state->i2c_write_buffer[1] = reg & 0xff;
- state->i2c_write_buffer[2] = (val >> 8) & 0xff;
-@@ -113,7 +131,10 @@ static int dib7000p_write_word(struct dib7000p_state *state, u16 reg, u16 val)
- state->msg[0].buf = state->i2c_write_buffer;
- state->msg[0].len = 4;
-
-- return i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ? -EREMOTEIO : 0;
-+ ret = (i2c_transfer(state->i2c_adap, state->msg, 1) != 1 ?
-+ -EREMOTEIO : 0);
-+ mutex_unlock(&state->i2c_buffer_lock);
-+ return ret;
- }
-
- static void dib7000p_write_tab(struct dib7000p_state *state, u16 * buf)
-@@ -1646,6 +1667,7 @@ int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 defau
- return -ENOMEM;
-
- dpst->i2c_adap = i2c;
-+ mutex_init(&dpst->i2c_buffer_lock);
-
- for (k = no_of_demods - 1; k >= 0; k--) {
- dpst->cfg = cfg[k];
-@@ -2324,6 +2346,7 @@ struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
- demod = &st->demod;
- demod->demodulator_priv = st;
- memcpy(&st->demod.ops, &dib7000p_ops, sizeof(struct dvb_frontend_ops));
-+ mutex_init(&st->i2c_buffer_lock);
-
- dib7000p_write_word(st, 1287, 0x0003); /* sram lead in, rdy */
-
-@@ -2333,8 +2356,9 @@ struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
- st->version = dib7000p_read_word(st, 897);
-
- /* FIXME: make sure the dev.parent field is initialized, or else
-- request_firmware() will hit an OOPS (this should be moved somewhere
-- more common) */
-+ request_firmware() will hit an OOPS (this should be moved somewhere
-+ more common) */
-+ st->i2c_master.gated_tuner_i2c_adap.dev.parent = i2c_adap->dev.parent;
-
- /* FIXME: make sure the dev.parent field is initialized, or else
- request_firmware() will hit an OOPS (this should be moved somewhere
-diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c
-index 7d2ea11..fe284d5 100644
---- a/drivers/media/dvb/frontends/dib8000.c
-+++ b/drivers/media/dvb/frontends/dib8000.c
-@@ -10,6 +10,8 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-+
- #include "dvb_math.h"
-
- #include "dvb_frontend.h"
-@@ -37,6 +39,7 @@ struct i2c_device {
- u8 addr;
- u8 *i2c_write_buffer;
- u8 *i2c_read_buffer;
-+ struct mutex *i2c_buffer_lock;
- };
-
- struct dib8000_state {
-@@ -77,6 +80,7 @@ struct dib8000_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[4];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- enum dib8000_power_mode {
-@@ -86,24 +90,39 @@ enum dib8000_power_mode {
-
- static u16 dib8000_i2c_read16(struct i2c_device *i2c, u16 reg)
- {
-+ u16 ret;
- struct i2c_msg msg[2] = {
-- {.addr = i2c->addr >> 1, .flags = 0,
-- .buf = i2c->i2c_write_buffer, .len = 2},
-- {.addr = i2c->addr >> 1, .flags = I2C_M_RD,
-- .buf = i2c->i2c_read_buffer, .len = 2},
-+ {.addr = i2c->addr >> 1, .flags = 0, .len = 2},
-+ {.addr = i2c->addr >> 1, .flags = I2C_M_RD, .len = 2},
- };
-
-+ if (mutex_lock_interruptible(i2c->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
-+ msg[0].buf = i2c->i2c_write_buffer;
- msg[0].buf[0] = reg >> 8;
- msg[0].buf[1] = reg & 0xff;
-+ msg[1].buf = i2c->i2c_read_buffer;
-
- if (i2c_transfer(i2c->adap, msg, 2) != 2)
- dprintk("i2c read error on %d", reg);
-
-- return (msg[1].buf[0] << 8) | msg[1].buf[1];
-+ ret = (msg[1].buf[0] << 8) | msg[1].buf[1];
-+ mutex_unlock(i2c->i2c_buffer_lock);
-+ return ret;
- }
-
- static u16 dib8000_read_word(struct dib8000_state *state, u16 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- state->i2c_write_buffer[0] = reg >> 8;
- state->i2c_write_buffer[1] = reg & 0xff;
-
-@@ -120,7 +139,10 @@ static u16 dib8000_read_word(struct dib8000_state *state, u16 reg)
- if (i2c_transfer(state->i2c.adap, state->msg, 2) != 2)
- dprintk("i2c read error on %d", reg);
-
-- return (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ ret = (state->i2c_read_buffer[0] << 8) | state->i2c_read_buffer[1];
-+ mutex_unlock(&state->i2c_buffer_lock);
-+
-+ return ret;
- }
-
- static u32 dib8000_read32(struct dib8000_state *state, u16 reg)
-@@ -135,22 +157,35 @@ static u32 dib8000_read32(struct dib8000_state *state, u16 reg)
-
- static int dib8000_i2c_write16(struct i2c_device *i2c, u16 reg, u16 val)
- {
-- struct i2c_msg msg = {.addr = i2c->addr >> 1, .flags = 0,
-- .buf = i2c->i2c_write_buffer, .len = 4};
-+ struct i2c_msg msg = {.addr = i2c->addr >> 1, .flags = 0, .len = 4};
- int ret = 0;
-
-+ if (mutex_lock_interruptible(i2c->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
-+ msg.buf = i2c->i2c_write_buffer;
- msg.buf[0] = (reg >> 8) & 0xff;
- msg.buf[1] = reg & 0xff;
- msg.buf[2] = (val >> 8) & 0xff;
- msg.buf[3] = val & 0xff;
-
- ret = i2c_transfer(i2c->adap, &msg, 1) != 1 ? -EREMOTEIO : 0;
-+ mutex_unlock(i2c->i2c_buffer_lock);
-
- return ret;
- }
-
- static int dib8000_write_word(struct dib8000_state *state, u16 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- state->i2c_write_buffer[0] = (reg >> 8) & 0xff;
- state->i2c_write_buffer[1] = reg & 0xff;
- state->i2c_write_buffer[2] = (val >> 8) & 0xff;
-@@ -162,7 +197,11 @@ static int dib8000_write_word(struct dib8000_state *state, u16 reg, u16 val)
- state->msg[0].buf = state->i2c_write_buffer;
- state->msg[0].len = 4;
-
-- return i2c_transfer(state->i2c.adap, state->msg, 1) != 1 ? -EREMOTEIO : 0;
-+ ret = (i2c_transfer(state->i2c.adap, state->msg, 1) != 1 ?
-+ -EREMOTEIO : 0);
-+ mutex_unlock(&state->i2c_buffer_lock);
-+
-+ return ret;
- }
-
- static const s16 coeff_2k_sb_1seg_dqpsk[8] = {
-@@ -2434,8 +2473,15 @@ int dib8000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 defau
- if (!client.i2c_read_buffer) {
- dprintk("%s: not enough memory", __func__);
- ret = -ENOMEM;
-- goto error_memory;
-+ goto error_memory_read;
-+ }
-+ client.i2c_buffer_lock = kzalloc(sizeof(struct mutex), GFP_KERNEL);
-+ if (!client.i2c_buffer_lock) {
-+ dprintk("%s: not enough memory", __func__);
-+ ret = -ENOMEM;
-+ goto error_memory_lock;
- }
-+ mutex_init(client.i2c_buffer_lock);
-
- for (k = no_of_demods - 1; k >= 0; k--) {
- /* designated i2c address */
-@@ -2476,8 +2522,10 @@ int dib8000_i2c_enumeration(struct i2c_adapter *host, int no_of_demods, u8 defau
- }
-
- error:
-+ kfree(client.i2c_buffer_lock);
-+error_memory_lock:
- kfree(client.i2c_read_buffer);
--error_memory:
-+error_memory_read:
- kfree(client.i2c_write_buffer);
-
- return ret;
-@@ -2581,6 +2629,8 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, s
- state->i2c.addr = i2c_addr;
- state->i2c.i2c_write_buffer = state->i2c_write_buffer;
- state->i2c.i2c_read_buffer = state->i2c_read_buffer;
-+ mutex_init(&state->i2c_buffer_lock);
-+ state->i2c.i2c_buffer_lock = &state->i2c_buffer_lock;
- state->gpio_val = cfg->gpio_val;
- state->gpio_dir = cfg->gpio_dir;
-
-diff --git a/drivers/media/dvb/frontends/dib9000.c b/drivers/media/dvb/frontends/dib9000.c
-index a085588..b931074 100644
---- a/drivers/media/dvb/frontends/dib9000.c
-+++ b/drivers/media/dvb/frontends/dib9000.c
-@@ -38,6 +38,15 @@ struct i2c_device {
- #define DibInitLock(lock) mutex_init(lock)
- #define DibFreeLock(lock)
-
-+struct dib9000_pid_ctrl {
-+#define DIB9000_PID_FILTER_CTRL 0
-+#define DIB9000_PID_FILTER 1
-+ u8 cmd;
-+ u8 id;
-+ u16 pid;
-+ u8 onoff;
-+};
-+
- struct dib9000_state {
- struct i2c_device i2c;
-
-@@ -99,6 +108,10 @@ struct dib9000_state {
- struct i2c_msg msg[2];
- u8 i2c_write_buffer[255];
- u8 i2c_read_buffer[255];
-+ DIB_LOCK demod_lock;
-+ u8 get_frontend_internal;
-+ struct dib9000_pid_ctrl pid_ctrl[10];
-+ s8 pid_ctrl_index; /* -1: empty list; -2: do not use the list */
- };
-
- static const u32 fe_info[44] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-@@ -1743,19 +1756,56 @@ EXPORT_SYMBOL(dib9000_set_gpio);
- int dib9000_fw_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
- {
- struct dib9000_state *state = fe->demodulator_priv;
-- u16 val = dib9000_read_word(state, 294 + 1) & 0xffef;
-+ u16 val;
-+ int ret;
-+
-+ if ((state->pid_ctrl_index != -2) && (state->pid_ctrl_index < 9)) {
-+ /* postpone the pid filtering cmd */
-+ dprintk("pid filter cmd postpone");
-+ state->pid_ctrl_index++;
-+ state->pid_ctrl[state->pid_ctrl_index].cmd = DIB9000_PID_FILTER_CTRL;
-+ state->pid_ctrl[state->pid_ctrl_index].onoff = onoff;
-+ return 0;
-+ }
-+
-+ DibAcquireLock(&state->demod_lock);
-+
-+ val = dib9000_read_word(state, 294 + 1) & 0xffef;
- val |= (onoff & 0x1) << 4;
-
- dprintk("PID filter enabled %d", onoff);
-- return dib9000_write_word(state, 294 + 1, val);
-+ ret = dib9000_write_word(state, 294 + 1, val);
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
-+
- }
- EXPORT_SYMBOL(dib9000_fw_pid_filter_ctrl);
-
- int dib9000_fw_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff)
- {
- struct dib9000_state *state = fe->demodulator_priv;
-+ int ret;
-+
-+ if (state->pid_ctrl_index != -2) {
-+ /* postpone the pid filtering cmd */
-+ dprintk("pid filter postpone");
-+ if (state->pid_ctrl_index < 9) {
-+ state->pid_ctrl_index++;
-+ state->pid_ctrl[state->pid_ctrl_index].cmd = DIB9000_PID_FILTER;
-+ state->pid_ctrl[state->pid_ctrl_index].id = id;
-+ state->pid_ctrl[state->pid_ctrl_index].pid = pid;
-+ state->pid_ctrl[state->pid_ctrl_index].onoff = onoff;
-+ } else
-+ dprintk("can not add any more pid ctrl cmd");
-+ return 0;
-+ }
-+
-+ DibAcquireLock(&state->demod_lock);
- dprintk("Index %x, PID %d, OnOff %d", id, pid, onoff);
-- return dib9000_write_word(state, 300 + 1 + id, onoff ? (1 << 13) | pid : 0);
-+ ret = dib9000_write_word(state, 300 + 1 + id,
-+ onoff ? (1 << 13) | pid : 0);
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
- EXPORT_SYMBOL(dib9000_fw_pid_filter);
-
-@@ -1778,6 +1828,7 @@ static void dib9000_release(struct dvb_frontend *demod)
- DibFreeLock(&state->platform.risc.mbx_lock);
- DibFreeLock(&state->platform.risc.mem_lock);
- DibFreeLock(&state->platform.risc.mem_mbx_lock);
-+ DibFreeLock(&state->demod_lock);
- dibx000_exit_i2c_master(&st->i2c_master);
-
- i2c_del_adapter(&st->tuner_adap);
-@@ -1795,14 +1846,19 @@ static int dib9000_sleep(struct dvb_frontend *fe)
- {
- struct dib9000_state *state = fe->demodulator_priv;
- u8 index_frontend;
-- int ret;
-+ int ret = 0;
-
-+ DibAcquireLock(&state->demod_lock);
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
- ret = state->fe[index_frontend]->ops.sleep(state->fe[index_frontend]);
- if (ret < 0)
-- return ret;
-+ goto error;
- }
-- return dib9000_mbx_send(state, OUT_MSG_FE_SLEEP, NULL, 0);
-+ ret = dib9000_mbx_send(state, OUT_MSG_FE_SLEEP, NULL, 0);
-+
-+error:
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
-
- static int dib9000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune)
-@@ -1816,7 +1872,10 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- struct dib9000_state *state = fe->demodulator_priv;
- u8 index_frontend, sub_index_frontend;
- fe_status_t stat;
-- int ret;
-+ int ret = 0;
-+
-+ if (state->get_frontend_internal == 0)
-+ DibAcquireLock(&state->demod_lock);
-
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
- state->fe[index_frontend]->ops.read_status(state->fe[index_frontend], &stat);
-@@ -1846,14 +1905,15 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- state->fe[index_frontend]->dtv_property_cache.rolloff;
- }
- }
-- return 0;
-+ ret = 0;
-+ goto return_value;
- }
- }
-
- /* get the channel from master chip */
- ret = dib9000_fw_get_channel(fe, fep);
- if (ret != 0)
-- return ret;
-+ goto return_value;
-
- /* synchronize the cache with the other frontends */
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
-@@ -1866,8 +1926,12 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- state->fe[index_frontend]->dtv_property_cache.code_rate_LP = fe->dtv_property_cache.code_rate_LP;
- state->fe[index_frontend]->dtv_property_cache.rolloff = fe->dtv_property_cache.rolloff;
- }
-+ ret = 0;
-
-- return 0;
-+return_value:
-+ if (state->get_frontend_internal == 0)
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
-
- static int dib9000_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tune_state)
-@@ -1912,6 +1976,10 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- dprintk("dib9000: must specify bandwidth ");
- return 0;
- }
-+
-+ state->pid_ctrl_index = -1; /* postpone the pid filtering cmd */
-+ DibAcquireLock(&state->demod_lock);
-+
- fe->dtv_property_cache.delivery_system = SYS_DVBT;
-
- /* set the master status */
-@@ -1974,13 +2042,18 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- /* check the tune result */
- if (exit_condition == 1) { /* tune failed */
- dprintk("tune failed");
-+ DibReleaseLock(&state->demod_lock);
-+ /* tune failed; put all the pid filtering cmd to junk */
-+ state->pid_ctrl_index = -1;
- return 0;
- }
-
- dprintk("tune success on frontend%i", index_frontend_success);
-
- /* synchronize all the channel cache */
-+ state->get_frontend_internal = 1;
- dib9000_get_frontend(state->fe[0], fep);
-+ state->get_frontend_internal = 0;
-
- /* retune the other frontends with the found channel */
- channel_status.status = CHANNEL_STATUS_PARAMETERS_SET;
-@@ -2025,6 +2098,28 @@ static int dib9000_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
- /* turn off the diversity for the last frontend */
- dib9000_fw_set_diversity_in(state->fe[index_frontend - 1], 0);
-
-+ DibReleaseLock(&state->demod_lock);
-+ if (state->pid_ctrl_index >= 0) {
-+ u8 index_pid_filter_cmd;
-+ u8 pid_ctrl_index = state->pid_ctrl_index;
-+
-+ state->pid_ctrl_index = -2;
-+ for (index_pid_filter_cmd = 0;
-+ index_pid_filter_cmd <= pid_ctrl_index;
-+ index_pid_filter_cmd++) {
-+ if (state->pid_ctrl[index_pid_filter_cmd].cmd == DIB9000_PID_FILTER_CTRL)
-+ dib9000_fw_pid_filter_ctrl(state->fe[0],
-+ state->pid_ctrl[index_pid_filter_cmd].onoff);
-+ else if (state->pid_ctrl[index_pid_filter_cmd].cmd == DIB9000_PID_FILTER)
-+ dib9000_fw_pid_filter(state->fe[0],
-+ state->pid_ctrl[index_pid_filter_cmd].id,
-+ state->pid_ctrl[index_pid_filter_cmd].pid,
-+ state->pid_ctrl[index_pid_filter_cmd].onoff);
-+ }
-+ }
-+ /* do not postpone any more the pid filtering */
-+ state->pid_ctrl_index = -2;
-+
- return 0;
- }
-
-@@ -2041,6 +2136,7 @@ static int dib9000_read_status(struct dvb_frontend *fe, fe_status_t * stat)
- u8 index_frontend;
- u16 lock = 0, lock_slave = 0;
-
-+ DibAcquireLock(&state->demod_lock);
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++)
- lock_slave |= dib9000_read_lock(state->fe[index_frontend]);
-
-@@ -2059,6 +2155,8 @@ static int dib9000_read_status(struct dvb_frontend *fe, fe_status_t * stat)
- if ((lock & 0x0008) || (lock_slave & 0x0008))
- *stat |= FE_HAS_LOCK;
-
-+ DibReleaseLock(&state->demod_lock);
-+
- return 0;
- }
-
-@@ -2066,10 +2164,14 @@ static int dib9000_read_ber(struct dvb_frontend *fe, u32 * ber)
- {
- struct dib9000_state *state = fe->demodulator_priv;
- u16 *c;
-+ int ret = 0;
-
-+ DibAcquireLock(&state->demod_lock);
- DibAcquireLock(&state->platform.risc.mem_mbx_lock);
-- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0)
-- return -EIO;
-+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) {
-+ ret = -EIO;
-+ goto error;
-+ }
- dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR,
- state->i2c_read_buffer, 16 * 2);
- DibReleaseLock(&state->platform.risc.mem_mbx_lock);
-@@ -2077,7 +2179,10 @@ static int dib9000_read_ber(struct dvb_frontend *fe, u32 * ber)
- c = (u16 *)state->i2c_read_buffer;
-
- *ber = c[10] << 16 | c[11];
-- return 0;
-+
-+error:
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
-
- static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength)
-@@ -2086,7 +2191,9 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength)
- u8 index_frontend;
- u16 *c = (u16 *)state->i2c_read_buffer;
- u16 val;
-+ int ret = 0;
-
-+ DibAcquireLock(&state->demod_lock);
- *strength = 0;
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++) {
- state->fe[index_frontend]->ops.read_signal_strength(state->fe[index_frontend], &val);
-@@ -2097,8 +2204,10 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength)
- }
-
- DibAcquireLock(&state->platform.risc.mem_mbx_lock);
-- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0)
-- return -EIO;
-+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) {
-+ ret = -EIO;
-+ goto error;
-+ }
- dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR, (u8 *) c, 16 * 2);
- DibReleaseLock(&state->platform.risc.mem_mbx_lock);
-
-@@ -2107,7 +2216,10 @@ static int dib9000_read_signal_strength(struct dvb_frontend *fe, u16 * strength)
- *strength = 65535;
- else
- *strength += val;
-- return 0;
-+
-+error:
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
-
- static u32 dib9000_get_snr(struct dvb_frontend *fe)
-@@ -2151,6 +2263,7 @@ static int dib9000_read_snr(struct dvb_frontend *fe, u16 * snr)
- u8 index_frontend;
- u32 snr_master;
-
-+ DibAcquireLock(&state->demod_lock);
- snr_master = dib9000_get_snr(fe);
- for (index_frontend = 1; (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++)
- snr_master += dib9000_get_snr(state->fe[index_frontend]);
-@@ -2161,6 +2274,8 @@ static int dib9000_read_snr(struct dvb_frontend *fe, u16 * snr)
- } else
- *snr = 0;
-
-+ DibReleaseLock(&state->demod_lock);
-+
- return 0;
- }
-
-@@ -2168,15 +2283,22 @@ static int dib9000_read_unc_blocks(struct dvb_frontend *fe, u32 * unc)
- {
- struct dib9000_state *state = fe->demodulator_priv;
- u16 *c = (u16 *)state->i2c_read_buffer;
-+ int ret = 0;
-
-+ DibAcquireLock(&state->demod_lock);
- DibAcquireLock(&state->platform.risc.mem_mbx_lock);
-- if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0)
-- return -EIO;
-+ if (dib9000_fw_memmbx_sync(state, FE_SYNC_CHANNEL) < 0) {
-+ ret = -EIO;
-+ goto error;
-+ }
- dib9000_risc_mem_read(state, FE_MM_R_FE_MONITOR, (u8 *) c, 16 * 2);
- DibReleaseLock(&state->platform.risc.mem_mbx_lock);
-
- *unc = c[12];
-- return 0;
-+
-+error:
-+ DibReleaseLock(&state->demod_lock);
-+ return ret;
- }
-
- int dib9000_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, u8 first_addr)
-@@ -2322,6 +2444,10 @@ struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, c
- DibInitLock(&st->platform.risc.mbx_lock);
- DibInitLock(&st->platform.risc.mem_lock);
- DibInitLock(&st->platform.risc.mem_mbx_lock);
-+ DibInitLock(&st->demod_lock);
-+ st->get_frontend_internal = 0;
-+
-+ st->pid_ctrl_index = -2;
-
- st->fe[0] = fe;
- fe->demodulator_priv = st;
-diff --git a/drivers/media/dvb/frontends/dibx000_common.c b/drivers/media/dvb/frontends/dibx000_common.c
-index dc5d17a..774d507 100644
---- a/drivers/media/dvb/frontends/dibx000_common.c
-+++ b/drivers/media/dvb/frontends/dibx000_common.c
-@@ -1,4 +1,5 @@
- #include <linux/i2c.h>
-+#include <linux/mutex.h>
-
- #include "dibx000_common.h"
-
-@@ -10,6 +11,13 @@ MODULE_PARM_DESC(debug, "turn on debugging (default: 0)");
-
- static int dibx000_write_word(struct dibx000_i2c_master *mst, u16 reg, u16 val)
- {
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
- mst->i2c_write_buffer[0] = (reg >> 8) & 0xff;
- mst->i2c_write_buffer[1] = reg & 0xff;
- mst->i2c_write_buffer[2] = (val >> 8) & 0xff;
-@@ -21,11 +29,21 @@ static int dibx000_write_word(struct dibx000_i2c_master *mst, u16 reg, u16 val)
- mst->msg[0].buf = mst->i2c_write_buffer;
- mst->msg[0].len = 4;
-
-- return i2c_transfer(mst->i2c_adap, mst->msg, 1) != 1 ? -EREMOTEIO : 0;
-+ ret = i2c_transfer(mst->i2c_adap, mst->msg, 1) != 1 ? -EREMOTEIO : 0;
-+ mutex_unlock(&mst->i2c_buffer_lock);
-+
-+ return ret;
- }
-
- static u16 dibx000_read_word(struct dibx000_i2c_master *mst, u16 reg)
- {
-+ u16 ret;
-+
-+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return 0;
-+ }
-+
- mst->i2c_write_buffer[0] = reg >> 8;
- mst->i2c_write_buffer[1] = reg & 0xff;
-
-@@ -42,7 +60,10 @@ static u16 dibx000_read_word(struct dibx000_i2c_master *mst, u16 reg)
- if (i2c_transfer(mst->i2c_adap, mst->msg, 2) != 2)
- dprintk("i2c read error on %d", reg);
-
-- return (mst->i2c_read_buffer[0] << 8) | mst->i2c_read_buffer[1];
-+ ret = (mst->i2c_read_buffer[0] << 8) | mst->i2c_read_buffer[1];
-+ mutex_unlock(&mst->i2c_buffer_lock);
-+
-+ return ret;
- }
-
- static int dibx000_is_i2c_done(struct dibx000_i2c_master *mst)
-@@ -257,6 +278,7 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap,
- struct i2c_msg msg[], int num)
- {
- struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap);
-+ int ret;
-
- if (num > 32) {
- dprintk("%s: too much I2C message to be transmitted (%i).\
-@@ -264,10 +286,15 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap,
- return -ENOMEM;
- }
-
-- memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num));
--
- dibx000_i2c_select_interface(mst, DIBX000_I2C_INTERFACE_GPIO_6_7);
-
-+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+
-+ memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num));
-+
- /* open the gate */
- dibx000_i2c_gate_ctrl(mst, &mst->i2c_write_buffer[0], msg[0].addr, 1);
- mst->msg[0].addr = mst->i2c_addr;
-@@ -282,7 +309,11 @@ static int dibx000_i2c_gated_gpio67_xfer(struct i2c_adapter *i2c_adap,
- mst->msg[num + 1].buf = &mst->i2c_write_buffer[4];
- mst->msg[num + 1].len = 4;
-
-- return i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? num : -EIO;
-+ ret = (i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ?
-+ num : -EIO);
-+
-+ mutex_unlock(&mst->i2c_buffer_lock);
-+ return ret;
- }
-
- static struct i2c_algorithm dibx000_i2c_gated_gpio67_algo = {
-@@ -294,6 +325,7 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap,
- struct i2c_msg msg[], int num)
- {
- struct dibx000_i2c_master *mst = i2c_get_adapdata(i2c_adap);
-+ int ret;
-
- if (num > 32) {
- dprintk("%s: too much I2C message to be transmitted (%i).\
-@@ -301,10 +333,14 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap,
- return -ENOMEM;
- }
-
-- memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num));
--
- dibx000_i2c_select_interface(mst, DIBX000_I2C_INTERFACE_TUNER);
-
-+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+ memset(mst->msg, 0, sizeof(struct i2c_msg) * (2 + num));
-+
- /* open the gate */
- dibx000_i2c_gate_ctrl(mst, &mst->i2c_write_buffer[0], msg[0].addr, 1);
- mst->msg[0].addr = mst->i2c_addr;
-@@ -319,7 +355,10 @@ static int dibx000_i2c_gated_tuner_xfer(struct i2c_adapter *i2c_adap,
- mst->msg[num + 1].buf = &mst->i2c_write_buffer[4];
- mst->msg[num + 1].len = 4;
-
-- return i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ? num : -EIO;
-+ ret = (i2c_transfer(mst->i2c_adap, mst->msg, 2 + num) == 2 + num ?
-+ num : -EIO);
-+ mutex_unlock(&mst->i2c_buffer_lock);
-+ return ret;
- }
-
- static struct i2c_algorithm dibx000_i2c_gated_tuner_algo = {
-@@ -390,8 +429,18 @@ static int i2c_adapter_init(struct i2c_adapter *i2c_adap,
- int dibx000_init_i2c_master(struct dibx000_i2c_master *mst, u16 device_rev,
- struct i2c_adapter *i2c_adap, u8 i2c_addr)
- {
-- u8 tx[4];
-- struct i2c_msg m = {.addr = i2c_addr >> 1,.buf = tx,.len = 4 };
-+ int ret;
-+
-+ mutex_init(&mst->i2c_buffer_lock);
-+ if (mutex_lock_interruptible(&mst->i2c_buffer_lock) < 0) {
-+ dprintk("could not acquire lock");
-+ return -EINVAL;
-+ }
-+ memset(mst->msg, 0, sizeof(struct i2c_msg));
-+ mst->msg[0].addr = i2c_addr >> 1;
-+ mst->msg[0].flags = 0;
-+ mst->msg[0].buf = mst->i2c_write_buffer;
-+ mst->msg[0].len = 4;
-
- mst->device_rev = device_rev;
- mst->i2c_adap = i2c_adap;
-@@ -431,9 +480,12 @@ int dibx000_init_i2c_master(struct dibx000_i2c_master *mst, u16 device_rev,
- "DiBX000: could not initialize the master i2c_adapter\n");
-
- /* initialize the i2c-master by closing the gate */
-- dibx000_i2c_gate_ctrl(mst, tx, 0, 0);
-+ dibx000_i2c_gate_ctrl(mst, mst->i2c_write_buffer, 0, 0);
-+
-+ ret = (i2c_transfer(i2c_adap, mst->msg, 1) == 1);
-+ mutex_unlock(&mst->i2c_buffer_lock);
-
-- return i2c_transfer(i2c_adap, &m, 1) == 1;
-+ return ret;
- }
-
- EXPORT_SYMBOL(dibx000_init_i2c_master);
-diff --git a/drivers/media/dvb/frontends/dibx000_common.h b/drivers/media/dvb/frontends/dibx000_common.h
-index f031165..5e01147 100644
---- a/drivers/media/dvb/frontends/dibx000_common.h
-+++ b/drivers/media/dvb/frontends/dibx000_common.h
-@@ -33,6 +33,7 @@ struct dibx000_i2c_master {
- struct i2c_msg msg[34];
- u8 i2c_write_buffer[8];
- u8 i2c_read_buffer[2];
-+ struct mutex i2c_buffer_lock;
- };
-
- extern int dibx000_init_i2c_master(struct dibx000_i2c_master *mst,
diff --git a/freed-ora/current/master/media-dib0700-correct-error-message.patch b/freed-ora/current/master/media-dib0700-correct-error-message.patch
deleted file mode 100644
index 5e5d3bfa2..000000000
--- a/freed-ora/current/master/media-dib0700-correct-error-message.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From: Olivier Grenie <olivier.grenie@dibcom.fr>
-Date: Thu, 4 Aug 2011 16:10:03 +0000 (-0300)
-Subject: [media] dib0700: correct error message
-X-Git-Tag: next-20110927~67^2~4^2~223
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=680417bb318adc5f1f8f392730776176fbcdedd8
-
-[media] dib0700: correct error message
-
-The goal of this patch is to correct a previous patch. In case of error,
-the err() function should be used instead of dprintk() function.
-
-[mchehab@redhat.com: as I've replaced dprintk by deb_info, on the the
- previous patch, to avoid breaking bisect, I had to fix a merge conflict
- on this one]
-Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
-Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
----
-
-diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
-index a224e94..b693ed1 100644
---- a/drivers/media/dvb/dvb-usb/dib0700_core.c
-+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
-@@ -31,7 +31,7 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion,
- int ret;
-
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -117,7 +117,7 @@ int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_
- int ret;
-
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -138,7 +138,7 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets)
-
- if (st->fw_version >= 0x10201) {
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -227,7 +227,7 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
- } else {
- /* Write request */
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
- st->buf[0] = REQUEST_NEW_I2C_WRITE;
-@@ -273,7 +273,7 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
- if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
- return -EAGAIN;
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -368,7 +368,7 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll,
- int ret;
-
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -400,7 +400,7 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz)
- return -EINVAL;
-
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -560,7 +560,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
- }
-
- if (mutex_lock_interruptible(&adap->dev->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
-@@ -610,7 +610,7 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type)
- int new_proto, ret;
-
- if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-- deb_info("could not acquire lock");
-+ err("could not acquire lock");
- return 0;
- }
-
diff --git a/freed-ora/current/master/media-dib0700-protect-the-dib0700-buffer-access.patch b/freed-ora/current/master/media-dib0700-protect-the-dib0700-buffer-access.patch
deleted file mode 100644
index 109cab8ec..000000000
--- a/freed-ora/current/master/media-dib0700-protect-the-dib0700-buffer-access.patch
+++ /dev/null
@@ -1,248 +0,0 @@
-From: Olivier Grenie <olivier.grenie@dibcom.fr>
-Date: Mon, 1 Aug 2011 15:45:58 +0000 (-0300)
-Subject: [media] dib0700: protect the dib0700 buffer access
-X-Git-Tag: next-20110927~67^2~4^2~224
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git;a=commitdiff_plain;h=bff469f4167fdabfe15294f375577d7eadbaa1bb
-
-[media] dib0700: protect the dib0700 buffer access
-
-This patch protects the common buffer access inside the dib0700 in order
-to manage concurrent access. This protection is done using mutex.
-
-Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
-Cc: Florian Mickler <florian@mickler.org>
-Cc: stable@kernel.org
-Signed-off-by: Javier Marcet <javier@marcet.info>
-Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
-Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
-[mchehab@redhat.com: dprint requires 3 arguments. Replaced by dib_info]
-Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
----
-
-diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
-index 5eb91b4..a224e94 100644
---- a/drivers/media/dvb/dvb-usb/dib0700_core.c
-+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
-@@ -30,6 +30,11 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion,
- struct dib0700_state *st = d->priv;
- int ret;
-
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-+
- ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0),
- REQUEST_GET_VERSION,
- USB_TYPE_VENDOR | USB_DIR_IN, 0, 0,
-@@ -46,6 +51,7 @@ int dib0700_get_version(struct dvb_usb_device *d, u32 *hwversion,
- if (fwtype != NULL)
- *fwtype = (st->buf[12] << 24) | (st->buf[13] << 16) |
- (st->buf[14] << 8) | st->buf[15];
-+ mutex_unlock(&d->usb_mutex);
- return ret;
- }
-
-@@ -108,7 +114,12 @@ int dib0700_ctrl_rd(struct dvb_usb_device *d, u8 *tx, u8 txlen, u8 *rx, u8 rxlen
- int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_dir, u8 gpio_val)
- {
- struct dib0700_state *st = d->priv;
-- s16 ret;
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-
- st->buf[0] = REQUEST_SET_GPIO;
- st->buf[1] = gpio;
-@@ -116,6 +127,7 @@ int dib0700_set_gpio(struct dvb_usb_device *d, enum dib07x0_gpios gpio, u8 gpio_
-
- ret = dib0700_ctrl_wr(d, st->buf, 3);
-
-+ mutex_unlock(&d->usb_mutex);
- return ret;
- }
-
-@@ -125,6 +137,11 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets)
- int ret;
-
- if (st->fw_version >= 0x10201) {
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-+
- st->buf[0] = REQUEST_SET_USB_XFER_LEN;
- st->buf[1] = (nb_ts_packets >> 8) & 0xff;
- st->buf[2] = nb_ts_packets & 0xff;
-@@ -132,6 +149,7 @@ static int dib0700_set_usb_xfer_len(struct dvb_usb_device *d, u16 nb_ts_packets)
- deb_info("set the USB xfer len to %i Ts packet\n", nb_ts_packets);
-
- ret = dib0700_ctrl_wr(d, st->buf, 3);
-+ mutex_unlock(&d->usb_mutex);
- } else {
- deb_info("this firmware does not allow to change the USB xfer len\n");
- ret = -EIO;
-@@ -208,6 +226,10 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
-
- } else {
- /* Write request */
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
- st->buf[0] = REQUEST_NEW_I2C_WRITE;
- st->buf[1] = msg[i].addr << 1;
- st->buf[2] = (en_start << 7) | (en_stop << 6) |
-@@ -227,6 +249,7 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
- USB_TYPE_VENDOR | USB_DIR_OUT,
- 0, 0, st->buf, msg[i].len + 4,
- USB_CTRL_GET_TIMEOUT);
-+ mutex_unlock(&d->usb_mutex);
- if (result < 0) {
- deb_info("i2c write error (status = %d)\n", result);
- break;
-@@ -249,6 +272,10 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
-
- if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
- return -EAGAIN;
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-
- for (i = 0; i < num; i++) {
- /* fill in the address */
-@@ -279,6 +306,7 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
- break;
- }
- }
-+ mutex_unlock(&d->usb_mutex);
- mutex_unlock(&d->i2c_mutex);
-
- return i;
-@@ -337,7 +365,12 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll,
- u16 pll_loopdiv, u16 free_div, u16 dsuScaler)
- {
- struct dib0700_state *st = d->priv;
-- s16 ret;
-+ int ret;
-+
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-
- st->buf[0] = REQUEST_SET_CLOCK;
- st->buf[1] = (en_pll << 7) | (pll_src << 6) |
-@@ -352,6 +385,7 @@ static int dib0700_set_clock(struct dvb_usb_device *d, u8 en_pll,
- st->buf[9] = dsuScaler & 0xff; /* LSB */
-
- ret = dib0700_ctrl_wr(d, st->buf, 10);
-+ mutex_unlock(&d->usb_mutex);
-
- return ret;
- }
-@@ -360,10 +394,16 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz)
- {
- struct dib0700_state *st = d->priv;
- u16 divider;
-+ int ret;
-
- if (scl_kHz == 0)
- return -EINVAL;
-
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-+
- st->buf[0] = REQUEST_SET_I2C_PARAM;
- divider = (u16) (30000 / scl_kHz);
- st->buf[1] = 0;
-@@ -379,7 +419,11 @@ int dib0700_set_i2c_speed(struct dvb_usb_device *d, u16 scl_kHz)
- deb_info("setting I2C speed: %04x %04x %04x (%d kHz).",
- (st->buf[2] << 8) | (st->buf[3]), (st->buf[4] << 8) |
- st->buf[5], (st->buf[6] << 8) | st->buf[7], scl_kHz);
-- return dib0700_ctrl_wr(d, st->buf, 8);
-+
-+ ret = dib0700_ctrl_wr(d, st->buf, 8);
-+ mutex_unlock(&d->usb_mutex);
-+
-+ return ret;
- }
-
-
-@@ -515,6 +559,11 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
- }
- }
-
-+ if (mutex_lock_interruptible(&adap->dev->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-+
- st->buf[0] = REQUEST_ENABLE_VIDEO;
- /* this bit gives a kind of command,
- * rather than enabling something or not */
-@@ -548,7 +597,10 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
-
- deb_info("data for streaming: %x %x\n", st->buf[1], st->buf[2]);
-
-- return dib0700_ctrl_wr(adap->dev, st->buf, 4);
-+ ret = dib0700_ctrl_wr(adap->dev, st->buf, 4);
-+ mutex_unlock(&adap->dev->usb_mutex);
-+
-+ return ret;
- }
-
- int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type)
-@@ -557,6 +609,11 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type)
- struct dib0700_state *st = d->priv;
- int new_proto, ret;
-
-+ if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
-+ deb_info("could not acquire lock");
-+ return 0;
-+ }
-+
- st->buf[0] = REQUEST_SET_RC;
- st->buf[1] = 0;
- st->buf[2] = 0;
-@@ -567,23 +624,29 @@ int dib0700_change_protocol(struct rc_dev *rc, u64 rc_type)
- else if (rc_type == RC_TYPE_NEC)
- new_proto = 0;
- else if (rc_type == RC_TYPE_RC6) {
-- if (st->fw_version < 0x10200)
-- return -EINVAL;
-+ if (st->fw_version < 0x10200) {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-
- new_proto = 2;
-- } else
-- return -EINVAL;
-+ } else {
-+ ret = -EINVAL;
-+ goto out;
-+ }
-
- st->buf[1] = new_proto;
-
- ret = dib0700_ctrl_wr(d, st->buf, 3);
- if (ret < 0) {
- err("ir protocol setup failed");
-- return ret;
-+ goto out;
- }
-
- d->props.rc.core.protocol = rc_type;
-
-+out:
-+ mutex_unlock(&d->usb_mutex);
- return ret;
- }
-
diff --git a/freed-ora/current/master/mmc-Always-check-for-lower-base-frequency-quirk-for-.patch b/freed-ora/current/master/mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
deleted file mode 100644
index 2d7caad83..000000000
--- a/freed-ora/current/master/mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 65ff02dff67bf26a9c27d9aa11a30eaf3d28469e Mon Sep 17 00:00:00 2001
-From: Josh Boyer <jwboyer@redhat.com>
-Date: Wed, 5 Oct 2011 11:29:57 -0400
-Subject: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh
- 1180:e823
-
-Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
-base frequency. However, the quirk first checks to see if the proprietary
-MMC controller is disabled, and returns if so. On some devices, such as the
-Lenovo X220, the MMC controller is already disabled by firmware it seems,
-but the frequency change is still needed so sdhci-pci can talk to the cards.
-Since the MMC controller is disabled, the frequency fixup was never being run
-on these machines.
-
-This moves the e823 check above the MMC controller check so that it always
-gets run.
-
-This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
-
-Signed-off-by: Josh Boyer <jwboyer@redhat.com>
----
- drivers/pci/quirks.c | 28 ++++++++++++++--------------
- 1 files changed, 14 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
-index 1196f61..cec4629 100644
---- a/drivers/pci/quirks.c
-+++ b/drivers/pci/quirks.c
-@@ -2745,20 +2745,6 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
- /* disable must be done via function #0 */
- if (PCI_FUNC(dev->devfn))
- return;
--
-- pci_read_config_byte(dev, 0xCB, &disable);
--
-- if (disable & 0x02)
-- return;
--
-- pci_read_config_byte(dev, 0xCA, &write_enable);
-- pci_write_config_byte(dev, 0xCA, 0x57);
-- pci_write_config_byte(dev, 0xCB, disable | 0x02);
-- pci_write_config_byte(dev, 0xCA, write_enable);
--
-- dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
-- dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
--
- /*
- * RICOH 0xe823 SD/MMC card reader fails to recognize
- * certain types of SD/MMC cards. Lowering the SD base
-@@ -2781,6 +2767,20 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
-
- dev_notice(&dev->dev, "MMC controller base frequency changed to 50Mhz.\n");
- }
-+
-+ pci_read_config_byte(dev, 0xCB, &disable);
-+
-+ if (disable & 0x02)
-+ return;
-+
-+ pci_read_config_byte(dev, 0xCA, &write_enable);
-+ pci_write_config_byte(dev, 0xCA, 0x57);
-+ pci_write_config_byte(dev, 0xCB, disable | 0x02);
-+ pci_write_config_byte(dev, 0xCA, write_enable);
-+
-+ dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
-+ dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
-+
- }
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
- DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/mod-extra.list b/freed-ora/current/master/mod-extra.list
new file mode 100644
index 000000000..9311d6453
--- /dev/null
+++ b/freed-ora/current/master/mod-extra.list
@@ -0,0 +1,200 @@
+aer_inject.ko
+tcp_bic.ko
+tcp_westwood.ko
+tcp_htcp.ko
+tcp_highspeed.ko
+tcp_hybla.ko
+tcp_vegas.ko
+tcp_scalable.ko
+tcp_lp.ko
+tcp_veno.ko
+tcp_yeah.ko
+tcp_illinois.ko
+dccp_diag.ko
+dccp_ipv4.ko
+dccp_ipv6.ko
+dccp.ko
+dccp_probe.ko
+sctp.ko
+sctp_probe.ko
+rds.ko
+rds_rdma.ko
+rds_tcp.ko
+atm.ko
+br2684.ko
+clip.ko
+lec.ko
+pppoatm.ko
+l2tp_core.ko
+l2tp_debugfs.ko
+l2tp_eth.ko
+l2tp_ip.ko
+l2tp_netlink.ko
+l2tp_ppp.ko
+llc.ko
+ipx.ko
+appletalk.ko
+ipddp.ko
+wanrouter.ko
+phonet.ko
+pn_pep.ko
+af_802154.ko
+ieee802154.ko
+sch_atm.ko
+sch_cbq.ko
+sch_choke.ko
+sch_drr.ko
+sch_dsmark.ko
+sch_gred.ko
+sch_hfsc.ko
+sch_htb.ko
+sch_ingress.ko
+sch_mqprio.ko
+sch_multiq.ko
+sch_netem.ko
+sch_prio.ko
+sch_qfq.ko
+sch_red.ko
+sch_sfb.ko
+sch_sfq.ko
+sch_tbf.ko
+sch_teql.ko
+ax25.ko
+netrom.ko
+rose.ko
+6pack.ko
+baycom_par.ko
+baycom_ser_fdx.ko
+baycom_ser_hdx.ko
+bpqether.ko
+hdlcdrv.ko
+mkiss.ko
+yam.ko
+can.ko
+can-raw.ko
+can-bcm.ko
+can-dev.ko
+slcan.ko
+vcan.ko
+c_can.ko
+c_can_platform.ko
+ems_pci.ko
+kvaser_pci.ko
+plx_pci.ko
+sja1000.ko
+sja1000_platform.ko
+softing_cs.ko
+softing.ko
+ems_usb.ko
+esd_usb2.ko
+wimax.ko
+nfc.ko
+nci.ko
+mtd.ko
+chipreg.ko
+cfi_util.ko
+gen_probe.ko
+map_funcs.ko
+nand_ecc.ko
+nand_ids.ko
+r852.ko
+mtdblock.ko
+mtdblock_ro.ko
+ftl.ko
+nftl.ko
+rfd_ftl.ko
+inftl.ko
+ssfdc.ko
+mtdswap.ko
+mptbase.ko
+mptctl.ko
+mptfc.ko
+i2400m.ko
+hisax.ko
+hysdn.ko
+isdn.ko
+mISDN_core.ko
+mISDN_dsp.ko
+capi.ko
+dss1_divert.ko
+bas_gigaset.ko
+gigaset.ko
+avm_cs.ko
+b1.ko
+diva_idi.ko
+divas.ko
+avmfritz.ko
+hfcpci.ko
+hfcmulti.ko
+netjet.ko
+w6692.ko
+avma1_cs.ko
+elsa_cs.ko
+hfc4s8s_l1.ko
+joydev.ko
+a3d.ko
+adi.ko
+analog.ko
+cobra.ko
+db9.ko
+gamecon.ko
+gf2k.ko
+grip.ko
+grip_mp.ko
+guillemot.ko
+iforce.ko
+interact.ko
+joydump.ko
+magellan.ko
+sidewinder.ko
+spaceball.ko
+spaceorb.ko
+stinger.ko
+tmdc.ko
+turbografx.ko
+twidjoy.ko
+walkera0701.ko
+warrior.ko
+xpad.ko
+zhenhua.ko
+trancevibrator.ko
+umc.ko
+uwb.ko
+whci.ko
+hwa-rc.ko
+uio.ko
+uio_aec.ko
+uio_pci_generic.ko
+gfs2.ko
+ocfs2.ko
+ocfs2_stackglue.ko
+ocfs2_dlm.ko
+cuse.ko
+affs.ko
+befs.ko
+jffs2.ko
+ubifs.ko
+sysv.ko
+ufs.ko
+ncpfs.ko
+coda.ko
+9p.ko
+9pnet.ko
+act200l-sir.ko
+ali-ircc.ko
+esi-sir.ko
+tekram-sir.ko
+actisys-sir.ko
+girbil-sir.ko
+old_belkin-sir.ko
+kingsun-sir.ko
+ks959-sir.ko
+ksdazzle-sir.ko
+ma600-sir.ko
+mcp2120-sir.ko
+toim3232-sir.ko
+pps_core.ko
+tpm_atmel
+tpm_infineon
+tpm_nsc
+tpm_tis
diff --git a/freed-ora/current/master/modpost-add-option-to-allow-external-modules-to-avoi.patch b/freed-ora/current/master/modpost-add-option-to-allow-external-modules-to-avoi.patch
new file mode 100644
index 000000000..d20385457
--- /dev/null
+++ b/freed-ora/current/master/modpost-add-option-to-allow-external-modules-to-avoi.patch
@@ -0,0 +1,80 @@
+From 69f63a67165da5e9f08c1132521598701d914573 Mon Sep 17 00:00:00 2001
+From: John W. Linville <linville@tuxdriver.com>
+Date: Wed, 14 Dec 2011 11:09:04 -0500
+Subject: [PATCH] modpost: add option to allow external modules to avoid taint
+
+In some cases, it might be desirable to package a module from an
+external source tree alongside the base kernel. In those cases, it
+might also be desirable to not have those modules tainting the kernel.
+
+This patch provides a mechanism for an external module build to declare
+itself as an "integrated build". Such a module is then treated the same
+as an intree module.
+
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+Any thoughts on this? I'm thinking of adding this to Fedora kernels,
+where I have been working to integrate the compat-wireless package as
+part of the base kernel RPM.
+
+ scripts/Makefile.modpost | 1 +
+ scripts/mod/modpost.c | 10 ++++++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
+index 08dce14..160c6fb 100644
+--- a/scripts/Makefile.modpost
++++ b/scripts/Makefile.modpost
+@@ -81,6 +81,7 @@ modpost = scripts/mod/modpost \
+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
+ $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
++ $(if $(INTEGRATED_BUILD),-B) \
+ $(if $(cross_build),-c)
+
+ quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
+diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
+index 2bd594e..5d077f9 100644
+--- a/scripts/mod/modpost.c
++++ b/scripts/mod/modpost.c
+@@ -43,6 +43,9 @@ static int warn_unresolved = 0;
+ static int sec_mismatch_count = 0;
+ static int sec_mismatch_verbose = 1;
+
++/* Is this a module being built as part of an integrated package? */
++static int integrated_build = 0;
++
+ enum export {
+ export_plain, export_unused, export_gpl,
+ export_unused_gpl, export_gpl_future, export_unknown
+@@ -1851,7 +1854,7 @@ static void add_header(struct buffer *b, struct module *mod)
+
+ static void add_intree_flag(struct buffer *b, int is_intree)
+ {
+- if (is_intree)
++ if (is_intree || integrated_build)
+ buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n");
+ }
+
+@@ -2101,7 +2104,7 @@ int main(int argc, char **argv)
+ struct ext_sym_list *extsym_iter;
+ struct ext_sym_list *extsym_start = NULL;
+
+- while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:")) != -1) {
++ while ((opt = getopt(argc, argv, "i:I:e:cmsSo:awM:K:B")) != -1) {
+ switch (opt) {
+ case 'i':
+ kernel_read = optarg;
+@@ -2139,6 +2142,9 @@ int main(int argc, char **argv)
+ case 'w':
+ warn_unresolved = 1;
+ break;
++ case 'B':
++ integrated_build = 1;
++ break;
+ default:
+ exit(1);
+ }
+--
+1.7.4.4
+
diff --git a/freed-ora/current/master/nfs-client-freezer.patch b/freed-ora/current/master/nfs-client-freezer.patch
new file mode 100644
index 000000000..5f5b0836e
--- /dev/null
+++ b/freed-ora/current/master/nfs-client-freezer.patch
@@ -0,0 +1,197 @@
+@@ -, +, @@
+ fs/nfs/inode.c | 3 ++-
+ fs/nfs/nfs3proc.c | 3 ++-
+ fs/nfs/nfs4proc.c | 5 +++--
+ fs/nfs/proc.c | 3 ++-
+ include/linux/freezer.h | 28 ++++++++++++++++++++++++++++
+ net/sunrpc/sched.c | 3 ++-
+ 6 files changed, 39 insertions(+), 6 deletions(-)
+--- a/fs/nfs/inode.c
++++ a/fs/nfs/inode.c
+@@ -38,6 +38,7 @@
+ #include <linux/nfs_xdr.h>
+ #include <linux/slab.h>
+ #include <linux/compat.h>
++#include <linux/freezer.h>
+
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+@@ -77,7 +78,7 @@ int nfs_wait_bit_killable(void *word)
+ {
+ if (fatal_signal_pending(current))
+ return -ERESTARTSYS;
+- schedule();
++ freezable_schedule();
+ return 0;
+ }
+
+--- a/fs/nfs/nfs3proc.c
++++ a/fs/nfs/nfs3proc.c
+@@ -17,6 +17,7 @@
+ #include <linux/nfs_page.h>
+ #include <linux/lockd/bind.h>
+ #include <linux/nfs_mount.h>
++#include <linux/freezer.h>
+
+ #include "iostat.h"
+ #include "internal.h"
+@@ -32,7 +33,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
+ res = rpc_call_sync(clnt, msg, flags);
+ if (res != -EJUKEBOX && res != -EKEYEXPIRED)
+ break;
+- schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME);
++ freezable_schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME);
+ res = -ERESTARTSYS;
+ } while (!fatal_signal_pending(current));
+ return res;
+--- a/fs/nfs/nfs4proc.c
++++ a/fs/nfs/nfs4proc.c
+@@ -53,6 +53,7 @@
+ #include <linux/sunrpc/bc_xprt.h>
+ #include <linux/xattr.h>
+ #include <linux/utsname.h>
++#include <linux/freezer.h>
+
+ #include "nfs4_fs.h"
+ #include "delegation.h"
+@@ -241,7 +242,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout)
+ *timeout = NFS4_POLL_RETRY_MIN;
+ if (*timeout > NFS4_POLL_RETRY_MAX)
+ *timeout = NFS4_POLL_RETRY_MAX;
+- schedule_timeout_killable(*timeout);
++ freezable_schedule_timeout_killable(*timeout);
+ if (fatal_signal_pending(current))
+ res = -ERESTARTSYS;
+ *timeout <<= 1;
+@@ -3950,7 +3951,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4
+ static unsigned long
+ nfs4_set_lock_task_retry(unsigned long timeout)
+ {
+- schedule_timeout_killable(timeout);
++ freezable_schedule_timeout_killable(timeout);
+ timeout <<= 1;
+ if (timeout > NFS4_LOCK_MAXTIMEOUT)
+ return NFS4_LOCK_MAXTIMEOUT;
+--- a/fs/nfs/proc.c
++++ a/fs/nfs/proc.c
+@@ -41,6 +41,7 @@
+ #include <linux/nfs_fs.h>
+ #include <linux/nfs_page.h>
+ #include <linux/lockd/bind.h>
++#include <linux/freezer.h>
+ #include "internal.h"
+
+ #define NFSDBG_FACILITY NFSDBG_PROC
+@@ -59,7 +60,7 @@ nfs_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
+ res = rpc_call_sync(clnt, msg, flags);
+ if (res != -EKEYEXPIRED)
+ break;
+- schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME);
++ freezable_schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME);
+ res = -ERESTARTSYS;
+ } while (!fatal_signal_pending(current));
+ return res;
+--- a/include/linux/freezer.h
++++ a/include/linux/freezer.h
+@@ -135,6 +135,29 @@ static inline void set_freezable_with_signal(void)
+ }
+
+ /*
++ * These macros are intended to be used whenever you want allow a task that's
++ * sleeping in TASK_UNINTERRUPTIBLE or TASK_KILLABLE state to be frozen. Note
++ * that neither return any clear indication of whether a freeze event happened
++ * while in this function.
++ */
++
++/* Like schedule(), but should not block the freezer. */
++#define freezable_schedule() \
++({ \
++ freezer_do_not_count(); \
++ schedule(); \
++ freezer_count(); \
++})
++
++/* Like schedule_timeout_killable(), but should not block the freezer. */
++#define freezable_schedule_timeout_killable(timeout) \
++({ \
++ freezer_do_not_count(); \
++ schedule_timeout_killable(timeout); \
++ freezer_count(); \
++})
++
++/*
+ * Freezer-friendly wrappers around wait_event_interruptible(),
+ * wait_event_killable() and wait_event_interruptible_timeout(), originally
+ * defined in <linux/wait.h>
+@@ -194,6 +217,11 @@ static inline int freezer_should_skip(struct task_struct *p) { return 0; }
+ static inline void set_freezable(void) {}
+ static inline void set_freezable_with_signal(void) {}
+
++#define freezable_schedule() schedule()
++
++#define freezable_schedule_timeout_killable(timeout) \
++ schedule_timeout_killable(timeout)
++
+ #define wait_event_freezable(wq, condition) \
+ wait_event_interruptible(wq, condition)
+
+--- a/net/sunrpc/sched.c
++++ a/net/sunrpc/sched.c
+@@ -18,6 +18,7 @@
+ #include <linux/smp.h>
+ #include <linux/spinlock.h>
+ #include <linux/mutex.h>
++#include <linux/freezer.h>
+
+ #include <linux/sunrpc/clnt.h>
+
+@@ -231,7 +232,7 @@ static int rpc_wait_bit_killable(void *word)
+ {
+ if (fatal_signal_pending(current))
+ return -ERESTARTSYS;
+- schedule();
++ freezable_schedule();
+ return 0;
+ }
+
+ include/linux/freezer.h | 21 ++++++++++++++++++---
+ 1 files changed, 18 insertions(+), 3 deletions(-)
+--- a/include/linux/freezer.h
++++ a/include/linux/freezer.h
+@@ -141,18 +141,33 @@ static inline void set_freezable_with_signal(void)
+ * while in this function.
+ */
+
+-/* Like schedule(), but should not block the freezer. */
++/*
++ * Like schedule(), but should not block the freezer. It may return immediately
++ * if it ends up racing with the freezer. Callers must be able to deal with
++ * spurious wakeups.
++ */
+ #define freezable_schedule() \
+ ({ \
+ freezer_do_not_count(); \
+- schedule(); \
++ if (!try_to_freeze()) \
++ schedule(); \
+ freezer_count(); \
+ })
+
+-/* Like schedule_timeout_killable(), but should not block the freezer. */
++/*
++ * Like schedule_timeout_killable(), but should not block the freezer. It may
++ * end up returning immediately if it ends up racing with the freezer. Callers
++ * must be able to deal with the loose wakeup timing that can occur when the
++ * freezer races in. When that occurs, this function will return the timeout
++ * value instead of 0.
++ */
+ #define freezable_schedule_timeout_killable(timeout) \
+ ({ \
+ freezer_do_not_count(); \
++ if (try_to_freeze()) { \
++ freezer_count(); \
++ return timeout; \
++ } \
+ schedule_timeout_killable(timeout); \
+ freezer_count(); \
+ })
diff --git a/freed-ora/current/master/nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch b/freed-ora/current/master/nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch
new file mode 100644
index 000000000..1b795e97f
--- /dev/null
+++ b/freed-ora/current/master/nfsv4-include-bitmap-in-nfsv4_get_acl_data.patch
@@ -0,0 +1,118 @@
+From: Andy Adamson <andros@xxxxxxxxxx>
+
+The NFSv4 bitmap size is unbounded: a server can return an arbitrary
+sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
+nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
+with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
+xdr length to the (cached) acl page data.
+
+This is a general solution to commit e5012d1f "NFSv4.1: update
+nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
+when getting ACLs.
+
+Cc:stable@xxxxxxxxxx
+Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
+---
+ fs/nfs/nfs4proc.c | 20 ++++++++++++++++++--
+ fs/nfs/nfs4xdr.c | 15 ++++++++++++---
+ 2 files changed, 30 insertions(+), 5 deletions(-)
+
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index deb88d9..97014dd 100644
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -3671,6 +3671,22 @@ static void nfs4_zap_acl_attr(struct inode *inode)
+ nfs4_set_cached_acl(inode, NULL);
+ }
+
++/*
++ * The bitmap xdr length, bitmasks, and the attr xdr length are stored in
++ * the acl cache to handle variable length bitmasks. Just copy the acl data.
++ */
++static void nfs4_copy_acl(char *buf, char *acl_data, size_t acl_len)
++{
++ __be32 *q, *p = (__be32 *)acl_data;
++ int32_t len;
++
++ len = be32_to_cpup(p); /* number of bitmasks */
++ len += 2; /* add words for bitmap and attr xdr len */
++ q = p + len;
++ len = len << 2; /* convert to bytes for acl_len math */
++ memcpy(buf, (char *)q, acl_len - len);
++}
++
+ static inline ssize_t nfs4_read_cached_acl(struct inode *inode, char *buf, size_t buflen)
+ {
+ struct nfs_inode *nfsi = NFS_I(inode);
+@@ -3688,7 +3704,7 @@ static inline ssize_t nfs4_read_cached_acl(struct inode *inode, char *buf, size_
+ ret = -ERANGE; /* see getxattr(2) man page */
+ if (acl->len > buflen)
+ goto out;
+- memcpy(buf, acl->data, acl->len);
++ nfs4_copy_acl(buf, acl->data, acl->len);
+ out_len:
+ ret = acl->len;
+ out:
+@@ -3763,7 +3779,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
+ if (res.acl_len > buflen)
+ goto out_free;
+ if (localpage)
+- memcpy(buf, resp_buf, res.acl_len);
++ nfs4_copy_acl(buf, resp_buf, res.acl_len);
+ }
+ ret = res.acl_len;
+ out_free:
+diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
+index f9fd96d..9c07380 100644
+--- a/fs/nfs/nfs4xdr.c
++++ b/fs/nfs/nfs4xdr.c
+@@ -2513,7 +2513,7 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
+ encode_compound_hdr(xdr, req, &hdr);
+ encode_sequence(xdr, &args->seq_args, &hdr);
+ encode_putfh(xdr, args->fh, &hdr);
+- replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1;
++ replen = hdr.replen + op_decode_hdr_maxsz + 1;
+ encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr);
+
+ xdr_inline_pages(&req->rq_rcv_buf, replen << 2,
+@@ -4955,7 +4955,7 @@ decode_restorefh(struct xdr_stream *xdr)
+ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
+ size_t *acl_len)
+ {
+- __be32 *savep;
++ __be32 *savep, *bm_p;
+ uint32_t attrlen,
+ bitmap[3] = {0};
+ struct kvec *iov = req->rq_rcv_buf.head;
+@@ -4964,6 +4964,7 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
+ *acl_len = 0;
+ if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0)
+ goto out;
++ bm_p = xdr->p;
+ if ((status = decode_attr_bitmap(xdr, bitmap)) != 0)
+ goto out;
+ if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0)
+@@ -4972,12 +4973,20 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req,
+ if (unlikely(bitmap[0] & (FATTR4_WORD0_ACL - 1U)))
+ return -EIO;
+ if (likely(bitmap[0] & FATTR4_WORD0_ACL)) {
+- size_t hdrlen;
++ size_t hdrlen, len;
+ u32 recvd;
+
++ /*The bitmap (xdr len + bitmasks) and the attr xdr len words
++ * are stored with the acl data to handle the problem of
++ * variable length bitmasks.*/
++ xdr->p = bm_p;
++ len = be32_to_cpup(bm_p);
++ len += 2; /* add bitmap and attr xdr len words */
++
+ /* We ignore &savep and don't do consistency checks on
+ * the attr length. Let userspace figure it out.... */
+ hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base;
++ attrlen += len << 2; /* attrlen is in bytes */
+ recvd = req->rq_rcv_buf.len - hdrlen;
+ if (attrlen > recvd) {
+ dprintk("NFS: server cheating in getattr"
+--
+1.7.6.4
diff --git a/freed-ora/current/master/pci-Rework-ASPM-disable-code.patch b/freed-ora/current/master/pci-Rework-ASPM-disable-code.patch
new file mode 100644
index 000000000..d6fb24320
--- /dev/null
+++ b/freed-ora/current/master/pci-Rework-ASPM-disable-code.patch
@@ -0,0 +1,287 @@
+Path: news.gmane.org!not-for-mail
+From: Matthew Garrett <mjg@redhat.com>
+Newsgroups: gmane.linux.acpi.devel,gmane.linux.kernel.pci,gmane.linux.kernel
+Subject: [PATCH] pci: Rework ASPM disable code
+Date: Thu, 10 Nov 2011 16:38:33 -0500
+Lines: 232
+Approved: news@gmane.org
+Message-ID: <1320961113-5050-1-git-send-email-mjg@redhat.com>
+NNTP-Posting-Host: lo.gmane.org
+X-Trace: dough.gmane.org 1320961145 13112 80.91.229.12 (10 Nov 2011 21:39:05 GMT)
+X-Complaints-To: usenet@dough.gmane.org
+NNTP-Posting-Date: Thu, 10 Nov 2011 21:39:05 +0000 (UTC)
+Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
+ linux-kernel@vger.kernel.org, Matthew Garrett <mjg@redhat.com>
+To: jbarnes@virtuousgeek.org
+Original-X-From: linux-acpi-owner@vger.kernel.org Thu Nov 10 22:38:57 2011
+Return-path: <linux-acpi-owner@vger.kernel.org>
+Envelope-to: glad-acpi-devel@lo.gmane.org
+Original-Received: from vger.kernel.org ([209.132.180.67])
+ by lo.gmane.org with esmtp (Exim 4.69)
+ (envelope-from <linux-acpi-owner@vger.kernel.org>)
+ id 1ROcKm-0003jN-CL
+ for glad-acpi-devel@lo.gmane.org; Thu, 10 Nov 2011 22:38:56 +0100
+Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1751342Ab1KJViu (ORCPT <rfc822;glad-acpi-devel@m.gmane.org>);
+ Thu, 10 Nov 2011 16:38:50 -0500
+Original-Received: from mx1.redhat.com ([209.132.183.28]:32030 "EHLO mx1.redhat.com"
+ rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
+ id S1750805Ab1KJVit (ORCPT <rfc822;linux-acpi@vger.kernel.org>);
+ Thu, 10 Nov 2011 16:38:49 -0500
+Original-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+ by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAALcmdw013333
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
+ Thu, 10 Nov 2011 16:38:49 -0500
+Original-Received: from cavan.codon.org.uk (ovpn-113-157.phx2.redhat.com [10.3.113.157])
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAALclkW022022
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
+ Thu, 10 Nov 2011 16:38:48 -0500
+Original-Received: from 209-6-41-104.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.41.104] helo=localhost.localdomain)
+ by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
+ (Exim 4.72)
+ (envelope-from <mjg@redhat.com>)
+ id 1ROcKa-0000F4-E4; Thu, 10 Nov 2011 21:38:44 +0000
+X-SA-Do-Not-Run: Yes
+X-SA-Exim-Connect-IP: 209.6.41.104
+X-SA-Exim-Mail-From: mjg@redhat.com
+X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+Original-Sender: linux-acpi-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-acpi.vger.kernel.org>
+X-Mailing-List: linux-acpi@vger.kernel.org
+Xref: news.gmane.org gmane.linux.acpi.devel:51182 gmane.linux.kernel.pci:12503 gmane.linux.kernel:1214427
+Archived-At: <http://permalink.gmane.org/gmane.linux.acpi.devel/51182>
+
+Right now we forcibly clear ASPM state on all devices if the BIOS indicates
+that the feature isn't supported. Based on the Microsoft presentation
+"PCI Express In Depth for Windows Vista and Beyond", I'm starting to think
+that this may be an error. The implication is that unless the platform
+grants full control via _OSC, Windows will not touch any PCIe features -
+including ASPM. In that case clearing ASPM state would be an error unless
+the platform has granted us that control.
+
+This patch reworks the ASPM disabling code such that the actual clearing
+of state is triggered by a successful handoff of PCIe control to the OS.
+The general ASPM code undergoes some changes in order to ensure that the
+ability to clear the bits isn't overridden by ASPM having already been
+disabled. Further, this theoretically now allows for situations where
+only a subset of PCIe roots hand over control, leaving the others in the
+BIOS state.
+
+It's difficult to know for sure that this is the right thing to do -
+there's zero public documentation on the interaction between all of these
+components. But enough vendors enable ASPM on platforms and then set this
+bit that it seems likely that they're expecting the OS to leave them alone.
+
+Measured to save around 5W on an idle Thinkpad X220.
+
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+---
+ drivers/acpi/pci_root.c | 7 +++++
+ drivers/pci/pci-acpi.c | 1 -
+ drivers/pci/pcie/aspm.c | 58 +++++++++++++++++++++++++++++----------------
+ include/linux/pci-aspm.h | 4 +-
+ 4 files changed, 46 insertions(+), 24 deletions(-)
+
+diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
+index 2672c79..7aff631 100644
+--- a/drivers/acpi/pci_root.c
++++ b/drivers/acpi/pci_root.c
+@@ -596,6 +596,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
+ if (ACPI_SUCCESS(status)) {
+ dev_info(root->bus->bridge,
+ "ACPI _OSC control (0x%02x) granted\n", flags);
++ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
++ /*
++ * We have ASPM control, but the FADT indicates
++ * that it's unsupported. Clear it.
++ */
++ pcie_clear_aspm(root->bus);
++ }
+ } else {
+ dev_info(root->bus->bridge,
+ "ACPI _OSC request failed (%s), "
+diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
+index 4ecb640..c8e7585 100644
+--- a/drivers/pci/pci-acpi.c
++++ b/drivers/pci/pci-acpi.c
+@@ -395,7 +395,6 @@ static int __init acpi_pci_init(void)
+
+ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
+ printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
+- pcie_clear_aspm();
+ pcie_no_aspm();
+ }
+
+diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
+index cbfbab1..1cfbf22 100644
+--- a/drivers/pci/pcie/aspm.c
++++ b/drivers/pci/pcie/aspm.c
+@@ -68,7 +68,7 @@ struct pcie_link_state {
+ struct aspm_latency acceptable[8];
+ };
+
+-static int aspm_disabled, aspm_force, aspm_clear_state;
++static int aspm_disabled, aspm_force;
+ static bool aspm_support_enabled = true;
+ static DEFINE_MUTEX(aspm_lock);
+ static LIST_HEAD(link_list);
+@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
+ int pos;
+ u32 reg32;
+
+- if (aspm_clear_state)
+- return -EINVAL;
+-
+ /*
+ * Some functions in a slot might not all be PCIe functions,
+ * very strange. Disable ASPM for the whole slot
+@@ -574,9 +571,6 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
+ pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
+ return;
+
+- if (aspm_disabled && !aspm_clear_state)
+- return;
+-
+ /* VIA has a strange chipset, root port is under a bridge */
+ if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
+ pdev->bus->self)
+@@ -608,7 +602,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
+ * the BIOS's expectation, we'll do so once pci_enable_device() is
+ * called.
+ */
+- if (aspm_policy != POLICY_POWERSAVE || aspm_clear_state) {
++ if (aspm_policy != POLICY_POWERSAVE) {
+ pcie_config_aspm_path(link);
+ pcie_set_clkpm(link, policy_to_clkpm_state(link));
+ }
+@@ -649,8 +643,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
+ struct pci_dev *parent = pdev->bus->self;
+ struct pcie_link_state *link, *root, *parent_link;
+
+- if ((aspm_disabled && !aspm_clear_state) || !pci_is_pcie(pdev) ||
+- !parent || !parent->link_state)
++ if (!pci_is_pcie(pdev) || !parent || !parent->link_state)
+ return;
+ if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) &&
+ (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM))
+@@ -734,13 +727,18 @@ void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
+ * pci_disable_link_state - disable pci device's link state, so the link will
+ * never enter specific states
+ */
+-static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)
++static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem,
++ bool force)
+ {
+ struct pci_dev *parent = pdev->bus->self;
+ struct pcie_link_state *link;
+
+- if (aspm_disabled || !pci_is_pcie(pdev))
++ if (aspm_disabled && !force)
++ return;
++
++ if (!pci_is_pcie(pdev))
+ return;
++
+ if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
+ pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM)
+ parent = pdev;
+@@ -768,16 +766,31 @@ static void __pci_disable_link_state(struct pci_dev *pdev, int state, bool sem)
+
+ void pci_disable_link_state_locked(struct pci_dev *pdev, int state)
+ {
+- __pci_disable_link_state(pdev, state, false);
++ __pci_disable_link_state(pdev, state, false, false);
+ }
+ EXPORT_SYMBOL(pci_disable_link_state_locked);
+
+ void pci_disable_link_state(struct pci_dev *pdev, int state)
+ {
+- __pci_disable_link_state(pdev, state, true);
++ __pci_disable_link_state(pdev, state, true, false);
+ }
+ EXPORT_SYMBOL(pci_disable_link_state);
+
++void pcie_clear_aspm(struct pci_bus *bus)
++{
++ struct pci_dev *child;
++
++ /*
++ * Clear any ASPM setup that the firmware has carried out on this bus
++ */
++ list_for_each_entry(child, &bus->devices, bus_list) {
++ __pci_disable_link_state(child, PCIE_LINK_STATE_L0S |
++ PCIE_LINK_STATE_L1 |
++ PCIE_LINK_STATE_CLKPM,
++ false, true);
++ }
++}
++
+ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
+ {
+ int i;
+@@ -935,6 +948,7 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev)
+ static int __init pcie_aspm_disable(char *str)
+ {
+ if (!strcmp(str, "off")) {
++ aspm_policy = POLICY_DEFAULT;
+ aspm_disabled = 1;
+ aspm_support_enabled = false;
+ printk(KERN_INFO "PCIe ASPM is disabled\n");
+@@ -947,16 +961,18 @@ static int __init pcie_aspm_disable(char *str)
+
+ __setup("pcie_aspm=", pcie_aspm_disable);
+
+-void pcie_clear_aspm(void)
+-{
+- if (!aspm_force)
+- aspm_clear_state = 1;
+-}
+-
+ void pcie_no_aspm(void)
+ {
+- if (!aspm_force)
++ /*
++ * Disabling ASPM is intended to prevent the kernel from modifying
++ * existing hardware state, not to clear existing state. To that end:
++ * (a) set policy to POLICY_DEFAULT in order to avoid changing state
++ * (b) prevent userspace from changing policy
++ */
++ if (!aspm_force) {
++ aspm_policy = POLICY_DEFAULT;
+ aspm_disabled = 1;
++ }
+ }
+
+ /**
+diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h
+index 7cea7b6..c832014 100644
+--- a/include/linux/pci-aspm.h
++++ b/include/linux/pci-aspm.h
+@@ -29,7 +29,7 @@ extern void pcie_aspm_pm_state_change(struct pci_dev *pdev);
+ extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
+ extern void pci_disable_link_state(struct pci_dev *pdev, int state);
+ extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state);
+-extern void pcie_clear_aspm(void);
++extern void pcie_clear_aspm(struct pci_bus *bus);
+ extern void pcie_no_aspm(void);
+ #else
+ static inline void pcie_aspm_init_link_state(struct pci_dev *pdev)
+@@ -47,7 +47,7 @@ static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
+ static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
+ {
+ }
+-static inline void pcie_clear_aspm(void)
++static inline void pcie_clear_aspm(struct pci_bus *bus)
+ {
+ }
+ static inline void pcie_no_aspm(void)
+--
+1.7.7.1
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
diff --git a/freed-ora/current/master/pci-fix-ats-compile.patch b/freed-ora/current/master/pci-fix-ats-compile.patch
new file mode 100644
index 000000000..1dcb7e967
--- /dev/null
+++ b/freed-ora/current/master/pci-fix-ats-compile.patch
@@ -0,0 +1,26 @@
+I get this compile failure on parisc:
+
+drivers/pci/ats.c: In function 'ats_alloc_one':
+drivers/pci/ats.c:29: error: implicit declaration of function 'kzalloc'
+drivers/pci/ats.c:29: warning: assignment makes pointer from integer without a cast
+drivers/pci/ats.c: In function 'ats_free_one':
+drivers/pci/ats.c:45: error: implicit declaration of function 'kfree'
+
+Because ats.c is missing linux/slab.h as an include. This patch fixes it
+
+Signed-off-by: James Bottomley <JBottomley@xxxxxxxxxxxxx>
+
+---
+
+diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
+index 7ec56fb..b0dd08e 100644
+--- a/drivers/pci/ats.c
++++ b/drivers/pci/ats.c
+@@ -13,6 +13,7 @@
+ #include <linux/export.h>
+ #include <linux/pci-ats.h>
+ #include <linux/pci.h>
++#include <linux/slab.h>
+
+ #include "pci.h"
+
diff --git a/freed-ora/current/master/powerpc-Fix-deadlock-in-icswx-code.patch b/freed-ora/current/master/powerpc-Fix-deadlock-in-icswx-code.patch
deleted file mode 100644
index a2ce3cf76..000000000
--- a/freed-ora/current/master/powerpc-Fix-deadlock-in-icswx-code.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From patchwork Wed Sep 14 19:43:15 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: powerpc: Fix deadlock in icswx code
-Date: Wed, 14 Sep 2011 09:43:15 -0000
-From: Anton Blanchard <anton@samba.org>
-X-Patchwork-Id: 114701
-Message-Id: <20110915054315.5e5ae062@kryten>
-To: benh@kernel.crashing.org, paulus@samba.org
-Cc: linuxppc-dev@lists.ozlabs.org
-
-The icswx code introduced an A-B B-A deadlock:
-
- CPU0 CPU1
- ---- ----
-lock(&anon_vma->mutex);
- lock(&mm->mmap_sem);
- lock(&anon_vma->mutex);
-lock(&mm->mmap_sem);
-
-Instead of using the mmap_sem to keep mm_users constant, take the
-page table spinlock.
-
-Signed-off-by: Anton Blanchard <anton@samba.org>
-Cc: <stable@kernel.org>
-
----
-
-
-diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
-index 3bafc3d..4ff587e 100644
---- a/arch/powerpc/mm/mmu_context_hash64.c
-+++ b/arch/powerpc/mm/mmu_context_hash64.c
-@@ -136,8 +136,8 @@ int use_cop(unsigned long acop, struct mm_struct *mm)
- if (!mm || !acop)
- return -EINVAL;
-
-- /* We need to make sure mm_users doesn't change */
-- down_read(&mm->mmap_sem);
-+ /* The page_table_lock ensures mm_users won't change under us */
-+ spin_lock(&mm->page_table_lock);
- spin_lock(mm->context.cop_lockp);
-
- if (mm->context.cop_pid == COP_PID_NONE) {
-@@ -164,7 +164,7 @@ int use_cop(unsigned long acop, struct mm_struct *mm)
-
- out:
- spin_unlock(mm->context.cop_lockp);
-- up_read(&mm->mmap_sem);
-+ spin_unlock(&mm->page_table_lock);
-
- return ret;
- }
-@@ -185,8 +185,8 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
- if (WARN_ON_ONCE(!mm))
- return;
-
-- /* We need to make sure mm_users doesn't change */
-- down_read(&mm->mmap_sem);
-+ /* The page_table_lock ensures mm_users won't change under us */
-+ spin_lock(&mm->page_table_lock);
- spin_lock(mm->context.cop_lockp);
-
- mm->context.acop &= ~acop;
-@@ -213,7 +213,7 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
- }
-
- spin_unlock(mm->context.cop_lockp);
-- up_read(&mm->mmap_sem);
-+ spin_unlock(&mm->page_table_lock);
- }
- EXPORT_SYMBOL_GPL(drop_cop);
-
diff --git a/freed-ora/current/master/quite-apm.patch b/freed-ora/current/master/quite-apm.patch
new file mode 100644
index 000000000..c38511c41
--- /dev/null
+++ b/freed-ora/current/master/quite-apm.patch
@@ -0,0 +1,13 @@
+diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
+index a46bd38..416dd12 100644
+--- a/arch/x86/kernel/apm_32.c
++++ b/arch/x86/kernel/apm_32.c
+@@ -903,7 +903,7 @@ static void apm_cpu_idle(void)
+ unsigned int jiffies_since_last_check = jiffies - last_jiffies;
+ unsigned int bucket;
+
+- WARN_ONCE(1, "deprecated apm_cpu_idle will be deleted in 2012");
++ printk_once(KERN_INFO "deprecated apm_cpu_idle will be deleted in 2012");
+ recalc:
+ if (jiffies_since_last_check > IDLE_CALC_LIMIT) {
+ use_apm_idle = 0;
diff --git a/freed-ora/current/master/rcu-avoid-just-onlined-cpu-resched.patch b/freed-ora/current/master/rcu-avoid-just-onlined-cpu-resched.patch
deleted file mode 100644
index 517f37591..000000000
--- a/freed-ora/current/master/rcu-avoid-just-onlined-cpu-resched.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-rcu: Avoid having just-onlined CPU resched itself when RCU is idle
-
-CPUs set rdp->qs_pending when coming online to resolve races with
-grace-period start. However, this means that if RCU is idle, the
-just-onlined CPU might needlessly send itself resched IPIs. Adjust
-the online-CPU initialization to avoid this, and also to correctly
-cause the CPU to respond to the current grace period if needed.
-
-Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
----
- kernel/rcutree.c | 13 +++++++++----
- 1 files changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/kernel/rcutree.c b/kernel/rcutree.c
-index ba06207..472d6b2 100644
---- a/kernel/rcutree.c
-+++ b/kernel/rcutree.c
-@@ -1865,8 +1865,6 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
-
- /* Set up local state, ensuring consistent view of global state. */
- raw_spin_lock_irqsave(&rnp->lock, flags);
-- rdp->passed_quiesc = 0; /* We could be racing with new GP, */
-- rdp->qs_pending = 1; /* so set up to respond to current GP. */
- rdp->beenonline = 1; /* We have now been online. */
- rdp->preemptible = preemptible;
- rdp->qlen_last_fqs_check = 0;
-@@ -1891,8 +1889,15 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp, int preemptible)
- rnp->qsmaskinit |= mask;
- mask = rnp->grpmask;
- if (rnp == rdp->mynode) {
-- rdp->gpnum = rnp->completed; /* if GP in progress... */
-- rdp->completed = rnp->completed;
-+ /*
-+ * If there is a grace period in progress, we will
-+ * set up to wait for it next time we run the
-+ * RCU core code.
-+ */
-+ rdp->gpnum = rnp->completed;
-+ rdp->completed = rnp->completed;
-+ rdp->passed_quiesc = 0;
-+ rdp->qs_pending = 0;
- rdp->passed_quiesc_completed = rnp->completed - 1;
- }
- raw_spin_unlock(&rnp->lock); /* irqs already disabled. */
---
-1.7.6
-
diff --git a/freed-ora/current/master/rcutree-avoid-false-quiescent-states.patch b/freed-ora/current/master/rcutree-avoid-false-quiescent-states.patch
deleted file mode 100644
index 9c7ffea34..000000000
--- a/freed-ora/current/master/rcutree-avoid-false-quiescent-states.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff --git a/kernel/rcutree.c b/kernel/rcutree.c
-index ba06207..c38a882 100644
---- a/kernel/rcutree.c
-+++ b/kernel/rcutree.c
-@@ -1476,9 +1476,6 @@ static void rcu_process_callbacks(struct softirq_action *unused)
- &__get_cpu_var(rcu_sched_data));
- __rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
- rcu_preempt_process_callbacks();
--
-- /* If we are last CPU on way to dyntick-idle mode, accelerate it. */
-- rcu_needs_cpu_flush();
- }
-
- /*
-diff --git a/kernel/rcutree.h b/kernel/rcutree.h
-index 01b2ccd..795f7fc 100644
---- a/kernel/rcutree.h
-+++ b/kernel/rcutree.h
-@@ -450,7 +450,6 @@ static int rcu_preempt_needs_cpu(int cpu);
- static void __cpuinit rcu_preempt_init_percpu_data(int cpu);
- static void rcu_preempt_send_cbs_to_online(void);
- static void __init __rcu_init_preempt(void);
--static void rcu_needs_cpu_flush(void);
- static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags);
- static void rcu_preempt_boost_start_gp(struct rcu_node *rnp);
- static void invoke_rcu_callbacks_kthread(void);
-diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
-index 8aafbb8..b0254de 100644
---- a/kernel/rcutree_plugin.h
-+++ b/kernel/rcutree_plugin.h
-@@ -1907,15 +1907,6 @@ int rcu_needs_cpu(int cpu)
- return rcu_needs_cpu_quick_check(cpu);
- }
-
--/*
-- * Check to see if we need to continue a callback-flush operations to
-- * allow the last CPU to enter dyntick-idle mode. But fast dyntick-idle
-- * entry is not configured, so we never do need to.
-- */
--static void rcu_needs_cpu_flush(void)
--{
--}
--
- #else /* #if !defined(CONFIG_RCU_FAST_NO_HZ) */
-
- #define RCU_NEEDS_CPU_FLUSHES 5
-@@ -1991,20 +1982,4 @@ int rcu_needs_cpu(int cpu)
- return c;
- }
-
--/*
-- * Check to see if we need to continue a callback-flush operations to
-- * allow the last CPU to enter dyntick-idle mode.
-- */
--static void rcu_needs_cpu_flush(void)
--{
-- int cpu = smp_processor_id();
-- unsigned long flags;
--
-- if (per_cpu(rcu_dyntick_drain, cpu) <= 0)
-- return;
-- local_irq_save(flags);
-- (void)rcu_needs_cpu(cpu);
-- local_irq_restore(flags);
--}
--
- #endif /* #else #if !defined(CONFIG_RCU_FAST_NO_HZ) */
diff --git a/freed-ora/current/master/scripts/bumpspecfile.py b/freed-ora/current/master/scripts/bumpspecfile.py
index 478e82871..bc02ab300 100755
--- a/freed-ora/current/master/scripts/bumpspecfile.py
+++ b/freed-ora/current/master/scripts/bumpspecfile.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
#
-# Needs $GIT_COMMITTER_NAME and $GIT_COMMITTER_EMAIL set.
+# Uses git config options user.name and user.email, falls
+# back to env vars $GIT_COMMITTER_NAME and $GIT_COMMITTER_EMAIL
#
import re
import sys
@@ -44,8 +45,12 @@ class Specfile:
self.vr = " "+ver+'-'+nextrel
def addChangelogEntry(self,entry):
- user = os.environ.get("GIT_COMMITTER_NAME","unknown")
- email = os.environ.get("GIT_COMMITTER_EMAIL","unknown")
+ user = os.popen("git config --get user.name").read().rstrip()
+ if (user == ""):
+ user = os.environ.get("GIT_COMMITTER_NAME","Unknown")
+ email = os.popen("git config --get user.email").read().rstrip()
+ if (email == ""):
+ email = os.environ.get("GIT_COMMITTER_EMAIL","unknown")
if (email == "unknown"):
email = os.environ.get("USER","unknown")+"@fedoraproject.org"
changematch=re.compile(r"^%changelog")
diff --git a/freed-ora/current/master/scripts/cross-amd64.sh b/freed-ora/current/master/scripts/cross-amd64.sh
deleted file mode 100644
index b3119d8fc..000000000
--- a/freed-ora/current/master/scripts/cross-amd64.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=x86_64-linux- ARCH=x86_64 hammer
-
diff --git a/freed-ora/current/master/scripts/cross-i586.sh b/freed-ora/current/master/scripts/cross-i586.sh
deleted file mode 100644
index 000f4ae7e..000000000
--- a/freed-ora/current/master/scripts/cross-i586.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make ARCH=i386 i586
-
diff --git a/freed-ora/current/master/scripts/cross-i686.sh b/freed-ora/current/master/scripts/cross-i686.sh
deleted file mode 100644
index 5c0cfe137..000000000
--- a/freed-ora/current/master/scripts/cross-i686.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make ARCH=i386 i686
-
diff --git a/freed-ora/current/master/scripts/cross-ia64.sh b/freed-ora/current/master/scripts/cross-ia64.sh
deleted file mode 100644
index 5699a57c1..000000000
--- a/freed-ora/current/master/scripts/cross-ia64.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ia64-linux- ARCH=ia64 ia64
diff --git a/freed-ora/current/master/scripts/cross-iseries.sh b/freed-ora/current/master/scripts/cross-iseries.sh
deleted file mode 100644
index 71bfd9156..000000000
--- a/freed-ora/current/master/scripts/cross-iseries.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 ppc64iseries
-
diff --git a/freed-ora/current/master/scripts/cross-ppc.sh b/freed-ora/current/master/scripts/cross-ppc.sh
deleted file mode 100644
index c49b740f3..000000000
--- a/freed-ora/current/master/scripts/cross-ppc.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc
-
diff --git a/freed-ora/current/master/scripts/cross-ppc64.sh b/freed-ora/current/master/scripts/cross-ppc64.sh
deleted file mode 100644
index fb29d4481..000000000
--- a/freed-ora/current/master/scripts/cross-ppc64.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 ppc64
-
diff --git a/freed-ora/current/master/scripts/cross-ppc8260.sh b/freed-ora/current/master/scripts/cross-ppc8260.sh
deleted file mode 100644
index 10fbc3292..000000000
--- a/freed-ora/current/master/scripts/cross-ppc8260.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc8260
-
diff --git a/freed-ora/current/master/scripts/cross-ppc8560.sh b/freed-ora/current/master/scripts/cross-ppc8560.sh
deleted file mode 100644
index 405f98a9c..000000000
--- a/freed-ora/current/master/scripts/cross-ppc8560.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc-linux- ARCH=ppc ppc8560
-
diff --git a/freed-ora/current/master/scripts/cross-pseries.sh b/freed-ora/current/master/scripts/cross-pseries.sh
deleted file mode 100644
index 724a8e582..000000000
--- a/freed-ora/current/master/scripts/cross-pseries.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=ppc64-linux- ARCH=ppc64 pseries64
-
diff --git a/freed-ora/current/master/scripts/cross-s390.sh b/freed-ora/current/master/scripts/cross-s390.sh
deleted file mode 100644
index 4a274397c..000000000
--- a/freed-ora/current/master/scripts/cross-s390.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=s390-linux- ARCH=s390 s390
diff --git a/freed-ora/current/master/scripts/cross-s390x.sh b/freed-ora/current/master/scripts/cross-s390x.sh
deleted file mode 100644
index 1cdc98a73..000000000
--- a/freed-ora/current/master/scripts/cross-s390x.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-export PATH=$PATH:/opt/cross/bin
-make CROSS_COMPILE=s390x-linux- ARCH=s390 s390x
diff --git a/freed-ora/current/master/scripts/get-snapshot.sh b/freed-ora/current/master/scripts/get-snapshot.sh
deleted file mode 100755
index 79d2b095e..000000000
--- a/freed-ora/current/master/scripts/get-snapshot.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-VER=$(tail -n1 upstream | sed s/bz2/id/)
-rm -f $VER
-wget -c http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/$VER
-SHA1=$(cat $VER)
-rm -f patch-2.6.*-git*.id
-
-cd ~/src/git-trees/kernel/linux-2.6
-git pull
-
-DIF=$(git diff $SHA1.. | wc -l)
-if [ "$DIF" = "0" ]; then
- echo Nothing changed.
- exit
-fi
-TOT=$(git log | head -n1)
-
-git diff $SHA1.. > ~/src/fedora/kernel/devel/git-linus-new.diff
-cd ~/src/fedora/kernel/devel/
-DIF=$(cmp git-linus.diff git-linus-new.diff)
-if [ "$?" = "0" ]; then
- echo Nothing new in git
- rm -f git-linus-new.diff
- exit
-fi
-mv git-linus-new.diff git-linus.diff
-
-perl -p -i -e 's|^#ApplyPatch\ git-linus.diff|ApplyPatch\ git-linus.diff|' kernel.spec
-
-echo "- Merge Linux-2.6 up to" $TOT > ~/src/fedora/kernel/devel/clog.tmp
-cd ~/src/fedora/kernel/devel/
-bumpspecfile.py kernel.spec "$(cat clog.tmp)"
-rm -f clog.tmp
-make clog
diff --git a/freed-ora/current/master/scripts/pull-upstreams.sh b/freed-ora/current/master/scripts/pull-upstreams.sh
deleted file mode 100755
index 8dc8497d8..000000000
--- a/freed-ora/current/master/scripts/pull-upstreams.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-utrace_base=2.6.37
-
-url=http://people.redhat.com/roland/utrace/${1:-$utrace_base}
-
-wget -q -O /dev/stdout $url/series | grep 'patch$' |
-while read i
-do
- rm -f linux-2.6-$i
- wget -nv -O linux-2.6-$i $url/$i
-done
diff --git a/freed-ora/current/master/scripts/rebase.sh b/freed-ora/current/master/scripts/rebase.sh
deleted file mode 100755
index e9b50cf40..000000000
--- a/freed-ora/current/master/scripts/rebase.sh
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/bin/bash
-
-KORG26="http://ftp.kernel.org/pub/linux/kernel/v2.6"
-KORG26SNAPS="${KORG26}/snapshots"
-KORG26TESTING="${KORG26}/testing"
-
-if [ ! -f /usr/bin/curl ]; then
- echo yum install curl
- exit 0
-fi
-
-# Current kernel bits
-if [ `grep -c patch-2.6 sources` -ge 1 ]; then
- export OLD=`grep patch-2.6 sources | awk '{print $2}' | tail -n1 | sed s/patch-// | sed s/\.bz2//`
-else
- export OLD=`grep linux-2.6 sources | awk '{print $2}' | tail -n1 | sed s/linux-// | sed s/\.tar\.bz2//`
-fi
-export OLDBASE=`echo $OLD | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
-if [ `echo $OLD | grep -c rc` -ge 1 ]; then
- export OLDRC=`echo $OLD | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
- if [ `echo $OLD | grep -c git` -ge 1 ]; then
- export OLDGIT=`echo $OLD | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
- else
- export OLDGIT=0
- fi
-else
- export OLDRC=0
- if [ `echo $OLD | grep -c git` -ge 1 ]; then
- export OLDGIT=`echo $OLD | sed s/-/\ /g | sed s/git// | awk '{ print $2 }'`
- else
- export OLDGIT=0
- fi
-fi
-
-# Is there a new snapshot or prepatch ?
-NEW=`curl -s http://www.kernel.org/kdist/finger_banner | grep "latest snapshot 2.6 version"`
-if [ -z "$NEW" ] ; then
- NEW=`curl -s http://www.kernel.org/kdist/finger_banner | grep "latest mainline 2.6 version"`
- if [ -z "$NEW" ] ; then
- if [ "$OLDRC" -ne 0 ] ; then
- NEW=`curl -s http://www.kernel.org/kdist/finger_banner | grep "latest stable 2.6." | head -n1`
- else
- echo "No new rc or git snapshot of stable branch".
- exit 0
- fi
- fi
-fi
-export N=`echo $NEW | awk '{ print $11 }'`
-if [ -z "$N" ]; then
- # "Stable version"
- export NEW=`echo $NEW | awk '{ print $10 }'`
-else
- export NEW=`echo $NEW | awk '{ print $11 }'`
-fi
-
-export NEWBASE=`echo $NEW | sed s/-/\ /g | sed s/2\.6\.// | awk '{ print $1 }'`
-if [ `echo $NEW | grep -c rc` -ge 1 ]; then
- export NEWRC=`echo $NEW | sed s/-/\ /g | sed s/rc// | awk '{ print $2 }'`
- if [ `echo $NEW | grep -c git` -ge 1 ]; then
- export NEWGIT=`echo $NEW | sed s/-/\ /g | sed s/git// | awk '{ print $3 }'`
- else
- export NEWGIT=0
- fi
-else
- export NEWRC=0
- if [ `echo $NEW | grep -c git` -ge 1 ]; then
- export NEWGIT=`echo $NEW | sed s/-/\ /g | sed s/git// | awk '{ print $2 }'`
- else
- export NEWGIT=0
- fi
-fi
-
-echo "OLD kernel was $OLD BASE=$OLDBASE RC=$OLDRC GIT=$OLDGIT"
-echo "NEW kernel is $NEW BASE=$NEWBASE RC=$NEWRC GIT=$NEWGIT"
-
-if [ "$OLDRC" -eq 0 -a "$OLDGIT" -eq 0 -a "$OLDGIT" -ne "$NEWGIT" ]; then
- echo "Rebasing from a stable release to a new git snapshot"
- perl -p -i -e 's/^%define\ released_kernel\ 1/\%define\ released_kernel\ 0/' kernel.spec
- perl -p -i -e 's/^%define\ rawhide_skip_docs\ 1/\%define\ rawhide_skip_docs\ 0/' kernel.spec
- # force these to zero in this case, they may not have been when we rebased to stable
- perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ 0/' kernel.spec
- perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ 0/' kernel.spec
-fi
-
-# make sure we build docs at least once per -rc kernel, shut it off otherwise
-if [ "$OLDRC" -ne 0 -a "$NEWRC" -gt "$OLDRC" ]; then
- perl -p -i -e 's/^%define\ rawhide_skip_docs\ 1/\%define\ rawhide_skip_docs\ 0/' kernel.spec
-else
- if [ "$NEWRC" -eq "$OLDRC" -a "$NEWGIT" -gt "$OLDGIT" ]; then
- # common case, same -rc, new -git, make sure docs are off.
- perl -p -i -e 's/^%define\ rawhide_skip_docs\ 0/\%define\ rawhide_skip_docs\ 1/' kernel.spec
- fi
-fi
-
-if [ "$NEWRC" -eq 0 -a "$NEWGIT" -eq 0 ]; then
- echo "Rebasing from -rc to final release."
- perl -p -i -e 's/^%define\ released_kernel\ 0/\%define\ released_kernel\ 1/' kernel.spec
- perl -p -i -e 's/^%define\ rawhide_skip_docs\ 1/\%define\ rawhide_skip_docs\ 0/' kernel.spec
- export OLD_TARBALL_BASE=$(($OLDBASE-1))
- perl -p -i -e 's/^%define\ base_sublevel\ $ENV{OLD_TARBALL_BASE}/%define\ base_sublevel\ $ENV{NEWBASE}/' kernel.spec
- perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ 0/' kernel.spec
- perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ 0/' kernel.spec
-
- grep -v kernel-2.6.$OLD_TARBALL_BASE .gitignore >.gitignore.tmp ; mv .gitignore.tmp .gitignore
- echo kernel-2.6.$NEWBASE >> .gitignore
-
- for i in sources .gitignore
- do
- grep -v linux-2.6.$OLD_TARBALL_BASE.tar.bz2 $i > .$i.tmp; mv .$i.tmp $i
- grep -v patch-2.6.$OLDBASE-rc$OLDRC.bz2 $i > .$i.tmp; mv .$i.tmp $i
- grep -v patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2 $i > .$i.tmp; mv .$i.tmp $i
- done
-
- rm -f linux-2.6.$OLD_TARBALL_BASE.tar.bz2
- rm -f patch-2.6.$OLDBASE-rc$OLDRC.bz2
- rm -f patch-2.6.$OLDBASE-rc$OLDRC-git$OLDGIT.bz2
-
- curl -O $KORG26/linux-$NEW.tar.bz2
- fedpkg upload linux-$NEW.tar.bz2
-
- exit 1
-fi
-
-if [ "$OLDRC" != "$NEWRC" ]; then
- echo "Different rc. Rebasing from $OLDRC to $NEWRC"
- perl -p -i -e 's/^%define\ rcrev.*/\%define\ rcrev\ $ENV{"NEWRC"}/' kernel.spec
- grep -v patch-2.6.$OLDBASE-rc$OLDRC.bz2 sources > .sources.tmp; mv .sources.tmp sources
- rm -f patch-2.6.$OLDBASE-rc$OLDRC.bz2
-
- curl -O $KORG26TESTING/patch-2.6.$NEWBASE-rc$NEWRC.bz2
- fedpkg upload patch-2.6.$NEWBASE-rc$NEWRC.bz2
-
- # Another awkward (albeit unlikely) corner case.
- # Moving from say 26-rc3-git1 to 26-rc4-git1
- # The above will grab the new -rc, but the below will
- # think that the -git hasn't changed.
- # Fudge around this, by pretending the old git was something crazy.
- OLDGIT=99
-fi
-
-if [ "$OLDGIT" != "$NEWGIT" ]; then
- if [ "$OLDRC" -eq 0 -a "$OLDGIT" -eq 0 ]; then
- echo "Rebasing to pre-rc git$NEWGIT"
- else
- echo "Different git. Rebasing from git$OLDGIT to git$NEWGIT"
- fi
- perl -p -i -e 's/^%define\ gitrev.*/\%define\ gitrev\ $ENV{"NEWGIT"}/' kernel.spec
- if [ "$OLDGIT" -ne 0 ]; then
- grep -v patch-$OLD.bz2 sources > .sources.tmp; mv .sources.tmp sources
- fi
-
- if [ "$NEWGIT" -ne 0 ]; then
- curl -O $KORG26SNAPS/patch-$NEW.bz2
- fi
- fedpkg upload patch-$NEW.bz2
-
- if [ "$OLDGIT" -ne 0 ]; then
- rm -f patch-$OLD.bz2
- fi
-fi
-
-if [ "$OLDRC" != "$NEWRC" -o "$OLDGIT" != "$NEWGIT" ]; then
- perl -p -i -e 's|^ApplyPatch\ git-linus.diff|#ApplyPatch\ git-linus.diff|' kernel.spec
- > git-linus.diff
- fedpkg clog
- exit 1
-else
- exit 0
-fi
diff --git a/freed-ora/current/master/scripts/reconfig.sh b/freed-ora/current/master/scripts/reconfig.sh
deleted file mode 100755
index d9e8fa7c3..000000000
--- a/freed-ora/current/master/scripts/reconfig.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-
-base_sublevel=$(grep "^%define base_sublevel" kernel.spec | head -n1 | awk '{ print $3 }')
-
-#if [ `grep -c "^%define released_kernel 1" kernel.spec` -ge 1 ]; then
- V=$base_sublevel
-#else
-# let V=$base_sublevel+1
-#fi
-
-cd kernel-2.6.$base_sublevel/linux-2.6.$base_sublevel.noarch/
-rm -f kernel-*.config
-cp ../../kernel-2.6.$V-*.config .
-
-for i in kernel-*.config
-do
- echo $i
- rm -f .config
- cp $i .config
- Arch=`head -1 .config | cut -b 3-`
- make ARCH=$Arch nonint_oldconfig > /dev/null || exit 1
- echo "# $Arch" > configs/$i
- cat .config >> configs/$i
- echo
-done
-
diff --git a/freed-ora/current/master/sources b/freed-ora/current/master/sources
index 59f3b15a9..7386fb8dd 100644
--- a/freed-ora/current/master/sources
+++ b/freed-ora/current/master/sources
@@ -1 +1 @@
-08a17f7b2ba0cf99944672d773ad5a46 linux-3.1-libre.tar.bz2
+ae3610667bc2dea9e2cfb88a8bb61c9c linux-3.2-libre.tar.bz2
diff --git a/freed-ora/current/master/sysfs-msi-irq-per-device.patch b/freed-ora/current/master/sysfs-msi-irq-per-device.patch
new file mode 100644
index 000000000..a2bf57c92
--- /dev/null
+++ b/freed-ora/current/master/sysfs-msi-irq-per-device.patch
@@ -0,0 +1,239 @@
+From: Neil Horman <nhorman@tuxdriver.com>
+Date: Thu, 6 Oct 2011 18:08:18 +0000 (-0400)
+Subject: PCI/sysfs: add per pci device msi[x] irq listing (v5)
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjbarnes%2Fpci.git;a=commitdiff_plain;h=933aa5c1f69aa650f59ba783307fc7ed7cc5fafa
+
+PCI/sysfs: add per pci device msi[x] irq listing (v5)
+
+This patch adds a per-pci-device subdirectory in sysfs called:
+/sys/bus/pci/devices/<device>/msi_irqs
+
+This sub-directory exports the set of msi vectors allocated by a given
+pci device, by creating a numbered sub-directory for each vector beneath
+msi_irqs. For each vector various attributes can be exported.
+Currently the only attribute is called mode, which tracks the
+operational mode of that vector (msi vs. msix)
+
+Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+---
+
+diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
+index 349ecf2..34f5110 100644
+--- a/Documentation/ABI/testing/sysfs-bus-pci
++++ b/Documentation/ABI/testing/sysfs-bus-pci
+@@ -66,6 +66,24 @@ Description:
+ re-discover previously removed devices.
+ Depends on CONFIG_HOTPLUG.
+
++What: /sys/bus/pci/devices/.../msi_irqs/
++Date: September, 2011
++Contact: Neil Horman <nhorman@tuxdriver.com>
++Description:
++ The /sys/devices/.../msi_irqs directory contains a variable set
++ of sub-directories, with each sub-directory being named after a
++ corresponding msi irq vector allocated to that device. Each
++ numbered sub-directory N contains attributes of that irq.
++ Note that this directory is not created for device drivers which
++ do not support msi irqs
++
++What: /sys/bus/pci/devices/.../msi_irqs/<N>/mode
++Date: September 2011
++Contact: Neil Horman <nhorman@tuxdriver.com>
++Description:
++ This attribute indicates the mode that the irq vector named by
++ the parent directory is in (msi vs. msix)
++
+ What: /sys/bus/pci/devices/.../remove
+ Date: January 2009
+ Contact: Linux PCI developers <linux-pci@vger.kernel.org>
+diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
+index 2f10328..73613e2 100644
+--- a/drivers/pci/msi.c
++++ b/drivers/pci/msi.c
+@@ -322,6 +322,8 @@ static void free_msi_irqs(struct pci_dev *dev)
+ if (list_is_last(&entry->list, &dev->msi_list))
+ iounmap(entry->mask_base);
+ }
++ kobject_del(&entry->kobj);
++ kobject_put(&entry->kobj);
+ list_del(&entry->list);
+ kfree(entry);
+ }
+@@ -402,6 +404,98 @@ void pci_restore_msi_state(struct pci_dev *dev)
+ }
+ EXPORT_SYMBOL_GPL(pci_restore_msi_state);
+
++
++#define to_msi_attr(obj) container_of(obj, struct msi_attribute, attr)
++#define to_msi_desc(obj) container_of(obj, struct msi_desc, kobj)
++
++struct msi_attribute {
++ struct attribute attr;
++ ssize_t (*show)(struct msi_desc *entry, struct msi_attribute *attr,
++ char *buf);
++ ssize_t (*store)(struct msi_desc *entry, struct msi_attribute *attr,
++ const char *buf, size_t count);
++};
++
++static ssize_t show_msi_mode(struct msi_desc *entry, struct msi_attribute *atr,
++ char *buf)
++{
++ return sprintf(buf, "%s\n", entry->msi_attrib.is_msix ? "msix" : "msi");
++}
++
++static ssize_t msi_irq_attr_show(struct kobject *kobj,
++ struct attribute *attr, char *buf)
++{
++ struct msi_attribute *attribute = to_msi_attr(attr);
++ struct msi_desc *entry = to_msi_desc(kobj);
++
++ if (!attribute->show)
++ return -EIO;
++
++ return attribute->show(entry, attribute, buf);
++}
++
++static const struct sysfs_ops msi_irq_sysfs_ops = {
++ .show = msi_irq_attr_show,
++};
++
++static struct msi_attribute mode_attribute =
++ __ATTR(mode, S_IRUGO, show_msi_mode, NULL);
++
++
++struct attribute *msi_irq_default_attrs[] = {
++ &mode_attribute.attr,
++ NULL
++};
++
++void msi_kobj_release(struct kobject *kobj)
++{
++ struct msi_desc *entry = to_msi_desc(kobj);
++
++ pci_dev_put(entry->dev);
++}
++
++static struct kobj_type msi_irq_ktype = {
++ .release = msi_kobj_release,
++ .sysfs_ops = &msi_irq_sysfs_ops,
++ .default_attrs = msi_irq_default_attrs,
++};
++
++static int populate_msi_sysfs(struct pci_dev *pdev)
++{
++ struct msi_desc *entry;
++ struct kobject *kobj;
++ int ret;
++ int count = 0;
++
++ pdev->msi_kset = kset_create_and_add("msi_irqs", NULL, &pdev->dev.kobj);
++ if (!pdev->msi_kset)
++ return -ENOMEM;
++
++ list_for_each_entry(entry, &pdev->msi_list, list) {
++ kobj = &entry->kobj;
++ kobj->kset = pdev->msi_kset;
++ pci_dev_get(pdev);
++ ret = kobject_init_and_add(kobj, &msi_irq_ktype, NULL,
++ "%u", entry->irq);
++ if (ret)
++ goto out_unroll;
++
++ count++;
++ }
++
++ return 0;
++
++out_unroll:
++ list_for_each_entry(entry, &pdev->msi_list, list) {
++ if (!count)
++ break;
++ kobject_del(&entry->kobj);
++ kobject_put(&entry->kobj);
++ count--;
++ }
++ return ret;
++}
++
+ /**
+ * msi_capability_init - configure device's MSI capability structure
+ * @dev: pointer to the pci_dev data structure of MSI device function
+@@ -453,6 +547,13 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
+ return ret;
+ }
+
++ ret = populate_msi_sysfs(dev);
++ if (ret) {
++ msi_mask_irq(entry, mask, ~mask);
++ free_msi_irqs(dev);
++ return ret;
++ }
++
+ /* Set MSI enabled bits */
+ pci_intx_for_msi(dev, 0);
+ msi_set_enable(dev, pos, 1);
+@@ -573,6 +674,12 @@ static int msix_capability_init(struct pci_dev *dev,
+
+ msix_program_entries(dev, entries);
+
++ ret = populate_msi_sysfs(dev);
++ if (ret) {
++ ret = 0;
++ goto error;
++ }
++
+ /* Set MSI-X enabled bits and unmask the function */
+ pci_intx_for_msi(dev, 0);
+ dev->msix_enabled = 1;
+@@ -731,6 +838,8 @@ void pci_disable_msi(struct pci_dev *dev)
+
+ pci_msi_shutdown(dev);
+ free_msi_irqs(dev);
++ kset_unregister(dev->msi_kset);
++ dev->msi_kset = NULL;
+ }
+ EXPORT_SYMBOL(pci_disable_msi);
+
+@@ -829,6 +938,8 @@ void pci_disable_msix(struct pci_dev *dev)
+
+ pci_msix_shutdown(dev);
+ free_msi_irqs(dev);
++ kset_unregister(dev->msi_kset);
++ dev->msi_kset = NULL;
+ }
+ EXPORT_SYMBOL(pci_disable_msix);
+
+diff --git a/include/linux/msi.h b/include/linux/msi.h
+index 05acced..ce93a34 100644
+--- a/include/linux/msi.h
++++ b/include/linux/msi.h
+@@ -1,6 +1,7 @@
+ #ifndef LINUX_MSI_H
+ #define LINUX_MSI_H
+
++#include <linux/kobject.h>
+ #include <linux/list.h>
+
+ struct msi_msg {
+@@ -44,6 +45,8 @@ struct msi_desc {
+
+ /* Last set MSI message */
+ struct msi_msg msg;
++
++ struct kobject kobj;
+ };
+
+ /*
+diff --git a/include/linux/pci.h b/include/linux/pci.h
+index 7cda65b..84225c7 100644
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
+@@ -336,6 +336,7 @@ struct pci_dev {
+ struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
+ #ifdef CONFIG_PCI_MSI
+ struct list_head msi_list;
++ struct kset *msi_kset;
+ #endif
+ struct pci_vpd *vpd;
+ #ifdef CONFIG_PCI_ATS
diff --git a/freed-ora/current/master/udlfb-bind-framebuffer-to-interface.patch b/freed-ora/current/master/udlfb-bind-framebuffer-to-interface.patch
deleted file mode 100644
index 1c5c6df9b..000000000
--- a/freed-ora/current/master/udlfb-bind-framebuffer-to-interface.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From c91a793f66d5b06292aa431ae3a36c8aca991fa3 Mon Sep 17 00:00:00 2001
-From: Kay Sievers <kay.sievers@vrfy.org>
-Date: Tue, 5 Jul 2011 17:04:11 -0700
-Subject: [PATCH] drivers/video/udlfb bind framebuffer to interface.
-
-Udlfb has been binding the framebuffer device to its parent, which
-isn't correct and causes confusion with operations like udev remove.
-
-Coming plug and play multiseat support is dependent on this fix.
-
-Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
-Signed-off-by: Bernie Thompson <bernie@plugable.com>
-Signed-off-by: Paul Mundt <lethal@linux-sh.org>
----
- drivers/video/udlfb.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
-index 816a4fd..c6584c9 100644
---- a/drivers/video/udlfb.c
-+++ b/drivers/video/udlfb.c
-@@ -1549,7 +1549,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
- /* We don't register a new USB class. Our client interface is fbdev */
-
- /* allocates framebuffer driver structure, not framebuffer memory */
-- info = framebuffer_alloc(0, &usbdev->dev);
-+ info = framebuffer_alloc(0, &interface->dev);
- if (!info) {
- retval = -ENOMEM;
- pr_err("framebuffer_alloc failed\n");
---
-1.7.4.4
-
diff --git a/freed-ora/current/master/ums-realtek-driver-uses-stack-memory-for-DMA.patch b/freed-ora/current/master/ums-realtek-driver-uses-stack-memory-for-DMA.patch
deleted file mode 100644
index 98c8b0cf9..000000000
--- a/freed-ora/current/master/ums-realtek-driver-uses-stack-memory-for-DMA.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From patchwork Tue Aug 2 05:04:11 2011
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-Subject: ums-realtek driver uses stack memory for DMA
-Date: Tue, 02 Aug 2011 05:04:11 -0000
-From: Adam Cozzette <acozzette@cs.hmc.edu>
-X-Patchwork-Id: 1028062
-Message-Id: <20110802050411.GC3857@[192.168.0.12]>
-To: Josh Boyer <jwboyer@redhat.com>
-Cc: edwin_rong <edwin_rong@realsil.com.cn>, wwang <wei_wang@realsil.com.cn>,
- Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org,
- linux-kernel@vger.kernel.org
-
-On Mon, Aug 01, 2011 at 05:09:06PM -0400, Josh Boyer wrote:
-> Hello,
->
-> We have a report that the ums-realtek driver is generating a backtrace
-> due to using stack variables for DMA buffers. The backtrace is below
-> and you can view the bug report here:
-> https://bugzilla.redhat.com/show_bug.cgi?id=720054
->
-> Looking through the code, it seems that every call to rts51x_read_mem,
-> rts51x_write_mem, and rts51x_read_status passes a stack variable to
-> rts51x_bulk_transport, which then calls usb_stor_bulk_transfer_buf with
-> this and generates the backtrace. It is my understanding that the
-> driver should be passing variables that are not on the stack and have
-> been allocated with memory that will be suitable for the DMA api (e.g.
-> kmalloc).
->
-> Was this missed during the initial review and is anyone working on
-> adapting the driver to be compliant?
-
-Could you try out this patch if it looks ok to you? I have not tested it because
-unfortunately I don't have the hardware. Right now it generates some compile
-warnings like this one:
-
-drivers/usb/storage/realtek_cr.c:419:40: warning: ‘buf[0]’ may be used uninitialized in this function [-Wuninitialized]
-
-It think they are harmless but I didn't see an obvious way to get rid of them,
-so if you have any suggestions I would be glad to hear them.
-
-This patch changed rts51x_read_mem, rts51x_write_mem, and rts51x_read_status to
-allocate temporary buffers with kmalloc. This way stack addresses are not used
-for DMA when these functions call rts51x_bulk_transport.
-
-Signed-off-by: Adam Cozzette <acozzette@cs.hmc.edu>
-
----
-realtek_cr.c | 35 ++++++++++++++++++++++++++++++-----
- 1 file changed, 30 insertions(+), 5 deletions(-)
-
---
-To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at http://vger.kernel.org/majordomo-info.html
-Please read the FAQ at http://www.tux.org/lkml/
-
-diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
-index 34adc4b..232167a 100644
---- a/drivers/usb/storage/realtek_cr.c
-+++ b/drivers/usb/storage/realtek_cr.c
-@@ -320,6 +320,11 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- {
- int retval;
- u8 cmnd[12] = { 0 };
-+ u8 *buf;
-+
-+ buf = kmalloc(len, GFP_NOIO);
-+ if (buf == NULL)
-+ return USB_STOR_TRANSPORT_ERROR;
-
- US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
-
-@@ -331,10 +336,14 @@ static int rts51x_read_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- cmnd[5] = (u8) len;
-
- retval = rts51x_bulk_transport(us, 0, cmnd, 12,
-- data, len, DMA_FROM_DEVICE, NULL);
-- if (retval != USB_STOR_TRANSPORT_GOOD)
-+ buf, len, DMA_FROM_DEVICE, NULL);
-+ if (retval != USB_STOR_TRANSPORT_GOOD) {
-+ kfree(buf);
- return -EIO;
-+ }
-
-+ memcpy(data, buf, len);
-+ kfree(buf);
- return 0;
- }
-
-@@ -342,6 +351,12 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- {
- int retval;
- u8 cmnd[12] = { 0 };
-+ u8 *buf;
-+
-+ buf = kmalloc(len, GFP_NOIO);
-+ if (buf == NULL)
-+ return USB_STOR_TRANSPORT_ERROR;
-+ memcpy(buf, data, len);
-
- US_DEBUGP("%s, addr = 0x%x, len = %d\n", __func__, addr, len);
-
-@@ -353,7 +368,8 @@ static int rts51x_write_mem(struct us_data *us, u16 addr, u8 *data, u16 len)
- cmnd[5] = (u8) len;
-
- retval = rts51x_bulk_transport(us, 0, cmnd, 12,
-- data, len, DMA_TO_DEVICE, NULL);
-+ buf, len, DMA_TO_DEVICE, NULL);
-+ kfree(buf);
- if (retval != USB_STOR_TRANSPORT_GOOD)
- return -EIO;
-
-@@ -365,6 +381,11 @@ static int rts51x_read_status(struct us_data *us,
- {
- int retval;
- u8 cmnd[12] = { 0 };
-+ u8 *buf;
-+
-+ buf = kmalloc(len, GFP_NOIO);
-+ if (buf == NULL)
-+ return USB_STOR_TRANSPORT_ERROR;
-
- US_DEBUGP("%s, lun = %d\n", __func__, lun);
-
-@@ -372,10 +393,14 @@ static int rts51x_read_status(struct us_data *us,
- cmnd[1] = 0x09;
-
- retval = rts51x_bulk_transport(us, lun, cmnd, 12,
-- status, len, DMA_FROM_DEVICE, actlen);
-- if (retval != USB_STOR_TRANSPORT_GOOD)
-+ buf, len, DMA_FROM_DEVICE, actlen);
-+ if (retval != USB_STOR_TRANSPORT_GOOD) {
-+ kfree(buf);
- return -EIO;
-+ }
-
-+ memcpy(status, buf, len);
-+ kfree(buf);
- return 0;
- }
-
diff --git a/freed-ora/current/master/usb-add-quirk-for-logitech-webcams.patch b/freed-ora/current/master/usb-add-quirk-for-logitech-webcams.patch
deleted file mode 100644
index 052a27e73..000000000
--- a/freed-ora/current/master/usb-add-quirk-for-logitech-webcams.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From d5446509abd85b6845d91a319a033c5bd17e494d Mon Sep 17 00:00:00 2001
-From: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
-Date: Tue, 13 Sep 2011 08:42:21 +0200
-Subject: [PATCH] USB:add RESET_RESUME for webcams shown to be quirky
-
-From 6f673c5ef819548b2cbaf7bb607779af6fdbe731 Mon Sep 17 00:00:00 2001
-From: Oliver Neukum <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
-Date: Tue, 30 Aug 2011 15:34:32 +0200
-Subject: [PATCH] USB:add RESET_RESUME for webcams shown to be quirky
-
-The new runtime PM code has shown that many webcams suffer
-from a race condition that may crash them upon resume.
-Runtime PM is especially prone to show the problem because
-it retains power to the cameras at all times. However
-system suspension may also crash the devices and retain
-power to the devices.
-The only way to solve this problem without races is in
-usbcore with the RESET_RESUME quirk.
-
-Signed-off-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
-
-Add C300 ID from patch in rhbz #742010
-Add C600 ID from rhbz #742010
----
- drivers/usb/core/quirks.c | 27 +++++++++++++++++++++++++++
- 1 files changed, 27 insertions(+), 0 deletions(-)
-
-diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
-index 81ce6a8..caa1991 100644
---- a/drivers/usb/core/quirks.c
-+++ b/drivers/usb/core/quirks.c
-@@ -38,6 +38,30 @@ static const struct usb_device_id usb_quirk_list[] = {
- /* Creative SB Audigy 2 NX */
- { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
-
-+ /* Logitech Webcam C200 */
-+ { USB_DEVICE(0x046d, 0x0802), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam C250 */
-+ { USB_DEVICE(0x046d, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam C300 */
-+ { USB_DEVICE(0x046d, 0x0805), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam B/C500 */
-+ { USB_DEVICE(0x046d, 0x0807), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam C600 */
-+ { USB_DEVICE(0x046d, 0x0808), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam Pro 9000 */
-+ { USB_DEVICE(0x046d, 0x0809), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam C310 */
-+ { USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME },
-+
-+ /* Logitech Webcam C270 */
-+ { USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME },
-+
- /* Logitech Harmony 700-series */
- { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT },
-
-@@ -69,6 +93,9 @@ static const struct usb_device_id usb_quirk_list[] = {
- { USB_DEVICE(0x06a3, 0x0006), .driver_info =
- USB_QUIRK_CONFIG_INTF_STRINGS },
-
-+ /* Guillemot Webcam Hercules Dualpix Exchange*/
-+ { USB_DEVICE(0x06f8, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },
-+
- /* M-Systems Flash Disk Pioneers */
- { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
-
---
-1.7.6.4
-
diff --git a/freed-ora/current/master/utrace.patch b/freed-ora/current/master/utrace.patch
index 576c737f3..060d351e5 100644
--- a/freed-ora/current/master/utrace.patch
+++ b/freed-ora/current/master/utrace.patch
@@ -1,39 +1,38 @@
From davej Wed Aug 3 15:16:11 2011
+From oleg@redhat.com Mon Nov 21 15:06:14 2011
Return-Path: oleg@redhat.com
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:11 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:14 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 92D6F9D8C5;
- Wed, 3 Aug 2011 15:12:08 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id RRq2PiCBdMzK; Wed, 3 Aug 2011 15:12:08 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 75C149D898;
- Wed, 3 Aug 2011 15:12:08 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9A1F8D50F1;
+ Mon, 21 Nov 2011 15:06:14 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id gJzpul4rDNnA; Mon, 21 Nov 2011 15:06:14 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7DD4BD50EA;
+ Mon, 21 Nov 2011 15:06:14 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC01d029136;
- Wed, 3 Aug 2011 15:12:01 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6BJJ022074;
+ Mon, 21 Nov 2011 15:06:12 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:28 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:26 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:32 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:30 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 01/31] utrace core
-Message-ID: <20110803190926.GA30903@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 01/33] utrace core
+Message-ID: <20111121200130.GA27756@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 139951
Lines: 3867
@@ -711,10 +710,10 @@ index 3a1dafd..f0c0ea2 100644
if (p->files)
fdt = files_fdtable(p->files);
diff --git a/include/linux/sched.h b/include/linux/sched.h
-index 20b03bf..c6d79af 100644
+index 68daf4f..4d45f93 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
-@@ -1406,6 +1406,11 @@ struct task_struct {
+@@ -1403,6 +1403,11 @@ struct task_struct {
#endif
seccomp_t seccomp;
@@ -1425,7 +1424,7 @@ index 0000000..f251efe
+
+#endif /* linux/utrace.h */
diff --git a/init/Kconfig b/init/Kconfig
-index d627783..7afce1f 100644
+index 43298f9..3f670e5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -372,6 +372,15 @@ config AUDIT_TREE
@@ -1445,7 +1444,7 @@ index d627783..7afce1f 100644
menu "RCU Subsystem"
diff --git a/kernel/Makefile b/kernel/Makefile
-index d06467f..85828da 100644
+index e898c5b..e43bbfb 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -68,6 +68,7 @@ obj-$(CONFIG_IKCONFIG) += configs.o
@@ -3906,47 +3905,40 @@ index 0000000..ef856c9
1.5.5.1
-From davej Wed Aug 3 15:16:13 2011
+From oleg@redhat.com Mon Nov 21 15:06:17 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:13 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:17 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 419B39D8CF;
- Wed, 3 Aug 2011 15:12:11 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1CCED128D6B;
+ Mon, 21 Nov 2011 15:06:17 -0500 (EST)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id AmaThyCcp1K4; Wed, 3 Aug 2011 15:12:11 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2A0B29CE59;
- Wed, 3 Aug 2011 15:12:11 -0400 (EDT)
+ with ESMTP id FWdJDV74o-ay; Mon, 21 Nov 2011 15:06:17 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 082081285E4;
+ Mon, 21 Nov 2011 15:06:17 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC3DW023262;
- Wed, 3 Aug 2011 15:12:04 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6E7d015251;
+ Mon, 21 Nov 2011 15:06:15 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:31 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:29 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:35 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:33 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 02/31] utrace: add utrace_init_task/utrace_free_task calls
-Message-ID: <20110803190929.GA30907@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 02/33] utrace: add utrace_init_task/utrace_free_task calls
+Message-ID: <20111121200133.GA27759@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 1295
Lines: 47
@@ -3966,7 +3958,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
-index e7ceaca..a9891da 100644
+index ba0d172..b8719c2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -66,6 +66,7 @@
@@ -3986,7 +3978,7 @@ index e7ceaca..a9891da 100644
free_task_struct(tsk);
}
EXPORT_SYMBOL(free_task);
-@@ -1096,6 +1099,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
+@@ -1093,6 +1096,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
if (!p)
goto fork_out;
@@ -3999,47 +3991,40 @@ index e7ceaca..a9891da 100644
1.5.5.1
-From davej Wed Aug 3 15:16:18 2011
+From oleg@redhat.com Mon Nov 21 15:06:20 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:18 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:07 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:20 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F28379DE70;
- Wed, 3 Aug 2011 15:12:13 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id p92IDp0LZ5jX; Wed, 3 Aug 2011 15:12:13 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4E339DE68;
- Wed, 3 Aug 2011 15:12:13 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8779AD87BC;
+ Mon, 21 Nov 2011 15:06:20 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id umzAMwRd7rMt; Mon, 21 Nov 2011 15:06:20 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 72C98D8707;
+ Mon, 21 Nov 2011 15:06:20 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC6IA023283;
- Wed, 3 Aug 2011 15:12:07 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6HAj015261;
+ Mon, 21 Nov 2011 15:06:18 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:34 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:32 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:39 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:36 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 03/31] tracehooks: add utrace hooks
-Message-ID: <20110803190932.GA30915@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 03/33] tracehooks: add utrace hooks
+Message-ID: <20111121200136.GA27766@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 2310
Lines: 75
@@ -4120,48 +4105,41 @@ index a71a292..8cc28bc 100644
1.5.5.1
-From davej Wed Aug 3 15:16:14 2011
+From oleg@redhat.com Mon Nov 21 15:06:23 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:14 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:37 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:23 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 92FCA9D8FA;
- Wed, 3 Aug 2011 15:12:16 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id lQaZCHUpw8DT; Wed, 3 Aug 2011 15:12:16 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7479B9D8C9;
- Wed, 3 Aug 2011 15:12:16 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6559BD4FDE;
+ Mon, 21 Nov 2011 15:06:23 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 6BjISiO+cS1U; Mon, 21 Nov 2011 15:06:23 -0500 (EST)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 50366D4C39;
+ Mon, 21 Nov 2011 15:06:23 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JC91G023308;
- Wed, 3 Aug 2011 15:12:09 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6KT9017533;
+ Mon, 21 Nov 2011 15:06:21 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:37 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:35 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:42 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:39 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 04/31] tracehooks: reintroduce
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 04/33] tracehooks: reintroduce
tracehook_consider_fatal_signal()
-Message-ID: <20110803190935.GA30918@redhat.com>
+Message-ID: <20111121200139.GA27769@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
Content-Length: 3257
Lines: 90
@@ -4177,7 +4155,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
3 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
-index ffabcd9..1018ab6 100644
+index a9807dd..f506e1b 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -329,7 +329,7 @@ void __kprobes do_per_trap(struct pt_regs *regs)
@@ -4189,7 +4167,7 @@ index ffabcd9..1018ab6 100644
return;
info.si_signo = SIGTRAP;
info.si_errno = 0;
-@@ -428,7 +428,7 @@ static void __kprobes illegal_op(struct pt_regs *regs, long pgm_int_code,
+@@ -429,7 +429,7 @@ static void __kprobes illegal_op(struct pt_regs *regs, long pgm_int_code,
if (get_user(*((__u16 *) opcode), (__u16 __user *) location))
return;
if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) {
@@ -4232,7 +4210,7 @@ index 8cc28bc..ec2af67 100644
/**
* set_notify_resume - cause tracehook_notify_resume() to be called
diff --git a/kernel/signal.c b/kernel/signal.c
-index 291c970..d7ef0da 100644
+index b3f78d0..d7b90cd 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -494,7 +494,7 @@ int unhandled_signal(struct task_struct *tsk, int sig)
@@ -4257,46 +4235,39 @@ index 291c970..d7ef0da 100644
1.5.5.1
-From davej Wed Aug 3 15:16:20 2011
+From oleg@redhat.com Mon Nov 21 15:06:26 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:20 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:08 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:25 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 374FE9DE74;
- Wed, 3 Aug 2011 15:12:19 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E7A2DD498A;
+ Mon, 21 Nov 2011 15:06:25 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id Sun0Twp72xGV; Wed, 3 Aug 2011 15:12:19 -0400 (EDT)
+ with ESMTP id 4L9zskFVsr4I; Mon, 21 Nov 2011 15:06:25 -0500 (EST)
Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 223E39DD25;
- Wed, 3 Aug 2011 15:12:19 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D3487D4C39;
+ Mon, 21 Nov 2011 15:06:25 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCBgK008326;
- Wed, 3 Aug 2011 15:12:12 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6Nnp017552;
+ Mon, 21 Nov 2011 15:06:24 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:39 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:37 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:44 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:42 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 05/31] add utrace hooks into sig_ignored() and
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 05/33] add utrace hooks into sig_ignored() and
recalc_sigpending()
-Message-ID: <20110803190937.GA30926@redhat.com>
+Message-ID: <20111121200142.GA27777@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
@@ -4327,7 +4298,7 @@ index f251efe..1b8da1c 100644
/*
diff --git a/kernel/signal.c b/kernel/signal.c
-index d7ef0da..0f9af0b 100644
+index d7b90cd..8594cb2 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -87,7 +87,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns)
@@ -4355,45 +4326,38 @@ index d7ef0da..0f9af0b 100644
1.5.5.1
-From davej Wed Aug 3 15:16:21 2011
+From oleg@redhat.com Mon Nov 21 15:06:28 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:21 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:09 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:28 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 054279DE7D;
- Wed, 3 Aug 2011 15:12:22 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6E4A6D4F4A;
+ Mon, 21 Nov 2011 15:06:28 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 1BosZIzYSIW0; Wed, 3 Aug 2011 15:12:21 -0400 (EDT)
+ with ESMTP id vEeGLyK1+rX9; Mon, 21 Nov 2011 15:06:28 -0500 (EST)
Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E41DC9DE7B;
- Wed, 3 Aug 2011 15:12:21 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5AD50D4C39;
+ Mon, 21 Nov 2011 15:06:28 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCEgD022264;
- Wed, 3 Aug 2011 15:12:15 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6QOB029543;
+ Mon, 21 Nov 2011 15:06:26 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:42 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:40 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:47 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:45 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 06/31] restore the EXEC/EXIT/CLONE utrace hooks
-Message-ID: <20110803190940.GA30929@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 06/33] restore the EXEC/EXIT/CLONE utrace hooks
+Message-ID: <20111121200145.GA27780@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
@@ -4412,10 +4376,10 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
-index da80612..a0814cd 100644
+index 3625464..7d8f8bd 100644
--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -1401,9 +1401,12 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
+@@ -1397,9 +1397,12 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
*/
bprm->recursion_depth = depth;
if (retval >= 0) {
@@ -4447,10 +4411,10 @@ index 1b8da1c..9ac0b1b 100644
/*
diff --git a/kernel/exit.c b/kernel/exit.c
-index 2913b35..c1b0ab6 100644
+index d0b7d98..f5eba3b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
-@@ -913,6 +913,7 @@ NORET_TYPE void do_exit(long code)
+@@ -911,6 +911,7 @@ NORET_TYPE void do_exit(long code)
*/
set_fs(USER_DS);
@@ -4459,10 +4423,10 @@ index 2913b35..c1b0ab6 100644
validate_creds_for_do_exit(tsk);
diff --git a/kernel/fork.c b/kernel/fork.c
-index a9891da..37f4a07 100644
+index b8719c2..09d5049 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -1539,6 +1539,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1535,6 +1535,8 @@ long do_fork(unsigned long clone_flags,
audit_finish_fork(p);
@@ -4471,7 +4435,7 @@ index a9891da..37f4a07 100644
/*
* We set PF_STARTING at creation in case tracing wants to
* use this to distinguish a fully live task from one that
-@@ -1550,6 +1552,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1546,6 +1548,8 @@ long do_fork(unsigned long clone_flags,
wake_up_new_task(p);
/* forking complete and child started to run, tell ptracer */
@@ -4484,48 +4448,41 @@ index a9891da..37f4a07 100644
1.5.5.1
-From davej Wed Aug 3 15:16:23 2011
+From oleg@redhat.com Mon Nov 21 15:06:30 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:23 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:13 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:30 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B36EC9DE82;
- Wed, 3 Aug 2011 15:12:24 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 7Qqv+lXfqHw6; Wed, 3 Aug 2011 15:12:24 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9F8AF9DD25;
- Wed, 3 Aug 2011 15:12:24 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D248D1284E0;
+ Mon, 21 Nov 2011 15:06:30 -0500 (EST)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id divvekTmLScS; Mon, 21 Nov 2011 15:06:30 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BDC9412800E;
+ Mon, 21 Nov 2011 15:06:30 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCH0U023349;
- Wed, 3 Aug 2011 15:12:17 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6Shj029546;
+ Mon, 21 Nov 2011 15:06:29 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:45 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:43 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:49 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:47 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 07/31] utrace: utrace_report_death() can use
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 07/33] utrace: utrace_report_death() can use
task_utrace_struct()
-Message-ID: <20110803190943.GA30936@redhat.com>
+Message-ID: <20111121200147.GA27787@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 1692
Lines: 44
@@ -4575,45 +4532,38 @@ index ef856c9..1e750ad 100644
1.5.5.1
-From davej Wed Aug 3 15:16:15 2011
+From oleg@redhat.com Mon Nov 21 15:06:33 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:15 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:39 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:33 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 76DA49D9C7;
- Wed, 3 Aug 2011 15:12:27 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 25xHJjCTouA4; Wed, 3 Aug 2011 15:12:27 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 62E1BD50A3;
+ Mon, 21 Nov 2011 15:06:33 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id FB36YkOAHDc5; Mon, 21 Nov 2011 15:06:33 -0500 (EST)
Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 490E79D9AB;
- Wed, 3 Aug 2011 15:12:27 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4D161D4C39;
+ Mon, 21 Nov 2011 15:06:33 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCKXo023360;
- Wed, 3 Aug 2011 15:12:20 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6VBW022130;
+ Mon, 21 Nov 2011 15:06:31 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:47 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:45 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:52 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:50 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 08/31] restore the DEATH/REAP utrace hooks
-Message-ID: <20110803190945.GA30939@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 08/33] restore the DEATH/REAP utrace hooks
+Message-ID: <20111121200150.GA27790@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
@@ -4666,7 +4616,7 @@ index 9a2e2f4..cf13839 100644
+
#endif /* linux/utrace.h */
diff --git a/kernel/exit.c b/kernel/exit.c
-index c1b0ab6..ba5ba22 100644
+index f5eba3b..746c5df 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -168,6 +168,8 @@ void release_task(struct task_struct * p)
@@ -4678,7 +4628,7 @@ index c1b0ab6..ba5ba22 100644
/* don't need to get the RCU readlock here - the process is dead and
* can't be modifying its own credentials. But shut RCU-lockdep up */
rcu_read_lock();
-@@ -860,6 +862,8 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
+@@ -858,6 +860,8 @@ static void exit_notify(struct task_struct *tsk, int group_dead)
wake_up_process(tsk->signal->group_exit_task);
write_unlock_irq(&tasklist_lock);
@@ -4691,47 +4641,40 @@ index c1b0ab6..ba5ba22 100644
1.5.5.1
-From davej Wed Aug 3 15:22:02 2011
+From oleg@redhat.com Mon Nov 21 15:06:35 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:22:02 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:17:16 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:35 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 26DB69DE8C;
- Wed, 3 Aug 2011 15:12:30 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id DbxGfmFvtTiR; Wed, 3 Aug 2011 15:12:30 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0A30A9DE91;
- Wed, 3 Aug 2011 15:12:30 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D4AB3D8761;
+ Mon, 21 Nov 2011 15:06:35 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id TiShkH1f6rnj; Mon, 21 Nov 2011 15:06:35 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BCB85D877F;
+ Mon, 21 Nov 2011 15:06:35 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCMDQ008389;
- Wed, 3 Aug 2011 15:12:23 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6XNu015312;
+ Mon, 21 Nov 2011 15:06:34 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:50 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:48 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:54 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:52 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 09/31] utrace: remove jobctl bits
-Message-ID: <20110803190948.GA30942@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 09/33] utrace: remove jobctl bits
+Message-ID: <20111121200152.GA27793@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 1888
Lines: 56
@@ -4793,47 +4736,40 @@ index 1e750ad..5d3974e 100644
1.5.5.1
-From davej Wed Aug 3 15:16:17 2011
+From oleg@redhat.com Mon Nov 21 15:06:38 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:17 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:52 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:38 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id AB6E39DA46;
- Wed, 3 Aug 2011 15:12:32 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id LkzmRGslEelr; Wed, 3 Aug 2011 15:12:32 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 959659DA60;
- Wed, 3 Aug 2011 15:12:32 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 425CED8707;
+ Mon, 21 Nov 2011 15:06:38 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 9paRC+dwSflh; Mon, 21 Nov 2011 15:06:38 -0500 (EST)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2DDBCD8410;
+ Mon, 21 Nov 2011 15:06:38 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCPx7023400;
- Wed, 3 Aug 2011 15:12:25 -0400
+ by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6a31031355;
+ Mon, 21 Nov 2011 15:06:36 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:53 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:51 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:56 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:55 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 10/31] ptrace: take ->siglock around s/TRACED/RUNNING/
-Message-ID: <20110803190951.GA30949@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 10/33] ptrace: take ->siglock around s/TRACED/RUNNING/
+Message-ID: <20111121200155.GA27801@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Status: RO
Content-Length: 1624
Lines: 56
@@ -4851,7 +4787,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 9de3ecf..56b8fc1 100644
+index 24d0447..daf47bc 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -589,6 +589,8 @@ static int ptrace_setsiginfo(struct task_struct *child, const siginfo_t *info)
@@ -4877,10 +4813,10 @@ index 9de3ecf..56b8fc1 100644
return 0;
}
diff --git a/kernel/signal.c b/kernel/signal.c
-index 0f9af0b..71f5cca 100644
+index 8594cb2..4512bb4 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
-@@ -1878,7 +1878,10 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1886,7 +1886,10 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
if (gstop_done)
do_notify_parent_cldstop(current, false, why);
@@ -4895,47 +4831,40 @@ index 0f9af0b..71f5cca 100644
1.5.5.1
-From davej Wed Aug 3 15:16:37 2011
+From oleg@redhat.com Mon Nov 21 15:06:40 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:37 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:29 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:40 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5034E9DEA4;
- Wed, 3 Aug 2011 15:12:35 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 8BhFlmqmXy8l; Wed, 3 Aug 2011 15:12:35 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 31AEE9DEAB;
- Wed, 3 Aug 2011 15:12:35 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B0D19D877F;
+ Mon, 21 Nov 2011 15:06:40 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 3jv-cDBpMP5B; Mon, 21 Nov 2011 15:06:40 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9C98DD8410;
+ Mon, 21 Nov 2011 15:06:40 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCRCZ008434;
- Wed, 3 Aug 2011 15:12:28 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6cHF029573;
+ Mon, 21 Nov 2011 15:06:39 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:55 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:53 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:01:59 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:57 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 11/31] introduce wake_up_quiescent()
-Message-ID: <20110803190953.GA30952@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 11/33] introduce wake_up_quiescent()
+Message-ID: <20111121200157.GA27805@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 3186
Lines: 93
@@ -4968,7 +4897,7 @@ index a822300..2be3712 100644
extern int do_send_sig_info(int sig, struct siginfo *info,
struct task_struct *p, bool group);
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 56b8fc1..4194664 100644
+index daf47bc..8439ef1 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -621,7 +621,7 @@ static int ptrace_resume(struct task_struct *child, long request,
@@ -4981,7 +4910,7 @@ index 56b8fc1..4194664 100644
}
diff --git a/kernel/signal.c b/kernel/signal.c
-index 71f5cca..3e8e0b1 100644
+index 4512bb4..99a6008 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -702,6 +702,14 @@ void signal_wake_up(struct task_struct *t, int resume)
@@ -5008,7 +4937,7 @@ index 71f5cca..3e8e0b1 100644
else
ptrace_trap_notify(t);
} while_each_thread(p, t);
-@@ -1879,7 +1887,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1887,7 +1895,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
do_notify_parent_cldstop(current, false, why);
spin_lock_irq(&current->sighand->siglock);
@@ -5034,49 +4963,42 @@ index 5d3974e..cebc390 100644
1.5.5.1
-From davej Wed Aug 3 15:22:01 2011
+From oleg@redhat.com Mon Nov 21 15:06:43 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:22:01 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:17:15 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:43 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F2DE19DC07;
- Wed, 3 Aug 2011 15:12:37 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id IYfqfx8GhNWc; Wed, 3 Aug 2011 15:12:37 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D645E9DAF7;
- Wed, 3 Aug 2011 15:12:37 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6488BD514C;
+ Mon, 21 Nov 2011 15:06:43 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id TKQUj5mU4NYM; Mon, 21 Nov 2011 15:06:43 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4EC82D5000;
+ Mon, 21 Nov 2011 15:06:43 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCUNh008446;
- Wed, 3 Aug 2011 15:12:31 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6fp6015343;
+ Mon, 21 Nov 2011 15:06:41 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:09:58 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:56 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:02 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:01:59 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 12/31] introduce ptrace_signal_wake_up()
-Message-ID: <20110803190956.GA30959@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 12/33] introduce ptrace_signal_wake_up()
+Message-ID: <20111121200159.GA27812@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
-Content-Length: 3667
+Content-Length: 3670
Lines: 113
Add the new helper, ptrace_signal_wake_up(), change ptrace.c/signal.c
@@ -5118,7 +5040,7 @@ index 800f113..6d9282a 100644
extern long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data);
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 4194664..1a50090 100644
+index 8439ef1..a464ab5 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -25,6 +25,18 @@
@@ -5167,7 +5089,7 @@ index 4194664..1a50090 100644
unlock_task_sighand(child, &flags);
ret = 0;
-@@ -760,7 +772,7 @@ int ptrace_request(struct task_struct *child, long request,
+@@ -757,7 +769,7 @@ int ptrace_request(struct task_struct *child, long request,
* start of this trap and now. Trigger re-trap.
*/
if (child->jobctl & JOBCTL_TRAP_NOTIFY)
@@ -5177,7 +5099,7 @@ index 4194664..1a50090 100644
}
unlock_task_sighand(child, &flags);
diff --git a/kernel/signal.c b/kernel/signal.c
-index 3e8e0b1..0dc6abb 100644
+index 99a6008..7a47a93 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -854,7 +854,7 @@ static void ptrace_trap_notify(struct task_struct *t)
@@ -5193,48 +5115,41 @@ index 3e8e0b1..0dc6abb 100644
1.5.5.1
-From davej Wed Aug 3 15:15:58 2011
+From oleg@redhat.com Mon Nov 21 15:06:46 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:15:58 -0400 (EDT)
Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:17 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:46 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8FF88DA558;
- Wed, 3 Aug 2011 15:12:40 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 3A7AED8410;
+ Mon, 21 Nov 2011 15:06:46 -0500 (EST)
Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 1cOfIyuaRoO3; Wed, 3 Aug 2011 15:12:40 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7B6E8DA4A9;
- Wed, 3 Aug 2011 15:12:40 -0400 (EDT)
+ with ESMTP id jhYAwDyYmdhg; Mon, 21 Nov 2011 15:06:46 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 25D5FD889A;
+ Mon, 21 Nov 2011 15:06:46 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCXpn023459;
- Wed, 3 Aug 2011 15:12:33 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6h29029619;
+ Mon, 21 Nov 2011 15:06:44 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:01 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:09:59 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:04 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:02 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 13/31] wait_task_inactive: treat task->state and
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 13/33] wait_task_inactive: treat task->state and
match_state as bitmasks
-Message-ID: <20110803190959.GA30962@redhat.com>
+Message-ID: <20111121200202.GA27816@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 1558
Lines: 39
@@ -5263,10 +5178,10 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
-index ccacdbd..66ef2fb 100644
+index 0e9344a..84ecc0a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
-@@ -2289,7 +2289,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
+@@ -2443,7 +2443,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
* is actually now running somewhere else!
*/
while (task_running(rq, p)) {
@@ -5279,47 +5194,40 @@ index ccacdbd..66ef2fb 100644
1.5.5.1
-From davej Wed Aug 3 15:16:24 2011
+From oleg@redhat.com Mon Nov 21 15:06:48 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:24 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:21 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:48 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 34C189DC30;
- Wed, 3 Aug 2011 15:12:43 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id RHggq6bqo+Q9; Wed, 3 Aug 2011 15:12:43 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 210D59DC14;
- Wed, 3 Aug 2011 15:12:43 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C2934D5000;
+ Mon, 21 Nov 2011 15:06:48 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id ThT2PyhztDpQ; Mon, 21 Nov 2011 15:06:48 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id ACE02D4F84;
+ Mon, 21 Nov 2011 15:06:48 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCZsD022395;
- Wed, 3 Aug 2011 15:12:36 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6kdb022201;
+ Mon, 21 Nov 2011 15:06:47 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:03 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:01 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:07 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:05 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 14/31] introduce TASK_UTRACED state
-Message-ID: <20110803191001.GA30969@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 14/33] introduce TASK_UTRACED state
+Message-ID: <20111121200205.GA27823@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 2913
Lines: 84
@@ -5358,10 +5266,10 @@ index f0c0ea2..e0daec4 100644
static inline const char *get_task_state(struct task_struct *tsk)
diff --git a/include/linux/sched.h b/include/linux/sched.h
-index c6d79af..f3f0a77 100644
+index 4d45f93..746b4d3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
-@@ -184,16 +184,17 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
+@@ -185,16 +185,17 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
#define TASK_UNINTERRUPTIBLE 2
#define __TASK_STOPPED 4
#define __TASK_TRACED 8
@@ -5386,7 +5294,7 @@ index c6d79af..f3f0a77 100644
extern char ___assert_task_state[1 - 2*!!(
sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)];
-@@ -202,15 +203,16 @@ extern char ___assert_task_state[1 - 2*!!(
+@@ -203,15 +204,16 @@ extern char ___assert_task_state[1 - 2*!!(
#define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE)
#define TASK_STOPPED (TASK_WAKEKILL | __TASK_STOPPED)
#define TASK_TRACED (TASK_WAKEKILL | __TASK_TRACED)
@@ -5409,47 +5317,40 @@ index c6d79af..f3f0a77 100644
1.5.5.1
-From davej Wed Aug 3 15:16:02 2011
+From oleg@redhat.com Mon Nov 21 15:06:51 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:02 -0400 (EDT)
Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:18 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:51 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D7FFADA44E;
- Wed, 3 Aug 2011 15:12:45 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 48F35D889C;
+ Mon, 21 Nov 2011 15:06:51 -0500 (EST)
Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id LFGdvSMswLJT; Wed, 3 Aug 2011 15:12:45 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id BA46CDA441;
- Wed, 3 Aug 2011 15:12:45 -0400 (EDT)
+ with ESMTP id ZXkDvXaDg0cN; Mon, 21 Nov 2011 15:06:51 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 34485D889A;
+ Mon, 21 Nov 2011 15:06:51 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCcpZ029424;
- Wed, 3 Aug 2011 15:12:39 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6nlT022211;
+ Mon, 21 Nov 2011 15:06:49 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:06 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:04 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:09 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:08 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 15/31] utrace: use TASK_UTRACED instead of TASK_TRACED
-Message-ID: <20110803191004.GA30972@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 15/33] utrace: use TASK_UTRACED instead of TASK_TRACED
+Message-ID: <20111121200208.GA27826@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 4316
Lines: 130
@@ -5585,48 +5486,41 @@ index cebc390..2097103 100644
1.5.5.1
-From davej Wed Aug 3 15:21:40 2011
+From oleg@redhat.com Mon Nov 21 15:06:53 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:40 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:42 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:53 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7035E9DECC;
- Wed, 3 Aug 2011 15:12:48 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B8F54D5296;
+ Mon, 21 Nov 2011 15:06:53 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id rmRalMQFlNua; Wed, 3 Aug 2011 15:12:48 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5CC809DEC9;
- Wed, 3 Aug 2011 15:12:48 -0400 (EDT)
+ with ESMTP id PX4Y3H1mw0hD; Mon, 21 Nov 2011 15:06:53 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A4B5CD528E;
+ Mon, 21 Nov 2011 15:06:53 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCfwv010344;
- Wed, 3 Aug 2011 15:12:41 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6pXd029643;
+ Mon, 21 Nov 2011 15:06:52 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:09 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:07 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:12 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:10 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 16/31] reintroduce tracehook_finish_jctl() as
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 16/33] reintroduce tracehook_finish_jctl() as
utrace_end_stop()
-Message-ID: <20110803191007.GA30979@redhat.com>
+Message-ID: <20111121200210.GA27829@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 2401
Lines: 77
@@ -5670,10 +5564,10 @@ index cf13839..0279c74 100644
+
#endif /* linux/utrace.h */
diff --git a/kernel/signal.c b/kernel/signal.c
-index 0dc6abb..a625309 100644
+index 7a47a93..ba46eab 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
-@@ -1895,6 +1895,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1903,6 +1903,8 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
read_unlock(&tasklist_lock);
}
@@ -5682,7 +5576,7 @@ index 0dc6abb..a625309 100644
/*
* While in TASK_TRACED, we were considered "frozen enough".
* Now that we woke up, it's crucial if we're supposed to be
-@@ -2059,6 +2061,9 @@ static bool do_signal_stop(int signr)
+@@ -2067,6 +2069,9 @@ static bool do_signal_stop(int signr)
/* Now we don't run again until woken by SIGCONT or SIGKILL */
schedule();
@@ -5709,47 +5603,40 @@ index 2097103..d41b982 100644
1.5.5.1
-From davej Wed Aug 3 15:21:41 2011
+From oleg@redhat.com Mon Nov 21 15:06:56 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:41 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:42 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:56 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 153719DD18;
- Wed, 3 Aug 2011 15:12:51 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id ffM0oM8RRtgL; Wed, 3 Aug 2011 15:12:51 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0253E9DEC9;
- Wed, 3 Aug 2011 15:12:51 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4A487D83A1;
+ Mon, 21 Nov 2011 15:06:56 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 3vHogPyhojlJ; Mon, 21 Nov 2011 15:06:56 -0500 (EST)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 358A0D88B0;
+ Mon, 21 Nov 2011 15:06:56 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCh9Z023559;
- Wed, 3 Aug 2011 15:12:44 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK6sHk017679;
+ Mon, 21 Nov 2011 15:06:54 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:11 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:09 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:14 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:12 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 17/31] teach wake_up_quiescent() to do "selective" wake_up
-Message-ID: <20110803191009.GA30982@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 17/33] teach wake_up_quiescent() to do "selective" wake_up
+Message-ID: <20111121200212.GA27836@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
Content-Length: 1335
Lines: 46
@@ -5767,7 +5654,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
-index a625309..0d1675a 100644
+index ba46eab..e06f795 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -701,11 +701,26 @@ void signal_wake_up(struct task_struct *t, int resume)
@@ -5801,48 +5688,41 @@ index a625309..0d1675a 100644
1.5.5.1
-From davej Wed Aug 3 15:21:43 2011
+From oleg@redhat.com Mon Nov 21 15:06:59 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:43 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:06:58 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B0E899DECF;
- Wed, 3 Aug 2011 15:12:53 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id C88E2D528B;
+ Mon, 21 Nov 2011 15:06:58 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id s0bDFhAmsQWN; Wed, 3 Aug 2011 15:12:53 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9DC6E9DEC9;
- Wed, 3 Aug 2011 15:12:53 -0400 (EDT)
+ with ESMTP id nNrAxBD5KOME; Mon, 21 Nov 2011 15:06:58 -0500 (EST)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B2114D51C1;
+ Mon, 21 Nov 2011 15:06:58 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCkUr029453;
- Wed, 3 Aug 2011 15:12:46 -0400
+ by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6uQQ031440;
+ Mon, 21 Nov 2011 15:06:57 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:14 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:12 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:17 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:15 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 18/31] ptrace_stop: do not assume the task is running after
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 18/33] ptrace_stop: do not assume the task is running after
wake_up_quiescent()
-Message-ID: <20110803191012.GA30985@redhat.com>
+Message-ID: <20111121200215.GA27839@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Status: RO
Content-Length: 956
Lines: 31
@@ -5857,10 +5737,10 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
-index 0d1675a..249760f 100644
+index e06f795..9348da6 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
-@@ -1908,6 +1908,14 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1916,6 +1916,14 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
if (clear_code)
current->exit_code = 0;
read_unlock(&tasklist_lock);
@@ -5879,48 +5759,41 @@ index 0d1675a..249760f 100644
1.5.5.1
-From davej Wed Aug 3 15:16:26 2011
+From oleg@redhat.com Mon Nov 21 15:07:01 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:26 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:22 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:01 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 69B489DC62;
- Wed, 3 Aug 2011 15:12:56 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 4BNNeoYSdCTc; Wed, 3 Aug 2011 15:12:56 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4A9899DC14;
- Wed, 3 Aug 2011 15:12:56 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4BF37D889A;
+ Mon, 21 Nov 2011 15:07:01 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 5p8tvlXAqUHr; Mon, 21 Nov 2011 15:07:01 -0500 (EST)
+Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 37C22D8757;
+ Mon, 21 Nov 2011 15:07:01 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCnRf023575;
- Wed, 3 Aug 2011 15:12:49 -0400
+ by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK6xFJ031449;
+ Mon, 21 Nov 2011 15:06:59 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:16 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:14 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:19 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:18 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 19/31] get_signal_to_deliver: restore/restructure
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 19/33] get_signal_to_deliver: restore/restructure
utrace/ptrace signal reporting
-Message-ID: <20110803191014.GA30992@redhat.com>
+Message-ID: <20111121200218.GA27846@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Status: RO
Content-Length: 3556
Lines: 115
@@ -5986,10 +5859,10 @@ index 0279c74..63103e2 100644
+
#endif /* linux/utrace.h */
diff --git a/kernel/signal.c b/kernel/signal.c
-index 249760f..3c783d3 100644
+index 9348da6..38ea4e6 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
-@@ -2234,17 +2234,27 @@ relock:
+@@ -2242,17 +2242,27 @@ relock:
for (;;) {
struct k_sigaction *ka;
@@ -6025,7 +5898,7 @@ index 249760f..3c783d3 100644
if (!signr)
break; /* will return 0 */
-@@ -2254,9 +2264,9 @@ relock:
+@@ -2262,9 +2272,9 @@ relock:
regs, cookie);
if (!signr)
continue;
@@ -6041,46 +5914,39 @@ index 249760f..3c783d3 100644
1.5.5.1
-From davej Wed Aug 3 15:16:27 2011
+From oleg@redhat.com Mon Nov 21 15:07:03 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:27 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:22 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:03 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 119589DC72;
- Wed, 3 Aug 2011 15:12:59 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id Vxp8fnt8hEcf; Wed, 3 Aug 2011 15:12:59 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id CB362D89E9;
+ Mon, 21 Nov 2011 15:07:03 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id wm2JqccPnhsV; Mon, 21 Nov 2011 15:07:03 -0500 (EST)
Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F22049DCAE;
- Wed, 3 Aug 2011 15:12:58 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B6D25D89DE;
+ Mon, 21 Nov 2011 15:07:03 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JCpO4010401;
- Wed, 3 Aug 2011 15:12:52 -0400
+ by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK715f031455;
+ Mon, 21 Nov 2011 15:07:02 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:19 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:17 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:22 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:20 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 20/31] utrace_get_signal:
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 20/33] utrace_get_signal:
s/JOBCTL_STOP_PENDING/JOBCTL_PENDING_MASK/
-Message-ID: <20110803191017.GA30995@redhat.com>
+Message-ID: <20111121200220.GA27849@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Status: RO
@@ -6121,47 +5987,40 @@ index d41b982..0bb0a06 100644
1.5.5.1
-From davej Wed Aug 3 15:16:03 2011
+From oleg@redhat.com Mon Nov 21 15:07:07 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:03 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:19 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:06 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A9253DA3CB;
- Wed, 3 Aug 2011 15:13:01 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id HLlRhTJ2MbYS; Wed, 3 Aug 2011 15:13:01 -0400 (EDT)
-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 9582C4C43B;
- Wed, 3 Aug 2011 15:13:01 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8C14BD4F84;
+ Mon, 21 Nov 2011 15:07:06 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 39eM-KKZxrZ3; Mon, 21 Nov 2011 15:07:06 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7628FD4FF4;
+ Mon, 21 Nov 2011 15:07:06 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCsFX008586;
- Wed, 3 Aug 2011 15:12:54 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK74dN022253;
+ Mon, 21 Nov 2011 15:07:04 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:22 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:20 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:25 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:23 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 21/31] introduce ptrace_set_syscall_trace()
-Message-ID: <20110803191020.GA31002@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 21/33] introduce ptrace_set_syscall_trace()
+Message-ID: <20111121200223.GA27856@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 1549
Lines: 52
@@ -6176,7 +6035,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 1a50090..dc2ad34 100644
+index a464ab5..43357e5 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -38,6 +38,14 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
@@ -6219,47 +6078,40 @@ index 1a50090..dc2ad34 100644
1.5.5.1
-From davej Wed Aug 3 15:21:45 2011
+From oleg@redhat.com Mon Nov 21 15:07:09 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:45 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:09 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5C4889DEE6;
- Wed, 3 Aug 2011 15:13:04 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id eXIPU4nVv+7Z; Wed, 3 Aug 2011 15:13:04 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 3F82C9DED6;
- Wed, 3 Aug 2011 15:13:04 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1ADF01285E4;
+ Mon, 21 Nov 2011 15:07:09 -0500 (EST)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id rF+XegsxVXnL; Mon, 21 Nov 2011 15:07:09 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 067E41287D0;
+ Mon, 21 Nov 2011 15:07:09 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCueo029507;
- Wed, 3 Aug 2011 15:12:57 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK76tD022270;
+ Mon, 21 Nov 2011 15:07:07 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:24 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:22 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:27 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:25 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 22/31] introduce PT_SYSCALL_TRACE flag
-Message-ID: <20110803191022.GA31005@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 22/33] introduce PT_SYSCALL_TRACE flag
+Message-ID: <20111121200225.GA27860@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 2268
Lines: 73
@@ -6315,7 +6167,7 @@ index ec2af67..eb9fe30 100644
ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index dc2ad34..7deb292 100644
+index 43357e5..1ac03eb 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -40,10 +40,13 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent)
@@ -6338,48 +6190,41 @@ index dc2ad34..7deb292 100644
1.5.5.1
-From davej Wed Aug 3 15:16:05 2011
+From oleg@redhat.com Mon Nov 21 15:07:11 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:05 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
- zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:13:20 -0400 (EDT)
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:11 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E516ADA488;
- Wed, 3 Aug 2011 15:13:06 -0400 (EDT)
-Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id rP7Um8DZjclX; Wed, 3 Aug 2011 15:13:06 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id D155EDA3F8;
- Wed, 3 Aug 2011 15:13:06 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B7D62D4DCC;
+ Mon, 21 Nov 2011 15:07:11 -0500 (EST)
+Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 1ENpGO166I-W; Mon, 21 Nov 2011 15:07:11 -0500 (EST)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id A3A55D498A;
+ Mon, 21 Nov 2011 15:07:11 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JCxfF029532;
- Wed, 3 Aug 2011 15:13:00 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK79AS017728;
+ Mon, 21 Nov 2011 15:07:10 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:27 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:25 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:30 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:28 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 23/31] utrace: don't clear TIF_SYSCALL_TRACE if it is
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 23/33] utrace: don't clear TIF_SYSCALL_TRACE if it is
needed by ptrace
-Message-ID: <20110803191025.GA31012@redhat.com>
+Message-ID: <20111121200228.GA27863@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
Content-Length: 797
Lines: 24
@@ -6409,47 +6254,40 @@ index 0bb0a06..bebf6de 100644
1.5.5.1
-From davej Wed Aug 3 15:16:08 2011
+From oleg@redhat.com Mon Nov 21 15:07:14 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:08 -0400 (EDT)
Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:15:29 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:14 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 80872DA4B2;
- Wed, 3 Aug 2011 15:13:09 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5376AD8774;
+ Mon, 21 Nov 2011 15:07:14 -0500 (EST)
Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id AbpC0Wk1ZhtT; Wed, 3 Aug 2011 15:13:09 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
- by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6D97DDA3F8;
- Wed, 3 Aug 2011 15:13:09 -0400 (EDT)
+ with ESMTP id 5Oc8ErfFfJSs; Mon, 21 Nov 2011 15:07:14 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 3F2CFD81E9;
+ Mon, 21 Nov 2011 15:07:14 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD2RU022591;
- Wed, 3 Aug 2011 15:13:02 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7Cw3015467;
+ Mon, 21 Nov 2011 15:07:12 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:30 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:28 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:32 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:30 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 24/31] introduce task_utrace_lock/task_utrace_unlock
-Message-ID: <20110803191028.GA31015@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 24/33] introduce task_utrace_lock/task_utrace_unlock
+Message-ID: <20111121200230.GA27870@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 2190
Lines: 81
@@ -6536,48 +6374,41 @@ index bebf6de..960dd9e 100644
1.5.5.1
-From davej Wed Aug 3 15:21:46 2011
+From oleg@redhat.com Mon Nov 21 15:07:17 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:46 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:43 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:17 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 24B3E9DEF6;
- Wed, 3 Aug 2011 15:13:12 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 01034D498A;
+ Mon, 21 Nov 2011 15:07:17 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 2jg9j3-p4bHL; Wed, 3 Aug 2011 15:13:12 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 119759DEF9;
- Wed, 3 Aug 2011 15:13:12 -0400 (EDT)
+ with ESMTP id BglmrU3H2hJr; Mon, 21 Nov 2011 15:07:16 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E0D31D4FF4;
+ Mon, 21 Nov 2011 15:07:16 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD485022603;
- Wed, 3 Aug 2011 15:13:05 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7Egx015474;
+ Mon, 21 Nov 2011 15:07:15 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:32 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:30 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:35 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:33 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 25/31] teach ptrace_set_syscall_trace() to play well with
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 25/33] teach ptrace_set_syscall_trace() to play well with
utrace
-Message-ID: <20110803191030.GA31018@redhat.com>
+Message-ID: <20111121200233.GA27873@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 1545
Lines: 49
@@ -6599,7 +6430,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 7deb292..69850e9 100644
+index 1ac03eb..739183a 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -24,6 +24,7 @@
@@ -6632,45 +6463,38 @@ index 7deb292..69850e9 100644
1.5.5.1
-From davej Wed Aug 3 15:16:29 2011
+From oleg@redhat.com Mon Nov 21 15:07:19 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:28 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:24 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:19 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 062709DE55;
- Wed, 3 Aug 2011 15:13:15 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8F87F128EAA;
+ Mon, 21 Nov 2011 15:07:19 -0500 (EST)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id lhwVoEywGaPJ; Wed, 3 Aug 2011 15:13:14 -0400 (EDT)
+ with ESMTP id yittEjCd+X4F; Mon, 21 Nov 2011 15:07:19 -0500 (EST)
Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E4C139DE11;
- Wed, 3 Aug 2011 15:13:14 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7BC701287D0;
+ Mon, 21 Nov 2011 15:07:19 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JD7Go010523;
- Wed, 3 Aug 2011 15:13:08 -0400
+ by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK7HbH031553;
+ Mon, 21 Nov 2011 15:07:18 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:35 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:33 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:38 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:36 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 26/31] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK
-Message-ID: <20110803191033.GA31025@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 26/33] introduce PT_SINGLE_STEP and PT_SINGLE_BLOCK
+Message-ID: <20111121200236.GA27880@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Status: RO
@@ -6762,7 +6586,7 @@ index eb9fe30..21c8ca2 100644
}
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 69850e9..d250a71 100644
+index 739183a..792080d 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -630,13 +630,16 @@ static int ptrace_resume(struct task_struct *child, long request,
@@ -6786,48 +6610,41 @@ index 69850e9..d250a71 100644
1.5.5.1
-From davej Wed Aug 3 15:16:30 2011
+From oleg@redhat.com Mon Nov 21 15:07:22 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:30 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:22 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id B3BF49DE11;
- Wed, 3 Aug 2011 15:13:17 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 0C136128FB0;
+ Mon, 21 Nov 2011 15:07:22 -0500 (EST)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id zC72ecV9Jz07; Wed, 3 Aug 2011 15:13:17 -0400 (EDT)
-Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 98ACE9DE59;
- Wed, 3 Aug 2011 15:13:17 -0400 (EDT)
+ with ESMTP id GNbS20gY5Jq9; Mon, 21 Nov 2011 15:07:21 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id EB5821287D0;
+ Mon, 21 Nov 2011 15:07:21 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDATh023726;
- Wed, 3 Aug 2011 15:13:10 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK7Kn1029766;
+ Mon, 21 Nov 2011 15:07:20 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:38 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:36 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:40 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:38 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 27/31] utrace: finish_resume_report: don't do
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 27/33] utrace: finish_resume_report: don't do
user_xxx_step() if ptrace_wants_step()
-Message-ID: <20110803191036.GA31028@redhat.com>
+Message-ID: <20111121200238.GA27883@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 2741
Lines: 84
@@ -6917,48 +6734,41 @@ index 960dd9e..05e8532 100644
1.5.5.1
-From davej Wed Aug 3 15:16:32 2011
+From oleg@redhat.com Mon Nov 21 15:07:24 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:32 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:24 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 614CD9DE73;
- Wed, 3 Aug 2011 15:13:20 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8954F12914D;
+ Mon, 21 Nov 2011 15:07:24 -0500 (EST)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id jcWOXzUaaIYu; Wed, 3 Aug 2011 15:13:20 -0400 (EDT)
-Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 438889DE59;
- Wed, 3 Aug 2011 15:13:20 -0400 (EDT)
+ with ESMTP id 0lU8wXKC78yu; Mon, 21 Nov 2011 15:07:24 -0500 (EST)
+Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 759B61287D0;
+ Mon, 21 Nov 2011 15:07:24 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDDZ7029595;
- Wed, 3 Aug 2011 15:13:13 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7Mi7022329;
+ Mon, 21 Nov 2011 15:07:23 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:40 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:38 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:43 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:41 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 28/31] ptrace: shift user_*_step() from ptrace_resume() to
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 28/33] ptrace: shift user_*_step() from ptrace_resume() to
ptrace_stop()
-Message-ID: <20110803191038.GA31035@redhat.com>
+Message-ID: <20111121200241.GA27890@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
Content-Length: 2374
Lines: 70
@@ -6990,7 +6800,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index d250a71..d1ef124 100644
+index 792080d..eba9a22 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -635,14 +635,10 @@ static int ptrace_resume(struct task_struct *child, long request,
@@ -7009,10 +6819,10 @@ index d250a71..d1ef124 100644
child->exit_code = data;
diff --git a/kernel/signal.c b/kernel/signal.c
-index 3c783d3..43a3e77 100644
+index 38ea4e6..b13d2bc 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
-@@ -1920,6 +1920,17 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
+@@ -1928,6 +1928,17 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
utrace_end_stop();
@@ -7034,45 +6844,38 @@ index 3c783d3..43a3e77 100644
1.5.5.1
-From davej Wed Aug 3 15:16:34 2011
+From oleg@redhat.com Mon Nov 21 15:07:27 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:16:34 -0400 (EDT)
Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:25 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:27 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1A6019DE59;
- Wed, 3 Aug 2011 15:13:23 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 043581287D0;
+ Mon, 21 Nov 2011 15:07:27 -0500 (EST)
Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id db2hhAqFwsPu; Wed, 3 Aug 2011 15:13:23 -0400 (EDT)
+ with ESMTP id 4WO1El1jiIrJ; Mon, 21 Nov 2011 15:07:26 -0500 (EST)
Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 034739DE83;
- Wed, 3 Aug 2011 15:13:23 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E3FCA129045;
+ Mon, 21 Nov 2011 15:07:26 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDFNp008715;
- Wed, 3 Aug 2011 15:13:16 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7OdV017836;
+ Mon, 21 Nov 2011 15:07:25 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:43 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:41 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:45 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:43 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 29/31] ptrace_disable: no need to disable stepping
-Message-ID: <20110803191041.GA31039@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 29/33] ptrace_disable: no need to disable stepping
+Message-ID: <20111121200243.GA27893@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
@@ -7109,47 +6912,40 @@ index d1557dc..96d315a 100644
1.5.5.1
-From davej Wed Aug 3 15:21:48 2011
+From oleg@redhat.com Mon Nov 21 15:07:29 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:48 -0400 (EDT)
Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:52 -0400 (EDT)
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:29 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 95706917AF;
- Wed, 3 Aug 2011 15:13:25 -0400 (EDT)
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 8A6E8D4C39;
+ Mon, 21 Nov 2011 15:07:29 -0500 (EST)
Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id ctq4DF3wXncJ; Wed, 3 Aug 2011 15:13:25 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7FD14914AF;
- Wed, 3 Aug 2011 15:13:25 -0400 (EDT)
+ with ESMTP id NLURBx2yQes5; Mon, 21 Nov 2011 15:07:29 -0500 (EST)
+Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
+ by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 7660DD498A;
+ Mon, 21 Nov 2011 15:07:29 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p73JDIRO010579;
- Wed, 3 Aug 2011 15:13:18 -0400
+ by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7RnP015578;
+ Mon, 21 Nov 2011 15:07:27 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:46 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:44 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:48 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:46 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 30/31] ptrace_report_syscall: check TIF_SYSCALL_EMU
-Message-ID: <20110803191044.GA31046@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 30/33] ptrace_report_syscall: check TIF_SYSCALL_EMU
+Message-ID: <20111121200246.GA27896@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Status: RO
Content-Length: 858
Lines: 28
@@ -7183,46 +6979,39 @@ index b6812d4..90ca578 100644
1.5.5.1
-From davej Wed Aug 3 15:21:49 2011
+From oleg@redhat.com Mon Nov 21 15:07:32 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Wed, 03 Aug 2011 15:21:49 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Wed, 3 Aug 2011 15:16:52 -0400 (EDT)
+Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
+ zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:32 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 400F49191F;
- Wed, 3 Aug 2011 15:13:28 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id UeLOLM29JRc7; Wed, 3 Aug 2011 15:13:28 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 10D1312916C;
+ Mon, 21 Nov 2011 15:07:32 -0500 (EST)
+Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id Z14plX1oxaYL; Mon, 21 Nov 2011 15:07:32 -0500 (EST)
Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2D05C903F6;
- Wed, 3 Aug 2011 15:13:28 -0400 (EDT)
+ by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id F12FF128E1D;
+ Mon, 21 Nov 2011 15:07:31 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id p73JDKCA023784;
- Wed, 3 Aug 2011 15:13:21 -0400
+ by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7T0q022460;
+ Mon, 21 Nov 2011 15:07:30 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Wed, 3 Aug 2011 21:10:48 +0200 (CEST)
-Date: Wed, 3 Aug 2011 21:10:46 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:50 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:48 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH 31/31] utrace_resume: check irqs_disabled() to shut up
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 31/33] utrace_resume: check irqs_disabled() to shut up
lockdep
-Message-ID: <20110803191046.GA31049@redhat.com>
+Message-ID: <20111121200248.GA27903@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Status: RO
@@ -7256,49 +7045,41 @@ index 05e8532..c817a46 100644
1.5.5.1
-From davej Tue Aug 9 13:39:54 2011
+From oleg@redhat.com Mon Nov 21 15:07:34 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.51]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Tue, 09 Aug 2011 13:39:54 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com (LHLO
- zmta02.collab.prod.int.phx2.redhat.com) (10.5.5.32) by
- mail04.corp.redhat.com with LMTP; Tue, 9 Aug 2011 13:39:44 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:34 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 5FCAC12983C;
- Tue, 9 Aug 2011 13:39:44 -0400 (EDT)
-Received: from zmta02.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta02.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id nDWbqog6fbHK; Tue, 9 Aug 2011 13:39:44 -0400 (EDT)
-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
- by zmta02.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 4BEF712983B;
- Tue, 9 Aug 2011 13:39:44 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 860BCD8A3E;
+ Mon, 21 Nov 2011 15:07:34 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id pVTbN1oF62dg; Mon, 21 Nov 2011 15:07:34 -0500 (EST)
+Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6FBFFD87A3;
+ Mon, 21 Nov 2011 15:07:34 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p79HdahY022801;
- Tue, 9 Aug 2011 13:39:37 -0400
+ by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id pALK7W0B029871;
+ Mon, 21 Nov 2011 15:07:32 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Tue, 9 Aug 2011 19:36:58 +0200 (CEST)
-Date: Tue, 9 Aug 2011 19:36:56 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:53 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:51 +0100
From: Oleg Nesterov <oleg@redhat.com>
To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
Kyle McMartin <kmcmartin@redhat.com>
-Cc: kernel@lists.fedoraproject.org, utrace-devel@redhat.com
-Subject: [PATCH utrace-3.1 32/31] ptrace_report_syscall: check if
- TIF_SYSCALL_EMU is defined
-Message-ID: <20110809173656.GC26443@redhat.com>
-References: <20110802174514.GA23073@redhat.com> <20110803190806.GA30619@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 32/33] ptrace_report_syscall: check if TIF_SYSCALL_EMU is
+ defined
+Message-ID: <20111121200251.GA27906@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
-In-Reply-To: <20110803190806.GA30619@redhat.com>
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
+X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Status: RO
Content-Length: 839
Lines: 31
@@ -7335,50 +7116,43 @@ index 90ca578..a1bac95 100644
1.5.5.1
-From davej Thu Sep 1 14:14:49 2011
+From oleg@redhat.com Mon Nov 21 15:07:37 2011
Return-Path: oleg@redhat.com
-X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
- gelk.kernelslacker.org
-X-Spam-Level:
-X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD,
- UNPARSEABLE_RELAY autolearn=ham version=3.3.2
-Received: from mail.corp.redhat.com [10.5.5.52]
- by gelk with IMAP (fetchmail-6.3.20)
- for <davej@localhost> (single-drop); Thu, 01 Sep 2011 14:14:49 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
- zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by
- mail04.corp.redhat.com with LMTP; Thu, 1 Sep 2011 14:13:55 -0400 (EDT)
+Received: from zmta03.collab.prod.int.phx2.redhat.com (LHLO
+ zmta03.collab.prod.int.phx2.redhat.com) (10.5.5.33) by
+ zmail13.collab.prod.int.phx2.redhat.com with LMTP; Mon, 21 Nov 2011
+ 15:07:37 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1BA199C63F;
- Thu, 1 Sep 2011 14:13:55 -0400 (EDT)
-Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1])
- by localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
- with ESMTP id 0vQx9zlcQB36; Thu, 1 Sep 2011 14:13:55 -0400 (EDT)
-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
- by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 009959C63D;
- Thu, 1 Sep 2011 14:13:55 -0400 (EDT)
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 33405D8A50;
+ Mon, 21 Nov 2011 15:07:37 -0500 (EST)
+Received: from zmta03.collab.prod.int.phx2.redhat.com ([127.0.0.1])
+ by localhost (zmta03.collab.prod.int.phx2.redhat.com [127.0.0.1]) (amavisd-new, port 10024)
+ with ESMTP id 3WH8FhvizjEA; Mon, 21 Nov 2011 15:07:37 -0500 (EST)
+Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
+ by zmta03.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 1274FD89BB;
+ Mon, 21 Nov 2011 15:07:37 -0500 (EST)
Received: from tranklukator.englab.brq.redhat.com (dhcp-1-232.brq.redhat.com [10.34.1.232])
- by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p81IDrDX015389;
- Thu, 1 Sep 2011 14:13:54 -0400
+ by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id pALK7YHr017898;
+ Mon, 21 Nov 2011 15:07:35 -0500
Received: by tranklukator.englab.brq.redhat.com (nbSMTP-1.00) for uid 500
- oleg@redhat.com; Thu, 1 Sep 2011 20:10:54 +0200 (CEST)
-Date: Thu, 1 Sep 2011 20:10:53 +0200
+ oleg@redhat.com; Mon, 21 Nov 2011 21:02:55 +0100 (CET)
+Date: Mon, 21 Nov 2011 21:02:53 +0100
From: Oleg Nesterov <oleg@redhat.com>
-To: Dave Jones <davej@redhat.com>
-Cc: kernel@lists.fedoraproject.org, cebbert@redhat.com
-Subject: [PATCH F-16] bz735118: utrace: s390: fix the compile problem with
- traps.c
-Message-ID: <20110901181053.GA24990@redhat.com>
+To: Dave Jones <davej@redhat.com>, "Frank Ch. Eigler" <fche@redhat.com>,
+ Josh Boyer <jwboyer@redhat.com>, Josh Stone <jistone@redhat.com>,
+ Kyle McMartin <kmcmartin@redhat.com>
+Cc: kernel@lists.fedoraproject.org
+Subject: [PATCH 33/33] utrace: s390: fix the compile problem with traps.c
+Message-ID: <20111121200253.GA27913@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
+In-Reply-To: <20111121200039.GA27699@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
-X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Status: RO
-Content-Length: 777
-Lines: 27
-
-https://bugzilla.redhat.com/show_bug.cgi?id=735118
+Content-Length: 725
+Lines: 25
d99e60e5 "tracehooks: reintroduce tracehook_consider_fatal_signal()"
breaks the compilation of arch/s390/kernel/traps.c. Restore the
@@ -7390,7 +7164,7 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
-index 1018ab6..50e975d 100644
+index f506e1b..3132498 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -18,7 +18,7 @@
diff --git a/freed-ora/current/master/x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch b/freed-ora/current/master/x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch
deleted file mode 100644
index f05567fe3..000000000
--- a/freed-ora/current/master/x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-Path: news.gmane.org!not-for-mail
-From: Matt Fleming <matt@console-pimps.org>
-Newsgroups: gmane.linux.kernel
-Subject: [PATCH v2] x86, efi: Calling __pa() with an ioremap'd address is invalid
-Date: Fri, 14 Oct 2011 12:36:45 +0100
-Lines: 160
-Approved: news@gmane.org
-Message-ID: <1318592205-11193-1-git-send-email-matt@console-pimps.org>
-NNTP-Posting-Host: lo.gmane.org
-X-Trace: dough.gmane.org 1318592224 30879 80.91.229.12 (14 Oct 2011 11:37:04 GMT)
-X-Complaints-To: usenet@dough.gmane.org
-NNTP-Posting-Date: Fri, 14 Oct 2011 11:37:04 +0000 (UTC)
-Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
- "H. Peter Anvin" <hpa@zytor.com>, Zhang Rui <rui.zhang@intel.com>,
- Huang Ying <huang.ying.caritas@gmail.com>,
- linux-kernel@vger.kernel.org
-To: Matthew Garrett <mjg@redhat.com>
-Original-X-From: linux-kernel-owner@vger.kernel.org Fri Oct 14 13:36:59 2011
-Return-path: <linux-kernel-owner@vger.kernel.org>
-Envelope-to: glk-linux-kernel-3@lo.gmane.org
-Original-Received: from vger.kernel.org ([209.132.180.67])
- by lo.gmane.org with esmtp (Exim 4.69)
- (envelope-from <linux-kernel-owner@vger.kernel.org>)
- id 1REg4Q-0001UQ-SA
- for glk-linux-kernel-3@lo.gmane.org; Fri, 14 Oct 2011 13:36:59 +0200
-Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
- id S1755420Ab1JNLgv (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
- Fri, 14 Oct 2011 07:36:51 -0400
-Original-Received: from arkanian.console-pimps.org ([212.110.184.194]:46859 "EHLO
- arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK)
- by vger.kernel.org with ESMTP id S1751315Ab1JNLgu (ORCPT
- <rfc822;linux-kernel@vger.kernel.org>);
- Fri, 14 Oct 2011 07:36:50 -0400
-Original-Received: by arkanian.console-pimps.org (Postfix, from userid 1002)
- id 443C1C0009; Fri, 14 Oct 2011 12:36:49 +0100 (BST)
-X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
- arkanian.vm.bytemark.co.uk
-X-Spam-Level:
-X-Spam-Status: No, score=-5.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
- autolearn=ham version=3.2.5
-Original-Received: from localhost (02ddb86b.bb.sky.com [2.221.184.107])
- by arkanian.console-pimps.org (Postfix) with ESMTPSA id F0D40C0008;
- Fri, 14 Oct 2011 12:36:47 +0100 (BST)
-X-Mailer: git-send-email 1.7.4.4
-Original-Sender: linux-kernel-owner@vger.kernel.org
-Precedence: bulk
-List-ID: <linux-kernel.vger.kernel.org>
-X-Mailing-List: linux-kernel@vger.kernel.org
-Xref: news.gmane.org gmane.linux.kernel:1203294
-Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1203294>
-
-From: Matt Fleming <matt.fleming@intel.com>
-
-If we encounter an efi_memory_desc_t without EFI_MEMORY_WB set in
-->attribute we currently call set_memory_uc(), which in turn calls
-__pa() on a potentially ioremap'd address. On CONFIG_X86_32 this is
-invalid, resulting in the following oops,
-
- BUG: unable to handle kernel paging request at f7f22280
- IP: [<c10257b9>] reserve_ram_pages_type+0x89/0x210
- *pdpt = 0000000001978001 *pde = 0000000001ffb067 *pte = 0000000000000000
- Oops: 0000 [#1] PREEMPT SMP
- Modules linked in:
-
- Pid: 0, comm: swapper Not tainted 3.0.0-acpi-efi-0805 #3
- EIP: 0060:[<c10257b9>] EFLAGS: 00010202 CPU: 0
- EIP is at reserve_ram_pages_type+0x89/0x210
- EAX: 0070e280 EBX: 38714000 ECX: f7814000 EDX: 00000000
- ESI: 00000000 EDI: 38715000 EBP: c189fef0 ESP: c189fea8
- DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
- Process swapper (pid: 0, ti=c189e000 task=c18bbe60 task.ti=c189e000)
- Stack:
- 80000200 ff108000 00000000 c189ff00 00038714 00000000 00000000 c189fed0
- c104f8ca 00038714 00000000 00038715 00000000 00000000 00038715 00000000
- 00000010 38715000 c189ff48 c1025aff 38715000 00000000 00000010 00000000
- Call Trace:
- [<c104f8ca>] ? page_is_ram+0x1a/0x40
- [<c1025aff>] reserve_memtype+0xdf/0x2f0
- [<c1024dc9>] set_memory_uc+0x49/0xa0
- [<c19334d0>] efi_enter_virtual_mode+0x1c2/0x3aa
- [<c19216d4>] start_kernel+0x291/0x2f2
- [<c19211c7>] ? loglevel+0x1b/0x1b
- [<c19210bf>] i386_start_kernel+0xbf/0xc8
-
-So, if we're ioremap'ing an address range let's setup the mapping with
-the correct caching attribute instead of modifying it after the fact.
-
-Also, take this opportunity to unify the 32/64-bit efi_ioremap()
-implementations because they can both be implemented with
-ioremap_{cache,nocache}. When asked about the original reason behind
-using init_memory_mapping() for the 64-bit version Huang Ying said,
-
- "The intention of init_memory_mapping() usage is to make EFI virtual
- address unchanged after kexec. But in fact, init_memory_mapping()
- can not handle some memory range, so ioremap_xxx() is introduced as
- a fix. Now we decide to use ioremap_xxx() anyway and use some other
- scheme for kexec support, so init_memory_mapping() here is
- unnecessary. IMHO, init_memory_mapping() is not as good as
- ioremap_xxx() here."
-
-And because efi_ioremap() now consists of 4 lines, let's just inline
-it directly into the one callsite in efi_enter_virtual_mode().
-
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Ingo Molnar <mingo@elte.hu>
-Cc: H. Peter Anvin <hpa@zytor.com>
-Cc: Matthew Garrett <mjg@redhat.com>
-Cc: Zhang Rui <rui.zhang@intel.com>
-Cc: Huang Ying <huang.ying.caritas@gmail.com>
-Cc: stable@kernel.org
-Signed-off-by: Matt Fleming <matt.fleming@intel.com>
----
- arch/x86/include/asm/efi.h | 5 -----
- arch/x86/platform/efi/efi.c | 24 ++++++++++++++----------
- arch/x86/platform/efi/efi_64.c | 17 -----------------
- 3 files changed, 14 insertions(+), 32 deletions(-)
-
-diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
-index 7093e4a..b8d8bfc 100644
---- a/arch/x86/include/asm/efi.h
-+++ b/arch/x86/include/asm/efi.h
-@@ -33,8 +33,6 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);
- #define efi_call_virt6(f, a1, a2, a3, a4, a5, a6) \
- efi_call_virt(f, a1, a2, a3, a4, a5, a6)
-
--#define efi_ioremap(addr, size, type) ioremap_cache(addr, size)
--
- #else /* !CONFIG_X86_32 */
-
- extern u64 efi_call0(void *fp);
-@@ -84,9 +82,6 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
- efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
- (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
-
--extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,
-- u32 type);
--
- #endif /* CONFIG_X86_32 */
-
- extern int add_efi_memmap;
-diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
-index 3ae4128..6ea011c 100644
---- a/arch/x86/platform/efi/efi.c
-+++ b/arch/x86/platform/efi/efi.c
-@@ -670,10 +670,21 @@ void __init efi_enter_virtual_mode(void)
- end_pfn = PFN_UP(end);
- if (end_pfn <= max_low_pfn_mapped
- || (end_pfn > (1UL << (32 - PAGE_SHIFT))
-- && end_pfn <= max_pfn_mapped))
-+ && end_pfn <= max_pfn_mapped)) {
- va = __va(md->phys_addr);
-- else
-- va = efi_ioremap(md->phys_addr, size, md->type);
-+
-+ if (!(md->attribute & EFI_MEMORY_WB)) {
-+ addr = (u64) (unsigned long)va;
-+ npages = md->num_pages;
-+ memrange_efi_to_native(&addr, &npages);
-+ set_memory_uc(addr, npages);
-+ }
-+ } else {
-+ if (!(md->attribute & EFI_MEMORY_WB))
-+ va = ioremap_nocache(md->phys_addr, size);
-+ else
-+ va = ioremap_cache(md->phys_addr, size);
-+ }
-
- md->virt_addr = (u64) (unsigned long) va;
-
-@@ -683,13 +694,6 @@ void __init efi_enter_virtual_mode(void)
- continue;
- }
-
-- if (!(md->attribute & EFI_MEMORY_WB)) {
-- addr = md->virt_addr;
-- npages = md->num_pages;
-- memrange_efi_to_native(&addr, &npages);
-- set_memory_uc(addr, npages);
-- }
--
- systab = (u64) (unsigned long) efi_phys.systab;
- if (md->phys_addr <= systab && systab < end) {
- systab += md->virt_addr - md->phys_addr;
-diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
-index ac3aa54..312250c 100644
---- a/arch/x86/platform/efi/efi_64.c
-+++ b/arch/x86/platform/efi/efi_64.c
-@@ -80,20 +80,3 @@ void __init efi_call_phys_epilog(void)
- local_irq_restore(efi_flags);
- early_code_mapping_set_exec(0);
- }
--
--void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
-- u32 type)
--{
-- unsigned long last_map_pfn;
--
-- if (type == EFI_MEMORY_MAPPED_IO)
-- return ioremap(phys_addr, size);
--
-- last_map_pfn = init_memory_mapping(phys_addr, phys_addr + size);
-- if ((last_map_pfn << PAGE_SHIFT) < phys_addr + size) {
-- unsigned long top = last_map_pfn << PAGE_SHIFT;
-- efi_ioremap(top, size - (top - phys_addr), type);
-- }
--
-- return (void __iomem *)__va(phys_addr);
--}
---
-1.7.4.4
-
diff --git a/freed-ora/current/master/xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch b/freed-ora/current/master/xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
deleted file mode 100644
index 9e810dba8..000000000
--- a/freed-ora/current/master/xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com
-X-Spam-Level:
-X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,J_CHICKENPOX_64
- autolearn=no version=3.4.0-r929098
-Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11])
- by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p9I1KBVD036341
- for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 20:20:11 -0500
-X-ASG-Debug-ID: 1318901280-3911029d0000-NocioJ
-X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi
-Received: from hades.usersys.redhat.com (localhost [127.0.0.1])
- by cuda.sgi.com (Spam Firewall) with ESMTP id B9D1DF75F0A
- for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 18:28:01 -0700 (PDT)
-Received: from hades.usersys.redhat.com ([187.60.101.4]) by cuda.sgi.com with ESMTP id 81CuyNdYBqrtvtnD for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 18:28:01 -0700 (PDT)
-Received: by hades.usersys.redhat.com (Postfix, from userid 500)
- id 5B763E089B; Tue, 18 Oct 2011 02:18:59 -0200 (BRST)
-From: Carlos Maiolino <cmaiolino@redhat.com>
-To: xfs@oss.sgi.com
-Cc: Carlos Maiolino <cmaiolino@redhat.com>
-X-ASG-Orig-Subj: [PATCH] Fix possible memory corruption in xfs_readlink
-Subject: [PATCH] Fix possible memory corruption in xfs_readlink
-Date: Tue, 18 Oct 2011 02:18:58 -0200
-Message-Id: <1318911538-9174-1-git-send-email-cmaiolino@redhat.com>
-X-Mailer: git-send-email 1.7.6.2
-X-Barracuda-Connect: UNKNOWN[187.60.101.4]
-X-Barracuda-Start-Time: 1318901282
-X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210
-X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com
-X-Barracuda-Spam-Score: -1.42
-X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC5_MJ1963, RDNS_NONE
-X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.77645
- Rule breakdown below
- pts rule name description
- ---- ---------------------- --------------------------------------------------
- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS
- 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963
-X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com
-X-Virus-Status: Clean
-
-Fixes a possible memory corruption when the link is larger than
-MAXPATHLEN and XFS_DEBUG is not enabled. This also remove the
-S_ISLNK assert, since the inode mode is checked previously in
-xfs_readlink_by_handle() and via VFS.
-
-Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
----
- fs/xfs/xfs_vnodeops.c | 11 ++++++++---
- 1 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
-index 51fc429..c3288be 100644
---- a/fs/xfs/xfs_vnodeops.c
-+++ b/fs/xfs/xfs_vnodeops.c
-@@ -123,13 +123,18 @@ xfs_readlink(
-
- xfs_ilock(ip, XFS_ILOCK_SHARED);
-
-- ASSERT(S_ISLNK(ip->i_d.di_mode));
-- ASSERT(ip->i_d.di_size <= MAXPATHLEN);
--
- pathlen = ip->i_d.di_size;
- if (!pathlen)
- goto out;
-
-+ if (pathlen > MAXPATHLEN) {
-+ xfs_alert(mp, "%s: inode (%llu) symlink length (%d) too long",
-+ __func__, (unsigned long long)ip->i_ino, pathlen);
-+ ASSERT(0);
-+ return XFS_ERROR(EFSCORRUPTED);
-+ }
-+
-+
- if (ip->i_df.if_flags & XFS_IFINLINE) {
- memcpy(link, ip->i_df.if_u1.if_data, pathlen);
- link[pathlen] = '\0';
---
-1.7.6.2
-
OpenPOWER on IntegriCloud