Commits

Christos Nouskas committed 20f4658

3.5.3-3
Sync with -ARCH

Comments (0)

Files changed (5)

 pkgname=('linux-pf')
 true && pkgname=('linux-pf' 'linux-pf-headers')
 pkgver=${_basekernel}.${_pfrel}
-pkgrel=2
+pkgrel=3
 arch=('i686' 'x86_64')
 url="http://pf.natalenko.name/"
 license=('GPL2')
 options=('!strip')
 makedepends=('git' 'xmlto' 'docbook-xsl' 'xz')
-source=(ftp://www.kernel.org/pub/linux/kernel/v${_major}.x/linux-${_basekernel}.tar.xz
-	config config.x86_64		# the main kernel config files
-	linux-pf.preset			# standard config files for mkinitcpio ramdisk
-	logo_linux_clut224.ppm.bz2	#
-	logo_linux_mono.pbm.bz2		## the Arch Linux boot logos
-	logo_linux_vga16.ppm.bz2	#
-	channel-negative-one-maxim.patch	# hopefully fix "channel -1" aireplay-ng error
-	interactive-governor.tar.gz::https://gist.github.com/gists/1172524/download
-	change-default-console-loglevel.patch
-	${_pfpatchhome}${_pfpatchname}.bz2)	# the -pf patchset
+source=("ftp://www.kernel.org/pub/linux/kernel/v${_major}.x/linux-${_basekernel}.tar.xz"
+	'config' 'config.x86_64'		# the main kernel config files
+	'linux-pf.preset'			# standard config files for mkinitcpio ramdisk
+	'logo_linux_clut224.ppm.bz2'		#
+	'logo_linux_mono.pbm.bz2'		# the Arch Linux boot logos
+	'logo_linux_vga16.ppm.bz2'		#
+	'channel-negative-one-maxim.patch'	# hopefully fix "channel -1" aireplay-ng error
+	"interactive-governor.tar.gz::https://gist.github.com/gists/1172524/download"
+        'change-default-console-loglevel.patch'
+        'alsa-powersave-3.5.x.patch'
+        'watchdog-3.5.x.patch'
+        'i915-i2c-crash-3.5.x.patch'
+	"${_pfpatchhome}${_pfpatchname}.bz2")	# the -pf patchset
 
 _aufs3git="git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git"
 _aufs3name=aufs3
         fi
     fi
 
-
-   # add latest fixes from stable queue, if needed
-   # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
-
    msg "Patching for restless souls"
    patch -Np1 < "${srcdir}/channel-negative-one-maxim.patch"
 
    #   mv ${srcdir}/gist*/gistfile1.diff ${srcdir}
    #   patch -Np1 < ${srcdir}/gistfile1.diff
 
-   # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
-   # remove this when a Kconfig knob is made available by upstream
-   # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
-   patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
+  # linux-ARCH patches
+
+  # add latest fixes from stable queue, if needed
+  # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
+
+  # fix alsa powersave bug, probably fixed in 3.5.4
+  # https://bugs.archlinux.org/task/31255
+  patch -Np1 -i  "${srcdir}/alsa-powersave-3.5.x.patch"
+
+  # fix broken watchdog
+  # https://bugzilla.kernel.org/show_bug.cgi?id=44991
+  patch -Np1 -i "${srcdir}/watchdog-3.5.x.patch"
+
+  # fix i915 i2c crash
+  # https://bugzilla.kernel.org/show_bug.cgi?id=46381
+  patch -Np1 -i "${srcdir}/i915-i2c-crash-3.5.x.patch"
+
+  # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
+  # remove this when a Kconfig knob is made available by upstream
+  # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
+  patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
+
+  # end linux-ARCH patches
 
    if [ "$CARCH" = "x86_64" ]; then
 	cat "${startdir}/config.x86_64" >| .config
 
  ### c/p from linux-ARCH
 
-  cd "${srcdir}/linux-${_basekernel}"
+  cd "${srcdir}/${_srcname}"
 
   KARCH=x86
 
   # get kernel version
-  _kernver="$(make kernelrelease)"
+  _kernver="$(make LOCALVERSION= kernelrelease)"
+  _basekernel=${_kernver%%-*}
+  _basekernel=${_basekernel%.*}
 
   mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
-  make INSTALL_MOD_PATH="${pkgdir}" modules_install
-  cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}"
+  make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
+  cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
 
   # add vmlinux
   install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
 
   # install fallback mkinitcpio.conf file and preset file for kernel
