mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
core/linux-tegra to 3.0.99-6
This commit is contained in:
parent
7263d484e3
commit
a257ee9dec
3 changed files with 156 additions and 19 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
# nVidia Tegra kernel and headers
|
||||
# - note: any other kernel packages should include headers for that march
|
||||
# - there will be no v7 kernel26 package, each march will be tagged individually
|
||||
# - there will be no v7 linux package, each march will be tagged individually
|
||||
|
||||
noautobuild=1
|
||||
plugrel=1
|
||||
|
@ -11,27 +11,28 @@ pkgbase=linux-tegra
|
|||
pkgname=('linux-tegra' 'linux-headers-tegra')
|
||||
# pkgname=linux-custom # Build kernel with a different name
|
||||
_kernelname=${pkgname#linux}
|
||||
_basekernel=3.1-rc4
|
||||
_basekernel=3.1-rc5
|
||||
pkgver=3.0.99
|
||||
pkgrel=5
|
||||
pkgrel=6
|
||||
arch=('arm')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage')
|
||||
options=('!strip')
|
||||
source=("http://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-3.1-rc4.tar.bz2"
|
||||
source=("torvalds-linux-v3.1-rc5-0-gddf2835.tar.gz::https://github.com/torvalds/linux/tarball/v3.1-rc5"
|
||||
'archlinuxarm.patch'
|
||||
'armdma.patch'
|
||||
'config'
|
||||
'change-default-console-loglevel.patch')
|
||||
md5sums=('a04ba2c0dca8d5989e20ea3a488f609d'
|
||||
md5sums=('beeed683a8da664c11ec33807554246c'
|
||||
'bc631a5c97e2b6c871cdbbfa6c75ae38'
|
||||
'333c9d19e10b4990162d33cc72d6500b'
|
||||
'6e7667c6c6348bfeca22eaaa05462d62'
|
||||
'57ea98beffeff10488cd81651fa9cb85'
|
||||
'9d3c56a4b999c8bfbd4018089a62f662')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
|
||||
#patch -p1 -i "${srcdir}/patch-${pkgver}"
|
||||
#cd "${srcdir}/linux-${_basekernel}"
|
||||
cd "${srcdir}/torvalds-linux-dba5cf0"
|
||||
|
||||
# add latest fixes from stable queue, if needed
|
||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||
|
@ -44,6 +45,9 @@ build() {
|
|||
# ALARM: remove deprecated mach/hardware.h include in cpu-tegra.c
|
||||
patch -Np1 -i "${srcdir}/archlinuxarm.patch"
|
||||
|
||||
# ALARM: add dma_coherent_write_sync calls to USB EHCI driver
|
||||
patch -Np1 -i "${srcdir}/armdma.patch"
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
# remove the sublevel from Makefile
|
||||
|
@ -90,7 +94,8 @@ package_linux-tegra() {
|
|||
backup=("etc/mkinitcpio.d/${pkgname}.preset")
|
||||
install=${pkgname}.install
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
#cd "${srcdir}/linux-${_basekernel}"
|
||||
cd "${srcdir}/torvalds-linux-dba5cf0"
|
||||
|
||||
KARCH=arm
|
||||
|
||||
|
@ -126,7 +131,8 @@ package_linux-headers-tegra() {
|
|||
cd "${pkgdir}/lib/modules/${_kernver}"
|
||||
ln -sf ../../../usr/src/linux-${_kernver} build
|
||||
|
||||
cd "${srcdir}/linux-${_basekernel}"
|
||||
#cd "${srcdir}/linux-${_basekernel}"
|
||||
cd "${srcdir}/torvalds-linux-dba5cf0"
|
||||
install -D -m644 Makefile \
|
||||
"${pkgdir}/usr/src/linux-${_kernver}/Makefile"
|
||||
install -D -m644 kernel/Makefile \
|
||||
|
@ -247,7 +253,3 @@ package_linux-headers-tegra() {
|
|||
# remove unneeded architectures
|
||||
rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa}
|
||||
}
|
||||
md5sums=('cd28799ad61707da720f889dde4cf4f6'
|
||||
'bc631a5c97e2b6c871cdbbfa6c75ae38'
|
||||
'0d1fc3d2b91fdf414c8574ef1094a2c9'
|
||||
'9d3c56a4b999c8bfbd4018089a62f662')
|
||||
|
|
122
core/linux-tegra/armdma.patch
Normal file
122
core/linux-tegra/armdma.patch
Normal file
|
@ -0,0 +1,122 @@
|
|||
diff -urN linux-3.1-rc4-a/arch/arm/include/asm/dma-mapping.h linux-3.1-rc4-b/arch/arm/include/asm/dma-mapping.h
|
||||
--- linux-3.1-rc4-a/arch/arm/include/asm/dma-mapping.h 2011-08-29 05:16:01.000000000 +0100
|
||||
+++ linux-3.1-rc4-b/arch/arm/include/asm/dma-mapping.h 2011-09-02 12:09:00.000000000 +0100
|
||||
@@ -205,6 +205,15 @@
|
||||
int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
|
||||
void *, dma_addr_t, size_t);
|
||||
|
||||
+#ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
|
||||
+#define ARCH_HAS_DMA_COHERENT_WRITE_SYNC
|
||||
+
|
||||
+static inline void dma_coherent_write_sync(void)
|
||||
+{
|
||||
+ dsb();
|
||||
+ outer_sync();
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_DMABOUNCE
|
||||
/*
|
||||
diff -urN linux-3.1-rc4-a/Documentation/DMA-API-HOWTO.txt linux-3.1-rc4-b/Documentation/DMA-API-HOWTO.txt
|
||||
--- linux-3.1-rc4-a/Documentation/DMA-API-HOWTO.txt 2011-08-29 05:16:01.000000000 +0100
|
||||
+++ linux-3.1-rc4-b/Documentation/DMA-API-HOWTO.txt 2011-09-02 12:01:09.000000000 +0100
|
||||
@@ -400,6 +400,22 @@
|
||||
from a pool before you destroy the pool. This function may not
|
||||
be called in interrupt context.
|
||||
|
||||
+Some architectures which supporting DMA coherent memory may still have write
|
||||
+buffering between the CPU and DMA memory. This buffering may delay CPU writes
|
||||
+from reaching coherent memory in a timely manner. These delays in turn can
|
||||
+lead lead to dramatic performance issues in certain cases. An architecture
|
||||
+may mitigate this problem to a large degree by having a write buffer flush
|
||||
+implicit in the MMIO functions used to write to device registers. This works
|
||||
+for the most common cases where a driver needs to write to a register to tell
|
||||
+a device that something was written to the shared coherent memory. There are
|
||||
+other cases where the device polls the dma-coherent memory for data written
|
||||
+by the driver. In such cases, the driver needs to explicity force write buffer
|
||||
+data to memory by calling:
|
||||
+
|
||||
+ dma_coherent_write_sync();
|
||||
+
|
||||
+
|
||||
+
|
||||
DMA Direction
|
||||
|
||||
The interfaces described in subsequent portions of this document
|
||||
diff -urN linux-3.1-rc4-a/Documentation/DMA-API.txt linux-3.1-rc4-b/Documentation/DMA-API.txt
|
||||
--- linux-3.1-rc4-a/Documentation/DMA-API.txt 2011-08-29 05:16:01.000000000 +0100
|
||||
+++ linux-3.1-rc4-b/Documentation/DMA-API.txt 2011-09-02 12:03:06.000000000 +0100
|
||||
@@ -418,6 +418,18 @@
|
||||
....
|
||||
|
||||
|
||||
+Part Ie - Write buffering to dma-coherent memory
|
||||
+------------------------------------------------
|
||||
+
|
||||
+Some architectures supporting DMA coherent memory may have write
|
||||
+buffering between the CPU and DMA memory. This buffering may delay
|
||||
+CPU writes from reaching coherent memory in a timely manner.
|
||||
+
|
||||
+ void
|
||||
+ dma_coherent_write_sync()
|
||||
+
|
||||
+Force any outstanding coherent writes to memory.
|
||||
+
|
||||
Part II - Advanced dma_ usage
|
||||
-----------------------------
|
||||
|
||||
diff -urN linux-3.1-rc4-a/drivers/usb/host/ehci-q.c linux-3.1-rc4-b/drivers/usb/host/ehci-q.c
|
||||
--- linux-3.1-rc4-a/drivers/usb/host/ehci-q.c 2011-08-29 05:16:01.000000000 +0100
|
||||
+++ linux-3.1-rc4-b/drivers/usb/host/ehci-q.c 2011-09-02 12:17:20.000000000 +0100
|
||||
@@ -114,6 +114,7 @@
|
||||
/* HC must see latest qtd and qh data before we clear ACTIVE+HALT */
|
||||
wmb ();
|
||||
hw->hw_token &= cpu_to_hc32(ehci, QTD_TOGGLE | QTD_STS_PING);
|
||||
+ dma_coherent_write_sync();
|
||||
}
|
||||
|
||||
/* if it weren't for a common silicon quirk (writing the dummy into the qh
|
||||
@@ -404,6 +405,7 @@
|
||||
wmb();
|
||||
hw->hw_token = cpu_to_hc32(ehci,
|
||||
token);
|
||||
+ dma_coherent_write_sync();
|
||||
goto retry_xacterr;
|
||||
}
|
||||
stopped = 1;
|
||||
@@ -753,8 +755,10 @@
|
||||
}
|
||||
|
||||
/* by default, enable interrupt on urb completion */
|
||||
- if (likely (!(urb->transfer_flags & URB_NO_INTERRUPT)))
|
||||
+ if (likely(!(urb->transfer_flags & URB_NO_INTERRUPT))) {
|
||||
qtd->hw_token |= cpu_to_hc32(ehci, QTD_IOC);
|
||||
+ dma_coherent_write_sync();
|
||||
+ }
|
||||
return head;
|
||||
|
||||
cleanup:
|
||||
@@ -1081,6 +1085,7 @@
|
||||
/* let the hc process these next qtds */
|
||||
wmb ();
|
||||
dummy->hw_token = token;
|
||||
+ dma_coherent_write_sync();
|
||||
|
||||
urb->hcpriv = qh_get (qh);
|
||||
}
|
||||
diff -urN linux-3.1-rc4-a/include/linux/dma-mapping.h linux-3.1-rc4-b/include/linux/dma-mapping.h
|
||||
--- linux-3.1-rc4-a/include/linux/dma-mapping.h 2011-08-29 05:16:01.000000000 +0100
|
||||
+++ linux-3.1-rc4-b/include/linux/dma-mapping.h 2011-09-02 12:06:06.000000000 +0100
|
||||
@@ -154,6 +154,12 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef ARCH_HAS_DMA_COHERENT_WRITE_SYNC
|
||||
+static inline void dma_coherent_write_sync(void)
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Managed DMA API
|
||||
*/
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 3.1.0-rc3 Kernel Configuration
|
||||
# Linux/arm 3.1.0-rc5 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
|
@ -1479,6 +1479,7 @@ CONFIG_SATA_MV=m
|
|||
#
|
||||
# CONFIG_PATA_ALI is not set
|
||||
# CONFIG_PATA_AMD is not set
|
||||
# CONFIG_PATA_ARASAN_CF is not set
|
||||
# CONFIG_PATA_ARTOP is not set
|
||||
# CONFIG_PATA_ATIIXP is not set
|
||||
# CONFIG_PATA_ATP867X is not set
|
||||
|
@ -2626,6 +2627,7 @@ CONFIG_VIDEO_M52790=m
|
|||
# CONFIG_VIDEO_MXB is not set
|
||||
# CONFIG_VIDEO_HEXIUM_ORION is not set
|
||||
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
|
||||
# CONFIG_VIDEO_TIMBERDALE is not set
|
||||
# CONFIG_VIDEO_CX88 is not set
|
||||
# CONFIG_VIDEO_CX23885 is not set
|
||||
# CONFIG_VIDEO_AU0828 is not set
|
||||
|
@ -2969,7 +2971,7 @@ CONFIG_DRM_TTM=y
|
|||
# CONFIG_DRM_VIA is not set
|
||||
# CONFIG_DRM_SAVAGE is not set
|
||||
# CONFIG_STUB_POULSBO is not set
|
||||
# CONFIG_VGASTATE is not set
|
||||
CONFIG_VGASTATE=m
|
||||
CONFIG_VIDEO_OUTPUT_CONTROL=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FIRMWARE_EDID=y
|
||||
|
@ -3003,7 +3005,10 @@ CONFIG_FB_MODE_HELPERS=y
|
|||
# CONFIG_FB_IMSTT is not set
|
||||
# CONFIG_FB_UVESA is not set
|
||||
# CONFIG_FB_S1D13XXX is not set
|
||||
# CONFIG_FB_NVIDIA is not set
|
||||
CONFIG_FB_NVIDIA=m
|
||||
# CONFIG_FB_NVIDIA_I2C is not set
|
||||
# CONFIG_FB_NVIDIA_DEBUG is not set
|
||||
CONFIG_FB_NVIDIA_BACKLIGHT=y
|
||||
# CONFIG_FB_RIVA is not set
|
||||
# CONFIG_FB_MATROX is not set
|
||||
# CONFIG_FB_RADEON is not set
|
||||
|
@ -3700,7 +3705,15 @@ CONFIG_RTC_DRV_EM3027=y
|
|||
# CONFIG_RTC_DRV_PL030 is not set
|
||||
# CONFIG_RTC_DRV_PL031 is not set
|
||||
CONFIG_RTC_DRV_TEGRA=y
|
||||
# CONFIG_DMADEVICES is not set
|
||||
CONFIG_DMADEVICES=y
|
||||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
|
||||
#
|
||||
# DMA Devices
|
||||
#
|
||||
# CONFIG_AMBA_PL08X is not set
|
||||
# CONFIG_DW_DMAC is not set
|
||||
# CONFIG_TIMB_DMA is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
CONFIG_UIO=m
|
||||
# CONFIG_UIO_CIF is not set
|
||||
|
|
Loading…
Reference in a new issue