-  install -D -m644 "${srcdir}/${pkgname}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
+  install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
 
   # set correct depmod command for install
   sed \
-    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
-    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-    -i "${startdir}/${pkgname}.install"
+    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \
+    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
+    -i "${startdir}/linux.install"
   sed \
-    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|g" \
-    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \
-    -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
-    -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
+    -e "1s|'linux.*'|'${pkgbase}'|" \
+    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
+    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
+    -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \
+    -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
 
   # remove build and source links
   rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
   # gzip -9 all modules to save 100MB of space
   find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
   # make room for external modules
-  ln -s "../extramodules-${_basekernel}${_kernelname:--pf}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+  ln -s "../extramodules-${_basekernel}${_kernelname:-pf}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
   # add real version for building modules and running depmod from post_install/upgrade
-  mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--pf}"
-  echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--pf}/version"
+  mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:-pf}"
+  echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:-pf}/version"
 
   # move module tree /lib -> /usr/lib
   mv "$pkgdir/lib" "$pkgdir/usr"
   cd "${pkgdir}/usr/lib/modules/${_kernver}"
   ln -sf ../../../src/linux-${_kernver} build
 
-  cd "${srcdir}/linux-${_basekernel}"
+  cd "${srcdir}/${_srcname}"
   install -D -m644 Makefile \
     "${pkgdir}/usr/src/linux-${_kernver}/Makefile"
   install -D -m644 kernel/Makefile \
     cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
   done
 
-  make INSTALL_HDR_PATH=${pkgdir}/usr/src/linux-${_kernver} headers_install
-
   chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
   find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
 
 pkgdesc="Linux kernel and modules with the pf-kernel patch [-ck patchset (BFS included), TuxOnIce, BFQ] and aufs3"
 
 # makepkg -g >>PKGBUILD
+
 sha256sums=('b985ce383f0cfd940d988d4c99a84899028327aca8c29b420678241f26fdb342'
             '556261f8e1b830b53553c949c8a3a36cb90aa22c01442947ce3e2465a2d26d2a'
             'cea900cfa3961e0ecc70bc55004ff04fe7fa9bc74a3fc55efd899b2cbb948cf8'
             '19f7fc0753636c32026e444e23bd101bd21cfeb59661284678bf157dc35212f2'
             'd537a358c9f8b9cbcad34ba99f88af070f54d99c66d3e5d3d4734576ed2fb6e1'
             'b9d79ca33b0b51ff4f6976b7cd6dbb0b624ebf4fbf440222217f8ffc50445de4'
+            'bab85b2bb775d9db4585336707cd619fe1cfd8c5959368a5642a0f9c13acf0b8'
+            '3b285aa62940908ef9dd2a72f81c28fd2c8102367188ef349509ff0f7d7f4fa8'
+            'bc9be7e4e5bc81aa30754a96f6a94c2e6eb6a147165a2ac50972c1fd59ef9964'
             '686af57ec415f395a3eb9e7e6cf2fbf59caf7a5d6a29136213abe1f25caa0406')

alsa-powersave-3.5.x.patch

+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 20 Aug 2012 19:25:22 +0000 (+0200)
+Subject: ALSA: hda - Fix leftover codec->power_transition
+X-Git-Tag: v3.6-rc3~14^2~1
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git;a=commitdiff_plain;h=535b6c51fe8293c88ce919cdfc4390c67a1cb6d1
+
+ALSA: hda - Fix leftover codec->power_transition
+
+When the codec turn-on operation is canceled by the immediate
+power-on, the driver left the power_transition flag as is.
+This caused the persistent avoidance of power-save behavior.
+
+Cc: <stable@vger.kernel.org> [v3.5+]
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+
+diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
+index c3077d5..f560051 100644
+--- a/sound/pci/hda/hda_codec.c
++++ b/sound/pci/hda/hda_codec.c
+@@ -4454,6 +4454,8 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down)
+ 	 * then there is no need to go through power up here.
+ 	 */
+ 	if (codec->power_on) {
++		if (codec->power_transition < 0)
++			codec->power_transition = 0;
+ 		spin_unlock(&codec->power_lock);
+ 		return;
+ 	}

i915-i2c-crash-3.5.x.patch

+From cee25168e9c4ef7f9417632af2dc78b8521dfda7 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Mon, 13 Aug 2012 17:33:02 +0300
+Subject: [PATCH] drm/i915: ensure i2c adapter is all set before adding it
+
+i2c_add_adapter() may do i2c transfers on the bus to detect supported
+devices. Therefore the adapter needs to be all set before adding it. This
+was not the case for the bit-banging fallback, resulting in an oops if the
+device detection GMBUS transfers timed out. Fix the issue by calling
+i2c_add_adapter() only after intel_gpio_setup().
+
+LKML-Reference: <5021F00B.7000503@ionic.de>
+Tested-by: Mihai Moldovan <ionic@ionic.de>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+---
+ drivers/gpu/drm/i915/intel_i2c.c |    7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
+index d79500b..b9755f6 100644
+--- a/drivers/gpu/drm/i915/intel_i2c.c
++++ b/drivers/gpu/drm/i915/intel_i2c.c
+@@ -486,9 +486,6 @@ int intel_setup_gmbus(struct drm_device *dev)
+ 		bus->dev_priv = dev_priv;
+ 
+ 		bus->adapter.algo = &gmbus_algorithm;
+-		ret = i2c_add_adapter(&bus->adapter);
+-		if (ret)
+-			goto err;
+ 
+ 		/* By default use a conservative clock rate */
+ 		bus->reg0 = port | GMBUS_RATE_100KHZ;
+@@ -498,6 +495,10 @@ int intel_setup_gmbus(struct drm_device *dev)
+ 			bus->force_bit = true;
+ 
+ 		intel_gpio_setup(bus, port);
++
++		ret = i2c_add_adapter(&bus->adapter);
++		if (ret)
++			goto err;
+ 	}
+ 
+ 	intel_i2c_reset(dev_priv->dev);
+-- 
+1.7.7.6
+
 # arg 2:  the old package version
 
 KERNEL_NAME=-pf
-KERNEL_VERSION=3.4-pf
+KERNEL_VERSION=3.5-pf
 
 # set a sane PATH to ensure that critical utils like depmod will be found
 export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
 post_upgrade() {
   pacman -Q grub &>/dev/null
   hasgrub=$?
-  pacman -Q grub2-common &>/dev/null
+  pacman -Q grub-common &>/dev/null
   hasgrub2=$?
   pacman -Q lilo &>/dev/null
   haslilo=$?

watchdog-3.5.x.patch

+diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c
+index 027cc8f..a05fdfc 100644
+--- a/drivers/mfd/lpc_ich.c
++++ b/drivers/mfd/lpc_ich.c
+@@ -765,7 +765,6 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
+ 	u32 base_addr_cfg;
+ 	u32 base_addr;
+ 	int ret;
+-	bool acpi_conflict = false;
+ 	struct resource *res;
+ 
+ 	/* Setup power management base register */
+@@ -780,20 +779,11 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
+ 	res = wdt_io_res(ICH_RES_IO_TCO);
+ 	res->start = base_addr + ACPIBASE_TCO_OFF;
+ 	res->end = base_addr + ACPIBASE_TCO_END;
+-	ret = acpi_check_resource_conflict(res);
+-	if (ret) {
+-		acpi_conflict = true;
+-		goto wdt_done;
+-	}
+ 
+ 	res = wdt_io_res(ICH_RES_IO_SMI);
+ 	res->start = base_addr + ACPIBASE_SMI_OFF;
+ 	res->end = base_addr + ACPIBASE_SMI_END;
+-	ret = acpi_check_resource_conflict(res);
+-	if (ret) {
+-		acpi_conflict = true;
+-		goto wdt_done;
+-	}
++
+ 	lpc_ich_enable_acpi_space(dev);
+ 
+ 	/*
+@@ -813,11 +803,6 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
+ 		res = wdt_mem_res(ICH_RES_MEM_GCS);
+ 		res->start = base_addr + ACPIBASE_GCS_OFF;
+ 		res->end = base_addr + ACPIBASE_GCS_END;
+-		ret = acpi_check_resource_conflict(res);
+-		if (ret) {
+-			acpi_conflict = true;
+-			goto wdt_done;
+-		}
+ 	}
+ 
+ 	lpc_ich_finalize_cell(&lpc_ich_cells[LPC_WDT], id);
+@@ -825,9 +810,6 @@ static int __devinit lpc_ich_init_wdt(struct pci_dev *dev,
+ 				1, NULL, 0);
+ 
+ wdt_done:
+-	if (acpi_conflict)
+-		pr_warn("Resource conflict(s) found affecting %s\n",
+-				lpc_ich_cells[LPC_WDT].name);
+ 	return ret;
+ }
+ 
+-- 
+1.7.1
+
+